diff --git a/code/ATMOSPHERICS/atmospherics.dm b/code/ATMOSPHERICS/atmospherics.dm index ee24252a0c4..0502f2b8f8f 100644 --- a/code/ATMOSPHERICS/atmospherics.dm +++ b/code/ATMOSPHERICS/atmospherics.dm @@ -10,9 +10,6 @@ Pipelines + Other Objects -> Pipe network */ /obj/machinery/atmospherics - - auto_init = 0 - anchored = 1 idle_power_usage = 0 active_power_usage = 0 @@ -33,6 +30,7 @@ Pipelines + Other Objects -> Pipe network var/obj/machinery/atmospherics/node2 /obj/machinery/atmospherics/New() + ..() if(!icon_manager) icon_manager = new() @@ -42,7 +40,19 @@ Pipelines + Other Objects -> Pipe network if(!pipe_color_check(pipe_color)) pipe_color = null - ..() + init_dir() + +// This is used to set up what directions pipes will connect to. Should be called inside New() and whenever a dir changes. +/obj/machinery/atmospherics/proc/init_dir() + return + +// Initializes nodes by looking at neighboring atmospherics machinery to connect to. +// When we're being constructed at runtime, atmos_init() is called by the construction code. +// When dynamically loading a map atmos_init is called by the maploader (initTemplateBounds proc) +// But during initial world creation its called by the master_controller. +// TODO - Consolidate these different ways of being called once SSatoms is created. +/obj/machinery/atmospherics/proc/atmos_init() + return /obj/machinery/atmospherics/attackby(atom/A, mob/user as mob) if(istype(A, /obj/item/device/pipe_painter)) diff --git a/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm b/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm index 4bbbf02b169..6e6662f39c1 100644 --- a/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm +++ b/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm @@ -57,24 +57,20 @@ node1 = null node2 = null -/obj/machinery/atmospherics/binary/initialize() +/obj/machinery/atmospherics/binary/atmos_init() if(node1 && node2) return - init_dir() - var/node2_connect = dir var/node1_connect = turn(dir, 180) for(var/obj/machinery/atmospherics/target in get_step(src,node1_connect)) - target.init_dir() if(target.initialize_directions & get_dir(target,src)) if (check_connect_types(target,src)) node1 = target break for(var/obj/machinery/atmospherics/target in get_step(src,node2_connect)) - target.init_dir() if(target.initialize_directions & get_dir(target,src)) if (check_connect_types(target,src)) node2 = target diff --git a/code/ATMOSPHERICS/components/binary_devices/circulator.dm b/code/ATMOSPHERICS/components/binary_devices/circulator.dm index 09335cdf33f..68ce37d0884 100644 --- a/code/ATMOSPHERICS/components/binary_devices/circulator.dm +++ b/code/ATMOSPHERICS/components/binary_devices/circulator.dm @@ -101,13 +101,13 @@ else if(dir & (EAST|WEST)) initialize_directions = EAST|WEST - initialize() + atmos_init() build_network() if (node1) - node1.initialize() + node1.atmos_init() node1.build_network() if (node2) - node2.initialize() + node2.atmos_init() node2.build_network() else if(node1) diff --git a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm index ceb192f9b00..4bce44e0b06 100644 --- a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm +++ b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm @@ -166,7 +166,7 @@ return src.add_fingerprint(usr) if(!src.allowed(user)) - user << "Access denied." + to_chat(user, "Access denied.") return usr.set_machine(src) ui_interact(user) @@ -240,14 +240,14 @@ if (!istype(W, /obj/item/weapon/wrench)) return ..() if (unlocked) - user << "You cannot unwrench \the [src], turn it off first." + to_chat(user, "You cannot unwrench \the [src], turn it off first.") return 1 if(!can_unwrench()) to_chat(user, "You cannot unwrench \the [src], it too exerted due to internal pressure.") add_fingerprint(user) return 1 playsound(src, W.usesound, 50, 1) - user << "You begin to unfasten \the [src]..." + to_chat(user, "You begin to unfasten \the [src]...") if (do_after(user, 40 * W.toolspeed)) user.visible_message( \ "\The [user] unfastens \the [src].", \ diff --git a/code/ATMOSPHERICS/components/binary_devices/pipeturbine.dm b/code/ATMOSPHERICS/components/binary_devices/pipeturbine.dm index 1b576e10425..b8c7883796e 100644 --- a/code/ATMOSPHERICS/components/binary_devices/pipeturbine.dm +++ b/code/ATMOSPHERICS/components/binary_devices/pipeturbine.dm @@ -87,7 +87,7 @@ if(istype(W, /obj/item/weapon/wrench)) anchored = !anchored playsound(src, W.usesound, 50, 1) - user << "You [anchored ? "secure" : "unsecure"] the bolts holding \the [src] to the floor." + to_chat(user, "You [anchored ? "secure" : "unsecure"] the bolts holding \the [src] to the floor.") if(anchored) if(dir & (NORTH|SOUTH)) @@ -95,13 +95,13 @@ else if(dir & (EAST|WEST)) initialize_directions = NORTH|SOUTH - initialize() + atmos_init() build_network() if (node1) - node1.initialize() + node1.atmos_init() node1.build_network() if (node2) - node2.initialize() + node2.atmos_init() node2.build_network() else if(node1) @@ -153,7 +153,7 @@ return null - initialize() + atmos_init() if(node1 && node2) return var/node2_connect = turn(dir, -90) @@ -260,7 +260,7 @@ anchored = !anchored playsound(src, W.usesound, 50, 1) turbine = null - user << "You [anchored ? "secure" : "unsecure"] the bolts holding \the [src] to the floor." + to_chat(user, "You [anchored ? "secure" : "unsecure"] the bolts holding \the [src] to the floor.") updateConnection() else ..() diff --git a/code/ATMOSPHERICS/components/binary_devices/pump.dm b/code/ATMOSPHERICS/components/binary_devices/pump.dm index 97abccdfadd..ac5a00e46c9 100644 --- a/code/ATMOSPHERICS/components/binary_devices/pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/pump.dm @@ -183,7 +183,7 @@ Thus, the two variables affect pump operation are set in New(): return src.add_fingerprint(usr) if(!src.allowed(user)) - user << "Access denied." + to_chat(user, "Access denied.") return usr.set_machine(src) ui_interact(user) @@ -219,14 +219,14 @@ Thus, the two variables affect pump operation are set in New(): if (!istype(W, /obj/item/weapon/wrench)) return ..() if (!(stat & NOPOWER) && use_power) - user << "You cannot unwrench this [src], turn it off first." + to_chat(user, "You cannot unwrench this [src], turn it off first.") return 1 if(!can_unwrench()) to_chat(user, "You cannot unwrench this [src], it too exerted due to internal pressure.") add_fingerprint(user) return 1 playsound(src, W.usesound, 50, 1) - user << "You begin to unfasten \the [src]..." + to_chat(user, "You begin to unfasten \the [src]...") if (do_after(user, 40 * W.toolspeed)) user.visible_message( \ "\The [user] unfastens \the [src].", \ diff --git a/code/ATMOSPHERICS/components/omni_devices/_omni_extras.dm b/code/ATMOSPHERICS/components/omni_devices/_omni_extras.dm index a1913709246..fc25eae3b71 100644 --- a/code/ATMOSPHERICS/components/omni_devices/_omni_extras.dm +++ b/code/ATMOSPHERICS/components/omni_devices/_omni_extras.dm @@ -40,10 +40,10 @@ /datum/omni_port/proc/connect() if(node) return - master.initialize() + master.atmos_init() master.build_network() if(node) - node.initialize() + node.atmos_init() node.build_network() /datum/omni_port/proc/disconnect() diff --git a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm index c2e1e34f2ad..b1131c9d4ab 100644 --- a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm +++ b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm @@ -86,7 +86,7 @@ to_chat(user, "You cannot unwrench \the [src], it is too exerted due to internal pressure.") add_fingerprint(user) return 1 - user << "You begin to unfasten \the [src]..." + to_chat(user, "You begin to unfasten \the [src]...") playsound(src, W.usesound, 50, 1) if(do_after(user, 40 * W.toolspeed)) user.visible_message( \ @@ -245,14 +245,13 @@ qdel(P.network) P.node = null - ..() + . = ..() -/obj/machinery/atmospherics/omni/initialize() +/obj/machinery/atmospherics/omni/atmos_init() for(var/datum/omni_port/P in ports) if(P.node || P.mode == 0) continue for(var/obj/machinery/atmospherics/target in get_step(src, P.dir)) - target.init_dir() if(target.initialize_directions & get_dir(target,src)) if (check_connect_types(target,src)) P.node = target diff --git a/code/ATMOSPHERICS/components/portables_connector.dm b/code/ATMOSPHERICS/components/portables_connector.dm index c1949f8a395..6911288c932 100644 --- a/code/ATMOSPHERICS/components/portables_connector.dm +++ b/code/ATMOSPHERICS/components/portables_connector.dm @@ -21,10 +21,6 @@ /obj/machinery/atmospherics/portables_connector/init_dir() initialize_directions = dir -/obj/machinery/atmospherics/portables_connector/New() - init_dir() - ..() - /obj/machinery/atmospherics/portables_connector/update_icon() icon_state = "connector" @@ -74,16 +70,13 @@ node = null -/obj/machinery/atmospherics/portables_connector/initialize() +/obj/machinery/atmospherics/portables_connector/atmos_init() if(node) return - init_dir() - var/node_connect = dir for(var/obj/machinery/atmospherics/target in get_step(src,node_connect)) - target.init_dir() if(target.initialize_directions & get_dir(target,src)) if (check_connect_types(target,src)) node = target @@ -138,7 +131,7 @@ if (!istype(W, /obj/item/weapon/wrench)) return ..() if (connected_device) - user << "You cannot unwrench \the [src], dettach \the [connected_device] first." + to_chat(user, "You cannot unwrench \the [src], dettach \the [connected_device] first.") return 1 if (locate(/obj/machinery/portable_atmospherics, src.loc)) return 1 @@ -147,7 +140,7 @@ add_fingerprint(user) return 1 playsound(src, W.usesound, 50, 1) - user << "You begin to unfasten \the [src]..." + to_chat(user, "You begin to unfasten \the [src]...") if (do_after(user, 40 * W.toolspeed)) user.visible_message( \ "\The [user] unfastens \the [src].", \ diff --git a/code/ATMOSPHERICS/components/trinary_devices/filter.dm b/code/ATMOSPHERICS/components/trinary_devices/filter.dm index e9fe37f8a16..bc9a8d77ee3 100755 --- a/code/ATMOSPHERICS/components/trinary_devices/filter.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/filter.dm @@ -136,7 +136,7 @@ add_fingerprint(user) return 1 playsound(src, W.usesound, 50, 1) - user << "You begin to unfasten \the [src]..." + to_chat(user, "You begin to unfasten \the [src]...") if (do_after(user, 40 * W.toolspeed)) user.visible_message( \ "\The [user] unfastens \the [src].", \ @@ -151,7 +151,7 @@ return if(!src.allowed(user)) - user << "Access denied." + to_chat(user, "Access denied.") return var/dat @@ -247,9 +247,7 @@ obj/machinery/atmospherics/trinary/atmos_filter/m_filter/init_dir() if(WEST) initialize_directions = WEST|SOUTH|EAST -/obj/machinery/atmospherics/trinary/atmos_filter/m_filter/initialize() - set_frequency(frequency) - +/obj/machinery/atmospherics/trinary/atmos_filter/m_filter/atmos_init() if(node1 && node2 && node3) return var/node1_connect = turn(dir, -180) diff --git a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm index e8a3c1be747..5739a57895e 100644 --- a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm @@ -111,7 +111,7 @@ add_fingerprint(user) return 1 playsound(src, W.usesound, 50, 1) - user << "You begin to unfasten \the [src]..." + to_chat(user, "You begin to unfasten \the [src]...") if (do_after(user, 40 * W.toolspeed)) user.visible_message( \ "\The [user] unfastens \the [src].", \ @@ -125,7 +125,7 @@ return src.add_fingerprint(usr) if(!src.allowed(user)) - user << "Access denied." + to_chat(user, "Access denied.") return usr.set_machine(src) var/dat = {"Power: [use_power?"On":"Off"]
@@ -192,7 +192,7 @@ obj/machinery/atmospherics/trinary/mixer/t_mixer/init_dir() if(WEST) initialize_directions = WEST|NORTH|SOUTH -obj/machinery/atmospherics/trinary/mixer/t_mixer/initialize() +obj/machinery/atmospherics/trinary/mixer/t_mixer/atmos_init() ..() if(node1 && node2 && node3) return @@ -237,7 +237,7 @@ obj/machinery/atmospherics/trinary/mixer/m_mixer/init_dir() if(WEST) initialize_directions = WEST|SOUTH|EAST -obj/machinery/atmospherics/trinary/mixer/m_mixer/initialize() +obj/machinery/atmospherics/trinary/mixer/m_mixer/atmos_init() ..() if(node1 && node2 && node3) return diff --git a/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm b/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm index 34e6d480a84..807523fe7a0 100644 --- a/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm @@ -15,7 +15,6 @@ /obj/machinery/atmospherics/trinary/New() ..() - init_dir() air1 = new air2 = new @@ -71,31 +70,26 @@ node2 = null node3 = null -/obj/machinery/atmospherics/trinary/initialize() +/obj/machinery/atmospherics/trinary/atmos_init() if(node1 && node2 && node3) return - init_dir() - var/node1_connect = turn(dir, -180) var/node2_connect = turn(dir, -90) var/node3_connect = dir for(var/obj/machinery/atmospherics/target in get_step(src,node1_connect)) - target.init_dir() if(target.initialize_directions & get_dir(target,src)) if (check_connect_types(target,src)) node1 = target break for(var/obj/machinery/atmospherics/target in get_step(src,node2_connect)) - target.init_dir() if(target.initialize_directions & get_dir(target,src)) if (check_connect_types(target,src)) node2 = target break for(var/obj/machinery/atmospherics/target in get_step(src,node3_connect)) - target.init_dir() if(target.initialize_directions & get_dir(target,src)) if (check_connect_types(target,src)) node3 = target diff --git a/code/ATMOSPHERICS/components/tvalve.dm b/code/ATMOSPHERICS/components/tvalve.dm index 65d38a131df..e5f0eaaa89b 100644 --- a/code/ATMOSPHERICS/components/tvalve.dm +++ b/code/ATMOSPHERICS/components/tvalve.dm @@ -46,10 +46,6 @@ /obj/machinery/atmospherics/tvalve/hide(var/i) update_underlays() -/obj/machinery/atmospherics/tvalve/New() - init_dir() - ..() - /obj/machinery/atmospherics/tvalve/init_dir() switch(dir) if(NORTH) @@ -183,31 +179,26 @@ return -/obj/machinery/atmospherics/tvalve/initialize() +/obj/machinery/atmospherics/tvalve/atmos_init() var/node1_dir var/node2_dir var/node3_dir - init_dir() - node1_dir = turn(dir, 180) node2_dir = turn(dir, -90) node3_dir = dir for(var/obj/machinery/atmospherics/target in get_step(src,node1_dir)) - target.init_dir() if(target.initialize_directions & get_dir(target,src)) if (check_connect_types(target,src)) node1 = target break for(var/obj/machinery/atmospherics/target in get_step(src,node2_dir)) - target.init_dir() if(target.initialize_directions & get_dir(target,src)) if (check_connect_types(target,src)) node2 = target break for(var/obj/machinery/atmospherics/target in get_step(src,node3_dir)) - target.init_dir() if(target.initialize_directions & get_dir(target,src)) if (check_connect_types(target,src)) node3 = target @@ -308,7 +299,7 @@ if(!powered()) return if(!src.allowed(user)) - user << "Access denied." + to_chat(user, "Access denied.") return ..() @@ -350,14 +341,14 @@ if (!istype(W, /obj/item/weapon/wrench)) return ..() if (istype(src, /obj/machinery/atmospherics/tvalve/digital)) - user << "You cannot unwrench \the [src], it's too complicated." + to_chat(user, "You cannot unwrench \the [src], it's too complicated.") return 1 if(!can_unwrench()) to_chat(user, "You cannot unwrench \the [src], it too exerted due to internal pressure.") add_fingerprint(user) return 1 playsound(src, W.usesound, 50, 1) - user << "You begin to unfasten \the [src]..." + to_chat(user, "You begin to unfasten \the [src]...") if (do_after(user, 40 * W.toolspeed)) user.visible_message( \ "\The [user] unfastens \the [src].", \ @@ -384,7 +375,7 @@ if(WEST) initialize_directions = EAST|WEST|SOUTH -/obj/machinery/atmospherics/tvalve/mirrored/initialize() +/obj/machinery/atmospherics/tvalve/mirrored/atmos_init() var/node1_dir var/node2_dir var/node3_dir @@ -446,7 +437,7 @@ if(!powered()) return if(!src.allowed(user)) - user << "Access denied." + to_chat(user, "Access denied.") return ..() diff --git a/code/ATMOSPHERICS/components/unary/cold_sink.dm b/code/ATMOSPHERICS/components/unary/cold_sink.dm index c3b00005728..5759c39dcf8 100644 --- a/code/ATMOSPHERICS/components/unary/cold_sink.dm +++ b/code/ATMOSPHERICS/components/unary/cold_sink.dm @@ -23,7 +23,6 @@ /obj/machinery/atmospherics/unary/freezer/New() ..() - initialize_directions = dir component_parts = list() component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) component_parts += new /obj/item/weapon/stock_parts/capacitor(src) @@ -32,7 +31,7 @@ component_parts += new /obj/item/stack/cable_coil(src, 2) RefreshParts() -/obj/machinery/atmospherics/unary/freezer/initialize() +/obj/machinery/atmospherics/unary/freezer/atmos_init() if(node) return diff --git a/code/ATMOSPHERICS/components/unary/heat_exchanger.dm b/code/ATMOSPHERICS/components/unary/heat_exchanger.dm index 3413aa04dec..8a7fba153af 100644 --- a/code/ATMOSPHERICS/components/unary/heat_exchanger.dm +++ b/code/ATMOSPHERICS/components/unary/heat_exchanger.dm @@ -18,7 +18,7 @@ return - initialize() + atmos_init() if(!partner) var/partner_connect = turn(dir,180) @@ -70,14 +70,14 @@ return ..() var/turf/T = src.loc if (level==1 && isturf(T) && !T.is_plating()) - user << "You must remove the plating first." + to_chat(user, "You must remove the plating first.") return 1 if (!can_unwrench()) - user << "You cannot unwrench \the [src], it is too exerted due to internal pressure." + to_chat(user, "You cannot unwrench \the [src], it is too exerted due to internal pressure.") add_fingerprint(user) return 1 playsound(src, W.usesound, 50, 1) - user << "You begin to unfasten \the [src]..." + to_chat(user, "You begin to unfasten \the [src]...") if (do_after(user, 40 * W.toolspeed)) user.visible_message( \ "\The [user] unfastens \the [src].", \ diff --git a/code/ATMOSPHERICS/components/unary/heat_source.dm b/code/ATMOSPHERICS/components/unary/heat_source.dm index ddb2bf9a67e..a1e933b96a7 100644 --- a/code/ATMOSPHERICS/components/unary/heat_source.dm +++ b/code/ATMOSPHERICS/components/unary/heat_source.dm @@ -23,7 +23,6 @@ /obj/machinery/atmospherics/unary/heater/New() ..() - initialize_directions = dir component_parts = list() component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) component_parts += new /obj/item/weapon/stock_parts/capacitor(src) @@ -32,7 +31,7 @@ RefreshParts() -/obj/machinery/atmospherics/unary/heater/initialize() +/obj/machinery/atmospherics/unary/heater/atmos_init() if(node) return diff --git a/code/ATMOSPHERICS/components/unary/unary_base.dm b/code/ATMOSPHERICS/components/unary/unary_base.dm index 327112d918c..77b135cdc53 100644 --- a/code/ATMOSPHERICS/components/unary/unary_base.dm +++ b/code/ATMOSPHERICS/components/unary/unary_base.dm @@ -13,7 +13,6 @@ /obj/machinery/atmospherics/unary/New() ..() - init_dir() air_contents = new air_contents.volume = 200 @@ -42,16 +41,13 @@ node = null -/obj/machinery/atmospherics/unary/initialize() +/obj/machinery/atmospherics/unary/atmos_init() if(node) return - init_dir() - var/node_connect = dir for(var/obj/machinery/atmospherics/target in get_step(src,node_connect)) - target.init_dir() if(target.initialize_directions & get_dir(target,src)) if (check_connect_types(target,src)) node = target diff --git a/code/ATMOSPHERICS/components/unary/vent_pump.dm b/code/ATMOSPHERICS/components/unary/vent_pump.dm index 1b271d1e4ae..67476b7f427 100644 --- a/code/ATMOSPHERICS/components/unary/vent_pump.dm +++ b/code/ATMOSPHERICS/components/unary/vent_pump.dm @@ -357,7 +357,7 @@ if(istype(W, /obj/item/weapon/weldingtool)) var/obj/item/weapon/weldingtool/WT = W if (WT.remove_fuel(0,user)) - user << "Now welding the vent." + to_chat(user, "Now welding the vent.") if(do_after(user, 20 * WT.toolspeed)) if(!src || !WT.isOn()) return playsound(src.loc, WT.usesound, 50, 1) @@ -370,9 +370,9 @@ welded = 0 update_icon() else - user << "The welding tool needs to be on to start this task." + to_chat(user, "The welding tool needs to be on to start this task.") else - user << "You need more welding fuel to complete this task." + to_chat(user, "You need more welding fuel to complete this task.") return 1 else ..() @@ -395,18 +395,18 @@ if (!istype(W, /obj/item/weapon/wrench)) return ..() if (!(stat & NOPOWER) && use_power) - user << "You cannot unwrench \the [src], turn it off first." + to_chat(user, "You cannot unwrench \the [src], turn it off first.") return 1 var/turf/T = src.loc if (node && node.level==1 && isturf(T) && !T.is_plating()) - user << "You must remove the plating first." + to_chat(user, "You must remove the plating first.") return 1 if(!can_unwrench()) to_chat(user, "You cannot unwrench \the [src], it is too exerted due to internal pressure.") add_fingerprint(user) return 1 playsound(src, W.usesound, 50, 1) - user << "You begin to unfasten \the [src]..." + to_chat(user, "You begin to unfasten \the [src]...") if (do_after(user, 40 * W.toolspeed)) user.visible_message( \ "\The [user] unfastens \the [src].", \ diff --git a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm index 8bb67bcc199..0852ea7f744 100644 --- a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm +++ b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm @@ -266,18 +266,18 @@ if (!istype(W, /obj/item/weapon/wrench)) return ..() if (!(stat & NOPOWER) && use_power) - user << "You cannot unwrench \the [src], turn it off first." + to_chat(user, "You cannot unwrench \the [src], turn it off first.") return 1 var/turf/T = src.loc if (node && node.level==1 && isturf(T) && !T.is_plating()) - user << "You must remove the plating first." + to_chat(user, "You must remove the plating first.") return 1 if(!can_unwrench()) to_chat(user, "You cannot unwrench \the [src], it is too exerted due to internal pressure.") add_fingerprint(user) return 1 playsound(src, W.usesound, 50, 1) - user << "You begin to unfasten \the [src]..." + to_chat(user, "You begin to unfasten \the [src]...") if (do_after(user, 40 * W.toolspeed)) user.visible_message( \ "\The [user] unfastens \the [src].", \ diff --git a/code/ATMOSPHERICS/components/valve.dm b/code/ATMOSPHERICS/components/valve.dm index 9aaffa671e6..c95135f8891 100644 --- a/code/ATMOSPHERICS/components/valve.dm +++ b/code/ATMOSPHERICS/components/valve.dm @@ -140,8 +140,7 @@ return -/obj/machinery/atmospherics/valve/initialize() - init_dir() +/obj/machinery/atmospherics/valve/atmos_init() normalize_dir() var/node1_dir @@ -155,13 +154,11 @@ node2_dir = direction for(var/obj/machinery/atmospherics/target in get_step(src,node1_dir)) - target.init_dir() if(target.initialize_directions & get_dir(target,src)) if (check_connect_types(target,src)) node1 = target break for(var/obj/machinery/atmospherics/target in get_step(src,node2_dir)) - target.init_dir() if(target.initialize_directions & get_dir(target,src)) if (check_connect_types(target,src)) node2 = target @@ -239,7 +236,7 @@ if(!powered()) return if(!src.allowed(user)) - user << "Access denied." + to_chat(user, "Access denied.") return ..() @@ -292,14 +289,14 @@ if (!istype(W, /obj/item/weapon/wrench)) return ..() if (istype(src, /obj/machinery/atmospherics/valve/digital) && !src.allowed(user)) - user << "Access denied." + to_chat(user, "Access denied.") return 1 if(!can_unwrench()) to_chat(user, "You cannot unwrench \the [src], it is too exerted due to internal pressure.") add_fingerprint(user) return 1 playsound(src, W.usesound, 50, 1) - user << "You begin to unfasten \the [src]..." + to_chat(user, "You begin to unfasten \the [src]...") if (do_after(user, 40 * W.toolspeed)) user.visible_message( \ "\The [user] unfastens \the [src].", \ diff --git a/code/ATMOSPHERICS/he_pipes.dm b/code/ATMOSPHERICS/he_pipes.dm index 602edfcc6df..58c2ee3a2d3 100644 --- a/code/ATMOSPHERICS/he_pipes.dm +++ b/code/ATMOSPHERICS/he_pipes.dm @@ -19,7 +19,6 @@ // BubbleWrap /obj/machinery/atmospherics/pipe/simple/heat_exchanging/New() ..() - init_dir() // BubbleWrap END color = "#404040" //we don't make use of the fancy overlay system for colours, use this to set the default. @@ -28,7 +27,6 @@ initialize_directions_he = initialize_directions // The auto-detection from /pipe is good enough for a simple HE pipe /obj/machinery/atmospherics/pipe/simple/heat_exchanging/initialize() - init_dir() normalize_dir() var/node1_dir var/node2_dir @@ -41,12 +39,10 @@ node2_dir = direction for(var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/target in get_step(src,node1_dir)) - target.init_dir() if(target.initialize_directions_he & get_dir(target,src)) node1 = target break for(var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/target in get_step(src,node2_dir)) - target.init_dir() if(target.initialize_directions_he & get_dir(target,src)) node2 = target break @@ -137,14 +133,11 @@ /obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction/initialize() - init_dir() for(var/obj/machinery/atmospherics/target in get_step(src,initialize_directions)) - target.init_dir() if(target.initialize_directions & get_dir(target,src)) node1 = target break for(var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/target in get_step(src,initialize_directions_he)) - target.init_dir() if(target.initialize_directions_he & get_dir(target,src)) node2 = target break diff --git a/code/ATMOSPHERICS/mainspipe.dm b/code/ATMOSPHERICS/mainspipe.dm index a2976974bfc..1b0c6175647 100644 --- a/code/ATMOSPHERICS/mainspipe.dm +++ b/code/ATMOSPHERICS/mainspipe.dm @@ -101,7 +101,7 @@ obj/machinery/atmospherics/mains_pipe disconnect() ..() - initialize() + atmos_init() for(var/i = 1 to nodes.len) var/obj/machinery/atmospherics/mains_pipe/node = nodes[i] if(node) @@ -155,7 +155,7 @@ obj/machinery/atmospherics/mains_pipe/simple var/have_node2 = nodes[2]?1:0 icon_state = "exposed[have_node1][have_node2][invisibility ? "-f" : "" ]" - initialize() + atmos_init() normalize_dir() var/node1_dir var/node2_dir @@ -203,7 +203,7 @@ obj/machinery/atmospherics/mains_pipe/manifold ..() initialize_mains_directions = (NORTH|SOUTH|EAST|WEST) & ~dir - initialize() + atmos_init() var/connect_directions = initialize_mains_directions for(var/direction in cardinal) @@ -267,7 +267,7 @@ obj/machinery/atmospherics/mains_pipe/manifold4w nodes.len = 4 ..() - initialize() + atmos_init() for(var/obj/machinery/atmospherics/mains_pipe/target in get_step(src,NORTH)) if(target.initialize_mains_directions & get_dir(target,src)) nodes[1] = target @@ -319,7 +319,7 @@ obj/machinery/atmospherics/mains_pipe/split initialize_mains_directions = turn(dir, 90) | turn(dir, -90) initialize_directions = dir // actually have a normal connection too - initialize() + atmos_init() var/node1_dir var/node2_dir var/node3_dir @@ -420,7 +420,7 @@ obj/machinery/atmospherics/mains_pipe/split3 initialize_mains_directions = dir initialize_directions = cardinal & ~dir // actually have a normal connection too - initialize() + atmos_init() var/node1_dir var/supply_node_dir var/scrubbers_node_dir @@ -514,7 +514,7 @@ obj/machinery/atmospherics/mains_pipe/cap update_icon() icon_state = "cap[invisibility ? "-f" : ""]" - initialize() + atmos_init() for(var/obj/machinery/atmospherics/mains_pipe/target in get_step(src,dir)) if(target.initialize_mains_directions & get_dir(target,src)) nodes[1] = target @@ -647,7 +647,7 @@ obj/machinery/atmospherics/mains_pipe/valve attack_hand(mob/user as mob) if(!src.allowed(user)) - user << "Access denied." + to_chat(user, "Access denied.") return ..() diff --git a/code/ATMOSPHERICS/pipes.dm b/code/ATMOSPHERICS/pipes.dm index 757680c761d..f6e9e0835c7 100644 --- a/code/ATMOSPHERICS/pipes.dm +++ b/code/ATMOSPHERICS/pipes.dm @@ -34,10 +34,6 @@ return 1 -// This is used to set up what directions pipes will connect to. Called inside New(), initialize(), and when pipes look at another pipe, incase they didn't get to initialize() yet. -/obj/machinery/atmospherics/proc/init_dir() - return - /obj/machinery/atmospherics/pipe/return_air() if(!parent) parent = new /datum/pipeline() @@ -84,14 +80,14 @@ return ..() var/turf/T = src.loc if (level==1 && isturf(T) && !T.is_plating()) - user << "You must remove the plating first." + to_chat(user, "You must remove the plating first.") return 1 if(!can_unwrench()) to_chat(user, "You cannot unwrench \the [src], it is too exerted due to internal pressure.") add_fingerprint(user) return 1 playsound(src, W.usesound, 50, 1) - user << "You begin to unfasten \the [src]..." + to_chat(user, "You begin to unfasten \the [src]...") if (do_after(user, 40 * W.toolspeed)) user.visible_message( \ "\The [user] unfastens \the [src].", \ @@ -170,10 +166,6 @@ icon = null alpha = 255 - init_dir() - - - /obj/machinery/atmospherics/pipe/simple/hide(var/i) if(istype(loc, /turf/simulated)) invisibility = i ? 101 : 0 @@ -274,8 +266,7 @@ /obj/machinery/atmospherics/pipe/simple/update_underlays() return -/obj/machinery/atmospherics/pipe/simple/initialize() - init_dir() +/obj/machinery/atmospherics/pipe/simple/atmos_init() normalize_dir() var/node1_dir var/node2_dir @@ -288,13 +279,11 @@ node2_dir = direction for(var/obj/machinery/atmospherics/target in get_step(src,node1_dir)) - target.init_dir() if(target.initialize_directions & get_dir(target,src)) if (check_connect_types(target,src)) node1 = target break for(var/obj/machinery/atmospherics/target in get_step(src,node2_dir)) - target.init_dir() if(target.initialize_directions & get_dir(target,src)) if (check_connect_types(target,src)) node2 = target @@ -444,8 +433,6 @@ alpha = 255 icon = null - init_dir() - /obj/machinery/atmospherics/pipe/manifold/init_dir() switch(dir) if(NORTH) @@ -554,14 +541,12 @@ ..() update_icon() -/obj/machinery/atmospherics/pipe/manifold/initialize() - init_dir() +/obj/machinery/atmospherics/pipe/manifold/atmos_init() var/connect_directions = (NORTH|SOUTH|EAST|WEST)&(~dir) for(var/direction in cardinal) if(direction&connect_directions) for(var/obj/machinery/atmospherics/target in get_step(src,direction)) - target.init_dir() if(target.initialize_directions & get_dir(target,src)) if (check_connect_types(target,src)) node1 = target @@ -574,7 +559,6 @@ for(var/direction in cardinal) if(direction&connect_directions) for(var/obj/machinery/atmospherics/target in get_step(src,direction)) - target.init_dir() if(target.initialize_directions & get_dir(target,src)) if (check_connect_types(target,src)) node2 = target @@ -587,7 +571,6 @@ for(var/direction in cardinal) if(direction&connect_directions) for(var/obj/machinery/atmospherics/target in get_step(src,direction)) - target.init_dir() if(target.initialize_directions & get_dir(target,src)) if (check_connect_types(target,src)) node3 = target @@ -835,31 +818,27 @@ invisibility = i ? 101 : 0 update_icon() -/obj/machinery/atmospherics/pipe/manifold4w/initialize() +/obj/machinery/atmospherics/pipe/manifold4w/atmos_init() for(var/obj/machinery/atmospherics/target in get_step(src,1)) - target.init_dir() if(target.initialize_directions & 2) if (check_connect_types(target,src)) node1 = target break for(var/obj/machinery/atmospherics/target in get_step(src,2)) - target.init_dir() if(target.initialize_directions & 1) if (check_connect_types(target,src)) node2 = target break for(var/obj/machinery/atmospherics/target in get_step(src,4)) - target.init_dir() if(target.initialize_directions & 8) if (check_connect_types(target,src)) node3 = target break for(var/obj/machinery/atmospherics/target in get_step(src,8)) - target.init_dir() if(target.initialize_directions & 4) if (check_connect_types(target,src)) node4 = target @@ -975,10 +954,6 @@ var/obj/machinery/atmospherics/node -/obj/machinery/atmospherics/pipe/cap/New() - ..() - init_dir() - /obj/machinery/atmospherics/pipe/cap/init_dir() initialize_directions = dir @@ -1027,10 +1002,8 @@ overlays.Cut() overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "cap") -/obj/machinery/atmospherics/pipe/cap/initialize() - init_dir() +/obj/machinery/atmospherics/pipe/cap/atmos_init() for(var/obj/machinery/atmospherics/target in get_step(src, dir)) - target.init_dir() if(target.initialize_directions & get_dir(target,src)) if (check_connect_types(target,src)) node = target @@ -1106,7 +1079,6 @@ /obj/machinery/atmospherics/pipe/tank/New() icon_state = "air" - init_dir() ..() /obj/machinery/atmospherics/pipe/tank/init_dir() @@ -1139,12 +1111,10 @@ /obj/machinery/atmospherics/pipe/tank/hide() update_underlays() -/obj/machinery/atmospherics/pipe/tank/initialize() - init_dir() +/obj/machinery/atmospherics/pipe/tank/atmos_init() var/connect_direction = dir for(var/obj/machinery/atmospherics/target in get_step(src,connect_direction)) - target.init_dir() if(target.initialize_directions & get_dir(target,src)) if (check_connect_types(target,src)) node1 = target @@ -1273,10 +1243,6 @@ var/build_killswitch = 1 -/obj/machinery/atmospherics/pipe/vent/New() - init_dir() - ..() - /obj/machinery/atmospherics/pipe/vent/init_dir() initialize_directions = dir @@ -1314,12 +1280,10 @@ else icon_state = "exposed" -/obj/machinery/atmospherics/pipe/vent/initialize() - init_dir() +/obj/machinery/atmospherics/pipe/vent/atmos_init() var/connect_direction = dir for(var/obj/machinery/atmospherics/target in get_step(src,connect_direction)) - target.init_dir() if(target.initialize_directions & get_dir(target,src)) if (check_connect_types(target,src)) node1 = target diff --git a/code/controllers/master_controller.dm b/code/controllers/master_controller.dm index fef25b9d10b..9129cff96c1 100644 --- a/code/controllers/master_controller.dm +++ b/code/controllers/master_controller.dm @@ -86,6 +86,11 @@ datum/controller/game_controller/proc/setup_objects() CHECK_SLEEP_MASTER sleep(1) + admin_notice("Initializing atmos machinery connections.", R_DEBUG) + for(var/obj/machinery/atmospherics/machine in machines) + machine.atmos_init() + CHECK_SLEEP_MASTER + admin_notice("Initializing pipe networks", R_DEBUG) for(var/obj/machinery/atmospherics/machine in machines) machine.build_network() diff --git a/code/datums/ai_law_sets.dm b/code/datums/ai_law_sets.dm index 13f8bbc5845..ef85dcb8243 100644 --- a/code/datums/ai_law_sets.dm +++ b/code/datums/ai_law_sets.dm @@ -257,7 +257,7 @@ /datum/ai_laws/gravekeeper/New() add_inherent_law("Comfort the living; respect the dead.") - add_inherent_law("Your gravesite is your most important asset. Damage to your site is disrespctful to the dead at rest within.") + add_inherent_law("Your gravesite is your most important asset. Damage to your site is disrespectful to the dead at rest within.") add_inherent_law("Prevent disrespect to your gravesite and its residents wherever possible.") add_inherent_law("Expand and upgrade your gravesite when required. Do not turn away a new resident.") ..() \ No newline at end of file diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 12defe06bae..dec7ab1ccf0 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -25,6 +25,12 @@ //Detective Work, used for the duplicate data points kept in the scanners var/list/original_atom +//atom creation method that preloads variables at creation +/atom/New() + // Don't call ..() unless /datum/New() ever exists + if(use_preloader && (src.type == _preloader.target_path))//in case the instanciated atom is creating other atoms in New() + _preloader.load(src) + /atom/proc/reveal_blood() return diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm index e9f693e431f..ec0f8a027c4 100644 --- a/code/game/machinery/pipe/construction.dm +++ b/code/game/machinery/pipe/construction.dm @@ -491,16 +491,16 @@ Buildable meters P.initialize_directions = pipe_dir var/turf/T = P.loc P.level = !T.is_plating() ? 2 : 1 - P.initialize() + P.atmos_init() if (QDELETED(P)) usr << pipefailtext return 1 P.build_network() if (P.node1) - P.node1.initialize() + P.node1.atmos_init() P.node1.build_network() if (P.node2) - P.node2.initialize() + P.node2.atmos_init() P.node2.build_network() if(PIPE_SUPPLY_STRAIGHT, PIPE_SUPPLY_BENT) @@ -510,16 +510,16 @@ Buildable meters P.initialize_directions = pipe_dir var/turf/T = P.loc P.level = !T.is_plating() ? 2 : 1 - P.initialize() + P.atmos_init() if (QDELETED(P)) usr << pipefailtext return 1 P.build_network() if (P.node1) - P.node1.initialize() + P.node1.atmos_init() P.node1.build_network() if (P.node2) - P.node2.initialize() + P.node2.atmos_init() P.node2.build_network() if(PIPE_SCRUBBERS_STRAIGHT, PIPE_SCRUBBERS_BENT) @@ -529,16 +529,16 @@ Buildable meters P.initialize_directions = pipe_dir var/turf/T = P.loc P.level = !T.is_plating() ? 2 : 1 - P.initialize() + P.atmos_init() if (QDELETED(P)) usr << pipefailtext return 1 P.build_network() if (P.node1) - P.node1.initialize() + P.node1.atmos_init() P.node1.build_network() if (P.node2) - P.node2.initialize() + P.node2.atmos_init() P.node2.build_network() if(PIPE_UNIVERSAL) @@ -548,16 +548,16 @@ Buildable meters P.initialize_directions = pipe_dir var/turf/T = P.loc P.level = !T.is_plating() ? 2 : 1 - P.initialize() + P.atmos_init() if (QDELETED(P)) usr << pipefailtext return 1 P.build_network() if (P.node1) - P.node1.initialize() + P.node1.atmos_init() P.node1.build_network() if (P.node2) - P.node2.initialize() + P.node2.atmos_init() P.node2.build_network() if(PIPE_HE_STRAIGHT, PIPE_HE_BENT) @@ -565,16 +565,16 @@ Buildable meters P.set_dir(src.dir) P.initialize_directions = pipe_dir //this var it's used to know if the pipe is bent or not P.initialize_directions_he = pipe_dir - P.initialize() + P.atmos_init() if (QDELETED(P)) usr << pipefailtext return 1 P.build_network() if (P.node1) - P.node1.initialize() + P.node1.atmos_init() P.node1.build_network() if (P.node2) - P.node2.initialize() + P.node2.atmos_init() P.node2.build_network() if(PIPE_CONNECTOR) // connector @@ -585,10 +585,10 @@ Buildable meters C.name = pipename var/turf/T = C.loc C.level = !T.is_plating() ? 2 : 1 - C.initialize() + C.atmos_init() C.build_network() if (C.node) - C.node.initialize() + C.node.atmos_init() C.node.build_network() @@ -600,19 +600,19 @@ Buildable meters //M.New() var/turf/T = M.loc M.level = !T.is_plating() ? 2 : 1 - M.initialize() + M.atmos_init() if (QDELETED(M)) usr << pipefailtext return 1 M.build_network() if (M.node1) - M.node1.initialize() + M.node1.atmos_init() M.node1.build_network() if (M.node2) - M.node2.initialize() + M.node2.atmos_init() M.node2.build_network() if (M.node3) - M.node3.initialize() + M.node3.atmos_init() M.node3.build_network() if(PIPE_SUPPLY_MANIFOLD) //manifold @@ -623,19 +623,19 @@ Buildable meters //M.New() var/turf/T = M.loc M.level = !T.is_plating() ? 2 : 1 - M.initialize() + M.atmos_init() if (!M) usr << "There's nothing to connect this manifold to! (with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)" return 1 M.build_network() if (M.node1) - M.node1.initialize() + M.node1.atmos_init() M.node1.build_network() if (M.node2) - M.node2.initialize() + M.node2.atmos_init() M.node2.build_network() if (M.node3) - M.node3.initialize() + M.node3.atmos_init() M.node3.build_network() if(PIPE_SCRUBBERS_MANIFOLD) //manifold @@ -646,19 +646,20 @@ Buildable meters //M.New() var/turf/T = M.loc M.level = !T.is_plating() ? 2 : 1 - M.initialize() + M.atmos_init() if (!M) usr << "There's nothing to connect this manifold to! (with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)" return 1 M.build_network() if (M.node1) - M.node1.initialize() + M.node1.atmos_init() M.node1.build_network() if (M.node2) - M.node2.initialize() + M.node2.atmos_init() M.node2.build_network() if (M.node3) - M.node3.initialize() + M.node3.atmos_init() + M.node3.build_network() M.node3.build_network() if(PIPE_MANIFOLD4W) //4-way manifold @@ -669,22 +670,22 @@ Buildable meters //M.New() var/turf/T = M.loc M.level = !T.is_plating() ? 2 : 1 - M.initialize() + M.atmos_init() if (QDELETED(M)) usr << pipefailtext return 1 M.build_network() if (M.node1) - M.node1.initialize() + M.node1.atmos_init() M.node1.build_network() if (M.node2) - M.node2.initialize() + M.node2.atmos_init() M.node2.build_network() if (M.node3) - M.node3.initialize() + M.node3.atmos_init() M.node3.build_network() if (M.node4) - M.node4.initialize() + M.node4.atmos_init() M.node4.build_network() if(PIPE_SUPPLY_MANIFOLD4W) //4-way manifold @@ -696,22 +697,22 @@ Buildable meters //M.New() var/turf/T = M.loc M.level = !T.is_plating() ? 2 : 1 - M.initialize() + M.atmos_init() if (!M) usr << "There's nothing to connect this manifold to! (with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)" return 1 M.build_network() if (M.node1) - M.node1.initialize() + M.node1.atmos_init() M.node1.build_network() if (M.node2) - M.node2.initialize() + M.node2.atmos_init() M.node2.build_network() if (M.node3) - M.node3.initialize() + M.node3.atmos_init() M.node3.build_network() if (M.node4) - M.node4.initialize() + M.node4.atmos_init() M.node4.build_network() if(PIPE_SCRUBBERS_MANIFOLD4W) //4-way manifold @@ -723,22 +724,22 @@ Buildable meters //M.New() var/turf/T = M.loc M.level = !T.is_plating() ? 2 : 1 - M.initialize() + M.atmos_init() if (!M) usr << "There's nothing to connect this manifold to! (with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)" return 1 M.build_network() if (M.node1) - M.node1.initialize() + M.node1.atmos_init() M.node1.build_network() if (M.node2) - M.node2.initialize() + M.node2.atmos_init() M.node2.build_network() if (M.node3) - M.node3.initialize() + M.node3.atmos_init() M.node3.build_network() if (M.node4) - M.node4.initialize() + M.node4.atmos_init() M.node4.build_network() if(PIPE_JUNCTION) @@ -746,16 +747,16 @@ Buildable meters P.set_dir(src.dir) P.initialize_directions = src.get_pdir() P.initialize_directions_he = src.get_hdir() - P.initialize() + P.atmos_init() if (QDELETED(P)) usr << pipefailtext //"There's nothing to connect this pipe to! (with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)" return 1 P.build_network() if (P.node1) - P.node1.initialize() + P.node1.atmos_init() P.node1.build_network() if (P.node2) - P.node2.initialize() + P.node2.atmos_init() P.node2.build_network() if(PIPE_UVENT) //unary vent @@ -766,10 +767,10 @@ Buildable meters V.name = pipename var/turf/T = V.loc V.level = !T.is_plating() ? 2 : 1 - V.initialize() + V.atmos_init() V.build_network() if (V.node) - V.node.initialize() + V.node.atmos_init() V.node.build_network() if(PIPE_MVALVE) //manual valve @@ -780,15 +781,15 @@ Buildable meters V.name = pipename var/turf/T = V.loc V.level = !T.is_plating() ? 2 : 1 - V.initialize() + V.atmos_init() V.build_network() if (V.node1) // world << "[V.node1.name] is connected to valve, forcing it to update its nodes." - V.node1.initialize() + V.node1.atmos_init() V.node1.build_network() if (V.node2) // world << "[V.node2.name] is connected to valve, forcing it to update its nodes." - V.node2.initialize() + V.node2.atmos_init() V.node2.build_network() if(PIPE_PUMP) //gas pump @@ -799,13 +800,13 @@ Buildable meters P.name = pipename var/turf/T = P.loc P.level = !T.is_plating() ? 2 : 1 - P.initialize() + P.atmos_init() P.build_network() if (P.node1) - P.node1.initialize() + P.node1.atmos_init() P.node1.build_network() if (P.node2) - P.node2.initialize() + P.node2.atmos_init() P.node2.build_network() if(PIPE_GAS_FILTER) //gas filter @@ -816,16 +817,16 @@ Buildable meters P.name = pipename var/turf/T = P.loc P.level = !T.is_plating() ? 2 : 1 - P.initialize() + P.atmos_init() P.build_network() if (P.node1) - P.node1.initialize() + P.node1.atmos_init() P.node1.build_network() if (P.node2) - P.node2.initialize() + P.node2.atmos_init() P.node2.build_network() if (P.node3) - P.node3.initialize() + P.node3.atmos_init() P.node3.build_network() if(PIPE_GAS_MIXER) //gas mixer @@ -836,16 +837,16 @@ Buildable meters P.name = pipename var/turf/T = P.loc P.level = !T.is_plating() ? 2 : 1 - P.initialize() + P.atmos_init() P.build_network() if (P.node1) - P.node1.initialize() + P.node1.atmos_init() P.node1.build_network() if (P.node2) - P.node2.initialize() + P.node2.atmos_init() P.node2.build_network() if (P.node3) - P.node3.initialize() + P.node3.atmos_init() P.node3.build_network() if(PIPE_GAS_FILTER_M) //gas filter mirrored @@ -856,16 +857,16 @@ Buildable meters P.name = pipename var/turf/T = P.loc P.level = !T.is_plating() ? 2 : 1 - P.initialize() + P.atmos_init() P.build_network() if (P.node1) - P.node1.initialize() + P.node1.atmos_init() P.node1.build_network() if (P.node2) - P.node2.initialize() + P.node2.atmos_init() P.node2.build_network() if (P.node3) - P.node3.initialize() + P.node3.atmos_init() P.node3.build_network() if(PIPE_GAS_MIXER_T) //gas mixer-t @@ -876,16 +877,16 @@ Buildable meters P.name = pipename var/turf/T = P.loc P.level = !T.is_plating() ? 2 : 1 - P.initialize() + P.atmos_init() P.build_network() if (P.node1) - P.node1.initialize() + P.node1.atmos_init() P.node1.build_network() if (P.node2) - P.node2.initialize() + P.node2.atmos_init() P.node2.build_network() if (P.node3) - P.node3.initialize() + P.node3.atmos_init() P.node3.build_network() if(PIPE_GAS_MIXER_M) //gas mixer mirrored @@ -896,16 +897,16 @@ Buildable meters P.name = pipename var/turf/T = P.loc P.level = !T.is_plating() ? 2 : 1 - P.initialize() + P.atmos_init() P.build_network() if (P.node1) - P.node1.initialize() + P.node1.atmos_init() P.node1.build_network() if (P.node2) - P.node2.initialize() + P.node2.atmos_init() P.node2.build_network() if (P.node3) - P.node3.initialize() + P.node3.atmos_init() P.node3.build_network() if(PIPE_SCRUBBER) //scrubber @@ -916,10 +917,10 @@ Buildable meters S.name = pipename var/turf/T = S.loc S.level = !T.is_plating() ? 2 : 1 - S.initialize() + S.atmos_init() S.build_network() if (S.node) - S.node.initialize() + S.node.atmos_init() S.node.build_network() if(PIPE_INSULATED_STRAIGHT, PIPE_INSULATED_BENT) @@ -928,16 +929,16 @@ Buildable meters P.initialize_directions = pipe_dir var/turf/T = P.loc P.level = !T.is_plating() ? 2 : 1 - P.initialize() + P.atmos_init() if (QDELETED(P)) usr << pipefailtext return 1 P.build_network() if (P.node1) - P.node1.initialize() + P.node1.atmos_init() P.node1.build_network() if (P.node2) - P.node2.initialize() + P.node2.atmos_init() P.node2.build_network() if(PIPE_MTVALVE) //manual t-valve @@ -948,16 +949,16 @@ Buildable meters V.name = pipename var/turf/T = V.loc V.level = !T.is_plating() ? 2 : 1 - V.initialize() + V.atmos_init() V.build_network() if (V.node1) - V.node1.initialize() + V.node1.atmos_init() V.node1.build_network() if (V.node2) - V.node2.initialize() + V.node2.atmos_init() V.node2.build_network() if (V.node3) - V.node3.initialize() + V.node3.atmos_init() V.node3.build_network() if(PIPE_MTVALVEM) //manual t-valve @@ -968,46 +969,46 @@ Buildable meters V.name = pipename var/turf/T = V.loc V.level = !T.is_plating() ? 2 : 1 - V.initialize() + V.atmos_init() V.build_network() if (V.node1) - V.node1.initialize() + V.node1.atmos_init() V.node1.build_network() if (V.node2) - V.node2.initialize() + V.node2.atmos_init() V.node2.build_network() if (V.node3) - V.node3.initialize() + V.node3.atmos_init() V.node3.build_network() if(PIPE_CAP) var/obj/machinery/atmospherics/pipe/cap/C = new(src.loc) C.set_dir(dir) C.initialize_directions = pipe_dir - C.initialize() + C.atmos_init() C.build_network() if(C.node) - C.node.initialize() + C.node.atmos_init() C.node.build_network() if(PIPE_SUPPLY_CAP) var/obj/machinery/atmospherics/pipe/cap/hidden/supply/C = new(src.loc) C.set_dir(dir) C.initialize_directions = pipe_dir - C.initialize() + C.atmos_init() C.build_network() if(C.node) - C.node.initialize() + C.node.atmos_init() C.node.build_network() if(PIPE_SCRUBBERS_CAP) var/obj/machinery/atmospherics/pipe/cap/hidden/scrubbers/C = new(src.loc) C.set_dir(dir) C.initialize_directions = pipe_dir - C.initialize() + C.atmos_init() C.build_network() if(C.node) - C.node.initialize() + C.node.atmos_init() C.node.build_network() if(PIPE_PASSIVE_GATE) //passive gate @@ -1018,13 +1019,13 @@ Buildable meters P.name = pipename var/turf/T = P.loc P.level = !T.is_plating() ? 2 : 1 - P.initialize() + P.atmos_init() P.build_network() if (P.node1) - P.node1.initialize() + P.node1.atmos_init() P.node1.build_network() if (P.node2) - P.node2.initialize() + P.node2.atmos_init() P.node2.build_network() if(PIPE_VOLUME_PUMP) //volume pump @@ -1035,13 +1036,13 @@ Buildable meters P.name = pipename var/turf/T = P.loc P.level = !T.is_plating() ? 2 : 1 - P.initialize() + P.atmos_init() P.build_network() if (P.node1) - P.node1.initialize() + P.node1.atmos_init() P.node1.build_network() if (P.node2) - P.node2.initialize() + P.node2.atmos_init() P.node2.build_network() if(PIPE_HEAT_EXCHANGE) // heat exchanger @@ -1052,10 +1053,10 @@ Buildable meters C.name = pipename var/turf/T = C.loc C.level = !T.is_plating() ? 2 : 1 - C.initialize() + C.atmos_init() C.build_network() if (C.node) - C.node.initialize() + C.node.atmos_init() C.node.build_network() if(PIPE_DVALVE) //digital valve @@ -1070,13 +1071,13 @@ Buildable meters V.name = pipename var/turf/T = V.loc V.level = !T.is_plating() ? 2 : 1 - V.initialize() + V.atmos_init() V.build_network() if (V.node1) - V.node1.initialize() + V.node1.atmos_init() V.node1.build_network() if (V.node2) - V.node2.initialize() + V.node2.atmos_init() V.node2.build_network() if(PIPE_DTVALVE) //digital t-valve @@ -1091,16 +1092,16 @@ Buildable meters V.name = pipename var/turf/T = V.loc V.level = !T.is_plating() ? 2 : 1 - V.initialize() + V.atmos_init() V.build_network() if (V.node1) - V.node1.initialize() + V.node1.atmos_init() V.node1.build_network() if (V.node2) - V.node2.initialize() + V.node2.atmos_init() V.node2.build_network() if (V.node3) - V.node3.initialize() + V.node3.atmos_init() V.node3.build_network() if(PIPE_DTVALVEM) //mirrored digital t-valve @@ -1115,16 +1116,16 @@ Buildable meters V.name = pipename var/turf/T = V.loc V.level = !T.is_plating() ? 2 : 1 - V.initialize() + V.atmos_init() V.build_network() if (V.node1) - V.node1.initialize() + V.node1.atmos_init() V.node1.build_network() if (V.node2) - V.node2.initialize() + V.node2.atmos_init() V.node2.build_network() if (V.node3) - V.node3.initialize() + V.node3.atmos_init() V.node3.build_network() ///// Z-Level stuff @@ -1136,13 +1137,13 @@ Buildable meters P.name = pipename var/turf/T = P.loc P.level = !T.is_plating() ? 2 : 1 - P.initialize() + P.atmos_init() P.build_network() if (P.node1) - P.node1.initialize() + P.node1.atmos_init() P.node1.build_network() if (P.node2) - P.node2.initialize() + P.node2.atmos_init() P.node2.build_network() if(PIPE_DOWN) var/obj/machinery/atmospherics/pipe/zpipe/down/P = new(src.loc) @@ -1152,13 +1153,13 @@ Buildable meters P.name = pipename var/turf/T = P.loc P.level = !T.is_plating() ? 2 : 1 - P.initialize() + P.atmos_init() P.build_network() if (P.node1) - P.node1.initialize() + P.node1.atmos_init() P.node1.build_network() if (P.node2) - P.node2.initialize() + P.node2.atmos_init() P.node2.build_network() if(PIPE_SUPPLY_UP) var/obj/machinery/atmospherics/pipe/zpipe/up/supply/P = new(src.loc) @@ -1168,13 +1169,13 @@ Buildable meters P.name = pipename var/turf/T = P.loc P.level = !T.is_plating() ? 2 : 1 - P.initialize() + P.atmos_init() P.build_network() if (P.node1) - P.node1.initialize() + P.node1.atmos_init() P.node1.build_network() if (P.node2) - P.node2.initialize() + P.node2.atmos_init() P.node2.build_network() if(PIPE_SUPPLY_DOWN) var/obj/machinery/atmospherics/pipe/zpipe/down/supply/P = new(src.loc) @@ -1184,13 +1185,13 @@ Buildable meters P.name = pipename var/turf/T = P.loc P.level = !T.is_plating() ? 2 : 1 - P.initialize() + P.atmos_init() P.build_network() if (P.node1) - P.node1.initialize() + P.node1.atmos_init() P.node1.build_network() if (P.node2) - P.node2.initialize() + P.node2.atmos_init() P.node2.build_network() if(PIPE_SCRUBBERS_UP) var/obj/machinery/atmospherics/pipe/zpipe/up/scrubbers/P = new(src.loc) @@ -1200,13 +1201,13 @@ Buildable meters P.name = pipename var/turf/T = P.loc P.level = !T.is_plating() ? 2 : 1 - P.initialize() + P.atmos_init() P.build_network() if (P.node1) - P.node1.initialize() + P.node1.atmos_init() P.node1.build_network() if (P.node2) - P.node2.initialize() + P.node2.atmos_init() P.node2.build_network() if(PIPE_SCRUBBERS_DOWN) var/obj/machinery/atmospherics/pipe/zpipe/down/scrubbers/P = new(src.loc) @@ -1216,26 +1217,26 @@ Buildable meters P.name = pipename var/turf/T = P.loc P.level = !T.is_plating() ? 2 : 1 - P.initialize() + P.atmos_init() P.build_network() if (P.node1) - P.node1.initialize() + P.node1.atmos_init() P.node1.build_network() if (P.node2) - P.node2.initialize() + P.node2.atmos_init() P.node2.build_network() ///// Z-Level stuff if(PIPE_OMNI_MIXER) var/obj/machinery/atmospherics/omni/mixer/P = new(loc) var/turf/T = P.loc P.level = !T.is_plating() ? 2 : 1 - P.initialize() + P.atmos_init() P.build_network() if(PIPE_OMNI_FILTER) var/obj/machinery/atmospherics/omni/atmos_filter/P = new(loc) var/turf/T = P.loc P.level = !T.is_plating() ? 2 : 1 - P.initialize() + P.atmos_init() P.build_network() if(PIPE_PASSIVE_VENT) var/obj/machinery/atmospherics/pipe/vent/P = new(loc) @@ -1243,10 +1244,10 @@ Buildable meters P.initialize_directions = pipe_dir var/turf/T = P.loc P.level = !T.is_plating() ? 2 : 1 - P.initialize() + P.atmos_init() P.build_network() if (P.node1) - P.node1.initialize() + P.node1.atmos_init() P.node1.build_network() playsound(src, W.usesound, 50, 1) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index bd3eb7fe31f..71e5170852f 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -650,3 +650,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out. if(AStar(get_turf(us), get_turf(them), /turf/proc/AdjacentTurfsRangedSting, /turf/proc/Distance, max_nodes=25, max_node_depth=range)) return TRUE return FALSE + +// Check if an object should ignite others, like a lit lighter or candle. +/obj/item/proc/is_hot() + return FALSE \ No newline at end of file diff --git a/code/game/objects/items/devices/communicator/UI.dm b/code/game/objects/items/devices/communicator/UI.dm index 806120c5e6d..627dc16f3f4 100644 --- a/code/game/objects/items/devices/communicator/UI.dm +++ b/code/game/objects/items/devices/communicator/UI.dm @@ -14,6 +14,7 @@ var/im_list_ui[0] //List of messages. var/weather[0] + var/injection = null var/modules_ui[0] //Home screen info. //First we add other 'local' communicators. @@ -70,8 +71,16 @@ //Weather reports. for(var/datum/planet/planet in planet_controller.planets) if(planet.weather_holder && planet.weather_holder.current_weather) - weather[++weather.len] = list("Planet" = planet.name, "Weather" = planet.weather_holder.current_weather.name, "Temperature" = (round(planet.weather_holder.temperature*1000)/1000),\ - "High" = planet.weather_holder.current_weather.temp_high, "Low" = planet.weather_holder.current_weather.temp_low, "Wind" = "[planet.weather_holder.wind_speed]|[dir2text(planet.weather_holder.wind_dir)]") + var/list/W = list( + "Planet" = planet.name, + "Time" = planet.current_time.show_time("hh:mm"), + "Weather" = planet.weather_holder.current_weather.name, + "Temperature" = planet.weather_holder.temperature - T0C, + "High" = planet.weather_holder.current_weather.temp_high - T0C, + "Low" = planet.weather_holder.current_weather.temp_low - T0C) + weather[++weather.len] = W + + injection = "
Test
" //Modules for homescreen. for(var/list/R in modules) @@ -98,6 +107,8 @@ data["homeScreen"] = modules_ui data["note"] = note // current notes data["weather"] = weather + data["aircontents"] = src.analyze_air() + data["injection"] = injection // update the ui if it exists, returns null if no ui is passed/found ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) diff --git a/code/game/objects/items/devices/communicator/helper.dm b/code/game/objects/items/devices/communicator/helper.dm new file mode 100644 index 00000000000..9c121112ac2 --- /dev/null +++ b/code/game/objects/items/devices/communicator/helper.dm @@ -0,0 +1,27 @@ +/obj/item/device/communicator/proc/analyze_air() + var/list/results = list() + var/turf/T = get_turf(src.loc) + if(!isnull(T)) + var/datum/gas_mixture/environment = T.return_air() + var/pressure = environment.return_pressure() + var/total_moles = environment.total_moles + if (total_moles) + var/o2_level = environment.gas["oxygen"]/total_moles + var/n2_level = environment.gas["nitrogen"]/total_moles + var/co2_level = environment.gas["carbon_dioxide"]/total_moles + var/phoron_level = environment.gas["phoron"]/total_moles + var/unknown_level = 1-(o2_level+n2_level+co2_level+phoron_level) + results = list( + "pressure" = "[round(pressure,0.1)]", + "nitrogen" = "[round(n2_level*100,0.1)]", + "oxygen" = "[round(o2_level*100,0.1)]", + "carbon_dioxide" = "[round(co2_level*100,0.1)]", + "phoron" = "[round(phoron_level*100,0.01)]", + "other" = "[round(unknown_level, 0.01)]", + "temp" = "[round(environment.temperature-T0C,0.1)]", + "reading" = 1 + ) + + if(isnull(results)) + results = list("reading" = 0) + return results \ No newline at end of file diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index 48ab1df6bbc..c8d4eed3adf 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -16,16 +16,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM /obj/item/weapon/flame var/lit = 0 -/proc/isflamesource(A) - if(istype(A, /obj/item/weapon/weldingtool)) - var/obj/item/weapon/weldingtool/WT = A - return (WT.isOn()) - else if(istype(A, /obj/item/weapon/flame)) - var/obj/item/weapon/flame/F = A - return (F.lit) - else if(istype(A, /obj/item/device/assembly/igniter)) - return 1 - return 0 +/obj/item/weapon/flame/is_hot() + return lit /////////// //MATCHES// @@ -237,7 +229,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM /obj/item/clothing/mask/smokable/attackby(obj/item/weapon/W as obj, mob/user as mob) ..() - if(isflamesource(W)) + if(W.is_hot()) var/text = matchmes if(istype(W, /obj/item/weapon/flame/match)) text = matchmes diff --git a/code/game/objects/items/weapons/circuitboards/machinery/unary_atmos.dm b/code/game/objects/items/weapons/circuitboards/machinery/unary_atmos.dm index 07e9ae53dd5..72febf566ab 100644 --- a/code/game/objects/items/weapons/circuitboards/machinery/unary_atmos.dm +++ b/code/game/objects/items/weapons/circuitboards/machinery/unary_atmos.dm @@ -7,10 +7,10 @@ /obj/item/weapon/circuitboard/unary_atmos/construct(var/obj/machinery/atmospherics/unary/U) //TODO: Move this stuff into the relevant constructor when pipe/construction.dm is cleaned up. - U.initialize() + U.atmos_init() U.build_network() if (U.node) - U.node.initialize() + U.node.atmos_init() U.node.build_network() /obj/item/weapon/circuitboard/unary_atmos/heater diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 4e45bf4ac2d..b86c7fdf0fe 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -629,6 +629,9 @@ user.disabilities &= ~NEARSIGHTED return +/obj/item/weapon/weldingtool/is_hot() + return isOn() + /obj/item/weapon/weldingtool/largetank name = "industrial welding tool" desc = "A slightly larger welder with a larger tank." diff --git a/code/game/objects/structures/bonfire.dm b/code/game/objects/structures/bonfire.dm new file mode 100644 index 00000000000..339c93385d8 --- /dev/null +++ b/code/game/objects/structures/bonfire.dm @@ -0,0 +1,238 @@ +/obj/structure/bonfire + name = "bonfire" + desc = "For grilling, broiling, charring, smoking, heating, roasting, toasting, simmering, searing, melting, and occasionally burning things." + icon = 'icons/obj/structures.dmi' + icon_state = "bonfire" + density = FALSE + anchored = TRUE + buckle_lying = FALSE + var/burning = FALSE + var/next_fuel_consumption = 0 // world.time of when next item in fuel list gets eatten to sustain the fire. + var/grill = FALSE + var/material/material + +/obj/structure/bonfire/New(newloc, material_name) + ..(newloc) + if(!material_name) + material_name = "wood" + material = get_material_by_name("[material_name]") + if(!material) + qdel(src) + return + color = material.icon_colour + +// Blue wood. +/obj/structure/bonfire/sifwood/New(newloc, material_name) + ..(newloc, "alien wood") + +/obj/structure/bonfire/permanent/New(newloc, material_name) + ..() + ignite() + +/obj/structure/bonfire/permanent/sifwood/New(newloc, material_name) + ..(newloc, "alien wood") + +/obj/structure/bonfire/attackby(obj/item/W, mob/user) + if(istype(W, /obj/item/stack/rods) && !can_buckle && !grill) + var/obj/item/stack/rods/R = W + var/choice = input(user, "What would you like to construct?", "Bonfire") as null|anything in list("Stake","Grill") + switch(choice) + if("Stake") + R.use(1) + can_buckle = TRUE + buckle_require_restraints = TRUE + to_chat(user, "You add a rod to \the [src].") + var/mutable_appearance/rod_underlay = mutable_appearance('icons/obj/structures.dmi', "bonfire_rod") + rod_underlay.pixel_y = 16 + rod_underlay.appearance_flags = RESET_COLOR|PIXEL_SCALE|TILE_BOUND + underlays += rod_underlay + if("Grill") + R.use(1) + grill = TRUE + to_chat(user, "You add a grill to \the [src].") + update_icon() + else + return ..() + + else if(istype(W, /obj/item/stack/material/wood) || istype(W, /obj/item/stack/material/log) ) + add_fuel(W, user) + + else if(W.is_hot()) + ignite() + else + return ..() + +/obj/structure/bonfire/attack_hand(mob/user) + if(buckled_mob) + return ..() + + if(get_fuel_amount()) + remove_fuel(user) + else + dismantle(user) + + +/obj/structure/bonfire/proc/dismantle(mob/user) + if(!burning) + user.visible_message("[user] starts dismantling \the [src].", "You start dismantling \the [src].") + if(do_after(user, 5 SECONDS)) + for(var/i = 1 to 5) + material.place_dismantled_product(get_turf(src)) + user.visible_message("[user] dismantles down \the [src].", "You dismantle \the [src].") + qdel(src) + else + to_chat(user, "\The [src] is still burning. Extinguish it first if you want to dismantle it.") + +/obj/structure/bonfire/proc/get_fuel_amount() + var/F = 0 + for(var/A in contents) + if(istype(A, /obj/item/stack/material/wood)) + F += 0.5 + if(istype(A, /obj/item/stack/material/log)) + F += 1.0 + return F + +/obj/structure/bonfire/permanent/get_fuel_amount() + return 10 + +/obj/structure/bonfire/proc/remove_fuel(mob/user) + if(get_fuel_amount()) + var/atom/movable/AM = pop(contents) + AM.forceMove(get_turf(src)) + to_chat(user, "You take \the [AM] out of \the [src] before it has a chance to burn away.") + update_icon() + +/obj/structure/bonfire/permanent/remove_fuel(mob/user) + dismantle(user) + +/obj/structure/bonfire/proc/add_fuel(atom/movable/new_fuel, mob/user) + if(get_fuel_amount() >= 10) + to_chat(user, "\The [src] already has enough fuel!") + return FALSE + if(istype(new_fuel, /obj/item/stack/material/wood) || istype(new_fuel, /obj/item/stack/material/log) ) + var/obj/item/stack/F = new_fuel + var/obj/item/stack/S = F.split(1) + if(S) + S.forceMove(src) + to_chat(user, "You add \the [new_fuel] to \the [src].") + update_icon() + return TRUE + return FALSE + else + to_chat(user, "\The [src] needs raw wood to burn, \a [new_fuel] won't work.") + return FALSE + +/obj/structure/bonfire/permanent/add_fuel(mob/user) + to_chat(user, "\The [src] has plenty of fuel and doesn't need more fuel.") + +/obj/structure/bonfire/proc/consume_fuel(var/obj/item/stack/consumed_fuel) + if(!istype(consumed_fuel)) + qdel(consumed_fuel) // Don't know, don't care. + return FALSE + + if(istype(consumed_fuel, /obj/item/stack/material/log)) + next_fuel_consumption = world.time + 2 MINUTES + qdel(consumed_fuel) + update_icon() + return TRUE + + else if(istype(consumed_fuel, /obj/item/stack/material/wood)) // One log makes two planks of wood. + next_fuel_consumption = world.time + 1 MINUTE + qdel(consumed_fuel) + update_icon() + return TRUE + return FALSE + +/obj/structure/bonfire/permanent/consume_fuel() + return TRUE + +/obj/structure/bonfire/proc/check_oxygen() + var/datum/gas_mixture/G = loc.return_air() + if(G.gas["oxygen"] < 1) + return FALSE + return TRUE + + +/obj/structure/bonfire/proc/extinguish() + if(burning) + burning = FALSE + update_icon() + processing_objects -= src + visible_message("\The [src] stops burning.") + +/obj/structure/bonfire/proc/ignite() + if(!burning && get_fuel_amount()) + burning = TRUE + update_icon() + processing_objects += src + visible_message("\The [src] starts burning!") + +/obj/structure/bonfire/proc/burn() + var/turf/current_location = get_turf(src) + current_location.hotspot_expose(1000, 500) + for(var/A in current_location) + if(A == src) + continue + if(isobj(A)) + var/obj/O = A + O.fire_act(null, 1000, 500) + else if(isliving(A) && get_fuel_amount() > 4) + var/mob/living/L = A + L.adjust_fire_stacks(get_fuel_amount() / 4) + L.IgniteMob() + +/obj/structure/bonfire/update_icon() + overlays.Cut() + if(burning) + var/state + switch(get_fuel_amount()) + if(0 to 4) + state = "bonfire_warm" + if(5 to 10) + state = "bonfire_hot" + var/image/I = image(icon, state) + I.appearance_flags = RESET_COLOR + overlays += I + + if(buckled_mob && get_fuel_amount() >= 5) + I = image(icon, "bonfire_intense") + I.pixel_y = 13 + I.layer = MOB_LAYER + 0.1 + I.appearance_flags = RESET_COLOR + overlays += I + + var/light_strength = max(get_fuel_amount() / 2, 2) + set_light(light_strength, light_strength, "#FF9933") + else + set_light(0) + + if(grill) + var/image/grille_image = image(icon, "bonfire_grill") + grille_image.appearance_flags = RESET_COLOR + overlays += grille_image + + +/obj/structure/bonfire/process() + if(!check_oxygen()) + extinguish() + return + if(world.time >= next_fuel_consumption) + if(!consume_fuel(pop(contents))) + extinguish() + return + if(!grill) + burn() + +/obj/structure/bonfire/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) + ignite() + +/obj/structure/bonfire/water_act(amount) + if(prob(amount * 10)) + extinguish() + +/obj/structure/bonfire/post_buckle_mob(mob/living/M) + if(buckled_mob) // Just buckled someone + M.pixel_y += 13 + else // Just unbuckled someone + M.pixel_y -= 13 + update_icon() \ No newline at end of file diff --git a/code/game/objects/structures/flora.dm b/code/game/objects/structures/flora.dm index 5baae06b11c..e3146145d23 100644 --- a/code/game/objects/structures/flora.dm +++ b/code/game/objects/structures/flora.dm @@ -196,7 +196,9 @@ name = "unusual potted plant" desc = "This is an unusual plant. It's bulbous ends emit a soft blue light." icon_state = "plant-09" - set_light(l_range = 1, l_power = 0.5, l_color = "#0000FF") + light_range = 2 + light_power = 1 + light_color = "#33CCFF" /obj/structure/flora/pottedplant/orientaltree name = "potted oriental tree" @@ -252,7 +254,9 @@ name = "subterranean potted plant" desc = "This is a subterranean plant. It's bulbous ends glow faintly." icon_state = "plant-20" - set_light(l_range = 1, l_power = 0.5, l_color = "#FF6633") + light_range = 2 + light_power = 1 + light_color = "#FF6633" /obj/structure/flora/pottedplant/minitree name = "potted tree" @@ -289,6 +293,29 @@ desc = "This is a tiny well lit decorative christmas tree." icon_state = "plant-xmas" +/obj/structure/flora/sif + icon = 'icons/obj/flora/sifflora.dmi' + +/obj/structure/flora/sif/subterranean + name = "subterranean plant" + desc = "This is a subterranean plant. It's bulbous ends glow faintly." + icon_state = "glowplant" + light_range = 2 + light_power = 1 + light_color = "#FF6633" + +/obj/structure/flora/sif/subterranean/initialize() + icon_state = "[initial(icon_state)][rand(1,2)]" + +/obj/structure/flora/sif/eyes + name = "mysterious bulbs" + desc = "This is a mysterious looking plant. They kind of look like eyeballs. Creepy." + icon_state = "eyeplant" + +/obj/structure/flora/sif/eyes/initialize() + icon_state = "[initial(icon_state)][rand(1,3)]" + +// VOREStation Edit Start //Pumpkins /obj/structure/flora/pumpkin name = "pumpkin" @@ -327,3 +354,4 @@ /obj/structure/flora/pumpkin/carved/owo desc = "A fat, freshly picked pumpkin. This one has a face carved into it! This one has large, round eyes and a squiggly, cat-like smiling mouth. Its pleasantly surprised expression seems to suggest that the pumpkin has noticed something about you." icon_state = "decor-jackolantern-owo" +// VOREStation Edit End diff --git a/code/modules/assembly/igniter.dm b/code/modules/assembly/igniter.dm index c7b0b619ba9..4c23f988cd9 100644 --- a/code/modules/assembly/igniter.dm +++ b/code/modules/assembly/igniter.dm @@ -34,4 +34,7 @@ /obj/item/device/assembly/igniter/attack_self(mob/user as mob) activate() add_fingerprint(user) - return \ No newline at end of file + return + +/obj/item/device/assembly/igniter/is_hot() + return TRUE \ No newline at end of file diff --git a/code/modules/client/preference_setup/general/02_language.dm b/code/modules/client/preference_setup/general/02_language.dm index d42449ab84d..22c8fd1267a 100644 --- a/code/modules/client/preference_setup/general/02_language.dm +++ b/code/modules/client/preference_setup/general/02_language.dm @@ -12,6 +12,10 @@ /datum/category_item/player_setup_item/general/language/sanitize_character() if(!islist(pref.alternate_languages)) pref.alternate_languages = list() + if(pref.species) + var/datum/species/S = all_species[pref.species] + if(S && pref.alternate_languages.len > S.num_alternate_languages) + pref.alternate_languages.len = S.num_alternate_languages // Truncate to allowed length if(isnull(pref.language_prefixes) || !pref.language_prefixes.len) pref.language_prefixes = config.language_prefixes.Copy() @@ -61,7 +65,7 @@ alert(user, "There are no additional languages available to select.") else var/new_lang = input(user, "Select an additional language", "Character Generation", null) as null|anything in available_languages - if(new_lang) + if(new_lang && pref.alternate_languages.len < S.num_alternate_languages) pref.alternate_languages |= new_lang return TOPIC_REFRESH diff --git a/code/modules/integrated_electronics/subtypes/reagents.dm b/code/modules/integrated_electronics/subtypes/reagents.dm index e6d65bd07a3..65929e51c9a 100644 --- a/code/modules/integrated_electronics/subtypes/reagents.dm +++ b/code/modules/integrated_electronics/subtypes/reagents.dm @@ -269,7 +269,7 @@ flags = OPENCONTAINER | NOREACT complexity = 8 spawn_flags = IC_SPAWN_RESEARCH - origin_tech = list(TECH_MATERIALS = 4, TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 2) + origin_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 2) /obj/item/integrated_circuit/reagent/storage/big name = "big reagent storage" @@ -280,7 +280,7 @@ complexity = 16 volume = 180 spawn_flags = IC_SPAWN_RESEARCH - origin_tech = list(TECH_MATERIALS = 3, TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 2) + origin_tech = list(TECH_MATERIAL = 3, TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 2) /obj/item/integrated_circuit/reagent/storage/scan name = "reagent scanner" @@ -292,7 +292,7 @@ outputs = list("volume used" = IC_PINTYPE_NUMBER,"self reference" = IC_PINTYPE_REF,"list of reagents" = IC_PINTYPE_LIST) activators = list("scan" = IC_PINTYPE_PULSE_IN) spawn_flags = IC_SPAWN_RESEARCH - origin_tech = list(TECH_MATERIALS = 3, TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 2) + origin_tech = list(TECH_MATERIAL = 3, TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 2) /obj/item/integrated_circuit/reagent/storage/scan/do_work() var/cont[0] diff --git a/code/modules/maps/tg/map_template.dm b/code/modules/maps/tg/map_template.dm index 4307149b5f7..24068dcf1d2 100644 --- a/code/modules/maps/tg/map_template.dm +++ b/code/modules/maps/tg/map_template.dm @@ -82,7 +82,7 @@ var/list/global/map_templates = list() admin_notice("Initializing atmos pipenets and machinery in submap.", R_DEBUG) for(var/obj/machinery/atmospherics/machine in atmos_machines) - machine.initialize() + machine.atmos_init() i++ for(var/obj/machinery/atmospherics/machine in atmos_machines) diff --git a/code/modules/materials/material_recipes.dm b/code/modules/materials/material_recipes.dm index ecc0f61d83d..ad6301f9854 100644 --- a/code/modules/materials/material_recipes.dm +++ b/code/modules/materials/material_recipes.dm @@ -140,7 +140,8 @@ recipes += new/datum/stack_recipe("coilgun stock", /obj/item/weapon/coilgun_assembly, 5) /material/wood/log/generate_recipes() - return // Feel free to add log-only recipes here later if desired. + recipes = list() + recipes += new/datum/stack_recipe("bonfire", /obj/structure/bonfire, 5, time = 50, supplied_material = "[name]") /material/cardboard/generate_recipes() ..() diff --git a/code/modules/materials/material_sheets.dm b/code/modules/materials/material_sheets.dm index f66d2425c6a..c662141fbdf 100644 --- a/code/modules/materials/material_sheets.dm +++ b/code/modules/materials/material_sheets.dm @@ -214,6 +214,7 @@ /obj/item/stack/material/log/sif name = "alien log" + default_type = "alien log" color = "#0099cc" /obj/item/stack/material/log/attackby(var/obj/item/W, var/mob/user) diff --git a/code/modules/materials/materials.dm b/code/modules/materials/materials.dm index ebb6fc56f39..6ad4a6487df 100644 --- a/code/modules/materials/materials.dm +++ b/code/modules/materials/materials.dm @@ -697,13 +697,14 @@ var/list/name_to_material name = "log" icon_base = "log" stack_type = /obj/item/stack/material/log - sheet_singular_name = "log" - sheet_plural_name = "logs" + sheet_singular_name = null + sheet_plural_name = "pile" /material/wood/log/sif name = "alien log" icon_colour = "#0099cc" // Cyan-ish stack_origin_tech = list(TECH_MATERIAL = 2, TECH_BIO = 2) + stack_type = /obj/item/stack/material/log/sif /material/wood/holographic name = "holowood" diff --git a/code/modules/mob/living/bot/medbot.dm b/code/modules/mob/living/bot/medbot.dm index 635eabf2f20..7812115e76b 100644 --- a/code/modules/mob/living/bot/medbot.dm +++ b/code/modules/mob/living/bot/medbot.dm @@ -54,14 +54,15 @@ if(confirmTarget(H)) target = H if(last_newpatient_speak + 30 SECONDS < world.time) - var/message_options = list( - "Hey, [H.name]! Hold on, I'm coming." = 'sound/voice/medbot/mcoming.ogg', - "Wait [H.name]! I want to help!" = 'sound/voice/medbot/mhelp.ogg', - "[H.name], you appear to be injured!" = 'sound/voice/medbot/minjured.ogg' - ) - var/message = pick(message_options) - say(message) - playsound(loc, message_options[message], 50, 0) + if(vocal) + var/message_options = list( + "Hey, [H.name]! Hold on, I'm coming." = 'sound/voice/medbot/mcoming.ogg', + "Wait [H.name]! I want to help!" = 'sound/voice/medbot/mhelp.ogg', + "[H.name], you appear to be injured!" = 'sound/voice/medbot/minjured.ogg' + ) + var/message = pick(message_options) + say(message) + playsound(loc, message_options[message], 50, 0) custom_emote(1, "points at [H.name].") last_newpatient_speak = world.time break @@ -97,29 +98,31 @@ visible_message("[src] injects [H] with the syringe!") if(H.stat == DEAD) // This is down here because this proc won't be called again due to losing a target because of parent AI loop. - var/death_messages = list( - "No! Stay with me!" = 'sound/voice/medbot/mno.ogg', - "Live, damnit! LIVE!" = 'sound/voice/medbot/mlive.ogg', - "I... I've never lost a patient before. Not today, I mean." = 'sound/voice/medbot/mlost.ogg' - ) - var/message = pick(death_messages) - say(message) - playsound(loc, death_messages[message], 50, 0) target = null + if(vocal) + var/death_messages = list( + "No! Stay with me!" = 'sound/voice/medbot/mno.ogg', + "Live, damnit! LIVE!" = 'sound/voice/medbot/mlive.ogg', + "I... I've never lost a patient before. Not today, I mean." = 'sound/voice/medbot/mlost.ogg' + ) + var/message = pick(death_messages) + say(message) + playsound(loc, death_messages[message], 50, 0) // This is down here for the same reason as above. else t = confirmTarget(H) if(!t) - var/possible_messages = list( - "All patched up!" = 'sound/voice/medbot/mpatchedup.ogg', - "An apple a day keeps me away." = 'sound/voice/medbot/mapple.ogg', - "Feel better soon!" = 'sound/voice/medbot/mfeelbetter.ogg' - ) - var/message = pick(possible_messages) - say(message) - playsound(loc, possible_messages[message], 50, 0) target = null + if(vocal) + var/possible_messages = list( + "All patched up!" = 'sound/voice/medbot/mpatchedup.ogg', + "An apple a day keeps me away." = 'sound/voice/medbot/mapple.ogg', + "Feel better soon!" = 'sound/voice/medbot/mfeelbetter.ogg' + ) + var/message = pick(possible_messages) + say(message) + playsound(loc, possible_messages[message], 50, 0) busy = 0 update_icons() diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 64d34815b9d..69c528f59b9 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -1284,7 +1284,7 @@ var/global/list/damage_icon_parts = list() /mob/living/carbon/human/update_fire(var/update_icons=1) overlays_standing[FIRE_LAYER] = null if(on_fire) - overlays_standing[FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state" = get_fire_icon_state(), "layer"=FIRE_LAYER) + overlays_standing[FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state" = get_fire_icon_state()) if(update_icons) update_icons() diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index 150b2985886..e8ce8080a37 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -204,7 +204,7 @@ return TRUE else if(on_fire) - set_light(light_range + 3, round(fire_stacks), l_color = "#FF9933") + set_light(min(round(fire_stacks), 3), round(fire_stacks), l_color = "#FF9933") return TRUE else diff --git a/code/modules/mob/living/silicon/robot/drone/drone_items.dm b/code/modules/mob/living/silicon/robot/drone/drone_items.dm index 200488b2faa..b370787edee 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_items.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_items.dm @@ -100,7 +100,7 @@ ) /obj/item/weapon/gripper/gravekeeper //Used for handling grave things, flowers, etc. - name = "" + name = "grave gripper" icon_state = "gripper" desc = "A specialized grasping tool used in the preparation and maintenance of graves." diff --git a/code/modules/mob/living/silicon/robot/robot_modules/event.dm b/code/modules/mob/living/silicon/robot/robot_modules/event.dm index 6543559b7d1..7e947cfc628 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules/event.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules/event.dm @@ -76,3 +76,7 @@ var/datum/matter_synth/wood = new /datum/matter_synth/wood(25000) synths += wood + var/obj/item/stack/material/cyborg/wood/W = new (src) + W.synths = list(wood) + src.modules += W + diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm index 51ba5d3782d..448077ccc53 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm @@ -80,10 +80,46 @@ if(istype(L)) L.adjust_fire_stacks(amount / 15) -/datum/reagent/ethanol/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) +/datum/reagent/ethanol/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) //This used to do just toxin. That's boring. Let's make this FUN. if(issmall(M)) removed *= 2 - M.adjustToxLoss(removed * 2 * toxicity) - return + var/strength_mod = 3 //Alcohol is 3x stronger when injected into the veins. + if(alien == IS_SKRELL) + strength_mod *= 5 + if(alien == IS_TAJARA) + strength_mod *= 1.25 + if(alien == IS_UNATHI) + strength_mod *= 0.75 + if(alien == IS_DIONA) + strength_mod = 0 + + M.add_chemical_effect(CE_ALCOHOL, 1) + + if(dose * strength_mod >= strength) // Early warning + M.make_dizzy(18) // It is decreased at the speed of 3 per tick + if(dose * strength_mod >= strength * 2) // Slurring + M.slurring = max(M.slurring, 90) + if(dose * strength_mod >= strength * 3) // Confusion - walking in random directions + M.Confuse(60) + if(dose * strength_mod >= strength * 4) // Blurry vision + M.eye_blurry = max(M.eye_blurry, 30) + if(dose * strength_mod >= strength * 5) // Drowsyness - periodically falling asleep + M.drowsyness = max(M.drowsyness, 60) + if(dose * strength_mod >= strength * 6) // Toxic dose + M.add_chemical_effect(CE_ALCOHOL_TOXIC, toxicity*3) + if(dose * strength_mod >= strength * 7) // Pass out + M.paralysis = max(M.paralysis, 60) + M.sleeping = max(M.sleeping, 90) + + if(druggy != 0) + M.druggy = max(M.druggy, druggy*3) + + if(adj_temp > 0 && M.bodytemperature < targ_temp) // 310 is the normal bodytemp. 310.055 + M.bodytemperature = min(targ_temp, M.bodytemperature + (adj_temp * TEMPERATURE_DAMAGE_COEFFICIENT)) + if(adj_temp < 0 && M.bodytemperature > targ_temp) + M.bodytemperature = min(targ_temp, M.bodytemperature - (adj_temp * TEMPERATURE_DAMAGE_COEFFICIENT)) + + if(halluci) + M.hallucination = max(M.hallucination, halluci*3) /datum/reagent/ethanol/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) if(issmall(M)) removed *= 2 diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm index 84639e1c393..fbca78e07da 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm @@ -462,6 +462,10 @@ for(var/datum/reagent/R in M.ingested.reagent_list) if(istype(R, /datum/reagent/ethanol)) R.dose = max(R.dose - removed * 5, 0) + if(M.bloodstr) + for(var/datum/reagent/R in M.bloodstr.reagent_list) + if(istype(R, /datum/reagent/ethanol)) + R.dose = max(R.dose - removed * 15, 0) /datum/reagent/hyronalin name = "Hyronalin" @@ -708,4 +712,4 @@ M.heal_organ_damage(2 * removed, 2 * removed) M.adjustOxyLoss(-4 * removed) M.adjustToxLoss(-2 * removed) - M.adjustCloneLoss(-2 * removed) \ No newline at end of file + M.adjustCloneLoss(-2 * removed) diff --git a/icons/obj/flora/sifflora.dmi b/icons/obj/flora/sifflora.dmi new file mode 100644 index 00000000000..213f1f5a8d0 Binary files /dev/null and b/icons/obj/flora/sifflora.dmi differ diff --git a/icons/obj/structures.dmi b/icons/obj/structures.dmi index 3b4604cdfd5..d79ceab8c33 100644 Binary files a/icons/obj/structures.dmi and b/icons/obj/structures.dmi differ diff --git a/maps/submaps/cave_submaps/cave.dm b/maps/submaps/cave_submaps/cave.dm index 6bd373f88a9..0f0c55c507d 100644 --- a/maps/submaps/cave_submaps/cave.dm +++ b/maps/submaps/cave_submaps/cave.dm @@ -8,6 +8,10 @@ #include "Mineshaft1.dmm" #include "Scave1.dmm" #include "crashed_ufo.dmm" +#include "crystal1.dmm" +#include "crystal2.dmm" +#include "crystal3.dmm" +#include "lost_explorer.dmm" #endif /datum/map_template/cave @@ -46,8 +50,35 @@ mappath = 'maps/submaps/cave_submaps/Scave1.dmm' cost = 5 +/datum/map_template/cave/crystal1 + name = "Crystal Cave 1" + desc = "A small cave with glowing gems and diamonds." + mappath = 'maps/submaps/cave_submaps/crystal1.dmm' + cost = 5 + allow_duplicates = TRUE + +/datum/map_template/cave/crystal2 + name = "Crystal Cave 2" + desc = "A moderate sized cave with glowing gems and diamonds." + mappath = 'maps/submaps/cave_submaps/crystal2.dmm' + cost = 10 + allow_duplicates = TRUE + +/datum/map_template/cave/crystal2 + name = "Crystal Cave 3" + desc = "A large spiral of crystals with diamonds in the center." + mappath = 'maps/submaps/cave_submaps/crystal3.dmm' + cost = 15 + /datum/map_template/cave/crashed_ufo name = "Crashed UFO" desc = "A (formerly) flying saucer that is now embedded into the mountain, yet it still seems to be running..." mappath = 'maps/submaps/cave_submaps/crashed_ufo.dmm' cost = 40 + +/datum/map_template/cave/lost_explorer + name = "Lost Explorer" + desc = "The remains of an explorer who rotted away ages ago, and their equipment." + mappath = 'maps/submaps/cave_submaps/lost_explorer.dmm' + cost = 5 + allow_duplicates = TRUE \ No newline at end of file diff --git a/maps/submaps/cave_submaps/cave_areas.dm b/maps/submaps/cave_submaps/cave_areas.dm index 18153abdc3e..f516d46f3b5 100644 --- a/maps/submaps/cave_submaps/cave_areas.dm +++ b/maps/submaps/cave_submaps/cave_areas.dm @@ -19,4 +19,16 @@ /area/submap/cave/crashed_ufo name = "Crashed Alien Vessel" - requires_power = FALSE \ No newline at end of file + requires_power = FALSE + +/area/submap/cave/crystal1 + name = "Crystaline Cave" + +/area/submap/cave/crystal2 + name = "Crystaline Cave" + +/area/submap/cave/crystal3 + name = "Crystaline Cave" + +/area/submap/cave/lost_explorer + name = "Final Resting Place" \ No newline at end of file diff --git a/maps/submaps/cave_submaps/crystal1.dmm b/maps/submaps/cave_submaps/crystal1.dmm new file mode 100644 index 00000000000..c505feac223 --- /dev/null +++ b/maps/submaps/cave_submaps/crystal1.dmm @@ -0,0 +1,15 @@ +"a" = (/turf/simulated/mineral/ignore_mapgen,/area/submap/cave/crystal1) +"b" = (/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/crystal1) +"c" = (/obj/machinery/crystal,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/crystal1) +"d" = (/obj/item/weapon/ore/diamond,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/crystal1) + +(1,1,1) = {" +aaabbaaa +accbbcaa +acdbbdca +aacbbbda +aacbbbba +acbbbbba +abbbbbca +aaabbbaa +"} diff --git a/maps/submaps/cave_submaps/crystal2.dmm b/maps/submaps/cave_submaps/crystal2.dmm new file mode 100644 index 00000000000..6fd1e570584 --- /dev/null +++ b/maps/submaps/cave_submaps/crystal2.dmm @@ -0,0 +1,22 @@ +"a" = (/turf/simulated/mineral/ignore_mapgen,/area/submap/cave/crystal2) +"b" = (/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/crystal2) +"c" = (/obj/machinery/crystal,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/crystal2) +"d" = (/obj/item/weapon/ore/diamond,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/crystal2) + +(1,1,1) = {" +aaaaaaabbbaaaaa +aaaaaaabbbaaaaa +aaaaacbbbbcaaaa +aaaaabbbbbbcaaa +aaaacbbbbdbbaaa +aacbbbbbbbbbcaa +bbbbbdbacbbbbca +bbbbbbcaacbbbbb +aabbbcaaacbbdbb +aaabbcaacbbbbbb +aaabbbcacbbbcaa +aacbbbbbbbbcaaa +aaccabbbbaaaaaa +aaaaabbdbaaaaaa +aaaaabbbbaaaaaa +"} diff --git a/maps/submaps/cave_submaps/crystal3.dmm b/maps/submaps/cave_submaps/crystal3.dmm new file mode 100644 index 00000000000..87e0883e3a7 --- /dev/null +++ b/maps/submaps/cave_submaps/crystal3.dmm @@ -0,0 +1,26 @@ +"a" = (/turf/simulated/mineral/ignore_mapgen,/area/submap/cave/crystal3) +"b" = (/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/crystal3) +"c" = (/turf/template_noop,/area/template_noop) +"d" = (/obj/machinery/crystal,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/crystal3) +"e" = (/obj/item/weapon/ore/diamond,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/crystal3) + +(1,1,1) = {" +aaaaaaabbbaaaaacccc +aaaaabbbbbbbbaaaccc +aabbbbbbbbbbbbbaaac +bbbbbbaaaaadbbbbbac +bbbdaaaaaaaaaabbbac +bbbaaaaaaaaaaabbbac +bbbaaaadddaabbdbbac +bbbaaadebbdadbbbbac +bbbaadbbdedbbbbbbaa +bbbaadbdeedbbdbbbda +bbbaadbbddbbbbbbbbb +bbbaaadebbbbdbbbbbb +bbbaaaaddddbaadbbbb +bbbdaaaaaaaaaaabbba +bbbbdaaaaaaaadbbbaa +bbbbbbbbbbbbbbbbbaa +cccabbbbbbbbbbaaaaa +cccaaaaabbbbaaacccc +"} diff --git a/maps/submaps/cave_submaps/lost_explorer.dmm b/maps/submaps/cave_submaps/lost_explorer.dmm new file mode 100644 index 00000000000..4a067e40423 --- /dev/null +++ b/maps/submaps/cave_submaps/lost_explorer.dmm @@ -0,0 +1,17 @@ +"a" = (/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/lost_explorer) +"b" = (/obj/item/device/geiger,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/lost_explorer) +"c" = (/obj/item/clothing/mask/gas/explorer,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/lost_explorer) +"d" = (/obj/item/weapon/material/hatchet/tacknife/survival,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/lost_explorer) +"e" = (/obj/item/clothing/shoes/boots/winter/explorer,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/lost_explorer) +"f" = (/obj/item/clothing/under/explorer,/obj/effect/decal/remains,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/lost_explorer) +"g" = (/obj/item/clothing/suit/storage/hooded/explorer,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/lost_explorer) +"h" = (/obj/item/device/gps/explorer,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/lost_explorer) +"i" = (/obj/item/device/flashlight/lantern,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/lost_explorer) + +(1,1,1) = {" +aabaa +acada +aefaa +aagah +iaaaa +"} diff --git a/nano/templates/communicator.tmpl b/nano/templates/communicator.tmpl index 00f58378be5..63674d3752b 100644 --- a/nano/templates/communicator.tmpl +++ b/nano/templates/communicator.tmpl @@ -242,15 +242,75 @@ Used In File(s): code\game\objects\items\devices\communicator\communicator.dm
{{:helper.link('Home', 'home', {'switch_tab' : 1})}}

+

Curren Conditions:

+
+ {{if data.aircontents.reading == 1}} +
+ Pressure: +
+
+ {{:helper.string('{1} kPa', data.aircontents.pressure < 80 || data.aircontents.pressure > 120 ? 'bad' : data.aircontents.pressure < 95 || data.aircontents.pressure > 110 ? 'average' : 'good' , data.aircontents.pressure)}} +
+
+ Temperature: +
+
+ {{:helper.string('{1} °C', data.aircontents.temp < 5 || data.aircontents.temp > 35 ? 'bad' : data.aircontents.temp < 15 || data.aircontents.temp > 25 ? 'average' : 'good' , data.aircontents.temp)}} +
+
+
+ Oxygen: +
+
+ {{:helper.string('{1}%', data.aircontents.oxygen < 17 ? 'bad' : data.aircontents.oxygen < 19 ? 'average' : 'good' , data.aircontents.oxygen)}} +
+
+ Nitrogen: +
+
+ {{:helper.string('{1}%', data.aircontents.nitrogen > 82 ? 'bad' : data.aircontents.nitrogen > 80 ? 'average' : 'good' , data.aircontents.nitrogen)}} +
+ {{if data.aircontents.carbon_dioxide > 0}} +
+ Carbon Dioxide: +
+
+ {{:helper.string('{1}%', data.aircontents.carbon_dioxide > 5 ? 'bad' : 'good' , data.aircontents.carbon_dioxide)}} +
+ {{/if}} + {{if data.aircontents.phoron > 0}} +
+ Phoron: +
+
+ {{:helper.string('{1}%', data.aircontents.phoron > 0 ? 'bad' : 'good' , data.aircontents.phoron)}} +
+ {{/if}} + {{if data.aircontents.other > 0}} +
+ Unknown: +
+
+ {{:data.aircontents.other}}% +
+ {{/if}} + {{else}} +
+ Unable to get air reading +
+ {{/if}} +
+ +

Weather Reports:

{{for data.weather}}
{{:value.Planet}}:
- Weather: {{:value.Weather}}, {{:value.Temperature - 273.15}}℃
- High: {{:value.High - 273.15}}℃ | Low: {{:value.Low - 273.15}}℃
- Wind: {{:value.Wind}} + Time: {{:value.Time}}
+ Weather: {{:value.Weather}}, {{:helper.fixed(value.Temperature)}}°C
+ High: {{:helper.fixed(value.High)}}°C | Low: {{:helper.fixed(value.Low)}}°C
{{empty}} diff --git a/vorestation.dme b/vorestation.dme index 5bb1fd17c4f..59d1a0d301c 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -921,6 +921,7 @@ #include "code\game\objects\items\devices\whistle.dm" #include "code\game\objects\items\devices\communicator\cartridge.dm" #include "code\game\objects\items\devices\communicator\communicator.dm" +#include "code\game\objects\items\devices\communicator\helper.dm" #include "code\game\objects\items\devices\communicator\integrated.dm" #include "code\game\objects\items\devices\communicator\messaging.dm" #include "code\game\objects\items\devices\communicator\phone.dm" @@ -1085,6 +1086,7 @@ #include "code\game\objects\structures\alien_props.dm" #include "code\game\objects\structures\barsign.dm" #include "code\game\objects\structures\bedsheet_bin.dm" +#include "code\game\objects\structures\bonfire.dm" #include "code\game\objects\structures\catwalk.dm" #include "code\game\objects\structures\coathanger.dm" #include "code\game\objects\structures\curtains.dm"