mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-17 21:52:42 +00:00
Merge resolution.
This commit is contained in:
@@ -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"
|
||||
@@ -381,12 +381,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"
|
||||
@@ -819,6 +814,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"
|
||||
@@ -956,8 +952,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"
|
||||
@@ -991,6 +989,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"
|
||||
@@ -1005,6 +1004,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"
|
||||
@@ -1105,11 +1105,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"
|
||||
@@ -1205,7 +1213,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"
|
||||
@@ -1297,8 +1304,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"
|
||||
@@ -1436,11 +1446,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"
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
..()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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(..())
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -86,4 +86,4 @@
|
||||
"\blue You have unfastened \the [src].", \
|
||||
"You hear ratchet.")
|
||||
new /obj/item/pipe(loc, make_from=src)
|
||||
del(src)
|
||||
qdel(src)
|
||||
@@ -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()
|
||||
|
||||
@@ -73,9 +73,6 @@
|
||||
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 +256,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 +412,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
|
||||
|
||||
@@ -42,9 +42,6 @@
|
||||
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 +118,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 +268,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 +276,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
|
||||
|
||||
@@ -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)
|
||||
..()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
..()
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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" : "" ]"
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
return
|
||||
|
||||
/*
|
||||
/obj/effect/hotspot/Del()
|
||||
/obj/effect/hotspot/Destroy()
|
||||
if (istype(loc, /turf/simulated))
|
||||
DestroyTurf()
|
||||
..()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 << "<span class='notice'>You remove the bolts anchoring the ladder.</span>"
|
||||
return
|
||||
@@ -117,7 +117,7 @@
|
||||
var/obj/item/stack/sheet/metal/S = new /obj/item/stack/sheet/metal( src )
|
||||
S.amount = 2
|
||||
user << "<span class='notice'>You remove the ladder and close the hole.</span>"
|
||||
Del()
|
||||
qdel(src)
|
||||
else
|
||||
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
|
||||
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.")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -162,7 +162,7 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
|
||||
..()
|
||||
|
||||
if(!istype(loc, /turf))
|
||||
del src
|
||||
qdel(src)
|
||||
|
||||
set_dir(pick(cardinal))
|
||||
SetLuminosity(3)
|
||||
@@ -170,7 +170,7 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
|
||||
air_master.active_hotspots.Add(src)
|
||||
|
||||
|
||||
/obj/fire/Del()
|
||||
/obj/fire/Destroy()
|
||||
if (istype(loc, /turf/simulated))
|
||||
RemoveFire()
|
||||
|
||||
@@ -278,8 +278,8 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -112,6 +112,13 @@ Class Procs:
|
||||
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
|
||||
air_master.remove_zone(src)
|
||||
|
||||
@@ -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
|
||||
109
code/__HELPERS/datum_pool.dm
Normal file
109
code/__HELPERS/datum_pool.dm
Normal file
@@ -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
|
||||
@@ -16,6 +16,9 @@
|
||||
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)
|
||||
@@ -435,6 +438,34 @@ datum/projectile_data
|
||||
var/b = mixOneColor(weights, blues)
|
||||
return rgb(r,g,b)
|
||||
|
||||
/proc/mixOneColor(var/list/weight, var/list/color)
|
||||
if (!weight || !color || length(weight)!=length(color))
|
||||
return 0
|
||||
|
||||
var/contents = length(weight)
|
||||
var/i
|
||||
|
||||
//normalize weights
|
||||
var/listsum = 0
|
||||
for(i=1; i<=contents; i++)
|
||||
listsum += weight[i]
|
||||
for(i=1; i<=contents; i++)
|
||||
weight[i] /= listsum
|
||||
|
||||
//mix them
|
||||
var/mixedcolor = 0
|
||||
for(i=1; i<=contents; i++)
|
||||
mixedcolor += weight[i]*color[i]
|
||||
mixedcolor = round(mixedcolor)
|
||||
|
||||
//until someone writes a formal proof for this algorithm, let's keep this in
|
||||
// if(mixedcolor<0x00 || mixedcolor>0xFF)
|
||||
// return 0
|
||||
//that's not the kind of operation we are running here, nerd
|
||||
mixedcolor=min(max(mixedcolor,0),255)
|
||||
|
||||
return mixedcolor
|
||||
|
||||
/**
|
||||
* Gets the highest and lowest pressures from the tiles in cardinal directions
|
||||
* around us, then checks the difference.
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
See the previous More info, for... more info...
|
||||
*/
|
||||
|
||||
//del(D)
|
||||
//qdel(D)
|
||||
// Garbage Collect Dummy
|
||||
D.loc = null
|
||||
D = null
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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()]"
|
||||
|
||||
@@ -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])"
|
||||
|
||||
@@ -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])"
|
||||
|
||||
@@ -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/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)
|
||||
if(garbage_collector)
|
||||
garbage_collector.dels++
|
||||
else if(isnull(A.gc_destroyed))
|
||||
// Let our friend know they're about to get fucked up.
|
||||
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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
if(!istype(C.mob, /mob/dead))
|
||||
log_access("AFK: [key_name(C)]")
|
||||
C << "<SPAN CLASS='warning'>You have been inactive for more than 10 minutes and have been disconnected.</SPAN>"
|
||||
del(C)
|
||||
del(C) // Don't qdel, cannot override finalize_qdel behaviour for clients.
|
||||
|
||||
scheck()
|
||||
|
||||
|
||||
@@ -42,3 +42,7 @@
|
||||
#endif
|
||||
|
||||
scheck()
|
||||
|
||||
|
||||
/datum/controller/process/machinery/getStatName()
|
||||
return ..()+"([machines.len])"
|
||||
@@ -18,3 +18,6 @@
|
||||
if(updateQueueInstance)
|
||||
updateQueueInstance.init(mob_list, "Life")
|
||||
updateQueueInstance.Run()
|
||||
|
||||
/datum/controller/process/mob/getStatName()
|
||||
return ..()+"([mob_list.len])"
|
||||
|
||||
@@ -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])"
|
||||
|
||||
@@ -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])"
|
||||
|
||||
@@ -10,3 +10,6 @@
|
||||
continue
|
||||
|
||||
pipe_networks.Remove(pipeNetwork)
|
||||
|
||||
/datum/controller/process/pipenet/getStatName()
|
||||
return ..()+"([pipe_networks.len])"
|
||||
@@ -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])"
|
||||
|
||||
@@ -161,15 +161,6 @@ atom/movable/New()
|
||||
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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -398,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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ datum/controller/lighting/New()
|
||||
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)
|
||||
qdel(lighting_controller)
|
||||
lighting_controller = src
|
||||
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ 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)
|
||||
|
||||
@@ -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 ********************/
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
*/
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"]
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -151,4 +151,8 @@ Data storage vars:
|
||||
start()
|
||||
return active()
|
||||
|
||||
|
||||
/datum/global_iterator/Destroy()
|
||||
tag = null
|
||||
arg_list.Cut()
|
||||
stop()
|
||||
//Do not call ..()
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
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)
|
||||
/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
|
||||
|
||||
proc/initTeleport(ateleatom,adestination,aprecision,afteleport,aeffectin,aeffectout,asoundin,asoundout)
|
||||
/datum/teleport/proc/initTeleport(ateleatom,adestination,aprecision,afteleport,aeffectin,aeffectout,asoundin,asoundout)
|
||||
if(!setTeleatom(ateleatom))
|
||||
return 0
|
||||
if(!setDestination(adestination))
|
||||
@@ -33,23 +33,23 @@
|
||||
return 1
|
||||
|
||||
//must succeed
|
||||
proc/setPrecision(aprecision)
|
||||
/datum/teleport/proc/setPrecision(aprecision)
|
||||
if(isnum(aprecision))
|
||||
precision = aprecision
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//must succeed
|
||||
proc/setDestination(atom/adestination)
|
||||
/datum/teleport/proc/setDestination(atom/adestination)
|
||||
if(istype(adestination))
|
||||
destination = adestination
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//must succeed in most cases
|
||||
proc/setTeleatom(atom/movable/ateleatom)
|
||||
/datum/teleport/proc/setTeleatom(atom/movable/ateleatom)
|
||||
if(istype(ateleatom, /obj/effect) && !istype(ateleatom, /obj/effect/dummy/chameleon))
|
||||
del(ateleatom)
|
||||
qdel(ateleatom)
|
||||
return 0
|
||||
if(istype(ateleatom))
|
||||
teleatom = ateleatom
|
||||
@@ -58,27 +58,27 @@
|
||||
|
||||
//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)
|
||||
/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
|
||||
proc/setForceTeleport(afteleport)
|
||||
/datum/teleport/proc/setForceTeleport(afteleport)
|
||||
force_teleport = afteleport
|
||||
return 1
|
||||
|
||||
//optional
|
||||
proc/setSounds(asoundin=null,asoundout=null)
|
||||
/datum/teleport/proc/setSounds(asoundin=null,asoundout=null)
|
||||
soundin = isfile(asoundin) ? asoundin : null
|
||||
soundout = isfile(asoundout) ? asoundout : null
|
||||
return 1
|
||||
|
||||
//placeholder
|
||||
proc/teleportChecks()
|
||||
/datum/teleport/proc/teleportChecks()
|
||||
return 1
|
||||
|
||||
proc/playSpecials(atom/location,datum/effect/effect/system/effect,sound)
|
||||
/datum/teleport/proc/playSpecials(atom/location,datum/effect/effect/system/effect,sound)
|
||||
if(location)
|
||||
if(effect)
|
||||
spawn(-1)
|
||||
@@ -92,7 +92,7 @@
|
||||
return
|
||||
|
||||
//do the monkey dance
|
||||
proc/doTeleport()
|
||||
/datum/teleport/proc/doTeleport()
|
||||
|
||||
var/turf/destturf
|
||||
var/turf/curturf = get_turf(teleatom)
|
||||
@@ -126,22 +126,20 @@
|
||||
|
||||
return 1
|
||||
|
||||
proc/teleport()
|
||||
/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)
|
||||
/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)
|
||||
/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)
|
||||
@@ -151,7 +149,7 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
setPrecision(aprecision)
|
||||
/datum/teleport/instant/science/setPrecision(aprecision)
|
||||
..()
|
||||
if(istype(teleatom, /obj/item/weapon/storage/backpack/holding))
|
||||
precision = rand(1,100)
|
||||
@@ -161,32 +159,32 @@
|
||||
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!"
|
||||
MM << "<span class='danger>The Bluespace interface on your [teleatom] interferes with the teleport!</span>"
|
||||
return 1
|
||||
|
||||
teleportChecks()
|
||||
/datum/teleport/instant/science/teleportChecks()
|
||||
if(istype(teleatom, /obj/item/weapon/disk/nuclear)) // Don't let nuke disks get teleported --NeoFite
|
||||
teleatom.visible_message("\red <B>The [teleatom] bounces off of the portal!</B>")
|
||||
teleatom.visible_message("<span class='danger'>\The [teleatom] bounces off of the portal!</span>")
|
||||
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 <B>The [MM] bounces off of the portal!</B>","\red Something you are carrying seems to be unable to pass through the portal. Better drop it if you want to go through.")
|
||||
MM.visible_message("<span class='danger'>\The [MM] bounces off of the portal!</span>","<span class='warning'>Something you are carrying seems to be unable to pass through the portal. Better drop it if you want to go through.</span>")
|
||||
else
|
||||
teleatom.visible_message("\red <B>The [teleatom] bounces off of the portal!</B>")
|
||||
teleatom.visible_message("<span class='danger'>\The [teleatom] bounces off of the portal!</span>")
|
||||
return 0
|
||||
|
||||
if(destination.z == 2) //centcomm z-level
|
||||
if(destination.z in config.admin_levels) //centcomm z-level
|
||||
if(istype(teleatom, /obj/mecha))
|
||||
var/obj/mecha/MM = teleatom
|
||||
MM.occupant << "\red <B>The mech would not survive the jump to a location so far away!</B>"
|
||||
MM.occupant << "<span class='danger'>\The [MM] would not survive the jump to a location so far away!</span>"
|
||||
return 0
|
||||
if(!isemptylist(teleatom.search_contents_for(/obj/item/weapon/storage/backpack/holding)))
|
||||
teleatom.visible_message("\red <B>The Bag of Holding bounces off of the portal!</B>")
|
||||
teleatom.visible_message("<span class='danger'>\The [teleatom] bounces off of the portal!</span>")
|
||||
return 0
|
||||
|
||||
|
||||
if(destination.z > 7) //Away mission z-levels
|
||||
if(destination.z > max_default_z_level()) //Away mission z-levels
|
||||
return 0
|
||||
return 1
|
||||
@@ -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 << "<span class='notice'><font size =3><B>Your loyalty implant has been deactivated.</font></span>"
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -77,12 +77,12 @@ proc/sd_Alert(client/who, message, title, buttons = list("Ok"),\
|
||||
|
||||
var/sd_alert/T = locate(tag)
|
||||
if(T)
|
||||
if(istype(T)) del(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) del(T)
|
||||
if(T) qdel(T)
|
||||
return
|
||||
T.Display(message,title,buttons,default,unfocus,size,table,style,select,flags)
|
||||
. = T.Response()
|
||||
@@ -93,7 +93,7 @@ sd_alert
|
||||
response
|
||||
list/validation
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
target << browse(null,"window=\ref[src]")
|
||||
..()
|
||||
|
||||
@@ -164,5 +164,5 @@ sd_alert
|
||||
else if(response in validation) validated = 1
|
||||
else response=null
|
||||
else validated = 1
|
||||
spawn(2) del(src)
|
||||
spawn(2) qdel(src)
|
||||
return response
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
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*/
|
||||
@@ -1015,10 +1015,8 @@ area/space/atmosalert()
|
||||
/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"
|
||||
@@ -1034,11 +1032,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"
|
||||
@@ -1065,9 +1061,6 @@ area/space/atmosalert()
|
||||
name = "\improper Holodeck - Space"
|
||||
has_gravity = 0
|
||||
|
||||
|
||||
|
||||
|
||||
//Engineering
|
||||
|
||||
/area/engineering/
|
||||
|
||||
@@ -30,6 +30,12 @@
|
||||
power_change() // all machines set to current power level, also updates lighting icon
|
||||
InitializeLighting()
|
||||
|
||||
/area/proc/get_contents()
|
||||
var/list/concat_contents = list()
|
||||
for (var/area/RA in related)
|
||||
concat_contents |= RA.contents
|
||||
return concat_contents
|
||||
|
||||
/area/proc/get_cameras()
|
||||
var/list/cameras = list()
|
||||
for (var/area/RA in related)
|
||||
@@ -262,13 +268,15 @@ 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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -22,6 +22,18 @@
|
||||
//Detective Work, used for the duplicate data points kept in the scanners
|
||||
var/list/original_atom
|
||||
|
||||
/atom/Destroy()
|
||||
. = ..()
|
||||
density = 0
|
||||
SetOpacity(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 +78,6 @@
|
||||
return flags & INSERT_CONTAINER
|
||||
*/
|
||||
|
||||
|
||||
/atom/proc/meteorhit(obj/meteor as obj)
|
||||
return
|
||||
|
||||
@@ -148,7 +159,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 +200,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
|
||||
@@ -362,7 +373,7 @@ its easier to just keep the beam vertical.
|
||||
|
||||
//Cleaning up shit.
|
||||
if(fingerprints && !fingerprints.len)
|
||||
del(fingerprints)
|
||||
qdel(fingerprints)
|
||||
return
|
||||
|
||||
|
||||
@@ -419,7 +430,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
|
||||
|
||||
|
||||
|
||||
@@ -14,6 +14,34 @@
|
||||
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()
|
||||
if(opacity)
|
||||
if(isturf(loc))
|
||||
if(loc:lighting_lumcount > 1)
|
||||
UpdateAffectingLights()
|
||||
loc = null
|
||||
|
||||
..()
|
||||
|
||||
|
||||
/atom/movable/proc/initialize()
|
||||
return
|
||||
|
||||
/atom/movable/Bump(var/atom/A, yes)
|
||||
if(src.throwing)
|
||||
src.throw_impact(A)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
..()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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()
|
||||
..()
|
||||
qdel(src)
|
||||
|
||||
/mob/living/simple_animal/hostile/blobspore/Destroy()
|
||||
if(factory)
|
||||
factory.spores -= src
|
||||
factory = null
|
||||
..()
|
||||
del(src)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
update_icon()
|
||||
if(health <= 0)
|
||||
playsound(src.loc, 'sound/effects/splat.ogg', 50, 1)
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user