From ef715b78379377c0ccc65eb057f419f827b53a85 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Fri, 4 Aug 2017 10:41:52 -0500 Subject: [PATCH] Removes all checks for subsystem existence (#2252) --- code/controllers/subsystem/garbage.dm | 13 +++--- code/controllers/subsystem/job.dm | 5 +-- code/datums/mind.dm | 5 +-- code/game/gamemodes/blob/overmind.dm | 2 +- code/game/gamemodes/game_mode.dm | 2 +- code/game/gamemodes/meteor/meteors.dm | 3 +- code/game/gamemodes/objective.dm | 21 +++++---- code/game/machinery/airlock_control.dm | 3 +- code/game/machinery/computer/atmos_alert.dm | 3 +- code/game/machinery/computer/atmos_control.dm | 6 +-- code/game/machinery/doors/alarmlock.dm | 3 +- .../embedded_controller_base.dm | 3 +- code/game/machinery/magnet.dm | 12 ++--- code/game/machinery/status_display.dm | 3 +- .../effects/effect_system/effect_system.dm | 6 +-- code/game/objects/items/devices/PDA/radio.dm | 3 +- .../items/devices/radio/electropack.dm | 3 +- code/game/objects/structures.dm | 6 +-- code/game/turfs/turf.dm | 3 +- code/modules/admin/admin.dm | 45 +++++++++---------- code/modules/admin/secrets.dm | 17 ++++--- .../admin/verbs/reestablish_db_connection.dm | 2 +- code/modules/assembly/signaler.dm | 3 +- .../atmospherics/machinery/airalarm.dm | 3 +- .../components/binary_devices/dp_vent_pump.dm | 3 +- .../components/binary_devices/passive_gate.dm | 3 +- .../components/binary_devices/pump.dm | 3 +- .../components/binary_devices/volume_pump.dm | 3 +- .../components/trinary_devices/filter.dm | 3 +- .../unary_devices/outlet_injector.dm | 3 +- .../components/unary_devices/vent_pump.dm | 3 +- .../components/unary_devices/vent_scrubber.dm | 3 +- code/modules/events/immovable_rod.dm | 3 +- code/modules/holiday/holidays.dm | 9 ++-- .../jobs/job_types/civilian_chaplain.dm | 8 ++-- .../modules/mob/dead/new_player/new_player.dm | 25 +++++------ code/modules/mob/dead/observer/observer.dm | 3 +- code/modules/mob/living/carbon/death.dm | 2 +- .../mob/living/simple_animal/slime/death.dm | 2 +- code/modules/power/singularity/emitter.dm | 2 +- code/modules/power/smes.dm | 2 +- code/world.dm | 11 ++--- 42 files changed, 109 insertions(+), 157 deletions(-) diff --git a/code/controllers/subsystem/garbage.dm b/code/controllers/subsystem/garbage.dm index 55132cba28..ebc1ad9474 100644 --- a/code/controllers/subsystem/garbage.dm +++ b/code/controllers/subsystem/garbage.dm @@ -283,13 +283,12 @@ SUBSYSTEM_DEF(garbage) /client/verb/purge_all_destroyed_objects() set category = "Debug" - if(SSgarbage) - while(SSgarbage.queue.len) - var/datum/o = locate(SSgarbage.queue[1]) - if(istype(o) && o.gc_destroyed) - del(o) - SSgarbage.totaldels++ - SSgarbage.queue.Cut(1, 2) + while(SSgarbage.queue.len) + var/datum/o = locate(SSgarbage.queue[1]) + if(istype(o) && o.gc_destroyed) + del(o) + SSgarbage.totaldels++ + SSgarbage.queue.Cut(1, 2) /datum/verb/qdel_then_find_references() set category = "Debug" diff --git a/code/controllers/subsystem/job.dm b/code/controllers/subsystem/job.dm index 731166e0a9..f28373ef22 100644 --- a/code/controllers/subsystem/job.dm +++ b/code/controllers/subsystem/job.dm @@ -217,10 +217,9 @@ SUBSYSTEM_DEF(job) Debug("Running DO") //Holder for Triumvirate is stored in the SSticker, this just processes it - if(SSticker) + if(SSticker.triai) for(var/datum/job/ai/A in occupations) - if(SSticker.triai) - A.spawn_positions = 3 + A.spawn_positions = 3 //Get the players who are ready for(var/mob/dead/new_player/player in GLOB.player_list) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 4ee6725e2f..3515440499 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -1690,10 +1690,7 @@ else mind = new /datum/mind(key) - if(SSticker) - SSticker.minds += mind - else - stack_trace("mind_initialize(): No SSticker ready") + SSticker.minds += mind if(!mind.name) mind.name = real_name mind.current = src diff --git a/code/game/gamemodes/blob/overmind.dm b/code/game/gamemodes/blob/overmind.dm index bf7ae55167..7fa09f3978 100644 --- a/code/game/gamemodes/blob/overmind.dm +++ b/code/game/gamemodes/blob/overmind.dm @@ -151,7 +151,7 @@ if(blob_core) stat(null, "Core Health: [blob_core.obj_integrity]") stat(null, "Power Stored: [blob_points]/[max_blob_points]") - if(SSticker && istype(SSticker.mode, /datum/game_mode/blob)) + if(istype(SSticker.mode, /datum/game_mode/blob)) var/datum/game_mode/blob/B = SSticker.mode stat(null, "Blobs to Win: [GLOB.blobs_legit.len]/[B.blobwincount]") else diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 057f9ee34a..f6fef13305 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -83,7 +83,7 @@ if(SSdbcore.Connect()) var/sql - if(SSticker && SSticker.mode) + if(SSticker.mode) sql += "game_mode = '[SSticker.mode]'" if(GLOB.revdata.originmastercommit) if(sql) diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm index 65ea714761..18daea8b31 100644 --- a/code/game/gamemodes/meteor/meteors.dm +++ b/code/game/gamemodes/meteor/meteors.dm @@ -125,8 +125,7 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event /obj/effect/meteor/New() ..() GLOB.meteor_list += src - if(SSaugury) - SSaugury.register_doom(src, threat) + SSaugury.register_doom(src, threat) SpinAnimation() QDEL_IN(src, lifetime) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 576447c540..c74f67c820 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -623,17 +623,16 @@ GLOBAL_LIST_EMPTY(possible_items_special) /datum/objective/absorb/proc/gen_amount_goal(lowbound = 4, highbound = 6) target_amount = rand (lowbound,highbound) - if (SSticker) - var/n_p = 1 //autowin - if (SSticker.current_state == GAME_STATE_SETTING_UP) - for(var/mob/dead/new_player/P in GLOB.player_list) - if(P.client && P.ready == PLAYER_READY_TO_PLAY && P.mind!=owner) - n_p ++ - else if (SSticker.IsRoundInProgress()) - for(var/mob/living/carbon/human/P in GLOB.player_list) - if(P.client && !(P.mind in SSticker.mode.changelings) && P.mind!=owner) - n_p ++ - target_amount = min(target_amount, n_p) + var/n_p = 1 //autowin + if (SSticker.current_state == GAME_STATE_SETTING_UP) + for(var/mob/dead/new_player/P in GLOB.player_list) + if(P.client && P.ready == PLAYER_READY_TO_PLAY && P.mind!=owner) + n_p ++ + else if (SSticker.IsRoundInProgress()) + for(var/mob/living/carbon/human/P in GLOB.player_list) + if(P.client && !(P.mind in SSticker.mode.changelings) && P.mind!=owner) + n_p ++ + target_amount = min(target_amount, n_p) explanation_text = "Extract [target_amount] compatible genome\s." return target_amount diff --git a/code/game/machinery/airlock_control.dm b/code/game/machinery/airlock_control.dm index a363a7fa51..69ccb4240a 100644 --- a/code/game/machinery/airlock_control.dm +++ b/code/game/machinery/airlock_control.dm @@ -147,6 +147,5 @@ set_frequency(frequency) /obj/machinery/airlock_sensor/Destroy() - if(SSradio) - SSradio.remove_object(src,frequency) + SSradio.remove_object(src,frequency) return ..() \ No newline at end of file diff --git a/code/game/machinery/computer/atmos_alert.dm b/code/game/machinery/computer/atmos_alert.dm index bcabab16f9..1c28251299 100644 --- a/code/game/machinery/computer/atmos_alert.dm +++ b/code/game/machinery/computer/atmos_alert.dm @@ -16,8 +16,7 @@ set_frequency(receive_frequency) /obj/machinery/computer/atmos_alert/Destroy() - if(SSradio) - SSradio.remove_object(src, receive_frequency) + SSradio.remove_object(src, receive_frequency) return ..() /obj/machinery/computer/atmos_alert/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \ diff --git a/code/game/machinery/computer/atmos_control.dm b/code/game/machinery/computer/atmos_control.dm index 2b506d6124..381b4b3e55 100644 --- a/code/game/machinery/computer/atmos_control.dm +++ b/code/game/machinery/computer/atmos_control.dm @@ -52,8 +52,7 @@ /obj/machinery/air_sensor/Destroy() SSair.atmos_machinery -= src - if(SSradio) - SSradio.remove_object(src, frequency) + SSradio.remove_object(src, frequency) return ..() ///////////////////////////////////////////////////////////// @@ -89,8 +88,7 @@ set_frequency(frequency) /obj/machinery/computer/atmos_control/Destroy() - if(SSradio) - SSradio.remove_object(src, frequency) + SSradio.remove_object(src, frequency) return ..() /obj/machinery/computer/atmos_control/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \ diff --git a/code/game/machinery/doors/alarmlock.dm b/code/game/machinery/doors/alarmlock.dm index 3ecd9cbfda..4a92c935b4 100644 --- a/code/game/machinery/doors/alarmlock.dm +++ b/code/game/machinery/doors/alarmlock.dm @@ -16,8 +16,7 @@ air_connection = new /obj/machinery/door/airlock/alarmlock/Destroy() - if(SSradio) - SSradio.remove_object(src,air_frequency) + SSradio.remove_object(src,air_frequency) air_connection = null return ..() diff --git a/code/game/machinery/embedded_controller/embedded_controller_base.dm b/code/game/machinery/embedded_controller/embedded_controller_base.dm index 48ef992615..3c6f0ad13a 100644 --- a/code/game/machinery/embedded_controller/embedded_controller_base.dm +++ b/code/game/machinery/embedded_controller/embedded_controller_base.dm @@ -73,8 +73,7 @@ var/datum/radio_frequency/radio_connection /obj/machinery/embedded_controller/radio/Destroy() - if(SSradio) - SSradio.remove_object(src,frequency) + SSradio.remove_object(src,frequency) return ..() /obj/machinery/embedded_controller/radio/Initialize() diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm index 6f5224ad76..21e0590a4b 100644 --- a/code/game/machinery/magnet.dm +++ b/code/game/machinery/magnet.dm @@ -36,15 +36,13 @@ center = T spawn(10) // must wait for map loading to finish - if(SSradio) - SSradio.add_object(src, freq, GLOB.RADIO_MAGNETS) + SSradio.add_object(src, freq, GLOB.RADIO_MAGNETS) spawn() magnetic_process() /obj/machinery/magnetic_module/Destroy() - if(SSradio) - SSradio.remove_object(src, freq) + SSradio.remove_object(src, freq) . = ..() center = null @@ -228,16 +226,14 @@ spawn(45) // must wait for map loading to finish - if(SSradio) - radio_connection = SSradio.add_object(src, frequency, GLOB.RADIO_MAGNETS) + radio_connection = SSradio.add_object(src, frequency, GLOB.RADIO_MAGNETS) if(path) // check for default path filter_path() // renders rpath /obj/machinery/magnetic_controller/Destroy() - if(SSradio) - SSradio.remove_object(src, frequency) + SSradio.remove_object(src, frequency) magnets = null rpath = null . = ..() diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm index e7613bbe62..4cfc6809cc 100644 --- a/code/game/machinery/status_display.dm +++ b/code/game/machinery/status_display.dm @@ -50,8 +50,7 @@ SSradio.add_object(src, frequency) /obj/machinery/status_display/Destroy() - if(SSradio) - SSradio.remove_object(src,frequency) + SSradio.remove_object(src,frequency) GLOB.ai_status_displays.Remove(src) return ..() diff --git a/code/game/objects/effects/effect_system/effect_system.dm b/code/game/objects/effects/effect_system/effect_system.dm index 630114d41a..6c841080d5 100644 --- a/code/game/objects/effects/effect_system/effect_system.dm +++ b/code/game/objects/effects/effect_system/effect_system.dm @@ -13,12 +13,10 @@ would spawn and follow the beaker, even if it is carried or thrown. /obj/effect/particle_effect/New() ..() - if(SSticker) - GLOB.cameranet.updateVisibility(src) + GLOB.cameranet.updateVisibility(src) /obj/effect/particle_effect/Destroy() - if(SSticker) - GLOB.cameranet.updateVisibility(src) + GLOB.cameranet.updateVisibility(src) . = ..() /datum/effect_system diff --git a/code/game/objects/items/devices/PDA/radio.dm b/code/game/objects/items/devices/PDA/radio.dm index d1f6cff85d..f6bfa50ce4 100644 --- a/code/game/objects/items/devices/PDA/radio.dm +++ b/code/game/objects/items/devices/PDA/radio.dm @@ -25,8 +25,7 @@ var/datum/radio_frequency/radio_connection /obj/item/radio/integrated/signal/Destroy() - if(SSradio) - SSradio.remove_object(src, frequency) + SSradio.remove_object(src, frequency) radio_connection = null return ..() diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm index 891a4027a0..a69c610b2a 100644 --- a/code/game/objects/items/devices/radio/electropack.dm +++ b/code/game/objects/items/devices/radio/electropack.dm @@ -24,8 +24,7 @@ SSradio.add_object(src, frequency, GLOB.RADIO_CHAT) /obj/item/device/electropack/Destroy() - if(SSradio) - SSradio.remove_object(src, frequency) + SSradio.remove_object(src, frequency) return ..() /obj/item/device/electropack/attack_hand(mob/user) diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index facab21cc0..b1103ac1da 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -16,12 +16,10 @@ queue_smooth(src) queue_smooth_neighbors(src) icon_state = "" - if(SSticker) - GLOB.cameranet.updateVisibility(src) + GLOB.cameranet.updateVisibility(src) /obj/structure/Destroy() - if(SSticker) - GLOB.cameranet.updateVisibility(src) + GLOB.cameranet.updateVisibility(src) if(smooth) queue_smooth_neighbors(src) return ..() diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index a63066709a..a75823701a 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -373,8 +373,7 @@ return can_have_cabling() & !intact /turf/proc/visibilityChanged() - if(SSticker) - GLOB.cameranet.updateVisibility(src) + GLOB.cameranet.updateVisibility(src) /turf/proc/burn_tile() diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index b5f2bc750e..7c20421d3c 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -735,34 +735,33 @@ var/dat = "Manage Free Slots" var/count = 0 - if(SSticker && !SSticker.mode) + if(!SSticker.HasRoundStarted()) alert(usr, "You cannot manage jobs before the round starts!") return - if(SSjob) - for(var/datum/job/job in SSjob.occupations) - count++ - var/J_title = html_encode(job.title) - var/J_opPos = html_encode(job.total_positions - (job.total_positions - job.current_positions)) - var/J_totPos = html_encode(job.total_positions) - if(job.total_positions < 0) - dat += "[J_title]: [J_opPos] (unlimited)" - else - dat += "[J_title]: [J_opPos]/[J_totPos]" + for(var/datum/job/job in SSjob.occupations) + count++ + var/J_title = html_encode(job.title) + var/J_opPos = html_encode(job.total_positions - (job.total_positions - job.current_positions)) + var/J_totPos = html_encode(job.total_positions) + if(job.total_positions < 0) + dat += "[J_title]: [J_opPos] (unlimited)" + else + dat += "[J_title]: [J_opPos]/[J_totPos]" - if(job.title == "AI" || job.title == "Cyborg") - dat += " (Cannot Late Join)
" - continue - if(job.total_positions >= 0) - dat += " Add | " - if(job.total_positions > job.current_positions) - dat += "Remove | " - else - dat += "Remove | " - dat += "Unlimit" + if(job.title == "AI" || job.title == "Cyborg") + dat += " (Cannot Late Join)
" + continue + if(job.total_positions >= 0) + dat += " Add | " + if(job.total_positions > job.current_positions) + dat += "Remove | " else - dat += " Limit" - dat += "
" + dat += "Remove | " + dat += "Unlimit" + else + dat += " Limit" + dat += "
" dat += "" var/winheight = 100 + (count * 20) diff --git a/code/modules/admin/secrets.dm b/code/modules/admin/secrets.dm index 95e7c9a904..2b844d40b4 100644 --- a/code/modules/admin/secrets.dm +++ b/code/modules/admin/secrets.dm @@ -105,15 +105,14 @@ if("list_job_debug") var/dat = "Job Debug info.
" - if(SSjob) - for(var/line in SSjob.job_debug) - dat += "[line]
" - dat+= "*******

" - for(var/datum/job/job in SSjob.occupations) - if(!job) - continue - dat += "job: [job.title], current_positions: [job.current_positions], total_positions: [job.total_positions]
" - usr << browse(dat, "window=jobdebug;size=600x500") + for(var/line in SSjob.job_debug) + dat += "[line]
" + dat+= "*******

" + for(var/datum/job/job in SSjob.occupations) + if(!job) + continue + dat += "job: [job.title], current_positions: [job.current_positions], total_positions: [job.total_positions]
" + usr << browse(dat, "window=jobdebug;size=600x500") if("show_admins") var/dat = "Current admins:
" diff --git a/code/modules/admin/verbs/reestablish_db_connection.dm b/code/modules/admin/verbs/reestablish_db_connection.dm index 133a39185e..3578e98b1b 100644 --- a/code/modules/admin/verbs/reestablish_db_connection.dm +++ b/code/modules/admin/verbs/reestablish_db_connection.dm @@ -5,7 +5,7 @@ to_chat(usr, "The Database is not enabled!") return - if (SSdbcore && SSdbcore.IsConnected()) + if (SSdbcore.IsConnected()) if (!check_rights(R_DEBUG,0)) alert("The database is already connected! (Only those with +debug can force a reconnection)", "The database is already connected!") return diff --git a/code/modules/assembly/signaler.dm b/code/modules/assembly/signaler.dm index d827abb5e1..b3f25ac8cf 100644 --- a/code/modules/assembly/signaler.dm +++ b/code/modules/assembly/signaler.dm @@ -22,8 +22,7 @@ /obj/item/device/assembly/signaler/Destroy() - if(SSradio) - SSradio.remove_object(src,frequency) + SSradio.remove_object(src,frequency) return ..() /obj/item/device/assembly/signaler/activate() diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm index e48059a066..4371bd5986 100644 --- a/code/modules/atmospherics/machinery/airalarm.dm +++ b/code/modules/atmospherics/machinery/airalarm.dm @@ -152,8 +152,7 @@ update_icon() /obj/machinery/airalarm/Destroy() - if(SSradio) - SSradio.remove_object(src, frequency) + SSradio.remove_object(src, frequency) qdel(wires) wires = null return ..() diff --git a/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm index aa13433376..1ef52cc787 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm @@ -37,8 +37,7 @@ Acts like a normal vent, but has an input AND output. icon_state = "dpvent_map_on" /obj/machinery/atmospherics/components/binary/dp_vent_pump/Destroy() - if(SSradio) - SSradio.remove_object(src, frequency) + SSradio.remove_object(src, frequency) return ..() /obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume diff --git a/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm b/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm index e52c4bee3d..d2e6a3ae72 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm @@ -22,8 +22,7 @@ Passive gate is similar to the regular pump except: var/datum/radio_frequency/radio_connection /obj/machinery/atmospherics/components/binary/passive_gate/Destroy() - if(SSradio) - SSradio.remove_object(src,frequency) + SSradio.remove_object(src,frequency) return ..() /obj/machinery/atmospherics/components/binary/passive_gate/update_icon_nopipes() diff --git a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm index 77f98ac4df..0ec1b57a2e 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm @@ -30,8 +30,7 @@ Thus, the two variables affect pump operation are set in New(): on = TRUE /obj/machinery/atmospherics/components/binary/pump/Destroy() - if(SSradio) - SSradio.remove_object(src,frequency) + SSradio.remove_object(src,frequency) if(radio_connection) radio_connection = null return ..() diff --git a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm index b9debc4d43..4d3cf733fb 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm @@ -27,8 +27,7 @@ Thus, the two variables affect pump operation are set in New(): var/datum/radio_frequency/radio_connection /obj/machinery/atmospherics/components/binary/volume_pump/Destroy() - if(SSradio) - SSradio.remove_object(src,frequency) + SSradio.remove_object(src,frequency) return ..() /obj/machinery/atmospherics/components/binary/volume_pump/on diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm index 25f80352a4..87edfe8d11 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm @@ -28,8 +28,7 @@ radio_connection = SSradio.add_object(src, frequency, GLOB.RADIO_ATMOSIA) /obj/machinery/atmospherics/components/trinary/filter/Destroy() - if(SSradio) - SSradio.remove_object(src,frequency) + SSradio.remove_object(src,frequency) return ..() /obj/machinery/atmospherics/components/trinary/filter/update_icon() diff --git a/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm b/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm index 763c405429..0bf467f234 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm @@ -19,8 +19,7 @@ layer = GAS_SCRUBBER_LAYER /obj/machinery/atmospherics/components/unary/outlet_injector/Destroy() - if(SSradio) - SSradio.remove_object(src,frequency) + SSradio.remove_object(src,frequency) return ..() /obj/machinery/atmospherics/components/unary/outlet_injector/on diff --git a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm index b19569be26..69560bc18b 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm @@ -56,8 +56,7 @@ A.air_vent_names -= id_tag A.air_vent_info -= id_tag - if(SSradio) - SSradio.remove_object(src,frequency) + SSradio.remove_object(src,frequency) radio_connection = null return ..() diff --git a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm index e76856bb66..113d029c0b 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm @@ -49,8 +49,7 @@ A.air_scrub_names -= id_tag A.air_scrub_info -= id_tag - if(SSradio) - SSradio.remove_object(src,frequency) + SSradio.remove_object(src,frequency) radio_connection = null for(var/I in adjacent_turfs) diff --git a/code/modules/events/immovable_rod.dm b/code/modules/events/immovable_rod.dm index aa1d09b636..f3a21445d3 100644 --- a/code/modules/events/immovable_rod.dm +++ b/code/modules/events/immovable_rod.dm @@ -39,8 +39,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1 /obj/effect/immovablerod/New(atom/start, atom/end) ..() - if(SSaugury) - SSaugury.register_doom(src, 2000) + SSaugury.register_doom(src, 2000) z_original = z destination = end if(notify) diff --git a/code/modules/holiday/holidays.dm b/code/modules/holiday/holidays.dm index 8bd178ead0..546e42d371 100644 --- a/code/modules/holiday/holidays.dm +++ b/code/modules/holiday/holidays.dm @@ -150,11 +150,10 @@ begin_month = APRIL /datum/holiday/april_fools/celebrate() - if(SSticker) - SSticker.login_music = 'sound/ambience/clown.ogg' - for(var/mob/dead/new_player/P in GLOB.mob_list) - if(P.client) - P.client.playtitlemusic() + SSticker.login_music = 'sound/ambience/clown.ogg' + for(var/mob/dead/new_player/P in GLOB.mob_list) + if(P.client) + P.client.playtitlemusic() /datum/holiday/fourtwenty name = "Four-Twenty" diff --git a/code/modules/jobs/job_types/civilian_chaplain.dm b/code/modules/jobs/job_types/civilian_chaplain.dm index eb84051ff9..3a281081ab 100644 --- a/code/modules/jobs/job_types/civilian_chaplain.dm +++ b/code/modules/jobs/job_types/civilian_chaplain.dm @@ -74,11 +74,9 @@ Chaplain else B.name = "The Holy Book of [new_religion]" - - if(SSreligion) - SSreligion.religion = new_religion - SSreligion.bible_name = B.name - SSreligion.deity = B.deity_name + SSreligion.religion = new_religion + SSreligion.bible_name = B.name + SSreligion.deity = B.deity_name H.equip_to_slot_or_del(B, slot_in_backpack) diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index 54eec1dc8a..2cea8e32f2 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -32,7 +32,7 @@ /mob/dead/new_player/proc/new_player_panel() var/output = "

Setup Character

" - if(SSticker && SSticker.current_state <= GAME_STATE_PREGAME) + if(SSticker.current_state <= GAME_STATE_PREGAME) switch(ready) if(PLAYER_NOT_READY) output += "

\[ [LINKIFY_READY("Ready", PLAYER_READY_TO_PLAY)] | Not Ready | [LINKIFY_READY("Observe", PLAYER_READY_TO_OBSERVE)] \]

" @@ -107,18 +107,17 @@ return 1 if(href_list["ready"]) - if(SSticker) - var/tready = text2num(href_list["ready"]) - //Avoid updating ready if we're after PREGAME (they should use latejoin instead) - //This is likely not an actual issue but I don't have time to prove that this - //no longer is required - if(SSticker.current_state <= GAME_STATE_PREGAME) - ready = tready - //if it's post initialisation and they're trying to observe we do the needful - if(!SSticker.current_state < GAME_STATE_PREGAME && tready == PLAYER_READY_TO_OBSERVE) - ready = tready - make_me_an_observer() - return + var/tready = text2num(href_list["ready"]) + //Avoid updating ready if we're after PREGAME (they should use latejoin instead) + //This is likely not an actual issue but I don't have time to prove that this + //no longer is required + if(SSticker.current_state <= GAME_STATE_PREGAME) + ready = tready + //if it's post initialisation and they're trying to observe we do the needful + if(!SSticker.current_state < GAME_STATE_PREGAME && tready == PLAYER_READY_TO_OBSERVE) + ready = tready + make_me_an_observer() + return if(href_list["refresh"]) src << browse(null, "window=playersetup") //closes the player setup window diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index d8bbc559c5..2ede4c360e 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -781,8 +781,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp /mob/dead/observer/proc/register_pai() if(isobserver(src)) - if(SSpai) - SSpai.recruitWindow(src) + SSpai.recruitWindow(src) else to_chat(usr, "Can't become a pAI candidate while not dead!") diff --git a/code/modules/mob/living/carbon/death.dm b/code/modules/mob/living/carbon/death.dm index c6c7196755..1deeaeeb17 100644 --- a/code/modules/mob/living/carbon/death.dm +++ b/code/modules/mob/living/carbon/death.dm @@ -9,7 +9,7 @@ emote("deathgasp") . = ..() - if(SSticker && SSticker.mode) + if(SSticker.mode) SSticker.mode.check_win() //Calls the rounds wincheck, mainly for wizard, malf, and changeling now /mob/living/carbon/gib(no_brain, no_organs, no_bodyparts) diff --git a/code/modules/mob/living/simple_animal/slime/death.dm b/code/modules/mob/living/simple_animal/slime/death.dm index aab8e907c0..75219e4b2a 100644 --- a/code/modules/mob/living/simple_animal/slime/death.dm +++ b/code/modules/mob/living/simple_animal/slime/death.dm @@ -26,7 +26,7 @@ update_canmove() - if(SSticker && SSticker.mode) + if(SSticker.mode) SSticker.mode.check_win() return ..(gibbed) diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index 194c00fc0f..6e4942807f 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -110,7 +110,7 @@ sparks.set_up(5, TRUE, src) /obj/machinery/power/emitter/Destroy() - if(SSticker && SSticker.IsRoundInProgress()) + if(SSticker.IsRoundInProgress()) var/turf/T = get_turf(src) message_admins("Emitter deleted at [ADMIN_COORDJMP(T)]",0,1) log_game("Emitter deleted at [COORD(T)]") diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index 2a8d3f8a60..50f01f4259 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -191,7 +191,7 @@ cell.charge = (charge / capacity) * cell.maxcharge /obj/machinery/power/smes/Destroy() - if(SSticker && SSticker.IsRoundInProgress()) + if(SSticker.IsRoundInProgress()) var/area/A = get_area(src) var/turf/T = get_turf(src) message_admins("SMES deleted at [A][ADMIN_JMP(T)]") diff --git a/code/world.dm b/code/world.dm index b6badeb348..5ef7491f45 100644 --- a/code/world.dm +++ b/code/world.dm @@ -158,9 +158,7 @@ var/list/presentmins = adm["present"] var/list/afkmins = adm["afk"] s["admins"] = presentmins.len + afkmins.len //equivalent to the info gotten from adminwho - s["gamestate"] = 1 - if(SSticker) - s["gamestate"] = SSticker.current_state + s["gamestate"] = SSticker.current_state s["map_name"] = SSmapping.config.map_name @@ -268,11 +266,8 @@ var/list/features = list() - if(SSticker) - if(GLOB.master_mode) - features += GLOB.master_mode - else - features += "STARTING" + if(GLOB.master_mode) + features += GLOB.master_mode if (!GLOB.enter_allowed) features += "closed"