From e6a9c7052a6e38b85a24e58037f7c107f9a16e64 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Wed, 5 Jun 2024 12:24:05 -0500 Subject: [PATCH] removes rest of cruft missions and reworks high priority --- code/modules/events/high_priority_bounty.dm | 29 +++++++ .../alien_infestation.dm | 66 ---------------- .../high_priority_bounty.dm | 20 ----- .../mass_hallucination.dm | 38 ---------- .../events/refactor_and_unticked/operative.dm | 39 ---------- .../refactor_and_unticked/space_dragon.dm | 43 ----------- .../spider_infestation.dm | 39 ---------- .../events/refactor_and_unticked/wormholes.dm | 76 ------------------- code/modules/events/ship/lottery.dm | 11 ++- shiptest.dme | 1 + 10 files changed, 39 insertions(+), 323 deletions(-) create mode 100644 code/modules/events/high_priority_bounty.dm delete mode 100644 code/modules/events/refactor_and_unticked/alien_infestation.dm delete mode 100644 code/modules/events/refactor_and_unticked/high_priority_bounty.dm delete mode 100644 code/modules/events/refactor_and_unticked/mass_hallucination.dm delete mode 100644 code/modules/events/refactor_and_unticked/operative.dm delete mode 100644 code/modules/events/refactor_and_unticked/space_dragon.dm delete mode 100644 code/modules/events/refactor_and_unticked/spider_infestation.dm delete mode 100644 code/modules/events/refactor_and_unticked/wormholes.dm diff --git a/code/modules/events/high_priority_bounty.dm b/code/modules/events/high_priority_bounty.dm new file mode 100644 index 000000000000..389e4ab82624 --- /dev/null +++ b/code/modules/events/high_priority_bounty.dm @@ -0,0 +1,29 @@ +/* +/datum/round_event_control/high_priority_mission + name = "High Priority Mission" + typepath = /datum/round_event/high_priority_mission + max_occurrences = 3 + weight = 20 + earliest_start = 0 //10 MINUTES + +/datum/round_event_control/high_priority_missiony/canSpawnEvent(players, allow_magic = FALSE) + if(!(length(SSovermap.outposts))) + return FALSE + return ..() + +/datum/round_event/high_priority_mission + var/datum/mission/priority_mission + var/datum/overmap/outpost/target_outpost + +/datum/round_event/high_priority_mission/announce() + priority_announce("We have issued a high-priority mission. Details have been sent to all consoles.", "[target_outpost] Mission Program", null, sender_override = "[target_outpost] Communications") + +/datum/round_event/high_priority_mission/setup() + target_outpost = pick(SSovermap.outposts) + priority_mission = pick(target_outpost.missions) + +/datum/round_event/high_priority_mission/start() + if(priority_mission) + priority_mission.name = "HIGH PRIORITY - [priority_mission.name]" + priority_mission.value = priority_mission.value * 3 +*/ diff --git a/code/modules/events/refactor_and_unticked/alien_infestation.dm b/code/modules/events/refactor_and_unticked/alien_infestation.dm deleted file mode 100644 index 950a93c422c8..000000000000 --- a/code/modules/events/refactor_and_unticked/alien_infestation.dm +++ /dev/null @@ -1,66 +0,0 @@ -/datum/round_event_control/alien_infestation - name = "Alien Infestation" - typepath = /datum/round_event/ghost_role/alien_infestation - weight = 10 - max_occurrences = 1 - min_players = 20 - -/datum/round_event/ghost_role/alien_infestation - announceWhen = 400 - - minimum_required = 1 - role_name = "alien larva" - - fakeable = TRUE - - /// How many alien larva to spawn - var/spawncount = 2 - -/datum/round_event/ghost_role/alien_infestation/setup() - announceWhen = rand(announceWhen, announceWhen + 50) - -/datum/round_event/ghost_role/alien_infestation/announce(fake) - var/living_aliens = FALSE - for(var/mob/living/carbon/alien/A in GLOB.player_list) - if(A.stat != DEAD) - living_aliens = TRUE - if(living_aliens || fake) - priority_announce("Scanners show that a very rare royal larva has been found in [station_name()]. Because of this, we have valid reason to suspect that a Xenomorph hive has manifested itself. Secure any exterior access, including ducting and ventilation. Beware of very strange looking dogs.", "Lifesign Alert", 'sound/ai/aliens.ogg', sender_override = "CM-BARD") - -/datum/round_event/ghost_role/alien_infestation/spawn_role() - var/list/vents = list() - for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in GLOB.machines) - if(QDELETED(temp_vent)) - continue - if(temp_vent.welded) - continue - var/datum/pipeline/temp_vent_parent = temp_vent.parents[1] - if(!temp_vent_parent) - continue//no parent vent - //Stops Aliens getting stuck in small networks. - //See: Security, Virology - if(temp_vent_parent.other_atmosmch.len > 20) - vents += temp_vent - - if(!vents.len) - message_admins("An event attempted to spawn an alien but no suitable vents were found. Shutting down.") - return MAP_ERROR - - var/list/candidates = get_candidates(ROLE_ALIEN, null, ROLE_ALIEN) - - if(!candidates.len) - return NOT_ENOUGH_PLAYERS - - while(spawncount > 0 && vents.len && candidates.len) - var/obj/vent = pick_n_take(vents) - var/client/C = pick_n_take(candidates) - - var/mob/living/carbon/alien/larva/new_xeno = new(vent.loc) - new_xeno.key = C.key - - spawncount-- - message_admins("[ADMIN_LOOKUPFLW(new_xeno)] has been made into an alien by an event.") - log_game("[key_name(new_xeno)] was spawned as an alien by an event.") - spawned_mobs += new_xeno - - return SUCCESSFUL_SPAWN diff --git a/code/modules/events/refactor_and_unticked/high_priority_bounty.dm b/code/modules/events/refactor_and_unticked/high_priority_bounty.dm deleted file mode 100644 index ffdcd8840b7e..000000000000 --- a/code/modules/events/refactor_and_unticked/high_priority_bounty.dm +++ /dev/null @@ -1,20 +0,0 @@ -/datum/round_event_control/high_priority_bounty - name = "High Priority Bounty" - typepath = /datum/round_event/high_priority_bounty - max_occurrences = 3 - weight = 20 - earliest_start = 10 - -/datum/round_event/high_priority_bounty/announce(fake) - priority_announce("Central Command has issued a high-priority cargo bounty. Details have been sent to all bounty consoles.", "Nanotrasen Bounty Program") - -/datum/round_event/high_priority_bounty/start() - var/datum/bounty/B - for(var/attempts = 0; attempts < 50; ++attempts) - B = random_bounty() - if(!B) - continue - B.mark_high_priority(3) - if(try_add_bounty(B)) - break - diff --git a/code/modules/events/refactor_and_unticked/mass_hallucination.dm b/code/modules/events/refactor_and_unticked/mass_hallucination.dm deleted file mode 100644 index 3391e97fb464..000000000000 --- a/code/modules/events/refactor_and_unticked/mass_hallucination.dm +++ /dev/null @@ -1,38 +0,0 @@ -/datum/round_event_control/mass_hallucination - name = "Mass Hallucination" - typepath = /datum/round_event/mass_hallucination - weight = 10 - max_occurrences = 2 - min_players = 1 - -/datum/round_event/mass_hallucination - fakeable = FALSE - -/datum/round_event/mass_hallucination/start() - switch(rand(1,4)) - if(1) //same sound for everyone - var/sound = pick("airlock","airlock_pry","console","explosion","far_explosion","mech","glass","alarm","beepsky","mech","wall_decon","door_hack","tesla") - for(var/mob/living/carbon/C in GLOB.alive_mob_list) - new /datum/hallucination/sounds(C, TRUE, sound) - if(2) - var/weirdsound = pick("phone","hallelujah","highlander","hyperspace","game_over","creepy","tesla") - for(var/mob/living/carbon/C in GLOB.alive_mob_list) - new /datum/hallucination/weird_sounds(C, TRUE, weirdsound) - if(3) - var/stationmessage = pick("ratvar","shuttle_dock","blob_alert","malf_ai","meteors","supermatter") - for(var/mob/living/carbon/C in GLOB.alive_mob_list) - new /datum/hallucination/stationmessage(C, TRUE, stationmessage) - if(4 to 6) - var/picked_hallucination = pick( /datum/hallucination/bolts, - /datum/hallucination/chat, - /datum/hallucination/message, - /datum/hallucination/bolts, - /datum/hallucination/fake_flood, - /datum/hallucination/battle, - /datum/hallucination/fire, - /datum/hallucination/self_delusion, - /datum/hallucination/death, - /datum/hallucination/delusion, - /datum/hallucination/oh_yeah) - for(var/mob/living/carbon/C in GLOB.alive_mob_list) - new picked_hallucination(C, TRUE) diff --git a/code/modules/events/refactor_and_unticked/operative.dm b/code/modules/events/refactor_and_unticked/operative.dm deleted file mode 100644 index 7fca4188b769..000000000000 --- a/code/modules/events/refactor_and_unticked/operative.dm +++ /dev/null @@ -1,39 +0,0 @@ -/datum/round_event_control/operative - name = "Lone Operative" - typepath = /datum/round_event/ghost_role/operative - weight = 0 //Admin only - max_occurrences = 1 - -/datum/round_event/ghost_role/operative - minimum_required = 1 - role_name = "lone operative" - fakeable = FALSE - -/datum/round_event/ghost_role/operative/spawn_role() - var/list/candidates = get_candidates(ROLE_OPERATIVE, null, ROLE_OPERATIVE) - 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/carpspawn/L in GLOB.landmarks_list) - spawn_locs += L.loc - if(!spawn_locs.len) - return MAP_ERROR - - var/mob/living/carbon/human/operative = new(pick(spawn_locs)) - var/datum/preferences/A = new - A.copy_to(operative) - operative.dna.update_dna_identity() - var/datum/mind/Mind = new /datum/mind(selected.key) - Mind.assigned_role = "Lone Operative" - Mind.special_role = "Lone Operative" - Mind.active = 1 - Mind.transfer_to(operative) - Mind.add_antag_datum(/datum/antagonist/nukeop/lone) - - message_admins("[ADMIN_LOOKUPFLW(operative)] has been made into lone operative by an event.") - log_game("[key_name(operative)] was spawned as a lone operative by an event.") - spawned_mobs += operative - return SUCCESSFUL_SPAWN diff --git a/code/modules/events/refactor_and_unticked/space_dragon.dm b/code/modules/events/refactor_and_unticked/space_dragon.dm deleted file mode 100644 index da9aa56087bc..000000000000 --- a/code/modules/events/refactor_and_unticked/space_dragon.dm +++ /dev/null @@ -1,43 +0,0 @@ -/datum/round_event_control/space_dragon - name = "Spawn Space Dragon" - typepath = /datum/round_event/ghost_role/space_dragon - max_occurrences = 1 - weight = 5 - earliest_start = 35 MINUTES - min_players = 20 - -/datum/round_event/ghost_role/space_dragon - minimum_required = 1 - role_name = "Space Dragon" - announceWhen = 10 - -/datum/round_event/ghost_role/space_dragon/announce(fake) - priority_announce("A large organic energy flux has been recorded near [station_name()], please stand-by.", "Lifesign Alert") - -/datum/round_event/ghost_role/space_dragon/spawn_role() - var/list/candidates = get_candidates(ROLE_SPACE_DRAGON, null, ROLE_SPACE_DRAGON) - if(!candidates.len) - return NOT_ENOUGH_PLAYERS - - var/mob/dead/selected = pick(candidates) - - var/datum/mind/player_mind = new /datum/mind(selected.key) - player_mind.active = TRUE - - var/list/spawn_locs = list() - for(var/obj/effect/landmark/carpspawn/C in GLOB.landmarks_list) - spawn_locs += (C.loc) - if(!spawn_locs.len) - message_admins("No valid spawn locations found, aborting...") - return MAP_ERROR - - var/mob/living/simple_animal/hostile/space_dragon/S = new (pick(spawn_locs)) - player_mind.transfer_to(S) - player_mind.assigned_role = "Space Dragon" - player_mind.special_role = "Space Dragon" - player_mind.add_antag_datum(/datum/antagonist/space_dragon) - playsound(S, 'sound/magic/ethereal_exit.ogg', 50, TRUE, -1) - message_admins("[ADMIN_LOOKUPFLW(S)] has been made into a Space Dragon by an event.") - log_game("[key_name(S)] was spawned as a Space Dragon by an event.") - spawned_mobs += S - return SUCCESSFUL_SPAWN diff --git a/code/modules/events/refactor_and_unticked/spider_infestation.dm b/code/modules/events/refactor_and_unticked/spider_infestation.dm deleted file mode 100644 index b454a6f83ac2..000000000000 --- a/code/modules/events/refactor_and_unticked/spider_infestation.dm +++ /dev/null @@ -1,39 +0,0 @@ -/datum/round_event_control/spider_infestation - name = "Spider Infestation" - typepath = /datum/round_event/spider_infestation - weight = 5 - max_occurrences = 1 - min_players = 15 - -/datum/round_event/spider_infestation - announceWhen = 400 - - var/spawncount = 1 - - -/datum/round_event/spider_infestation/setup() - announceWhen = rand(announceWhen, announceWhen + 50) - spawncount = rand(5, 8) - -/datum/round_event/spider_infestation/announce(fake) - priority_announce("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", 'sound/ai/aliens.ogg') - - -/datum/round_event/spider_infestation/start() - var/list/vents = list() - for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in GLOB.machines) - if(QDELETED(temp_vent)) - continue - if(!temp_vent.welded) - var/datum/pipeline/temp_vent_parent = temp_vent.parents[1] - if(temp_vent_parent.other_atmosmch.len > 20) - vents += temp_vent - - while((spawncount >= 1) && vents.len) - var/obj/vent = pick(vents) - var/spawn_type = /obj/structure/spider/spiderling - if(prob(66)) - spawn_type = /obj/structure/spider/spiderling/nurse - announce_to_ghosts(spawn_atom_to_turf(spawn_type, vent, 1, FALSE)) - vents -= vent - spawncount-- diff --git a/code/modules/events/refactor_and_unticked/wormholes.dm b/code/modules/events/refactor_and_unticked/wormholes.dm deleted file mode 100644 index f2b5f15d92b1..000000000000 --- a/code/modules/events/refactor_and_unticked/wormholes.dm +++ /dev/null @@ -1,76 +0,0 @@ -GLOBAL_LIST_EMPTY(all_wormholes) // So we can pick wormholes to teleport to - -/datum/round_event_control/wormholes - name = "Wormholes" - typepath = /datum/round_event/wormholes - max_occurrences = 3 - weight = 2 - min_players = 2 - - -/datum/round_event/wormholes - announceWhen = 10 - endWhen = 60 - - var/list/pick_turfs = list() - var/list/wormholes = list() - var/shift_frequency = 3 - var/number_of_wormholes = 400 - -/datum/round_event/wormholes/setup() - announceWhen = rand(0, 20) - endWhen = rand(40, 80) - -/datum/round_event/wormholes/start() - for(var/turf/open/floor/T in world) - pick_turfs += T - - for(var/i = 1, i <= number_of_wormholes, i++) - var/turf/T = pick(pick_turfs) - wormholes += new /obj/effect/portal/wormhole(T, 0, null, FALSE) - -/datum/round_event/wormholes/announce(fake) - priority_announce("Space-time anomalies detected in this sector. There is no additional data.", "Anomaly Alert", 'sound/ai/spanomalies.ogg') - -/datum/round_event/wormholes/tick() - if(activeFor % shift_frequency == 0) - for(var/obj/effect/portal/wormhole/O in wormholes) - var/turf/T = pick(pick_turfs) - if(T) - O.forceMove(T) - -/datum/round_event/wormholes/end() - QDEL_LIST(wormholes) - wormholes = null - -/obj/effect/portal/wormhole - name = "wormhole" - desc = "It looks highly unstable; It could close at any moment." - icon = 'icons/obj/objects.dmi' - icon_state = "anom" - mech_sized = TRUE - - -/obj/effect/portal/wormhole/Initialize(mapload, _creator, _lifespan = 0, obj/effect/portal/_linked, automatic_link = FALSE, turf/hard_target_override, atmos_link_override) - . = ..() - GLOB.all_wormholes += src - -/obj/effect/portal/wormhole/Destroy() - . = ..() - GLOB.all_wormholes -= src - -/obj/effect/portal/wormhole/teleport(atom/movable/M) - if(iseffect(M)) //sparks don't teleport - return - if(M.anchored) - if(!(ismecha(M) && mech_sized)) - return - - if(ismovable(M)) - if(GLOB.all_wormholes.len) - var/obj/effect/portal/wormhole/P = pick(GLOB.all_wormholes) - if(P && isturf(P.loc)) - hard_target = P.loc - if(!hard_target) - return - do_teleport(M, hard_target, 1, 0, 0, channel = TELEPORT_CHANNEL_WORMHOLE) ///You will appear adjacent to the beacon diff --git a/code/modules/events/ship/lottery.dm b/code/modules/events/ship/lottery.dm index a02a1d49c9f7..ad9557654097 100644 --- a/code/modules/events/ship/lottery.dm +++ b/code/modules/events/ship/lottery.dm @@ -13,13 +13,20 @@ /datum/round_event/ship/lottery var/creds_won = 0 + var/datum/overmap/outpost/target_outpost announceWhen = 5 +/datum/round_event/ship/lottery/setup() + if(!..()) + return FALSE + target_outpost = pick(SSovermap.outposts) + creds_won = rand(1, 100) * 250 + /datum/round_event/ship/lottery/start() if(!target_ship) return if(target_ship.ship_account) - creds_won = rand(1, 100) * 250 + target_ship.ship_account.adjust_money(creds_won, "deposit") /datum/round_event/ship/lottery/announce(fake) @@ -30,7 +37,7 @@ null, null, "Sweep stakes!", - sender_override = "Outpost Communications", + sender_override = "[target_outpost] Communications", ) diff --git a/shiptest.dme b/shiptest.dme index 02bb5b876094..526b497cf590 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -2080,6 +2080,7 @@ #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\high_priority_bounty.dm" #include "code\modules\events\ion_storm.dm" #include "code\modules\events\salesman.dm" #include "code\modules\events\sentience.dm"