Skip to content

Commit

Permalink
new events
Browse files Browse the repository at this point in the history
  • Loading branch information
FalloutFalcon committed Jun 5, 2024
1 parent 6724a62 commit 76cf4c8
Show file tree
Hide file tree
Showing 15 changed files with 170 additions and 21 deletions.
1 change: 1 addition & 0 deletions _maps/outpost/indie_space.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,7 @@
"dP" = (
/obj/structure/chair,
/obj/item/radio/intercom/directional/north,
/obj/effect/landmark/salesman,
/turf/open/floor/plasteel/patterned/cargo_one,
/area/outpost/vacant_rooms)
"dQ" = (
Expand Down
1 change: 1 addition & 0 deletions _maps/outpost/nanotrasen_asteroid.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -5938,6 +5938,7 @@
/obj/structure/closet/wall/directional/east{
name = "Storage Locker"
},
/obj/effect/landmark/salesman,
/turf/open/floor/carpet,
/area/outpost/hallway/central)
"vc" = (
Expand Down
1 change: 1 addition & 0 deletions _maps/outpost/nanotrasen_ice.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -3109,6 +3109,7 @@
},
/obj/machinery/light/broken/directional/north,
/obj/structure/chair/office,
/obj/effect/landmark/salesman,
/turf/open/floor/plasteel/patterned/ridged,
/area/outpost/vacant_rooms/shop)
"uE" = (
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/lists/mapping.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ GLOBAL_LIST_EMPTY(secequipment) //sec equipment lockers that scale with the numb
GLOBAL_LIST_EMPTY(deathsquadspawn)
GLOBAL_LIST_EMPTY(emergencyresponseteamspawn)
GLOBAL_LIST_EMPTY(emergencyresponseteam_outpostspawn)
GLOBAL_LIST_EMPTY(salesman_landmarks)
GLOBAL_LIST_EMPTY(ruin_landmarks)
GLOBAL_LIST_EMPTY(stationroom_landmarks) //List of all spawns for stationrooms

Expand Down
2 changes: 1 addition & 1 deletion code/controllers/configuration/entries/game_options.dm
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@
/datum/config_entry/flag/should_events

/datum/config_entry/number/events_frequency_lower
config_entry_value = 2.5 MINUTES
config_entry_value = 3 MINUTES

/datum/config_entry/number/events_frequency_upper

Expand Down
4 changes: 4 additions & 0 deletions code/game/objects/effects/landmarks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,10 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark/start/new_player)
name = "Emergency response team briefing officer spawn"
icon_state = "ert_brief_spawn"

/obj/effect/landmark/salesman
name = "Salesman spawn"
icon_state = "ert_spawn"

//ninja energy nets teleport victims here
/obj/effect/landmark/holding_facility
name = "Holding Facility"
Expand Down
58 changes: 58 additions & 0 deletions code/modules/events/fax_spam.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/datum/round_event_control/fax_spam
name = "Fax Spam"
typepath = /datum/round_event/fax_spam
weight = 10
max_occurrences = 1
min_players = 1
earliest_start = 5 MINUTES

/datum/round_event/fax_spam
endWhen = 60
var/list/pick_faxes = list()
var/spam_frequency = 5
var/spam_prob = 50
var/obj/item/paper/spam/spam_type

/datum/round_event/fax_spam/setup()
endWhen = rand(20, 40)
spam_type = pick(/obj/item/paper/spam/ifmc, /obj/item/paper/spam/help)

/datum/round_event/fax_spam/start()
for(var/obj/machinery/fax/fax_machine in GLOB.machines)
if(fax_machine.visible_to_network)
pick_faxes += fax_machine

/datum/round_event/fax_spam/tick()
if(activeFor % spam_frequency == 0)
var/obj/item/paper/spam/spam_message = new spam_type
for(var/obj/machinery/fax/fax_machine in pick_faxes )

Check failure on line 28 in code/modules/events/fax_spam.dm

View workflow job for this annotation

GitHub Actions / Run Linters

Check Regex

padding inside parentheses added to here, remove or update check_regex.yml
if(!prob(spam_prob))
continue
fax_machine.receive(spam_message, spam_message.sender)

/obj/item/paper/spam
var/sender = "Spammer"

