diff --git a/_build_dependencies.sh b/_build_dependencies.sh index 24a33ed3644..b96b83d5fe3 100644 --- a/_build_dependencies.sh +++ b/_build_dependencies.sh @@ -1,6 +1,6 @@ # This file has all the information on what versions of libraries are thrown into the code # For dreamchecker -export SPACEMANDMM_TAG=suite-1.2 +export SPACEMANDMM_TAG=suite-1.4 # For NanoUI export NODE_VERSION=9 # For the scripts in tools diff --git a/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm b/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm index c0ed34ef206..43b3c382c95 100644 --- a/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm @@ -26,7 +26,6 @@ var/frequency = ATMOS_VENTSCRUB var/id_tag = null var/datum/radio_frequency/radio_connection - var/advcontrol = 0//does this device listen to the AAC settagwhitelist = list("id_tag") @@ -75,7 +74,7 @@ /obj/machinery/atmospherics/binary/dp_vent_pump/update_icon(var/safety = 0) ..() - + if(!check_icon_cache()) return @@ -192,7 +191,7 @@ return 1 /obj/machinery/atmospherics/binary/dp_vent_pump/receive_signal(datum/signal/signal) - if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command") || (signal.data["advcontrol"] && !advcontrol)) + if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command")) return 0 if(signal.data["power"] != null) on = text2num(signal.data["power"]) @@ -256,14 +255,5 @@ "} - -/obj/machinery/atmospherics/binary/dp_vent_pump/multitool_topic(var/mob/user, var/list/href_list, var/obj/O) - . = ..() - if(.) - return . - if("toggleadvcontrol" in href_list) - advcontrol = !advcontrol - return TRUE diff --git a/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm b/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm index afdca1d19ce..66ffca0aef5 100644 --- a/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm +++ b/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm @@ -43,7 +43,6 @@ var/frequency = ATMOS_VENTSCRUB var/datum/radio_frequency/radio_connection Mtoollink = 1 - var/advcontrol = 0//does this device listen to the AAC var/radio_filter_out var/radio_filter_in @@ -250,7 +249,7 @@ if(stat & (NOPOWER|BROKEN)) return //log_admin("DEBUG \[[world.timeofday]\]: /obj/machinery/atmospherics/unary/vent_pump/receive_signal([signal.debug_print()])") - if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command") || (signal.data["advcontrol"] && !advcontrol)) + if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command")) return 0 if(signal.data["purge"] != null) @@ -425,15 +424,10 @@ "} /obj/machinery/atmospherics/unary/vent_pump/multitool_topic(var/mob/user, var/list/href_list, var/obj/O) - if("toggleadvcontrol" in href_list) - advcontrol = !advcontrol - return TRUE - if("set_id" in href_list) var/newid = copytext(reject_bad_text(input(usr, "Specify the new ID tag for this machine", src, src.id_tag) as null|text), 1, MAX_MESSAGE_LEN) if(!newid) diff --git a/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm index d9aff36688b..42863e08ea5 100644 --- a/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm +++ b/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm @@ -18,7 +18,6 @@ var/id_tag = null var/frequency = ATMOS_VENTSCRUB var/datum/radio_frequency/radio_connection - var/advcontrol = 0//does this device listen to the AAC? var/list/turf/simulated/adjacent_turfs = list() @@ -286,7 +285,7 @@ /obj/machinery/atmospherics/unary/vent_scrubber/receive_signal(datum/signal/signal) if(stat & (NOPOWER|BROKEN)) return - if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command") || (signal.data["advcontrol"] && !advcontrol)) + if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command")) return 0 if(signal.data["power"] != null) @@ -354,15 +353,10 @@ "} /obj/machinery/atmospherics/unary/vent_scrubber/multitool_topic(var/mob/user, var/list/href_list, var/obj/O) - if("toggleadvcontrol" in href_list) - advcontrol = !advcontrol - return TRUE - if("set_id" in href_list) var/newid = copytext(reject_bad_text(input(usr, "Specify the new ID tag for this machine", src, src:id_tag) as null|text),1,MAX_MESSAGE_LEN) if(!newid) diff --git a/code/__DEFINES/MC.dm b/code/__DEFINES/MC.dm index cbcf2c1dd90..e2068cecb89 100644 --- a/code/__DEFINES/MC.dm +++ b/code/__DEFINES/MC.dm @@ -32,17 +32,16 @@ // (Requires a MC restart to change) #define SS_NO_FIRE 2 -//subsystem only runs on spare cpu (after all non-background subsystems have ran that tick) -// SS_BACKGROUND has its own priority bracket +/** Subsystem only runs on spare cpu (after all non-background subsystems have ran that tick) */ +/// SS_BACKGROUND has its own priority bracket, this overrides SS_TICKER's priority bump #define SS_BACKGROUND 4 //subsystem does not tick check, and should not run unless there is enough time (or its running behind (unless background)) #define SS_NO_TICK_CHECK 8 //Treat wait as a tick count, not DS, run every wait ticks. -// (also forces it to run first in the tick, above even SS_NO_TICK_CHECK subsystems) +/// (also forces it to run first in the tick (unless SS_BACKGROUND)) // (implies all runlevels because of how it works) -// (overrides SS_BACKGROUND) // This is designed for basically anything that works as a mini-mc (like SStimer) #define SS_TICKER 16 diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 366b8b3bcd9..ffb636b42ed 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -183,9 +183,6 @@ /proc/get_mobs_in_radio_ranges(var/list/obj/item/radio/radios) - - set background = 1 - . = list() // Returns a list of mobs who can hear any of the radios given in @radios var/list/speaker_coverage = list() diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 80852f25c3f..0958d758f55 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -25,11 +25,9 @@ if(!( istext(HTMLstring) )) CRASH("Given non-text argument!") - return else if(length(HTMLstring) != 7) CRASH("Given non-HTML argument!") - return var/textr = copytext(HTMLstring, 2, 4) var/textg = copytext(HTMLstring, 4, 6) var/textb = copytext(HTMLstring, 6, 8) @@ -46,7 +44,6 @@ if(length(textb) < 2) textr = text("0[]", textb) return text("#[][][]", textr, textg, textb) - return //Returns the middle-most value /proc/dd_range(var/low, var/high, var/num) diff --git a/code/_compile_options.dm b/code/_compile_options.dm index 536ea01cc96..ffa0c0a542b 100644 --- a/code/_compile_options.dm +++ b/code/_compile_options.dm @@ -11,8 +11,6 @@ #define IS_MODE_COMPILED(MODE) (ispath(text2path("/datum/game_mode/"+(MODE)))) -#define BACKGROUND_ENABLED 0 // The default value for all uses of set background. Set background can cause gradual lag and is recommended you only turn this on if necessary. - //Don't set this very much higher then 1024 unless you like inviting people in to dos your server with message spam #define MAX_MESSAGE_LEN 1024 #define MAX_PAPER_MESSAGE_LEN 3072 diff --git a/code/controllers/globals.dm b/code/controllers/globals.dm index 5a520b547e1..691f19201f6 100644 --- a/code/controllers/globals.dm +++ b/code/controllers/globals.dm @@ -14,7 +14,7 @@ GLOBAL_REAL(GLOB, /datum/controller/global_vars) var/datum/controller/exclude_these = new gvars_datum_in_built_vars = exclude_these.vars + list("gvars_datum_protected_varlist", "gvars_datum_in_built_vars", "gvars_datum_init_order") - qdel(exclude_these) + QDEL_IN(exclude_these, 0) //signal logging isn't ready Initialize() diff --git a/code/controllers/master.dm b/code/controllers/master.dm index fea79c2f7a5..b8c3cdbf1e2 100644 --- a/code/controllers/master.dm +++ b/code/controllers/master.dm @@ -451,14 +451,15 @@ GLOBAL_REAL(Master, /datum/controller/master) = new // in those cases, so we just let them run) if(queue_node_flags & SS_NO_TICK_CHECK) if(queue_node.tick_usage > TICK_LIMIT_RUNNING - TICK_USAGE && ran_non_ticker) - queue_node.queued_priority += queue_priority_count * 0.1 - queue_priority_count -= queue_node_priority - queue_priority_count += queue_node.queued_priority - current_tick_budget -= queue_node_priority - queue_node = queue_node.queue_next + if(!(queue_node_flags & SS_BACKGROUND)) + queue_node.queued_priority += queue_priority_count * 0.1 + queue_priority_count -= queue_node_priority + queue_priority_count += queue_node.queued_priority + current_tick_budget -= queue_node_priority + queue_node = queue_node.queue_next continue - if((queue_node_flags & SS_BACKGROUND) && !bg_calc) + if(!bg_calc && (queue_node_flags & SS_BACKGROUND)) current_tick_budget = queue_priority_count_bg bg_calc = TRUE @@ -511,7 +512,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new queue_node.paused_ticks = 0 queue_node.paused_tick_usage = 0 - if(queue_node_flags & SS_BACKGROUND) //update our running total + if(bg_calc) //update our running total queue_priority_count_bg -= queue_node_priority else queue_priority_count -= queue_node_priority diff --git a/code/controllers/subsystem.dm b/code/controllers/subsystem.dm index 68ee4bfeace..03e54df61c5 100644 --- a/code/controllers/subsystem.dm +++ b/code/controllers/subsystem.dm @@ -89,7 +89,7 @@ queue_node_flags = queue_node.flags if(queue_node_flags & SS_TICKER) - if(!(SS_flags & SS_TICKER)) + if((SS_flags & (SS_TICKER|SS_BACKGROUND)) != SS_TICKER) continue if(queue_node_priority < SS_priority) break diff --git a/code/controllers/subsystem/lighting.dm b/code/controllers/subsystem/lighting.dm index 3fc92a3346a..6761e9647d9 100644 --- a/code/controllers/subsystem/lighting.dm +++ b/code/controllers/subsystem/lighting.dm @@ -1,16 +1,15 @@ -GLOBAL_LIST_EMPTY(lighting_update_lights) // List of lighting sources queued for update. -GLOBAL_LIST_EMPTY(lighting_update_corners) // List of lighting corners queued for update. -GLOBAL_LIST_EMPTY(lighting_update_objects) // List of lighting objects queued for update. - SUBSYSTEM_DEF(lighting) name = "Lighting" wait = 2 init_order = INIT_ORDER_LIGHTING flags = SS_TICKER offline_implications = "Lighting will no longer update. Shuttle call recommended." + var/static/list/sources_queue = list() // List of lighting sources queued for update. + var/static/list/corners_queue = list() // List of lighting corners queued for update. + var/static/list/objects_queue = list() // List of lighting objects queued for update. /datum/controller/subsystem/lighting/stat_entry() - ..("L:[GLOB.lighting_update_lights.len]|C:[GLOB.lighting_update_corners.len]|O:[GLOB.lighting_update_objects.len]") + ..("L:[length(sources_queue)]|C:[length(corners_queue)]|O:[length(objects_queue)]") /datum/controller/subsystem/lighting/Initialize(timeofday) if(!initialized) @@ -31,9 +30,10 @@ SUBSYSTEM_DEF(lighting) MC_SPLIT_TICK_INIT(3) if(!init_tick_checks) MC_SPLIT_TICK + var/list/queue = sources_queue var/i = 0 - for(i in 1 to GLOB.lighting_update_lights.len) - var/datum/light_source/L = GLOB.lighting_update_lights[i] + for(i in 1 to length(queue)) + var/datum/light_source/L = queue[i] L.update_corners() @@ -44,14 +44,15 @@ SUBSYSTEM_DEF(lighting) else if(MC_TICK_CHECK) break if(i) - GLOB.lighting_update_lights.Cut(1, i+1) + queue.Cut(1, i + 1) i = 0 if(!init_tick_checks) MC_SPLIT_TICK - for (i in 1 to GLOB.lighting_update_corners.len) - var/datum/lighting_corner/C = GLOB.lighting_update_corners[i] + queue = corners_queue + for(i in 1 to length(queue)) + var/datum/lighting_corner/C = queue[i] C.update_objects() C.needs_update = FALSE @@ -60,15 +61,16 @@ SUBSYSTEM_DEF(lighting) else if(MC_TICK_CHECK) break if(i) - GLOB.lighting_update_corners.Cut(1, i+1) + queue.Cut(1, i + 1) i = 0 if(!init_tick_checks) MC_SPLIT_TICK - for (i in 1 to GLOB.lighting_update_objects.len) - var/atom/movable/lighting_object/O = GLOB.lighting_update_objects[i] + queue = objects_queue + for(i in 1 to length(queue)) + var/atom/movable/lighting_object/O = queue[i] if(QDELETED(O)) continue @@ -80,7 +82,7 @@ SUBSYSTEM_DEF(lighting) else if(MC_TICK_CHECK) break if(i) - GLOB.lighting_update_objects.Cut(1, i+1) + queue.Cut(1, i + 1) /datum/controller/subsystem/lighting/Recover() diff --git a/code/controllers/subsystem/timer.dm b/code/controllers/subsystem/timer.dm index 7bb6a496274..53d77e8fad6 100644 --- a/code/controllers/subsystem/timer.dm +++ b/code/controllers/subsystem/timer.dm @@ -160,7 +160,7 @@ SUBSYSTEM_DEF(timer) if(timer.timeToRun < head_offset) bucket_resolution = null //force bucket recreation - CRASH("[i] Invalid timer state: Timer in long run queue with a time to run less then head_offset. [get_timer_debug_string(timer)] world.time: [world.time], head_offset: [head_offset], practical_offset: [practical_offset]") + stack_trace("[i] Invalid timer state: Timer in long run queue with a time to run less then head_offset. [get_timer_debug_string(timer)] world.time: [world.time], head_offset: [head_offset], practical_offset: [practical_offset]") if(timer.callBack && !timer.spent) timer.callBack.InvokeAsync() @@ -172,7 +172,7 @@ SUBSYSTEM_DEF(timer) if(timer.timeToRun < head_offset + TICKS2DS(practical_offset-1)) bucket_resolution = null //force bucket recreation - CRASH("[i] Invalid timer state: Timer in long run queue that would require a backtrack to transfer to short run queue. [get_timer_debug_string(timer)] world.time: [world.time], head_offset: [head_offset], practical_offset: [practical_offset]") + stack_trace("[i] Invalid timer state: Timer in long run queue that would require a backtrack to transfer to short run queue. [get_timer_debug_string(timer)] world.time: [world.time], head_offset: [head_offset], practical_offset: [practical_offset]") if(timer.callBack && !timer.spent) timer.callBack.InvokeAsync() spent += timer diff --git a/code/controllers/subsystem/weather.dm b/code/controllers/subsystem/weather.dm index bf405444110..30186f80ad1 100644 --- a/code/controllers/subsystem/weather.dm +++ b/code/controllers/subsystem/weather.dm @@ -57,7 +57,6 @@ SUBSYSTEM_DEF(weather) break if(!ispath(weather_datum_type, /datum/weather)) CRASH("run_weather called with invalid weather_datum_type: [weather_datum_type || "null"]") - return if(isnull(z_levels)) z_levels = levels_by_trait(initial(weather_datum_type.target_trait)) @@ -65,7 +64,6 @@ SUBSYSTEM_DEF(weather) z_levels = list(z_levels) else if(!islist(z_levels)) CRASH("run_weather called with invalid z_levels: [z_levels || "null"]") - return var/datum/weather/W = new weather_datum_type(z_levels) W.telegraph() diff --git a/code/datums/components/slippery.dm b/code/datums/components/slippery.dm index 3e505eb0a8a..88e51209afb 100644 --- a/code/datums/components/slippery.dm +++ b/code/datums/components/slippery.dm @@ -20,12 +20,12 @@ var/slip_tiles /// TRUE If this slip can be avoided by walking. var/walking_is_safe - /// TRUE if having no slip shoes makes you immune to this slip. - var/noslip_is_immune + /// FALSE if you want no slip shoes to make you immune to the slip + var/slip_always /// The verb that players will see when someone slips on the parent. In the form of "You [slip_verb]ped on". var/slip_verb -/datum/component/slippery/Initialize(_description, _stun = 0, _weaken = 0, _slip_chance = 100, _slip_tiles = 0, _walking_is_safe = TRUE, _noslip_is_immune = TRUE, _slip_verb = "slip") +/datum/component/slippery/Initialize(_description, _stun = 0, _weaken = 0, _slip_chance = 100, _slip_tiles = 0, _walking_is_safe = TRUE, _slip_always = FALSE, _slip_verb = "slip") if(!isatom(parent)) return COMPONENT_INCOMPATIBLE @@ -35,7 +35,7 @@ slip_chance = max(0, _slip_chance) slip_tiles = max(0, _slip_tiles) walking_is_safe = _walking_is_safe - noslip_is_immune = _noslip_is_immune + slip_always = _slip_always slip_verb = _slip_verb /datum/component/slippery/RegisterWithParent() @@ -51,6 +51,6 @@ Additionally calls the parent's `after_slip()` proc on the `victim`. */ /datum/component/slippery/proc/Slip(datum/source, mob/living/carbon/human/victim) - if(istype(victim) && prob(slip_chance) && victim.slip(description, stun, weaken, slip_tiles, walking_is_safe, noslip_is_immune, slip_verb)) + if(istype(victim) && prob(slip_chance) && victim.slip(description, stun, weaken, slip_tiles, walking_is_safe, slip_always, slip_verb)) var/atom/movable/owner = parent owner.after_slip(victim) diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm index 9aeade59a1d..cfd276dca48 100644 --- a/code/datums/diseases/advance/advance.dm +++ b/code/datums/diseases/advance/advance.dm @@ -171,7 +171,6 @@ GLOBAL_LIST_INIT(advance_cures, list( if(!symptoms || !symptoms.len) CRASH("We did not have any symptoms before generating properties.") - return var/list/properties = list("resistance" = 1, "stealth" = 0, "stage_rate" = 1, "transmittable" = 1, "severity" = 0) diff --git a/code/datums/wires/wires.dm b/code/datums/wires/wires.dm index 907e6a695e1..09c874ce8a8 100644 --- a/code/datums/wires/wires.dm +++ b/code/datums/wires/wires.dm @@ -31,7 +31,6 @@ GLOBAL_LIST_INIT(wireColours, list("red", "blue", "green", "black", "orange", "b src.holder = holder if(!istype(holder, holder_type)) CRASH("Our holder is null/the wrong type!") - return // Generate new wires if(random) diff --git a/code/game/area/areas/depot-areas.dm b/code/game/area/areas/depot-areas.dm index 7a7c934df35..48760540c78 100644 --- a/code/game/area/areas/depot-areas.dm +++ b/code/game/area/areas/depot-areas.dm @@ -216,7 +216,8 @@ if(!silent) announce_here("Depot Code BLUE", reason) var/list/possible_bot_spawns = list() - for(var/obj/effect/landmark/L in GLOB.landmarks_list) + for(var/thing in GLOB.landmarks_list) + var/obj/effect/landmark/L = thing if(L.name == "syndi_depot_bot") possible_bot_spawns |= L if(possible_bot_spawns.len) @@ -248,7 +249,8 @@ comms_online = TRUE if(comms_online) spawn(0) - for(var/obj/effect/landmark/L in GLOB.landmarks_list) + for(var/thing in GLOB.landmarks_list) + var/obj/effect/landmark/L = thing if(prob(50)) if(L.name == "syndi_depot_backup") var/mob/living/simple_animal/hostile/syndicate/melee/autogib/depot/space/S = new /mob/living/simple_animal/hostile/syndicate/melee/autogib/depot/space(get_turf(L)) @@ -344,7 +346,8 @@ /area/syndicate_depot/core/proc/shields_up() if(shield_list.len) return - for(var/obj/effect/landmark/L in GLOB.landmarks_list) + for(var/thing in GLOB.landmarks_list) + var/obj/effect/landmark/L = thing if(L.name == "syndi_depot_shield") var/obj/machinery/shieldwall/syndicate/S = new /obj/machinery/shieldwall/syndicate(L.loc) shield_list += S.UID() diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 70926d7ba2b..c92dca64b86 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -265,15 +265,8 @@ var/dest_z = (destturf ? destturf.z : null) if(old_z != dest_z) onTransitZ(old_z, dest_z) - if(isturf(destination) && opacity) - var/turf/new_loc = destination - new_loc.reconsider_lights() - if(isturf(old_loc) && opacity) - old_loc.reconsider_lights() - - for(var/datum/light_source/L in light_sources) - L.source_atom.update_light() + Moved(old_loc, NONE) return 1 diff --git a/code/game/data_huds.dm b/code/game/data_huds.dm index 08a7b77daff..6bd00d286fe 100644 --- a/code/game/data_huds.dm +++ b/code/game/data_huds.dm @@ -135,8 +135,6 @@ return "health-90" else return "health-100" //past this point, you're just in trouble - return "0" - ///HOOKS @@ -270,7 +268,6 @@ return "crit" else return "dead" - return "dead" //Sillycone hooks /mob/living/silicon/proc/diag_hud_set_health() @@ -400,7 +397,6 @@ return "max" else return "zero" - return "zero" /obj/machinery/hydroponics/proc/plant_hud_set_nutrient() var/image/holder = hud_list[PLANT_NUTRIENT_HUD] diff --git a/code/game/gamemodes/blob/blob_report.dm b/code/game/gamemodes/blob/blob_report.dm index 6128c22f66d..9c7fb99fe81 100644 --- a/code/game/gamemodes/blob/blob_report.dm +++ b/code/game/gamemodes/blob/blob_report.dm @@ -19,7 +19,7 @@ intercepttext += "Message ends." if(2) var/nukecode = rand(10000, 99999) - for(var/obj/machinery/nuclearbomb/bomb in world) + for(var/obj/machinery/nuclearbomb/bomb in GLOB.machines) if(bomb && bomb.r_code) if(is_station_level(bomb.z)) bomb.r_code = nukecode diff --git a/code/game/gamemodes/blob/theblob.dm b/code/game/gamemodes/blob/theblob.dm index 886975a2c92..c5b4f079b1d 100644 --- a/code/game/gamemodes/blob/theblob.dm +++ b/code/game/gamemodes/blob/theblob.dm @@ -74,9 +74,6 @@ /obj/structure/blob/proc/Pulse(var/pulse = 0, var/origin_dir = 0, var/a_color)//Todo: Fix spaceblob expand - - set background = BACKGROUND_ENABLED - RegenHealth() if(run_action())//If we can do something here then we dont need to pulse more diff --git a/code/game/gamemodes/changeling/powers/augmented_eyesight.dm b/code/game/gamemodes/changeling/powers/augmented_eyesight.dm index 34a2d67b58b..d6062a02c5d 100644 --- a/code/game/gamemodes/changeling/powers/augmented_eyesight.dm +++ b/code/game/gamemodes/changeling/powers/augmented_eyesight.dm @@ -76,11 +76,11 @@ var/mob/living/carbon/human/H = owner H.weakeyes = 1 if(!H.vision_type) - H.vision_type = new /datum/vision_override/nightvision + H.set_sight(/datum/vision_override/nightvision) /obj/item/organ/internal/cyberimp/eyes/thermals/ling/remove(mob/living/carbon/M, special = 0) if(ishuman(owner)) var/mob/living/carbon/human/H = owner H.weakeyes = 0 - H.vision_type = null + H.set_sight(null) ..() diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 2b604839c62..2d71df8c979 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -415,7 +415,7 @@ proc/display_roundstart_logout_report() /proc/get_nuke_code() var/nukecode = "ERROR" - for(var/obj/machinery/nuclearbomb/bomb in world) + for(var/obj/machinery/nuclearbomb/bomb in GLOB.machines) if(bomb && bomb.r_code && is_station_level(bomb.z)) nukecode = bomb.r_code return nukecode diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm index c1a907f9191..a4b8c594b89 100644 --- a/code/game/gamemodes/malfunction/Malf_Modules.dm +++ b/code/game/gamemodes/malfunction/Malf_Modules.dm @@ -652,7 +652,8 @@ button.desc = desc /datum/action/innate/ai/blackout/Activate() - for(var/obj/machinery/power/apc/apc in GLOB.apcs) + for(var/thing in GLOB.apcs) + var/obj/machinery/power/apc/apc if(prob(30 * apc.overload)) apc.overload_lighting() else diff --git a/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm b/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm index 6e1b4a39d3a..d7354b87c5c 100644 --- a/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm +++ b/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm @@ -166,7 +166,6 @@ eject_abductee() SendBack(H) return "Specimen braindead - disposed." - return "ERROR" /obj/machinery/abductor/experiment/proc/SendBack(mob/living/carbon/human/H) diff --git a/code/game/gamemodes/miniantags/borer/borer_event.dm b/code/game/gamemodes/miniantags/borer/borer_event.dm index 245b8fa7b41..f5a3b7aa4af 100644 --- a/code/game/gamemodes/miniantags/borer/borer_event.dm +++ b/code/game/gamemodes/miniantags/borer/borer_event.dm @@ -16,7 +16,7 @@ /datum/event/borer_infestation/start() var/list/vents = list() - for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world) + for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in SSair.atmos_machinery) if(is_station_level(temp_vent.loc.z) && !temp_vent.welded) //Stops cortical borers getting stuck in small networks. See: Security, Virology if(temp_vent.parent.other_atmosmch.len > 50) diff --git a/code/game/gamemodes/miniantags/revenant/revenant_spawn_event.dm b/code/game/gamemodes/miniantags/revenant/revenant_spawn_event.dm index 1f902a51806..5e5f0f87a79 100644 --- a/code/game/gamemodes/miniantags/revenant/revenant_spawn_event.dm +++ b/code/game/gamemodes/miniantags/revenant/revenant_spawn_event.dm @@ -26,13 +26,15 @@ var/datum/mind/player_mind = new /datum/mind(key_of_revenant) player_mind.active = 1 var/list/spawn_locs = list() - for(var/obj/effect/landmark/L in GLOB.landmarks_list) + for(var/thing in GLOB.landmarks_list) + var/obj/effect/landmark/L = thing if(isturf(L.loc)) switch(L.name) if("revenantspawn") spawn_locs += L.loc if(!spawn_locs) //If we can't find any revenant spawns, try the carp spawns - for(var/obj/effect/landmark/L in GLOB.landmarks_list) + for(var/thing in GLOB.landmarks_list) + var/obj/effect/landmark/L = thing if(isturf(L.loc)) switch(L.name) if("carpspawn") diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index ad1146c0bc8..0ff5508f2ac 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -95,7 +95,8 @@ proc/issyndicate(mob/living/M as mob) var/list/turf/synd_spawn = list() - for(var/obj/effect/landmark/A in GLOB.landmarks_list) + for(var/thing in GLOB.landmarks_list) + var/obj/effect/landmark/A = thing if(A.name == "Syndicate-Spawn") synd_spawn += get_turf(A) qdel(A) @@ -450,7 +451,7 @@ proc/issyndicate(mob/living/M as mob) if(foecount == GLOB.score_arrested) GLOB.score_allarrested = 1 - for(var/obj/machinery/nuclearbomb/nuke in world) + for(var/obj/machinery/nuclearbomb/nuke in GLOB.machines) if(nuke.r_code == "Nope") continue var/turf/T = get_turf(nuke) var/area/A = T.loc @@ -491,13 +492,16 @@ proc/issyndicate(mob/living/M as mob) for(var/datum/mind/M in SSticker.mode.syndicates) foecount++ - for(var/mob/living/C in world) + for(var/mob in GLOB.mob_living_list) + var/mob/living/C = mob if(ishuman(C) || isAI(C) || isrobot(C)) - if(C.stat == 2) continue - if(!C.client) continue + if(C.stat == DEAD) + continue + if(!C.client) + continue crewcount++ - var/obj/item/disk/nuclear/N = locate() in world + var/obj/item/disk/nuclear/N = locate() in GLOB.poi_list if(istype(N)) var/atom/disk_loc = N.loc while(!isturf(disk_loc)) diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index a38982905bc..b09bb7a851f 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -385,7 +385,7 @@ if(foecount == GLOB.score_arrested) GLOB.score_allarrested = 1 - for(var/mob/living/carbon/human/player in world) + for(var/mob/living/carbon/human/player in GLOB.mob_living_list) if(player.mind) var/role = player.mind.assigned_role if(role in list("Captain", "Head of Security", "Head of Personnel", "Chief Engineer", "Research Director")) @@ -415,7 +415,7 @@ for(var/datum/mind/M in SSticker.mode:revolutionaries) if(M.current && M.current.stat != DEAD) revcount++ - for(var/mob/living/carbon/human/player in world) + for(var/mob/living/carbon/human/player in GLOB.mob_living_list) if(player.mind) var/role = player.mind.assigned_role if(role in list("Captain", "Head of Security", "Head of Personnel", "Chief Engineer", "Research Director")) @@ -425,7 +425,8 @@ if(player.mind in SSticker.mode.revolutionaries) continue loycount++ - for(var/mob/living/silicon/X in world) + for(var/beepboop in GLOB.silicon_mob_list) + var/mob/living/silicon/X = beepboop if(X.stat != DEAD) loycount++ diff --git a/code/game/gamemodes/scoreboard.dm b/code/game/gamemodes/scoreboard.dm index 069b0915c00..182bcc78bd2 100644 --- a/code/game/gamemodes/scoreboard.dm +++ b/code/game/gamemodes/scoreboard.dm @@ -71,7 +71,8 @@ // Check station's power levels - for(var/obj/machinery/power/apc/A in GLOB.apcs) + for(var/thing in GLOB.apcs) + var/obj/machinery/power/apc/A = thing if(!is_station_level(A.z)) continue for(var/obj/item/stock_parts/cell/C in A.contents) if(C.charge < 2300) diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm index 2cafb1bc219..27267d2ec02 100644 --- a/code/game/gamemodes/shadowling/shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm @@ -175,7 +175,6 @@ range = -1 include_user = 1 clothes_req = 0 - var/datum/vision_override/vision_path = /datum/vision_override/nightvision action_icon_state = "darksight" /obj/effect/proc_holder/spell/targeted/shadow_vision/cast(list/targets, mob/user = usr) @@ -185,10 +184,10 @@ var/mob/living/carbon/human/H = target if(!H.vision_type) to_chat(H, "You shift the nerves in your eyes, allowing you to see in the dark.") - H.vision_type = new vision_path + H.set_sight(/datum/vision_override/nightvision) else to_chat(H, "You return your vision to normal.") - H.vision_type = null + H.set_sight(null) /obj/effect/proc_holder/spell/targeted/shadow_vision/thrall desc = "Thrall Darksight" diff --git a/code/game/gamemodes/shadowling/special_shadowling_abilities.dm b/code/game/gamemodes/shadowling/special_shadowling_abilities.dm index 7896a4aab61..5fc5e1e78cc 100644 --- a/code/game/gamemodes/shadowling/special_shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/special_shadowling_abilities.dm @@ -161,7 +161,8 @@ GLOBAL_LIST_INIT(possibleShadowlingNames, list("U'ruan", "Y`shej", "Nex", "Hel-u for(var/mob/living/M in orange(7, H)) M.Weaken(10) to_chat(M, "An immense pressure slams you onto the ground!") - for(var/obj/machinery/power/apc/A in GLOB.apcs) + for(var/thing in GLOB.apcs) + var/obj/machinery/power/apc/A = thing A.overload_lighting() var/mob/living/simple_animal/ascendant_shadowling/A = new /mob/living/simple_animal/ascendant_shadowling(H.loc) A.announce("VYSHA NERADA YEKHEZET U'RUU!!", 5, 'sound/hallucinations/veryfar_noise.ogg') diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm index 7f93fd9fef6..d5a59a36872 100644 --- a/code/game/jobs/access.dm +++ b/code/game/jobs/access.dm @@ -20,8 +20,6 @@ else return check_access_list(acc) - return 0 - /obj/item/proc/GetAccess() return list() diff --git a/code/game/machinery/atmoalter/area_atmos_computer.dm b/code/game/machinery/atmoalter/area_atmos_computer.dm index 3d53e130628..d7650d1cb68 100644 --- a/code/game/machinery/atmoalter/area_atmos_computer.dm +++ b/code/game/machinery/atmoalter/area_atmos_computer.dm @@ -164,7 +164,7 @@ var/turf/T = get_turf(src) if(!T.loc) return var/area/A = get_area(T) - for(var/obj/machinery/portable_atmospherics/scrubber/huge/scrubber in world ) + for(var/obj/machinery/portable_atmospherics/scrubber/huge/scrubber in SSair.atmos_machinery) var/turf/T2 = get_turf(scrubber) if(T2 && T2.loc) var/area/A2 = T2.loc diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm index 796d5c552dd..5ec4206734c 100644 --- a/code/game/machinery/buttons.dm +++ b/code/game/machinery/buttons.dm @@ -189,12 +189,12 @@ active = 1 icon_state = "launcheract" - for(var/obj/machinery/sparker/M in world) + for(var/obj/machinery/sparker/M in GLOB.machines) if(M.id == id) spawn( 0 ) M.spark() - for(var/obj/machinery/igniter/M in world) + for(var/obj/machinery/igniter/M in GLOB.machines) if(M.id == id) use_power(50) M.on = !( M.on ) diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 24ffb494422..b66cad8d328 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -360,15 +360,12 @@ for(var/obj/machinery/camera/C in oview(4, M)) if(C.can_use()) // check if camera disabled return C - break return null /proc/near_range_camera(mob/M) for(var/obj/machinery/camera/C in range(4, M)) if(C.can_use()) // check if camera disabled return C - break - return null /obj/machinery/camera/proc/Togglelight(on = FALSE) diff --git a/code/game/machinery/camera/presets.dm b/code/game/machinery/camera/presets.dm index c0949fb3c9d..b7ae75cd13f 100644 --- a/code/game/machinery/camera/presets.dm +++ b/code/game/machinery/camera/presets.dm @@ -41,7 +41,7 @@ number = 1 var/area/A = get_area(src) if(A) - for(var/obj/machinery/camera/autoname/C in world) + for(var/obj/machinery/camera/autoname/C in GLOB.machines) if(C == src) continue var/area/CA = get_area(C) if(CA.type == A.type) diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index 993a1c5cbaa..b502d6e5441 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -350,9 +350,6 @@ build_path = /obj/machinery/computer/telescience origin_tech = "programming=3;bluespace=3;plasmatech=4" -/obj/item/circuitboard/atmos_automation - name = "Circuit board (Atmospherics Automation)" - build_path = /obj/machinery/computer/general_air_control/atmos_automation /obj/item/circuitboard/large_tank_control name = "Circuit board (Atmospheric Tank Control)" build_path = /obj/machinery/computer/general_air_control/large_tank_control diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index 9464c43b107..3674358f07f 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -121,7 +121,7 @@ data["virus"] += list(list("name" = DS.name, "D" = D)) if(MED_DATA_MEDBOT) data["medbots"] = list() - for(var/mob/living/simple_animal/bot/medbot/M in world) + for(var/mob/living/simple_animal/bot/medbot/M in GLOB.bots_list) if(M.z != z) continue var/turf/T = get_turf(M) diff --git a/code/game/machinery/computer/pod.dm b/code/game/machinery/computer/pod.dm index 6ea095028a2..bafcd2d8ca2 100644 --- a/code/game/machinery/computer/pod.dm +++ b/code/game/machinery/computer/pod.dm @@ -23,7 +23,7 @@ timings = list() times = list() synced = list() - for(var/obj/machinery/mass_driver/M in world) + for(var/obj/machinery/mass_driver/M in GLOB.machines) if(M.z != src.z) continue for(var/ident_tag in id_tags) if((M.id_tag == ident_tag) && !(ident_tag in synced)) @@ -49,7 +49,7 @@ return /obj/machinery/computer/pod/proc/solo_sync(var/ident_tag) - for(var/obj/machinery/mass_driver/M in world) + for(var/obj/machinery/mass_driver/M in GLOB.machines) if(M.z != src.z) continue if((M.id_tag == ident_tag) && !(ident_tag in synced)) synced += ident_tag @@ -78,7 +78,7 @@ if(stat & (NOPOWER|BROKEN)) return var/anydriver = 0 - for(var/obj/machinery/mass_driver/M in world) + for(var/obj/machinery/mass_driver/M in GLOB.machines) if(M.z != src.z) continue if(M.id_tag == ident_tag) anydriver = 1 @@ -94,7 +94,7 @@ sleep(20) - for(var/obj/machinery/mass_driver/M in world) + for(var/obj/machinery/mass_driver/M in GLOB.machines) if(M.z != src.z) continue if(M.id_tag == ident_tag) M.drive() @@ -219,7 +219,7 @@ var/ident_tag = href_list["driver"] var/t = text2num(href_list["power"]) t = min(max(0.25, t), 16) - for(var/obj/machinery/mass_driver/M in world) + for(var/obj/machinery/mass_driver/M in GLOB.machines) if(M.id_tag == ident_tag) M.power = t powers[ident_tag] = t @@ -294,7 +294,7 @@ if(stat & (NOPOWER|BROKEN)) return var/anydriver = 0 - for(var/obj/machinery/mass_driver/M in world) + for(var/obj/machinery/mass_driver/M in GLOB.machines) if(M.z != src.z) continue if(M.id_tag == ident_tag) anydriver = 1 @@ -303,10 +303,12 @@ return var/spawn_marauder[] = new() - for(var/obj/effect/landmark/L in world) + for(var/thing in GLOB.landmarks_list) + var/obj/effect/landmark/L = thing if(L.name == "Marauder Entry") spawn_marauder.Add(L) - for(var/obj/effect/landmark/L in world) + for(var/thing in GLOB.landmarks_list) + var/obj/effect/landmark/L = thing if(L.name == "Marauder Exit") var/obj/effect/portal/P = new(L.loc, pick(spawn_marauder)) P.invisibility = 101//So it is not seen by anyone. @@ -320,7 +322,7 @@ M.open() sleep(20) - for(var/obj/machinery/mass_driver/M in world) + for(var/obj/machinery/mass_driver/M in GLOB.machines) if(M.z != src.z) continue if(M.id_tag == ident_tag) M.drive() diff --git a/code/game/machinery/computer/specops_shuttle.dm b/code/game/machinery/computer/specops_shuttle.dm index f509ee42d34..2ba3b25b6f6 100644 --- a/code/game/machinery/computer/specops_shuttle.dm +++ b/code/game/machinery/computer/specops_shuttle.dm @@ -93,7 +93,7 @@ GLOBAL_VAR_INIT(specops_shuttle_timeleft, 0) GLOB.specops_shuttle_at_station = 0 - for(var/obj/machinery/computer/specops_shuttle/S in world) + for(var/obj/machinery/computer/specops_shuttle/S in GLOB.machines) S.specops_shuttle_timereset = world.time + SPECOPS_RETURN_DELAY qdel(announcer) @@ -160,10 +160,12 @@ GLOBAL_VAR_INIT(specops_shuttle_timeleft, 0) sleep(10) var/spawn_marauder[] = new() - for(var/obj/effect/landmark/L in world) + for(var/thing in GLOB.landmarks_list) + var/obj/effect/landmark/L = thing if(L.name == "Marauder Entry") spawn_marauder.Add(L.loc) - for(var/obj/effect/landmark/L in world) + for(var/thing in GLOB.landmarks_list) + var/obj/effect/landmark/L = thing if(L.name == "Marauder Exit") var/obj/effect/portal/P = new(L.loc, pick(spawn_marauder)) //P.invisibility = 101//So it is not seen by anyone. @@ -233,7 +235,7 @@ GLOBAL_VAR_INIT(specops_shuttle_timeleft, 0) var/mob/M = locate(/mob) in T to_chat(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 GLOB.machines) S.specops_shuttle_timereset = world.time + SPECOPS_RETURN_DELAY qdel(announcer) @@ -241,7 +243,7 @@ GLOBAL_VAR_INIT(specops_shuttle_timeleft, 0) /proc/specops_can_move() if(GLOB.specops_shuttle_moving_to_station || GLOB.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 GLOB.machines) if(world.timeofday <= S.specops_shuttle_timereset) return 0 return 1 diff --git a/code/game/machinery/computer/syndicate_specops_shuttle.dm b/code/game/machinery/computer/syndicate_specops_shuttle.dm index 0a65b6be408..7ec7bd7a026 100644 --- a/code/game/machinery/computer/syndicate_specops_shuttle.dm +++ b/code/game/machinery/computer/syndicate_specops_shuttle.dm @@ -23,7 +23,7 @@ GLOBAL_VAR_INIT(syndicate_elite_shuttle_timeleft, 0) /proc/syndicate_elite_process() var/area/syndicate_mothership/control/syndicate_ship = locate()//To find announcer. This area should exist for this proc to work. - var/area/syndicate_mothership/elite_squad/elite_squad = locate()//Where is the specops area located? + //var/area/syndicate_mothership/elite_squad/elite_squad = locate()//Where is the specops area located? var/mob/living/silicon/decoy/announcer = locate() in syndicate_ship//We need a fake AI to announce some stuff below. Otherwise it will be wonky. var/message_tracker[] = list(0,1,2,3,5,10,30,45)//Create a a list with potential time values. @@ -63,7 +63,6 @@ GLOBAL_VAR_INIT(syndicate_elite_shuttle_timeleft, 0) to_chat(usr, "The Syndicate Elite shuttle is unable to leave.") return - sleep(600) /* //Begin Marauder launchpad. spawn(0)//So it parallel processes it. @@ -129,11 +128,12 @@ GLOBAL_VAR_INIT(syndicate_elite_shuttle_timeleft, 0) if("ASSAULT3") spawn(0) M.close() - */ elite_squad.readyreset()//Reset firealarm after the team launched. + */ //End Marauder launchpad. - for(var/obj/effect/landmark/L in GLOB.landmarks_list) + for(var/thing in GLOB.landmarks_list) + var/obj/effect/landmark/L = thing if(L.name == "Syndicate Breach Area") explosion(L.loc,4,6,8,10,0) diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index 96863c3e54d..ee29504fe99 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -936,49 +936,3 @@ to destroy them and players will be able to make replacements. /obj/item/stock_parts/micro_laser = 1, /obj/item/stack/cable_coil = 3, /obj/item/stack/sheet/glass = 1) - -//Selectable mode board, like vending machine boards -/obj/item/circuitboard/logic_gate - name = "circuit board (Logic Connector)" - build_path = /obj/machinery/logic_gate - board_type = "machine" - origin_tech = "programming=1" //This stuff is pretty much the absolute basis of programming, so it's mostly useless for research - req_components = list(/obj/item/stack/cable_coil = 1) - var/list/names_paths = list( - "NOT Gate" = /obj/machinery/logic_gate/not, - "OR Gate" = /obj/machinery/logic_gate/or, - "AND Gate" = /obj/machinery/logic_gate/and, - "NAND Gate" = /obj/machinery/logic_gate/nand, - "NOR Gate" = /obj/machinery/logic_gate/nor, - "XOR Gate" = /obj/machinery/logic_gate/xor, - "XNOR Gate" = /obj/machinery/logic_gate/xnor, - "STATUS Gate" = /obj/machinery/logic_gate/status, - "CONVERT Gate" = /obj/machinery/logic_gate/convert - ) - -/obj/item/circuitboard/logic_gate/New() - ..() - if(build_path == /obj/machinery/logic_gate) //If we spawn the base type board (determined by the base type machine as the build path), become a random gate board - var/new_path = names_paths[pick(names_paths)] - set_type(new_path) - -/obj/item/circuitboard/logic_gate/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/screwdriver)) - set_type(null, user) - return - return ..() - -/obj/item/circuitboard/logic_gate/proc/set_type(typepath, mob/user) - var/new_name = "Logic Base" - if(!typepath) - new_name = input("Circuit Setting", "What would you change the board setting to?") in names_paths - typepath = names_paths[new_name] - else - for(var/name in names_paths) - if(names_paths[name] == typepath) - new_name = name - break - build_path = typepath - name = "circuit board ([new_name])" - if(user) - to_chat(user, "You set the board to [new_name].") diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 73d0e9281e1..5aa86873902 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -876,6 +876,8 @@ About the new airlock wires panel: if(!user.unEquip(C)) to_chat(user, "For some reason, you can't attach [C]!") return + C.add_fingerprint(user) + user.create_log(MISC_LOG, "put [C] on", src) C.forceMove(src) user.visible_message("[user] pins [C] to [src].", "You pin [C] to [src].") note = C @@ -1347,10 +1349,13 @@ About the new airlock wires panel: if (ishuman(user) && user.a_intent == INTENT_GRAB)//grab that note user.visible_message("[user] removes [note] from [src].", "You remove [note] from [src].") playsound(src, 'sound/items/poster_ripped.ogg', 50, 1) - else return FALSE + else + return FALSE else user.visible_message("[user] cuts down [note] from [src].", "You remove [note] from [src].") playsound(src, 'sound/items/wirecutter.ogg', 50, 1) + note.add_fingerprint(user) + user.create_log(MISC_LOG, "removed [note] from", src) user.put_in_hands(note) note = null update_icon() diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm index 57057ad510a..37766db58fb 100644 --- a/code/game/machinery/flasher.dm +++ b/code/game/machinery/flasher.dm @@ -144,7 +144,7 @@ active = 1 icon_state = "launcheract" - for(var/obj/machinery/flasher/M in world) + for(var/obj/machinery/flasher/M in GLOB.machines) if(M.id == id) spawn() M.flash() diff --git a/code/game/machinery/holosign.dm b/code/game/machinery/holosign.dm index aca4254b517..aa541ec8619 100644 --- a/code/game/machinery/holosign.dm +++ b/code/game/machinery/holosign.dm @@ -67,7 +67,7 @@ else icon_state = "light0" - for(var/obj/machinery/holosign/M in world) + for(var/obj/machinery/holosign/M in GLOB.machines) if(M.id == src.id) spawn( 0 ) M.toggle() diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 19dc80f9a40..d318302500f 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -369,7 +369,6 @@ Class Procs: /obj/machinery/proc/RefreshParts() //Placeholder proc for machines that are built using frames. return - return 0 /obj/machinery/proc/assign_uid() uid = gl_uid diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm index b73fa94259f..d713817ca06 100644 --- a/code/game/machinery/magnet.dm +++ b/code/game/machinery/magnet.dm @@ -202,7 +202,7 @@ ..() if(autolink) - for(var/obj/machinery/magnetic_module/M in world) + for(var/obj/machinery/magnetic_module/M in GLOB.machines) if(M.freq == frequency && M.code == code) magnets.Add(M) @@ -224,7 +224,7 @@ /obj/machinery/magnetic_controller/process() if(magnets.len == 0 && autolink) - for(var/obj/machinery/magnetic_module/M in world) + for(var/obj/machinery/magnetic_module/M in GLOB.machines) if(M.freq == frequency && M.code == code) magnets.Add(M) diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index b63f4ab7f8b..79f1eb83e23 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -520,8 +520,6 @@ GLOBAL_LIST_EMPTY(turret_icons) /obj/machinery/porta_turret/process() //the main machinery process - set background = BACKGROUND_ENABLED - if(stat & (NOPOWER|BROKEN)) if(!always_up) //if the turret has no power or is broken, make the turret pop down if it hasn't already diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index 095b2e7d56e..6529dd4b73d 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -200,7 +200,7 @@ GLOBAL_LIST_EMPTY(allRequestConsoles) var/log_msg = message var/pass = 0 screen = RCS_SENTFAIL - for(var/obj/machinery/message_server/MS in world) + for(var/obj/machinery/message_server/MS in GLOB.machines) if(!MS.active) continue MS.send_rc_message(ckey(href_list["department"]),department,log_msg,msgStamped,msgVerified,priority) pass = 1 diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm index 6299be7be3d..a5cff57ad52 100644 --- a/code/game/machinery/syndicatebeacon.dm +++ b/code/game/machinery/syndicatebeacon.dm @@ -121,7 +121,8 @@ if(user) to_chat(user, "The connected wire doesn't have enough current.") return - for(var/obj/singularity/singulo in GLOB.singularities) + for(var/thing in GLOB.singularities) + var/obj/singularity/singulo = thing if(singulo.z == z) singulo.target = src icon_state = "[icontype]1" @@ -132,7 +133,8 @@ /obj/machinery/power/singularity_beacon/proc/Deactivate(mob/user = null) - for(var/obj/singularity/singulo in world) + for(var/thing in GLOB.singularities) + var/obj/singularity/singulo = thing if(singulo.target == src) singulo.target = null icon_state = "[icontype]0" diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index 1487256c712..7aa5661febe 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -190,7 +190,6 @@ var/obj/item/vending_refill/R = locate() in component_parts if(!R) CRASH("Constructible vending machine did not have a refill canister") - return R.products = unbuild_inventory(product_records) R.contraband = unbuild_inventory(hidden_records) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 610436406d8..8c6c1fff866 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -609,6 +609,8 @@ occupant = null icon_state = initial(icon_state)+"-open" setDir(dir_in) + if(A in trackers) + trackers -= A /obj/mecha/Destroy() if(occupant) @@ -639,7 +641,7 @@ cabin_air = null QDEL_NULL(spark_system) QDEL_NULL(smoke_system) - + QDEL_LIST(trackers) GLOB.mechas_list -= src //global mech list return ..() diff --git a/code/game/mecha/mecha_control_console.dm b/code/game/mecha/mecha_control_console.dm index 9a3dffb0c3b..f72770a8ea3 100644 --- a/code/game/mecha/mecha_control_console.dm +++ b/code/game/mecha/mecha_control_console.dm @@ -28,7 +28,12 @@ data["screen"] = screen if(screen == 0) var/list/mechas[0] - for(var/obj/item/mecha_parts/mecha_tracking/TR in world) + var/list/trackerlist = list() + for(var/stompy in GLOB.mechas_list) + var/obj/mecha/MC = stompy + trackerlist += MC.trackers + for(var/thing in trackerlist) + var/obj/item/mecha_parts/mecha_tracking/TR = thing var/answer = TR.get_mecha_info() if(answer) mechas[++mechas.len] = answer diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm index 494fc70d36b..7569d8b5263 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -124,8 +124,7 @@ //Attach hydraulic clamp var/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/HC = new HC.attach(src) - for(var/obj/item/mecha_parts/mecha_tracking/B in trackers)//Deletes the beacon so it can't be found easily - qdel(B) + QDEL_LIST(trackers) //Deletes the beacon so it can't be found easily var/obj/item/mecha_parts/mecha_equipment/mining_scanner/scanner = new scanner.attach(src) diff --git a/code/game/objects/items/devices/uplinks.dm b/code/game/objects/items/devices/uplinks.dm index c5c8f67e34d..77e9eacc6a1 100644 --- a/code/game/objects/items/devices/uplinks.dm +++ b/code/game/objects/items/devices/uplinks.dm @@ -131,7 +131,6 @@ GLOBAL_LIST_EMPTY(world_uplinks) else var/datum/uplink_item/UI = ItemsReference[href_list["buy_item"]] return buy(UI, UI ? UI.reference : "") - return 0 /obj/item/uplink/proc/buy(var/datum/uplink_item/UI, var/reference) if(!UI) diff --git a/code/game/objects/items/mixing_bowl.dm b/code/game/objects/items/mixing_bowl.dm index da851437fd5..1e1a39d49d0 100644 --- a/code/game/objects/items/mixing_bowl.dm +++ b/code/game/objects/items/mixing_bowl.dm @@ -118,7 +118,7 @@ /obj/item/mixing_bowl/Topic(href, href_list) if(..()) return - if("dispose") + if(href_list["dispose"]) dispose() return diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 21795fb738c..40d659ccf6b 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -1247,7 +1247,6 @@ obj/item/toy/cards/deck/syndicate/black spawn(20) cooldown = FALSE return - ..() /obj/item/toy/owl name = "owl action figure" diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm index 4ac9651ea65..33aeddeaab0 100644 --- a/code/game/objects/items/weapons/teleportation.dm +++ b/code/game/objects/items/weapons/teleportation.dm @@ -115,7 +115,7 @@ Frequency: to_chat(user, "\The [src] is malfunctioning.") return var/list/L = list( ) - for(var/obj/machinery/computer/teleporter/com in world) + for(var/obj/machinery/computer/teleporter/com in GLOB.machines) if(com.target) if(com.power_station && com.power_station.teleporter_hub && com.power_station.engaged) L["[com.id] (Active)"] = com.target diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm deleted file mode 100644 index 012fcf79b10..00000000000 --- a/code/game/objects/items/weapons/tools.dm +++ /dev/null @@ -1,785 +0,0 @@ -#define HEALPERWELD 15 - -/* Tools! - * Note: Multitools are in devices - * - * Contains: - * Wrench - * Screwdriver - * Wirecutters - * Welding Tool - * Crowbar - * Revolver Conversion Kit - */ - -//Wrench -/obj/item/wrench - name = "wrench" - desc = "A wrench with common uses. Can be found in your hand." - icon = 'icons/obj/tools.dmi' - icon_state = "wrench" - flags = CONDUCT - slot_flags = SLOT_BELT - force = 5 - throwforce = 7 - usesound = 'sound/items/ratchet.ogg' - w_class = WEIGHT_CLASS_SMALL - materials = list(MAT_METAL=150) - origin_tech = "materials=1;engineering=1" - attack_verb = list("bashed", "battered", "bludgeoned", "whacked") - toolspeed = 1 - armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30) - -/obj/item/wrench/suicide_act(mob/user) - user.visible_message("[user] is beating [user.p_them()]self to death with [src]! It looks like [user.p_theyre()] trying to commit suicide!") - playsound(loc, 'sound/weapons/genhit.ogg', 50, 1, -1) - return BRUTELOSS - -/obj/item/wrench/cyborg - name = "automatic wrench" - desc = "An advanced robotic wrench. Can be found in construction cyborgs." - toolspeed = 0.5 - -/obj/item/wrench/brass - name = "brass wrench" - desc = "A brass wrench. It's faintly warm to the touch." - icon_state = "wrench_brass" - toolspeed = 0.5 - resistance_flags = FIRE_PROOF | ACID_PROOF - -/obj/item/wrench/abductor - name = "alien wrench" - desc = "A polarized wrench. It causes anything placed between the jaws to turn." - icon = 'icons/obj/abductor.dmi' - icon_state = "wrench" - usesound = 'sound/effects/empulse.ogg' - toolspeed = 0.1 - origin_tech = "materials=5;engineering=5;abductor=3" - -/obj/item/wrench/power - name = "hand drill" - desc = "A simple powered drill with a bolt bit." - icon_state = "drill_bolt" - item_state = "drill" - usesound = 'sound/items/drill_use.ogg' - materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25) - origin_tech = "materials=2;engineering=2" //done for balance reasons, making them high value for research, but harder to get - force = 8 //might or might not be too high, subject to change - throwforce = 8 - attack_verb = list("drilled", "screwed", "jabbed") - toolspeed = 0.25 - -/obj/item/wrench/power/attack_self(mob/user) - playsound(get_turf(user),'sound/items/change_drill.ogg', 50, 1) - var/obj/item/wirecutters/power/s_drill = new /obj/item/screwdriver/power - to_chat(user, "You attach the screwdriver bit to [src].") - qdel(src) - user.put_in_active_hand(s_drill) - -/obj/item/wrench/power/suicide_act(mob/user) - user.visible_message("[user] is pressing [src] against [user.p_their()] head! It looks like [user.p_theyre()] trying to commit suicide!") - return BRUTELOSS - -/obj/item/wrench/medical - name = "medical wrench" - desc = "A medical wrench with common (medical?) uses. Can be found in your hand." - icon_state = "wrench_medical" - force = 2 //MEDICAL - throwforce = 4 - origin_tech = "materials=1;engineering=1;biotech=3" - attack_verb = list("wrenched", "medicaled", "tapped", "jabbed", "whacked") - -/obj/item/wrench/medical/suicide_act(mob/user) - user.visible_message("[user] is praying to the medical wrench to take [user.p_their()] soul. It looks like [user.p_theyre()] trying to commit suicide!") - // TODO Make them glow with the power of the M E D I C A L W R E N C H - // during their ascension - - // Stun stops them from wandering off - user.Stun(5) - playsound(loc, 'sound/effects/pray.ogg', 50, 1, -1) - - // Let the sound effect finish playing - sleep(20) - - if(!user) - return - - for(var/obj/item/W in user) - user.unEquip(W) - - var/obj/item/wrench/medical/W = new /obj/item/wrench/medical(loc) - W.add_fingerprint(user) - W.desc += " For some reason, it reminds you of [user.name]." - - if(!user) - return - - user.dust() - return OBLITERATION - -//Screwdriver -/obj/item/screwdriver - name = "screwdriver" - desc = "You can be totally screwy with this." - icon = 'icons/obj/tools.dmi' - icon_state = "screwdriver_map" - flags = CONDUCT - slot_flags = SLOT_BELT - force = 5 - w_class = WEIGHT_CLASS_TINY - throwforce = 5 - throw_speed = 3 - throw_range = 5 - materials = list(MAT_METAL=75) - attack_verb = list("stabbed") - hitsound = 'sound/weapons/bladeslice.ogg' - usesound = 'sound/items/screwdriver.ogg' - toolspeed = 1 - armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30) - var/random_color = TRUE //if the screwdriver uses random coloring - -/obj/item/screwdriver/nuke - name = "screwdriver" - desc = "A screwdriver with an ultra thin tip." - icon_state = "screwdriver_nuke" - toolspeed = 0.5 - -/obj/item/screwdriver/suicide_act(mob/user) - user.visible_message("[user] is stabbing [src] into [user.p_their()] [pick("temple", "heart")]! It looks like [user.p_theyre()] trying to commit suicide!") - return BRUTELOSS - -/obj/item/screwdriver/New(loc, var/param_color = null) - ..() - if(random_color) - if(!param_color) - param_color = pick("red","blue","pink","brown","green","cyan","yellow") - icon_state = "screwdriver_[param_color]" - - if (prob(75)) - src.pixel_y = rand(0, 16) - -/obj/item/screwdriver/attack(mob/living/carbon/M, mob/living/carbon/user) - if(!istype(M) || user.a_intent == INTENT_HELP) - return ..() - if(user.zone_selected != "eyes" && user.zone_selected != "head") - return ..() - if(HAS_TRAIT(user, TRAIT_PACIFISM)) - to_chat(user, "You don't want to harm [M]!") - return - if((CLUMSY in user.mutations) && prob(50)) - M = user - return eyestab(M,user) - -/obj/item/screwdriver/brass - name = "brass screwdriver" - desc = "A screwdriver made of brass. The handle feels freezing cold." - icon_state = "screwdriver_brass" - toolspeed = 0.5 - random_color = FALSE - resistance_flags = FIRE_PROOF | ACID_PROOF - -/obj/item/screwdriver/abductor - name = "alien screwdriver" - desc = "An ultrasonic screwdriver." - icon = 'icons/obj/abductor.dmi' - icon_state = "screwdriver" - usesound = 'sound/items/pshoom.ogg' - toolspeed = 0.1 - random_color = FALSE - -/obj/item/screwdriver/power - name = "hand drill" - desc = "A simple hand drill with a screwdriver bit attached." - icon_state = "drill_screw" - item_state = "drill" - materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25) - origin_tech = "materials=2;engineering=2" //done for balance reasons, making them high value for research, but harder to get - force = 8 //might or might not be too high, subject to change - throwforce = 8 - throw_speed = 2 - throw_range = 3//it's heavier than a screw driver/wrench, so it does more damage, but can't be thrown as far - attack_verb = list("drilled", "screwed", "jabbed","whacked") - hitsound = 'sound/items/drill_hit.ogg' - usesound = 'sound/items/drill_use.ogg' - toolspeed = 0.25 - random_color = FALSE - -/obj/item/screwdriver/power/suicide_act(mob/user) - user.visible_message("[user] is putting [src] to [user.p_their()] temple. It looks like [user.p_theyre()] trying to commit suicide!") - return BRUTELOSS - -/obj/item/screwdriver/power/attack_self(mob/user) - playsound(get_turf(user), 'sound/items/change_drill.ogg', 50, 1) - var/obj/item/wrench/power/b_drill = new /obj/item/wrench/power - to_chat(user, "You attach the bolt driver bit to [src].") - qdel(src) - user.put_in_active_hand(b_drill) - -/obj/item/screwdriver/cyborg - name = "powered screwdriver" - desc = "An electrical screwdriver, designed to be both precise and quick." - usesound = 'sound/items/drill_use.ogg' - toolspeed = 0.5 - -//Wirecutters -/obj/item/wirecutters - name = "wirecutters" - desc = "This cuts wires." - icon = 'icons/obj/tools.dmi' - icon_state = "cutters" - flags = CONDUCT - slot_flags = SLOT_BELT - force = 6 - throw_speed = 3 - throw_range = 7 - w_class = WEIGHT_CLASS_SMALL - materials = list(MAT_METAL=80) - origin_tech = "materials=1;engineering=1" - attack_verb = list("pinched", "nipped") - hitsound = 'sound/items/wirecutter.ogg' - usesound = 'sound/items/wirecutter.ogg' - sharp = 1 - toolspeed = 1 - armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30) - var/random_color = TRUE - -/obj/item/wirecutters/New(loc, param_color = null) - ..() - if(random_color) - if(!param_color) - param_color = pick("yellow", "red") - icon_state = "cutters_[param_color]" - -/obj/item/wirecutters/attack(mob/living/carbon/C, mob/user) - if(istype(C) && C.handcuffed && istype(C.handcuffed, /obj/item/restraints/handcuffs/cable)) - user.visible_message("[user] cuts [C]'s restraints with [src]!") - QDEL_NULL(C.handcuffed) - if(C.buckled && C.buckled.buckle_requires_restraints) - C.buckled.unbuckle_mob(C) - C.update_handcuffed() - return - else - ..() - -/obj/item/wirecutters/suicide_act(mob/user) - user.visible_message("[user] is cutting at [user.p_their()] arteries with [src]! It looks like [user.p_theyre()] trying to commit suicide!") - playsound(loc, usesound, 50, 1, -1) - return BRUTELOSS - -/obj/item/wirecutters/brass - name = "brass wirecutters" - desc = "A pair of wirecutters made of brass. The handle feels freezing cold to the touch." - icon_state = "cutters_brass" - toolspeed = 0.5 - random_color = FALSE - resistance_flags = FIRE_PROOF | ACID_PROOF - -/obj/item/wirecutters/abductor - name = "alien wirecutters" - desc = "Extremely sharp wirecutters, made out of a silvery-green metal." - icon = 'icons/obj/abductor.dmi' - icon_state = "cutters" - toolspeed = 0.1 - origin_tech = "materials=5;engineering=4;abductor=3" - random_color = FALSE - -/obj/item/wirecutters/cyborg - name = "wirecutters" - desc = "This cuts wires." - toolspeed = 0.5 - -/obj/item/wirecutters/power - name = "jaws of life" - desc = "A set of jaws of life, the magic of science has managed to fit it down into a device small enough to fit in a tool belt. It's fitted with a cutting head." - icon_state = "jaws_cutter" - item_state = "jawsoflife" - origin_tech = "materials=2;engineering=2" - materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25) - usesound = 'sound/items/jaws_cut.ogg' - toolspeed = 0.25 - random_color = FALSE - -/obj/item/wirecutters/power/suicide_act(mob/user) - user.visible_message("[user] is wrapping \the [src] around [user.p_their()] neck. It looks like [user.p_theyre()] trying to rip [user.p_their()] head off!") - playsound(loc, 'sound/items/jaws_cut.ogg', 50, 1, -1) - if(ishuman(user)) - var/mob/living/carbon/human/H = user - var/obj/item/organ/external/head/head = H.bodyparts_by_name["head"] - if(head) - head.droplimb(0, DROPLIMB_BLUNT, FALSE, TRUE) - playsound(loc,pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg') ,50, 1, -1) - return BRUTELOSS - -/obj/item/wirecutters/power/attack_self(mob/user) - playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1) - var/obj/item/crowbar/power/pryjaws = new /obj/item/crowbar/power - to_chat(user, "You attach the pry jaws to [src].") - qdel(src) - user.put_in_active_hand(pryjaws) - -//Welding Tool -/obj/item/weldingtool - name = "welding tool" - desc = "A standard edition welder provided by Nanotrasen." - icon = 'icons/obj/tools.dmi' - icon_state = "welder" - item_state = "welder" - flags = CONDUCT - slot_flags = SLOT_BELT - force = 3 - throwforce = 5 - throw_speed = 3 - throw_range = 5 - hitsound = "swing_hit" - usesound = 'sound/items/welder.ogg' - var/acti_sound = 'sound/items/welderactivate.ogg' - var/deac_sound = 'sound/items/welderdeactivate.ogg' - w_class = WEIGHT_CLASS_SMALL - armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30) - resistance_flags = FIRE_PROOF - materials = list(MAT_METAL=70, MAT_GLASS=30) - origin_tech = "engineering=1;plasmatech=1" - toolspeed = 1 - var/welding = 0 //Whether or not the welding tool is off(0), on(1) or currently welding(2) - var/status = 1 //Whether the welder is secured or unsecured (able to attach rods to it to make a flamethrower) - var/max_fuel = 20 //The max amount of fuel the welder can hold - var/change_icons = 1 - var/can_off_process = 0 - var/light_intensity = 2 //how powerful the emitted light is when used. - var/nextrefueltick = 0 - -/obj/item/weldingtool/New() - ..() - create_reagents(max_fuel) - reagents.add_reagent("fuel", max_fuel) - update_icon() - -/obj/item/weldingtool/examine(mob/user) - . = ..() - if(get_dist(user, src) <= 0) - . += "It contains [get_fuel()] unit\s of fuel out of [max_fuel]." - -/obj/item/weldingtool/suicide_act(mob/user) - user.visible_message("[user] welds [user.p_their()] every orifice closed! It looks like [user.p_theyre()] trying to commit suicide!") - return FIRELOSS - -/obj/item/weldingtool/proc/update_torch() - overlays.Cut() - if(welding) - overlays += "[initial(icon_state)]-on" - item_state = "[initial(item_state)]1" - else - item_state = "[initial(item_state)]" - -/obj/item/weldingtool/update_icon() - if(change_icons) - var/ratio = get_fuel() / max_fuel - ratio = Ceiling(ratio*4) * 25 - if(ratio == 100) - icon_state = initial(icon_state) - else - icon_state = "[initial(icon_state)][ratio]" - update_torch() - ..() - -/obj/item/weldingtool/process() - switch(welding) - if(0) - force = 3 - damtype = "brute" - update_icon() - if(!can_off_process) - STOP_PROCESSING(SSobj, src) - return - //Welders left on now use up fuel, but lets not have them run out quite that fast - if(1) - force = 15 - damtype = "fire" - if(prob(5)) - remove_fuel(1) - update_icon() - - //This is to start fires. process() is only called if the welder is on. - var/turf/location = loc - if(ismob(location)) - var/mob/M = location - if(M.l_hand == src || M.r_hand == src) - location = get_turf(M) - if(isturf(location)) - location.hotspot_expose(700, 5) - -/obj/item/weldingtool/attackby(obj/item/I, mob/user, params) - if(isscrewdriver(I)) - flamethrower_screwdriver(I, user) - else if(istype(I, /obj/item/stack/rods)) - flamethrower_rods(I, user) - else - ..() - -/obj/item/weldingtool/attack(mob/M, mob/user) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - var/obj/item/organ/external/S = H.bodyparts_by_name[user.zone_selected] - - if(!S) - return - - if(!S.is_robotic() || user.a_intent != INTENT_HELP || S.open == 2) - return ..() - - if(!isOn()) //why wasn't this being checked already? - to_chat(user, "Turn on [src] before attempting repairs!") - return 1 - - if(S.brute_dam > ROBOLIMB_SELF_REPAIR_CAP) - to_chat(user, "The damage is far too severe to patch over externally.") - return - - if(!S.brute_dam) - to_chat(user, "Nothing to fix!") - return - - if(get_fuel() >= 1) - if(H == user) - if(!do_mob(user, H, 10)) - return 1 - if(!remove_fuel(1,null)) - to_chat(user, "Need more welding fuel!") - var/rembrute = HEALPERWELD - var/nrembrute = 0 - var/childlist - if(!isnull(S.children)) - childlist = S.children.Copy() - var/parenthealed = FALSE - while(rembrute > 0) - var/obj/item/organ/external/E - if(S.brute_dam) - E = S - else if(LAZYLEN(childlist)) - E = pick_n_take(childlist) - if(!E.brute_dam || !E.is_robotic()) - continue - else if(S.parent && !parenthealed) - E = S.parent - parenthealed = TRUE - if(!E.brute_dam || !E.is_robotic()) - break - else - break - playsound(src.loc, usesound, 50, 1) - nrembrute = max(rembrute - E.brute_dam, 0) - E.heal_damage(rembrute,0,0,1) - rembrute = nrembrute - user.visible_message("\The [user] patches some dents on \the [M]'s [E.name] with \the [src].") - if(H.bleed_rate && H.isSynthetic()) - H.bleed_rate = 0 - user.visible_message("\The [user] patches some leaks on [M] with \the [src].") - return 1 - else - return ..() - -/obj/item/weldingtool/afterattack(atom/O, mob/user, proximity) - if(!proximity) - return - if(welding) - remove_fuel(1) - var/turf/location = get_turf(user) - location.hotspot_expose(700, 50, 1) - if(get_fuel() <= 0) - set_light(0) - - if(isliving(O)) - var/mob/living/L = O - if(L.IgniteMob()) - message_admins("[key_name_admin(user)] set [key_name_admin(L)] on fire") - log_game("[key_name(user)] set [key_name(L)] on fire") - -/obj/item/weldingtool/attack_self(mob/user) - switched_on(user) - if(welding) - set_light(light_intensity) - - update_icon() - -//Returns the amount of fuel in the welder -/obj/item/weldingtool/proc/get_fuel() - return reagents.get_reagent_amount("fuel") - -//Removes fuel from the welding tool. If a mob is passed, it will try to flash the mob's eyes. This should probably be renamed to use() -/obj/item/weldingtool/proc/remove_fuel(amount = 1, mob/living/M = null) - if(!welding || !check_fuel()) - return FALSE - if(get_fuel() >= amount) - reagents.remove_reagent("fuel", amount) - check_fuel() - if(M) - M.flash_eyes(light_intensity) - return TRUE - else - if(M) - to_chat(M, "You need more welding fuel to complete this task.") - return FALSE - -//Returns whether or not the welding tool is currently on. -/obj/item/weldingtool/proc/isOn() - return welding - -//Turns off the welder if there is no more fuel (does this really need to be its own proc?) -/obj/item/weldingtool/proc/check_fuel(mob/user) - if(get_fuel() <= 0 && welding) - switched_on(user) - update_icon() - //mob icon update - if(ismob(loc)) - var/mob/M = loc - M.update_inv_r_hand(0) - M.update_inv_l_hand(0) - return 0 - return 1 - -//Switches the welder on -/obj/item/weldingtool/proc/switched_on(mob/user) - if(!status) - to_chat(user, "[src] can't be turned on while unsecured!") - return - welding = !welding - if(welding) - if(get_fuel() >= 1) - to_chat(user, "You switch [src] on.") - playsound(loc, acti_sound, 50, 1) - force = 15 - damtype = "fire" - hitsound = 'sound/items/welder.ogg' - update_icon() - START_PROCESSING(SSobj, src) - else - to_chat(user, "You need more fuel!") - switched_off(user) - else - if(user) - to_chat(user, "You switch [src] off.") - playsound(loc, deac_sound, 50, 1) - switched_off(user) - -//Switches the welder off -/obj/item/weldingtool/proc/switched_off(mob/user) - welding = 0 - set_light(0) - - force = 3 - damtype = "brute" - hitsound = "swing_hit" - update_icon() - -/obj/item/weldingtool/proc/flamethrower_screwdriver(obj/item/I, mob/user) - if(welding) - to_chat(user, "Turn it off first!") - return - status = !status - if(status) - to_chat(user, "You resecure [src].") - else - to_chat(user, "[src] can now be attached and modified.") - add_fingerprint(user) - -/obj/item/weldingtool/proc/flamethrower_rods(obj/item/I, mob/user) - if(!status) - var/obj/item/stack/rods/R = I - if(R.use(1)) - var/obj/item/flamethrower/F = new /obj/item/flamethrower(user.loc) - if(!remove_item_from_storage(F)) - user.unEquip(src) - loc = F - F.weldtool = src - add_fingerprint(user) - to_chat(user, "You add a rod to a welder, starting to build a flamethrower.") - user.put_in_hands(F) - else - to_chat(user, "You need one rod to start building a flamethrower!") - -/obj/item/weldingtool/largetank - name = "Industrial Welding Tool" - desc = "A slightly larger welder with a larger tank." - icon_state = "indwelder" - max_fuel = 40 - materials = list(MAT_METAL=70, MAT_GLASS=60) - origin_tech = "engineering=2;plasmatech=2" - -/obj/item/weldingtool/largetank/cyborg - name = "integrated welding tool" - desc = "An advanced welder designed to be used in robotic systems." - toolspeed = 0.5 - -/obj/item/weldingtool/largetank/flamethrower_screwdriver() - return - -/obj/item/weldingtool/mini - name = "emergency welding tool" - desc = "A miniature welder used during emergencies." - icon_state = "miniwelder" - max_fuel = 10 - w_class = WEIGHT_CLASS_TINY - materials = list(MAT_METAL=30, MAT_GLASS=10) - change_icons = 0 - -/obj/item/weldingtool/mini/flamethrower_screwdriver() - return - -/obj/item/weldingtool/abductor - name = "alien welding tool" - desc = "An alien welding tool. Whatever fuel it uses, it never runs out." - icon = 'icons/obj/abductor.dmi' - icon_state = "welder" - toolspeed = 0.1 - light_intensity = 0 - change_icons = 0 - origin_tech = "plasmatech=5;engineering=5;abductor=3" - can_off_process = 1 - -/obj/item/weldingtool/abductor/process() - if(get_fuel() <= max_fuel) - reagents.add_reagent("fuel", 1) - ..() - -/obj/item/weldingtool/hugetank - name = "Upgraded Welding Tool" - desc = "An upgraded welder based off the industrial welder." - icon_state = "upindwelder" - item_state = "upindwelder" - max_fuel = 80 - materials = list(MAT_METAL=70, MAT_GLASS=120) - origin_tech = "engineering=3;plasmatech=2" - -/obj/item/weldingtool/experimental - name = "Experimental Welding Tool" - desc = "An experimental welder capable of self-fuel generation and less harmful to the eyes." - icon_state = "exwelder" - item_state = "exwelder" - max_fuel = 40 - materials = list(MAT_METAL=70, MAT_GLASS=120) - origin_tech = "materials=4;engineering=4;bluespace=3;plasmatech=4" - change_icons = 0 - can_off_process = 1 - light_intensity = 1 - toolspeed = 0.5 - var/last_gen = 0 - -/obj/item/weldingtool/experimental/brass - name = "brass welding tool" - desc = "A brass welder that seems to constantly refuel itself. It is faintly warm to the touch." - icon_state = "brasswelder" - item_state = "brasswelder" - resistance_flags = FIRE_PROOF | ACID_PROOF - -obj/item/weldingtool/experimental/process() - ..() - if(get_fuel() < max_fuel && nextrefueltick < world.time) - nextrefueltick = world.time + 10 - reagents.add_reagent("fuel", 1) - -//Crowbar -/obj/item/crowbar - name = "pocket crowbar" - desc = "A small crowbar. This handy tool is useful for lots of things, such as prying floor tiles or opening unpowered doors." - icon = 'icons/obj/tools.dmi' - icon_state = "crowbar" - item_state = "crowbar" - usesound = 'sound/items/crowbar.ogg' - flags = CONDUCT - slot_flags = SLOT_BELT - force = 5 - throwforce = 7 - item_state = "crowbar" - w_class = WEIGHT_CLASS_SMALL - materials = list(MAT_METAL=50) - origin_tech = "engineering=1;combat=1" - attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked") - toolspeed = 1 - armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30) - -/obj/item/crowbar/red - icon_state = "crowbar_red" - item_state = "crowbar_red" - force = 8 - -/obj/item/crowbar/brass - name = "brass crowbar" - desc = "A brass crowbar. It feels faintly warm to the touch." - icon_state = "crowbar_brass" - item_state = "crowbar_brass" - toolspeed = 0.5 - resistance_flags = FIRE_PROOF | ACID_PROOF - -/obj/item/crowbar/abductor - name = "alien crowbar" - desc = "A hard-light crowbar. It appears to pry by itself, without any effort required." - icon = 'icons/obj/abductor.dmi' - usesound = 'sound/weapons/sonic_jackhammer.ogg' - icon_state = "crowbar" - toolspeed = 0.1 - origin_tech = "combat=4;engineering=4;abductor=3" - -/obj/item/crowbar/large - name = "crowbar" - desc = "It's a big crowbar. It doesn't fit in your pockets, because its too big." - force = 12 - w_class = WEIGHT_CLASS_NORMAL - throw_speed = 3 - throw_range = 3 - materials = list(MAT_METAL=70) - icon_state = "crowbar_large" - item_state = "crowbar_large" - toolspeed = 0.5 - -/obj/item/crowbar/cyborg - name = "hydraulic crowbar" - desc = "A hydraulic prying tool, compact but powerful. Designed to replace crowbar in construction cyborgs." - usesound = 'sound/items/jaws_pry.ogg' - force = 10 - toolspeed = 0.5 - -/obj/item/crowbar/power - name = "jaws of life" - desc = "A set of jaws of life, the magic of science has managed to fit it down into a device small enough to fit in a tool belt. It's fitted with a prying head." - icon_state = "jaws_pry" - item_state = "jawsoflife" - materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25) - origin_tech = "materials=2;engineering=2" - usesound = 'sound/items/jaws_pry.ogg' - force = 15 - toolspeed = 0.25 - var/airlock_open_time = 100 // Time required to open powered airlocks - -/obj/item/crowbar/power/suicide_act(mob/user) - user.visible_message("[user] is putting [user.p_their()] head in [src]. It looks like [user.p_theyre()] trying to commit suicide!") - playsound(loc, 'sound/items/jaws_pry.ogg', 50, 1, -1) - return BRUTELOSS - -/obj/item/crowbar/power/attack_self(mob/user) - playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1) - var/obj/item/wirecutters/power/cutjaws = new /obj/item/wirecutters/power - to_chat(user, "You attach the cutting jaws to [src].") - qdel(src) - user.put_in_active_hand(cutjaws) - -// Conversion kit -/obj/item/conversion_kit - name = "\improper Revolver Conversion Kit" - desc = "A professional conversion kit used to convert any knock off revolver into the real deal capable of shooting lethal .357 rounds without the possibility of catastrophic failure." - icon_state = "kit" - flags = CONDUCT - w_class = WEIGHT_CLASS_SMALL - origin_tech = "combat=2" - var/open = 0 - -/obj/item/conversion_kit/New() - ..() - update_icon() - -/obj/item/conversion_kit/update_icon() - icon_state = "[initial(icon_state)]_[open]" - -/obj/item/conversion_kit/attack_self(mob/user) - open = !open - to_chat(user, "You [open ? "open" : "close"] the conversion kit.") - update_icon() diff --git a/code/game/objects/structures/aliens.dm b/code/game/objects/structures/aliens.dm index 1de93f4d583..033787cce75 100644 --- a/code/game/objects/structures/aliens.dm +++ b/code/game/objects/structures/aliens.dm @@ -141,7 +141,6 @@ return ..() /obj/structure/alien/weeds/proc/Life() - set background = BACKGROUND_ENABLED var/turf/U = get_turf(src) if(istype(U, /turf/space)) diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 82487dbd0ae..6f4cbda45bb 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -154,7 +154,7 @@ if(!E.teleporting) var/list/L = list() var/list/areaindex = list() - for(var/obj/machinery/telepad_cargo/R in world) + for(var/obj/machinery/telepad_cargo/R in GLOB.machines) if(R.stage == 0) var/turf/T = get_turf(R) var/tmpname = T.loc.name diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index f9010c19415..7ff29b947ba 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -89,7 +89,7 @@ if(!E.teleporting) var/list/L = list() var/list/areaindex = list() - for(var/obj/machinery/telepad_cargo/R in world) + for(var/obj/machinery/telepad_cargo/R in GLOB.machines) if(R.stage == 0) var/turf/T = get_turf(R) var/tmpname = T.loc.name diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index aa3f7b898a1..defd6720e7d 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -163,6 +163,11 @@ loopsanity-- A.HasProximity(M, 1) + // If an opaque movable atom moves around we need to potentially update visibility. + if(M.opacity) + has_opaque_atom = TRUE // Make sure to do this before reconsider_lights(), incase we're on instant updates. Guaranteed to be on in this case. + reconsider_lights() + /turf/proc/levelupdate() for(var/obj/O in src) if(O.level == 1) diff --git a/code/game/world.dm b/code/game/world.dm index c1f6a076677..dd9711515f8 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -246,7 +246,7 @@ GLOBAL_VAR_INIT(world_topic_spam_protect_time, world.timeofday) if(!key_valid) return keySpamProtect(addr) if(input["req"] == "public") - hub_password = hub_password_base + hub_password = initial(hub_password) update_status() return "Set listed status to public." else diff --git a/code/hub.dm b/code/hub.dm index 665193a9d5b..32fe613399e 100644 --- a/code/hub.dm +++ b/code/hub.dm @@ -3,7 +3,6 @@ hub = "Exadv1.spacestation13" hub_password = "kMZy3U5jJHSiBQjr" name = "Space Station 13" - /var/hub_password_base = "kMZy3U5jJHSiBQjr" /* This is for any host that would like their server to appear on the main SS13 hub. To use it, simply replace the password above, with the password found below, and it should work. If not, let us know on the main tgstation IRC channel of irc.rizon.net #tgstation13 we can help you there. diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 0d55840b5b8..efb5ac32f97 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -490,6 +490,9 @@ if(SSticker.mode.wizards.len) dat += check_role_table("Wizards", SSticker.mode.wizards) + if(SSticker.mode.apprentices.len) + dat += check_role_table("Apprentices", SSticker.mode.apprentices) + if(SSticker.mode.raiders.len) dat += check_role_table("Raiders", SSticker.mode.raiders) diff --git a/code/modules/admin/verbs/atmosdebug.dm b/code/modules/admin/verbs/atmosdebug.dm index 087a90eebe6..ed8533dc9d5 100644 --- a/code/modules/admin/verbs/atmosdebug.dm +++ b/code/modules/admin/verbs/atmosdebug.dm @@ -1,7 +1,6 @@ /client/proc/atmosscan() set category = "Mapping" set name = "Check Piping" - set background = 1 if(!src.holder) to_chat(src, "Only administrators may use this command.") return @@ -12,17 +11,18 @@ to_chat(usr, "Checking for disconnected pipes...") //all plumbing - yes, some things might get stated twice, doesn't matter. - for(var/obj/machinery/atmospherics/plumbing in world) + for(var/thing in SSair.atmos_machinery) + var/obj/machinery/atmospherics/plumbing = thing if(plumbing.nodealert) to_chat(usr, "Unconnected [plumbing.name] located at [plumbing.x],[plumbing.y],[plumbing.z] ([get_area(plumbing.loc)])") //Manifolds - for(var/obj/machinery/atmospherics/pipe/manifold/pipe in world) + for(var/obj/machinery/atmospherics/pipe/manifold/pipe in SSair.atmos_machinery) if(!pipe.node1 || !pipe.node2 || !pipe.node3) to_chat(usr, "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])") //Pipes - for(var/obj/machinery/atmospherics/pipe/simple/pipe in world) + for(var/obj/machinery/atmospherics/pipe/simple/pipe in SSair.atmos_machinery) if(!pipe.node1 || !pipe.node2) to_chat(usr, "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])") diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index c92e100b641..329efb8e067 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -487,7 +487,8 @@ GLOBAL_PROTECT(AdminProcCaller) for(var/area/A in world) areas_all |= A.type - for(var/obj/machinery/power/apc/APC in world) + for(var/thing in GLOB.apcs) + var/obj/machinery/power/apc/APC = thing var/area/A = get_area(APC) if(!A) continue @@ -496,7 +497,8 @@ GLOBAL_PROTECT(AdminProcCaller) else areas_with_multiple_APCs |= A.type - for(var/obj/machinery/alarm/alarm in world) + for(var/thing in GLOB.air_alarms) + var/obj/machinery/alarm/alarm = thing var/area/A = get_area(alarm) if(!A) continue @@ -505,31 +507,31 @@ GLOBAL_PROTECT(AdminProcCaller) else areas_with_multiple_air_alarms |= A.type - for(var/obj/machinery/requests_console/RC in world) + for(var/obj/machinery/requests_console/RC in GLOB.machines) var/area/A = get_area(RC) if(!A) continue areas_with_RC |= A.type - for(var/obj/machinery/light/L in world) + for(var/obj/machinery/light/L in GLOB.machines) var/area/A = get_area(L) if(!A) continue areas_with_light |= A.type - for(var/obj/machinery/light_switch/LS in world) + for(var/obj/machinery/light_switch/LS in GLOB.machines) var/area/A = get_area(LS) if(!A) continue areas_with_LS |= A.type - for(var/obj/item/radio/intercom/I in world) + for(var/obj/item/radio/intercom/I in GLOB.global_radios) var/area/A = get_area(I) if(!A) continue areas_with_intercom |= A.type - for(var/obj/machinery/camera/C in world) + for(var/obj/machinery/camera/C in GLOB.machines) var/area/A = get_area(C) if(!A) continue diff --git a/code/modules/admin/verbs/honksquad.dm b/code/modules/admin/verbs/honksquad.dm index 8c8d46ec97b..5107ce7e22c 100644 --- a/code/modules/admin/verbs/honksquad.dm +++ b/code/modules/admin/verbs/honksquad.dm @@ -48,7 +48,8 @@ GLOBAL_VAR_INIT(sent_honksquad, 0) commandos += candidate//Add their ghost to commandos. //Spawns HONKsquad and equips them. - for(var/obj/effect/landmark/L in GLOB.landmarks_list) + for(var/thing in GLOB.landmarks_list) + var/obj/effect/landmark/L = thing if(honksquad_number<=0) break if(L.name == "HONKsquad") honk_leader_selected = honksquad_number == 1?1:0 diff --git a/code/modules/admin/verbs/infiltratorteam_syndicate.dm b/code/modules/admin/verbs/infiltratorteam_syndicate.dm index 459f2b8fb4b..54ddf85045e 100644 --- a/code/modules/admin/verbs/infiltratorteam_syndicate.dm +++ b/code/modules/admin/verbs/infiltratorteam_syndicate.dm @@ -66,7 +66,8 @@ GLOBAL_VAR_INIT(sent_syndicate_infiltration_team, 0) var/list/sit_spawns = list() var/list/sit_spawns_leader = list() var/list/sit_spawns_mgmt = list() - for(var/obj/effect/landmark/L in GLOB.landmarks_list) + for(var/thing in GLOB.landmarks_list) + var/obj/effect/landmark/L = thing if(L.name == "Syndicate-Infiltrator") sit_spawns += L if(L.name == "Syndicate-Infiltrator-Leader") diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm index 10ad31ef410..5e05b8ecebd 100644 --- a/code/modules/admin/verbs/mapping.dm +++ b/code/modules/admin/verbs/mapping.dm @@ -118,7 +118,7 @@ GLOBAL_VAR_INIT(intercom_range_display_status, 0) qdel(M) if(GLOB.intercom_range_display_status) - for(var/obj/item/radio/intercom/I in world) + for(var/obj/item/radio/intercom/I in GLOB.global_radios) for(var/turf/T in orange(7,I)) var/obj/effect/debugging/marker/F = new/obj/effect/debugging/marker(T) if(!(F in view(7,I.loc))) diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm index 57f7cad31c4..3e89a6ac18d 100644 --- a/code/modules/admin/verbs/one_click_antag.dm +++ b/code/modules/admin/verbs/one_click_antag.dm @@ -267,7 +267,7 @@ client/proc/one_click_antag() var/I = image('icons/mob/mob.dmi', loc = synd_mind_1.current, icon_state = "synd") synd_mind.current.client.images += I - for(var/obj/machinery/nuclearbomb/bomb in world) + for(var/obj/machinery/nuclearbomb/bomb in GLOB.machines) bomb.r_code = nuke_code // All the nukes are set to this code. return 1 @@ -455,7 +455,8 @@ client/proc/one_click_antag() if(candidates.len) var/raiders = min(antnum, candidates.len) //Spawns vox raiders and equips them. - for(var/obj/effect/landmark/L in world) + for(var/thing in GLOB.landmarks_list) + var/obj/effect/landmark/L = thing if(L.name == "voxstart") if(raiders<=0) break @@ -583,7 +584,8 @@ client/proc/one_click_antag() var/teamOneMembers = 5 var/teamTwoMembers = 5 var/datum/preferences/A = new() - for(var/obj/effect/landmark/L in world) + for(var/thing in GLOB.landmarks_list) + var/obj/effect/landmark/L = thing if(L.name == "tdome1") if(teamOneMembers<=0) break diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm index a03c37c4f67..0b84c96e71a 100644 --- a/code/modules/admin/verbs/striketeam.dm +++ b/code/modules/admin/verbs/striketeam.dm @@ -30,7 +30,7 @@ GLOBAL_VAR_INIT(sent_strike_team, 0) // Find the nuclear auth code var/nuke_code var/temp_code - for(var/obj/machinery/nuclearbomb/N in world) + for(var/obj/machinery/nuclearbomb/N in GLOB.machines) temp_code = text2num(N.r_code) if(temp_code)//if it's actually a number. It won't convert any non-numericals. nuke_code = N.r_code @@ -48,7 +48,8 @@ GLOBAL_VAR_INIT(sent_strike_team, 0) var/commando_number = COMMANDOS_POSSIBLE //for selecting a leader var/is_leader = TRUE // set to FALSE after leader is spawned - for(var/obj/effect/landmark/L in GLOB.landmarks_list) + for(var/thing in GLOB.landmarks_list) + var/obj/effect/landmark/L = thing if(commando_number <= 0) break @@ -109,7 +110,8 @@ GLOBAL_VAR_INIT(sent_strike_team, 0) commando_number-- //Spawns the rest of the commando gear. - for(var/obj/effect/landmark/L in GLOB.landmarks_list) + for(var/thing in GLOB.landmarks_list) + var/obj/effect/landmark/L = thing if(L.name == "Commando_Manual") //new /obj/item/gun/energy/pulse_rifle(L.loc) var/obj/item/paper/P = new(L.loc) @@ -120,7 +122,8 @@ GLOBAL_VAR_INIT(sent_strike_team, 0) P.stamp(stamp) qdel(stamp) - for(var/obj/effect/landmark/L in GLOB.landmarks_list) + for(var/thing in GLOB.landmarks_list) + var/obj/effect/landmark/L = thing if(L.name == "Commando-Bomb") new /obj/effect/spawner/newbomb/timer/syndicate(L.loc) qdel(L) diff --git a/code/modules/admin/verbs/striketeam_syndicate.dm b/code/modules/admin/verbs/striketeam_syndicate.dm index 73ee5edb82d..12df7467cbc 100644 --- a/code/modules/admin/verbs/striketeam_syndicate.dm +++ b/code/modules/admin/verbs/striketeam_syndicate.dm @@ -38,7 +38,7 @@ GLOBAL_VAR_INIT(sent_syndicate_strike_team, 0) // Find the nuclear auth code var/nuke_code var/temp_code - for(var/obj/machinery/nuclearbomb/N in world) + for(var/obj/machinery/nuclearbomb/N in GLOB.machines) temp_code = text2num(N.r_code) if(temp_code)//if it's actually a number. It won't convert any non-numericals. nuke_code = N.r_code @@ -53,7 +53,8 @@ GLOBAL_VAR_INIT(sent_syndicate_strike_team, 0) GLOB.sent_syndicate_strike_team = 1 //Spawns commandos and equips them. - for(var/obj/effect/landmark/L in GLOB.landmarks_list) + for(var/thing in GLOB.landmarks_list) + var/obj/effect/landmark/L = thing if(syndicate_commando_number <= 0) break diff --git a/code/modules/atmos_automation/console.dm b/code/modules/atmos_automation/console.dm deleted file mode 100644 index 8d23bb390aa..00000000000 --- a/code/modules/atmos_automation/console.dm +++ /dev/null @@ -1,454 +0,0 @@ -/obj/machinery/computer/general_air_control/atmos_automation - icon = 'icons/obj/computer.dmi' - icon_screen = "area_atmos" - icon_keyboard = "atmos_key" - circuit = /obj/item/circuitboard/atmos_automation - req_one_access_txt = "24;10" - Mtoollink = 1 - - show_sensors = 0 - var/on = 0 - - name = "Atmospherics Automations Console" - - var/list/datum/automation/automations = list() - -/obj/machinery/computer/general_air_control/atmos_automation/receive_signal(datum/signal/signal) - if(!signal || signal.encryption) return - - var/id_tag = signal.data["tag"] - if(!id_tag) - return - - sensor_information[id_tag] = signal.data - -/obj/machinery/computer/general_air_control/atmos_automation/process() - if(on) - for(var/datum/automation/A in automations) - A.process() - -/obj/machinery/computer/general_air_control/atmos_automation/update_icon() - icon_state = initial(icon_state) - // Broken - if(stat & BROKEN) - icon_state += "b" - - // Powered - else if(stat & NOPOWER) - icon_state = initial(icon_state) - icon_state += "0" - else if(on) - icon_state += "_active" - -/obj/machinery/computer/general_air_control/atmos_automation/proc/request_device_refresh(device) - send_signal(list("tag"=device, "status")) - -/obj/machinery/computer/general_air_control/atmos_automation/proc/send_signal(list/data, filter = RADIO_ATMOSIA)//filter's here so the AAC can cross communicate to things like vents, which have a different filter - var/datum/signal/signal = new - signal.transmission_method = 1 //radio signal - signal.source = src - signal.data=data - signal.data["sigtype"]="command" - signal.data["advcontrol"]=1//AAC balancing, you need to manually get up to the machine to make it listen to this - radio_connection.post_signal(src, signal, range = 8, filter = filter) - -/obj/machinery/computer/general_air_control/atmos_automation/proc/selectValidChildFor(datum/automation/parent, mob/user, list/valid_returntypes) - var/list/choices=list() - for(var/childtype in GLOB.automation_types) - var/datum/automation/A = new childtype(src) - if(A.returntype == null) - continue - if(!(A.returntype in valid_returntypes)) - continue - choices[A.name]=A - if(choices.len==0) - testing("Unable to find automations with returntype in [english_list(valid_returntypes)]!") - return 0 - var/label=input(user, "Select new automation:", "Automations", "Cancel") as null|anything in choices - if(!label) - return 0 - return choices[label] - -/obj/machinery/computer/general_air_control/atmos_automation/return_text() - var/out=..() - - if(on) - out += "RUNNING" - else - out += "STOPPED" - - out += {" -

