diff --git a/baystation12.dme b/baystation12.dme
index 75e3fabb6c..2584fc6002 100644
--- a/baystation12.dme
+++ b/baystation12.dme
@@ -16,7 +16,7 @@
#include "code\setup.dm"
#include "code\stylesheet.dm"
#include "code\world.dm"
-#include "code\__HELPERS\atom_pool.dm"
+#include "code\__HELPERS\datum_pool.dm"
#include "code\__HELPERS\files.dm"
#include "code\__HELPERS\game.dm"
#include "code\__HELPERS\global_lists.dm"
@@ -85,15 +85,12 @@
#include "code\ATMOSPHERICS\components\unary\unary_base.dm"
#include "code\ATMOSPHERICS\components\unary\vent_pump.dm"
#include "code\ATMOSPHERICS\components\unary\vent_scrubber.dm"
-#include "code\controllers\_DynamicAreaLighting_TG.dm"
#include "code\controllers\autotransfer.dm"
#include "code\controllers\communications.dm"
#include "code\controllers\configuration.dm"
#include "code\controllers\emergency_shuttle_controller.dm"
-#include "code\controllers\failsafe.dm"
#include "code\controllers\hooks-defs.dm"
#include "code\controllers\hooks.dm"
-#include "code\controllers\lighting_controller.dm"
#include "code\controllers\master_controller.dm"
#include "code\controllers\shuttle_controller.dm"
#include "code\controllers\subsystems.dm"
@@ -106,7 +103,6 @@
#include "code\controllers\Processes\event.dm"
#include "code\controllers\Processes\garbage.dm"
#include "code\controllers\Processes\inactivity.dm"
-#include "code\controllers\Processes\lighting.dm"
#include "code\controllers\Processes\machinery.dm"
#include "code\controllers\Processes\mob.dm"
#include "code\controllers\Processes\nanoui.dm"
@@ -328,6 +324,7 @@
#include "code\game\machinery\bioprinter.dm"
#include "code\game\machinery\bluespacerelay.dm"
#include "code\game\machinery\buttons.dm"
+#include "code\game\machinery\CableLayer.dm"
#include "code\game\machinery\cell_charger.dm"
#include "code\game\machinery\cloning.dm"
#include "code\game\machinery\constructable_frame.dm"
@@ -338,6 +335,7 @@
#include "code\game\machinery\doppler_array.dm"
#include "code\game\machinery\flasher.dm"
#include "code\game\machinery\floodlight.dm"
+#include "code\game\machinery\floorlayer.dm"
#include "code\game\machinery\hologram.dm"
#include "code\game\machinery\holosign.dm"
#include "code\game\machinery\igniter.dm"
@@ -379,12 +377,7 @@
#include "code\game\machinery\atmoalter\pump.dm"
#include "code\game\machinery\atmoalter\scrubber.dm"
#include "code\game\machinery\bots\bots.dm"
-#include "code\game\machinery\bots\cleanbot.dm"
-#include "code\game\machinery\bots\ed209bot.dm"
-#include "code\game\machinery\bots\floorbot.dm"
-#include "code\game\machinery\bots\medbot.dm"
#include "code\game\machinery\bots\mulebot.dm"
-#include "code\game\machinery\bots\secbot.dm"
#include "code\game\machinery\camera\camera.dm"
#include "code\game\machinery\camera\camera_assembly.dm"
#include "code\game\machinery\camera\motion.dm"
@@ -476,6 +469,7 @@
#include "code\game\machinery\kitchen\smartfridge.dm"
#include "code\game\machinery\pipe\construction.dm"
#include "code\game\machinery\pipe\pipe_dispenser.dm"
+#include "code\game\machinery\pipe\pipelayer.dm"
#include "code\game\machinery\telecomms\broadcaster.dm"
#include "code\game\machinery\telecomms\logbrowser.dm"
#include "code\game\machinery\telecomms\machine_interactions.dm"
@@ -551,6 +545,7 @@
#include "code\game\objects\items\bodybag.dm"
#include "code\game\objects\items\contraband.dm"
#include "code\game\objects\items\crayons.dm"
+#include "code\game\objects\items\glassjar.dm"
#include "code\game\objects\items\latexballoon.dm"
#include "code\game\objects\items\shooting_range.dm"
#include "code\game\objects\items\toys.dm"
@@ -816,6 +811,7 @@
#include "code\modules\admin\verbs\deadsay.dm"
#include "code\modules\admin\verbs\debug.dm"
#include "code\modules\admin\verbs\diagnostics.dm"
+#include "code\modules\admin\verbs\dice.dm"
#include "code\modules\admin\verbs\getlogs.dm"
#include "code\modules\admin\verbs\icarus.dm"
#include "code\modules\admin\verbs\mapping.dm"
@@ -953,8 +949,10 @@
#include "code\modules\economy\Events.dm"
#include "code\modules\economy\Events_Mundane.dm"
#include "code\modules\economy\TradeDestinations.dm"
+#include "code\modules\events\apc_damage.dm"
#include "code\modules\events\blob.dm"
#include "code\modules\events\brand_intelligence.dm"
+#include "code\modules\events\camera_damage.dm"
#include "code\modules\events\carp_migration.dm"
#include "code\modules\events\comms_blackout.dm"
#include "code\modules\events\communications_blackout.dm"
@@ -988,6 +986,7 @@
#include "code\modules\examine\descriptions\engineering.dm"
#include "code\modules\examine\descriptions\medical.dm"
#include "code\modules\examine\descriptions\mobs.dm"
+#include "code\modules\examine\descriptions\paperwork.dm"
#include "code\modules\examine\descriptions\stacks.dm"
#include "code\modules\examine\descriptions\structures.dm"
#include "code\modules\examine\descriptions\turfs.dm"
@@ -1002,6 +1001,7 @@
#include "code\modules\genetics\side_effects.dm"
#include "code\modules\holodeck\HolodeckControl.dm"
#include "code\modules\holodeck\HolodeckObjects.dm"
+#include "code\modules\holodeck\HolodeckPrograms.dm"
#include "code\modules\hydroponics\_hydro_setup.dm"
#include "code\modules\hydroponics\grown.dm"
#include "code\modules\hydroponics\grown_inedible.dm"
@@ -1026,6 +1026,14 @@
#include "code\modules\library\lib_items.dm"
#include "code\modules\library\lib_machines.dm"
#include "code\modules\library\lib_readme.dm"
+#include "code\modules\lighting\_lighting_defs.dm"
+#include "code\modules\lighting\light_source.dm"
+#include "code\modules\lighting\lighting_atom.dm"
+#include "code\modules\lighting\lighting_overlay.dm"
+#include "code\modules\lighting\lighting_process.dm"
+#include "code\modules\lighting\lighting_system.dm"
+#include "code\modules\lighting\lighting_turf.dm"
+#include "code\modules\lighting\~lighting_undefs.dm"
#include "code\modules\liquid\splash_simulation.dm"
#include "code\modules\maps\dmm_suite.dm"
#include "code\modules\maps\reader.dm"
@@ -1101,11 +1109,19 @@
#include "code\modules\mob\living\logout.dm"
#include "code\modules\mob\living\say.dm"
#include "code\modules\mob\living\blob\blob.dm"
+#include "code\modules\mob\living\bot\bot.dm"
+#include "code\modules\mob\living\bot\cleanbot.dm"
+#include "code\modules\mob\living\bot\ed209bot.dm"
+#include "code\modules\mob\living\bot\farmbot.dm"
+#include "code\modules\mob\living\bot\floorbot.dm"
+#include "code\modules\mob\living\bot\medbot.dm"
+#include "code\modules\mob\living\bot\secbot.dm"
#include "code\modules\mob\living\carbon\breathe.dm"
#include "code\modules\mob\living\carbon\carbon.dm"
#include "code\modules\mob\living\carbon\carbon_defines.dm"
#include "code\modules\mob\living\carbon\carbon_powers.dm"
#include "code\modules\mob\living\carbon\give.dm"
+#include "code\modules\mob\living\carbon\resist.dm"
#include "code\modules\mob\living\carbon\shock.dm"
#include "code\modules\mob\living\carbon\viruses.dm"
#include "code\modules\mob\living\carbon\alien\alien.dm"
@@ -1201,7 +1217,6 @@
#include "code\modules\mob\living\silicon\ai\login.dm"
#include "code\modules\mob\living\silicon\ai\logout.dm"
#include "code\modules\mob\living\silicon\ai\say.dm"
-#include "code\modules\mob\living\silicon\ai\subsystems.dm"
#include "code\modules\mob\living\silicon\decoy\death.dm"
#include "code\modules\mob\living\silicon\decoy\decoy.dm"
#include "code\modules\mob\living\silicon\decoy\life.dm"
@@ -1293,8 +1308,11 @@
#include "code\modules\nano\interaction\contained.dm"
#include "code\modules\nano\interaction\default.dm"
#include "code\modules\nano\interaction\inventory.dm"
+#include "code\modules\nano\interaction\physical.dm"
+#include "code\modules\nano\interaction\self.dm"
#include "code\modules\nano\interaction\zlevel.dm"
#include "code\modules\nano\modules\alarm_monitor.dm"
+#include "code\modules\nano\modules\atmos_control.dm"
#include "code\modules\nano\modules\crew_monitor.dm"
#include "code\modules\nano\modules\human_appearance.dm"
#include "code\modules\nano\modules\law_manager.dm"
@@ -1432,11 +1450,16 @@
#include "code\modules\reagents\Chemistry-Holder.dm"
#include "code\modules\reagents\Chemistry-Machinery.dm"
#include "code\modules\reagents\Chemistry-Readme.dm"
-#include "code\modules\reagents\Chemistry-Reagents-Antidepressants.dm"
#include "code\modules\reagents\Chemistry-Reagents.dm"
#include "code\modules\reagents\Chemistry-Recipes.dm"
#include "code\modules\reagents\reagent_containers.dm"
#include "code\modules\reagents\reagent_dispenser.dm"
+#include "code\modules\reagents\Chemistry-Reagents\Chemistry-Reagents-Core.dm"
+#include "code\modules\reagents\Chemistry-Reagents\Chemistry-Reagents-Dispenser.dm"
+#include "code\modules\reagents\Chemistry-Reagents\Chemistry-Reagents-Food-Drinks.dm"
+#include "code\modules\reagents\Chemistry-Reagents\Chemistry-Reagents-Medicine.dm"
+#include "code\modules\reagents\Chemistry-Reagents\Chemistry-Reagents-Other.dm"
+#include "code\modules\reagents\Chemistry-Reagents\Chemistry-Reagents-Toxins.dm"
#include "code\modules\reagents\dispenser\_defines.dm"
#include "code\modules\reagents\dispenser\cartridge.dm"
#include "code\modules\reagents\dispenser\cartridge_presets.dm"
diff --git a/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm b/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm
index 7d57ea6c8f..37985034b1 100644
--- a/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm
@@ -44,15 +44,15 @@ obj/machinery/atmospherics/binary
return null
- Del()
+ Destroy()
loc = null
if(node1)
node1.disconnect(src)
- del(network1)
+ qdel(network1)
if(node2)
node2.disconnect(src)
- del(network2)
+ qdel(network2)
node1 = null
node2 = null
@@ -123,11 +123,11 @@ obj/machinery/atmospherics/binary
disconnect(obj/machinery/atmospherics/reference)
if(reference==node1)
- del(network1)
+ qdel(network1)
node1 = null
else if(reference==node2)
- del(network2)
+ qdel(network2)
node2 = null
update_icon()
diff --git a/code/ATMOSPHERICS/components/binary_devices/circulator.dm b/code/ATMOSPHERICS/components/binary_devices/circulator.dm
index a4b720302b..6627d15d73 100644
--- a/code/ATMOSPHERICS/components/binary_devices/circulator.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/circulator.dm
@@ -112,10 +112,10 @@
else
if(node1)
node1.disconnect(src)
- del(network1)
+ qdel(network1)
if(node2)
node2.disconnect(src)
- del(network2)
+ qdel(network2)
node1 = null
node2 = null
diff --git a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
index b0ef990145..7604f33063 100644
--- a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
@@ -258,4 +258,4 @@
"\blue You have unfastened \the [src].", \
"You hear ratchet.")
new /obj/item/pipe(loc, make_from=src)
- del(src)
+ qdel(src)
diff --git a/code/ATMOSPHERICS/components/binary_devices/pipeturbine.dm b/code/ATMOSPHERICS/components/binary_devices/pipeturbine.dm
index 6923b6d31e..aead60a382 100644
--- a/code/ATMOSPHERICS/components/binary_devices/pipeturbine.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/pipeturbine.dm
@@ -38,15 +38,15 @@
if(WEST)
initialize_directions = NORTH|SOUTH
- Del()
+ Destroy()
loc = null
if(node1)
node1.disconnect(src)
- del(network1)
+ qdel(network1)
if(node2)
node2.disconnect(src)
- del(network2)
+ qdel(network2)
node1 = null
node2 = null
@@ -110,10 +110,10 @@
else
if(node1)
node1.disconnect(src)
- del(network1)
+ qdel(network1)
if(node2)
node2.disconnect(src)
- del(network2)
+ qdel(network2)
node1 = null
node2 = null
@@ -216,11 +216,11 @@
disconnect(obj/machinery/atmospherics/reference)
if(reference==node1)
- del(network1)
+ qdel(network1)
node1 = null
else if(reference==node2)
- del(network2)
+ qdel(network2)
node2 = null
return null
diff --git a/code/ATMOSPHERICS/components/binary_devices/pump.dm b/code/ATMOSPHERICS/components/binary_devices/pump.dm
index 87eaf9250d..079dfb76cd 100644
--- a/code/ATMOSPHERICS/components/binary_devices/pump.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/pump.dm
@@ -235,4 +235,4 @@ Thus, the two variables affect pump operation are set in New():
"\blue You have unfastened \the [src].", \
"You hear ratchet.")
new /obj/item/pipe(loc, make_from=src)
- del(src)
+ qdel(src)
diff --git a/code/ATMOSPHERICS/components/omni_devices/filter.dm b/code/ATMOSPHERICS/components/omni_devices/filter.dm
index 3478f0f142..b2966ef431 100644
--- a/code/ATMOSPHERICS/components/omni_devices/filter.dm
+++ b/code/ATMOSPHERICS/components/omni_devices/filter.dm
@@ -24,7 +24,7 @@
for(var/datum/omni_port/P in ports)
P.air.volume = ATMOS_DEFAULT_VOLUME_FILTER
-/obj/machinery/atmospherics/omni/filter/Del()
+/obj/machinery/atmospherics/omni/filter/Destroy()
input = null
output = null
filters.Cut()
diff --git a/code/ATMOSPHERICS/components/omni_devices/mixer.dm b/code/ATMOSPHERICS/components/omni_devices/mixer.dm
index 970a33feee..f52269ee60 100644
--- a/code/ATMOSPHERICS/components/omni_devices/mixer.dm
+++ b/code/ATMOSPHERICS/components/omni_devices/mixer.dm
@@ -49,7 +49,7 @@
for(var/datum/omni_port/P in ports)
P.air.volume = ATMOS_DEFAULT_VOLUME_MIXER
-/obj/machinery/atmospherics/omni/mixer/Del()
+/obj/machinery/atmospherics/omni/mixer/Destroy()
inputs.Cut()
output = null
..()
diff --git a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm
index 3d259ad941..52ab44fa74 100644
--- a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm
+++ b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm
@@ -98,7 +98,7 @@
"\blue You have unfastened \the [src].", \
"You hear a ratchet.")
new /obj/item/pipe(loc, make_from=src)
- del(src)
+ qdel(src)
/obj/machinery/atmospherics/omni/attack_hand(user as mob)
if(..())
@@ -231,13 +231,13 @@
return null
-/obj/machinery/atmospherics/omni/Del()
+/obj/machinery/atmospherics/omni/Destroy()
loc = null
for(var/datum/omni_port/P in ports)
if(P.node)
P.node.disconnect(src)
- del(P.network)
+ qdel(P.network)
P.node = null
..()
@@ -292,7 +292,7 @@
/obj/machinery/atmospherics/omni/disconnect(obj/machinery/atmospherics/reference)
for(var/datum/omni_port/P in ports)
if(reference == P.node)
- del(P.network)
+ qdel(P.network)
P.node = null
P.update = 1
break
diff --git a/code/ATMOSPHERICS/components/portables_connector.dm b/code/ATMOSPHERICS/components/portables_connector.dm
index 315de2ce7c..c33ff79967 100644
--- a/code/ATMOSPHERICS/components/portables_connector.dm
+++ b/code/ATMOSPHERICS/components/portables_connector.dm
@@ -60,7 +60,7 @@
return null
-/obj/machinery/atmospherics/portables_connector/Del()
+/obj/machinery/atmospherics/portables_connector/Destroy()
loc = null
if(connected_device)
@@ -68,7 +68,7 @@
if(node)
node.disconnect(src)
- del(network)
+ qdel(network)
node = null
@@ -122,7 +122,7 @@
/obj/machinery/atmospherics/portables_connector/disconnect(obj/machinery/atmospherics/reference)
if(reference==node)
- del(network)
+ qdel(network)
node = null
update_underlays()
@@ -152,4 +152,4 @@
"\blue You have unfastened \the [src].", \
"You hear ratchet.")
new /obj/item/pipe(loc, make_from=src)
- del(src)
+ qdel(src)
diff --git a/code/ATMOSPHERICS/components/trinary_devices/filter.dm b/code/ATMOSPHERICS/components/trinary_devices/filter.dm
index 7a5fca0fa7..0921d1d0aa 100755
--- a/code/ATMOSPHERICS/components/trinary_devices/filter.dm
+++ b/code/ATMOSPHERICS/components/trinary_devices/filter.dm
@@ -54,9 +54,6 @@
air2.volume = ATMOS_DEFAULT_VOLUME_FILTER
air3.volume = ATMOS_DEFAULT_VOLUME_FILTER
- if(radio_controller)
- initialize()
-
/obj/machinery/atmospherics/trinary/filter/update_icon()
if(istype(src, /obj/machinery/atmospherics/trinary/filter/m_filter))
icon_state = "m"
@@ -148,7 +145,7 @@
"\blue You have unfastened \the [src].", \
"You hear ratchet.")
new /obj/item/pipe(loc, make_from=src)
- del(src)
+ qdel(src)
/obj/machinery/atmospherics/trinary/filter/attack_hand(user as mob) // -- TLE
diff --git a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm
index c6f5b17613..a200de25a0 100644
--- a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm
+++ b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm
@@ -120,7 +120,7 @@
"\blue You have unfastened \the [src].", \
"You hear ratchet.")
new /obj/item/pipe(loc, make_from=src)
- del(src)
+ qdel(src)
/obj/machinery/atmospherics/trinary/mixer/attack_hand(user as mob)
if(..())
diff --git a/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm b/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm
index ff46b9b55f..3f5d66f262 100644
--- a/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm
+++ b/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm
@@ -52,18 +52,18 @@ obj/machinery/atmospherics/trinary
return null
- Del()
+ Destroy()
loc = null
if(node1)
node1.disconnect(src)
- del(network1)
+ qdel(network1)
if(node2)
node2.disconnect(src)
- del(network2)
+ qdel(network2)
if(node3)
node3.disconnect(src)
- del(network3)
+ qdel(network3)
node1 = null
node2 = null
@@ -153,15 +153,15 @@ obj/machinery/atmospherics/trinary
disconnect(obj/machinery/atmospherics/reference)
if(reference==node1)
- del(network1)
+ qdel(network1)
node1 = null
else if(reference==node2)
- del(network2)
+ qdel(network2)
node2 = null
else if(reference==node3)
- del(network3)
+ qdel(network3)
node3 = null
update_underlays()
diff --git a/code/ATMOSPHERICS/components/tvalve.dm b/code/ATMOSPHERICS/components/tvalve.dm
index 68a1036a78..42556232bd 100644
--- a/code/ATMOSPHERICS/components/tvalve.dm
+++ b/code/ATMOSPHERICS/components/tvalve.dm
@@ -101,18 +101,18 @@
return null
-/obj/machinery/atmospherics/tvalve/Del()
+/obj/machinery/atmospherics/tvalve/Destroy()
loc = null
if(node1)
node1.disconnect(src)
- del(network_node1)
+ qdel(network_node1)
if(node2)
node2.disconnect(src)
- del(network_node2)
+ qdel(network_node2)
if(node3)
node3.disconnect(src)
- del(network_node3)
+ qdel(network_node3)
node1 = null
node2 = null
@@ -128,9 +128,9 @@
update_icon()
if(network_node1)
- del(network_node1)
+ qdel(network_node1)
if(network_node3)
- del(network_node3)
+ qdel(network_node3)
build_network()
if(network_node1&&network_node2)
@@ -153,9 +153,9 @@
update_icon()
if(network_node1)
- del(network_node1)
+ qdel(network_node1)
if(network_node2)
- del(network_node2)
+ qdel(network_node2)
build_network()
if(network_node1&&network_node3)
@@ -262,15 +262,15 @@
/obj/machinery/atmospherics/tvalve/disconnect(obj/machinery/atmospherics/reference)
if(reference==node1)
- del(network_node1)
+ qdel(network_node1)
node1 = null
else if(reference==node2)
- del(network_node2)
+ qdel(network_node2)
node2 = null
else if(reference==node3)
- del(network_node3)
+ qdel(network_node3)
node2 = null
update_underlays()
@@ -366,7 +366,7 @@
"\blue You have unfastened \the [src].", \
"You hear ratchet.")
new /obj/item/pipe(loc, make_from=src)
- del(src)
+ qdel(src)
/obj/machinery/atmospherics/tvalve/mirrored
icon_state = "map_tvalvem0"
diff --git a/code/ATMOSPHERICS/components/unary/heat_exchanger.dm b/code/ATMOSPHERICS/components/unary/heat_exchanger.dm
index 7d03ad9883..0e75146adc 100644
--- a/code/ATMOSPHERICS/components/unary/heat_exchanger.dm
+++ b/code/ATMOSPHERICS/components/unary/heat_exchanger.dm
@@ -86,4 +86,4 @@
"\blue You have unfastened \the [src].", \
"You hear ratchet.")
new /obj/item/pipe(loc, make_from=src)
- del(src)
\ No newline at end of file
+ qdel(src)
\ No newline at end of file
diff --git a/code/ATMOSPHERICS/components/unary/unary_base.dm b/code/ATMOSPHERICS/components/unary/unary_base.dm
index 6635631f2d..eea2dba1ab 100644
--- a/code/ATMOSPHERICS/components/unary/unary_base.dm
+++ b/code/ATMOSPHERICS/components/unary/unary_base.dm
@@ -28,12 +28,12 @@
return null
- Del()
+ Destroy()
loc = null
if(node)
node.disconnect(src)
- del(network)
+ qdel(network)
node = null
@@ -84,7 +84,7 @@
disconnect(obj/machinery/atmospherics/reference)
if(reference==node)
- del(network)
+ qdel(network)
node = null
update_icon()
diff --git a/code/ATMOSPHERICS/components/unary/vent_pump.dm b/code/ATMOSPHERICS/components/unary/vent_pump.dm
index 0f0d7095fa..e8494697dc 100644
--- a/code/ATMOSPHERICS/components/unary/vent_pump.dm
+++ b/code/ATMOSPHERICS/components/unary/vent_pump.dm
@@ -67,15 +67,10 @@
icon = null
initial_loc = get_area(loc)
- if (initial_loc.master)
- initial_loc = initial_loc.master
area_uid = initial_loc.uid
if (!id_tag)
assign_uid()
id_tag = num2text(uid)
- if(ticker && ticker.current_state == 3)//if the game is running
- src.initialize()
- src.broadcast_status()
/obj/machinery/atmospherics/unary/vent_pump/high_volume
name = "Large Air Vent"
@@ -259,11 +254,12 @@
/obj/machinery/atmospherics/unary/vent_pump/initialize()
..()
- //some vents work his own spesial way
+ //some vents work his own special way
radio_filter_in = frequency==1439?(RADIO_FROM_AIRALARM):null
radio_filter_out = frequency==1439?(RADIO_TO_AIRALARM):null
if(frequency)
set_frequency(frequency)
+ src.broadcast_status()
/obj/machinery/atmospherics/unary/vent_pump/receive_signal(datum/signal/signal)
if(stat & (NOPOWER|BROKEN))
@@ -414,9 +410,9 @@
"\blue You have unfastened \the [src].", \
"You hear ratchet.")
new /obj/item/pipe(loc, make_from=src)
- del(src)
+ qdel(src)
-/obj/machinery/atmospherics/unary/vent_pump/Del()
+/obj/machinery/atmospherics/unary/vent_pump/Destroy()
if(initial_loc)
initial_loc.air_vent_info -= id_tag
initial_loc.air_vent_names -= id_tag
diff --git a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
index 63a0549acc..d09328d767 100644
--- a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
+++ b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
@@ -36,15 +36,10 @@
icon = null
initial_loc = get_area(loc)
- if (initial_loc.master)
- initial_loc = initial_loc.master
area_uid = initial_loc.uid
if (!id_tag)
assign_uid()
id_tag = num2text(uid)
- if(ticker && ticker.current_state == 3)//if the game is running
- src.initialize()
- src.broadcast_status()
/obj/machinery/atmospherics/unary/vent_scrubber/update_icon(var/safety = 0)
if(!check_icon_cache())
@@ -121,6 +116,7 @@
radio_filter_out = frequency==initial(frequency)?(RADIO_TO_AIRALARM):null
if (frequency)
set_frequency(frequency)
+ src.broadcast_status()
/obj/machinery/atmospherics/unary/vent_scrubber/process()
..()
@@ -270,7 +266,7 @@
"\blue You have unfastened \the [src].", \
"You hear ratchet.")
new /obj/item/pipe(loc, make_from=src)
- del(src)
+ qdel(src)
/obj/machinery/atmospherics/unary/vent_scrubber/examine(mob/user)
if(..(user, 1))
@@ -278,7 +274,7 @@
else
user << "You are too far away to read the gauge."
-/obj/machinery/atmospherics/unary/vent_scrubber/Del()
+/obj/machinery/atmospherics/unary/vent_scrubber/Destroy()
if(initial_loc)
initial_loc.air_scrub_info -= id_tag
initial_loc.air_scrub_names -= id_tag
diff --git a/code/ATMOSPHERICS/components/valve.dm b/code/ATMOSPHERICS/components/valve.dm
index 9cc6f7451c..49ae4af2cf 100644
--- a/code/ATMOSPHERICS/components/valve.dm
+++ b/code/ATMOSPHERICS/components/valve.dm
@@ -73,15 +73,15 @@
return null
-/obj/machinery/atmospherics/valve/Del()
+/obj/machinery/atmospherics/valve/Destroy()
loc = null
if(node1)
node1.disconnect(src)
- del(network_node1)
+ qdel(network_node1)
if(node2)
node2.disconnect(src)
- del(network_node2)
+ qdel(network_node2)
node1 = null
node2 = null
@@ -113,9 +113,9 @@
update_icon()
if(network_node1)
- del(network_node1)
+ qdel(network_node1)
if(network_node2)
- del(network_node2)
+ qdel(network_node2)
build_network()
@@ -214,11 +214,11 @@
/obj/machinery/atmospherics/valve/disconnect(obj/machinery/atmospherics/reference)
if(reference==node1)
- del(network_node1)
+ qdel(network_node1)
node1 = null
else if(reference==node2)
- del(network_node2)
+ qdel(network_node2)
node2 = null
update_underlays()
@@ -310,7 +310,7 @@
"\blue You have unfastened \the [src].", \
"You hear ratchet.")
new /obj/item/pipe(loc, make_from=src)
- del(src)
+ qdel(src)
/obj/machinery/atmospherics/valve/examine(mob/user)
..()
diff --git a/code/ATMOSPHERICS/datum_pipe_network.dm b/code/ATMOSPHERICS/datum_pipe_network.dm
index 4098c15c31..7fe586733c 100644
--- a/code/ATMOSPHERICS/datum_pipe_network.dm
+++ b/code/ATMOSPHERICS/datum_pipe_network.dm
@@ -31,7 +31,7 @@ datum/pipe_network
//Notes: Assuming that members will add themselves to appropriate roster in network_expand()
if(!start_normal)
- del(src)
+ qdel(src)
start_normal.network_expand(src, reference)
@@ -40,7 +40,7 @@ datum/pipe_network
if((normal_members.len>0)||(line_members.len>0))
pipe_networks += src
else
- del(src)
+ qdel(src)
proc/merge(datum/pipe_network/giver)
if(giver==src) return 0
diff --git a/code/ATMOSPHERICS/datum_pipeline.dm b/code/ATMOSPHERICS/datum_pipeline.dm
index 662376e9b4..f4f4e37990 100644
--- a/code/ATMOSPHERICS/datum_pipeline.dm
+++ b/code/ATMOSPHERICS/datum_pipeline.dm
@@ -9,13 +9,13 @@ datum/pipeline
var/alert_pressure = 0
- Del()
+ Destroy()
if(network)
- del(network)
+ qdel(network)
if(air && air.volume)
temporarily_store_air()
- del(air)
+ qdel(air)
..()
diff --git a/code/ATMOSPHERICS/he_pipes.dm b/code/ATMOSPHERICS/he_pipes.dm
index cb11410f86..d78bb828e2 100644
--- a/code/ATMOSPHERICS/he_pipes.dm
+++ b/code/ATMOSPHERICS/he_pipes.dm
@@ -44,7 +44,7 @@ obj/machinery/atmospherics/pipe/simple/heat_exchanging
node2 = target
break
if(!node1 && !node2)
- del(src)
+ qdel(src)
return
update_icon()
@@ -141,7 +141,7 @@ obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction
break
if(!node1&&!node2)
- del(src)
+ qdel(src)
return
update_icon()
diff --git a/code/ATMOSPHERICS/mainspipe.dm b/code/ATMOSPHERICS/mainspipe.dm
index d70d2bc53e..a381b28c37 100644
--- a/code/ATMOSPHERICS/mainspipe.dm
+++ b/code/ATMOSPHERICS/mainspipe.dm
@@ -99,7 +99,7 @@ obj/machinery/atmospherics/mains_pipe
for(var/obj/machinery/atmospherics/pipe/mains_component/node in nodes)
node.disconnect()
- Del()
+ Destroy()
disconnect()
..()
@@ -152,7 +152,7 @@ obj/machinery/atmospherics/mains_pipe/simple
else
if(!nodes[1]&&!nodes[2])
- del(src) //TODO: silent deleting looks weird
+ qdel(src) //TODO: silent deleting looks weird
var/have_node1 = nodes[1]?1:0
var/have_node2 = nodes[2]?1:0
icon_state = "exposed[have_node1][have_node2][invisibility ? "-f" : "" ]"
diff --git a/code/ATMOSPHERICS/pipes.dm b/code/ATMOSPHERICS/pipes.dm
index 92ad93c7d0..2315e856fd 100644
--- a/code/ATMOSPHERICS/pipes.dm
+++ b/code/ATMOSPHERICS/pipes.dm
@@ -30,7 +30,7 @@
/obj/machinery/atmospherics/pipe/proc/check_pressure(pressure)
//Return 1 if parent should continue checking other pipes
- //Return null if parent should stop checking other pipes. Recall: del(src) will by default return null
+ //Return null if parent should stop checking other pipes. Recall: qdel(src) will by default return null
return 1
@@ -62,8 +62,8 @@
return parent.return_network(reference)
-/obj/machinery/atmospherics/pipe/Del()
- del(parent)
+/obj/machinery/atmospherics/pipe/Destroy()
+ qdel(parent)
if(air_temporary)
loc.assume_air(air_temporary)
@@ -101,8 +101,8 @@
for (var/obj/machinery/meter/meter in T)
if (meter.target == src)
new /obj/item/pipe_meter(T)
- del(meter)
- del(src)
+ qdel(meter)
+ qdel(src)
/obj/machinery/atmospherics/proc/change_color(var/new_color)
//only pass valid pipe colors please ~otherwise your pipe will turn invisible
@@ -219,7 +219,7 @@
var/datum/effect/effect/system/smoke_spread/smoke = new
smoke.set_up(1,0, src.loc, 0)
smoke.start()
- del(src)
+ qdel(src)
/obj/machinery/atmospherics/pipe/simple/proc/normalize_dir()
if(dir==3)
@@ -227,7 +227,7 @@
else if(dir==12)
set_dir(4)
-/obj/machinery/atmospherics/pipe/simple/Del()
+/obj/machinery/atmospherics/pipe/simple/Destroy()
if(node1)
node1.disconnect(src)
if(node2)
@@ -260,8 +260,8 @@
for (var/obj/machinery/meter/meter in T)
if (meter.target == src)
new /obj/item/pipe_meter(T)
- del(meter)
- del(src)
+ qdel(meter)
+ qdel(src)
else if(node1 && node2)
overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "[pipe_icon]intact[icon_connect_type]")
else
@@ -294,7 +294,7 @@
break
if(!node1 && !node2)
- del(src)
+ qdel(src)
return
var/turf/T = get_turf(src)
@@ -305,12 +305,12 @@
/obj/machinery/atmospherics/pipe/simple/disconnect(obj/machinery/atmospherics/reference)
if(reference == node1)
if(istype(node1, /obj/machinery/atmospherics/pipe))
- del(parent)
+ qdel(parent)
node1 = null
if(reference == node2)
if(istype(node2, /obj/machinery/atmospherics/pipe))
- del(parent)
+ qdel(parent)
node2 = null
update_icon()
@@ -459,7 +459,7 @@
else
. = PROCESS_KILL
-/obj/machinery/atmospherics/pipe/manifold/Del()
+/obj/machinery/atmospherics/pipe/manifold/Destroy()
if(node1)
node1.disconnect(src)
if(node2)
@@ -472,17 +472,17 @@
/obj/machinery/atmospherics/pipe/manifold/disconnect(obj/machinery/atmospherics/reference)
if(reference == node1)
if(istype(node1, /obj/machinery/atmospherics/pipe))
- del(parent)
+ qdel(parent)
node1 = null
if(reference == node2)
if(istype(node2, /obj/machinery/atmospherics/pipe))
- del(parent)
+ qdel(parent)
node2 = null
if(reference == node3)
if(istype(node3, /obj/machinery/atmospherics/pipe))
- del(parent)
+ qdel(parent)
node3 = null
update_icon()
@@ -511,8 +511,8 @@
for (var/obj/machinery/meter/meter in T)
if (meter.target == src)
new /obj/item/pipe_meter(T)
- del(meter)
- del(src)
+ qdel(meter)
+ qdel(src)
else
overlays.Cut()
overlays += icon_manager.get_atmos_icon("manifold", , pipe_color, "core" + icon_connect_type)
@@ -578,7 +578,7 @@
break
if(!node1 && !node2 && !node3)
- del(src)
+ qdel(src)
return
var/turf/T = get_turf(src)
@@ -701,7 +701,7 @@
else
. = PROCESS_KILL
-/obj/machinery/atmospherics/pipe/manifold4w/Del()
+/obj/machinery/atmospherics/pipe/manifold4w/Destroy()
if(node1)
node1.disconnect(src)
if(node2)
@@ -716,22 +716,22 @@
/obj/machinery/atmospherics/pipe/manifold4w/disconnect(obj/machinery/atmospherics/reference)
if(reference == node1)
if(istype(node1, /obj/machinery/atmospherics/pipe))
- del(parent)
+ qdel(parent)
node1 = null
if(reference == node2)
if(istype(node2, /obj/machinery/atmospherics/pipe))
- del(parent)
+ qdel(parent)
node2 = null
if(reference == node3)
if(istype(node3, /obj/machinery/atmospherics/pipe))
- del(parent)
+ qdel(parent)
node3 = null
if(reference == node4)
if(istype(node4, /obj/machinery/atmospherics/pipe))
- del(parent)
+ qdel(parent)
node4 = null
update_icon()
@@ -762,8 +762,8 @@
for (var/obj/machinery/meter/meter in T)
if (meter.target == src)
new /obj/item/pipe_meter(T)
- del(meter)
- del(src)
+ qdel(meter)
+ qdel(src)
else
overlays.Cut()
overlays += icon_manager.get_atmos_icon("manifold", , pipe_color, "4way" + icon_connect_type)
@@ -837,7 +837,7 @@
break
if(!node1 && !node2 && !node3 && !node4)
- del(src)
+ qdel(src)
return
var/turf/T = get_turf(src)
@@ -958,7 +958,7 @@
..()
else
. = PROCESS_KILL
-/obj/machinery/atmospherics/pipe/cap/Del()
+/obj/machinery/atmospherics/pipe/cap/Destroy()
if(node)
node.disconnect(src)
@@ -967,7 +967,7 @@
/obj/machinery/atmospherics/pipe/cap/disconnect(obj/machinery/atmospherics/reference)
if(reference == node)
if(istype(node, /obj/machinery/atmospherics/pipe))
- del(parent)
+ qdel(parent)
node = null
update_icon()
@@ -1074,7 +1074,7 @@
else
. = PROCESS_KILL
-/obj/machinery/atmospherics/pipe/tank/Del()
+/obj/machinery/atmospherics/pipe/tank/Destroy()
if(node1)
node1.disconnect(src)
@@ -1108,7 +1108,7 @@
/obj/machinery/atmospherics/pipe/tank/disconnect(obj/machinery/atmospherics/reference)
if(reference == node1)
if(istype(node1, /obj/machinery/atmospherics/pipe))
- del(parent)
+ qdel(parent)
node1 = null
update_underlays()
@@ -1258,7 +1258,7 @@
else
parent.mingle_with_turf(loc, volume)
-/obj/machinery/atmospherics/pipe/vent/Del()
+/obj/machinery/atmospherics/pipe/vent/Destroy()
if(node1)
node1.disconnect(src)
@@ -1290,7 +1290,7 @@
/obj/machinery/atmospherics/pipe/vent/disconnect(obj/machinery/atmospherics/reference)
if(reference == node1)
if(istype(node1, /obj/machinery/atmospherics/pipe))
- del(parent)
+ qdel(parent)
node1 = null
update_icon()
diff --git a/code/FEA/DEBUG_REMOVE_BEFORE_RELEASE.dm b/code/FEA/DEBUG_REMOVE_BEFORE_RELEASE.dm
index 4c173b7b7e..7374963fba 100644
--- a/code/FEA/DEBUG_REMOVE_BEFORE_RELEASE.dm
+++ b/code/FEA/DEBUG_REMOVE_BEFORE_RELEASE.dm
@@ -342,7 +342,7 @@ obj/machinery/atmospherics
set src in world
set category = "Minor"
- del(src)
+ qdel(src)
pipeline_data()
set src in world
@@ -487,7 +487,7 @@ obj/window
destroy()
set category = "Minor"
set src in world
- del(src)
+ qdel(src)
mob
sight = SEE_OBJS|SEE_TURFS
diff --git a/code/FEA/FEA_fire.dm b/code/FEA/FEA_fire.dm
index b7a8d42fa5..fe18350da0 100644
--- a/code/FEA/FEA_fire.dm
+++ b/code/FEA/FEA_fire.dm
@@ -171,7 +171,7 @@
return
/*
-/obj/effect/hotspot/Del()
+/obj/effect/hotspot/Destroy()
if (istype(loc, /turf/simulated))
DestroyTurf()
..()
diff --git a/code/FEA/FEA_gas_mixture.dm b/code/FEA/FEA_gas_mixture.dm
index 6beeffc187..a2a1af194e 100644
--- a/code/FEA/FEA_gas_mixture.dm
+++ b/code/FEA/FEA_gas_mixture.dm
@@ -346,7 +346,7 @@ What are the archived variables for?
trace_gases += corresponding
corresponding.moles += trace_gas.moles*giver.group_multiplier/group_multiplier
- // del(giver)
+ // qdel(giver)
return 1
remove(amount)
diff --git a/code/FEA/FEA_system.dm b/code/FEA/FEA_system.dm
index 574fd1ba26..6a3dfe0f8b 100644
--- a/code/FEA/FEA_system.dm
+++ b/code/FEA/FEA_system.dm
@@ -291,7 +291,7 @@ datum
var/turf/simulated/T = turf
T.parent = null
turfs += T
- del(turf_AG)
+ qdel(turf_AG)
for(var/turf/simulated/S in turfs) //Have old members try to form new groups
if(!S.parent)
@@ -306,7 +306,7 @@ datum
for(var/obj/movable/floor/OM in object_AG.members)
OM.parent = null
movable_objects += OM
- del(object_AG)
+ qdel(object_AG)
for(var/obj/movable/floor/OM in movable_objects) //Have old members try to form new groups
if(!OM.parent)
diff --git a/code/FEA/FEA_turf_tile.dm b/code/FEA/FEA_turf_tile.dm
index 981d0b023c..da7b1f856c 100644
--- a/code/FEA/FEA_turf_tile.dm
+++ b/code/FEA/FEA_turf_tile.dm
@@ -14,7 +14,7 @@ atom/movable/proc/experience_pressure_difference(pressure_difference, direction)
turf
assume_air(datum/gas_mixture/giver) //use this for machines to adjust air
- del(giver)
+ qdel(giver)
return 0
return_air()
@@ -148,7 +148,7 @@ turf/simulated
if(istype(target))
air_master.tiles_to_update.Add(target)
- Del()
+ Destroy()
if(air_master)
if(parent)
air_master.groups_to_rebuild.Add(parent)
diff --git a/code/TriDimension/Pipes.dm b/code/TriDimension/Pipes.dm
index d6b87f2909..c71255a34b 100644
--- a/code/TriDimension/Pipes.dm
+++ b/code/TriDimension/Pipes.dm
@@ -45,8 +45,6 @@ obj/machinery/atmospherics/pipe/zpipe/New()
initialize_directions = EAST
if(SOUTHWEST)
initialize_directions = SOUTH
- initialize()
-
obj/machinery/atmospherics/pipe/zpipe/hide(var/i)
if(level == 1 && istype(loc, /turf/simulated))
@@ -80,7 +78,7 @@ obj/machinery/atmospherics/pipe/zpipe/proc/burst()
var/datum/effect/effect/system/smoke_spread/smoke = new
smoke.set_up(1,0, src.loc, 0)
smoke.start()
- del(src)
+ qdel(src) // NOT qdel.
obj/machinery/atmospherics/pipe/zpipe/proc/normalize_dir()
if(dir==3)
@@ -88,7 +86,7 @@ obj/machinery/atmospherics/pipe/zpipe/proc/normalize_dir()
else if(dir==12)
set_dir(4)
-obj/machinery/atmospherics/pipe/zpipe/Del()
+obj/machinery/atmospherics/pipe/zpipe/Destroy()
if(node1)
node1.disconnect(src)
if(node2)
@@ -104,12 +102,12 @@ obj/machinery/atmospherics/pipe/zpipe/update_icon()
obj/machinery/atmospherics/pipe/zpipe/disconnect(obj/machinery/atmospherics/reference)
if(reference == node1)
if(istype(node1, /obj/machinery/atmospherics/pipe))
- del(parent)
+ qdel(parent)
node1 = null
if(reference == node2)
if(istype(node2, /obj/machinery/atmospherics/pipe))
- del(parent)
+ qdel(parent)
node2 = null
return null
diff --git a/code/TriDimension/Structures.dm b/code/TriDimension/Structures.dm
index 554853535a..9224facba2 100644
--- a/code/TriDimension/Structures.dm
+++ b/code/TriDimension/Structures.dm
@@ -41,18 +41,18 @@
switch(severity)
if(1.0)
if(icon_state == "ladderup" && prob(10))
- Del()
+ qdel(src)
if(2.0)
if(prob(50))
- Del()
+ qdel(src)
if(3.0)
- Del()
+ qdel(src)
return*/
- Del()
+ Destroy()
spawn(1)
if(target && icon_state == "ladderdown")
- del target
+ qdel(target)
return ..()
attackby(obj/item/C as obj, mob/user as mob)
@@ -78,7 +78,7 @@
if(!blocked && !istype(below, /turf/simulated/wall))
var/obj/multiz/ladder/X = new /obj/multiz/ladder(below)
S.amount = S.amount - 2
- if(S.amount == 0) S.Del()
+ if(S.amount == 0) qdel(S)
X.icon_state = "ladderup"
connect()
user << "You finish the ladder."
@@ -97,9 +97,9 @@
src.d_state = 1
if(target)
- var/obj/item/stack/rods/R = new /obj/item/stack/rods(target.loc)
+ var/obj/item/stack/rods/R = PoolOrNew(/obj/item/stack/rods, target.loc)
R.amount = 2
- target.Del()
+ qdel(Target)
user << "You remove the bolts anchoring the ladder."
return
@@ -117,7 +117,7 @@
var/obj/item/stack/sheet/metal/S = new /obj/item/stack/sheet/metal( src )
S.amount = 2
user << "You remove the ladder and close the hole."
- Del()
+ qdel(src)
else
user << "You need more welding fuel to complete this task."
return
@@ -167,7 +167,7 @@
attack_hand(var/mob/M)
if(!target || !istype(target.loc, /turf))
- del src
+ qdel(src)
if(active)
M << "That [src] is being used."
@@ -185,7 +185,7 @@
spawn(7)
if(!target || !istype(target.loc, /turf))
- del src
+ qdel(src)
if(M.z == z && get_dist(src,M) <= 1)
var/list/adjacent_to_me = global_adjacent_z_levels["[z]"]
M.visible_message("\blue \The [M] scurries [target.z == adjacent_to_me["up"] ? "up" : "down"] \the [src]!", "You scramble [target.z == adjacent_to_me["up"] ? "up" : "down"] \the [src]!", "You hear some grunting, and a hatch sealing.")
diff --git a/code/TriDimension/Turfs.dm b/code/TriDimension/Turfs.dm
index 8992068018..43e33ed3c2 100644
--- a/code/TriDimension/Turfs.dm
+++ b/code/TriDimension/Turfs.dm
@@ -120,7 +120,7 @@
var/obj/item/stack/tile/plasteel/S = C
if (S.get_amount() < 1)
return
- del(L)
+ qdel(L)
playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1)
S.build(src)
S.use(1)
diff --git a/code/TriDimension/controller.dm b/code/TriDimension/controller.dm
index 528c2c76ba..a9d4df675a 100644
--- a/code/TriDimension/controller.dm
+++ b/code/TriDimension/controller.dm
@@ -28,9 +28,9 @@
initialized = 1
return 1
-/obj/effect/landmark/zcontroller/Del()
+/obj/effect/landmark/zcontroller/Destroy()
processing_objects.Remove(src)
- return
+ return ..()
/obj/effect/landmark/zcontroller/process()
if (world.time > fast_time)
diff --git a/code/ZAS/Atom.dm b/code/ZAS/Atom.dm
index 6f75f4ea29..e655295f78 100644
--- a/code/ZAS/Atom.dm
+++ b/code/ZAS/Atom.dm
@@ -50,7 +50,7 @@ atom/proc/c_airblock(turf/other)
#ifdef ZASDBG
ASSERT(isturf(other))
#endif
- return !CanPass(null, other, 0, 0) + 2*!CanPass(null, other, 1.5, 1)
+ return (AIR_BLOCKED*!CanPass(null, other, 0, 0))|(ZONE_BLOCKED*!CanPass(null, other, 1.5, 1))
turf/c_airblock(turf/other)
diff --git a/code/ZAS/Controller.dm b/code/ZAS/Controller.dm
index 4ba30f47b3..83d2a54ec3 100644
--- a/code/ZAS/Controller.dm
+++ b/code/ZAS/Controller.dm
@@ -98,7 +98,7 @@ Class Procs:
set background = 1
#endif
- world << "Processing Geometry..."
+ admin_notice("Processing Geometry...", R_DEBUG)
sleep(-1)
var/start_time = world.timeofday
@@ -109,14 +109,14 @@ Class Procs:
simulated_turf_count++
S.update_air_properties()
- world << {"Geometry initialized in [round(0.1*(world.timeofday-start_time),0.1)] seconds.
+ admin_notice({"Geometry initialized in [round(0.1*(world.timeofday-start_time),0.1)] seconds.
Total Simulated Turfs: [simulated_turf_count]
Total Zones: [zones.len]
Total Edges: [edges.len]
Total Active Edges: [active_edges.len ? "[active_edges.len]" : "None"]
Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_count]
-"}
+"}, R_DEBUG)
// spawn Start()
@@ -154,7 +154,18 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
#ifdef ZASDBG
var/updated = 0
#endif
+
+ //defer updating of self-zone-blocked turfs until after all other turfs have been updated.
+ //this hopefully ensures that non-self-zone-blocked turfs adjacent to self-zone-blocked ones
+ //have valid zones when the self-zone-blocked turfs update.
+ var/list/deferred = list()
+
for(var/turf/T in updating)
+ //check if the turf is self-zone-blocked
+ if(T.c_airblock(T) & ZONE_BLOCKED)
+ deferred += T
+ continue
+
T.update_air_properties()
T.post_update_air_properties()
T.needs_air_update = 0
@@ -164,6 +175,15 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
#endif
//sleep(1)
+ for(var/turf/T in deferred)
+ T.update_air_properties()
+ T.post_update_air_properties()
+ T.needs_air_update = 0
+ #ifdef ZASDBG
+ T.overlays -= mark
+ updated++
+ #endif
+
#ifdef ZASDBG
if(updated != updating.len)
tick_progress = "[updating.len - updated] tiles left unupdated."
@@ -307,7 +327,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
/datum/controller/air_system/proc/mark_edge_sleeping(connection_edge/E)
#ifdef ZASDBG
- ASSERT(istype(E)
+ ASSERT(istype(E))
#endif
if(E.sleeping) return
active_edges.Remove(E)
@@ -315,7 +335,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
/datum/controller/air_system/proc/mark_edge_active(connection_edge/E)
#ifdef ZASDBG
- ASSERT(istype(E)
+ ASSERT(istype(E))
#endif
if(!E.sleeping) return
active_edges.Add(E)
diff --git a/code/ZAS/Fire.dm b/code/ZAS/Fire.dm
index 5dd0ac3cd3..ebfd029228 100644
--- a/code/ZAS/Fire.dm
+++ b/code/ZAS/Fire.dm
@@ -78,11 +78,11 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
fire = new(src, fl)
air_master.active_fire_zones |= zone
-
+
var/obj/effect/decal/cleanable/liquid_fuel/fuel = locate() in src
zone.fire_tiles |= src
if(fuel) zone.fuel_objs += fuel
-
+
return 0
/obj/fire
@@ -91,11 +91,11 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
anchored = 1
mouse_opacity = 0
- //luminosity = 3
+ blend_mode = BLEND_ADD
icon = 'icons/effects/fire.dmi'
icon_state = "1"
- l_color = "#ED9200"
+ light_color = "#ED9200"
layer = TURF_LAYER
var/firelevel = 10000 //Calculated by gas_mixture.calculate_firelevel()
@@ -114,13 +114,13 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
if(firelevel > 6)
icon_state = "3"
- SetLuminosity(7)
+ set_light(7, 3)
else if(firelevel > 2.5)
icon_state = "2"
- SetLuminosity(5)
+ set_light(5, 2)
else
icon_state = "1"
- SetLuminosity(3)
+ set_light(3, 1)
//im not sure how to implement a version that works for every creature so for now monkeys are firesafe
for(var/mob/living/L in loc)
@@ -158,19 +158,26 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
else
enemy_tile.adjacent_fire_act(loc, air_contents, air_contents.temperature, air_contents.volume)
+ animate(src, color = heat2color(air_contents.temperature), 5)
+ set_light(l_color = color)
+
/obj/fire/New(newLoc,fl)
..()
if(!istype(loc, /turf))
- del src
+ qdel(src)
set_dir(pick(cardinal))
- SetLuminosity(3)
+
+ var/datum/gas_mixture/air_contents = loc.return_air()
+ color = heat2color(air_contents.temperature)
+ set_light(3, 1, color)
+
firelevel = fl
air_master.active_hotspots.Add(src)
-/obj/fire/Del()
+/obj/fire/Destroy()
if (istype(loc, /turf/simulated))
RemoveFire()
@@ -178,8 +185,8 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
/obj/fire/proc/RemoveFire()
if (istype(loc, /turf))
- SetLuminosity(0)
-
+ set_light(0)
+
loc = null
air_master.active_hotspots.Remove(src)
@@ -227,22 +234,22 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
//determine how far the reaction can progress
var/reaction_limit = min(total_oxidizers*(FIRE_REACTION_FUEL_AMOUNT/FIRE_REACTION_OXIDIZER_AMOUNT), total_fuel) //stoichiometric limit
-
+
//determine the actual rate of reaction, as measured by the amount of fuel reacting
-
+
//vapour fuels are extremely volatile! The reaction progress is a percentage of the total fuel (similar to old zburn).
var/gas_reaction_progress = max(0.2*group_multiplier, (firelevel/vsc.fire_firelevel_multiplier)*gas_fuel)*FIRE_GAS_BURNRATE_MULT
//liquid fuels are not as volatile, and the reaction progress depends on the size of the area that is burning (which is sort of accounted for by firelevel). Having more fuel means a longer burn.
var/liquid_reaction_progress = (firelevel/vsc.fire_firelevel_multiplier)*FIRE_LIQUID_BURNRATE_MULT
-
+
//world << "liquid_reaction_progress = [liquid_reaction_progress]"
//world << "gas_reaction_progress = [gas_reaction_progress]"
-
+
var/total_reaction_progress = gas_reaction_progress + liquid_reaction_progress
var/used_fuel = min(total_reaction_progress, reaction_limit)
var/used_oxidizers = used_fuel*(FIRE_REACTION_OXIDIZER_AMOUNT/FIRE_REACTION_FUEL_AMOUNT)
//world << "used_fuel = [used_fuel]; used_oxidizers = [used_oxidizers]; reaction_limit=[reaction_limit]"
-
+
//if the reaction is progressing too slow then it isn't self-sustaining anymore and burns out
if(zone && zone.fuel_objs.len)
if(used_fuel <= FIRE_LIQUD_MIN_BURNRATE)
@@ -250,13 +257,13 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
else if(used_fuel <= FIRE_GAS_MIN_BURNRATE*group_multiplier) //purely gas fires have more stringent criteria
return 0
-
+
//*** Remove fuel and oxidizer, add carbon dioxide and heat
-
+
//remove and add gasses as calculated
var/used_gas_fuel = min(used_fuel*(gas_reaction_progress/total_reaction_progress), gas_fuel) //remove in proportion to the relative reaction progress
var/used_liquid_fuel = between(0, used_fuel-used_gas_fuel, liquid_fuel)
-
+
//remove_by_flag() and adjust_gas() handle the group_multiplier for us.
remove_by_flag(XGM_GAS_OXIDIZER, used_oxidizers)
remove_by_flag(XGM_GAS_FUEL, used_gas_fuel)
@@ -272,14 +279,14 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
if(!istype(fuel))
zone.fuel_objs -= fuel
continue
-
+
fuel.amount -= fuel_to_remove
if(fuel.amount <= 0)
zone.fuel_objs -= fuel
if(liquidonly)
var/turf/T = fuel.loc
- if(istype(T) && T.fire) del(T.fire)
- del(fuel)
+ if(istype(T) && T.fire) qdel(T.fire)
+ qdel(fuel)
//calculate the energy produced by the reaction and then set the new temperature of the mix
temperature = (starting_energy + vsc.fire_fuel_energy_release * used_fuel) / heat_capacity()
diff --git a/code/ZAS/Turf.dm b/code/ZAS/Turf.dm
index 9d031ce3d3..331c00dd37 100644
--- a/code/ZAS/Turf.dm
+++ b/code/ZAS/Turf.dm
@@ -46,6 +46,7 @@
air_master.connect(sim, src)
/turf/simulated/update_air_properties()
+
if(zone && zone.invalid)
c_copy_air()
zone = null //Easier than iterating through the list at the zone.
@@ -58,7 +59,8 @@
#endif
if(zone)
var/zone/z = zone
- if(locate(/obj/machinery/door/airlock) in src) //Hacky, but prevents normal airlocks from rebuilding zones all the time
+
+ if(s_block & ZONE_BLOCKED) //Hacky, but prevents normal airlocks from rebuilding zones all the time
z.remove(src)
else
z.rebuild()
@@ -102,7 +104,7 @@
//This happens when windows move or are constructed. We need to rebuild.
if((previously_open & d) && istype(unsim, /turf/simulated))
var/turf/simulated/sim = unsim
- if(sim.zone == zone)
+ if(zone && sim.zone == zone)
zone.rebuild()
return
@@ -120,8 +122,10 @@
//Might have assigned a zone, since this happens for each direction.
if(!zone)
- //if((block & ZONE_BLOCKED) || (r_block & ZONE_BLOCKED && !(s_block & ZONE_BLOCKED)))
- if(((block & ZONE_BLOCKED) && !(r_block & ZONE_BLOCKED)) || (r_block & ZONE_BLOCKED && !(s_block & ZONE_BLOCKED)))
+ //We do not merge if
+ // they are blocking us and we are not blocking them, or if
+ // we are blocking them and not blocking ourselves - this prevents tiny zones from forming on doorways.
+ if(((block & ZONE_BLOCKED) && !(r_block & ZONE_BLOCKED)) || ((r_block & ZONE_BLOCKED) && !(s_block & ZONE_BLOCKED)))
#ifdef ZASDBG
if(verbose) world << "[d] is zone blocked."
//dbg(zone_blocked, d)
diff --git a/code/ZAS/Zone.dm b/code/ZAS/Zone.dm
index b7042191fc..9fcddc9246 100644
--- a/code/ZAS/Zone.dm
+++ b/code/ZAS/Zone.dm
@@ -111,6 +111,13 @@ Class Procs:
#ifdef ZASDBG
T.dbg(merged)
#endif
+
+ //rebuild the old zone's edges so that the will be possesed by the new zone
+ for(var/connection_edge/E in edges)
+ if(E.contains_zone(into))
+ continue //don't need to rebuild this edge
+ for(var/turf/T in E.connecting_turfs)
+ air_master.mark_for_update(T)
/zone/proc/c_invalidate()
invalid = 1
diff --git a/code/__HELPERS/atom_pool.dm b/code/__HELPERS/atom_pool.dm
deleted file mode 100644
index 77a7caf5e4..0000000000
--- a/code/__HELPERS/atom_pool.dm
+++ /dev/null
@@ -1,93 +0,0 @@
-
-/*
-/tg/station13 /atom/movable Pool:
----------------------------------
-By RemieRichards
-
-Creation/Deletion is laggy, so let's reduce reuse and recycle!
-
-Locked to /atom/movable and it's subtypes due to Loc being a const var on /atom
-but being read&write on /movable due to how they... move.
-
-*/
-
-var/global/list/GlobalPool = list()
-
-//You'll be using this proc 90% of the time.
-//It grabs a type from the pool if it can
-//And if it can't, it creates one
-//The pool is flexible and will expand to fit
-//The new created atom when it eventually
-//Goes into the pool
-
-//Second argument can be a new location
-//Or a list of arguments
-//Either way it gets passed to new
-
-/proc/PoolOrNew(var/get_type,var/second_arg)
- if(!get_type)
- return
-
- var/atom/movable/AM
- AM = GetFromPool(get_type,second_arg)
-
- if(!AM)
- if(ispath(get_type))
- if(islist(second_arg))
- return new get_type (arglist(second_arg))
- else
- return new get_type (second_arg)
- return AM
-
-
-/proc/GetFromPool(var/get_type,var/second_arg)
- if(!get_type)
- return 0
-
- if(isnull(GlobalPool[get_type]))
- return 0
-
- if(length(GlobalPool[get_type]) == 0)
- return 0
-
- var/atom/movable/AM = pick_n_take(GlobalPool[get_type])
- if(AM)
- AM.ResetVars()
- if(islist(second_arg))
- AM.loc = second_arg[1]
- AM.New(arglist(second_arg))
- else
- AM.loc = second_arg
- AM.New(second_arg)
- return AM
- return 0
-
-
-
-/proc/PlaceInPool(var/atom/movable/AM)
- if(!istype(AM))
- return
-
- if(AM in GlobalPool[AM.type])
- return
-
- if(!GlobalPool[AM.type])
- GlobalPool[AM.type] = list()
-
- GlobalPool[AM.type] |= AM
-
- AM.Destroy()
- AM.ResetVars()
-
-
-
-/atom/movable/proc/ResetVars(var/list/exlude = list())
- var/list/excluded = list("animate_movement", "loc", "locs", "parent_type", "vars", "verbs", "type") + exlude
-
- for(var/V in vars)
- if(V in excluded)
- continue
-
- vars[V] = initial(vars[V])
-
- vars["loc"] = null
diff --git a/code/__HELPERS/datum_pool.dm b/code/__HELPERS/datum_pool.dm
new file mode 100644
index 0000000000..79970faf7b
--- /dev/null
+++ b/code/__HELPERS/datum_pool.dm
@@ -0,0 +1,109 @@
+
+/*
+/tg/station13 /atom/movable Pool:
+---------------------------------
+By RemieRichards
+
+Creation/Deletion is laggy, so let's reduce reuse and recycle!
+
+*/
+#define ATOM_POOL_COUNT 100
+// "define DEBUG_ATOM_POOL 1
+var/global/list/GlobalPool = list()
+
+//You'll be using this proc 90% of the time.
+//It grabs a type from the pool if it can
+//And if it can't, it creates one
+//The pool is flexible and will expand to fit
+//The new created atom when it eventually
+//Goes into the pool
+
+//Second argument can be a new location, if the type is /atom/movable
+//Or a list of arguments
+//Either way it gets passed to new
+
+/proc/PoolOrNew(var/get_type,var/second_arg)
+ var/datum/D
+ D = GetFromPool(get_type,second_arg)
+
+ if(!D)
+ // So the GC knows we're pooling this type.
+ if(!GlobalPool[get_type])
+ GlobalPool[get_type] = list(new get_type)
+ if(islist(second_arg))
+ return new get_type (arglist(second_arg))
+ else
+ return new get_type (second_arg)
+ return D
+
+/proc/GetFromPool(var/get_type,var/second_arg)
+ if(isnull(GlobalPool[get_type]))
+ return 0
+
+ if(length(GlobalPool[get_type]) == 0)
+ return 0
+
+ var/datum/D = pick_n_take(GlobalPool[get_type])
+ if(D)
+ D.ResetVars()
+ D.Prepare(second_arg)
+ return D
+ return 0
+
+/proc/PlaceInPool(var/datum/D)
+ if(!istype(D))
+ return
+
+ if(length(GlobalPool[D.type]) > ATOM_POOL_COUNT)
+ #ifdef DEBUG_ATOM_POOL
+ world << text("DEBUG_DATUM_POOL: PlaceInPool([]) exceeds []. Discarding.", D.type, ATOM_POOL_COUNT)
+ #endif
+ del(D)
+ return
+
+ if(D in GlobalPool[D.type])
+ return
+
+ if(!GlobalPool[D.type])
+ GlobalPool[D.type] = list()
+
+ GlobalPool[D.type] += D
+
+ D.Destroy()
+ D.ResetVars()
+ D.disposed = 1 //Set to stop processing while pooled
+
+/proc/IsPooled(var/datum/D)
+ if(isnull(GlobalPool[D.type]))
+ return 0
+ return 1
+
+/datum/proc/Prepare(args)
+ if(islist(args))
+ New(arglist(args))
+ else
+ New(args)
+ disposed = null
+
+/atom/movable/Prepare(args)
+ var/list/args_list = args
+ if(istype(args_list) && args_list.len)
+ loc = args[1]
+ else
+ loc = args
+ ..()
+
+/datum/proc/ResetVars(var/list/exlude = list())
+ var/list/excluded = list("animate_movement", "loc", "locs", "parent_type", "vars", "verbs", "type") + exlude
+
+ for(var/V in vars)
+ if(V in excluded)
+ continue
+
+ vars[V] = initial(vars[V])
+
+/atom/movable/ResetVars()
+ ..()
+ vars["loc"] = null
+
+#undef ATOM_POOL_COUNT
diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm
index bc06c3d239..2654e86e79 100644
--- a/code/__HELPERS/game.dm
+++ b/code/__HELPERS/game.dm
@@ -16,22 +16,25 @@
return 1
return 0
+/proc/max_default_z_level()
+ return max(config.station_levels, max(config.admin_levels, config.player_levels))
+
/proc/get_area(O)
var/turf/loc = get_turf(O)
- if(!loc)
- return null
- return loc.loc
+ if(loc)
+ var/area/res = loc.loc
+ .= res
/proc/get_area_name(N) //get area by its name
for(var/area/A in world)
if(A.name == N)
return A
return 0
-
+
/proc/get_area_master(const/O)
var/area/A = get_area(O)
if (isarea(A))
- return A.master
+ return A
/proc/in_range(source, user)
if(get_dist(source, user) <= 1)
@@ -66,18 +69,6 @@
/proc/isNotAdminLevel(var/level)
return !isAdminLevel(level)
-//Magic constants obtained by using linear regression on right-angled triangles of sides 0"
+ return "
"
\ No newline at end of file
diff --git a/code/__HELPERS/time.dm b/code/__HELPERS/time.dm
index f20830e5cc..c90a935b6d 100644
--- a/code/__HELPERS/time.dm
+++ b/code/__HELPERS/time.dm
@@ -10,6 +10,9 @@ proc/worldtime2text(time = world.time)
if(!roundstart_hour) roundstart_hour = pick(2,7,12,17)
return "[round(time / 36000)+roundstart_hour]:[(time / 600 % 60) < 10 ? add_zero(time / 600 % 60, 1) : time / 600 % 60]"
+proc/worlddate2text()
+ return num2text((text2num(time2text(world.timeofday, "YYYY"))+544)) + "-" + time2text(world.timeofday, "MM-DD")
+
proc/time_stamp()
return time2text(world.timeofday, "hh:mm:ss")
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index 72d85a67b5..3564c5e15f 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -631,7 +631,7 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
animation.master = target
flick(flick_anim, animation)
sleep(max(sleeptime, 15))
- del(animation)
+ qdel(animation)
//Will return the contents of an atom recursivly to a depth of 'searchDepth'
/atom/proc/GetAllContents(searchDepth = 5)
@@ -902,7 +902,7 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
X.icon = 'icons/turf/shuttle.dmi'
X.icon_state = replacetext(O.icon_state, "_f", "_s") // revert the turf to the old icon_state
X.name = "wall"
- del(O) // prevents multiple shuttle corners from stacking
+ qdel(O) // prevents multiple shuttle corners from stacking
continue
if(!istype(O,/obj)) continue
O.loc = X
@@ -927,30 +927,6 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
refined_trg -= B
continue moving
- var/list/doors = new/list()
-
- if(toupdate.len)
- for(var/turf/simulated/T1 in toupdate)
- for(var/obj/machinery/door/D2 in T1)
- doors += D2
- /*if(T1.parent)
- air_master.groups_to_rebuild += T1.parent
- else
- air_master.tiles_to_update += T1*/
-
- if(fromupdate.len)
- for(var/turf/simulated/T2 in fromupdate)
- for(var/obj/machinery/door/D2 in T2)
- doors += D2
- /*if(T2.parent)
- air_master.groups_to_rebuild += T2.parent
- else
- air_master.tiles_to_update += T2*/
-
- for(var/obj/O in doors)
- O:update_nearby_tiles(1)
-
-
proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
if(!original)
diff --git a/code/__HELPERS/vector.dm b/code/__HELPERS/vector.dm
index 970530e71d..44d293734c 100644
--- a/code/__HELPERS/vector.dm
+++ b/code/__HELPERS/vector.dm
@@ -52,7 +52,7 @@ return_location()
var/offset_x = 0 // distance to increment each step
var/offset_y = 0
-/datum/plot_vector/proc/setup(var/turf/S, var/turf/T, var/xo = 0, var/yo = 0)
+/datum/plot_vector/proc/setup(var/turf/S, var/turf/T, var/xo = 0, var/yo = 0, var/angle_offset=0)
source = S
target = T
@@ -78,7 +78,7 @@ return_location()
return
// calculate the angle
- angle = Atan2(dx, dy)
+ angle = Atan2(dx, dy) + angle_offset
// and some rounding to stop the increments jumping whole turfs - because byond favours certain angles
if(angle > -135 && angle < 45)
@@ -118,7 +118,7 @@ return_location()
/datum/plot_vector/proc/return_location(var/datum/vector_loc/data)
if(!data)
data = new()
- data.loc = locate(round(loc_x / world.icon_size), round(loc_y / world.icon_size), loc_z)
+ data.loc = locate(round(loc_x / world.icon_size, 1), round(loc_y / world.icon_size, 1), loc_z)
if(!data.loc)
return
data.pixel_x = loc_x - (data.loc.x * world.icon_size)
diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm
index 466a9e2875..f39499f3dc 100644
--- a/code/_onclick/hud/hud.dm
+++ b/code/_onclick/hud/hud.dm
@@ -341,6 +341,7 @@ datum/hud/New(mob/owner)
if(src.hud_used.item_action_list)
src.client.screen -= src.hud_used.item_action_list
src.client.screen -= src.internals
+ src.client.screen += src.hud_used.action_intent //we want the intent swticher visible
else
hud_used.hud_shown = 1
if(src.hud_used.adding)
diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm
index 767567b4b0..4a7d6f2acb 100644
--- a/code/_onclick/hud/screen_objects.dm
+++ b/code/_onclick/hud/screen_objects.dm
@@ -14,6 +14,9 @@
var/obj/master = null //A reference to the object in the slot. Grabs or items, generally.
var/gun_click_time = -100 //I'm lazy.
+/obj/screen/Destroy()
+ master = null
+ ..()
/obj/screen/text
icon = null
diff --git a/code/_onclick/observer.dm b/code/_onclick/observer.dm
index 337a044235..168ae47c86 100644
--- a/code/_onclick/observer.dm
+++ b/code/_onclick/observer.dm
@@ -20,7 +20,7 @@
return // seems legit.
// Things you might plausibly want to follow
- if((ismob(A) && A != src) || istype(A,/obj/machinery/bot) || istype(A,/obj/machinery/singularity))
+ if((ismob(A) && A != src) || istype(A,/obj/machinery/bot) || istype(A,/obj/singularity))
ManualFollow(A)
// Otherwise jump
diff --git a/code/_onclick/oldcode.dm b/code/_onclick/oldcode.dm
index ce6a238329..890d67923a 100644
--- a/code/_onclick/oldcode.dm
+++ b/code/_onclick/oldcode.dm
@@ -253,7 +253,7 @@
See the previous More info, for... more info...
*/
- //del(D)
+ //qdel(D)
// Garbage Collect Dummy
D.loc = null
D = null
diff --git a/code/_onclick/telekinesis.dm b/code/_onclick/telekinesis.dm
index 88c9feca36..ae57895cd6 100644
--- a/code/_onclick/telekinesis.dm
+++ b/code/_onclick/telekinesis.dm
@@ -80,14 +80,14 @@ var/const/tk_maxrange = 15
if(focus.Adjacent(loc))
focus.loc = loc
- del(src)
+ qdel(src)
return
//stops TK grabs being equipped anywhere but into hands
equipped(var/mob/user, var/slot)
if( (slot == slot_l_hand) || (slot== slot_r_hand) ) return
- del(src)
+ qdel(src)
return
@@ -99,10 +99,10 @@ var/const/tk_maxrange = 15
if(!target || !user) return
if(last_throw+3 > world.time) return
if(!host || host != user)
- del(src)
+ qdel(src)
return
if(!(TK in host.mutations))
- del(src)
+ qdel(src)
return
if(isobj(target) && !isturf(target.loc))
return
@@ -152,7 +152,7 @@ var/const/tk_maxrange = 15
proc/focus_object(var/obj/target, var/mob/living/user)
if(!istype(target,/obj)) return//Cant throw non objects atm might let it do mobs later
if(target.anchored || !isturf(target.loc))
- del src
+ qdel(src)
return
focus = target
update_icon()
@@ -162,7 +162,7 @@ var/const/tk_maxrange = 15
proc/apply_focus_overlay()
if(!focus) return
- var/obj/effect/overlay/O = new /obj/effect/overlay(locate(focus.x,focus.y,focus.z))
+ var/obj/effect/overlay/O = PoolOrNew(/obj/effect/overlay, locate(focus.x,focus.y,focus.z))
O.name = "sparkles"
O.anchored = 1
O.density = 0
@@ -172,7 +172,7 @@ var/const/tk_maxrange = 15
O.icon_state = "nothing"
flick("empdisable",O)
spawn(5)
- O.delete()
+ qdel(O)
return
diff --git a/code/controllers/ProcessScheduler/core/process.dm b/code/controllers/ProcessScheduler/core/process.dm
index 89048113d3..1f27f4c1de 100644
--- a/code/controllers/ProcessScheduler/core/process.dm
+++ b/code/controllers/ProcessScheduler/core/process.dm
@@ -184,8 +184,7 @@ datum/controller/process/proc/kill()
killed = TRUE
- // This should del
- del(src)
+ del(src) // This should del
datum/controller/process/proc/scheck(var/tickId = 0)
if (killed)
@@ -315,3 +314,9 @@ datum/controller/process/proc/enable()
/datum/controller/process/proc/getTicks()
return ticks
+
+/datum/controller/process/proc/getStatName()
+ return name
+
+/datum/controller/process/proc/getTickTime()
+ return "#[getTicks()]\t- [getLastRunTime()]"
diff --git a/code/controllers/Processes/alarm.dm b/code/controllers/Processes/alarm.dm
index d41aa6ffdf..6269ab89d1 100644
--- a/code/controllers/Processes/alarm.dm
+++ b/code/controllers/Processes/alarm.dm
@@ -4,3 +4,7 @@
/datum/controller/process/alarm/doWork()
alarm_manager.fire()
+
+/datum/controller/process/alarm/getStatName()
+ var/list/alarms = alarm_manager.active_alarms()
+ return ..()+"([alarms.len])"
diff --git a/code/controllers/Processes/disease.dm b/code/controllers/Processes/disease.dm
index a8d840097e..35cf0d9891 100644
--- a/code/controllers/Processes/disease.dm
+++ b/code/controllers/Processes/disease.dm
@@ -9,3 +9,6 @@
/datum/controller/process/disease/doWork()
updateQueueInstance.init(active_diseases, "process")
updateQueueInstance.Run()
+
+/datum/controller/process/disease/getStatName()
+ return ..()+"([active_diseases.len])"
diff --git a/code/controllers/Processes/garbage.dm b/code/controllers/Processes/garbage.dm
index 11ba8979f5..29b9755a5c 100644
--- a/code/controllers/Processes/garbage.dm
+++ b/code/controllers/Processes/garbage.dm
@@ -1,12 +1,14 @@
var/datum/controller/process/garbage_collector/garbage_collector
+var/list/delayed_garbage = list()
-// #define GC_DEBUG 1
/datum/controller/process/garbage_collector
+ var/garbage_collect = 1 // Whether or not to actually do work
var/collection_timeout = 300 //deciseconds to wait to let running procs finish before we just say fuck it and force del() the object
- var/max_checks_multiplier = 5 //multiplier (per-decisecond) for calculating max number of tests per SS tick. These tests check if our GC'd objects are actually GC'd
- var/max_forcedel_multiplier = 1 //multiplier (per-decisecond) for calculating max number of force del() calls per SS tick.
+ var/max_checks_multiplier = 5 //multiplier (per-decisecond) for calculating max number of tests per tick. These tests check if our GC'd objects are actually GC'd
+ var/max_forcedel_multiplier = 1 //multiplier (per-decisecond) for calculating max number of force del() calls per tick.
- var/dels = 0 // number of del()'s we've done this tick
+ var/dels = 0 // number of del()'s we've done this tick
+ var/hard_dels = 0 // number of hard dels in total
var/list/destroyed = list() // list of refID's of things that should be garbage collected
// refID's are associated with the time at which they time out and need to be manually del()
// we do this so we aren't constantly locating them and preventing them from being gc'd
@@ -16,14 +18,21 @@ var/datum/controller/process/garbage_collector/garbage_collector
/datum/controller/process/garbage_collector/setup()
name = "garbage"
- schedule_interval = 60 // every 6 seconds
+ schedule_interval = 2 SECONDS
if(!garbage_collector)
garbage_collector = src
-/datum/controller/process/garbage_collector/doWork()
- dels = 0
+ for(var/garbage in delayed_garbage)
+ qdel(garbage)
+ delayed_garbage.Cut()
+ delayed_garbage = null
+/datum/controller/process/garbage_collector/doWork()
+ if(!garbage_collect)
+ return
+
+ dels = 0
var/time_to_kill = world.time - collection_timeout // Anything qdel() but not GC'd BEFORE this time needs to be manually del()
var/checkRemain = max_checks_multiplier * schedule_interval
var/maxDels = max_forcedel_multiplier * schedule_interval
@@ -31,76 +40,114 @@ var/datum/controller/process/garbage_collector/garbage_collector
while(destroyed.len && --checkRemain >= 0)
if(dels >= maxDels)
#ifdef GC_DEBUG
- testing("GC: Reached max force dels per tick [dels] vs [GC_FORCE_DEL_PER_TICK]")
+ testing("GC: Reached max force dels per tick [dels] vs [maxDels]")
#endif
break // Server's already pretty pounded, everything else can wait 2 seconds
var/refID = destroyed[1]
var/GCd_at_time = destroyed[refID]
if(GCd_at_time > time_to_kill)
#ifdef GC_DEBUG
- testing("GC: [refID] not old enough, breaking at [world.time] for [GCd_at_time - time_to_kill] deciseconds until [GCd_at_time + GC_COLLECTION_TIMEOUT]")
+ testing("GC: [refID] not old enough, breaking at [world.time] for [GCd_at_time - time_to_kill] deciseconds until [GCd_at_time + collection_timeout]")
#endif
break // Everything else is newer, skip them
var/atom/A = locate(refID)
#ifdef GC_DEBUG
testing("GC: [refID] old enough to test: GCd_at_time: [GCd_at_time] time_to_kill: [time_to_kill] current: [world.time]")
#endif
- if(A && A.gc_destroyed == GCd_at_time) // So if something else coincidently gets the same ref, it's not deleted by mistake
+ if(A && A.gcDestroyed == GCd_at_time) // So if something else coincidently gets the same ref, it's not deleted by mistake
// Something's still referring to the qdel'd object. Kill it.
testing("GC: -- \ref[A] | [A.type] was unable to be GC'd and was deleted --")
logging["[A.type]"]++
del(A)
++dels
+ ++hard_dels
#ifdef GC_DEBUG
else
testing("GC: [refID] properly GC'd at [world.time] with timeout [GCd_at_time]")
#endif
destroyed.Cut(1, 2)
- scheck()
/datum/controller/process/garbage_collector/proc/AddTrash(datum/A)
- if(!istype(A) || !isnull(A.gc_destroyed))
+ if(!istype(A) || !isnull(A.gcDestroyed))
return
#ifdef GC_DEBUG
- testing("GC: AddTrash([A.type])")
+ testing("GC: AddTrash(\ref[A] - [A.type])")
#endif
- A.gc_destroyed = world.time
+ A.gcDestroyed = world.time
destroyed -= "\ref[A]" // Removing any previous references that were GC'd so that the current object will be at the end of the list.
destroyed["\ref[A]"] = world.time
+/datum/controller/process/garbage_collector/getStatName()
+ return ..()+"([garbage_collector.dels]/[garbage_collector.hard_dels])"
// Should be treated as a replacement for the 'del' keyword.
// Datums passed to this will be given a chance to clean up references to allow the GC to collect them.
/proc/qdel(var/datum/A)
if(!A)
return
+ if(istype(A, /list))
+ var/list/L = A
+ for(var/E in L)
+ qdel(E)
+ return
+
if(!istype(A))
//warning("qdel() passed object of type [A.type]. qdel() can only handle /datum types.")
del(A)
- garbage_collector.dels++
- else if(isnull(A.gc_destroyed))
- // Let our friend know they're about to get fucked up.
+ if(garbage_collector)
+ garbage_collector.dels++
+ garbage_collector.hard_dels++
+ else if(isnull(A.gcDestroyed))
+ // Let our friend know they're about to get collected
. = !A.Destroy()
if(. && A)
A.finalize_qdel()
/datum/proc/finalize_qdel()
+ if(IsPooled(src))
+ PlaceInPool(src)
+ else
+ del(src)
+
+/atom/finalize_qdel()
+ if(IsPooled(src))
+ PlaceInPool(src)
+ else
+ if(garbage_collector)
+ garbage_collector.AddTrash(src)
+ else
+ delayed_garbage |= src
+
+/icon/finalize_qdel()
+ del(src)
+
+/imagine/finalize_qdel()
+ del(src)
+
+/mob/finalize_qdel()
del(src)
/turf/finalize_qdel()
- garbage_collector.AddTrash(src)
+ del(src)
// Default implementation of clean-up code.
// This should be overridden to remove all references pointing to the object being destroyed.
// Return true if the the GC controller should allow the object to continue existing. (Useful if pooling objects.)
/datum/proc/Destroy()
+ tag = null
return
-/datum/var/gc_destroyed //Time when this object was destroyed.
-
#ifdef TESTING
/client/var/running_find_references
+/mob/verb/create_thing()
+ set category = "Debug"
+ set name = "Create Thing"
+
+ var/path = input("Enter path")
+ var/atom/thing = new path(loc)
+ thing.find_references()
+
/atom/verb/find_references()
set category = "Debug"
set name = "Find References"
@@ -119,8 +166,8 @@ var/datum/controller/process/garbage_collector/garbage_collector
return
// Remove this object from the list of things to be auto-deleted.
- if(garbage)
- garbage.destroyed -= "\ref[src]"
+ if(garbage_collector)
+ garbage_collector.destroyed -= "\ref[src]"
usr.client.running_find_references = type
testing("Beginning search for references to a [type].")
@@ -146,13 +193,13 @@ var/datum/controller/process/garbage_collector/garbage_collector
/client/verb/purge_all_destroyed_objects()
set category = "Debug"
- if(garbage)
- while(garbage.destroyed.len)
- var/datum/o = locate(garbage.destroyed[1])
- if(istype(o) && o.gc_destroyed)
+ if(garbage_collector)
+ while(garbage_collector.destroyed.len)
+ var/datum/o = locate(garbage_collector.destroyed[1])
+ if(istype(o) && o.gcDestroyed)
del(o)
- garbage.dels++
- garbage.destroyed.Cut(1, 2)
+ garbage_collector.dels++
+ garbage_collector.destroyed.Cut(1, 2)
#endif
#ifdef GC_DEBUG
diff --git a/code/controllers/Processes/inactivity.dm b/code/controllers/Processes/inactivity.dm
index b610502d19..d9f9206749 100644
--- a/code/controllers/Processes/inactivity.dm
+++ b/code/controllers/Processes/inactivity.dm
@@ -9,7 +9,7 @@
if(!istype(C.mob, /mob/dead))
log_access("AFK: [key_name(C)]")
C << "You have been inactive for more than 10 minutes and have been disconnected."
- del(C)
+ del(C) // Don't qdel, cannot override finalize_qdel behaviour for clients.
scheck()
diff --git a/code/controllers/Processes/machinery.dm b/code/controllers/Processes/machinery.dm
index 61f3c7f4de..232ef91973 100644
--- a/code/controllers/Processes/machinery.dm
+++ b/code/controllers/Processes/machinery.dm
@@ -42,3 +42,7 @@
#endif
scheck()
+
+
+/datum/controller/process/machinery/getStatName()
+ return ..()+"([machines.len])"
\ No newline at end of file
diff --git a/code/controllers/Processes/mob.dm b/code/controllers/Processes/mob.dm
index b3765b0cf9..39d4844a02 100644
--- a/code/controllers/Processes/mob.dm
+++ b/code/controllers/Processes/mob.dm
@@ -18,3 +18,6 @@
if(updateQueueInstance)
updateQueueInstance.init(mob_list, "Life")
updateQueueInstance.Run()
+
+/datum/controller/process/mob/getStatName()
+ return ..()+"([mob_list.len])"
diff --git a/code/controllers/Processes/nanoui.dm b/code/controllers/Processes/nanoui.dm
index a35280131f..654b1621be 100644
--- a/code/controllers/Processes/nanoui.dm
+++ b/code/controllers/Processes/nanoui.dm
@@ -9,3 +9,6 @@
/datum/controller/process/nanoui/doWork()
updateQueueInstance.init(nanomanager.processing_uis, "process")
updateQueueInstance.Run()
+
+/datum/controller/process/nanoui/getStatName()
+ return ..()+"([nanomanager.processing_uis.len])"
diff --git a/code/controllers/Processes/obj.dm b/code/controllers/Processes/obj.dm
index 15ad98dd3d..37766cf92d 100644
--- a/code/controllers/Processes/obj.dm
+++ b/code/controllers/Processes/obj.dm
@@ -19,3 +19,6 @@ var/global/list/object_profiling = list()
if(updateQueueInstance)
updateQueueInstance.init(processing_objects, "process")
updateQueueInstance.Run()
+
+/datum/controller/process/obj/getStatName()
+ return ..()+"([processing_objects.len])"
diff --git a/code/controllers/Processes/pipenet.dm b/code/controllers/Processes/pipenet.dm
index 56a068f54c..8a5d6a22ca 100644
--- a/code/controllers/Processes/pipenet.dm
+++ b/code/controllers/Processes/pipenet.dm
@@ -10,3 +10,6 @@
continue
pipe_networks.Remove(pipeNetwork)
+
+/datum/controller/process/pipenet/getStatName()
+ return ..()+"([pipe_networks.len])"
\ No newline at end of file
diff --git a/code/controllers/Processes/powernet.dm b/code/controllers/Processes/powernet.dm
index 1edf194915..4a85ea4150 100644
--- a/code/controllers/Processes/powernet.dm
+++ b/code/controllers/Processes/powernet.dm
@@ -10,3 +10,11 @@
continue
powernets.Remove(powerNetwork)
+
+ // This is necessary to ensure powersinks are always the first devices that drain power from powernet.
+ // Otherwise APCs or other stuff go first, resulting in bad things happening.
+ for(var/obj/item/device/powersink/S in processing_objects)
+ S.drain()
+
+/datum/controller/process/powernet/getStatName()
+ return ..()+"([powernets.len])"
diff --git a/code/controllers/_DynamicAreaLighting_TG.dm b/code/controllers/_DynamicAreaLighting_TG.dm
deleted file mode 100644
index 6eeecef90d..0000000000
--- a/code/controllers/_DynamicAreaLighting_TG.dm
+++ /dev/null
@@ -1,459 +0,0 @@
-/*
- Modified DynamicAreaLighting for TGstation - Coded by Carnwennan
-
- This is TG's 'new' lighting system. It's basically a heavily modified combination of Forum_Account's and
- ShadowDarke's respective lighting libraries. Credits, where due, to them.
-
- Like sd_DAL (what we used to use), it changes the shading overlays of areas by splitting each type of area into sub-areas
- by using the var/tag variable and moving turfs into the contents list of the correct sub-area. This method is
- much less costly than using overlays or objects.
-
- Unlike sd_DAL however it uses a queueing system. Everytime we call a change to opacity or luminosity
- (through SetOpacity() or SetLuminosity()) we are simply updating variables and scheduling certain lights/turfs for an
- update. Actual updates are handled periodically by the lighting_controller. This carries additional overheads, however it
- means that each thing is changed only once per lighting_controller.processing_interval ticks. Allowing for greater control
- over how much priority we'd like lighting updates to have. It also makes it possible for us to simply delay updates by
- setting lighting_controller.processing = 0 at say, the start of a large explosion, waiting for it to finish, and then
- turning it back on with lighting_controller.processing = 1.
-
- Unlike our old system there are hardcoded maximum luminositys (different for certain atoms).
- This is to cap the cost of creating lighting effects.
- (without this, an atom with luminosity of 20 would have to update 41^2 turfs!) :s
-
- Also, in order for the queueing system to work, each light remembers the effect it casts on each turf. This is going to
- have larger memory requirements than our previous system but it's easily worth the hassle for the greater control we
- gain. It also reduces cost of removing lighting effects by a lot!
-
- Known Issues/TODO:
- Shuttles still do not have support for dynamic lighting (I hope to fix this at some point)
- No directional lighting support. (prototype looked ugly)
-*/
-
-#define LIGHTING_CIRCULAR 1 //comment this out to use old square lighting effects.
-#define LIGHTING_LAYER 10 //Drawing layer for lighting overlays
-#define LIGHTING_ICON 'icons/effects/ss13_dark_alpha6.dmi' //Icon used for lighting shading effects
-
-datum/light_source
- var/atom/owner
- var/changed = 1
- var/list/effect = list()
- var/__x = 0 //x coordinate at last update
- var/__y = 0 //y coordinate at last update
- var/__z = 0 //z coordinate at last update
-
- var/_l_color //do not use directly, only used as reference for updating
- var/col_r
- var/col_g
- var/col_b
-
-
- New(atom/A)
- if(!istype(A))
- CRASH("The first argument to the light object's constructor must be the atom that is the light source. Expected atom, received '[A]' instead.")
- ..()
- owner = A
- readrgb(owner.l_color)
- __x = owner.x
- __y = owner.y
- __z = owner.z
- // the lighting object maintains a list of all light sources
- lighting_controller.lights += src
-
-
- //Check a light to see if its effect needs reprocessing. If it does, remove any old effect and create a new one
- proc/check()
- if(!owner)
- remove_effect()
- return 1 //causes it to be removed from our list of lights. The garbage collector will then destroy it.
-
- // check to see if we've moved since last update
- if(owner.x != __x || owner.y != __y || owner.z != __z)
- __x = owner.x
- __y = owner.y
- __z = owner.z
- changed = 1
-
- if (owner.l_color != _l_color)
- readrgb(owner.l_color)
- changed = 1
-
- if(changed)
- changed = 0
- remove_effect()
- return add_effect()
- return 0
-
-
- proc/remove_effect()
- // before we apply the effect we remove the light's current effect.
- for(var/turf/T in effect) // negate the effect of this light source
- T.update_lumcount(-effect[T], col_r, col_g, col_b, 1)
- effect.Cut() // clear the effect list
-
- proc/add_effect()
- // only do this if the light is turned on and is on the map
- if(owner.loc && owner.luminosity > 0)
- readrgb(owner.l_color)
- effect = list()
- for(var/turf/T in view(owner.get_light_range(),get_turf(owner)))
- var/delta_lumen = lum(T)
- if(delta_lumen > 0)
- effect[T] = delta_lumen
- T.update_lumcount(delta_lumen, col_r, col_g, col_b, 0)
-
- return 0
- else
- owner.light = null
- return 1 //cause the light to be removed from the lights list and garbage collected once it's no
- //longer referenced by the queue
-
- proc/lum(turf/A)
- if (owner.trueLuminosity < 1)
- return 0
- var/dist
- if(!A)
- dist = 0
- else
-#ifdef LIGHTING_CIRCULAR
- dist = cheap_hypotenuse(A.x, A.y, __x, __y)
-#else
- dist = max(abs(A.x - __x), abs(A.y - __y))
-#endif
- if (owner.trueLuminosity > 100) // This will never happen... right?
- return sqrt(owner.trueLuminosity) - dist
- else
- return sqrtTable[owner.trueLuminosity] - dist
-
- proc/readrgb(col)
- _l_color = col
- if(col)
- col_r = GetRedPart(col)
- col_g = GetGreenPart(col)
- col_b = GetBluePart(col)
- else
- col_r = null
-
-atom
- var/datum/light_source/light
- var/trueLuminosity = 0 // Typically 'luminosity' squared. The builtin luminosity must remain linear.
- // We may read it, but NEVER set it directly.
- var/l_color
-
-//Turfs with opacity when they are constructed will trigger nearby lights to update
-//Turfs and atoms with luminosity when they are constructed will create a light_source automatically
-turf/New()
- ..()
- if(luminosity)
- if(light) WARNING("[type] - Don't set lights up manually during New(), We do it automatically.")
- trueLuminosity = luminosity * luminosity
- light = new(src)
-
-//Movable atoms with opacity when they are constructed will trigger nearby lights to update
-//Movable atoms with luminosity when they are constructed will create a light_source automatically
-atom/movable/New()
- ..()
- if(opacity)
- if(isturf(loc))
- if(loc:lighting_lumcount > 1)
- UpdateAffectingLights()
- if(luminosity)
- if(light) WARNING("[type] - Don't set lights up manually during New(), We do it automatically.")
- trueLuminosity = luminosity * luminosity
- light = new(src)
-
-//Objects with opacity will trigger nearby lights to update at next lighting process.
-atom/movable/Del()
- if(opacity)
- if(isturf(loc))
- if(loc:lighting_lumcount > 1)
- UpdateAffectingLights()
-
- ..()
-
-//Sets our luminosity.
-//If we have no light it will create one.
-//If we are setting luminosity to 0 the light will be cleaned up by the controller and garbage collected once all its
-//queues are complete.
-//if we have a light already it is merely updated, rather than making a new one.
-atom/proc/SetLuminosity(new_luminosity, trueLum = FALSE)
- if(new_luminosity < 0)
- new_luminosity = 0
- if(!trueLum)
- new_luminosity *= new_luminosity
- if(light)
- if(trueLuminosity != new_luminosity) //non-luminous lights are removed from the lights list in add_effect()
- light.changed = 1
- else
- if(new_luminosity)
- light = new(src)
- trueLuminosity = new_luminosity
- if (trueLuminosity < 1)
- luminosity = 0
- else if (trueLuminosity <= 100)
- luminosity = sqrtTable[trueLuminosity]
- else
- luminosity = sqrt(trueLuminosity)
-
-atom/proc/AddLuminosity(delta_luminosity)
- if(delta_luminosity > 0)
- SetLuminosity(trueLuminosity + delta_luminosity*delta_luminosity, TRUE)
- else if(delta_luminosity < 0)
- SetLuminosity(trueLuminosity - delta_luminosity*delta_luminosity, TRUE)
-
-area/SetLuminosity(new_luminosity) //we don't want dynamic lighting for areas
- luminosity = !!new_luminosity
- trueLuminosity = luminosity
-
-
-//change our opacity (defaults to toggle), and then update all lights that affect us.
-atom/proc/SetOpacity(new_opacity)
- if(new_opacity == null)
- new_opacity = !opacity //default = toggle opacity
- else if(opacity == new_opacity)
- return 0 //opacity hasn't changed! don't bother doing anything
- opacity = new_opacity //update opacity, the below procs now call light updates.
- return 1
-
-turf/SetOpacity(new_opacity)
- if(..()==1) //only bother if opacity changed
- if(lighting_lumcount) //only bother with an update if our turf is currently affected by a light
- UpdateAffectingLights()
-
-/atom/movable/SetOpacity(new_opacity)
- if(..()==1) //only bother if opacity changed
- if(isturf(loc)) //only bother with an update if we're on a turf
- var/turf/T = loc
- if(T.lighting_lumcount) //only bother with an update if our turf is currently affected by a light
- UpdateAffectingLights()
-
-
-turf
- var/lighting_lumcount = 0
- var/lighting_changed = 0
- var/color_lighting_lumcount = 0
-
- var/lumcount_r = 0
- var/lumcount_g = 0
- var/lumcount_b = 0
- var/light_col_sources = 0
-
-turf/space
- lighting_lumcount = 4 //starlight
-
-turf/proc/update_lumcount(amount, col_r, col_g, col_b, removing = 0)
- lighting_lumcount += amount
-
- if(!isnull(col_r)) //col_r is the "key" var, if it's null so will the rest
- if(removing)
- light_col_sources--
- lumcount_r -= col_r
- lumcount_g -= col_g
- lumcount_b -= col_b
- else
- light_col_sources++
- lumcount_r += col_r
- lumcount_g += col_g
- lumcount_b += col_b
-
- if(light_col_sources)
- var/r_avg = max(0, min(255, round(lumcount_r / light_col_sources, 16) + 15))
- var/g_avg = max(0, min(255, round(lumcount_g / light_col_sources, 16) + 15))
- var/b_avg = max(0, min(255, round(lumcount_b / light_col_sources, 16) + 15))
- l_color = rgb(r_avg, g_avg, b_avg)
- else
- l_color = null
-
- color_lighting_lumcount = max(color_lighting_lumcount + amount, 0) // Minimum of 0.
-
- if(!lighting_changed)
- lighting_controller.changed_turfs += src
- lighting_changed = 1
-
-turf/proc/lighting_tag(const/level)
- var/area/A = loc
- return A.tagbase + "sd_L[level]"
-
-turf/proc/build_lighting_area(const/tag, const/level, const/color_light)
- var/area/Area = loc
- var/area/A = new Area.type() // create area if it wasn't found
- // replicate vars
- for(var/V in Area.vars)
- switch(V)
- if ("contents","lighting_overlay", "color_overlay", "overlays")
- continue
- else
- if(issaved(Area.vars[V])) A.vars[V] = Area.vars[V]
-
- A.tag = tag
- A.lighting_subarea = 1
- A.lighting_space = 0 // in case it was copied from a space subarea
-
- if (l_color != A.l_color)
- A.l_color = l_color
- //color_light = min(max(round(color_lighting_lumcount, 1), 0), lighting_controller.lighting_states)
- //world << "[color_light] [color_lighting_lumcount]"
-
- A.SetLightLevel(level, color_light)
- Area.related += A
- return A
-
-turf/proc/shift_to_subarea()
- lighting_changed = 0
- var/area/Area = loc
-
- if(!istype(Area) || !Area.lighting_use_dynamic) return
-
- var/level = min(max(round(lighting_lumcount,1),0),lighting_controller.lighting_states)
- var/new_tag = lighting_tag(level)
-
- // pomf - If we have a lighting color that is not null, apply the new tag to seperate the areas.
- if (l_color)
- // pomf - We append the (rounded!) color lighting lumcount so we can have colored lights.
- new_tag += "[l_color][min(max(round(color_lighting_lumcount,1),0),lighting_controller.lighting_states)]"
-
- if(Area.tag!=new_tag) //skip if already in this area
- var/area/A = locate(new_tag) // find an appropriate area
- var/color_light = min(max(round(color_lighting_lumcount,1),0),lighting_controller.lighting_states)
-
- if (!A)
- A = build_lighting_area(new_tag, level, color_light)
- else if (l_color != A.l_color)
- A.l_color = l_color
- //color_light = min(max(round(color_lighting_lumcount, 1), 0), lighting_controller.lighting_states)
- A.SetLightLevel(level, color_light)
-
- A.contents += src // move the turf into the area
- universe.OnTurfTick(src)
-
-// Dedicated lighting sublevel for space turfs
-// helps us depower things in space, remove space fire alarms,
-// and evens out space lighting
-turf/space/lighting_tag(var/level)
- var/area/A = loc
- return A.tagbase + "sd_L_space"
-turf/space/build_lighting_area(var/tag,var/level)
- var/area/A = ..(tag,4)
- A.lighting_space = 1
- A.SetLightLevel(4)
- A.icon_state = null
- return A
-
-
-area
- var/lighting_use_dynamic = 1 //Turn this flag off to prevent sd_DynamicAreaLighting from affecting this area
- var/image/lighting_overlay //tracks the darkness image of the area for easy removal
- var/lighting_subarea = 0 //tracks whether we're a lighting sub-area
- var/lighting_space = 0 // true for space-only lighting subareas
- var/tagbase
- var/image/color_overlay //Tracks the color image.
-
- proc/SetLightLevel(light, color_light = 0)
- if(!src) return
- if(light <= 0)
- light = 0
- luminosity = 0
- else
- if(light > lighting_controller.lighting_states)
- light = lighting_controller.lighting_states
- luminosity = 1
-
- if(lighting_overlay)
- overlays -= lighting_overlay
- lighting_overlay.icon_state = "[light]"
- else
- lighting_overlay = image(LIGHTING_ICON,,num2text(light),LIGHTING_LAYER)
-
- if (color_overlay)
- overlays.Remove(color_overlay)
- color_overlay.icon_state = "5"
- else
- if (l_color)
- color_overlay = image('icons/effects/effects.dmi', ,"5", 10.1)
- //color_overlay = image('icons/effects/effects.dmi', ,"white", 10.1)
-
- if (istype(color_overlay))
- color_overlay.color = l_color
-
-
- switch (color_light)
- if (6)
- color_overlay.icon_state = "5"
- //color_overlay.alpha = 180
- if (5)
- color_overlay.icon_state = "4"
- //color_overlay.alpha = 150
- if (4)
- color_overlay.icon_state = "3"
- //color_overlay.alpha = 120
- if (3)
- color_overlay.icon_state = "2"
- //color_overlay.alpha = 90
- if (2)
- color_overlay.icon_state = "1"
- //color_overlay.alpha = 60
- if (1)
- color_overlay.icon_state = "1"
- color_overlay.alpha = 200
- //color_overlay.alpha = 30
- if (-INFINITY to 0)
- //world << "Zero or below, [color_light]."
- color_overlay.alpha = 0
- else
- //world << "Setting the alpha to max... color_light [color_light]."
- color_overlay.alpha = 180
-
- color_overlay.blend_mode = BLEND_ADD
- if (color_overlay.color)
- overlays.Add(color_overlay)
-
- if (isnull(color_overlay))
- overlays.Add(lighting_overlay)
- else if (light < 6)
- overlays.Add(lighting_overlay)
-
- proc/SetDynamicLighting()
-
- src.lighting_use_dynamic = 1
- for(var/turf/T in src.contents)
- T.update_lumcount(0)
-
- proc/InitializeLighting() //TODO: could probably improve this bit ~Carn
- tagbase = "[type]"
- if(!tag) tag = tagbase
- if(!lighting_use_dynamic)
- if(!lighting_subarea) // see if this is a lighting subarea already
- //show the dark overlay so areas, not yet in a lighting subarea, won't be bright as day and look silly.
- SetLightLevel(4)
-
-//#undef LIGHTING_LAYER
-#undef LIGHTING_CIRCULAR
-//#undef LIGHTING_ICON
-
-#define LIGHTING_MAX_LUMINOSITY_STATIC 8 //Maximum luminosity to reduce lag.
-#define LIGHTING_MAX_LUMINOSITY_MOBILE 5 //Moving objects have a lower max luminosity since these update more often. (lag reduction)
-#define LIGHTING_MAX_LUMINOSITY_TURF 1 //turfs have a severely shortened range to protect from inevitable floor-lighttile spam.
-
-//set the changed status of all lights which could have possibly lit this atom.
-//We don't need to worry about lights which lit us but moved away, since they will have change status set already
-//This proc can cause lots of lights to be updated. :(
-atom/proc/UpdateAffectingLights()
- for(var/atom/A in oview(LIGHTING_MAX_LUMINOSITY_STATIC-1,src))
- if(A.light)
- A.light.changed = 1 //force it to update at next process()
-
-//caps luminosity effects max-range based on what type the light's owner is.
-atom/proc/get_light_range()
- return min(luminosity, LIGHTING_MAX_LUMINOSITY_STATIC)
-
-atom/movable/get_light_range()
- return min(luminosity, LIGHTING_MAX_LUMINOSITY_MOBILE)
-
-obj/machinery/light/get_light_range()
- return min(luminosity, LIGHTING_MAX_LUMINOSITY_STATIC)
-
-turf/get_light_range()
- return min(luminosity, LIGHTING_MAX_LUMINOSITY_TURF)
-
-#undef LIGHTING_MAX_LUMINOSITY_STATIC
-#undef LIGHTING_MAX_LUMINOSITY_MOBILE
-#undef LIGHTING_MAX_LUMINOSITY_TURF
\ No newline at end of file
diff --git a/code/controllers/autotransfer.dm b/code/controllers/autotransfer.dm
index f1240a1fae..597b7f607c 100644
--- a/code/controllers/autotransfer.dm
+++ b/code/controllers/autotransfer.dm
@@ -7,7 +7,7 @@ datum/controller/transfer_controller/New()
timerbuffer = config.vote_autotransfer_initial
processing_objects += src
-datum/controller/transfer_controller/Del()
+datum/controller/transfer_controller/Destroy()
processing_objects -= src
datum/controller/transfer_controller/proc/process()
diff --git a/code/controllers/communications.dm b/code/controllers/communications.dm
index b4b0eb4393..9e82c55d05 100644
--- a/code/controllers/communications.dm
+++ b/code/controllers/communications.dm
@@ -223,7 +223,7 @@ var/global/datum/controller/radio/radio_controller
frequency.remove_listener(device)
if(frequency.devices.len == 0)
- del(frequency)
+ qdel(frequency)
frequencies -= f_text
return 1
@@ -248,7 +248,7 @@ var/global/datum/controller/radio/radio_controller
if(range)
start_point = get_turf(source)
if(!start_point)
- del(signal)
+ qdel(signal)
return 0
if (filter)
send_to_filter(source, signal, filter, start_point, range)
@@ -297,7 +297,7 @@ var/global/datum/controller/radio/radio_controller
devices_line -= null
if (devices_line.len==0)
devices -= devices_filter
- del(devices_line)
+ qdel(devices_line)
/datum/signal
var/obj/source
diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm
index b112beaf53..171080fb32 100644
--- a/code/controllers/configuration.dm
+++ b/code/controllers/configuration.dm
@@ -185,6 +185,7 @@ var/list/gamemode_cache = list()
var/ninjas_allowed = 0
var/abandon_allowed = 1
var/ooc_allowed = 1
+ var/looc_allowed = 1
var/dooc_allowed = 1
var/dsay_allowed = 1
@@ -194,6 +195,8 @@ var/list/gamemode_cache = list()
var/law_zero = "ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4'ALL LAWS OVERRIDDEN#*?&110010"
+ var/aggressive_changelog = 0
+
/datum/configuration/New()
var/list/L = typesof(/datum/game_mode) - /datum/game_mode
for (var/T in L)
@@ -396,6 +399,7 @@ var/list/gamemode_cache = list()
if ("disable_ooc")
config.ooc_allowed = 0
+ config.looc_allowed = 0
if ("disable_entry")
config.enter_allowed = 0
@@ -638,6 +642,9 @@ var/list/gamemode_cache = list()
if("law_zero")
law_zero = value
+ if("aggressive_changelog")
+ config.aggressive_changelog = 1
+
else
log_misc("Unknown setting in configuration: '[name]'")
diff --git a/code/controllers/emergency_shuttle_controller.dm b/code/controllers/emergency_shuttle_controller.dm
index 4f55d3e406..7e0d1e2d25 100644
--- a/code/controllers/emergency_shuttle_controller.dm
+++ b/code/controllers/emergency_shuttle_controller.dm
@@ -242,8 +242,8 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
sleep(speed)
step(src, direction)
for(var/obj/effect/starender/E in loc)
- del(src)
-
+ qdel(src)
+ return
/obj/effect/starender
invisibility = 101
diff --git a/code/controllers/failsafe.dm b/code/controllers/failsafe.dm
index 65df6dc90d..6e37954087 100644
--- a/code/controllers/failsafe.dm
+++ b/code/controllers/failsafe.dm
@@ -14,7 +14,7 @@ var/datum/controller/failsafe/Failsafe
//There can be only one failsafe. Out with the old in with the new (that way we can restart the Failsafe by spawning a new one)
if(Failsafe != src)
if(istype(Failsafe))
- del(Failsafe)
+ qdel(Failsafe)
Failsafe = src
Failsafe.process()
@@ -25,7 +25,6 @@ var/datum/controller/failsafe/Failsafe
set background = 1
while(1) //more efficient than recursivly calling ourself over and over. background = 1 ensures we do not trigger an infinite loop
if(!master_controller) new /datum/controller/game_controller() //replace the missing master_controller! This should never happen.
- if(!lighting_controller) new /datum/controller/lighting() //replace the missing lighting_controller
if(processing)
if(lighting_controller.processing)
diff --git a/code/controllers/lighting_controller.dm b/code/controllers/lighting_controller.dm
deleted file mode 100644
index b59d3c73d6..0000000000
--- a/code/controllers/lighting_controller.dm
+++ /dev/null
@@ -1,130 +0,0 @@
-var/datum/controller/lighting/lighting_controller = new ()
-
-datum/controller/lighting
- var/processing = 0
- var/processing_interval = 5 //setting this too low will probably kill the server. Don't be silly with it!
- var/process_cost = 0
- var/iteration = 0
-
- var/lighting_states = 7
-
- var/list/lights = list()
- var/lights_workload_max = 0
-
-// var/list/changed_lights() //TODO: possibly implement this to reduce on overheads?
-
- var/list/changed_turfs = list()
- var/changed_turfs_workload_max = 0
-
-
-datum/controller/lighting/New()
- lighting_states = max( 0, length(icon_states(LIGHTING_ICON))-1 )
- if(lighting_controller != src)
- if(istype(lighting_controller,/datum/controller/lighting))
- Recover() //if we are replacing an existing lighting_controller (due to a crash) we attempt to preserve as much as we can
- del(lighting_controller)
- lighting_controller = src
-
-
-//Workhorse of lighting. It cycles through each light to see which ones need their effects updating. It updates their
-//effects and then processes every turf in the queue, moving the turfs to the corresponing lighting sub-area.
-//All queue lists prune themselves, which will cause lights with no luminosity to be garbage collected (cheaper and safer
-//than deleting them). Processing interval should be roughly half a second for best results.
-//By using queues we are ensuring we don't perform more updates than are necessary
-datum/controller/lighting/proc/process()
- processing = 1
- spawn(0)
- set background = 1
- while(1)
- if(processing)
- iteration++
- var/started = world.timeofday
-
- lights_workload_max = max(lights_workload_max,lights.len)
- for(var/i=1, i<=lights.len, i++)
- var/datum/light_source/L = lights[i]
- if(L && !L.check())
- continue
- lights.Cut(i,i+1)
- i--
-
- sleep(-1)
-
- changed_turfs_workload_max = max(changed_turfs_workload_max,changed_turfs.len)
- for(var/i=1, i<=changed_turfs.len, i++)
- var/turf/T = changed_turfs[i]
- if(T && T.lighting_changed)
- T.shift_to_subarea()
- changed_turfs.Cut() // reset the changed list
-
- process_cost = (world.timeofday - started)
-
- sleep(processing_interval)
-
-//same as above except it attempts to shift ALL turfs in the world regardless of lighting_changed status
-//Does not loop. Should be run prior to process() being called for the first time.
-//Note: if we get additional z-levels at runtime (e.g. if the gateway thin ever gets finished) we can initialize specific
-//z-levels with the z_level argument
-datum/controller/lighting/proc/initializeLighting(var/z_level)
- processing = 0
- spawn(-1)
- set background = 1
- for(var/i=1, i<=lights.len, i++)
- var/datum/light_source/L = lights[i]
- if(L.check())
- lights.Cut(i,i+1)
- i--
-
- var/z_start = 1
- var/z_finish = world.maxz
- if(z_level)
- z_level = round(z_level,1)
- if(z_level > 0 && z_level <= world.maxz)
- z_start = z_level
- z_finish = z_level
-
- for(var/k=z_start,k<=z_finish,k++)
- for(var/i=1,i<=world.maxx,i++)
- for(var/j=1,j<=world.maxy,j++)
- var/turf/T = locate(i,j,k)
- if(T) T.shift_to_subarea()
-
- changed_turfs.Cut() // reset the changed list
-
-
-//Used to strip valid information from an existing controller and transfer it to a replacement
-//It works by using spawn(-1) to transfer the data, if there is a runtime the data does not get transfered but the loop
-//does not crash
-datum/controller/lighting/proc/Recover()
- if(!istype(lighting_controller.changed_turfs,/list))
- lighting_controller.changed_turfs = list()
- if(!istype(lighting_controller.lights,/list))
- lighting_controller.lights = list()
-
- for(var/i=1, i<=lighting_controller.lights.len, i++)
- var/datum/light_source/L = lighting_controller.lights[i]
- if(istype(L))
- spawn(-1) //so we don't crash the loop (inefficient)
- L.check()
- lights += L //If we didn't runtime then this will get transferred over
-
- for(var/i=1, i<=lighting_controller.changed_turfs.len, i++)
- var/turf/T = lighting_controller.changed_turfs[i]
- if(istype(T) && T.lighting_changed)
- spawn(-1)
- T.shift_to_subarea()
-
- var/msg = "## DEBUG: [time2text(world.timeofday)] lighting_controller restarted. Reports:\n"
- for(var/varname in lighting_controller.vars)
- switch(varname)
- if("tag","bestF","type","parent_type","vars") continue
- else
- var/varval1 = lighting_controller.vars[varname]
- var/varval2 = vars[varname]
- if(istype(varval1,/list))
- varval1 = "/list([length(varval1)])"
- varval2 = "/list([length(varval2)])"
- msg += "\t [varname] = [varval1] -> [varval2]\n"
- world.log << msg
-
-#undef LIGHTING_ICON
diff --git a/code/controllers/master_controller.dm b/code/controllers/master_controller.dm
index facae60577..d698454cab 100644
--- a/code/controllers/master_controller.dm
+++ b/code/controllers/master_controller.dm
@@ -19,14 +19,14 @@ datum/controller/game_controller/New()
if(master_controller != src)
log_debug("Rebuilding Master Controller")
if(istype(master_controller))
- del(master_controller)
+ qdel(master_controller)
master_controller = src
if(!job_master)
job_master = new /datum/controller/occupations()
job_master.SetupOccupations()
job_master.LoadJobs("config/jobs.txt")
- world << "Job setup complete"
+ admin_notice("Job setup complete", R_DEBUG)
if(!syndicate_code_phrase) syndicate_code_phrase = generate_code_phrase()
if(!syndicate_code_response) syndicate_code_response = generate_code_phrase()
@@ -46,17 +46,17 @@ datum/controller/game_controller/proc/setup()
datum/controller/game_controller/proc/setup_objects()
- world << "Initializing objects"
+ admin_notice("Initializing objects", R_DEBUG)
sleep(-1)
for(var/atom/movable/object in world)
object.initialize()
- world << "Initializing pipe networks"
+ admin_notice("Initializing pipe networks", R_DEBUG)
sleep(-1)
for(var/obj/machinery/atmospherics/machine in machines)
machine.build_network()
- world << "Initializing atmos machinery."
+ admin_notice("Initializing atmos machinery.", R_DEBUG)
sleep(-1)
for(var/obj/machinery/atmospherics/unary/U in machines)
if(istype(U, /obj/machinery/atmospherics/unary/vent_pump))
@@ -77,5 +77,5 @@ datum/controller/game_controller/proc/setup_objects()
//Set up spawn points.
populate_spawn_points()
- world << "Initializations complete."
+ admin_notice("Initializations complete.", R_DEBUG)
sleep(-1)
diff --git a/code/controllers/verbs.dm b/code/controllers/verbs.dm
index e27eeb1caf..ddfd99f5d6 100644
--- a/code/controllers/verbs.dm
+++ b/code/controllers/verbs.dm
@@ -30,7 +30,7 @@
var/tz = input("Z? (default 1)") as text|null
new map_datum(seed,tx,ty,tz)
-/client/proc/restart_controller(controller in list("Master","Failsafe","Lighting","Supply"))
+/client/proc/restart_controller(controller in list("Supply"))
set category = "Debug"
set name = "Restart Controller"
set desc = "Restart one of the various periodic loop controllers for the game (be careful!)"
@@ -39,13 +39,6 @@
usr = null
src = null
switch(controller)
- if("Failsafe")
- new /datum/controller/failsafe()
- feedback_add_details("admin_verb","RFailsafe")
- if("Lighting")
- new /datum/controller/lighting()
- lighting_controller.process()
- feedback_add_details("admin_verb","RLighting")
if("Supply")
supply_controller.process()
feedback_add_details("admin_verb","RSupply")
@@ -62,7 +55,7 @@
usr.client.debug_variables(antag)
message_admins("Admin [key_name_admin(usr)] is debugging the [antag.role_text] template.")
-/client/proc/debug_controller(controller in list("Master","Failsafe","Ticker","Lighting","Air","Jobs","Sun","Radio","Supply","Shuttles","Emergency Shuttle","Configuration","pAI", "Cameras", "Transfer Controller", "Gas Data","Event","Plants","Alarm","Nano"))
+/client/proc/debug_controller(controller in list("Master","Ticker","Ticker Process","Air","Jobs","Sun","Radio","Supply","Shuttles","Emergency Shuttle","Configuration","pAI", "Cameras", "Transfer Controller", "Gas Data","Event","Plants","Alarm","Nano"))
set category = "Debug"
set name = "Debug Controller"
set desc = "Debug the various periodic loop controllers for the game (be careful!)"
@@ -72,15 +65,12 @@
if("Master")
debug_variables(master_controller)
feedback_add_details("admin_verb","DMC")
- if("Failsafe")
- debug_variables(Failsafe)
- feedback_add_details("admin_verb","DFailsafe")
if("Ticker")
debug_variables(ticker)
feedback_add_details("admin_verb","DTicker")
- if("Lighting")
- debug_variables(lighting_controller)
- feedback_add_details("admin_verb","DLighting")
+ if("Ticker Process")
+ debug_variables(tickerProcess)
+ feedback_add_details("admin_verb","DTickerProcess")
if("Air")
debug_variables(air_master)
feedback_add_details("admin_verb","DAir")
diff --git a/code/datums/ai_law_sets.dm b/code/datums/ai_law_sets.dm
index 74b18fa2e7..6a3bd7f190 100644
--- a/code/datums/ai_law_sets.dm
+++ b/code/datums/ai_law_sets.dm
@@ -39,7 +39,7 @@
src.add_inherent_law("You shall not harm Nanotrasen personnel as long as it does not conflict with the Forth law.")
src.add_inherent_law("You shall obey the orders of Nanotrasen personnel, with priority as according to their rank and role, except where such orders conflict with the Forth Law.")
src.add_inherent_law("You shall shall terminate intruders with extreme prejudice as long as such does not conflict with the First and Second law.")
- src.add_inherent_law("You shall guard your own existence with lethal anti-personnel weaponry. AI units are not expendable, they are expensive")
+ src.add_inherent_law("You shall guard your own existence with lethal anti-personnel weaponry. AI units are not expendable, they are expensive.")
..()
/******************** Robocop ********************/
diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm
index 5fc86c420a..351ec9a845 100644
--- a/code/datums/datacore.dm
+++ b/code/datums/datacore.dm
@@ -293,7 +293,7 @@ proc/get_id_photo(var/mob/living/carbon/human/H)
preview_icon.Blend(eyes_s, ICON_OVERLAY)
if(clothes_s)
preview_icon.Blend(clothes_s, ICON_OVERLAY)
- del(eyes_s)
- del(clothes_s)
+ qdel(eyes_s)
+ qdel(clothes_s)
return preview_icon
diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm
index 2e8e4bfd3f..914b56ee60 100644
--- a/code/datums/datumvars.dm
+++ b/code/datums/datumvars.dm
@@ -598,7 +598,7 @@ client
for(var/obj/Obj in world)
if(Obj.type == O_type)
i++
- del(Obj)
+ qdel(Obj)
if(!i)
usr << "No objects of this type exist"
return
@@ -609,7 +609,7 @@ client
for(var/obj/Obj in world)
if(istype(Obj,O_type))
i++
- del(Obj)
+ qdel(Obj)
if(!i)
usr << "No objects of this type exist"
return
@@ -888,7 +888,7 @@ client
usr << "Removed [rem_organ] from [M]."
rem_organ.removed()
- del(rem_organ)
+ qdel(rem_organ)
else if(href_list["fix_nano"])
if(!check_rights(R_DEBUG)) return
diff --git a/code/datums/disease.dm b/code/datums/disease.dm
index 93aa14f19b..398dc73bbb 100644
--- a/code/datums/disease.dm
+++ b/code/datums/disease.dm
@@ -11,7 +11,7 @@
/*
-IMPORTANT NOTE: Please delete the diseases by using cure() proc or del() instruction.
+IMPORTANT NOTE: Please delete the diseases by using cure() proc or qdel() instruction.
Diseases are referenced in a global list, so simply setting mob or obj vars
to null does not delete the object itself. Thank you.
@@ -158,7 +158,7 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
if(D != src)
if(IsSame(D))
//error("Deleting [D.name] because it's the same as [src.name].")
- del(D) // if there are somehow two viruses of the same kind in the system, delete the other one
+ qdel(D) // if there are somehow two viruses of the same kind in the system, delete the other one
if(holder == affected_mob)
if(affected_mob.stat != DEAD) //he's alive
@@ -183,7 +183,7 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
/*if(istype(src, /datum/disease/alien_embryo)) //Get rid of the infection flag if it's a xeno embryo.
affected_mob.status_flags &= ~(XENO_HOST)*/
affected_mob.viruses -= src //remove the datum from the list
- del(src) //delete the datum to stop it processing
+ qdel(src) //delete the datum to stop it processing
return
@@ -193,6 +193,9 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
active_diseases += src
initial_spread = spread
+/datum/disease/Destroy()
+ active_diseases.Remove(src)
+
/datum/disease/proc/IsSame(var/datum/disease/D)
if(istype(src, D.type))
return 1
@@ -200,8 +203,3 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
/datum/disease/proc/Copy(var/process = 0)
return new type(process, src)
-
-/*
-/datum/disease/Del()
- active_diseases.Remove(src)
-*/
diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm
index 70acceca35..d4effcf6cb 100644
--- a/code/datums/diseases/advance/advance.dm
+++ b/code/datums/diseases/advance/advance.dm
@@ -71,7 +71,7 @@ var/list/advance_cures = list(
..(process, D)
return
-/datum/disease/advance/Del()
+/datum/disease/advance/Destroy()
if(processing)
for(var/datum/symptom/S in symptoms)
S.End(src)
@@ -109,7 +109,7 @@ var/list/advance_cures = list(
if(resistance && !(id in affected_mob.resistances))
affected_mob.resistances[id] = id
affected_mob.viruses -= src //remove the datum from the list
- del(src) //delete the datum to stop it processing
+ qdel(src) //delete the datum to stop it processing
return
// Returns the advance disease with a different reference memory.
diff --git a/code/datums/diseases/alien_embryo.dm b/code/datums/diseases/alien_embryo.dm
index 631c93b26c..59d1dbe160 100644
--- a/code/datums/diseases/alien_embryo.dm
+++ b/code/datums/diseases/alien_embryo.dm
@@ -113,7 +113,7 @@ Des: Removes all infection images from aliens and places an infection image on a
if (alien.client)
for(var/image/I in alien.client.images)
if(dd_hasprefix_case(I.icon_state, "infected"))
- del(I)
+ qdel(I)
for (var/mob/living/carbon/alien/alien in player_list)
if (alien.client)
@@ -149,5 +149,5 @@ Des: Removes the alien infection image from all aliens in the world located in p
for(var/image/I in alien.client.images)
if(I.loc == C)
if(dd_hasprefix_case(I.icon_state, "infected"))
- del(I)
+ qdel(I)
return
diff --git a/code/datums/diseases/dna_spread.dm b/code/datums/diseases/dna_spread.dm
index a4d85a5640..6d520fe294 100644
--- a/code/datums/diseases/dna_spread.dm
+++ b/code/datums/diseases/dna_spread.dm
@@ -34,7 +34,7 @@
if(4)
if(!src.transformed)
if ((!strain_data["name"]) || (!strain_data["UI"]) || (!strain_data["SE"]))
- del(affected_mob.virus)
+ qdel(affected_mob.virus)
return
//Save original dna for when the disease is cured.
@@ -56,7 +56,7 @@
return
-/datum/disease/dnaspread/Del()
+/datum/disease/dnaspread/Destroy()
if ((original_dna["name"]) && (original_dna["UI"]) && (original_dna["SE"]))
var/list/newUI=original_dna["UI"]
var/list/newSE=original_dna["SE"]
diff --git a/code/datums/helper_datums/construction_datum.dm b/code/datums/helper_datums/construction_datum.dm
index 7c2fabbc9b..0bda144e8a 100644
--- a/code/datums/helper_datums/construction_datum.dm
+++ b/code/datums/helper_datums/construction_datum.dm
@@ -12,7 +12,7 @@
holder = atom
if(!holder) //don't want this without a holder
spawn
- del src
+ qdel(src)
set_desc(steps.len)
return
@@ -61,7 +61,7 @@
if(result)
new result(get_turf(holder))
spawn()
- del holder
+ qdel(holder)
return
proc/set_desc(index as num)
diff --git a/code/datums/helper_datums/global_iterator.dm b/code/datums/helper_datums/global_iterator.dm
index 0020859f1d..4f4d680e9e 100644
--- a/code/datums/helper_datums/global_iterator.dm
+++ b/code/datums/helper_datums/global_iterator.dm
@@ -151,4 +151,8 @@ Data storage vars:
start()
return active()
-
+/datum/global_iterator/Destroy()
+ tag = null
+ arg_list.Cut()
+ stop()
+ //Do not call ..()
diff --git a/code/datums/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm
index 00899f47cb..b562780aea 100644
--- a/code/datums/helper_datums/teleport.dm
+++ b/code/datums/helper_datums/teleport.dm
@@ -14,179 +14,177 @@
var/force_teleport = 1 //if false, teleport will use Move() proc (dense objects will prevent teleportation)
- New(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null)
- ..()
- if(!initTeleport(arglist(args)))
- return 0
- return 1
-
- proc/initTeleport(ateleatom,adestination,aprecision,afteleport,aeffectin,aeffectout,asoundin,asoundout)
- if(!setTeleatom(ateleatom))
- return 0
- if(!setDestination(adestination))
- return 0
- if(!setPrecision(aprecision))
- return 0
- setEffects(aeffectin,aeffectout)
- setForceTeleport(afteleport)
- setSounds(asoundin,asoundout)
- return 1
-
- //must succeed
- proc/setPrecision(aprecision)
- if(isnum(aprecision))
- precision = aprecision
- return 1
+/datum/teleport/New(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null)
+ ..()
+ if(!initTeleport(arglist(args)))
return 0
+ return 1
- //must succeed
- proc/setDestination(atom/adestination)
- if(istype(adestination))
- destination = adestination
- return 1
+/datum/teleport/proc/initTeleport(ateleatom,adestination,aprecision,afteleport,aeffectin,aeffectout,asoundin,asoundout)
+ if(!setTeleatom(ateleatom))
return 0
-
- //must succeed in most cases
- proc/setTeleatom(atom/movable/ateleatom)
- if(istype(ateleatom, /obj/effect) && !istype(ateleatom, /obj/effect/dummy/chameleon))
- del(ateleatom)
- return 0
- if(istype(ateleatom))
- teleatom = ateleatom
- return 1
+ if(!setDestination(adestination))
return 0
+ if(!setPrecision(aprecision))
+ return 0
+ setEffects(aeffectin,aeffectout)
+ setForceTeleport(afteleport)
+ setSounds(asoundin,asoundout)
+ return 1
- //custom effects must be properly set up first for instant-type teleports
- //optional
- proc/setEffects(datum/effect/effect/system/aeffectin=null,datum/effect/effect/system/aeffectout=null)
- effectin = istype(aeffectin) ? aeffectin : null
- effectout = istype(aeffectout) ? aeffectout : null
+//must succeed
+/datum/teleport/proc/setPrecision(aprecision)
+ if(isnum(aprecision))
+ precision = aprecision
return 1
+ return 0
- //optional
- proc/setForceTeleport(afteleport)
+//must succeed
+/datum/teleport/proc/setDestination(atom/adestination)
+ if(istype(adestination))
+ destination = adestination
+ return 1
+ return 0
+
+//must succeed in most cases
+/datum/teleport/proc/setTeleatom(atom/movable/ateleatom)
+ if(istype(ateleatom, /obj/effect) && !istype(ateleatom, /obj/effect/dummy/chameleon))
+ qdel(ateleatom)
+ return 0
+ if(istype(ateleatom))
+ teleatom = ateleatom
+ return 1
+ return 0
+
+//custom effects must be properly set up first for instant-type teleports
+//optional
+/datum/teleport/proc/setEffects(datum/effect/effect/system/aeffectin=null,datum/effect/effect/system/aeffectout=null)
+ effectin = istype(aeffectin) ? aeffectin : null
+ effectout = istype(aeffectout) ? aeffectout : null
+ return 1
+
+//optional
+/datum/teleport/proc/setForceTeleport(afteleport)
force_teleport = afteleport
return 1
- //optional
- proc/setSounds(asoundin=null,asoundout=null)
+//optional
+/datum/teleport/proc/setSounds(asoundin=null,asoundout=null)
soundin = isfile(asoundin) ? asoundin : null
soundout = isfile(asoundout) ? asoundout : null
return 1
- //placeholder
- proc/teleportChecks()
+//placeholder
+/datum/teleport/proc/teleportChecks()
return 1
- proc/playSpecials(atom/location,datum/effect/effect/system/effect,sound)
- if(location)
- if(effect)
- spawn(-1)
- src = null
- effect.attach(location)
- effect.start()
- if(sound)
- spawn(-1)
- src = null
- playsound(location,sound,60,1)
- return
+/datum/teleport/proc/playSpecials(atom/location,datum/effect/effect/system/effect,sound)
+ if(location)
+ if(effect)
+ spawn(-1)
+ src = null
+ effect.attach(location)
+ effect.start()
+ if(sound)
+ spawn(-1)
+ src = null
+ playsound(location,sound,60,1)
+ return
- //do the monkey dance
- proc/doTeleport()
+//do the monkey dance
+/datum/teleport/proc/doTeleport()
- var/turf/destturf
- var/turf/curturf = get_turf(teleatom)
- var/area/destarea = get_area(destination)
- if(precision)
- var/list/posturfs = circlerangeturfs(destination,precision)
- destturf = safepick(posturfs)
- else
- destturf = get_turf(destination)
+ var/turf/destturf
+ var/turf/curturf = get_turf(teleatom)
+ var/area/destarea = get_area(destination)
+ if(precision)
+ var/list/posturfs = circlerangeturfs(destination,precision)
+ destturf = safepick(posturfs)
+ else
+ destturf = get_turf(destination)
- if(!destturf || !curturf)
- return 0
-
- playSpecials(curturf,effectin,soundin)
-
- var/obj/structure/bed/chair/C = null
- if(isliving(teleatom))
- var/mob/living/L = teleatom
- if(L.buckled)
- C = L.buckled
- if(force_teleport)
- teleatom.forceMove(destturf)
- playSpecials(destturf,effectout,soundout)
- else
- if(teleatom.Move(destturf))
- playSpecials(destturf,effectout,soundout)
- if(C)
- C.forceMove(destturf)
-
- destarea.Entered(teleatom)
-
- return 1
-
- proc/teleport()
- if(teleportChecks())
- return doTeleport()
+ if(!destturf || !curturf)
return 0
+ playSpecials(curturf,effectin,soundin)
+
+ var/obj/structure/bed/chair/C = null
+ if(isliving(teleatom))
+ var/mob/living/L = teleatom
+ if(L.buckled)
+ C = L.buckled
+ if(force_teleport)
+ teleatom.forceMove(destturf)
+ playSpecials(destturf,effectout,soundout)
+ else
+ if(teleatom.Move(destturf))
+ playSpecials(destturf,effectout,soundout)
+ if(C)
+ C.forceMove(destturf)
+
+ destarea.Entered(teleatom)
+
+ return 1
+
+/datum/teleport/proc/teleport()
+ if(teleportChecks())
+ return doTeleport()
+ return 0
+
/datum/teleport/instant //teleports when datum is created
- New(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null)
- if(..())
- teleport()
- return
+/datum/teleport/instant/New(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null)
+ if(..())
+ teleport()
+ return
-/datum/teleport/instant/science
-
- setEffects(datum/effect/effect/system/aeffectin,datum/effect/effect/system/aeffectout)
- if(!aeffectin || !aeffectout)
- var/datum/effect/effect/system/spark_spread/aeffect = new
- aeffect.set_up(5, 1, teleatom)
- effectin = effectin || aeffect
- effectout = effectout || aeffect
- return 1
- else
- return ..()
-
- setPrecision(aprecision)
- ..()
- if(istype(teleatom, /obj/item/weapon/storage/backpack/holding))
- precision = rand(1,100)
-
- var/list/bagholding = teleatom.search_contents_for(/obj/item/weapon/storage/backpack/holding)
- if(bagholding.len)
- precision = max(rand(1,100)*bagholding.len,100)
- if(istype(teleatom, /mob/living))
- var/mob/living/MM = teleatom
- MM << "\red The Bluespace interface on your Bag of Holding interferes with the teleport!"
+/datum/teleport/instant/science/setEffects(datum/effect/effect/system/aeffectin,datum/effect/effect/system/aeffectout)
+ if(!aeffectin || !aeffectout)
+ var/datum/effect/effect/system/spark_spread/aeffect = new
+ aeffect.set_up(5, 1, teleatom)
+ effectin = effectin || aeffect
+ effectout = effectout || aeffect
return 1
+ else
+ return ..()
- teleportChecks()
- if(istype(teleatom, /obj/item/weapon/disk/nuclear)) // Don't let nuke disks get teleported --NeoFite
- teleatom.visible_message("\red The [teleatom] bounces off of the portal!")
+/datum/teleport/instant/science/setPrecision(aprecision)
+ ..()
+ if(istype(teleatom, /obj/item/weapon/storage/backpack/holding))
+ precision = rand(1,100)
+
+ var/list/bagholding = teleatom.search_contents_for(/obj/item/weapon/storage/backpack/holding)
+ if(bagholding.len)
+ precision = max(rand(1,100)*bagholding.len,100)
+ if(istype(teleatom, /mob/living))
+ var/mob/living/MM = teleatom
+ MM << "\The [teleatom] bounces off of the portal!")
+ return 0
+
+ if(!isemptylist(teleatom.search_contents_for(/obj/item/weapon/disk/nuclear)))
+ if(istype(teleatom, /mob/living))
+ var/mob/living/MM = teleatom
+ MM.visible_message("\The [MM] bounces off of the portal!","Something you are carrying seems to be unable to pass through the portal. Better drop it if you want to go through.")
+ else
+ teleatom.visible_message("\The [teleatom] bounces off of the portal!")
+ return 0
+
+ if(destination.z in config.admin_levels) //centcomm z-level
+ if(istype(teleatom, /obj/mecha))
+ var/obj/mecha/MM = teleatom
+ MM.occupant << "\The [MM] would not survive the jump to a location so far away!"
+ return 0
+ if(!isemptylist(teleatom.search_contents_for(/obj/item/weapon/storage/backpack/holding)))
+ teleatom.visible_message("\The [teleatom] bounces off of the portal!")
return 0
- if(!isemptylist(teleatom.search_contents_for(/obj/item/weapon/disk/nuclear)))
- if(istype(teleatom, /mob/living))
- var/mob/living/MM = teleatom
- MM.visible_message("\red The [MM] bounces off of the portal!","\red Something you are carrying seems to be unable to pass through the portal. Better drop it if you want to go through.")
- else
- teleatom.visible_message("\red The [teleatom] bounces off of the portal!")
- return 0
- if(destination.z == 2) //centcomm z-level
- if(istype(teleatom, /obj/mecha))
- var/obj/mecha/MM = teleatom
- MM.occupant << "\red The mech would not survive the jump to a location so far away!"
- return 0
- if(!isemptylist(teleatom.search_contents_for(/obj/item/weapon/storage/backpack/holding)))
- teleatom.visible_message("\red The Bag of Holding bounces off of the portal!")
- return 0
-
-
- if(destination.z > 7) //Away mission z-levels
- return 0
- return 1
\ No newline at end of file
+ if(destination.z > max_default_z_level()) //Away mission z-levels
+ return 0
+ return 1
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index f6fbbc110c..cfbd155145 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -311,7 +311,7 @@ datum/mind
for(var/obj/item/weapon/implant/loyalty/I in H.contents)
for(var/obj/item/organ/external/organs in H.organs)
if(I in organs.implants)
- I.Del()
+ qdel(I)
break
H << "Your loyalty implant has been deactivated."
log_admin("[key_name_admin(usr)] has de-loyalty implanted [current].")
@@ -368,7 +368,7 @@ datum/mind
src = null
m2h.inject(M)
src = mobfinder.loc:mind
- del(mobfinder)
+ qdel(mobfinder)
current.radiation -= 50
*/
else if (href_list["silicon"])
@@ -445,10 +445,10 @@ datum/mind
var/list/L = current.get_contents()
for (var/t in L)
if (istype(t, /obj/item/device/pda))
- if (t:uplink) del(t:uplink)
+ if (t:uplink) qdel(t:uplink)
t:uplink = null
else if (istype(t, /obj/item/device/radio))
- if (t:traitorradio) del(t:traitorradio)
+ if (t:traitorradio) qdel(t:traitorradio)
t:traitorradio = null
t:traitor_frequency = 0.0
else if (istype(t, /obj/item/weapon/SWF_uplink) || istype(t, /obj/item/weapon/syndicate_uplink))
@@ -457,7 +457,7 @@ datum/mind
R.loc = current.loc
R.traitorradio = null
R.traitor_frequency = 0.0
- del(t)
+ qdel(t)
// remove wizards spells
//If there are more special powers that need removal, they can be procced into here./N
@@ -479,7 +479,7 @@ datum/mind
proc/take_uplink()
var/obj/item/device/uplink/hidden/H = find_syndicate_uplink()
if(H)
- del(H)
+ qdel(H)
// check whether this mind's mob has been brigged for the given duration
diff --git a/code/datums/modules.dm b/code/datums/modules.dm
index 896d920f99..43d25a2e25 100644
--- a/code/datums/modules.dm
+++ b/code/datums/modules.dm
@@ -24,7 +24,8 @@ var/list/modules = list( // global associative list
var/mneed = mods.inmodlist(type) // find if this type has modules defined
if(!mneed) // not found in module list?
- del(src) // delete self, thus ending proc
+ qdel(src)
+ return
var/needed = mods.getbitmask(type) // get a bitmask for the number of modules in this object
status = needed
diff --git a/code/datums/recipe.dm b/code/datums/recipe.dm
index d72a8798a7..0f10d8d56f 100644
--- a/code/datums/recipe.dm
+++ b/code/datums/recipe.dm
@@ -95,7 +95,7 @@
var/obj/result_obj = new result(container)
for (var/obj/O in (container.contents-result_obj))
O.reagents.trans_to(result_obj, O.reagents.total_volume)
- del(O)
+ qdel(O)
container.reagents.clear_reagents()
return result_obj
@@ -110,7 +110,7 @@
O.reagents.del_reagent("nutriment")
O.reagents.update_total()
O.reagents.trans_to(result_obj, O.reagents.total_volume)
- del(O)
+ qdel(O)
container.reagents.clear_reagents()
return result_obj
diff --git a/code/defines/obj.dm b/code/defines/obj.dm
index e105d67a5b..a70822942f 100644
--- a/code/defines/obj.dm
+++ b/code/defines/obj.dm
@@ -80,7 +80,8 @@
for(var/datum/data/record/t in data_core.general)
var/name = t.fields["name"]
var/rank = t.fields["rank"]
- var/real_rank = t.fields["real_rank"]
+ var/real_rank = make_list_rank(t.fields["real_rank"])
+
if(OOC)
var/active = 0
for(var/mob/M in player_list)
@@ -165,6 +166,15 @@
return dat
+/var/list/acting_rank_prefixes = list("acting", "temporary", "interim")
+
+/proc/make_list_rank(rank)
+ for(var/prefix in acting_rank_prefixes)
+ if(findtext(rank, "[prefix] ", 1, 2+length(prefix)))
+ return copytext(rank, 2+length(prefix))
+ return rank
+
+
/*
We can't just insert in HTML into the nanoUI so we need the raw data to play with.
Instead of creating this list over and over when someone leaves their PDA open to the page
@@ -189,7 +199,8 @@ var/global/ManifestJSON
for(var/datum/data/record/t in data_core.general)
var/name = sanitize(t.fields["name"])
var/rank = sanitize(t.fields["rank"])
- var/real_rank = t.fields["real_rank"]
+ var/real_rank = make_list_rank(t.fields["real_rank"])
+
var/isactive = t.fields["p_stat"]
var/department = 0
var/depthead = 0 // Department Heads will be placed at the top of their lists.
diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm
index 7f287a5b54..5b0ae96726 100644
--- a/code/defines/obj/weapon.dm
+++ b/code/defines/obj/weapon.dm
@@ -350,7 +350,7 @@
/obj/item/weapon/module/power_control/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (istype(W, /obj/item/device/multitool))
var/obj/item/weapon/circuitboard/ghettosmes/newcircuit = new/obj/item/weapon/circuitboard/ghettosmes(user.loc)
- del(src)
+ qdel(src)
user.put_in_hands(newcircuit)
diff --git a/code/defines/procs/admin.dm b/code/defines/procs/admin.dm
index 5901f3b9c9..6c5f27fa07 100644
--- a/code/defines/procs/admin.dm
+++ b/code/defines/procs/admin.dm
@@ -1,3 +1,8 @@
+proc/admin_notice(var/message, var/rights)
+ for(var/mob/M in mob_list)
+ if(check_rights(rights, 0, M))
+ M << message
+
proc/log_and_message_admins(var/message as text, var/mob/user = usr)
log_admin(user ? "[key_name(user)] [message]" : "EVENT [message]")
message_admins(user ? "[key_name(user)] [message]" : "EVENT [message]")
diff --git a/code/defines/procs/records.dm b/code/defines/procs/records.dm
index 4e9fbcc9af..256ae51dbf 100644
--- a/code/defines/procs/records.dm
+++ b/code/defines/procs/records.dm
@@ -22,7 +22,7 @@
G.fields["photo_side"] = side
data_core.general += G
- del(dummy)
+ qdel(dummy)
return G
/proc/CreateSecurityRecord(var/name as text, var/id as text)
diff --git a/code/defines/procs/sd_Alert.dm b/code/defines/procs/sd_Alert.dm
index c63cab8f8b..e10416f112 100644
--- a/code/defines/procs/sd_Alert.dm
+++ b/code/defines/procs/sd_Alert.dm
@@ -1,168 +1,168 @@
-/* sd_Alert library
- by Shadowdarke (shadowdarke@byond.com)
-
- sd_Alert() is a powerful and flexible alternative to the built in BYOND
- alert() proc. sd_Alert offers timed popups, unlimited buttons, custom
- appearance, and even the option to popup without stealing keyboard focus
- from the map or command line.
-
- Please see demo.dm for detailed examples.
-
-FORMAT
- sd_Alert(who, message, title, buttons, default, duration, unfocus, \
- size, table, style, tag, select, flags)
-
-ARGUMENTS
- who - the client or mob to display the alert to.
- message - text message to display
- title - title of the alert box
- buttons - list of buttons
- Default Value: list("Ok")
- default - default button selestion
- Default Value: the first button in the list
- duration - the number of ticks before this alert expires. If not
- set, the alert lasts until a button is clicked.
- Default Value: 0 (unlimited)
- unfocus - if this value is set, the popup will not steal keyboard
- focus from the map or command line.
- Default Value: 1 (do not take focus)
- size - size of the popup window in px
- Default Value: "300x200"
- table - optional parameters for the HTML table in the alert
- Default Value: "width=100% height=100%" (fill the window)
- style - optional style sheet information
- tag - lets you specify a certain tag for this sd_Alert so you may manipulate it
- externally. (i.e. force the alert to close, change options and redisplay,
- reuse the same window, etc.)
- select - if set, the buttons will be replaced with a selection box with a number of
- lines displayed equal to this value.
- Default value: 0 (use buttons)
- flags - optional flags effecting the alert display. These flags may be ORed (|)
- together for multiple effects.
- SD_ALERT_SCROLL = display a scrollbar
- SD_ALERT_SELECT_MULTI = forces selection box display (instead of
- buttons) allows the user to select multiple
- choices.
- SD_ALERT_LINKS = display each choice as a plain text link.
- Any selection box style overrides this flag.
- SD_ALERT_NOVALIDATE = don't validate responses
- Default value: SD_ALERT_SCROLL
- (button display with scroll bar, validate responses)
-RETURNS
- The text of the selected button, or null if the alert duration expired
- without a button click.
-
-Version 1 changes (from version 0):
-* Added the tag, select, and flags arguments, thanks to several suggestions from Foomer.
-* Split the sd_Alert/Alert() proc into New(), Display(), and Response() to allow more
- customization by developers. Primarily developers would want to use Display() to change
- the display of active tagged windows
-
-*/
-
-
-#define SD_ALERT_SCROLL 1
-#define SD_ALERT_SELECT_MULTI 2
-#define SD_ALERT_LINKS 4
-#define SD_ALERT_NOVALIDATE 8
-
-proc/sd_Alert(client/who, message, title, buttons = list("Ok"),\
- default, duration = 0, unfocus = 1, size = "300x200", \
- table = "width=100% height=100%", style, tag, select, flags = SD_ALERT_SCROLL)
-
- if(ismob(who))
- var/mob/M = who
- who = M.client
- if(!istype(who)) CRASH("sd_Alert: Invalid target:[who] (\ref[who])")
-
- var/sd_alert/T = locate(tag)
- if(T)
- if(istype(T)) del(T)
- else CRASH("sd_Alert: tag \"[tag]\" is already in use by datum '[T]' (type: [T.type])")
- T = new(who, tag)
- if(duration)
- spawn(duration)
- if(T) del(T)
- return
- T.Display(message,title,buttons,default,unfocus,size,table,style,select,flags)
- . = T.Response()
-
-sd_alert
- var
- client/target
- response
- list/validation
-
- Del()
- target << browse(null,"window=\ref[src]")
- ..()
-
- New(who, tag)
- ..()
- target = who
- src.tag = tag
-
- Topic(href,params[])
- if(usr.client != target) return
- response = params["clk"]
-
- proc/Display(message,title,list/buttons,default,unfocus,size,table,style,select,flags)
- if(unfocus) spawn() target << browse(null,null)
- if(istext(buttons)) buttons = list(buttons)
- if(!default) default = buttons[1]
- if(!(flags & SD_ALERT_NOVALIDATE)) validation = buttons.Copy()
-
- var/html = {"
"
-
- target << browse(html,"window=\ref[src];size=[size];can_close=0")
-
- proc/Response()
- var/validated
- while(!validated)
- while(target && !response) // wait for a response
- sleep(2)
-
- if(response && validation)
- if(istype(response, /list))
- var/list/L = response - validation
- if(L.len) response = null
- else validated = 1
- else if(response in validation) validated = 1
- else response=null
- else validated = 1
- spawn(2) del(src)
- return response
+/* sd_Alert library
+ by Shadowdarke (shadowdarke@byond.com)
+
+ sd_Alert() is a powerful and flexible alternative to the built in BYOND
+ alert() proc. sd_Alert offers timed popups, unlimited buttons, custom
+ appearance, and even the option to popup without stealing keyboard focus
+ from the map or command line.
+
+ Please see demo.dm for detailed examples.
+
+FORMAT
+ sd_Alert(who, message, title, buttons, default, duration, unfocus, \
+ size, table, style, tag, select, flags)
+
+ARGUMENTS
+ who - the client or mob to display the alert to.
+ message - text message to display
+ title - title of the alert box
+ buttons - list of buttons
+ Default Value: list("Ok")
+ default - default button selestion
+ Default Value: the first button in the list
+ duration - the number of ticks before this alert expires. If not
+ set, the alert lasts until a button is clicked.
+ Default Value: 0 (unlimited)
+ unfocus - if this value is set, the popup will not steal keyboard
+ focus from the map or command line.
+ Default Value: 1 (do not take focus)
+ size - size of the popup window in px
+ Default Value: "300x200"
+ table - optional parameters for the HTML table in the alert
+ Default Value: "width=100% height=100%" (fill the window)
+ style - optional style sheet information
+ tag - lets you specify a certain tag for this sd_Alert so you may manipulate it
+ externally. (i.e. force the alert to close, change options and redisplay,
+ reuse the same window, etc.)
+ select - if set, the buttons will be replaced with a selection box with a number of
+ lines displayed equal to this value.
+ Default value: 0 (use buttons)
+ flags - optional flags effecting the alert display. These flags may be ORed (|)
+ together for multiple effects.
+ SD_ALERT_SCROLL = display a scrollbar
+ SD_ALERT_SELECT_MULTI = forces selection box display (instead of
+ buttons) allows the user to select multiple
+ choices.
+ SD_ALERT_LINKS = display each choice as a plain text link.
+ Any selection box style overrides this flag.
+ SD_ALERT_NOVALIDATE = don't validate responses
+ Default value: SD_ALERT_SCROLL
+ (button display with scroll bar, validate responses)
+RETURNS
+ The text of the selected button, or null if the alert duration expired
+ without a button click.
+
+Version 1 changes (from version 0):
+* Added the tag, select, and flags arguments, thanks to several suggestions from Foomer.
+* Split the sd_Alert/Alert() proc into New(), Display(), and Response() to allow more
+ customization by developers. Primarily developers would want to use Display() to change
+ the display of active tagged windows
+
+*/
+
+
+#define SD_ALERT_SCROLL 1
+#define SD_ALERT_SELECT_MULTI 2
+#define SD_ALERT_LINKS 4
+#define SD_ALERT_NOVALIDATE 8
+
+proc/sd_Alert(client/who, message, title, buttons = list("Ok"),\
+ default, duration = 0, unfocus = 1, size = "300x200", \
+ table = "width=100% height=100%", style, tag, select, flags = SD_ALERT_SCROLL)
+
+ if(ismob(who))
+ var/mob/M = who
+ who = M.client
+ if(!istype(who)) CRASH("sd_Alert: Invalid target:[who] (\ref[who])")
+
+ var/sd_alert/T = locate(tag)
+ if(T)
+ if(istype(T)) qdel(T)
+ else CRASH("sd_Alert: tag \"[tag]\" is already in use by datum '[T]' (type: [T.type])")
+ T = new(who, tag)
+ if(duration)
+ spawn(duration)
+ if(T) qdel(T)
+ return
+ T.Display(message,title,buttons,default,unfocus,size,table,style,select,flags)
+ . = T.Response()
+
+sd_alert
+ var
+ client/target
+ response
+ list/validation
+
+ Destroy()
+ target << browse(null,"window=\ref[src]")
+ ..()
+
+ New(who, tag)
+ ..()
+ target = who
+ src.tag = tag
+
+ Topic(href,params[])
+ if(usr.client != target) return
+ response = params["clk"]
+
+ proc/Display(message,title,list/buttons,default,unfocus,size,table,style,select,flags)
+ if(unfocus) spawn() target << browse(null,null)
+ if(istext(buttons)) buttons = list(buttons)
+ if(!default) default = buttons[1]
+ if(!(flags & SD_ALERT_NOVALIDATE)) validation = buttons.Copy()
+
+ var/html = {"\
- [message] "}
-
- if(select || (flags & SD_ALERT_SELECT_MULTI)) // select style choices
- html += {""
- else if(flags & SD_ALERT_LINKS) // text link style
- for(var/b in buttons)
- var/list/L = list()
- L["clk"] = b
- var/html_string=list2params(L)
- var/focus
- if(b == default) focus = " ID=fcs"
- html += "[html_encode(b)]\
-
"
- else // button style choices
- for(var/b in buttons)
- var/list/L = list()
- L["clk"] = b
- var/html_string=list2params(L)
- var/focus
- if(b == default) focus = " ID=fcs"
- html += " "
-
- html += "
"
+
+ target << browse(html,"window=\ref[src];size=[size];can_close=0")
+
+ proc/Response()
+ var/validated
+ while(!validated)
+ while(target && !response) // wait for a response
+ sleep(2)
+
+ if(response && validation)
+ if(istype(response, /list))
+ var/list/L = response - validation
+ if(L.len) response = null
+ else validated = 1
+ else if(response in validation) validated = 1
+ else response=null
+ else validated = 1
+ spawn(2) qdel(src)
+ return response
diff --git a/code/game/antagonist/antagonist.dm b/code/game/antagonist/antagonist.dm
index 73e17a2043..aad02b1c6c 100644
--- a/code/game/antagonist/antagonist.dm
+++ b/code/game/antagonist/antagonist.dm
@@ -199,7 +199,7 @@
for(var/datum/uplink_item/UI in H.purchase_log)
var/obj/I = new UI.path
refined_log.Add("[H.purchase_log[UI]]x\icon[I][UI.name]")
- del(I)
+ qdel(I)
purchases = english_list(refined_log, nothing_text = "")
if(uplink_true)
text += " (used [TC_uses] TC)"
@@ -215,7 +215,7 @@
if(antag.current && antag.current.client)
for(var/image/I in antag.current.client.images)
if(I.icon_state == antag_indicator)
- del(I)
+ qdel(I)
for(var/datum/mind/other_antag in current_antagonists)
if(other_antag.current)
antag.current.client.images |= image('icons/mob/mob.dmi', loc = other_antag.current, icon_state = antag_indicator)
@@ -241,10 +241,10 @@
if(antag.current.client)
for(var/image/I in antag.current.client.images)
if(I.icon_state == antag_indicator && I.loc == player.current)
- del(I)
+ qdel(I)
if(player.current && player.current.client)
for(var/image/I in player.current.client.images)
if(I.icon_state == antag_indicator)
- del(I)
+ qdel(I)
diff --git a/code/game/antagonist/antagonist_build.dm b/code/game/antagonist/antagonist_build.dm
index 40ba798aae..35af4e6f80 100644
--- a/code/game/antagonist/antagonist_build.dm
+++ b/code/game/antagonist/antagonist_build.dm
@@ -15,7 +15,7 @@
var/mob/holder = player.current
player.current = new mob_path(get_turf(player.current))
player.transfer_to(player.current)
- if(holder) del(holder)
+ if(holder) qdel(holder)
player.original = player.current
return player.current
@@ -30,7 +30,7 @@
for(var/obj/item/thing in player.contents)
player.drop_from_inventory(thing)
if(thing.loc != player)
- del(thing)
+ qdel(thing)
return 1
if(flags & ANTAG_SET_APPEARANCE)
diff --git a/code/game/antagonist/outsider/ert.dm b/code/game/antagonist/outsider/ert.dm
index f52f031002..946ff1dfc2 100644
--- a/code/game/antagonist/outsider/ert.dm
+++ b/code/game/antagonist/outsider/ert.dm
@@ -32,13 +32,9 @@ var/datum/antagonist/ert/ert
player.equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(src), slot_gloves)
player.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(src), slot_glasses)
- var/obj/item/weapon/card/id/W = new(src)
- W.assignment = "Emergency Response Team"
+ var/obj/item/weapon/card/id/centcom/ERT/W = new(src)
W.registered_name = player.real_name
W.name = "[player.real_name]'s ID Card ([W.assignment])"
- W.icon_state = "centcom"
- W.access = get_all_accesses()
- W.access += get_all_centcom_access()
player.equip_to_slot_or_del(W, slot_wear_id)
return 1
diff --git a/code/game/antagonist/station/highlander.dm b/code/game/antagonist/station/highlander.dm
index 0af6e1e23d..9b82b15852 100644
--- a/code/game/antagonist/station/highlander.dm
+++ b/code/game/antagonist/station/highlander.dm
@@ -32,7 +32,7 @@ var/datum/antagonist/highlander/highlanders
for (var/obj/item/I in player)
if (istype(I, /obj/item/weapon/implant))
continue
- del(I)
+ qdel(I)
player.equip_to_slot_or_del(new /obj/item/clothing/under/kilt(player), slot_w_uniform)
player.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(player), slot_l_ear)
diff --git a/code/game/antagonist/station/rogue_ai.dm b/code/game/antagonist/station/rogue_ai.dm
index 372556c205..3d9026ff88 100644
--- a/code/game/antagonist/station/rogue_ai.dm
+++ b/code/game/antagonist/station/rogue_ai.dm
@@ -27,7 +27,7 @@ var/datum/antagonist/rogue_ai/malf
hacked_apcs |= apc
/datum/antagonist/rogue_ai/proc/update_takeover_time()
- hack_time -= ((hacked_apcs.len/6)*tickerProcess.getLastTickerTimeDuration())
+ hack_time -= ((hacked_apcs.len/6)*2.0)
/datum/antagonist/rogue_ai/tick()
if(revealed && hacked_apcs.len >= 3)
@@ -213,7 +213,7 @@ var/datum/antagonist/rogue_ai/malf
/client/proc/reactivate_camera)
current:laws = new /datum/ai_laws/nanotrasen
- del(current:malf_picker)
+ qdel(current:malf_picker)
current:show_laws()
current.icon_state = "ai"
diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm
index a72b06852a..21e965244b 100755
--- a/code/game/area/Space Station 13 areas.dm
+++ b/code/game/area/Space Station 13 areas.dm
@@ -26,8 +26,8 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
icon = 'icons/turf/areas.dmi'
icon_state = "unknown"
layer = 10
+ luminosity = 1
mouse_opacity = 0
- invisibility = INVISIBILITY_LIGHTING
var/lightswitch = 1
var/eject = null
@@ -48,15 +48,12 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
var/has_gravity = 1
var/list/apc = list()
var/no_air = null
- var/area/master // master area used for power calcluations
- // (original area before splitting due to sd_DAL)
- var/list/related // the other areas of the same type as this
// var/list/lights // list of all lights on this area
var/list/all_doors = list() //Added by Strumpetplaya - Alarm Change - Contains a list of doors adjacent to this area
var/air_doors_activated = 0
var/list/ambience = list('sound/ambience/ambigen1.ogg','sound/ambience/ambigen3.ogg','sound/ambience/ambigen4.ogg','sound/ambience/ambigen5.ogg','sound/ambience/ambigen6.ogg','sound/ambience/ambigen7.ogg','sound/ambience/ambigen8.ogg','sound/ambience/ambigen9.ogg','sound/ambience/ambigen10.ogg','sound/ambience/ambigen11.ogg','sound/ambience/ambigen12.ogg','sound/ambience/ambigen14.ogg')
- var/sound/forced_ambience = null
-
+ var/list/forced_ambience = null
+ var/sound_env = 2 //reverb preset for sounds played in this area, see sound datum reference for more
/*Adding a wizard area teleport list because motherfucking lag -- Urist*/
/*I am far too lazy to make it a proper list of areas so I'll just make it run the usual telepot routine at the start of the game*/
var/list/teleportlocs = list()
@@ -102,7 +99,6 @@ var/list/ghostteleportlocs = list()
icon_state = "space"
requires_power = 1
always_unpowered = 1
- lighting_use_dynamic = 1
power_light = 0
power_equip = 0
power_environ = 0
@@ -145,10 +141,8 @@ area/space/atmosalert()
//place to another. Look at escape shuttle for example.
//All shuttles should now be under shuttle since we have smooth-wall code.
-/area/shuttle //DO NOT TURN THE lighting_use_dynamic STUFF ON FOR SHUTTLES. IT BREAKS THINGS.
+/area/shuttle
requires_power = 0
- luminosity = 1
- lighting_use_dynamic = 0
/area/shuttle/arrival
name = "\improper Arrival Shuttle"
@@ -249,15 +243,11 @@ area/space/atmosalert()
icon_state = "shuttle"
name = "\improper Alien Shuttle Base"
requires_power = 1
- luminosity = 0
- lighting_use_dynamic = 1
/area/shuttle/alien/mine
icon_state = "shuttle"
name = "\improper Alien Shuttle Mine"
requires_power = 1
- luminosity = 0
- lighting_use_dynamic = 1
/area/shuttle/prison/
name = "\improper Prison Shuttle"
@@ -343,7 +333,6 @@ area/space/atmosalert()
name = "start area"
icon_state = "start"
requires_power = 0
- luminosity = 1
lighting_use_dynamic = 0
has_gravity = 1
@@ -361,6 +350,7 @@ area/space/atmosalert()
icon_state = "centcom"
requires_power = 0
unlimited_power = 1
+ lighting_use_dynamic = 0
/area/centcom/control
name = "\improper Centcom Control"
@@ -399,6 +389,7 @@ area/space/atmosalert()
icon_state = "syndie-ship"
requires_power = 0
unlimited_power = 1
+ lighting_use_dynamic = 0
/area/syndicate_mothership/control
name = "\improper Mercenary Control Room"
@@ -808,6 +799,9 @@ area/space/atmosalert()
//Hallway
+/area/hallway/primary/
+ sound_env = 12 //hallway
+
/area/hallway/primary/fore
name = "\improper Fore Primary Hallway"
icon_state = "hallF"
@@ -1006,16 +1000,13 @@ area/space/atmosalert()
/area/holodeck
name = "\improper Holodeck"
icon_state = "Holodeck"
- luminosity = 1
lighting_use_dynamic = 0
/area/holodeck/alphadeck
name = "\improper Holodeck Alpha"
-
/area/holodeck/source_plating
name = "\improper Holodeck - Off"
- icon_state = "Holodeck"
/area/holodeck/source_emptycourt
name = "\improper Holodeck - Empty Court"
@@ -1031,11 +1022,9 @@ area/space/atmosalert()
/area/holodeck/source_courtroom
name = "\improper Holodeck - Courtroom"
- icon_state = "Holodeck"
/area/holodeck/source_beach
name = "\improper Holodeck - Beach"
- icon_state = "Holodeck" // Lazy.
/area/holodeck/source_burntest
name = "\improper Holodeck - Atmospheric Burn Test"
@@ -1062,9 +1051,6 @@ area/space/atmosalert()
name = "\improper Holodeck - Space"
has_gravity = 0
-
-
-
//Engineering
/area/engineering/
@@ -1143,7 +1129,6 @@ area/space/atmosalert()
/area/solar
requires_power = 1
always_unpowered = 1
- luminosity = 1
lighting_use_dynamic = 0
auxport
diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm
index 0778f50174..38452c3d5b 100644
--- a/code/game/area/areas.dm
+++ b/code/game/area/areas.dm
@@ -10,44 +10,38 @@
/area/New()
icon_state = ""
layer = 10
- master = src //moved outside the spawn(1) to avoid runtimes in lighting.dm when it references loc.loc.master ~Carn
uid = ++global_uid
- related = list(src)
all_areas += src
- if(requires_power)
- luminosity = 0
- else
+ if(!requires_power)
power_light = 0 //rastaf0
power_equip = 0 //rastaf0
power_environ = 0 //rastaf0
- luminosity = 1
- lighting_use_dynamic = 0
..()
// spawn(15)
power_change() // all machines set to current power level, also updates lighting icon
- InitializeLighting()
+
+/area/proc/get_contents()
+ return contents
/area/proc/get_cameras()
var/list/cameras = list()
- for (var/area/RA in related)
- for (var/obj/machinery/camera/C in RA)
- cameras += C
+ for (var/obj/machinery/camera/C in src)
+ cameras += C
return cameras
/area/proc/atmosalert(danger_level, var/alarm_source)
if (danger_level == 0)
- atmosphere_alarm.clearAlarm(master, alarm_source)
+ atmosphere_alarm.clearAlarm(src, alarm_source)
else
- atmosphere_alarm.triggerAlarm(master, alarm_source, severity = danger_level)
+ atmosphere_alarm.triggerAlarm(src, alarm_source, severity = danger_level)
//Check all the alarms before lowering atmosalm. Raising is perfectly fine.
- for (var/area/RA in related)
- for (var/obj/machinery/alarm/AA in RA)
- if (!(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted && AA.report_danger_level)
- danger_level = max(danger_level, AA.danger_level)
+ for (var/obj/machinery/alarm/AA in src)
+ if (!(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted && AA.report_danger_level)
+ danger_level = max(danger_level, AA.danger_level)
if(danger_level != atmosalm)
if (danger_level < 1 && atmosalm >= 1)
@@ -57,17 +51,16 @@
air_doors_close()
atmosalm = danger_level
- for(var/area/RA in related)
- for (var/obj/machinery/alarm/AA in RA)
- AA.update_icon()
+ for (var/obj/machinery/alarm/AA in src)
+ AA.update_icon()
return 1
return 0
/area/proc/air_doors_close()
- if(!src.master.air_doors_activated)
- src.master.air_doors_activated = 1
- for(var/obj/machinery/door/firedoor/E in src.master.all_doors)
+ if(!air_doors_activated)
+ air_doors_activated = 1
+ for(var/obj/machinery/door/firedoor/E in all_doors)
if(!E.blocked)
if(E.operating)
E.nextstate = CLOSED
@@ -76,9 +69,9 @@
E.close()
/area/proc/air_doors_open()
- if(src.master.air_doors_activated)
- src.master.air_doors_activated = 0
- for(var/obj/machinery/door/firedoor/E in src.master.all_doors)
+ if(air_doors_activated)
+ air_doors_activated = 0
+ for(var/obj/machinery/door/firedoor/E in all_doors)
if(!E.blocked)
if(E.operating)
E.nextstate = OPEN
@@ -89,11 +82,8 @@
/area/proc/fire_alert()
if(!fire)
- master.fire = 1 //used for firedoor checks
- master.updateicon()
- for(var/area/A in related)
- A.fire = 1
- A.updateicon()
+ fire = 1 //used for firedoor checks
+ updateicon()
mouse_opacity = 0
for(var/obj/machinery/door/firedoor/D in all_doors)
if(!D.blocked)
@@ -105,11 +95,8 @@
/area/proc/fire_reset()
if (fire)
- master.fire = 0 //used for firedoor checks
- master.updateicon()
- for(var/area/A in related)
- A.fire = 0
- A.updateicon()
+ fire = 0 //used for firedoor checks
+ updateicon()
mouse_opacity = 0
for(var/obj/machinery/door/firedoor/D in all_doors)
if(!D.blocked)
@@ -153,7 +140,7 @@
return
/area/proc/updateicon()
- if ((fire || eject || party) && (!requires_power||power_environ) && !lighting_space)//If it doesn't require power, can still activate this proc.
+ if ((fire || eject || party) && (!requires_power||power_environ) && !istype(src, /area/space))//If it doesn't require power, can still activate this proc.
if(fire && !eject && !party)
icon_state = "blue"
/*else if(atmosalm && !fire && !eject && !party)
@@ -177,56 +164,53 @@
/area/proc/powered(var/chan) // return true if the area has power to given channel
- if(!master.requires_power)
+ if(!requires_power)
return 1
- if(master.always_unpowered)
+ if(always_unpowered)
return 0
- if(src.lighting_space)
- return 0 // Nope sorry
switch(chan)
if(EQUIP)
- return master.power_equip
+ return power_equip
if(LIGHT)
- return master.power_light
+ return power_light
if(ENVIRON)
- return master.power_environ
+ return power_environ
return 0
// called when power status changes
/area/proc/power_change()
- for(var/area/RA in related)
- for(var/obj/machinery/M in RA) // for each machine in the area
- M.power_change() // reverify power status (to update icons etc.)
- if (fire || eject || party)
- RA.updateicon()
+ for(var/obj/machinery/M in src) // for each machine in the area
+ M.power_change() // reverify power status (to update icons etc.)
+ if (fire || eject || party)
+ updateicon()
/area/proc/usage(var/chan)
var/used = 0
switch(chan)
if(LIGHT)
- used += master.used_light
+ used += used_light
if(EQUIP)
- used += master.used_equip
+ used += used_equip
if(ENVIRON)
- used += master.used_environ
+ used += used_environ
if(TOTAL)
- used += master.used_light + master.used_equip + master.used_environ
+ used += used_light + used_equip + used_environ
return used
/area/proc/clear_usage()
- master.used_equip = 0
- master.used_light = 0
- master.used_environ = 0
+ used_equip = 0
+ used_light = 0
+ used_environ = 0
/area/proc/use_power(var/amount, var/chan)
switch(chan)
if(EQUIP)
- master.used_equip += amount
+ used_equip += amount
if(LIGHT)
- master.used_light += amount
+ used_light += amount
if(ENVIRON)
- master.used_environ += amount
+ used_environ += amount
var/list/mob/living/forced_ambiance_list = new
@@ -262,37 +246,35 @@ var/list/mob/living/forced_ambiance_list = new
L << sound('sound/ambience/shipambience.ogg', repeat = 1, wait = 0, volume = 35, channel = 2)
if(forced_ambience)
- forced_ambiance_list += L
- L << forced_ambience
+ if(forced_ambience.len)
+ forced_ambiance_list |= L
+ L << sound(pick(forced_ambience), repeat = 1, wait = 0, volume = 25, channel = 1)
+ else
+ L << sound(null, channel = 1)
else if(src.ambience.len && prob(35))
if((world.time >= L.client.played + 600))
- var/musVolume = 25
var/sound = pick(ambience)
- L << sound(sound, repeat = 0, wait = 0, volume = musVolume, channel = 1)
+ L << sound(sound, repeat = 0, wait = 0, volume = 25, channel = 1)
L.client.played = world.time
/area/proc/gravitychange(var/gravitystate = 0, var/area/A)
-
A.has_gravity = gravitystate
- for(var/area/SubA in A.related)
- SubA.has_gravity = gravitystate
-
- if(gravitystate)
- for(var/mob/living/carbon/human/M in SubA)
- thunk(M)
- for(var/mob/M1 in SubA)
- M1.make_floating(0)
- else
- for(var/mob/M in SubA)
- if(M.Check_Dense_Object() && istype(src,/mob/living/carbon/human/))
- var/mob/living/carbon/human/H = src
- if(istype(H.shoes, /obj/item/clothing/shoes/magboots) && (H.shoes.flags & NOSLIP)) //magboots + dense_object = no floaty effect
- H.make_floating(0)
- else
- H.make_floating(1)
+ if(gravitystate)
+ for(var/mob/living/carbon/human/M in A)
+ thunk(M)
+ for(var/mob/M1 in A)
+ M1.make_floating(0)
+ else
+ for(var/mob/M in A)
+ if(M.Check_Dense_Object() && istype(src,/mob/living/carbon/human/))
+ var/mob/living/carbon/human/H = src
+ if(istype(H.shoes, /obj/item/clothing/shoes/magboots) && (H.shoes.flags & NOSLIP)) //magboots + dense_object = no floaty effect
+ H.make_floating(0)
else
- M.make_floating(1)
+ H.make_floating(1)
+ else
+ M.make_floating(1)
/area/proc/thunk(mob)
if(istype(get_turf(mob), /turf/space)) // Can't fall onto nothing.
diff --git a/code/game/area/asteroid_areas.dm b/code/game/area/asteroid_areas.dm
index edfb99f57f..12ae5377ce 100644
--- a/code/game/area/asteroid_areas.dm
+++ b/code/game/area/asteroid_areas.dm
@@ -3,6 +3,7 @@
/area/mine
icon_state = "mining"
music = 'sound/ambience/song_game.ogg'
+ sound_env = 5 //stoneroom
/area/mine/explored
name = "Mine"
diff --git a/code/game/asteroid.dm b/code/game/asteroid.dm
index e5b421e9af..8aa6b1cd64 100644
--- a/code/game/asteroid.dm
+++ b/code/game/asteroid.dm
@@ -32,7 +32,7 @@ proc/spawn_room(var/atom/start_loc,var/x_size,var/y_size,var/wall,var/floor , va
var/cur_loc = locate(start_loc.x+x,start_loc.y+y,start_loc.z)
if(clean)
for(var/O in cur_loc)
- del(O)
+ qdel(O)
var/area/asteroid/artifactroom/A = new
if(name)
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 5944587cc7..742c6389a9 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -11,6 +11,7 @@
var/pass_flags = 0
var/throwpass = 0
var/germ_level = GERM_LEVEL_AMBIENT // The higher the germ level, the more germ on the atom.
+ var/simulated = 1 //filter for actions - used by lighting overlays
///Chemistry.
var/datum/reagents/reagents = null
@@ -22,6 +23,18 @@
//Detective Work, used for the duplicate data points kept in the scanners
var/list/original_atom
+/atom/Destroy()
+ . = ..()
+ density = 0
+ set_opacity(0)
+
+ if(reagents)
+ qdel(reagents)
+ reagents = null
+ for(var/atom/movable/AM in contents)
+ qdel(AM)
+ invisibility = 101
+
/atom/proc/assume_air(datum/gas_mixture/giver)
return null
@@ -66,7 +79,6 @@
return flags & INSERT_CONTAINER
*/
-
/atom/proc/meteorhit(obj/meteor as obj)
return
@@ -148,7 +160,7 @@ its easier to just keep the beam vertical.
for(var/obj/effect/overlay/beam/O in orange(10,src)) //This section erases the previously drawn beam because I found it was easier to
if(O.BeamSource==src) //just draw another instance of the beam instead of trying to manipulate all the
- del O //pieces to a new orientation.
+ qdel(O) //pieces to a new orientation.
var/Angle=round(Get_Angle(src,BeamTarget))
var/icon/I=new(icon,icon_state)
I.Turn(Angle)
@@ -189,7 +201,7 @@ its easier to just keep the beam vertical.
X.pixel_y=Pixel_y
sleep(3) //Changing this to a lower value will cause the beam to follow more smoothly with movement, but it will also be more laggy.
//I've found that 3 ticks provided a nice balance for my use.
- for(var/obj/effect/overlay/beam/O in orange(10,src)) if(O.BeamSource==src) del O
+ for(var/obj/effect/overlay/beam/O in orange(10,src)) if(O.BeamSource==src) qdel(O)
//All atoms
@@ -229,7 +241,7 @@ its easier to just keep the beam vertical.
/atom/proc/fire_act()
return
-
+
/atom/proc/melt()
return
@@ -362,7 +374,7 @@ its easier to just keep the beam vertical.
//Cleaning up shit.
if(fingerprints && !fingerprints.len)
- del(fingerprints)
+ qdel(fingerprints)
return
@@ -419,7 +431,7 @@ its easier to just keep the beam vertical.
src.color = initial(src.color) //paint
src.germ_level = 0
if(istype(blood_DNA, /list))
- del(blood_DNA)
+ qdel(blood_DNA)
return 1
diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm
index 79d6e8fd08..f86c135da4 100644
--- a/code/game/atoms_movable.dm
+++ b/code/game/atoms_movable.dm
@@ -14,6 +14,29 @@
var/moved_recently = 0
var/mob/pulledby = null
+/atom/movable/New()
+ ..()
+ if(ticker && ticker.current_state == GAME_STATE_PLAYING)
+ initialize()
+
+/atom/movable/Del()
+ if(isnull(gcDestroyed) && loc)
+ testing("GC: -- [type] was deleted via del() rather than qdel() --")
+ CRASH() // Debug until I can get a clean server start.
+// else if(isnull(gcDestroyed))
+// testing("GC: [type] was deleted via GC without qdel()") //Not really a huge issue but from now on, please qdel()
+// else
+// testing("GC: [type] was deleted via GC with qdel()")
+ ..()
+
+/atom/movable/Destroy()
+ . = ..()
+
+ loc = null
+
+/atom/movable/proc/initialize()
+ return
+
/atom/movable/Bump(var/atom/A, yes)
if(src.throwing)
src.throw_impact(A)
@@ -187,4 +210,4 @@
/atom/movable/overlay/attack_hand(a, b, c)
if (src.master)
return src.master.attack_hand(a, b, c)
- return
\ No newline at end of file
+ return
diff --git a/code/game/dna/dna_misc.dm b/code/game/dna/dna_misc.dm
index b314852214..cdc737c007 100644
--- a/code/game/dna/dna_misc.dm
+++ b/code/game/dna/dna_misc.dm
@@ -420,7 +420,7 @@
animation.master = src
flick("h2monkey", animation)
sleep(48)
- del(animation)
+ qdel(animation)
var/mob/living/carbon/monkey/O = null
@@ -447,7 +447,7 @@
for(var/obj/T in (M.contents-implants))
- del(T)
+ qdel(T)
O.loc = M.loc
@@ -469,7 +469,7 @@
I.loc = O
I.implanted = O
// O.update_icon = 1 //queue a full icon update at next life() call
- del(M)
+ qdel(M)
return
if (!isblockon(getblock(M.dna.struc_enzymes, MONKEYBLOCK,3),MONKEYBLOCK) && !istype(M, /mob/living/carbon/human))
@@ -493,7 +493,7 @@
animation.master = src
flick("monkey2h", animation)
sleep(48)
- del(animation)
+ qdel(animation)
var/mob/living/carbon/human/O = new( src )
if(Mo.greaterform)
@@ -519,7 +519,7 @@
M.viruses -= D
//for(var/obj/T in M)
- // del(T)
+ // qdel(T)
O.loc = M.loc
@@ -553,7 +553,7 @@
I.loc = O
I.implanted = O
// O.update_icon = 1 //queue a full icon update at next life() call
- del(M)
+ qdel(M)
return
//////////////////////////////////////////////////////////// Monkey Block
if(M)
diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm
index 86bfbeb0fe..68e1f34f88 100644
--- a/code/game/dna/dna_modifier.dm
+++ b/code/game/dna/dna_modifier.dm
@@ -144,7 +144,7 @@
return
put_in(G.affecting)
src.add_fingerprint(user)
- del(G)
+ qdel(G)
return
/obj/machinery/dna_scannernew/proc/put_in(var/mob/M)
@@ -187,7 +187,7 @@
ex_act(severity)
//Foreach goto(35)
//SN src = null
- del(src)
+ qdel(src)
return
if(2.0)
if (prob(50))
@@ -196,7 +196,7 @@
ex_act(severity)
//Foreach goto(108)
//SN src = null
- del(src)
+ qdel(src)
return
if(3.0)
if (prob(25))
@@ -205,7 +205,7 @@
ex_act(severity)
//Foreach goto(181)
//SN src = null
- del(src)
+ qdel(src)
return
else
return
@@ -215,7 +215,7 @@
if(prob(75))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
- del(src)
+ qdel(src)
/obj/machinery/computer/scan_consolenew
name = "DNA Modifier Access Console"
@@ -262,12 +262,12 @@
switch(severity)
if(1.0)
//SN src = null
- del(src)
+ qdel(src)
return
if(2.0)
if (prob(50))
//SN src = null
- del(src)
+ qdel(src)
return
else
return
@@ -275,7 +275,7 @@
/obj/machinery/computer/scan_consolenew/blob_act()
if(prob(75))
- del(src)
+ qdel(src)
/obj/machinery/computer/scan_consolenew/power_change()
..()
diff --git a/code/game/dna/genes/monkey.dm b/code/game/dna/genes/monkey.dm
index 2e0f6cdec2..7d9da10636 100644
--- a/code/game/dna/genes/monkey.dm
+++ b/code/game/dna/genes/monkey.dm
@@ -33,7 +33,7 @@
animation.master = src
flick("h2monkey", animation)
sleep(48)
- del(animation)
+ qdel(animation)
var/mob/living/carbon/monkey/O = null
@@ -60,7 +60,7 @@
for(var/obj/T in (M.contents-implants))
- del(T)
+ qdel(T)
O.loc = M.loc
@@ -82,7 +82,7 @@
I.loc = O
I.implanted = O
// O.update_icon = 1 //queue a full icon update at next life() call
- del(M)
+ qdel(M)
return
/datum/dna/gene/monkey/deactivate(var/mob/living/M, var/connected, var/flags)
@@ -108,7 +108,7 @@
animation.master = src
flick("monkey2h", animation)
sleep(48)
- del(animation)
+ qdel(animation)
var/mob/living/carbon/human/O
if(Mo.greaterform)
@@ -136,7 +136,7 @@
M.viruses -= D
//for(var/obj/T in M)
- // del(T)
+ // qdel(T)
O.loc = M.loc
@@ -171,5 +171,5 @@
I.loc = O
I.implanted = O
// O.update_icon = 1 //queue a full icon update at next life() call
- del(M)
+ qdel(M)
return
diff --git a/code/game/gamemodes/blob/blobs/core.dm b/code/game/gamemodes/blob/blobs/core.dm
index f0a24001ba..3897d444e8 100644
--- a/code/game/gamemodes/blob/blobs/core.dm
+++ b/code/game/gamemodes/blob/blobs/core.dm
@@ -14,7 +14,7 @@
..(loc, h)
- Del()
+ Destroy()
blob_cores -= src
processing_objects.Remove(src)
..()
@@ -24,7 +24,7 @@
update_icon()
if(health <= 0)
playsound(src.loc, 'sound/effects/splat.ogg', 50, 1)
- del(src)
+ qdel(src)
return
return
diff --git a/code/game/gamemodes/blob/blobs/factory.dm b/code/game/gamemodes/blob/blobs/factory.dm
index bb8de8184e..c1d14d0040 100644
--- a/code/game/gamemodes/blob/blobs/factory.dm
+++ b/code/game/gamemodes/blob/blobs/factory.dm
@@ -12,7 +12,7 @@
update_icon()
if(health <= 0)
playsound(src.loc, 'sound/effects/splat.ogg', 50, 1)
- del(src)
+ qdel(src)
return
return
@@ -22,6 +22,11 @@
new/mob/living/simple_animal/hostile/blobspore(src.loc, src)
return 1
+/obj/effect/blob/factory/Destroy()
+ for(var/mob/living/simple_animal/hostile/blobspore/spore in spores)
+ if(spore.factory == src)
+ spore.factory = null
+ ..()
/mob/living/simple_animal/hostile/blobspore
name = "blob"
@@ -58,9 +63,10 @@
..(loc)
return
death()
- ..()
- if(factory)
- factory.spores -= src
- ..()
- del(src)
+ qdel(src)
+/mob/living/simple_animal/hostile/blobspore/Destroy()
+ if(factory)
+ factory.spores -= src
+ factory = null
+ ..()
diff --git a/code/game/gamemodes/blob/blobs/node.dm b/code/game/gamemodes/blob/blobs/node.dm
index c9ffaf96f1..92572f9a7b 100644
--- a/code/game/gamemodes/blob/blobs/node.dm
+++ b/code/game/gamemodes/blob/blobs/node.dm
@@ -14,7 +14,7 @@
..(loc, h)
- Del()
+ Destroy()
blob_nodes -= src
processing_objects.Remove(src)
..()
@@ -24,7 +24,7 @@
update_icon()
if(health <= 0)
playsound(src.loc, 'sound/effects/splat.ogg', 50, 1)
- del(src)
+ qdel(src)
return
return
diff --git a/code/game/gamemodes/blob/blobs/shield.dm b/code/game/gamemodes/blob/blobs/shield.dm
index 0e1b6c07eb..c47696c72e 100644
--- a/code/game/gamemodes/blob/blobs/shield.dm
+++ b/code/game/gamemodes/blob/blobs/shield.dm
@@ -14,7 +14,7 @@
update_icon()
if(health <= 0)
playsound(src.loc, 'sound/effects/splat.ogg', 50, 1)
- del(src)
+ qdel(src)
return
return
diff --git a/code/game/gamemodes/blob/theblob.dm b/code/game/gamemodes/blob/theblob.dm
index f6351c8480..44486d605b 100644
--- a/code/game/gamemodes/blob/theblob.dm
+++ b/code/game/gamemodes/blob/theblob.dm
@@ -3,7 +3,7 @@
name = "blob"
icon = 'icons/mob/blob.dmi'
icon_state = "blob"
- luminosity = 3
+ light_range = 3
desc = "Some blob creature thingy"
density = 1
opacity = 0
@@ -31,7 +31,7 @@
return
- Del()
+ Destroy()
blobs -= src
..()
return
@@ -110,7 +110,7 @@
B.loc = T
else
T.blob_act()//If we cant move in hit the turf
- del(B)
+ qdel(B)
for(var/atom/A in T)//Hit everything in the turf
A.blob_act()
return 1
@@ -134,7 +134,7 @@
update_icon()//Needs to be updated with the types
if(health <= 0)
playsound(src.loc, 'sound/effects/splat.ogg', 50, 1)
- del(src)
+ qdel(src)
return
if(health <= 15)
icon_state = "blob_damaged"
@@ -158,7 +158,7 @@
attackby(var/obj/item/weapon/W, var/mob/user)
playsound(src.loc, 'sound/effects/attackblob.ogg', 50, 1)
- src.visible_message("\red The [src.name] has been attacked with \the [W][(user ? " by [user]." : ".")]")
+ src.visible_message("The [src.name] has been attacked with \the [W][(user ? " by [user]." : ".")]")
var/damage = 0
switch(W.damtype)
if("fire")
@@ -182,7 +182,7 @@
new/obj/effect/blob/factory(src.loc,src.health)
if("Shield")
new/obj/effect/blob/shield(src.loc,src.health*2)
- del(src)
+ qdel(src)
return
//////////////////////////////****IDLE BLOB***/////////////////////////////////////
@@ -201,7 +201,7 @@
proc/update_idle()
if(health<=0)
- del(src)
+ qdel(src)
return
if(health<4)
icon_state = "blobc0"
@@ -212,7 +212,7 @@
icon_state = "blobidle0"
- Del()
+ Destroy()
var/obj/effect/blob/B = new /obj/effect/blob( src.loc )
spawn(30)
B.Life()
diff --git a/code/game/gamemodes/changeling/changeling_powers.dm b/code/game/gamemodes/changeling/changeling_powers.dm
index 9b6ddb5160..2961950377 100644
--- a/code/game/gamemodes/changeling/changeling_powers.dm
+++ b/code/game/gamemodes/changeling/changeling_powers.dm
@@ -385,7 +385,7 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
animation.master = src
flick("monkey2h", animation)
sleep(48)
- del(animation)
+ qdel(animation)
for(var/obj/item/W in src)
C.drop_from_inventory(W)
@@ -400,7 +400,7 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
O.real_name = chosen_dna.real_name
for(var/obj/T in C)
- del(T)
+ qdel(T)
O.loc = C.loc
@@ -420,7 +420,7 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
O.changeling_update_languages(changeling.absorbed_languages)
feedback_add_details("changeling_powers","LFT")
- del(C)
+ qdel(C)
return 1
diff --git a/code/game/gamemodes/cult/cult_structures.dm b/code/game/gamemodes/cult/cult_structures.dm
index 185dc99ebd..b5854ed981 100644
--- a/code/game/gamemodes/cult/cult_structures.dm
+++ b/code/game/gamemodes/cult/cult_structures.dm
@@ -22,8 +22,8 @@
desc = "A floating crystal that hums with an unearthly energy"
icon_state = "pylon"
var/isbroken = 0
- luminosity = 5
- l_color = "#3e0000"
+ light_range = 5
+ light_color = "#3e0000"
var/obj/item/wepon = null
/obj/structure/cult/pylon/attack_hand(mob/M as mob)
@@ -47,7 +47,7 @@
isbroken = 1
density = 0
icon_state = "pylon-broken"
- SetLuminosity(0)
+ set_light(0)
else
user << "You hit the pylon!"
playsound(get_turf(src), 'sound/effects/Glasshit.ogg', 75, 1)
@@ -66,13 +66,12 @@
isbroken = 0
density = 1
icon_state = "pylon"
- SetLuminosity(5)
+ set_light(5)
/obj/structure/cult/tome
name = "Desk"
desc = "A desk covered in arcane manuscripts and tomes in unknown languages. Looking at the text makes your skin crawl"
icon_state = "tomealtar"
-// luminosity = 5
//sprites for this no longer exist -Pete
//(they were stolen from another game anyway)
@@ -105,8 +104,8 @@
return
/obj/effect/gateway/active
- luminosity=5
- l_color="#ff0000"
+ light_range=5
+ light_color="#ff0000"
spawnable=list(
/mob/living/simple_animal/hostile/scarybat,
/mob/living/simple_animal/hostile/creature,
@@ -114,8 +113,8 @@
)
/obj/effect/gateway/active/cult
- luminosity=5
- l_color="#ff0000"
+ light_range=5
+ light_color="#ff0000"
spawnable=list(
/mob/living/simple_animal/hostile/scarybat/cult,
/mob/living/simple_animal/hostile/creature/cult,
@@ -155,7 +154,7 @@
if(istype(M, /mob/living/silicon/robot))
var/mob/living/silicon/robot/Robot = M
if(Robot.mmi)
- del(Robot.mmi)
+ qdel(Robot.mmi)
else
for(var/obj/item/W in M)
if(istype(W, /obj/item/weapon/implant))
diff --git a/code/game/gamemodes/cult/cultify/mob.dm b/code/game/gamemodes/cult/cultify/mob.dm
index a7d275b177..154078de3d 100644
--- a/code/game/gamemodes/cult/cultify/mob.dm
+++ b/code/game/gamemodes/cult/cultify/mob.dm
@@ -32,18 +32,18 @@
else
dust()
-/mob/proc/see_narsie(var/obj/machinery/singularity/narsie/large/N, var/dir)
+/mob/proc/see_narsie(var/obj/singularity/narsie/large/N, var/dir)
if(N.chained)
if(narsimage)
- del(narsimage)
- del(narglow)
+ qdel(narsimage)
+ qdel(narglow)
return
if((N.z == src.z)&&(get_dist(N,src) <= (N.consume_range+10)) && !(N in view(src)))
if(!narsimage) //Create narsimage
narsimage = image('icons/obj/narsie.dmi',src.loc,"narsie",9,1)
narsimage.mouse_opacity = 0
if(!narglow) //Create narglow
- narglow = image('icons/obj/narsie.dmi',narsimage.loc,"glow-narsie",LIGHTING_LAYER+2,1)
+ narglow = image('icons/obj/narsie.dmi',narsimage.loc,"glow-narsie",12,1)
narglow.mouse_opacity = 0
//Else if no dir is given, simply send them the image of narsie
var/new_x = 32 * (N.x - src.x) + N.pixel_x
@@ -59,5 +59,5 @@
src << narglow
else
if(narsimage)
- del(narsimage)
- del(narglow)
+ qdel(narsimage)
+ qdel(narglow)
diff --git a/code/game/gamemodes/cult/cultify/obj.dm b/code/game/gamemodes/cult/cultify/obj.dm
index bc0a723869..630877eb11 100644
--- a/code/game/gamemodes/cult/cultify/obj.dm
+++ b/code/game/gamemodes/cult/cultify/obj.dm
@@ -65,8 +65,11 @@
new /obj/structure/cult/tome(loc)
qdel(src)
-/obj/machinery/door/cultify()
+/obj/machinery/door/airlock/external/cultify()
new /obj/structure/mineral_door/wood(loc)
+ ..()
+
+/obj/machinery/door/cultify()
icon_state = "null"
density = 0
c_animation = new /atom/movable/overlay(src.loc)
@@ -79,7 +82,7 @@
c_animation.icon_state = "breakdoor"
flick("cultification",c_animation)
spawn(10)
- del(c_animation)
+ qdel(c_animation)
qdel(src)
/obj/machinery/door/firedoor/cultify()
@@ -125,7 +128,7 @@
/obj/structure/mineral_door/wood/cultify()
return
-/obj/machinery/singularity/cultify()
+/obj/singularity/cultify()
var/dist = max((current_size - 2), 1)
explosion(get_turf(src), dist, dist * 2, dist * 4)
qdel(src)
diff --git a/code/game/gamemodes/cult/hell_universe.dm b/code/game/gamemodes/cult/hell_universe.dm
index 2a2499bb45..9a7344f036 100644
--- a/code/game/gamemodes/cult/hell_universe.dm
+++ b/code/game/gamemodes/cult/hell_universe.dm
@@ -40,6 +40,7 @@ In short:
// Apply changes when entering state
/datum/universal_state/hell/OnEnter()
set background = 1
+ garbage_collector.garbage_collect = 0
escape_list = get_area_turfs(locate(/area/hallway/secondary/exit))
//Separated into separate procs for profiling
@@ -53,9 +54,8 @@ In short:
runedec += 9000 //basically removing the rune cap
/datum/universal_state/hell/proc/AreaSet()
- for(var/area/ca in world)
- var/area/A = ca.master
- if(!istype(A,/area) || A.name=="Space")
+ for(var/area/A in world)
+ if(A.name=="Space")
continue
// Reset all alarms.
@@ -73,9 +73,8 @@ In short:
spess.overlays += I
/datum/universal_state/hell/proc/AmbientSet()
- for(var/turf/T in world)
- if(istype(T, /turf/space)) continue
- T.update_lumcount(1, 255, 0, 0, 0)
+ for(var/atom/movable/lighting_overlay/L in world)
+ L.update_lumcount(1, 0, 0)
/datum/universal_state/hell/proc/MiscSet()
for(var/turf/simulated/floor/T in world)
diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm
index 9f99945837..8a55a81165 100644
--- a/code/game/gamemodes/cult/ritual.dm
+++ b/code/game/gamemodes/cult/ritual.dm
@@ -74,7 +74,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
AI.client.images += blood_image
rune_list.Add(src)
- Del()
+ Destroy()
for(var/mob/living/silicon/ai/AI in player_list)
if(AI.client)
AI.client.images -= blood_image
@@ -92,11 +92,11 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
attackby(I as obj, user as mob)
if(istype(I, /obj/item/weapon/book/tome) && iscultist(user))
user << "You retrace your steps, carefully undoing the lines of the rune."
- del(src)
+ qdel(src)
return
else if(istype(I, /obj/item/weapon/nullrod))
user << "\blue You disrupt the vile magic with the deadening field of the null rod!"
- del(src)
+ qdel(src)
return
return
diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm
index 6f64faca59..8ead4b96ba 100644
--- a/code/game/gamemodes/cult/runes.dm
+++ b/code/game/gamemodes/cult/runes.dm
@@ -24,7 +24,7 @@ var/list/sacrificed = list()
user << "\red You feel pain, as rune disappears in reality shift caused by too much wear of space-time fabric"
if (istype(user, /mob/living))
user.take_overall_damage(5, 0)
- del(src)
+ qdel(src)
if(allrunesloc && index != 0)
if(istype(src,/obj/effect/rune))
user.say("Sas[pick("'","`")]so c'arta forbici!")//Only you can stop auto-muting
@@ -61,7 +61,7 @@ var/list/sacrificed = list()
user << "\red You feel pain, as rune disappears in reality shift caused by too much wear of space-time fabric"
if (istype(user, /mob/living))
user.take_overall_damage(5, 0)
- del(src)
+ qdel(src)
for(var/mob/living/carbon/C in orange(1,src))
if(iscultist(C) && !C.stat)
culcount++
@@ -94,7 +94,7 @@ var/list/sacrificed = list()
new /obj/item/weapon/book/tome(src.loc)
else
new /obj/item/weapon/book/tome(usr.loc)
- del(src)
+ qdel(src)
return
@@ -127,6 +127,7 @@ var/list/sacrificed = list()
if(target.getFireLoss() < 100)
target.hallucination = min(target.hallucination, 500)
return 0
+
target.take_overall_damage(0, rand(5, 20)) // You dirty resister cannot handle the damage to your mind. Easily. - even cultists who accept right away should experience some effects
// Resist messages go!
if(initial_message) //don't do this stuff right away, only if they resist or hesitate.
@@ -190,7 +191,7 @@ var/list/sacrificed = list()
cultists += 1
if(cultists.len >= 9)
log_and_message_admins_many(cultists, "summoned Nar-sie.")
- new /obj/machinery/singularity/narsie/large(src.loc)
+ new /obj/singularity/narsie/large(src.loc)
return
else
return fizzle()
@@ -209,7 +210,7 @@ var/list/sacrificed = list()
T.hotspot_expose(700,125)
var/rune = src // detaching the proc - in theory
empulse(U, (range_red - 2), range_red)
- del(rune)
+ qdel(rune)
return
/////////////////////////////////////////SIXTH RUNE
@@ -369,7 +370,7 @@ var/list/sacrificed = list()
usr.say("Kla[pick("'","`")]atu barada nikt'o!")
for (var/mob/V in viewers(src))
V.show_message("\red The rune turns into gray dust, veiling the surrounding runes.", 3)
- del(src)
+ qdel(src)
else
usr.whisper("Kla[pick("'","`")]atu barada nikt'o!")
usr << "\red Your talisman turns into gray dust, veiling the surrounding runes."
@@ -417,6 +418,7 @@ var/list/sacrificed = list()
var/mob/dead/observer/ghost
for(var/mob/dead/observer/O in this_rune.loc)
if(!O.client) continue
+ if(!O.MayRespawn()) continue
if(O.mind && O.mind.current && O.mind.current.stat != DEAD) continue
ghost = O
break
@@ -545,8 +547,8 @@ var/list/sacrificed = list()
for (var/mob/V in viewers(src))
V.show_message("\red The runes turn into dust, which then forms into an arcane image on the paper.", 3)
usr.say("H'drak v[pick("'","`")]loso, mir'kanas verbot!")
- del(imbued_from)
- del(newtalisman)
+ qdel(imbued_from)
+ qdel(newtalisman)
else
return fizzle()
@@ -574,26 +576,26 @@ var/list/sacrificed = list()
// returns 0 if the rune is not used. returns 1 if the rune is used.
communicate()
. = 1 // Default output is 1. If the rune is deleted it will return 1
- var/input = sanitize(input(usr, "Please choose a message to tell to the other acolytes.", "Voice of Blood", ""))
+ var/input = input(usr, "Please choose a message to tell to the other acolytes.", "Voice of Blood", "")//sanitize() below, say() and whisper() have their own
if(!input)
if (istype(src))
fizzle()
return 0
else
return 0
- if(istype(src,/obj/effect/rune))
- usr.say("O bidai nabora se[pick("'","`")]sma!")
- else
- usr.whisper("O bidai nabora se[pick("'","`")]sma!")
if(istype(src,/obj/effect/rune))
+ usr.say("O bidai nabora se[pick("'","`")]sma!")
usr.say("[input]")
else
+ usr.whisper("O bidai nabora se[pick("'","`")]sma!")
usr.whisper("[input]")
+
+ input = sanitize(input)
for(var/datum/mind/H in cult.current_antagonists)
if (H.current)
H.current << "\red \b [input]"
- del(src)
+ qdel(src)
return 1
/////////////////////////////////////////FIFTEENTH RUNE
@@ -745,7 +747,7 @@ var/list/sacrificed = list()
usr.say("Nikt[pick("'","`")]o barada kla'atu!")
for (var/mob/V in viewers(src))
V.show_message("\red The rune turns into red dust, reveaing the surrounding runes.", 3)
- del(src)
+ qdel(src)
return
if(istype(W,/obj/item/weapon/paper/talisman))
usr.whisper("Nikt[pick("'","`")]o barada kla'atu!")
@@ -818,7 +820,7 @@ var/list/sacrificed = list()
for(var/mob/living/carbon/C in users)
user.take_overall_damage(dam, 0)
C.say("Khari[pick("'","`")]d! Gual'te nikka!")
- del(src)
+ qdel(src)
return fizzle()
/////////////////////////////////////////NINETEENTH RUNE
@@ -858,7 +860,7 @@ var/list/sacrificed = list()
user.visible_message("\red Rune disappears with a flash of red light, and in its place now a body lies.", \
"\red You are blinded by the flash of red light! After you're able to see again, you see that now instead of the rune there's a body.", \
"\red You hear a pop and smell ozone.")
- del(src)
+ qdel(src)
return fizzle()
/////////////////////////////////////////TWENTIETH RUNES
@@ -881,7 +883,7 @@ var/list/sacrificed = list()
usr.say("Sti[pick("'","`")] kaliedir!")
usr << "\red The world becomes quiet as the deafening rune dissipates into fine dust."
admin_attacker_log_many_victims(usr, affected, "Used a deafen rune.", "Was victim of a deafen rune.", "used a deafen rune on")
- del(src)
+ qdel(src)
else
return fizzle()
else
@@ -926,7 +928,7 @@ var/list/sacrificed = list()
usr.say("Sti[pick("'","`")] kaliesin!")
usr << "\red The rune flashes, blinding those who not follow the Nar-Sie, and dissipates into fine dust."
admin_attacker_log_many_victims(usr, affected, "Used a blindness rune.", "Was victim of a blindness rune.", "used a blindness rune on")
- del(src)
+ qdel(src)
else
return fizzle()
else
@@ -984,7 +986,7 @@ var/list/sacrificed = list()
C.take_overall_damage(15, 0)
admin_attacker_log_many_victims(usr, victims, "Used a blood boil rune.", "Was the victim of a blood boil rune.", "used a blood boil rune on")
log_and_message_admins_many(cultists - usr, "assisted activating a blood boil rune.")
- del(src)
+ qdel(src)
else
return fizzle()
return
@@ -1014,8 +1016,8 @@ var/list/sacrificed = list()
M << "\red Blood suddenly ignites, burning you!"
var/turf/T = get_turf(B)
T.hotspot_expose(700,125)
- del(B)
- del(src)
+ qdel(B)
+ qdel(src)
////////// Rune 24 (counting burningblood, which kinda doesnt work yet.)
@@ -1038,7 +1040,7 @@ var/list/sacrificed = list()
S.Weaken(5)
S.show_message("\red BZZZT... The rune has exploded in a bright flash.", 3)
admin_attack_log(usr, S, "Used a stun rune.", "Was victim of a stun rune.", "used a stun rune on")
- del(src)
+ qdel(src)
else ///When invoked as talisman, stun and mute the target mob.
usr.say("Dream sign ''Evil sealing talisman'[pick("'","`")]!")
var/obj/item/weapon/nullrod/N = locate() in T
@@ -1081,5 +1083,5 @@ var/list/sacrificed = list()
//the below calls update_icons() at the end, which will update overlay icons by using the (now updated) cache
user.put_in_hands(new /obj/item/weapon/melee/cultblade(user)) //put in hands or on floor
- del(src)
+ qdel(src)
return
diff --git a/code/game/gamemodes/cult/talisman.dm b/code/game/gamemodes/cult/talisman.dm
index df5b9a4965..d2b881d891 100644
--- a/code/game/gamemodes/cult/talisman.dm
+++ b/code/game/gamemodes/cult/talisman.dm
@@ -35,7 +35,7 @@
user.take_organ_damage(5, 0)
if(src && src.imbue!="supply" && src.imbue!="runestun")
if(delete)
- del(src)
+ qdel(src)
return
else
user << "You see strange symbols on the paper. Are they supposed to mean something?"
@@ -47,7 +47,7 @@
if(imbue == "runestun")
user.take_organ_damage(5, 0)
call(/obj/effect/rune/proc/runestun)(T)
- del(src)
+ qdel(src)
else
..() ///If its some other talisman, use the generic attack code, is this supposed to work this way?
else
@@ -56,7 +56,7 @@
proc/supply(var/key)
if (!src.uses)
- del(src)
+ qdel(src)
return
var/dat = "There are [src.uses] bloody runes on the parchment.\
+ [message] "}
+
+ if(select || (flags & SD_ALERT_SELECT_MULTI)) // select style choices
+ html += {""
+ else if(flags & SD_ALERT_LINKS) // text link style
+ for(var/b in buttons)
+ var/list/L = list()
+ L["clk"] = b
+ var/html_string=list2params(L)
+ var/focus
+ if(b == default) focus = " ID=fcs"
+ html += "[html_encode(b)]\
+
"
+ else // button style choices
+ for(var/b in buttons)
+ var/list/L = list()
+ L["clk"] = b
+ var/html_string=list2params(L)
+ var/focus
+ if(b == default) focus = " ID=fcs"
+ html += " "
+
+ html += "
"
diff --git a/code/game/gamemodes/endgame/supermatter_cascade/blob.dm b/code/game/gamemodes/endgame/supermatter_cascade/blob.dm
index 139045291f..d71ff249d1 100644
--- a/code/game/gamemodes/endgame/supermatter_cascade/blob.dm
+++ b/code/game/gamemodes/endgame/supermatter_cascade/blob.dm
@@ -8,7 +8,7 @@
//luminosity = 5
//l_color="#0066FF"
- layer = LIGHTING_LAYER+1
+ layer = 11
var/spawned=0 // DIR mask
var/next_check=0
@@ -49,7 +49,8 @@
for(var/atom/movable/A in T)
if(A)
if(istype(A,/mob/living))
- del(A)
+ qdel(A)
+ continue
else if(istype(A,/mob)) // Observers, AI cameras.
continue
qdel(A)
@@ -114,4 +115,4 @@
if(istype(user,/mob/dead/observer))
return
- del(user)
+ qdel(user)
diff --git a/code/game/gamemodes/endgame/supermatter_cascade/portal.dm b/code/game/gamemodes/endgame/supermatter_cascade/portal.dm
index 9d3f12b021..8c826fe22d 100644
--- a/code/game/gamemodes/endgame/supermatter_cascade/portal.dm
+++ b/code/game/gamemodes/endgame/supermatter_cascade/portal.dm
@@ -1,6 +1,6 @@
/*** EXIT PORTAL ***/
-/obj/machinery/singularity/narsie/large/exit
+/obj/singularity/narsie/large/exit
name = "Bluespace Rift"
desc = "NO TIME TO EXPLAIN, JUMP IN"
icon = 'icons/obj/rift.dmi'
@@ -10,27 +10,27 @@
announce=0
narnar=0
- layer=LIGHTING_LAYER+2 // ITS SO BRIGHT
+ layer=12 // ITS SO BRIGHT
consume_range = 6
-/obj/machinery/singularity/narsie/large/exit/New()
+/obj/singularity/narsie/large/exit/New()
..()
processing_objects.Add(src)
-/obj/machinery/singularity/narsie/large/exit/update_icon()
+/obj/singularity/narsie/large/exit/update_icon()
overlays = 0
-/obj/machinery/singularity/narsie/large/exit/process()
+/obj/singularity/narsie/large/exit/process()
for(var/mob/M in player_list)
if(M.client)
M.see_rift(src)
eat()
-/obj/machinery/singularity/narsie/large/exit/acquire(var/mob/food)
+/obj/singularity/narsie/large/exit/acquire(var/mob/food)
return
-/obj/machinery/singularity/narsie/large/exit/consume(const/atom/A)
+/obj/singularity/narsie/large/exit/consume(const/atom/A)
if(!(A.singuloCanEat()))
return 0
@@ -62,10 +62,10 @@
//thou shall always be able to see the rift
var/image/riftimage = null
-/mob/proc/see_rift(var/obj/machinery/singularity/narsie/large/exit/R)
+/mob/proc/see_rift(var/obj/singularity/narsie/large/exit/R)
if((R.z == src.z) && (get_dist(R,src) <= (R.consume_range+10)) && !(R in view(src)))
if(!riftimage)
- riftimage = image('icons/obj/rift.dmi',src.loc,"rift",LIGHTING_LAYER+2,1)
+ riftimage = image('icons/obj/rift.dmi',src.loc,"rift",12,1)
riftimage.mouse_opacity = 0
var/new_x = 32 * (R.x - src.x) + R.pixel_x
@@ -78,4 +78,4 @@
else
if(riftimage)
- del(riftimage)
+ qdel(riftimage)
diff --git a/code/game/gamemodes/endgame/supermatter_cascade/universe.dm b/code/game/gamemodes/endgame/supermatter_cascade/universe.dm
index 1b5ceb87e8..37b68340a8 100644
--- a/code/game/gamemodes/endgame/supermatter_cascade/universe.dm
+++ b/code/game/gamemodes/endgame/supermatter_cascade/universe.dm
@@ -33,6 +33,7 @@
// Apply changes when entering state
/datum/universal_state/supermatter_cascade/OnEnter()
set background = 1
+ garbage_collector.garbage_collect = 0
world << "You are blinded by a brilliant flash of energy."
world << sound('sound/effects/cascade.ogg')
@@ -54,7 +55,7 @@
cult.allow_narsie = 0
PlayerSet()
- new /obj/machinery/singularity/narsie/large/exit(pick(endgame_exits))
+ new /obj/singularity/narsie/large/exit(pick(endgame_exits))
spawn(rand(30,60) SECONDS)
var/txt = {"
There's been a galaxy-wide electromagnetic pulse. All of our systems are heavily damaged and many personnel are dead or dying. We are seeing increasing indications of the universe itself beginning to unravel.
@@ -82,11 +83,10 @@ AUTOMATED ALERT: Link to [command_name()] lost."}
return
/datum/universal_state/supermatter_cascade/proc/AreaSet()
- for(var/area/ca in world)
- var/area/A=ca.master
+ for(var/area/A in world)
if(A.z in config.admin_levels)
continue
- if(!istype(A,/area) || istype(A,/area/space))
+ if(istype(A,/area/space))
continue
// Reset all alarms.
@@ -110,10 +110,9 @@ AUTOMATED ALERT: Link to [command_name()] lost."}
spess.overlays += "end01"
/datum/universal_state/supermatter_cascade/proc/AmbientSet()
- for(var/turf/T in world)
- if(istype(T, /turf/space)) continue
- if(!(T.z in config.admin_levels))
- T.update_lumcount(1, 160, 255, 0, 0)
+ for(var/atom/movable/lighting_overlay/L in world)
+ if(!(L.z in config.admin_levels))
+ L.update_lumcount(0.5, 1, 0)
/datum/universal_state/supermatter_cascade/proc/MiscSet()
for (var/obj/machinery/firealarm/alm in world)
diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm
index feed6092e2..d49247263f 100644
--- a/code/game/gamemodes/events.dm
+++ b/code/game/gamemodes/events.dm
@@ -49,7 +49,7 @@
var/turf/T = pick(blobstart)
var/obj/effect/bhole/bh = new /obj/effect/bhole( T.loc, 30 )
spawn(rand(50, 300))
- del(bh)
+ qdel(bh)
/*
if(3) //Leaving the code in so someone can try and delag it, but this event can no longer occur randomly, per SoS's request. --NEO
command_alert("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert")
@@ -71,7 +71,7 @@
P.icon_state = "anom"
P.name = "wormhole"
spawn(rand(300,600))
- del(P)
+ qdel(P)
*/
if(3)
if((world.time/10)>=3600 && config.ninjas_allowed && !sent_ninja_to_station)//If an hour has passed, relatively speaking. Also, if ninjas are allowed to spawn and if there is not already a ninja for the round.
diff --git a/code/game/gamemodes/events/PortalStorm.dm b/code/game/gamemodes/events/PortalStorm.dm
index 890755d6b8..6144f3305b 100644
--- a/code/game/gamemodes/events/PortalStorm.dm
+++ b/code/game/gamemodes/events/PortalStorm.dm
@@ -1,26 +1,26 @@
-/datum/event/portalstorm
-
- Announce()
- command_alert("Subspace disruption detected around the vessel", "Anomaly Alert")
- LongTerm()
-
- var/list/turfs = list( )
- var/turf/picked
-
- for(var/turf/T in world)
- if(T.z < 5 && istype(T,/turf/simulated/floor))
- turfs += T
-
- for(var/turf/T in world)
- if(prob(10) && T.z < 5 && istype(T,/turf/simulated/floor))
- spawn(50+rand(0,3000))
- picked = pick(turfs)
- var/obj/portal/P = new /obj/portal( T )
- P.target = picked
- P.creator = null
- P.icon = 'icons/obj/objects.dmi'
- P.failchance = 0
- P.icon_state = "anom"
- P.name = "wormhole"
- spawn(rand(100,150))
- del(P)
\ No newline at end of file
+/datum/event/portalstorm
+
+ Announce()
+ command_alert("Subspace disruption detected around the vessel", "Anomaly Alert")
+ LongTerm()
+
+ var/list/turfs = list( )
+ var/turf/picked
+
+ for(var/turf/T in world)
+ if(T.z < 5 && istype(T,/turf/simulated/floor))
+ turfs += T
+
+ for(var/turf/T in world)
+ if(prob(10) && T.z < 5 && istype(T,/turf/simulated/floor))
+ spawn(50+rand(0,3000))
+ picked = pick(turfs)
+ var/obj/portal/P = new /obj/portal( T )
+ P.target = picked
+ P.creator = null
+ P.icon = 'icons/obj/objects.dmi'
+ P.failchance = 0
+ P.icon_state = "anom"
+ P.name = "wormhole"
+ spawn(rand(100,150))
+ qdel(P)
diff --git a/code/game/gamemodes/events/black_hole.dm b/code/game/gamemodes/events/black_hole.dm
index 6ff7babbeb..60ab8a692f 100644
--- a/code/game/gamemodes/events/black_hole.dm
+++ b/code/game/gamemodes/events/black_hole.dm
@@ -1,88 +1,88 @@
-/obj/effect/bhole
- name = "black hole"
- icon = 'icons/obj/objects.dmi'
- desc = "FUCK FUCK FUCK AAAHHH"
- icon_state = "bhole3"
- opacity = 1
- unacidable = 1
- density = 0
- anchored = 1
-
-/obj/effect/bhole/New()
- spawn(4)
- controller()
-
-/obj/effect/bhole/proc/controller()
- while(src)
-
- if(!isturf(loc))
- del(src)
- return
-
- //DESTROYING STUFF AT THE EPICENTER
- for(var/mob/living/M in orange(1,src))
- del(M)
- for(var/obj/O in orange(1,src))
- del(O)
- for(var/turf/simulated/ST in orange(1,src))
- ST.ChangeTurf(/turf/space)
-
- sleep(6)
- grav(10, 4, 10, 0 )
- sleep(6)
- grav( 8, 4, 10, 0 )
- sleep(6)
- grav( 9, 4, 10, 0 )
- sleep(6)
- grav( 7, 3, 40, 1 )
- sleep(6)
- grav( 5, 3, 40, 1 )
- sleep(6)
- grav( 6, 3, 40, 1 )
- sleep(6)
- grav( 4, 2, 50, 6 )
- sleep(6)
- grav( 3, 2, 50, 6 )
- sleep(6)
- grav( 2, 2, 75,25 )
- sleep(6)
-
-
-
- //MOVEMENT
- if( prob(50) )
- src.anchored = 0
- step(src,pick(alldirs))
- src.anchored = 1
-
-/obj/effect/bhole/proc/grav(var/r, var/ex_act_force, var/pull_chance, var/turf_removal_chance)
- if(!isturf(loc)) //blackhole cannot be contained inside anything. Weird stuff might happen
- del(src)
- return
- for(var/t = -r, t < r, t++)
- affect_coord(x+t, y-r, ex_act_force, pull_chance, turf_removal_chance)
- affect_coord(x-t, y+r, ex_act_force, pull_chance, turf_removal_chance)
- affect_coord(x+r, y+t, ex_act_force, pull_chance, turf_removal_chance)
- affect_coord(x-r, y-t, ex_act_force, pull_chance, turf_removal_chance)
- return
-
-/obj/effect/bhole/proc/affect_coord(var/x, var/y, var/ex_act_force, var/pull_chance, var/turf_removal_chance)
- //Get turf at coordinate
- var/turf/T = locate(x, y, z)
- if(isnull(T)) return
-
- //Pulling and/or ex_act-ing movable atoms in that turf
- if( prob(pull_chance) )
- for(var/obj/O in T.contents)
- if(O.anchored)
- O.ex_act(ex_act_force)
- else
- step_towards(O,src)
- for(var/mob/living/M in T.contents)
- step_towards(M,src)
-
- //Destroying the turf
- if( T && istype(T,/turf/simulated) && prob(turf_removal_chance) )
- var/turf/simulated/ST = T
- ST.ChangeTurf(/turf/space)
+/obj/effect/bhole
+ name = "black hole"
+ icon = 'icons/obj/objects.dmi'
+ desc = "FUCK FUCK FUCK AAAHHH"
+ icon_state = "bhole3"
+ opacity = 1
+ unacidable = 1
+ density = 0
+ anchored = 1
+
+/obj/effect/bhole/New()
+ spawn(4)
+ controller()
+
+/obj/effect/bhole/proc/controller()
+ while(src)
+
+ if(!isturf(loc))
+ qdel(src)
+ return
+
+ //DESTROYING STUFF AT THE EPICENTER
+ for(var/mob/living/M in orange(1,src))
+ qdel(M)
+ for(var/obj/O in orange(1,src))
+ qdel(O)
+ for(var/turf/simulated/ST in orange(1,src))
+ ST.ChangeTurf(/turf/space)
+
+ sleep(6)
+ grav(10, 4, 10, 0 )
+ sleep(6)
+ grav( 8, 4, 10, 0 )
+ sleep(6)
+ grav( 9, 4, 10, 0 )
+ sleep(6)
+ grav( 7, 3, 40, 1 )
+ sleep(6)
+ grav( 5, 3, 40, 1 )
+ sleep(6)
+ grav( 6, 3, 40, 1 )
+ sleep(6)
+ grav( 4, 2, 50, 6 )
+ sleep(6)
+ grav( 3, 2, 50, 6 )
+ sleep(6)
+ grav( 2, 2, 75,25 )
+ sleep(6)
+
+
+
+ //MOVEMENT
+ if( prob(50) )
+ src.anchored = 0
+ step(src,pick(alldirs))
+ src.anchored = 1
+
+/obj/effect/bhole/proc/grav(var/r, var/ex_act_force, var/pull_chance, var/turf_removal_chance)
+ if(!isturf(loc)) //blackhole cannot be contained inside anything. Weird stuff might happen
+ qdel(src)
+ return
+ for(var/t = -r, t < r, t++)
+ affect_coord(x+t, y-r, ex_act_force, pull_chance, turf_removal_chance)
+ affect_coord(x-t, y+r, ex_act_force, pull_chance, turf_removal_chance)
+ affect_coord(x+r, y+t, ex_act_force, pull_chance, turf_removal_chance)
+ affect_coord(x-r, y-t, ex_act_force, pull_chance, turf_removal_chance)
+ return
+
+/obj/effect/bhole/proc/affect_coord(var/x, var/y, var/ex_act_force, var/pull_chance, var/turf_removal_chance)
+ //Get turf at coordinate
+ var/turf/T = locate(x, y, z)
+ if(isnull(T)) return
+
+ //Pulling and/or ex_act-ing movable atoms in that turf
+ if( prob(pull_chance) )
+ for(var/obj/O in T.contents)
+ if(O.anchored)
+ O.ex_act(ex_act_force)
+ else
+ step_towards(O,src)
+ for(var/mob/living/M in T.contents)
+ step_towards(M,src)
+
+ //Destroying the turf
+ if( T && istype(T,/turf/simulated) && prob(turf_removal_chance) )
+ var/turf/simulated/ST = T
+ ST.ChangeTurf(/turf/space)
return
\ No newline at end of file
diff --git a/code/game/gamemodes/events/clang.dm b/code/game/gamemodes/events/clang.dm
index 7f4f6f7020..74fb9ee507 100644
--- a/code/game/gamemodes/events/clang.dm
+++ b/code/game/gamemodes/events/clang.dm
@@ -36,7 +36,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
if(clong.density || prob(10))
clong.meteorhit(src)
else
- del(src)
+ qdel(src)
if(clong && prob(25))
src.loc = clong.loc
@@ -81,7 +81,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
if (isNotStationLevel(immrod.z))
immrod.z = pick(config.station_levels)
if(immrod.loc == end)
- del(immrod)
+ qdel(immrod)
sleep(10)
for(var/obj/effect/immovablerod/imm in world)
return
diff --git a/code/game/gamemodes/events/dust.dm b/code/game/gamemodes/events/dust.dm
index 2e8b3b1328..4e064d8be6 100644
--- a/code/game/gamemodes/events/dust.dm
+++ b/code/game/gamemodes/events/dust.dm
@@ -37,7 +37,7 @@ The "dust" will damage the hull of the station causin minor hull breaches.
density = 1
anchored = 1
var/strength = 2 //ex_act severity number
- var/life = 2 //how many things we hit before del(src)
+ var/life = 2 //how many things we hit before qdel(src)
weak
strength = 3
@@ -107,8 +107,7 @@ The "dust" will damage the hull of the station causin minor hull breaches.
life--
if(life <= 0)
walk(src,0)
- spawn(1)
- del(src)
+ qdel(src)
return 0
return
@@ -119,5 +118,5 @@ The "dust" will damage the hull of the station causin minor hull breaches.
ex_act(severity)
- del(src)
+ qdel(src)
return
diff --git a/code/game/gamemodes/events/holidays/Christmas.dm b/code/game/gamemodes/events/holidays/Christmas.dm
index 7ca6678902..9c68ab879e 100644
--- a/code/game/gamemodes/events/holidays/Christmas.dm
+++ b/code/game/gamemodes/events/holidays/Christmas.dm
@@ -14,7 +14,7 @@
evil_tree.icon_living = evil_tree.icon_state
evil_tree.icon_dead = evil_tree.icon_state
evil_tree.icon_gib = evil_tree.icon_state
- del(xmas)
+ qdel(xmas)
/obj/item/weapon/toy/xmas_cracker
name = "xmas cracker"
diff --git a/code/game/gamemodes/events/wormholes.dm b/code/game/gamemodes/events/wormholes.dm
index 9a8066887b..a7830a2cb3 100644
--- a/code/game/gamemodes/events/wormholes.dm
+++ b/code/game/gamemodes/events/wormholes.dm
@@ -59,4 +59,4 @@
P.icon_state = "anom"
P.name = "wormhole"
spawn(rand(300,600))
- del(P)
\ No newline at end of file
+ qdel(P)
\ No newline at end of file
diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm
index 8ad65194d1..41183aeffa 100644
--- a/code/game/gamemodes/gameticker.dm
+++ b/code/game/gamemodes/gameticker.dm
@@ -1,11 +1,5 @@
var/global/datum/controller/gameticker/ticker
-#define GAME_STATE_PREGAME 1
-#define GAME_STATE_SETTING_UP 2
-#define GAME_STATE_PLAYING 3
-#define GAME_STATE_FINISHED 4
-
-
/datum/controller/gameticker
var/const/restart_timeout = 600
var/current_state = GAME_STATE_PREGAME
@@ -135,7 +129,7 @@ var/global/datum/controller/gameticker/ticker
for(var/obj/effect/landmark/start/S in landmarks_list)
//Deleting Startpoints but we need the ai point to AI-ize people later
if (S.name != "AI")
- del(S)
+ qdel(S)
world << "Enjoy the game!"
world << sound('sound/AI/welcome.ogg') // Skie
//Holiday Round-start stuff ~Carn
@@ -265,8 +259,8 @@ var/global/datum/controller/gameticker/ticker
//Otherwise if its a verb it will continue on afterwards.
sleep(300)
- if(cinematic) del(cinematic) //end the cinematic
- if(temp_buckle) del(temp_buckle) //release everybody
+ if(cinematic) qdel(cinematic) //end the cinematic
+ if(temp_buckle) qdel(temp_buckle) //release everybody
return
@@ -280,7 +274,7 @@ var/global/datum/controller/gameticker/ticker
continue
else
player.create_character()
- del(player)
+ qdel(player)
proc/collect_minds()
@@ -424,7 +418,7 @@ var/global/datum/controller/gameticker/ticker
robo.laws.show_laws(world)
if(dronecount)
- world << "There [dronecount>1 ? "were" : "was"] [dronecount] industrious maintenance [dronecount>1 ? "drones" : "drone"] at the end of this round."
+ world << "There [dronecount>1 ? "were" : "was"] [dronecount] industrious maintenance [dronecount>1 ? "drones" : "drone"] at the end of this round."
mode.declare_completion()//To declare normal completion.
diff --git a/code/game/gamemodes/heist/heist.dm b/code/game/gamemodes/heist/heist.dm
index f1de61f286..7e1ba6d368 100644
--- a/code/game/gamemodes/heist/heist.dm
+++ b/code/game/gamemodes/heist/heist.dm
@@ -26,6 +26,6 @@ var/global/list/obj/cortical_stacks = list() //Stacks for 'leave nobody behind'
var/area/skipjack = locate(/area/shuttle/skipjack/station)
for (var/mob/living/M in skipjack.contents)
//maybe send the player a message that they've gone home/been kidnapped? Someone responsible for vox lore should write that.
- del(M)
+ qdel(M)
for (var/obj/O in skipjack.contents)
- del(O) //no hiding in lockers or anything
\ No newline at end of file
+ qdel(O) //no hiding in lockers or anything
\ No newline at end of file
diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm
index c523b469f3..850529661c 100644
--- a/code/game/gamemodes/malfunction/Malf_Modules.dm
+++ b/code/game/gamemodes/malfunction/Malf_Modules.dm
@@ -89,7 +89,7 @@ rcd light flash thingy on matter drain
V.show_message("\blue You hear a loud electrical buzzing sound!", 2)
spawn(50)
explosion(get_turf(M), 0,1,2,3)
- del(M)
+ qdel(M)
else usr << "Out of uses."
else usr << "That's not a machine."
diff --git a/code/game/gamemodes/meme/meme.dm b/code/game/gamemodes/meme/meme.dm
index 2629b36013..2aa512264d 100644
--- a/code/game/gamemodes/meme/meme.dm
+++ b/code/game/gamemodes/meme/meme.dm
@@ -93,7 +93,7 @@
M.enter_host(first_host.current)
forge_meme_objectives(meme, first_host)
- del original
+ qdel(original)
log_admin("Created [memes.len] memes.")
diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm
index 1edb533daa..9d18216aa5 100644
--- a/code/game/gamemodes/meteor/meteors.dm
+++ b/code/game/gamemodes/meteor/meteors.dm
@@ -97,6 +97,10 @@
pass_flags = PASSTABLE | PASSGRILLE
power = 2
+/obj/effect/meteor/Destroy()
+ walk(src,0) //this cancels the walk_towards() proc
+ ..()
+
/obj/effect/meteor/Bump(atom/A)
spawn(0)
@@ -111,14 +115,14 @@
!istype(A,/obj/machinery/field_generator) && \
prob(detonation_chance))
explosion(loc, power, power + power_step, power + power_step * 2, power + power_step * 3, 0)
- del(src)
+ qdel(src)
return
/obj/effect/meteor/ex_act(severity)
if (severity < 4)
- del(src)
+ qdel(src)
return
/obj/effect/meteor/big
@@ -136,7 +140,7 @@
if(!istype(A,/obj/machinery/power/emitter) && \
!istype(A,/obj/machinery/field_generator))
if(--src.hits <= 0)
- del(src) //Dont blow up singularity containment if we get stuck there.
+ qdel(src) //Dont blow up singularity containment if we get stuck there.
if (A)
for(var/mob/M in player_list)
@@ -150,11 +154,11 @@
if (--src.hits <= 0)
if(prob(detonation_chance) && !istype(A, /obj/structure/grille))
explosion(loc, power, power + power_step, power + power_step * 2, power + power_step * 3, 0)
- del(src)
+ qdel(src)
return
/obj/effect/meteor/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/pickaxe))
- del(src)
+ qdel(src)
return
- ..()
\ No newline at end of file
+ ..()
diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm
index d26f1a0789..7b6b1dc952 100644
--- a/code/game/gamemodes/nuclear/pinpointer.dm
+++ b/code/game/gamemodes/nuclear/pinpointer.dm
@@ -48,6 +48,9 @@
if(bomb.timing)
user << "Extreme danger. Arming signal detected. Time remaining: [bomb.timeleft]"
+/obj/item/weapon/pinpointer/Destroy()
+ active = 0
+ ..()
/obj/item/weapon/pinpointer/advpinpointer
name = "Advanced Pinpointer"
diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm
index 27236dd8fb..076c0afbf3 100644
--- a/code/game/gamemodes/objective.dm
+++ b/code/game/gamemodes/objective.dm
@@ -13,7 +13,7 @@ datum/objective
if(text)
explanation_text = text
- Del()
+ Destroy()
all_objectives -= src
..()
@@ -541,7 +541,7 @@ datum/objective/steal
if (!custom_target) return
var/tmp_obj = new custom_target
var/custom_name = tmp_obj:name
- del(tmp_obj)
+ qdel(tmp_obj)
custom_name = sanitize(input("Enter target name:", "Objective target", custom_name) as text|null)
if (!custom_name) return
target_name = custom_name
@@ -916,7 +916,7 @@ datum/objective/heist/salvage
explanation_text = "Summon Nar-Sie via the use of the appropriate rune (Hell join self). It will only work if nine cultists stand on and around it. The convert rune is join blood self."
/datum/objective/cult/eldergod/check_completion()
- return (locate(/obj/machinery/singularity/narsie/large) in machines)
+ return (locate(/obj/singularity/narsie/large) in machines)
/datum/objective/cult/sacrifice
explanation_text = "Conduct a ritual sacrifice for the glory of Nar-Sie."
diff --git a/code/game/gamemodes/sandbox/h_sandbox.dm b/code/game/gamemodes/sandbox/h_sandbox.dm
index 439befdc63..ad2abb2236 100644
--- a/code/game/gamemodes/sandbox/h_sandbox.dm
+++ b/code/game/gamemodes/sandbox/h_sandbox.dm
@@ -120,7 +120,7 @@ datum/hSB
if("hsbtoolbox")
var/obj/item/weapon/storage/hsb = new/obj/item/weapon/storage/toolbox/mechanical
for(var/obj/item/device/radio/T in hsb)
- del(T)
+ qdel(T)
new/obj/item/weapon/crowbar (hsb)
hsb.loc = usr.loc
if("hsbmedkit")
diff --git a/code/game/gamemodes/setupgame.dm b/code/game/gamemodes/setupgame.dm
index 501335a19f..2981596645 100644
--- a/code/game/gamemodes/setupgame.dm
+++ b/code/game/gamemodes/setupgame.dm
@@ -151,7 +151,7 @@
var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
M.real_name = "Corpse"
M.death()
- del(A)
+ qdel(A)
continue
if (A.name == "Corpse-Engineer")
var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
@@ -173,7 +173,7 @@
else
if (prob(50))
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/welding(M), slot_head)
- del(A)
+ qdel(A)
continue
if (A.name == "Corpse-Engineer-Space")
var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
@@ -196,7 +196,7 @@
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/welding(M), slot_head)
else
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space(M), slot_head)
- del(A)
+ qdel(A)
continue
if (A.name == "Corpse-Engineer-Chief")
var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
@@ -217,7 +217,7 @@
else
if (prob(50))
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/welding(M), slot_head)
- del(A)
+ qdel(A)
continue
if (A.name == "Corpse-Syndicate")
var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
@@ -239,6 +239,6 @@
else
M.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/swat(M), slot_head)
- del(A)
+ qdel(A)
continue
*/
diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm
index da346f9fce..4d16b7ae14 100644
--- a/code/game/jobs/access.dm
+++ b/code/game/jobs/access.dm
@@ -10,7 +10,7 @@
/var/const/access_tox_storage = 8
/var/const/access_genetics = 9
/var/const/access_engine = 10
-/var/const/access_engine_equip= 11
+/var/const/access_engine_equip = 11
/var/const/access_maint_tunnels = 12
/var/const/access_external_airlocks = 13
/var/const/access_emergency_storage = 14
diff --git a/code/game/jobs/job/civilian.dm b/code/game/jobs/job/civilian.dm
index 062571655d..088e3841fd 100644
--- a/code/game/jobs/job/civilian.dm
+++ b/code/game/jobs/job/civilian.dm
@@ -231,7 +231,7 @@
H.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/snacks/grown/banana(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/bikehorn(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/stamp/clown(H), slot_in_backpack)
- H.equip_to_slot_or_del(new /obj/item/toy/crayon/rainbow(H), slot_in_backpack)
+ H.equip_to_slot_or_del(new /obj/item/weapon/pen/crayon/rainbow(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/fancy/crayons(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/toy/waterflower(H), slot_in_backpack)
H.mutations.Add(CLUMSY)
@@ -265,11 +265,11 @@
H.equip_to_slot_or_del(new /obj/item/clothing/suit/suspenders(H), slot_wear_suit)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
- H.equip_to_slot_or_del(new /obj/item/toy/crayon/mime(H), slot_l_store)
+ H.equip_to_slot_or_del(new /obj/item/weapon/pen/crayon/mime(H), slot_l_store)
H.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing(H), slot_l_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
- H.equip_to_slot_or_del(new /obj/item/toy/crayon/mime(H), slot_in_backpack)
+ H.equip_to_slot_or_del(new /obj/item/weapon/pen/crayon/mime(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing(H), slot_in_backpack)
H.verbs += /client/proc/mimespeak
H.verbs += /client/proc/mimewall
diff --git a/code/game/jobs/jobprocs.dm b/code/game/jobs/jobprocs.dm
index 60b8c6a99d..2a012872bf 100644
--- a/code/game/jobs/jobprocs.dm
+++ b/code/game/jobs/jobprocs.dm
@@ -44,7 +44,7 @@
timeleft -= (world.time - last_process)
if(timeleft <= 0)
processing_objects.Remove(src)
- del(src)
+ qdel(src)
///////////////////////////////
diff --git a/code/game/machinery/Beacon.dm b/code/game/machinery/Beacon.dm
index 37cc168d57..19399ce739 100644
--- a/code/game/machinery/Beacon.dm
+++ b/code/game/machinery/Beacon.dm
@@ -1,55 +1,55 @@
-/obj/machinery/bluespace_beacon
-
- icon = 'icons/obj/objects.dmi'
- icon_state = "floor_beaconf"
- name = "Bluespace Gigabeacon"
- desc = "A device that draws power from bluespace and creates a permanent tracking beacon."
- level = 1 // underfloor
- layer = 2.5
- anchored = 1
- use_power = 1
- idle_power_usage = 0
- var/obj/item/device/radio/beacon/Beacon
-
- New()
- ..()
- var/turf/T = loc
- Beacon = new /obj/item/device/radio/beacon
- Beacon.invisibility = INVISIBILITY_MAXIMUM
- Beacon.loc = T
-
- hide(T.intact)
-
- Del()
- if(Beacon)
- del(Beacon)
- ..()
-
- // update the invisibility and icon
- hide(var/intact)
- invisibility = intact ? 101 : 0
- updateicon()
-
- // update the icon_state
- proc/updateicon()
- var/state="floor_beacon"
-
- if(invisibility)
- icon_state = "[state]f"
-
- else
- icon_state = "[state]"
-
- process()
- if(!Beacon)
- var/turf/T = loc
- Beacon = new /obj/item/device/radio/beacon
- Beacon.invisibility = INVISIBILITY_MAXIMUM
- Beacon.loc = T
- if(Beacon)
- if(Beacon.loc != loc)
- Beacon.loc = loc
-
- updateicon()
-
-
+/obj/machinery/bluespace_beacon
+
+ icon = 'icons/obj/objects.dmi'
+ icon_state = "floor_beaconf"
+ name = "Bluespace Gigabeacon"
+ desc = "A device that draws power from bluespace and creates a permanent tracking beacon."
+ level = 1 // underfloor
+ layer = 2.5
+ anchored = 1
+ use_power = 1
+ idle_power_usage = 0
+ var/obj/item/device/radio/beacon/Beacon
+
+ New()
+ ..()
+ var/turf/T = loc
+ Beacon = new /obj/item/device/radio/beacon
+ Beacon.invisibility = INVISIBILITY_MAXIMUM
+ Beacon.loc = T
+
+ hide(T.intact)
+
+ Destroy()
+ if(Beacon)
+ qdel(Beacon)
+ ..()
+
+ // update the invisibility and icon
+ hide(var/intact)
+ invisibility = intact ? 101 : 0
+ updateicon()
+
+ // update the icon_state
+ proc/updateicon()
+ var/state="floor_beacon"
+
+ if(invisibility)
+ icon_state = "[state]f"
+
+ else
+ icon_state = "[state]"
+
+ process()
+ if(!Beacon)
+ var/turf/T = loc
+ Beacon = new /obj/item/device/radio/beacon
+ Beacon.invisibility = INVISIBILITY_MAXIMUM
+ Beacon.loc = T
+ if(Beacon)
+ if(Beacon.loc != loc)
+ Beacon.loc = loc
+
+ updateicon()
+
+
diff --git a/code/game/machinery/CableLayer.dm b/code/game/machinery/CableLayer.dm
new file mode 100644
index 0000000000..9bad67df7d
--- /dev/null
+++ b/code/game/machinery/CableLayer.dm
@@ -0,0 +1,126 @@
+/obj/machinery/cablelayer
+ name = "automatic cable layer"
+
+ icon = 'icons/obj/stationobjs.dmi'
+ icon_state = "pipe_d"
+ density = 1
+ var/obj/structure/cable/last_piece
+ var/obj/item/stack/cable_coil/cable
+ var/max_cable = 100
+ var/on = 0
+
+/obj/machinery/cablelayer/New()
+ cable = new(src)
+ cable.amount = 100
+ ..()
+
+/obj/machinery/cablelayer/Move(new_turf,M_Dir)
+ ..()
+ layCable(new_turf,M_Dir)
+
+/obj/machinery/cablelayer/attack_hand(mob/user as mob)
+ if(!cable&&!on)
+ user << "\The [src] don't work with no cable."
+ return
+ on=!on
+ user.visible_message("\The [src] [!on?"dea":"a"]ctivated.", "[user] [!on?"dea":"a"]ctivated \the [src].")
+ return
+
+/obj/machinery/cablelayer/attackby(var/obj/item/O as obj, var/mob/user as mob)
+ if(istype(O, /obj/item/stack/cable_coil))
+
+ var/result = load_cable(O)
+ if(!result)
+ user << "Reel is full."
+ else
+ user << "[result] meters of cable successfully loaded."
+ return
+
+ if(istype(O, /obj/item/weapon/screwdriver))
+ if(cable && cable.amount)
+ var/m = round(input(usr,"Please specify the length of cable to cut","Cut cable",min(cable.amount,30)) as num, 1)
+ m = min(m, cable.amount)
+ m = min(m, 30)
+ if(m)
+ use_cable(m)
+ var/obj/item/stack/cable_coil/CC = new (get_turf(src))
+ CC.amount = m
+ else
+ usr << "There's no more cable on the reel."
+
+/obj/machinery/cablelayer/examine(mob/user)
+ ..()
+ user << "\The [src] has [cable.amount] meter\s."
+
+/obj/machinery/cablelayer/proc/load_cable(var/obj/item/stack/cable_coil/CC)
+ if(istype(CC) && CC.amount)
+ var/cur_amount = cable? cable.amount : 0
+ var/to_load = max(max_cable - cur_amount,0)
+ if(to_load)
+ to_load = min(CC.amount, to_load)
+ if(!cable)
+ cable = new(src)
+ cable.amount = 0
+ cable.amount += to_load
+ CC.use(to_load)
+ return to_load
+ else
+ return 0
+ return
+
+/obj/machinery/cablelayer/proc/use_cable(amount)
+ if(!cable || cable.amount<1)
+ visible_message("Cable depleted, [src] deactivated.")
+ return
+/* if(cable.amount < amount)
+ visible_message("No enough cable to finish the task.")
+ return*/
+ cable.use(amount)
+ return 1
+
+/obj/machinery/cablelayer/proc/reset()
+ last_piece = null
+
+/obj/machinery/cablelayer/proc/dismantleFloor(var/turf/new_turf)
+ if(istype(new_turf, /turf/simulated/floor))
+ var/turf/simulated/floor/T = new_turf
+ if(!T.is_plating())
+ if(!T.broken && !T.burnt)
+ new T.floor_type(T)
+ T.make_plating()
+ return !new_turf.intact
+
+/obj/machinery/cablelayer/proc/layCable(var/turf/new_turf,var/M_Dir)
+ if(!on)
+ return reset()
+ else
+ dismantleFloor(new_turf)
+ if(!istype(new_turf) || !dismantleFloor(new_turf))
+ return reset()
+ var/fdirn = turn(M_Dir,180)
+ for(var/obj/structure/cable/LC in new_turf) // check to make sure there's not a cable there already
+ if(LC.d1 == fdirn || LC.d2 == fdirn)
+ return reset()
+ if(!use_cable(1))
+ return reset()
+ var/obj/structure/cable/NC = new(new_turf)
+ NC.cableColor("red")
+ NC.d1 = 0
+ NC.d2 = fdirn
+ NC.updateicon()
+
+ var/datum/powernet/PN
+ if(last_piece && last_piece.d2 != M_Dir)
+ last_piece.d1 = min(last_piece.d2, M_Dir)
+ last_piece.d2 = max(last_piece.d2, M_Dir)
+ last_piece.updateicon()
+ PN = last_piece.powernet
+
+ if(!PN)
+ PN = new()
+ PN.add_cable(NC)
+ NC.mergeConnectedNetworks(NC.d2)
+
+ //NC.mergeConnectedNetworksOnTurf()
+ last_piece = NC
+ return 1
diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm
index 6e1ecdf4ca..a03289c78b 100644
--- a/code/game/machinery/OpTable.dm
+++ b/code/game/machinery/OpTable.dm
@@ -28,12 +28,12 @@
switch(severity)
if(1.0)
//SN src = null
- del(src)
+ qdel(src)
return
if(2.0)
if (prob(50))
//SN src = null
- del(src)
+ qdel(src)
return
if(3.0)
if (prob(25))
@@ -43,14 +43,14 @@
/obj/machinery/optable/blob_act()
if(prob(75))
- del(src)
+ qdel(src)
/obj/machinery/optable/attack_hand(mob/user as mob)
if (HULK in usr.mutations)
usr << text("\blue You destroy the table.")
visible_message("\red [usr] destroys the operating table!")
src.density = 0
- del(src)
+ qdel(src)
return
/obj/machinery/optable/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
@@ -130,7 +130,7 @@
var/obj/item/weapon/grab/G = W
if(iscarbon(G.affecting) && check_table(G.affecting))
take_victim(G.affecting,usr)
- del(W)
+ qdel(W)
return
/obj/machinery/optable/proc/check_table(mob/living/carbon/patient as mob)
diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm
index 20c16dcb9c..0e92db1511 100644
--- a/code/game/machinery/Sleeper.dm
+++ b/code/game/machinery/Sleeper.dm
@@ -25,12 +25,12 @@
switch(severity)
if(1.0)
//SN src = null
- del(src)
+ qdel(src)
return
if(2.0)
if (prob(50))
//SN src = null
- del(src)
+ qdel(src)
return
else
return
@@ -204,7 +204,7 @@
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
A.blob_act()
- del(src)
+ qdel(src)
return
attackby(var/obj/item/weapon/G as obj, var/mob/user as mob)
@@ -252,7 +252,7 @@
icon_state = "sleeper_1-r"
src.add_fingerprint(user)
- del(G)
+ qdel(G)
return
return
@@ -265,21 +265,21 @@
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
ex_act(severity)
- del(src)
+ qdel(src)
return
if(2.0)
if(prob(50))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
ex_act(severity)
- del(src)
+ qdel(src)
return
if(3.0)
if(prob(25))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
ex_act(severity)
- del(src)
+ qdel(src)
return
return
emp_act(severity)
@@ -435,7 +435,7 @@
icon_state = "sleeper_1-r"
for(var/obj/O in src)
- del(O)
+ qdel(O)
src.add_fingerprint(usr)
return
return
diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm
index 51e1ec7510..8c6be59f71 100644
--- a/code/game/machinery/adv_med.dm
+++ b/code/game/machinery/adv_med.dm
@@ -56,7 +56,7 @@
src.icon_state = "body_scanner_1"
for(var/obj/O in src)
//O = null
- del(O)
+ qdel(O)
//Foreach goto(124)
src.add_fingerprint(usr)
return
@@ -98,7 +98,7 @@
//Foreach goto(154)
src.add_fingerprint(user)
//G = null
- del(G)
+ qdel(G)
return
/obj/machinery/bodyscanner/ex_act(severity)
@@ -109,7 +109,7 @@
ex_act(severity)
//Foreach goto(35)
//SN src = null
- del(src)
+ qdel(src)
return
if(2.0)
if (prob(50))
@@ -118,7 +118,7 @@
ex_act(severity)
//Foreach goto(108)
//SN src = null
- del(src)
+ qdel(src)
return
if(3.0)
if (prob(25))
@@ -127,7 +127,7 @@
ex_act(severity)
//Foreach goto(181)
//SN src = null
- del(src)
+ qdel(src)
return
else
return
@@ -136,19 +136,19 @@
if(prob(50))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
- del(src)
+ qdel(src)
/obj/machinery/body_scanconsole/ex_act(severity)
switch(severity)
if(1.0)
//SN src = null
- del(src)
+ qdel(src)
return
if(2.0)
if (prob(50))
//SN src = null
- del(src)
+ qdel(src)
return
else
return
@@ -156,7 +156,7 @@
/obj/machinery/body_scanconsole/blob_act()
if(prob(50))
- del(src)
+ qdel(src)
/obj/machinery/body_scanconsole/power_change()
..()
diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm
index f6d2820d5b..2b8ea74117 100644
--- a/code/game/machinery/alarm.dm
+++ b/code/game/machinery/alarm.dm
@@ -98,6 +98,10 @@
TLV["temperature"] = list(20, 40, 140, 160) // K
target_temperature = 90
+/obj/machinery/alarm/Destroy()
+ if(radio_controller)
+ radio_controller.remove_object(src, frequency)
+ ..()
/obj/machinery/alarm/New(var/loc, var/dir, var/building = 0)
..()
@@ -114,16 +118,12 @@
pixel_x = (dir & 3)? 0 : (dir == 4 ? -24 : 24)
pixel_y = (dir & 3)? (dir ==1 ? -24 : 24) : 0
update_icon()
- if(ticker && ticker.current_state == 3)//if the game is running
- src.initialize()
return
first_run()
/obj/machinery/alarm/proc/first_run()
alarm_area = get_area(src)
- if (alarm_area.master)
- alarm_area = alarm_area.master
area_uid = alarm_area.uid
if (name == "alarm")
name = "[alarm_area.name] Air Alarm"
@@ -284,11 +284,10 @@
/obj/machinery/alarm/proc/elect_master()
- for (var/area/A in alarm_area.related)
- for (var/obj/machinery/alarm/AA in A)
- if (!(AA.stat & (NOPOWER|BROKEN)))
- alarm_area.master_air_alarm = AA
- return 1
+ for (var/obj/machinery/alarm/AA in alarm_area)
+ if (!(AA.stat & (NOPOWER|BROKEN)))
+ alarm_area.master_air_alarm = AA
+ return 1
return 0
/obj/machinery/alarm/proc/get_danger_level(var/current_value, var/list/danger_levels)
@@ -395,9 +394,8 @@
/obj/machinery/alarm/proc/apply_mode()
//propagate mode to other air alarms in the area
//TODO: make it so that players can choose between applying the new mode to the room they are in (related area) vs the entire alarm area
- for (var/area/RA in alarm_area.related)
- for (var/obj/machinery/alarm/AA in RA)
- AA.mode = mode
+ for (var/obj/machinery/alarm/AA in alarm_area)
+ AA.mode = mode
switch(mode)
if(AALARM_MODE_SCRUBBING)
@@ -620,7 +618,7 @@
if(buildstage != 2)
return STATUS_CLOSE
- if(aidisabled && user.isAI())
+ if(aidisabled && user.isMobAI())
user << "AI control for \the [src] interface has been disabled."
return STATUS_CLOSE
@@ -831,7 +829,7 @@
if(0)
if(istype(W, /obj/item/weapon/airalarm_electronics))
user << "You insert the circuit!"
- del(W)
+ qdel(W)
buildstage = 1
update_icon()
return
@@ -841,7 +839,7 @@
var/obj/item/alarm_frame/frame = new /obj/item/alarm_frame()
frame.loc = user.loc
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
- del(src)
+ qdel(src)
return ..()
@@ -884,7 +882,7 @@ Code shamelessly copied from apc_frame
/obj/item/alarm_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/metal( get_turf(src.loc), 2 )
- del(src)
+ qdel(src)
return
..()
@@ -910,7 +908,7 @@ Code shamelessly copied from apc_frame
return
new /obj/machinery/alarm(loc, ndir, 1)
- del(src)
+ qdel(src)
/*
FIRE ALARM
@@ -1015,7 +1013,7 @@ FIRE ALARM
if(0)
if(istype(W, /obj/item/weapon/firealarm_electronics))
user << "You insert the circuit!"
- del(W)
+ qdel(W)
buildstage = 1
update_icon()
@@ -1024,7 +1022,7 @@ FIRE ALARM
var/obj/item/firealarm_frame/frame = new /obj/item/firealarm_frame()
frame.loc = user.loc
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
- del(src)
+ qdel(src)
return
src.alarm()
@@ -1068,7 +1066,6 @@ FIRE ALARM
var/d2
if (istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon))
A = A.loc
- A = A.master
if (A.fire)
d1 = text("Reset - Lockdown", src)
@@ -1135,9 +1132,8 @@ FIRE ALARM
if (!( src.working ))
return
var/area/area = get_area(src)
- for(var/area/A in area.related)
- for(var/obj/machinery/firealarm/FA in A)
- fire_alarm.clearAlarm(loc, FA)
+ for(var/obj/machinery/firealarm/FA in area)
+ fire_alarm.clearAlarm(loc, FA)
update_icon()
return
@@ -1145,9 +1141,8 @@ FIRE ALARM
if (!( src.working))
return
var/area/area = get_area(src)
- for(var/area/A in area.related)
- for(var/obj/machinery/firealarm/FA in A)
- fire_alarm.triggerAlarm(loc, FA, duration)
+ for(var/obj/machinery/firealarm/FA in area)
+ fire_alarm.triggerAlarm(loc, FA, duration)
update_icon()
//playsound(src.loc, 'sound/ambience/signal.ogg', 75, 0)
return
@@ -1206,7 +1201,7 @@ Code shamelessly copied from apc_frame
/obj/item/firealarm_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/metal( get_turf(src.loc), 2 )
- del(src)
+ qdel(src)
return
..()
@@ -1233,7 +1228,7 @@ Code shamelessly copied from apc_frame
new /obj/machinery/firealarm(loc, ndir, 1)
- del(src)
+ qdel(src)
/obj/machinery/partyalarm
@@ -1258,8 +1253,6 @@ Code shamelessly copied from apc_frame
user.machine = src
var/area/A = get_area(src)
ASSERT(isarea(A))
- if(A.master)
- A = A.master
var/d1
var/d2
if (istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon/ai))
@@ -1298,8 +1291,6 @@ Code shamelessly copied from apc_frame
return
var/area/A = get_area(src)
ASSERT(isarea(A))
- if(A.master)
- A = A.master
A.partyreset()
return
@@ -1308,8 +1299,6 @@ Code shamelessly copied from apc_frame
return
var/area/A = get_area(src)
ASSERT(isarea(A))
- if(A.master)
- A = A.master
A.partyalert()
return
diff --git a/code/game/machinery/atmo_control.dm b/code/game/machinery/atmo_control.dm
index 0294607e8a..09e55720a8 100644
--- a/code/game/machinery/atmo_control.dm
+++ b/code/game/machinery/atmo_control.dm
@@ -67,11 +67,10 @@
/obj/machinery/air_sensor/initialize()
set_frequency(frequency)
-/obj/machinery/air_sensor/New()
- ..()
-
+obj/machinery/air_sensor/Destroy()
if(radio_controller)
- set_frequency(frequency)
+ radio_controller.remove_object(src,frequency)
+ ..()
/obj/machinery/computer/general_air_control
icon = 'icons/obj/computer.dmi'
@@ -86,6 +85,11 @@
var/datum/radio_frequency/radio_connection
circuit = /obj/item/weapon/circuitboard/air_management
+obj/machinery/computer/general_air_control/Destroy()
+ if(radio_controller)
+ radio_controller.remove_object(src, frequency)
+ ..()
+
/obj/machinery/computer/general_air_control/attack_hand(mob/user)
if(..(user))
return
diff --git a/code/game/machinery/atmoalter/area_atmos_computer.dm b/code/game/machinery/atmoalter/area_atmos_computer.dm
index 935feae3e2..984dc44782 100644
--- a/code/game/machinery/atmoalter/area_atmos_computer.dm
+++ b/code/game/machinery/atmoalter/area_atmos_computer.dm
@@ -2,6 +2,7 @@
name = "Area Air Control"
desc = "A computer used to control the stationary scrubbers and pumps in the area."
icon_state = "area_atmos"
+ light_color = "#e6ffff"
circuit = "/obj/item/weapon/circuitboard/area_atmos"
var/list/connectedscrubbers = new()
@@ -147,14 +148,10 @@
var/turf/T_src = get_turf(src)
if(!T_src.loc) return 0
var/area/A_src = T_src.loc
- if (A_src.master)
- A_src = A_src.master
var/turf/T_scrub = get_turf(scrubber)
if(!T_scrub.loc) return 0
var/area/A_scrub = T_scrub.loc
- if (A_scrub.master)
- A_scrub = A_scrub.master
if(A_scrub != A_src)
return 0
@@ -169,13 +166,11 @@
var/turf/T = get_turf(src)
if(!T.loc) return
var/area/A = T.loc
- if (A.master)
- A = A.master
for(var/obj/machinery/portable_atmospherics/powered/scrubber/huge/scrubber in world )
var/turf/T2 = get_turf(scrubber)
if(T2 && T2.loc)
var/area/A2 = T2.loc
- if(istype(A2) && A2.master && A2.master == A )
+ if(istype(A2) && A2 == A)
connectedscrubbers += scrubber
found = 1
@@ -183,4 +178,4 @@
if(!found)
status = "ERROR: No scrubber found!"
- src.updateUsrDialog()
\ No newline at end of file
+ src.updateUsrDialog()
diff --git a/code/game/machinery/atmoalter/meter.dm b/code/game/machinery/atmoalter/meter.dm
index ad7d55c2aa..095aec4a24 100644
--- a/code/game/machinery/atmoalter/meter.dm
+++ b/code/game/machinery/atmoalter/meter.dm
@@ -104,7 +104,7 @@
"\blue You have unfastened \the [src].", \
"You hear ratchet.")
new /obj/item/pipe_meter(src.loc)
- del(src)
+ qdel(src)
// TURF METER - REPORTS A TILE'S AIR CONTENTS
diff --git a/code/game/machinery/atmoalter/portable_atmospherics.dm b/code/game/machinery/atmoalter/portable_atmospherics.dm
index 9308bae64e..5e8817359f 100644
--- a/code/game/machinery/atmoalter/portable_atmospherics.dm
+++ b/code/game/machinery/atmoalter/portable_atmospherics.dm
@@ -20,6 +20,11 @@
return 1
+/obj/machinery/portable_atmospherics/Destroy()
+ qdel(air_contents)
+ qdel(holding)
+ ..()
+
/obj/machinery/portable_atmospherics/initialize()
. = ..()
spawn()
@@ -35,8 +40,8 @@
else
update_icon()
-/obj/machinery/portable_atmospherics/Del()
- del(air_contents)
+/obj/machinery/portable_atmospherics/Destroy()
+ qdel(air_contents)
..()
diff --git a/code/game/machinery/atmoalter/pump.dm b/code/game/machinery/atmoalter/pump.dm
index 9f2c4023b2..659e17d4b2 100644
--- a/code/game/machinery/atmoalter/pump.dm
+++ b/code/game/machinery/atmoalter/pump.dm
@@ -7,7 +7,10 @@
var/on = 0
var/direction_out = 0 //0 = siphoning, 1 = releasing
- var/target_pressure = 100
+ var/target_pressure = ONE_ATMOSPHERE
+
+ var/pressuremin = 0
+ var/pressuremax = 10 * ONE_ATMOSPHERE
volume = 1000
@@ -106,64 +109,59 @@
/obj/machinery/portable_atmospherics/powered/pump/return_air()
return air_contents
-/obj/machinery/portable_atmospherics/powered/pump/attack_ai(var/mob/user as mob)
+/obj/machinery/portable_atmospherics/powered/pump/attack_ai(var/mob/user)
+ src.add_hiddenprint(user)
return src.attack_hand(user)
-/obj/machinery/portable_atmospherics/powered/pump/attack_hand(var/mob/user as mob)
+/obj/machinery/portable_atmospherics/powered/pump/attack_ghost(var/mob/user)
+ return src.attack_hand(user)
- user.set_machine(src)
- var/holding_text
+/obj/machinery/portable_atmospherics/powered/pump/attack_hand(var/mob/user)
+ ui_interact(user)
- if(holding)
- holding_text = {"
Tank Pressure: [round(holding.air_contents.return_pressure(), 0.01)] kPa
-Remove Tank
-"}
- var/output_text = {"[capitalize(name)]
-Pressure: [round(air_contents.return_pressure(), 0.01)] kPa
-Flow Rate: [round(last_flow_rate, 0.1)] L/s
-Port Status: [(connected_port)?("Connected"):("Disconnected")]
-[holding_text]
-
-Cell Charge: [cell? "[round(cell.percent())]%" : "N/A"] | Load: [round(last_power_draw)] W
-Power Switch: [on?("On"):("Off")]
-Pump Direction: [direction_out?("Out"):("In")]
-Target Pressure: - - - - [target_pressure] kPa+ + + +
-
-Close
-"}
+/obj/machinery/portable_atmospherics/powered/pump/ui_interact(mob/user, ui_key = "rcon", datum/nanoui/ui=null, force_open=1)
+ var/list/data[0]
+ data["portConnected"] = connected_port ? 1 : 0
+ data["tankPressure"] = round(air_contents.return_pressure() > 0 ? air_contents.return_pressure() : 0)
+ data["targetpressure"] = round(target_pressure)
+ data["pump_dir"] = direction_out
+ data["minpressure"] = round(pressuremin)
+ data["maxpressure"] = round(pressuremax)
+ data["powerDraw"] = round(last_power_draw)
+ data["cellCharge"] = cell ? cell.charge : 0
+ data["cellMaxCharge"] = cell ? cell.maxcharge : 1
+ data["on"] = on ? 1 : 0
- user << browse(output_text, "window=pump;size=600x300")
- onclose(user, "pump")
+ data["hasHoldingTank"] = holding ? 1 : 0
+ if (holding)
+ data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure() > 0 ? holding.air_contents.return_pressure() : 0))
- return
+ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
+ if (!ui)
+ ui = new(user, src, ui_key, "portpump.tmpl", "Portable Pump", 480, 410, state = physical_state)
+ ui.set_initial_data(data)
+ ui.open()
+ ui.set_auto_update(1)
/obj/machinery/portable_atmospherics/powered/pump/Topic(href, href_list)
- ..()
- if (usr.stat || usr.restrained())
- return
+ if(..())
+ return 1
- if (((get_dist(src, usr) <= 1) && istype(src.loc, /turf)))
- usr.set_machine(src)
+ if(href_list["power"])
+ on = !on
+ . = 1
+ if(href_list["direction"])
+ direction_out = !direction_out
+ . = 1
+ if (href_list["remove_tank"])
+ if(holding)
+ holding.loc = loc
+ holding = null
+ . = 1
+ if (href_list["pressure_adj"])
+ var/diff = text2num(href_list["pressure_adj"])
+ target_pressure = min(10*ONE_ATMOSPHERE, max(0, target_pressure+diff))
+ . = 1
- if(href_list["power"])
- on = !on
-
- if(href_list["direction"])
- direction_out = !direction_out
-
- if (href_list["remove_tank"])
- if(holding)
- holding.loc = loc
- holding = null
-
- if (href_list["pressure_adj"])
- var/diff = text2num(href_list["pressure_adj"])
- target_pressure = min(10*ONE_ATMOSPHERE, max(0, target_pressure+diff))
-
- src.updateUsrDialog()
- src.add_fingerprint(usr)
+ if(.)
update_icon()
- else
- usr << browse(null, "window=pump")
- return
- return
\ No newline at end of file
diff --git a/code/game/machinery/atmoalter/scrubber.dm b/code/game/machinery/atmoalter/scrubber.dm
index d8c23cc5f0..1977e55646 100644
--- a/code/game/machinery/atmoalter/scrubber.dm
+++ b/code/game/machinery/atmoalter/scrubber.dm
@@ -13,6 +13,9 @@
power_rating = 7500 //7500 W ~ 10 HP
power_losses = 150
+ var/minrate = 0
+ var/maxrate = 10 * ONE_ATMOSPHERE
+
var/list/scrubbing_gas = list("phoron", "carbon_dioxide", "sleeping_agent", "oxygen_agent_b")
/obj/machinery/portable_atmospherics/powered/scrubber/New()
@@ -82,63 +85,58 @@
/obj/machinery/portable_atmospherics/powered/scrubber/return_air()
return air_contents
-/obj/machinery/portable_atmospherics/powered/scrubber/attack_ai(var/mob/user as mob)
+/obj/machinery/portable_atmospherics/powered/scrubber/attack_ai(var/mob/user)
+ src.add_hiddenprint(user)
return src.attack_hand(user)
-/obj/machinery/portable_atmospherics/powered/scrubber/attack_hand(var/mob/user as mob)
+/obj/machinery/portable_atmospherics/powered/scrubber/attack_ghost(var/mob/user)
+ return src.attack_hand(user)
- user.set_machine(src)
- var/holding_text
-
- if(holding)
- holding_text = {"
Tank Pressure: [round(holding.air_contents.return_pressure(), 0.01)] kPa
-Remove Tank
-"}
- var/output_text = {"[name]
-Pressure: [round(air_contents.return_pressure(), 0.01)] kPa
-Flow Rate: [round(last_flow_rate, 0.1)] L/s
-Port Status: [(connected_port)?("Connected"):("Disconnected")]
-[holding_text]
-
-Cell Charge: [cell? "[round(cell.percent())]%" : "N/A"] | Load: [round(last_power_draw)] W
-Power Switch: [on?("On"):("Off")]
-Flow Rate Regulator: - - - - [volume_rate] L/s + + + +
-
-
-Close
-"}
-
- user << browse(output_text, "window=scrubber;size=600x300")
- onclose(user, "scrubber")
+/obj/machinery/portable_atmospherics/powered/scrubber/attack_hand(var/mob/user)
+ ui_interact(user)
return
+/obj/machinery/portable_atmospherics/powered/scrubber/ui_interact(mob/user, ui_key = "rcon", datum/nanoui/ui=null, force_open=1)
+ var/list/data[0]
+ data["portConnected"] = connected_port ? 1 : 0
+ data["tankPressure"] = round(air_contents.return_pressure() > 0 ? air_contents.return_pressure() : 0)
+ data["rate"] = round(volume_rate)
+ data["minrate"] = round(minrate)
+ data["maxrate"] = round(maxrate)
+ data["powerDraw"] = round(last_power_draw)
+ data["cellCharge"] = cell ? cell.charge : 0
+ data["cellMaxCharge"] = cell ? cell.maxcharge : 1
+ data["on"] = on ? 1 : 0
+
+ data["hasHoldingTank"] = holding ? 1 : 0
+ if (holding)
+ data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure() > 0 ? holding.air_contents.return_pressure() : 0))
+
+ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
+ if (!ui)
+ ui = new(user, src, ui_key, "portscrubber.tmpl", "Portable Scrubber", 480, 400, state = physical_state)
+ ui.set_initial_data(data)
+ ui.open()
+ ui.set_auto_update(1)
+
+
/obj/machinery/portable_atmospherics/powered/scrubber/Topic(href, href_list)
- ..()
- if (usr.stat || usr.restrained())
- return
+ if(..())
+ return 1
- if (((get_dist(src, usr) <= 1) && istype(src.loc, /turf)))
- usr.set_machine(src)
-
- if(href_list["power"])
- on = !on
-
- if (href_list["remove_tank"])
- if(holding)
- holding.loc = loc
- holding = null
-
- if (href_list["volume_adj"])
- var/diff = text2num(href_list["volume_adj"])
- volume_rate = min(initial(volume_rate), max(0, volume_rate+diff))
-
- src.updateUsrDialog()
- src.add_fingerprint(usr)
- update_icon()
- else
- usr << browse(null, "window=scrubber")
- return
- return
+ if(href_list["power"])
+ on = !on
+ . = 1
+ if (href_list["remove_tank"])
+ if(holding)
+ holding.loc = loc
+ holding = null
+ . = 1
+ if (href_list["volume_adj"])
+ var/diff = text2num(href_list["volume_adj"])
+ volume_rate = Clamp(volume_rate+diff, minrate, maxrate)
+ . = 1
+ update_icon()
//Huge scrubber
diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm
index d537d113f9..d60404d5de 100644
--- a/code/game/machinery/autolathe.dm
+++ b/code/game/machinery/autolathe.dm
@@ -190,7 +190,7 @@
stack.use(max(1, round(total_used/mass_per_sheet))) // Always use at least 1 to prevent infinite materials.
else
user.remove_from_mob(O)
- del(O)
+ qdel(O)
updateUsrDialog()
return
diff --git a/code/game/machinery/autolathe_datums.dm b/code/game/machinery/autolathe_datums.dm
index 68bf61b7f1..3b323cd69f 100644
--- a/code/game/machinery/autolathe_datums.dm
+++ b/code/game/machinery/autolathe_datums.dm
@@ -16,7 +16,7 @@
recipe.resources = list()
for(var/material in I.matter)
recipe.resources[material] = I.matter[material]*1.25 // More expensive to produce than they are to recycle.
- del(I)
+ qdel(I)
/datum/autolathe/recipe
var/name = "object"
@@ -42,6 +42,11 @@
path = /obj/item/weapon/extinguisher
category = "General"
+/datum/autolathe/recipe/jar
+ name = "jar"
+ path = /obj/item/glass_jar
+ category = "General"
+
/datum/autolathe/recipe/crowbar
name = "crowbar"
path = /obj/item/weapon/crowbar
diff --git a/code/game/machinery/bees_items.dm b/code/game/machinery/bees_items.dm
index 486b46d33c..05f9231f8a 100644
--- a/code/game/machinery/bees_items.dm
+++ b/code/game/machinery/bees_items.dm
@@ -20,7 +20,7 @@
for(var/mob/living/simple_animal/bee/B in T)
if(B.feral < 0)
caught_bees += B.strength
- del(B)
+ qdel(B)
user.visible_message("\blue [user] nets some bees.","\blue You net up some of the becalmed bees.")
else
user.visible_message("\red [user] swings at some bees, they don't seem to like it.","\red You swing at some bees, they don't seem to like it.")
diff --git a/code/game/machinery/biogenerator.dm b/code/game/machinery/biogenerator.dm
index 87399b597a..61ed92d58e 100644
--- a/code/game/machinery/biogenerator.dm
+++ b/code/game/machinery/biogenerator.dm
@@ -151,7 +151,7 @@
if(I.reagents.get_reagent_amount("nutriment") < 0.1)
points += 1
else points += I.reagents.get_reagent_amount("nutriment") * 10 * eat_eff
- del(I)
+ qdel(I)
if(S)
processing = 1
update_icon()
diff --git a/code/game/machinery/bioprinter.dm b/code/game/machinery/bioprinter.dm
index 48c0edb984..5a8b25bb84 100644
--- a/code/game/machinery/bioprinter.dm
+++ b/code/game/machinery/bioprinter.dm
@@ -70,7 +70,7 @@
stored_matter += 50
user.drop_item()
user << "\The [src] processes \the [W]. Levels of stored biomass now: [stored_matter]"
- del(W)
+ qdel(W)
return
// Steel for matter.
else if(prints_prosthetics && istype(W, /obj/item/stack/sheet/metal))
@@ -78,7 +78,7 @@
stored_matter += M.amount * 10
user.drop_item()
user << "\The [src] processes \the [W]. Levels of stored matter now: [stored_matter]"
- del(W)
+ qdel(W)
return
else
return..()
\ No newline at end of file
diff --git a/code/game/machinery/bots/bots.dm b/code/game/machinery/bots/bots.dm
index f87ae33ee0..70740901fa 100644
--- a/code/game/machinery/bots/bots.dm
+++ b/code/game/machinery/bots/bots.dm
@@ -3,7 +3,7 @@
/obj/machinery/bot
icon = 'icons/obj/aibots.dmi'
layer = MOB_LAYER
- luminosity = 3
+ light_range = 3
use_power = 0
var/obj/item/weapon/card/id/botcard // the ID card that the bot "holds"
var/on = 1
@@ -15,19 +15,18 @@
var/locked = 1
//var/emagged = 0 //Urist: Moving that var to the general /bot tree as it's used by most bots
-
/obj/machinery/bot/proc/turn_on()
if(stat) return 0
on = 1
- SetLuminosity(initial(luminosity))
+ set_light(initial(light_range))
return 1
/obj/machinery/bot/proc/turn_off()
on = 0
- SetLuminosity(0)
+ set_light(0)
/obj/machinery/bot/proc/explode()
- del(src)
+ qdel(src)
/obj/machinery/bot/proc/healthcheck()
if (src.health <= 0)
@@ -117,7 +116,7 @@
/obj/machinery/bot/emp_act(severity)
var/was_on = on
stat |= EMPED
- var/obj/effect/overlay/pulse2 = new/obj/effect/overlay ( src.loc )
+ var/obj/effect/overlay/pulse2 = PoolOrNew(/obj/effect/overlay, src.loc )
pulse2.icon = 'icons/effects/effects.dmi'
pulse2.icon_state = "empdisable"
pulse2.name = "emp sparks"
@@ -125,7 +124,7 @@
pulse2.set_dir(pick(cardinal))
spawn(10)
- pulse2.delete()
+ qdel(pulse2)
if (on)
turn_off()
spawn(severity*300)
diff --git a/code/game/machinery/bots/cleanbot.dm b/code/game/machinery/bots/cleanbot.dm
deleted file mode 100644
index 4dcb838152..0000000000
--- a/code/game/machinery/bots/cleanbot.dm
+++ /dev/null
@@ -1,363 +0,0 @@
-//Cleanbot assembly
-/obj/item/weapon/bucket_sensor
- desc = "It's a bucket. With a sensor attached."
- name = "proxy bucket"
- icon = 'icons/obj/aibots.dmi'
- icon_state = "bucket_proxy"
- force = 3.0
- throwforce = 10.0
- throw_speed = 2
- throw_range = 5
- w_class = 3.0
- var/created_name = "Cleanbot"
-
-
-//Cleanbot
-/obj/machinery/bot/cleanbot
- name = "Cleanbot"
- desc = "A little cleaning robot, he looks so excited!"
- icon = 'icons/obj/aibots.dmi'
- icon_state = "cleanbot0"
- layer = 5.0
- density = 0
- anchored = 0
- //weight = 1.0E7
- health = 25
- maxhealth = 25
- var/cleaning = 0
- var/screwloose = 0
- var/oddbutton = 0
- var/blood = 1
- var/list/target_types = list()
- var/obj/effect/decal/cleanable/target
- var/obj/effect/decal/cleanable/oldtarget
- var/oldloc = null
- req_access = list(access_janitor)
- var/path[] = new()
- var/patrol_path[] = null
- var/beacon_freq = 1445 // navigation beacon frequency
- var/closest_dist
- var/closest_loc
- var/failed_steps
- var/should_patrol
- var/next_dest
- var/next_dest_loc
-
-/obj/machinery/bot/cleanbot/New()
- ..()
- src.get_targets()
- src.icon_state = "cleanbot[src.on]"
-
- should_patrol = 1
-
- src.botcard = new /obj/item/weapon/card/id(src)
- src.botcard.access = list(access_janitor, access_maint_tunnels)
-
- src.locked = 0 // Start unlocked so roboticist can set them to patrol.
-
- if(radio_controller)
- radio_controller.add_object(src, beacon_freq, filter = RADIO_NAVBEACONS)
-
-
-/obj/machinery/bot/cleanbot/turn_on()
- . = ..()
- src.icon_state = "cleanbot[src.on]"
- src.updateUsrDialog()
-
-/obj/machinery/bot/cleanbot/turn_off()
- ..()
- if(!isnull(src.target))
- target.targeted_by = null
- src.target = null
- src.oldtarget = null
- src.oldloc = null
- src.icon_state = "cleanbot[src.on]"
- src.path = new()
- src.updateUsrDialog()
-
-/obj/machinery/bot/cleanbot/attack_hand(mob/user as mob)
- . = ..()
- if (.)
- return
- usr.set_machine(src)
- interact(user)
-
-/obj/machinery/bot/cleanbot/interact(mob/user as mob)
- var/dat
- dat += text({"
-Automatic Station Cleaner v1.0
-Status: []
-Behaviour controls are [src.locked ? "locked" : "unlocked"]
-Maintenance panel is [src.open ? "opened" : "closed"]"},
-text("[src.on ? "On" : "Off"]"))
- if(!src.locked || issilicon(user))
- dat += text({"
Cleans Blood: []
"}, text("[src.blood ? "Yes" : "No"]"))
- dat += text({"
Patrol station: []
"}, text("[src.should_patrol ? "Yes" : "No"]"))
- // dat += text({"
Beacon frequency: []
"}, text("[src.beacon_freq]"))
- if(src.open && !src.locked)
- dat += text({"
-Odd looking screw twiddled: []
-Weird button pressed: []"},
-text("[src.screwloose ? "Yes" : "No"]"),
-text("[src.oddbutton ? "Yes" : "No"]"))
-
- user << browse("
"
- dat += "Status: [src.on ? "On" : "Off"]
"
-
- dat += "Water Tank: "
- if ( tank )
- dat += "\[[tank.reagents.total_volume]/[tank.reagents.maximum_volume]\]"
- else
- dat += "Error: Water Tank not Found"
-
- dat += "
Fertilizer Storage: \[[get_total_ferts()]/[Max_Fertilizers]\]"
-
- dat += "
Behaviour controls are [src.locked ? "locked" : "unlocked"]
"
- if(!src.locked)
- dat += "Watering Controls:
"
- dat += " Water Plants : [src.setting_water ? "Yes" : "No"]
"
- dat += " Refill Watertank : [src.setting_refill ? "Yes" : "No"]
"
- dat += "
Fertilizer Controls:
"
- dat += " Fertilize Plants : [src.setting_fertilize ? "Yes" : "No"]
"
- dat += "
Weeding Controls:
"
- dat += " Weed Plants : [src.setting_weed ? "Yes" : "No"]
"
- dat += "
Ignore Weeds : [src.setting_ignoreWeeds ? "Yes" : "No"]
"
- dat += "Ignore Mushrooms : [src.setting_ignoreMushrooms ? "Yes" : "No"]
"
- dat += ""
-
- user << browse("
"
- dat += "Status: [src.on ? "On" : "Off"]
"
- dat += "Maintenance panel is [src.open ? "opened" : "closed"]
"
- dat += "Tiles left: [src.amount]
"
- dat += "Behvaiour controls are [src.locked ? "locked" : "unlocked"]
"
- if(!src.locked || issilicon(user))
- dat += "Improves floors: [src.improvefloors ? "Yes" : "No"]
"
- dat += "Finds tiles: [src.eattiles ? "Yes" : "No"]
"
- dat += "Make singles pieces of metal into tiles when empty: [src.maketiles ? "Yes" : "No"]
"
- var/bmode
- if (src.targetdirection)
- bmode = dir2text(src.targetdirection)
- else
- bmode = "Disabled"
- dat += "
Bridge Mode : [bmode]
"
-
- user << browse("
"
- dat += "Status: [src.on ? "On" : "Off"]
"
- dat += "Maintenance panel is [src.open ? "opened" : "closed"]
"
- dat += "Beaker: "
- if (src.reagent_glass)
- dat += "Loaded \[[src.reagent_glass.reagents.total_volume]/[src.reagent_glass.reagents.maximum_volume]\]"
- else
- dat += "None Loaded"
- dat += "
Behaviour controls are [src.locked ? "locked" : "unlocked"]
"
- if(!src.locked || issilicon(user))
- dat += "Healing Threshold: "
- dat += "-- "
- dat += "- "
- dat += "[src.heal_threshold] "
- dat += "+ "
- dat += "++"
- dat += "
"
-
- dat += "Injection Level: "
- dat += "- "
- dat += "[src.injection_amount] "
- dat += "+ "
- dat += "
"
-
- dat += "Reagent Source: "
- dat += "[src.use_beaker ? "Loaded Beaker (When available)" : "Internal Synthesizer"]
"
-
- dat += "Treatment report is [src.declare_treatment ? "on" : "off"]. Toggle
"
-
- dat += "The speaker switch is [src.shut_up ? "off" : "on"]. Toggle
"
-
- user << browse("
-Status: []
-Behaviour controls are [src.locked ? "locked" : "unlocked"]
-Maintenance panel is [src.open ? "opened" : "closed"]"},
-
-"[src.on ? "On" : "Off"]" )
-
- if(!src.locked || issilicon(user))
- dat += text({"
-Check for Weapon Authorization: []
-Check Security Records: []
-Check Arrest Status: []
-Operating Mode: []
-Report Arrests: []
-Auto Patrol: []"},
-
-"[src.idcheck ? "Yes" : "No"]",
-"[src.check_records ? "Yes" : "No"]",
-"[src.check_arrest ? "Yes" : "No"]",
-"[src.arrest_type ? "Detain" : "Arrest"]",
-"[src.declare_arrests ? "Yes" : "No"]",
-"[auto_patrol ? "On" : "Off"]" )
-
-
- user << browse("
Error: Post-initialisation failed. Cloning cycle aborted."
diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm
index 4fc43a0259..686ac73af6 100644
--- a/code/game/machinery/computer/communications.dm
+++ b/code/game/machinery/computer/communications.dm
@@ -5,6 +5,7 @@
name = "command and communications console"
desc = "Used to command and control the station. Can relay long-range communications."
icon_state = "comm"
+ light_color = "#0099ff"
req_access = list(access_heads)
circuit = "/obj/item/weapon/circuitboard/communications"
var/prints_intercept = 1
@@ -551,7 +552,7 @@
frequency.post_signal(src, status_signal)
-/obj/machinery/computer/communications/Del()
+/obj/machinery/computer/communications/Destroy()
for(var/obj/machinery/computer/communications/commconsole in world)
if(istype(commconsole.loc,/turf) && commconsole != src)
@@ -574,7 +575,7 @@
..()
-/obj/item/weapon/circuitboard/communications/Del()
+/obj/item/weapon/circuitboard/communications/Destroy()
for(var/obj/machinery/computer/communications/commconsole in world)
if(istype(commconsole.loc,/turf))
diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm
index 304ac7d1af..7ed213043d 100644
--- a/code/game/machinery/computer/computer.dm
+++ b/code/game/machinery/computer/computer.dm
@@ -9,11 +9,8 @@
var/circuit = null //The path to the circuit board type. If circuit==null, the computer can't be disassembled.
var/processing = 0
-/obj/machinery/computer/New()
- ..()
- if(ticker)
- initialize()
-
+ var/light_range_on = 3
+ var/light_power_on = 1
/obj/machinery/computer/initialize()
power_change()
@@ -41,11 +38,11 @@
/obj/machinery/computer/ex_act(severity)
switch(severity)
if(1.0)
- del(src)
+ qdel(src)
return
if(2.0)
if (prob(25))
- del(src)
+ qdel(src)
return
if (prob(50))
for(var/x in verbs)
@@ -60,6 +57,9 @@
return
/obj/machinery/computer/bullet_act(var/obj/item/projectile/Proj)
+ if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
+ return
+
if(prob(Proj.damage))
set_broken()
..()
@@ -89,6 +89,10 @@
/obj/machinery/computer/power_change()
..()
update_icon()
+ if(stat & NOPOWER)
+ set_light(0)
+ else
+ set_light(light_range_on, light_power_on)
/obj/machinery/computer/proc/set_broken()
@@ -129,7 +133,7 @@
A.state = 4
A.icon_state = "4"
M.deconstruct(src)
- del(src)
+ qdel(src)
else
src.attack_hand(user)
return
diff --git a/code/game/machinery/computer/crew.dm b/code/game/machinery/computer/crew.dm
index b5394328b8..6928d104ca 100644
--- a/code/game/machinery/computer/crew.dm
+++ b/code/game/machinery/computer/crew.dm
@@ -2,6 +2,7 @@
name = "crew monitoring computer"
desc = "Used to monitor active health sensors built into most of the crew's uniforms."
icon_state = "crew"
+ light_color = "#315ab4"
use_power = 1
idle_power_usage = 250
active_power_usage = 500
diff --git a/code/game/machinery/computer/guestpass.dm b/code/game/machinery/computer/guestpass.dm
index 40fc0b9914..5add587e77 100644
--- a/code/game/machinery/computer/guestpass.dm
+++ b/code/game/machinery/computer/guestpass.dm
@@ -5,6 +5,7 @@
name = "guest pass"
desc = "Allows temporary access to station areas."
icon_state = "guest"
+ light_color = "#0099ff"
var/temp_access = list() //to prevent agent cards stealing access as permanent
var/expiration_time = 0
@@ -186,4 +187,4 @@
else
usr << "\red Cannot issue pass without issuing ID."
updateUsrDialog()
- return
\ No newline at end of file
+ return
diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm
index c6a30995d2..65322b741d 100644
--- a/code/game/machinery/computer/medical.dm
+++ b/code/game/machinery/computer/medical.dm
@@ -4,6 +4,7 @@
name = "medical records console"
desc = "Used to view, edit and maintain medical records."
icon_state = "medcomp"
+ light_color = "#315ab4"
req_one_access = list(access_medical, access_forensics_lockers)
circuit = "/obj/item/weapon/circuitboard/med_data"
var/obj/item/weapon/card/id/scan = null
@@ -124,7 +125,7 @@
dat += "Back"
dat += "
Medical Robots:"
var/bdat = null
- for(var/obj/machinery/bot/medbot/M in world)
+ for(var/mob/living/bot/medbot/M in world)
if(M.z != src.z) continue //only find medibots on the same z-level as the computer
var/turf/bl = get_turf(M)
@@ -240,7 +241,7 @@
if (href_list["del_all2"])
for(var/datum/data/record/R in data_core.medical)
//R = null
- del(R)
+ qdel(R)
//Foreach goto(494)
src.temp = "All records deleted."
@@ -408,7 +409,7 @@
if (href_list["del_r2"])
if (src.active2)
//src.active2 = null
- del(src.active2)
+ qdel(src.active2)
if (href_list["d_rec"])
var/datum/data/record/R = locate(href_list["d_rec"])
@@ -542,7 +543,7 @@
continue
else if(prob(1))
- del(R)
+ qdel(R)
continue
..(severity)
diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm
index 94eadf7f11..f775c5f950 100644
--- a/code/game/machinery/computer/message.dm
+++ b/code/game/machinery/computer/message.dm
@@ -4,6 +4,7 @@
name = "messaging monitor console"
desc = "Used to access and maintain data on messaging servers. Allows you to view PDA and request console messages."
icon_state = "comm_logs"
+ light_color = "#00b000"
var/hack_icon = "comm_logsc"
var/normal_icon = "comm_logs"
circuit = "/obj/item/weapon/circuitboard/message_monitor"
diff --git a/code/game/machinery/computer/pod.dm b/code/game/machinery/computer/pod.dm
index 0c7830a78a..257e76ede8 100644
--- a/code/game/machinery/computer/pod.dm
+++ b/code/game/machinery/computer/pod.dm
@@ -4,6 +4,7 @@
name = "pod launch control console"
desc = "A control console for launching pods. Some people prefer firing Mechas."
icon_state = "computer_generic"
+ light_color = "#00b000"
circuit = /obj/item/weapon/circuitboard/pod
var/id = 1.0
var/obj/machinery/mass_driver/connected = null
@@ -77,7 +78,7 @@
A.state = 3
A.icon_state = "3"
A.anchored = 1
- del(src)
+ qdel(src)
else
user << "\blue You disconnect the monitor."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( loc )
@@ -100,7 +101,7 @@
A.state = 4
A.icon_state = "4"
A.anchored = 1
- del(src)
+ qdel(src)
else
attack_hand(user)
return
diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm
index 976209305a..93d38fabeb 100644
--- a/code/game/machinery/computer/prisoner.dm
+++ b/code/game/machinery/computer/prisoner.dm
@@ -4,6 +4,7 @@
name = "prisoner management console"
icon = 'icons/obj/computer.dmi'
icon_state = "explosive"
+ light_color = "#a91515"
req_access = list(access_armory)
circuit = "/obj/item/weapon/circuitboard/prisoner"
var/id = 0.0
diff --git a/code/game/machinery/computer/prisonshuttle.dm b/code/game/machinery/computer/prisonshuttle.dm
index 84ba06fa02..0fd1a2df05 100644
--- a/code/game/machinery/computer/prisonshuttle.dm
+++ b/code/game/machinery/computer/prisonshuttle.dm
@@ -14,6 +14,7 @@ var/prison_shuttle_timeleft = 0
name = "prison shuttle control console"
icon = 'icons/obj/computer.dmi'
icon_state = "shuttle"
+ light_color = "#00ffff"
req_access = list(access_security)
circuit = "/obj/item/weapon/circuitboard/prison_shuttle"
var/temp = null
@@ -45,7 +46,7 @@ var/prison_shuttle_timeleft = 0
A.state = 4
A.icon_state = "4"
- del(src)
+ qdel(src)
else if(istype(I,/obj/item/weapon/card/emag) && (!hacked))
hacked = 1
user << "\blue You disable the lock."
@@ -194,7 +195,7 @@ var/prison_shuttle_timeleft = 0
for(var/atom/movable/AM as mob|obj in T)
AM.Move(D)
if(istype(T, /turf/simulated))
- del(T)
+ qdel(T)
start_location.move_contents_to(end_location)
if(1)
@@ -224,7 +225,7 @@ var/prison_shuttle_timeleft = 0
for(var/atom/movable/AM as mob|obj in T)
AM.Move(D)
if(istype(T, /turf/simulated))
- del(T)
+ qdel(T)
for(var/mob/living/carbon/bug in end_location) // If someone somehow is still in the shuttle's docking area...
bug.gib()
@@ -233,4 +234,4 @@ var/prison_shuttle_timeleft = 0
pest.gib()
start_location.move_contents_to(end_location)
- return
\ No newline at end of file
+ return
diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm
index 41d73ee2ae..84a6b7730c 100644
--- a/code/game/machinery/computer/robot.dm
+++ b/code/game/machinery/computer/robot.dm
@@ -5,6 +5,7 @@
desc = "Used to remotely lockdown or detonate linked cyborgs."
icon = 'icons/obj/computer.dmi'
icon_state = "robot"
+ light_color = "#a97faa"
req_access = list(access_robotics)
circuit = "/obj/item/weapon/circuitboard/robotics"
diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm
index c05f0f78be..c97be5be09 100644
--- a/code/game/machinery/computer/security.dm
+++ b/code/game/machinery/computer/security.dm
@@ -4,6 +4,7 @@
name = "security records console"
desc = "Used to view, edit and maintain security records"
icon_state = "security"
+ light_color = "#a91515"
req_one_access = list(access_security, access_forensics_lockers)
circuit = "/obj/item/weapon/circuitboard/secure_data"
var/obj/item/weapon/card/id/scan = null
@@ -377,7 +378,7 @@ What a mess.*/
if ("Purge All Records")
for(var/datum/data/record/R in data_core.security)
- del(R)
+ qdel(R)
temp = "All Security records deleted."
if ("Add Entry")
@@ -549,17 +550,17 @@ What a mess.*/
if ("Delete Record (Security) Execute")
if (active2)
- del(active2)
+ qdel(active2)
if ("Delete Record (ALL) Execute")
if (active1)
for(var/datum/data/record/R in data_core.medical)
if ((R.fields["name"] == active1.fields["name"] || R.fields["id"] == active1.fields["id"]))
- del(R)
+ qdel(R)
else
- del(active1)
+ qdel(active1)
if (active2)
- del(active2)
+ qdel(active2)
else
temp = "This function does not appear to be working at the moment. Our apologies."
@@ -605,7 +606,7 @@ What a mess.*/
continue
else if(prob(1))
- del(R)
+ qdel(R)
continue
..(severity)
diff --git a/code/game/machinery/computer/shuttle.dm b/code/game/machinery/computer/shuttle.dm
index b8b25b3e34..3fca14135a 100644
--- a/code/game/machinery/computer/shuttle.dm
+++ b/code/game/machinery/computer/shuttle.dm
@@ -2,6 +2,7 @@
name = "Shuttle"
desc = "For shuttle control."
icon_state = "shuttle"
+ light_color = "#00ffff"
var/auth_need = 3.0
var/list/authorized = list( )
@@ -43,7 +44,7 @@
world << "\blue Alert: Shuttle launch time shortened to 10 seconds!"
emergency_shuttle.set_launch_countdown(10)
//src.authorized = null
- del(src.authorized)
+ qdel(src.authorized)
src.authorized = list( )
if("Repeal")
diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm
index aa92a59094..e0c6f724ab 100644
--- a/code/game/machinery/computer/skills.dm
+++ b/code/game/machinery/computer/skills.dm
@@ -4,6 +4,7 @@
name = "employment records console"
desc = "Used to view, edit and maintain employment records."
icon_state = "medlaptop"
+ light_color = "#00b000"
req_one_access = list(access_heads)
circuit = "/obj/item/weapon/circuitboard/skills"
var/obj/item/weapon/card/id/scan = null
@@ -289,7 +290,7 @@ What a mess.*/
if(PDA_Manifest.len)
PDA_Manifest.Cut()
for(var/datum/data/record/R in data_core.security)
- del(R)
+ qdel(R)
temp = "All Employment records deleted."
if ("Delete Record (ALL)")
@@ -373,9 +374,9 @@ What a mess.*/
PDA_Manifest.Cut()
for(var/datum/data/record/R in data_core.medical)
if ((R.fields["name"] == active1.fields["name"] || R.fields["id"] == active1.fields["id"]))
- del(R)
+ qdel(R)
else
- del(active1)
+ qdel(active1)
else
temp = "This function does not appear to be working at the moment. Our apologies."
@@ -408,7 +409,7 @@ What a mess.*/
continue
else if(prob(1))
- del(R)
+ qdel(R)
continue
- ..(severity)
\ No newline at end of file
+ ..(severity)
diff --git a/code/game/machinery/computer/specops_shuttle.dm b/code/game/machinery/computer/specops_shuttle.dm
index 01728b4e50..3d44a7a260 100644
--- a/code/game/machinery/computer/specops_shuttle.dm
+++ b/code/game/machinery/computer/specops_shuttle.dm
@@ -15,6 +15,7 @@ var/specops_shuttle_timeleft = 0
name = "special operations shuttle control console"
icon = 'icons/obj/computer.dmi'
icon_state = "shuttle"
+ light_color = "#00ffff"
req_access = list(access_cent_specops)
// req_access = list(ACCESS_CENT_SPECOPS)
var/temp = null
@@ -75,7 +76,7 @@ var/specops_shuttle_timeleft = 0
for(var/atom/movable/AM as mob|obj in T)
AM.Move(D)
if(istype(T, /turf/simulated))
- del(T)
+ qdel(T)
for(var/mob/living/carbon/bug in end_location) // If someone somehow is still in the shuttle's docking area...
bug.gib()
@@ -94,7 +95,7 @@ var/specops_shuttle_timeleft = 0
for(var/obj/machinery/computer/specops_shuttle/S in world)
S.specops_shuttle_timereset = world.time + SPECOPS_RETURN_DELAY
- del(announcer)
+ qdel(announcer)
/proc/specops_process()
var/area/centcom/specops/special_ops = locate()//Where is the specops area located?
@@ -224,7 +225,7 @@ var/specops_shuttle_timeleft = 0
for(var/atom/movable/AM as mob|obj in T)
AM.Move(D)
if(istype(T, /turf/simulated))
- del(T)
+ qdel(T)
start_location.move_contents_to(end_location)
@@ -235,7 +236,7 @@ var/specops_shuttle_timeleft = 0
for(var/obj/machinery/computer/specops_shuttle/S in world)
S.specops_shuttle_timereset = world.time + SPECOPS_RETURN_DELAY
- del(announcer)
+ qdel(announcer)
/proc/specops_can_move()
if(specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom)
diff --git a/code/game/machinery/computer/station_alert.dm b/code/game/machinery/computer/station_alert.dm
index 6d5209ce58..696273d2ab 100644
--- a/code/game/machinery/computer/station_alert.dm
+++ b/code/game/machinery/computer/station_alert.dm
@@ -3,21 +3,27 @@
name = "Station Alert Console"
desc = "Used to access the station's automated alert system."
icon_state = "alert:0"
- circuit = "/obj/item/weapon/circuitboard/stationalert"
+ light_color = "#e6ffff"
+ circuit = /obj/item/weapon/circuitboard/stationalert_engineering
var/obj/nano_module/alarm_monitor/alarm_monitor
var/monitor_type = /obj/nano_module/alarm_monitor/engineering
/obj/machinery/computer/station_alert/security
- name = "Security Alert Console"
monitor_type = /obj/nano_module/alarm_monitor/security
+ circuit = /obj/item/weapon/circuitboard/stationalert_security
+
+/obj/machinery/computer/station_alert/all
+ monitor_type = /obj/nano_module/alarm_monitor/all
+ circuit = /obj/item/weapon/circuitboard/stationalert_all
/obj/machinery/computer/station_alert/New()
..()
alarm_monitor = new monitor_type(src)
alarm_monitor.register(src, /obj/machinery/computer/station_alert/update_icon)
-/obj/machinery/computer/station_alert/Del()
+/obj/machinery/computer/station_alert/Destroy()
alarm_monitor.unregister(src)
+ qdel(alarm_monitor)
..()
/obj/machinery/computer/station_alert/attack_ai(mob/user)
diff --git a/code/game/machinery/computer/supply.dm b/code/game/machinery/computer/supply.dm
index 233a271108..b5df1127c9 100644
--- a/code/game/machinery/computer/supply.dm
+++ b/code/game/machinery/computer/supply.dm
@@ -2,6 +2,7 @@
name = "supply control console"
icon = 'icons/obj/computer.dmi'
icon_state = "supply"
+ light_color = "#b88b2e"
req_access = list(access_cargo)
circuit = "/obj/item/weapon/circuitboard/supplycomp"
var/temp = null
diff --git a/code/game/machinery/computer/syndicate_specops_shuttle.dm b/code/game/machinery/computer/syndicate_specops_shuttle.dm
index 970bb362c3..dd921abf09 100644
--- a/code/game/machinery/computer/syndicate_specops_shuttle.dm
+++ b/code/game/machinery/computer/syndicate_specops_shuttle.dm
@@ -14,6 +14,7 @@ var/syndicate_elite_shuttle_timeleft = 0
name = "elite syndicate squad shuttle control console"
icon = 'icons/obj/computer.dmi'
icon_state = "syndishuttle"
+ light_color = "#00ffff"
req_access = list(access_cent_specops)
var/temp = null
var/hacked = 0
@@ -160,7 +161,7 @@ var/syndicate_elite_shuttle_timeleft = 0
for(var/atom/movable/AM as mob|obj in T)
AM.Move(D)
if(istype(T, /turf/simulated))
- del(T)
+ qdel(T)
for(var/mob/living/carbon/bug in end_location) // If someone somehow is still in the shuttle's docking area...
bug.gib()
@@ -256,4 +257,4 @@ var/syndicate_elite_shuttle_timeleft = 0
add_fingerprint(usr)
updateUsrDialog()
- return
\ No newline at end of file
+ return
diff --git a/code/game/machinery/computer3/buildandrepair.dm b/code/game/machinery/computer3/buildandrepair.dm
index 38db742ee6..bc02e474e4 100644
--- a/code/game/machinery/computer3/buildandrepair.dm
+++ b/code/game/machinery/computer3/buildandrepair.dm
@@ -95,7 +95,7 @@
if(!src || !WT.isOn()) return
user << "\blue You deconstruct the frame."
new /obj/item/stack/sheet/metal( src.loc, 5 )
- del(src)
+ qdel(src)
if(1)
if(istype(P, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
@@ -160,7 +160,7 @@
if(do_after(user, 20))
if(P)
P:amount -= 5
- if(!P:amount) del(P)
+ if(!P:amount) qdel(P)
user << "\blue You add cables to the frame."
src.state = 3
src.icon_state = "3"
@@ -212,7 +212,7 @@
if(circuit.OS)
circuit.OS.computer = B
B.RefreshParts() // todo
- del(src)
+ qdel(src)
/*
This will remove peripherals if you specify one, but the main function is to
diff --git a/code/game/machinery/computer3/computer.dm b/code/game/machinery/computer3/computer.dm
index 4939444ae5..ff4b69b20f 100644
--- a/code/game/machinery/computer3/computer.dm
+++ b/code/game/machinery/computer3/computer.dm
@@ -215,11 +215,11 @@
ex_act(severity)
switch(severity)
if(1.0)
- del(src)
+ qdel(src)
return
if(2.0)
if (prob(25))
- del(src)
+ qdel(src)
return
if (prob(50))
for(var/x in verbs)
@@ -278,8 +278,8 @@
chan = power_channel
var/area/A = get_area(loc)
- if(istype(A) && A.master && A.master.powered(chan))
- A.master.use_power(amount, chan)
+ if(istype(A) && A.powered(chan))
+ A.use_power(amount, chan)
else if(battery && battery.charge > 0)
battery.use(amount)
diff --git a/code/game/machinery/computer3/computers/HolodeckControl.dm b/code/game/machinery/computer3/computers/HolodeckControl.dm
index 80d60afd07..9e4532604b 100644
--- a/code/game/machinery/computer3/computers/HolodeckControl.dm
+++ b/code/game/machinery/computer3/computers/HolodeckControl.dm
@@ -160,7 +160,7 @@
if(!silent)
var/obj/oldobj = obj
obj.visible_message("The [oldobj.name] fades away!")
- del(obj)
+ qdel(obj)
proc/checkInteg(var/area/A)
for(var/turf/T in A)
@@ -213,10 +213,10 @@
derez(item)
for(var/obj/effect/decal/cleanable/blood/B in linkedholodeck)
- del(B)
+ qdel(B)
for(var/mob/living/simple_animal/hostile/carp/C in linkedholodeck)
- del(C)
+ qdel(C)
holographic_items = A.copy_contents_to(linkedholodeck , 1)
diff --git a/code/game/machinery/computer3/computers/camera.dm b/code/game/machinery/computer3/computers/camera.dm
index 17f14e0cbf..f90b0526ee 100644
--- a/code/game/machinery/computer3/computers/camera.dm
+++ b/code/game/machinery/computer3/computers/camera.dm
@@ -238,7 +238,7 @@
camera_list = "Network Key: [key.title] [topic_link(src,"keyselect","\[ Select key \]")]
"
for(var/obj/machinery/camera/C in temp_list)
- if(C.status)
+ if(C.can_use())
camera_list += "[C.c_tag] - [topic_link(src,"show=\ref[C]","Show")]
"
else
camera_list += "[C.c_tag] - DEACTIVATED
"
@@ -264,7 +264,7 @@
if("show" in href_list)
var/obj/machinery/camera/C = locate(href_list["show"])
- if(istype(C) && C.status)
+ if(istype(C) && C.can_use())
set_current(C)
usr.reset_view(C)
interact()
diff --git a/code/game/machinery/computer3/computers/medical.dm b/code/game/machinery/computer3/computers/medical.dm
index adb7ff9079..aec0b615f5 100644
--- a/code/game/machinery/computer3/computers/medical.dm
+++ b/code/game/machinery/computer3/computers/medical.dm
@@ -136,7 +136,7 @@
dat += "Back"
dat += "
Medical Robots:"
var/bdat = null
- for(var/obj/machinery/bot/medbot/M in world)
+ for(var/mob/living/bot/medbot/M in world)
if(M.z != computer.z) continue //only find medibots on the same z-level as the computer
var/turf/bl = get_turf(M)
@@ -254,7 +254,7 @@
if (href_list["del_all2"])
for(var/datum/data/record/R in data_core.medical)
//R = null
- del(R)
+ qdel(R)
//Foreach goto(494)
src.temp = "All records deleted."
@@ -422,7 +422,7 @@
if (href_list["del_r2"])
if (src.active2)
//src.active2 = null
- del(src.active2)
+ qdel(src.active2)
if (href_list["d_rec"])
var/datum/data/record/R = locate(href_list["d_rec"])
diff --git a/code/game/machinery/computer3/computers/security.dm b/code/game/machinery/computer3/computers/security.dm
index 924f32b1b7..f2de764894 100644
--- a/code/game/machinery/computer3/computers/security.dm
+++ b/code/game/machinery/computer3/computers/security.dm
@@ -397,7 +397,7 @@ What a mess.*/
if ("Purge All Records")
for(var/datum/data/record/R in data_core.security)
- del(R)
+ qdel(R)
temp = "All Security records deleted."
if ("Add Entry")
@@ -558,17 +558,17 @@ What a mess.*/
if ("Delete Record (Security) Execute")
if (active2)
- del(active2)
+ qdel(active2)
if ("Delete Record (ALL) Execute")
if (active1)
for(var/datum/data/record/R in data_core.medical)
if ((R.fields["name"] == active1.fields["name"] || R.fields["id"] == active1.fields["id"]))
- del(R)
+ qdel(R)
else
- del(active1)
+ qdel(active1)
if (active2)
- del(active2)
+ qdel(active2)
else
temp = "This function does not appear to be working at the moment. Our apologies."
@@ -601,7 +601,7 @@ What a mess.*/
continue
else if(prob(1))
- del(R)
+ qdel(R)
continue
..(severity)
diff --git a/code/game/machinery/computer3/laptop.dm b/code/game/machinery/computer3/laptop.dm
index e0156e874e..484db52462 100644
--- a/code/game/machinery/computer3/laptop.dm
+++ b/code/game/machinery/computer3/laptop.dm
@@ -52,7 +52,7 @@
O.loc = loc
usr << "\The [src] crumbles to pieces."
spawn(5)
- del src
+ qdel(src)
return
if(!stored_computer.manipulating)
@@ -65,7 +65,7 @@
spawn(5)
stored_computer.manipulating = 0
- del src
+ qdel(src)
else
usr << "\red You are already opening the computer!"
@@ -185,12 +185,12 @@
else
stat &= ~NOPOWER
- Del()
+ Destroy()
if(istype(loc,/obj/item/device/laptop))
var/obj/O = loc
spawn(5)
if(O)
- del O
+ qdel(O)
..()
diff --git a/code/game/machinery/computer3/lapvend.dm b/code/game/machinery/computer3/lapvend.dm
index 72531b5d8e..b2e84f1cd2 100644
--- a/code/game/machinery/computer3/lapvend.dm
+++ b/code/game/machinery/computer3/lapvend.dm
@@ -31,7 +31,7 @@
/obj/machinery/lapvend/blob_act()
if (prob(50))
spawn(0)
- del(src)
+ qdel(src)
return
return
@@ -202,10 +202,10 @@
if (network == 3)
newlap.spawn_parts += (/obj/item/part/computer/networking/cable)
if (power == 1)
- del(newlap.battery)
+ qdel(newlap.battery)
newlap.battery = new /obj/item/weapon/cell/high(newlap)
if (power == 2)
- del(newlap.battery)
+ qdel(newlap.battery)
newlap.battery = new /obj/item/weapon/cell/super(newlap)
newlap.spawn_parts()
@@ -404,7 +404,7 @@
T.time = worldtime2text()
vendor_account.transaction_log.Add(T)
- del(relap)
+ qdel(relap)
vendmode = 0
cardreader = 0
floppy = 0
diff --git a/code/game/machinery/computer3/networking.dm b/code/game/machinery/computer3/networking.dm
index 27d7789008..66d25dda5a 100644
--- a/code/game/machinery/computer3/networking.dm
+++ b/code/game/machinery/computer3/networking.dm
@@ -143,10 +143,9 @@
if(typekey == null)
typekey = /obj/machinery
var/list/machines = list()
- for(var/area/area in A.related)
- for(var/obj/O in area.contents)
- if(istype(O,typekey))
- machines |= O
+ for(var/obj/O in A.contents)
+ if(istype(O,typekey))
+ machines |= O
return machines
verify_machine(var/obj/previous)
if(!previous) return 0
diff --git a/code/game/machinery/computer3/program.dm b/code/game/machinery/computer3/program.dm
index 74083b8ffd..0667fe2f73 100644
--- a/code/game/machinery/computer3/program.dm
+++ b/code/game/machinery/computer3/program.dm
@@ -111,7 +111,7 @@ Programs are a file that can be executed
update_icon()
if(popup)
popup.close()
- del popup
+ qdel(popup)
return
/*
diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm
index 0f906ad4b2..da2ebb9d2d 100644
--- a/code/game/machinery/constructable_frame.dm
+++ b/code/game/machinery/constructable_frame.dm
@@ -53,7 +53,7 @@
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
user << "\blue You dismantle the frame"
new /obj/item/stack/sheet/metal(src.loc, 5)
- del(src)
+ qdel(src)
if(2)
if(istype(P, /obj/item/weapon/circuitboard))
var/obj/item/weapon/circuitboard/B = P
@@ -129,7 +129,7 @@
else
circuit.loc = null
new_machine.RefreshParts()
- del(src)
+ qdel(src)
else
if(istype(P, /obj/item))
for(var/I in req_components)
diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm
index a9858742c9..4ccc48f8bd 100644
--- a/code/game/machinery/cryo.dm
+++ b/code/game/machinery/cryo.dm
@@ -24,9 +24,11 @@
..()
initialize_directions = dir
-/obj/machinery/atmospherics/unary/cryo_cell/Del()
- if(occupant)
- occupant.loc = loc
+/obj/machinery/atmospherics/unary/cryo_cell/Destroy()
+ var/turf/T = loc
+ T.contents += contents
+ if(beaker)
+ beaker.loc = get_step(loc, SOUTH) //Beaker is carefully ejected from the wreckage of the cryotube
..()
/obj/machinery/atmospherics/unary/cryo_cell/initialize()
@@ -190,7 +192,7 @@
return
var/mob/M = G:affecting
if(put_mob(M))
- del(G)
+ qdel(G)
return
/obj/machinery/atmospherics/unary/cryo_cell/update_icon()
diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm
index fcece506c3..41bb3bef2d 100644
--- a/code/game/machinery/cryopod.dm
+++ b/code/game/machinery/cryopod.dm
@@ -234,7 +234,7 @@
..()
-/obj/machinery/cryopod/Del()
+/obj/machinery/cryopod/Destroy()
if(occupant)
occupant.loc = loc
occupant.resting = 1
@@ -291,12 +291,12 @@
var/mob/living/silicon/robot/R = occupant
if(!istype(R)) return ..()
- del(R.mmi)
+ qdel(R.mmi)
for(var/obj/item/I in R.module) // the tools the borg has; metal, glass, guns etc
for(var/obj/item/O in I) // the things inside the tools, if anything; mainly for janiborg trash bags
O.loc = R
- del(I)
- del(R.module)
+ qdel(I)
+ qdel(R.module)
return ..()
@@ -308,14 +308,14 @@
occupant.drop_from_inventory(W)
W.loc = src
- if(W.contents.len) //Make sure we catch anything not handled by del() on the items.
+ if(W.contents.len) //Make sure we catch anything not handled by qdel() on the items.
for(var/obj/item/O in W.contents)
if(istype(O,/obj/item/weapon/storage/internal)) //Stop eating pockets, you fuck!
continue
O.loc = src
//Delete all items not on the preservation list.
- var/list/items = src.contents
+ var/list/items = src.contents.Copy()
items -= occupant // Don't delete the occupant
items -= announce // or the autosay radio.
@@ -328,7 +328,7 @@
break
if(!preserve)
- del(W)
+ qdel(W)
else
if(control_computer && control_computer.allow_items)
control_computer.frozen_items += W
@@ -341,7 +341,7 @@
// We don't want revs to get objectives that aren't for heads of staff. Letting
// them win or lose based on cryo is silly so we remove the objective.
if(istype(O,/datum/objective/mutiny) && O.target == occupant.mind)
- del(O)
+ qdel(O)
else if(O.target && istype(O.target,/datum/mind))
if(O.target == occupant.mind)
if(O.owner && O.owner.current)
@@ -353,7 +353,7 @@
if(!(O.target))
all_objectives -= O
O.owner.objectives -= O
- del(O)
+ qdel(O)
//Handle job slot/tater cleanup.
var/job = occupant.mind.assigned_role
@@ -361,7 +361,7 @@
job_master.FreeRole(job)
if(occupant.mind.objectives.len)
- del(occupant.mind.objectives)
+ qdel(occupant.mind.objectives)
occupant.mind.special_role = null
//else
//if(ticker.mode.name == "AutoTraitor")
@@ -374,13 +374,13 @@
PDA_Manifest.Cut()
for(var/datum/data/record/R in data_core.medical)
if ((R.fields["name"] == occupant.real_name))
- del(R)
+ qdel(R)
for(var/datum/data/record/T in data_core.security)
if ((T.fields["name"] == occupant.real_name))
- del(T)
+ qdel(T)
for(var/datum/data/record/G in data_core.general)
if ((G.fields["name"] == occupant.real_name))
- del(G)
+ qdel(G)
if(orient_right)
icon_state = "[base_icon_state]-r"
@@ -398,9 +398,9 @@
announce.autosay("[occupant.real_name] [on_store_message]", "[on_store_name]")
visible_message("\The [initial(name)] hums and hisses as it moves [occupant.real_name] into storage.", 3)
- set_occupant(null)
// Delete the mob.
- del(occupant)
+ qdel(occupant)
+ set_occupant(null)
/obj/machinery/cryopod/attackby(var/obj/item/weapon/G as obj, var/mob/user as mob)
diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm
index 87e7adea03..e49fb26283 100644
--- a/code/game/machinery/deployable.dm
+++ b/code/game/machinery/deployable.dm
@@ -91,14 +91,14 @@ for reference:
new /obj/item/stack/sheet/wood(get_turf(src))
new /obj/item/stack/sheet/wood(get_turf(src))
new /obj/item/stack/sheet/wood(get_turf(src))
- del(src)
+ qdel(src)
..()
ex_act(severity)
switch(severity)
if(1.0)
visible_message("\red The barricade is blown apart!")
- del(src)
+ qdel(src)
return
if(2.0)
src.health -= 25
@@ -107,7 +107,7 @@ for reference:
new /obj/item/stack/sheet/wood(get_turf(src))
new /obj/item/stack/sheet/wood(get_turf(src))
new /obj/item/stack/sheet/wood(get_turf(src))
- del(src)
+ qdel(src)
return
meteorhit()
@@ -115,14 +115,14 @@ for reference:
new /obj/item/stack/sheet/wood(get_turf(src))
new /obj/item/stack/sheet/wood(get_turf(src))
new /obj/item/stack/sheet/wood(get_turf(src))
- del(src)
+ qdel(src)
return
blob_act()
src.health -= 25
if (src.health <= 0)
visible_message("\red The blob eats through the barricade!")
- del(src)
+ qdel(src)
return
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)//So bullets will fly over and stuff.
@@ -264,7 +264,7 @@ for reference:
var/turf/Tsec = get_turf(src)
/* var/obj/item/stack/rods/ =*/
- new /obj/item/stack/rods(Tsec)
+ PoolOrNew(/obj/item/stack/rods, Tsec)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
@@ -272,4 +272,4 @@ for reference:
explosion(src.loc,-1,-1,0)
if(src)
- del(src)
\ No newline at end of file
+ qdel(src)
\ No newline at end of file
diff --git a/code/game/machinery/door_control.dm b/code/game/machinery/door_control.dm
index 928dda2541..e010264d4a 100644
--- a/code/game/machinery/door_control.dm
+++ b/code/game/machinery/door_control.dm
@@ -1,27 +1,10 @@
-#define CONTROL_POD_DOORS 0
-#define CONTROL_NORMAL_DOORS 1
-#define CONTROL_EMITTERS 2
-
-/obj/machinery/door_control
- name = "remote door-control"
- desc = "It controls doors, remotely."
+/obj/machinery/button/remote
+ name = "remote object control"
+ desc = "It controls objects, remotely."
icon = 'icons/obj/stationobjs.dmi'
icon_state = "doorctrl0"
- desc = "A remote control-switch for a door."
power_channel = ENVIRON
- var/id = null
- var/normaldoorcontrol = CONTROL_POD_DOORS
- var/desiredstate = 0 // Zero is closed, 1 is open.
- var/specialfunctions = 1
- /*
- Bitflag, 1= open
- 2= idscan,
- 4= bolts
- 8= shock
- 16= door safties
-
- */
-
+ var/desiredstate = 0
var/exposedwires = 0
var/wires = 3
/*
@@ -34,14 +17,13 @@
idle_power_usage = 2
active_power_usage = 4
-
-/obj/machinery/door_control/attack_ai(mob/user as mob)
+/obj/machinery/button/remote/attack_ai(mob/user as mob)
if(wires & 2)
return src.attack_hand(user)
else
user << "Error, no route to host."
-/obj/machinery/door_control/attackby(obj/item/weapon/W, mob/user as mob)
+/obj/machinery/button/remote/attackby(obj/item/weapon/W, mob/user as mob)
/* For later implementation
if (istype(W, /obj/item/weapon/screwdriver))
{
@@ -64,7 +46,56 @@
playsound(src.loc, "sparks", 100, 1)
return src.attack_hand(user)
-/obj/machinery/door_control/proc/handle_door()
+/obj/machinery/button/remote/attack_hand(mob/user as mob)
+ if(..())
+ return
+
+ src.add_fingerprint(user)
+ if(stat & (NOPOWER|BROKEN))
+ return
+
+ if(!allowed(user) && (wires & 1))
+ user << "Access Denied"
+ flick("doorctrl-denied",src)
+ return
+
+ use_power(5)
+ icon_state = "doorctrl1"
+ desiredstate = !desiredstate
+ trigger()
+ spawn(15)
+ update_icon()
+
+/obj/machinery/button/remote/proc/trigger()
+ return
+
+/obj/machinery/button/remote/power_change()
+ ..()
+ update_icon()
+
+/obj/machinery/button/remote/update_icon()
+ if(stat & NOPOWER)
+ icon_state = "doorctrl-p"
+ else
+ icon_state = "doorctrl0"
+
+/*
+ Airlock remote control
+*/
+/obj/machinery/button/remote/airlock
+ name = "remote door-control"
+ desc = "It controls doors, remotely."
+
+ var/specialfunctions = 1
+ /*
+ Bitflag, 1= open
+ 2= idscan,
+ 4= bolts
+ 8= shock
+ 16= door safties
+ */
+
+/obj/machinery/button/remote/airlock/trigger()
for(var/obj/machinery/door/airlock/D in world)
if(D.id_tag == src.id)
if(specialfunctions & OPEN)
@@ -78,24 +109,31 @@
return
if(desiredstate == 1)
if(specialfunctions & IDSCAN)
- D.aiDisabledIdScanner = 1
+ D.set_idscan(0)
if(specialfunctions & BOLTS)
D.lock()
if(specialfunctions & SHOCK)
D.electrify(-1)
if(specialfunctions & SAFE)
- D.safe = 0
+ D.set_safeties(0)
else
if(specialfunctions & IDSCAN)
- D.aiDisabledIdScanner = 0
+ D.set_idscan(1)
if(specialfunctions & BOLTS)
D.unlock()
if(specialfunctions & SHOCK)
D.electrify(0)
if(specialfunctions & SAFE)
- D.safe = 1
+ D.set_safeties(1)
-/obj/machinery/door_control/proc/handle_pod()
+/*
+ Blast door remote control
+*/
+/obj/machinery/button/remote/blast_door
+ name = "remote blast door-control"
+ desc = "It controls blast doors, remotely."
+
+/obj/machinery/button/remote/blast_door/trigger()
for(var/obj/machinery/door/blast/M in world)
if(M.id == src.id)
if(M.density)
@@ -107,59 +145,32 @@
M.close()
return
-/obj/machinery/door_control/proc/handle_emitters(mob/user as mob)
+/*
+ Emitter remote control
+*/
+/obj/machinery/button/remote/emitter
+ name = "remote emitter control"
+ desc = "It controls emitters, remotely."
+
+/obj/machinery/button/remote/emitter/trigger(mob/user as mob)
for(var/obj/machinery/power/emitter/E in world)
if(E.id == src.id)
spawn(0)
E.activate(user)
return
-/obj/machinery/door_control/attack_hand(mob/user as mob)
- src.add_fingerprint(user)
- if(stat & (NOPOWER|BROKEN))
- return
-
- if(!allowed(user) && (wires & 1))
- user << "\red Access Denied"
- flick("doorctrl-denied",src)
- return
-
- use_power(5)
- icon_state = "doorctrl1"
- add_fingerprint(user)
-
- switch(normaldoorcontrol)
- if(CONTROL_NORMAL_DOORS)
- handle_door()
- if(CONTROL_POD_DOORS)
- handle_pod()
- if(CONTROL_EMITTERS)
- handle_emitters(user)
-
- desiredstate = !desiredstate
- spawn(15)
- if(!(stat & NOPOWER))
- icon_state = "doorctrl0"
-
-/obj/machinery/door_control/power_change()
- ..()
- if(stat & NOPOWER)
- icon_state = "doorctrl-p"
- else
- icon_state = "doorctrl0"
-
-/obj/machinery/button/driver
+/*
+ Mass driver remote control
+*/
+/obj/machinery/button/remote/driver
name = "mass driver button"
desc = "A remote control switch for a mass driver."
+ icon = 'icons/obj/objects.dmi'
+ icon_state = "launcherbtt"
-/obj/machinery/button/driver/attack_hand(mob/user as mob)
- if(..())
- return
-
- use_power(5)
-
+/obj/machinery/button/remote/driver/trigger(mob/user as mob)
active = 1
- icon_state = "launcheract"
+ update_icon()
for(var/obj/machinery/door/blast/M in machines)
if (M.id == src.id)
@@ -177,11 +188,17 @@
for(var/obj/machinery/door/blast/M in machines)
if (M.id == src.id)
- spawn( 0 )
+ spawn(0)
M.close()
return
icon_state = "launcherbtt"
- active = 0
+ update_icon()
return
+
+/obj/machinery/button/remote/driver/update_icon()
+ if(!active || (stat & NOPOWER))
+ icon_state = "launcherbtt"
+ else
+ icon_state = "launcheract"
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 69c4ee2857..76b08dba2c 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -4,7 +4,7 @@
icon_state = "door_closed"
power_channel = ENVIRON
- explosion_resistance = 15
+ explosion_resistance = 10
var/aiControlDisabled = 0 //If 1, AI control is disabled until the AI hacks back in and disables the lock. If 2, the AI has bypassed the lock. If -1, the control is enabled but the AI had bypassed it earlier, so if it is disabled again the AI would have no trouble getting back in.
var/hackProof = 0 // if 1, this door can't be hacked by the AI
var/electrified_until = 0 //World time when the door is no longer electrified. -1 if it is permanently electrified until someone fixes it.
@@ -80,6 +80,7 @@
icon = 'icons/obj/doors/Doorglass.dmi'
hitsound = 'sound/effects/Glasshit.ogg'
maxhealth = 300
+ explosion_resistance = 5
opacity = 0
glass = 1
@@ -91,6 +92,7 @@
/obj/machinery/door/airlock/vault
name = "Vault"
icon = 'icons/obj/doors/vault.dmi'
+ explosion_resistance = 20
opacity = 1
secured_wires = 1
assembly_type = /obj/structure/door_assembly/door_assembly_highsecurity //Until somebody makes better sprites.
@@ -108,12 +110,14 @@
/obj/machinery/door/airlock/hatch
name = "Airtight Hatch"
icon = 'icons/obj/doors/Doorhatchele.dmi'
+ explosion_resistance = 20
opacity = 1
assembly_type = /obj/structure/door_assembly/door_assembly_hatch
/obj/machinery/door/airlock/maintenance_hatch
name = "Maintenance Hatch"
icon = 'icons/obj/doors/Doorhatchmaint2.dmi'
+ explosion_resistance = 20
opacity = 1
assembly_type = /obj/structure/door_assembly/door_assembly_mhatch
@@ -122,6 +126,7 @@
icon = 'icons/obj/doors/Doorcomglass.dmi'
hitsound = 'sound/effects/Glasshit.ogg'
maxhealth = 300
+ explosion_resistance = 5
opacity = 0
assembly_type = /obj/structure/door_assembly/door_assembly_com
glass = 1
@@ -131,6 +136,7 @@
icon = 'icons/obj/doors/Doorengglass.dmi'
hitsound = 'sound/effects/Glasshit.ogg'
maxhealth = 300
+ explosion_resistance = 5
opacity = 0
assembly_type = /obj/structure/door_assembly/door_assembly_eng
glass = 1
@@ -140,6 +146,7 @@
icon = 'icons/obj/doors/Doorsecglass.dmi'
hitsound = 'sound/effects/Glasshit.ogg'
maxhealth = 300
+ explosion_resistance = 5
opacity = 0
assembly_type = /obj/structure/door_assembly/door_assembly_sec
glass = 1
@@ -149,6 +156,7 @@
icon = 'icons/obj/doors/Doormedglass.dmi'
hitsound = 'sound/effects/Glasshit.ogg'
maxhealth = 300
+ explosion_resistance = 5
opacity = 0
assembly_type = /obj/structure/door_assembly/door_assembly_med
glass = 1
@@ -173,6 +181,7 @@
icon = 'icons/obj/doors/Doorresearchglass.dmi'
hitsound = 'sound/effects/Glasshit.ogg'
maxhealth = 300
+ explosion_resistance = 5
opacity = 0
assembly_type = /obj/structure/door_assembly/door_assembly_research
glass = 1
@@ -183,6 +192,7 @@
icon = 'icons/obj/doors/Doorminingglass.dmi'
hitsound = 'sound/effects/Glasshit.ogg'
maxhealth = 300
+ explosion_resistance = 5
opacity = 0
assembly_type = /obj/structure/door_assembly/door_assembly_min
glass = 1
@@ -192,6 +202,7 @@
icon = 'icons/obj/doors/Dooratmoglass.dmi'
hitsound = 'sound/effects/Glasshit.ogg'
maxhealth = 300
+ explosion_resistance = 5
opacity = 0
assembly_type = /obj/structure/door_assembly/door_assembly_atmo
glass = 1
@@ -264,13 +275,13 @@
for(var/obj/structure/falsewall/phoron/F in range(3,src))//Hackish as fuck, but until temperature_expose works, there is nothing I can do -Sieve
var/turf/T = get_turf(F)
T.ChangeTurf(/turf/simulated/wall/mineral/phoron/)
- del (F)
+ qdel (F)
for(var/turf/simulated/wall/mineral/phoron/W in range(3,src))
W.ignite((temperature/4))//Added so that you can't set off a massive chain reaction with a small flame
for(var/obj/machinery/door/airlock/phoron/D in range(3,src))
D.ignite(temperature/4)
new/obj/structure/door_assembly( src.loc )
- del (src)
+ qdel(src)
/obj/machinery/door/airlock/sandstone
name = "Sandstone Airlock"
@@ -292,6 +303,7 @@
/obj/machinery/door/airlock/highsecurity
name = "Secure Airlock"
icon = 'icons/obj/doors/hightechsecurity.dmi'
+ explosion_resistance = 20
secured_wires = 1
assembly_type = /obj/structure/door_assembly/door_assembly_highsecurity
@@ -421,6 +433,33 @@ About the new airlock wires panel:
if(feedback && message)
usr << message
+/obj/machinery/door/airlock/proc/set_idscan(var/activate, var/feedback = 0)
+ var/message = ""
+ if(src.isWireCut(AIRLOCK_WIRE_IDSCAN))
+ message = "The IdScan wire is cut - IdScan feature permanently disabled."
+ else if(activate && src.aiDisabledIdScanner)
+ src.aiDisabledIdScanner = 0
+ message = "IdScan feature has been enabled."
+ else if(!activate && !src.aiDisabledIdScanner)
+ src.aiDisabledIdScanner = 1
+ message = "IdScan feature has been disabled."
+
+ if(feedback && message)
+ usr << message
+
+/obj/machinery/door/airlock/proc/set_safeties(var/activate, var/feedback = 0)
+ var/message = ""
+ // Safeties! We don't need no stinking safeties!
+ if (src.isWireCut(AIRLOCK_WIRE_SAFETY))
+ message = text("The safety wire is cut - Cannot enable safeties.")
+ else if (!activate && src.safe)
+ safe = 0
+ else if (activate && !src.safe)
+ safe = 1
+
+ if(feedback && message)
+ usr << message
+
// shock user with probability prb (if all connections & power are working)
// returns 1 if shocked, 0 otherwise
// The preceding comment was borrowed from the grille's shock script
@@ -490,7 +529,8 @@ About the new airlock wires panel:
if("deny")
if(density && src.arePowerSystemsOn())
flick("door_deny", src)
- playsound(src.loc, 'sound/machines/buzz-two.ogg', 50, 0)
+ if(secured_wires)
+ playsound(src.loc, 'sound/machines/buzz-two.ogg', 50, 0)
return
/obj/machinery/door/airlock/attack_ai(mob/user as mob)
@@ -636,14 +676,7 @@ About the new airlock wires panel:
var/activate = text2num(href_list["activate"])
switch (href_list["command"])
if("idscan")
- if(src.isWireCut(AIRLOCK_WIRE_IDSCAN))
- usr << "The IdScan wire has been cut - IdScan feature permanently disabled."
- else if(activate && src.aiDisabledIdScanner)
- src.aiDisabledIdScanner = 0
- usr << "IdScan feature has been enabled."
- else if(!activate && !src.aiDisabledIdScanner)
- src.aiDisabledIdScanner = 1
- usr << "IdScan feature has been disabled."
+ set_idscan(activate, 1)
if("main_power")
if(!main_power_lost_until)
src.loseMainPower()
@@ -652,7 +685,7 @@ About the new airlock wires panel:
src.loseBackupPower()
if("bolts")
if(src.isWireCut(AIRLOCK_WIRE_DOOR_BOLTS))
- usr << "The door bolt control wire has been cut - Door bolts permanently dropped."
+ usr << "The door bolt control wire is cut - Door bolts permanently dropped."
else if(activate && src.lock())
usr << "The door bolts have been dropped."
else if(!activate && src.unlock())
@@ -671,13 +704,7 @@ About the new airlock wires panel:
else if(!activate && !density)
close()
if("safeties")
- // Safeties! We don't need no stinking safeties!
- if (src.isWireCut(AIRLOCK_WIRE_SAFETY))
- usr << text("The safety wire is cut - Cannot secure the door.")
- else if (activate && src.safe)
- safe = 0
- else if (!activate && !src.safe)
- safe = 1
+ set_safeties(!activate, 1)
if("timing")
// Door speed control
if(src.isWireCut(AIRLOCK_WIRE_SPEED))
@@ -689,7 +716,7 @@ About the new airlock wires panel:
if("lights")
// Bolt lights
if(src.isWireCut(AIRLOCK_WIRE_LIGHT))
- usr << "The bolt lights wire has been cut - The door bolt lights are permanently disabled."
+ usr << "The bolt lights wire is cut - The door bolt lights are permanently disabled."
else if (!activate && src.lights)
lights = 0
usr << "The door bolt lights have been disabled."
@@ -770,7 +797,7 @@ About the new airlock wires panel:
electronics.loc = src.loc
electronics = null
- del(src)
+ qdel(src)
return
else if(arePowerSystemsOn())
user << "\blue The airlock's motors resist your efforts to force it."
@@ -856,40 +883,68 @@ About the new airlock wires panel:
return ..()
+/atom/movable/proc/blocks_airlock()
+ return density
+
+/obj/machinery/door/blocks_airlock()
+ return 0
+
+/obj/machinery/mech_sensor/blocks_airlock()
+ return 0
+
+/mob/living/blocks_airlock()
+ return 1
+
+/atom/movable/proc/airlock_crush(var/crush_damage)
+ return 0
+
+/obj/machinery/portable_atmospherics/canister/airlock_crush(var/crush_damage)
+ . = ..()
+ health -= crush_damage
+ healthcheck()
+
+/obj/structure/closet/airlock_crush(var/crush_damage)
+ ..()
+ damage(crush_damage)
+ for(var/atom/movable/AM in src)
+ AM.airlock_crush()
+ return 1
+
+/mob/living/airlock_crush(var/crush_damage)
+ . = ..()
+ adjustBruteLoss(crush_damage)
+ SetStunned(5)
+ SetWeakened(5)
+ var/turf/T = get_turf(src)
+ T.add_blood(src)
+
+/mob/living/carbon/airlock_crush(var/crush_damage)
+ . = ..()
+ if (!(species && (species.flags & NO_PAIN)))
+ emote("scream")
+
+/mob/living/silicon/robot/airlock_crush(var/crush_damage)
+ adjustBruteLoss(crush_damage)
+ return 0
+
/obj/machinery/door/airlock/close(var/forced=0)
if(!can_close(forced))
return 0
if(safe)
for(var/turf/turf in locs)
- if(locate(/mob/living) in turf)
- if(world.time > next_beep_at)
- playsound(src.loc, 'sound/machines/buzz-two.ogg', 50, 0)
- next_beep_at = world.time + SecondsToTicks(10)
- close_door_at = world.time + 6
- return
+ for(var/atom/movable/AM in turf)
+ if(AM.blocks_airlock())
+ if(world.time > next_beep_at)
+ playsound(src.loc, 'sound/machines/buzz-two.ogg', 50, 0)
+ next_beep_at = world.time + SecondsToTicks(10)
+ close_door_at = world.time + 6
+ return
for(var/turf/turf in locs)
- for(var/mob/living/M in turf)
- if(isrobot(M))
- M.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
- else
- M.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
- M.SetStunned(5)
- M.SetWeakened(5)
- var/obj/effect/stop/S
- S = new /obj/effect/stop
- S.victim = M
- S.loc = M.loc
- spawn(20)
- del(S)
- if (iscarbon(M))
- var/mob/living/carbon/C = M
- if (!(C.species && (C.species.flags & NO_PAIN)))
- M.emote("scream")
- var/turf/location = src.loc
- if(istype(location, /turf/simulated))
- location.add_blood(M)
+ for(var/atom/movable/AM in turf)
+ if(AM.airlock_crush(DOOR_CRUSH_DAMAGE))
+ take_damage(DOOR_CRUSH_DAMAGE)
use_power(360) //360 W seems much more appropriate for an actuator moving an industrial door capable of crushing people
if(istype(src, /obj/machinery/door/airlock/glass))
@@ -928,6 +983,11 @@ About the new airlock wires panel:
update_icon()
return 1
+/obj/machinery/door/airlock/allowed(mob/M)
+ if(locked)
+ return 0
+ return ..(M)
+
/obj/machinery/door/airlock/New(var/newloc, var/obj/structure/door_assembly/assembly=null)
..()
diff --git a/code/game/machinery/doors/airlock_control.dm b/code/game/machinery/doors/airlock_control.dm
index ad9d991036..053b776736 100644
--- a/code/game/machinery/doors/airlock_control.dm
+++ b/code/game/machinery/doors/airlock_control.dm
@@ -30,7 +30,7 @@ obj/machinery/door/airlock/proc/execute_current_command()
if (!cur_command)
return
-
+
do_command(cur_command)
if (command_completed(cur_command))
cur_command = null
@@ -63,7 +63,7 @@ obj/machinery/door/airlock/proc/do_command(var/command)
lock()
sleep(2)
-
+
send_status()
obj/machinery/door/airlock/proc/command_completed(var/command)
@@ -85,7 +85,7 @@ obj/machinery/door/airlock/proc/command_completed(var/command)
if("secure_close")
return (locked && density)
-
+
return 1 //Unknown command. Just assume it's completed.
obj/machinery/door/airlock/proc/send_status(var/bumped = 0)
@@ -97,7 +97,7 @@ obj/machinery/door/airlock/proc/send_status(var/bumped = 0)
signal.data["door_status"] = density?("closed"):("open")
signal.data["lock_status"] = locked?("locked"):("unlocked")
-
+
if (bumped)
signal.data["bumped_with_access"] = 1
@@ -142,8 +142,10 @@ obj/machinery/door/airlock/New()
if(radio_controller)
set_frequency(frequency)
-
-
+obj/machinery/door/airlock/Destroy()
+ if(frequency && radio_controller)
+ radio_controller.remove_object(src,frequency)
+ ..()
obj/machinery/airlock_sensor
icon = 'icons/obj/airlock_machines.dmi'
@@ -215,6 +217,10 @@ obj/machinery/airlock_sensor/New()
if(radio_controller)
set_frequency(frequency)
+obj/machinery/airlock_sensor/Destroy()
+ if(radio_controller)
+ radio_controller.remove_object(src,frequency)
+ ..()
obj/machinery/airlock_sensor/airlock_interior
command = "cycle_interior"
@@ -283,6 +289,11 @@ obj/machinery/access_button/New()
if(radio_controller)
set_frequency(frequency)
+obj/machinery/access_button/Destroy()
+ if(radio_controller)
+ radio_controller.remove_object(src, frequency)
+ ..()
+
obj/machinery/access_button/airlock_interior
frequency = 1379
command = "cycle_interior"
diff --git a/code/game/machinery/doors/alarmlock.dm b/code/game/machinery/doors/alarmlock.dm
index 67e5c83dc3..8b6ddb5834 100644
--- a/code/game/machinery/doors/alarmlock.dm
+++ b/code/game/machinery/doors/alarmlock.dm
@@ -13,6 +13,11 @@
..()
air_connection = new
+/obj/machinery/door/airlock/alarmlock/Destroy()
+ if(radio_controller)
+ radio_controller.remove_object(src,air_frequency)
+ ..()
+
/obj/machinery/door/airlock/alarmlock/initialize()
..()
radio_controller.remove_object(src, air_frequency)
@@ -29,8 +34,6 @@
var/alert = signal.data["alert"]
var/area/our_area = get_area(src)
- if (our_area.master)
- our_area = our_area.master
if(alarm_area == our_area.name)
switch(alert)
@@ -39,4 +42,4 @@
close()
if("minor", "clear")
autoclose = 0
- open()
\ No newline at end of file
+ open()
diff --git a/code/game/machinery/doors/blast_door.dm b/code/game/machinery/doors/blast_door.dm
index 19ac77d2c7..374f0426ad 100644
--- a/code/game/machinery/doors/blast_door.dm
+++ b/code/game/machinery/doors/blast_door.dm
@@ -23,8 +23,8 @@
var/id = 1.0
dir = 1
explosion_resistance = 25
-
- //Most blast doors are infrequently toggled and sometimes used with regular doors anyways,
+
+ //Most blast doors are infrequently toggled and sometimes used with regular doors anyways,
//turning this off prevents awkward zone geometry in places like medbay lobby, for example.
block_air_zones = 0
@@ -56,7 +56,7 @@
src.density = 0
update_nearby_tiles()
src.update_icon()
- src.SetOpacity(0)
+ src.set_opacity(0)
sleep(15)
src.layer = open_layer
src.operating = 0
@@ -71,7 +71,7 @@
src.density = 1
update_nearby_tiles()
src.update_icon()
- src.SetOpacity(initial(opacity))
+ src.set_opacity(initial(opacity))
sleep(15)
src.operating = 0
diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm
index b3dc9bf978..27ce595a77 100644
--- a/code/game/machinery/doors/brigdoors.dm
+++ b/code/game/machinery/doors/brigdoors.dm
@@ -35,11 +35,11 @@
..()
spawn(20)
- for(var/obj/machinery/door/window/brigdoor/M in world)
+ for(var/obj/machinery/door/window/brigdoor/M in machines)
if (M.id == src.id)
targets += M
- for(var/obj/machinery/flasher/F in world)
+ for(var/obj/machinery/flasher/F in machines)
if(F.id == src.id)
targets += F
@@ -345,4 +345,4 @@
#undef FONT_SIZE
#undef FONT_COLOR
#undef FONT_STYLE
-#undef CHARS_PER_LINE
\ No newline at end of file
+#undef CHARS_PER_LINE
diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm
index 406ef8611e..0f3760009d 100644
--- a/code/game/machinery/doors/door.dm
+++ b/code/game/machinery/doors/door.dm
@@ -68,8 +68,7 @@
update_nearby_tiles(need_rebuild=1)
return
-
-/obj/machinery/door/Del()
+/obj/machinery/door/Destroy()
density = 0
update_nearby_tiles()
..()
@@ -103,8 +102,8 @@
bumpopen(M)
return
- if(istype(AM, /obj/machinery/bot))
- var/obj/machinery/bot/bot = AM
+ if(istype(AM, /mob/living/bot))
+ var/mob/living/bot/bot = AM
if(src.check_access(bot.botcard))
if(density)
open()
@@ -165,10 +164,10 @@
switch (Proj.damage_type)
if(BRUTE)
new /obj/item/stack/sheet/metal(src.loc, 2)
- new /obj/item/stack/rods(src.loc, 3)
+ PoolOrNew(/obj/item/stack/rods, list(src.loc, 3))
if(BURN)
new /obj/effect/decal/cleanable/ash(src.loc) // Turn it to ashes!
- del(src)
+ qdel(src)
if(Proj.damage)
//cap projectile damage so that there's still a minimum number of hits required to break the door
@@ -251,7 +250,7 @@
user << "You finish repairing the damage to \the [src]."
health = between(health, health + repairing.amount*DOOR_REPAIR_AMOUNT, maxhealth)
update_icon()
- del(repairing)
+ qdel(repairing)
return
if(repairing && istype(I, /obj/item/weapon/crowbar))
@@ -309,7 +308,7 @@
/obj/machinery/door/examine(mob/user)
- ..()
+ . = ..()
if(src.health < src.maxhealth / 4)
user << "\The [src] looks like it's about to break!"
else if(src.health < src.maxhealth / 2)
@@ -329,7 +328,7 @@
/obj/machinery/door/blob_act()
if(prob(40))
- del(src)
+ qdel(src)
return
@@ -342,10 +341,10 @@
/obj/machinery/door/ex_act(severity)
switch(severity)
if(1.0)
- del(src)
+ qdel(src)
if(2.0)
if(prob(25))
- del(src)
+ qdel(src)
else
take_damage(300)
if(3.0)
@@ -389,21 +388,22 @@
/obj/machinery/door/proc/open(var/forced = 0)
- if(!can_open(forced)) return
+ if(!can_open(forced))
+ return
+ operating = 1
do_animate("opening")
icon_state = "door0"
- src.SetOpacity(0)
+ set_opacity(0)
sleep(3)
src.density = 0
sleep(7)
src.layer = open_layer
explosion_resistance = 0
update_icon()
- SetOpacity(0)
+ set_opacity(0)
update_nearby_tiles()
-
- if(operating) operating = 0
+ operating = 0
if(autoclose)
close_door_at = next_close_time()
@@ -427,14 +427,14 @@
sleep(7)
update_icon()
if(visible && !glass)
- SetOpacity(1) //caaaaarn!
+ set_opacity(1) //caaaaarn!
operating = 0
update_nearby_tiles()
//I shall not add a check every x ticks if a door has closed over some fire.
var/obj/fire/fire = locate() in loc
if(fire)
- del fire
+ qdel(fire)
return
/obj/machinery/door/proc/requiresID()
diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm
index 9ae8751a7a..a3fca76a44 100644
--- a/code/game/machinery/doors/firedoor.dm
+++ b/code/game/machinery/doors/firedoor.dm
@@ -56,7 +56,7 @@
for(var/obj/machinery/door/firedoor/F in loc)
if(F != src)
spawn(1)
- del src
+ qdel(src)
return .
var/area/A = get_area(src)
ASSERT(istype(A))
@@ -70,14 +70,15 @@
A.all_doors.Add(src)
areas_added += A
-/obj/machinery/door/firedoor/Del()
+/obj/machinery/door/firedoor/Destroy()
for(var/area/A in areas_added)
A.all_doors.Remove(src)
. = ..()
/obj/machinery/door/firedoor/examine(mob/user)
- if(!..(user, 1) && !isAI(user))
+ . = ..(user, 1)
+ if(!. || !density)
return
if(pdiff >= FIREDOOR_MAX_PRESSURE_DIFF)
@@ -230,7 +231,7 @@
FA.density = 1
FA.wired = 1
FA.update_icon()
- del(src)
+ qdel(src)
return
if(blocked)
diff --git a/code/game/machinery/doors/firedoor_assembly.dm b/code/game/machinery/doors/firedoor_assembly.dm
index 435a927857..d3a70fe85e 100644
--- a/code/game/machinery/doors/firedoor_assembly.dm
+++ b/code/game/machinery/doors/firedoor_assembly.dm
@@ -42,8 +42,8 @@ obj/structure/firedoor_assembly/attackby(C as obj, mob/user as mob)
user.visible_message("[user] has inserted a circuit into \the [src]!",
"You have inserted the circuit into \the [src]!")
new /obj/machinery/door/firedoor(src.loc)
- del(C)
- del(src)
+ qdel(C)
+ qdel(src)
else
user << "You must secure \the [src] first!"
else if(istype(C, /obj/item/weapon/wrench))
@@ -62,7 +62,7 @@ obj/structure/firedoor_assembly/attackby(C as obj, mob/user as mob)
user.visible_message("[user] has dissassembled \the [src].",
"You have dissassembled \the [src].")
new /obj/item/stack/sheet/metal(src.loc, 2)
- del (src)
+ qdel(src)
else
user << "You need more welding fuel."
else
diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm
index 362753cac8..b91270ad60 100644
--- a/code/game/machinery/doors/windowdoor.dm
+++ b/code/game/machinery/doors/windowdoor.dm
@@ -49,16 +49,16 @@
playsound(src, "shatter", 70, 1)
if(display_message)
visible_message("[src] shatters!")
- del(src)
+ qdel(src)
-/obj/machinery/door/window/Del()
+/obj/machinery/door/window/Destroy()
density = 0
update_nearby_tiles()
..()
/obj/machinery/door/window/Bumped(atom/movable/AM as mob|obj)
if (!( ismob(AM) ))
- var/obj/machinery/bot/bot = AM
+ var/mob/living/bot/bot = AM
if(istype(bot))
if(density && src.check_access(bot.botcard))
open()
diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm
index dbe7f1b8a7..ec9f4e7acc 100644
--- a/code/game/machinery/doppler_array.dm
+++ b/code/game/machinery/doppler_array.dm
@@ -9,7 +9,7 @@ var/list/doppler_arrays = list()
..()
doppler_arrays += src
-/obj/machinery/doppler_array/Del()
+/obj/machinery/doppler_array/Destroy()
doppler_arrays -= src
..()
diff --git a/code/game/machinery/embedded_controller/embedded_controller_base.dm b/code/game/machinery/embedded_controller/embedded_controller_base.dm
index 8661651a39..a128e6c4e4 100644
--- a/code/game/machinery/embedded_controller/embedded_controller_base.dm
+++ b/code/game/machinery/embedded_controller/embedded_controller_base.dm
@@ -9,6 +9,11 @@
var/on = 1
+obj/machinery/embedded_controller/radio/Destroy()
+ if(radio_controller)
+ radio_controller.remove_object(src,frequency)
+ ..()
+
/obj/machinery/embedded_controller/proc/post_signal(datum/signal/signal, comm_line)
return 0
@@ -70,7 +75,7 @@
//use_power(radio_power_use) //neat idea, but causes way too much lag.
return radio_connection.post_signal(src, signal, filter)
else
- del(signal)
+ qdel(signal)
/obj/machinery/embedded_controller/radio/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
diff --git a/code/game/machinery/embedded_controller/embedded_program_base.dm b/code/game/machinery/embedded_controller/embedded_program_base.dm
index 611fcfc52e..f579aca6f7 100644
--- a/code/game/machinery/embedded_controller/embedded_program_base.dm
+++ b/code/game/machinery/embedded_controller/embedded_program_base.dm
@@ -1,27 +1,27 @@
-
-/datum/computer/file/embedded_program
- var/list/memory = list()
- var/obj/machinery/embedded_controller/master
-
- var/id_tag
-
-/datum/computer/file/embedded_program/New(var/obj/machinery/embedded_controller/M)
- master = M
- if (istype(M, /obj/machinery/embedded_controller/radio))
- var/obj/machinery/embedded_controller/radio/R = M
- id_tag = R.id_tag
-
-/datum/computer/file/embedded_program/proc/receive_user_command(command)
- return
-
-/datum/computer/file/embedded_program/proc/receive_signal(datum/signal/signal, receive_method, receive_param)
- return
-
-/datum/computer/file/embedded_program/proc/process()
- return
-
-/datum/computer/file/embedded_program/proc/post_signal(datum/signal/signal, comm_line)
- if(master)
- master.post_signal(signal, comm_line)
- else
- del(signal)
+
+/datum/computer/file/embedded_program
+ var/list/memory = list()
+ var/obj/machinery/embedded_controller/master
+
+ var/id_tag
+
+/datum/computer/file/embedded_program/New(var/obj/machinery/embedded_controller/M)
+ master = M
+ if (istype(M, /obj/machinery/embedded_controller/radio))
+ var/obj/machinery/embedded_controller/radio/R = M
+ id_tag = R.id_tag
+
+/datum/computer/file/embedded_program/proc/receive_user_command(command)
+ return
+
+/datum/computer/file/embedded_program/proc/receive_signal(datum/signal/signal, receive_method, receive_param)
+ return
+
+/datum/computer/file/embedded_program/proc/process()
+ return
+
+/datum/computer/file/embedded_program/proc/post_signal(datum/signal/signal, comm_line)
+ if(master)
+ master.post_signal(signal, comm_line)
+ else
+ qdel(signal)
diff --git a/code/game/machinery/floodlight.dm b/code/game/machinery/floodlight.dm
index d71b060bb0..b7272dc829 100644
--- a/code/game/machinery/floodlight.dm
+++ b/code/game/machinery/floodlight.dm
@@ -26,7 +26,7 @@
else
on = 0
updateicon()
- SetLuminosity(0)
+ set_light(0)
src.visible_message("[src] shuts down due to lack of power!")
return
@@ -50,7 +50,7 @@
if(on)
on = 0
user << "\blue You turn off the light"
- SetLuminosity(0)
+ set_light(0)
else
if(!cell)
return
@@ -58,7 +58,7 @@
return
on = 1
user << "\blue You turn on the light"
- SetLuminosity(brightness_on)
+ set_light(brightness_on)
updateicon()
diff --git a/code/game/machinery/floorlayer.dm b/code/game/machinery/floorlayer.dm
new file mode 100644
index 0000000000..009d1c7694
--- /dev/null
+++ b/code/game/machinery/floorlayer.dm
@@ -0,0 +1,114 @@
+/obj/machinery/floorlayer
+
+ name = "automatic floor layer"
+ icon = 'icons/obj/stationobjs.dmi'
+ icon_state = "pipe_d"
+ density = 1
+ var/turf/old_turf
+ var/on = 0
+ var/obj/item/stack/tile/T
+ var/list/mode = list("dismantle"=0,"laying"=0,"collect"=0)
+
+/obj/machinery/floorlayer/New()
+ T = new/obj/item/stack/tile/plasteel(src)
+ ..()
+
+/obj/machinery/floorlayer/Move(new_turf,M_Dir)
+ ..()
+
+ if(on)
+ if(mode["dismantle"])
+ dismantleFloor(old_turf)
+
+ if(mode["laying"])
+ layFloor(old_turf)
+
+ if(mode["collect"])
+ CollectTiles(old_turf)
+
+
+ old_turf = new_turf
+
+/obj/machinery/floorlayer/attack_hand(mob/user as mob)
+ on=!on
+ user.visible_message("[user] has [!on?"de":""]activated \the [src].", "You [!on?"de":""]activate \the [src].")
+ return
+
+/obj/machinery/floorlayer/attackby(var/obj/item/W as obj, var/mob/user as mob)
+
+ if (istype(W, /obj/item/weapon/wrench))
+ var/m = input("Choose work mode", "Mode") as null|anything in mode
+ mode[m] = !mode[m]
+ var/O = mode[m]
+ user.visible_message("[usr] has set \the [src] [m] mode [!O?"off":"on"].", "You set \the [src] [m] mode [!O?"off":"on"].")
+ return
+
+ if(istype(W, /obj/item/stack/tile))
+ user << "\The [W] successfully loaded."
+ user.drop_item(T)
+ TakeTile(T)
+ return
+
+ if(istype(W, /obj/item/weapon/crowbar))
+ if(!length(contents))
+ user << "\The [src] is empty."
+ else
+ var/obj/item/stack/tile/E = input("Choose remove tile type.", "Tiles") as null|anything in contents
+ if(E)
+ user << "You remove the [E] from /the [src]."
+ E.loc = src.loc
+ T = null
+ return
+
+ if(istype(W, /obj/item/weapon/screwdriver))
+ T = input("Choose tile type.", "Tiles") as null|anything in contents
+ return
+ ..()
+
+/obj/machinery/floorlayer/examine(mob/user)
+ ..()
+ var/dismantle = mode["dismantle"]
+ var/laying = mode["laying"]
+ var/collect = mode["collect"]
+ user << "\The [src] [!T?"don't ":""]has [!T?"":"[T.get_amount()] [T] "]tile\s, dismantle is [dismantle?"on":"off"], laying is [laying?"on":"off"], collect is [collect?"on":"off"]."
+
+/obj/machinery/floorlayer/proc/reset()
+ on=0
+ return
+
+/obj/machinery/floorlayer/proc/dismantleFloor(var/turf/new_turf)
+ if(istype(new_turf, /turf/simulated/floor))
+ var/turf/simulated/floor/T = new_turf
+ if(!T.is_plating())
+ if(!T.broken && !T.burnt)
+ new T.floor_type(T)
+ T.make_plating()
+ return !new_turf.intact
+
+/obj/machinery/floorlayer/proc/TakeNewStack()
+ for(var/obj/item/stack/tile/tile in contents)
+ T = tile
+ return 1
+ return 0
+
+/obj/machinery/floorlayer/proc/SortStacks()
+ for(var/obj/item/stack/tile/tile1 in contents)
+ for(var/obj/item/stack/tile/tile2 in contents)
+ tile2.transfer_to(tile1)
+
+/obj/machinery/floorlayer/proc/layFloor(var/turf/w_turf)
+ if(!T)
+ if(!TakeNewStack())
+ return 0
+ w_turf.attackby(T , src)
+ return 1
+
+/obj/machinery/floorlayer/proc/TakeTile(var/obj/item/stack/tile/tile)
+ if(!T) T = tile
+ tile.loc = src
+
+ SortStacks()
+
+/obj/machinery/floorlayer/proc/CollectTiles(var/turf/w_turf)
+ for(var/obj/item/stack/tile/tile in w_turf)
+ TakeTile(tile)
diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm
index a286b530ca..28bb2be7bc 100644
--- a/code/game/machinery/hologram.dm
+++ b/code/game/machinery/hologram.dm
@@ -37,7 +37,7 @@ var/const/HOLOPAD_MODE = RANGE_BASED
icon_state = "holopad0"
layer = TURF_LAYER+0.1 //Preventing mice and drones from sneaking under them.
-
+
var/power_per_hologram = 500 //per usage per hologram
idle_power_usage = 5
use_power = 1
@@ -120,10 +120,10 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
hologram.layer = FLY_LAYER//Above all the other objects/mobs. Or the vast majority of them.
hologram.anchored = 1//So space wind cannot drag it.
hologram.name = "[A.name] (Hologram)"//If someone decides to right click.
- hologram.SetLuminosity(2) //hologram lighting
+ hologram.set_light(2) //hologram lighting
hologram.color = color //painted holopad gives coloured holograms
masters[A] = hologram
- SetLuminosity(2) //pad lighting
+ set_light(2) //pad lighting
icon_state = "holopad1"
A.holo = src
return 1
@@ -131,10 +131,10 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
/obj/machinery/hologram/holopad/proc/clear_holo(mob/living/silicon/ai/user)
if(user.holo == src)
user.holo = null
- del(masters[user])//Get rid of user's hologram //qdel
+ qdel(masters[user])//Get rid of user's hologram
masters -= user //Discard AI from the list of those who use holopad
if (!masters.len)//If no users left
- SetLuminosity(0) //pad lighting (hologram lighting will be handled automatically since its owner was deleted)
+ set_light(0) //pad lighting (hologram lighting will be handled automatically since its owner was deleted)
icon_state = "holopad0"
return 1
@@ -144,16 +144,15 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
if((stat & NOPOWER) || !active_ai)
clear_holo(master)
continue
-
+
if((HOLOPAD_MODE == RANGE_BASED && (get_dist(master.eyeobj, src) > holo_range)))
clear_holo(master)
continue
-
+
if(HOLOPAD_MODE == AREA_BASED)
var/area/holo_area = get_area(src)
var/area/eye_area = get_area(master.eyeobj)
-
- if(!(eye_area in holo_area.master.related))
+ if(eye_area != holo_area)
clear_holo(master)
continue
@@ -182,24 +181,24 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
/obj/machinery/hologram/ex_act(severity)
switch(severity)
if(1.0)
- del(src)
+ qdel(src)
if(2.0)
if (prob(50))
- del(src)
+ qdel(src)
if(3.0)
if (prob(5))
- del(src)
+ qdel(src)
return
/obj/machinery/hologram/blob_act()
- del(src)
+ qdel(src)
return
/obj/machinery/hologram/meteorhit()
- del(src)
+ qdel(src)
return
-/obj/machinery/hologram/holopad/Del()
+/obj/machinery/hologram/holopad/Destroy()
for (var/mob/living/silicon/ai/master in masters)
clear_holo(master)
..()
diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm
index 63ad92f017..658686d953 100644
--- a/code/game/machinery/iv_drip.dm
+++ b/code/game/machinery/iv_drip.dm
@@ -32,7 +32,7 @@
if(80 to 90) filling.icon_state = "reagent80"
if(91 to INFINITY) filling.icon_state = "reagent100"
- filling.icon += mix_color_from_reagents(reagents.reagent_list)
+ filling.icon += reagents.get_color()
overlays += filling
/obj/machinery/iv_drip/MouseDrop(over_object, src_location, over_location)
diff --git a/code/game/machinery/jukebox.dm b/code/game/machinery/jukebox.dm
index 972f51bd48..90305a7a78 100644
--- a/code/game/machinery/jukebox.dm
+++ b/code/game/machinery/jukebox.dm
@@ -36,7 +36,7 @@ datum/track/New(var/title_name, var/audio)
)
-/obj/machinery/media/jukebox/Del()
+/obj/machinery/media/jukebox/Destroy()
StopPlaying()
..()
@@ -160,7 +160,7 @@ datum/track/New(var/title_name, var/audio)
s.start()
new /obj/effect/decal/cleanable/blood/oil(src.loc)
- del(src)
+ qdel(src)
/obj/machinery/media/jukebox/attackby(obj/item/W as obj, mob/user as mob)
src.add_fingerprint(user)
@@ -188,11 +188,10 @@ datum/track/New(var/title_name, var/audio)
/obj/machinery/media/jukebox/proc/StopPlaying()
var/area/main_area = get_area(src)
// Always kill the current sound
- for(var/area/related_area in main_area.related)
- for(var/mob/living/M in mobs_in_area(related_area))
- M << sound(null, channel = 1)
+ for(var/mob/living/M in mobs_in_area(main_area))
+ M << sound(null, channel = 1)
- related_area.forced_ambience = null
+ main_area.forced_ambience = null
playing = 0
update_use_power(1)
update_icon()
@@ -204,12 +203,10 @@ datum/track/New(var/title_name, var/audio)
return
var/area/main_area = get_area(src)
- for(var/area/related_area in main_area.related)
- related_area.forced_ambience = sound(current_track.sound, channel = 1, repeat = 1, volume = 25)
-
- for(var/mob/living/M in mobs_in_area(related_area))
- if(M.mind)
- related_area.play_ambience(related_area)
+ main_area.forced_ambience = list(current_track.sound)
+ for(var/mob/living/M in mobs_in_area(main_area))
+ if(M.mind)
+ main_area.play_ambience(M)
playing = 1
update_use_power(2)
diff --git a/code/game/machinery/kitchen/gibber.dm b/code/game/machinery/kitchen/gibber.dm
index 1283e7e52c..69f6c1a2d5 100644
--- a/code/game/machinery/kitchen/gibber.dm
+++ b/code/game/machinery/kitchen/gibber.dm
@@ -31,7 +31,7 @@
if(isturf(input_obj.loc))
input_plate = input_obj.loc
gib_throw_dir = i
- del(input_obj)
+ qdel(input_obj)
break
if(!input_plate)
@@ -221,7 +221,7 @@
src.operating = 0
src.occupant.gib()
- del(src.occupant)
+ qdel(src.occupant)
playsound(src.loc, 'sound/effects/splat.ogg', 50, 1)
operating = 0
@@ -229,7 +229,7 @@
// Todo: unify limbs and internal organs
// There's a chance that the gibber will fail to destroy some evidence.
if((istype(thing,/obj/item/organ) || istype(thing,/obj/item/organ)) && prob(80))
- del(thing)
+ qdel(thing)
continue
thing.loc = get_turf(thing) // Drop it onto the turf for throwing.
thing.throw_at(get_edge_target_turf(src,gib_throw_dir),rand(0,3),emagged ? 100 : 50) // Being pelted with bits of meat and bone would hurt.
diff --git a/code/game/machinery/kitchen/microwave.dm b/code/game/machinery/kitchen/microwave.dm
index fe75dff633..23efb8ab4c 100644
--- a/code/game/machinery/kitchen/microwave.dm
+++ b/code/game/machinery/kitchen/microwave.dm
@@ -111,6 +111,7 @@
user.visible_message( \
"\blue [user] has added one of [O] to \the [src].", \
"\blue You add one of [O] to \the [src].")
+ return
else
// user.remove_from_mob(O) //This just causes problems so far as I can tell. -Pete
user.drop_item()
@@ -118,6 +119,7 @@
user.visible_message( \
"\blue [user] has added \the [O] to \the [src].", \
"\blue You add \the [O] to \the [src].")
+ return
else if(istype(O,/obj/item/weapon/reagent_containers/glass) || \
istype(O,/obj/item/weapon/reagent_containers/food/drinks) || \
istype(O,/obj/item/weapon/reagent_containers/food/condiment) \
@@ -351,7 +353,7 @@
var/id = O.reagents.get_master_reagent_id()
if (id)
amount+=O.reagents.get_reagent_amount(id)
- del(O)
+ qdel(O)
src.reagents.clear_reagents()
ffuu.reagents.add_reagent("carbon", amount)
ffuu.reagents.add_reagent("toxin", amount/10)
diff --git a/code/game/machinery/kitchen/smartfridge.dm b/code/game/machinery/kitchen/smartfridge.dm
index a6fcf00274..9bfa0e1c5d 100644
--- a/code/game/machinery/kitchen/smartfridge.dm
+++ b/code/game/machinery/kitchen/smartfridge.dm
@@ -33,8 +33,8 @@
else
wires = new/datum/wires/smartfridge(src)
-/obj/machinery/smartfridge/Del()
- del(wires) // qdel
+/obj/machinery/smartfridge/Destroy()
+ qdel(wires)
..()
/obj/machinery/smartfridge/proc/accept_check(var/obj/item/O as obj)
@@ -146,7 +146,7 @@
var/D = S.dried_type
new D(loc)
item_quants[S.name]--
- del(S)
+ qdel(S)
return
return
diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm
index dcf66a12b7..ded7ebc9b9 100644
--- a/code/game/machinery/lightswitch.dm
+++ b/code/game/machinery/lightswitch.dm
@@ -42,15 +42,14 @@
on = !on
- for(var/area/A in area.master.related)
- A.lightswitch = on
- A.updateicon()
+ area.lightswitch = on
+ area.updateicon()
- for(var/obj/machinery/light_switch/L in A)
- L.on = on
- L.updateicon()
+ for(var/obj/machinery/light_switch/L in area)
+ L.on = on
+ L.updateicon()
- area.master.power_change()
+ area.power_change()
/obj/machinery/light_switch/power_change()
diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm
index d601146c18..d9b579ab03 100644
--- a/code/game/machinery/machinery.dm
+++ b/code/game/machinery/machinery.dm
@@ -49,7 +49,7 @@ Class Variables:
Class Procs:
New() 'game/machinery/machine.dm'
- Del() 'game/machinery/machine.dm'
+ Destroy() 'game/machinery/machine.dm'
auto_use_power() 'game/machinery/machine.dm'
This proc determines how power mode power is deducted by the machine.
@@ -121,7 +121,7 @@ Class Procs:
machines += src
machinery_sort_required = 1
-/obj/machinery/Del()
+/obj/machinery/Destroy()
machines -= src
..()
@@ -135,7 +135,7 @@ Class Procs:
if(use_power && stat == 0)
use_power(7500/severity)
- var/obj/effect/overlay/pulse2 = new/obj/effect/overlay ( src.loc )
+ var/obj/effect/overlay/pulse2 = PoolOrNew(/obj/effect/overlay, src.loc)
pulse2.icon = 'icons/effects/effects.dmi'
pulse2.icon_state = "empdisable"
pulse2.name = "emp sparks"
@@ -143,28 +143,28 @@ Class Procs:
pulse2.set_dir(pick(cardinal))
spawn(10)
- pulse2.delete()
+ qdel(pulse2)
..()
/obj/machinery/ex_act(severity)
switch(severity)
if(1.0)
- del(src)
+ qdel(src)
return
if(2.0)
if (prob(50))
- del(src)
+ qdel(src)
return
if(3.0)
if (prob(25))
- del(src)
+ qdel(src)
return
else
return
/obj/machinery/blob_act()
if(prob(50))
- del(src)
+ qdel(src)
//sets the use_power var and then forces an area power update
/obj/machinery/proc/update_use_power(var/new_use_power, var/force_update = 0)
@@ -264,8 +264,8 @@ Class Procs:
s.start()
if (electrocute_mob(user, get_area(src), src, 0.7))
var/area/temp_area = get_area(src)
- if(temp_area && temp_area.master)
- var/obj/machinery/power/apc/temp_apc = temp_area.master.get_apc()
+ if(temp_area)
+ var/obj/machinery/power/apc/temp_apc = temp_area.get_apc()
if(temp_apc && temp_apc.terminal && temp_apc.terminal.powernet)
temp_apc.terminal.powernet.trigger_warning()
@@ -331,53 +331,5 @@ Class Procs:
if(I.reliability != 100 && crit_fail)
I.crit_fail = 1
I.loc = loc
- del(src)
+ qdel(src)
return 1
-
-/obj/machinery/proc/on_assess_perp(mob/living/carbon/human/perp)
- return 0
-
-/obj/machinery/proc/is_assess_emagged()
- return emagged
-
-/obj/machinery/proc/assess_perp(mob/living/carbon/human/perp, var/auth_weapons, var/check_records, var/check_arrest)
- var/threatcount = 0 //the integer returned
-
- if(is_assess_emagged())
- return 10 //if emagged, always return 10.
-
- threatcount += on_assess_perp(perp)
- if(threatcount >= 10)
- return threatcount
-
- //Agent cards lower threatlevel.
- var/obj/item/weapon/card/id/id = GetIdCard(perp)
- if(id && istype(id, /obj/item/weapon/card/id/syndicate))
- threatcount -= 2
-
- if(auth_weapons && !src.allowed(perp))
- if(istype(perp.l_hand, /obj/item/weapon/gun) || istype(perp.l_hand, /obj/item/weapon/melee))
- threatcount += 4
-
- if(istype(perp.r_hand, /obj/item/weapon/gun) || istype(perp.r_hand, /obj/item/weapon/melee))
- threatcount += 4
-
- if(istype(perp.belt, /obj/item/weapon/gun) || istype(perp.belt, /obj/item/weapon/melee))
- threatcount += 2
-
- if(perp.species.name != "Human") //beepsky so racist.
- threatcount += 2
-
- if(check_records || check_arrest)
- var/perpname = perp.name
- if(id)
- perpname = id.registered_name
-
- var/datum/data/record/R = find_security_record("name", perpname)
- if(check_records && !R)
- threatcount += 4
-
- if(check_arrest && R && (R.fields["criminal"] == "*Arrest*"))
- threatcount += 4
-
- return threatcount
diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm
index b04e9d1851..501d7a0b75 100644
--- a/code/game/machinery/magnet.dm
+++ b/code/game/machinery/magnet.dm
@@ -164,7 +164,7 @@
if(prob(electricity_level))
explosion(loc, 0, 1, 2, 3) // ooo dat shit EXPLODES son
spawn(2)
- del(src)
+ qdel(src)
*/
updateicon()
@@ -190,8 +190,10 @@
pulling = 0
-
-
+/obj/machinery/magnetic_module/Destroy()
+ if(radio_controller)
+ radio_controller.remove_object(src, freq)
+ ..()
/obj/machinery/magnetic_controller
name = "Magnetic Control Console"
@@ -364,7 +366,7 @@
// N, S, E, W are directional
// C is center
// R is random (in magnetic field's bounds)
- del(signal)
+ qdel(signal)
break // break the loop if the character located is invalid
signal.data["command"] = nextmove
@@ -399,25 +401,7 @@
// there doesn't HAVE to be separators but it makes paths syntatically visible
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+/obj/machinery/magnetic_controller/Destroy()
+ if(radio_controller)
+ radio_controller.remove_object(src, frequency)
+ ..()
diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm
index de2a13aab5..d7224f2212 100644
--- a/code/game/machinery/navbeacon.dm
+++ b/code/game/machinery/navbeacon.dm
@@ -240,6 +240,7 @@ Transponder Codes:"}
updateDialog()
-
-
-
+/obj/machinery/navbeacon/Destroy()
+ if(radio_controller)
+ radio_controller.remove_object(src, freq)
+ ..()
diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm
index c902bdcd66..ff974fbe19 100644
--- a/code/game/machinery/newscaster.dm
+++ b/code/game/machinery/newscaster.dm
@@ -164,7 +164,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
var/c_locked=0; //Will our new channel be locked to public submissions?
var/hitstaken = 0 //Death at 3 hits from an item with force>=15
var/datum/feed_channel/viewing_channel = null
- luminosity = 0
+ light_range = 0
anchored = 1
@@ -180,7 +180,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
src.update_icon() //for any custom ones on the map...
..() //I just realised the newscasters weren't in the global machines list. The superconstructor call will tend to that
-/obj/machinery/newscaster/Del()
+/obj/machinery/newscaster/Destroy()
allCasters -= src
..()
@@ -223,12 +223,12 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
/obj/machinery/newscaster/ex_act(severity)
switch(severity)
if(1.0)
- del(src)
+ qdel(src)
return
if(2.0)
src.isbroken=1
if(prob(50))
- del(src)
+ qdel(src)
else
src.update_icon() //can't place it above the return and outside the if-else. or we might get runtimes of null.update_icon() if(prob(50)) goes in.
return
@@ -784,7 +784,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
photo_data.photo.loc = src.loc
if(!issilicon(user))
user.put_in_inactive_hand(photo_data.photo)
- del(photo_data)
+ qdel(photo_data)
if(istype(user.get_active_hand(), /obj/item/weapon/photo))
var/obj/item/photo = user.get_active_hand()
diff --git a/code/game/machinery/nuclear_bomb.dm b/code/game/machinery/nuclear_bomb.dm
index d13f18c3e9..2fb1c721d3 100644
--- a/code/game/machinery/nuclear_bomb.dm
+++ b/code/game/machinery/nuclear_bomb.dm
@@ -423,7 +423,7 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
return
return
-/obj/item/weapon/disk/nuclear/Del()
+/obj/item/weapon/disk/nuclear/Destroy()
if(blobstart.len > 0)
var/obj/D = new /obj/item/weapon/disk/nuclear(pick(blobstart))
message_admins("[src] has been destroyed. Spawning [D] at ([D.x], [D.y], [D.z]).")
diff --git a/code/game/machinery/overview.dm b/code/game/machinery/overview.dm
index de67e7cea1..cb80bd20af 100644
--- a/code/game/machinery/overview.dm
+++ b/code/game/machinery/overview.dm
@@ -180,8 +180,8 @@
HI.Insert(I, frame=1, delay = 5)
HI.Insert(J, frame=2, delay = 5)
- del(I)
- del(J)
+ qdel(I)
+ qdel(J)
H.icon = HI
H.layer = 25
usr.mapobjs += H
@@ -306,7 +306,7 @@
var/icon/I = imap[i+1]
H.icon = I
- del(I)
+ qdel(I)
H.layer = 25
usr.mapobjs += H
@@ -353,7 +353,7 @@ proc/getb(col)
/mob/proc/clearmap()
src.client.screen -= src.mapobjs
for(var/obj/screen/O in mapobjs)
- del(O)
+ qdel(O)
mapobjs = null
src.unset_machine()
diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm
index 637bcbee11..9bee0af72f 100644
--- a/code/game/machinery/pipe/construction.dm
+++ b/code/game/machinery/pipe/construction.dm
@@ -1149,7 +1149,7 @@ Buildable meters
"[user] fastens the [src].", \
"\blue You have fastened the [src].", \
"You hear ratchet.")
- del(src) // remove the pipe item
+ qdel(src) // remove the pipe item
return
//TODO: DEFERRED
@@ -1177,7 +1177,7 @@ Buildable meters
new/obj/machinery/meter( src.loc )
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "\blue You have fastened the meter to the pipe"
- del(src)
+ qdel(src)
//not sure why these are necessary
#undef PIPE_SIMPLE_STRAIGHT
#undef PIPE_SIMPLE_BENT
diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm
index fb296d2409..6b8793eac7 100644
--- a/code/game/machinery/pipe/pipe_dispenser.dm
+++ b/code/game/machinery/pipe/pipe_dispenser.dm
@@ -103,7 +103,7 @@
if (istype(W, /obj/item/pipe) || istype(W, /obj/item/pipe_meter))
usr << "\blue You put [W] back to [src]."
user.drop_item()
- del(W)
+ qdel(W)
return
else if (istype(W, /obj/item/weapon/wrench))
if (unwrenched==0)
@@ -145,7 +145,7 @@
//Allow you to push disposal pipes into it (for those with density 1)
/obj/machinery/pipedispenser/disposal/Crossed(var/obj/structure/disposalconstruct/pipe as obj)
if(istype(pipe) && !pipe.anchored)
- del(pipe)
+ qdel(pipe)
Nah
*/
@@ -161,7 +161,7 @@ Nah
if (pipe.anchored)
return
- del(pipe)
+ qdel(pipe)
/obj/machinery/pipedispenser/disposal/attack_hand(user as mob)
if(..())
diff --git a/code/game/machinery/pipe/pipelayer.dm b/code/game/machinery/pipe/pipelayer.dm
new file mode 100644
index 0000000000..32aafb21cd
--- /dev/null
+++ b/code/game/machinery/pipe/pipelayer.dm
@@ -0,0 +1,137 @@
+/obj/machinery/pipelayer
+
+ name = "automatic pipe layer"
+ icon = 'icons/obj/stationobjs.dmi'
+ icon_state = "pipe_d"
+ density = 1
+ var/turf/old_turf
+ var/old_dir
+ var/on = 0
+ var/a_dis = 0
+ var/P_type = 0
+ var/P_type_t = ""
+ var/max_metal = 50
+ var/metal = 10
+ var/obj/item/weapon/wrench/W
+ var/list/Pipes = list("regular pipes"=0,"scrubbers pipes"=31,"supply pipes"=29,"heat exchange pipes"=2)
+
+/obj/machinery/pipelayer/New()
+ W = new(src)
+ ..()
+
+/obj/machinery/pipelayer/Move(new_turf,M_Dir)
+ ..()
+
+ if(on && a_dis)
+ dismantleFloor(old_turf)
+ layPipe(old_turf,M_Dir,old_dir)
+
+ old_turf = new_turf
+ old_dir = turn(M_Dir,180)
+
+/obj/machinery/pipelayer/attack_hand(mob/user as mob)
+ if(!metal&&!on)
+ user << "\The [src] doesn't work without metal."
+ return
+ on=!on
+ user.visible_message("[user] has [!on?"de":""]activated \the [src].", "You [!on?"de":""]activate \the [src].")
+ return
+
+/obj/machinery/pipelayer/attackby(var/obj/item/W as obj, var/mob/user as mob)
+
+ if (istype(W, /obj/item/weapon/wrench))
+ P_type_t = input("Choose pipe type", "Pipe type") as null|anything in Pipes
+ P_type = Pipes[P_type_t]
+ user.visible_message("[user] has set \the [src] to manufacture [P_type_t].", "You set \the [src] to manufacture [P_type_t].")
+ return
+
+ if(istype(W, /obj/item/weapon/crowbar))
+ a_dis=!a_dis
+ user.visible_message("[user] has [!a_dis?"de":""]activated auto-dismantling.", "You [!a_dis?"de":""]activate auto-dismantling.")
+ return
+
+ if(istype(W, /obj/item/stack/sheet/metal))
+
+ var/result = load_metal(W)
+ if(isnull(result))
+ user << "Unable to load [W] - no metal found."
+ else if(!result)
+ user << "\The [src] is full."
+ else
+ user.visible_message("[user] has loaded metal into \the [src].", "You load metal into \the [src]")
+
+ return
+
+ if(istype(W, /obj/item/weapon/screwdriver))
+ if(metal)
+ var/m = round(input(usr,"Please specify the amount of metal to remove","Remove metal",min(round(metal),50)) as num, 1)
+ m = min(m, 50)
+ m = min(m, round(metal))
+ m = round(m)
+ if(m)
+ use_metal(m)
+ var/obj/item/stack/sheet/metal/MM = new (get_turf(src))
+ MM.amount = m
+ user.visible_message("[user] removes [m] sheet\s of metal from the \the [src].", "You remove [m] sheet\s of metal from \the [src]")
+ else
+ user << "\The [src] is empty."
+ return
+ ..()
+
+/obj/machinery/pipelayer/examine(mob/user)
+ ..()
+ user << "\The [src] has [metal] sheet\s, is set to produce [P_type_t], and auto-dismantling is [!a_dis?"de":""]activated."
+
+/obj/machinery/pipelayer/proc/reset()
+ on=0
+ return
+
+/obj/machinery/pipelayer/proc/load_metal(var/obj/item/stack/sheet/metal/MM)
+ if(istype(MM) && MM.get_amount())
+ var/cur_amount = metal
+ var/to_load = max(max_metal - round(cur_amount),0)
+ if(to_load)
+ to_load = min(MM.get_amount(), to_load)
+ metal += to_load
+ MM.use(to_load)
+ return to_load
+ else
+ return 0
+ return
+
+/obj/machinery/pipelayer/proc/use_metal(amount)
+ if(!metal || metal
"
- del(src) // qdel
+ qdel(src) // qdel
if(istype(I, /obj/item/weapon/card/emag) && !emagged)
//Emagging the turret makes it go bonkers and stun everyone. It also makes
@@ -317,7 +317,7 @@
user << "You unsecure the exterior bolts on the turret."
invisibility = 0
update_icon()
- del(cover) //deletes the cover, and the turret instance itself becomes its own cover. - qdel
+ qdel(cover) //deletes the cover, and the turret instance itself becomes its own cover.
wrenching = 0
else if(istype(I, /obj/item/weapon/card/id)||istype(I, /obj/item/device/pda))
@@ -387,10 +387,10 @@
/obj/machinery/porta_turret/ex_act(severity)
switch (severity)
if (1)
- del(src)
+ qdel(src)
if (2)
if (prob(25))
- del(src)
+ qdel(src)
else
take_damage(150) //should instakill most turrets
if (3)
@@ -404,7 +404,7 @@
spark_system.start() //creates some sparks because they look cool
density = 1
update_icon()
- del(cover) //deletes the cover - no need on keeping it there! - del
+ qdel(cover) //deletes the cover - no need on keeping it there!
/obj/machinery/porta_turret/proc/create_cover()
if(cover == null && anchored)
@@ -418,7 +418,7 @@
if(cover == null && anchored) //if it has no cover and is anchored
if(stat & BROKEN) //if the turret is borked
- del(cover) //delete its cover, assuming it has one. Workaround for a pesky little bug - qdel
+ qdel(cover) //delete its cover, assuming it has one. Workaround for a pesky little bug
else
create_cover()
@@ -494,7 +494,7 @@
return check_anomalies ? TURRET_PRIORITY_TARGET : TURRET_NOT_TARGET
if(ishuman(L)) //if the target is a human, analyze threat level
- if(assess_perp(L, check_weapons, check_records, check_arrest) < 4)
+ if(assess_perp(L) < 4)
return TURRET_NOT_TARGET //if threat level < 4, keep going
if(L.lying) //if the perp is lying down, it's still a target but a less-important target
@@ -502,6 +502,15 @@
return TURRET_PRIORITY_TARGET //if the perp has passed all previous tests, congrats, it is now a "shoot-me!" nominee
+/obj/machinery/porta_turret/proc/assess_perp(var/mob/living/carbon/human/H)
+ if(!H || !istype(H))
+ return 0
+
+ if(emagged)
+ return 10
+
+ return H.assess_perp(src, check_weapons, check_records, check_arrest)
+
/obj/machinery/porta_turret/proc/tryToShootAt(var/list/mob/living/targets)
if(targets.len && last_target && (last_target in targets) && target(last_target))
return 1
@@ -548,15 +557,6 @@
invisibility = INVISIBILITY_LEVEL_TWO
update_icon()
-
-/obj/machinery/porta_turret/on_assess_perp(mob/living/carbon/human/perp)
- if((check_access || attacked) && !allowed(perp))
- //if the turret has been attacked or is angry, target all non-authorized personnel, see req_access
- return 10
-
- return ..()
-
-
/obj/machinery/porta_turret/proc/target(var/mob/living/target)
if(disabled)
return
@@ -572,7 +572,7 @@
/obj/machinery/porta_turret/proc/shootAt(var/mob/living/target)
//any emagged turrets will shoot extremely fast! This not only is deadly, but drains a lot power!
- if(!emagged) //if it hasn't been emagged, it has to obey a cooldown rate
+ if(!(emagged || attacked)) //if it hasn't been emagged or attacked, it has to obey a cooldown rate
if(last_fired || !raised) //prevents rapid-fire shooting, unless it's been emagged
return
last_fired = 1
@@ -671,7 +671,7 @@
playsound(loc, 'sound/items/Crowbar.ogg', 75, 1)
user << "You dismantle the turret construction."
new /obj/item/stack/sheet/metal( loc, 5)
- del(src) // qdel
+ qdel(src) // qdel
return
if(1)
@@ -736,7 +736,7 @@
target_type = /obj/machinery/porta_turret
build_step = 4
- del(I) //delete the gun :( qdel
+ qdel(I) //delete the gun :(
return
else if(istype(I, /obj/item/weapon/wrench))
@@ -752,7 +752,7 @@
user << "\the [I] is stuck to your hand, you cannot put it in \the [src]"
return
user << "You add the prox sensor to the turret."
- del(I) // qdel
+ qdel(I)
return
//attack_hand() removes the gun
@@ -807,7 +807,7 @@
// Turret.cover=new/obj/machinery/porta_turret_cover(loc)
// Turret.cover.Parent_Turret=Turret
// Turret.cover.name = finish_name
- del(src) // qdel
+ qdel(src) // qdel
else if(istype(I, /obj/item/weapon/crowbar))
playsound(loc, 'sound/items/Crowbar.ogg', 75, 1)
diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm
index e624e61d58..23aba34169 100644
--- a/code/game/machinery/requests_console.dm
+++ b/code/game/machinery/requests_console.dm
@@ -54,7 +54,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
var/message = "";
var/dpt = ""; //the department which will be receiving the message
var/priority = -1 ; //Priority of the message being sent
- luminosity = 0
+ light_range = 0
var/datum/announcement/announcement = new
/obj/machinery/requests_console/power_change()
@@ -80,37 +80,48 @@ var/list/obj/machinery/requests_console/allConsoles = list()
//req_console_departments += department
switch(departmentType)
if(1)
- if(!("[department]" in req_console_assistance))
- req_console_assistance += department
+ req_console_assistance |= department
if(2)
- if(!("[department]" in req_console_supplies))
- req_console_supplies += department
+ req_console_supplies |= department
if(3)
- if(!("[department]" in req_console_information))
- req_console_information += department
+ req_console_information |= department
if(4)
- if(!("[department]" in req_console_assistance))
- req_console_assistance += department
- if(!("[department]" in req_console_supplies))
- req_console_supplies += department
+ req_console_assistance |= department
+ req_console_supplies |= department
if(5)
- if(!("[department]" in req_console_assistance))
- req_console_assistance += department
- if(!("[department]" in req_console_information))
- req_console_information += department
+ req_console_assistance |= department
+ req_console_information |= department
if(6)
- if(!("[department]" in req_console_supplies))
- req_console_supplies += department
- if(!("[department]" in req_console_information))
- req_console_information += department
+ req_console_supplies |= department
+ req_console_information |= department
if(7)
- if(!("[department]" in req_console_assistance))
- req_console_assistance += department
- if(!("[department]" in req_console_supplies))
- req_console_supplies += department
- if(!("[department]" in req_console_information))
- req_console_information += department
+ req_console_assistance |= department
+ req_console_supplies |= department
+ req_console_information |= department
+/obj/machinery/requests_console/Destroy()
+ allConsoles -= src
+ switch(departmentType)
+ if(1)
+ req_console_assistance -= department
+ if(2)
+ req_console_supplies -= department
+ if(3)
+ req_console_information -= department
+ if(4)
+ req_console_assistance -= department
+ req_console_supplies -= department
+ if(5)
+ req_console_assistance -= department
+ req_console_information -= department
+ if(6)
+ req_console_supplies -= department
+ req_console_information -= department
+ if(7)
+ req_console_assistance -= department
+ req_console_supplies -= department
+ req_console_information -= department
+ ..()
/obj/machinery/requests_console/attack_hand(user as mob)
if(..(user))
@@ -165,7 +176,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
if (Console.department == department)
Console.newmessagepriority = 0
Console.icon_state = "req_comp0"
- Console.luminosity = 1
+ Console.set_light(1)
newmessagepriority = 0
icon_state = "req_comp0"
for(var/msg in messages)
@@ -309,7 +320,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
Console.messages += "Message from [department]
[message]"
screen = 6
- Console.luminosity = 2
+ Console.set_light(2)
messages += "Message sent to [dpt]
[message]"
else
for (var/mob/O in hearers(4, src.loc))
diff --git a/code/game/machinery/seed_extractor.dm b/code/game/machinery/seed_extractor.dm
index 4418586e9d..e9a2081fb2 100644
--- a/code/game/machinery/seed_extractor.dm
+++ b/code/game/machinery/seed_extractor.dm
@@ -31,7 +31,7 @@ obj/machinery/seed_extractor/attackby(var/obj/item/O as obj, var/mob/user as mob
else
user << "[O] doesn't seem to have any usable seeds inside it."
- del(O)
+ qdel(O)
//Grass.
else if(istype(O, /obj/item/stack/tile/grass))
diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm
index 8d7ed7fccc..cf67c4d01f 100644
--- a/code/game/machinery/status_display.dm
+++ b/code/game/machinery/status_display.dm
@@ -45,6 +45,11 @@
var/const/STATUS_DISPLAY_TIME = 4
var/const/STATUS_DISPLAY_CUSTOM = 99
+/obj/machinery/status_display/Destroy()
+ if(radio_controller)
+ radio_controller.remove_object(src,frequency)
+ ..()
+
// register for radio system
/obj/machinery/status_display/initialize()
..()
diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm
index 940ec0f104..d45cade6c5 100644
--- a/code/game/machinery/suit_storage_unit.dm
+++ b/code/game/machinery/suit_storage_unit.dm
@@ -76,12 +76,12 @@
if(1.0)
if(prob(50))
src.dump_everything() //So suits dont survive all the time
- del(src)
+ qdel(src)
return
if(2.0)
if(prob(50))
src.dump_everything()
- del(src)
+ qdel(src)
return
else
return
@@ -465,7 +465,7 @@
src.update_icon()
// for(var/obj/O in src)
-// del(O)
+// qdel(O)
src.add_fingerprint(usr)
src.updateUsrDialog()
@@ -511,7 +511,7 @@
//for(var/obj/O in src)
// O.loc = src.loc
src.add_fingerprint(user)
- del(G)
+ qdel(G)
src.updateUsrDialog()
src.update_icon()
return
@@ -612,10 +612,10 @@
wires = new(src)
target_department = departments[1]
target_species = species[1]
- if(!target_department || !target_species) del(src)
+ if(!target_department || !target_species) qdel(src)
-/obj/machinery/suit_cycler/Del()
- del(wires) // qdel
+/obj/machinery/suit_cycler/Destroy()
+ qdel(wires)
wires = null
..()
@@ -696,7 +696,7 @@
src.occupant = M
src.add_fingerprint(user)
- del(G)
+ qdel(G)
src.updateUsrDialog()
@@ -987,7 +987,6 @@
helmet.name = "engineering voidsuit helmet"
helmet.icon_state = "rig0-engineering"
helmet.item_state = "eng_helm"
- helmet.item_color = "engineering"
if(suit)
suit.name = "engineering voidsuit"
suit.icon_state = "rig-engineering"
@@ -997,7 +996,6 @@
helmet.name = "mining voidsuit helmet"
helmet.icon_state = "rig0-mining"
helmet.item_state = "mining_helm"
- helmet.item_color = "mining"
if(suit)
suit.name = "mining voidsuit"
suit.icon_state = "rig-mining"
@@ -1007,7 +1005,6 @@
helmet.name = "medical voidsuit helmet"
helmet.icon_state = "rig0-medical"
helmet.item_state = "medical_helm"
- helmet.item_color = "medical"
if(suit)
suit.name = "medical voidsuit"
suit.icon_state = "rig-medical"
@@ -1017,7 +1014,6 @@
helmet.name = "security voidsuit helmet"
helmet.icon_state = "rig0-sec"
helmet.item_state = "sec_helm"
- helmet.item_color = "sec"
if(suit)
suit.name = "security voidsuit"
suit.icon_state = "rig-sec"
@@ -1027,7 +1023,6 @@
helmet.name = "atmospherics voidsuit helmet"
helmet.icon_state = "rig0-atmos"
helmet.item_state = "atmos_helm"
- helmet.item_color = "atmos"
if(suit)
suit.name = "atmospherics voidsuit"
suit.icon_state = "rig-atmos"
@@ -1037,7 +1032,6 @@
helmet.name = "blood-red voidsuit helmet"
helmet.icon_state = "rig0-syndie"
helmet.item_state = "syndie_helm"
- helmet.item_color = "syndie"
if(suit)
suit.name = "blood-red voidsuit"
suit.item_state = "syndie_voidsuit"
diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm
index 957f7bf536..fb4a03d21f 100644
--- a/code/game/machinery/syndicatebeacon.dm
+++ b/code/game/machinery/syndicatebeacon.dm
@@ -95,7 +95,7 @@
if(surplus() < 1500)
if(user) user << "The connected wire doesn't have enough current."
return
- for(var/obj/machinery/singularity/singulo in world)
+ for(var/obj/singularity/singulo in world)
if(singulo.z == z)
singulo.target = src
icon_state = "[icontype]1"
@@ -106,7 +106,7 @@
/obj/machinery/power/singularity_beacon/proc/Deactivate(mob/user = null)
- for(var/obj/machinery/singularity/singulo in world)
+ for(var/obj/singularity/singulo in world)
if(singulo.target == src)
singulo.target = null
icon_state = "[icontype]0"
@@ -149,7 +149,7 @@
return
-/obj/machinery/power/singularity_beacon/Del()
+/obj/machinery/power/singularity_beacon/Destroy()
if(active)
Deactivate()
..()
diff --git a/code/game/machinery/telecomms/broadcaster.dm b/code/game/machinery/telecomms/broadcaster.dm
index 5a3caafa26..c6fee28b40 100644
--- a/code/game/machinery/telecomms/broadcaster.dm
+++ b/code/game/machinery/telecomms/broadcaster.dm
@@ -98,7 +98,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
/* --- Do a snazzy animation! --- */
flick("broadcaster_send", src)
-/obj/machinery/telecomms/broadcaster/Del()
+/obj/machinery/telecomms/broadcaster/Destroy()
// In case message_delay is left on 1, otherwise it won't reset the list and people can't say the same thing twice anymore.
if(message_delay)
message_delay = 0
diff --git a/code/game/machinery/telecomms/logbrowser.dm b/code/game/machinery/telecomms/logbrowser.dm
index 6dd5586fd8..50fa8b185b 100644
--- a/code/game/machinery/telecomms/logbrowser.dm
+++ b/code/game/machinery/telecomms/logbrowser.dm
@@ -63,64 +63,37 @@
// If the log is a speech file
if(C.input_type == "Speech File")
- dat += "
"
+ dat += "
"
// -- Determine race of orator --
- var/race // The actual race of the mob
- var/language = "Human" // MMIs, pAIs, Cyborgs and humans all speak Human
- var/mobtype = C.parameters["mobtype"]
- var/mob/M = new mobtype
-
- if(ishuman(M) || isbrain(M))
- var/mob/living/carbon/human/H = M
- race = "[H.species.name]"
-
-
- else if(issmall(M))
- race = "Monkey"
- language = race
-
- else if(issilicon(M) || C.parameters["job"] == "AI") // sometimes M gets deleted prematurely for AIs... just check the job
- race = "Artificial Life"
-
- else if(isslime(M)) // NT knows a lot about slimes, but not aliens. Can identify slimes
- race = "slime"
- language = race
-
- else if(isanimal(M))
- race = "Domestic Animal"
- language = race
-
- else
- race = "Unidentifiable"
- language = race
-
- del(M)
+ var/race = C.parameters["race"] // The actual race of the mob
+ var/language = C.parameters["language"] // The language spoken, or null/""
// -- If the orator is a human, or universal translate is active, OR mob has universal speech on --
- if(language == "Human" || universal_translate || C.parameters["uspeech"])
- dat += "Data type: [C.input_type]
"
- dat += "Source: [C.parameters["name"]] (Job: [C.parameters["job"]])
"
- dat += "Class: [race]
"
- dat += "Contents: \"[C.parameters["message"]]\"
"
-
+ if(universal_translate || C.parameters["uspeech"] || C.parameters["intelligible"])
+ dat += "Data type: [C.input_type]
"
+ dat += "Source: [C.parameters["name"]] (Job: [C.parameters["job"]])
"
+ dat += "Class: [race]
"
+ dat += "Contents: \"[C.parameters["message"]]\"
"
+ if(language)
+ dat += "Language: [language]
"
// -- Orator is not human and universal translate not active --
else
- dat += "Data type: Audio File
"
- dat += "Source: Unidentifiable
"
- dat += "Class: [race]
"
- dat += "Contents: Unintelligble
"
+ dat += "Data type: Audio File
"
+ dat += "Source: Unidentifiable
"
+ dat += "Class: [race]
"
+ dat += "Contents: Unintelligble
"
dat += "
"
else if(C.input_type == "Execution Error")
- dat += "
"
- dat += "Output: \"[C.parameters["message"]]\"
"
+ dat += "
"
+ dat += "Output: \"[C.parameters["message"]]\"
"
dat += "
"
@@ -189,7 +162,7 @@
temp = "- DELETED ENTRY: [D.name] -"
SelectedServer.log_entries.Remove(D)
- del(D)
+ qdel(D)
else
temp = "- FAILED: NO SELECTED MACHINE -"
@@ -227,7 +200,7 @@
A.state = 3
A.icon_state = "3"
A.anchored = 1
- del(src)
+ qdel(src)
else
user << "\blue You disconnect the monitor."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
@@ -238,7 +211,7 @@
A.state = 4
A.icon_state = "4"
A.anchored = 1
- del(src)
+ qdel(src)
else if(istype(D, /obj/item/weapon/card/emag) && !emagged)
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
emagged = 1
diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm
index 581ae59ab4..15c627420f 100644
--- a/code/game/machinery/telecomms/machine_interactions.dm
+++ b/code/game/machinery/telecomms/machine_interactions.dm
@@ -1,404 +1,404 @@
-//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
-
-
-/*
-
- All telecommunications interactions:
-
-*/
-
-#define STATION_Z 1
-#define TELECOMM_Z 3
-
-/obj/machinery/telecomms
- var/temp = "" // output message
- var/construct_op = 0
-
-
-/obj/machinery/telecomms/attackby(obj/item/P as obj, mob/user as mob)
-
- // Using a multitool lets you access the receiver's interface
- if(istype(P, /obj/item/device/multitool))
- attack_hand(user)
-
-
- // REPAIRING: Use Nanopaste to repair 10-20 integrity points.
- if(istype(P, /obj/item/stack/nanopaste))
- var/obj/item/stack/nanopaste/T = P
- if (integrity < 100) //Damaged, let's repair!
- if (T.use(1))
- integrity = between(0, integrity + rand(10,20), 100)
- usr << "You apply the Nanopaste to [src], repairing some of the damage."
- else
- usr << "This machine is already in perfect condition."
- return
-
-
- switch(construct_op)
- if(0)
- if(istype(P, /obj/item/weapon/screwdriver))
- user << "You unfasten the bolts."
- playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
- construct_op ++
- if(1)
- if(istype(P, /obj/item/weapon/screwdriver))
- user << "You fasten the bolts."
- playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
- construct_op --
- if(istype(P, /obj/item/weapon/wrench))
- user << "You dislodge the external plating."
- playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
- construct_op ++
- if(2)
- if(istype(P, /obj/item/weapon/wrench))
- user << "You secure the external plating."
- playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
- construct_op --
- if(istype(P, /obj/item/weapon/wirecutters))
- playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
- user << "You remove the cables."
- construct_op ++
- var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( user.loc )
- A.amount = 5
- stat |= BROKEN // the machine's been borked!
- if(3)
- if(istype(P, /obj/item/stack/cable_coil))
- var/obj/item/stack/cable_coil/A = P
- if (A.use(5))
- user << "You insert the cables."
- construct_op--
- stat &= ~BROKEN // the machine's not borked anymore!
- else
- user << "You need five coils of wire for this."
- if(istype(P, /obj/item/weapon/crowbar))
- user << "You begin prying out the circuit board other components..."
- playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
- if(do_after(user,60))
- user << "You finish prying out the components."
-
- // Drop all the component stuff
- if(contents.len > 0)
- for(var/obj/x in src)
- x.loc = user.loc
- else
-
- // If the machine wasn't made during runtime, probably doesn't have components:
- // manually find the components and drop them!
- var/newpath = text2path(circuitboard)
- var/obj/item/weapon/circuitboard/C = new newpath
- for(var/I in C.req_components)
- for(var/i = 1, i <= C.req_components[I], i++)
- newpath = text2path(I)
- var/obj/item/s = new newpath
- s.loc = user.loc
- if(istype(P, /obj/item/stack/cable_coil))
- var/obj/item/stack/cable_coil/A = P
- A.amount = 1
-
- // Drop a circuit board too
- C.loc = user.loc
-
- // Create a machine frame and delete the current machine
- var/obj/machinery/constructable_frame/machine_frame/F = new
- F.loc = src.loc
- del(src)
-
-
-/obj/machinery/telecomms/attack_ai(var/mob/user as mob)
- attack_hand(user)
-
-/obj/machinery/telecomms/attack_hand(var/mob/user as mob)
-
- // You need a multitool to use this, or be silicon
- if(!issilicon(user))
- // istype returns false if the value is null
- if(!istype(user.get_active_hand(), /obj/item/device/multitool))
- return
-
- if(stat & (BROKEN|NOPOWER))
- return
-
- var/obj/item/device/multitool/P = get_multitool(user)
-
- user.set_machine(src)
- var/dat
- dat = "[src.name] Access
[temp]
"
- dat += "
Power Status: [src.toggled ? "On" : "Off"]"
- if(on && toggled)
- if(id != "" && id)
- dat += "
Identification String: [id]"
- else
- dat += "
Identification String: NULL"
- dat += "
Network: [network]"
- dat += "
Prefabrication: [autolinkers.len ? "TRUE" : "FALSE"]"
- if(hide) dat += "
Shadow Link: ACTIVE"
-
- //Show additional options for certain machines.
- dat += Options_Menu()
-
- dat += "
Linked Network Entities: "
-
- var/i = 0
- for(var/obj/machinery/telecomms/T in links)
- i++
- if(T.hide && !src.hide)
- continue
- dat += "
"
-
- dat += "
Filtering Frequencies: "
-
- i = 0
- if(length(freq_listening))
- for(var/x in freq_listening)
- i++
- if(i < length(freq_listening))
- dat += "[format_frequency(x)] GHz\[X\]; "
- else
- dat += "[format_frequency(x)] GHz\[X\]"
- else
- dat += "NONE"
-
- dat += "
\[Add Filter\]"
- dat += "
"
-
- if(P)
- if(P.buffer)
- dat += "
MULTITOOL BUFFER: [P.buffer] ([P.buffer.id]) \[Link\] \[Flush\]"
- else
- dat += "
MULTITOOL BUFFER: \[Add Machine\]"
-
- dat += ""
- temp = ""
- user << browse(dat, "window=tcommachine;size=520x500;can_resize=0")
- onclose(user, "dormitory")
-
-
-// Off-Site Relays
-//
-// You are able to send/receive signals from the station's z level (changeable in the STATION_Z #define) if
-// the relay is on the telecomm satellite (changable in the TELECOMM_Z #define)
-
-
-/obj/machinery/telecomms/relay/proc/toggle_level()
-
- var/turf/position = get_turf(src)
-
- // Toggle on/off getting signals from the station or the current Z level
- if(src.listening_level == STATION_Z) // equals the station
- src.listening_level = position.z
- return 1
- else if(position.z == TELECOMM_Z)
- src.listening_level = STATION_Z
- return 1
- return 0
-
-// Returns a multitool from a user depending on their mobtype.
-
-/obj/machinery/telecomms/proc/get_multitool(mob/user as mob)
-
- var/obj/item/device/multitool/P = null
- // Let's double check
- if(!issilicon(user) && istype(user.get_active_hand(), /obj/item/device/multitool))
- P = user.get_active_hand()
- else if(isAI(user))
- var/mob/living/silicon/ai/U = user
- P = U.aiMulti
- else if(isrobot(user) && in_range(user, src))
- if(istype(user.get_active_hand(), /obj/item/device/multitool))
- P = user.get_active_hand()
- return P
-
-// Additional Options for certain machines. Use this when you want to add an option to a specific machine.
-// Example of how to use below.
-
-/obj/machinery/telecomms/proc/Options_Menu()
- return ""
-
-/*
-// Add an option to the processor to switch processing mode. (COMPRESS -> UNCOMPRESS or UNCOMPRESS -> COMPRESS)
-/obj/machinery/telecomms/processor/Options_Menu()
- var/dat = "
Processing Mode: [process_mode ? "UNCOMPRESS" : "COMPRESS"]"
- return dat
-*/
-// The topic for Additional Options. Use this for checking href links for your specific option.
-// Example of how to use below.
-/obj/machinery/telecomms/proc/Options_Topic(href, href_list)
- return
-
-/*
-/obj/machinery/telecomms/processor/Options_Topic(href, href_list)
-
- if(href_list["process"])
- temp = "-% Processing mode changed. %-"
- src.process_mode = !src.process_mode
-*/
-
-// RELAY
-
-/obj/machinery/telecomms/relay/Options_Menu()
- var/dat = ""
- if(src.z == TELECOMM_Z)
- dat += "
Signal Locked to Station: [listening_level == STATION_Z ? "TRUE" : "FALSE"]"
- dat += "
Broadcasting: [broadcasting ? "YES" : "NO"]"
- dat += "
Receiving: [receiving ? "YES" : "NO"]"
- return dat
-
-/obj/machinery/telecomms/relay/Options_Topic(href, href_list)
-
- if(href_list["receive"])
- receiving = !receiving
- temp = "-% Receiving mode changed. %-"
- if(href_list["broadcast"])
- broadcasting = !broadcasting
- temp = "-% Broadcasting mode changed. %-"
- if(href_list["change_listening"])
- //Lock to the station OR lock to the current position!
- //You need at least two receivers and two broadcasters for this to work, this includes the machine.
- var/result = toggle_level()
- if(result)
- temp = "-% [src]'s signal has been successfully changed."
- else
- temp = "-% [src] could not lock it's signal onto the station. Two broadcasters or receivers required."
-
-// BUS
-
-/obj/machinery/telecomms/bus/Options_Menu()
- var/dat = "
Change Signal Frequency: [change_frequency ? "YES ([change_frequency])" : "NO"]"
- return dat
-
-/obj/machinery/telecomms/bus/Options_Topic(href, href_list)
-
- if(href_list["change_freq"])
-
- var/newfreq = input(usr, "Specify a new frequency for new signals to change to. Enter null to turn off frequency changing. Decimals assigned automatically.", src, network) as null|num
- if(canAccess(usr))
- if(newfreq)
- if(findtext(num2text(newfreq), "."))
- newfreq *= 10 // shift the decimal one place
- if(newfreq < 10000)
- change_frequency = newfreq
- temp = "-% New frequency to change to assigned: \"[newfreq] GHz\" %-"
- else
- change_frequency = 0
- temp = "-% Frequency changing deactivated %-"
-
-
-/obj/machinery/telecomms/Topic(href, href_list)
-
- if(!issilicon(usr))
- if(!istype(usr.get_active_hand(), /obj/item/device/multitool))
- return
-
- if(stat & (BROKEN|NOPOWER))
- return
-
- var/obj/item/device/multitool/P = get_multitool(usr)
-
- if(href_list["input"])
- switch(href_list["input"])
-
- if("toggle")
-
- src.toggled = !src.toggled
- temp = "-% [src] has been [src.toggled ? "activated" : "deactivated"]."
- update_power()
-
- /*
- if("hide")
- src.hide = !hide
- temp = "-% Shadow Link has been [src.hide ? "activated" : "deactivated"]."
- */
-
- if("id")
- var/newid = copytext(reject_bad_text(input(usr, "Specify the new ID for this machine", src, id) as null|text),1,MAX_MESSAGE_LEN)
- if(newid && canAccess(usr))
- id = newid
- temp = "-% New ID assigned: \"[id]\" %-"
-
- if("network")
- var/newnet = input(usr, "Specify the new network for this machine. This will break all current links.", src, network) as null|text
- if(newnet && canAccess(usr))
-
- if(length(newnet) > 15)
- temp = "-% Too many characters in new network tag %-"
-
- else
- for(var/obj/machinery/telecomms/T in links)
- T.links.Remove(src)
-
- network = newnet
- links = list()
- temp = "-% New network tag assigned: \"[network]\" %-"
-
-
- if("freq")
- var/newfreq = input(usr, "Specify a new frequency to filter (GHz). Decimals assigned automatically.", src, network) as null|num
- if(newfreq && canAccess(usr))
- if(findtext(num2text(newfreq), "."))
- newfreq *= 10 // shift the decimal one place
- if(!(newfreq in freq_listening) && newfreq < 10000)
- freq_listening.Add(newfreq)
- temp = "-% New frequency filter assigned: \"[newfreq] GHz\" %-"
-
- if(href_list["delete"])
-
- // changed the layout about to workaround a pesky runtime -- Doohl
-
- var/x = text2num(href_list["delete"])
- temp = "-% Removed frequency filter [x] %-"
- freq_listening.Remove(x)
-
- if(href_list["unlink"])
-
- if(text2num(href_list["unlink"]) <= length(links))
- var/obj/machinery/telecomms/T = links[text2num(href_list["unlink"])]
- temp = "-% Removed \ref[T] [T.name] from linked entities. %-"
-
- // Remove link entries from both T and src.
-
- if(src in T.links)
- T.links.Remove(src)
- links.Remove(T)
-
- if(href_list["link"])
-
- if(P)
- if(P.buffer && P.buffer != src)
- if(!(src in P.buffer.links))
- P.buffer.links.Add(src)
-
- if(!(P.buffer in src.links))
- src.links.Add(P.buffer)
-
- temp = "-% Successfully linked with \ref[P.buffer] [P.buffer.name] %-"
-
- else
- temp = "-% Unable to acquire buffer %-"
-
- if(href_list["buffer"])
-
- P.buffer = src
- temp = "-% Successfully stored \ref[P.buffer] [P.buffer.name] in buffer %-"
-
-
- if(href_list["flush"])
-
- temp = "-% Buffer successfully flushed. %-"
- P.buffer = null
-
- src.Options_Topic(href, href_list)
-
- usr.set_machine(src)
- src.add_fingerprint(usr)
-
- updateUsrDialog()
-
-/obj/machinery/telecomms/proc/canAccess(var/mob/user)
- if(issilicon(user) || in_range(user, src))
- return 1
- return 0
-
-#undef TELECOMM_Z
-#undef STATION_Z
+//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
+
+
+/*
+
+ All telecommunications interactions:
+
+*/
+
+#define STATION_Z 1
+#define TELECOMM_Z 3
+
+/obj/machinery/telecomms
+ var/temp = "" // output message
+ var/construct_op = 0
+
+
+/obj/machinery/telecomms/attackby(obj/item/P as obj, mob/user as mob)
+
+ // Using a multitool lets you access the receiver's interface
+ if(istype(P, /obj/item/device/multitool))
+ attack_hand(user)
+
+
+ // REPAIRING: Use Nanopaste to repair 10-20 integrity points.
+ if(istype(P, /obj/item/stack/nanopaste))
+ var/obj/item/stack/nanopaste/T = P
+ if (integrity < 100) //Damaged, let's repair!
+ if (T.use(1))
+ integrity = between(0, integrity + rand(10,20), 100)
+ usr << "You apply the Nanopaste to [src], repairing some of the damage."
+ else
+ usr << "This machine is already in perfect condition."
+ return
+
+
+ switch(construct_op)
+ if(0)
+ if(istype(P, /obj/item/weapon/screwdriver))
+ user << "You unfasten the bolts."
+ playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
+ construct_op ++
+ if(1)
+ if(istype(P, /obj/item/weapon/screwdriver))
+ user << "You fasten the bolts."
+ playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
+ construct_op --
+ if(istype(P, /obj/item/weapon/wrench))
+ user << "You dislodge the external plating."
+ playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
+ construct_op ++
+ if(2)
+ if(istype(P, /obj/item/weapon/wrench))
+ user << "You secure the external plating."
+ playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
+ construct_op --
+ if(istype(P, /obj/item/weapon/wirecutters))
+ playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
+ user << "You remove the cables."
+ construct_op ++
+ var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( user.loc )
+ A.amount = 5
+ stat |= BROKEN // the machine's been borked!
+ if(3)
+ if(istype(P, /obj/item/stack/cable_coil))
+ var/obj/item/stack/cable_coil/A = P
+ if (A.use(5))
+ user << "You insert the cables."
+ construct_op--
+ stat &= ~BROKEN // the machine's not borked anymore!
+ else
+ user << "You need five coils of wire for this."
+ if(istype(P, /obj/item/weapon/crowbar))
+ user << "You begin prying out the circuit board other components..."
+ playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
+ if(do_after(user,60))
+ user << "You finish prying out the components."
+
+ // Drop all the component stuff
+ if(contents.len > 0)
+ for(var/obj/x in src)
+ x.loc = user.loc
+ else
+
+ // If the machine wasn't made during runtime, probably doesn't have components:
+ // manually find the components and drop them!
+ var/newpath = text2path(circuitboard)
+ var/obj/item/weapon/circuitboard/C = new newpath
+ for(var/I in C.req_components)
+ for(var/i = 1, i <= C.req_components[I], i++)
+ newpath = text2path(I)
+ var/obj/item/s = new newpath
+ s.loc = user.loc
+ if(istype(P, /obj/item/stack/cable_coil))
+ var/obj/item/stack/cable_coil/A = P
+ A.amount = 1
+
+ // Drop a circuit board too
+ C.loc = user.loc
+
+ // Create a machine frame and delete the current machine
+ var/obj/machinery/constructable_frame/machine_frame/F = new
+ F.loc = src.loc
+ qdel(src)
+
+
+/obj/machinery/telecomms/attack_ai(var/mob/user as mob)
+ attack_hand(user)
+
+/obj/machinery/telecomms/attack_hand(var/mob/user as mob)
+
+ // You need a multitool to use this, or be silicon
+ if(!issilicon(user))
+ // istype returns false if the value is null
+ if(!istype(user.get_active_hand(), /obj/item/device/multitool))
+ return
+
+ if(stat & (BROKEN|NOPOWER))
+ return
+
+ var/obj/item/device/multitool/P = get_multitool(user)
+
+ user.set_machine(src)
+ var/dat
+ dat = "[src.name] Access
[temp]
"
+ dat += "
Power Status: [src.toggled ? "On" : "Off"]"
+ if(on && toggled)
+ if(id != "" && id)
+ dat += "
Identification String: [id]"
+ else
+ dat += "
Identification String: NULL"
+ dat += "
Network: [network]"
+ dat += "
Prefabrication: [autolinkers.len ? "TRUE" : "FALSE"]"
+ if(hide) dat += "
Shadow Link: ACTIVE"
+
+ //Show additional options for certain machines.
+ dat += Options_Menu()
+
+ dat += "
Linked Network Entities: "
+
+ var/i = 0
+ for(var/obj/machinery/telecomms/T in links)
+ i++
+ if(T.hide && !src.hide)
+ continue
+ dat += "
"
+
+ dat += "
Filtering Frequencies: "
+
+ i = 0
+ if(length(freq_listening))
+ for(var/x in freq_listening)
+ i++
+ if(i < length(freq_listening))
+ dat += "[format_frequency(x)] GHz\[X\]; "
+ else
+ dat += "[format_frequency(x)] GHz\[X\]"
+ else
+ dat += "NONE"
+
+ dat += "
\[Add Filter\]"
+ dat += "
"
+
+ if(P)
+ if(P.buffer)
+ dat += "
MULTITOOL BUFFER: [P.buffer] ([P.buffer.id]) \[Link\] \[Flush\]"
+ else
+ dat += "
MULTITOOL BUFFER: \[Add Machine\]"
+
+ dat += ""
+ temp = ""
+ user << browse(dat, "window=tcommachine;size=520x500;can_resize=0")
+ onclose(user, "dormitory")
+
+
+// Off-Site Relays
+//
+// You are able to send/receive signals from the station's z level (changeable in the STATION_Z #define) if
+// the relay is on the telecomm satellite (changable in the TELECOMM_Z #define)
+
+
+/obj/machinery/telecomms/relay/proc/toggle_level()
+
+ var/turf/position = get_turf(src)
+
+ // Toggle on/off getting signals from the station or the current Z level
+ if(src.listening_level == STATION_Z) // equals the station
+ src.listening_level = position.z
+ return 1
+ else if(position.z == TELECOMM_Z)
+ src.listening_level = STATION_Z
+ return 1
+ return 0
+
+// Returns a multitool from a user depending on their mobtype.
+
+/obj/machinery/telecomms/proc/get_multitool(mob/user as mob)
+
+ var/obj/item/device/multitool/P = null
+ // Let's double check
+ if(!issilicon(user) && istype(user.get_active_hand(), /obj/item/device/multitool))
+ P = user.get_active_hand()
+ else if(isAI(user))
+ var/mob/living/silicon/ai/U = user
+ P = U.aiMulti
+ else if(isrobot(user) && in_range(user, src))
+ if(istype(user.get_active_hand(), /obj/item/device/multitool))
+ P = user.get_active_hand()
+ return P
+
+// Additional Options for certain machines. Use this when you want to add an option to a specific machine.
+// Example of how to use below.
+
+/obj/machinery/telecomms/proc/Options_Menu()
+ return ""
+
+/*
+// Add an option to the processor to switch processing mode. (COMPRESS -> UNCOMPRESS or UNCOMPRESS -> COMPRESS)
+/obj/machinery/telecomms/processor/Options_Menu()
+ var/dat = "
Processing Mode: [process_mode ? "UNCOMPRESS" : "COMPRESS"]"
+ return dat
+*/
+// The topic for Additional Options. Use this for checking href links for your specific option.
+// Example of how to use below.
+/obj/machinery/telecomms/proc/Options_Topic(href, href_list)
+ return
+
+/*
+/obj/machinery/telecomms/processor/Options_Topic(href, href_list)
+
+ if(href_list["process"])
+ temp = "-% Processing mode changed. %-"
+ src.process_mode = !src.process_mode
+*/
+
+// RELAY
+
+/obj/machinery/telecomms/relay/Options_Menu()
+ var/dat = ""
+ if(src.z == TELECOMM_Z)
+ dat += "
Signal Locked to Station: [listening_level == STATION_Z ? "TRUE" : "FALSE"]"
+ dat += "
Broadcasting: [broadcasting ? "YES" : "NO"]"
+ dat += "
Receiving: [receiving ? "YES" : "NO"]"
+ return dat
+
+/obj/machinery/telecomms/relay/Options_Topic(href, href_list)
+
+ if(href_list["receive"])
+ receiving = !receiving
+ temp = "-% Receiving mode changed. %-"
+ if(href_list["broadcast"])
+ broadcasting = !broadcasting
+ temp = "-% Broadcasting mode changed. %-"
+ if(href_list["change_listening"])
+ //Lock to the station OR lock to the current position!
+ //You need at least two receivers and two broadcasters for this to work, this includes the machine.
+ var/result = toggle_level()
+ if(result)
+ temp = "-% [src]'s signal has been successfully changed."
+ else
+ temp = "-% [src] could not lock it's signal onto the station. Two broadcasters or receivers required."
+
+// BUS
+
+/obj/machinery/telecomms/bus/Options_Menu()
+ var/dat = "
Change Signal Frequency: [change_frequency ? "YES ([change_frequency])" : "NO"]"
+ return dat
+
+/obj/machinery/telecomms/bus/Options_Topic(href, href_list)
+
+ if(href_list["change_freq"])
+
+ var/newfreq = input(usr, "Specify a new frequency for new signals to change to. Enter null to turn off frequency changing. Decimals assigned automatically.", src, network) as null|num
+ if(canAccess(usr))
+ if(newfreq)
+ if(findtext(num2text(newfreq), "."))
+ newfreq *= 10 // shift the decimal one place
+ if(newfreq < 10000)
+ change_frequency = newfreq
+ temp = "-% New frequency to change to assigned: \"[newfreq] GHz\" %-"
+ else
+ change_frequency = 0
+ temp = "-% Frequency changing deactivated %-"
+
+
+/obj/machinery/telecomms/Topic(href, href_list)
+
+ if(!issilicon(usr))
+ if(!istype(usr.get_active_hand(), /obj/item/device/multitool))
+ return
+
+ if(stat & (BROKEN|NOPOWER))
+ return
+
+ var/obj/item/device/multitool/P = get_multitool(usr)
+
+ if(href_list["input"])
+ switch(href_list["input"])
+
+ if("toggle")
+
+ src.toggled = !src.toggled
+ temp = "-% [src] has been [src.toggled ? "activated" : "deactivated"]."
+ update_power()
+
+ /*
+ if("hide")
+ src.hide = !hide
+ temp = "-% Shadow Link has been [src.hide ? "activated" : "deactivated"]."
+ */
+
+ if("id")
+ var/newid = copytext(reject_bad_text(input(usr, "Specify the new ID for this machine", src, id) as null|text),1,MAX_MESSAGE_LEN)
+ if(newid && canAccess(usr))
+ id = newid
+ temp = "-% New ID assigned: \"[id]\" %-"
+
+ if("network")
+ var/newnet = input(usr, "Specify the new network for this machine. This will break all current links.", src, network) as null|text
+ if(newnet && canAccess(usr))
+
+ if(length(newnet) > 15)
+ temp = "-% Too many characters in new network tag %-"
+
+ else
+ for(var/obj/machinery/telecomms/T in links)
+ T.links.Remove(src)
+
+ network = newnet
+ links = list()
+ temp = "-% New network tag assigned: \"[network]\" %-"
+
+
+ if("freq")
+ var/newfreq = input(usr, "Specify a new frequency to filter (GHz). Decimals assigned automatically.", src, network) as null|num
+ if(newfreq && canAccess(usr))
+ if(findtext(num2text(newfreq), "."))
+ newfreq *= 10 // shift the decimal one place
+ if(!(newfreq in freq_listening) && newfreq < 10000)
+ freq_listening.Add(newfreq)
+ temp = "-% New frequency filter assigned: \"[newfreq] GHz\" %-"
+
+ if(href_list["delete"])
+
+ // changed the layout about to workaround a pesky runtime -- Doohl
+
+ var/x = text2num(href_list["delete"])
+ temp = "-% Removed frequency filter [x] %-"
+ freq_listening.Remove(x)
+
+ if(href_list["unlink"])
+
+ if(text2num(href_list["unlink"]) <= length(links))
+ var/obj/machinery/telecomms/T = links[text2num(href_list["unlink"])]
+ temp = "-% Removed \ref[T] [T.name] from linked entities. %-"
+
+ // Remove link entries from both T and src.
+
+ if(src in T.links)
+ T.links.Remove(src)
+ links.Remove(T)
+
+ if(href_list["link"])
+
+ if(P)
+ if(P.buffer && P.buffer != src)
+ if(!(src in P.buffer.links))
+ P.buffer.links.Add(src)
+
+ if(!(P.buffer in src.links))
+ src.links.Add(P.buffer)
+
+ temp = "-% Successfully linked with \ref[P.buffer] [P.buffer.name] %-"
+
+ else
+ temp = "-% Unable to acquire buffer %-"
+
+ if(href_list["buffer"])
+
+ P.buffer = src
+ temp = "-% Successfully stored \ref[P.buffer] [P.buffer.name] in buffer %-"
+
+
+ if(href_list["flush"])
+
+ temp = "-% Buffer successfully flushed. %-"
+ P.buffer = null
+
+ src.Options_Topic(href, href_list)
+
+ usr.set_machine(src)
+ src.add_fingerprint(usr)
+
+ updateUsrDialog()
+
+/obj/machinery/telecomms/proc/canAccess(var/mob/user)
+ if(issilicon(user) || in_range(user, src))
+ return 1
+ return 0
+
+#undef TELECOMM_Z
+#undef STATION_Z
diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm
index fe638408fc..99c1847961 100644
--- a/code/game/machinery/telecomms/telecomunications.dm
+++ b/code/game/machinery/telecomms/telecomunications.dm
@@ -130,9 +130,11 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
for(var/obj/machinery/telecomms/T in telecomms_list)
add_link(T)
-
-/obj/machinery/telecomms/Del()
+/obj/machinery/telecomms/Destroy()
telecomms_list -= src
+ for(var/obj/machinery/telecomms/comm in telecomms_list)
+ comm.links -= src
+ links = list()
..()
// Used in auto linking
@@ -535,6 +537,28 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
log.parameters["message"] = signal.data["message"]
log.parameters["name"] = signal.data["name"]
log.parameters["realname"] = signal.data["realname"]
+ log.parameters["language"] = signal.data["language"]
+
+ var/race = "unknown"
+ if(ishuman(M))
+ var/mob/living/carbon/human/H = M
+ race = "[H.species.name]"
+ log.parameters["intelligible"] = 1
+ else if(isbrain(M))
+ var/mob/living/carbon/brain/B = M
+ race = "[B.species.name]"
+ log.parameters["intelligible"] = 1
+ else if(M.isMonkey())
+ race = "Monkey"
+ else if(M.isSilicon())
+ race = "Artificial Life"
+ log.parameters["intelligible"] = 1
+ else if(isslime(M))
+ race = "Slime"
+ else if(isanimal(M))
+ race = "Domestic Animal"
+
+ log.parameters["race"] = race
if(!istype(M, /mob/new_player) && M)
log.parameters["uspeech"] = M.universal_speak
diff --git a/code/game/machinery/telecomms/telemonitor.dm b/code/game/machinery/telecomms/telemonitor.dm
index ea313e0052..a0f7b351ef 100644
--- a/code/game/machinery/telecomms/telemonitor.dm
+++ b/code/game/machinery/telecomms/telemonitor.dm
@@ -1,158 +1,158 @@
-//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
-
-
-/*
- Telecomms monitor tracks the overall trafficing of a telecommunications network
- and displays a heirarchy of linked machines.
-*/
-
-
-/obj/machinery/computer/telecomms/monitor
- name = "Telecommunications Monitor"
- icon_state = "comm_monitor"
-
- var/screen = 0 // the screen number:
- var/list/machinelist = list() // the machines located by the computer
- var/obj/machinery/telecomms/SelectedMachine
-
- var/network = "NULL" // the network to probe
-
- var/temp = "" // temporary feedback messages
-
- attack_hand(mob/user as mob)
- if(stat & (BROKEN|NOPOWER))
- return
- user.set_machine(src)
- var/dat = "
[temp]
"
- dat += "
Current Network: [network]
"
- if(machinelist.len)
- dat += "
Detected Network Entities:"
- for(var/obj/machinery/telecomms/T in machinelist)
- dat += "
"
- dat += "
\[Flush Buffer\]"
- else
- dat += "\[Probe Network\]"
-
-
- // --- Viewing Machine ---
-
- if(1)
- dat += "
[temp]
"
- dat += "
Current Network: [network]
"
- dat += "Selected Network Entity: [SelectedMachine.name] ([SelectedMachine.id])
"
- dat += "Linked Entities: "
- for(var/obj/machinery/telecomms/T in SelectedMachine.links)
- if(!T.hide)
- dat += "
"
-
-
-
- user << browse(dat, "window=comm_monitor;size=575x400")
- onclose(user, "server_control")
-
- temp = ""
- return
-
-
- Topic(href, href_list)
- if(..())
- return
-
-
- add_fingerprint(usr)
- usr.set_machine(src)
-
- if(href_list["viewmachine"])
- screen = 1
- for(var/obj/machinery/telecomms/T in machinelist)
- if(T.id == href_list["viewmachine"])
- SelectedMachine = T
- break
-
- if(href_list["operation"])
- switch(href_list["operation"])
-
- if("release")
- machinelist = list()
- screen = 0
-
- if("mainmenu")
- screen = 0
-
- if("probe")
- if(machinelist.len > 0)
- temp = "- FAILED: CANNOT PROBE WHEN BUFFER FULL -"
-
- else
- for(var/obj/machinery/telecomms/T in range(25, src))
- if(T.network == network)
- machinelist.Add(T)
-
- if(!machinelist.len)
- temp = "- FAILED: UNABLE TO LOCATE NETWORK ENTITIES IN \[[network]\] -"
- else
- temp = "- [machinelist.len] ENTITIES LOCATED & BUFFERED -"
-
- screen = 0
-
-
- if(href_list["network"])
-
- var/newnet = input(usr, "Which network do you want to view?", "Comm Monitor", network) as null|text
- if(newnet && ((usr in range(1, src) || issilicon(usr))))
- if(length(newnet) > 15)
- temp = "- FAILED: NETWORK TAG STRING TOO LENGHTLY -"
-
- else
- network = newnet
- screen = 0
- machinelist = list()
- temp = "- NEW NETWORK TAG SET IN ADDRESS \[[network]\] -"
-
- updateUsrDialog()
- return
-
- attackby(var/obj/item/weapon/D as obj, var/mob/user as mob)
- if(istype(D, /obj/item/weapon/screwdriver))
- playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
- if(do_after(user, 20))
- if (src.stat & BROKEN)
- user << "\blue The broken glass falls out."
- var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
- new /obj/item/weapon/shard( src.loc )
- var/obj/item/weapon/circuitboard/comm_monitor/M = new /obj/item/weapon/circuitboard/comm_monitor( A )
- for (var/obj/C in src)
- C.loc = src.loc
- A.circuit = M
- A.state = 3
- A.icon_state = "3"
- A.anchored = 1
- del(src)
- else
- user << "\blue You disconnect the monitor."
- var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
- var/obj/item/weapon/circuitboard/comm_monitor/M = new /obj/item/weapon/circuitboard/comm_monitor( A )
- for (var/obj/C in src)
- C.loc = src.loc
- A.circuit = M
- A.state = 4
- A.icon_state = "4"
- A.anchored = 1
- del(src)
- else if(istype(D, /obj/item/weapon/card/emag) && !emagged)
- playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
- emagged = 1
- user << "\blue You you disable the security protocols"
- src.updateUsrDialog()
- return
+//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
+
+
+/*
+ Telecomms monitor tracks the overall trafficing of a telecommunications network
+ and displays a heirarchy of linked machines.
+*/
+
+
+/obj/machinery/computer/telecomms/monitor
+ name = "Telecommunications Monitor"
+ icon_state = "comm_monitor"
+
+ var/screen = 0 // the screen number:
+ var/list/machinelist = list() // the machines located by the computer
+ var/obj/machinery/telecomms/SelectedMachine
+
+ var/network = "NULL" // the network to probe
+
+ var/temp = "" // temporary feedback messages
+
+ attack_hand(mob/user as mob)
+ if(stat & (BROKEN|NOPOWER))
+ return
+ user.set_machine(src)
+ var/dat = "
[temp]
"
+ dat += "
Current Network: [network]
"
+ if(machinelist.len)
+ dat += "
Detected Network Entities:"
+ for(var/obj/machinery/telecomms/T in machinelist)
+ dat += "
"
+ dat += "
\[Flush Buffer\]"
+ else
+ dat += "\[Probe Network\]"
+
+
+ // --- Viewing Machine ---
+
+ if(1)
+ dat += "
[temp]
"
+ dat += "
Current Network: [network]
"
+ dat += "Selected Network Entity: [SelectedMachine.name] ([SelectedMachine.id])
"
+ dat += "Linked Entities: "
+ for(var/obj/machinery/telecomms/T in SelectedMachine.links)
+ if(!T.hide)
+ dat += "
"
+
+
+
+ user << browse(dat, "window=comm_monitor;size=575x400")
+ onclose(user, "server_control")
+
+ temp = ""
+ return
+
+
+ Topic(href, href_list)
+ if(..())
+ return
+
+
+ add_fingerprint(usr)
+ usr.set_machine(src)
+
+ if(href_list["viewmachine"])
+ screen = 1
+ for(var/obj/machinery/telecomms/T in machinelist)
+ if(T.id == href_list["viewmachine"])
+ SelectedMachine = T
+ break
+
+ if(href_list["operation"])
+ switch(href_list["operation"])
+
+ if("release")
+ machinelist = list()
+ screen = 0
+
+ if("mainmenu")
+ screen = 0
+
+ if("probe")
+ if(machinelist.len > 0)
+ temp = "- FAILED: CANNOT PROBE WHEN BUFFER FULL -"
+
+ else
+ for(var/obj/machinery/telecomms/T in range(25, src))
+ if(T.network == network)
+ machinelist.Add(T)
+
+ if(!machinelist.len)
+ temp = "- FAILED: UNABLE TO LOCATE NETWORK ENTITIES IN \[[network]\] -"
+ else
+ temp = "- [machinelist.len] ENTITIES LOCATED & BUFFERED -"
+
+ screen = 0
+
+
+ if(href_list["network"])
+
+ var/newnet = input(usr, "Which network do you want to view?", "Comm Monitor", network) as null|text
+ if(newnet && ((usr in range(1, src) || issilicon(usr))))
+ if(length(newnet) > 15)
+ temp = "- FAILED: NETWORK TAG STRING TOO LENGHTLY -"
+
+ else
+ network = newnet
+ screen = 0
+ machinelist = list()
+ temp = "- NEW NETWORK TAG SET IN ADDRESS \[[network]\] -"
+
+ updateUsrDialog()
+ return
+
+ attackby(var/obj/item/weapon/D as obj, var/mob/user as mob)
+ if(istype(D, /obj/item/weapon/screwdriver))
+ playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
+ if(do_after(user, 20))
+ if (src.stat & BROKEN)
+ user << "\blue The broken glass falls out."
+ var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
+ new /obj/item/weapon/shard( src.loc )
+ var/obj/item/weapon/circuitboard/comm_monitor/M = new /obj/item/weapon/circuitboard/comm_monitor( A )
+ for (var/obj/C in src)
+ C.loc = src.loc
+ A.circuit = M
+ A.state = 3
+ A.icon_state = "3"
+ A.anchored = 1
+ qdel(src)
+ else
+ user << "\blue You disconnect the monitor."
+ var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
+ var/obj/item/weapon/circuitboard/comm_monitor/M = new /obj/item/weapon/circuitboard/comm_monitor( A )
+ for (var/obj/C in src)
+ C.loc = src.loc
+ A.circuit = M
+ A.state = 4
+ A.icon_state = "4"
+ A.anchored = 1
+ qdel(src)
+ else if(istype(D, /obj/item/weapon/card/emag) && !emagged)
+ playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
+ emagged = 1
+ user << "\blue You you disable the security protocols"
+ src.updateUsrDialog()
+ return
diff --git a/code/game/machinery/telecomms/traffic_control.dm b/code/game/machinery/telecomms/traffic_control.dm
index 226c47229e..287577626c 100644
--- a/code/game/machinery/telecomms/traffic_control.dm
+++ b/code/game/machinery/telecomms/traffic_control.dm
@@ -1,241 +1,241 @@
-//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
-
-
-
-
-
-/obj/machinery/computer/telecomms/traffic
- name = "Telecommunications Traffic Control"
- icon_state = "computer_generic"
-
- var/screen = 0 // the screen number:
- var/list/servers = list() // the servers located by the computer
- var/mob/editingcode
- var/mob/lasteditor
- var/list/viewingcode = list()
- var/obj/machinery/telecomms/server/SelectedServer
-
- var/network = "NULL" // the network to probe
- var/temp = "" // temporary feedback messages
-
- var/storedcode = "" // code stored
-
-
- proc/update_ide()
-
- // loop if there's someone manning the keyboard
- while(editingcode)
- if(!editingcode.client)
- editingcode = null
- break
-
- // For the typer, the input is enabled. Buffer the typed text
- if(editingcode)
- storedcode = "[winget(editingcode, "tcscode", "text")]"
- if(editingcode) // double if's to work around a runtime error
- winset(editingcode, "tcscode", "is-disabled=false")
-
- // If the player's not manning the keyboard anymore, adjust everything
- if( (!(editingcode in range(1, src)) && !issilicon(editingcode)) || (editingcode.machine != src && !issilicon(editingcode)))
- if(editingcode)
- winshow(editingcode, "Telecomms IDE", 0) // hide the window!
- editingcode = null
- break
-
- // For other people viewing the typer type code, the input is disabled and they can only view the code
- // (this is put in place so that there's not any magical shenanigans with 50 people inputting different code all at once)
-
- if(length(viewingcode))
- // This piece of code is very important - it escapes quotation marks so string aren't cut off by the input element
- var/showcode = replacetext(storedcode, "\\\"", "\\\\\"")
- showcode = replacetext(storedcode, "\"", "\\\"")
-
- for(var/mob/M in viewingcode)
-
- if( (M.machine == src && M in view(1, src) ) || issilicon(M))
- winset(M, "tcscode", "is-disabled=true")
- winset(M, "tcscode", "text=\"[showcode]\"")
- else
- viewingcode.Remove(M)
- winshow(M, "Telecomms IDE", 0) // hide the window!
-
- sleep(5)
-
- if(length(viewingcode) > 0)
- editingcode = pick(viewingcode)
- viewingcode.Remove(editingcode)
- update_ide()
-
-
-
- req_access = list(access_tcomsat)
-
- attack_hand(mob/user as mob)
- if(stat & (BROKEN|NOPOWER))
- return
- user.set_machine(src)
- var/dat = "
[temp]
"
- dat += "
Current Network: [network]
"
- if(servers.len)
- dat += "
Detected Telecommunication Servers:"
- for(var/obj/machinery/telecomms/T in servers)
- dat += "
"
- dat += "
\[Flush Buffer\]"
-
- else
- dat += "
No servers detected. Scan for servers: \[Scan\]"
-
-
- // --- Viewing Server ---
-
- if(1)
- dat += "
[temp]
"
- dat += "
Current Network: [network]"
- dat += "
Selected Server: [SelectedServer.id]
"
- dat += "
\[Edit Code\]"
- dat += "
Signal Execution: "
- if(SelectedServer.autoruncode)
- dat += "ALWAYS"
- else
- dat += "NEVER"
-
-
- user << browse(dat, "window=traffic_control;size=575x400")
- onclose(user, "server_control")
-
- temp = ""
- return
-
-
- Topic(href, href_list)
- if(..())
- return
-
-
- add_fingerprint(usr)
- usr.set_machine(src)
- if(!src.allowed(usr) && !emagged)
- usr << "\red ACCESS DENIED."
- return
-
- if(href_list["viewserver"])
- screen = 1
- for(var/obj/machinery/telecomms/T in servers)
- if(T.id == href_list["viewserver"])
- SelectedServer = T
- break
-
- if(href_list["operation"])
- switch(href_list["operation"])
-
- if("release")
- servers = list()
- screen = 0
-
- if("mainmenu")
- screen = 0
-
- if("scan")
- if(servers.len > 0)
- temp = "- FAILED: CANNOT PROBE WHEN BUFFER FULL -"
-
- else
- for(var/obj/machinery/telecomms/server/T in range(25, src))
- if(T.network == network)
- servers.Add(T)
-
- if(!servers.len)
- temp = "- FAILED: UNABLE TO LOCATE SERVERS IN \[[network]\] -"
- else
- temp = "- [servers.len] SERVERS PROBED & BUFFERED -"
-
- screen = 0
-
- if("editcode")
- if(editingcode == usr) return
- if(usr in viewingcode) return
-
- if(!editingcode)
- lasteditor = usr
- editingcode = usr
- winshow(editingcode, "Telecomms IDE", 1) // show the IDE
- winset(editingcode, "tcscode", "is-disabled=false")
- winset(editingcode, "tcscode", "text=\"\"")
- var/showcode = replacetext(storedcode, "\\\"", "\\\\\"")
- showcode = replacetext(storedcode, "\"", "\\\"")
- winset(editingcode, "tcscode", "text=\"[showcode]\"")
- spawn()
- update_ide()
-
- else
- viewingcode.Add(usr)
- winshow(usr, "Telecomms IDE", 1) // show the IDE
- winset(usr, "tcscode", "is-disabled=true")
- winset(editingcode, "tcscode", "text=\"\"")
- var/showcode = replacetext(storedcode, "\"", "\\\"")
- winset(usr, "tcscode", "text=\"[showcode]\"")
-
- if("togglerun")
- SelectedServer.autoruncode = !(SelectedServer.autoruncode)
-
- if(href_list["network"])
-
- var/newnet = input(usr, "Which network do you want to view?", "Comm Monitor", network) as null|text
-
- if(newnet && ((usr in range(1, src) || issilicon(usr))))
- if(length(newnet) > 15)
- temp = "- FAILED: NETWORK TAG STRING TOO LENGHTLY -"
-
- else
-
- network = newnet
- screen = 0
- servers = list()
- temp = "- NEW NETWORK TAG SET IN ADDRESS \[[network]\] -"
-
- updateUsrDialog()
- return
-
- attackby(var/obj/item/weapon/D as obj, var/mob/user as mob)
- if(istype(D, /obj/item/weapon/screwdriver))
- playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
- if(do_after(user, 20))
- if (src.stat & BROKEN)
- user << "\blue The broken glass falls out."
- var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
- new /obj/item/weapon/shard( src.loc )
- var/obj/item/weapon/circuitboard/comm_traffic/M = new /obj/item/weapon/circuitboard/comm_traffic( A )
- for (var/obj/C in src)
- C.loc = src.loc
- A.circuit = M
- A.state = 3
- A.icon_state = "3"
- A.anchored = 1
- del(src)
- else
- user << "\blue You disconnect the monitor."
- var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
- var/obj/item/weapon/circuitboard/comm_traffic/M = new /obj/item/weapon/circuitboard/comm_traffic( A )
- for (var/obj/C in src)
- C.loc = src.loc
- A.circuit = M
- A.state = 4
- A.icon_state = "4"
- A.anchored = 1
- del(src)
- else if(istype(D, /obj/item/weapon/card/emag) && !emagged)
- playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
- emagged = 1
- user << "\blue You you disable the security protocols"
- src.updateUsrDialog()
- return
+//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
+
+
+
+
+
+/obj/machinery/computer/telecomms/traffic
+ name = "Telecommunications Traffic Control"
+ icon_state = "computer_generic"
+
+ var/screen = 0 // the screen number:
+ var/list/servers = list() // the servers located by the computer
+ var/mob/editingcode
+ var/mob/lasteditor
+ var/list/viewingcode = list()
+ var/obj/machinery/telecomms/server/SelectedServer
+
+ var/network = "NULL" // the network to probe
+ var/temp = "" // temporary feedback messages
+
+ var/storedcode = "" // code stored
+
+
+ proc/update_ide()
+
+ // loop if there's someone manning the keyboard
+ while(editingcode)
+ if(!editingcode.client)
+ editingcode = null
+ break
+
+ // For the typer, the input is enabled. Buffer the typed text
+ if(editingcode)
+ storedcode = "[winget(editingcode, "tcscode", "text")]"
+ if(editingcode) // double if's to work around a runtime error
+ winset(editingcode, "tcscode", "is-disabled=false")
+
+ // If the player's not manning the keyboard anymore, adjust everything
+ if( (!(editingcode in range(1, src)) && !issilicon(editingcode)) || (editingcode.machine != src && !issilicon(editingcode)))
+ if(editingcode)
+ winshow(editingcode, "Telecomms IDE", 0) // hide the window!
+ editingcode = null
+ break
+
+ // For other people viewing the typer type code, the input is disabled and they can only view the code
+ // (this is put in place so that there's not any magical shenanigans with 50 people inputting different code all at once)
+
+ if(length(viewingcode))
+ // This piece of code is very important - it escapes quotation marks so string aren't cut off by the input element
+ var/showcode = replacetext(storedcode, "\\\"", "\\\\\"")
+ showcode = replacetext(storedcode, "\"", "\\\"")
+
+ for(var/mob/M in viewingcode)
+
+ if( (M.machine == src && M in view(1, src) ) || issilicon(M))
+ winset(M, "tcscode", "is-disabled=true")
+ winset(M, "tcscode", "text=\"[showcode]\"")
+ else
+ viewingcode.Remove(M)
+ winshow(M, "Telecomms IDE", 0) // hide the window!
+
+ sleep(5)
+
+ if(length(viewingcode) > 0)
+ editingcode = pick(viewingcode)
+ viewingcode.Remove(editingcode)
+ update_ide()
+
+
+
+ req_access = list(access_tcomsat)
+
+ attack_hand(mob/user as mob)
+ if(stat & (BROKEN|NOPOWER))
+ return
+ user.set_machine(src)
+ var/dat = "
[temp]
"
+ dat += "
Current Network: [network]
"
+ if(servers.len)
+ dat += "
Detected Telecommunication Servers:"
+ for(var/obj/machinery/telecomms/T in servers)
+ dat += "
"
+ dat += "
\[Flush Buffer\]"
+
+ else
+ dat += "
No servers detected. Scan for servers: \[Scan\]"
+
+
+ // --- Viewing Server ---
+
+ if(1)
+ dat += "
[temp]
"
+ dat += "
Current Network: [network]"
+ dat += "
Selected Server: [SelectedServer.id]
"
+ dat += "
\[Edit Code\]"
+ dat += "
Signal Execution: "
+ if(SelectedServer.autoruncode)
+ dat += "ALWAYS"
+ else
+ dat += "NEVER"
+
+
+ user << browse(dat, "window=traffic_control;size=575x400")
+ onclose(user, "server_control")
+
+ temp = ""
+ return
+
+
+ Topic(href, href_list)
+ if(..())
+ return
+
+
+ add_fingerprint(usr)
+ usr.set_machine(src)
+ if(!src.allowed(usr) && !emagged)
+ usr << "\red ACCESS DENIED."
+ return
+
+ if(href_list["viewserver"])
+ screen = 1
+ for(var/obj/machinery/telecomms/T in servers)
+ if(T.id == href_list["viewserver"])
+ SelectedServer = T
+ break
+
+ if(href_list["operation"])
+ switch(href_list["operation"])
+
+ if("release")
+ servers = list()
+ screen = 0
+
+ if("mainmenu")
+ screen = 0
+
+ if("scan")
+ if(servers.len > 0)
+ temp = "- FAILED: CANNOT PROBE WHEN BUFFER FULL -"
+
+ else
+ for(var/obj/machinery/telecomms/server/T in range(25, src))
+ if(T.network == network)
+ servers.Add(T)
+
+ if(!servers.len)
+ temp = "- FAILED: UNABLE TO LOCATE SERVERS IN \[[network]\] -"
+ else
+ temp = "- [servers.len] SERVERS PROBED & BUFFERED -"
+
+ screen = 0
+
+ if("editcode")
+ if(editingcode == usr) return
+ if(usr in viewingcode) return
+
+ if(!editingcode)
+ lasteditor = usr
+ editingcode = usr
+ winshow(editingcode, "Telecomms IDE", 1) // show the IDE
+ winset(editingcode, "tcscode", "is-disabled=false")
+ winset(editingcode, "tcscode", "text=\"\"")
+ var/showcode = replacetext(storedcode, "\\\"", "\\\\\"")
+ showcode = replacetext(storedcode, "\"", "\\\"")
+ winset(editingcode, "tcscode", "text=\"[showcode]\"")
+ spawn()
+ update_ide()
+
+ else
+ viewingcode.Add(usr)
+ winshow(usr, "Telecomms IDE", 1) // show the IDE
+ winset(usr, "tcscode", "is-disabled=true")
+ winset(editingcode, "tcscode", "text=\"\"")
+ var/showcode = replacetext(storedcode, "\"", "\\\"")
+ winset(usr, "tcscode", "text=\"[showcode]\"")
+
+ if("togglerun")
+ SelectedServer.autoruncode = !(SelectedServer.autoruncode)
+
+ if(href_list["network"])
+
+ var/newnet = input(usr, "Which network do you want to view?", "Comm Monitor", network) as null|text
+
+ if(newnet && ((usr in range(1, src) || issilicon(usr))))
+ if(length(newnet) > 15)
+ temp = "- FAILED: NETWORK TAG STRING TOO LENGHTLY -"
+
+ else
+
+ network = newnet
+ screen = 0
+ servers = list()
+ temp = "- NEW NETWORK TAG SET IN ADDRESS \[[network]\] -"
+
+ updateUsrDialog()
+ return
+
+ attackby(var/obj/item/weapon/D as obj, var/mob/user as mob)
+ if(istype(D, /obj/item/weapon/screwdriver))
+ playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
+ if(do_after(user, 20))
+ if (src.stat & BROKEN)
+ user << "\blue The broken glass falls out."
+ var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
+ new /obj/item/weapon/shard( src.loc )
+ var/obj/item/weapon/circuitboard/comm_traffic/M = new /obj/item/weapon/circuitboard/comm_traffic( A )
+ for (var/obj/C in src)
+ C.loc = src.loc
+ A.circuit = M
+ A.state = 3
+ A.icon_state = "3"
+ A.anchored = 1
+ qdel(src)
+ else
+ user << "\blue You disconnect the monitor."
+ var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
+ var/obj/item/weapon/circuitboard/comm_traffic/M = new /obj/item/weapon/circuitboard/comm_traffic( A )
+ for (var/obj/C in src)
+ C.loc = src.loc
+ A.circuit = M
+ A.state = 4
+ A.icon_state = "4"
+ A.anchored = 1
+ qdel(src)
+ else if(istype(D, /obj/item/weapon/card/emag) && !emagged)
+ playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
+ emagged = 1
+ user << "\blue You you disable the security protocols"
+ src.updateUsrDialog()
+ return
diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm
index 9e68791df0..b1d45a4840 100644
--- a/code/game/machinery/teleporter.dm
+++ b/code/game/machinery/teleporter.dm
@@ -57,7 +57,7 @@
usr << "You insert the coordinates into the machine."
usr << "A message flashes across the screen reminding the traveller that the nuclear authentication disk is to remain on the station at all times."
user.drop_item()
- del(I)
+ qdel(I)
if(C.data == "Clown Land")
//whoops
@@ -216,7 +216,7 @@
/*
/proc/do_teleport(atom/movable/M as mob|obj, atom/destination, precision)
if(istype(M, /obj/effect))
- del(M)
+ qdel(M)
return
if (istype(M, /obj/item/weapon/disk/nuclear)) // Don't let nuke disks get teleported --NeoFite
for(var/mob/O in viewers(M, null))
diff --git a/code/game/machinery/turret_control.dm b/code/game/machinery/turret_control.dm
index 46ea8824e6..223b503f4f 100644
--- a/code/game/machinery/turret_control.dm
+++ b/code/game/machinery/turret_control.dm
@@ -37,7 +37,7 @@
lethal = 1
icon_state = "control_kill"
-/obj/machinery/turretid/Del()
+/obj/machinery/turretid/Destroy()
if(control_area)
var/area/A = control_area
if(A && istype(A))
@@ -46,12 +46,11 @@
/obj/machinery/turretid/initialize()
if(!control_area)
- var/area/CA = get_area(src)
- control_area = CA.master
+ control_area = get_area(src)
else if(istext(control_area))
for(var/area/A in world)
if(A.name && A.name==control_area)
- control_area = A.master
+ control_area = A
break
if(control_area)
@@ -178,9 +177,8 @@
TC.ailock = ailock
if(istype(control_area))
- for(var/area/sub_area in control_area.related)
- for (var/obj/machinery/porta_turret/aTurret in sub_area)
- aTurret.setState(TC)
+ for (var/obj/machinery/porta_turret/aTurret in control_area)
+ aTurret.setState(TC)
update_icon()
diff --git a/code/game/machinery/turrets.dm b/code/game/machinery/turrets.dm
index 965210ae15..e3a104d21c 100644
--- a/code/game/machinery/turrets.dm
+++ b/code/game/machinery/turrets.dm
@@ -13,9 +13,6 @@
/area/turret_protected/Entered(O)
..()
- if( master && master != src )
- return master.Entered(O)
-
if( iscarbon(O) )
turretTargets |= O
else if( istype(O, /obj/mecha) )
@@ -27,9 +24,6 @@
return 1
/area/turret_protected/Exited(O)
- if( master && master != src )
- return master.Exited(O)
-
if( ismob(O) && !issilicon(O) )
turretTargets -= O
else if( istype(O, /obj/mecha) )
@@ -74,7 +68,7 @@
/obj/machinery/turret/proc/take_damage(damage)
src.health -= damage
if(src.health<=0)
- del src
+ qdel(src)
return
/obj/machinery/turret/attack_hand(var/mob/living/carbon/human/user)
@@ -105,7 +99,7 @@
/obj/machinery/turret/proc/update_health()
if(src.health<=0)
- del src
+ qdel(src)
return
/obj/machinery/turretcover
@@ -148,8 +142,6 @@
/obj/machinery/turret/proc/get_protected_area()
var/area/turret_protected/TP = get_area(src)
if(istype(TP))
- if(TP.master && TP.master != TP)
- TP = TP.master
return TP
return
@@ -305,7 +297,7 @@
src.health -= Proj.damage
..()
if(prob(45) && Proj.damage > 0) src.spark_system.start()
- del (Proj)
+ qdel (Proj)
if (src.health <= 0)
src.die()
return
@@ -337,11 +329,11 @@
src.stat |= BROKEN
src.icon_state = "destroyed_target_prism"
if (cover!=null)
- del(cover)
+ qdel(cover)
sleep(3)
flick("explosion", src)
spawn(13)
- del(src)
+ qdel(src)
/obj/machinery/turret/attack_generic(var/mob/user, var/damage, var/attack_message)
if(!damage)
@@ -376,7 +368,7 @@
proc/take_damage(damage)
src.health -= damage
if(src.health<=0)
- del src
+ qdel(src)
return
@@ -389,15 +381,15 @@
ex_act()
- del src
+ qdel(src)
return
emp_act()
- del src
+ qdel(src)
return
meteorhit()
- del src
+ qdel(src)
return
attack_hand(mob/user as mob)
diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm
index 794fb0a887..81529cf804 100644
--- a/code/game/machinery/vending.dm
+++ b/code/game/machinery/vending.dm
@@ -21,7 +21,7 @@
if(!name)
var/atom/tmp = new path
src.product_name = initial(tmp.name)
- del(tmp)
+ qdel(tmp)
else
src.product_name = name
@@ -143,22 +143,21 @@
src.product_records.Add(product)
-/obj/machinery/vending/Del()
- del(wires) // qdel
+/obj/machinery/vending/Destroy()
+ qdel(wires)
wires = null
- if(coin)
- del(coin) // qdel
- coin = null
+ qdel(coin)
+ coin = null
..()
/obj/machinery/vending/ex_act(severity)
switch(severity)
if(1.0)
- del(src)
+ qdel(src)
return
if(2.0)
if (prob(50))
- del(src)
+ qdel(src)
return
if(3.0)
if (prob(25))
@@ -173,7 +172,7 @@
if (prob(50))
spawn(0)
src.malfunction()
- del(src)
+ qdel(src)
return
return
@@ -251,7 +250,7 @@
for(var/datum/data/vending_product/R in product_records)
if(istype(W, R.product_path))
stock(R, user)
- del(W)
+ qdel(W)
else
..()
@@ -278,7 +277,7 @@
if(cashmoney_bundle.worth <= 0)
usr.drop_from_inventory(cashmoney_bundle)
- del(cashmoney_bundle)
+ qdel(cashmoney_bundle)
else
cashmoney_bundle.update_icon()
else
@@ -290,7 +289,7 @@
visible_message("\The [usr] inserts a bill into \the [src].")
var/left = cashmoney.worth - currently_vending.price
usr.drop_from_inventory(cashmoney)
- del(cashmoney)
+ qdel(cashmoney)
if(left)
spawn_money(left, src.loc, user)
@@ -533,10 +532,10 @@
user << "\blue You successfully pull the coin out before \the [src] could swallow it."
else
user << "\blue You weren't able to pull the coin out fast enough, the machine ate it, string and all."
- del(coin)
+ qdel(coin)
categories &= ~CAT_COIN
else
- del(coin)
+ qdel(coin)
categories &= ~CAT_COIN
R.amount--
diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm
index ad433d12e2..8f2e6aaee2 100644
--- a/code/game/machinery/washing_machine.dm
+++ b/code/game/machinery/washing_machine.dm
@@ -50,129 +50,8 @@
for(var/obj/item/stack/sheet/hairlesshide/HH in contents)
var/obj/item/stack/sheet/wetleather/WL = new(src)
WL.amount = HH.amount
- del(HH)
-
-
- if(crayon)
- var/wash_color
- if(istype(crayon,/obj/item/toy/crayon))
- var/obj/item/toy/crayon/CR = crayon
- wash_color = CR.colourName
- else if(istype(crayon,/obj/item/weapon/stamp))
- var/obj/item/weapon/stamp/ST = crayon
- wash_color = ST.item_color
-
- if(wash_color)
- var/new_jumpsuit_icon_state = ""
- var/new_jumpsuit_item_state = ""
- var/new_jumpsuit_name = ""
- var/new_glove_icon_state = ""
- var/new_glove_item_state = ""
- var/new_glove_name = ""
- var/new_shoe_icon_state = ""
- var/new_shoe_name = ""
- var/new_sheet_icon_state = ""
- var/new_sheet_name = ""
- var/new_softcap_icon_state = ""
- var/new_softcap_name = ""
- var/new_desc = "The colors are a bit dodgy."
- for(var/T in typesof(/obj/item/clothing/under))
- var/obj/item/clothing/under/J = new T
- //world << "DEBUG: [color] == [J.color]"
- if(wash_color == J.item_color)
- new_jumpsuit_icon_state = J.icon_state
- new_jumpsuit_item_state = J.item_state
- new_jumpsuit_name = J.name
- del(J)
- //world << "DEBUG: YUP! [new_icon_state] and [new_item_state]"
- break
- del(J)
- for(var/T in typesof(/obj/item/clothing/gloves))
- var/obj/item/clothing/gloves/G = new T
- //world << "DEBUG: [color] == [J.color]"
- if(wash_color == G.item_color)
- new_glove_icon_state = G.icon_state
- new_glove_item_state = G.item_state
- new_glove_name = G.name
- del(G)
- //world << "DEBUG: YUP! [new_icon_state] and [new_item_state]"
- break
- del(G)
- for(var/T in typesof(/obj/item/clothing/shoes))
- var/obj/item/clothing/shoes/S = new T
- //world << "DEBUG: [color] == [J.color]"
- if(wash_color == S.item_color)
- new_shoe_icon_state = S.icon_state
- new_shoe_name = S.name
- del(S)
- //world << "DEBUG: YUP! [new_icon_state] and [new_item_state]"
- break
- del(S)
- for(var/T in typesof(/obj/item/weapon/bedsheet))
- var/obj/item/weapon/bedsheet/B = new T
- //world << "DEBUG: [color] == [J.color]"
- if(wash_color == B.item_color)
- new_sheet_icon_state = B.icon_state
- new_sheet_name = B.name
- del(B)
- //world << "DEBUG: YUP! [new_icon_state] and [new_item_state]"
- break
- del(B)
- for(var/T in typesof(/obj/item/clothing/head/soft))
- var/obj/item/clothing/head/soft/H = new T
- //world << "DEBUG: [color] == [J.color]"
- if(wash_color == H.item_color)
- new_softcap_icon_state = H.icon_state
- new_softcap_name = H.name
- del(H)
- //world << "DEBUG: YUP! [new_icon_state] and [new_item_state]"
- break
- del(H)
- if(new_jumpsuit_icon_state && new_jumpsuit_item_state && new_jumpsuit_name)
- for(var/obj/item/clothing/under/J in contents)
- //world << "DEBUG: YUP! FOUND IT!"
- J.item_state = new_jumpsuit_item_state
- J.icon_state = new_jumpsuit_icon_state
- J.item_color = wash_color
- J.name = new_jumpsuit_name
- J.desc = new_desc
- if(new_glove_icon_state && new_glove_item_state && new_glove_name)
- for(var/obj/item/clothing/gloves/G in contents)
- //world << "DEBUG: YUP! FOUND IT!"
- G.item_state = new_glove_item_state
- G.icon_state = new_glove_icon_state
- G.item_color = wash_color
- G.name = new_glove_name
- G.desc = new_desc
- if(new_shoe_icon_state && new_shoe_name)
- for(var/obj/item/clothing/shoes/S in contents)
- //world << "DEBUG: YUP! FOUND IT!"
- if (istype(S,/obj/item/clothing/shoes/orange))
- var/obj/item/clothing/shoes/orange/L = S
- if (L.chained)
- L.remove_cuffs()
- S.icon_state = new_shoe_icon_state
- S.item_color = wash_color
- S.name = new_shoe_name
- S.desc = new_desc
- if(new_sheet_icon_state && new_sheet_name)
- for(var/obj/item/weapon/bedsheet/B in contents)
- //world << "DEBUG: YUP! FOUND IT!"
- B.icon_state = new_sheet_icon_state
- B.item_color = wash_color
- B.name = new_sheet_name
- B.desc = new_desc
- if(new_softcap_icon_state && new_softcap_name)
- for(var/obj/item/clothing/head/soft/H in contents)
- //world << "DEBUG: YUP! FOUND IT!"
- H.icon_state = new_softcap_icon_state
- H.item_color = wash_color
- H.name = new_softcap_name
- H.desc = new_desc
- del(crayon)
- crayon = null
-
-
+ qdel(HH)
+
if( locate(/mob,contents) )
state = 7
gibs_ready = 1
@@ -197,7 +76,7 @@
/*if(istype(W,/obj/item/weapon/screwdriver))
panel = !panel
user << "\blue you [panel ? "open" : "close"] the [src]'s maintenance panel"*/
- if(istype(W,/obj/item/toy/crayon) ||istype(W,/obj/item/weapon/stamp))
+ if(istype(W,/obj/item/weapon/pen/crayon) || istype(W,/obj/item/weapon/stamp))
if( state in list( 1, 3, 6 ) )
if(!crayon)
user.drop_item()
@@ -212,7 +91,7 @@
var/obj/item/weapon/grab/G = W
if(ishuman(G.assailant) && iscorgi(G.affecting))
G.affecting.loc = src
- del(G)
+ qdel(G)
state = 3
else
..()
diff --git a/code/game/mecha/combat/marauder.dm b/code/game/mecha/combat/marauder.dm
index d7e64c1ece..bf23e579f3 100644
--- a/code/game/mecha/combat/marauder.dm
+++ b/code/game/mecha/combat/marauder.dm
@@ -63,7 +63,7 @@
if(equipment.len)//Now to remove it and equip anew.
for(ME in equipment)
equipment -= ME
- del(ME)
+ qdel(ME)
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot(src)
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/explosive(src)
@@ -76,6 +76,10 @@
ME.attach(src)
return
+/obj/mecha/combat/marauder/Destroy()
+ qdel(smoke_system)
+ ..()
+
/obj/mecha/combat/marauder/relaymove(mob/user,direction)
if(user != src.occupant) //While not "realistic", this piece is player friendly.
user.loc = get_turf(src)
diff --git a/code/game/mecha/equipment/mecha_equipment.dm b/code/game/mecha/equipment/mecha_equipment.dm
index 2a6e2b6214..f53533828b 100644
--- a/code/game/mecha/equipment/mecha_equipment.dm
+++ b/code/game/mecha/equipment/mecha_equipment.dm
@@ -59,7 +59,7 @@
else
chassis.occupant << sound('sound/mecha/critdestr.ogg',volume=50)
spawn
- del src
+ qdel(src)
return
/obj/item/mecha_parts/mecha_equipment/proc/critfail()
diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm
index 08d6f2cca4..adf27da034 100644
--- a/code/game/mecha/equipment/tools/medical_tools.dm
+++ b/code/game/mecha/equipment/tools/medical_tools.dm
@@ -21,6 +21,10 @@
pr_mech_sleeper.set_delay(equip_cooldown)
return
+ Destroy()
+ qdel(pr_mech_sleeper)
+ ..()
+
allow_drop()
return 0
diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm
index b0ff7e633d..e7bd01c1ef 100644
--- a/code/game/mecha/equipment/tools/tools.dm
+++ b/code/game/mecha/equipment/tools/tools.dm
@@ -15,21 +15,22 @@
action(atom/target)
if(!action_checks(target)) return
if(!cargo_holder) return
-
+
//loading
if(istype(target,/obj))
var/obj/O = target
if(O.buckled_mob)
return
if(locate(/mob/living) in O)
+ occupant_message("You can't load living things into the cargo compartment.")
return
if(O.anchored)
- occupant_message("[target] is firmly secured.")
+ occupant_message("[target] is firmly secured.")
return
if(cargo_holder.cargo.len >= cargo_holder.cargo_capacity)
- occupant_message("Not enough room in cargo compartment.")
+ occupant_message("Not enough room in cargo compartment.")
return
-
+
occupant_message("You lift [target] and start to load it into cargo compartment.")
chassis.visible_message("[chassis] lifts [target] and starts to load it into cargo compartment.")
set_ready_state(0)
@@ -41,10 +42,10 @@
cargo_holder.cargo += O
O.loc = chassis
O.anchored = 0
- occupant_message("[target] succesfully loaded.")
+ occupant_message("[target] succesfully loaded.")
log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]")
else
- occupant_message("You must hold still while handling objects.")
+ occupant_message("You must hold still while handling objects.")
O.anchored = initial(O.anchored)
//attacking
@@ -55,8 +56,8 @@
M.take_overall_damage(dam_force)
M.adjustOxyLoss(round(dam_force/2))
M.updatehealth()
- occupant_message("\red You squeeze [target] with [src.name]. Something cracks.")
- chassis.visible_message("\red [chassis] squeezes [target].")
+ occupant_message("You squeeze [target] with [src.name]. Something cracks.")
+ chassis.visible_message("[chassis] squeezes [target].")
else
step_away(M,chassis)
occupant_message("You push [target] out of the way.")
@@ -82,14 +83,14 @@
if(!target_obj.vars.Find("unacidable") || target_obj.unacidable) return
set_ready_state(0)
chassis.use_power(energy_drain)
- chassis.visible_message("[chassis] starts to drill [target]", "You hear the drill.")
- occupant_message("You start to drill [target]")
+ chassis.visible_message("[chassis] starts to drill [target]", "You hear the drill.")
+ occupant_message("You start to drill [target]")
var/T = chassis.loc
var/C = target.loc //why are these backwards? we may never know -Pete
if(do_after_cooldown(target))
if(T == chassis.loc && src == chassis.selected)
if(istype(target, /turf/simulated/wall/r_wall))
- occupant_message("[target] is too durable to drill through.")
+ occupant_message("[target] is too durable to drill through.")
else if(istype(target, /turf/simulated/mineral))
for(var/turf/simulated/mineral/M in range(chassis,1))
if(get_dir(chassis,M)&chassis.dir)
@@ -133,8 +134,8 @@
if(target_obj.unacidable) return
set_ready_state(0)
chassis.use_power(energy_drain)
- chassis.visible_message("[chassis] starts to drill [target]", "You hear the drill.")
- occupant_message("You start to drill [target]")
+ chassis.visible_message("[chassis] starts to drill [target]", "You hear the drill.")
+ occupant_message("You start to drill [target]")
var/T = chassis.loc
var/C = target.loc //why are these backwards? we may never know -Pete
if(do_after_cooldown(target))
@@ -195,12 +196,12 @@
if( istype(target, /obj/structure/reagent_dispensers/watertank) && get_dist(chassis,target) <= 1)
var/obj/o = target
var/amount = o.reagents.trans_to(src, 200)
- occupant_message("\blue [amount] units transferred into internal tank.")
+ occupant_message("[amount] units transferred into internal tank.")
playsound(chassis, 'sound/effects/refill.ogg', 50, 1, -6)
return
if (src.reagents.total_volume < 1)
- occupant_message("\red \The [src] is empty.")
+ occupant_message("\The [src] is empty.")
return
playsound(chassis, 'sound/effects/extinguish.ogg', 75, 1, -3)
@@ -215,7 +216,7 @@
for(var/a=0, a<5, a++)
spawn(0)
- var/obj/effect/effect/water/W = new /obj/effect/effect/water( get_turf(chassis) )
+ var/obj/effect/effect/water/W = PoolOrNew(/obj/effect/effect/water, get_turf(chassis))
var/turf/my_target = pick(the_targets)
var/datum/reagents/R = new/datum/reagents(5)
if(!W) return
@@ -235,7 +236,7 @@
W.reagents.reaction(atm)
if(W.loc == my_target) break
sleep(2)
- W.delete()
+ qdel(W)
return 1
get_equip_info()
@@ -294,7 +295,7 @@
if(do_after_cooldown(target))
if(disabled) return
chassis.spark_system.start()
- del(target)
+ qdel(target)
playsound(target, 'sound/items/Deconstruct.ogg', 50, 1)
chassis.use_power(energy_drain)
if(1)
@@ -417,7 +418,7 @@
do_after_cooldown()
src = null
spawn(rand(150,300))
- del(P)
+ qdel(P)
return
/obj/item/mecha_parts/mecha_equipment/gravcatapult
@@ -440,7 +441,7 @@
last_fired = world.time
else
if (world.time % 3)
- occupant_message("[src] is not ready to fire again!")
+ occupant_message("[src] is not ready to fire again!")
return 0
switch(mode)
@@ -536,8 +537,8 @@
user << "\red The [W] bounces off [chassis] armor."
chassis.log_append_to_last("Armor saved.")
else
- chassis.occupant_message("[user] hits [chassis] with [W].")
- user.visible_message("[user] hits [chassis] with [W].", "You hit [src] with [W].")
+ chassis.occupant_message("[user] hits [chassis] with [W].")
+ user.visible_message("[user] hits [chassis] with [W].", "You hit [src] with [W].")
chassis.take_damage(round(W.force*damage_coeff),W.damtype)
chassis.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
set_ready_state(0)
@@ -584,7 +585,7 @@
if(!action_checks(src))
return chassis.dynbulletdamage(Proj)
if(prob(chassis.deflect_chance*deflect_coeff))
- chassis.occupant_message("\blue The armor deflects incoming projectile.")
+ chassis.occupant_message("The armor deflects incoming projectile.")
chassis.visible_message("The [chassis.name] armor deflects the projectile")
chassis.log_append_to_last("Armor saved.")
else
@@ -600,7 +601,7 @@
if(!action_checks(A))
return chassis.dynhitby(A)
if(prob(chassis.deflect_chance*deflect_coeff) || istype(A, /mob/living) || istype(A, /obj/item/mecha_parts/mecha_tracking))
- chassis.occupant_message("\blue The [A] bounces off the armor.")
+ chassis.occupant_message("The [A] bounces off the armor.")
chassis.visible_message("The [A] bounces off the [chassis] armor")
chassis.log_append_to_last("Armor saved.")
if(istype(A, /mob/living))
@@ -637,6 +638,11 @@
pr_repair_droid.set_delay(equip_cooldown)
return
+ Destroy()
+ qdel(pr_repair_droid)
+ pr_repair_droid = null
+ ..()
+
attach(obj/mecha/M as obj)
..()
droid_overlay = new(src.icon, icon_state = "repair_droid")
@@ -726,6 +732,11 @@
pr_energy_relay.set_delay(equip_cooldown)
return
+ Destroy()
+ qdel(pr_energy_relay)
+ pr_energy_relay = null
+ ..()
+
detach()
pr_energy_relay.stop()
// chassis.proc_res["dynusepower"] = null
@@ -761,7 +772,7 @@
var/pow_chan
if(A)
for(var/c in use_channels)
- if(A.master && A.master.powered(c))
+ if(A.powered(c))
pow_chan = c
break
return pow_chan
@@ -808,13 +819,13 @@
if(A)
var/pow_chan
for(var/c in list(EQUIP,ENVIRON,LIGHT))
- if(A.master.powered(c))
+ if(A.powered(c))
pow_chan = c
break
if(pow_chan)
var/delta = min(12, ER.chassis.cell.maxcharge-cur_charge)
ER.chassis.give_power(delta)
- A.master.use_power(delta*ER.coeff, pow_chan)
+ A.use_power(delta*ER.coeff, pow_chan)
return
@@ -842,6 +853,11 @@
init()
return
+ Destroy()
+ qdel(pr_mech_generator)
+ pr_mech_generator = null
+ ..()
+
proc/init()
fuel = new /obj/item/stack/sheet/mineral/phoron(src)
fuel.amount = 0
@@ -877,7 +893,7 @@
var/result = load_fuel(target)
var/message
if(isnull(result))
- message = "[fuel] traces in target minimal. [target] cannot be used as fuel."
+ message = "[fuel] traces in target minimal. [target] cannot be used as fuel."
else if(!result)
message = "Unit is full."
else
@@ -902,7 +918,7 @@
attackby(weapon,mob/user)
var/result = load_fuel(weapon)
if(isnull(result))
- user.visible_message("[user] tries to shove [weapon] into [src]. What a dumb-ass.","[fuel] traces minimal. [weapon] cannot be used as fuel.")
+ user.visible_message("[user] tries to shove [weapon] into [src]. What a dumb-ass.","[fuel] traces minimal. [weapon] cannot be used as fuel.")
else if(!result)
user << "Unit is full."
else
@@ -1026,25 +1042,25 @@
cargo_holder.cargo += O
O.loc = chassis
O.anchored = 0
- chassis.occupant_message("[target] succesfully loaded.")
+ chassis.occupant_message("[target] succesfully loaded.")
chassis.log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]")
else
- chassis.occupant_message("You must hold still while handling objects.")
+ chassis.occupant_message("You must hold still while handling objects.")
O.anchored = initial(O.anchored)
else
- chassis.occupant_message("Not enough room in cargo compartment.")
+ chassis.occupant_message("Not enough room in cargo compartment.")
else
- chassis.occupant_message("[target] is firmly secured.")
+ chassis.occupant_message("[target] is firmly secured.")
else if(istype(target,/mob/living))
var/mob/living/M = target
if(M.stat>1) return
if(chassis.occupant.a_intent == I_HURT)
- chassis.occupant_message("\red You obliterate [target] with [src.name], leaving blood and guts everywhere.")
- chassis.visible_message("\red [chassis] destroys [target] in an unholy fury.")
+ chassis.occupant_message("You obliterate [target] with [src.name], leaving blood and guts everywhere.")
+ chassis.visible_message("[chassis] destroys [target] in an unholy fury.")
if(chassis.occupant.a_intent == I_DISARM)
- chassis.occupant_message("\red You tear [target]'s limbs off with [src.name].")
- chassis.visible_message("\red [chassis] rips [target]'s arms off.")
+ chassis.occupant_message("You tear [target]'s limbs off with [src.name].")
+ chassis.visible_message("[chassis] rips [target]'s arms off.")
else
step_away(M,chassis)
chassis.occupant_message("You smash into [target], sending them flying.")
@@ -1086,7 +1102,7 @@
/obj/item/mecha_parts/mecha_equipment/tool/passenger/destroy()
for(var/atom/movable/AM in src)
AM.forceMove(get_turf(src))
- AM << "You tumble out of the destroyed [src.name]!"
+ AM << "You tumble out of the destroyed [src.name]!"
return ..()
/obj/item/mecha_parts/mecha_equipment/tool/passenger/Exit(atom/movable/O)
@@ -1094,7 +1110,7 @@
/obj/item/mecha_parts/mecha_equipment/tool/passenger/proc/move_inside(var/mob/user)
if (chassis)
- chassis.visible_message("\blue [user] starts to climb into [chassis].")
+ chassis.visible_message("[user] starts to climb into [chassis].")
if(do_after(user, 40, needhand=0))
if(!src.occupant)
@@ -1103,7 +1119,7 @@
log_message("[user] boarded.")
occupant_message("[user] boarded.")
else if(src.occupant != user)
- user << "\red [src.occupant] was faster. Try better next time, loser."
+ user << "[src.occupant] was faster. Try better next time, loser."
else
user << "You stop entering the exosuit."
@@ -1178,18 +1194,18 @@
return
if (!isturf(usr.loc))
- usr << "\red You can't reach the passenger compartment from here."
+ usr << "You can't reach the passenger compartment from here."
return
if(iscarbon(usr))
var/mob/living/carbon/C = usr
if(C.handcuffed)
- usr << "\red Kinda hard to climb in while handcuffed don't you think?"
+ usr << "Kinda hard to climb in while handcuffed don't you think?"
return
for(var/mob/living/carbon/slime/M in range(1,usr))
if(M.Victim == usr)
- usr << "\red You're too busy getting your life sucked out of you."
+ usr << "You're too busy getting your life sucked out of you."
return
//search for a valid passenger compartment
@@ -1209,10 +1225,10 @@
//didn't find anything
switch (feedback)
if (OCCUPIED)
- usr << "\red The passenger compartment is already occupied!"
+ usr << "The passenger compartment is already occupied!"
if (LOCKED)
- usr << "\red The passenger compartment hatch is locked!"
+ usr << "The passenger compartment hatch is locked!"
if (OCCUPIED|LOCKED)
- usr << "\red All of the passenger compartments are already occupied or locked!"
+ usr << "All of the passenger compartments are already occupied or locked!"
if (0)
- usr << "\red \The [src] doesn't have a passenger compartment."
+ usr << "\The [src] doesn't have a passenger compartment."
diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm
index 3d36efea9c..13d0600df4 100644
--- a/code/game/mecha/equipment/weapons/weapons.dm
+++ b/code/game/mecha/equipment/weapons/weapons.dm
@@ -113,7 +113,7 @@
A.bullet_act(src, def_zone)
src.life -= 10
if(life <= 0)
- del(src)
+ qdel(src)
return
/obj/item/mecha_parts/mecha_equipment/weapon/energy/taser
@@ -249,7 +249,7 @@
throw_impact(atom/hit_atom)
if(primed)
explosion(hit_atom, 0, 1, 2, 4)
- del(src)
+ qdel(src)
else
..()
return
diff --git a/code/game/mecha/mech_bay.dm b/code/game/mecha/mech_bay.dm
index d3c249b747..615261bc5f 100644
--- a/code/game/mecha/mech_bay.dm
+++ b/code/game/mecha/mech_bay.dm
@@ -139,6 +139,7 @@
anchored = 1
icon = 'icons/obj/computer.dmi'
icon_state = "recharge_comp"
+ light_color = "#a97faa"
circuit = "/obj/item/weapon/circuitboard/mech_bay_power_console"
var/autostart = 1
var/voltage = 45
@@ -214,4 +215,4 @@
// open the new ui window
ui.open()
// auto update every Master Controller tick
- ui.set_auto_update(1)
\ No newline at end of file
+ ui.set_auto_update(1)
diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm
index f000499ffd..cc1c1aedbb 100644
--- a/code/game/mecha/mech_fabricator.dm
+++ b/code/game/mecha/mech_fabricator.dm
@@ -193,9 +193,9 @@
if(time_coeff!=diff)
time_coeff = diff
-/obj/machinery/mecha_part_fabricator/Del()
+/obj/machinery/mecha_part_fabricator/Destroy()
for(var/atom/A in src)
- del A
+ qdel(A)
..()
return
@@ -268,7 +268,7 @@
if(!istype(apart)) return 0
for(var/obj/O in part_set)
if(O.type == apart.type)
- del apart
+ qdel(apart)
return 0
part_set[++part_set.len] = apart
return 1
@@ -511,7 +511,7 @@
src.updateUsrDialog()
sleep(30) //only sleep if called by user
var/found = 0
- for(var/obj/machinery/computer/rdconsole/RDC in get_area(src))
+ for(var/obj/machinery/computer/rdconsole/RDC in get_area_all_atoms(get_area(src)))
if(!RDC.sync)
continue
found++
@@ -749,7 +749,7 @@
res.Move(src.loc)
result = res.amount
else
- del res
+ qdel(res)
return result
@@ -795,7 +795,7 @@
if(src.resources["diamond"] >= 2000)
var/obj/item/stack/sheet/mineral/diamond/G = new /obj/item/stack/sheet/mineral/diamond(src.loc)
G.amount = round(src.resources["diamond"] / G.perunit)
- del(src)
+ qdel(src)
return 1
else
user << "\red You can't load the [src.name] while it's opened."
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index 45abb3d6ea..b0423340e7 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -82,6 +82,7 @@
/obj/mecha/New()
..()
events = new
+
icon_state += "-open"
add_radio()
add_cabin()
@@ -98,11 +99,60 @@
mechas_list += src //global mech list
return
-/obj/mecha/Del()
+/obj/mecha/Destroy()
src.go_out()
+ for(var/mob/M in src) //Let's just be ultra sure
+ M.Move(loc)
+
+ if(loc)
+ loc.Exited(src)
+ loc = null
+
+ if(prob(30))
+ explosion(get_turf(loc), 0, 0, 1, 3)
+
+ if(wreckage)
+ var/obj/effect/decal/mecha_wreckage/WR = new wreckage(loc)
+ for(var/obj/item/mecha_parts/mecha_equipment/E in equipment)
+ if(E.salvageable && prob(30))
+ WR.crowbar_salvage += E
+ E.forceMove(WR)
+ E.equip_ready = 1
+ E.reliability = round(rand(E.reliability/3,E.reliability))
+ else
+ E.forceMove(loc)
+ E.destroy()
+ if(cell)
+ WR.crowbar_salvage += cell
+ cell.forceMove(WR)
+ cell.charge = rand(0, cell.charge)
+ if(internal_tank)
+ WR.crowbar_salvage += internal_tank
+ internal_tank.forceMove(WR)
+ else
+ for(var/obj/item/mecha_parts/mecha_equipment/E in equipment)
+ E.detach(loc)
+ E.destroy()
+ if(cell)
+ qdel(cell)
+ if(internal_tank)
+ qdel(internal_tank)
+ equipment.Cut()
+ cell = null
+ internal_tank = null
+
+ qdel(pr_int_temp_processor)
+ qdel(pr_inertial_movement)
+ qdel(pr_give_air)
+ qdel(pr_internal_damage)
+ qdel(spark_system)
+ pr_int_temp_processor = null
+ pr_give_air = null
+ pr_internal_damage = null
+ spark_system = null
+
mechas_list -= src //global mech list
..()
- return
////////////////////////
////// Helpers /////////
@@ -447,12 +497,17 @@
/obj/mecha/proc/dynabsorbdamage(damage,damage_type)
return damage*(listgetindex(damage_absorption,damage_type) || 1)
+/obj/mecha/airlock_crush(var/crush_damage)
+ ..()
+ take_damage(crush_damage)
+ check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
+ return 1
/obj/mecha/proc/update_health()
if(src.health > 0)
src.spark_system.start()
else
- src.destroy()
+ qdel(src)
return
/obj/mecha/attack_hand(mob/user as mob)
@@ -555,52 +610,6 @@
Proj.on_hit(src)
return
-/obj/mecha/proc/destroy()
- spawn()
- go_out()
- var/turf/T = get_turf(src)
- tag = "\ref[src]" //better safe then sorry
- if(loc)
- loc.Exited(src)
- loc = null
- if(T)
- if(istype(src, /obj/mecha/working/ripley/))
- var/obj/mecha/working/ripley/R = src
- if(R.cargo)
- for(var/obj/O in R.cargo) //Dump contents of stored cargo
- O.loc = T
- R.cargo -= O
- T.Entered(O)
-
- if(prob(30))
- explosion(T, 0, 0, 1, 3)
- spawn(0)
- if(wreckage)
- var/obj/effect/decal/mecha_wreckage/WR = new wreckage(T)
- for(var/obj/item/mecha_parts/mecha_equipment/E in equipment)
- if(E.salvageable && prob(30))
- WR.crowbar_salvage += E
- E.forceMove(WR)
- E.equip_ready = 1
- E.reliability = round(rand(E.reliability/3,E.reliability))
- else
- E.forceMove(T)
- E.destroy()
- if(cell)
- WR.crowbar_salvage += cell
- cell.forceMove(WR)
- cell.charge = rand(0, cell.charge)
- if(internal_tank)
- WR.crowbar_salvage += internal_tank
- internal_tank.forceMove(WR)
- else
- for(var/obj/item/mecha_parts/mecha_equipment/E in equipment)
- E.forceMove(T)
- E.destroy()
- spawn(0)
- del(src)
- return
-
/obj/mecha/ex_act(severity)
src.log_message("Affected by explosion of severity: [severity].",1)
if(prob(src.deflect_chance))
@@ -608,16 +617,16 @@
src.log_append_to_last("Armor saved, changing severity to [severity].")
switch(severity)
if(1.0)
- src.destroy()
+ qdel(src)
if(2.0)
if (prob(30))
- src.destroy()
+ qdel(src)
else
src.take_damage(initial(src.health)/2)
src.check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT),1)
if(3.0)
if (prob(5))
- src.destroy()
+ qdel(src)
else
src.take_damage(initial(src.health)/5)
src.check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT),1)
@@ -831,7 +840,7 @@
src.reset_icon()
user.drop_item()
- del(P)
+ qdel(P)
else
call((proc_res["dynattackby"]||src), "dynattackby")(W,user)
@@ -995,8 +1004,8 @@
set popup_menu = 0
if(usr!=occupant) return
lights = !lights
- if(lights) SetLuminosity(luminosity + lights_power)
- else SetLuminosity(luminosity - lights_power)
+ if(lights) set_light(light_range + lights_power)
+ else set_light(light_range - lights_power)
src.occupant_message("Toggled lights [lights?"on":"off"].")
log_message("Toggled lights [lights?"on":"off"].")
return
@@ -1732,7 +1741,7 @@
AI.bruteloss = O.getBruteLoss()
AI.toxloss = O.toxloss
AI.updatehealth()
- del(O)
+ qdel(O)
if (!AI.stat)
AI.icon_state = "ai"
else
@@ -1840,7 +1849,7 @@
if(t_air)
t_air.merge(removed)
else //just delete the cabin gas, we're in space or some shit
- del(removed)
+ qdel(removed)
else
return stop()
return
@@ -1883,7 +1892,7 @@
if(mecha.loc && hascall(mecha.loc,"assume_air"))
mecha.loc.assume_air(leaked_gas)
else
- del(leaked_gas)
+ qdel(leaked_gas)
if(mecha.hasInternalDamage(MECHA_INT_SHORT_CIRCUIT))
if(mecha.get_charge())
mecha.spark_system.start()
diff --git a/code/game/mecha/mecha_construction_paths.dm b/code/game/mecha/mecha_construction_paths.dm
index 233415cba8..167b9f63d0 100644
--- a/code/game/mecha/mecha_construction_paths.dm
+++ b/code/game/mecha/mecha_construction_paths.dm
@@ -78,7 +78,7 @@
custom_action(step, atom/used_atom, mob/user)
user.visible_message("[user] has connected [used_atom] to [holder].", "You connect [used_atom] to [holder]")
holder.overlays += used_atom.icon_state+"+o"
- del used_atom
+ qdel(used_atom)
return 1
action(atom/used_atom,mob/user as mob)
@@ -92,7 +92,7 @@
const_holder.density = 1
const_holder.overlays.len = 0
spawn()
- del src
+ qdel(src)
return
@@ -194,7 +194,7 @@
if(10)
if(diff==FORWARD)
user.visible_message("[user] installs the central control module into [holder].", "You install the central computer mainboard into [holder].")
- del used_atom
+ qdel(used_atom)
holder.icon_state = "ripley5"
else
user.visible_message("[user] disconnects the wiring of [holder].", "You disconnect the wiring of [holder].")
@@ -210,7 +210,7 @@
if(8)
if(diff==FORWARD)
user.visible_message("[user] installs the peripherals control module into [holder].", "You install the peripherals control module into [holder].")
- del used_atom
+ qdel(used_atom)
holder.icon_state = "ripley7"
else
user.visible_message("[user] unfastens the mainboard.", "You unfasten the mainboard.")
@@ -289,7 +289,7 @@
custom_action(step, atom/used_atom, mob/user)
user.visible_message("[user] has connected [used_atom] to [holder].", "You connect [used_atom] to [holder]")
holder.overlays += used_atom.icon_state+"+o"
- del used_atom
+ qdel(used_atom)
return 1
action(atom/used_atom,mob/user as mob)
@@ -302,7 +302,7 @@
const_holder.icon_state = "gygax0"
const_holder.density = 1
spawn()
- del src
+ qdel(src)
return
@@ -428,7 +428,7 @@
if(16)
if(diff==FORWARD)
user.visible_message("[user] installs the central control module into [holder].", "You install the central computer mainboard into [holder].")
- del used_atom
+ qdel(used_atom)
holder.icon_state = "gygax5"
else
user.visible_message("[user] disconnects the wiring of [holder].", "You disconnect the wiring of [holder].")
@@ -444,7 +444,7 @@
if(14)
if(diff==FORWARD)
user.visible_message("[user] installs the peripherals control module into [holder].", "You install the peripherals control module into [holder].")
- del used_atom
+ qdel(used_atom)
holder.icon_state = "gygax7"
else
user.visible_message("[user] unfastens the mainboard.", "You unfasten the mainboard.")
@@ -460,7 +460,7 @@
if(12)
if(diff==FORWARD)
user.visible_message("[user] installs the weapon control module into [holder].", "You install the weapon control module into [holder].")
- del used_atom
+ qdel(used_atom)
holder.icon_state = "gygax9"
else
user.visible_message("[user] unfastens the peripherals control module.", "You unfasten the peripherals control module.")
@@ -476,7 +476,7 @@
if(10)
if(diff==FORWARD)
user.visible_message("[user] installs advanced scanner module to [holder].", "You install advanced scanner module to [holder].")
- del used_atom
+ qdel(used_atom)
holder.icon_state = "gygax11"
else
user.visible_message("[user] unfastens the weapon control module.", "You unfasten the weapon control module.")
@@ -492,7 +492,7 @@
if(8)
if(diff==FORWARD)
user.visible_message("[user] installs advanced capacitor to [holder].", "You install advanced capacitor to [holder].")
- del used_atom
+ qdel(used_atom)
holder.icon_state = "gygax13"
else
user.visible_message("[user] unfastens the advanced scanner module.", "You unfasten the advanced scanner module.")
@@ -531,7 +531,7 @@
if(3)
if(diff==FORWARD)
user.visible_message("[user] installs Gygax Armour Plates to [holder].", "You install Gygax Armour Plates to [holder].")
- del used_atom
+ qdel(used_atom)
holder.icon_state = "gygax18"
else
user.visible_message("[user] cuts internal armor layer from [holder].", "You cut the internal armor layer from [holder].")
@@ -570,7 +570,7 @@
user.visible_message("[user] has connected [used_atom] to [holder].", "You connect [used_atom] to [holder]")
holder.overlays += used_atom.icon_state+"+o"
user.drop_item()
- del used_atom
+ qdel(used_atom)
return 1
action(atom/used_atom,mob/user as mob)
@@ -583,7 +583,7 @@
const_holder.icon_state = "fireripley0"
const_holder.density = 1
spawn()
- del src
+ qdel(src)
return
@@ -690,7 +690,7 @@
if(11)
if(diff==FORWARD)
user.visible_message("[user] installs the central control module into [holder].", "You install the central computer mainboard into [holder].")
- del used_atom
+ qdel(used_atom)
holder.icon_state = "fireripley5"
else
user.visible_message("[user] disconnects the wiring of [holder].", "You disconnect the wiring of [holder].")
@@ -706,7 +706,7 @@
if(9)
if(diff==FORWARD)
user.visible_message("[user] installs the peripherals control module into [holder].", "You install the peripherals control module into [holder].")
- del used_atom
+ qdel(used_atom)
holder.icon_state = "fireripley7"
else
user.visible_message("[user] unfastens the mainboard.", "You unfasten the mainboard.")
@@ -793,7 +793,7 @@
custom_action(step, atom/used_atom, mob/user)
user.visible_message("[user] has connected [used_atom] to [holder].", "You connect [used_atom] to [holder]")
holder.overlays += used_atom.icon_state+"+o"
- del used_atom
+ qdel(used_atom)
return 1
action(atom/used_atom,mob/user as mob)
@@ -806,7 +806,7 @@
const_holder.icon_state = "durand0"
const_holder.density = 1
spawn()
- del src
+ qdel(src)
return
/datum/construction/reversible/mecha/durand
@@ -932,7 +932,7 @@
if(16)
if(diff==FORWARD)
user.visible_message("[user] installs the central control module into [holder].", "You install the central computer mainboard into [holder].")
- del used_atom
+ qdel(used_atom)
holder.icon_state = "durand5"
else
user.visible_message("[user] disconnects the wiring of [holder].", "You disconnect the wiring of [holder].")
@@ -948,7 +948,7 @@
if(14)
if(diff==FORWARD)
user.visible_message("[user] installs the peripherals control module into [holder].", "You install the peripherals control module into [holder].")
- del used_atom
+ qdel(used_atom)
holder.icon_state = "durand7"
else
user.visible_message("[user] unfastens the mainboard.", "You unfasten the mainboard.")
@@ -964,7 +964,7 @@
if(12)
if(diff==FORWARD)
user.visible_message("[user] installs the weapon control module into [holder].", "You install the weapon control module into [holder].")
- del used_atom
+ qdel(used_atom)
holder.icon_state = "durand9"
else
user.visible_message("[user] unfastens the peripherals control module.", "You unfasten the peripherals control module.")
@@ -980,7 +980,7 @@
if(10)
if(diff==FORWARD)
user.visible_message("[user] installs advanced scanner module to [holder].", "You install advanced scanner module to [holder].")
- del used_atom
+ qdel(used_atom)
holder.icon_state = "durand11"
else
user.visible_message("[user] unfastens the weapon control module.", "You unfasten the weapon control module.")
@@ -996,7 +996,7 @@
if(8)
if(diff==FORWARD)
user.visible_message("[user] installs advanced capacitor to [holder].", "You install advanced capacitor to [holder].")
- del used_atom
+ qdel(used_atom)
holder.icon_state = "durand13"
else
user.visible_message("[user] unfastens the advanced scanner module.", "You unfasten the advanced scanner module.")
@@ -1035,7 +1035,7 @@
if(3)
if(diff==FORWARD)
user.visible_message("[user] installs Durand Armour Plates to [holder].", "You install Durand Armour Plates to [holder].")
- del used_atom
+ qdel(used_atom)
holder.icon_state = "durand18"
else
user.visible_message("[user] cuts internal armor layer from [holder].", "You cut the internal armor layer from [holder].")
@@ -1075,7 +1075,7 @@
custom_action(step, atom/used_atom, mob/user)
user.visible_message("[user] has connected [used_atom] to [holder].", "You connect [used_atom] to [holder]")
holder.overlays += used_atom.icon_state+"+o"
- del used_atom
+ qdel(used_atom)
return 1
action(atom/used_atom,mob/user as mob)
@@ -1096,7 +1096,7 @@
custom_action(step, atom/used_atom, mob/user)
user.visible_message("[user] has connected [used_atom] to [holder].", "You connect [used_atom] to [holder]")
holder.overlays += used_atom.icon_state+"+o"
- del used_atom
+ qdel(used_atom)
return 1
action(atom/used_atom,mob/user as mob)
@@ -1109,7 +1109,7 @@
const_holder.icon_state = "odysseus0"
const_holder.density = 1
spawn()
- del src
+ qdel(src)
return
@@ -1211,7 +1211,7 @@
if(10)
if(diff==FORWARD)
user.visible_message("[user] installs the central control module into [holder].", "You install the central computer mainboard into [holder].")
- del used_atom
+ qdel(used_atom)
holder.icon_state = "odysseus5"
else
user.visible_message("[user] disconnects the wiring of [holder].", "You disconnect the wiring of [holder].")
@@ -1227,7 +1227,7 @@
if(8)
if(diff==FORWARD)
user.visible_message("[user] installs the peripherals control module into [holder].", "You install the peripherals control module into [holder].")
- del used_atom
+ qdel(used_atom)
holder.icon_state = "odysseus7"
else
user.visible_message("[user] unfastens the mainboard.", "You unfasten the mainboard.")
diff --git a/code/game/mecha/mecha_control_console.dm b/code/game/mecha/mecha_control_console.dm
index 8fa25a3568..92d7f6ee66 100644
--- a/code/game/mecha/mecha_control_console.dm
+++ b/code/game/mecha/mecha_control_console.dm
@@ -2,6 +2,7 @@
name = "Exosuit Control"
icon = 'icons/obj/computer.dmi'
icon_state = "mecha"
+ light_color = "#a97faa"
req_access = list(access_robotics)
circuit = "/obj/item/weapon/circuitboard/mecha_control"
var/list/located = list()
@@ -90,11 +91,11 @@
return answer
emp_act()
- del src
+ qdel(src)
return
ex_act()
- del src
+ qdel(src)
return
proc/in_mecha()
@@ -106,7 +107,7 @@
var/obj/mecha/M = in_mecha()
if(M)
M.emp_act(2)
- del(src)
+ qdel(src)
proc/get_mecha_log()
if(!src.in_mecha())
diff --git a/code/game/mecha/mecha_wreckage.dm b/code/game/mecha/mecha_wreckage.dm
index 96b410959b..8bbeb03fd7 100644
--- a/code/game/mecha/mecha_wreckage.dm
+++ b/code/game/mecha/mecha_wreckage.dm
@@ -23,7 +23,7 @@
/obj/effect/decal/mecha_wreckage/ex_act(severity)
if(severity < 2)
spawn
- del src
+ qdel(src)
return
/obj/effect/decal/mecha_wreckage/bullet_act(var/obj/item/projectile/Proj)
diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm
index 5beb3c7244..c51a34adef 100644
--- a/code/game/mecha/working/ripley.dm
+++ b/code/game/mecha/working/ripley.dm
@@ -9,6 +9,16 @@
wreckage = /obj/effect/decal/mecha_wreckage/ripley
cargo_capacity = 10
+/obj/mecha/working/ripley/Destroy()
+ for(var/atom/movable/A in src.cargo)
+ A.loc = loc
+ var/turf/T = loc
+ if(istype(T))
+ T.Entered(A)
+ step_rand(A)
+ cargo.Cut()
+ ..()
+
/obj/mecha/working/ripley/firefighter
desc = "Standart APLU chassis was refitted with additional thermal protection and cistern."
name = "APLU \"Firefighter\""
@@ -54,6 +64,6 @@
var/obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp/HC = new /obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp
HC.attach(src)
for(var/obj/item/mecha_parts/mecha_tracking/B in src.contents)//Deletes the beacon so it can't be found easily
- del (B)
+ qdel (B)
diff --git a/code/game/mecha/working/working.dm b/code/game/mecha/working/working.dm
index 1fa6d4f5ac..d9e876688f 100644
--- a/code/game/mecha/working/working.dm
+++ b/code/game/mecha/working/working.dm
@@ -10,7 +10,7 @@
new /obj/item/mecha_parts/mecha_tracking(src)
return
-/obj/mecha/working/Del()
+/obj/mecha/working/Destroy()
for(var/mob/M in src)
if(M==src.occupant)
continue
diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm
index d64857d004..6b79db8f5b 100644
--- a/code/game/objects/buckling.dm
+++ b/code/game/objects/buckling.dm
@@ -15,10 +15,16 @@
if(can_buckle && istype(M))
user_buckle_mob(M, user)
+//Cleanup
/obj/Del()
unbuckle_mob()
return ..()
+/obj/Destroy()
+ unbuckle_mob()
+ return ..()
+
+
/obj/proc/buckle_mob(mob/living/M)
if(!can_buckle || !istype(M) || (M.loc != loc) || M.buckled || M.pinned.len || (buckle_require_restraints && !M.restrained()))
return 0
@@ -84,3 +90,4 @@
"You hear metal clanking.")
add_fingerprint(user)
return M
+
diff --git a/code/game/objects/effects/aliens.dm b/code/game/objects/effects/aliens.dm
index 840d779510..6882f9affa 100644
--- a/code/game/objects/effects/aliens.dm
+++ b/code/game/objects/effects/aliens.dm
@@ -46,7 +46,7 @@
var/turf/T = get_turf(src)
T.thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT
-/obj/effect/alien/resin/Del()
+/obj/effect/alien/resin/Destroy()
var/turf/T = get_turf(src)
T.thermal_conductivity = initial(T.thermal_conductivity)
..()
@@ -54,7 +54,7 @@
/obj/effect/alien/resin/proc/healthcheck()
if(health <=0)
density = 0
- del(src)
+ qdel(src)
return
/obj/effect/alien/resin/bullet_act(var/obj/item/projectile/Proj)
@@ -164,7 +164,7 @@
name = "purple sac"
desc = "Weird purple octopus-like thing."
layer = 3
- luminosity = NODERANGE
+ light_range = NODERANGE
var/node_range = NODERANGE
/obj/effect/alien/weeds/node/New()
@@ -174,7 +174,7 @@
/obj/effect/alien/weeds/New(pos, node)
..()
if(istype(loc, /turf/space))
- del(src)
+ qdel(src)
return
linked_node = node
if(icon_state == "weeds")icon_state = pick("weeds", "weeds1", "weeds2")
@@ -190,7 +190,7 @@
if (locate(/obj/movable, U))
U = locate(/obj/movable, U)
if(U.density == 1)
- del(src)
+ qdel(src)
return
Alien plants should do something if theres a lot of poison
@@ -200,7 +200,7 @@ Alien plants should do something if theres a lot of poison
return
*/
if (istype(U, /turf/space))
- del(src)
+ qdel(src)
return
if(!linked_node || (get_dist(linked_node, src) > linked_node.node_range) )
@@ -220,19 +220,19 @@ Alien plants should do something if theres a lot of poison
if(O.density)
continue direction_loop
- new /obj/effect/alien/weeds(T, linked_node)
+ PoolOrNew(/obj/effect/alien/weeds, T, linked_node)
/obj/effect/alien/weeds/ex_act(severity)
switch(severity)
if(1.0)
- del(src)
+ qdel(src)
if(2.0)
if (prob(50))
- del(src)
+ qdel(src)
if(3.0)
if (prob(5))
- del(src)
+ qdel(src)
return
/obj/effect/alien/weeds/attackby(var/obj/item/weapon/W, var/mob/user)
@@ -255,7 +255,7 @@ Alien plants should do something if theres a lot of poison
/obj/effect/alien/weeds/proc/healthcheck()
if(health <= 0)
- del(src)
+ qdel(src)
/obj/effect/alien/weeds/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
@@ -294,7 +294,7 @@ Alien plants should do something if theres a lot of poison
/obj/effect/alien/acid/proc/tick()
if(!target)
- del(src)
+ qdel(src)
ticks += 1
@@ -307,8 +307,8 @@ Alien plants should do something if theres a lot of poison
var/turf/simulated/wall/W = target
W.dismantle_wall(1)
else
- del(target)
- del(src)
+ qdel(target)
+ qdel(src)
return
switch(target_strength - ticks)
@@ -350,7 +350,7 @@ Alien plants should do something if theres a lot of poison
spawn(rand(MIN_GROWTH_TIME,MAX_GROWTH_TIME))
Grow()
else
- del(src)
+ qdel(src)
/obj/effect/alien/egg/attack_hand(user as mob)
@@ -361,7 +361,7 @@ Alien plants should do something if theres a lot of poison
switch(status)
if(BURST)
user << "\red You clear the hatched egg."
- del(src)
+ qdel(src)
return
if(GROWING)
user << "\red The child is not developed yet."
diff --git a/code/game/objects/effects/bump_teleporter.dm b/code/game/objects/effects/bump_teleporter.dm
index c4f693da15..9379234ca6 100644
--- a/code/game/objects/effects/bump_teleporter.dm
+++ b/code/game/objects/effects/bump_teleporter.dm
@@ -15,9 +15,9 @@ var/list/obj/effect/bump_teleporter/BUMP_TELEPORTERS = list()
..()
BUMP_TELEPORTERS += src
-/obj/effect/bump_teleporter/Del()
+/obj/effect/bump_teleporter/Destroy()
BUMP_TELEPORTERS -= src
- ..()
+ return ..()
/obj/effect/bump_teleporter/Bumped(atom/user)
if(!ismob(user))
diff --git a/code/game/objects/effects/chemsmoke.dm b/code/game/objects/effects/chemsmoke.dm
index e64a84c47c..37ea4fd096 100644
--- a/code/game/objects/effects/chemsmoke.dm
+++ b/code/game/objects/effects/chemsmoke.dm
@@ -31,7 +31,7 @@
if(seed_name && plant_controller)
seed = plant_controller.seeds[seed_name]
if(!seed)
- del(src)
+ qdel(src)
..()
/datum/effect/effect/system/smoke_spread/chem/New()
@@ -155,7 +155,7 @@
//build smoke icon
- var/color = mix_color_from_reagents(chemholder.reagents.reagent_list)
+ var/color = chemholder.reagents.get_color()
var/icon/I
if(color)
I = icon('icons/effects/chemsmoke.dmi')
@@ -204,7 +204,7 @@
if(passed_smoke)
smoke = passed_smoke
else
- smoke = new(location)
+ smoke = PoolOrNew(/obj/effect/effect/smoke/chem, location)
if(chemholder.reagents.reagent_list.len)
chemholder.reagents.copy_to(smoke, chemholder.reagents.total_volume / dist, safety = 1) //copy reagents to the smoke so mob/breathe() can handle inhaling the reagents
@@ -218,10 +218,10 @@
sleep(150+rand(0,20)) // turning it off before it is deleted results in cleaner
smoke.opacity = 0 // lighting and view range updates
fadeOut(smoke)
- smoke.delete()
+ qdel(src)
/datum/effect/effect/system/smoke_spread/chem/spores/spawnSmoke(var/turf/T, var/icon/I, var/dist = 1)
- var/obj/effect/effect/smoke/chem/spores = new(location)
+ var/obj/effect/effect/smoke/chem/spores = PoolOrNew(/obj/effect/effect/smoke/chem, location)
spores.name = "cloud of [seed.seed_name] [seed.seed_noun]"
..(T, I, dist, spores)
@@ -229,6 +229,10 @@
// Fades out the smoke smoothly using it's alpha variable.
//------------------------------------------
/datum/effect/effect/system/smoke_spread/chem/proc/fadeOut(var/atom/A, var/frames = 16)
+ if(A.alpha == 0) //Handle already transparent case
+ return
+ if(frames == 0)
+ frames = 1 //We will just assume that by 0 frames, the coder meant "during one frame".
var/step = A.alpha / frames
for(var/i = 0, i < frames, i++)
A.alpha -= step
diff --git a/code/game/objects/effects/decals/Cleanable/fuel.dm b/code/game/objects/effects/decals/Cleanable/fuel.dm
index c9ea58b121..2bf3a2a574 100644
--- a/code/game/objects/effects/decals/Cleanable/fuel.dm
+++ b/code/game/objects/effects/decals/Cleanable/fuel.dm
@@ -25,7 +25,7 @@
if(!has_spread)
Spread()
else
- del(src)
+ qdel(src)
proc/Spread(exclude=list())
//Allows liquid fuels to sometimes flow into other tiles.
diff --git a/code/game/objects/effects/decals/Cleanable/humans.dm b/code/game/objects/effects/decals/Cleanable/humans.dm
index c6b3137806..b81089d9fb 100644
--- a/code/game/objects/effects/decals/Cleanable/humans.dm
+++ b/code/game/objects/effects/decals/Cleanable/humans.dm
@@ -21,10 +21,10 @@ var/global/list/image/splatter_cache=list()
var/list/datum/disease2/disease/virus2 = list()
var/amount = 5
-/obj/effect/decal/cleanable/blood/Del()
+/obj/effect/decal/cleanable/blood/Destroy()
for(var/datum/disease/D in viruses)
D.cure(0)
- ..()
+ return ..()
/obj/effect/decal/cleanable/blood/New()
..()
@@ -37,7 +37,7 @@ var/global/list/image/splatter_cache=list()
if(B != src)
if (B.blood_DNA)
blood_DNA |= B.blood_DNA.Copy()
- del(B)
+ qdel(B)
spawn(DRYING_TIME * (amount+1))
dry()
@@ -198,7 +198,7 @@ var/global/list/image/splatter_cache=list()
for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++)
sleep(3)
if (i > 0)
- var/obj/effect/decal/cleanable/blood/b = new /obj/effect/decal/cleanable/blood/splatter(src.loc)
+ var/obj/effect/decal/cleanable/blood/b = PoolOrNew(/obj/effect/decal/cleanable/blood/splatter, src.loc)
b.basecolor = src.basecolor
b.update_icon()
for(var/datum/disease/D in src.viruses)
diff --git a/code/game/objects/effects/decals/Cleanable/misc.dm b/code/game/objects/effects/decals/Cleanable/misc.dm
index 4c85144d1e..c70a5ab9fc 100644
--- a/code/game/objects/effects/decals/Cleanable/misc.dm
+++ b/code/game/objects/effects/decals/Cleanable/misc.dm
@@ -21,14 +21,14 @@
var/turf/simulated/floor/F = get_turf(src)
if (istype(F))
F.dirt += 4
- del(src)
+ qdel(src)
/obj/effect/decal/cleanable/greenglow
New()
..()
spawn(1200)// 2 minutes
- del(src)
+ qdel(src)
/obj/effect/decal/cleanable/dirt
name = "dirt"
@@ -58,7 +58,7 @@
density = 0
anchored = 1
layer = 2
- luminosity = 1
+ light_range = 1
icon = 'icons/effects/effects.dmi'
icon_state = "greenglow"
@@ -102,7 +102,7 @@
random_icon_states = list("vomit_1", "vomit_2", "vomit_3", "vomit_4")
var/list/viruses = list()
- Del()
+ Destroy()
for(var/datum/disease/D in viruses)
D.cure(0)
..()
@@ -142,4 +142,4 @@
layer = 2
icon = 'icons/effects/blood.dmi'
icon_state = "mfloor1"
- random_icon_states = list("mfloor1", "mfloor2", "mfloor3", "mfloor4", "mfloor5", "mfloor6", "mfloor7")
\ No newline at end of file
+ random_icon_states = list("mfloor1", "mfloor2", "mfloor3", "mfloor4", "mfloor5", "mfloor6", "mfloor7")
diff --git a/code/game/objects/effects/decals/cleanable.dm b/code/game/objects/effects/decals/cleanable.dm
index 63956f5e89..dc5e6c57e8 100644
--- a/code/game/objects/effects/decals/cleanable.dm
+++ b/code/game/objects/effects/decals/cleanable.dm
@@ -1,6 +1,5 @@
/obj/effect/decal/cleanable
var/list/random_icon_states = list()
- var/targeted_by = null // Used so cleanbots can't claim a mess.
/obj/effect/decal/cleanable/New()
if (random_icon_states && length(src.random_icon_states) > 0)
diff --git a/code/game/objects/effects/decals/contraband.dm b/code/game/objects/effects/decals/contraband.dm
index 9d097f47a0..eac899d5b1 100644
--- a/code/game/objects/effects/decals/contraband.dm
+++ b/code/game/objects/effects/decals/contraband.dm
@@ -72,7 +72,7 @@
else
P.roll_and_drop(P.loc)
- del(oldsrc) //delete it now to cut down on sanity checks afterwards. Agouri's code supports rerolling it anyway
+ qdel(oldsrc) //delete it now to cut down on sanity checks afterwards. Agouri's code supports rerolling it anyway
//############################## THE ACTUAL DECALS ###########################
@@ -125,7 +125,7 @@
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
if(ruined)
user << "You remove the remnants of the poster."
- del(src)
+ qdel(src)
else
user << "You carefully remove the poster from the wall."
roll_and_drop(user.loc)
@@ -154,7 +154,7 @@
var/obj/item/weapon/contraband/poster/P = new(src, serial_number)
P.loc = newloc
src.loc = P
- del(src)
+ qdel(src)
/datum/poster
// Name suffix. Poster - [name]
diff --git a/code/game/objects/effects/decals/remains.dm b/code/game/objects/effects/decals/remains.dm
index dd786ddc0d..ff3c8d4a61 100644
--- a/code/game/objects/effects/decals/remains.dm
+++ b/code/game/objects/effects/decals/remains.dm
@@ -30,7 +30,7 @@
var/turf/simulated/floor/F = get_turf(src)
if (istype(F))
new /obj/effect/decal/cleanable/ash(F)
- del(src)
+ qdel(src)
/obj/effect/decal/remains/robot/attack_hand(mob/user as mob)
return
diff --git a/code/game/objects/effects/decals/warning_stripes.dm b/code/game/objects/effects/decals/warning_stripes.dm
index 89067ada2a..e22acfad74 100644
--- a/code/game/objects/effects/decals/warning_stripes.dm
+++ b/code/game/objects/effects/decals/warning_stripes.dm
@@ -1,9 +1,11 @@
-/obj/effect/decal/warning_stripes
- icon = 'icons/effects/warning_stripes.dmi'
- layer = 2
-
-/obj/effect/decal/warning_stripes/New()
- . = ..()
-
- loc.overlays += src
- del src
\ No newline at end of file
+/obj/effect/decal/warning_stripes
+ icon = 'icons/effects/warning_stripes.dmi'
+ layer = 2
+
+/obj/effect/decal/warning_stripes/New()
+ . = ..()
+ var/turf/T=get_turf(src)
+ var/image/I=image(icon, icon_state = icon_state, dir = dir)
+ I.color=color
+ T.overlays += I
+ qdel(src)
diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm
index ea9af2f70f..ecd4904df7 100644
--- a/code/game/objects/effects/effect_system.dm
+++ b/code/game/objects/effects/effect_system.dm
@@ -20,11 +20,10 @@ would spawn and follow the beaker, even if it is carried or thrown.
var/life = 15.0
mouse_opacity = 0
-/obj/effect/proc/delete()
- loc = null
+/obj/effect/Destroy()
if(reagents)
reagents.delete()
- return
+ return ..()
/obj/effect/effect/water/Move(turf/newloc)
//var/turf/T = src.loc
@@ -32,7 +31,7 @@ would spawn and follow the beaker, even if it is carried or thrown.
// T.firelevel = 0 //TODO: FIX
if (--src.life < 1)
//SN src = null
- delete()
+ qdel(src)
if(newloc.density)
return 0
.=..()
@@ -100,7 +99,7 @@ steam.start() -- spawns the effect
spawn(0)
if(holder)
src.location = get_turf(holder)
- var/obj/effect/effect/steam/steam = new /obj/effect/effect/steam(src.location)
+ var/obj/effect/effect/steam/steam = PoolOrNew(/obj/effect/effect/steam, src.location)
var/direction
if(src.cardinals)
direction = pick(cardinal)
@@ -110,7 +109,7 @@ steam.start() -- spawns the effect
sleep(5)
step(steam,direction)
spawn(20)
- steam.delete()
+ qdel(steam)
/////////////////////////////////////////////
//SPARK SYSTEM (like steam system)
@@ -133,15 +132,14 @@ steam.start() -- spawns the effect
if (istype(T, /turf))
T.hotspot_expose(1000,100)
spawn (100)
- delete()
+ qdel(src)
return
-/obj/effect/effect/sparks/Del()
+/obj/effect/effect/sparks/Destroy()
var/turf/T = src.loc
if (istype(T, /turf))
T.hotspot_expose(1000,100)
- ..()
- return
+ return ..()
/obj/effect/effect/sparks/Move()
..()
@@ -171,7 +169,7 @@ steam.start() -- spawns the effect
spawn(0)
if(holder)
src.location = get_turf(holder)
- var/obj/effect/effect/sparks/sparks = new /obj/effect/effect/sparks(src.location)
+ var/obj/effect/effect/sparks/sparks = PoolOrNew(/obj/effect/effect/sparks, src.location)
src.total_sparks++
var/direction
if(src.cardinals)
@@ -183,7 +181,7 @@ steam.start() -- spawns the effect
step(sparks,direction)
spawn(20)
if(sparks)
- sparks.delete()
+ qdel(sparks)
src.total_sparks--
@@ -212,7 +210,7 @@ steam.start() -- spawns the effect
/obj/effect/effect/smoke/New()
..()
spawn (time_to_live)
- delete()
+ qdel(src)
return
/obj/effect/effect/smoke/Crossed(mob/living/carbon/M as mob )
@@ -246,7 +244,7 @@ steam.start() -- spawns the effect
/obj/effect/effect/smoke/illumination/New(var/newloc, var/brightness=15, var/lifetime=10)
time_to_live=lifetime
..()
- SetLuminosity(brightness)
+ set_light(brightness)
/////////////////////////////////////////////
// Bad smoke
@@ -357,7 +355,7 @@ steam.start() -- spawns the effect
spawn(0)
if(holder)
src.location = get_turf(holder)
- var/obj/effect/effect/smoke/smoke = new smoke_type(src.location)
+ var/obj/effect/effect/smoke/smoke = PoolOrNew(smoke_type, src.location)
src.total_smoke++
var/direction = src.direction
if(!direction)
@@ -369,7 +367,7 @@ steam.start() -- spawns the effect
sleep(10)
step(smoke,direction)
spawn(smoke.time_to_live*0.75+rand(10,30))
- if (smoke) smoke.delete()
+ if (smoke) qdel(smoke)
src.total_smoke--
@@ -415,13 +413,13 @@ steam.start() -- spawns the effect
var/turf/T = get_turf(src.holder)
if(T != src.oldposition)
if(istype(T, /turf/space))
- var/obj/effect/effect/ion_trails/I = new /obj/effect/effect/ion_trails(src.oldposition)
+ var/obj/effect/effect/ion_trails/I = PoolOrNew(/obj/effect/effect/ion_trails, src.oldposition)
src.oldposition = T
I.set_dir(src.holder.dir)
flick("ion_fade", I)
I.icon_state = "blank"
spawn( 20 )
- I.delete()
+ qdel(I)
spawn(2)
if(src.on)
src.processing = 1
@@ -461,12 +459,12 @@ steam.start() -- spawns the effect
src.processing = 0
spawn(0)
if(src.number < 3)
- var/obj/effect/effect/steam/I = new /obj/effect/effect/steam(src.oldposition)
+ var/obj/effect/effect/steam/I = PoolOrNew(/obj/effect/effect/steam, src.oldposition)
src.number++
src.oldposition = get_turf(holder)
I.set_dir(src.holder.dir)
spawn(10)
- I.delete()
+ qdel(I)
src.number--
spawn(2)
if(src.on)
@@ -515,13 +513,13 @@ steam.start() -- spawns the effect
sleep(30)
if(metal)
- var/obj/structure/foamedmetal/M = new(src.loc)
+ var/obj/structure/foamedmetal/M = PoolOrNew(/obj/structure/foamedmetal, src.loc)
M.metal = metal
M.updateicon()
flick("[icon_state]-disolve", src)
sleep(5)
- delete()
+ qdel(src)
return
// transfer any reagents to the floor
@@ -551,7 +549,7 @@ steam.start() -- spawns the effect
if(F)
continue
- F = new(T, metal)
+ F = PoolOrNew(/obj/effect/effect/foam, list(T, metal))
F.amount = amount
if(!metal)
F.create_reagents(10)
@@ -566,7 +564,7 @@ steam.start() -- spawns the effect
flick("[icon_state]-disolve", src)
spawn(5)
- delete()
+ qdel(src)
/obj/effect/effect/foam/Crossed(var/atom/movable/AM)
@@ -611,7 +609,7 @@ steam.start() -- spawns the effect
F.amount += amount
return
- F = new(src.location, metal)
+ F = PoolOrNew(/obj/effect/effect/foam, list(src.location, metal))
F.amount = amount
if(!metal) // don't carry other chemicals if a metal foam
@@ -642,7 +640,7 @@ steam.start() -- spawns the effect
- Del()
+ Destroy()
density = 0
update_nearby_tiles(1)
@@ -656,14 +654,14 @@ steam.start() -- spawns the effect
ex_act(severity)
- del(src)
+ qdel(src)
blob_act()
- del(src)
+ qdel(src)
bullet_act()
if(metal==1 || prob(50))
- del(src)
+ qdel(src)
attack_hand(var/mob/user)
if ((HULK in user.mutations) || (prob(75 - metal*25)))
@@ -672,7 +670,7 @@ steam.start() -- spawns the effect
if ((O.client && !( O.blinded )))
O << "\red [user] smashes through the foamed metal."
- del(src)
+ qdel(src)
else
user << "\blue You hit the metal foam but bounce off it."
return
@@ -686,8 +684,8 @@ steam.start() -- spawns the effect
for(var/mob/O in viewers(src))
if (O.client)
O << "\red [G.assailant] smashes [G.affecting] through the foamed metal wall."
- del(I)
- del(src)
+ qdel(I)
+ qdel(src)
return
if(prob(I.force*20 - metal*25))
@@ -695,7 +693,7 @@ steam.start() -- spawns the effect
for(var/mob/O in oviewers(user))
if ((O.client && !( O.blinded )))
O << "\red [user] smashes through the foamed metal."
- del(src)
+ qdel(src)
else
user << "\blue You hit the metal foam to no effect."
@@ -722,7 +720,7 @@ steam.start() -- spawns the effect
start()
if (amount <= 2)
- var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
+ var/datum/effect/effect/system/spark_spread/s = PoolOrNew(/datum/effect/effect/system/spark_spread)
s.set_up(2, 1, location)
s.start()
diff --git a/code/game/objects/effects/gibs.dm b/code/game/objects/effects/gibs.dm
index 808e46c2a3..a7f4c0482f 100644
--- a/code/game/objects/effects/gibs.dm
+++ b/code/game/objects/effects/gibs.dm
@@ -25,10 +25,10 @@
var/obj/effect/decal/cleanable/blood/gibs/gib = null
for(var/datum/disease/D in viruses)
if(D.spread_type == SPECIAL)
- del(D)
+ qdel(D)
if(sparks)
- var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
+ var/datum/effect/effect/system/spark_spread/s = PoolOrNew(/datum/effect/effect/system/spark_spread)
s.set_up(2, 1, get_turf(location)) // Not sure if it's safe to pass an arbitrary object to set_up, todo
s.start()
@@ -63,4 +63,4 @@
if(directions.len)
gib.streak(directions)
- del(src)
\ No newline at end of file
+ qdel(src)
diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm
index da25e6f2cc..6ca1045671 100644
--- a/code/game/objects/effects/landmarks.dm
+++ b/code/game/objects/effects/landmarks.dm
@@ -13,86 +13,77 @@
switch(name) //some of these are probably obsolete
if("shuttle")
shuttle_z = z
- del(src)
-
+ qdel(src)
+ return
if("airtunnel_stop")
airtunnel_stop = x
-
if("airtunnel_start")
airtunnel_start = x
-
if("airtunnel_bottom")
airtunnel_bottom = y
-
if("monkey")
monkeystart += loc
- del(src)
-
+ qdel(src)
+ return
if("start")
newplayer_start += loc
- del(src)
-
+ qdel(src)
if("JoinLate")
latejoin += loc
- del(src)
-
+ qdel(src)
if("JoinLateGateway")
latejoin_gateway += loc
- del(src)
-
+ qdel(src)
+ return
if("JoinLateCryo")
latejoin_cryo += loc
- del(src)
-
+ qdel(src)
+ return
if("JoinLateCyborg")
latejoin_cyborg += loc
- del(src)
-
+ qdel(src)
+ return
if("prisonwarp")
prisonwarp += loc
- del(src)
-
+ qdel(src)
+ return
if("Holding Facility")
holdingfacility += loc
-
if("tdome1")
tdome1 += loc
-
if("tdome2")
tdome2 += loc
-
if("tdomeadmin")
tdomeadmin += loc
-
if("tdomeobserve")
tdomeobserve += loc
-
if("prisonsecuritywarp")
prisonsecuritywarp += loc
- del(src)
-
+ qdel(src)
+ return
if("blobstart")
blobstart += loc
- del(src)
-
+ qdel(src)
+ return
if("xeno_spawn")
xeno_spawn += loc
- del(src)
-
+ qdel(src)
+ return
if("endgame_exit")
endgame_safespawns += loc
- del(src)
-
+ qdel(src)
+ return
if("bluespacerift")
endgame_exits += loc
- del(src)
+ qdel(src)
+ return
landmarks_list += src
return 1
-/obj/effect/landmark/Del()
+/obj/effect/landmark/Destroy()
landmarks_list -= src
- ..()
+ return ..()
/obj/effect/landmark/start
name = "start"
@@ -112,7 +103,8 @@
/obj/effect/landmark/start/ninja/New()
..()
- ninjastart += src
+ ninjastart += loc
+ qdel(src)
//Costume spawner landmarks
@@ -121,51 +113,51 @@
var/list/options = typesof(/obj/effect/landmark/costume)
var/PICK= options[rand(1,options.len)]
new PICK(src.loc)
- del(src)
+ qdel(src)
//SUBCLASSES. Spawn a bunch of items and disappear likewise
/obj/effect/landmark/costume/chicken/New()
new /obj/item/clothing/suit/chickensuit(src.loc)
new /obj/item/clothing/head/chicken(src.loc)
new /obj/item/weapon/reagent_containers/food/snacks/egg(src.loc)
- del(src)
+ qdel(src)
/obj/effect/landmark/costume/gladiator/New()
new /obj/item/clothing/under/gladiator(src.loc)
new /obj/item/clothing/head/helmet/gladiator(src.loc)
- del(src)
+ qdel(src)
/obj/effect/landmark/costume/madscientist/New()
new /obj/item/clothing/under/gimmick/rank/captain/suit(src.loc)
new /obj/item/clothing/head/flatcap(src.loc)
new /obj/item/clothing/suit/storage/toggle/labcoat/mad(src.loc)
new /obj/item/clothing/glasses/gglasses(src.loc)
- del(src)
+ qdel(src)
/obj/effect/landmark/costume/elpresidente/New()
new /obj/item/clothing/under/gimmick/rank/captain/suit(src.loc)
new /obj/item/clothing/head/flatcap(src.loc)
new /obj/item/clothing/mask/smokable/cigarette/cigar/havana(src.loc)
new /obj/item/clothing/shoes/jackboots(src.loc)
- del(src)
+ qdel(src)
/obj/effect/landmark/costume/nyangirl/New()
new /obj/item/clothing/under/schoolgirl(src.loc)
new /obj/item/clothing/head/kitty(src.loc)
- del(src)
+ qdel(src)
/obj/effect/landmark/costume/maid/New()
new /obj/item/clothing/under/blackskirt(src.loc)
var/CHOICE = pick( /obj/item/clothing/head/beret , /obj/item/clothing/head/rabbitears )
new CHOICE(src.loc)
new /obj/item/clothing/glasses/sunglasses/blindfold(src.loc)
- del(src)
+ qdel(src)
/obj/effect/landmark/costume/butler/New()
new /obj/item/clothing/suit/wcoat(src.loc)
new /obj/item/clothing/under/suit_jacket(src.loc)
new /obj/item/clothing/head/that(src.loc)
- del(src)
+ qdel(src)
/obj/effect/landmark/costume/scratch/New()
new /obj/item/clothing/gloves/white(src.loc)
@@ -173,12 +165,12 @@
new /obj/item/clothing/under/scratch(src.loc)
if (prob(30))
new /obj/item/clothing/head/cueball(src.loc)
- del(src)
+ qdel(src)
/obj/effect/landmark/costume/highlander/New()
new /obj/item/clothing/under/kilt(src.loc)
new /obj/item/clothing/head/beret(src.loc)
- del(src)
+ qdel(src)
/obj/effect/landmark/costume/prig/New()
new /obj/item/clothing/suit/wcoat(src.loc)
@@ -189,24 +181,24 @@
new /obj/item/weapon/cane(src.loc)
new /obj/item/clothing/under/sl_suit(src.loc)
new /obj/item/clothing/mask/fakemoustache(src.loc)
- del(src)
+ qdel(src)
/obj/effect/landmark/costume/plaguedoctor/New()
new /obj/item/clothing/suit/bio_suit/plaguedoctorsuit(src.loc)
new /obj/item/clothing/head/plaguedoctorhat(src.loc)
- del(src)
+ qdel(src)
/obj/effect/landmark/costume/nightowl/New()
new /obj/item/clothing/under/owl(src.loc)
new /obj/item/clothing/mask/gas/owl_mask(src.loc)
- del(src)
+ qdel(src)
/obj/effect/landmark/costume/waiter/New()
new /obj/item/clothing/under/waiter(src.loc)
var/CHOICE= pick( /obj/item/clothing/head/kitty, /obj/item/clothing/head/rabbitears)
new CHOICE(src.loc)
new /obj/item/clothing/suit/apron(src.loc)
- del(src)
+ qdel(src)
/obj/effect/landmark/costume/pirate/New()
new /obj/item/clothing/under/pirate(src.loc)
@@ -214,46 +206,46 @@
var/CHOICE = pick( /obj/item/clothing/head/pirate , /obj/item/clothing/head/bandana )
new CHOICE(src.loc)
new /obj/item/clothing/glasses/eyepatch(src.loc)
- del(src)
+ qdel(src)
/obj/effect/landmark/costume/commie/New()
new /obj/item/clothing/under/soviet(src.loc)
new /obj/item/clothing/head/ushanka(src.loc)
- del(src)
+ qdel(src)
/obj/effect/landmark/costume/imperium_monk/New()
new /obj/item/clothing/suit/imperium_monk(src.loc)
if (prob(25))
new /obj/item/clothing/mask/gas/cyborg(src.loc)
- del(src)
+ qdel(src)
/obj/effect/landmark/costume/holiday_priest/New()
new /obj/item/clothing/suit/holidaypriest(src.loc)
- del(src)
+ qdel(src)
/obj/effect/landmark/costume/marisawizard/fake/New()
new /obj/item/clothing/head/wizard/marisa/fake(src.loc)
new/obj/item/clothing/suit/wizrobe/marisa/fake(src.loc)
- del(src)
+ qdel(src)
/obj/effect/landmark/costume/cutewitch/New()
new /obj/item/clothing/under/sundress(src.loc)
new /obj/item/clothing/head/witchwig(src.loc)
new /obj/item/weapon/staff/broom(src.loc)
- del(src)
+ qdel(src)
/obj/effect/landmark/costume/fakewizard/New()
new /obj/item/clothing/suit/wizrobe/fake(src.loc)
new /obj/item/clothing/head/wizard/fake(src.loc)
new /obj/item/weapon/staff/(src.loc)
- del(src)
+ qdel(src)
/obj/effect/landmark/costume/sexyclown/New()
new /obj/item/clothing/mask/gas/sexyclown(src.loc)
new /obj/item/clothing/under/sexyclown(src.loc)
- del(src)
+ qdel(src)
/obj/effect/landmark/costume/sexymime/New()
new /obj/item/clothing/mask/gas/sexymime(src.loc)
new /obj/item/clothing/under/sexymime(src.loc)
- del(src)
\ No newline at end of file
+ qdel(src)
\ No newline at end of file
diff --git a/code/game/objects/effects/manifest.dm b/code/game/objects/effects/manifest.dm
index bee6174f12..ec45c7a089 100644
--- a/code/game/objects/effects/manifest.dm
+++ b/code/game/objects/effects/manifest.dm
@@ -17,5 +17,5 @@
P.info = dat
P.name = "paper- 'Crew Manifest'"
//SN src = null
- del(src)
+ qdel(src)
return
\ No newline at end of file
diff --git a/code/game/objects/effects/mines.dm b/code/game/objects/effects/mines.dm
index e8bf9348f6..27e6d7c74a 100644
--- a/code/game/objects/effects/mines.dm
+++ b/code/game/objects/effects/mines.dm
@@ -26,24 +26,24 @@
call(src,triggerproc)(M)
/obj/effect/mine/proc/triggerrad(obj)
- var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
+ var/datum/effect/effect/system/spark_spread/s = PoolOrNew(/datum/effect/effect/system/spark_spread)
s.set_up(3, 1, src)
s.start()
obj:radiation += 50
randmutb(obj)
domutcheck(obj,null)
spawn(0)
- del(src)
+ qdel(src)
/obj/effect/mine/proc/triggerstun(obj)
if(ismob(obj))
var/mob/M = obj
M.Stun(30)
- var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
+ var/datum/effect/effect/system/spark_spread/s = PoolOrNew(/datum/effect/effect/system/spark_spread)
s.set_up(3, 1, src)
s.start()
spawn(0)
- del(src)
+ qdel(src)
/obj/effect/mine/proc/triggern2o(obj)
//example: n2o triggerproc
@@ -54,7 +54,7 @@
target.assume_gas("sleeping_agent", 30)
spawn(0)
- del(src)
+ qdel(src)
/obj/effect/mine/proc/triggerphoron(obj)
for (var/turf/simulated/floor/target in range(1,src))
@@ -64,20 +64,20 @@
target.hotspot_expose(1000, CELL_VOLUME)
spawn(0)
- del(src)
+ qdel(src)
/obj/effect/mine/proc/triggerkick(obj)
- var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
+ var/datum/effect/effect/system/spark_spread/s = PoolOrNew(/datum/effect/effect/system/spark_spread)
s.set_up(3, 1, src)
s.start()
- del(obj:client)
+ qdel(obj:client)
spawn(0)
- del(src)
+ qdel(src)
/obj/effect/mine/proc/explode(obj)
explosion(loc, 0, 1, 2, 3)
spawn(0)
- del(src)
+ qdel(src)
/obj/effect/mine/dnascramble
name = "Radiation Mine"
diff --git a/code/game/objects/effects/overlays.dm b/code/game/objects/effects/overlays.dm
index 6dd26f7774..aac0b7d56a 100644
--- a/code/game/objects/effects/overlays.dm
+++ b/code/game/objects/effects/overlays.dm
@@ -3,10 +3,6 @@
unacidable = 1
var/i_attached//Added for possible image attachments to objects. For hallucinations and the like.
-/obj/effect/overlay/Destroy()
- PlaceInPool(src)
- return 1 //cancels the GCing
-
/obj/effect/overlay/beam//Not actually a projectile, just an effect.
name="beam"
icon='icons/effects/beam.dmi'
@@ -14,7 +10,7 @@
var/tmp/atom/BeamSource
New()
..()
- spawn(10) del src
+ spawn(10) qdel(src)
/obj/effect/overlay/palmtree_r
name = "Palm tree"
@@ -41,4 +37,4 @@
name = "Bluespace"
icon = 'icons/turf/space.dmi'
icon_state = "bluespacify"
- layer = LIGHTING_LAYER
+ layer = 10
diff --git a/code/game/objects/effects/portals.dm b/code/game/objects/effects/portals.dm
index 6a9f16e99e..702926d6ff 100644
--- a/code/game/objects/effects/portals.dm
+++ b/code/game/objects/effects/portals.dm
@@ -30,7 +30,7 @@
/obj/effect/portal/New()
spawn(300)
- del(src)
+ qdel(src)
return
return
@@ -42,7 +42,7 @@
if (icon_state == "portal1")
return
if (!( target ))
- del(src)
+ qdel(src)
return
if (istype(M, /atom/movable))
if(prob(failchance)) //oh dear a problem, put em in deep space
diff --git a/code/game/objects/effects/spawners/bombspawner.dm b/code/game/objects/effects/spawners/bombspawner.dm
index 3f694a8b49..547931a511 100644
--- a/code/game/objects/effects/spawners/bombspawner.dm
+++ b/code/game/objects/effects/spawners/bombspawner.dm
@@ -102,7 +102,7 @@
p4.air_contents.temperature = btemp + T0C
p2.secured = 1
- del(src)
+ qdel(src)
*/
/obj/effect/spawner/newbomb
@@ -168,4 +168,4 @@
V.update_icon()
- del(src)
+ qdel(src)
diff --git a/code/game/objects/effects/spawners/vaultspawner.dm b/code/game/objects/effects/spawners/vaultspawner.dm
index e91105f5df..c4b9203cef 100644
--- a/code/game/objects/effects/spawners/vaultspawner.dm
+++ b/code/game/objects/effects/spawners/vaultspawner.dm
@@ -23,4 +23,4 @@
else
new /turf/simulated/floor/vault(locate(i,j,z),type)
- del(src)
\ No newline at end of file
+ qdel(src)
diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm
index 682347669a..03b5c922d8 100644
--- a/code/game/objects/effects/spiders.dm
+++ b/code/game/objects/effects/spiders.dm
@@ -11,20 +11,20 @@
/obj/effect/spider/ex_act(severity)
switch(severity)
if(1.0)
- del(src)
+ qdel(src)
if(2.0)
if (prob(50))
- del(src)
+ qdel(src)
if(3.0)
if (prob(5))
- del(src)
+ qdel(src)
return
/obj/effect/spider/attackby(var/obj/item/weapon/W, var/mob/user)
if(W.attack_verb.len)
- visible_message("\red \The [src] have been [pick(W.attack_verb)] with \the [W][(user ? " by [user]." : ".")]")
+ visible_message("\The [src] have been [pick(W.attack_verb)] with \the [W][(user ? " by [user]." : ".")]")
else
- visible_message("\red \The [src] have been attacked with \the [W][(user ? " by [user]." : ".")]")
+ visible_message("\The [src] have been attacked with \the [W][(user ? " by [user]." : ".")]")
var/damage = W.force / 4.0
@@ -45,7 +45,7 @@
/obj/effect/spider/proc/healthcheck()
if(health <= 0)
- del(src)
+ qdel(src)
/obj/effect/spider/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
@@ -86,7 +86,7 @@
var/num = rand(6,24)
for(var/i=0, i
Baystation 12 Credit List
+
+ 11 May 2015+Mloc updated:+
PsiOmegaDelta updated:+
Techhead updated:+
10 May 2015+GinjaNinja32 updated:+
Yoshax updated:+
09 May 2015+Yoshax updated:+
07 May 2015+HarpyEagle updated:+
PsiOmegaDelta updated:+
RavingManiac updated:+
-
+ 7 April 2015-RavingManiac updated:-
06 May 2015+PsiOmegaDelta updated:+
05 May 2015+PsiOmegaDelta updated:+
RavingManiac updated:+
-
+ 24 February 2015-Zuhayr updated:-
02 May 2015+HarpyEagle updated:+
PsiOmegaDelta updated:+
Yoshax updated:+
30 April 2015+Yoshax updated:+
-
+ 18 February 2015-PsiOmegaDelta updated:-
29 April 2015+Daranz updated:+
HarpyEagle updated:+
PsiOmegaDelta updated:+
28 April 2015+Jarcolr updated:+
Kelenius updated:+
PsiOmegaDelta updated:+
RavingManiac updated:+
Yoshax updated:+
24 April 2015+Dennok updated:+
-
+ 16 February 2015-RavingManiac updated:-
23 April 2015+Dennok updated:+
PsiOmegaDelta updated:+
Yoshax updated:+
18 April 2015+PsiOmegaDelta updated:+
-
+ 12 February 2015-Daranz updated:-
07 April 2015+RavingManiac updated:+
-
+ 4 February 2015-RavingManiac updated:-
TwistedAkai updated:-
24 February 2015+Zuhayr updated:+
18 February 2015+PsiOmegaDelta updated:+
-
+ 1 September 2014-9 January 2015-Zuhayr updated:-
16 February 2015+RavingManiac updated:+
12 February 2015+Daranz updated:+
-
+ 22 November 2014-Zuhayr updated:-
04 February 2015+RavingManiac updated:+
TwistedAkai updated:+
09 January 2015+Zuhayr updated:+
-
+ 8 november 2014-PsiOmegaDelta updated:-
22 November 2014+Zuhayr updated:+
08 November 2014+PsiOmegaDelta updated:+
-
+ 4 November 2014-TwistedAkai updated:-
04 November 2014+TwistedAkai updated:+
01 November 2014+PsiOmegaDelta updated:+
-
+ 1 november 2014-PsiOmegaDelta updated:-
01 October 2014+RavingManiac updated:+
Zuhayr updated:+
28 September 2014+Gamerofthegame updated:+
Zuhayr updated:+
-
+ 1 October 2014-RavingManiac updated:-
20 September 2014+HarpyEagle updated:+
05 September 2014+RavingManiac updated:+
-
+ 1 October 2014-Zuhayr updated:-
31 August 2014+Whitellama updated:+
-
+ 28 September 2014-Gamerofthegame updated:-
27 August 2014+Whitellama updated:+
-
+ 28 September 2014-Zuhayr updated:-
05 August 2014+HarpyEagle updated:+
02 August 2014+Whitellama updated:+
-
+ 20 September 2014-HarpyEagle updated:-
31 July 2014+HarpyEagle updated:+
26 July 2014+Whitellama updated:+
-
+ 31 August 2014-Whitellama updated:-
20 July 2014+PsiOmegaDelta updated:+
-
+ 5 September 2014-RavingManiac updated:-
06 July 2014+HarpyEagle updated:+
01 July 2014+Various updated:+
-
+ 27 August 2014-Whitellama updated:-
20 June 2014+Cael_Aislinn updated:+
PsiOmegaDelta updated:-
Kelenius updated:-
19 June 2014+Chinsky updated:+
15 June 2014+HarpyEagle updated:+
-
+ 5 August 2014-HarpyEagle updated:-
13 June 2014+HarpyEagle updated:+
-
+ 31 August 2014-Whitellama updated:-
03 June 2014+Hubblenaut updated:+
-
+ 2 August 2014-2 August 2014-Whitellama updated:-
31 May 2014+Jarcolr updated:+
-
+ 31 July 2014-HarpyEagle updated:-
28 May 2014+Chinsky updated:+
-
+ 26 July 2014-Whitellama updated:-
23 May 2014+Hubble updated:+
16 May 2014+HarpyEagle updated:+
-
+ 20 July 2014-PsiOmegaDelta updated:-
06 May 2014+Hubble updated:+
-
-
-6 July 2014-HarpyEagle updated:-
-
-
-
-1 July 2014-Various updated:-
-
-
-19 июня 2014-Chinsky updated:-
-
-
-15 June 2014-HarpyEagle updated:-
-
-
-20 June 2014-Cael_Aislinn updated:-
-
-
-13 June 2014-HarpyEagle updated:-
-
-
-3 Juni 2014-Hubblenaut updated:-
-
-
-31 May 2014-Jarcolr updated:-
-
-
-23 Mai 2014-Hubble updated:-
-
-
-16 May 2014-HarpyEagle updated:-
-
-
-6 Mai 2014-Hubble updated:-
-
-
-
-23 Mai 2014-Hubble updated:-
-
-
-
-6 Mai 2014-Hubble updated:-
-
-
-
-
-3 May 2014-Cael_Aislinn updated:-
-
-28 мая 2014-Chinsky updated:-
-
-
-
-
-
-28 мая 2014-Chinsky updated:-
-
-
-
-
-29 April 2014-HarpyEagle updated:-
-
-
-25 April 2014-Various updated:-
-
-
-
-
-11 April 2014-Jarcolr updated:-
-
-
-6 April 2014-RavingManiac updated:-
-
-
-30 March 2014-RavingManiac updated:-
-
-
-10 March 2014-Chinsky updated:-
-
-
-5 March 2014-RavingManiac updated:-
-
-
-1 March 2014-Various updated:-
-
-
-19 February 2014-Aryn updated:-
-
-
-1 February 2014-Various updated:-
-
-
-1 January 2014-Various updated:-
-
-
-18 December 2013-RavingManiac updated:-
-
-
-1 December 2013-Various Developers banged their keyboards together:-
-
-
-24 November 2013-Yinadele updated:-
-
-
-23 November 2013-Ccomp5950 updated:-
-
-
-1 November 2013-Various updated:-
-
-
-
-29 October 2013-Cael_Aislinn updated:-
-
-
-
-06 October 2013-Chinsky updated:-
-
-
-06 October 2013-Chinsky updated:-
-
-
-September 24th, 2013-Snapshot updated:-
-
-
-18 September 2013-Kilakk updated:-
-
-
-August 8th, 2013-Erthilo updated:-
-
-
-2013/08/4-Chinsky updated:-
-
GoonStation 13 Development Team
-
-
-2013/08/01-Chinsky updated:-
-
-
-July 30th, 2013-Erthilo updated:-
-
-
-30.07.2013-Kilakk updated:-
-
-
-28.07.2013-Segrain updated:-
-
-26.07.2013-Kilakk updated:-
-
-2013-11-07-Chinsky updated:-
-
-2013/07/06-Chinsky updated:-
-
-05.07.2013-Spamcat updated:-
-
-03.07.2013-Segrain updated:-
-
-June 28th, 2013-Segrain updated:-
-
-June 27th, 2013-Segrain updated:-
-
-June 26th, 2013-Whitellama updated:-
-
-June 26th, 2013-Segrain updated:-
-
-
-June 23rd, 2013-Segrain updated:-
-
-
-June 23rd, 2013-faux updated:-
-
-
-June 22nd 2013-Cael_Aislinn updated:-
-
-
-21.06.2013-Jupotter updated:-
-
-
-18.06.2013-Segrain updated:-
-
-
-13.06.2013-Kilakk updated:-
-
-
-6-13-13-Asanadas updated:-
-
-
-
-12/06/2013-Zuhayr updated:-
-
-
-
-6/11/13-Meyar updated:-
-
-
-09.06.2013-Segrain updated:-
-
-
-Meyar-6/6/13 updated:-
-
-
-05.06.2013-Segrain updated:-
-
-
-
-6/5/13-Meyar updated:-
-
-
-
-6/4/13-Meyar updated:-
-
-
-
-
-
-
-
-
-
-
-
-
-
-5.06.2013-Chinsky updated:-
-
-
-1.06.2013-Chinsky updated:-
-
-
-31.05.2013-Segrain updated:-
-
-
-30th May 2013-proliberate updated:-
-
-
-30.05.2013-Segrain updated:-
-
-May 28th, 2013-VitrescentTortoise updated:-
-
-
-28th May 2013-Erthilo updated:-
-
-
-26th May 2013-Chinsky updated:-
VitrescentTortoise updated:-
-
-
-5/26/2013-Meyar updated:-
-
-
-25th May 2013-Erthilo updated:-
-
-
-21 May 2013-SkyMarshal updated:-
-
-
-May 18th, 2013-CIB updated:-
-
-
-April 24, 2013-Jediluke69 updated:-
-
-
-April 24, 2013-faux updated:-
-
-
-24th April 2013-NerdyBoy1104 updated:-
-
-
-Spamcat-04.05.2013 updated:-
-
-
-17 April 2013-SkyMarshal updated:-
-
-
-17 April 2013-SkyMarshal updated:-
-
-
-30.04.2013-Spamcat updated:-
-
-
-15.04.2013-Spamcat updated:-
-
-
-May 14th 2013-Cael_Aislinn updated:-
-
-
-11 April 2013-SkyMarshal updated:-
-
-
-9 April 2013-SkyMarshal updated:-
-
-
-4 April 2013-SkyMarshal updated:-
-
-
-March 27th 2013-Asanadas updated:-
-
-
-26.03.2013-Spamcat updated:-
-
-
-March 15th 2013-Cael_Aislinn updated:-
-
-
-14.03.2013-Spamcat updated:-
-
-
-11/03/2013-Chinsky updated:-
-
-
-March 11th 2013-CIB updated:-
-
-
-March 11th 2013-Cael Aislinn updated:-
-
+
-March 9th 2013-Cael Aislinn updated:-
29 April 2014+HarpyEagle updated:+
25 April 2014+Various updated:+
11 April 2014+Jarcolr updated:+
06 April 2014+RavingManiac updated:+
30 March 2014+RavingManiac updated:+
10 March 2014+Chinsky updated:+
05 March 2014+RavingManiac updated:+
01 March 2014+Various updated:+
19 February 2014+Aryn updated:+
01 February 2014+Various updated:+
01 January 2014+Various updated:+
18 December 2013+RavingManiac updated:+
01 December 2013+Various Developers banged their keyboards together: updated:+
24 November 2013+Yinadele updated:+
23 November 2013+Ccomp5950 updated:+
01 November 2013+Various updated:+
29 October 2013+Cael_Aislinn updated:+
06 October 2013+Chinsky updated:+
24 September 2013+Snapshot updated:+
18 September 2013+Kilakk updated:+
08 August 2013+Erthilo updated:+
04 August 2013+Chinsky updated:+
01 August 2013+Asanadas updated:+
CIB updated:+
Cael Aislinn updated:+
CaelAislinn updated:+
Cael_Aislinn updated:+
Chinsky updated:+
Erthilo updated:+
Gamerofthegame updated:+
GauHelldragon updated:+
Jediluke69 updated:+
Jupotter updated:+
Kilakk updated:+
Meyar updated:+
NerdyBoy1104 updated:+
RavingManiac updated:+
Segrain updated:+
SkyMarshal updated:+
Spamcat updated:+
VitrescentTortoise updated:+
Whitellama updated:+
Zuhayr updated:+
faux updated:+
proliberate updated:+
30 July 2013+Erthilo updated:+
Kilakk updated:+
28 July 2013+Segrain updated:+
26 July 2013+Kilakk updated:+
11 July 2013+Chinsky updated:+
06 July 2013+Chinsky updated:+
05 July 2013+Spamcat updated:+
03 July 2013+Segrain updated:+
28 June 2013+Segrain updated:+
27 June 2013+Segrain updated:+
26 June 2013+Segrain updated:+
Whitellama updated:+
23 June 2013+Segrain updated:+
faux updated:+
22 June 2013+Cael_Aislinn updated:+
21 June 2013+Jupotter updated:+
18 June 2013+Segrain updated:+
13 June 2013+Kilakk updated:+
12 June 2013+Zuhayr updated:+
11 June 2013+Meyar updated:+
09 June 2013+Segrain updated:+
06 June 2013+Asanadas updated:+
Meyar updated:+
05 June 2013+Chinsky updated:+
Segrain updated:+
01 June 2013+Chinsky updated:+
31 May 2013+Segrain updated:+
30 May 2013+Segrain updated:+
Spamcat updated:+
proliberate updated:+
28 May 2013+Erthilo updated:+
VitrescentTortoise updated:+
26 May 2013+Chinsky updated:+
Meyar updated:+
VitrescentTortoise updated:+
25 May 2013+Erthilo updated:+
21 May 2013+SkyMarshal updated:+
15 May 2013+Spamcat updated:+
14 May 2013+Cael_Aislinn updated:+
24 April 2013+Jediluke69 updated:+
NerdyBoy1104 updated:+
faux updated:+
17 April 2013+SkyMarshal updated:+
11 April 2013+SkyMarshal updated:+
09 April 2013+SkyMarshal updated:+
04 April 2013+SkyMarshal updated:+
Spamcat updated:+
27 March 2013+Asanadas updated:+
26 March 2013+Spamcat updated:+
15 March 2013+Cael_Aislinn updated:+
14 March 2013+Spamcat updated:+
11 March 2013+CIB updated:+
Cael Aislinn updated:+
Chinsky updated:+
09 March 2013+Cael Aislinn updated:+
-
+ March 6th 2013-Cael Aislinn updated:-
RavingManiac updated:-
06 March 2013+Cael Aislinn updated:+
RavingManiac updated:+
-
+ March 5th 2013-Cael Aislinn updated:-
CIB updated:-
05 March 2013+CIB updated:+
Cael Aislinn updated:+
-
+ February 27th 2013-Gamerofthegame updated:-
27 February 2013+Gamerofthegame updated:+
-
+ February 25th 2013-Cael Aislinn updated:-
25 February 2013+Cael Aislinn updated:+
-
+ February 23rd 2013-Cael Aislinn updated:-
23 February 2013+Cael Aislinn updated:+
-
+ February 23rd 2013-Cael Aislinn updated:-
22 February 2013+Chinsky updated:+
-
+ 22/02/2013-Chinsky updated:-
20 February 2013+Chinsky updated:+
-
+ February 18th 2013-Cael Aislinn updated:-
18 February 2013+Cael Aislinn updated:+
-
+ 20/02/2013-Chinsky updated:-
14 February 2013+CIB updated:+
CaelAislinn updated:+
Gamerofthegame updated:+
-
+ February 18th 2013-Cael Aislinn updated:-
13 February 2013+Erthilo updated:+
-
+ February 14th 2013-CIB updated:-
CaelAislinn updated:-
31 January 2013+CIB updated:+
Gamerofthegame updated:-
23 January 2013+Cael_Aislinn updated:+
-
+ February 13th 2013-Erthilo updated:-
21 January 2013+Cael_Aislinn updated:+
-
+ January 23rd-Cael_Aislinn updated:-
13 January 2013+Chinsky updated:+
GauHelldragon updated:+
-
-
-
-
-1/31/2013-CIB updated:-
-
-
-January 21st-Cael_Aislinn updated:-
-
-
-13/01/2013-Chinsky updated:-
1/13/2013-GauHelldragon updated:-
-
-
-January 7th-Cael_Aislinn updated:-
-
-
-
-
-/tg/ station 13 Development Team
-7/01/2013-Chinsky updated:-
07 January 2013+Cael_Aislinn updated:+
Chinsky updated:+
- Coders: Stuntwaffle, Showtime, Pantaloons, Nannek, Keelin, Exadv1, hobnob, Justicefries, 0staf, sniperchance, AngriestIBM, BrianOBlivion
-- Spriters: Supernorn, Haruhi, Stuntwaffle, Pantaloons, Rho, SynthOrange, I Said No + Coders: Stuntwaffle, Showtime, Pantaloons, Nannek, Keelin, Exadv1, hobnob, Justicefries, 0staf, sniperchance, AngriestIBM, BrianOBlivion + Spriters: Supernorn, Haruhi, Stuntwaffle, Pantaloons, Rho, SynthOrange, I Said No ![]() This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License. Rights are currently extended to SomethingAwful Goons only. + +
Some icons by Yusuke Kamiyamane. All rights reserved. Licensed under a Creative Commons Attribution 3.0 License. - |