/obj/item/paper/spam/ifmc
name = "paper- 'Official Bulletin'"
sender = "Interstellar Frontier Mining Conglormerate"
default_raw_text = {"Greetings sir/madame/other,

I am representative of the Interstellar Frontier Mining Conglomerate, and recent lucerative mining operations in frontier systems have resulted in an approximate profit equal to 40,000,000 credits.

Unfortunately, due to Solar Confederation laws regarding monetary transfer, we are unable to transfer monetary profits to our local bank accounts, and we require your assistance in transferring our funding. For facilitating this transfer, the Interstellar Frontier Mining Conglomerate is willing to relinquish 10% or 4,000,000 credits in exchange for services rendered.

To assist us, please wire funding equal to or exceeding 500 credits to the SolGov Monetary Fund Account listed below. Upon confirmed reciept of the funding, we will send additional instructions on monetary transfer.

Forward funding to SolGov Monetary Fund Account ID: 846584.

Yours truly,

Interstellar Frontier Mining Conglormerate Board of Directors"}

/obj/item/paper/spam/help
name = "paper- 'HELP ME'"
sender = "HELP ME"
default_raw_text = {"HEEEEEEEEELP

HEEEEEEEEEEEEELP ME"}
2 changes: 1 addition & 1 deletion code/modules/events/refactor_and_unticked/sentience.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ GLOBAL_LIST_INIT(high_priority_sentience, typecacheof(list(

/datum/round_event/ghost_role/sentience/spawn_role()
var/list/mob/dead/observer/candidates
candidates = get_candidates(ROLE_ALIEN, null, ROLE_ALIEN)
candidates = get_candidates(role_name, null, role_name)

// find our chosen mob to breathe life into
// Mobs have to be simple animals, mindless, on station, and NOT holograms.
Expand Down
79 changes: 79 additions & 0 deletions code/modules/events/salesman.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/datum/round_event_control/salesman
name = "Outpost Salesman"
typepath = /datum/round_event/ghost_role/salesman
weight = 5
earliest_start = 10 MINUTES
min_players = 0
max_occurrences = 1

/datum/round_event/ghost_role/salesman
role_name = "Outpost Salesman"
minimum_required = 1
var/salesman_outfit = /datum/outfit/job/independent/cargo_tech
var/locker = /obj/structure/closet/salesman

/datum/round_event/ghost_role/salesman/spawn_role()
var/list/candidates = get_candidates(null, null, null)
if(!candidates.len)
return NOT_ENOUGH_PLAYERS

var/mob/dead/selected = pick_n_take(candidates)

var/list/spawn_locs = list()
for(var/obj/effect/landmark/salesman/spawn_point in GLOB.landmarks_list)
spawn_locs += spawn_point.loc
if(!spawn_locs.len)
return MAP_ERROR

var/spawn_location = pick(spawn_locs)
var/mob/living/carbon/human/salesman = new(spawn_location)
var/datum/preferences/A = new
A.copy_to(salesman)
salesman.dna.update_dna_identity()
var/datum/mind/salesman_mind = new /datum/mind(selected.key)
salesman_mind.assigned_role = role_name
salesman_mind.special_role = role_name
salesman_mind.active = TRUE
salesman_mind.transfer_to(salesman)
salesman.equipOutfit(salesman_outfit)

new locker(spawn_location)

message_admins("[ADMIN_LOOKUPFLW(salesman)] has been made into a salesman by an event.")
log_game("[key_name(salesman)] was spawned as a salesman by an event.")
spawned_mobs += salesman
return SUCCESSFUL_SPAWN

/obj/structure/closet/salesman

/obj/structure/closet/salesman/PopulateContents()
..()
var/type = pick("hunters_pride")

var/list/stuff = list()


stuff += /obj/item/spacecash/bundle/loadsamoney
stuff += /obj/item/spacecash/bundle/loadsamoney

switch(type)
if("hunters_pride")
stuff += list(/obj/item/gun/ballistic/rifle/illestren,
/obj/item/gun/ballistic/rifle/illestren,
/obj/item/gun/ballistic/rifle/scout,
/obj/item/gun/ballistic/shotgun/doublebarrel,
/obj/item/gun/ballistic/revolver/detective,
/obj/item/gun/ballistic/revolver/detective,
/obj/item/gun/ballistic/revolver/firebrand,
/obj/item/ammo_box/c38,
/obj/item/ammo_box/c38,
/obj/item/ammo_box/c38_box,
/obj/item/ammo_box/c38_box,
/obj/item/ammo_box/magazine/illestren_a850r,
/obj/item/ammo_box/magazine/illestren_a850r,
/obj/item/storage/toolbox/ammo/a850r,)

for(var/thing in stuff)
new thing(src)


4 changes: 2 additions & 2 deletions code/modules/events/ship/lottery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
name = "lottery"
typepath = /datum/round_event/ship/lottery
weight = 2
earliest_start = 0 //20 MINUTES
min_players = 1 //10
earliest_start = 20 MINUTES
min_players = 10
max_occurrences = 1

/datum/round_event_control/ship_lottery/canSpawnEvent(players, allow_magic = FALSE)
Expand Down
11 changes: 8 additions & 3 deletions code/modules/events/ship/random_pet.dm
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/datum/round_event_control/random_pet
name = "Small Rodent Infestation"
name = "Random Pet"
typepath = /datum/round_event/ship/random_pet
weight = 10
max_occurrences = 3
min_players = 1
earliest_start = 0 //5 MINUTES
earliest_start = 5 MINUTES

/datum/round_event_control/random_pet/canSpawnEvent(players, allow_magic = FALSE)
if(!(length(SSovermap.controlled_ships)))
Expand All @@ -17,7 +17,12 @@
/datum/round_event/ship/random_pet/setup()
if(!..())
return FALSE
random_pet = pick(/mob/living/simple_animal/pet/dog/corgi, /mob/living/simple_animal/pet/dog/corgi/capybara)
random_pet = pick(/mob/living/simple_animal/pet/dog/corgi,
/mob/living/simple_animal/pet/dog/corgi/capybara,
/mob/living/simple_animal/pet/dog/pug,
/mob/living/simple_animal/pet/cat,
/mob/living/simple_animal/pet/mothroach,
/mob/living/simple_animal/pet/fox)

/datum/round_event/ship/random_pet/start()
var/list/crates = list()
Expand Down
10 changes: 5 additions & 5 deletions code/modules/events/ship/rodent_infestation.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@
name = "Small Rodent Infestation"
typepath = /datum/round_event/ship/rodent_infestation
weight = 10
max_occurrences = 3
min_players = 0
earliest_start = 0 //5 MINUTES
max_occurrences = 5
min_players = 1
earliest_start = 5 MINUTES

/datum/round_event_control/rodent_infestation/canSpawnEvent(players, allow_magic = FALSE)
if(!(length(SSovermap.controlled_ships)))
return FALSE
return ..()

/datum/round_event/ship/rodent_infestation
var/mob/living/simple_animal/rodent_type
var/mob/living/simple_animal/rodent_type = /mob/living/simple_animal/mouse
var/spawncount = 1

/datum/round_event/ship/rodent_infestation/setup()
if(!..())
return FALSE
spawncount = rand(2, 4)
rodent_type = pick(/mob/living/simple_animal/mouse, /mob/living/simple_animal/hostile/rat)
//rodent_type = pick(/mob/living/simple_animal/mouse, /mob/living/simple_animal/hostile/rat)

/datum/round_event/ship/rodent_infestation/start()
var/list/vents = list()
Expand Down
9 changes: 3 additions & 6 deletions code/modules/events/ship/stray_cargo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
typepath = /datum/round_event/ship/stray_cargo
weight = 5
max_occurrences = 2
min_players = 1 //10
earliest_start = 0 //10 MINUTES
min_players = 10
earliest_start = 10 MINUTES

/datum/round_event_control/stray_cargo/canSpawnEvent(players, allow_magic = FALSE)
if(!(length(SSovermap.controlled_ships)))
Expand Down Expand Up @@ -43,9 +43,6 @@
if(!turf_test.len)
CRASH("Stray Cargo Pod : No valid turfs found for [impact_area] - [impact_area.type]")

if(!stray_spawnable_supply_packs.len)
stray_spawnable_supply_packs = SSshuttle.supply_packs.Copy()

///Spawns a random supply pack, puts it in a pod, and spawns it on a random tile of the selected area
/datum/round_event/ship/stray_cargo/start()
if(!target_ship)
Expand All @@ -61,7 +58,7 @@
if(possible_pack_types.len)
pack_type = pick(possible_pack_types)
else
pack_type = pick(stray_spawnable_supply_packs)
pack_type = pick(SSshuttle.supply_packs)
var/datum/supply_pack/SP = new pack_type
var/obj/structure/closet/crate/crate = SP.generate(null)
crate.locked = FALSE //Unlock secure crates
Expand Down
6 changes: 3 additions & 3 deletions config/game_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -584,9 +584,9 @@ OVERMAP_GENERATOR_TYPE solar_system
## Size of overmap encounters, vertical and width with a 3 tile border
OVERMAP_ENCOUNTER_SIZE 127

SHOULD_EVENTS 1
EVENTS_FREQUENCY_LOWER 100
EVENTS_FREQUENCY_UPPER 100
SHOULD_EVENTS
EVENTS_FREQUENCY_LOWER 1800
EVENTS_FREQUENCY_UPPER 4200

## The time required before a ship is allowed to bluespace jump. -1 disables it entirely
## In deciseconds, valid values are -1 to INFINITY
Expand Down
2 changes: 2 additions & 0 deletions shiptest.dme
Original file line number Diff line number Diff line change
Expand Up @@ -2079,7 +2079,9 @@
#include "code\modules\events\_event.dm"
#include "code\modules\events\_ghost_role.dm"
#include "code\modules\events\aurora_caelus.dm"
#include "code\modules\events\fax_spam.dm"
#include "code\modules\events\ion_storm.dm"
#include "code\modules\events\salesman.dm"
#include "code\modules\events\spacevine.dm"
#include "code\modules\events\holiday\halloween.dm"
#include "code\modules\events\holiday\vday.dm"
Expand Down

0 comments on commit 76cf4c8

Please sign in to comment.