Automations

-

\[ - - Add - - | - - Reset All - - | - - Clear - - \]

-

\[ - - Export - - | - - Import - - \]

"} - if(automations.len==0) - out += "No automations present." - else - for(var/datum/automation/A in automations) - out += {" -
- - [A.label] - (Reset | - ×) - - [A.GetText()] -
- "} - return out - -/obj/machinery/computer/general_air_control/atmos_automation/Topic(href,href_list) - if(..()) - return 1 - - if(href_list["on"]) - on = !on - updateUsrDialog() - update_icon() - return 1 - - if(href_list["add"]) - var/new_child=selectValidChildFor(null,usr,list(0)) - if(!new_child) - return 1 - automations += new_child - updateUsrDialog() - return 1 - - if(href_list["label"]) - var/datum/automation/A=locate(href_list["label"]) - if(!A) return 1 - var/nl=input(usr, "Please enter a label for this automation task.") as text|null - if(!nl) return 1 - nl = copytext(sanitize(nl), 1, 50) - A.label=nl - updateUsrDialog() - return 1 - - if(href_list["reset"]) - if(href_list["reset"]=="*") - for(var/datum/automation/A in automations) - if(!A) continue - A.OnReset() - else - var/datum/automation/A=locate(href_list["reset"]) - if(!A) return 1 - A.OnReset() - updateUsrDialog() - return 1 - - if(href_list["remove"]) - if(href_list["remove"]=="*") - var/confirm=alert("Are you sure you want to remove ALL automations?","Automations","Yes","No") - if(confirm == "No") return 0 - for(var/datum/automation/A in automations) - if(!A) continue - A.OnRemove() - automations.Remove(A) - else - var/datum/automation/A=locate(href_list["remove"]) - if(!A) return 1 - A.OnRemove() - automations.Remove(A) - updateUsrDialog() - return 1 - - if(href_list["read"]) - var/code = input("Input exported AAC code.","Automations","") as message|null - if(!code) return 0 - ReadCode(code) - updateUsrDialog() - return 1 - - if(href_list["dump"]) - input("Exported AAC code:","Automations",DumpCode()) as message|null - return 0 - -/obj/machinery/computer/general_air_control/atmos_automation/proc/MakeCompare(datum/automation/a, datum/automation/b, comparetype) - var/datum/automation/compare/compare=new(src) - compare.comparator = comparetype - compare.children[1] = a - compare.children[2] = b - return compare - -/obj/machinery/computer/general_air_control/atmos_automation/proc/MakeNumber(value) - var/datum/automation/static_value/val = new(src) - val.value=value - return val - -/obj/machinery/computer/general_air_control/atmos_automation/proc/MakeGetSensorData(sns_tag,field) - var/datum/automation/get_sensor_data/sensor=new(src) - sensor.sensor=sns_tag - sensor.field=field - return sensor - -/obj/machinery/computer/general_air_control/atmos_automation/proc/DumpCode() - var/list/json[0] - for(var/datum/automation/A in automations) - json += list(A.Export()) - return json_encode(json) - -/obj/machinery/computer/general_air_control/atmos_automation/proc/ReadCode(jsonStr) - automations.Cut() - var/list/json = json_decode(jsonStr) - if(json.len>0) - for(var/list/cData in json) - if(isnull(cData) || !("type" in cData)) - testing("AAC: Null cData in root JS array.") - continue - var/Atype=text2path(cData["type"]) - if(!(Atype in GLOB.automation_types)) - testing("AAC: Unrecognized Atype [Atype].") - continue - var/datum/automation/A = new Atype(src) - A.Import(cData) - automations += A - -/obj/machinery/computer/general_air_control/atmos_automation/burnchamber - var/injector_tag="inc_in" - var/output_tag="inc_out" - var/sensor_tag="inc_sensor" - frequency=AIRLOCK_FREQ - var/temperature=1000 - -/obj/machinery/computer/general_air_control/atmos_automation/burnchamber/New() - ..() - - // On State - // Pretty much this: - /* - if(get_sensor("inc_sensor","temperature") < 200) - set_injector_state("inc_in",1) - set_vent_pump_power("inc_out",0) - else - set_vent_pump_power("inc_out",1 - */ - - var/datum/automation/get_sensor_data/sensor=new(src) - sensor.sensor=sensor_tag - sensor.field="temperature" - - var/datum/automation/static_value/val = new(src) - val.value=temperature - 800 - - var/datum/automation/compare/compare=new(src) - compare.comparator = "Less Than" - compare.children[1] = sensor - compare.children[2] = val - - var/datum/automation/set_injector_power/inj_on=new(src) - inj_on.injector=injector_tag - inj_on.state=1 - - var/datum/automation/set_vent_pump_power/vp_on=new(src) - vp_on.vent_pump=output_tag - vp_on.state=1 - - var/datum/automation/set_vent_pump_power/vp_off=new(src) - vp_off.vent_pump=output_tag - vp_off.state=0 - - var/datum/automation/if_statement/i = new (src) - i.label = "Fuel Injector On" - i.condition = compare - i.children_then.Add(inj_on) - i.children_then.Add(vp_off) - i.children_else.Add(vp_on) - - automations += i - - // Off state - /* - if(get_sensor("inc_sensor","temperature") > 1000) - set_injector_state("inc_in",0) - */ - sensor=new(src) - sensor.sensor=sensor_tag - sensor.field="temperature" - - val = new(src) - val.value=temperature - - compare=new(src) - compare.comparator = "Greater Than" - compare.children[1] = sensor - compare.children[2] = val - - var/datum/automation/set_injector_power/inj_off=new(src) - inj_off.injector=injector_tag - inj_off.state=0 - - i = new (src) - i.label = "Fuel Injector Off" - i.condition = compare - i.children_then.Add(inj_off) - - automations += i - -/obj/machinery/computer/general_air_control/atmos_automation/air_mixing - var/n2_injector_tag="air_n2_in" - var/o2_injector_tag="air_o2_in" - var/output_tag="air_out" - var/sensor_tag="air_sensor" - frequency=ATMOS_DISTRO_FREQ - var/temperature=1000 - -/obj/machinery/computer/general_air_control/atmos_automation/air_mixing/New() - ..() - buildO2() - buildN2() - buildOutletVent() - -/obj/machinery/computer/general_air_control/atmos_automation/air_mixing/proc/buildO2() - /////////////////////////////////////////////////////////////// - // Oxygen Injection - /////////////////////////////////////////////////////////////// - - var/datum/automation/set_injector_power/inj_on=new(src) - inj_on.injector=o2_injector_tag - inj_on.state=1 - - var/datum/automation/set_injector_power/inj_off=new(src) - inj_off.injector=o2_injector_tag - inj_off.state=0 - - var/datum/automation/if_statement/i = new (src) - i.label = "Oxygen Injection" - i.condition = MakeCompare( - MakeGetSensorData(sensor_tag,"oxygen"), - MakeNumber(20), - "Less Than or Equal to" - ) - i.children_then.Add(inj_on) - i.children_else.Add(inj_off) - - automations += i - -/obj/machinery/computer/general_air_control/atmos_automation/air_mixing/proc/buildN2() - /////////////////////////////////////////////////////////////// - // Nitrogen Injection - /////////////////////////////////////////////////////////////// - /* - if(get_sensor_data("pressure") < 100) - injector_on() - else - if(get_sensor_data("pressure") > 5000) - injector_off() - */ - - var/datum/automation/set_injector_power/inj_on=new(src) - inj_on.injector=n2_injector_tag - inj_on.state=1 - - var/datum/automation/set_injector_power/inj_off=new(src) - inj_off.injector=n2_injector_tag - inj_off.state=0 - - var/datum/automation/if_statement/if_on = new (src) - if_on.label = "Nitrogen Injection" - if_on.condition = MakeCompare( - MakeGetSensorData(sensor_tag,"pressure"), - MakeNumber(100), - "Less Than" - ) - if_on.children_then.Add(inj_on) - - - var/datum/automation/if_statement/if_off=new(src) - if_off.condition=MakeCompare( - MakeGetSensorData(sensor_tag,"pressure"), - MakeNumber(5000), - "Greater Than" - ) - if_off.children_then.Add(inj_off) - - if_on.children_else.Add(if_off) - - automations += if_on - -/obj/machinery/computer/general_air_control/atmos_automation/air_mixing/proc/buildOutletVent() - /////////////////////////////////////////////////////////////// - // Outlet Management - /////////////////////////////////////////////////////////////// - /* - if(get_sensor_data("pressure") >= 5000 && get_sensor_data("oxygen") >= 20) - vent_on() - else - if(get_sensor_data("oxygen") < 20 || get_sensor_data("pressure") < 100) - vent_off() - */ - - var/datum/automation/set_vent_pump_power/vp_on=new(src) - vp_on.vent_pump=output_tag - vp_on.state=1 - - var/datum/automation/set_vent_pump_power/vp_off=new(src) - vp_off.vent_pump=output_tag - vp_off.state=0 - - var/datum/automation/if_statement/if_on=new(src) - if_on.label="Air Output" - - var/datum/automation/and/and_on=new(src) - and_on.children.Add( - MakeCompare( - MakeGetSensorData(sensor_tag,"pressure"), - MakeNumber(5000), - "Greater Than or Equal to" - ) - ) - and_on.children.Add( - MakeCompare( - MakeGetSensorData(sensor_tag,"oxygen"), - MakeNumber(20), - "Greater Than or Equal to" - ) - ) - if_on.condition=and_on - if_on.children_then.Add(vp_on) - - ////////////////////////////// - - var/datum/automation/if_statement/if_off=new(src) - - var/datum/automation/or/or_off=new(src) - or_off.children.Add( - MakeCompare( - MakeGetSensorData(sensor_tag,"pressure"), - MakeNumber(100), - "Less Than" - ) - ) - or_off.children.Add( - MakeCompare( - MakeGetSensorData(sensor_tag,"oxygen"), - MakeNumber(20), - "Less Than" - ) - ) - if_off.condition=or_off - if_off.children_then.Add(vp_off) - - if_on.children_else.Add(if_off) - - automations += if_on diff --git a/code/modules/atmos_automation/implementation/digital_valves.dm b/code/modules/atmos_automation/implementation/digital_valves.dm deleted file mode 100644 index dc0d0b2be00..00000000000 --- a/code/modules/atmos_automation/implementation/digital_valves.dm +++ /dev/null @@ -1,44 +0,0 @@ - - -/datum/automation/set_valve_state - name = "Digital Valve: Set Open/Closed" - var/valve=null - var/state=0 - - Export() - var/list/json = ..() - json["valve"]=valve - json["state"]=state - return json - - Import(var/list/json) - ..(json) - valve = json["valve"] - state = text2num(json["state"]) - - process() - if(valve) - parent.send_signal(list ("tag" = valve, "command"="valve_set","valve_set"=state)) - return 0 - - GetText() - return "Set digital valve [fmtString(valve)] to [state?"open":"closed"]." - - Topic(href,href_list) - if(..()) - return 1 - if(href_list["set_state"]) - state=!state - parent.updateUsrDialog() - return 1 - if(href_list["set_subject"]) - var/list/valves=list() - for(var/obj/machinery/atmospherics/binary/valve/digital/V in world) - if(!isnull(V.id_tag) && V.frequency == parent.frequency) - valves|=V.id_tag - if(valves.len==0) - to_chat(usr, "Unable to find any digital valves on this frequency.") - return - valve = input("Select a valve:", "Sensor Data", valve) as null|anything in valves - parent.updateUsrDialog() - return 1 diff --git a/code/modules/atmos_automation/implementation/emitters.dm b/code/modules/atmos_automation/implementation/emitters.dm deleted file mode 100644 index e6315fbceb2..00000000000 --- a/code/modules/atmos_automation/implementation/emitters.dm +++ /dev/null @@ -1,42 +0,0 @@ -/datum/automation/set_emitter_power - name = "Emitter: Set Power" - var/emitter=null - var/on=0 - - Export() - var/list/json = ..() - json["emitter"]=emitter - json["on"]=on - return json - - Import(var/list/json) - ..(json) - emitter = json["emitter"] - on = text2num(json["on"]) - - process() - if(emitter) - parent.send_signal(list("tag" = emitter, "command"="set", "state" = on, "hiddenprints" = parent.fingerprintshidden)) - return 0 - - GetText() - return "Set emitter [fmtString(emitter)] to [on?"on":"off"]." - - Topic(href,href_list) - if(..()) - return 1 - if(href_list["set_power"]) - on=!on - parent.updateUsrDialog() - return 1 - if(href_list["set_subject"]) - var/list/emitters=list() - for(var/obj/machinery/power/emitter/E in GLOB.machines) - if(!isnull(E.id_tag) && E.frequency == parent.frequency) - emitters|=E.id_tag - if(emitters.len==0) - to_chat(usr, "Unable to find any emitters on this frequency.") - return - emitter = input("Select an emitter:", "Emitter", emitter) as null|anything in emitters - parent.updateUsrDialog() - return 1 diff --git a/code/modules/atmos_automation/implementation/injectors.dm b/code/modules/atmos_automation/implementation/injectors.dm deleted file mode 100644 index d6747f31447..00000000000 --- a/code/modules/atmos_automation/implementation/injectors.dm +++ /dev/null @@ -1,83 +0,0 @@ - -//////////////////////////////////////////// -// Injector -//////////////////////////////////////////// -/datum/automation/set_injector_power - name = "Injector: Power" - var/injector=null - var/state=0 - - Export() - var/list/json = ..() - json["injector"]=injector - json["state"]=state - return json - - Import(var/list/json) - ..(json) - injector = json["injector"] - state = text2num(json["state"]) - - process() - if(injector) - parent.send_signal(list ("tag" = injector, "power"=state)) - return 0 - - GetText() - return "Set injector [fmtString(injector)] power to [state ? "on" : "off"]." - - Topic(href,href_list) - if(..()) - return 1 - if(href_list["toggle_state"]) - state = !state - parent.updateUsrDialog() - return 1 - if(href_list["set_injector"]) - var/list/injector_names=list() - for(var/obj/machinery/atmospherics/unary/outlet_injector/I in GLOB.machines) - if(!isnull(I.id_tag) && I.frequency == parent.frequency) - injector_names|=I.id_tag - injector = input("Select an injector:", "Sensor Data", injector) as null|anything in injector_names - parent.updateUsrDialog() - return 1 - -/datum/automation/set_injector_rate - name = "Injector: Rate" - var/injector = null - var/rate = 0 - - Export() - var/list/json = ..() - json["injector"] = injector - json["rate"] = rate - return json - - Import(var/list/json) - ..(json) - injector = json["injector"] - rate = text2num(json["rate"]) - - process() - if(injector) - parent.send_signal(list ("tag" = injector, "set_volume_rate"=rate)) - return 0 - - GetText() - return "Set injector [fmtString(injector)] transfer rate to [rate] L/s." - - Topic(href,href_list) - if(..()) - return 1 - if(href_list["set_rate"]) - rate = input("Set rate in L/s.", "Rate", rate) as num - parent.updateUsrDialog() - return 1 - if(href_list["set_injector"]) - var/list/injector_names=list() - for(var/obj/machinery/atmospherics/unary/outlet_injector/I in GLOB.machines) - if(!isnull(I.id_tag) && I.frequency == parent.frequency) - injector_names|=I.id_tag - injector = input("Select an injector:", "Sensor Data", injector) as null|anything in injector_names - parent.updateUsrDialog() - return 1 diff --git a/code/modules/atmos_automation/implementation/scrubbers.dm b/code/modules/atmos_automation/implementation/scrubbers.dm deleted file mode 100644 index 54829d01cea..00000000000 --- a/code/modules/atmos_automation/implementation/scrubbers.dm +++ /dev/null @@ -1,153 +0,0 @@ -/datum/automation/set_scrubber_mode - name="Scrubber: Mode" - - var/scrubber=null - var/mode=1 - - Export() - var/list/json = ..() - json["scrubber"]=scrubber - json["mode"]=mode - return json - - Import(var/list/json) - ..(json) - scrubber = json["scrubber"] - mode = text2num(json["mode"]) - - New(var/obj/machinery/computer/general_air_control/atmos_automation/aa) - ..(aa) - children=list(null) - - process() - if(scrubber) - parent.send_signal(list ("tag" = scrubber, "sigtype"="command", "scrubbing"=mode),filter = RADIO_FROM_AIRALARM) - return 0 - - GetText() - return "Set Scrubber [fmtString(scrubber)] mode to [mode?"Scrubbing":"Syphoning"]." - - Topic(href,href_list) - if(..()) return - if(href_list["set_mode"]) - mode=!mode - parent.updateUsrDialog() - return 1 - if(href_list["set_scrubber"]) - var/list/injector_names=list() - for(var/obj/machinery/atmospherics/unary/vent_scrubber/S in GLOB.machines) - if(!isnull(S.id_tag) && S.frequency == parent.frequency) - injector_names|=S.id_tag - scrubber = input("Select a scrubber:", "Scrubbers", scrubber) as null|anything in injector_names - parent.updateUsrDialog() - return 1 - -/datum/automation/set_scrubber_power - name="Scrubber: Power" - - var/scrubber=null - var/state=0 - - Export() - var/list/json = ..() - json["scrubber"]=scrubber - json["state"]=state - return json - - Import(var/list/json) - ..(json) - scrubber = json["scrubber"] - state = text2num(json["state"]) - - New(var/obj/machinery/computer/general_air_control/atmos_automation/aa) - ..(aa) - - process() - if(scrubber) - parent.send_signal(list ("tag" = scrubber, "sigtype"="command", "power"=state),filter = RADIO_FROM_AIRALARM) - - GetText() - return "Set Scrubber [fmtString(scrubber)] power to [state ? "on" : "off"]." - - Topic(href,href_list) - if(..()) return - if(href_list["set_power"]) - state = !state - parent.updateUsrDialog() - return 1 - if(href_list["set_scrubber"]) - var/list/injector_names=list() - for(var/obj/machinery/atmospherics/unary/vent_scrubber/S in GLOB.machines) - if(!isnull(S.id_tag) && S.frequency == parent.frequency) - injector_names|=S.id_tag - scrubber = input("Select a scrubber:", "Scrubbers", scrubber) as null|anything in injector_names - parent.updateUsrDialog() - return 1 - -GLOBAL_LIST_INIT(gas_labels, list( - "co2" = "CO2", - "tox" = "Plasma", - "n2o" = "N2O", - "o2" = "O2", - "n2" = "N2" -)) -/datum/automation/set_scrubber_gasses - name="Scrubber: Gasses" - - var/scrubber=null - var/list/gasses=list( - "co2" = 1, - "tox" = 0, - "n2o" = 0, - "o2" = 0, - "n2" = 0 - ) - - Export() - var/list/json = ..() - json["scrubber"]=scrubber - json["gasses"]=gasses - return json - - Import(var/list/json) - ..(json) - scrubber = json["scrubber"] - - var/list/newgasses=json["gasses"] - for(var/key in newgasses) - gasses[key]=newgasses[key] - - - New(var/obj/machinery/computer/general_air_control/atmos_automation/aa) - ..(aa) - - process() - if(scrubber) - var/list/data = list ("tag" = scrubber, "sigtype"="command") - for(var/gas in gasses) - data[gas+"_scrub"]=gasses[gas] - parent.send_signal(data,filter = RADIO_FROM_AIRALARM) - - GetText() - var/txt = "Set Scrubber [fmtString(scrubber)] to scrub " - for(var/gas in gasses) - txt += " [GLOB.gas_labels[gas]] ([gasses[gas] ? "on" : "off"])," - return txt - - Topic(href,href_list) - if(..()) return - if(href_list["tog_gas"]) - var/gas = href_list["tog_gas"] - if(!(gas in gasses)) - return - gasses[gas] = !gasses[gas] - parent.updateUsrDialog() - return 1 - if(href_list["set_scrubber"]) - var/list/injector_names=list() - for(var/obj/machinery/atmospherics/unary/vent_scrubber/S in GLOB.machines) - if(!isnull(S.id_tag) && S.frequency == parent.frequency) - injector_names|=S.id_tag - scrubber = input("Select a scrubber:", "Scrubbers", scrubber) as null|anything in injector_names - parent.updateUsrDialog() - return 1 diff --git a/code/modules/atmos_automation/implementation/sensors.dm b/code/modules/atmos_automation/implementation/sensors.dm deleted file mode 100644 index e1ef348a617..00000000000 --- a/code/modules/atmos_automation/implementation/sensors.dm +++ /dev/null @@ -1,56 +0,0 @@ - -/////////////////////////////////////////// -// sensor data -/////////////////////////////////////////// - -/datum/automation/get_sensor_data - name = "Sensor: Get Data" - var/field="temperature" - var/sensor=null - - returntype=AUTOM_RT_NUM - - Export() - var/list/json = ..() - json["sensor"]=sensor - json["field"]=field - return json - - Import(var/list/json) - ..(json) - sensor = json["sensor"] - field = json["field"] - - Evaluate() - if(sensor && field && (sensor in parent.sensor_information)) - return parent.sensor_information[sensor][field] - return 0 - - GetText() - return "[fmtString(field)] from sensor [fmtString(sensor)]" - - Topic(href,href_list) - if(..()) - return 1 - if(href_list["set_field"]) - field = input("Select a sensor output:", "Sensor Data", field) as null|anything in list( - "temperature", - "pressure", - "oxygen", - "toxins", - "nitrogen", - "carbon_dioxide" - ) - parent.updateUsrDialog() - return 1 - if(href_list["set_sensor"]) - var/list/sensor_list = list() - for(var/obj/machinery/air_sensor/G in GLOB.machines) - if(!isnull(G.id_tag) && G.frequency == parent.frequency) - sensor_list|=G.id_tag - for(var/obj/machinery/meter/M in GLOB.machines) - if(!isnull(M.id_tag) && M.frequency == parent.frequency) - sensor_list|=M.id_tag - sensor = input("Select a sensor:", "Sensor Data", field) as null|anything in sensor_list - parent.updateUsrDialog() - return 1 diff --git a/code/modules/atmos_automation/implementation/vent_pump.dm b/code/modules/atmos_automation/implementation/vent_pump.dm deleted file mode 100644 index 71d728b316d..00000000000 --- a/code/modules/atmos_automation/implementation/vent_pump.dm +++ /dev/null @@ -1,314 +0,0 @@ -/datum/automation/set_vent_pump_mode - name="Vent Pump: Mode" - - var/vent_pump = null - var/mode = "stabilize" - var/vent_type = 0//0 for unary vents, 1 for DP vents - - var/list/modes = list("stabilize","purge") - - Export() - var/list/json = ..() - json["vent_pump"] = vent_pump - json["mode"] = mode - json["vent_type"] = vent_type - return json - - Import(var/list/json) - ..(json) - vent_pump = json["vent_pump"] - mode = json["mode"] - vent_type = text2num(json["vent_type"]) - - process() - if(vent_pump) - var/dirvalue = (mode == "stabilize" ? 1 : mode == "purge" ? 0 : 1) - parent.send_signal(list("tag" = vent_pump, "direction" = dirvalue), filter = (vent_type ? RADIO_ATMOSIA : RADIO_FROM_AIRALARM)) - return 0 - - GetText() - return "Set [vent_type ? "Dual-Port" : "Unary"] vent pump [fmtString(vent_pump)] mode to [mode]." - - Topic(href,href_list) - if(..()) - return 1 - - if(href_list["set_mode"]) - mode = input("Select a mode to put this pump into.",mode) in modes - parent.updateUsrDialog() - return 1 - - if(href_list["set_vent_pump"]) - var/list/injector_names = list() - if(!vent_type) - for(var/obj/machinery/atmospherics/unary/vent_pump/I in GLOB.machines) - if(!isnull(I.id_tag) && I.frequency == parent.frequency) - injector_names |= I.id_tag - else - for(var/obj/machinery/atmospherics/binary/dp_vent_pump/I in world) -// to_chat(world, "test") - if(!isnull(I.id_tag) && I.frequency == parent.frequency) - injector_names |= I.id_tag - - vent_pump = input("Select a vent:", "Vent Pumps", vent_pump) as null|anything in injector_names - parent.updateUsrDialog() - return 1 - - if(href_list["toggle_type"]) - vent_type = !vent_type - parent.updateUsrDialog() - return 1 - -/datum/automation/set_vent_pump_power - name="Vent Pump: Power" - - var/vent_pump = null - var/state = 0 - var/mode = 0//0 for unary vents, 1 for DP vents. - - Export() - var/list/json = ..() - json["vent_pump"] = vent_pump - json["state"] = state - json["mode"] = mode - return json - - Import(var/list/json) - ..(json) - vent_pump = json["vent_pump"] - state = text2num(json["state"]) - mode = text2num(json["mode"]) - - process() - if(vent_pump) - parent.send_signal(list ("tag" = vent_pump, "power" = state), filter = (mode ? RADIO_ATMOSIA : RADIO_FROM_AIRALARM)) - - GetText() - return "Set [mode ? "Dual-Port" : "Unary"] vent pump [fmtString(vent_pump)] power to [state ? "on" : "off"]." - - Topic(href,href_list) - if(..()) - return 1 - - if(href_list["set_power"]) - state = !state - parent.updateUsrDialog() - return 1 - - if(href_list["set_vent_pump"]) - var/list/injector_names=list() - if(!mode) - for(var/obj/machinery/atmospherics/unary/vent_pump/I in GLOB.machines) - if(!isnull(I.id_tag) && I.frequency == parent.frequency) - injector_names|=I.id_tag - else - for(var/obj/machinery/atmospherics/binary/dp_vent_pump/I in world) - if(!isnull(I.id_tag) && I.frequency == parent.frequency) - injector_names|=I.id_tag - vent_pump = input("Select a vent:", "Vent Pumps", vent_pump) as null|anything in injector_names - parent.updateUsrDialog() - return 1 - - if(href_list["toggle_mode"]) - mode = !mode - parent.updateUsrDialog() - return 1 - -/datum/automation/set_vent_pump_pressure//controls the internal/external pressure bounds of a vent pump. - name = "Vent Pump: Pressure Settings" - - var/vent_pump = null - var/intpressureout = 0//these 2 are for DP vents, if it's a unary vent you're sending to it will take intpressureout as var - var/intpressurein = 0 - var/extpressure = 0 - var/mode = 0//0 for unary vents, 1 for DP vents. - - Export() - var/list/json = ..() - json["vent_pump"] = vent_pump - json["intpressureout"] = intpressureout - json["intpressurein"] = intpressurein - json["extpressure"] = extpressure - json["mode"] = mode - return json - - Import(var/list/json) - ..(json) - vent_pump = json["vent_pump"] - intpressureout = text2num(json["intpressureout"]) - intpressurein = text2num(json["intpressurein"]) - extpressure = text2num(json["extpressure"]) - mode = text2num(json["mode"]) - - New(var/obj/machinery/computer/general_air_control/atmos_automation/aa) - ..(aa) - - process() - if(vent_pump) - var/list/data = list( \ - "tag" = vent_pump, \ - ) - var/filter = RADIO_ATMOSIA - if(mode)//it's a DP vent - if(intpressurein) - data.Add(list("set_input_pressure" = intpressurein)) - if(intpressureout) - data.Add(list("set_output_pressure" = intpressureout)) - if(extpressure) - data.Add(list("set_external_pressure" = extpressure)) - - else - if(intpressureout) - data.Add(list("set_internal_pressure" = intpressureout)) - if(extpressure) - data.Add(list("set_external_pressure" = extpressure)) - filter = RADIO_FROM_AIRALARM - - parent.send_signal(data, filter) - - GetText() - if(mode)//DP vent - return {"Set dual-port vent pump [fmtString(vent_pump)] - pressure bounds: internal outwards: [fmtString(intpressureout)] - internal inwards: [fmtString(intpressurein)] - external: [fmtString(extpressure)] - "}//well that was a lot to type - else - return {"Set unary vent pump [fmtString(vent_pump)] - pressure bounds: internal: [fmtString(intpressureout)] - external: [fmtString(extpressure)] - "}//copy paste FTW - - Topic(href, href_list) - if(..()) - return 1 - - if(href_list["set_vent_pump"]) - var/list/injector_names=list() - if(mode)//DP vent selection - for(var/obj/machinery/atmospherics/binary/dp_vent_pump/I in world) - if(!isnull(I.id_tag) && I.frequency == parent.frequency) - injector_names|=I.id_tag - else - for(var/obj/machinery/atmospherics/unary/vent_pump/I in GLOB.machines) - if(!isnull(I.id_tag) && I.frequency == parent.frequency) - injector_names|=I.id_tag - vent_pump = input("Select a vent:", "Vent Pumps", vent_pump) as null|anything in injector_names - parent.updateUsrDialog() - return 1 - - if(href_list["set_intpressure_out"]) - var/response = input("Set new pressure, in kPa. \[0-[50*ONE_ATMOSPHERE]\]") as num - intpressureout = text2num(response) - intpressureout = between(0, intpressureout, 50*ONE_ATMOSPHERE) - parent.updateUsrDialog() - return 1 - - if(href_list["set_intpressure_in"]) - var/response = input("Set new pressure, in kPa. \[0-[50*ONE_ATMOSPHERE]\]") as num - intpressurein = text2num(response) - intpressurein = between(0, intpressurein, 50*ONE_ATMOSPHERE) - parent.updateUsrDialog() - return 1 - - if(href_list["set_external"]) - var/response = input(usr,"Set new pressure, in kPa. \[0-[50*ONE_ATMOSPHERE]\]") as num - extpressure = text2num(response) - extpressure = between(0, extpressure, 50*ONE_ATMOSPHERE) - parent.updateUsrDialog() - return 1 - - if(href_list["swap_modes"]) - mode = !mode - vent_pump = null//if we don't clear this is could get glitchy, by which I mean not at all, whatever, stay clean - parent.updateUsrDialog() - return 1 - -/datum/automation/set_vent_pressure_checks - name = "Vent Pump: Pressure Checks" - - var/vent_pump = null - var/checks = 1 - var/mode = 0//1 for DP vent, 0 for unary vent -/* -checks bitflags -1 = external -2 = internal in (regular internal for unaries) -4 = internal out (ignored by unaries) -*/ - - - Export() - var/list/json = ..() - json["vent_pump"] = vent_pump - json["checks"] = checks - json["mode"] = mode - return json - - Import(var/list/json) - ..(json) - vent_pump = json["vent_pump"] - checks = text2num(json["checks"]) - mode = text2num(json["mode"]) - - New(var/obj/machinery/computer/general_air_control/atmos_automation/aa) - ..(aa) - - process() - if(vent_pump) - parent.send_signal(list("tag" = vent_pump, "checks" = checks), filter = (mode ? RADIO_ATMOSIA : RADIO_FROM_AIRALARM))//not gonna bother with a sanity check here, there *should* not be any problems - - GetText() - if(mode) - return {"Set dual-port vent pump [fmtString(vent_pump)] pressure checks to: - external [checks&1 ? "Enabled" : "Disabled"] - internal inwards [checks&2 ? "Enabled" : "Disabled"] - internal outwards [checks&4 ? "Enabled" : "Disabled"] - "} - else - return {"Set unary vent pump [fmtString(vent_pump)] pressure checks to: - external: [checks&1 ? "Enabled" : "Disabled"], - internal: [checks&2 ? "Enabled" : "Disabled"] - "} - - Topic(href, href_list) - if(..()) - return 1 - - if(href_list["set_vent_pump"]) - var/list/injector_names=list() - if(mode)//DP vent selection - for(var/obj/machinery/atmospherics/binary/dp_vent_pump/I in world) - if(!isnull(I.id_tag) && I.frequency == parent.frequency) - injector_names|=I.id_tag - else - for(var/obj/machinery/atmospherics/unary/vent_pump/I in GLOB.machines) - if(!isnull(I.id_tag) && I.frequency == parent.frequency) - injector_names|=I.id_tag - vent_pump = input("Select a vent:", "Vent Pumps", vent_pump) as null|anything in injector_names - parent.updateUsrDialog() - return 1 - - if(href_list["swap_modes"]) - mode = !mode - vent_pump = null//if we don't clear this is could get glitchy, by which I mean not at all, whatever, stay clean - if(!mode && checks&4)//disable this bitflag since we're switching to unaries - checks &= ~4 - parent.updateUsrDialog() - return 1 - - if(href_list["togglecheck"]) - var/bitflagvalue = text2num(href_list["togglecheck"]) - if(mode) - if(!(bitflagvalue in list(1, 2, 4))) - return 0 - else if(!(bitflagvalue in list(1, 2))) - return 0 - - if(checks&bitflagvalue)//the bitflag is on ATM - checks &= ~bitflagvalue - else//can't not be off - checks |= bitflagvalue - parent.updateUsrDialog() - return 1 - diff --git a/code/modules/atmos_automation/statements.dm b/code/modules/atmos_automation/statements.dm deleted file mode 100644 index 3f5ed0fb6a7..00000000000 --- a/code/modules/atmos_automation/statements.dm +++ /dev/null @@ -1,457 +0,0 @@ -GLOBAL_LIST_INIT(automation_types, subtypesof(/datum/automation)) - -#define AUTOM_RT_NULL 0 -#define AUTOM_RT_NUM 1 -#define AUTOM_RT_STRING 2 -/datum/automation - // Name of the Automation - var/name="Base Automation" - - // For labelling what shit does on the AAC. - var/label="Unnamed Script" - var/desc ="No Description." - - var/obj/machinery/computer/general_air_control/atmos_automation/parent - var/list/valid_child_returntypes=list() - var/list/datum/automation/children=list() - - var/returntype=AUTOM_RT_NULL - -/datum/automation/New(var/obj/machinery/computer/general_air_control/atmos_automation/aa) - parent=aa - -/datum/automation/proc/GetText() - return "[type] doesn't override GetText()!" - -/datum/automation/proc/OnReset() - return - -/datum/automation/proc/OnRemove() - return - -/datum/automation/process() - return - -/datum/automation/proc/Evaluate() - return 0 - -/datum/automation/proc/Export() - var/list/R = list("type"=type) - - if(initial(label)!=label) - R["label"]=label - - if(initial(desc)!=desc) - R["desc"]=desc - - if(children.len>0) - var/list/C=list() - for(var/datum/automation/A in children) - C += list(A.Export()) - R["children"]=C - - return R - -/datum/automation/proc/unpackChild(var/list/cData) - if(isnull(cData) || !("type" in cData)) - return null - var/Atype=text2path(cData["type"]) - if(!(Atype in GLOB.automation_types)) - return null - var/datum/automation/A = new Atype(parent) - A.Import(cData) - return A - -/datum/automation/proc/unpackChildren(var/list/childList) - . = list() - if(childList.len>0) - for(var/list/cData in childList) - if(isnull(cData) || !("type" in cData)) - . += null - continue - var/Atype=text2path(cData["type"]) - if(!(Atype in GLOB.automation_types)) - continue - var/datum/automation/A = new Atype(parent) - A.Import(cData) - . += A - -/datum/automation/proc/packChildren(var/list/childList) - . = list() - if(childList.len>0) - for(var/datum/automation/A in childList) - if(isnull(A) || !istype(A)) - . += null - continue - . += list(A.Export()) - -/datum/automation/proc/Import(var/list/json) - if("label" in json) - label = json["label"] - - if("desc" in json) - desc = json["desc"] - - if("children" in json) - children = unpackChildren(json["children"]) - -/datum/automation/proc/fmtString(var/str) - if(str==null || str == "") - return "-----" - return str - -/datum/automation/Topic(href,href_list) - if(parent.Topic("src=[parent.UID()]", list("src" = parent)))//dumb hack to check sanity, empty topic shouldn't trigger a 1 on anything but sanity checks - return 1 - - if(href_list["add"]) - var/new_child=selectValidChildFor(usr) - if(!new_child) return 1 - children += new_child - parent.updateUsrDialog() - return 1 - - if(href_list["remove"]) - if(href_list["remove"]=="*") - var/confirm=alert("Are you sure you want to remove ALL automations?","Automations","Yes","No") - if(confirm == "No") return 0 - for(var/datum/automation/A in children) - A.OnRemove() - children.Remove(A) - else - var/datum/automation/A=locate(href_list["remove"]) - if(!A) return 1 - var/confirm=alert("Are you sure you want to remove this automation?","Automations","Yes","No") - if(confirm == "No") return 0 - A.OnRemove() - children.Remove(A) - parent.updateUsrDialog() - return 1 - - if(href_list["reset"]) - if(href_list["reset"]=="*") - for(var/datum/automation/A in children) - A.OnReset() - else - var/datum/automation/A=locate(href_list["reset"]) - if(!A) return 1 - A.OnReset() - parent.updateUsrDialog() - return 1 - return 0 // 1 if handled - -/datum/automation/proc/selectValidChildFor(var/mob/user, var/list/returntypes=valid_child_returntypes) - return parent.selectValidChildFor(src, user, returntypes) - -/////////////////////////////////////////// -// AND -/////////////////////////////////////////// -/datum/automation/and - name = "AND statement" - returntype=AUTOM_RT_NUM - valid_child_returntypes=list(AUTOM_RT_NUM) - - Evaluate() - if(children.len==0) return 0 - for(var/datum/automation/stmt in children) - if(!stmt.Evaluate()) - return 0 - return 1 - - GetText() - var/out="AND (Add)" - if(children.len>0) - out += "" - else - out += "
No statements to evaluate.
" - return out - -/////////////////////////////////////////// -// OR -/////////////////////////////////////////// - -/datum/automation/or - name = "OR statement" - returntype=AUTOM_RT_NUM - valid_child_returntypes=list(AUTOM_RT_NUM) - - Evaluate() - if(children.len==0) return 0 - for(var/datum/automation/stmt in children) - if(stmt.Evaluate()) - return 1 - return 0 - - GetText() - var/out="OR (Add)" - if(children.len>0) - out += "" - else - out += "
No statements to evaluate.
" - return out - -/////////////////////////////////////////// -// if .. then -/////////////////////////////////////////// - -/datum/automation/if_statement - name = "IF statement" - var/datum/automation/condition=null - valid_child_returntypes=list(AUTOM_RT_NULL) - var/list/valid_conditions=list(AUTOM_RT_NUM) - - var/list/children_then=list() - var/list/children_else=list() - - Export() - var/list/R = ..() - - if(children_then.len>0) - R["then"]=packChildren(children_then) - - if(children_else.len>0) - R["else"]=packChildren(children_else) - - if(condition) - R["condition"]=condition.Export() - - return R - - Import(var/list/json) - ..(json) - - if("then" in json) - children_then = unpackChildren(json["then"]) - - if("else" in json) - children_else = unpackChildren(json["else"]) - - if("condition" in json) - condition = unpackChild(json["condition"]) - - GetText() - var/out="IF (SET):
" - if(condition) - out += condition.GetText() - else - out += "Not set" - out += "
" - out += "THEN: (Add)" - if(children_then.len>0) - out += "" - else - out += "
(No statements to run)
" - out += "ELSE: (Add)" - if(children_then.len>0) - out += "" - else - out += "
(No statements to run)
" - return out - - Topic(href,href_list) - if(href_list["add"]) - var/new_child=selectValidChildFor(usr) - if(!new_child) return 1 - switch(href_list["add"]) - if("then") - children_then += new_child - if("else") - children_else += new_child - else - warning("Unknown add value given to [type]/Topic():[__LINE__]: [href]") - return 1 - parent.updateUsrDialog() - return 1 - if(href_list["remove"]) - if(href_list["remove"]=="*") - var/confirm=input("Are you sure you want to remove ALL automations?","Automations","No") in list("Yes","No") - if(confirm == "No") return 0 - for(var/datum/automation/A in children_then) - A.OnRemove() - children_then.Remove(A) - for(var/datum/automation/A in children_else) - A.OnRemove() - children_else.Remove(A) - else - var/datum/automation/A=locate(href_list["remove"]) - if(!A) return 1 - var/confirm=input("Are you sure you want to remove this automation?","Automations","No") in list("Yes","No") - if(confirm == "No") return 0 - A.OnRemove() - switch(href_list["context"]) - if("then") - children_then.Remove(A) - if("else") - children_else.Remove(A) - parent.updateUsrDialog() - return 1 - if(href_list["reset"]) - if(href_list["reset"]=="*") - for(var/datum/automation/A in children_then) - A.OnReset() - for(var/datum/automation/A in children_else) - A.OnReset() - else - var/datum/automation/A=locate(href_list["reset"]) - if(!A) return 1 - A.OnReset() - parent.updateUsrDialog() - return 1 - if(href_list["set_condition"]) - var/new_condition = selectValidChildFor(usr,valid_conditions) - testing("Selected condition: [new_condition]") - if(!new_condition) - return 1 - condition = new_condition - parent.updateUsrDialog() - return 1 - - process() - if(condition) - if(condition.Evaluate()) - for(var/datum/automation/stmt in children_then) - stmt.process() - else - for(var/datum/automation/stmt in children_else) - stmt.process() - -/////////////////////////////////////////// -// compare -/////////////////////////////////////////// - -/datum/automation/compare - name = "comparison" - var/comparator="Greater Than" - returntype=AUTOM_RT_NUM - valid_child_returntypes=list(AUTOM_RT_NUM) - - New(var/obj/machinery/computer/general_air_control/atmos_automation/aa) - ..(aa) - children=list(null,null) - - Export() - var/list/json = ..() - json["cmp"]=comparator - return json - - Import(var/list/json) - ..(json) - comparator = json["cmp"] - - Evaluate() - if(children.len<2) - return 0 - var/datum/automation/d_left =children[1] - var/datum/automation/d_right=children[2] - if(!d_left || !d_right) - return 0 - var/left=d_left.Evaluate() - var/right=d_right.Evaluate() - switch(comparator) - if("Greater Than") - return left>right - if("Greater Than or Equal to") - return left>=right - if("Less Than") - return left(Set Left) (" - if(left==null) - out += "-----" - else - out += left.GetText() - - out += ") is [comparator]: (Set Right) (" - - if(right==null) - out += "-----" - else - out += right.GetText() - out +=")" - return out - - Topic(href,href_list) - if(href_list["set_comparator"]) - comparator = input("Select a comparison operator:", "Compare", "Greater Than") in list("Greater Than","Greater Than or Equal to","Less Than","Less Than or Equal to","Equal to","NOT Equal To") - parent.updateUsrDialog() - return 1 - if(href_list["set_field"]) - var/idx = text2num(href_list["set_field"]) - var/new_child = selectValidChildFor(usr) - if(!new_child) - return 1 - children[idx] = new_child - parent.updateUsrDialog() - return 1 - -/////////////////////////////////////////// -// static value -/////////////////////////////////////////// - -/datum/automation/static_value - name = "Number" - - var/value=0 - - returntype=AUTOM_RT_NUM - - Evaluate() - return value - - Export() - var/list/json = ..() - json["value"]=value - return json - - Import(var/list/json) - ..(json) - value = text2num(json["value"]) - - GetText() - return "[value]" - - Topic(href,href_list) - if(href_list["set_value"]) - value = input("Set a value:", "Static Value", value) as num - parent.updateUsrDialog() - return 1 diff --git a/code/modules/awaymissions/gateway.dm b/code/modules/awaymissions/gateway.dm index d7e298e8c96..0118b0febb4 100644 --- a/code/modules/awaymissions/gateway.dm +++ b/code/modules/awaymissions/gateway.dm @@ -48,7 +48,7 @@ GLOBAL_DATUM_INIT(the_gateway, /obj/machinery/gateway/centerstation, null) ..() update_icon() wait = world.time + config.gateway_delay //+ thirty minutes default - awaygate = locate(/obj/machinery/gateway/centeraway) in world + awaygate = locate(/obj/machinery/gateway/centeraway) in GLOB.machines /obj/machinery/gateway/centerstation/update_density_from_dir() return @@ -103,7 +103,7 @@ GLOBAL_DATUM_INIT(the_gateway, /obj/machinery/gateway/centerstation, null) if(!powered()) return if(!awaygate) - awaygate = locate(/obj/machinery/gateway/centeraway) in world + awaygate = locate(/obj/machinery/gateway/centeraway) in GLOB.machines if(!awaygate) to_chat(user, "Error: No destination found.") return @@ -180,7 +180,7 @@ GLOBAL_DATUM_INIT(the_gateway, /obj/machinery/gateway/centerstation, null) /obj/machinery/gateway/centeraway/Initialize() ..() update_icon() - stationgate = locate(/obj/machinery/gateway/centerstation) in world + stationgate = locate(/obj/machinery/gateway/centerstation) in GLOB.machines /obj/machinery/gateway/centeraway/update_density_from_dir() @@ -219,7 +219,7 @@ GLOBAL_DATUM_INIT(the_gateway, /obj/machinery/gateway/centerstation, null) if(linked.len != 8) return if(!stationgate) - stationgate = locate(/obj/machinery/gateway/centerstation) in world + stationgate = locate(/obj/machinery/gateway/centerstation) in GLOB.machines if(!stationgate) to_chat(user, "Error: No destination found.") return diff --git a/code/modules/awaymissions/mission_code/wildwest.dm b/code/modules/awaymissions/mission_code/wildwest.dm index 5aa3e89192f..b678106df5c 100644 --- a/code/modules/awaymissions/mission_code/wildwest.dm +++ b/code/modules/awaymissions/mission_code/wildwest.dm @@ -117,10 +117,8 @@ if("Peace") to_chat(user, "Whatever alien sentience that the Wish Granter possesses is satisfied with your wish. There is a distant wailing as the last of the Faithless begin to die, then silence.") to_chat(user, "You feel as if you just narrowly avoided a terrible fate...") - for(var/mob/living/simple_animal/hostile/faithless/F in world) - F.health = -10 - F.stat = 2 - F.icon_state = "faithless_dead" + for(var/mob/living/simple_animal/hostile/faithless/F in GLOB.mob_living_list) + F.death() ///////////////Meatgrinder////////////// @@ -220,7 +218,8 @@ to_chat(user, "The communicator buzzes, and you hear the voice again: 'Really? I think not. Get them!'") if(option_threat) to_chat(user, "The communicator buzzes, and you hear the voice again: 'Oh really now?' You hear a clicking sound. 'Team, get back here. We have trouble'. Then the line goes dead.") - for(var/obj/effect/landmark/L in GLOB.landmarks_list) + for(var/thing in GLOB.landmarks_list) + var/obj/effect/landmark/L = thing if(L.name == "wildwest_syndipod") var/obj/spacepod/syndi/P = new /obj/spacepod/syndi(get_turf(L)) P.name = "Syndi Recon Pod" diff --git a/code/modules/awaymissions/zlevel.dm b/code/modules/awaymissions/zlevel.dm index 3b31a8bbcfc..c582508ace1 100644 --- a/code/modules/awaymissions/zlevel.dm +++ b/code/modules/awaymissions/zlevel.dm @@ -56,7 +56,8 @@ GLOBAL_LIST_INIT(potentialRandomZlevels, generateMapList(filename = "config/away GLOB.space_manager.remove_dirt(zlev) log_world(" Away mission loaded: [map]") - for(var/obj/effect/landmark/L in GLOB.landmarks_list) + for(var/thing in GLOB.landmarks_list) + var/obj/effect/landmark/L = thing if(L.name != "awaystart") continue GLOB.awaydestinations.Add(L) @@ -89,7 +90,8 @@ GLOBAL_LIST_INIT(potentialRandomZlevels, generateMapList(filename = "config/away //map_transition_config.Add(AWAY_MISSION_LIST) - for(var/obj/effect/landmark/L in GLOB.landmarks_list) + for(var/thing in GLOB.landmarks_list) + var/obj/effect/landmark/L = thing if(L.name != "awaystart") continue GLOB.awaydestinations.Add(L) diff --git a/code/modules/buildmode/bm_mode.dm b/code/modules/buildmode/bm_mode.dm index 0169df7cd62..bf3b52a20ce 100644 --- a/code/modules/buildmode/bm_mode.dm +++ b/code/modules/buildmode/bm_mode.dm @@ -28,8 +28,8 @@ return "buildmode_[key]" /datum/buildmode_mode/proc/show_help(mob/user) - CRASH("No help defined, yell at a coder") to_chat(user, "There is no help defined for this mode, this is a bug.") + CRASH("No help defined, yell at a coder") /datum/buildmode_mode/proc/change_settings(mob/user) to_chat(user, "There is no configuration available for this mode") diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm index 7b3133c0103..0b74b7132fd 100644 --- a/code/modules/client/preference/preferences.dm +++ b/code/modules/client/preference/preferences.dm @@ -54,7 +54,6 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts return C.player_age else return max(0, days - C.player_age) - return 0 #define MAX_SAVE_SLOTS 30 // Save slots for regular players #define MAX_SAVE_SLOTS_MEMBER 30 // Save slots for BYOND members diff --git a/code/modules/economy/utils.dm b/code/modules/economy/utils.dm index f7d6992e31f..4d7273cd719 100644 --- a/code/modules/economy/utils.dm +++ b/code/modules/economy/utils.dm @@ -5,7 +5,7 @@ //////////////////////// /proc/get_money_account(var/account_number, var/from_z=-1) - for(var/obj/machinery/computer/account_database/DB in world) + for(var/obj/machinery/computer/account_database/DB in GLOB.machines) if(from_z > -1 && DB.z != from_z) continue if((DB.stat & NOPOWER) || !DB.activated ) continue var/datum/money_account/acct = DB.get_account(account_number) diff --git a/code/modules/events/alien_infestation.dm b/code/modules/events/alien_infestation.dm index 5e39295113c..8c01d5c7cc2 100644 --- a/code/modules/events/alien_infestation.dm +++ b/code/modules/events/alien_infestation.dm @@ -17,7 +17,7 @@ playercount = length(GLOB.clients)//grab playercount when event starts not when game starts if(playercount >= highpop_trigger) //spawn with 4 if highpop spawncount = 4 - for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world) + for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in SSair.atmos_machinery) if(is_station_level(temp_vent.loc.z) && !temp_vent.welded) if(temp_vent.parent.other_atmosmch.len > 50) //Stops Aliens getting stuck in small networks. See: Security, Virology vents += temp_vent diff --git a/code/modules/events/anomaly_bluespace.dm b/code/modules/events/anomaly_bluespace.dm index 2924effa0de..929612cf6f9 100644 --- a/code/modules/events/anomaly_bluespace.dm +++ b/code/modules/events/anomaly_bluespace.dm @@ -18,7 +18,7 @@ // Calculate new position (searches through beacons in world) var/obj/item/radio/beacon/chosen var/list/possible = list() - for(var/obj/item/radio/beacon/W in world) + for(var/obj/item/radio/beacon/W in GLOB.global_radios) if(!is_station_level(W.z)) continue possible += W diff --git a/code/modules/events/apc_overload.dm b/code/modules/events/apc_overload.dm index a773e71a173..13cabe81b3c 100644 --- a/code/modules/events/apc_overload.dm +++ b/code/modules/events/apc_overload.dm @@ -36,7 +36,8 @@ // break APC_BREAK_PROBABILITY% of all of the APCs on the station var/affected_apc_count = 0 - for(var/obj/machinery/power/apc/C in GLOB.apcs) + for(var/thing in GLOB.apcs) + var/obj/machinery/power/apc/C = thing // skip any APCs that are too critical to break var/area/current_area = get_area(C) if((current_area.type in skipped_areas_apc) || !is_station_level(C.z)) diff --git a/code/modules/events/apc_short.dm b/code/modules/events/apc_short.dm index b128fe6c2e9..d2fe04dcc5d 100644 --- a/code/modules/events/apc_short.dm +++ b/code/modules/events/apc_short.dm @@ -36,7 +36,8 @@ // break APC_BREAK_PROBABILITY% of all of the APCs on the station var/affected_apc_count = 0 - for(var/obj/machinery/power/apc/C in GLOB.apcs) + for(var/thing in GLOB.apcs) + var/obj/machinery/power/apc/C = thing // skip any APCs that are too critical to disable var/area/current_area = get_area(C) if((current_area.type in skipped_areas_apc) || !is_station_level(C.z)) diff --git a/code/modules/events/carp_migration.dm b/code/modules/events/carp_migration.dm index fb12a258c2d..fb02033b802 100644 --- a/code/modules/events/carp_migration.dm +++ b/code/modules/events/carp_migration.dm @@ -30,7 +30,8 @@ /datum/event/carp_migration/proc/spawn_fish(num_groups, group_size_min = 3, group_size_max = 5) var/list/spawn_locations = list() - for(var/obj/effect/landmark/C in GLOB.landmarks_list) + for(var/thing in GLOB.landmarks_list) + var/obj/effect/landmark/C = thing if(C.name == "carpspawn") spawn_locations.Add(C.loc) spawn_locations = shuffle(spawn_locations) diff --git a/code/modules/events/electrical_storm.dm b/code/modules/events/electrical_storm.dm index 755e2e2d47a..7304469f408 100644 --- a/code/modules/events/electrical_storm.dm +++ b/code/modules/events/electrical_storm.dm @@ -10,7 +10,8 @@ for(var/i=1, i <= lightsoutAmount, i++) var/list/possibleEpicentres = list() - for(var/obj/effect/landmark/newEpicentre in GLOB.landmarks_list) + for(var/thing in GLOB.landmarks_list) + var/obj/effect/landmark/newEpicentre = thing if(newEpicentre.name == "lightsout" && !(newEpicentre in epicentreList)) possibleEpicentres += newEpicentre if(possibleEpicentres.len) @@ -21,7 +22,8 @@ if(!epicentreList.len) return - for(var/obj/effect/landmark/epicentre in epicentreList) - for(var/obj/machinery/power/apc/apc in range(epicentre,lightsoutRange)) + for(var/thing in epicentreList) + var/obj/effect/landmark/epicentre = thing + for(var/obj/machinery/power/apc/apc in range(epicentre, lightsoutRange)) apc.overload_lighting() diff --git a/code/modules/events/money_hacker.dm b/code/modules/events/money_hacker.dm index 928b35e84ea..f26c12f5f7d 100644 --- a/code/modules/events/money_hacker.dm +++ b/code/modules/events/money_hacker.dm @@ -23,7 +23,7 @@ GLOBAL_VAR_INIT(account_hack_attempted, 0) Notifications will be sent as updates occur.
" var/my_department = "[station_name()] firewall subroutines" - for(var/obj/machinery/message_server/MS in world) + for(var/obj/machinery/message_server/MS in GLOB.machines) if(!MS.active) continue MS.send_rc_message("Head of Personnel's Desk", my_department, message, "", "", 2) @@ -64,7 +64,7 @@ GLOBAL_VAR_INIT(account_hack_attempted, 0) var/my_department = "[station_name()] firewall subroutines" - for(var/obj/machinery/message_server/MS in world) + for(var/obj/machinery/message_server/MS in GLOB.machines) if(!MS.active) continue MS.send_rc_message("Head of Personnel's Desk", my_department, message, "", "", 2) diff --git a/code/modules/events/prison_break.dm b/code/modules/events/prison_break.dm index 35c976fa2f9..748d39f2080 100644 --- a/code/modules/events/prison_break.dm +++ b/code/modules/events/prison_break.dm @@ -47,7 +47,7 @@ if(areas && areas.len > 0) var/my_department = "[station_name()] firewall subroutines" var/rc_message = "An unknown malicious program has been detected in the [english_list(areaName)] lighting and airlock control systems at [station_time_timestamp()]. Systems will be fully compromised within approximately three minutes. Direct intervention is required immediately.
" - for(var/obj/machinery/message_server/MS in world) + for(var/obj/machinery/message_server/MS in GLOB.machines) MS.send_rc_message("Engineering", my_department, rc_message, "", "", 2) for(var/mob/living/silicon/ai/A in GLOB.player_list) to_chat(A, "Malicious program detected in the [english_list(areaName)] lighting and airlock control systems by [my_department].") diff --git a/code/modules/events/rogue_drones.dm b/code/modules/events/rogue_drones.dm index e2a7dc739c3..02fa69b7c3e 100644 --- a/code/modules/events/rogue_drones.dm +++ b/code/modules/events/rogue_drones.dm @@ -6,7 +6,8 @@ /datum/event/rogue_drone/start() //spawn them at the same place as carp var/list/possible_spawns = list() - for(var/obj/effect/landmark/C in GLOB.landmarks_list) + for(var/thing in GLOB.landmarks_list) + var/obj/effect/landmark/C = thing if(C.name == "carpspawn") possible_spawns.Add(C) diff --git a/code/modules/events/slaughterevent.dm b/code/modules/events/slaughterevent.dm index 999303bf069..ac265adb420 100644 --- a/code/modules/events/slaughterevent.dm +++ b/code/modules/events/slaughterevent.dm @@ -16,13 +16,15 @@ var/datum/mind/player_mind = new /datum/mind(key_of_slaughter) player_mind.active = 1 var/list/spawn_locs = list() - for(var/obj/effect/landmark/L in GLOB.landmarks_list) + for(var/thing in GLOB.landmarks_list) + var/obj/effect/landmark/L = thing if(isturf(L.loc)) switch(L.name) if("revenantspawn") spawn_locs += L.loc if(!spawn_locs) //If we can't find any revenant spawns, try the carp spawns - for(var/obj/effect/landmark/L in GLOB.landmarks_list) + for(var/thing in GLOB.landmarks_list) + var/obj/effect/landmark/L = thing if(isturf(L.loc)) switch(L.name) if("carpspawn") diff --git a/code/modules/events/spider_infestation.dm b/code/modules/events/spider_infestation.dm index e09e1efb705..694f8e98c89 100644 --- a/code/modules/events/spider_infestation.dm +++ b/code/modules/events/spider_infestation.dm @@ -15,7 +15,7 @@ GLOBAL_VAR_INIT(sent_spiders_to_station, 0) /datum/event/spider_infestation/start() var/list/vents = list() - for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world) + for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in SSair.atmos_machinery) if(is_station_level(temp_vent.loc.z) && !temp_vent.welded) if(temp_vent.parent.other_atmosmch.len > 50) vents += temp_vent diff --git a/code/modules/events/traders.dm b/code/modules/events/traders.dm index 4159885e993..0beeb3691e2 100644 --- a/code/modules/events/traders.dm +++ b/code/modules/events/traders.dm @@ -24,7 +24,8 @@ GLOBAL_LIST_INIT(unused_trade_stations, list("sol")) return var/list/spawnlocs = list() - for(var/obj/effect/landmark/landmark in GLOB.landmarks_list) + for(var/thing in GLOB.landmarks_list) + var/obj/effect/landmark/landmark = thing if(landmark.name == "traderstart_[station]") spawnlocs += get_turf(landmark) if(!spawnlocs.len) diff --git a/code/modules/food_and_drinks/drinks/bottler/bottler.dm b/code/modules/food_and_drinks/drinks/bottler/bottler.dm index b1667fc6a00..d7f1736bb4a 100644 --- a/code/modules/food_and_drinks/drinks/bottler/bottler.dm +++ b/code/modules/food_and_drinks/drinks/bottler/bottler.dm @@ -82,7 +82,6 @@ else //If it doesn't qualify in the above checks, we don't want it. Inform the person so they (ideally) stop trying to put the nuke disc in. to_chat(user, "You aren't sure this is able to be processed by the machine.") return 0 - return ..() /obj/machinery/bottler/wrench_act(mob/user, obj/item/I) . = TRUE diff --git a/code/modules/food_and_drinks/food/foods/seafood.dm b/code/modules/food_and_drinks/food/foods/seafood.dm index b74ab0c3149..d4134ebe516 100644 --- a/code/modules/food_and_drinks/food/foods/seafood.dm +++ b/code/modules/food_and_drinks/food/foods/seafood.dm @@ -129,7 +129,7 @@ tastes = list("shrimp" = 1, "batter" = 1) /obj/item/reagent_containers/food/snacks/sliceable/Ebi_maki - name = "ebi makiroll" + name = "ebi maki roll" desc = "A large unsliced roll of Ebi Sushi." icon = 'icons/obj/food/seafood.dmi' icon_state = "Ebi_maki" @@ -149,7 +149,7 @@ tastes = list("shrimp" = 1, "rice" = 1, "seaweed" = 1) /obj/item/reagent_containers/food/snacks/sliceable/Ikura_maki - name = "ikura makiroll" + name = "ikura maki roll" desc = "A large unsliced roll of Ikura Sushi." icon = 'icons/obj/food/seafood.dmi' icon_state = "Ikura_maki" @@ -169,7 +169,7 @@ tastes = list("salmon roe" = 1, "rice" = 1, "seaweed" = 1) /obj/item/reagent_containers/food/snacks/sliceable/Sake_maki - name = "sake makiroll" + name = "sake maki roll" desc = "A large unsliced roll of Sake Sushi." icon = 'icons/obj/food/seafood.dmi' icon_state = "Sake_maki" @@ -189,7 +189,7 @@ tastes = list("raw salmon" = 1, "rice" = 1, "seaweed" = 1) /obj/item/reagent_containers/food/snacks/sliceable/SmokedSalmon_maki - name = "smoked salmon makiroll" + name = "smoked salmon maki roll" desc = "A large unsliced roll of Smoked Salmon Sushi." icon = 'icons/obj/food/seafood.dmi' icon_state = "SmokedSalmon_maki" @@ -209,7 +209,7 @@ tastes = list("smoked salmon" = 1, "rice" = 1, "seaweed" = 1) /obj/item/reagent_containers/food/snacks/sliceable/Tamago_maki - name = "tamago makiroll" + name = "tamago maki roll" desc = "A large unsliced roll of Tamago Sushi." icon = 'icons/obj/food/seafood.dmi' icon_state = "Tamago_maki" @@ -229,7 +229,7 @@ tastes = list("egg" = 1, "rice" = 1, "seaweed" = 1) /obj/item/reagent_containers/food/snacks/sliceable/Inari_maki - name = "inari makiroll" + name = "inari maki roll" desc = "A large unsliced roll of Inari Sushi." icon = 'icons/obj/food/seafood.dmi' icon_state = "Inari_maki" @@ -249,7 +249,7 @@ tastes = list("fried tofu" = 1, "rice" = 1, "seaweed" = 1) /obj/item/reagent_containers/food/snacks/sliceable/Masago_maki - name = "masago makiroll" + name = "masago maki roll" desc = "A large unsliced roll of Masago Sushi." icon = 'icons/obj/food/seafood.dmi' icon_state = "Masago_maki" @@ -269,7 +269,7 @@ tastes = list("goldfish roe" = 1, "rice" = 1, "seaweed" = 1) /obj/item/reagent_containers/food/snacks/sliceable/Tobiko_maki - name = "tobiko makiroll" + name = "tobiko maki roll" desc = "A large unsliced roll of Tobkio Sushi." icon = 'icons/obj/food/seafood.dmi' icon_state = "Tobiko_maki" @@ -289,7 +289,7 @@ tastes = list("shark roe" = 1, "rice" = 1, "seaweed" = 1) /obj/item/reagent_containers/food/snacks/sliceable/TobikoEgg_maki - name = "tobiko and egg makiroll" + name = "tobiko and egg maki roll" desc = "A large unsliced roll of Tobkio and Egg Sushi." icon = 'icons/obj/food/seafood.dmi' icon_state = "TobikoEgg_maki" @@ -309,7 +309,7 @@ tastes = list("shark roe" = 1, "rice" = 1, "egg" = 1, "seaweed" = 1) /obj/item/reagent_containers/food/snacks/sliceable/Tai_maki - name = "tai makiroll" + name = "tai maki roll" desc = "A large unsliced roll of Tai Sushi." icon = 'icons/obj/food/seafood.dmi' icon_state = "Tai_maki" diff --git a/code/modules/food_and_drinks/kitchen_machinery/processor.dm b/code/modules/food_and_drinks/kitchen_machinery/processor.dm index 61f887e44bc..6891ab578bc 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/processor.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/processor.dm @@ -175,7 +175,7 @@ if(default_unfasten_wrench(user, O)) return - default_deconstruction_crowbar(user, O) + default_deconstruction_crowbar(user, O) var/obj/item/what = O diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm index 756d2cf77ef..346b78e5b26 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm @@ -602,7 +602,7 @@ if(stat & (NOPOWER|BROKEN)) return 0 if(usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) - if(!allowed(usr) && !emagged && locked != -1 && href_list["vend"]) + if(!allowed(usr) && !emagged && locked != -1 && scan_id && href_list["vend"]) to_chat(usr, "Access denied.") SSnanoui.update_uis(src) return 0 diff --git a/code/modules/food_and_drinks/recipes/tablecraft/recipes_table.dm b/code/modules/food_and_drinks/recipes/tablecraft/recipes_table.dm index db7774fa41f..1aa33cab232 100644 --- a/code/modules/food_and_drinks/recipes/tablecraft/recipes_table.dm +++ b/code/modules/food_and_drinks/recipes/tablecraft/recipes_table.dm @@ -90,7 +90,7 @@ subcategory = CAT_SUSHI /datum/crafting_recipe/Ebi_maki - name = "Ebi Makiroll" + name = "Ebi Maki Roll" reqs = list( /obj/item/reagent_containers/food/snacks/boiledrice = 1, /obj/item/reagent_containers/food/snacks/boiled_shrimp = 4, @@ -111,7 +111,7 @@ subcategory = CAT_SUSHI /datum/crafting_recipe/Ikura_maki - name = "Ikura Makiroll" + name = "Ikura Maki Roll" reqs = list( /obj/item/reagent_containers/food/snacks/boiledrice = 1, /obj/item/fish_eggs/salmon = 4, @@ -132,7 +132,7 @@ subcategory = CAT_SUSHI /datum/crafting_recipe/Inari_maki - name = "Inari Makiroll" + name = "Inari Maki Roll" reqs = list( /obj/item/reagent_containers/food/snacks/boiledrice = 1, /obj/item/reagent_containers/food/snacks/fried_tofu = 4, @@ -153,7 +153,7 @@ subcategory = CAT_SUSHI /datum/crafting_recipe/Sake_maki - name = "Sake Makiroll" + name = "Sake Maki Roll" reqs = list( /obj/item/reagent_containers/food/snacks/boiledrice = 1, /obj/item/reagent_containers/food/snacks/salmonmeat = 4, @@ -174,7 +174,7 @@ subcategory = CAT_SUSHI /datum/crafting_recipe/SmokedSalmon_maki - name = "Smoked Salmon Makiroll" + name = "Smoked Salmon Maki Roll" reqs = list( /obj/item/reagent_containers/food/snacks/boiledrice = 1, /obj/item/reagent_containers/food/snacks/salmonsteak = 4, @@ -195,7 +195,7 @@ subcategory = CAT_SUSHI /datum/crafting_recipe/Masago_maki - name = "Masago Makiroll" + name = "Masago Maki Roll" reqs = list( /obj/item/reagent_containers/food/snacks/boiledrice = 1, /obj/item/fish_eggs/goldfish = 4, @@ -216,7 +216,7 @@ subcategory = CAT_SUSHI /datum/crafting_recipe/Tobiko_maki - name = "Tobiko Makiroll" + name = "Tobiko Maki Roll" reqs = list( /obj/item/reagent_containers/food/snacks/boiledrice = 1, /obj/item/fish_eggs/shark = 4, @@ -237,18 +237,7 @@ subcategory = CAT_SUSHI /datum/crafting_recipe/TobikoEgg_maki - name = "Tobiko Makiroll" - reqs = list( - /obj/item/reagent_containers/food/snacks/sushi_Tobiko = 4, - /obj/item/reagent_containers/food/snacks/egg = 4, - ) - pathtools = list(/obj/item/kitchen/sushimat) - result = /obj/item/reagent_containers/food/snacks/sliceable/TobikoEgg_maki - category = CAT_FOOD - subcategory = CAT_SUSHI - -/datum/crafting_recipe/Sake_maki - name = "Sake Makiroll" + name = "Tobiko and Egg Maki Roll" reqs = list( /obj/item/reagent_containers/food/snacks/sushi_Tobiko = 4, /obj/item/reagent_containers/food/snacks/egg = 4, @@ -269,7 +258,7 @@ subcategory = CAT_SUSHI /datum/crafting_recipe/Tai_maki - name = "Tai Makiroll" + name = "Tai Maki Roll" reqs = list( /obj/item/reagent_containers/food/snacks/boiledrice = 1, /obj/item/reagent_containers/food/snacks/catfishmeat = 4, diff --git a/code/modules/lighting/lighting_corner.dm b/code/modules/lighting/lighting_corner.dm index bc521114d56..57302b5b168 100644 --- a/code/modules/lighting/lighting_corner.dm +++ b/code/modules/lighting/lighting_corner.dm @@ -25,7 +25,7 @@ GLOBAL_LIST_INIT(LIGHTING_CORNER_DIAGONAL, list(NORTHEAST, SOUTHEAST, SOUTHWEST, var/cache_b = LIGHTING_SOFT_THRESHOLD var/cache_mx = 0 -/datum/lighting_corner/New(var/turf/new_turf, var/diagonal) +/datum/lighting_corner/New(turf/new_turf, diagonal) . = ..() masters = list() masters[new_turf] = turn(diagonal, 180) @@ -79,15 +79,16 @@ GLOBAL_LIST_INIT(LIGHTING_CORNER_DIAGONAL, list(NORTHEAST, SOUTHEAST, SOUTHWEST, active = FALSE var/turf/T var/thing - for (thing in masters) + for(thing in masters) T = thing if(T.lighting_object) active = TRUE + return // God that was a mess, now to do the rest of the corner code! Hooray! -/datum/lighting_corner/proc/update_lumcount(var/delta_r, var/delta_g, var/delta_b) +/datum/lighting_corner/proc/update_lumcount(delta_r, delta_g, delta_b) - if((abs(delta_r)+abs(delta_g)+abs(delta_b)) == 0) + if(!(delta_r || delta_g || delta_b)) // 0 is falsey ok return lum_r += delta_r @@ -96,10 +97,10 @@ GLOBAL_LIST_INIT(LIGHTING_CORNER_DIAGONAL, list(NORTHEAST, SOUTHEAST, SOUTHWEST, if(!needs_update) needs_update = TRUE - GLOB.lighting_update_corners += src + SSlighting.corners_queue += src /datum/lighting_corner/proc/update_objects() - // Cache these values a head of time so 4 individual lighting objects don't all calculate them individually. + // Cache these values ahead of time so 4 individual lighting objects don't all calculate them individually. var/lum_r = src.lum_r var/lum_g = src.lum_g var/lum_b = src.lum_b @@ -122,19 +123,18 @@ GLOBAL_LIST_INIT(LIGHTING_CORNER_DIAGONAL, list(NORTHEAST, SOUTHEAST, SOUTHWEST, #endif cache_mx = round(mx, LIGHTING_ROUND_VALUE) - for (var/TT in masters) + for(var/TT in masters) var/turf/T = TT - if(T.lighting_object) - if(!T.lighting_object.needs_update) - T.lighting_object.needs_update = TRUE - GLOB.lighting_update_objects += T.lighting_object + if(T.lighting_object && !T.lighting_object.needs_update) + T.lighting_object.needs_update = TRUE + SSlighting.objects_queue += T.lighting_object /datum/lighting_corner/dummy/New() return -/datum/lighting_corner/Destroy(var/force) +/datum/lighting_corner/Destroy(force) if(!force) return QDEL_HINT_LETMELIVE diff --git a/code/modules/lighting/lighting_object.dm b/code/modules/lighting/lighting_object.dm index ea3e954fa6e..168a95c07f2 100644 --- a/code/modules/lighting/lighting_object.dm +++ b/code/modules/lighting/lighting_object.dm @@ -5,7 +5,7 @@ icon = LIGHTING_ICON icon_state = "transparent" - color = LIGHTING_BASE_MATRIX + color = null //we manually set color in init instead plane = LIGHTING_PLANE mouse_opacity = MOUSE_OPACITY_TRANSPARENT layer = LIGHTING_LAYER @@ -18,6 +18,9 @@ /atom/movable/lighting_object/Initialize(mapload) . = ..() verbs.Cut() + //We avoid setting this in the base as if we do then the parent atom handling will add_atom_color it and that + //is totally unsuitable for this object, as we are always changing it's colour manually + color = LIGHTING_BASE_MATRIX myturf = loc if(myturf.lighting_object) @@ -29,11 +32,11 @@ S.update_starlight() needs_update = TRUE - GLOB.lighting_update_objects += src + SSlighting.objects_queue += src -/atom/movable/lighting_object/Destroy(var/force) +/atom/movable/lighting_object/Destroy(force) if(force) - GLOB.lighting_update_objects -= src + SSlighting.objects_queue -= src if(loc != myturf) var/turf/oldturf = get_turf(myturf) var/turf/newturf = get_turf(loc) @@ -143,6 +146,6 @@ return // Override here to prevent things accidentally moving around overlays. -/atom/movable/lighting_object/forceMove(atom/destination, var/no_tp=FALSE, var/harderforce = FALSE) +/atom/movable/lighting_object/forceMove(atom/destination, no_tp = FALSE, harderforce = FALSE) if(harderforce) . = ..() diff --git a/code/modules/lighting/lighting_source.dm b/code/modules/lighting/lighting_source.dm index fc87a855dc4..7b0b782bdca 100644 --- a/code/modules/lighting/lighting_source.dm +++ b/code/modules/lighting/lighting_source.dm @@ -29,7 +29,7 @@ var/needs_update = LIGHTING_NO_UPDATE // Whether we are queued for an update. -/datum/light_source/New(var/atom/owner, var/atom/top) +/datum/light_source/New(atom/owner, atom/top) source_atom = owner // Set our new owner. LAZYADD(source_atom.light_sources, src) top_atom = top @@ -56,7 +56,7 @@ LAZYREMOVE(top_atom.light_sources, src) if(needs_update) - GLOB.lighting_update_lights -= src + SSlighting.sources_queue -= src . = ..() @@ -65,13 +65,13 @@ // Actually that'd be great if you could! #define EFFECT_UPDATE(level) \ if(needs_update == LIGHTING_NO_UPDATE) \ - GLOB.lighting_update_lights += src; \ + SSlighting.sources_queue += src; \ if(needs_update < level) \ needs_update = level; \ // This proc will cause the light source to update the top atom, and add itself to the update queue. -/datum/light_source/proc/update(var/atom/new_top_atom) +/datum/light_source/proc/update(atom/new_top_atom) // This top atom is different. if(new_top_atom && new_top_atom != top_atom) if(top_atom != source_atom && top_atom.light_sources) // Remove ourselves from the light sources of that top atom. @@ -141,7 +141,7 @@ effect_str = null -/datum/light_source/proc/recalc_corner(var/datum/lighting_corner/C) +/datum/light_source/proc/recalc_corner(datum/lighting_corner/C) LAZYINITLIST(effect_str) if(effect_str[C]) // Already have one. REMOVE_CORNER(C) diff --git a/code/modules/lighting/lighting_turf.dm b/code/modules/lighting/lighting_turf.dm index f368ff5ac4b..5483eebf4e1 100644 --- a/code/modules/lighting/lighting_turf.dm +++ b/code/modules/lighting/lighting_turf.dm @@ -57,7 +57,7 @@ C.active = TRUE // Used to get a scaled lumcount. -/turf/proc/get_lumcount(var/minlum = 0, var/maxlum = 1) +/turf/proc/get_lumcount(minlum = 0, maxlum = 1) if(!lighting_object) return 1 @@ -102,7 +102,7 @@ recalc_atom_opacity() // Make sure to do this before reconsider_lights(), incase we're on instant updates. reconsider_lights() -/turf/proc/change_area(var/area/old_area, var/area/new_area) +/turf/proc/change_area(area/old_area, area/new_area) if(SSlighting.initialized) if(new_area.dynamic_lighting != old_area.dynamic_lighting) if(new_area.dynamic_lighting) diff --git a/code/modules/logic/converter.dm b/code/modules/logic/converter.dm deleted file mode 100644 index c54e3fe4882..00000000000 --- a/code/modules/logic/converter.dm +++ /dev/null @@ -1,143 +0,0 @@ - -////////////////////////////////// -// Converter Gate // -////////////////////////////////// - -/* - This gate is special enough to warrant its own file, as it overrides a lot of the logic_gate procs as well as adds a new one. - - CONVERT Gates convert signaler and logic signals, to allow logic gates to actually be used in tandem with assemblies and station equipment like doors. - - While technically a mono-input device, the input and output are actually completely different types of signals, and thus incompatible without this gate. - - A signaler must be attached manually before the gate is fully functional, and will retain any frequency and code settings it had when attached. - - You can adjust these settings through a link in the multitool menu, but the receiving mode is automatically controlled by the converter. - - While attached, the ability to manually send the signal on the signaler through its menu is also disabled, to avoid messing up the logic system. -*/ - -//CONVERT Gate -/obj/machinery/logic_gate/convert - name = "CONVERT Gate" - desc = "Converts signals between radio and logic types, allowing for signaller input/output from logic systems." - icon_state = "logic_convert" - mono_input = 1 - - var/logic_output = 0 //When set to 1, the logic signal is the output. When set to 0, the logic signal is the input. - var/obj/item/assembly/signaler/attached_signaler = null - -/obj/machinery/logic_gate/convert/handle_logic() - output_state = input1_state - return - -/obj/machinery/logic_gate/convert/attackby(obj/item/O, mob/user, params) - if(tamperproof) //Extra precaution to avoid people attaching/removing signalers from tamperproofed converters - return - if(istype(O, /obj/item/assembly/signaler)) - var/obj/item/assembly/signaler/S = O - if(S.secured) - to_chat(user, "The [S] is already secured.") - return - if(attached_signaler) - to_chat(user, "There is already a device attached, remove it first.") - return - user.unEquip(S) - S.forceMove(src) - S.holder = src - S.toggle_secure() - if(logic_output) //Make sure we are set to receive if the converter is set to output logic, and send if the converter is set to accept logic input - S.receiving = 1 - else - S.receiving = 0 - attached_signaler = S - to_chat(user, "You attach \the [S] to the I/O connection port and secure it.") - return - if(attached_signaler && istype(O, /obj/item/screwdriver)) //Makes sure we remove the attached signaler before we can open up and deconstruct the machine - var/obj/item/assembly/signaler/S = attached_signaler - attached_signaler = null - S.forceMove(get_turf(src)) - S.holder = null - S.toggle_secure() - to_chat(user, "You unsecure and detach \the [S] from the I/O connection port.") - return - return ..() - -/obj/machinery/logic_gate/convert/multitool_menu(var/mob/user, var/obj/item/multitool/P) - var/logic_state_string - var/menu_contents = {" -
- "} - if(logic_output) - switch(output_state) - if(LOGIC_OFF) - logic_state_string = "OFF" - if(LOGIC_ON) - logic_state_string = "ON" - if(LOGIC_FLICKER) - logic_state_string = "FLICKER" - else - logic_state_string = "ERROR: UNKNOWN STATE" - menu_contents += {" -
Output: [format_tag("ID Tag","output_id_tag")]
-
Output State: [logic_state_string]
- "} - else - switch(input1_state) - if(LOGIC_OFF) - logic_state_string = "OFF" - if(LOGIC_ON) - logic_state_string = "ON" - if(LOGIC_FLICKER) - logic_state_string = "FLICKER" - else - logic_state_string = "ERROR: UNKNOWN STATE" - menu_contents += {" -
Input: [format_tag("ID Tag","input1_id_tag")]
-
Input State: [logic_state_string]
- "} - menu_contents += {" -
Logic Signal Designation: [logic_output ? "Output" : "Input"]
- "} - if(attached_signaler) - menu_contents += "
Adjust Signaler Settings
" - else - menu_contents += "
NO SIGNALER ATTACHED!
" - menu_contents += {" -
- "} - return menu_contents - -/obj/machinery/logic_gate/convert/multitool_topic(var/mob/user,var/list/href_list,var/obj/O) - ..() - if("toggle_logic" in href_list) - logic_output = !logic_output - if(attached_signaler) //If we have a signaler attached, make sure we update it to send/receive when we change the logic signal desgination - if(logic_output) - attached_signaler.receiving = 1 - else - attached_signaler.receiving = 0 - if(("adjust_signaler" in href_list) && attached_signaler) //Make sure that we have a signaler attached to handle this one, otherwise ignore this command - attached_signaler.interact(user, 1) - update_multitool_menu(user) - -/obj/machinery/logic_gate/convert/receive_signal(datum/signal/signal, receive_method, receive_param) - if(logic_output) - if(attached_signaler) - attached_signaler.receive_signal(signal) - return - else - ..() - -/obj/machinery/logic_gate/convert/handle_output() - if(logic_output) - ..() - else - if(attached_signaler && (output_state == LOGIC_ON || output_state == LOGIC_FLICKER)) - attached_signaler.signal() - return - -/obj/machinery/logic_gate/convert/proc/process_activation(var/obj/item/D) - if(!logic_output) //Don't bother if our input is a logic signal - return - if(D == attached_signaler) //Ignore if we somehow got called by a device that isn't what we have attached - input1_state = LOGIC_FLICKER - spawn(LOGIC_FLICKER_TIME) - if(input1_state == LOGIC_FLICKER) - input1_state = LOGIC_OFF - return diff --git a/code/modules/logic/dual_input.dm b/code/modules/logic/dual_input.dm deleted file mode 100644 index b8f915ff46d..00000000000 --- a/code/modules/logic/dual_input.dm +++ /dev/null @@ -1,100 +0,0 @@ - -////////////////////////////////// -// Dual-Input Gates // -////////////////////////////////// - - -// OR Gate -/obj/machinery/logic_gate/or - name = "OR Gate" - desc = "Outputs ON when at least one input is ON." - icon_state = "logic_or" - -/obj/machinery/logic_gate/or/handle_logic() - if(input1_state == LOGIC_ON || input1_state == LOGIC_FLICKER || input2_state == LOGIC_ON || input2_state == LOGIC_FLICKER) - if(input1_state == LOGIC_ON || input2_state == LOGIC_ON) //continuous signal takes priority in determining what to output - output_state = LOGIC_ON - else - output_state = LOGIC_FLICKER - else //Both inputs were off, so input is off - output_state = LOGIC_OFF - return - -// AND Gate -/obj/machinery/logic_gate/and - name = "AND Gate" - desc = "Outputs ON only when both inputs are ON." - icon_state = "logic_and" - -/obj/machinery/logic_gate/and/handle_logic() - if((input1_state == LOGIC_ON || input1_state == LOGIC_FLICKER) && (input2_state == LOGIC_ON || input2_state == LOGIC_FLICKER)) - if(input1_state == LOGIC_ON && input2_state == LOGIC_ON) //only output a continuous signal when both inputs are continuous signals - output_state = LOGIC_ON - else - output_state = LOGIC_FLICKER - else //At least one input was off, so output is off - output_state = LOGIC_OFF - return - -// NAND Gate -/obj/machinery/logic_gate/nand - name = "NAND Gate" - desc = "Outputs OFF only when both inputs are ON." - output_state = LOGIC_ON - icon_state = "logic_nand" - -/obj/machinery/logic_gate/nand/handle_logic() - if((input1_state == LOGIC_ON || input1_state == LOGIC_FLICKER) && (input2_state == LOGIC_ON || input2_state == LOGIC_FLICKER)) - output_state = LOGIC_OFF //Both inputs are ON/FLICKER, so output is off - else - output_state = LOGIC_ON //This can only output continuous signals - return - -// NOR Gate -/obj/machinery/logic_gate/nor - name = "NOR Gate" - desc = "Outputs OFF when at least one input is ON." - icon_state = "logic_nor" - output_state = LOGIC_ON - -/obj/machinery/logic_gate/nor/handle_logic() - if(input1_state == LOGIC_OFF && input2_state == LOGIC_OFF) //Both inputs are OFF, so output is ON - output_state = LOGIC_ON //This can only output continuous signals - else - output_state = LOGIC_OFF - return - -// XOR Gate -/obj/machinery/logic_gate/xor - name = "XOR Gate" - desc = "Outputs ON when only one input is ON." - icon_state = "logic_xor" - -/obj/machinery/logic_gate/xor/handle_logic() - if((input1_state == LOGIC_ON || input1_state == LOGIC_FLICKER) && (input2_state == LOGIC_OFF)) //Only input1 is ON/FLICKER, so output matches input1 - output_state = input1_state - else if((input2_state == LOGIC_ON || input2_state == LOGIC_FLICKER) && (input1_state == LOGIC_OFF)) //Only input2 is ON/FLICKER, so output matches input2 - output_state = input2_state - else //Both inputs are ON or OFF, so output is OFF - output_state = LOGIC_OFF - return - - -// XNOR Gate -/obj/machinery/logic_gate/xnor - name = "XNOR Gate" - desc = "Outputs ON when both inputs are ON or OFF." - icon_state = "logic_xnor" - output_state = LOGIC_ON - -/obj/machinery/logic_gate/xnor/handle_logic() - if((input1_state == LOGIC_ON || input1_state == LOGIC_FLICKER) && (input2_state == LOGIC_ON || input2_state == LOGIC_FLICKER)) //Both inputs are ON/FLICKER - if(input1_state == LOGIC_ON && input2_state == LOGIC_ON) //Only continuous signal when both inputs are ON - output_state = LOGIC_ON - else //If at least one input is FLICKER, output FLICKER - output_state = LOGIC_FLICKER - else if(input1_state == LOGIC_OFF && input2_state == LOGIC_OFF) //Both inputs are OFF - output_state = LOGIC_ON //Always continuous in this case - else //Only one input is ON/FLICKER - output_state = LOGIC_OFF - return diff --git a/code/modules/logic/logic_base.dm b/code/modules/logic/logic_base.dm deleted file mode 100644 index 542cb09bc7f..00000000000 --- a/code/modules/logic/logic_base.dm +++ /dev/null @@ -1,284 +0,0 @@ - -/obj/machinery/logic_gate - name = "Logic Base" - desc = "This does nothing except connect to things. Highly illogical, report to a coder at once if you see this in-game." - icon = 'icons/obj/computer3.dmi' - icon_state = "serverframe" - density = 1 - anchored = 1 - - settagwhitelist = list("input1_id_tag", "input2_id_tag", "output_id_tag") - - var/tamperproof = 0 //if set, will make the machine unable to be destroyed, adjusted, etc. via in-game interaction (USE ONLY FOR MAPPING STUFF) - var/mono_input = 0 //if set, will ignore input2 - - var/datum/radio_frequency/radio_connection - var/frequency = 0 - - /* - Some notes on Input/Output: - - Multiple things can be linked to the same input or output tag, just like how wires can connect multiple sources and receivers. - - For inputs, only the last signal received BEFORE a process() call will be used in the logic handling. - - Input states are updated immediately whenever an input signal is received, so it is possible to update multiple times within a single process cycle. - - This means if you have multiple connected inputs, but the last signal received before the process() call is OFF, it won't matter if the others are both ON. - - For this reason, please set up your logic properly. You can theoretically chain these infinitely, so there's no need to link multiple things to a single input. - - For outputs, the signal will attempt to be sent out every process() call, to ensure newly connected things are updated within one process cycle - - Connecting an output to multiple inputs should not cause issues, as long as you don't have multiple connections to a given input (see previous notes on inputs). - - The output state is determined immediately preceeding the signal broadcast, using the input states at the time of the process() call, not when a signal is received. - - Because of how the process cycle works, it is possible that it may take multiple cycles for a signal to fully propogate through a logic chain. - - This is because machines attempt to process in the order they were added to the scheduler. - - Building the logic gates at the end of the chain first may cause delays in signal propogation. - If you take all this into consideration when linking and using logic machinery, you should have no unexpected issues with input/output. Your design flaws are on you though. - */ - - var/input1_id_tag = null - var/input1_state = LOGIC_OFF - var/input2_id_tag = null - var/input2_state = LOGIC_OFF - var/output_id_tag = null - var/output_state = LOGIC_OFF - -/obj/machinery/logic_gate/New() - if(tamperproof) //doing this during New so we don't have to worry about forgetting to set these vars during editting / defining - resistance_flags |= ACID_PROOF - ..() - if(SSradio) - set_frequency(frequency) - component_parts = list() - var/obj/item/circuitboard/logic_gate/LG = new(null) - LG.set_type(type) - component_parts += LG - component_parts += new /obj/item/stack/cable_coil(null, 1) - -/obj/machinery/logic_gate/Initialize() - ..() - set_frequency(frequency) - -/obj/machinery/logic_gate/proc/set_frequency(new_frequency) - SSradio.remove_object(src, frequency) - frequency = new_frequency - radio_connection = SSradio.add_object(src, frequency, RADIO_LOGIC) - return - -/obj/machinery/logic_gate/Destroy() - if(SSradio) - SSradio.remove_object(src, frequency) - radio_connection = null - return ..() - -/obj/machinery/logic_gate/process() - handle_logic() - handle_output() //All output will send for at least one cycle, and will attempt to send every cycle. Hopefully this won't be too taxing. - return - -/obj/machinery/logic_gate/proc/handle_logic() - return - -/obj/machinery/logic_gate/proc/handle_output() - if(!radio_connection) //can't output without this - return - - if(output_id_tag == null) //Don't output to an undefined id_tag - return - - var/datum/signal/signal = new - signal.transmission_method = 1 //radio signal - signal.source = src - - signal.data = list( - "tag" = output_id_tag, - "sigtype" = "logic", - "state" = output_state, - ) - - radio_connection.post_signal(src, signal, filter = RADIO_LOGIC) - -/obj/machinery/logic_gate/receive_signal(datum/signal/signal, receive_method, receive_param) - if(!signal.data["tag"] || ((signal.data["tag"] != input1_id_tag) && (signal.data["tag"] != input2_id_tag)) || (signal.data["sigtype"] != "logic")) - //If the signal lacks tag data, the signal's tag data doesn't match either input id tag, or is not a "logic" signal, ignore it since it's not for us - return - - if(signal.data["tag"] == input1_id_tag) //If the signal is for input1 - if(signal.data["state"] == input1_state) //If we already match, ignore the new signal since nothing changes - return - if(signal.data["state"] == LOGIC_OFF) //Shut it down and keep it off - input1_state = LOGIC_OFF - return - if(signal.data["state"] == LOGIC_ON) //Turn it on and keep it on - input1_state = LOGIC_ON - return - if(signal.data["state"] == LOGIC_FLICKER) //Turn it on then turn it off - if(input1_state == LOGIC_ON) //An existing continuous ON state overrides new flicker signals - return - input1_state = LOGIC_FLICKER - spawn(LOGIC_FLICKER_TIME) - if(input1_state == LOGIC_FLICKER) //Make sure we didn't get a new continuous signal set while we waited (those take priority) - input1_state = LOGIC_OFF - return - - //Now, you may be wondering why I included those returns. - //The answer is "If you link both inputs to the same source, you're an idiot and deserve to have it break", so yeah. Deal with it. - - if(mono_input) - //We only care about input1, so if we didn't receive a signal for that, we're done. - return - - if(signal.data["tag"] == input2_id_tag) //If the signal is for input2 (reaching this point assumes mono_input is not set) - if(signal.data["state"] == input2_state) //If we already match, ignore the new signal since nothing changes - return - if(signal.data["state"] == LOGIC_OFF) //Shut it down and keep it off - input2_state = LOGIC_OFF - return - if(signal.data["state"] == LOGIC_ON) //Turn it on and keep it on - input2_state = LOGIC_ON - return - if(signal.data["state"] == LOGIC_FLICKER) //Turn it on then turn it off - if(input2_state == LOGIC_ON) //An existing continuous ON state overrides new flicker signals - return - input2_state = LOGIC_FLICKER - spawn(LOGIC_FLICKER_TIME) - if(input2_state == LOGIC_FLICKER) //Make sure we didn't get a new continuous signal set while we waited (those take priority) - input2_state = LOGIC_OFF - return - -/obj/machinery/logic_gate/multitool_menu(var/mob/user, var/obj/item/multitool/P) - var/input1_state_string - var/input2_state_string - var/output_state_string - - switch(input1_state) - if(LOGIC_OFF) - input1_state_string = "OFF" - if(LOGIC_ON) - input1_state_string = "ON" - if(LOGIC_FLICKER) - input1_state_string = "FLICKER" - else - input1_state_string = "ERROR: UNKNOWN STATE" - - switch(input2_state) - if(LOGIC_OFF) - input2_state_string = "OFF" - if(LOGIC_ON) - input2_state_string = "ON" - if(LOGIC_FLICKER) - input2_state_string = "FLICKER" - else - input2_state_string = "ERROR: UNKNOWN STATE" - - switch(output_state) - if(LOGIC_OFF) - output_state_string = "OFF" - if(LOGIC_ON) - output_state_string = "ON" - if(LOGIC_FLICKER) - output_state_string = "FLICKER" - else - output_state_string = "ERROR: UNKNOWN STATE" - var/menu_contents = {" -
-
Input: [format_tag("ID Tag","input1_id_tag")]
-
Input State: [input1_state_string]
- "} - if(!mono_input) - menu_contents = {" -
Input 1: [format_tag("ID Tag","input1_id_tag")]
-
Input 1 State: [input1_state_string]
-
Input 2: [format_tag("ID Tag","input2_id_tag")]
-
Input 2 State: [input2_state_string]
- "} - menu_contents += {" -
Output: [format_tag("ID Tag","output_id_tag")]
-
Output State: [output_state_string]
-
- "} - return menu_contents - -/obj/machinery/logic_gate/convert/multitool_topic(var/mob/user,var/list/href_list,var/obj/O) - ..() - update_multitool_menu(user) - -/obj/machinery/logic_gate/attackby(obj/item/O, mob/user, params) - if(tamperproof) - to_chat(user, "The [src] appears to be tamperproofed! You can't interact with it!") - return 0 - if(istype(O, /obj/item/multitool)) - update_multitool_menu(user) - return 1 - if(istype(O, /obj/item/screwdriver)) - panel_open = !panel_open - to_chat(user, "You [panel_open ? "open" : "close"] the access panel.") - return 1 - if(panel_open && istype(O, /obj/item/crowbar)) - default_deconstruction_crowbar(user, O) - return 1 - return ..() - -////////////////////////////////////// -// Attack procs // -////////////////////////////////////// - -/obj/machinery/logic_gate/attack_ai(mob/user) - if(tamperproof) - to_chat(user, "The [src] appears to be tamperproofed! You can't interface with it!") - return 0 - add_hiddenprint(user) - return ui_interact(user) - -/obj/machinery/logic_gate/attack_ghost(mob/user) - if(tamperproof) - to_chat(user, "The [src] appears to be tamperproofed! You can't haunt it!") - return 0 - return ui_interact(user) - -/obj/machinery/logic_gate/attack_hand(mob/user) - if(tamperproof) - to_chat(user, "The [src] appears to be tamperproofed! You can't interact with it!") - return 0 - . = ..() - if(.) - return 0 - return interact(user) - -/obj/machinery/logic_gate/attack_alien(mob/user) //No xeno logic, that's too silly. - to_chat(user, "The [src] appears to be too complex! You can't comprehend it and back off in fear!") - return 0 - -/obj/machinery/logic_gate/attack_animal(mob/user) //No animal logic either. - to_chat(user, "The [src] appears to be beyond your comprehension! You can't fathom it!") - return 0 - -/obj/machinery/logic_gate/attack_slime(mob/user) //No slime logic. Seriously. - to_chat(user, "The [src] appears to be beyond your gelatinous understanding! You ignore it!") - return 0 - -/obj/machinery/logic_gate/emp_act(severity) - if(tamperproof) - return 0 - ..() - -/obj/machinery/logic_gate/ex_act(severity) - if(tamperproof) - return 0 - ..() - -/obj/machinery/logic_gate/blob_act(obj/structure/blob/B) - if(!tamperproof) - return ..() - -/obj/machinery/logic_gate/singularity_act() - if(tamperproof) - //This is some top-level tamperproofing right here, that's for sure. It can even defy a singularity! - return 0 - ..() - -/obj/machinery/logic_gate/bullet_act() - if(tamperproof) - return 0 - ..() - -/obj/machinery/logic_gate/tesla_act(var/power) - if(tamperproof) - tesla_zap(src, 3, power) //If we're tamperproof, we'll just bounce the full shock of the tesla zap we got hit by, so it continues on normally without diminishing - return 0 - ..() diff --git a/code/modules/logic/mono_input.dm b/code/modules/logic/mono_input.dm deleted file mode 100644 index 58b76232fa0..00000000000 --- a/code/modules/logic/mono_input.dm +++ /dev/null @@ -1,62 +0,0 @@ - -////////////////////////////////// -// Mono-Input Gates // -////////////////////////////////// - -//NOT Gate -/obj/machinery/logic_gate/not - name = "NOT Gate" - desc = "Accepts one input and outputs the reverse state." - icon_state = "logic_not" - mono_input = 1 //NOT Gates are the simplest logic gate because they only utilize one input. - output_state = LOGIC_ON //Starts with an active output, since the input will be OFF at start -/* - A quick note regarding NOT Gates: - - Connecting multiple things to the input of a NOT Gate can cause weird behaviour due to updating both when it receives a signal and when it calls process(). - - This means it will attempt to output once for every logic machine connected to its input's own process() call. - - It will then attempt to output an additional time based on the current state when it comes to its own process() call. - - For this reason, it is HIGHLY RECOMMENDED that you only connect a single signal source to the input of a NOT Gate to avoid signal spasms. - - Connecting multiple things to the output of a NOT Gate should not cause this unusual behavior. -*/ -/obj/machinery/logic_gate/not/handle_logic() //Our output will always be a continuous signal, even with a FLICKER, it just will update the output when the FLICKER ends - if(input1_state == LOGIC_ON) //Output is OFF while input is ON - output_state = LOGIC_OFF - else if(input1_state == LOGIC_FLICKER) //Output is OFF while input is FLICKER, then output returns to ON when input returns to OFF - output_state = LOGIC_OFF - spawn(LOGIC_FLICKER_TIME + 1) //Call handle_logic again after this delay (the input should update from the spawn(LOGIC_FLICKER_TIME) in receive_signal() by then) - handle_logic() - else //Output is ON while input is OFF - output_state = LOGIC_ON - handle_output() - return - -//STATUS Gate -/obj/machinery/logic_gate/status - name = "Status Gate" - desc = "Accepts one input and outputs the same state, showing a colored light based on current state." - icon_state = "logic_status" - mono_input = 1 //STATUS Gate doesn't actually perform logic operations, but instead acts as a testing conduit. - -/* - STATUS Gates are largely a diagnostics tool, but I'm sure someone will still make a logic gate rave with them anyways. - - There is no need to actually connect an output for these to work, they just need an input to sample from. - - STATUS Gates attempt to update their lights whenever they receive a signal. -*/ - -/obj/machinery/logic_gate/status/receive_signal(datum/signal/signal, receive_method, receive_params) - ..() - handle_logic() //STATUS Gate calls handle_logic() when it receives a signal to update its light and output_state - -/obj/machinery/logic_gate/status/handle_logic() - output_state = input1_state //Output is equal to input, since it is simply a connection with an attached light - if(output_state == LOGIC_OFF) //Red light when OFF - set_light(2,2,"#ff0000") - return - if(output_state == LOGIC_ON) //Green light when ON - set_light(2,2,"#009933") - return - if(output_state == LOGIC_FLICKER) //Orange light when FLICKER, then update after LOGIC_FLICKER_TIME + 1 to reflect the changed state - set_light(2,2,"#ff9900") - spawn(LOGIC_FLICKER_TIME + 1) - handle_logic() - return diff --git a/code/modules/martial_arts/martial.dm b/code/modules/martial_arts/martial.dm index 478438c47cb..882da0a9387 100644 --- a/code/modules/martial_arts/martial.dm +++ b/code/modules/martial_arts/martial.dm @@ -275,7 +275,6 @@ return else return ..() - return ..() /obj/item/twohanded/bostaff/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK) if(wielded) diff --git a/code/modules/mining/equipment/wormhole_jaunter.dm b/code/modules/mining/equipment/wormhole_jaunter.dm index 44462dedfda..43cce5904e3 100644 --- a/code/modules/mining/equipment/wormhole_jaunter.dm +++ b/code/modules/mining/equipment/wormhole_jaunter.dm @@ -26,7 +26,7 @@ /obj/item/wormhole_jaunter/proc/get_destinations(mob/user) var/list/destinations = list() - for(var/obj/item/radio/beacon/B in world) + for(var/obj/item/radio/beacon/B in GLOB.global_radios) var/turf/T = get_turf(B) if(is_station_level(T.z)) destinations += B diff --git a/code/modules/mob/camera/camera.dm b/code/modules/mob/camera/camera.dm index 39931a60fb2..090e5ddac1e 100644 --- a/code/modules/mob/camera/camera.dm +++ b/code/modules/mob/camera/camera.dm @@ -14,3 +14,8 @@ /mob/camera/experience_pressure_difference() return + +/mob/camera/forceMove(atom/destination) + var/oldloc = loc + loc = destination + Moved(oldloc, NONE) diff --git a/code/modules/mob/dead/dead.dm b/code/modules/mob/dead/dead.dm index 24f129ee387..f60777a97ff 100644 --- a/code/modules/mob/dead/dead.dm +++ b/code/modules/mob/dead/dead.dm @@ -15,7 +15,7 @@ onTransitZ(old_turf?.z, new_turf?.z) var/oldloc = loc loc = destination - Moved(oldloc, NONE, TRUE) + Moved(oldloc, NONE) /mob/dead/onTransitZ(old_z,new_z) ..() diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index dc7c2b4439e..8bff776c176 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -616,7 +616,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp /mob/dead/observer/Topic(href, href_list) if(usr != src) return - ..() if(href_list["track"]) var/atom/target = locate(href_list["track"]) diff --git a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm index 1ea256357e9..fec3012529e 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm @@ -167,4 +167,4 @@ Doesn't work on other aliens/AI.*/ adjustPlasma(-amount) return 1 - return 0 + return 0 diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 4b6d6c68603..0466c1c0be0 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -870,7 +870,6 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven unEquip(I) I.dropped() return - return 1 else to_chat(src, "You fail to remove [I]!") diff --git a/code/modules/mob/living/carbon/human/species/shadow.dm b/code/modules/mob/living/carbon/human/species/shadow.dm index 63f062b8bc8..be2a7f44229 100644 --- a/code/modules/mob/living/carbon/human/species/shadow.dm +++ b/code/modules/mob/living/carbon/human/species/shadow.dm @@ -39,10 +39,10 @@ /datum/action/innate/shadow/darkvision/Activate() var/mob/living/carbon/human/H = owner if(!H.vision_type) - H.vision_type = new /datum/vision_override/nightvision + H.set_sight(/datum/vision_override/nightvision) to_chat(H, "You adjust your vision to pierce the darkness.") else - H.vision_type = null + H.set_sight(null) to_chat(H, "You adjust your vision to recognize the shadows.") /datum/species/shadow/on_species_gain(mob/living/carbon/human/H) diff --git a/code/modules/mob/living/silicon/ai/death.dm b/code/modules/mob/living/silicon/ai/death.dm index 641b1a2af0f..717f9700316 100644 --- a/code/modules/mob/living/silicon/ai/death.dm +++ b/code/modules/mob/living/silicon/ai/death.dm @@ -34,7 +34,7 @@ spawn(10) explosion(src.loc, 3, 6, 12, 15) - for(var/obj/machinery/ai_status_display/O in world) //change status + for(var/obj/machinery/ai_status_display/O in GLOB.machines) //change status O.mode = 2 if(istype(loc, /obj/item/aicard)) diff --git a/code/modules/mob/living/silicon/ai/freelook/chunk.dm b/code/modules/mob/living/silicon/ai/freelook/chunk.dm index 4b124c364c2..03e56a5e26e 100644 --- a/code/modules/mob/living/silicon/ai/freelook/chunk.dm +++ b/code/modules/mob/living/silicon/ai/freelook/chunk.dm @@ -67,9 +67,6 @@ // The actual updating. It gathers the visible turfs from cameras and puts them into the appropiate lists. /datum/camerachunk/proc/update() - - set background = BACKGROUND_ENABLED - var/list/newVisibleTurfs = list() for(var/camera in cameras) diff --git a/code/modules/mob/living/silicon/ai/logout.dm b/code/modules/mob/living/silicon/ai/logout.dm index a8060abd15c..d9dac308870 100644 --- a/code/modules/mob/living/silicon/ai/logout.dm +++ b/code/modules/mob/living/silicon/ai/logout.dm @@ -1,6 +1,6 @@ /mob/living/silicon/ai/Logout() ..() - for(var/obj/machinery/ai_status_display/O in world) //change status + for(var/obj/machinery/ai_status_display/O in GLOB.machines) //change status O.mode = 0 src.view_core() return diff --git a/code/modules/mob/living/silicon/decoy/death.dm b/code/modules/mob/living/silicon/decoy/death.dm index 9e58001f47b..74db72978e0 100644 --- a/code/modules/mob/living/silicon/decoy/death.dm +++ b/code/modules/mob/living/silicon/decoy/death.dm @@ -4,7 +4,7 @@ if(!.) return FALSE icon_state = "ai-crash" - for(var/obj/machinery/ai_status_display/O in world) //change status + for(var/obj/machinery/ai_status_display/O in GLOB.machines) //change status if(atoms_share_level(O, src)) O.mode = 2 gib() diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index b181cec8ec0..39bedc78c77 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -144,7 +144,7 @@ user.visible_message("\the [user] swipes [user.p_their()] ID card through [src], attempting to reboot it.", "You swipe your ID card through [src], attempting to reboot it.") last_reboot = world.time / 10 var/drones = 0 - for(var/mob/living/silicon/robot/drone/D in world) + for(var/mob/living/silicon/robot/drone/D in GLOB.silicon_mob_list) if(D.key && D.client) drones++ if(drones < config.max_maint_drones) diff --git a/code/modules/mob/living/silicon/robot/drone/drone_console.dm b/code/modules/mob/living/silicon/robot/drone/drone_console.dm index 80d9f4d1ba3..d961d8e1c62 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_console.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_console.dm @@ -34,7 +34,7 @@ var/dat dat += "Maintenance Units
" - for(var/mob/living/silicon/robot/drone/D in world) + for(var/mob/living/silicon/robot/drone/D in GLOB.silicon_mob_list) dat += "
[D.real_name] ([D.stat == 2 ? "INACTIVE" : "ACTIVE"])" dat += "
Cell charge: [D.cell.charge]/[D.cell.maxcharge]." dat += "
Currently located in: [get_area(D)]." @@ -74,7 +74,7 @@ else if(href_list["ping"]) to_chat(usr, "You issue a maintenance request for all active drones, highlighting [drone_call_area].") - for(var/mob/living/silicon/robot/drone/D in world) + for(var/mob/living/silicon/robot/drone/D in GLOB.silicon_mob_list) if(D.client && D.stat == 0) to_chat(D, "-- Maintenance drone presence requested in: [drone_call_area].") diff --git a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm index 50463b17bec..023cced9cdb 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm @@ -52,7 +52,7 @@ /obj/machinery/drone_fabricator/proc/count_drones() var/drones = 0 - for(var/mob/living/silicon/robot/drone/D in world) + for(var/mob/living/silicon/robot/drone/D in GLOB.silicon_mob_list) if(D.key && D.client) drones++ return drones @@ -142,7 +142,7 @@ if(alert("Are you sure you want to respawn as a drone?", "Are you sure?", "Yes", "No") != "Yes") return - for(var/obj/machinery/drone_fabricator/DF in world) + for(var/obj/machinery/drone_fabricator/DF in GLOB.machines) if(DF.stat & NOPOWER || !DF.produce_drones) continue diff --git a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm index 7a1227960f4..877d542fa2b 100644 --- a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm +++ b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm @@ -123,8 +123,6 @@ if(health >= maxHealth) to_chat(user, "[src] does not need repairing!") return - to_chat(user, "Unable to repair with the maintenance panel closed!") - return . = TRUE if(!I.use_tool(src, user, volume = I.tool_volume)) return diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 46f80bc1919..b3d985ac4e4 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -765,7 +765,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ var/list/namecounts = list() var/list/creatures = list() - for(var/obj/O in world) //EWWWWWWWWWWWWWWWWWWWWWWWW ~needs to be optimised + for(var/obj/O in GLOB.poi_list) if(!O.loc) continue if(istype(O, /obj/item/disk/nuclear)) @@ -1099,7 +1099,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ var/mob/living/simple_animal/mouse/host var/obj/machinery/atmospherics/unary/vent_pump/vent_found var/list/found_vents = list() - for(var/obj/machinery/atmospherics/unary/vent_pump/v in world) + for(var/obj/machinery/atmospherics/unary/vent_pump/v in SSair.atmos_machinery) if(!v.welded && v.z == src.z) found_vents.Add(v) if(found_vents.len) @@ -1357,6 +1357,12 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ SEND_SIGNAL(src, COMSIG_MOB_UPDATE_SIGHT) sync_lighting_plane_alpha() +/mob/proc/set_sight(datum/vision_override/O) + QDEL_NULL(vision_type) + if(O) //in case of null + vision_type = new O + update_sight() + /mob/proc/sync_lighting_plane_alpha() if(hud_used) var/obj/screen/plane_master/lighting/L = hud_used.plane_masters["[LIGHTING_PLANE]"] diff --git a/code/modules/modular_computers/computers/item/processor.dm b/code/modules/modular_computers/computers/item/processor.dm index 7bd5be3cf81..3095e0af876 100644 --- a/code/modules/modular_computers/computers/item/processor.dm +++ b/code/modules/modular_computers/computers/item/processor.dm @@ -19,7 +19,6 @@ /obj/item/modular_computer/processor/New(comp) if(!comp || !istype(comp, /obj/machinery/modular_computer)) CRASH("Inapropriate type passed to obj/item/modular_computer/processor/New()! Aborting.") - return // Obtain reference to machinery computer all_components = list() idle_threads = list() diff --git a/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm b/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm index 517c8f99ebe..ca208c22b02 100644 --- a/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm +++ b/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm @@ -195,7 +195,6 @@ if(!computer) // This program shouldn't even be runnable without computer. CRASH("Var computer is null!") - return 1 if(!hard_drive) computer.visible_message("\The [computer] shows an \"I/O Error - Hard drive connection error\" warning.") else // In 99.9% cases this will mean our HDD is full diff --git a/code/modules/modular_computers/hardware/battery_module.dm b/code/modules/modular_computers/hardware/battery_module.dm index 7cec597dc13..1a48110006a 100644 --- a/code/modules/modular_computers/hardware/battery_module.dm +++ b/code/modules/modular_computers/hardware/battery_module.dm @@ -67,7 +67,6 @@ holder.shutdown_computer() return TRUE - return FALSE // Stock parts diff --git a/code/modules/nano/interaction/default.dm b/code/modules/nano/interaction/default.dm index ca42220204d..fed18f989f5 100644 --- a/code/modules/nano/interaction/default.dm +++ b/code/modules/nano/interaction/default.dm @@ -85,7 +85,7 @@ GLOBAL_DATUM_INIT(default_state, /datum/topic_state/default, new()) if(. != STATUS_CLOSE) if(loc) . = min(., loc.contents_nano_distance(src_object, src)) - if(STATUS_INTERACTIVE) + if(. == STATUS_INTERACTIVE) return STATUS_UPDATE /mob/living/carbon/brain/default_can_use_topic(var/src_object) diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index d76765b61a7..a3ca2c5d410 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -11,7 +11,7 @@ var/amount = 30 //How much paper is in the bin. var/list/papers = list() //List of papers put in the bin for reference. var/letterhead_type - + /obj/item/paper_bin/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) if(amount) amount = 0 @@ -84,6 +84,7 @@ P.loc = user.loc user.put_in_hands(P) + P.add_fingerprint(user) to_chat(user, "You take [P] out of the [src].") else to_chat(user, "[src] is empty!") @@ -143,7 +144,7 @@ add_fingerprint(user) return - + /obj/item/paper_bin/nanotrasen name = "nanotrasen paper bin" diff --git a/code/modules/pda/app.dm b/code/modules/pda/app.dm index 189f354446f..655bb891de5 100644 --- a/code/modules/pda/app.dm +++ b/code/modules/pda/app.dm @@ -50,8 +50,6 @@ if(!pda.notifying_programs.len) pda.overlays -= image('icons/obj/pda.dmi', "pda-r") -/datum/data/pda/proc/ - // An app has a button on the home screen and its own UI /datum/data/pda/app name = "App" diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm index c74f9cc0007..b4cc25bf390 100644 --- a/code/modules/power/power.dm +++ b/code/modules/power/power.dm @@ -375,6 +375,7 @@ return null /area/proc/get_apc() - for(var/obj/machinery/power/apc/APC in GLOB.apcs) + for(var/thing in GLOB.apcs) + var/obj/machinery/power/apc/APC = thing if(APC.area == src) return APC diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index 9579fcc6bf4..ceb3b578588 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -21,11 +21,8 @@ var/state = 0 var/locked = 0 - var/frequency = 0 - var/id_tag = null var/projectile_type = /obj/item/projectile/beam/emitter var/projectile_sound = 'sound/weapons/emitter.ogg' - var/datum/radio_frequency/radio_connection var/datum/effect_system/spark_spread/sparks /obj/machinery/power/emitter/Initialize(mapload) @@ -40,8 +37,6 @@ sparks = new sparks.attach(src) sparks.set_up(5, 1, src) - if(frequency) - set_frequency(frequency) /obj/machinery/power/emitter/RefreshParts() var/max_firedelay = 120 @@ -59,14 +54,6 @@ power_usage -= 50 * M.rating active_power_usage = power_usage - //Radio remote control -/obj/machinery/power/emitter/proc/set_frequency(new_frequency) - SSradio.remove_object(src, frequency) - frequency = new_frequency - if(frequency) - radio_connection = SSradio.add_object(src, frequency, RADIO_ATMOSIA) - - /obj/machinery/power/emitter/verb/rotate() set name = "Rotate" set category = "Object" @@ -86,44 +73,7 @@ return rotate() -/obj/machinery/power/emitter/multitool_menu(var/mob/user,var/obj/item/multitool/P) - return {" - - "} - -/obj/machinery/power/emitter/receive_signal(datum/signal/signal) - if(!signal.data["tag"] || (signal.data["tag"] != id_tag)) - return 0 - - var/on=0 - switch(signal.data["command"]) - if("on") - on=1 - - if("off") - on=0 - - if("set") - on = signal.data["state"] > 0 - - if("toggle") - on = !active - - if(anchored && state == 2 && on != active) - active=on - var/statestr=on?"on":"off" - // Spammy message_admins("Emitter turned [statestr] by radio signal ([signal.data["command"]] @ [frequency]) in [formatJumpTo(src)]",0,1) - log_game("Emitter turned [statestr] by radio signal ([signal.data["command"]] @ [frequency]) in ([x], [y], [z]) AAC prints: [jointext(signal.data["hiddenprints"], "")]") - investigate_log("turned [statestr] by radio signal ([signal.data["command"]] @ [frequency]) AAC prints: [jointext(signal.data["hiddenprints"], "")]","singulo") - update_icon() - /obj/machinery/power/emitter/Destroy() - if(SSradio) - SSradio.remove_object(src, frequency) - radio_connection = null msg_admin_attack("Emitter deleted at ([x],[y],[z] - [ADMIN_JMP(src)])", ATKLOG_FEW) log_game("Emitter deleted at ([x],[y],[z])") investigate_log("deleted at ([x],[y],[z])","singulo") diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm index b70a79106be..046cf68a543 100644 --- a/code/modules/power/singularity/field_generator.dm +++ b/code/modules/power/singularity/field_generator.dm @@ -312,7 +312,8 @@ field_generator power level display //I want to avoid using global variables. spawn(1) var/temp = 1 //stops spam - for(var/obj/singularity/O in GLOB.singularities) + for(var/thing in GLOB.singularities) + var/obj/singularity/O = thing if(O.last_warning && temp) if((world.time - O.last_warning) > 50) //to stop message-spam temp = 0 diff --git a/code/modules/power/singularity/narsie.dm b/code/modules/power/singularity/narsie.dm index 74acdf618d0..80b10ab3a8b 100644 --- a/code/modules/power/singularity/narsie.dm +++ b/code/modules/power/singularity/narsie.dm @@ -139,7 +139,6 @@ grav_pull = 0 /obj/singularity/narsie/wizard/eat() - set background = BACKGROUND_ENABLED for(var/atom/X in orange(consume_range,src)) if(isturf(X) || istype(X, /atom/movable)) consume(X) diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index 61e1d786490..18d211e8aeb 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -253,7 +253,6 @@ /obj/singularity/proc/eat() - set background = BACKGROUND_ENABLED for(var/tile in spiral_range_turfs(grav_pull, src)) var/turf/T = tile if(!T || !isturf(loc)) diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index f88128ab974..59ce091b170 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -248,8 +248,6 @@ disconnect_terminal() return ..() - return round(5.5*charge/(capacity ? capacity : 5e6)) - /obj/machinery/power/smes/proc/chargedisplay() return round(5.5*charge/(capacity ? capacity : 5e6)) diff --git a/code/modules/procedural_mapping/mapGenerator.dm b/code/modules/procedural_mapping/mapGenerator.dm index 5c46ac20058..58494fc8b45 100644 --- a/code/modules/procedural_mapping/mapGenerator.dm +++ b/code/modules/procedural_mapping/mapGenerator.dm @@ -102,8 +102,6 @@ //Requests the mapGeneratorModule(s) to (re)generate /datum/mapGenerator/proc/generate() - set background = 1 //this can get beefy - syncModules() if(!modules || !modules.len) return diff --git a/code/modules/reagents/chemistry/reagents/alcohol.dm b/code/modules/reagents/chemistry/reagents/alcohol.dm index 2dde295a70a..6e33184f2d0 100644 --- a/code/modules/reagents/chemistry/reagents/alcohol.dm +++ b/code/modules/reagents/chemistry/reagents/alcohol.dm @@ -18,18 +18,18 @@ /datum/reagent/consumable/ethanol/reaction_obj(obj/O, volume) if(istype(O,/obj/item/paper)) if(istype(O,/obj/item/paper/contract/infernal)) - to_chat(usr, "The solution ignites on contact with the [O].") + O.visible_message("The solution ignites on contact with [O].") else var/obj/item/paper/paperaffected = O paperaffected.clearpaper() - to_chat(usr, "The solution melts away the ink on the paper.") + paperaffected.visible_message("The solution melts away the ink on the paper.") if(istype(O,/obj/item/book)) if(volume >= 5) var/obj/item/book/affectedbook = O affectedbook.dat = null - to_chat(usr, "The solution melts away the ink on the book.") + affectedbook.visible_message("The solution melts away the ink on the book.") else - to_chat(usr, "It wasn't enough...") + O.visible_message("It wasn't enough...") /datum/reagent/consumable/ethanol/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)//Splashing people with ethanol isn't quite as good as fuel. if(method == REAGENT_TOUCH) @@ -1190,12 +1190,12 @@ taste_description = "motor oil" /datum/reagent/consumable/ethanol/synthanol/on_mob_life(mob/living/M) + metabolization_rate = REAGENTS_METABOLISM if(!(M.dna.species.reagent_tag & PROCESS_SYN)) - holder.remove_reagent(id, 3.6) //gets removed from organics very fast + metabolization_rate += 3.6 //gets removed from organics very fast if(prob(25)) - holder.remove_reagent(id, 15) + metabolization_rate += 15 M.fakevomit() - return ..() /datum/reagent/consumable/ethanol/synthanol/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume) diff --git a/code/modules/research/designs/autolathe_designs.dm b/code/modules/research/designs/autolathe_designs.dm index d907e46247e..1a57f2e2aee 100644 --- a/code/modules/research/designs/autolathe_designs.dm +++ b/code/modules/research/designs/autolathe_designs.dm @@ -880,14 +880,6 @@ build_path = /obj/item/assembly/mousetrap category = list("initial", "Miscellaneous") -/datum/design/logic_board - name = "Logic Circuit" - id = "logic_board" - build_type = AUTOLATHE - materials = list(MAT_METAL = 50, MAT_GLASS = 50) - build_path = /obj/item/circuitboard/logic_gate - category = list("initial", "Electronics") - /datum/design/vendor name = "Machine Board (Vendor)" desc = "The circuit board for a Vendor." diff --git a/code/modules/research/designs/comp_board_designs.dm b/code/modules/research/designs/comp_board_designs.dm index 67f797ee964..826bdbf16aa 100644 --- a/code/modules/research/designs/comp_board_designs.dm +++ b/code/modules/research/designs/comp_board_designs.dm @@ -332,16 +332,6 @@ build_path = /obj/item/circuitboard/large_tank_control category = list("Computer Boards") -/datum/design/AAC - name = "Console Board (Atmospheric Automations Console)" - desc = "Allows for the construction of circuit boards used to build an Atmospheric Automations Console." - id = "AAC" - req_tech = list("programming" = 4, "magnets" = 2) - build_type = IMPRINTER - materials = list(MAT_GLASS = 1000) - build_path = /obj/item/circuitboard/atmos_automation - category = list("Computer Boards") - /datum/design/xenobiocamera name = "Console Board (Xenobiology Console)" desc = "Allows for the construction of circuit boards used to build xenobiology camera computers." diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index d7bf071a8eb..822554549c9 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -131,7 +131,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, //Have it automatically push research to the centcom server so wild griffins can't fuck up R&D's work --NEO /obj/machinery/computer/rdconsole/proc/griefProtection() - for(var/obj/machinery/r_n_d/server/centcom/C in world) + for(var/obj/machinery/r_n_d/server/centcom/C in GLOB.machines) files.push_data(C.files) /obj/machinery/computer/rdconsole/proc/Maximize() @@ -148,7 +148,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, files = new /datum/research(src) //Setup the research data holder. matching_designs = list() if(!id) - for(var/obj/machinery/r_n_d/server/centcom/S in world) + for(var/obj/machinery/r_n_d/server/centcom/S in GLOB.machines) S.initialize_serv() break @@ -390,7 +390,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, spawn(SYNC_RESEARCH_DELAY) clear_wait_message() if(src) - for(var/obj/machinery/r_n_d/server/S in world) + for(var/obj/machinery/r_n_d/server/S in GLOB.machines) var/server_processed = 0 if(S.disabled) continue diff --git a/code/modules/security_levels/keycard authentication.dm b/code/modules/security_levels/keycard authentication.dm index 06ebfaa3374..87723701281 100644 --- a/code/modules/security_levels/keycard authentication.dm +++ b/code/modules/security_levels/keycard authentication.dm @@ -117,7 +117,7 @@ /obj/machinery/keycard_auth/proc/broadcast_request() icon_state = "auth_on" - for(var/obj/machinery/keycard_auth/KA in world) + for(var/obj/machinery/keycard_auth/KA in GLOB.machines) if(KA == src) continue KA.reset() spawn() diff --git a/code/modules/shuttle/navigation_computer.dm b/code/modules/shuttle/navigation_computer.dm index 1dbb158bf1c..b73901cf2fa 100644 --- a/code/modules/shuttle/navigation_computer.dm +++ b/code/modules/shuttle/navigation_computer.dm @@ -32,7 +32,7 @@ jumpto_ports += list("nav_z1" = 1) if(access_tcomms) jumpto_ports += list("nav_z3" = 1) - if(ACCESS_MINING) + if(access_mining) jumpto_ports += list("nav_z5" = 1) if(access_derelict) jumpto_ports += list("nav_z6" = 1) diff --git a/code/modules/shuttle/on_move.dm b/code/modules/shuttle/on_move.dm index f0394349f4d..1d9f6970135 100644 --- a/code/modules/shuttle/on_move.dm +++ b/code/modules/shuttle/on_move.dm @@ -3,6 +3,8 @@ var/turf/newT = get_turf(src) if(newT.z != oldT.z) onTransitZ(oldT.z, newT.z) + if(light) + update_light() if(rotation) shuttleRotate(rotation) forceMove(T1) diff --git a/code/modules/store/store.dm b/code/modules/store/store.dm index 2557008def0..d276edd547d 100644 --- a/code/modules/store/store.dm +++ b/code/modules/store/store.dm @@ -47,7 +47,7 @@ GLOBAL_DATUM_INIT(centcomm_store, /datum/store, new()) return 1 /datum/store/proc/reconnect_database() - for(var/obj/machinery/computer/account_database/DB in world) + for(var/obj/machinery/computer/account_database/DB in GLOB.machines) if(is_station_level(DB.z)) linked_db = DB break diff --git a/code/modules/surgery/other.dm b/code/modules/surgery/other.dm index b2bd8e6acd8..59274fb0c19 100644 --- a/code/modules/surgery/other.dm +++ b/code/modules/surgery/other.dm @@ -327,7 +327,7 @@ user.visible_message("[user] shines light onto the tumor in [target]'s [E]!", "You cleanse the contamination from [target]'s brain!") if(target.vision_type) //Turns off their darksight if it's still active. to_chat(target, "Your eyes are suddenly wrought with immense pain as your darksight is forcibly dismissed!") - target.vision_type = null + target.set_sight(null) SSticker.mode.remove_thrall(target.mind, 0) target.visible_message("A strange black mass falls from [target]'s [E]!") var/obj/item/organ/thing = new /obj/item/organ/internal/shadowtumor(get_turf(target)) diff --git a/code/modules/tram/tram.dm b/code/modules/tram/tram.dm deleted file mode 100644 index ea43f3fd659..00000000000 --- a/code/modules/tram/tram.dm +++ /dev/null @@ -1,251 +0,0 @@ -/obj/tram/tram_controller - name = "" - desc = "tram controller" - anchored = 1 - - var/list/tram_floors = list() - var/list/tram_walls = list() - var/list/controllers = list() - - var/list/tram = list() - - var/list/collide_list = list() - - var/list/stored_anchor = list() - var/last_played_rail - - var/automode = 0 - var/fast_mode = 0 - - var/activated = 0 - var/looptick = 0 - - var/delay_timer = null - - var/list/blacklist = list(/obj/tram/rail) - var/list/ancwhitelist = list(/obj/tram, /obj/vehicle, /obj/structure/chair, /obj/structure/grille, /obj/structure/window) - -/obj/tram/tram_controller/New() - spawn(1) - init_floors() //Search and link floors - init_walls() //Search and link walls - spawn(1) - init_tram() //Combine walls and floors and anything inside the tram - init_controllers() //Find control pads - gen_collision() //Generate collision system - -/obj/tram/tram_controller/Destroy() - for(var/obj/tram/floor/F in tram_floors) - remove_floor(F) - for(var/obj/tram/wall/TW in tram_walls) - remove_wall(TW) - for(var/obj/tram/controlpad/CP in controllers) - remove_controller(CP) - killLoop() - return ..() - -/obj/tram/tram_controller/emp_act(severity) - if(automode) automode = 0 - ..() - -/obj/tram/tram_controller/proc/startLoop() - if(activated) return - activated = 1 - spawn(0) - while(activated) - process() - looptick++ - sleep(1) - -/obj/tram/tram_controller/proc/killLoop() - activated = 0 - looptick = 0 - -/obj/tram/tram_controller/process() - update_tram() //Update combine to account for new mobs and/or objects - if(automode) - tram_rail_follow() - if(fast_mode) - tram_rail_follow() - -/obj/tram/tram_controller/proc/update_tram() - tram.Cut() - init_tram() - -/obj/tram/tram_controller/proc/tram_rail_follow() - var/stored_rail = null - if(delay_timer >= world.time) return - for(var/obj/tram/rail/RT in get_turf(src)) - if(RT.stop_duration && !delay_timer) - delay_timer = world.time + RT.stop_duration - return - if(RT.godir) - handle_move(RT.godir) - last_played_rail = RT - return - stored_rail = RT - for(var/cdir in GLOB.cardinal) - for(var/obj/tram/rail/R in get_step(src,cdir)) - if(!istype(R)) continue - if(R != last_played_rail) - handle_move(get_dir(src,R)) - last_played_rail = stored_rail - return - -//INITIALIZATION PROCS - -/obj/tram/tram_controller/proc/init_floors() - var/turf/T = get_turf(src) - if(!T) return - var/obj/tram/floor/TTF = locate(/obj/tram/floor) in T - if(istype(TTF)) add_floor(TTF) //Find and link floor on controller turf - for(var/cdir in GLOB.cardinal) - var/turf/T2 = get_step(T,cdir) - var/obj/tram/floor/TF = locate(/obj/tram/floor) in T2 - if(istype(TF)) - if(TF in tram_floors) continue - add_floor(TF) //Find and link all cardinally surrounding floors - spawn(1) - TF.spread_floors() //Do the same thing over again from the floor itself - -/obj/tram/tram_controller/proc/init_walls() - var/turf/T = get_turf(src) - if(!T) return - if(!tram_floors.len) return - var/obj/tram/floor/TTW = locate(/obj/tram/wall) in T //Find and link wall on controller turf - if(istype(TTW)) add_wall(TTW) - for(var/obj/tram/floor/TF in tram_floors) - for(var/cdir in GLOB.cardinal) - var/obj/tram/wall/TW = locate(/obj/tram/wall) in get_step(TF,cdir) - if(istype(TW)) - if(TW in tram_walls) continue - add_wall(TW) //Find and link all cardinally surrounding walls - spawn(1) - TW.spread_walls() //Do the same thing over again from the wall itself - -/obj/tram/tram_controller/proc/init_tram() - tram = tram_floors + tram_walls //Tram is everything that makes up the tram - for(var/obj/tram/OT in tram) - var/turf/T = get_turf(OT) - for(var/atom/movable/AM in T) //Including anything inside of it - if(AM in tram) continue - if(!check_validity(AM)) continue - tram += AM - if(!(src in tram)) - tram += src - -/obj/tram/tram_controller/proc/check_validity(var/atom/movable/AM) - if(!AM) - return FALSE - - if(!AM.simulated) - return FALSE - - if(is_type_in_list(AM, blacklist)) - return FALSE - - if(AM.anchored) - if(is_type_in_list(AM, ancwhitelist)) - return TRUE - return FALSE - return TRUE - -/obj/tram/tram_controller/proc/init_controllers() - for(var/obj/tram/controlpad/CCP in tram) - add_controller(CCP) //Control pad not necessary until now, easiest to search through tram - -//SYNC PROCS -//These procs are used for un/linking floors, walls, and control pads to the central tram controller - -/obj/tram/tram_controller/proc/add_floor(var/obj/tram/floor/TF) - if(!istype(TF)) return - if(TF in tram_floors) return - tram_floors += TF - TF.controller = src - -/obj/tram/tram_controller/proc/remove_floor(var/obj/tram/floor/TF) - if(!istype(TF)) return - if(TF in tram_floors) - tram_floors -= TF - TF.controller = null - -/obj/tram/tram_controller/proc/add_wall(var/obj/tram/wall/TW) - if(!istype(TW)) return - if(TW in tram_walls) return - tram_walls += TW - TW.controller = src - -/obj/tram/tram_controller/proc/remove_wall(var/obj/tram/wall/TW) - if(!istype(TW)) return - if(TW in tram_walls) - tram_walls -= TW - TW.controller = null - -/obj/tram/tram_controller/proc/add_controller(var/obj/tram/controlpad/CCT) - if(!istype(CCT)) return - if(CCT in controllers) return - controllers += CCT - CCT.tram_linked = src - -/obj/tram/tram_controller/proc/remove_controller(var/obj/tram/controlpad/CCT) - if(!istype(CCT)) return - if(CCT in controllers) - controllers -= CCT - CCT.tram_linked = null - -//COLLISION & MOVEMENT -//Collision detection system to prevent going through walls -//Tram does not use built-in byond Move(), it uses it's own logic and then forceMove()s itself. - -/obj/tram/tram_controller/proc/gen_collision() - collide_list.Cut() - var/list/collisions = list() - for(var/obj/tram/wall/W in tram_walls) - for(var/cdir in GLOB.cardinal) - var/turf/T = get_step(W, cdir) - if(istype(T)) - if(T.density) - collisions += cdir - if(!T.density) - for(var/atom/movable/A in T) - if(A.density) - if(tram.Find(A)) continue - collisions += cdir - for(var/obj/tram/floor/F in tram_floors) - for(var/cdir in GLOB.cardinal) - var/turf/T = get_step(F, cdir) - if(istype(T)) - if(T.density) - collisions += cdir - if(!T.density) - for(var/atom/movable/A in T) - if(A.density) - if(tram.Find(A)) continue - collisions += cdir - collide_list = collisions - -/obj/tram/tram_controller/proc/handle_move(var/dir) - delay_timer = null //reset delay - gen_collision() //Look for collisions - if(dir in collide_list) //Prevent moving if there are collisions in that direction - return 0 - for(var/atom/movable/A in tram) - var/turf/T = get_step(A,dir) - A.forceMove(T) //Move everything inside the tram and the tram itself manually - if(A.light_range) - A.set_light() - gen_collision() //Generate collision again - return 1 - -/obj/tram/attack_animal(var/mob/living/simple_animal/M as mob) - if(M.melee_damage_upper == 0) return - if(prob(M.melee_damage_upper)) - qdel(src) - src.visible_message("[M] has [M.attacktext] [src]!") - M.create_attack_log("attacked [src.name]") - add_attack_logs(M, src, "attacked") - -/obj/tram/bullet_act(var/obj/item/projectile/proj) - if(prob(proj.damage)) - qdel(src) - ..() diff --git a/code/modules/tram/tram_control_pad.dm b/code/modules/tram/tram_control_pad.dm deleted file mode 100644 index 3bbb3811de2..00000000000 --- a/code/modules/tram/tram_control_pad.dm +++ /dev/null @@ -1,33 +0,0 @@ -/obj/tram/controlpad - name = "tram controller interface" - desc = "Controls a tram." - icon = 'icons/obj/airlock_machines.dmi' - icon_state = "airlock_control_standby" - anchored = 1 - var/obj/tram/tram_controller/tram_linked - -/obj/tram/controlpad/attack_hand(var/mob/user) - usr.set_machine(src) - if(!tram_linked) return - var/dat = "Tram Controller" - dat += "
Tram engine: [tram_linked.automode ? "On" : "Off"]" - dat += "
Close console" - user << browse(dat, "window=trampad") - onclose(user,"trampad") - -/obj/tram/controlpad/Topic(href, href_list) - if(..()) - usr << browse(null, "window=publiclibrary") - onclose(usr, "publiclibrary") - return - - if(href_list["engine_toggle"]) - tram_linked.automode = !tram_linked.automode - if(tram_linked.automode) tram_linked.startLoop() - else tram_linked.killLoop() - else if(href_list["close"]) - usr.unset_machine() - usr << browse(null, "window=trampad") - - src.add_fingerprint(usr) - src.updateUsrDialog() diff --git a/code/modules/tram/tram_floor.dm b/code/modules/tram/tram_floor.dm deleted file mode 100644 index ede3013567b..00000000000 --- a/code/modules/tram/tram_floor.dm +++ /dev/null @@ -1,20 +0,0 @@ -/obj/tram/floor - name = "tram platform" - desc = "A holding space for a tram system." - icon = 'icons/turf/floors.dmi' - icon_state = "floor" - var/obj/tram/tram_controller/controller - anchored = 1 - layer = TURF_LAYER + 0.2 - -/obj/tram/floor/proc/spread_floors() - var/turf/T = get_turf(src) - if(!T) return - if(!controller) return - for(var/cdir in GLOB.cardinal) - var/turf/T2 = get_step(T,cdir) - var/obj/tram/floor/TF = locate(/obj/tram/floor) in T2 - if(istype(TF)) - if(TF in controller.tram_floors) continue - controller.add_floor(TF) - TF.spread_floors() diff --git a/code/modules/tram/tram_rail.dm b/code/modules/tram/tram_rail.dm deleted file mode 100644 index 254f2e8636b..00000000000 --- a/code/modules/tram/tram_rail.dm +++ /dev/null @@ -1,8 +0,0 @@ -/obj/tram/rail - name = "tram rail" - desc = "A guiding rail for trams" - icon = 'icons/obj/tram/tram_rail.dmi' - icon_state = "rail" - var/godir = null - var/stop_duration = null - layer = TURF_LAYER + 0.1 diff --git a/code/modules/tram/tram_wall.dm b/code/modules/tram/tram_wall.dm deleted file mode 100644 index b39417f5f85..00000000000 --- a/code/modules/tram/tram_wall.dm +++ /dev/null @@ -1,21 +0,0 @@ -/obj/tram/wall - name = "reinforced tram wall" - desc = "A huge chunk of reinforced metal used to shield a tram system." - icon = 'icons/turf/walls.dmi' - icon_state = "r_wall" - var/obj/tram/tram_controller/controller - anchored = 1 - density = 1 - opacity = 1 - -/obj/tram/wall/proc/spread_walls() - var/turf/T = get_turf(src) - if(!T) return - if(!controller) return - for(var/cdir in GLOB.cardinal) - var/turf/T2 = get_step(T,cdir) - var/obj/tram/wall/TW = locate(/obj/tram/wall) in T2 - if(istype(TW)) - if(TW in controller.tram_walls) continue - controller.add_wall(TW) - TW.spread_walls() diff --git a/dreamchecker.exe b/dreamchecker.exe index 068a9f58a0c..abe378640c5 100644 Binary files a/dreamchecker.exe and b/dreamchecker.exe differ diff --git a/paradise.dme b/paradise.dme index b83ea6be6df..4f93bf2fdcf 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1285,14 +1285,6 @@ #include "code\modules\assembly\signaler.dm" #include "code\modules\assembly\timer.dm" #include "code\modules\assembly\voice.dm" -#include "code\modules\atmos_automation\console.dm" -#include "code\modules\atmos_automation\statements.dm" -#include "code\modules\atmos_automation\implementation\digital_valves.dm" -#include "code\modules\atmos_automation\implementation\emitters.dm" -#include "code\modules\atmos_automation\implementation\injectors.dm" -#include "code\modules\atmos_automation\implementation\scrubbers.dm" -#include "code\modules\atmos_automation\implementation\sensors.dm" -#include "code\modules\atmos_automation\implementation\vent_pump.dm" #include "code\modules\awaymissions\corpse.dm" #include "code\modules\awaymissions\exile.dm" #include "code\modules\awaymissions\gateway.dm" @@ -1674,10 +1666,6 @@ #include "code\modules\lighting\lighting_setup.dm" #include "code\modules\lighting\lighting_source.dm" #include "code\modules\lighting\lighting_turf.dm" -#include "code\modules\logic\converter.dm" -#include "code\modules\logic\dual_input.dm" -#include "code\modules\logic\logic_base.dm" -#include "code\modules\logic\mono_input.dm" #include "code\modules\map_fluff\cyberiad.dm" #include "code\modules\map_fluff\delta.dm" #include "code\modules\map_fluff\maps.dm" @@ -2483,11 +2471,6 @@ #include "code\modules\telesci\telepad.dm" #include "code\modules\telesci\telesci_computer.dm" #include "code\modules\tooltip\tooltip.dm" -#include "code\modules\tram\tram.dm" -#include "code\modules\tram\tram_control_pad.dm" -#include "code\modules\tram\tram_floor.dm" -#include "code\modules\tram\tram_rail.dm" -#include "code\modules\tram\tram_wall.dm" #include "code\modules\vehicle\ambulance.dm" #include "code\modules\vehicle\atv.dm" #include "code\modules\vehicle\janicart.dm"