From 76cf4c8d36acdfc1eb12c48858bc44398678bfc5 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Wed, 5 Jun 2024 06:46:26 -0500 Subject: [PATCH] new events --- _maps/outpost/indie_space.dmm | 1 + _maps/outpost/nanotrasen_asteroid.dmm | 1 + _maps/outpost/nanotrasen_ice.dmm | 1 + code/_globalvars/lists/mapping.dm | 1 + .../configuration/entries/game_options.dm | 2 +- code/game/objects/effects/landmarks.dm | 4 + code/modules/events/fax_spam.dm | 58 ++++++++++++++ .../events/refactor_and_unticked/sentience.dm | 2 +- code/modules/events/salesman.dm | 79 +++++++++++++++++++ code/modules/events/ship/lottery.dm | 4 +- code/modules/events/ship/random_pet.dm | 11 ++- .../modules/events/ship/rodent_infestation.dm | 10 +-- code/modules/events/ship/stray_cargo.dm | 9 +-- config/game_options.txt | 6 +- shiptest.dme | 2 + 15 files changed, 170 insertions(+), 21 deletions(-) create mode 100644 code/modules/events/fax_spam.dm create mode 100644 code/modules/events/salesman.dm diff --git a/_maps/outpost/indie_space.dmm b/_maps/outpost/indie_space.dmm index d7debf2a5dc7..934a391e3c24 100644 --- a/_maps/outpost/indie_space.dmm +++ b/_maps/outpost/indie_space.dmm @@ -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" = ( diff --git a/_maps/outpost/nanotrasen_asteroid.dmm b/_maps/outpost/nanotrasen_asteroid.dmm index a55df014f4f9..11505e4c4cf3 100644 --- a/_maps/outpost/nanotrasen_asteroid.dmm +++ b/_maps/outpost/nanotrasen_asteroid.dmm @@ -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" = ( diff --git a/_maps/outpost/nanotrasen_ice.dmm b/_maps/outpost/nanotrasen_ice.dmm index 696342178b2d..046edec7486a 100644 --- a/_maps/outpost/nanotrasen_ice.dmm +++ b/_maps/outpost/nanotrasen_ice.dmm @@ -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" = ( diff --git a/code/_globalvars/lists/mapping.dm b/code/_globalvars/lists/mapping.dm index c402eb1e75a9..1779737e245f 100644 --- a/code/_globalvars/lists/mapping.dm +++ b/code/_globalvars/lists/mapping.dm @@ -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 diff --git a/code/controllers/configuration/entries/game_options.dm b/code/controllers/configuration/entries/game_options.dm index ae5c1d7f5f25..45a36ba39f3d 100644 --- a/code/controllers/configuration/entries/game_options.dm +++ b/code/controllers/configuration/entries/game_options.dm @@ -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 diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm index 078c435bd213..8bb93f039e86 100644 --- a/code/game/objects/effects/landmarks.dm +++ b/code/game/objects/effects/landmarks.dm @@ -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" diff --git a/code/modules/events/fax_spam.dm b/code/modules/events/fax_spam.dm new file mode 100644 index 000000000000..9a9f69a80502 --- /dev/null +++ b/code/modules/events/fax_spam.dm @@ -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 ) + 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"} diff --git a/code/modules/events/refactor_and_unticked/sentience.dm b/code/modules/events/refactor_and_unticked/sentience.dm index 1626af24af2d..80ebae9a8f27 100644 --- a/code/modules/events/refactor_and_unticked/sentience.dm +++ b/code/modules/events/refactor_and_unticked/sentience.dm @@ -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. diff --git a/code/modules/events/salesman.dm b/code/modules/events/salesman.dm new file mode 100644 index 000000000000..860d91a6726c --- /dev/null +++ b/code/modules/events/salesman.dm @@ -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) + + diff --git a/code/modules/events/ship/lottery.dm b/code/modules/events/ship/lottery.dm index 3d21ad07299b..97e691614290 100644 --- a/code/modules/events/ship/lottery.dm +++ b/code/modules/events/ship/lottery.dm @@ -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) diff --git a/code/modules/events/ship/random_pet.dm b/code/modules/events/ship/random_pet.dm index 0ec260bbf2ff..a8ba2f709bba 100644 --- a/code/modules/events/ship/random_pet.dm +++ b/code/modules/events/ship/random_pet.dm @@ -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))) @@ -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() diff --git a/code/modules/events/ship/rodent_infestation.dm b/code/modules/events/ship/rodent_infestation.dm index f6f71698086d..7dccd0c75743 100644 --- a/code/modules/events/ship/rodent_infestation.dm +++ b/code/modules/events/ship/rodent_infestation.dm @@ -2,9 +2,9 @@ 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))) @@ -12,14 +12,14 @@ 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() diff --git a/code/modules/events/ship/stray_cargo.dm b/code/modules/events/ship/stray_cargo.dm index f983e67877fa..0248d328f1b9 100644 --- a/code/modules/events/ship/stray_cargo.dm +++ b/code/modules/events/ship/stray_cargo.dm @@ -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))) @@ -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) @@ -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 diff --git a/config/game_options.txt b/config/game_options.txt index 3c1d8d6e2eda..663eaf632bc0 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -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 diff --git a/shiptest.dme b/shiptest.dme index ee6bb7e8919f..a7073c73b4d1 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -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"