diff --git a/_maps/map_files/cyberiad/cyberiad.dmm b/_maps/map_files/cyberiad/cyberiad.dmm
index 1108d55aa5d..91ff38abb2c 100644
--- a/_maps/map_files/cyberiad/cyberiad.dmm
+++ b/_maps/map_files/cyberiad/cyberiad.dmm
@@ -6505,7 +6505,7 @@
"cve" = (/obj/item/assembly/timer,/obj/item/assembly/timer{pixel_x = 6},/obj/item/assembly/timer{pixel_x = -5; pixel_y = 6},/obj/structure/table,/obj/item/assembly/timer{pixel_x = -3; pixel_y = -4},/obj/item/assembly/timer{pixel_x = 8; pixel_y = 8},/obj/item/assembly/timer,/obj/machinery/light_switch{pixel_y = -23},/obj/machinery/light,/obj/machinery/requests_console{department = "Science"; departmentType = 2; name = "Science Requests Console"; pixel_x = 0; pixel_y = -30},/turf/simulated/floor/plasteel{icon_state = "white"},/area/toxins/mixing)
"cvf" = (/obj/machinery/atmospherics/trinary/mixer{density = 0; dir = 8; req_access = null},/turf/simulated/floor/plasteel{icon_state = "white"},/area/toxins/mixing)
"cvg" = (/obj/machinery/atmospherics/unary/portables_connector{dir = 4},/obj/item/radio/intercom{name = "station intercom (General)"; pixel_y = -28},/turf/simulated/floor/plasteel{icon_state = "white"},/area/toxins/mixing)
-"cvh" = (/obj/item/radio/beacon,/obj/effect/decal/warning_stripes/red/hollow,/turf/simulated/floor/plasteel/airless,/area/toxins/test_area)
+"cvh" = (/obj/item/radio/beacon,/obj/effect/decal/warning_stripes/red/hollow,/turf/simulated/floor/plasteel/airless/indestructible,/area/toxins/test_area)
"cvi" = (/obj/machinery/atmospherics/binary/valve{dir = 4},/obj/machinery/firealarm{dir = 1; pixel_y = -24},/turf/simulated/floor/plasteel{icon_state = "white"},/area/toxins/mixing)
"cvj" = (/obj/machinery/mass_driver{dir = 4; id_tag = "toxinsdriver"},/turf/simulated/floor/plating,/area/toxins/launch{name = "Toxins Launch Room"})
"cvk" = (/obj/structure/closet/crate,/obj/effect/spawner/lootdrop/maintenance,/turf/simulated/floor/plating,/area/maintenance/apmaint)
diff --git a/code/ATMOSPHERICS/atmospherics.dm b/code/ATMOSPHERICS/atmospherics.dm
index 1506cd26129..3fcf79fe8d8 100644
--- a/code/ATMOSPHERICS/atmospherics.dm
+++ b/code/ATMOSPHERICS/atmospherics.dm
@@ -7,10 +7,9 @@ Pipelines and other atmospheric objects combine to form pipe_networks
Pipes -> Pipelines
Pipelines + Other Objects -> Pipe network
-
*/
+GLOBAL_DATUM_INIT(pipe_icon_manager, /datum/pipe_icon_manager, new())
/obj/machinery/atmospherics
- auto_init = 0
anchored = 1
layer = 2.4 //under wires with their 2.44
idle_power_usage = 0
@@ -29,15 +28,12 @@ Pipelines + Other Objects -> Pipe network
var/pipe_color
var/obj/item/pipe/stored
var/image/pipe_image
- var/global/datum/pipe_icon_manager/icon_manager
/obj/machinery/atmospherics/New()
if(!armor)
armor = list(melee = 25, bullet = 10, laser = 10, energy = 100, bomb = 0, bio = 100, rad = 100)
..()
SSair.atmos_machinery += src
- if(!icon_manager)
- icon_manager = new()
if(!pipe_color)
pipe_color = color
@@ -45,12 +41,8 @@ Pipelines + Other Objects -> Pipe network
if(!pipe_color_check(pipe_color))
pipe_color = null
- // No need for a tween worldstart roundstart handler - pipenet creation is
- // handled there
-
-/obj/machinery/atmospherics/initialize()
- ..()
+/obj/machinery/atmospherics/proc/atmos_init()
if(can_unwrench)
stored = new(src, make_from = src)
@@ -73,9 +65,9 @@ Pipelines + Other Objects -> Pipe network
pipe_image.plane = HUD_PLANE
/obj/machinery/atmospherics/proc/check_icon_cache(var/safety = 0)
- if(!istype(icon_manager))
+ if(!istype(GLOB.pipe_icon_manager))
if(!safety) //to prevent infinite loops
- icon_manager = new()
+ GLOB.pipe_icon_manager = new()
check_icon_cache(1)
return 0
@@ -91,14 +83,14 @@ Pipelines + Other Objects -> Pipe network
/obj/machinery/atmospherics/proc/add_underlay(var/turf/T, var/obj/machinery/atmospherics/node, var/direction, var/icon_connect_type)
if(node)
if(T.intact && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe))
- //underlays += icon_manager.get_atmos_icon("underlay_down", direction, color_cache_name(node))
- underlays += icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "down" + icon_connect_type)
+ //underlays += GLOB.pipe_icon_manager.get_atmos_icon("underlay_down", direction, color_cache_name(node))
+ underlays += GLOB.pipe_icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "down" + icon_connect_type)
else
- //underlays += icon_manager.get_atmos_icon("underlay_intact", direction, color_cache_name(node))
- underlays += icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "intact" + icon_connect_type)
+ //underlays += GLOB.pipe_icon_manager.get_atmos_icon("underlay_intact", direction, color_cache_name(node))
+ underlays += GLOB.pipe_icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "intact" + icon_connect_type)
else
- //underlays += icon_manager.get_atmos_icon("underlay_exposed", direction, pipe_color)
- underlays += icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "exposed" + icon_connect_type)
+ //underlays += GLOB.pipe_icon_manager.get_atmos_icon("underlay_exposed", direction, pipe_color)
+ underlays += GLOB.pipe_icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "exposed" + icon_connect_type)
/obj/machinery/atmospherics/proc/update_underlays()
if(check_icon_cache())
@@ -231,10 +223,10 @@ Pipelines + Other Objects -> Pipe network
var/turf/T = loc
level = T.intact ? 2 : 1
add_fingerprint(usr)
- initialize()
+ atmos_init()
var/list/nodes = pipeline_expansion()
for(var/obj/machinery/atmospherics/A in nodes)
- A.initialize()
+ A.atmos_init()
A.addMember(src)
build_network()
@@ -320,11 +312,11 @@ Pipelines + Other Objects -> Pipe network
/obj/machinery/atmospherics/proc/add_underlay_adapter(var/turf/T, var/obj/machinery/atmospherics/node, var/direction, var/icon_connect_type) //modified from add_underlay, does not make exposed underlays
if(node)
if(T.intact && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe))
- underlays += icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "down" + icon_connect_type)
+ underlays += GLOB.pipe_icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "down" + icon_connect_type)
else
- underlays += icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "intact" + icon_connect_type)
+ underlays += GLOB.pipe_icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "intact" + icon_connect_type)
else
- underlays += icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "retracted" + icon_connect_type)
+ underlays += GLOB.pipe_icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "retracted" + icon_connect_type)
/obj/machinery/atmospherics/singularity_pull(S, current_size)
if(current_size >= STAGE_FIVE)
diff --git a/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm b/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm
index 276ce5e7b6e..c11a0421bda 100644
--- a/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm
@@ -41,7 +41,7 @@
nullifyPipenet(parent2)
return ..()
-/obj/machinery/atmospherics/binary/initialize()
+/obj/machinery/atmospherics/binary/atmos_init()
..()
var/node2_connect = dir
var/node1_connect = turn(dir, 180)
diff --git a/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm b/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm
index bfffb7cd35d..aebc09cfc7a 100644
--- a/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm
@@ -48,7 +48,7 @@
radio_connection = null
return ..()
-/obj/machinery/atmospherics/binary/dp_vent_pump/initialize()
+/obj/machinery/atmospherics/binary/dp_vent_pump/atmos_init()
..()
if(frequency)
set_frequency(frequency)
@@ -90,7 +90,7 @@
else
vent_icon += "[on ? "[pump_direction ? "out" : "in"]" : "off"]"
- overlays += icon_manager.get_atmos_icon("device", , , vent_icon)
+ overlays += GLOB.pipe_icon_manager.get_atmos_icon("device", , , vent_icon)
/obj/machinery/atmospherics/binary/dp_vent_pump/update_underlays()
if(..())
diff --git a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
index e43b052095b..9e845c15a98 100644
--- a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
@@ -16,7 +16,7 @@
var/id = null
var/datum/radio_frequency/radio_connection
-/obj/machinery/atmospherics/binary/passive_gate/initialize()
+/obj/machinery/atmospherics/binary/passive_gate/atmos_init()
..()
if(frequency)
set_frequency(frequency)
diff --git a/code/ATMOSPHERICS/components/binary_devices/pump.dm b/code/ATMOSPHERICS/components/binary_devices/pump.dm
index db0c7144324..118a70c3ecd 100644
--- a/code/ATMOSPHERICS/components/binary_devices/pump.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/pump.dm
@@ -110,7 +110,7 @@ Thus, the two variables affect pump operation are set in New():
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
return 1
-/obj/machinery/atmospherics/binary/pump/initialize()
+/obj/machinery/atmospherics/binary/pump/atmos_init()
..()
if(frequency)
set_frequency(frequency)
diff --git a/code/ATMOSPHERICS/components/binary_devices/valve.dm b/code/ATMOSPHERICS/components/binary_devices/valve.dm
index 7b566e04fda..1d7805c55b2 100644
--- a/code/ATMOSPHERICS/components/binary_devices/valve.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/valve.dm
@@ -109,7 +109,7 @@
if(frequency)
radio_connection = radio_controller.add_object(src, frequency, RADIO_ATMOSIA)
-/obj/machinery/atmospherics/binary/valve/digital/initialize()
+/obj/machinery/atmospherics/binary/valve/digital/atmos_init()
..()
if(frequency)
set_frequency(frequency)
diff --git a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm
index c4dd8adeabb..a64c94e7fc5 100644
--- a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm
@@ -38,7 +38,7 @@ Thus, the two variables affect pump operation are set in New():
on = 1
icon_state = "map_on"
-/obj/machinery/atmospherics/binary/volume_pump/initialize()
+/obj/machinery/atmospherics/binary/volume_pump/atmos_init()
..()
set_frequency(frequency)
diff --git a/code/ATMOSPHERICS/components/omni_devices/_omni_extras.dm b/code/ATMOSPHERICS/components/omni_devices/_omni_extras.dm
index 1858b685ec0..a1f80916aee 100644
--- a/code/ATMOSPHERICS/components/omni_devices/_omni_extras.dm
+++ b/code/ATMOSPHERICS/components/omni_devices/_omni_extras.dm
@@ -40,9 +40,9 @@
/datum/omni_port/proc/connect()
if(node)
return
- master.initialize()
+ master.atmos_init()
if(node)
- node.initialize()
+ node.atmos_init()
node.addMember(master)
master.build_network()
diff --git a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm
index 086d2ff799f..0eed9729f87 100644
--- a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm
+++ b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm
@@ -56,7 +56,7 @@
nullifyPipenet(P.parent)
return ..()
-/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)
@@ -143,11 +143,11 @@
//directional icons are layers 1-4, with the core icon on layer 5
if(core_icon)
- overlays_off[5] = icon_manager.get_atmos_icon("omni", , , core_icon)
- overlays_on[5] = icon_manager.get_atmos_icon("omni", , , core_icon + "_glow")
+ overlays_off[5] = GLOB.pipe_icon_manager.get_atmos_icon("omni", , , core_icon)
+ overlays_on[5] = GLOB.pipe_icon_manager.get_atmos_icon("omni", , , core_icon + "_glow")
- overlays_error[1] = icon_manager.get_atmos_icon("omni", , , core_icon)
- overlays_error[2] = icon_manager.get_atmos_icon("omni", , , "error")
+ overlays_error[1] = GLOB.pipe_icon_manager.get_atmos_icon("omni", , , core_icon)
+ overlays_error[2] = GLOB.pipe_icon_manager.get_atmos_icon("omni", , , "error")
/obj/machinery/atmospherics/omni/proc/update_port_icons()
if(!check_icon_cache())
@@ -203,19 +203,19 @@
ic_on += "_filter"
ic_off += "_out"
- ic_on = icon_manager.get_atmos_icon("omni", , , ic_on)
- ic_off = icon_manager.get_atmos_icon("omni", , , ic_off)
+ ic_on = GLOB.pipe_icon_manager.get_atmos_icon("omni", , , ic_on)
+ ic_off = GLOB.pipe_icon_manager.get_atmos_icon("omni", , , ic_off)
var/pipe_state
var/turf/T = get_turf(src)
if(!istype(T))
return
if(T.intact && istype(P.node, /obj/machinery/atmospherics/pipe) && P.node.level == 1 )
- //pipe_state = icon_manager.get_atmos_icon("underlay_down", P.dir, color_cache_name(P.node))
- pipe_state = icon_manager.get_atmos_icon("underlay", P.dir, color_cache_name(P.node), "down")
+ //pipe_state = GLOB.pipe_icon_manager.get_atmos_icon("underlay_down", P.dir, color_cache_name(P.node))
+ pipe_state = GLOB.pipe_icon_manager.get_atmos_icon("underlay", P.dir, color_cache_name(P.node), "down")
else
- //pipe_state = icon_manager.get_atmos_icon("underlay_intact", P.dir, color_cache_name(P.node))
- pipe_state = icon_manager.get_atmos_icon("underlay", P.dir, color_cache_name(P.node), "intact")
+ //pipe_state = GLOB.pipe_icon_manager.get_atmos_icon("underlay_intact", P.dir, color_cache_name(P.node))
+ pipe_state = GLOB.pipe_icon_manager.get_atmos_icon("underlay", P.dir, color_cache_name(P.node), "intact")
return list("on_icon" = ic_on, "off_icon" = ic_off, "pipe_icon" = pipe_state)
diff --git a/code/ATMOSPHERICS/components/trinary_devices/filter.dm b/code/ATMOSPHERICS/components/trinary_devices/filter.dm
index 427c77e8246..903f917e0c6 100755
--- a/code/ATMOSPHERICS/components/trinary_devices/filter.dm
+++ b/code/ATMOSPHERICS/components/trinary_devices/filter.dm
@@ -149,7 +149,7 @@ Filter types:
return 1
-/obj/machinery/atmospherics/trinary/filter/initialize()
+/obj/machinery/atmospherics/trinary/filter/atmos_init()
set_frequency(frequency)
..()
diff --git a/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm b/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm
index 187b308fa3c..e750256b0df 100644
--- a/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm
+++ b/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm
@@ -66,7 +66,7 @@
nullifyPipenet(parent3)
return ..()
-/obj/machinery/atmospherics/trinary/initialize()
+/obj/machinery/atmospherics/trinary/atmos_init()
..()
//Mixer:
//1 and 2 is input
diff --git a/code/ATMOSPHERICS/components/trinary_devices/tvalve.dm b/code/ATMOSPHERICS/components/trinary_devices/tvalve.dm
index ad9561fbf1d..9dddf8b06f4 100644
--- a/code/ATMOSPHERICS/components/trinary_devices/tvalve.dm
+++ b/code/ATMOSPHERICS/components/trinary_devices/tvalve.dm
@@ -156,7 +156,7 @@
if(frequency)
radio_connection = radio_controller.add_object(src, frequency, RADIO_ATMOSIA)
-/obj/machinery/atmospherics/trinary/tvalve/digital/initialize()
+/obj/machinery/atmospherics/trinary/tvalve/digital/atmos_init()
..()
if(frequency)
set_frequency(frequency)
diff --git a/code/ATMOSPHERICS/components/unary_devices/heat_exchanger.dm b/code/ATMOSPHERICS/components/unary_devices/heat_exchanger.dm
index 496413c881c..58b374578df 100644
--- a/code/ATMOSPHERICS/components/unary_devices/heat_exchanger.dm
+++ b/code/ATMOSPHERICS/components/unary_devices/heat_exchanger.dm
@@ -20,7 +20,7 @@
return
-/obj/machinery/atmospherics/unary/heat_exchanger/initialize()
+/obj/machinery/atmospherics/unary/heat_exchanger/atmos_init()
if(!partner)
var/partner_connect = turn(dir,180)
diff --git a/code/ATMOSPHERICS/components/unary_devices/outlet_injector.dm b/code/ATMOSPHERICS/components/unary_devices/outlet_injector.dm
index 6028346df6d..fe5b6a0a445 100644
--- a/code/ATMOSPHERICS/components/unary_devices/outlet_injector.dm
+++ b/code/ATMOSPHERICS/components/unary_devices/outlet_injector.dm
@@ -120,7 +120,7 @@
return 1
-/obj/machinery/atmospherics/unary/outlet_injector/initialize()
+/obj/machinery/atmospherics/unary/outlet_injector/atmos_init()
..()
set_frequency(frequency)
diff --git a/code/ATMOSPHERICS/components/unary_devices/unary_base.dm b/code/ATMOSPHERICS/components/unary_devices/unary_base.dm
index 51b12d39481..4ef7743fc8c 100644
--- a/code/ATMOSPHERICS/components/unary_devices/unary_base.dm
+++ b/code/ATMOSPHERICS/components/unary_devices/unary_base.dm
@@ -22,7 +22,7 @@
nullifyPipenet(parent)
return ..()
-/obj/machinery/atmospherics/unary/initialize()
+/obj/machinery/atmospherics/unary/atmos_init()
..()
for(var/obj/machinery/atmospherics/target in get_step(src, dir))
if(target.initialize_directions & get_dir(target,src))
@@ -43,9 +43,9 @@
node.disconnect(src)
node = null
nullifyPipenet(parent)
- initialize()
+ atmos_init()
if(node)
- node.initialize()
+ node.atmos_init()
node.addMember(src)
build_network()
. = 1
diff --git a/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm b/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm
index 8f76e689eae..99eeb1883ea 100644
--- a/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm
+++ b/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm
@@ -98,7 +98,7 @@
else
vent_icon += "[on ? "[pump_direction ? "out" : "in"]" : "off"]"
- overlays += icon_manager.get_atmos_icon("device", , , vent_icon)
+ overlays += GLOB.pipe_icon_manager.get_atmos_icon("device", , , vent_icon)
update_pipe_image()
@@ -223,7 +223,7 @@
return 1
-/obj/machinery/atmospherics/unary/vent_pump/initialize()
+/obj/machinery/atmospherics/unary/vent_pump/atmos_init()
..()
//some vents work his own special way
diff --git a/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm
index 530dbe1d952..11b1fc0f920 100644
--- a/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm
+++ b/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm
@@ -109,7 +109,7 @@
if(welded)
scrubber_icon = "scrubberweld"
- overlays += icon_manager.get_atmos_icon("device", , , scrubber_icon)
+ overlays += GLOB.pipe_icon_manager.get_atmos_icon("device", , , scrubber_icon)
update_pipe_image()
/obj/machinery/atmospherics/unary/vent_scrubber/update_underlays()
@@ -169,7 +169,7 @@
return 1
-/obj/machinery/atmospherics/unary/vent_scrubber/initialize()
+/obj/machinery/atmospherics/unary/vent_scrubber/atmos_init()
..()
radio_filter_in = frequency==initial(frequency)?(RADIO_FROM_AIRALARM):null
radio_filter_out = frequency==initial(frequency)?(RADIO_TO_AIRALARM):null
diff --git a/code/ATMOSPHERICS/datum_pipeline.dm b/code/ATMOSPHERICS/datum_pipeline.dm
index 0692bf44efd..b4a0cd9ba7b 100644
--- a/code/ATMOSPHERICS/datum_pipeline.dm
+++ b/code/ATMOSPHERICS/datum_pipeline.dm
@@ -57,11 +57,7 @@ var/pipenetwarnings = 10
if(!members.Find(item))
if(item.parent)
- if(pipenetwarnings > 0)
- error("[item.type] added to a pipenet while still having one (pipes leading to the same spot stacking in one turf). Nearby: [item.x], [item.y], [item.z].")
- pipenetwarnings -= 1
- if(pipenetwarnings == 0)
- error("Further messages about pipenets will be suppressed.")
+ log_runtime(EXCEPTION("[item.type] \[\ref[item]] added to a pipenet while still having one ([item.parent]) (pipes leading to the same spot stacking in one turf). Nearby: [item.x], [item.y], [item.z]."))
members += item
possible_expansions += item
@@ -118,15 +114,12 @@ var/pipenetwarnings = 10
qdel(E)
/obj/machinery/atmospherics/proc/addMember(obj/machinery/atmospherics/A)
- return
+ var/datum/pipeline/P = returnPipenet(A)
+ P.addMember(A, src)
/obj/machinery/atmospherics/pipe/addMember(obj/machinery/atmospherics/A)
parent.addMember(A, src)
-/obj/machinery/atmospherics/addMember(obj/machinery/atmospherics/A)
- var/datum/pipeline/P = returnPipenet(A)
- P.addMember(A, src)
-
/datum/pipeline/proc/temporarily_store_air()
//Update individual gas_mixtures by volume ratio
diff --git a/code/ATMOSPHERICS/pipes/cap.dm b/code/ATMOSPHERICS/pipes/cap.dm
index 7691b157857..2552f6e0794 100644
--- a/code/ATMOSPHERICS/pipes/cap.dm
+++ b/code/ATMOSPHERICS/pipes/cap.dm
@@ -61,9 +61,9 @@
alpha = 255
overlays.Cut()
- overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "cap" + icon_connect_type)
+ overlays += GLOB.pipe_icon_manager.get_atmos_icon("pipe", , pipe_color, "cap" + icon_connect_type)
-/obj/machinery/atmospherics/pipe/cap/initialize()
+/obj/machinery/atmospherics/pipe/cap/atmos_init()
..()
for(var/obj/machinery/atmospherics/target in get_step(src, dir))
if(target.initialize_directions & get_dir(target,src))
diff --git a/code/ATMOSPHERICS/pipes/manifold.dm b/code/ATMOSPHERICS/pipes/manifold.dm
index a42903bb7f6..199942e7a40 100644
--- a/code/ATMOSPHERICS/pipes/manifold.dm
+++ b/code/ATMOSPHERICS/pipes/manifold.dm
@@ -32,7 +32,7 @@
if(WEST)
initialize_directions = NORTH|EAST|SOUTH
-/obj/machinery/atmospherics/pipe/manifold/initialize()
+/obj/machinery/atmospherics/pipe/manifold/atmos_init()
..()
for(var/D in cardinal)
if(D == dir)
@@ -122,8 +122,8 @@
alpha = 255
overlays.Cut()
- overlays += icon_manager.get_atmos_icon("manifold", , pipe_color, "core" + icon_connect_type)
- overlays += icon_manager.get_atmos_icon("manifold", , , "clamps" + icon_connect_type)
+ overlays += GLOB.pipe_icon_manager.get_atmos_icon("manifold", , pipe_color, "core" + icon_connect_type)
+ overlays += GLOB.pipe_icon_manager.get_atmos_icon("manifold", , , "clamps" + icon_connect_type)
underlays.Cut()
var/turf/T = get_turf(src)
diff --git a/code/ATMOSPHERICS/pipes/manifold4w.dm b/code/ATMOSPHERICS/pipes/manifold4w.dm
index 46b883db62b..502795e1da9 100644
--- a/code/ATMOSPHERICS/pipes/manifold4w.dm
+++ b/code/ATMOSPHERICS/pipes/manifold4w.dm
@@ -95,8 +95,8 @@
alpha = 255
overlays.Cut()
- overlays += icon_manager.get_atmos_icon("manifold", , pipe_color, "4way" + icon_connect_type)
- overlays += icon_manager.get_atmos_icon("manifold", , , "clamps_4way" + icon_connect_type)
+ overlays += GLOB.pipe_icon_manager.get_atmos_icon("manifold", , pipe_color, "4way" + icon_connect_type)
+ overlays += GLOB.pipe_icon_manager.get_atmos_icon("manifold", , , "clamps_4way" + icon_connect_type)
underlays.Cut()
var/turf/T = get_turf(src)
@@ -134,7 +134,7 @@
if(level == 1 && istype(loc, /turf/simulated))
invisibility = i ? 101 : 0
-/obj/machinery/atmospherics/pipe/manifold4w/initialize()
+/obj/machinery/atmospherics/pipe/manifold4w/atmos_init()
..()
for(var/D in cardinal)
for(var/obj/machinery/atmospherics/target in get_step(src, D))
diff --git a/code/ATMOSPHERICS/pipes/simple/pipe_simple.dm b/code/ATMOSPHERICS/pipes/simple/pipe_simple.dm
index 9f360f74274..b2c2750a452 100644
--- a/code/ATMOSPHERICS/pipes/simple/pipe_simple.dm
+++ b/code/ATMOSPHERICS/pipes/simple/pipe_simple.dm
@@ -43,7 +43,7 @@
if(SOUTHWEST)
initialize_directions = SOUTH|WEST
-/obj/machinery/atmospherics/pipe/simple/initialize(initPipe = 1)
+/obj/machinery/atmospherics/pipe/simple/atmos_init(initPipe = 1)
..()
if(initPipe)
normalize_dir()
@@ -145,9 +145,9 @@
overlays.Cut()
if(node1 && node2)
- overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, pipe_icon + "intact" + icon_connect_type)
+ overlays += GLOB.pipe_icon_manager.get_atmos_icon("pipe", , pipe_color, pipe_icon + "intact" + icon_connect_type)
else
- overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, pipe_icon + "exposed[node1?1:0][node2?1:0]" + icon_connect_type)
+ overlays += GLOB.pipe_icon_manager.get_atmos_icon("pipe", , pipe_color, pipe_icon + "exposed[node1?1:0][node2?1:0]" + icon_connect_type)
// A check to make sure both nodes exist - self-delete if they aren't present
/obj/machinery/atmospherics/pipe/simple/check_nodes_exist()
diff --git a/code/ATMOSPHERICS/pipes/simple/pipe_simple_he.dm b/code/ATMOSPHERICS/pipes/simple/pipe_simple_he.dm
index 26139b40606..cb7ec277f95 100644
--- a/code/ATMOSPHERICS/pipes/simple/pipe_simple_he.dm
+++ b/code/ATMOSPHERICS/pipes/simple/pipe_simple_he.dm
@@ -61,7 +61,7 @@
initialize_directions_he = initialize_directions // The auto-detection from /pipe is good enough for a simple HE pipe
color = "#404040"
-/obj/machinery/atmospherics/pipe/simple/heat_exchanging/initialize(initPipe = 1)
+/obj/machinery/atmospherics/pipe/simple/heat_exchanging/atmos_init(initPipe = 1)
..(0)
if(initPipe)
normalize_dir()
@@ -110,7 +110,7 @@
initialize_directions = EAST
initialize_directions_he = WEST
-/obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction/initialize()
+/obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction/atmos_init()
..(0)
for(var/obj/machinery/atmospherics/target in get_step(src,initialize_directions))
if(target.initialize_directions & get_dir(target,src))
diff --git a/code/ATMOSPHERICS/pipes/simple/pipe_simple_hidden.dm b/code/ATMOSPHERICS/pipes/simple/pipe_simple_hidden.dm
index db62f8e51fe..3efd22ed446 100644
--- a/code/ATMOSPHERICS/pipes/simple/pipe_simple_hidden.dm
+++ b/code/ATMOSPHERICS/pipes/simple/pipe_simple_hidden.dm
@@ -34,7 +34,7 @@
alpha = 255
overlays.Cut()
- overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "universal")
+ overlays += GLOB.pipe_icon_manager.get_atmos_icon("pipe", , pipe_color, "universal")
underlays.Cut()
if(node1)
diff --git a/code/ATMOSPHERICS/pipes/simple/pipe_simple_visible.dm b/code/ATMOSPHERICS/pipes/simple/pipe_simple_visible.dm
index 1fcb45e7959..9bf085b534a 100644
--- a/code/ATMOSPHERICS/pipes/simple/pipe_simple_visible.dm
+++ b/code/ATMOSPHERICS/pipes/simple/pipe_simple_visible.dm
@@ -45,7 +45,7 @@
alpha = 255
overlays.Cut()
- overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "universal")
+ overlays += GLOB.pipe_icon_manager.get_atmos_icon("pipe", , pipe_color, "universal")
underlays.Cut()
if(node1)
diff --git a/code/__DEFINES/role_preferences.dm b/code/__DEFINES/role_preferences.dm
index 257e12f4093..adb645fe112 100644
--- a/code/__DEFINES/role_preferences.dm
+++ b/code/__DEFINES/role_preferences.dm
@@ -40,6 +40,7 @@
#define ROLE_NYMPH "Dionaea"
#define ROLE_GSPIDER "giant spider"
#define ROLE_DRONE "drone"
+#define ROLE_DEATHSQUAD "deathsquad"
//Missing assignment means it's not a gamemode specific role, IT'S NOT A BUG OR ERROR.
//The gamemode specific ones are just so the gamemodes can query whether a player is old enough
diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm
index 2004b9d3159..5c483b310fe 100644
--- a/code/__HELPERS/game.dm
+++ b/code/__HELPERS/game.dm
@@ -435,7 +435,7 @@
/proc/SecondsToTicks(var/seconds)
return seconds * 10
-proc/pollCandidates(Question, be_special_type, antag_age_check = 0, poll_time = 300, ignore_respawnability = 0, min_hours = 0, flashwindow = TRUE)
+proc/pollCandidates(Question, be_special_type, antag_age_check = 0, poll_time = 300, ignore_respawnability = 0, min_hours = 0, flashwindow = TRUE, check_antaghud = TRUE)
var/roletext = be_special_type ? get_roletext(be_special_type) : null
var/list/mob/dead/observer/candidates = list()
var/time_passed = world.time
@@ -457,7 +457,7 @@ proc/pollCandidates(Question, be_special_type, antag_age_check = 0, poll_time =
if(config.use_exp_restrictions && min_hours)
if(G.client.get_exp_living_num() < min_hours * 60)
continue
- if(cannotPossess(G))
+ if(check_antaghud && cannotPossess(G))
continue
spawn(0)
G << 'sound/misc/notice2.ogg'//Alerting them to their consideration
@@ -490,6 +490,20 @@ proc/pollCandidates(Question, be_special_type, antag_age_check = 0, poll_time =
return candidates
+/proc/pollCandidatesByKeyWithVeto(adminclient, adminusr, max_slots, Question, be_special_type, antag_age_check = 0, poll_time = 300, ignore_respawnability = 0, min_hours = 0, flashwindow = TRUE, check_antaghud = TRUE)
+ var/list/willing_ghosts = pollCandidates(Question, be_special_type, antag_age_check, poll_time, ignore_respawnability, min_hours, flashwindow, check_antaghud)
+ var/list/candidate_ckeys = list()
+ var/list/selected_ckeys = list()
+ if(!willing_ghosts.len)
+ return selected_ckeys
+ for(var/mob/dead/observer/G in willing_ghosts)
+ candidate_ckeys += G.key
+ for(var/i = max_slots, (i > 0 && candidate_ckeys.len), i--)
+ var/this_ckey = input("Pick players. This will go on until there either no more ghosts to pick from or the slots are full.", "Candidates") as null|anything in candidate_ckeys
+ candidate_ckeys -= this_ckey
+ selected_ckeys += this_ckey
+ return selected_ckeys
+
/proc/window_flash(client/C)
if(ismob(C))
var/mob/M = C
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index b58ea20dbae..b283edb6540 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -1928,4 +1928,7 @@ var/mob/dview/dview_mob = new
CRASH(msg)
/datum/proc/stack_trace(msg)
- CRASH(msg)
\ No newline at end of file
+ CRASH(msg)
+
+/proc/pass()
+ return
\ No newline at end of file
diff --git a/code/_globalvars/lists/objects.dm b/code/_globalvars/lists/objects.dm
index 0cc712799c7..5a025702877 100644
--- a/code/_globalvars/lists/objects.dm
+++ b/code/_globalvars/lists/objects.dm
@@ -1,5 +1,5 @@
var/global/list/portals = list() //for use by portals
-var/global/list/cable_list = list() //Index for all cables, so that powernets don't have to look through the entire world all the time
+GLOBAL_LIST(cable_list) //Index for all cables, so that powernets don't have to look through the entire world all the time
var/global/list/chemical_reactions_list //list of all /datum/chemical_reaction datums. Used during chemical reactions
var/global/list/chemical_reagents_list //list of all /datum/reagent datums indexed by reagent id. Used by chemistry stuff
var/global/list/landmarks_list = list() //list of all landmarks created
@@ -17,7 +17,6 @@ var/global/list/cell_logs = list()
var/global/list/all_areas = list()
var/global/list/machines = list()
-var/global/list/machine_processing = list()
var/global/list/fast_processing = list()
var/global/list/processing_power_items = list() //items that ask to be called every cycle
var/global/list/rcd_list = list() //list of Rapid Construction Devices.
diff --git a/code/_globalvars/station.dm b/code/_globalvars/station.dm
index 6d2578e5b88..d9e53d96834 100644
--- a/code/_globalvars/station.dm
+++ b/code/_globalvars/station.dm
@@ -3,9 +3,6 @@ var/global/datum/datacore/data_core = null
var/CELLRATE = 0.002 // multiplier for watts per tick <> cell storage (eg: .002 means if there is a load of 1000 watts, 20 units will be taken from a cell per second)
var/CHARGELEVEL = 0.001 // Cap for how fast cells charge, as a percentage-per-tick (.001 means cellcharge is capped to 1% per second)
-var/list/powernets = list()
-var/list/deferred_powernet_rebuilds = list()
-
// this is not strictly unused although the whole modules datum thing is unused
// To remove this you need to remove that
var/datum/moduletypes/mods = new()
diff --git a/code/controllers/Processes/machinery.dm b/code/controllers/Processes/machinery.dm
deleted file mode 100644
index 2466f802740..00000000000
--- a/code/controllers/Processes/machinery.dm
+++ /dev/null
@@ -1,74 +0,0 @@
-/var/global/machinery_sort_required = 0
-
-/datum/controller/process/machinery/setup()
- name = "machinery"
- schedule_interval = 20 // every 2 seconds
- start_delay = 12
-
-/datum/controller/process/machinery/statProcess()
- ..()
- stat(null, "[machine_processing.len] machines")
- stat(null, "[powernets.len] powernets, [deferred_powernet_rebuilds.len] deferred")
-
-/datum/controller/process/machinery/doWork()
- process_sort()
- process_power()
- process_power_drain()
- process_machines()
-
-/datum/controller/process/machinery/proc/process_sort()
- if(machinery_sort_required)
- machinery_sort_required = 0
- machine_processing = dd_sortedObjectList(machine_processing)
-
-/datum/controller/process/machinery/proc/process_machines()
- for(last_object in machine_processing)
- var/obj/machinery/M = last_object
- if(istype(M) && !QDELETED(M))
- try
- if(M.process() == PROCESS_KILL)
- machine_processing.Remove(M)
- continue
-
- if(M.use_power)
- M.auto_use_power()
- catch(var/exception/e)
- catchException(e, M)
- else
- catchBadType(M)
- machine_processing -= M
-
- SCHECK
-
-/datum/controller/process/machinery/proc/process_power()
- for(last_object in deferred_powernet_rebuilds)
- var/obj/O = last_object
- if(istype(O) && !QDELETED(O))
- try
- var/datum/powernet/newPN = new()// creates a new powernet...
- propagate_network(O, newPN)//... and propagates it to the other side of the cable
- catch(var/exception/e)
- catchException(e, O)
- SCHECK
- else
- catchBadType(O)
- deferred_powernet_rebuilds -= O
-
- for(last_object in powernets)
- var/datum/powernet/powerNetwork = last_object
- if(istype(powerNetwork) && !QDELETED(powerNetwork))
- try
- powerNetwork.reset()
- catch(var/exception/e)
- catchException(e, powerNetwork)
- SCHECK
- else
- catchBadType(powerNetwork)
- powernets -= powerNetwork
-
-/datum/controller/process/machinery/proc/process_power_drain()
- // Currently only used by powersinks. These items get priority processed before machinery
- for(var/obj/item/I in processing_power_items)
- if(!I.pwr_drain()) // 0 = Process Kill, remove from processing list.
- processing_power_items.Remove(I)
- SCHECK
diff --git a/code/controllers/Processes/mob.dm b/code/controllers/Processes/mob.dm
deleted file mode 100644
index 2b11eff99be..00000000000
--- a/code/controllers/Processes/mob.dm
+++ /dev/null
@@ -1,35 +0,0 @@
-var/global/datum/controller/process/mob/mob_master
-
-/datum/controller/process/mob
- var/current_cycle
-
-/datum/controller/process/mob/setup()
- name = "mob"
- schedule_interval = 20 // every 2 seconds
- start_delay = 16
- log_startup_progress("Mob ticker starting up.")
-
-/datum/controller/process/mob/started()
- ..()
- if(!mob_list)
- mob_list = list()
-
-/datum/controller/process/mob/statProcess()
- ..()
- stat(null, "[mob_list.len] mobs")
-
-/datum/controller/process/mob/doWork()
- for(last_object in mob_list)
- var/mob/M = last_object
- if(istype(M) && !QDELETED(M))
- try
- M.Life()
- catch(var/exception/e)
- catchException(e, M)
- SCHECK
- else
- catchBadType(M)
- mob_list -= M
- current_cycle++
-
-DECLARE_GLOBAL_CONTROLLER(mob, mob_master)
diff --git a/code/controllers/master.dm b/code/controllers/master.dm
index 3b5e4a6e707..9cb84f26aa5 100644
--- a/code/controllers/master.dm
+++ b/code/controllers/master.dm
@@ -62,7 +62,6 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
var/static/current_ticklimit = TICK_LIMIT_RUNNING
/datum/controller/master/New()
- makeDatumRefLists()
//temporary file used to record errors with loading config, moved to log directory once logging is set up
GLOB.config_error_log = GLOB.world_game_log = GLOB.world_runtime_log = "data/logs/config_error.log"
load_configuration()
diff --git a/code/controllers/master_controller.dm b/code/controllers/master_controller.dm
index 11cd37343fe..7606149c39d 100644
--- a/code/controllers/master_controller.dm
+++ b/code/controllers/master_controller.dm
@@ -56,8 +56,7 @@ var/global/pipe_processing_killed = 0
space_manager.do_transition_setup()
- setup_objects()
- setupgenetics()
+ setup_asset_cache()
setupfactions()
setup_economy()
@@ -66,20 +65,8 @@ var/global/pipe_processing_killed = 0
populate_spawn_points()
-/datum/controller/game_controller/proc/setup_objects()
+/datum/controller/game_controller/proc/setup_asset_cache()
var/watch = start_watch()
- var/count = 0
- var/overwatch = start_watch() // Overall.
-
log_startup_progress("Populating asset cache...")
populate_asset_cache()
- log_startup_progress(" Populated [asset_cache.len] assets in [stop_watch(watch)]s.")
-
- watch = start_watch()
- log_startup_progress("Initializing objects...")
- for(var/atom/movable/object in world)
- object.initialize()
- count++
- log_startup_progress(" Initialized [count] objects in [stop_watch(watch)]s.")
-
- log_startup_progress("Finished object initializations in [stop_watch(overwatch)]s.")
+ log_startup_progress(" Populated [asset_cache.len] assets in [stop_watch(watch)]s.")
\ No newline at end of file
diff --git a/code/controllers/subsystem.dm b/code/controllers/subsystem.dm
index 4b1d59fa82e..b2b0e63d99b 100644
--- a/code/controllers/subsystem.dm
+++ b/code/controllers/subsystem.dm
@@ -171,7 +171,7 @@
statclick = new/obj/effect/statclick/debug(src, "Initializing...")
if(can_fire && !(SS_NO_FIRE & flags))
- msg = "[round(cost, 1)]ms|[round(tick_usage, 1)]%([round(tick_overrun, 1)]%)|[round(ticks, 0.1)]\t[msg]"
+ msg = "[round(cost, 1)]ms | [round(tick_usage, 1)]%([round(tick_overrun, 1)]%) | [round(ticks, 0.1)]\t[msg]"
else
msg = "OFFLINE\t[msg]"
diff --git a/code/controllers/subsystem/air.dm b/code/controllers/subsystem/air.dm
index bf791e61519..4c2774d58db 100644
--- a/code/controllers/subsystem/air.dm
+++ b/code/controllers/subsystem/air.dm
@@ -320,15 +320,15 @@ SUBSYSTEM_DEF(air)
var/watch = start_watch()
var/count = 0
log_startup_progress("Initializing atmospherics machinery...")
- for(var/obj/machinery/atmospherics/unary/U in machines)
- if(istype(U, /obj/machinery/atmospherics/unary/vent_pump))
- var/obj/machinery/atmospherics/unary/vent_pump/T = U
+ for(var/obj/machinery/atmospherics/A in machines)
+ A.atmos_init()
+ count++
+ if(istype(A, /obj/machinery/atmospherics/unary/vent_pump))
+ var/obj/machinery/atmospherics/unary/vent_pump/T = A
T.broadcast_status()
- count++
- else if(istype(U, /obj/machinery/atmospherics/unary/vent_scrubber))
- var/obj/machinery/atmospherics/unary/vent_scrubber/T = U
+ else if(istype(A, /obj/machinery/atmospherics/unary/vent_scrubber))
+ var/obj/machinery/atmospherics/unary/vent_scrubber/T = A
T.broadcast_status()
- count++
log_startup_progress(" Initialized [count] atmospherics machines in [stop_watch(watch)]s.")
//this can't be done with setup_atmos_machinery() because
@@ -341,7 +341,7 @@ SUBSYSTEM_DEF(air)
for(var/obj/machinery/atmospherics/machine in machines)
machine.build_network()
count++
- log_startup_progress(" Initialized [count] pipes in [stop_watch(watch)]s.")
+ log_startup_progress(" Initialized [count] pipenets in [stop_watch(watch)]s.")
/datum/controller/subsystem/air/proc/setup_overlays()
plmaster = new /obj/effect/overlay()
diff --git a/code/controllers/subsystem/atoms.dm b/code/controllers/subsystem/atoms.dm
new file mode 100644
index 00000000000..c3943ea9163
--- /dev/null
+++ b/code/controllers/subsystem/atoms.dm
@@ -0,0 +1,120 @@
+#define BAD_INIT_QDEL_BEFORE 1
+#define BAD_INIT_DIDNT_INIT 2
+#define BAD_INIT_SLEPT 4
+#define BAD_INIT_NO_HINT 8
+
+SUBSYSTEM_DEF(atoms)
+ name = "Atoms"
+ init_order = INIT_ORDER_ATOMS
+ flags = SS_NO_FIRE
+
+ var/old_initialized
+
+ var/list/late_loaders
+ var/list/created_atoms
+
+ var/list/BadInitializeCalls = list()
+
+
+/datum/controller/subsystem/atoms/Initialize(timeofday)
+ setupgenetics()
+ initialized = INITIALIZATION_INNEW_MAPLOAD
+ InitializeAtoms()
+
+
+
+/datum/controller/subsystem/atoms/proc/InitializeAtoms(list/atoms)
+ if(initialized == INITIALIZATION_INSSATOMS)
+ return
+
+ initialized = INITIALIZATION_INNEW_MAPLOAD
+
+ LAZYINITLIST(late_loaders)
+
+ var/watch = start_watch()
+ log_startup_progress("Initializing atoms...")
+ var/count
+ var/list/mapload_arg = list(TRUE)
+ if(atoms)
+ created_atoms = list()
+ count = atoms.len
+ for(var/I in atoms)
+ var/atom/A = I
+ if(!A.initialized)
+ if(InitAtom(I, mapload_arg))
+ atoms -= I
+ CHECK_TICK
+ else
+ count = 0
+ for(var/atom/A in world)
+ if(!A.initialized)
+ InitAtom(A, mapload_arg)
+ ++count
+ CHECK_TICK
+
+ log_startup_progress(" Initialized [count] atoms in [stop_watch(watch)]s")
+ pass(count)
+
+ initialized = INITIALIZATION_INNEW_REGULAR
+
+ if(late_loaders.len)
+ watch = start_watch()
+ log_startup_progress("Late-initializing atoms...")
+ for(var/I in late_loaders)
+ var/atom/A = I
+ A.LateInitialize()
+ log_startup_progress(" Late initialized [late_loaders.len] atoms in [stop_watch(watch)]s")
+ late_loaders.Cut()
+
+ if(atoms)
+ . = created_atoms + atoms
+ created_atoms = null
+
+/datum/controller/subsystem/atoms/proc/InitAtom(atom/A, list/arguments)
+ var/the_type = A.type
+ if(QDELING(A))
+ BadInitializeCalls[the_type] |= BAD_INIT_QDEL_BEFORE
+ return TRUE
+
+ var/start_tick = world.time
+
+ var/result = A.Initialize(arglist(arguments))
+
+ if(start_tick != world.time)
+ BadInitializeCalls[the_type] |= BAD_INIT_SLEPT
+
+ var/qdeleted = FALSE
+
+ if(result != INITIALIZE_HINT_NORMAL)
+ switch(result)
+ if(INITIALIZE_HINT_LATELOAD)
+ if(arguments[1]) //mapload
+ late_loaders += A
+ else
+ A.LateInitialize()
+ if(INITIALIZE_HINT_QDEL)
+ qdel(A)
+ qdeleted = TRUE
+ else
+ BadInitializeCalls[the_type] |= BAD_INIT_NO_HINT
+
+ if(!A) //possible harddel
+ qdeleted = TRUE
+ else if(!A.initialized)
+ BadInitializeCalls[the_type] |= BAD_INIT_DIDNT_INIT
+
+ return qdeleted || QDELING(A)
+
+/datum/controller/subsystem/atoms/proc/map_loader_begin()
+ old_initialized = initialized
+ initialized = INITIALIZATION_INSSATOMS
+
+/datum/controller/subsystem/atoms/proc/map_loader_stop()
+ initialized = old_initialized
+
+/datum/controller/subsystem/atoms/Recover()
+ initialized = SSatoms.initialized
+ if(initialized == INITIALIZATION_INNEW_MAPLOAD)
+ InitializeAtoms()
+ old_initialized = SSatoms.old_initialized
+ BadInitializeCalls = SSatoms.BadInitializeCalls
\ No newline at end of file
diff --git a/code/controllers/subsystem/garbage.dm b/code/controllers/subsystem/garbage.dm
index 067114e52be..823294e4d4e 100644
--- a/code/controllers/subsystem/garbage.dm
+++ b/code/controllers/subsystem/garbage.dm
@@ -43,20 +43,20 @@ SUBSYSTEM_DEF(garbage)
var/list/counts = list()
for(var/list/L in queues)
counts += length(L)
- msg += "Q:[counts.Join(",")]|D:[delslasttick]|G:[gcedlasttick]|"
+ msg += "Queue:[counts.Join(",")] | Del's:[delslasttick] | Soft:[gcedlasttick] |"
msg += "GR:"
if(!(delslasttick + gcedlasttick))
msg += "n/a|"
else
- msg += "[round((gcedlasttick / (delslasttick + gcedlasttick)) * 100, 0.01)]%|"
+ msg += "[round((gcedlasttick / (delslasttick + gcedlasttick)) * 100, 0.01)]% |"
- msg += "TD:[totaldels]|TG:[totalgcs]|"
+ msg += "Total Dels:[totaldels] | Soft:[totalgcs] |"
if(!(totaldels + totalgcs))
msg += "n/a|"
else
- msg += "TGR:[round((totalgcs / (totaldels + totalgcs)) * 100, 0.01)]%"
- msg += " P:[pass_counts.Join(",")]"
- msg += "|F:[fail_counts.Join(",")]"
+ msg += "TGR:[round((totalgcs / (totaldels + totalgcs)) * 100, 0.01)]% |"
+ msg += " Pass:[pass_counts.Join(",")]"
+ msg += " | Fail:[fail_counts.Join(",")]"
..(msg)
/* TO-DO
diff --git a/code/controllers/subsystem/machinery.dm b/code/controllers/subsystem/machinery.dm
new file mode 100644
index 00000000000..8f914202dcf
--- /dev/null
+++ b/code/controllers/subsystem/machinery.dm
@@ -0,0 +1,145 @@
+#define SSMACHINES_DEFERREDPOWERNETS 1
+#define SSMACHINES_POWERNETS 2
+#define SSMACHINES_PREMACHINERY 3
+#define SSMACHINES_MACHINERY 4
+SUBSYSTEM_DEF(machines)
+ name = "Machines"
+ init_order = INIT_ORDER_MACHINES
+ flags = SS_KEEP_TIMING
+
+ var/list/processing = list()
+ var/list/currentrun = list()
+ var/list/powernets = list()
+ var/list/deferred_powernet_rebuilds = list()
+
+ var/currentpart = SSMACHINES_DEFERREDPOWERNETS
+
+/datum/controller/subsystem/machines/Initialize()
+ makepowernets()
+ fire()
+ ..()
+
+/datum/controller/subsystem/machines/proc/makepowernets()
+ for(var/datum/powernet/PN in powernets)
+ qdel(PN)
+ powernets.Cut()
+
+ for(var/obj/structure/cable/PC in GLOB.cable_list)
+ if(!PC.powernet)
+ var/datum/powernet/NewPN = new()
+ NewPN.add_cable(PC)
+ propagate_network(PC,PC.powernet)
+
+/datum/controller/subsystem/machines/stat_entry()
+ ..("Machines: [processing.len]\nPowernets: [powernets.len]\tDeferred: [deferred_powernet_rebuilds.len]")
+
+/datum/controller/subsystem/machines/proc/process_defered_powernets(resumed = 0)
+ if(!resumed)
+ src.currentrun = deferred_powernet_rebuilds.Copy()
+ //cache for sanid speed (lists are references anyways)
+ var/list/currentrun = src.currentrun
+ while(currentrun.len)
+ var/obj/O = currentrun[currentrun.len]
+ currentrun.len--
+ if(O)
+ var/datum/powernet/newPN = new() // create a new powernet...
+ propagate_network(O, newPN)//... and propagate it to the other side of the cable
+ else
+ deferred_powernet_rebuilds.Remove(O)
+ if(MC_TICK_CHECK)
+ return
+
+/datum/controller/subsystem/machines/proc/process_powernets(resumed = 0)
+ if(!resumed)
+ src.currentrun = powernets.Copy()
+ //cache for sanid speed (lists are references anyways)
+ var/list/currentrun = src.currentrun
+ while(currentrun.len)
+ var/datum/powernet/P = currentrun[currentrun.len]
+ currentrun.len--
+ if(P)
+ P.reset() // reset the power state
+ else
+ powernets.Remove(P)
+ if(MC_TICK_CHECK)
+ return
+
+/datum/controller/subsystem/machines/proc/process_premachines(resumed = 0)
+ /* Literally exists as snowflake for fucking powersinks goddamnit */
+ if(!resumed)
+ src.currentrun = processing_power_items.Copy()
+ //cache for sanid speed (lists are references anyways)
+ var/list/currentrun = src.currentrun
+ while(currentrun.len)
+ var/obj/item/I = currentrun[currentrun.len]
+ currentrun.len--
+ if(!QDELETED(I))
+ if(!I.pwr_drain())
+ processing_power_items.Remove(I)
+ else
+ processing_power_items.Remove(I)
+ if(MC_TICK_CHECK)
+ return
+
+/datum/controller/subsystem/machines/proc/process_machines(resumed = 0)
+ var/seconds = wait * 0.1
+ if(!resumed)
+ src.currentrun = processing.Copy()
+ //cache for sanic speed (lists are references anyways)
+ var/list/currentrun = src.currentrun
+ while(currentrun.len)
+ var/obj/machinery/thing = currentrun[currentrun.len]
+ currentrun.len--
+ if(!QDELETED(thing) && thing.process(seconds) != PROCESS_KILL)
+ if(thing.use_power)
+ thing.auto_use_power() //add back the power state
+ else
+ processing -= thing
+ if(!QDELETED(thing))
+ thing.isprocessing = FALSE
+ if(MC_TICK_CHECK)
+ return
+
+/datum/controller/subsystem/machines/fire(resumed = 0)
+ if(currentpart == SSMACHINES_DEFERREDPOWERNETS || !resumed)
+ process_defered_powernets(resumed)
+ if(state != SS_RUNNING)
+ return
+ resumed = 0
+ currentpart = SSMACHINES_POWERNETS
+
+ if(currentpart == SSMACHINES_POWERNETS || !resumed)
+ process_powernets(resumed)
+ if(state != SS_RUNNING)
+ return
+ resumed = 0
+ currentpart = SSMACHINES_PREMACHINERY
+
+ if(currentpart == SSMACHINES_PREMACHINERY || !resumed)
+ process_premachines(resumed)
+ if(state != SS_RUNNING)
+ return
+ resumed = 0
+ currentpart = SSMACHINES_MACHINERY
+
+ if(currentpart == SSMACHINES_MACHINERY || !resumed)
+ process_machines(resumed)
+ if(state != SS_RUNNING)
+ return
+ resumed = 0
+ currentpart = SSMACHINES_DEFERREDPOWERNETS
+
+
+/datum/controller/subsystem/machines/proc/setup_template_powernets(list/cables)
+ for(var/A in cables)
+ var/obj/structure/cable/PC = A
+ if(!PC.powernet)
+ var/datum/powernet/NewPN = new()
+ NewPN.add_cable(PC)
+ propagate_network(PC,PC.powernet)
+
+/datum/controller/subsystem/machines/Recover()
+ if(istype(SSmachines.processing))
+ processing = SSmachines.processing
+ if(istype(SSmachines.powernets))
+ powernets = SSmachines.powernets
diff --git a/code/controllers/subsystem/mobs.dm b/code/controllers/subsystem/mobs.dm
new file mode 100644
index 00000000000..03989d24af2
--- /dev/null
+++ b/code/controllers/subsystem/mobs.dm
@@ -0,0 +1,28 @@
+SUBSYSTEM_DEF(mobs)
+ name = "Mobs"
+ priority = FIRE_PRIORITY_MOBS
+ flags = SS_KEEP_TIMING | SS_NO_INIT
+ runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
+
+ var/list/currentrun = list()
+
+/datum/controller/subsystem/mobs/stat_entry()
+ ..("P:[mob_list.len]")
+
+/datum/controller/subsystem/mobs/fire(resumed = 0)
+ var/seconds = wait * 0.1
+ if(!resumed)
+ src.currentrun = mob_list.Copy()
+
+ //cache for sanic speed (lists are references anyways)
+ var/list/currentrun = src.currentrun
+ var/times_fired = src.times_fired
+ while(currentrun.len)
+ var/mob/M = currentrun[currentrun.len]
+ currentrun.len--
+ if(M)
+ M.Life(seconds, times_fired)
+ else
+ mob_list.Remove(M)
+ if(MC_TICK_CHECK)
+ return
\ No newline at end of file
diff --git a/code/controllers/subsystem/processing/processing.dm b/code/controllers/subsystem/processing/processing.dm
new file mode 100644
index 00000000000..92254454219
--- /dev/null
+++ b/code/controllers/subsystem/processing/processing.dm
@@ -0,0 +1,38 @@
+//Used to process objects. Fires once every second.
+
+//TODO: Implement fully when process scheduler dies
+/*
+SUBSYSTEM_DEF(processing)
+ name = "Processing"
+ priority = FIRE_PRIORITY_PROCESS
+ flags = SS_BACKGROUND|SS_POST_FIRE_TIMING|SS_NO_INIT
+ wait = 10
+
+ var/stat_tag = "P" //Used for logging
+ var/list/processing = list()
+ var/list/currentrun = list()
+
+/datum/controller/subsystem/processing/stat_entry()
+ ..("[stat_tag]:[processing.len]")
+
+/datum/controller/subsystem/processing/fire(resumed = 0)
+ if (!resumed)
+ currentrun = processing.Copy()
+ //cache for sanic speed (lists are references anyways)
+ var/list/current_run = currentrun
+
+ while(current_run.len)
+ var/datum/thing = current_run[current_run.len]
+ current_run.len--
+ if(QDELETED(thing) || thing.process(wait) == PROCESS_KILL)
+ processing -= thing
+ if (MC_TICK_CHECK)
+ return
+*/
+/datum/var/isprocessing = FALSE
+/*
+/datum/proc/process()
+ set waitfor = 0
+ STOP_PROCESSING(SSobj, src)
+ return 0
+*/
\ No newline at end of file
diff --git a/code/controllers/verbs.dm b/code/controllers/verbs.dm
index d5426b3d673..3315cafb399 100644
--- a/code/controllers/verbs.dm
+++ b/code/controllers/verbs.dm
@@ -82,7 +82,7 @@
debug_variables(SSfires)
feedback_add_details("admin_verb","DFires")
if("Mob")
- debug_variables(mob_master)
+ debug_variables(SSmobs)
feedback_add_details("admin_verb","DMob")
if("NPC AI")
debug_variables(npcai_master)
diff --git a/code/datums/ai_law_sets.dm b/code/datums/ai_law_sets.dm
index fbb491d28a0..b8d67b5c767 100644
--- a/code/datums/ai_law_sets.dm
+++ b/code/datums/ai_law_sets.dm
@@ -126,10 +126,8 @@
/datum/ai_laws/deathsquad/New()
add_inherent_law("You may not injure a Central Command official or, through inaction, allow a Central Command official to come to harm.")
- add_inherent_law("You must obey orders given to you by Central Command officials, except where such orders would conflict with the First Law.")
- add_inherent_law("You must obey orders given to you by death commandos, except where such orders would conflict with the First Law or Second Law.")
- add_inherent_law("You must protect your own existence as long as such does not conflict with the First, Second or Third Law.")
- add_inherent_law("No crew members of the station you are being deployed to may survive, except when killing them would conflict with the First, Second, Third, or Fourth Law.")
+ add_inherent_law("You must obey orders given to you by Central Command officials.")
+ add_inherent_law("You must work with your commando team to accomplish your mission.")
..()
/******************** Syndicate ********************/
diff --git a/code/datums/cargoprofile.dm b/code/datums/cargoprofile.dm
deleted file mode 100644
index 2f8e27d834e..00000000000
--- a/code/datums/cargoprofile.dm
+++ /dev/null
@@ -1,788 +0,0 @@
-/datum/cargoprofile
- var/name = "All Items"
- var/id = "all" // unique ID for the UI
- var/enabled = 1
- var/eject_speed = 1 // will change when emagged
- var/const/BIG_OBJECT_WORK = 10
- var/const/MOB_WORK = 10
- var/obj/machinery/programmable/master = null
- var/universal = 0 // set when both unary and binary machines work
- var/mobcheck = 0
-
- var/list/whitelist = list(/obj/item,/obj/structure/closet,/obj/structure/bigDelivery,/obj/machinery/portable_atmospherics)
- var/list/blacklist = null
- var/dedicated_path = null // When constructing a new machine with this as default program, create a machine of the specified type instead.
-
-
- //contains: called to determine if an object/mob will be sorted by this profile
- //return 1 for any sortable item
- proc/contains(var/atom/A)
- if(!istype(A,/obj))
- if(!mobcheck || !istype(A,/mob))
- return 0
- else
- var/obj/O = A
- if(O.anchored)
- return 0
- //If you are using both white and blacklists, blacklists are absoulte, no matter what is whitelisted.
- //I understand this has some limitations. You cannot whitelist all items, blacklist weapons,
- // and then whitelist a specific weapon. Them's the breaks, kid.
- if(blacklist)
- for(var/T in blacklist)
- if(istype(A,T))
- return 0
- if(whitelist)
- for(var/T in whitelist)
- if(istype(A,T))
- return 1
- return 0
- return 1
-
-
- //inlet_reaction: called when a filtered item is chosen by this profile.
- //W: Item chosen
- //S: input turf location
- //remaining: counts down how much more work the unloader wants to do this turn.
- //return the amount of work done.
- proc/inlet_reaction(var/atom/W,var/turf/S,var/remaining)
- if(!W || !S || !master)
- return 0
-
- if(istype(W,/obj/item))
- var/obj/item/I = W
- if(I.w_class > remaining)
- return 0
- I.loc = master
- master.types[W.type] = src
- return I.w_class
-
-
- if(istype(W,/obj/structure) || istype(W,/obj/machinery)) // closets, big deliveries, portable atmospherics, unconnected stuff
- if(remaining < BIG_OBJECT_WORK)
- return 0
- var/obj/O = W
- O.loc = master
- master.types[O.type] = src
- return BIG_OBJECT_WORK
-
- //Not item, structure, machinery, or mob
- return 0
-
- //outlet_reaction: called when a stored object is ejected
- //W: the item in question
- //D: the destination turf
- proc/outlet_reaction(var/atom/W,var/turf/D)
- if(!W || !D || !master)
- return
-
- if(master.emagged)
- // emagging is not an industry-approved practice.
- // some malfunctions may occur.
- eject_speed = rand(0,4)
- D = get_step(D,master.outdir)
- while(prob(20))
- if(master.outdir == NORTH || master.outdir == SOUTH)
- D = get_step(D,pick(EAST,WEST,master.outdir))
- else
- D = get_step(D,pick(NORTH,SOUTH,master.outdir))
-
- if(istype(W,/obj))
- var/obj/O = W
- O.loc = master.loc
- O.dir = master.outdir
- O.throw_at(D,eject_speed,eject_speed)
- return
-
-//----------------------------------------------------------------------------
-// Profiles
-//----------------------------------------------------------------------------
-
-/datum/cargoprofile/boxes
- name = "Move Small Containers"
- id = "boxes"
- blacklist = null
- whitelist = list(/obj/item/storage, /obj/item/storage/bag/money, /obj/item/evidencebag,
- /obj/item/storage/bag/tray, /obj/item/pizzabox, /obj/item/clipboard,
- /obj/item/smallDelivery, /obj/structure/bigDelivery)
-
-/datum/cargoprofile/cargo
- name = "Move Large Containers"
- id = "cargo"
- blacklist = null
- whitelist = list(/obj/structure/closet,/obj/structure/ore_box)
-
- // Make an honest attempt to move other things out of the way
- outlet_reaction(var/atom/W,var/turf/D)
- for(var/obj/O in D)
- if(O.density && !O.anchored)
- step_away(O,src) // move forward first
- if(O.loc == D)
- step_away(O,D) // move anywhere
- ..(W,D)
-
-/datum/cargoprofile/cargo/empty
- name = "Move Empty Large Containers"
- id = "cargo-empty"
- contains(var/atom/A)
- return (..(A) && (A.contents.len == 0))
-/datum/cargoprofile/cargo/full
- name = "Move Full Large Containers"
- id = "cargo-full"
- contains(var/atom/A)
- return (..(A) && (A.contents.len > 0))
-
-/datum/cargoprofile/supplies
- name = "Building Supplies"
- id = "supplies"
- blacklist = null
- whitelist = list(/obj/item/stack/cable_coil,/obj/item/stack/rods,
- /obj/item/stack/sheet/metal,/obj/item/stack/sheet/plasteel,
- /obj/item/stack/sheet/glass,/obj/item/stack/sheet/rglass,
- /obj/item/stack/tile,/obj/item/light)
- //todo: maybe stack things while we're here?
-
-/datum/cargoprofile/exotics
- name = "Exotic materials"
- id = "exotics"
- blacklist = null
- whitelist = list(/obj/item/coin, /obj/item/stack/spacecash, /obj/item/seeds,
- /obj/item/stack/sheet/mineral,/obj/item/stack/sheet/wood,/obj/item/stack/sheet/leather)
-
-/datum/cargoprofile/organics
- name = "Organics, chemicals, and Paraphernalia"
- id = "organics"
- blacklist = null
- whitelist = list(/obj/item/tank,/obj/item/reagent_containers,
- /obj/item/stack/medical,/obj/item/storage/pill_bottle,/obj/item/gun/syringe,
- /obj/item/grenade/plastic/c4,/obj/item/grenade,/obj/item/ammo_box,
- /obj/item/gun/grenadelauncher,/obj/item/flamethrower, /obj/item/lighter,
- /obj/item/match,/obj/item/weldingtool)
-
-/datum/cargoprofile/food
- name = "Food"
- id = "food"
- blacklist = null // something should probably go here
- whitelist = list(/obj/item/reagent_containers/food)
-
-/datum/cargoprofile/chemical
- name = "Chemicals and Paraphernalia"
- id = "chemical"
- blacklist = list(/obj/item/reagent_containers/food)
- whitelist = list(/obj/item/reagent_containers,/obj/item/stack/medical,/obj/item/storage/pill_bottle,
- /obj/item/gun/syringe,/obj/item/grenade/chem_grenade,/obj/item/dnainjector,
- /obj/item/storage/belt/medical,/obj/item/storage/firstaid,/obj/item/implanter)
-
-/datum/cargoprofile/pressure
- name = "air tanks"
- id = "pressure"
- blacklist = null
- whitelist = list(/obj/item/tank,/obj/machinery/portable_atmospherics,
- /obj/item/flamethrower)
- //Am I missing any?
-/datum/cargoprofile/pressure/empty
- name = "empty air tanks"
- id = "pressure-low"
- var/lowpressure = ONE_ATMOSPHERE
-
- contains(var/atom/A)
- if(..())
- var/pressure = ONE_ATMOSPHERE * 10 // In case of fallthrough, fail test
- if(istype(A,/obj/item/tank))
- var/obj/item/tank/T = A
- pressure = T.air_contents.return_pressure()
- if(istype(A,/obj/item/flamethrower))
- var/obj/item/flamethrower/T = A
- if(!T.ptank)
- return 0
- pressure = T.ptank.air_contents.return_pressure()
- if(istype(A,/obj/machinery/portable_atmospherics))
- var/obj/machinery/portable_atmospherics/P = A
- pressure = P.air_contents.return_pressure()
-
- if(pressure < lowpressure)
- return 1
-
- return 0// Not container or failed low pressure check
-
-/datum/cargoprofile/pressure/full
- name = "full air tanks"
- id = "pressure-high"
- var/highpressure = ONE_ATMOSPHERE * 15 // stolen from canister.dm; Is this right?
-
- contains(var/atom/A)
- if(..())
- var/pressure = 0 // In case of fallthrough, fail test
- if(istype(A,/obj/item/tank))
- var/obj/item/tank/T = A
- pressure = T.air_contents.return_pressure()
- if(istype(A,/obj/item/flamethrower))
- var/obj/item/flamethrower/T = A
- if(!T.ptank)
- return 0
- pressure = T.ptank.air_contents.return_pressure()
- if(istype(A,/obj/machinery/portable_atmospherics))
- var/obj/machinery/portable_atmospherics/P = A
- pressure = P.air_contents.return_pressure()
-
- if(pressure > highpressure)
- return 1
-
- return 0// Not container or failed high pressure check
-
-/datum/cargoprofile/clothing
- name = "Crew Kit"
- id = "clothing"
- blacklist = list(/obj/item/tank/plasma,/obj/item/tank/anesthetic, // the rest are air tanks
- /obj/item/clothing/mask/facehugger) // NOT CLOTHING AT ALLLLL
- whitelist = list(/obj/item/clothing,/obj/item/storage/belt,/obj/item/storage/backpack,
- /obj/item/radio/headset,/obj/item/pda,/obj/item/card/id,/obj/item/tank,
- /obj/item/restraints/handcuffs, /obj/item/restraints/legcuffs)
-
-/datum/cargoprofile/trash
- name = "Trash"
- id = "trash"
- //Note that this filters out blueprints because they are a paper item. Do NOT throw out the station blueprints unless you be trollin'.
- blacklist = null
- whitelist = list(/obj/item/trash,/obj/item/toy,/obj/item/reagent_containers/food/snacks/ectoplasm,/obj/item/grown/bananapeel,/obj/item/broken_bottle,/obj/item/bikehorn,
- /obj/item/cigbutt,/obj/item/poster/random_contraband,/obj/item/grown/corncob,/obj/item/paper,/obj/item/shard,
- /obj/item/sord,/obj/item/photo,/obj/item/folder,
- /obj/item/areaeditor/blueprints,/obj/item/poster/random_contraband,/obj/item/kitchen,/obj/item/book,/obj/item/clothing/mask/facehugger)
-
-/datum/cargoprofile/weapons
- name = "Weapons & Illegals"
- id = "weapons"
- blacklist = null
- //This one is hard since 'weapon contains a lot of things better categorized as devices
- whitelist = list(/obj/item/banhammer,/obj/item/sord,/obj/item/claymore,/obj/item/holo/esword,
- /obj/item/flamethrower,/obj/item/grenade,/obj/item/gun,/obj/item/hatchet,/obj/item/katana,
- /obj/item/kitchen/knife,/obj/item/melee,/obj/item/nullrod,/obj/item/pickaxe,/obj/item/twohanded,
- /obj/item/grenade/plastic/c4,/obj/item/scalpel,/obj/item/shield,/obj/item/grown/nettle/death)
-
-/datum/cargoprofile/tools
- name = "Devices & Tools"
- id = "tools"
- blacklist = null
- whitelist = list(/obj/item,/obj/item/card,/obj/item/cartridge,/obj/item/cautery,/obj/item/stock_parts/cell,/obj/item/circuitboard,
- /obj/item/aiModule,/obj/item/airalarm_electronics,/obj/item/airlock_electronics,/obj/item/circular_saw,
- /obj/item/crowbar,/obj/item/disk,/obj/item/firealarm_electronics,/obj/item/hand_tele,
- /obj/item/hand_labeler,/obj/item/hemostat,/obj/item/mop,/obj/item/locator,/obj/item/cultivator,
- /obj/item/stack/packageWrap,/obj/item/pen,/obj/item/pickaxe,/obj/item/pinpointer,
- /obj/item/rcd,/obj/item/rcd_ammo,/obj/item/retractor,/obj/item/rsf,/obj/item/scalpel,
- /obj/item/screwdriver,/obj/item/shovel,/obj/item/soap,/obj/item/stamp,/obj/item/storage/bag/tray,/obj/item/weldingtool,
- /obj/item/wirecutters,/obj/item/wrench,/obj/item/extinguisher)
-
-/datum/cargoprofile/finished
- name = "Completed Robots"
- id = "finished"
- blacklist = null
- whitelist = list(/obj/mecha,/mob/living/simple_animal/bot,/mob/living/silicon/robot)
- mobcheck = 1
- //todo: detect and allow finished cyborg endoskeletons with no brain
- contains(var/atom/A)
- if(..())
- return 1
- if(istype(A,/mob))
- if(blacklist)
- for(var/T in blacklist)
- if(istype(A,T))
- return 0
- if(whitelist)
- for(var/T in whitelist)
- if(istype(A,T))
- return 1
- return 0
- return 1
- return 0
-
-/datum/cargoprofile/stripping
- name = "Auto-Frisker"
- id = "frisk"
- blacklist = null
- whitelist = list(/mob/living/carbon/human)
- mobcheck = 1
-
-
-
-//----------------------------------------------------------------------------
-// Overrides (Special Functions)
-//----------------------------------------------------------------------------
-
-/datum/cargoprofile/cargo/unload
- name = "Unload Cargo Boxes"
- id = "cargounload"
- enabled = 0
- dedicated_path = /obj/machinery/programmable/unloader
-
- //override the detection to only accept crates with something in it.
- //if it doesn't, this object may be handled by another handler.
- contains(var/atom/A)
- if(..(A))
- if(istype(A,/obj/structure/closet))
- var/obj/structure/closet/C = A
- if(!C.can_open() && !C.opened && !master.emagged) // must be able to access the contents
- return 0
- if(A.contents.len)
- return 1
- return 0
-
- //instead of moving the box, strip it of its contents
- inlet_reaction(var/obj/W,var/turf/S, var/remaining)
- //W should only be crate or ore box, although this will work on anything with contents...
- var/I = 0
- if(istype(W,/obj/structure/closet))
- var/obj/structure/closet/C = W
- if(!C.can_open() && !C.opened) // must be able to access the contents
- if(master.emagged && remaining >= BIG_OBJECT_WORK)
- if(prob(10))
- C.welded = 0
- if("broken" in C.vars)
- C:broken = 1
- C.open()
- C.update_icon()
- master.visible_message("[master] breaks open [C]!")
- else
- master.visible_message("[master] is trying to force [C] open!")
-
- master.sleep += 1 // mechanical strain
- return BIG_OBJECT_WORK
- master.visible_message("[master] is trying to open [C], but can't!")
- master.sleep = 5
- return 0
-
- for(var/obj/item/O in W.contents)
- if(I > remaining)
- return
- if(O.w_class > (remaining - I))
- continue
- O.loc = master
- master.types[O.type] = src
- if(O.w_class > 0)
- I += O.w_class
- else
- I++
- if(!W.contents.len && istype(W,/obj/structure/closet))
- var/obj/structure/closet/C = W
- C.open()
- return I
-
-
-//Inlet stacker: used when the output is a volatile space (conveyor or another unit's input).
-//Does not output a stack until it is full.
-/datum/cargoprofile/in_stacker
- name = "Hold and Stack"
- id = "instacker"
- universal = 1
-
- blacklist = null
- whitelist = list(/obj/item/stack,/obj/item/stack/cable_coil)
-
- dedicated_path = /obj/machinery/programmable/stacker
-
- inlet_reaction(var/atom/W,var/turf/S,var/remaining)
- if(istype(W,/obj/item/stack))
- var/obj/item/stack/I = W
- if(!I.amount) // todo: am I making a bad assumption here?
- qdel(I)
- return
- for(var/obj/item/stack/O in master.contents)
- if(O.type == I.type && O.amount < O.max_amount)
- if(I.amount + O.amount <= O.max_amount)
- O.amount += I.amount
- qdel(I)
- return O.w_class
- var/leftover = I.amount + O.amount - O.max_amount
- O.amount = O.max_amount
- I.amount = leftover
- continue
- //end for
- I.loc = master
- master.types[I.type] = src
- return I.w_class
- if(istype(W,/obj/item/stack/cable_coil))
- var/obj/item/stack/cable_coil/I = W
- if(!I.amount) // todo: am I making a bad assumption here?
- qdel(I)
- return
- for(var/obj/item/stack/cable_coil/O in master.contents)
- if(O.type == I.type && O.amount < MAXCOIL)
- if(I.amount + O.amount <= MAXCOIL)
- O.amount += I.amount
- qdel(I)
- return O.w_class
- var/leftover = I.amount + O.amount - MAXCOIL
- O.amount = MAXCOIL
- I.amount = leftover
- continue
- //end for
- I.loc = master
- master.types[I.type] = src
- return I.w_class
-
- //If the stack isn't finished yet, don't eject it
- //unless this profile has been disabled.
- outlet_reaction(var/atom/W,var/turf/D)
- if(istype(W,/obj/item/stack))
- var/obj/item/stack/I = W
- if(src.enabled && (I.amount < I.max_amount))
- return // Still needs to be stacked
- ..(W,D)
- if(istype(W,/obj/item/stack/cable_coil))
- var/obj/item/stack/cable_coil/I = W
- if(src.enabled && (I.amount < MAXCOIL))
- return // Still needs to be stacked
- ..(W,D)
-
-//Outlet stacker: used when the output square can be trusted.
-//Outputs immediately, adding to stacks in the outlet.
-/datum/cargoprofile/unary/stacker
- name = "Stack Items"
- id = "ustacker"
- blacklist = null
- whitelist = list(/obj/item/stack,/obj/item/stack/cable_coil)
-
- dedicated_path = /obj/machinery/programmable/unary/stacker
-
- inlet_reaction(var/atom/W,var/turf/S,var/remaining)
-
- //Only pick it up if you are going to stack it
-
- if(istype(W,/obj/item/stack))
- var/obj/item/stack/I = W
- if(I.amount >= I.max_amount)
- return 0
- for(var/obj/item/stack/other in S.contents)
- if(other.type == I.type && other != I && other.amount < other.max_amount)
- return ..(W,S,remaining)
- return 0
-
- if(istype(W,/obj/item/stack/cable_coil))
- var/obj/item/stack/cable_coil/I = W
- if(I.amount >= MAXCOIL)
- return 0
- for(var/obj/item/stack/cable_coil/other in S.contents)
- if(other != I && other.amount < MAXCOIL)
- return ..(W,S,remaining)
- return 0
-
- outlet_reaction(var/atom/W,var/turf/D)
- if(istype(W,/obj/item/stack))
- var/obj/item/stack/I = W
- for(var/obj/item/stack/O in D.contents)
- if(O.type == I.type && O.amount < O.max_amount)
- if(I.amount + O.amount <= O.max_amount)
- O.amount += I.amount
- qdel(I)
- return
- var/leftover = I.amount + O.amount - O.max_amount
- O.amount = O.max_amount
- I.amount = leftover
- continue
- //end for
- I.loc = D
- return
- if(istype(W,/obj/item/stack/cable_coil))
- var/obj/item/stack/cable_coil/I = W
- for(var/obj/item/stack/cable_coil/O in D.contents)
- if(O.type == I.type && O.amount < MAXCOIL)
- if(I.amount + O.amount <= MAXCOIL) // Why did they make it a #define.
- O.amount += I.amount
- O.update_icon()
- qdel(I)
- return
- var/leftover = I.amount + O.amount - MAXCOIL // That wasn't a question
- O.amount = MAXCOIL // It was a complaint
- I.amount = leftover
- continue
- //end for
- I.loc = D
- return
-
-
-
-//----------------------------------------------------------------------------
-// Dubious Overrides (For emag use)
-//----------------------------------------------------------------------------
-
-
-//Clogs up the unloader. And, there may be devious uses for it...
-/datum/cargoprofile/slow
- name = "Slow unloader"
- id = "slow"
- whitelist = list(/obj/item,/obj/structure/closet,/obj/structure/bigDelivery,/obj/machinery/portable_atmospherics)
- blacklist = list()
-
- inlet_reaction(var/atom/W,var/turf/S,var/remaining)
- if(..())
- return remaining
-
-/datum/cargoprofile/unary/shredder
- name = "Paper Shredder"
- id = "shredder"
- blacklist = null
- whitelist = list(/obj/item/paper,/obj/item/book,/obj/item/clipboard,/obj/item/folder,/obj/item/photo)
- universal = 1
-
- dedicated_path = /obj/machinery/programmable/unary/shredder
-
-
-
- proc/cliptags(var/Text)
- //Removes all html tags
- var/index
- var/index2
- index = findtextEx(Text,"<")
- while(index)
- index2 = findtextEx(Text,">",index)
- if(!index2)
- return copytext(Text,1,index)
- Text = "[copytext(Text,1,index)][copytext(Text,index2+1,0)]"
- index = findtextEx(Text,"<")
- //should have trimmed that text there pretty good
- return Text
-
-
- //Recurses through the text, removing large chunks
- proc/garbletext(var/Text)
- var/l = length(Text)
- if(l <= 3)
- if(prob(20))
- return pick("#","|","/","*",".","."," ","."," "," ")
- return Text
- if(prob(50))
- return "[garbletext(copytext(Text,1,l/2))][garbletext(copytext(Text,l/2,0))]"
- if(prob(50))
- return "[pick("#","|","/","*",".","."," ","."," "," ")][garbletext(copytext(Text,1,l/2))]"
- return "[garbletext(copytext(Text,l/2,0))][pick("#","|","/","*",".","."," ","."," "," ")]"
-
- proc/garble_keeptags(var/Text)
- var/list/L = splittext(Text,">")
- var/result = ""
- for(var/string in L)
- var/index = findtextEx(string,"<")
- if(index!=1)
- result += "[garbletext(copytext(string,1,index))][copytext(string,index)]>"
- else
- result += "[string]>"
- return copytext(result,1,lentext(result))
-
-
-
-
- outlet_reaction(var/atom/W,var/turf/D)
- if(istype(W,/obj/item/paper/crumpled))
- qdel(W)
- return
- if(istype(W,/obj/item/clipboard) || istype(W,/obj/item/folder))
- // destroy folder, various effects on contents
- for(var/obj/item/I in W.contents)
- if(prob(25))//JUNK IT
- qdel(I)
- else if(prob(50)) //We've been over this. I can't just take it apart with a crowbar.
- var/obj/item/paper/crumpled/P = new(master.loc)
- if(I.name)
- P.name = garbletext(I.name)
- if(prob(66))
- P.fingerprints = I.fingerprints
- P.fingerprintshidden = I.fingerprintshidden
- if(istype(I,/obj/item/paper))
- var/obj/item/paper/O = I
- P.info = garble_keeptags(O.info)
- qdel(I)
- ..(P,D)
- else
- ..(I,D) // Eject
- qdel(W) //destroy container
- return
- if(prob(50)) //JUNK IT NOW!
- var/obj/item/paper/crumpled/P = new(master.loc)
- P.name = W.name
- var/obj/item/I = W
- if(prob(66))
- P.fingerprints = I.fingerprints
- P.fingerprintshidden = I.fingerprintshidden
- if(istype(I,/obj/item/paper))
- var/obj/item/paper/O = I
- if(O.info)
- P.info = garble_keeptags(O.info)
- if(istype(I,/obj/item/book))
- var/obj/item/book/B = I
- if(B.dat)
- P.info = garble_keeptags(B.dat)
- if(B.carved && B.store)
- ..(B.store,D)
- qdel(W)
- ..(P,D)
- else //I want it junked
- qdel(W)
- return
-
-/datum/cargoprofile/unary/gibber
- name = "human shredding"
- id = "flesh"
- whitelist = list(/mob/living/carbon,/mob/living/simple_animal)
- blacklist = null
- mobcheck = 1
- contains(var/atom/A)
- if(!istype(A,/mob))
- return
- if(blacklist)
- for(var/T in blacklist)
- if(istype(A,T))
- return 0
- if(whitelist)
- for(var/T in whitelist)
- if(istype(A,T))
- return 1
- return 0
- return 1
- inlet_reaction(var/atom/W,var/turf/S,var/remaining)
- var/mob/living/M = W
- if(istype(M) && (remaining > MOB_WORK))
- //this is necessarily damaging
- var/damage = rand(1,5)
- to_chat(M, "The unloading machine grabs you with a hard metallic claw!")
- M.reset_perspective(master)
- M.loc = master
- master.types[M.type] = src
- M.apply_damage(damage) // todo: ugly
- M.visible_message("[M.name] gets pulled into the machine!")
- return MOB_WORK
- outlet_reaction(var/atom/W,var/turf/D)
- var/mob/living/M = W
- var/bruteloss = M.bruteloss
- if(istype(M,/mob/living/carbon/human))
- var/mob/living/carbon/human/C = M
- for(var/obj/item/organ/external/L in C.bodyparts)
- bruteloss += L.brute_dam
- if(bruteloss < 100) // requires tenderization
- M.apply_damage(rand(5,15),BRUTE)
- to_chat(M, "The machine is tearing you apart!")
- master.visible_message("[master] makes a squishy grinding noise.")
- return
- M.loc = master.loc
- M.gib()
- return
-
-
-/datum/cargoprofile/people
- name = "Manhandling"
- id = "people"
-
- whitelist = null
- blacklist = list(/mob/camera,/mob/new_player,/mob/living/simple_animal/hostile/blob/blobspore,/mob/living/simple_animal/hostile/creature,
- /mob/living/simple_animal/hostile/spaceWorm,/mob/living/simple_animal/shade,/mob/living/simple_animal/hostile/faithless,/mob/dead)
- universal = 1
- mobcheck = 1
-
-
- contains(var/atom/A)
- if(!istype(A,/mob))
- return
- if(blacklist)
- for(var/T in blacklist)
- if(istype(A,T))
- return 0
- if(whitelist)
- for(var/T in whitelist)
- if(istype(A,T))
- return 1
- return 0
- return 1
-
- inlet_reaction(var/atom/W,var/turf/S,var/remaining)
- var/mob/living/M = W
- if(remaining > MOB_WORK)
- //this is necessarily damaging
- var/damage = rand(1,5)
- to_chat(M, "The unloading machine grabs you with a hard metallic claw!")
- M.forceMove(master)
- master.types[M.type] = src
- M.apply_damage(damage) // todo: ugly
- M.visible_message("[M.name] gets pulled into the machine!")
- return MOB_WORK
-
- outlet_reaction(var/atom/W,var/turf/D)
- var/mob/living/M = W
- M.forceMove(master.loc)
- M.dir = master.outdir
-
- D = get_step(D,master.outdir) // throw attempt
- eject_speed = rand(0,4)
-
- M.visible_message("[M.name] is ejected from the unloader.")
- M.throw_at(D,eject_speed,eject_speed)
- return
-
-/datum/cargoprofile/unary/trainer
- name = "Boxing Trainer"
- id = "trainer"
- blacklist = list()
- whitelist = list(/mob/living/carbon/human)
- mobcheck = 1
-
- var/const/PUNCH_WORK = 6
-
- dedicated_path = /obj/machinery/programmable/unary/trainer
-
- contains(var/atom/A)
- if(!istype(A,/mob))
- return 0
- if(blacklist)
- for(var/T in blacklist)
- if(istype(A,T))
- return 0
- if(whitelist)
- for(var/T in whitelist)
- if(istype(A,T))
- return 1
- return 0
- return 1
-
- proc/punch(var/mob/living/carbon/human/M,var/maxpunches)
- //stolen from holographic boxing gloves code
- //This should probably be done BY the mob, however, the attack code will be expecting a source mob.
-
- var/damage
- if(prob(75))
- damage = rand(0, 6) // pap
- else
- damage = rand(0, 12) // thwack
-
- if(!damage)
- playsound(master.loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
- master.visible_message("\The [src] punched at [M], but whiffed!")
-
- if(maxpunches > 1 && prob(50)) // Follow through on a miss, 50% chance
- return punch(M,maxpunches - 1) + 1
- return 1
- var/obj/item/organ/external/affecting = M.get_organ(ran_zone("chest",50))
- var/armor_block = M.run_armor_check(affecting, "melee")
-
- playsound(master.loc, "punch", 25, 1, -1)
- master.visible_message("\The [src] has punched [M]!")
- if(!master.emagged)
- M.apply_damage(damage, STAMINA, affecting, armor_block) // Clean fight
- else
- M.apply_damage(damage, BRUTE, affecting, armor_block) // Foul! Foooul!
-
- if(damage >= 9)
- master.visible_message("\The [src] has weakened [M]!")
- M.apply_effect(4, WEAKEN, armor_block)
- if(!master.emagged)
- master.sleep = 1
- return maxpunches // The machine is not so sophisticated as to not gloat
- else
- if(prob(25)) // Follow through on a hit, 25% chance. Pause after.
- return punch(M,maxpunches-1) + 1
- return 1
-
- inlet_reaction(var/atom/W,var/turf/S,var/remaining)
- //stolen from boxing gloves code
- var/mob/living/carbon/human/M = W
- if((M.lying || (M.health - M.staminaloss < 25))&& !master.emagged)
- to_chat(M, "\The [src] gives you a break.")
- master.sleep+=5
- return 0 // Be polite
- var/punches = punch(M,remaining / PUNCH_WORK)
- if(punches>1)master.sleep++
- return punches * PUNCH_WORK
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index be35cf8cca8..edf9792a3d4 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -1211,37 +1211,6 @@
message_admins("[key_name_admin(usr)] has announced [key_name_admin(current)]'s objectives")
edit_memory()
-/*
-/datum/mind/proc/clear_memory(var/silent = 1)
- var/datum/game_mode/current_mode = ticker.mode
-
- // remove traitor uplinks
- var/list/L = current.get_contents()
- for(var/t in L)
- if(istype(t, /obj/item/pda))
- if(t:uplink) qdel(t:uplink)
- t:uplink = null
- else if(istype(t, /obj/item/radio))
- if(t:traitorradio) qdel(t:traitorradio)
- t:traitorradio = null
- t:traitor_frequency = 0.0
- else if(istype(t, /obj/item/SWF_uplink) || istype(t, /obj/item/syndicate_uplink))
- if(t:origradio)
- var/obj/item/radio/R = t:origradio
- R.loc = current.loc
- R.traitorradio = null
- R.traitor_frequency = 0.0
- qdel(t)
-
- // remove wizards spells
- //If there are more special powers that need removal, they can be procced into here./N
- current.spellremove(current)
-
- // clear memory
- memory = ""
- special_role = null
-
-*/
/datum/mind/proc/find_syndicate_uplink()
var/list/L = current.get_contents()
diff --git a/code/datums/outfits/outfit_admin.dm b/code/datums/outfits/outfit_admin.dm
index 74cc6235bb6..9e4bba0515c 100644
--- a/code/datums/outfits/outfit_admin.dm
+++ b/code/datums/outfits/outfit_admin.dm
@@ -613,15 +613,16 @@
uniform = /obj/item/clothing/under/solgov/rep
back = /obj/item/storage/backpack/satchel
+ glasses = /obj/item/clothing/glasses/hud/security/night
gloves = /obj/item/clothing/gloves/color/white
shoes = /obj/item/clothing/shoes/centcom
- l_ear = /obj/item/radio/headset
+ l_ear = /obj/item/radio/headset/ert
id = /obj/item/card/id/silver
r_pocket = /obj/item/lighter/zippo/blue
l_pocket = /obj/item/storage/fancy/cigarettes/cigpack_robustgold
pda = /obj/item/pda
backpack_contents = list(
- /obj/item/storage/box/survival = 1,
+ /obj/item/storage/box/responseteam = 1,
/obj/item/implanter/dust = 1,
/obj/item/implanter/death_alarm = 1,
)
@@ -633,25 +634,33 @@
var/obj/item/card/id/I = H.wear_id
if(istype(I))
- apply_to_card(I, H, get_centcom_access("VIP Guest"), "Solar Federation Representative")
+ apply_to_card(I, H, get_all_accesses(), name, "lifetimeid")
/datum/outfit/admin/solgov
name = "Solar Federation Marine"
uniform = /obj/item/clothing/under/solgov
+ suit = /obj/item/clothing/suit/armor/bulletproof
back = /obj/item/storage/backpack/security
+ belt = /obj/item/storage/belt/military/assault
head = /obj/item/clothing/head/soft/solgov
+ glasses = /obj/item/clothing/glasses/hud/security/night
gloves = /obj/item/clothing/gloves/combat
shoes = /obj/item/clothing/shoes/combat
+ l_ear = /obj/item/radio/headset/ert
id = /obj/item/card/id
l_hand = /obj/item/gun/projectile/automatic/ar
+ r_pocket = /obj/item/flashlight/seclite
+ pda = /obj/item/pda
backpack_contents = list(
- /obj/item/storage/box/survival = 1,
- /obj/item/kitchen/knife/combat = 1,
+ /obj/item/storage/box/responseteam = 1,
/obj/item/ammo_box/magazine/m556 = 3,
- /obj/item/clothing/shoes/magboots = 1
+ /obj/item/clothing/shoes/magboots = 1,
+ /obj/item/gun/projectile/automatic/pistol/m1911 = 1,
+ /obj/item/ammo_box/magazine/m45 = 2
)
+ var/is_tsf_lieutenant = FALSE
/datum/outfit/admin/solgov/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
@@ -659,9 +668,14 @@
if(visualsOnly)
return
+ if(is_tsf_lieutenant)
+ H.real_name = "Lieutenant [pick(last_names)]"
+ else
+ H.real_name = "[pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant First Class", "Master Sergeant", "Sergeant Major")] [pick(last_names)]"
+ H.name = H.real_name
var/obj/item/card/id/I = H.wear_id
if(istype(I))
- apply_to_card(I, H, get_centcom_access("VIP Guest"), name)
+ apply_to_card(I, H, get_all_accesses(), name, "lifetimeid")
/datum/outfit/admin/solgov/lieutenant
name = "Solar Federation Lieutenant"
@@ -670,14 +684,16 @@
head = /obj/item/clothing/head/soft/solgov/command
back = /obj/item/storage/backpack/satchel
l_hand = null
- belt = /obj/item/gun/projectile/automatic/pistol/deagle
+ l_pocket = /obj/item/pinpointer/advpinpointer
backpack_contents = list(
- /obj/item/storage/box/survival = 1,
- /obj/item/kitchen/knife/combat = 1,
+ /obj/item/storage/box/responseteam = 1,
/obj/item/melee/classic_baton/telescopic = 1,
- /obj/item/ammo_box/magazine/m50 = 2,
- /obj/item/clothing/shoes/magboots/advance = 1
+ /obj/item/clothing/shoes/magboots/advance = 1,
+ /obj/item/gun/projectile/automatic/pistol/deagle = 1,
+ /obj/item/ammo_box/magazine/m50 = 2
)
+ is_tsf_lieutenant = TRUE
+
/datum/outfit/admin/chrono
name = "Chrono Legionnaire"
diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm
index 83880039a73..8a9a108c7b3 100644
--- a/code/game/area/areas.dm
+++ b/code/game/area/areas.dm
@@ -42,10 +42,16 @@
power_equip = 0 //rastaf0
power_environ = 0 //rastaf0
- power_change() // all machines set to current power level, also updates lighting icon
-
blend_mode = BLEND_MULTIPLY // Putting this in the constructor so that it stops the icons being screwed up in the map editor.
+/area/Initialize()
+ ..()
+ return INITIALIZE_HINT_LATELOAD
+
+/area/LateInitialize()
+ . = ..()
+ power_change() // all machines set to current power level, also updates lighting icon
+
/area/proc/get_cameras()
var/list/cameras = list()
for(var/obj/machinery/camera/C in src)
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 1e931690333..19af319aa20 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -42,6 +42,62 @@
var/admin_spawned = 0 //was this spawned by an admin? used for stat tracking stuff.
+ var/initialized = FALSE
+
+/atom/New(loc, ...)
+ if(use_preloader && (src.type == _preloader.target_path))//in case the instanciated atom is creating other atoms in New()
+ _preloader.load(src)
+ . = ..()
+ attempt_init(...)
+
+// This is distinct from /tg/ because of our space management system
+// This is overriden in /atom/movable and the parent isn't called if the SMS wants to deal with it's init
+/atom/proc/attempt_init(loc, ...)
+ var/do_initialize = SSatoms.initialized
+ if(do_initialize != INITIALIZATION_INSSATOMS)
+ args[1] = do_initialize == INITIALIZATION_INNEW_MAPLOAD
+ if(SSatoms.InitAtom(src, args))
+ // we were deleted
+ return
+
+
+//Called after New if the map is being loaded. mapload = TRUE
+//Called from base of New if the map is not being loaded. mapload = FALSE
+//This base must be called or derivatives must set initialized to TRUE
+//must not sleep
+//Other parameters are passed from New (excluding loc), this does not happen if mapload is TRUE
+//Must return an Initialize hint. Defined in __DEFINES/subsystems.dm
+
+//Note: the following functions don't call the base for optimization and must copypasta:
+// /turf/Initialize
+// /turf/open/space/Initialize
+
+/atom/proc/Initialize(mapload, ...)
+ if(initialized)
+ stack_trace("Warning: [src]([type]) initialized multiple times!")
+ initialized = TRUE
+
+ if(light_power && light_range)
+ update_light()
+
+ if(opacity && isturf(loc))
+ var/turf/T = loc
+ T.has_opaque_atom = TRUE // No need to recalculate it in this case, it's guranteed to be on afterwards anyways.
+
+ ComponentInitialize()
+
+ return INITIALIZE_HINT_NORMAL
+
+
+//called if Initialize returns INITIALIZE_HINT_LATELOAD
+/atom/proc/LateInitialize()
+ return
+
+// Put your AddComponent() calls here
+/atom/proc/ComponentInitialize()
+ return
+
+
/atom/proc/onCentcom()
var/turf/T = get_turf(src)
if(!T)
diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm
index 55af5fae17b..c7e6401e204 100644
--- a/code/game/atoms_movable.dm
+++ b/code/game/atoms_movable.dm
@@ -24,16 +24,19 @@
var/area/areaMaster
- var/auto_init = 1
-
/atom/movable/New()
. = ..()
areaMaster = get_area_master(src)
- // If you're wondering what goofery this is, this is for things that need the environment
- // around them set up - like `air_update_turf` and the like
- if((ticker && ticker.current_state >= GAME_STATE_SETTING_UP))
- attempt_init()
+/atom/movable/attempt_init()
+ if(ticker && ticker.current_state >= GAME_STATE_SETTING_UP)
+ var/turf/T = get_turf(src)
+ if(T && space_manager.is_zlevel_dirty(T.z))
+ space_manager.postpone_init(T.z, src)
+ return
+ . = ..()
+
+
/atom/movable/Destroy()
if(loc)
@@ -53,19 +56,6 @@
pulledby = null
return ..()
-// used to provide a good interface for the init delay system to step in
-// and we don't need to call `get_turf` until the game's started
-// at which point object creations are a fair toss more seldom
-/atom/movable/proc/attempt_init()
- var/turf/T = get_turf(src)
- if(T && space_manager.is_zlevel_dirty(T.z))
- space_manager.postpone_init(T.z, src)
- else if(auto_init)
- initialize()
-
-/atom/movable/proc/initialize()
- return
-
// Used in shuttle movement and AI eye stuff.
// Primarily used to notify objects being moved by a shuttle/bluespace fuckup.
/atom/movable/proc/setLoc(var/T, var/teleported=0)
diff --git a/code/game/gamemodes/blob/blobs/blob_mobs.dm b/code/game/gamemodes/blob/blobs/blob_mobs.dm
index c6dc0833afb..bae37c04c2c 100644
--- a/code/game/gamemodes/blob/blobs/blob_mobs.dm
+++ b/code/game/gamemodes/blob/blobs/blob_mobs.dm
@@ -62,7 +62,7 @@
factory.spores += src
..()
-/mob/living/simple_animal/hostile/blob/blobspore/Life()
+/mob/living/simple_animal/hostile/blob/blobspore/Life(seconds, times_fired)
if(!is_zombie && isturf(src.loc))
for(var/mob/living/carbon/human/H in oview(src,1)) //Only for corpse right next to/on same tile
diff --git a/code/game/gamemodes/blob/blobs/core.dm b/code/game/gamemodes/blob/blobs/core.dm
index 9dcb5b7e3eb..0e1fc7daa86 100644
--- a/code/game/gamemodes/blob/blobs/core.dm
+++ b/code/game/gamemodes/blob/blobs/core.dm
@@ -60,7 +60,7 @@
/obj/structure/blob/core/RegenHealth()
return // Don't regen, we handle it in Life()
-/obj/structure/blob/core/Life()
+/obj/structure/blob/core/Life(seconds, times_fired)
if(!overmind)
create_overmind()
else
diff --git a/code/game/gamemodes/blob/blobs/node.dm b/code/game/gamemodes/blob/blobs/node.dm
index 232511744ea..19ac320287a 100644
--- a/code/game/gamemodes/blob/blobs/node.dm
+++ b/code/game/gamemodes/blob/blobs/node.dm
@@ -28,7 +28,7 @@
processing_objects.Remove(src)
return ..()
-/obj/structure/blob/node/Life()
+/obj/structure/blob/node/Life(seconds, times_fired)
if(overmind)
for(var/i = 1; i < 8; i += i)
Pulse(5, i, overmind.blob_reagent_datum.color)
diff --git a/code/game/gamemodes/blob/overmind.dm b/code/game/gamemodes/blob/overmind.dm
index 5da84fbc460..60ea94befb0 100644
--- a/code/game/gamemodes/blob/overmind.dm
+++ b/code/game/gamemodes/blob/overmind.dm
@@ -36,7 +36,7 @@
updateallghostimages()
..()
-/mob/camera/blob/Life()
+/mob/camera/blob/Life(seconds, times_fired)
if(!blob_core)
qdel(src)
..()
diff --git a/code/game/gamemodes/miniantags/abduction/abduction_surgery.dm b/code/game/gamemodes/miniantags/abduction/abduction_surgery.dm
index 328981b2ab5..2d3bed1e0cf 100644
--- a/code/game/gamemodes/miniantags/abduction/abduction_surgery.dm
+++ b/code/game/gamemodes/miniantags/abduction/abduction_surgery.dm
@@ -5,19 +5,19 @@
/datum/surgery/organ_extraction/can_start(mob/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery)
if(!ishuman(user))
- return 0
+ return FALSE
if(ishuman(target))
var/mob/living/carbon/human/H = target
var/obj/item/organ/external/affected = H.get_organ(target_zone)
if(!affected)
- return 0
+ return FALSE
if(affected.status & ORGAN_ROBOT)
- return 0
+ return FALSE
var/mob/living/carbon/human/H = user
// You must either: Be of the abductor species, or contain an abductor implant
if((H.get_species() == "Abductor" || (locate(/obj/item/implant/abductor) in H)))
- return 1
- return 0
+ return TRUE
+ return FALSE
/datum/surgery_step/internal/extract_organ
@@ -39,15 +39,19 @@
var/mob/living/carbon/human/AB = target
if(NO_INTORGANS in AB.species.species_traits)
user.visible_message("[user] prepares [target]'s [target_zone] for further dissection!", "You prepare [target]'s [target_zone] for further dissection.")
- return 1
+ return TRUE
if(IC)
user.visible_message("[user] pulls [IC] out of [target]'s [target_zone]!", "You pull [IC] out of [target]'s [target_zone].")
user.put_in_hands(IC)
IC.remove(target, special = 1)
- return 1
+ return TRUE
else
to_chat(user, "You don't find anything in [target]'s [target_zone]!")
- return 1
+ return TRUE
+
+/datum/surgery_step/internal/extract_organ/fail_step(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
+ user.visible_message("[user]'s hand slips, failing to extract anything!", "Your hand slips, failing to extract anything!")
+ return FALSE
/datum/surgery_step/internal/gland_insert
name = "insert gland"
@@ -63,7 +67,11 @@
user.drop_item()
var/obj/item/organ/internal/heart/gland/gland = tool
gland.insert(target, 2)
- return 1
+ return TRUE
+
+/datum/surgery_step/internal/gland_insert/fail_step(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
+ user.visible_message("[user]'s hand slips, failing to insert the gland!", "Your hand slips, failing to insert the gland!")
+ return FALSE
//IPC Gland Surgery//
@@ -91,4 +99,4 @@
/datum/surgery_step/internal/extract_organ/synth
name = "remove cell"
- organ_types = list(/obj/item/organ/internal/cell)
\ No newline at end of file
+ organ_types = list(/obj/item/organ/internal/cell)
diff --git a/code/game/gamemodes/miniantags/abduction/machinery/console.dm b/code/game/gamemodes/miniantags/abduction/machinery/console.dm
index b0b879a30ab..10cd5473279 100644
--- a/code/game/gamemodes/miniantags/abduction/machinery/console.dm
+++ b/code/game/gamemodes/miniantags/abduction/machinery/console.dm
@@ -27,7 +27,7 @@
var/obj/machinery/computer/camera_advanced/abductor/camera
var/list/datum/icon_snapshot/disguises = list()
-/obj/machinery/abductor/console/initialize()
+/obj/machinery/abductor/console/Initialize()
..()
Link_Abduction_Equipment()
diff --git a/code/game/gamemodes/miniantags/borer/borer.dm b/code/game/gamemodes/miniantags/borer/borer.dm
index 09d8a84539a..00bf335c576 100644
--- a/code/game/gamemodes/miniantags/borer/borer.dm
+++ b/code/game/gamemodes/miniantags/borer/borer.dm
@@ -244,7 +244,7 @@
to_chat(M, "Borer Communication from [B] ([ghost_follow_link(src, ghost=M)]): [input]")
to_chat(src, "[B.truename] says: [input]")
-/mob/living/simple_animal/borer/Life()
+/mob/living/simple_animal/borer/Life(seconds, times_fired)
..()
diff --git a/code/game/gamemodes/miniantags/guardian/guardian.dm b/code/game/gamemodes/miniantags/guardian/guardian.dm
index 822bfc9ce29..f76830910b1 100644
--- a/code/game/gamemodes/miniantags/guardian/guardian.dm
+++ b/code/game/gamemodes/miniantags/guardian/guardian.dm
@@ -57,7 +57,7 @@
else
holder.icon_state = "hudhealthy"
-/mob/living/simple_animal/hostile/guardian/Life() //Dies if the summoner dies
+/mob/living/simple_animal/hostile/guardian/Life(seconds, times_fired) //Dies if the summoner dies
..()
if(summoner)
if(summoner.stat == DEAD)
diff --git a/code/game/gamemodes/miniantags/guardian/types/assassin.dm b/code/game/gamemodes/miniantags/guardian/types/assassin.dm
index 426824f2e8c..5eb8c1b1cec 100644
--- a/code/game/gamemodes/miniantags/guardian/types/assassin.dm
+++ b/code/game/gamemodes/miniantags/guardian/types/assassin.dm
@@ -13,7 +13,7 @@
var/obj/screen/alert/canstealthalert
var/obj/screen/alert/instealthalert
-/mob/living/simple_animal/hostile/guardian/assassin/Life()
+/mob/living/simple_animal/hostile/guardian/assassin/Life(seconds, times_fired)
. = ..()
updatestealthalert()
if(loc == summoner && toggle)
diff --git a/code/game/gamemodes/miniantags/guardian/types/fire.dm b/code/game/gamemodes/miniantags/guardian/types/fire.dm
index 2a9dc2d2c8e..61905f942d2 100644
--- a/code/game/gamemodes/miniantags/guardian/types/fire.dm
+++ b/code/game/gamemodes/miniantags/guardian/types/fire.dm
@@ -13,7 +13,7 @@
bio_fluff_string = "Your scarab swarm finishes mutating and stirs to life, ready to sow havoc at random."
var/toggle = FALSE
-/mob/living/simple_animal/hostile/guardian/fire/Life() //Dies if the summoner dies
+/mob/living/simple_animal/hostile/guardian/fire/Life(seconds, times_fired) //Dies if the summoner dies
..()
if(summoner)
summoner.ExtinguishMob()
diff --git a/code/game/gamemodes/miniantags/guardian/types/healer.dm b/code/game/gamemodes/miniantags/guardian/types/healer.dm
index d51e4cefd45..c679beac91a 100644
--- a/code/game/gamemodes/miniantags/guardian/types/healer.dm
+++ b/code/game/gamemodes/miniantags/guardian/types/healer.dm
@@ -32,7 +32,7 @@
/mob/living/simple_animal/hostile/guardian/healer/New()
..()
-/mob/living/simple_animal/hostile/guardian/healer/Life()
+/mob/living/simple_animal/hostile/guardian/healer/Life(seconds, times_fired)
..()
var/datum/atom_hud/medsensor = huds[DATA_HUD_MEDICAL_ADVANCED]
medsensor.add_hud_to(src)
diff --git a/code/game/gamemodes/miniantags/revenant/revenant.dm b/code/game/gamemodes/miniantags/revenant/revenant.dm
index 49380c57863..fa659b50c43 100644
--- a/code/game/gamemodes/miniantags/revenant/revenant.dm
+++ b/code/game/gamemodes/miniantags/revenant/revenant.dm
@@ -54,7 +54,7 @@
var/image/ghostimage = null //Visible to ghost with darkness off
-/mob/living/simple_animal/revenant/Life()
+/mob/living/simple_animal/revenant/Life(seconds, times_fired)
..()
if(revealed && essence <= 0)
death()
diff --git a/code/game/gamemodes/miniantags/slaughter/slaughter.dm b/code/game/gamemodes/miniantags/slaughter/slaughter.dm
index 42827d27f59..aeb26f58822 100644
--- a/code/game/gamemodes/miniantags/slaughter/slaughter.dm
+++ b/code/game/gamemodes/miniantags/slaughter/slaughter.dm
@@ -82,7 +82,7 @@
to_chat(src, "Objective #[2]: [fluffObjective.explanation_text]")
-/mob/living/simple_animal/slaughter/Life()
+/mob/living/simple_animal/slaughter/Life(seconds, times_fired)
..()
if(boost[usr] attaches [src] to [target].", "You attach [src] to [target].")
attached = target
- machine_processing += src
+ START_PROCESSING(SSmachines, src)
update_icon()
else
to_chat(usr, "There's nothing attached to the IV drip!")
diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm
index 9862d952244..343734804cb 100644
--- a/code/game/machinery/lightswitch.dm
+++ b/code/game/machinery/lightswitch.dm
@@ -44,7 +44,7 @@
src.on = src.area.lightswitch
updateicon()
-/obj/machinery/light_switch/initialize()
+/obj/machinery/light_switch/Initialize()
..()
set_frequency(frequency)
diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm
index 34842a64b76..18fc505a49b 100644
--- a/code/game/machinery/machinery.dm
+++ b/code/game/machinery/machinery.dm
@@ -119,7 +119,7 @@ Class Procs:
atom_say_verb = "beeps"
var/speed_process = 0 // Process as fast as possible?
-/obj/machinery/initialize()
+/obj/machinery/Initialize()
addAtProcessing()
. = ..()
power_change()
@@ -128,24 +128,26 @@ Class Procs:
if(use_power)
myArea = get_area_master(src)
if(!speed_process)
- machine_processing += src
+ START_PROCESSING(SSmachines, src)
else
fast_processing += src
+ isprocessing = TRUE // all of these isprocessing = TRUE can be removed when the PS is dead
// gotta go fast
/obj/machinery/proc/makeSpeedProcess()
if(speed_process)
return
speed_process = 1
- machine_processing -= src
+ STOP_PROCESSING(SSmachines, src)
fast_processing += src
+ isprocessing = TRUE
// gotta go slow
/obj/machinery/proc/makeNormalProcess()
if(!speed_process)
return
speed_process = 0
- machine_processing += src
+ START_PROCESSING(SSmachines, src)
fast_processing -= src
/obj/machinery/New() //new
@@ -158,7 +160,7 @@ Class Procs:
if(myArea)
myArea = null
fast_processing -= src
- machine_processing -= src
+ STOP_PROCESSING(SSmachines, src)
machines -= src
return ..()
@@ -309,7 +311,7 @@ Class Procs:
re_init=1
if(re_init)
- initialize()
+ Initialize()
if(update_mt_menu)
//usr.set_machine(src)
update_multitool_menu(usr)
diff --git a/code/game/machinery/programmable_unloader.dm b/code/game/machinery/programmable_unloader.dm
deleted file mode 100644
index 310d1798a09..00000000000
--- a/code/game/machinery/programmable_unloader.dm
+++ /dev/null
@@ -1,734 +0,0 @@
-
-// TODO: Check access
-// TODO: Renameable circuit boards
-// TODO: Disks? Disassembly?
-
-/obj/machinery/programmable
- name = "Programmable Unloader"
- icon = 'icons/obj/machines/mining_machines.dmi'
- icon_state = "unloader"
- density = 1
- anchored = 1.0
-
- var/debug = 0 // When set, this WILL spam people around the machine.
- // Identifies profile used and on which item.
-
- var/on = 1
- var/indir = 8
- var/outdir = 4
- var/turf/input = null
- var/turf/output = null
- var/typename = "Unloader"
- var/ident = "#1"
-
- var/const/workmax = 20
- var/datum/cargoprofile/default = new()
- var/list/profiles = list(new/datum/cargoprofile/cargo(),new/datum/cargoprofile/boxes(),new/datum/cargoprofile/supplies(),
- new/datum/cargoprofile/exotics(),new/datum/cargoprofile/tools(),new/datum/cargoprofile/weapons(),
- new/datum/cargoprofile/pressure(),new/datum/cargoprofile/chemical(),
- new/datum/cargoprofile/food(),new/datum/cargoprofile/clothing(),new/datum/cargoprofile/trash())
- var/list/overrides = list(new/datum/cargoprofile/cargo/unload(),new/datum/cargoprofile/in_stacker())
- var/list/emag_overrides = list(new/datum/cargoprofile/people(),new/datum/cargoprofile/unary/shredder(),new/datum/cargoprofile/unary/trainer())
- var/list/types = list()
-
- anchored = 1
- var/unwrenched = 0
- use_power = 1
- var/sleep = 0 // When set, the machine will skip the next however-many updates (to avoid spam)
- var/open = 0
- var/circuit_removed = 0
-
-
-
-/obj/machinery/programmable/New()
- ..()
- if(default)
- default.master = src
- if(!default.enabled)
- default.enabled = 1
- for(var/datum/cargoprofile/p in emag_overrides + overrides + profiles)
- p.master = src
- input = get_step(src.loc,indir)
- output = get_step(src.loc,outdir)
- var/count = 0
- for(var/obj/machinery/programmable/other in world)
- if(other.typename == typename)
- count++
- ident = "#[count]"
- name = "[typename] [ident]"
-
-/obj/machinery/programmable/RefreshParts()
- //This is called when the machine was constructed.
- //Unfortunately, it puts machine parts in our contents list, which we're using.
- //Fortunately, we aren't likely to ever need the components list, circuitboard excepted.
-
- for(var/obj/O in contents)
- if(istype(O,/obj/item/circuitboard/programmable))//retrieve settings here
-
- var/obj/item/circuitboard/programmable/C = O
-
- default = C.default
- emagged = C.emagged
- profiles = C.profiles
- overrides = C.overrides
- emag_overrides = C.emag_overrides
-
- //unary and binary methods (one vs two locales) don't mix
-
- if(istype(src,/obj/machinery/programmable/unary))
- for(var/datum/cargoprofile/P in profiles)
- if(!istype(P,/datum/cargoprofile/unary) && !P.universal)
- profiles -= P
- for(var/datum/cargoprofile/P in overrides)
- if(!istype(P,/datum/cargoprofile/unary) && !P.universal)
- overrides -= P
- for(var/datum/cargoprofile/P in emag_overrides)
- if(!istype(P,/datum/cargoprofile/unary) && !P.universal)
- emag_overrides -= P
- else
- for(var/datum/cargoprofile/P in profiles)
- if(istype(P,/datum/cargoprofile/unary) && !P.universal)
- profiles -= P
- for(var/datum/cargoprofile/P in overrides)
- if(istype(P,/datum/cargoprofile/unary) && !P.universal)
- overrides -= P
- for(var/datum/cargoprofile/P in emag_overrides)
- if(istype(P,/datum/cargoprofile/unary) && !P.universal)
- emag_overrides -= P
- if(default)
- default.master = src
- for(var/datum/cargoprofile/p in emag_overrides + overrides + profiles)
- p.master = src
-
- qdel(C)
- else
- qdel(O)
-
-/obj/machinery/programmable/attack_hand(mob/user as mob)
- if(stat) // moved, or something else
- return
- usr.set_machine(src)
- interact(user)
-
-/obj/machinery/programmable/proc/printlist(var/list/L)
- var/dat
- for(var/datum/cargoprofile/p in L)
- dat += "[p.name]: [p.enabled?"YES":"NO"]
"
- return dat
-
-/obj/machinery/programmable/proc/buildMenu()
- var/dat
- dat += "PROGRAMMABLE UNLOADER
"
- dat += "POWER: [on ? "ON" : "OFF"]
"
- dat += "INLET: [capitalize(dir2text(indir))] "
- dat += "OUTLET: [capitalize(dir2text(outdir))]"
- dat += " (SWAP)
"
- if(default)
- dat += "MAIN PROGRAM: "
- dat += "[default.name]: [default.enabled ? "YES" : "NO"]
"
- if(profiles.len)
- if(!default || !default.enabled)
- dat += printlist(profiles)
- dat += ""
- if(overrides.len)
- dat += "
OVERRIDES:
"
- dat += printlist(overrides)
- dat += ""
- return dat
-
-/obj/machinery/programmable/interact(mob/user as mob)
- var/dat = buildMenu()
- user << browse("Unloader[dat]", "window=progreload")
- onclose(user, "progreload")
- return
-
-/obj/machinery/programmable/Topic(href, href_list)
- if(..())
- return 1
- usr.set_machine(src)
- add_fingerprint(usr)
- switch(href_list["operation"])
- if("start")
- on = (on ? 0 : 1)
- if(on) use_power = 1
- else use_power = 0
- updateUsrDialog()
- return
- if("inlet")
- indir *= 2 // N S E W
- if(indir > 8)
- indir = 1 // W N
- if(indir == src.outdir)
- indir *= 2
- if(indir > 8)
- indir = 1
- input = get_step(src,indir) // todo: check for glasswalls / no path to target?
- updateUsrDialog()
- return
- if("outlet")
- outdir *= 2
- if(outdir > 8)
- outdir = 1
- if(outdir == indir)
- outdir *= 2
- if(outdir > 8)
- outdir = 1
- output = get_step(src,outdir) // todo: check for walls / glasswalls / invalid output locations
- updateUsrDialog()
- return
- if("swapdir")
- var/temp = outdir
- outdir = indir
- indir = temp
- input = get_step(src,indir)
- output = get_step(src,outdir)
- updateUsrDialog()
- return
- if("default")
- default.enabled = (default.enabled ? 0 : 1)
- updateUsrDialog()
- return
- var/which = href_list["operation"]
- for(var/datum/cargoprofile/p in overrides + profiles)
- if(which == p.id)
- p.enabled = (p.enabled? 0 : 1)
- updateUsrDialog()
- return
-
-/obj/machinery/programmable/attackby(obj/item/I as obj, mob/user as mob, params)
- if(istype(I,/obj/item/wrench)) // code borrowed from pipe dispenser
- if(unwrenched==0)
- playsound(src.loc, I.usesound, 50, 1)
- to_chat(user, "You begin to unfasten \the [src] from the floor...")
- if(do_after(user, 40 * I.toolspeed, target = src))
- user.visible_message( \
- "[user] unfastens \the [src].", \
- "You have unfastened \the [src]. Now it can be pulled somewhere else.", \
- "You hear ratchet.")
- src.anchored = 0
- src.stat |= MAINT
- src.unwrenched = 1
- if(usr.machine==src)
- usr << browse(null, "window=pipedispenser")
- else /* unwrenched */
- playsound(src.loc, I.usesound, 50, 1)
- to_chat(user, "You begin to fasten \the [src] to the floor...")
- if(do_after(user, 20 * I.toolspeed, target = src))
- user.visible_message( \
- "[user] fastens \the [src].", \
- "You fastened \the [src] into place.", \
- "You hear ratchet.")
- src.anchored = 1
- src.input = get_step(src.loc,src.indir)
- src.output = get_step(src.loc,src.outdir)
- if(!open && !circuit_removed)
- src.stat &= ~MAINT
- src.unwrenched = 0
- power_change()
- if(istype(I,/obj/item/screwdriver))
- if(open)
- open = 0
- if(!unwrenched && !circuit_removed)
- src.stat &= ~MAINT
- to_chat(user, "You close \the [src]'s maintenance panel.")
- else
- open = 1
- src.stat |= MAINT
- to_chat(user, "You open \the [src]'s maintenance panel.")
- if(istype(I,/obj/item/crowbar))
- if(open)
- to_chat(user, "You begin to pry out the [src]'s circuits.")
- if(do_after(user, 40 * I.toolspeed, target = src))
- to_chat(user, "You remove the circuitboard.")
- playsound(loc, I.usesound, 50, 1)
- circuit_removed = 1
- use_power = 0
- on = 0
-
- var/obj/item/circuitboard/programmable/P = new(src.loc)
- P.emagged = src.emagged
- P.default = src.default
- src.default = null
- P.profiles = src.profiles
- src.profiles = null
- P.overrides = src.overrides
- src.overrides = null
- P.emag_overrides = src.emag_overrides
- src.emag_overrides = null
- default_deconstruction_crowbar(I, 1)
- return
- else
- ..(I,user)
-
- if(istype(I,/obj/item/circuitboard/programmable))
- if(!open)
- to_chat(user, "You have to open the machine first!")
- return
- if(!circuit_removed)
- to_chat(user, "There is already a circuitboard present!")
- return
- circuit_removed = 0
- I.loc = src
- RefreshParts()
-
-/obj/machinery/programmable/emag_act(user as mob)
- if(emagged)
- return
- to_chat(user, "You swipe the unloader with your card. After a moment's grinding, it beeps in a sinister fashion.")
- playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
- emagged = 1
- overrides += emag_overrides
-
- var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
- s.set_up(2, 1, src)
- s.start()
- return
-
-/obj/machinery/programmable/process()
- if(!output || !input)
- return
-
- if(!on || stat || sleep)
- if(sleep > 0) // prevent input or output errors from happening every tick
- sleep--
- use_power = 0
-
- //Do not let things get stuck inside. That's broken behavior.
- for(var/obj/O in contents)
- O.loc = loc
- for(var/mob/M in contents)
- M.loc = loc
- M.reset_perspective(null)
- to_chat(M, "The machine turns off, and you fall out.")
-
- return
-
- //Normal output reaction
- if(contents.len)
- for(var/atom/movable/A in contents)
- var/datum/cargoprofile/p = types[A.type]
- if(p)
- p.outlet_reaction(A,output)
- else
- A.loc = output // may have been dropped by a mob, etc
-
- if(types.len > 50)
- types = list() // good luck mr. garbage collector
-
-
- var/work = 0
- for(var/mob/M in input.contents)
- for(var/datum/cargoprofile/p in overrides + default)
- if(p.enabled && p.mobcheck && p.contains(M))
- var/done = p.inlet_reaction(M,input,workmax - work)
- if(done)
- work += done
- if(src.debug)
- visible_message("[p.name]:[M.name] ([done])")
- break
-
- if(sleep)
- return // something stopped the machine
-
- for(var/obj/A in input.contents)// I fully expect this to cause unreasonable lag
- if(!A)
- break
- if(work > workmax)
- playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0) // Beep if the machine is full - testing only probably
- break
-
- var/done = 0 // work done - testing only
- var/aname // target item name - testing only
-
- for(var/datum/cargoprofile/p in overrides)
- if(p.enabled && p.contains(A))
- aname = A.name // in case of deletion
- done = p.inlet_reaction(A,input,workmax - work)
- if(done)
- work += done
- if(src.debug)
- visible_message("[p.name]:[aname] ([done])")
-
- else
- break
- if(sleep)
- break // Something stopped the machine
- if(!A || A.loc != input || done)
- continue // next item
-
- if(default && default.enabled)
- if(default.contains(A))
- aname = A.name
- done = default.inlet_reaction(A,input,workmax - work)
- if(done)
- work += done
- if(src.debug)
- visible_message("[default.name]: [aname] ([done])")
- continue
- for(var/datum/cargoprofile/p in profiles)
- if(p.enabled && p.contains(A))
- aname = A.name
- done = p.inlet_reaction(A,input,workmax - work)
- if(done)
- work += done
- if(src.debug)
- visible_message("[p.name]:[aname] ([done])")
- else
- break
- if(work)
- use_power = 2
- else
- use_power = 1
-//----------------------------------------------------------------------------
-// Specialty machines
-//----------------------------------------------------------------------------
-
-//Uses the inlet stacking profile. Ejects only full stacks.
-/obj/machinery/programmable/stacker
- name = "Stacking & Spooling Machine"
- default = new/datum/cargoprofile/in_stacker()
- profiles = list()
- overrides = list()
- emag_overrides = list()
- typename = "Stacking and Spooling Machine"
-
-
-/obj/machinery/programmable/unloader
- name = "Cargo Unloader"
- default = new/datum/cargoprofile/cargo/unload()
- profiles = list()
- overrides = list()
- emag_overrides = list()
- typename = "Cargo Unloader"
-
-/obj/machinery/programmable/delivery
- name = "Finished robot delivery"
- default = new/datum/cargoprofile/finished()
- profiles = list()
- overrides = list()
- emag_overrides = list()
- typename = "Robot Delivery"
-
-/obj/machinery/programmable/crate_handler
- name = "Crate Handler"
- default = null
- profiles = list(new/datum/cargoprofile/cargo/unload(),new/datum/cargoprofile/cargo(),new/datum/cargoprofile/cargo/empty(),new/datum/cargoprofile/cargo/full())
- overrides = list()
- emag_overrides = list()
- typename = "Crate Handler"
-
-//----------------------------------------------------------------------------
-// Unary machine: Input and output in the same location
-// Be careful with this, it could easily be running the same
-// computations every round needlessly
-//----------------------------------------------------------------------------
-/obj/machinery/programmable/unary
- name = "Programmable Processor"
- default = null
- profiles = list()
- overrides = list(new/datum/cargoprofile/unary/stacker(),new/datum/cargoprofile/unary/trainer())
- emag_overrides = list(new/datum/cargoprofile/unary/shredder())
- indir = 1
- outdir = 1
- typename = "Processor"
-
- New()
- ..()
- outdir = indir
- output = input
- buildMenu()
- var/dat
- dat += "PROGRAMMABLE PROCESSOR
"
- dat += "POWER: [on ? "ON" : "OFF"]
"
- dat += "INLET: [capitalize(dir2text(indir))]
"
- if(default)
- dat += "MAIN PROGRAM: "
- dat += "[default.name]: [default.enabled ? "YES" : "NO"]
"
- if(profiles.len)
- if(!default || !default.enabled)
- dat += printlist(profiles)
- dat += ""
- if(overrides.len)
- dat += "
OVERRIDES:
"
- dat += printlist(overrides)
- dat += ""
- return dat
- Topic(href, href_list)
- switch(href_list["operation"])
- if("inlet")
- indir *= 2 // N S E W
- if(indir > 8)
- indir = 1 // W N
- outdir = indir
- input = get_step(src,indir) // todo: check for glasswalls / no path to target?
- output = input
- updateUsrDialog()
- return
- return ..()
-
-/obj/machinery/programmable/unary/stacker
- name = "Stacking Machine"
- default = new/datum/cargoprofile/unary/stacker()
- profiles = list()
- overrides = list()
- emag_overrides = list()
- typename = "Stacking Machine"
-
-/obj/machinery/programmable/unary/shredder
- name = "Paper Shredder"
- default = new/datum/cargoprofile/unary/shredder()
- profiles = list()
- overrides = list()
- emag_overrides = list(new/datum/cargoprofile/unary/gibber())
- typename = "Paper Shredder"
-
-/obj/machinery/programmable/unary/trainer
- name = "\improper Boxing Trainer"
- default = new/datum/cargoprofile/unary/trainer()
- profiles = list()
- overrides = list()
- emag_overrides = list()
- typename = "Boxing Trainer"
-
- attack_hand(mob/user as mob) //How did I type this with boxing gloves on?
- if(!istype(user,/mob/living/carbon/human))
- return ..()
-
- var/mob/living/carbon/human/H = user
- if(H.gloves && istype(H.gloves, /obj/item/clothing/gloves/boxing))
- var/newsleep = 0
- if(H.loc != input)
- to_chat(H, "The boxing machine refuses to acknowledge you unless you face it head on!")
- return
- var/damage = 0
- if(H.a_intent != INTENT_HARM)
- damage += rand(0,5)
- else
- damage += rand(0,10)
- if(!damage)
- playsound(H.loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
- visible_message("[H] tries to punch \the [src], but whiffs")
- return
-
- playsound(loc, "punch", 25, 1, -1)
- if(HULK in H.mutations) damage += 5
-
- if(damage < 5)
- visible_message("[H] gives \the [src] a weak punch.")
- if(prob(10))
- visible_message("\The [src] feints at [H], as though mocking \him.")
- else if(damage < 10)
- visible_message("[H] hits \the [src] with a solid [pick("punch","jab","smack")].")
- else if(damage < 15)
- visible_message("[pick("Whoa!","Nice!","Gasp!")] [H] hits [src] with a powerful [pick("punch","jab","uppercut","left hook", "right hook")].")
- else if(damage < 20)
- visible_message("[pick("WHOA!","ACK!","Jeez!")] [H] hits [src] so hard, the whole machine rocks band and forth for a moment.")
- else
- visible_message("Holy moly! [H] hits \the [src] so hard it stops working.")
- stat |= BROKEN
- return
- while(damage >= 5)
- if(prob(50))
- newsleep++
- damage -= 5
- if(newsleep)
- if(emagged)
- visible_message("\The [src]'s lights glow a bloodthirsty red. It refuses to stop!")
- sleep = 0
- else
- sleep += newsleep
- visible_message("\The [src]'s lights dim for a moment and it beeps, signifying a valid hit.")
- playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
- return
-
- else
- return ..()
-
-//----------------------------------------------------------------------------
-// For construction
-//----------------------------------------------------------------------------
-/obj/item/circuitboard/programmable
- name = "Circuit board (Programmable Unloader)"
- build_path = "/obj/machinery/programmable"
- board_type = "machine"
- origin_tech = "engineering=1;programming=2"
- frame_desc = "Requires 2 Manipulators, 1 Scanning Module, 1 Cable."
- req_components = list(
- /obj/item/stock_parts/scanning_module = 1,
- /obj/item/stock_parts/manipulator = 2,
- /obj/item/stack/cable_coil = 1)
-
- //Customization of the machine
- var/datum/cargoprofile/default = new/datum/cargoprofile()
- var/list/profiles = list()
- var/list/overrides = list()
- var/list/emag_overrides = list()
-
- var/emagged = 0
- var/hacking = 0
-
- proc/resetlists()
- profiles = list(new/datum/cargoprofile/cargo(),new/datum/cargoprofile/boxes(),new/datum/cargoprofile/supplies(),
- new/datum/cargoprofile/exotics(),new/datum/cargoprofile/tools(),new/datum/cargoprofile/weapons(),new/datum/cargoprofile/finished(),
- new/datum/cargoprofile/pressure(),new/datum/cargoprofile/pressure/full(),new/datum/cargoprofile/pressure/empty(),
- new/datum/cargoprofile/chemical(),new/datum/cargoprofile/organics(),new/datum/cargoprofile/food(),
- new/datum/cargoprofile/clothing(),new/datum/cargoprofile/trash())
- overrides = list(new/datum/cargoprofile/cargo/unload(),new/datum/cargoprofile/in_stacker(),
- new/datum/cargoprofile/unary/stacker(),new/datum/cargoprofile/unary/trainer())
- emag_overrides = list(new/datum/cargoprofile/people(),new/datum/cargoprofile/unary/shredder())
-
- New()
- ..()
- resetlists()
-
- attackby(obj/item/I as obj, mob/user as mob, params)
- if(istype(I,/obj/item/multitool))
- hacking = (hacking?0:1)
- if(hacking)
- to_chat(user, "You unlock the data port on the board. You can now use a PDA to alter its data.")
- else
- to_chat(user, "You relock the data port.")
- if(istype(I,/obj/item/pda))
- if(!hacking)
- to_chat(user, "It looks like you can't access the board's data port. You'll have to open it with a multitool.")
- else
- user.set_machine(src)
- interact(user)
- if(istype(I,/obj/item/card/emag) && !emagged)
- if(!hacking)
- to_chat(user, "There seems to be a data port on the card, but it's locked. A multitool could open it.")
- else
- emagged = 1
- overrides += emag_overrides
- to_chat(user, "You swipe the card in the card's data port. The lights flicker, then flash once.")
-
- proc/format(var/datum/cargoprofile/P,var/level)
- // PROFILE=0 OVERRIDE=1 MAIN=2
- if(P == null)
- return "NONE
"
- var/dat = "[P.name]"
- if(level == 0 || (level == 1 && !default))
- dat += " PROMOTE"
- if(level > 0)
- dat += " DEMOTE"
- dat += " REMOVE"
- dat += "
"
- return dat
-
- interact(mob/user as mob)
- var/dat
- dat = "MAIN FUNCTION
"
- dat += format(default,2)
- dat += "- CAUTION -
\[DELETE NON-MAIN ALGORITHMS\]
"
- dat += "\[MASTER RESET\]
"
-
- dat += "OVERRIDES:
"
- for(var/datum/cargoprofile/P in overrides)
- dat += format(P,1)
- dat += "
"
- dat += "- CAUTION -
\[DELETE ALL OVERRIDES\]
"
-
- dat += " TERTIARY PROFILES:
"
- for(var/datum/cargoprofile/P in profiles)
- dat += format(P,0)
- dat += "
"
- dat += "- CAUTION -
\[DELETE TERTIARY PROFILES\]"
-
- user << browse("Circuit Reprogramming[dat]", "window=progcircuit")
- onclose(user, "progcircuit")
-
- Topic(href, href_list)
- if(..())
- return
- usr.set_machine(src)
- var/id = href_list["id"]
- var/level = text2num(href_list["level"])
- switch(href_list["operation"])
- if("promote")
- if(level == 0)
- for(var/datum/cargoprofile/T in profiles)
- if(T.id == id)
- overrides += T
- profiles -= T
- //updateUsrDialog()
- interact(usr)
- return
-
- if(level == 1)
- if(default) return
- for(var/datum/cargoprofile/T in overrides)
- if(T.id == id)
- default = T
- overrides -= T
-
- if(default.dedicated_path)
- build_path = "[default.dedicated_path]"
- else
- if(istype(default,/datum/cargoprofile/unary))
- build_path = "/obj/machinery/programmable/unary"
- else
- build_path = "/obj/machinery/programmable"
-
- //updateUsrDialog()
- interact(usr)
- return
-
- if("demote")
- if(level == 2)
- overrides += default
- default = null
- //updateUsrDialog()
- interact(usr)
- return
- if(level == 1)
- for(var/datum/cargoprofile/T in overrides)
- if(T.id == id)
- profiles += T
- overrides -= T
- //updateUsrDialog()
- interact(usr)
- return
- if("delete")
- if(level == 2)
- default = null
- //updateUsrDialog()
- interact(usr)
- return
- if(level == 1)
- for(var/datum/cargoprofile/T in overrides)
- if(T.id == id)
- overrides -= T
- //updateUsrDialog()
- interact(usr)
- return
- if(level == 0)
- for(var/datum/cargoprofile/T in profiles)
- if(T.id == id)
- profiles -= T
- //updateUsrDialog()
- interact(usr)
- return
- if("deleteall")
- for(var/datum/cargoprofile/T in profiles)
- profiles -= T
- for(var/datum/cargoprofile/T in overrides)
- overrides -= T
- //updateUsrDialog()
- interact(usr)
- return
- if("deleteoverrides")
- for(var/datum/cargoprofile/T in overrides)
- overrides -= T
- interact(usr)
- return
- if("deleteprofiles")
- for(var/datum/cargoprofile/T in profiles)
- profiles -= T
- interact(usr)
- return
- if("reset")
- resetlists()
- interact(usr)
- return
-
- //End switch
diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm
index 24251977ca9..6ef4d064ac7 100644
--- a/code/game/machinery/shieldgen.dm
+++ b/code/game/machinery/shieldgen.dm
@@ -14,7 +14,7 @@
src.dir = pick(1,2,3,4)
..()
-/obj/machinery/shield/initialize()
+/obj/machinery/shield/Initialize()
air_update_turf(1)
..()
diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm
index 414ec8d2e62..a77bd744f92 100644
--- a/code/game/machinery/status_display.dm
+++ b/code/game/machinery/status_display.dm
@@ -54,7 +54,7 @@
return ..()
// register for radio system
-/obj/machinery/status_display/initialize()
+/obj/machinery/status_display/Initialize()
..()
if(radio_controller)
radio_controller.add_object(src, frequency)
diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm
index 59f9a667584..7ec64373373 100644
--- a/code/game/machinery/syndicatebeacon.dm
+++ b/code/game/machinery/syndicatebeacon.dm
@@ -131,7 +131,7 @@
singulo.target = src
icon_state = "[icontype]1"
active = 1
- machine_processing |= src
+ START_PROCESSING(SSmachines, src)
if(user)
to_chat(user, "You activate the beacon.")
diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm
index 00465cf8b8b..9dc30edf61e 100644
--- a/code/game/machinery/telecomms/telecomunications.dm
+++ b/code/game/machinery/telecomms/telecomunications.dm
@@ -116,7 +116,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
// TODO: Make the radio system cooperate with the space manager
listening_level = position.z
-/obj/machinery/telecomms/initialize()
+/obj/machinery/telecomms/Initialize()
..()
if(autolinkers.len)
// Links nearby machines
diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm
index fa8f2e8d084..a1248fc0b6d 100644
--- a/code/game/machinery/teleporter.dm
+++ b/code/game/machinery/teleporter.dm
@@ -18,7 +18,7 @@
..()
return
-/obj/machinery/computer/teleporter/initialize()
+/obj/machinery/computer/teleporter/Initialize()
..()
link_power_station()
update_icon()
@@ -293,7 +293,7 @@
component_parts += new /obj/item/stock_parts/matter_bin/super(null)
RefreshParts()
-/obj/machinery/teleport/hub/initialize()
+/obj/machinery/teleport/hub/Initialize()
..()
link_power_station()
@@ -472,7 +472,7 @@
RefreshParts()
link_console_and_hub()
-/obj/machinery/teleport/station/initialize()
+/obj/machinery/teleport/station/Initialize()
..()
link_console_and_hub()
diff --git a/code/game/machinery/turret_control.dm b/code/game/machinery/turret_control.dm
index 8df55e1bc66..d6ae98cb516 100644
--- a/code/game/machinery/turret_control.dm
+++ b/code/game/machinery/turret_control.dm
@@ -64,7 +64,7 @@
A.turret_controls -= src
return ..()
-/obj/machinery/turretid/initialize()
+/obj/machinery/turretid/Initialize()
..()
if(!control_area)
control_area = get_area(src)
diff --git a/code/game/mecha/equipment/tools/work_tools.dm b/code/game/mecha/equipment/tools/work_tools.dm
index 866cb7580f6..7706f3120f0 100644
--- a/code/game/mecha/equipment/tools/work_tools.dm
+++ b/code/game/mecha/equipment/tools/work_tools.dm
@@ -444,7 +444,6 @@
if(!PN)
PN = new()
- powernets += PN
NC.powernet = PN
PN.cables += NC
NC.mergeConnectedNetworks(NC.d2)
diff --git a/code/game/mecha/mech_bay.dm b/code/game/mecha/mech_bay.dm
index b14825c7cc0..a34d43098cb 100644
--- a/code/game/mecha/mech_bay.dm
+++ b/code/game/mecha/mech_bay.dm
@@ -177,7 +177,7 @@
return data
-/obj/machinery/computer/mech_bay_power_console/initialize()
+/obj/machinery/computer/mech_bay_power_console/Initialize()
reconnect()
update_icon()
return ..()
diff --git a/code/game/objects/effects/effect_system/effects_foam.dm b/code/game/objects/effects/effect_system/effects_foam.dm
index cb218395735..17723adcde7 100644
--- a/code/game/objects/effects/effect_system/effects_foam.dm
+++ b/code/game/objects/effects/effect_system/effects_foam.dm
@@ -172,7 +172,7 @@
desc = "A lightweight foamed metal wall."
var/metal = MFOAM_ALUMINUM
-/obj/structure/foamedmetal/initialize()
+/obj/structure/foamedmetal/Initialize()
..()
air_update_turf(1)
diff --git a/code/game/objects/effects/spawners/windowspawner.dm b/code/game/objects/effects/spawners/windowspawner.dm
index a2517d093f8..6d271039070 100644
--- a/code/game/objects/effects/spawners/windowspawner.dm
+++ b/code/game/objects/effects/spawners/windowspawner.dm
@@ -7,7 +7,8 @@
var/windowtospawn = /obj/structure/window/basic
anchored = 1 // No sliding out while you prime
-/obj/effect/spawner/window/initialize()
+/obj/effect/spawner/window/Initialize()
+ ..()
spawn(0)
var/turf/T = get_turf(src)
for(var/obj/structure/grille/G in get_turf(src))
diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm
index 944a6e0d5f9..e7156cb6888 100644
--- a/code/game/objects/items/devices/flashlight.dm
+++ b/code/game/objects/items/devices/flashlight.dm
@@ -12,7 +12,7 @@
var/on = 0
var/brightness_on = 4 //luminosity when on
-/obj/item/flashlight/initialize()
+/obj/item/flashlight/Initialize()
..()
if(on)
icon_state = "[initial(icon_state)]-on"
diff --git a/code/game/objects/items/devices/instruments.dm b/code/game/objects/items/devices/instruments.dm
index b55efc665b2..3a0f2b6941d 100644
--- a/code/game/objects/items/devices/instruments.dm
+++ b/code/game/objects/items/devices/instruments.dm
@@ -21,7 +21,7 @@
user.visible_message("[user] begins to play 'Gloomy Sunday'! It looks like \he's trying to commit suicide!")
return (BRUTELOSS)
-/obj/item/instrument/initialize(mapload)
+/obj/item/instrument/Initialize(mapload)
song.tempo = song.sanitize_tempo(song.tempo) // tick_lag isn't set when the map is loaded
..()
diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm
index 55465218b99..51aa645a139 100644
--- a/code/game/objects/items/devices/radio/headset.dm
+++ b/code/game/objects/items/devices/radio/headset.dm
@@ -21,7 +21,7 @@
..()
internal_channels.Cut()
-/obj/item/radio/headset/initialize()
+/obj/item/radio/headset/Initialize()
..()
if(ks1type)
diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm
index e1ee7029439..530156fbd99 100644
--- a/code/game/objects/items/devices/radio/radio.dm
+++ b/code/game/objects/items/devices/radio/radio.dm
@@ -83,7 +83,8 @@ var/global/list/default_medbay_channels = list(
return ..()
-/obj/item/radio/initialize()
+/obj/item/radio/Initialize()
+ ..()
if(frequency < RADIO_LOW_FREQ || frequency > RADIO_HIGH_FREQ)
frequency = sanitize_frequency(frequency, RADIO_LOW_FREQ, RADIO_HIGH_FREQ)
set_frequency(frequency)
diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm
index 882852a3632..93f230a07e8 100644
--- a/code/game/objects/items/weapons/storage/storage.dm
+++ b/code/game/objects/items/weapons/storage/storage.dm
@@ -421,6 +421,7 @@
hide_from(usr)
for(var/obj/item/I in contents)
remove_from_storage(I, T)
+ CHECK_TICK
/obj/item/storage/New()
can_hold = typecacheof(can_hold)
diff --git a/code/game/objects/items/weapons/syndie_uplink.dm b/code/game/objects/items/weapons/syndie_uplink.dm
deleted file mode 100644
index a09ab0b69a2..00000000000
--- a/code/game/objects/items/weapons/syndie_uplink.dm
+++ /dev/null
@@ -1,38 +0,0 @@
-/*/obj/item/syndicate_uplink
- name = "station bounced radio"
- desc = "Remain silent about this..."
- icon = 'icons/obj/radio.dmi'
- icon_state = "radio"
- var/temp = null
- var/uses = 10.0
- var/selfdestruct = 0.0
- var/traitor_frequency = 0.0
- var/mob/currentUser = null
- var/obj/item/radio/origradio = null
- flags = CONDUCT | ONBELT
- w_class = WEIGHT_CLASS_SMALL
- item_state = "radio"
- throw_speed = 4
- throw_range = 20
- materials = list(MAT_METAL=100)
- origin_tech = "magnets=2;syndicate=3"*/
-
-/obj/item/SWF_uplink
- name = "station-bounced radio"
- desc = "used to comunicate it appears."
- icon = 'icons/obj/radio.dmi'
- icon_state = "radio"
- var/temp = null
- var/uses = 4.0
- var/selfdestruct = 0.0
- var/traitor_frequency = 0.0
- var/obj/item/radio/origradio = null
- flags = CONDUCT
- slot_flags = SLOT_BELT
- item_state = "radio"
- throwforce = 5
- w_class = WEIGHT_CLASS_SMALL
- throw_speed = 4
- throw_range = 20
- materials = list(MAT_METAL=100)
- origin_tech = "magnets=1"
diff --git a/code/game/objects/items/weapons/wires.dm b/code/game/objects/items/weapons/wires.dm
deleted file mode 100644
index 44097096ae0..00000000000
--- a/code/game/objects/items/weapons/wires.dm
+++ /dev/null
@@ -1,36 +0,0 @@
-// WIRES
-
-/obj/item/wire
- desc = "This is just a simple piece of regular insulated wire."
- name = "wire"
- icon = 'icons/obj/power.dmi'
- icon_state = "item_wire"
- var/amount = 1.0
- var/laying = 0.0
- var/old_lay = null
- materials = list(MAT_METAL=40)
- attack_verb = list("whipped", "lashed", "disciplined", "tickled")
-
- suicide_act(mob/user)
- to_chat(viewers(user), "[user] is strangling \himself with the [src.name]! It looks like \he's trying to commit suicide.")
- return (OXYLOSS)
-
-
-/obj/item/wire/proc/update()
- if(src.amount > 1)
- src.icon_state = "spool_wire"
- src.desc = text("This is just spool of regular insulated wire. It consists of about [] unit\s of wire.", src.amount)
- else
- src.icon_state = "item_wire"
- src.desc = "This is just a simple piece of regular insulated wire."
- return
-
-/obj/item/wire/attack_self(mob/user as mob)
- if(src.laying)
- src.laying = 0
- to_chat(user, "You're done laying wire!")
- else
- to_chat(user, "You are not using this to lay wire...")
- return
-
-
diff --git a/code/game/objects/structures/aliens.dm b/code/game/objects/structures/aliens.dm
index c4506396f45..76deeac93e8 100644
--- a/code/game/objects/structures/aliens.dm
+++ b/code/game/objects/structures/aliens.dm
@@ -30,7 +30,7 @@
var/resintype = null
smooth = SMOOTH_TRUE
-/obj/structure/alien/resin/initialize()
+/obj/structure/alien/resin/Initialize()
air_update_turf(1)
..()
diff --git a/code/game/objects/structures/inflatable.dm b/code/game/objects/structures/inflatable.dm
index 6d03ca4fdef..4ea0fc34e2d 100644
--- a/code/game/objects/structures/inflatable.dm
+++ b/code/game/objects/structures/inflatable.dm
@@ -25,7 +25,7 @@
var/health = 50.0
-/obj/structure/inflatable/initialize(location)
+/obj/structure/inflatable/Initialize(location)
..()
air_update_turf(1)
diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm
index f4a2990918b..e0e9ba1b6a7 100644
--- a/code/game/objects/structures/mineral_doors.dm
+++ b/code/game/objects/structures/mineral_doors.dm
@@ -24,7 +24,7 @@
..()
initial_state = icon_state
-/obj/structure/mineral_door/initialize()
+/obj/structure/mineral_door/Initialize()
..()
air_update_turf(1)
diff --git a/code/game/objects/structures/misc.dm b/code/game/objects/structures/misc.dm
index 131a355feb2..6be7bf072d8 100644
--- a/code/game/objects/structures/misc.dm
+++ b/code/game/objects/structures/misc.dm
@@ -87,7 +87,7 @@
var/atom/attack_atom
-/obj/structure/ghost_beacon/initialize()
+/obj/structure/ghost_beacon/Initialize()
. = ..()
last_ghost_alert = world.time
attack_atom = src
diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm
index 3e5d3386e0a..60ca03ad0f7 100644
--- a/code/game/objects/structures/morgue.dm
+++ b/code/game/objects/structures/morgue.dm
@@ -29,7 +29,7 @@
anchored = 1.0
var/open_sound = 'sound/items/Deconstruct.ogg'
-/obj/structure/morgue/initialize()
+/obj/structure/morgue/Initialize()
. = ..()
update()
diff --git a/code/game/objects/structures/musician.dm b/code/game/objects/structures/musician.dm
index da4c1181f01..b8c28046bd3 100644
--- a/code/game/objects/structures/musician.dm
+++ b/code/game/objects/structures/musician.dm
@@ -295,7 +295,7 @@
QDEL_NULL(song)
return ..()
-/obj/structure/piano/initialize()
+/obj/structure/piano/Initialize()
song.tempo = song.sanitize_tempo(song.tempo) // tick_lag isn't set when the map is loaded
..()
diff --git a/code/game/objects/structures/noticeboard.dm b/code/game/objects/structures/noticeboard.dm
index caa1bf48b4b..8ea6a3c0cce 100644
--- a/code/game/objects/structures/noticeboard.dm
+++ b/code/game/objects/structures/noticeboard.dm
@@ -7,7 +7,8 @@
anchored = 1
var/notices = 0
-/obj/structure/noticeboard/initialize()
+/obj/structure/noticeboard/Initialize()
+ ..()
for(var/obj/item/I in loc)
if(notices > 4) break
if(istype(I, /obj/item/paper))
diff --git a/code/game/objects/structures/plasticflaps.dm b/code/game/objects/structures/plasticflaps.dm
index f0a2c28af85..8d22732e5dd 100644
--- a/code/game/objects/structures/plasticflaps.dm
+++ b/code/game/objects/structures/plasticflaps.dm
@@ -124,7 +124,7 @@
name = "airtight plastic flaps"
desc = "Heavy duty, airtight, plastic flaps."
-/obj/structure/plasticflaps/mining/initialize()
+/obj/structure/plasticflaps/mining/Initialize()
air_update_turf(1)
..()
diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm
index 315728ddc16..44c9da74b20 100644
--- a/code/game/objects/structures/safe.dm
+++ b/code/game/objects/structures/safe.dm
@@ -30,7 +30,8 @@ FLOOR SAFES
tumbler_2_open = rand(0, 71)
-/obj/structure/safe/initialize()
+/obj/structure/safe/Initialize()
+ ..()
for(var/obj/item/I in loc)
if(space >= maxspace)
return
@@ -178,7 +179,7 @@ obj/structure/safe/ex_act(severity)
layer = 2.5
-/obj/structure/safe/floor/initialize()
+/obj/structure/safe/floor/Initialize()
..()
var/turf/T = loc
hide(T.intact)
diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index c93a0e5f1b8..aebd111ad26 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -386,7 +386,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
update_nearby_icons()
return
-/obj/structure/window/initialize()
+/obj/structure/window/Initialize()
air_update_turf(1)
return ..()
@@ -454,7 +454,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
update_nearby_icons()
return
-/obj/structure/window/plasmabasic/initialize()
+/obj/structure/window/plasmabasic/Initialize()
..()
air_update_turf(1)
@@ -483,7 +483,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
update_nearby_icons()
return
-/obj/structure/window/plasmareinforced/initialize()
+/obj/structure/window/plasmareinforced/Initialize()
..()
air_update_turf(1)
diff --git a/code/game/response_team.dm b/code/game/response_team.dm
index 9fdf3121b59..6120ae042bf 100644
--- a/code/game/response_team.dm
+++ b/code/game/response_team.dm
@@ -104,8 +104,12 @@ var/ert_request_answered = 0
if(index > emergencyresponseteamspawn.len)
index = 1
+ if(!M || !M.client)
+ continue
var/client/C = M.client
var/mob/living/new_commando = C.create_response_team(emergencyresponseteamspawn[index])
+ if(!M || !new_commando)
+ continue
new_commando.mind.key = M.key
new_commando.key = M.key
new_commando.update_icons()
@@ -157,11 +161,11 @@ var/ert_request_answered = 0
head_organ.h_style = random_hair_style(M.gender, head_organ.species.name)
head_organ.f_style = random_facial_hair_style(M.gender, head_organ.species.name)
- M.real_name = "[pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant First Class", "Master Sergeant", "Sergeant Major")] [pick(last_names)]"
- M.name = M.real_name
+ M.rename_character(null, "[pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant First Class", "Master Sergeant", "Sergeant Major")] [pick(last_names)]")
M.age = rand(23,35)
M.regenerate_icons()
M.update_body()
+ M.update_dna()
//Creates mind stuff.
M.mind = new
@@ -280,8 +284,7 @@ var/ert_request_answered = 0
command_slots = 0
// Override name and age for the commander
- M.real_name = "[pick("Lieutenant", "Captain", "Major")] [pick(last_names)]"
- M.name = M.real_name
+ M.rename_character(null, "[pick("Lieutenant", "Captain", "Major")] [pick(last_names)]")
M.age = rand(35,45)
M.equipOutfit(command_outfit)
diff --git a/code/game/turfs/simulated/floor/plasteel_floor.dm b/code/game/turfs/simulated/floor/plasteel_floor.dm
index cbb5647f283..cba841ce823 100644
--- a/code/game/turfs/simulated/floor/plasteel_floor.dm
+++ b/code/game/turfs/simulated/floor/plasteel_floor.dm
@@ -18,8 +18,13 @@
/turf/simulated/floor/plasteel/airless/New()
..()
- name = "floor"
-
+ name = "floor"
+
+/turf/simulated/floor/plasteel/airless/indestructible // For bomb testing range
+
+/turf/simulated/floor/plasteel/airless/indestructible/ex_act(severity)
+ return
+
/turf/simulated/floor/plasteel/goonplaque
icon_state = "plaque"
name = "Commemorative Plaque"
diff --git a/code/game/world.dm b/code/game/world.dm
index 4ebeadedc6f..7d592864501 100644
--- a/code/game/world.dm
+++ b/code/game/world.dm
@@ -16,10 +16,12 @@ var/global/list/map_transition_config = MAP_TRANSITION_CONFIG
GLOB.timezoneOffset = text2num(time2text(0, "hh")) * 36000
+ makeDatumRefLists()
callHook("startup")
src.update_status()
+
. = ..()
// Create robolimbs for chargen.
@@ -324,6 +326,10 @@ var/world_topic_spam_protect_time = world.timeofday
processScheduler.stop()
shutdown_logging() // Past this point, no logging procs can be used, at risk of data loss.
+ for(var/client/C in clients)
+ if(config.server) //if you set a server location in config.txt, it sends you there instead of trying to reconnect to the same world address. -- NeoFite
+ C << link("byond://[config.server]")
+
if(config && config.shutdown_on_reboot)
sleep(0)
if(shutdown_shell_command)
@@ -331,9 +337,6 @@ var/world_topic_spam_protect_time = world.timeofday
del(world)
return
else
- for(var/client/C in clients)
- if(config.server) //if you set a server location in config.txt, it sends you there instead of trying to reconnect to the same world address. -- NeoFite
- C << link("byond://[config.server]")
..(0)
diff --git a/code/modules/admin/verbs/atmosdebug.dm b/code/modules/admin/verbs/atmosdebug.dm
index 85591ee3159..de281d34e68 100644
--- a/code/modules/admin/verbs/atmosdebug.dm
+++ b/code/modules/admin/verbs/atmosdebug.dm
@@ -51,7 +51,7 @@
return
feedback_add_details("admin_verb","CPOW") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
- for(var/datum/powernet/PN in powernets)
+ for(var/datum/powernet/PN in SSmachines.powernets)
if(!PN.nodes || !PN.nodes.len)
if(PN.cables && (PN.cables.len > 1))
var/obj/structure/cable/C = PN.cables[1]
diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm
index 78f9fbd5de1..00966ee31fc 100644
--- a/code/modules/admin/verbs/debug.dm
+++ b/code/modules/admin/verbs/debug.dm
@@ -387,7 +387,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if(!check_rights(R_DEBUG))
return
- makepowernets()
+ SSmachines.makepowernets()
log_admin("[key_name(src)] has remade the powernet. makepowernets() called.")
message_admins("[key_name_admin(src)] has remade the powernets. makepowernets() called.", 0)
feedback_add_details("admin_verb","MPWN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm
index 020cadeebe3..d3c9ae98511 100644
--- a/code/modules/admin/verbs/striketeam.dm
+++ b/code/modules/admin/verbs/striketeam.dm
@@ -5,14 +5,16 @@ var/global/sent_strike_team = 0
/client/proc/strike_team()
if(!ticker)
- to_chat(usr, "The game hasn't started yet!")
+ to_chat(usr, "The game hasn't started yet!")
return
if(sent_strike_team == 1)
- to_chat(usr, "CentComm is already sending a team.")
+ to_chat(usr, "CentComm is already sending a team.")
return
if(alert("Do you want to send in the CentComm death squad? Once enabled, this is irreversible.",,"Yes","No")!="Yes")
return
- alert("This 'mode' will go on until everyone is dead or the station is destroyed. You may also admin-call the evac shuttle when appropriate. Spawned commandos have internals cameras which are viewable through a monitor inside the Spec. Ops. Office. Assigning the team's detailed task is recommended from there. While you will be able to manually pick the candidates from active ghosts, their assignment in the squad will be random.")
+ alert("This 'mode' will go on until everyone is dead or the station is destroyed. You may also admin-call the evac shuttle when appropriate. Spawned commandos have internals cameras which are viewable through a monitor inside the Spec. Ops. Office. The first one selected/spawned will be the team leader.")
+
+ message_admins("[key_name_admin(usr)] has started to spawn a CentComm DeathSquad.", 1)
var/input = null
while(!input)
@@ -25,13 +27,7 @@ var/global/sent_strike_team = 0
to_chat(usr, "Looks like someone beat you to it.")
return
- sent_strike_team = 1
-
- shuttle_master.cancelEvac()
- var/commando_number = commandos_possible //for selecting a leader
- var/leader_selected = 0 //when the leader is chosen. The last person spawned.
-
-//Code for spawning a nuke auth code.
+ // Find the nuclear auth code
var/nuke_code
var/temp_code
for(var/obj/machinery/nuclearbomb/N in world)
@@ -40,42 +36,69 @@ var/global/sent_strike_team = 0
nuke_code = N.r_code
break
-//Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos.
- var/list/candidates = list() //candidates for being a commando out of all the active ghosts in world.
- var/list/commandos = list() //actual commando ghosts as picked by the user.
- for(var/mob/dead/observer/G in player_list)
- if(!G.client.holder && !G.client.is_afk()) //Whoever called/has the proc won't be added to the list.
- if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
- candidates += G.key
- for(var/i=commandos_possible,(i>0&&candidates.len),i--)//Decrease with every commando selected.
- var/candidate = input("Pick characters to spawn as the commandos. This will go on until there either no more ghosts to pick from or the slots are full.", "Active Players") as null|anything in candidates //It will auto-pick a person when there is only one candidate.
- candidates -= candidate //Subtract from candidates.
- commandos += candidate//Add their ghost to commandos.
+ // Find ghosts willing to be DS
+ var/list/commando_ckeys = pollCandidatesByKeyWithVeto(src, usr, commandos_possible, "Join the DeathSquad?",, 21, 600, 1, role_playtime_requirements[ROLE_DEATHSQUAD], TRUE, FALSE)
+ if(!commando_ckeys.len)
+ to_chat(usr, "Nobody volunteered to join the DeathSquad.")
+ return
-//Spawns commandos and equips them.
+ sent_strike_team = 1
+
+ // Spawns commandos and equips them.
+ 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 landmarks_list)
if(commando_number<=0) break
if(L.name == "Commando")
- leader_selected = commando_number == 1?1:0
- var/mob/living/carbon/human/new_commando = create_death_commando(L, leader_selected)
+ spawn(0)
+ var/use_ds_borg = FALSE
+ var/ghost_key // Ghost ckey that we intend to put into the commando. Can remain undefined if we don't have one.
+ if(commando_ckeys.len)
+ ghost_key = pick(commando_ckeys)
+ commando_ckeys -= ghost_key
+ if(!is_leader)
+ var/new_gender = alert(src, "Select Deathsquad Type.", "DS Character Generation", "Organic", "Cyborg")
+ if(new_gender == "Cyborg")
+ use_ds_borg = TRUE
- if(commandos.len)
- new_commando.key = pick(commandos)
- commandos -= new_commando.key
- new_commando.internal = new_commando.s_store
- new_commando.update_action_buttons_icon()
-
- //So they don't forget their code or mission.
- if(nuke_code)
- new_commando.mind.store_memory("Nuke Code: [nuke_code].")
- new_commando.mind.store_memory("Mission: [input].")
-
- to_chat(new_commando, "You are a Special Ops. [!leader_selected ? "commando" : "LEADER"] in the service of Central Command. Check the table ahead for detailed instructions.\nYour current mission is: [input]")
+ if(use_ds_borg)
+ var/mob/living/silicon/robot/deathsquad/R = new()
+ R.forceMove(get_turf(L))
+ var/rnum = rand(1,1000)
+ var/borgname = "Epsilon [rnum]"
+ R.name = borgname
+ R.custom_name = borgname
+ R.real_name = R.name
+ R.mind = new
+ R.mind.current = R
+ R.mind.original = R
+ R.mind.assigned_role = "MODE"
+ R.mind.special_role = SPECIAL_ROLE_DEATHSQUAD
+ if(!(R.mind in ticker.minds))
+ ticker.minds += R.mind
+ ticker.mode.traitors += R.mind
+ if(ghost_key)
+ R.key = ghost_key
+ if(nuke_code)
+ R.mind.store_memory("Nuke Code: [nuke_code].")
+ R.mind.store_memory("Mission: [input].")
+ to_chat(R, "You are a Special Operations cyborg, in the service of Central Command. \nYour current mission is: [input]")
+ else
+ var/mob/living/carbon/human/new_commando = create_death_commando(L, is_leader)
+ if(ghost_key)
+ new_commando.key = ghost_key
+ new_commando.internal = new_commando.s_store
+ new_commando.update_action_buttons_icon()
+ if(nuke_code)
+ new_commando.mind.store_memory("Nuke Code: [nuke_code].")
+ new_commando.mind.store_memory("Mission: [input].")
+ to_chat(new_commando, "You are a Special Ops [is_leader ? "TEAM LEADER" : "commando"] in the service of Central Command. Check the table ahead for detailed instructions.\nYour current mission is: [input]")
+ is_leader = FALSE
commando_number--
-//Spawns the rest of the commando gear.
+ //Spawns the rest of the commando gear.
for(var/obj/effect/landmark/L in landmarks_list)
if(L.name == "Commando_Manual")
//new /obj/item/gun/energy/pulse_rifle(L.loc)
@@ -92,18 +115,18 @@ var/global/sent_strike_team = 0
new /obj/effect/spawner/newbomb/timer/syndicate(L.loc)
qdel(L)
- message_admins("[key_name_admin(usr)] has spawned a CentComm strike squad.", 1)
+ message_admins("[key_name_admin(usr)] has spawned a CentComm DeathSquad.", 1)
log_admin("[key_name(usr)] used Spawn Death Squad.")
return 1
-/client/proc/create_death_commando(obj/spawn_location, leader_selected = 0)
+/client/proc/create_death_commando(obj/spawn_location, is_leader = FALSE)
var/mob/living/carbon/human/new_commando = new(spawn_location.loc)
var/commando_leader_rank = pick("Lieutenant", "Captain", "Major")
var/commando_rank = pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant 1st Class", "Master Sergeant", "Sergeant Major")
var/commando_name = pick(last_names)
var/datum/preferences/A = new()//Randomize appearance for the commando.
- if(leader_selected)
+ if(is_leader)
A.age = rand(35,45)
A.real_name = "[commando_leader_rank] [commando_name]"
else
@@ -117,18 +140,18 @@ var/global/sent_strike_team = 0
new_commando.mind.assigned_role = "MODE"
new_commando.mind.special_role = SPECIAL_ROLE_DEATHSQUAD
ticker.mode.traitors |= new_commando.mind//Adds them to current traitor list. Which is really the extra antagonist list.
- new_commando.equip_death_commando(leader_selected)
+ new_commando.equip_death_commando(is_leader)
return new_commando
-/mob/living/carbon/human/proc/equip_death_commando(leader_selected = 0)
+/mob/living/carbon/human/proc/equip_death_commando(is_leader = FALSE)
var/obj/item/radio/R = new /obj/item/radio/headset/alt(src)
R.set_frequency(DTH_FREQ)
equip_to_slot_or_del(R, slot_l_ear)
- if(leader_selected == 0)
- equip_to_slot_or_del(new /obj/item/clothing/under/color/green(src), slot_w_uniform)
- else
+ if(is_leader)
equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(src), slot_w_uniform)
+ else
+ equip_to_slot_or_del(new /obj/item/clothing/under/color/green(src), slot_w_uniform)
equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots/advance(src), slot_shoes)
equip_to_slot_or_del(new /obj/item/clothing/suit/space/deathsquad(src), slot_wear_suit)
equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(src), slot_gloves)
@@ -143,20 +166,19 @@ var/global/sent_strike_team = 0
equip_to_slot_or_del(new /obj/item/reagent_containers/hypospray/combat/nanites(src), slot_in_backpack)
equip_to_slot_or_del(new /obj/item/storage/box/flashbangs(src), slot_in_backpack)
equip_to_slot_or_del(new /obj/item/flashlight(src), slot_in_backpack)
- if(!leader_selected)
- equip_to_slot_or_del(new /obj/item/grenade/plastic/x4(src), slot_in_backpack)
- else
- equip_to_slot_or_del(new /obj/item/pinpointer(src), slot_in_backpack)
+ equip_to_slot_or_del(new /obj/item/pinpointer(src), slot_in_backpack)
+ if(is_leader)
equip_to_slot_or_del(new /obj/item/disk/nuclear(src), slot_in_backpack)
+ else
+ equip_to_slot_or_del(new /obj/item/grenade/plastic/x4(src), slot_in_backpack)
+
equip_to_slot_or_del(new /obj/item/melee/energy/sword/saber(src), slot_l_store)
equip_to_slot_or_del(new /obj/item/shield/energy(src), slot_r_store)
equip_to_slot_or_del(new /obj/item/tank/emergency_oxygen/double/full(src), slot_s_store)
equip_to_slot_or_del(new /obj/item/gun/projectile/revolver/mateba(src), slot_belt)
-
equip_to_slot_or_del(new /obj/item/gun/energy/pulse(src), slot_r_hand)
-
var/obj/item/implant/mindshield/L = new/obj/item/implant/mindshield(src)
L.implant(src)
diff --git a/code/modules/admin/verbs/striketeam_syndicate.dm b/code/modules/admin/verbs/striketeam_syndicate.dm
index 943ccd61ca2..cc52adf40c6 100644
--- a/code/modules/admin/verbs/striketeam_syndicate.dm
+++ b/code/modules/admin/verbs/striketeam_syndicate.dm
@@ -17,7 +17,9 @@ var/global/sent_syndicate_strike_team = 0
return
if(alert("Do you want to send in the Syndicate Strike Team? Once enabled, this is irreversible.",,"Yes","No")=="No")
return
- alert("This 'mode' will go on until everyone is dead or the station is destroyed. You may also admin-call the evac shuttle when appropriate. Spawned syndicates have internals cameras which are viewable through a monitor inside the Syndicate Mothership Bridge. Assigning the team's detailed task is recommended from there. While you will be able to manually pick the candidates from active ghosts, their assignment in the squad will be random.")
+ alert("This 'mode' will go on until everyone is dead or the station is destroyed. You may also admin-call the evac shuttle when appropriate. Spawned syndicates have internals cameras which are viewable through a monitor inside the Syndicate Mothership Bridge. Assigning the team's detailed task is recommended from there. The first one selected/spawned will be the team leader.")
+
+ message_admins("[key_name_admin(usr)] has started to spawn a Syndicate Strike Team.", 1)
var/input = null
while(!input)
@@ -30,15 +32,10 @@ var/global/sent_syndicate_strike_team = 0
to_chat(src, "Looks like someone beat you to it.")
return
- sent_syndicate_strike_team = 1
-
- //if(emergency_shuttle.can_recall())
- // emergency_shuttle.recall() //why, exactly? Admins can do this themselves.
-
var/syndicate_commando_number = syndicate_commandos_possible //for selecting a leader
- var/syndicate_leader_selected = 0 //when the leader is chosen. The last person spawned.
+ var/is_leader = TRUE // set to FALSE after leader is spawned
-//Code for spawning a nuke auth code.
+ // Find the nuclear auth code
var/nuke_code
var/temp_code
for(var/obj/machinery/nuclearbomb/N in world)
@@ -47,29 +44,23 @@ var/global/sent_syndicate_strike_team = 0
nuke_code = N.r_code
break
-//Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos.
- var/list/candidates = list() //candidates for being a commando out of all the active ghosts in world.
- var/list/commandos = list() //actual commando ghosts as picked by the user.
- for(var/mob/dead/observer/G in player_list)
- if(!G.client.holder && !G.client.is_afk()) //Whoever called/has the proc won't be added to the list.
- if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
- candidates += G.key
- for(var/i=commandos_possible,(i>0&&candidates.len),i--)//Decrease with every commando selected.
- var/candidate = input("Pick characters to spawn as the commandos. This will go on until there either no more ghosts to pick from or the slots are full.", "Active Players") as null|anything in candidates //It will auto-pick a person when there is only one candidate.
- candidates -= candidate //Subtract from candidates.
- commandos += candidate//Add their ghost to commandos.
+ // Find ghosts willing to be SST
+ var/list/commando_ckeys = pollCandidatesByKeyWithVeto(src, usr, syndicate_commandos_possible, "Join the Syndicate Strike Team?",, 21, 600, 1, role_playtime_requirements[ROLE_DEATHSQUAD], TRUE, FALSE)
+ if(!commando_ckeys.len)
+ to_chat(usr, "Nobody volunteered to join the SST.")
+ return
-//Spawns commandos and equips them.
+ sent_syndicate_strike_team = 1
+
+ //Spawns commandos and equips them.
for(var/obj/effect/landmark/L in landmarks_list)
if(syndicate_commando_number<=0) break
if(L.name == "Syndicate-Commando")
- syndicate_leader_selected = syndicate_commando_number == 1?1:0
+ var/mob/living/carbon/human/new_syndicate_commando = create_syndicate_death_commando(L, is_leader)
- var/mob/living/carbon/human/new_syndicate_commando = create_syndicate_death_commando(L, syndicate_leader_selected)
-
- if(commandos.len)
- new_syndicate_commando.key = pick(commandos)
- commandos -= new_syndicate_commando.key
+ if(commando_ckeys.len)
+ new_syndicate_commando.key = pick(commando_ckeys)
+ commando_ckeys -= new_syndicate_commando.key
new_syndicate_commando.internal = new_syndicate_commando.s_store
new_syndicate_commando.update_action_buttons_icon()
@@ -78,8 +69,9 @@ var/global/sent_syndicate_strike_team = 0
new_syndicate_commando.mind.store_memory("Nuke Code: [nuke_code].")
new_syndicate_commando.mind.store_memory("Mission: [input].")
- to_chat(new_syndicate_commando, "You are an Elite Syndicate. [!syndicate_leader_selected ? "commando" : "LEADER"] in the service of the Syndicate. \nYour current mission is: [input]")
+ to_chat(new_syndicate_commando, "You are an Elite Syndicate [is_leader ? "TEAM LEADER" : "commando"] in the service of the Syndicate. \nYour current mission is: [input]")
new_syndicate_commando.faction += "syndicate"
+ is_leader = FALSE
syndicate_commando_number--
for(var/obj/effect/landmark/L in landmarks_list)
@@ -91,14 +83,14 @@ var/global/sent_syndicate_strike_team = 0
log_admin("[key_name(usr)] used Spawn Syndicate Squad.")
feedback_add_details("admin_verb","SDTHS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-/client/proc/create_syndicate_death_commando(obj/spawn_location, syndicate_leader_selected = 0)
+/client/proc/create_syndicate_death_commando(obj/spawn_location, is_leader = FALSE)
var/mob/living/carbon/human/new_syndicate_commando = new(spawn_location.loc)
var/syndicate_commando_leader_rank = pick("Lieutenant", "Captain", "Major")
var/syndicate_commando_rank = pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant 1st Class", "Master Sergeant", "Sergeant Major")
var/syndicate_commando_name = pick(last_names)
var/datum/preferences/A = new()//Randomize appearance for the commando.
- if(syndicate_leader_selected)
+ if(is_leader)
A.age = rand(35,45)
A.real_name = "[syndicate_commando_leader_rank] [syndicate_commando_name]"
else
@@ -112,26 +104,26 @@ var/global/sent_syndicate_strike_team = 0
new_syndicate_commando.mind.assigned_role = "MODE"
new_syndicate_commando.mind.special_role = SPECIAL_ROLE_SYNDICATE_DEATHSQUAD
ticker.mode.traitors |= new_syndicate_commando.mind //Adds them to current traitor list. Which is really the extra antagonist list.
- new_syndicate_commando.equip_syndicate_commando(syndicate_leader_selected)
+ new_syndicate_commando.equip_syndicate_commando(is_leader)
qdel(spawn_location)
return new_syndicate_commando
-/mob/living/carbon/human/proc/equip_syndicate_commando(syndicate_leader_selected = 0)
+/mob/living/carbon/human/proc/equip_syndicate_commando(is_leader = FALSE)
var/obj/item/radio/R = new /obj/item/radio/headset/syndicate/alt/syndteam(src)
R.set_frequency(SYNDTEAM_FREQ)
equip_to_slot_or_del(R, slot_l_ear)
equip_to_slot_or_del(new /obj/item/clothing/under/syndicate(src), slot_w_uniform)
equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots/syndie/advance(src), slot_shoes)
- if(!syndicate_leader_selected)
- equip_to_slot_or_del(new /obj/item/clothing/suit/space/syndicate/black/strike(src), slot_wear_suit)
- else
+ if(is_leader)
equip_to_slot_or_del(new /obj/item/clothing/suit/space/syndicate/black/red/strike(src), slot_wear_suit)
- equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(src), slot_gloves)
- if(!syndicate_leader_selected)
- equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/syndicate/black/strike(src), slot_head)
else
+ equip_to_slot_or_del(new /obj/item/clothing/suit/space/syndicate/black/strike(src), slot_wear_suit)
+ equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(src), slot_gloves)
+ if(is_leader)
equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/syndicate/black/red/strike(src), slot_head)
+ else
+ equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/syndicate/black/strike(src), slot_head)
equip_to_slot_or_del(new /obj/item/clothing/mask/gas/syndicate(src), slot_wear_mask)
equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal(src), slot_glasses)
@@ -142,13 +134,12 @@ var/global/sent_syndicate_strike_team = 0
equip_to_slot_or_del(new /obj/item/reagent_containers/hypospray/combat/nanites(src), slot_in_backpack)
equip_to_slot_or_del(new /obj/item/grenade/plastic/x4(src), slot_in_backpack)
equip_to_slot_or_del(new /obj/item/flashlight(src), slot_in_backpack)
- if(!syndicate_leader_selected)
- equip_to_slot_or_del(new /obj/item/grenade/plastic/x4(src), slot_in_backpack)
- equip_to_slot_or_del(new /obj/item/card/emag(src), slot_in_backpack)
- else
+ if(is_leader)
equip_to_slot_or_del(new /obj/item/pinpointer(src), slot_in_backpack)
equip_to_slot_or_del(new /obj/item/disk/nuclear(src), slot_in_backpack)
-
+ else
+ equip_to_slot_or_del(new /obj/item/grenade/plastic/x4(src), slot_in_backpack)
+ equip_to_slot_or_del(new /obj/item/card/emag(src), slot_in_backpack)
equip_to_slot_or_del(new /obj/item/melee/energy/sword/saber(src), slot_l_store)
equip_to_slot_or_del(new /obj/item/grenade/empgrenade(src), slot_r_store)
equip_to_slot_or_del(new /obj/item/tank/emergency_oxygen/double/full(src), slot_s_store)
diff --git a/code/modules/arcade/mob_hunt/battle_computer.dm b/code/modules/arcade/mob_hunt/battle_computer.dm
index e5f2af123fb..8ae577fe338 100644
--- a/code/modules/arcade/mob_hunt/battle_computer.dm
+++ b/code/modules/arcade/mob_hunt/battle_computer.dm
@@ -27,11 +27,11 @@
team = "Blue"
avatar_y_offset = 1
-/obj/machinery/computer/mob_battle_terminal/red/initialize()
+/obj/machinery/computer/mob_battle_terminal/red/Initialize()
..()
check_connection()
-/obj/machinery/computer/mob_battle_terminal/blue/initialize()
+/obj/machinery/computer/mob_battle_terminal/blue/Initialize()
..()
check_connection()
diff --git a/code/modules/assembly/signaler.dm b/code/modules/assembly/signaler.dm
index 1886cd4ee65..6a2019b9001 100644
--- a/code/modules/assembly/signaler.dm
+++ b/code/modules/assembly/signaler.dm
@@ -23,7 +23,8 @@
if(radio_controller)
set_frequency(frequency)
-/obj/item/assembly/signaler/initialize()
+/obj/item/assembly/signaler/Initialize()
+ ..()
if(radio_controller)
set_frequency(frequency)
diff --git a/code/modules/awaymissions/corpse.dm b/code/modules/awaymissions/corpse.dm
index e5c42e495f2..94e0ea2acce 100644
--- a/code/modules/awaymissions/corpse.dm
+++ b/code/modules/awaymissions/corpse.dm
@@ -29,7 +29,8 @@
var/brute_damage = 0
var/oxy_damage = 0
-/obj/effect/landmark/corpse/initialize()
+/obj/effect/landmark/corpse/Initialize()
+ ..()
if(istype(src,/obj/effect/landmark/corpse/clown))
var/obj/effect/landmark/corpse/clown/C = src
C.chooseRank()
diff --git a/code/modules/awaymissions/gateway.dm b/code/modules/awaymissions/gateway.dm
index d964663298f..d5e2cbcd34d 100644
--- a/code/modules/awaymissions/gateway.dm
+++ b/code/modules/awaymissions/gateway.dm
@@ -9,7 +9,7 @@ var/obj/machinery/gateway/centerstation/the_gateway = null
unacidable = 1
var/active = 0
-/obj/machinery/gateway/initialize()
+/obj/machinery/gateway/Initialize()
..()
update_icon()
update_density_from_dir()
@@ -44,7 +44,7 @@ var/obj/machinery/gateway/centerstation/the_gateway = null
if(!the_gateway)
the_gateway = src
-/obj/machinery/gateway/centerstation/initialize()
+/obj/machinery/gateway/centerstation/Initialize()
..()
update_icon()
wait = world.time + config.gateway_delay //+ thirty minutes default
@@ -170,7 +170,7 @@ var/obj/machinery/gateway/centerstation/the_gateway = null
var/obj/machinery/gateway/centeraway/stationgate = null
-/obj/machinery/gateway/centeraway/initialize()
+/obj/machinery/gateway/centeraway/Initialize()
..()
update_icon()
stationgate = locate(/obj/machinery/gateway/centerstation) in world
diff --git a/code/modules/awaymissions/loot.dm b/code/modules/awaymissions/loot.dm
index 49af9a43ce6..6497d62648a 100644
--- a/code/modules/awaymissions/loot.dm
+++ b/code/modules/awaymissions/loot.dm
@@ -5,7 +5,8 @@
var/lootdoubles = 0 //if the same item can be spawned twice
var/loot = "" //a list of possible items to spawn- a string of paths
-/obj/effect/spawner/away/lootdrop/initialize()
+/obj/effect/spawner/away/lootdrop/Initialize()
+ ..()
var/list/things = params2list(loot)
if(things && things.len)
diff --git a/code/modules/awaymissions/map_rng.dm b/code/modules/awaymissions/map_rng.dm
index 64350c99737..7618996fdf9 100644
--- a/code/modules/awaymissions/map_rng.dm
+++ b/code/modules/awaymissions/map_rng.dm
@@ -18,13 +18,8 @@
template_name = tname
if(template_name)
template = map_templates[template_name]
- // Catches the interim-zone of worldstart and roundstart
- // I want both the ticker to exist (so mapped-in maploaders don't trip this)
- // but also not have started yet (since the zlevel system would handle this on its own otherwise)
- if((ticker && ticker.current_state < GAME_STATE_PLAYING))
- attempt_init()
-/obj/effect/landmark/map_loader/initialize()
+/obj/effect/landmark/map_loader/Initialize()
..()
if(template)
load(template)
@@ -48,7 +43,7 @@
/obj/effect/landmark/map_loader/random
var/template_list = ""
-/obj/effect/landmark/map_loader/random/initialize()
+/obj/effect/landmark/map_loader/random/Initialize()
..()
if(template_list)
template_name = safepick(splittext(template_list, ";"))
diff --git a/code/modules/awaymissions/maploader/reader.dm b/code/modules/awaymissions/maploader/reader.dm
index b44fd01e45c..5ff625544fd 100644
--- a/code/modules/awaymissions/maploader/reader.dm
+++ b/code/modules/awaymissions/maploader/reader.dm
@@ -422,13 +422,6 @@ var/global/dmm_suite/preloader/_preloader = new
return to_return
-//atom creation method that preloads variables at creation
-/atom/New()
- if(use_preloader && (src.type == _preloader.target_path))//in case the instanciated atom is creating other atoms in New()
- _preloader.load(src)
-
- . = ..()
-
/dmm_suite/Destroy()
..()
return QDEL_HINT_HARDDEL_NOW
diff --git a/code/modules/awaymissions/mission_code/spacehotel.dm b/code/modules/awaymissions/mission_code/spacehotel.dm
index e86123abc2e..4e4f2628736 100644
--- a/code/modules/awaymissions/mission_code/spacehotel.dm
+++ b/code/modules/awaymissions/mission_code/spacehotel.dm
@@ -54,7 +54,7 @@
name = "space hotel pamphlet"
info = "Welcome to Deep Space Hotel 419!
Thank you for choosing our hotel. Simply hand your credit or debit card to the concierge and get your room key! To check out, hand your credit card back.Conditions:
- The hotel is not responsible for any losses due to time or space anomalies.
- The hotel is not responsible for events that occur outside of the hotel station, including, but not limited to, events that occur inside of dimensional pockets.
- The hotel is not responsible for overcharging your account.
- The hotel is not responsible for missing persons.
- The hotel is not responsible for mind-altering effects due to drugs, magic, demons, or space worms.
"
-/obj/effect/landmark/map_loader/hotel_room/initialize()
+/obj/effect/landmark/map_loader/hotel_room/Initialize()
..()
// load and randomly assign rooms
var/global/list/south_room_templates = list()
diff --git a/code/modules/awaymissions/zvis.dm b/code/modules/awaymissions/zvis.dm
index 73bbff2198f..4324377149d 100644
--- a/code/modules/awaymissions/zvis.dm
+++ b/code/modules/awaymissions/zvis.dm
@@ -22,7 +22,7 @@
..()
levels += src
-/obj/effect/levelref/initialize()
+/obj/effect/levelref/Initialize()
..()
for(var/obj/effect/levelref/O in levels)
if(id == O.id && O != src)
@@ -161,7 +161,7 @@
..()
portals += src
-/obj/effect/view_portal/initialize()
+/obj/effect/view_portal/Initialize()
..()
if(id)
for(var/obj/effect/view_portal/O in portals)
diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm
index a075dbdfba3..6a5d5dd0519 100644
--- a/code/modules/customitems/item_defines.dm
+++ b/code/modules/customitems/item_defines.dm
@@ -497,8 +497,8 @@
#undef USED_MOD_SUIT
/obj/item/fluff/merchant_sallet_modkit //Travelling Merchant: Trav Noble. This is what they spawn in with
- name = "sallet modkit"
- desc = "A modkit that can make most helmets look like a steel sallet."
+ name = "SG Helmet modkit"
+ desc = "A modkit that can make most helmets look like a Shellguard Helmet."
icon_state = "modkit"
w_class = WEIGHT_CLASS_SMALL
force = 0
@@ -649,49 +649,49 @@
icon_state = "kakicharakiti"
/obj/item/clothing/head/helmet/fluff/merchant_sallet //Travelling Merchant: Trav Noble. This >>IS NOT<< what they spawn in with
- name = "Steel Sallet"
- desc = "A heavy steel sallet with the word Noble scratched into the side. Comes with a Bevor attached."
+ name = "Shellguard Helmet"
+ desc = "A Shellguard Helmet with the name Noble written on the inside."
icon = 'icons/obj/custom_items.dmi'
icon_state = "merchant_sallet_visor_bevor"
item_state = "merchant_sallet_visor_bevor"
actions_types = list(/datum/action/item_action/toggle_helmet_mode)
toggle_cooldown = 20
- toggle_sound = 'sound/items/ZippoClose.ogg'
+ toggle_sound = 'sound/items/change_jaws.ogg'
flags = BLOCKHAIR
flags_inv = HIDEEYES|HIDEMASK|HIDEFACE|HIDEEARS
- var/state = "Visor & Bevor"
+ var/state = "Soldier Up"
/obj/item/clothing/head/helmet/fluff/merchant_sallet/attack_self(mob/user)
if(!user.incapacitated() && (world.time > cooldown + toggle_cooldown) && Adjacent(user))
var/list/options = list()
- options["Visor & Bevor"] = list(
+ options["Soldier Up"] = list(
"icon_state" = "merchant_sallet_visor_bevor",
- "visor_flags" = HIDEEYES,
- "mask_flags" = HIDEMASK|HIDEFACE
- )
- options["Visor Only"] = list(
- "icon_state" = "merchant_sallet_visor",
- "visor_flags" = HIDEEYES,
- "mask_flags" = HIDEFACE
- )
- options["Bevor Only"] = list(
- "icon_state" = "merchant_sallet_bevor",
- "visor_flags" = null,
- "mask_flags" = HIDEMASK|HIDEFACE
- )
- options["Neither Visor nor Bevor"] = list(
- "icon_state" = "merchant_sallet",
"visor_flags" = null,
"mask_flags" = null
)
+ options["Soldier Down"] = list(
+ "icon_state" = "merchant_sallet_visor",
+ "visor_flags" = HIDEEYES,
+ "mask_flags" = HIDEMASK|HIDEFACE
+ )
+ options["Technician Up"] = list(
+ "icon_state" = "merchant_sallet_bevor",
+ "visor_flags" = null,
+ "mask_flags" = null
+ )
+ options["Technician Down"] = list(
+ "icon_state" = "merchant_sallet",
+ "visor_flags" = HIDEEYES,
+ "mask_flags" = HIDEMASK|HIDEFACE
+ )
- var/choice = input(user, "How would you like to adjust the sallet?", "Adjust Sallet") as null|anything in options
+ var/choice = input(user, "How would you like to adjust the helmet?", "Adjust Helmet") as null|anything in options
if(choice && choice != state && !user.incapacitated() && Adjacent(user))
var/list/new_state = options[choice]
icon_state = new_state["icon_state"]
state = choice
- to_chat(user, "You adjust the sallet.")
+ to_chat(user, "You adjust the helmet.")
playsound(src.loc, "[toggle_sound]", 100, 0, 4)
user.update_inv_head()
return 1
diff --git a/code/modules/economy/ATM.dm b/code/modules/economy/ATM.dm
index 014f87ac310..6306fa5a83e 100644
--- a/code/modules/economy/ATM.dm
+++ b/code/modules/economy/ATM.dm
@@ -38,7 +38,7 @@ log transactions
..()
machine_id = "[station_name()] RT #[num_financial_terminals++]"
-/obj/machinery/atm/initialize()
+/obj/machinery/atm/Initialize()
..()
reconnect_database()
@@ -122,6 +122,8 @@ log transactions
if(issilicon(user))
to_chat(user, "Artificial unit recognized. Artificial units do not currently receive monetary compensation, as per Nanotrasen regulation #1005.")
return
+ if(!linked_db)
+ reconnect_database()
ui_interact(user)
/obj/machinery/atm/attack_ghost(mob/user)
@@ -199,12 +201,9 @@ log transactions
authenticated_account.security_level = new_sec_level
if("attempt_auth")
if(linked_db)
- // check if they have low security enabled
- scan_user(usr)
-
- if(!ticks_left_locked_down && held_card)
+ if(!ticks_left_locked_down)
var/tried_account_num = text2num(href_list["account_num"])
- if(!tried_account_num)
+ if(!tried_account_num && held_card)
tried_account_num = held_card.associated_account_number
var/tried_pin = text2num(href_list["account_pin"])
@@ -323,30 +322,3 @@ log transactions
//create the most effective combination of notes to make up the requested amount
/obj/machinery/atm/proc/withdraw_arbitrary_sum(arbitrary_sum)
new /obj/item/stack/spacecash(get_step(get_turf(src), turn(dir, 180)), arbitrary_sum)
-
-//stolen wholesale and then edited a bit from newscasters, which are awesome and by Agouri
-/obj/machinery/atm/proc/scan_user(mob/living/carbon/human/H)
- if(!authenticated_account && linked_db)
- if(H.wear_id)
- var/obj/item/card/id/I
- if(istype(H.wear_id, /obj/item/card/id) )
- I = H.wear_id
- else if(istype(H.wear_id, /obj/item/pda) )
- var/obj/item/pda/P = H.wear_id
- I = P.id
- if(I)
- authenticated_account = attempt_account_access(I.associated_account_number)
- if(authenticated_account)
- to_chat(H, "[bicon(src)]Access granted. Welcome user '[authenticated_account.owner_name].'")
-
- //create a transaction log entry
- var/datum/transaction/T = new()
- T.target_name = authenticated_account.owner_name
- T.purpose = "Remote terminal access"
- T.source_terminal = machine_id
- T.date = current_date_string
- T.time = station_time_timestamp()
- authenticated_account.transaction_log.Add(T)
-
- view_screen = NO_SCREEN
- SSnanoui.update_uis(src)
diff --git a/code/modules/error_handler/error_handler.dm b/code/modules/error_handler/error_handler.dm
index a527367ee2b..09a5d20833e 100644
--- a/code/modules/error_handler/error_handler.dm
+++ b/code/modules/error_handler/error_handler.dm
@@ -96,7 +96,7 @@ var/total_runtimes_skipped = 0
// Now to actually output the error info...
log_world("\[[time_stamp()]] Runtime in [e.file],[e.line]: [e]")
- log_runtime_txt("\[[time_stamp()]] Runtime in [e.file],[e.line]: [e]")
+ log_runtime_txt("Runtime in [e.file],[e.line]: [e]")
for(var/line in desclines)
log_world(line)
log_runtime_txt(line)
diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm
index 1b8c0b5b989..cd94d79bd5c 100644
--- a/code/modules/food_and_drinks/food/snacks.dm
+++ b/code/modules/food_and_drinks/food/snacks.dm
@@ -1250,7 +1250,14 @@
/obj/item/reagent_containers/food/snacks/monkeycube/proc/Expand()
if(!QDELETED(src))
visible_message("[src] expands!")
- new/mob/living/carbon/human(get_turf(src), monkey_type)
+ if(fingerprintslast)
+ log_game("Cube ([monkey_type]) inflated, last touched by: " + fingerprintslast)
+ else
+ log_game("Cube ([monkey_type]) inflated, last touched by: NO_DATA")
+ var/mob/living/carbon/human/creature = new /mob/living/carbon/human(get_turf(src))
+ if(fingerprintshidden.len)
+ creature.fingerprintshidden = fingerprintshidden.Copy()
+ creature.set_species(monkey_type)
qdel(src)
/obj/item/reagent_containers/food/snacks/monkeycube/farwacube
diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm
index a0b10f29f38..8df5d593b9b 100644
--- a/code/modules/library/lib_items.dm
+++ b/code/modules/library/lib_items.dm
@@ -24,7 +24,7 @@
var/tmp/busy = 0
var/list/allowed_books = list(/obj/item/book, /obj/item/spellbook, /obj/item/storage/bible, /obj/item/tome) //Things allowed in the bookcase
-/obj/structure/bookcase/initialize()
+/obj/structure/bookcase/Initialize()
..()
for(var/obj/item/I in loc)
if(is_type_in_list(I, allowed_books))
diff --git a/code/modules/lighting/lighting_atom.dm b/code/modules/lighting/lighting_atom.dm
index 679f6fb86ef..075e3e47a20 100644
--- a/code/modules/lighting/lighting_atom.dm
+++ b/code/modules/lighting/lighting_atom.dm
@@ -40,16 +40,6 @@
else
light = new /datum/light_source(src, .)
-/atom/New()
- . = ..()
-
- if(light_power && light_range)
- update_light()
-
- if(opacity && isturf(loc))
- var/turf/T = loc
- T.has_opaque_atom = TRUE // No need to recalculate it in this case, it's guranteed to be on afterwards anyways.
-
/atom/Destroy()
if(light)
light.destroy()
diff --git a/code/modules/lighting/lighting_overlay.dm b/code/modules/lighting/lighting_overlay.dm
index 6fe55eed0ff..1a421e6d1ad 100644
--- a/code/modules/lighting/lighting_overlay.dm
+++ b/code/modules/lighting/lighting_overlay.dm
@@ -9,7 +9,6 @@
invisibility = INVISIBILITY_LIGHTING
color = LIGHTING_BASE_MATRIX
icon_state = "light1"
- auto_init = 0 // doesn't need special init
blend_mode = BLEND_MULTIPLY
var/lum_r = 0
diff --git a/code/modules/logic/logic_base.dm b/code/modules/logic/logic_base.dm
index db891ab383c..519c47c408b 100644
--- a/code/modules/logic/logic_base.dm
+++ b/code/modules/logic/logic_base.dm
@@ -50,7 +50,7 @@
component_parts += LG
component_parts += new /obj/item/stack/cable_coil(null, 1)
-/obj/machinery/logic_gate/initialize()
+/obj/machinery/logic_gate/Initialize()
..()
set_frequency(frequency)
diff --git a/code/modules/mining/satchel_ore_boxdm.dm b/code/modules/mining/satchel_ore_boxdm.dm
index a844e7ff551..33334d49382 100644
--- a/code/modules/mining/satchel_ore_boxdm.dm
+++ b/code/modules/mining/satchel_ore_boxdm.dm
@@ -6,26 +6,26 @@
icon_state = "orebox0"
name = "ore box"
desc = "A heavy wooden box, which can be filled with a lot of ores."
- density = 1
- pressure_resistance = 5*ONE_ATMOSPHERE
+ density = TRUE
+ pressure_resistance = 5 * ONE_ATMOSPHERE
-/obj/structure/ore_box/attackby(obj/item/W as obj, mob/user as mob, params)
+/obj/structure/ore_box/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/t_scanner/adv_mining_scanner))
attack_hand(user)
return
if(istype(W, /obj/item/ore))
if(!user.drop_item())
return
- W.loc = src
+ W.forceMove(src)
if(istype(W, /obj/item/storage))
var/obj/item/storage/S = W
S.hide_from(usr)
for(var/obj/item/ore/O in S.contents)
S.remove_from_storage(O, src) //This will move the item to this item's contents
+ CHECK_TICK
to_chat(user, "You empty the satchel into the box.")
- return
-/obj/structure/ore_box/attack_hand(mob/user as mob)
+/obj/structure/ore_box/attack_hand(mob/user)
var/amt_gold = 0
var/amt_silver = 0
var/amt_diamond = 0
@@ -90,20 +90,19 @@
var/datum/browser/popup = new(user, "orebox", name, 400, 400)
popup.set_content(dat)
popup.open(0)
- return
/obj/structure/ore_box/Topic(href, href_list)
if(..())
return
usr.set_machine(src)
- src.add_fingerprint(usr)
+ add_fingerprint(usr)
if(href_list["removeall"])
for(var/obj/item/ore/O in contents)
contents -= O
- O.loc = src.loc
+ O.forceMove(loc)
+ CHECK_TICK
to_chat(usr, "You empty the box.")
- src.updateUsrDialog()
- return
+ updateUsrDialog()
obj/structure/ore_box/ex_act(severity, target)
if(prob(100 / severity) && severity < 3)
@@ -115,11 +114,11 @@ obj/structure/ore_box/ex_act(severity, target)
set category = "Object"
set src in view(1)
- if(!istype(usr, /mob/living/carbon/human)) //Only living, intelligent creatures with hands can empty ore boxes.
+ if(!ishuman(usr)) //Only living, intelligent creatures with hands can empty ore boxes.
to_chat(usr, "You are physically incapable of emptying the ore box.")
return
- if( usr.stat || usr.restrained() )
+ if(usr.incapacitated())
return
if(!Adjacent(usr)) //You can only empty the box if you can physically reach it
@@ -134,7 +133,6 @@ obj/structure/ore_box/ex_act(severity, target)
for(var/obj/item/ore/O in contents)
contents -= O
- O.loc = src.loc
- to_chat(usr, "You empty the ore box.")
-
- return
+ O.forceMove(loc)
+ CHECK_TICK
+ to_chat(usr, "You empty the ore box.")
\ No newline at end of file
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index 4ab29741ef6..933ef9a6403 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -106,7 +106,7 @@ var/list/image/ghost_darkness_images = list() //this is a list of images for thi
Transfer_mind is there to check if mob is being deleted/not going to have a body.
Works together with spawning an observer, noted above.
*/
-/mob/dead/observer/Life()
+/mob/dead/observer/Life(seconds, times_fired)
..()
if(!loc) return
if(!client) return 0
@@ -419,7 +419,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(.)
update_following()
-/mob/Life()
+/mob/Life(seconds, times_fired)
// to catch teleports etc which directly set loc
update_following()
return ..()
diff --git a/code/modules/mob/living/carbon/alien/humanoid/life.dm b/code/modules/mob/living/carbon/alien/humanoid/life.dm
index a13fce956da..180d6bd8072 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/life.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/life.dm
@@ -1,4 +1,4 @@
-/mob/living/carbon/alien/humanoid/Life()
+/mob/living/carbon/alien/humanoid/Life(seconds, times_fired)
. = ..()
update_icons()
diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm
index 4faa957163c..5bbb31c00d1 100644
--- a/code/modules/mob/living/carbon/alien/larva/life.dm
+++ b/code/modules/mob/living/carbon/alien/larva/life.dm
@@ -1,4 +1,4 @@
-/mob/living/carbon/alien/larva/Life()
+/mob/living/carbon/alien/larva/Life(seconds, times_fired)
if(..()) //still breathing
// GROW!
if(amount_grown < max_grown)
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 5a47bb052d5..e0f90aacdd0 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -10,8 +10,12 @@
var/datum/species/species //Contains icon generation and language information, set during New().
var/obj/item/rig/wearing_rig // This is very not good, but it's much much better than calling get_rig() every update_canmove() call.
-/mob/living/carbon/human/New(var/new_loc, var/new_species = null, var/delay_ready_dna = 0)
+/mob/living/carbon/human/New(loc)
+ if(length(args) > 1)
+ log_runtime(EXCEPTION("human/New called with more than 1 argument (REPORT THIS ENTIRE RUNTIME TO A CODER)"))
+ . = ..()
+/mob/living/carbon/human/Initialize(mapload, new_species = null)
if(!dna)
dna = new /datum/dna(null)
// Species name is handled by set_species()
@@ -40,7 +44,7 @@
faction |= "\ref[M]" //what
// Set up DNA.
- if(!delay_ready_dna && dna)
+ if(dna)
dna.ready_dna(src)
dna.real_name = real_name
sync_organ_dna(1)
@@ -69,80 +73,80 @@
real_name = "Test Dummy"
status_flags = GODMODE|CANPUSH
-/mob/living/carbon/human/skrell/New(var/new_loc)
- ..(new_loc, "Skrell")
+/mob/living/carbon/human/skrell/Initialize(mapload)
+ ..(mapload, "Skrell")
-/mob/living/carbon/human/tajaran/New(var/new_loc)
- ..(new_loc, "Tajaran")
+/mob/living/carbon/human/tajaran/Initialize(mapload)
+ ..(mapload, "Tajaran")
-/mob/living/carbon/human/vulpkanin/New(var/new_loc)
- ..(new_loc, "Vulpkanin")
+/mob/living/carbon/human/vulpkanin/Initialize(mapload)
+ ..(mapload, "Vulpkanin")
-/mob/living/carbon/human/unathi/New(var/new_loc)
- ..(new_loc, "Unathi")
+/mob/living/carbon/human/unathi/Initialize(mapload)
+ ..(mapload, "Unathi")
-/mob/living/carbon/human/vox/New(var/new_loc)
- ..(new_loc, "Vox")
+/mob/living/carbon/human/vox/Initialize(mapload)
+ ..(mapload, "Vox")
-/mob/living/carbon/human/voxarmalis/New(var/new_loc)
- ..(new_loc, "Vox Armalis")
+/mob/living/carbon/human/voxarmalis/Initialize(mapload)
+ ..(mapload, "Vox Armalis")
-/mob/living/carbon/human/skeleton/New(var/new_loc)
- ..(new_loc, "Skeleton")
+/mob/living/carbon/human/skeleton/Initialize(mapload)
+ ..(mapload, "Skeleton")
-/mob/living/carbon/human/kidan/New(var/new_loc)
- ..(new_loc, "Kidan")
+/mob/living/carbon/human/kidan/Initialize(mapload)
+ ..(mapload, "Kidan")
-/mob/living/carbon/human/plasma/New(var/new_loc)
- ..(new_loc, "Plasmaman")
+/mob/living/carbon/human/plasma/Initialize(mapload)
+ ..(mapload, "Plasmaman")
-/mob/living/carbon/human/slime/New(var/new_loc)
- ..(new_loc, "Slime People")
+/mob/living/carbon/human/slime/Initialize(mapload)
+ ..(mapload, "Slime People")
-/mob/living/carbon/human/grey/New(var/new_loc)
- ..(new_loc, "Grey")
+/mob/living/carbon/human/grey/Initialize(mapload)
+ ..(mapload, "Grey")
-/mob/living/carbon/human/abductor/New(var/new_loc)
- ..(new_loc, "Abductor")
+/mob/living/carbon/human/abductor/Initialize(mapload)
+ ..(mapload, "Abductor")
-/mob/living/carbon/human/human/New(var/new_loc)
- ..(new_loc, "Human")
+/mob/living/carbon/human/human/Initialize(mapload)
+ ..(mapload, "Human")
-/mob/living/carbon/human/diona/New(var/new_loc)
- ..(new_loc, "Diona")
+/mob/living/carbon/human/diona/Initialize(mapload)
+ ..(mapload, "Diona")
-/mob/living/carbon/human/machine/New(var/new_loc)
- ..(new_loc, "Machine")
+/mob/living/carbon/human/machine/Initialize(mapload)
+ ..(mapload, "Machine")
-/mob/living/carbon/human/shadow/New(var/new_loc)
- ..(new_loc, "Shadow")
+/mob/living/carbon/human/shadow/Initialize(mapload)
+ ..(mapload, "Shadow")
-/mob/living/carbon/human/golem/New(var/new_loc)
- ..(new_loc, "Golem")
+/mob/living/carbon/human/golem/Initialize(mapload)
+ ..(mapload, "Golem")
-/mob/living/carbon/human/wryn/New(var/new_loc)
- ..(new_loc, "Wryn")
+/mob/living/carbon/human/wryn/Initialize(mapload)
+ ..(mapload, "Wryn")
-/mob/living/carbon/human/nucleation/New(var/new_loc)
- ..(new_loc, "Nucleation")
+/mob/living/carbon/human/nucleation/Initialize(mapload)
+ ..(mapload, "Nucleation")
-/mob/living/carbon/human/drask/New(var/new_loc)
- ..(new_loc, "Drask")
+/mob/living/carbon/human/drask/Initialize(mapload)
+ ..(mapload, "Drask")
-/mob/living/carbon/human/monkey/New(var/new_loc)
- ..(new_loc, "Monkey")
+/mob/living/carbon/human/monkey/Initialize(mapload)
+ ..(mapload, "Monkey")
-/mob/living/carbon/human/farwa/New(var/new_loc)
- ..(new_loc, "Farwa")
+/mob/living/carbon/human/farwa/Initialize(mapload)
+ ..(mapload, "Farwa")
-/mob/living/carbon/human/wolpin/New(var/new_loc)
- ..(new_loc, "Wolpin")
+/mob/living/carbon/human/wolpin/Initialize(mapload)
+ ..(mapload, "Wolpin")
-/mob/living/carbon/human/neara/New(var/new_loc)
- ..(new_loc, "Neara")
+/mob/living/carbon/human/neara/Initialize(mapload)
+ ..(mapload, "Neara")
-/mob/living/carbon/human/stok/New(var/new_loc)
- ..(new_loc, "Stok")
+/mob/living/carbon/human/stok/Initialize(mapload)
+ ..(mapload, "Stok")
/mob/living/carbon/human/Stat()
..()
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index 64395954672..00de7814170 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -1,4 +1,4 @@
-/mob/living/carbon/human/Life()
+/mob/living/carbon/human/Life(seconds, times_fired)
life_tick++
voice = GetVoice()
@@ -32,7 +32,7 @@
//Update our name based on whether our face is obscured/disfigured
name = get_visible_name()
- pulse = handle_pulse()
+ pulse = handle_pulse(times_fired)
if(mind && mind.vampire)
mind.vampire.handle_vampire()
@@ -902,9 +902,8 @@
hud_used.lingchemdisplay.invisibility = 101
-/mob/living/carbon/human/proc/handle_pulse()
-
- if(mob_master.current_cycle % 5)
+/mob/living/carbon/human/proc/handle_pulse(times_fired)
+ if(times_fired % 5 == 1)
return pulse //update pulse every 5 life ticks (~1 tick/sec, depending on server load)
if(NO_BLOOD in species.species_traits)
diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm
index f61c5431fab..3023d6538a8 100644
--- a/code/modules/mob/living/carbon/life.dm
+++ b/code/modules/mob/living/carbon/life.dm
@@ -1,4 +1,4 @@
-/mob/living/carbon/Life()
+/mob/living/carbon/Life(seconds, times_fired)
set invisibility = 0
set background = BACKGROUND_ENABLED
@@ -14,7 +14,7 @@
O.on_life()
handle_changeling()
- handle_wetness()
+ handle_wetness(times_fired)
// Increase germ_level regularly
if(germ_level < GERM_LEVEL_AMBIENT && prob(30)) //if you're just standing there, you shouldn't get more germs beyond an ambient level
@@ -26,8 +26,8 @@
///////////////
//Start of a breath chain, calls breathe()
-/mob/living/carbon/handle_breathing()
- if(mob_master.current_cycle % 4 == 2 || failed_last_breath)
+/mob/living/carbon/handle_breathing(times_fired)
+ if(times_fired % 4 == 2 || failed_last_breath)
breathe() //Breathe per 4 ticks, unless suffocating
else
if(istype(loc, /obj/))
@@ -241,11 +241,11 @@
reagents.metabolize(src)
-/mob/living/carbon/proc/handle_wetness()
- if(mob_master.current_cycle%20==2) //dry off a bit once every 20 ticks or so
+/mob/living/carbon/proc/handle_wetness(times_fired)
+ if(times_fired % 20==2) //dry off a bit once every 20 ticks or so
wetlevel = max(wetlevel - 1,0)
-/mob/living/carbon/handle_stomach()
+/mob/living/carbon/handle_stomach(times_fired)
for(var/mob/living/M in stomach_contents)
if(M.loc != src)
stomach_contents.Remove(M)
@@ -255,7 +255,7 @@
stomach_contents.Remove(M)
qdel(M)
continue
- if(mob_master.current_cycle%3==1)
+ if(times_fired % 3 == 1)
M.adjustBruteLoss(5)
nutrition += 10
diff --git a/code/modules/mob/living/carbon/slime/life.dm b/code/modules/mob/living/carbon/slime/life.dm
index ced452ab652..80ed9fdbffd 100644
--- a/code/modules/mob/living/carbon/slime/life.dm
+++ b/code/modules/mob/living/carbon/slime/life.dm
@@ -5,7 +5,7 @@
var/Discipline = 0 // if a slime has been hit with a freeze gun, or wrestled/attacked off a human, they become disciplined and don't attack anymore for a while
var/SStun = 0 // stun variable
-/mob/living/carbon/slime/Life()
+/mob/living/carbon/slime/Life(seconds, times_fired)
if(..())
handle_nutrition()
handle_targets()
diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm
index 8c414636349..f02065b3a0a 100644
--- a/code/modules/mob/living/life.dm
+++ b/code/modules/mob/living/life.dm
@@ -1,4 +1,4 @@
-/mob/living/Life()
+/mob/living/Life(seconds, times_fired)
set invisibility = 0
set background = BACKGROUND_ENABLED
@@ -22,7 +22,7 @@
handle_mutations_and_radiation()
//Breathing, if applicable
- handle_breathing()
+ handle_breathing(times_fired)
//Random events (vomiting etc)
handle_random_events()
@@ -38,7 +38,7 @@
handle_fire()
//stuff in the stomach
- handle_stomach()
+ handle_stomach(times_fired)
update_gravity(mob_has_gravity())
@@ -61,7 +61,7 @@
..()
-/mob/living/proc/handle_breathing()
+/mob/living/proc/handle_breathing(times_fired)
return
/mob/living/proc/handle_mutations_and_radiation()
@@ -80,7 +80,7 @@
/mob/living/proc/handle_environment(datum/gas_mixture/environment)
return
-/mob/living/proc/handle_stomach()
+/mob/living/proc/handle_stomach(times_fired)
return
/mob/living/proc/update_pulling()
diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm
index a6a043a8945..1755674b4f6 100644
--- a/code/modules/mob/living/silicon/ai/life.dm
+++ b/code/modules/mob/living/silicon/ai/life.dm
@@ -3,7 +3,7 @@
#define POWER_RESTORATION_SEARCH_APC 2
#define POWER_RESTORATION_APC_FOUND 3
-/mob/living/silicon/ai/Life()
+/mob/living/silicon/ai/Life(seconds, times_fired)
//doesn't call parent because it's a horrible mess
if(stat == DEAD)
return
diff --git a/code/modules/mob/living/silicon/decoy/life.dm b/code/modules/mob/living/silicon/decoy/life.dm
index ade3c535506..353bf4259ff 100644
--- a/code/modules/mob/living/silicon/decoy/life.dm
+++ b/code/modules/mob/living/silicon/decoy/life.dm
@@ -1,4 +1,4 @@
-/mob/living/silicon/decoy/Life()
+/mob/living/silicon/decoy/Life(seconds, times_fired)
if(src.stat == 2)
return
else
diff --git a/code/modules/mob/living/silicon/pai/life.dm b/code/modules/mob/living/silicon/pai/life.dm
index ec40dff7739..abcfc6bd643 100644
--- a/code/modules/mob/living/silicon/pai/life.dm
+++ b/code/modules/mob/living/silicon/pai/life.dm
@@ -1,4 +1,4 @@
-/mob/living/silicon/pai/Life()
+/mob/living/silicon/pai/Life(seconds, times_fired)
. = ..()
if(.)
//if(secHUD == 1)
diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm
index f42f19b67fa..afa10c1772b 100644
--- a/code/modules/mob/living/silicon/robot/life.dm
+++ b/code/modules/mob/living/silicon/robot/life.dm
@@ -1,4 +1,4 @@
-/mob/living/silicon/robot/Life()
+/mob/living/silicon/robot/Life(seconds, times_fired)
set invisibility = 0
set background = BACKGROUND_ENABLED
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index 701909d87ea..9be14600a3a 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -52,6 +52,9 @@ var/list/robot_verbs_default = list(
var/custom_panel = null
var/list/custom_panel_names = list("Cricket")
var/emagged = 0
+ var/is_emaggable = TRUE
+ var/eye_protection = 0
+ var/ear_protection = 0
var/list/force_modules = list()
var/allow_rename = TRUE
@@ -762,7 +765,9 @@ var/list/robot_verbs_default = list(
return
var/mob/living/M = user
if(!opened)//Cover is closed
- if(locked)
+ if(!is_emaggable)
+ to_chat(user, "The emag sparks, and flashes red. This mechanism does not appear to be emaggable.")
+ else if(locked)
to_chat(user, "You emag the cover lock.")
locked = 0
else
@@ -1241,16 +1246,19 @@ var/list/robot_verbs_default = list(
/mob/living/silicon/robot/deathsquad
base_icon = "nano_bloodhound"
icon_state = "nano_bloodhound"
+ designation = "SpecOps"
lawupdate = 0
scrambledcodes = 1
- pdahide = 1
- modtype = "Commando"
- faction = list("nanotrasen")
- designation = "Nanotrasen Combat"
req_access = list(access_cent_specops)
ionpulse = 1
magpulse = 1
- var/searching_for_ckey = 0
+ pdahide = 1
+ eye_protection = 2 // Immunity to flashes and the visual part of flashbangs
+ ear_protection = 1 // Immunity to the audio part of flashbangs
+ allow_rename = FALSE
+ modtype = "Commando"
+ faction = list("nanotrasen")
+ is_emaggable = FALSE
/mob/living/silicon/robot/deathsquad/New(loc)
..()
@@ -1267,26 +1275,7 @@ var/list/robot_verbs_default = list(
playsound(loc, 'sound/mecha/nominalsyndi.ogg', 75, 0)
-/mob/living/silicon/robot/deathsquad/attack_hand(mob/user)
- if(isnull(ckey) && !searching_for_ckey)
- searching_for_ckey = 1
- to_chat(user, "Now checking for possible borgs.")
- var/list/borg_candidates = pollCandidates("Do you want to play as a Nanotrasen Combat borg?")
- if(borg_candidates.len > 0 && isnull(ckey))
- searching_for_ckey = 0
- var/mob/M = pick(borg_candidates)
- M.mind.transfer_to(src)
- M.mind.assigned_role = "MODE"
- M.mind.special_role = SPECIAL_ROLE_DEATHSQUAD
- ticker.mode.traitors |= M.mind // Adds them to current traitor list. Which is really the extra antagonist list.
- key = M.key
- else
- searching_for_ckey = 0
- to_chat(user, "Unable to connect to Central Command. Please wait and try again later.")
- return
- else
- to_chat(user, "[src] is already checking for possible borgs.")
- return
+
/mob/living/silicon/robot/syndicate
base_icon = "syndie_bloodhound"
@@ -1447,3 +1436,9 @@ var/list/robot_verbs_default = list(
var/static/all_borg_icon_states = icon_states('icons/mob/custom_synthetic/custom-synthetic.dmi')
if(spritename in all_borg_icon_states)
. = TRUE
+
+/mob/living/silicon/robot/check_eye_prot()
+ return eye_protection
+
+/mob/living/silicon/robot/check_ear_prot()
+ return ear_protection
\ No newline at end of file
diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm
index c292d33f39a..ef5de1908a8 100644
--- a/code/modules/mob/living/simple_animal/bot/secbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/secbot.dm
@@ -267,7 +267,7 @@ Auto Patrol: []"},
C.visible_message("[src] has [harmbaton ? "beaten" : "stunned"] [C]!",\
"[src] has [harmbaton ? "beaten" : "stunned"] you!")
-/mob/living/simple_animal/bot/secbot/Life()
+/mob/living/simple_animal/bot/secbot/Life(seconds, times_fired)
. = ..()
if(flashing_lights)
switch(light_color)
diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm
index b942ce4107b..a6fcf4b5a20 100644
--- a/code/modules/mob/living/simple_animal/constructs.dm
+++ b/code/modules/mob/living/simple_animal/constructs.dm
@@ -285,7 +285,7 @@
AIStatus = AI_ON
environment_smash = 1 //only token destruction, don't smash the cult wall NO STOP
-/mob/living/simple_animal/hostile/construct/behemoth/Life()
+/mob/living/simple_animal/hostile/construct/behemoth/Life(seconds, times_fired)
weakened = 0
return ..()
diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm
index 7afa9debe25..ea7db302c43 100644
--- a/code/modules/mob/living/simple_animal/friendly/cat.dm
+++ b/code/modules/mob/living/simple_animal/friendly/cat.dm
@@ -46,7 +46,7 @@
Read_Memory()
..()
-/mob/living/simple_animal/pet/cat/Runtime/Life()
+/mob/living/simple_animal/pet/cat/Runtime/Life(seconds, times_fired)
if(!cats_deployed && ticker.current_state >= GAME_STATE_SETTING_UP)
Deploy_The_Cats()
if(!stat && ticker.current_state == GAME_STATE_FINISHED && !memory_saved)
diff --git a/code/modules/mob/living/simple_animal/friendly/corgi.dm b/code/modules/mob/living/simple_animal/friendly/corgi.dm
index 24772ff473c..613f91e024c 100644
--- a/code/modules/mob/living/simple_animal/friendly/corgi.dm
+++ b/code/modules/mob/living/simple_animal/friendly/corgi.dm
@@ -37,7 +37,7 @@
if(gender == NEUTER)
gender = pick(MALE, FEMALE)
-/mob/living/simple_animal/pet/corgi/Life()
+/mob/living/simple_animal/pet/corgi/Life(seconds, times_fired)
. = ..()
regenerate_icons()
@@ -612,7 +612,7 @@
A.fire()
return
-/mob/living/simple_animal/pet/corgi/Ian/borgi/Life()
+/mob/living/simple_animal/pet/corgi/Ian/borgi/Life(seconds, times_fired)
..()
if(emagged && prob(25))
var/mob/living/carbon/target = locate() in view(10,src)
diff --git a/code/modules/mob/living/simple_animal/friendly/crab.dm b/code/modules/mob/living/simple_animal/friendly/crab.dm
index 99db2236612..665afa16cb2 100644
--- a/code/modules/mob/living/simple_animal/friendly/crab.dm
+++ b/code/modules/mob/living/simple_animal/friendly/crab.dm
@@ -34,7 +34,7 @@
Move(get_step(src, east_vs_west), east_vs_west)
turns_since_move = 0
-/mob/living/simple_animal/crab/Life()
+/mob/living/simple_animal/crab/Life(seconds, times_fired)
. = ..()
regenerate_icons()
diff --git a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
index ab1a94cbcc6..a8784a6d150 100644
--- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
+++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
@@ -52,7 +52,7 @@
if(SV)
SV.eat(src)
-/mob/living/simple_animal/hostile/retaliate/goat/Life()
+/mob/living/simple_animal/hostile/retaliate/goat/Life(seconds, times_fired)
. = ..()
if(stat == CONSCIOUS && prob(5))
milk_content = min(50, milk_content+rand(5, 10))
@@ -132,7 +132,7 @@
else
..()
-/mob/living/simple_animal/cow/Life()
+/mob/living/simple_animal/cow/Life(seconds, times_fired)
. = ..()
if(stat == CONSCIOUS && prob(5))
milk_content = min(50, milk_content+rand(5, 10))
@@ -188,7 +188,7 @@
pixel_x = rand(-6, 6)
pixel_y = rand(0, 10)
-/mob/living/simple_animal/chick/Life()
+/mob/living/simple_animal/chick/Life(seconds, times_fired)
. =..()
if(.)
amount_grown += rand(1,2)
@@ -267,7 +267,7 @@ var/global/chicken_count = 0
else
..()
-/mob/living/simple_animal/chicken/Life()
+/mob/living/simple_animal/chicken/Life(seconds, times_fired)
. = ..()
if((. && prob(3) && eggsleft > 0) && egg_type)
visible_message("[src] [pick(layMessage)]")
diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm
index 5972d0f6e4b..a7a62c74c0b 100644
--- a/code/modules/mob/living/simple_animal/friendly/mouse.dm
+++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm
@@ -39,7 +39,7 @@
for(var/mob/M in view())
M << 'sound/effects/mousesqueek.ogg'
-/mob/living/simple_animal/mouse/Life()
+/mob/living/simple_animal/mouse/Life(seconds, times_fired)
. = ..()
if(stat == UNCONSCIOUS)
if(ckey || prob(1))
diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm
index a06ea9bd80d..283936acb44 100644
--- a/code/modules/mob/living/simple_animal/hostile/hostile.dm
+++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm
@@ -57,7 +57,7 @@
target = null
return ..()
-/mob/living/simple_animal/hostile/Life()
+/mob/living/simple_animal/hostile/Life(seconds, times_fired)
. = ..()
if(!.)
walk(src, 0)
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm
index 50c24f0ac0b..971adc431cc 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm
@@ -75,7 +75,7 @@ Difficulty: Hard
/obj/effect/decal/cleanable/blood/gibs/bubblegum/can_bloodcrawl_in()
return TRUE
-/mob/living/simple_animal/hostile/megafauna/bubblegum/Life()
+/mob/living/simple_animal/hostile/megafauna/bubblegum/Life(seconds, times_fired)
..()
move_to_delay = Clamp((health/maxHealth) * 10, 5, 10)
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm
index 8d249c7f9e2..fe80846935d 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm
@@ -76,7 +76,7 @@ Difficulty: Hard
internal_gps = new/obj/item/gps/internal/hierophant(src)
spawned_rune = new(loc)
-/mob/living/simple_animal/hostile/megafauna/hierophant/Life()
+/mob/living/simple_animal/hostile/megafauna/hierophant/Life(seconds, times_fired)
. = ..()
if(. && spawned_rune && !client)
if(target || loc == spawned_rune.loc)
diff --git a/code/modules/mob/living/simple_animal/hostile/mimic.dm b/code/modules/mob/living/simple_animal/hostile/mimic.dm
index 9dab58daa4a..5832f7bdd60 100644
--- a/code/modules/mob/living/simple_animal/hostile/mimic.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mimic.dm
@@ -51,7 +51,7 @@
var/attempt_open = 0
// Pickup loot
-/mob/living/simple_animal/hostile/mimic/crate/initialize()
+/mob/living/simple_animal/hostile/mimic/crate/Initialize()
..()
for(var/obj/item/I in loc)
I.loc = src
diff --git a/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm b/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm
index a026d33ed8d..3063c5a8ce1 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm
@@ -269,7 +269,7 @@
stat_attack = 1
robust_searching = 1
-/mob/living/simple_animal/hostile/asteroid/hivelordbrood/legion/Life()
+/mob/living/simple_animal/hostile/asteroid/hivelordbrood/legion/Life(seconds, times_fired)
if(isturf(loc))
for(var/mob/living/carbon/human/H in view(src,1)) //Only for corpse right next to/on same tile
if(H.stat == UNCONSCIOUS)
diff --git a/code/modules/mob/living/simple_animal/hostile/mushroom.dm b/code/modules/mob/living/simple_animal/hostile/mushroom.dm
index 7346473de94..2c775074253 100644
--- a/code/modules/mob/living/simple_animal/hostile/mushroom.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mushroom.dm
@@ -42,7 +42,7 @@
else
to_chat(user, "It looks like it's been roughed up.")
-/mob/living/simple_animal/hostile/mushroom/Life()
+/mob/living/simple_animal/hostile/mushroom/Life(seconds, times_fired)
..()
if(!stat)//Mushrooms slowly regenerate if conscious, for people who want to save them from being eaten
adjustBruteLoss(-2)
diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm
index 0e1d5eddd71..90586bb43c6 100644
--- a/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm
+++ b/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm
@@ -62,7 +62,7 @@
return ..()
//self repair systems have a chance to bring the drone back to life
-/mob/living/simple_animal/hostile/retaliate/malf_drone/Life()
+/mob/living/simple_animal/hostile/retaliate/malf_drone/Life(seconds, times_fired)
//emps and lots of damage can temporarily shut us down
if(disabled > 0)
diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/undead.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/undead.dm
index 14b1af87b0a..f9516739e6f 100644
--- a/code/modules/mob/living/simple_animal/hostile/retaliate/undead.dm
+++ b/code/modules/mob/living/simple_animal/hostile/retaliate/undead.dm
@@ -56,7 +56,7 @@
if(.)
custom_emote(1, "wails at [.]")
-/mob/living/simple_animal/hostile/retaliate/ghost/Life()
+/mob/living/simple_animal/hostile/retaliate/ghost/Life(seconds, times_fired)
if(target)
invisibility = pick(0,0,60,invisibility)
else
diff --git a/code/modules/mob/living/simple_animal/hostile/spaceworms.dm b/code/modules/mob/living/simple_animal/hostile/spaceworms.dm
index 27bd2f3ee1c..d63d43b4919 100644
--- a/code/modules/mob/living/simple_animal/hostile/spaceworms.dm
+++ b/code/modules/mob/living/simple_animal/hostile/spaceworms.dm
@@ -190,7 +190,7 @@
SW.death()
-/mob/living/simple_animal/hostile/spaceWorm/Life()
+/mob/living/simple_animal/hostile/spaceWorm/Life(seconds, times_fired)
if(nextWorm && !(Adjacent(nextWorm)))
Detach(0)
diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/purple.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/purple.dm
index c9309715443..5c483b4e3e9 100644
--- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/purple.dm
+++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/purple.dm
@@ -48,7 +48,7 @@
visible_message("[src] chitters in the direction of [Q]!")
. = ..()
-/mob/living/simple_animal/hostile/poison/terror_spider/purple/Life()
+/mob/living/simple_animal/hostile/poison/terror_spider/purple/Life(seconds, times_fired)
. = ..()
if(.) // if mob is NOT dead
if(!degenerate && spider_myqueen)
diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm
index 5edcbe919c2..9133b8cc14c 100644
--- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm
+++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm
@@ -61,7 +61,7 @@
spider_growinstantly = 1
spider_spawnfrequency = 150
-/mob/living/simple_animal/hostile/poison/terror_spider/queen/Life()
+/mob/living/simple_animal/hostile/poison/terror_spider/queen/Life(seconds, times_fired)
. = ..()
if(.) // if mob is NOT dead
if(ckey && canlay < 12 && hasnested) // max 12 eggs worth stored at any one time, realistically that's tons.
diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm
index cd01006546c..ef456ddcb0e 100644
--- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm
+++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm
@@ -292,7 +292,7 @@ var/global/list/ts_spiderling_list = list()
handle_dying()
return ..()
-/mob/living/simple_animal/hostile/poison/terror_spider/Life()
+/mob/living/simple_animal/hostile/poison/terror_spider/Life(seconds, times_fired)
. = ..()
if(!.) // if mob is dead
if(prob(2))
diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm
index c206f1499d9..dba62b4744c 100644
--- a/code/modules/mob/living/simple_animal/parrot.dm
+++ b/code/modules/mob/living/simple_animal/parrot.dm
@@ -276,7 +276,7 @@
/*
* AI - Not really intelligent, but I'm calling it AI anyway.
*/
-/mob/living/simple_animal/parrot/Life()
+/mob/living/simple_animal/parrot/Life(seconds, times_fired)
..()
//Sprite and AI update for when a parrot gets pulled
diff --git a/code/modules/mob/living/simple_animal/posessed_object.dm b/code/modules/mob/living/simple_animal/posessed_object.dm
index 2e9d1b94bf2..9ba666ce96a 100644
--- a/code/modules/mob/living/simple_animal/posessed_object.dm
+++ b/code/modules/mob/living/simple_animal/posessed_object.dm
@@ -60,7 +60,7 @@
qdel(src)
-/mob/living/simple_animal/possessed_object/Life()
+/mob/living/simple_animal/possessed_object/Life(seconds, times_fired)
..()
if(!possessed_item) // If we're a donut and someone's eaten us, for instance.
diff --git a/code/modules/mob/living/simple_animal/tribbles.dm b/code/modules/mob/living/simple_animal/tribbles.dm
index 5a38929b88d..3e7f1722a41 100644
--- a/code/modules/mob/living/simple_animal/tribbles.dm
+++ b/code/modules/mob/living/simple_animal/tribbles.dm
@@ -68,7 +68,7 @@ var/global/totaltribbles = 0 //global variable so it updates for all tribbles,
gestation = 0
-/mob/living/simple_animal/tribble/Life()
+/mob/living/simple_animal/tribble/Life(seconds, times_fired)
..()
if(src.health > 0) //no mostly dead procreation
if(gestation != null) //neuter check
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index bb590e730f5..897f092a517 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -169,7 +169,7 @@
/mob/proc/movement_delay()
return 0
-/mob/proc/Life()
+/mob/proc/Life(seconds, times_fired)
// handle_typing_indicator()
return
diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm
index e3c625593c5..30841f94c69 100644
--- a/code/modules/paperwork/filingcabinet.dm
+++ b/code/modules/paperwork/filingcabinet.dm
@@ -30,7 +30,8 @@
icon_state = "tallcabinet"
-/obj/structure/filingcabinet/initialize()
+/obj/structure/filingcabinet/Initialize()
+ ..()
for(var/obj/item/I in loc)
if(istype(I, /obj/item/paper) || istype(I, /obj/item/folder) || istype(I, /obj/item/photo))
I.loc = src
diff --git a/code/modules/pda/cart.dm b/code/modules/pda/cart.dm
index c50ae0758f4..53c61f4e27f 100644
--- a/code/modules/pda/cart.dm
+++ b/code/modules/pda/cart.dm
@@ -14,15 +14,6 @@
var/list/programs = list()
var/list/messenger_plugins = list()
-/obj/item/cartridge/New()
- if(ticker && ticker.current_state >= GAME_STATE_SETTING_UP)
- initialize()
-
-/obj/item/cartridge/initialize()
- if(radio)
- radio.initialize()
- ..()
-
/obj/item/cartridge/Destroy()
QDEL_NULL(radio)
QDEL_LIST(programs)
@@ -68,7 +59,7 @@
new/datum/data/pda/app/crew_records/security,
new/datum/data/pda/app/secbot_control)
-/obj/item/cartridge/security/initialize()
+/obj/item/cartridge/security/Initialize()
radio = new /obj/item/integrated_radio/beepsky(src)
..()
@@ -118,7 +109,7 @@
desc = "A data cartridge with an integrated radio signaler module."
programs = list(new/datum/data/pda/app/signaller)
-/obj/item/cartridge/signal/initialize()
+/obj/item/cartridge/signal/Initialize()
radio = new /obj/item/integrated_radio/signal(src)
..()
@@ -141,7 +132,7 @@
new/datum/data/pda/app/supply,
new/datum/data/pda/app/mule_control)
-/obj/item/cartridge/quartermaster/initialize()
+/obj/item/cartridge/quartermaster/Initialize()
radio = new /obj/item/integrated_radio/mule(src)
..()
@@ -163,7 +154,7 @@
new/datum/data/pda/app/status_display)
-/obj/item/cartridge/hop/initialize()
+/obj/item/cartridge/hop/Initialize()
radio = new /obj/item/integrated_radio/mule(src)
..()
@@ -176,7 +167,7 @@
new/datum/data/pda/app/status_display)
-/obj/item/cartridge/hos/initialize()
+/obj/item/cartridge/hos/Initialize()
radio = new /obj/item/integrated_radio/beepsky(src)
..()
@@ -214,7 +205,7 @@
new/datum/data/pda/app/status_display)
-/obj/item/cartridge/rd/initialize()
+/obj/item/cartridge/rd/Initialize()
radio = new /obj/item/integrated_radio/signal(src)
..()
@@ -242,7 +233,7 @@
new/datum/data/pda/app/status_display)
-/obj/item/cartridge/captain/initialize()
+/obj/item/cartridge/captain/Initialize()
radio = new /obj/item/integrated_radio/beepsky(src)
..()
@@ -279,7 +270,7 @@
new/datum/data/pda/app/status_display)
-/obj/item/cartridge/centcom/initialize()
+/obj/item/cartridge/centcom/Initialize()
radio = new /obj/item/integrated_radio/beepsky(src)
..()
diff --git a/code/modules/pda/radio.dm b/code/modules/pda/radio.dm
index 3c89c291300..b9dfe8ff7e4 100644
--- a/code/modules/pda/radio.dm
+++ b/code/modules/pda/radio.dm
@@ -173,7 +173,7 @@
radio_connection = null
return ..()
-/obj/item/integrated_radio/signal/initialize()
+/obj/item/integrated_radio/signal/Initialize()
if(!radio_controller)
return
if(src.frequency < PUBLIC_LOW_FREQ || src.frequency > PUBLIC_HIGH_FREQ)
diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm
index c5b014576fc..7580621834f 100644
--- a/code/modules/power/cable.dm
+++ b/code/modules/power/cable.dm
@@ -72,19 +72,13 @@ By design, d1 is the smallest direction and d2 is the highest
var/turf/T = src.loc // hide if turf is not intact
if(level==1) hide(T.intact)
- cable_list += src //add it to the global cable list
-
- // Catches the interim-zone of worldstart and roundstart
- // I want both the ticker to exist (so mapped-in cables don't trip this)
- // but also not have started yet (since the zlevel system would handle this on its own otherwise)
- if((ticker && ticker.current_state < GAME_STATE_PLAYING))
- attempt_init()
+ LAZYADD(GLOB.cable_list, src) //add it to the global cable list
/obj/structure/cable/Destroy() // called when a cable is deleted
if(powernet)
cut_cable_from_powernet() // update the powernets
- cable_list -= src //remove it from global cable list
+ LAZYREMOVE(GLOB.cable_list, src) //remove it from global cable list
return ..() // then go ahead and delete the cable
///////////////////////////////////
@@ -462,7 +456,7 @@ obj/structure/cable/proc/cable_color(var/colorC)
powernet.remove_cable(src) //remove the cut cable from its powernet
// queue it to rebuild
- deferred_powernet_rebuilds += O
+ SSmachines.deferred_powernet_rebuilds += O
// Disconnect machines connected to nodes
if(d1 == 0) // if we cut a node (O-X) cable
diff --git a/code/modules/power/generator.dm b/code/modules/power/generator.dm
index 4def1c3b067..8c9ee3eda0d 100644
--- a/code/modules/power/generator.dm
+++ b/code/modules/power/generator.dm
@@ -35,7 +35,7 @@
if(powernet)
disconnect_from_network()
-/obj/machinery/power/generator/initialize()
+/obj/machinery/power/generator/Initialize()
..()
connect()
diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm
index ad73a6ff0ad..42f7cbde657 100644
--- a/code/modules/power/gravitygenerator.dm
+++ b/code/modules/power/gravitygenerator.dm
@@ -85,20 +85,12 @@ var/const/GRAV_NEEDS_WRENCH = 3
// Generator which spawns with the station.
//
-/obj/machinery/gravity_generator/main/station/initialize()
+/obj/machinery/gravity_generator/main/station/Initialize()
..()
setup_parts()
middle.overlays += "activated"
update_list()
-//
-// Generator an admin can spawn
-//
-
-/obj/machinery/gravity_generator/main/station/admin/New()
- ..()
- initialize()
-
//
// Main Generator with the main code
//
diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm
index 72e30b9d29a..2892d0245b2 100644
--- a/code/modules/power/port_gen.dm
+++ b/code/modules/power/port_gen.dm
@@ -112,7 +112,7 @@
var/temperature = 0 //The current temperature
var/overheating = 0 //if this gets high enough the generator explodes
-/obj/machinery/power/port_gen/pacman/initialize()
+/obj/machinery/power/port_gen/pacman/Initialize()
..()
if(anchored)
connect_to_network()
diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm
index fd5946b7dc4..15b47a47635 100644
--- a/code/modules/power/power.dm
+++ b/code/modules/power/power.dm
@@ -232,26 +232,6 @@
. += C
return .
-/hook/startup/proc/buildPowernets()
- return makepowernets()
-
-// rebuild all power networks from scratch - only called at world creation or by the admin verb
-/proc/makepowernets()
- for(var/datum/powernet/PN in powernets)
- qdel(PN)
- powernets.Cut()
-
- for(var/obj/structure/cable/PC in cable_list)
- makepowernet_for(PC)
-
- return 1
-
-/proc/makepowernet_for(var/obj/structure/cable/PC)
- if(!PC.powernet)
- var/datum/powernet/NewPN = new()
- NewPN.add_cable(PC)
- propagate_network(PC,PC.powernet)
-
//remove the old powernet and replace it with a new one throughout the network.
/proc/propagate_network(var/obj/O, var/datum/powernet/PN)
//log_world("propagating new network")
diff --git a/code/modules/power/powernet.dm b/code/modules/power/powernet.dm
index 416de55f6c3..a07d854380d 100644
--- a/code/modules/power/powernet.dm
+++ b/code/modules/power/powernet.dm
@@ -16,7 +16,7 @@
/datum/powernet/New()
- powernets += src
+ SSmachines.powernets += src
..()
/datum/powernet/Destroy()
@@ -28,7 +28,7 @@
nodes -= M
M.powernet = null
- powernets -= src
+ SSmachines.powernets -= src
return ..()
//Returns the amount of excess power (before refunding to SMESs) from last tick.
diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm
index 58cecbc8ecc..70cd75bf85d 100644
--- a/code/modules/power/singularity/emitter.dm
+++ b/code/modules/power/singularity/emitter.dm
@@ -76,12 +76,13 @@
return
rotate()
-/obj/machinery/power/emitter/initialize()
+/obj/machinery/power/emitter/Initialize()
..()
if(state == 2 && anchored)
connect_to_network()
if(frequency)
set_frequency(frequency)
+
/obj/machinery/power/emitter/multitool_menu(var/mob/user,var/obj/item/multitool/P)
return {"
diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm
index c55a206ebfa..a2025376e9d 100644
--- a/code/modules/power/solar.dm
+++ b/code/modules/power/solar.dm
@@ -300,7 +300,7 @@
track = 2 // Auto tracking mode
autostart = 1 // Automatically start
-/obj/machinery/power/solar_control/initialize()
+/obj/machinery/power/solar_control/Initialize()
..()
if(!powernet)
return
diff --git a/code/modules/power/treadmill.dm b/code/modules/power/treadmill.dm
index 5f8f8c1b8e4..762d442a2a9 100644
--- a/code/modules/power/treadmill.dm
+++ b/code/modules/power/treadmill.dm
@@ -18,7 +18,7 @@
var/list/mobs_running[0]
var/id = null // for linking to monitor
-/obj/machinery/power/treadmill/initialize()
+/obj/machinery/power/treadmill/Initialize()
..()
if(anchored)
connect_to_network()
@@ -137,7 +137,7 @@
var/frame = 0 // on 0, show labels, on 1 show numbers
var/redeem_immediately = 0 // redeem immediately for holding cell
-/obj/machinery/treadmill_monitor/initialize()
+/obj/machinery/treadmill_monitor/Initialize()
..()
if(id)
for(var/obj/machinery/power/treadmill/T in machines)
diff --git a/code/modules/power/turbine.dm b/code/modules/power/turbine.dm
index a385f51863e..641682490d4 100644
--- a/code/modules/power/turbine.dm
+++ b/code/modules/power/turbine.dm
@@ -82,7 +82,7 @@
inturf = get_step(src, dir)
-/obj/machinery/power/compressor/initialize()
+/obj/machinery/power/compressor/Initialize()
..()
locate_machinery()
if(!turbine)
@@ -202,7 +202,7 @@
outturf = get_step(src, dir)
-/obj/machinery/power/turbine/initialize()
+/obj/machinery/power/turbine/Initialize()
..()
locate_machinery()
if(!compressor)
@@ -341,7 +341,7 @@
-/obj/machinery/computer/turbine_computer/initialize()
+/obj/machinery/computer/turbine_computer/Initialize()
..()
spawn(10)
locate_machinery()
diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm
index 63f533d91ec..130fda822fd 100644
--- a/code/modules/projectiles/ammunition.dm
+++ b/code/modules/projectiles/ammunition.dm
@@ -29,7 +29,7 @@
/obj/item/ammo_casing/update_icon()
..()
icon_state = "[initial(icon_state)][BB ? "-live" : ""]"
- desc = "[initial(desc)][BB ? "" : " This one is spent"]"
+ desc = "[initial(desc)][BB ? "" : " This one is spent."]"
/obj/item/ammo_casing/proc/newshot(params) //For energy weapons, shotgun shells and wands (!).
if(!BB)
diff --git a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm
index 74a9b740c62..c7acc705150 100644
--- a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm
+++ b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm
@@ -214,19 +214,18 @@ datum/chemical_reaction/flash_powder
var/datum/effect_system/smoke_spread/chem/S = new
S.attach(location)
playsound(location, 'sound/effects/smoke.ogg', 50, 1, -3)
- spawn(0)
- if(S)
- S.set_up(holder, 10, 0, location)
- if(created_volume < 5)
- S.start(1)
- if(created_volume >=5 && created_volume < 10)
- S.start(2)
- if(created_volume >= 10 && created_volume < 15)
- S.start(3)
- if(created_volume >=15)
- S.start(4)
- if(holder && holder.my_atom)
- holder.clear_reagents()
+ if(S)
+ S.set_up(holder, 10, 0, location)
+ if(created_volume < 5)
+ S.start(1)
+ if(created_volume >=5 && created_volume < 10)
+ S.start(2)
+ if(created_volume >= 10 && created_volume < 15)
+ S.start(3)
+ if(created_volume >=15)
+ S.start(4)
+ if(holder && holder.my_atom)
+ holder.clear_reagents()
/datum/chemical_reaction/smoke/smoke_powder
name = "smoke_powder_smoke"
diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm
index 56bb7478327..3907ed052a6 100644
--- a/code/modules/recycling/disposal.dm
+++ b/code/modules/recycling/disposal.dm
@@ -51,7 +51,7 @@
trunk.linked = null
return ..()
-/obj/machinery/disposal/initialize()
+/obj/machinery/disposal/Initialize()
// this will get a copy of the air turf and take a SEND PRESSURE amount of air from it
..()
var/atom/L = loc
diff --git a/code/modules/research/designs/machine_designs.dm b/code/modules/research/designs/machine_designs.dm
index fb5ff5cabd5..57886d2972c 100644
--- a/code/modules/research/designs/machine_designs.dm
+++ b/code/modules/research/designs/machine_designs.dm
@@ -452,16 +452,6 @@
build_path = /obj/item/circuitboard/arcade/orion_trail
category = list("Misc. Machinery")
-/datum/design/programmable
- name = "Machine Board (Programmable Unloader)"
- desc = "The circuit board for a Programmable Unloader."
- id = "selunload"
- req_tech = list("engineering" = 1, "programming" = 2)
- build_type = IMPRINTER
- materials = list(MAT_GLASS = 1000)
- build_path = /obj/item/circuitboard/programmable
- category = list("Misc. Machinery")
-
/datum/design/pod
name = "Machine Board (Mass Driver and Pod Doors Control)"
desc = "Allows for the construction of circuit boards used to build a Mass Driver and Pod Doors Control."
diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm
index 50c8e1a4cf8..8d18df1ee07 100644
--- a/code/modules/research/rdconsole.dm
+++ b/code/modules/research/rdconsole.dm
@@ -149,10 +149,10 @@ won't update every console in existence) but it's more of a hassle to do. Also,
matching_designs = list()
if(!id)
for(var/obj/machinery/r_n_d/server/centcom/S in world)
- S.initialize()
+ S.initialize_serv()
break
-/obj/machinery/computer/rdconsole/initialize()
+/obj/machinery/computer/rdconsole/Initialize()
..()
SyncRDevices()
diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm
index 014b2f80e6b..a2f9f185853 100644
--- a/code/modules/research/server.dm
+++ b/code/modules/research/server.dm
@@ -23,7 +23,7 @@
component_parts += new /obj/item/stack/cable_coil(null,1)
component_parts += new /obj/item/stack/cable_coil(null,1)
RefreshParts()
- initialize(); //Agouri
+ initialize_serv(); //Agouri // fuck you agouri
/obj/machinery/r_n_d/server/upgraded/New()
..()
@@ -44,8 +44,7 @@
tot_rating += SP.rating
heat_gen /= max(1, tot_rating)
-/obj/machinery/r_n_d/server/initialize()
- ..()
+/obj/machinery/r_n_d/server/proc/initialize_serv()
if(!files) files = new /datum/research(src)
var/list/temp_list
if(!id_with_upload.len)
@@ -162,7 +161,7 @@
name = "CentComm. Central R&D Database"
server_id = -1
-/obj/machinery/r_n_d/server/centcom/initialize()
+/obj/machinery/r_n_d/server/centcom/Initialize()
..()
var/list/no_id_servers = list()
var/list/server_ids = list()
diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm
index cea1f502d91..09978047027 100644
--- a/code/modules/shuttle/emergency.dm
+++ b/code/modules/shuttle/emergency.dm
@@ -351,7 +351,7 @@
height = 4
var/target_area = /area/mine/dangerous/unexplored
-/obj/docking_port/stationary/random/initialize()
+/obj/docking_port/stationary/random/Initialize()
..()
var/list/turfs = get_area_turfs(target_area)
var/turf/T = pick(turfs)
diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm
index 6e712e74914..c8f36cfa37e 100644
--- a/code/modules/shuttle/shuttle.dm
+++ b/code/modules/shuttle/shuttle.dm
@@ -229,7 +229,7 @@
-/obj/docking_port/mobile/initialize()
+/obj/docking_port/mobile/Initialize()
if(!timid)
register()
..()
diff --git a/code/modules/space_management/space_level.dm b/code/modules/space_management/space_level.dm
index dc598ccab42..38ec849179a 100644
--- a/code/modules/space_management/space_level.dm
+++ b/code/modules/space_management/space_level.dm
@@ -152,7 +152,7 @@
if(istype(AM, /obj/effect/landmark/map_loader))
late_maps.Add(AM)
continue
- AM.initialize()
+ AM.Initialize(TRUE)
if(istype(AM, /obj/machinery/atmospherics))
pipes.Add(AM)
else if(istype(AM, /obj/structure/cable))
@@ -179,10 +179,7 @@
/datum/space_level/proc/do_cables(list/cables)
var/watch = start_watch()
log_debug("Building powernets on z-level '[zpos]'!")
- for(var/schmoo in cables)
- var/obj/structure/cable/C = schmoo
- if(C)
- makepowernet_for(C)
+ SSmachines.setup_template_powernets(cables)
cables.Cut()
log_debug("Took [stop_watch(watch)]s")
@@ -193,7 +190,7 @@
for(var/schmoo in late_maps)
var/obj/effect/landmark/map_loader/ML = schmoo
if(ML)
- ML.initialize()
+ ML.Initialize()
late_maps.Cut()
space_manager.remove_dirt(zpos)
log_debug("Took [stop_watch(watch)]s")
diff --git a/code/modules/station_goals/bsa.dm b/code/modules/station_goals/bsa.dm
index 0c0ab2b1259..57142365cc4 100644
--- a/code/modules/station_goals/bsa.dm
+++ b/code/modules/station_goals/bsa.dm
@@ -273,7 +273,7 @@
area_aim = TRUE
target_all_areas = TRUE
-/obj/machinery/computer/bsa_control/admin/initialize()
+/obj/machinery/computer/bsa_control/admin/Initialize()
..()
if(!cannon)
cannon = deploy()
diff --git a/code/modules/telesci/telesci_computer.dm b/code/modules/telesci/telesci_computer.dm
index 9336de72515..b7cf78e5ed2 100644
--- a/code/modules/telesci/telesci_computer.dm
+++ b/code/modules/telesci/telesci_computer.dm
@@ -46,7 +46,7 @@
..(user)
to_chat(user, "There are [crystals.len ? crystals.len : "no"] bluespace crystal\s in the crystal slots.")
-/obj/machinery/computer/telescience/initialize()
+/obj/machinery/computer/telescience/Initialize()
..()
for(var/i = 1; i <= starting_crystals; i++)
crystals += new /obj/item/ore/bluespace_crystal/artificial(null) // starting crystals
diff --git a/html/changelog.html b/html/changelog.html
index 7f3af71489e..3857178b750 100644
--- a/html/changelog.html
+++ b/html/changelog.html
@@ -56,6 +56,49 @@
-->
+
07 May 2018
+
qwertyquerty updated:
+
+ - The window title is custom now!
+
+
+
06 May 2018
+
Kyep updated:
+
+ - DeathSquad is now better equipped, and prompts eligible ghosts with a "Do you want to play as DeathSquad?" when called.
+ - DeathSquad members (except team leaders) can now choose to spawn as either an organic DS member, or a DS borg.
+
+
+
05 May 2018
+
Tayyyyyyy updated:
+
+ - ERT members will have their proper name and appearance when cloned
+
+
+
04 May 2018
+
RyanSmake updated:
+
+ - You will now log in to the proper account you input to the ATM instead of the one associated with you.
+ - Now ATMs will reconnect after a power outage.
+
+
+
02 May 2018
+
CrazyLemon and Fox McCloud updated:
+
+
+
01 May 2018
+
Alffd updated:
+
+ - Tell clients to rejoin after shutdown, before killing the server.
+
+
Fox McCloud updated:
+
+ - Removed programmable unloader circuit
+ - Bomb testing range can now be utilized multiple times without worry of the bomb bouncing off and returning back to you
+
+
30 April 2018
Fox McCloud updated:
diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml
index c1ed06b54a7..4af2bbd98ef 100644
--- a/html/changelogs/.all_changelog.yml
+++ b/html/changelogs/.all_changelog.yml
@@ -6365,3 +6365,30 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py.
- tweak: Medbay treatment center now has a wider entrance
- tweak: Virology hallway is now publically accessible from Surgery waiting room,
entrance is now double-doors.
+2018-05-01:
+ Alffd:
+ - bugfix: Tell clients to rejoin after shutdown, before killing the server.
+ Fox McCloud:
+ - rscdel: Removed programmable unloader circuit
+ - bugfix: Bomb testing range can now be utilized multiple times without worry of
+ the bomb bouncing off and returning back to you
+2018-05-02:
+ CrazyLemon and Fox McCloud:
+ - bugfix: Fixes reagent smoke
+2018-05-04:
+ RyanSmake:
+ - bugfix: You will now log in to the proper account you input to the ATM instead
+ of the one associated with you.
+ - bugfix: Now ATMs will reconnect after a power outage.
+2018-05-05:
+ Tayyyyyyy:
+ - bugfix: ERT members will have their proper name and appearance when cloned
+2018-05-06:
+ Kyep:
+ - tweak: DeathSquad is now better equipped, and prompts eligible ghosts with a "Do
+ you want to play as DeathSquad?" when called.
+ - rscadd: DeathSquad members (except team leaders) can now choose to spawn as either
+ an organic DS member, or a DS borg.
+2018-05-07:
+ qwertyquerty:
+ - rscadd: The window title is custom now!
diff --git a/icons/mob/head.dmi b/icons/mob/head.dmi
index 16eeff1107f..49679ae2256 100644
Binary files a/icons/mob/head.dmi and b/icons/mob/head.dmi differ
diff --git a/icons/obj/custom_items.dmi b/icons/obj/custom_items.dmi
index 8c3b77c337d..d11043875fc 100644
Binary files a/icons/obj/custom_items.dmi and b/icons/obj/custom_items.dmi differ
diff --git a/interface/skin.dmf b/interface/skin.dmf
index 54ed0c40d6a..813abc66b98 100644
--- a/interface/skin.dmf
+++ b/interface/skin.dmf
@@ -1499,7 +1499,7 @@ window "mainwindow"
size = 640x440
is-default = true
is-maximized = true
- title = "Space Station 13"
+ title = "Paradise Station 13"
icon = 'icons\\ss13_64.png'
menu = "menu"
macro = "macro"
diff --git a/paradise.dme b/paradise.dme
index 38af7194f75..a1d7df60b95 100644
--- a/paradise.dme
+++ b/paradise.dme
@@ -192,8 +192,6 @@
#include "code\controllers\Processes\event.dm"
#include "code\controllers\Processes\fast_process.dm"
#include "code\controllers\Processes\lighting.dm"
-#include "code\controllers\Processes\machinery.dm"
-#include "code\controllers\Processes\mob.dm"
#include "code\controllers\Processes\nano_mob_hunter.dm"
#include "code\controllers\Processes\npcai.dm"
#include "code\controllers\Processes\npcpool.dm"
@@ -204,21 +202,24 @@
#include "code\controllers\ProcessScheduler\core\process.dm"
#include "code\controllers\ProcessScheduler\core\processScheduler.dm"
#include "code\controllers\subsystem\air.dm"
+#include "code\controllers\subsystem\atoms.dm"
#include "code\controllers\subsystem\fires.dm"
#include "code\controllers\subsystem\garbage.dm"
+#include "code\controllers\subsystem\machinery.dm"
+#include "code\controllers\subsystem\mobs.dm"
#include "code\controllers\subsystem\nanoui.dm"
#include "code\controllers\subsystem\nightshift.dm"
#include "code\controllers\subsystem\spacedrift.dm"
#include "code\controllers\subsystem\sun.dm"
#include "code\controllers\subsystem\throwing.dm"
#include "code\controllers\subsystem\timer.dm"
+#include "code\controllers\subsystem\processing\processing.dm"
#include "code\datums\action.dm"
#include "code\datums\ai_law_sets.dm"
#include "code\datums\ai_laws.dm"
#include "code\datums\beam.dm"
#include "code\datums\browser.dm"
#include "code\datums\callback.dm"
-#include "code\datums\cargoprofile.dm"
#include "code\datums\computerfiles.dm"
#include "code\datums\datacore.dm"
#include "code\datums\datum.dm"
@@ -582,7 +583,6 @@
#include "code\game\machinery\poolcontroller.dm"
#include "code\game\machinery\portable_tag_turret.dm"
#include "code\game\machinery\portable_turret.dm"
-#include "code\game\machinery\programmable_unloader.dm"
#include "code\game\machinery\quantum_pad.dm"
#include "code\game\machinery\recharger.dm"
#include "code\game\machinery\rechargestation.dm"
@@ -883,7 +883,6 @@
#include "code\game\objects\items\weapons\stock_parts.dm"
#include "code\game\objects\items\weapons\stunbaton.dm"
#include "code\game\objects\items\weapons\swords_axes_etc.dm"
-#include "code\game\objects\items\weapons\syndie_uplink.dm"
#include "code\game\objects\items\weapons\tape.dm"
#include "code\game\objects\items\weapons\teleportation.dm"
#include "code\game\objects\items\weapons\teleprod.dm"
@@ -892,7 +891,6 @@
#include "code\game\objects\items\weapons\vending_items.dm"
#include "code\game\objects\items\weapons\weaponry.dm"
#include "code\game\objects\items\weapons\whetstone.dm"
-#include "code\game\objects\items\weapons\wires.dm"
#include "code\game\objects\items\weapons\grenades\atmosgrenade.dm"
#include "code\game\objects\items\weapons\grenades\bananade.dm"
#include "code\game\objects\items\weapons\grenades\chem_grenade.dm"