diff --git a/code/_helpers/global_lists.dm b/code/_helpers/global_lists.dm index 9a1cda542ac..72e6370873c 100644 --- a/code/_helpers/global_lists.dm +++ b/code/_helpers/global_lists.dm @@ -28,6 +28,8 @@ var/global/list/ghostteleportlocs = list() var/global/list/centcom_areas = list() var/global/list/the_station_areas = list() +var/global/list/implants = list() + var/global/list/turfs = list() //list of all turfs //Languages/species/whitelist. diff --git a/code/controllers/subsystems/processing/calamity.dm b/code/controllers/subsystems/processing/calamity.dm index 9fdeb90bd97..715ff3ec17b 100644 --- a/code/controllers/subsystems/processing/calamity.dm +++ b/code/controllers/subsystems/processing/calamity.dm @@ -1,10 +1,13 @@ // This is a separate processor so the MC can schedule singuloth/tesla/Nar-sie independent from other objects. -var/datum/controller/subsystem/processing/SScalamity +var/datum/controller/subsystem/processing/calamity/SScalamity + /datum/controller/subsystem/processing/calamity name = "Calamity" flags = SS_NO_INIT | SS_POST_FIRE_TIMING priority = SS_PRIORITY_CALAMITY + var/list/singularities = list() + /datum/controller/subsystem/processing/calamity/New() NEW_SS_GLOBAL(SScalamity) diff --git a/code/game/antagonist/antagonist_panel.dm b/code/game/antagonist/antagonist_panel.dm index 821f3a8e807..55146bd1bb7 100644 --- a/code/game/antagonist/antagonist_panel.dm +++ b/code/game/antagonist/antagonist_panel.dm @@ -39,7 +39,7 @@ if(flags & ANTAG_HAS_NUKE) dat += "
" - for(var/obj/item/weapon/disk/nuclear/N in world) + for(var/obj/item/weapon/disk/nuclear/N in nuke_disks) dat += "
Nuclear disk(s)
[N.name], " var/atom/disk_loc = N.loc while(!istype(disk_loc, /turf)) diff --git a/code/game/gamemodes/epidemic/epidemic.dm b/code/game/gamemodes/epidemic/epidemic.dm index 17e4809c490..1544bd92777 100644 --- a/code/game/gamemodes/epidemic/epidemic.dm +++ b/code/game/gamemodes/epidemic/epidemic.dm @@ -52,7 +52,7 @@ // add an extra law to the AI to make sure it cooperates with the heads var/extra_law = "Crew authorized to know of pathogen [virus_name]'s existence are: Heads of command. Do not allow unauthorized personnel to gain knowledge of [virus_name]. Aid authorized personnel in quarantining and neutrlizing the outbreak. This law overrides all other laws." - for(var/mob/living/silicon/ai/M in world) + for(var/mob/living/silicon/ai/M in silicon_mob_list) M.add_ion_law(extra_law) M << "[extra_law]" @@ -72,7 +72,7 @@ // scan the crew for possible infectees var/list/crew = list() - for(var/mob/living/carbon/human/H in world) if(H.client) + for(var/mob/living/carbon/human/H in human_mob_list) if(H.client) // heads should not be infected if(H.mind.assigned_role in command_positions) continue crew += H @@ -140,7 +140,7 @@ /datum/game_mode/epidemic/check_win() var/alive = 0 var/sick = 0 - for(var/mob/living/carbon/human/H in world) + for(var/mob/living/carbon/human/H in human_mob_list) if(H.key && H.stat != 2) alive++ if(H.virus2.len && H.stat != 2) sick++ @@ -164,7 +164,7 @@ /////////////////////////////////////////// /datum/game_mode/epidemic/proc/crew_lose() SSticker.mode:explosion_in_progress = 1 - for(var/mob/M in world) + for(var/mob/M in mob_list) if(M.client) M << 'sound/machines/Alarm.ogg' world << "Incoming missile detected.. Impact in 10.." diff --git a/code/game/gamemodes/events/VirusEpidemic.dm b/code/game/gamemodes/events/VirusEpidemic.dm index 54b9760a2f7..db0dae2a2a5 100644 --- a/code/game/gamemodes/events/VirusEpidemic.dm +++ b/code/game/gamemodes/events/VirusEpidemic.dm @@ -7,7 +7,7 @@ Announce() if(!virus) - for(var/mob/living/carbon/human/H in world) + for(var/mob/living/carbon/human/H in human_mob_list) if((H.virus2.len) || (H.stat == 2) || prob(30)) continue if(prob(100)) // no lethal diseases outside virus mode! @@ -45,7 +45,7 @@ // virus_type = /datum/disease/t_virus if("pierrot's throat") virus_type = /datum/disease/pierrot_throat - for(var/mob/living/carbon/human/H in world) + for(var/mob/living/carbon/human/H in human_mob_list) var/foundAlready = 0 // don't infect someone that already has the virus for(var/datum/disease/D in H.viruses) diff --git a/code/game/gamemodes/events/wormholes.dm b/code/game/gamemodes/events/wormholes.dm index a7830a2cb3e..b8a51fedd21 100644 --- a/code/game/gamemodes/events/wormholes.dm +++ b/code/game/gamemodes/events/wormholes.dm @@ -1,7 +1,7 @@ /proc/wormhole_event() spawn() var/list/pick_turfs = list() - for(var/turf/simulated/floor/T in world) + for(var/turf/simulated/floor/T in turfs) if(T.z in config.station_levels) pick_turfs += T diff --git a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm index 0f9fc40bed1..d51d7f2bfcd 100644 --- a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm +++ b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm @@ -119,7 +119,7 @@ user << "Please pick a suitable camera." -/datum/game_mode/malfunction/verb/emergency_forcefield(var/turf/T as turf in world) +/datum/game_mode/malfunction/verb/emergency_forcefield(var/turf/T as turf in turfs) set name = "Emergency Forcefield" set desc = "275 CPU - Uses station's emergency shielding system to create temporary barrier which lasts for few minutes, but won't resist gunfire." set category = "Software" diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index 69c112ab5da..2de920f1ec5 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -37,7 +37,7 @@ var/list/nuke_disks = list() ..() return var/disk_rescued = 1 - for(var/obj/item/weapon/disk/nuclear/D in world) + for(var/obj/item/weapon/disk/nuclear/D in nuke_disks) var/disk_area = get_area(D) if(!is_type_in_list(disk_area, centcom_areas)) disk_rescued = 0 diff --git a/code/game/gamemodes/vampire/vampire_powers.dm b/code/game/gamemodes/vampire/vampire_powers.dm index c6ed71feed4..63f899b1be8 100644 --- a/code/game/gamemodes/vampire/vampire_powers.dm +++ b/code/game/gamemodes/vampire/vampire_powers.dm @@ -192,7 +192,7 @@ to_chat(src, "You broke your gaze.") // Targeted teleportation, must be to a low-light tile. -/mob/living/carbon/human/proc/vampire_veilstep(var/turf/T in world) +/mob/living/carbon/human/proc/vampire_veilstep(var/turf/T in turfs) set category = "Vampire" set name = "Veil Step (20)" set desc = "For a moment, move through the Veil and emerge at a shadow of your choice." diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm index 268ad8d938b..6cc11b0a509 100644 --- a/code/game/machinery/computer/prisoner.dm +++ b/code/game/machinery/computer/prisoner.dm @@ -30,7 +30,7 @@ else if(screen == 1) dat += "
Chemical Implants
" var/turf/Tr = null - for(var/obj/item/weapon/implant/chem/C in world) + for(var/obj/item/weapon/implant/chem/C in implants) Tr = get_turf(C) if((Tr) && (Tr.z != src.z)) continue//Out of range if(!C.implanted) continue @@ -40,7 +40,7 @@ dat += "((10))
" dat += "********************************
" dat += "
Tracking Implants
" - for(var/obj/item/weapon/implant/tracking/T in world) + for(var/obj/item/weapon/implant/tracking/T in implants) Tr = get_turf(T) if((Tr) && (Tr.z != src.z)) continue//Out of range if(!T.implanted) continue diff --git a/code/game/machinery/computer/specops_shuttle.dm b/code/game/machinery/computer/specops_shuttle.dm index d1228d99717..0d6c3784327 100644 --- a/code/game/machinery/computer/specops_shuttle.dm +++ b/code/game/machinery/computer/specops_shuttle.dm @@ -93,7 +93,7 @@ var/specops_shuttle_timeleft = 0 specops_shuttle_at_station = 0 - for(var/obj/machinery/computer/specops_shuttle/S in world) + for(var/obj/machinery/computer/specops_shuttle/S in SSmachinery.all_machines) S.specops_shuttle_timereset = world.time + SPECOPS_RETURN_DELAY qdel(announcer) @@ -160,10 +160,10 @@ var/specops_shuttle_timeleft = 0 sleep(10) var/spawn_marauder[] = new() - for(var/obj/effect/landmark/L in world) + for(var/obj/effect/landmark/L in landmarks_list) if(L.name == "Marauder Entry") spawn_marauder.Add(L) - for(var/obj/effect/landmark/L in world) + for(var/obj/effect/landmark/L in landmarks_list) if(L.name == "Marauder Exit") var/obj/effect/portal/P = new(L.loc) P.invisibility = 101//So it is not seen by anyone. @@ -234,7 +234,7 @@ var/specops_shuttle_timeleft = 0 var/mob/M = locate(/mob) in T M << "You have arrived to [station_name]. Commence operation!" - for(var/obj/machinery/computer/specops_shuttle/S in world) + for(var/obj/machinery/computer/specops_shuttle/S in SSmachinery.all_machines) S.specops_shuttle_timereset = world.time + SPECOPS_RETURN_DELAY qdel(announcer) @@ -242,7 +242,7 @@ var/specops_shuttle_timeleft = 0 /proc/specops_can_move() if(specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return 0 - for(var/obj/machinery/computer/specops_shuttle/S in world) + for(var/obj/machinery/computer/specops_shuttle/S in SSmachinery.all_machines) if(world.timeofday <= S.specops_shuttle_timereset) return 0 return 1 diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm index 47098bf953c..b4eaa9efb09 100644 --- a/code/game/machinery/syndicatebeacon.dm +++ b/code/game/machinery/syndicatebeacon.dm @@ -95,7 +95,8 @@ if(surplus() < 1500) if(user) user << "The connected wire doesn't have enough current." return - for(var/obj/singularity/singulo in world) + for(var/A in SScalamity.singularities) + var/obj/singularity/singulo = A if(singulo.z == z) singulo.target = src icon_state = "[icontype]1" @@ -106,7 +107,8 @@ /obj/machinery/power/singularity_beacon/proc/Deactivate(mob/user = null) - for(var/obj/singularity/singulo in world) + for(var/A in SScalamity.singularities) + var/obj/singularity/singulo = A if(singulo.target == src) singulo.target = null icon_state = "[icontype]0" diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index 38113fbb659..0a5e54f9059 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -14,6 +14,10 @@ var/allow_reagents = 0 var/malfunction = 0 +/obj/item/weapon/implant/Initialize() + . = ..() + implants += src + /obj/item/weapon/implant/proc/trigger(emote, source as mob) return @@ -51,6 +55,7 @@ if(part) part.implants.Remove(src) STOP_PROCESSING(SSprocessing, src) + implants -= src return ..() /obj/item/weapon/implant/tracking diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm index 511acbb96e9..02fbd56b12b 100644 --- a/code/game/objects/items/weapons/teleportation.dm +++ b/code/game/objects/items/weapons/teleportation.dm @@ -78,7 +78,7 @@ Frequency: src.temp += "[W.code]-[dir2text(get_dir(sr, tr))]-[direct]
" src.temp += "Extranneous Signals:
" - for (var/obj/item/weapon/implant/tracking/W in world) + for (var/obj/item/weapon/implant/tracking/W in implants) if (!W.implanted || !(istype(W.loc,/obj/item/organ/external) || ismob(W.loc))) continue else diff --git a/code/modules/admin/verbs/diagnostics.dm b/code/modules/admin/verbs/diagnostics.dm index 8b54f797be4..5c44b99fb46 100644 --- a/code/modules/admin/verbs/diagnostics.dm +++ b/code/modules/admin/verbs/diagnostics.dm @@ -48,7 +48,7 @@ var/largest_click_time = 0 var/mob/largest_move_mob = null var/mob/largest_click_mob = null - for(var/mob/M in world) + for(var/mob/M in mob_list) if(!M.client) continue if(M.next_move >= largest_move_time) diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm index 8ee5e269804..99689eb7bcb 100644 --- a/code/modules/admin/verbs/playsound.dm +++ b/code/modules/admin/verbs/playsound.dm @@ -47,52 +47,3 @@ var/list/sounds_cache = list() play_sound(melody) feedback_add_details("admin_verb","PSS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - -/* -/client/proc/cuban_pete() - set category = "Fun" - set name = "Cuban Pete Time" - - message_admins("[key_name_admin(usr)] has declared Cuban Pete Time!", 1) - for(var/mob/M in world) - if(M.client) - if(M.client.midis) - M << 'cubanpetetime.ogg' - - for(var/mob/living/carbon/human/CP in world) - if(CP.real_name=="Cuban Pete" && CP.key!="Rosham") - CP << "Your body can't contain the rhumba beat" - CP.gib() - - -/client/proc/bananaphone() - set category = "Fun" - set name = "Banana Phone" - - message_admins("[key_name_admin(usr)] has activated Banana Phone!", 1) - for(var/mob/M in world) - if(M.client) - if(M.client.midis) - M << 'bananaphone.ogg' - - -client/proc/space_asshole() - set category = "Fun" - set name = "Space Asshole" - - message_admins("[key_name_admin(usr)] has played the Space Asshole Hymn.", 1) - for(var/mob/M in world) - if(M.client) - if(M.client.midis) - M << 'sound/music/space_asshole.ogg' - - -client/proc/honk_theme() - set category = "Fun" - set name = "Honk" - - message_admins("[key_name_admin(usr)] has creeped everyone out with Blackest Honks.", 1) - for(var/mob/M in world) - if(M.client) - if(M.client.midis) - M << 'honk_theme.ogg'*/ diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index d3c9dfce7a6..702c639976b 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -39,6 +39,7 @@ ..() START_PROCESSING(SScalamity, src) + SScalamity.singularities += src for(var/obj/machinery/power/singularity_beacon/singubeacon in SSmachinery.processing_machines) if(singubeacon.active) target = singubeacon @@ -46,6 +47,7 @@ /obj/singularity/Destroy() STOP_PROCESSING(SScalamity, src) + SScalamity.singularities -= src return ..() /obj/singularity/attack_hand(mob/user as mob)