mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 13:30:42 +01:00
Adds Destroys.
This commit is contained in:
@@ -24,10 +24,12 @@
|
||||
|
||||
/atom/Destroy()
|
||||
. = ..()
|
||||
density = 0
|
||||
SetOpacity(0)
|
||||
|
||||
if(reagents)
|
||||
qdel(reagents)
|
||||
reagents = null
|
||||
for(var/atom/movable/AM in contents)
|
||||
qdel(AM)
|
||||
invisibility = 101
|
||||
|
||||
@@ -22,6 +22,11 @@
|
||||
new/mob/living/simple_animal/hostile/blobspore(src.loc, src)
|
||||
return 1
|
||||
|
||||
/obj/effect/blob/factory/Destroy()
|
||||
for(var/mob/living/simple_animal/hostile/blobspore/spore in spores)
|
||||
if(spore.factory == src)
|
||||
spore.factory = null
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/blobspore
|
||||
name = "blob"
|
||||
@@ -58,9 +63,10 @@
|
||||
..(loc)
|
||||
return
|
||||
death()
|
||||
..()
|
||||
if(factory)
|
||||
factory.spores -= src
|
||||
..()
|
||||
qdel(src)
|
||||
|
||||
/mob/living/simple_animal/hostile/blobspore/Destroy()
|
||||
if(factory)
|
||||
factory.spores -= src
|
||||
factory = null
|
||||
..()
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
return
|
||||
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
blobs -= src
|
||||
..()
|
||||
return
|
||||
@@ -212,7 +212,7 @@
|
||||
icon_state = "blobidle0"
|
||||
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
var/obj/effect/blob/B = new /obj/effect/blob( src.loc )
|
||||
spawn(30)
|
||||
B.Life()
|
||||
|
||||
@@ -97,6 +97,10 @@
|
||||
pass_flags = PASSTABLE | PASSGRILLE
|
||||
power = 2
|
||||
|
||||
/obj/effect/meteor/Destroy()
|
||||
walk(src,0) //this cancels the walk_towards() proc
|
||||
..()
|
||||
|
||||
/obj/effect/meteor/Bump(atom/A)
|
||||
spawn(0)
|
||||
|
||||
@@ -157,4 +161,4 @@
|
||||
if(istype(W, /obj/item/weapon/pickaxe))
|
||||
qdel(src)
|
||||
return
|
||||
..()
|
||||
..()
|
||||
|
||||
@@ -48,6 +48,9 @@
|
||||
if(bomb.timing)
|
||||
user << "Extreme danger. Arming signal detected. Time remaining: [bomb.timeleft]"
|
||||
|
||||
/obj/item/weapon/pinpointer/Destroy()
|
||||
active = 0
|
||||
..()
|
||||
|
||||
/obj/item/weapon/pinpointer/advpinpointer
|
||||
name = "Advanced Pinpointer"
|
||||
|
||||
@@ -98,6 +98,10 @@
|
||||
TLV["temperature"] = list(20, 40, 140, 160) // K
|
||||
target_temperature = 90
|
||||
|
||||
/obj/machinery/alarm/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
..()
|
||||
|
||||
/obj/machinery/alarm/New(var/loc, var/dir, var/building = 0)
|
||||
..()
|
||||
|
||||
@@ -73,6 +73,11 @@
|
||||
if(radio_controller)
|
||||
set_frequency(frequency)
|
||||
|
||||
obj/machinery/air_sensor/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src,frequency)
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/general_air_control
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "tank"
|
||||
@@ -86,6 +91,11 @@
|
||||
var/datum/radio_frequency/radio_connection
|
||||
circuit = /obj/item/weapon/circuitboard/air_management
|
||||
|
||||
obj/machinery/computer/general_air_control/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/general_air_control/attack_hand(mob/user)
|
||||
if(..(user))
|
||||
return
|
||||
|
||||
@@ -20,6 +20,10 @@
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/portable_atmospherics/Destroy()
|
||||
del(air_contents)
|
||||
..()
|
||||
|
||||
/obj/machinery/portable_atmospherics/initialize()
|
||||
. = ..()
|
||||
spawn()
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
var/locked = 1
|
||||
//var/emagged = 0 //Urist: Moving that var to the general /bot tree as it's used by most bots
|
||||
|
||||
|
||||
/obj/machinery/bot/proc/turn_on()
|
||||
if(stat) return 0
|
||||
on = 1
|
||||
|
||||
@@ -58,6 +58,10 @@
|
||||
if(radio_controller)
|
||||
radio_controller.add_object(src, beacon_freq, filter = RADIO_NAVBEACONS)
|
||||
|
||||
/obj/machinery/bot/cleanbot/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src,beacon_freq)
|
||||
..()
|
||||
|
||||
/obj/machinery/bot/cleanbot/turn_on()
|
||||
. = ..()
|
||||
|
||||
@@ -76,6 +76,12 @@
|
||||
suffix = "#[count]"
|
||||
name = "Mulebot ([suffix])"
|
||||
|
||||
/obj/machinery/bot/mulebot/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src,beacon_freq)
|
||||
radio_controller.remove_object(src,control_freq)
|
||||
..()
|
||||
|
||||
// attack by item
|
||||
// emag : lock/unlock,
|
||||
// screwdriver: open/close hatch
|
||||
|
||||
@@ -107,6 +107,11 @@
|
||||
if((lasercolor == "r") && (name == created_name))
|
||||
name = pick("RED RAMPAGE","RED ROVER","RED KILLDEATH MURDERBOT")
|
||||
|
||||
/obj/machinery/bot/mulebot/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src,beacon_freq)
|
||||
radio_controller.remove_object(src,control_freq)
|
||||
..()
|
||||
|
||||
/obj/machinery/bot/secbot/update_icon()
|
||||
if(on && is_attacking)
|
||||
|
||||
@@ -53,6 +53,14 @@
|
||||
ASSERT(src.network.len > 0)
|
||||
..()
|
||||
|
||||
/obj/machinery/camera/Destroy()
|
||||
deactivate(null, 0) //kick anyone viewing out
|
||||
if(assembly)
|
||||
qdel(assembly)
|
||||
assembly = null
|
||||
qdel(wires)
|
||||
..()
|
||||
|
||||
/obj/machinery/camera/emp_act(severity)
|
||||
if(!isEmpProof())
|
||||
if(prob(100/severity))
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
else
|
||||
stat &= ~NOPOWER
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
if(istype(loc,/obj/item/device/laptop))
|
||||
var/obj/O = loc
|
||||
spawn(5)
|
||||
|
||||
@@ -25,8 +25,10 @@
|
||||
initialize_directions = dir
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/Destroy()
|
||||
if(occupant)
|
||||
occupant.loc = loc
|
||||
var/turf/T = loc
|
||||
T.contents += contents
|
||||
if(beaker)
|
||||
beaker.loc = get_step(loc, SOUTH) //Beaker is carefully ejected from the wreckage of the cryotube
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/initialize()
|
||||
|
||||
@@ -30,7 +30,7 @@ obj/machinery/door/airlock/proc/execute_current_command()
|
||||
|
||||
if (!cur_command)
|
||||
return
|
||||
|
||||
|
||||
do_command(cur_command)
|
||||
if (command_completed(cur_command))
|
||||
cur_command = null
|
||||
@@ -63,7 +63,7 @@ obj/machinery/door/airlock/proc/do_command(var/command)
|
||||
|
||||
lock()
|
||||
sleep(2)
|
||||
|
||||
|
||||
send_status()
|
||||
|
||||
obj/machinery/door/airlock/proc/command_completed(var/command)
|
||||
@@ -85,7 +85,7 @@ obj/machinery/door/airlock/proc/command_completed(var/command)
|
||||
|
||||
if("secure_close")
|
||||
return (locked && density)
|
||||
|
||||
|
||||
return 1 //Unknown command. Just assume it's completed.
|
||||
|
||||
obj/machinery/door/airlock/proc/send_status(var/bumped = 0)
|
||||
@@ -97,7 +97,7 @@ obj/machinery/door/airlock/proc/send_status(var/bumped = 0)
|
||||
|
||||
signal.data["door_status"] = density?("closed"):("open")
|
||||
signal.data["lock_status"] = locked?("locked"):("unlocked")
|
||||
|
||||
|
||||
if (bumped)
|
||||
signal.data["bumped_with_access"] = 1
|
||||
|
||||
@@ -142,8 +142,10 @@ obj/machinery/door/airlock/New()
|
||||
if(radio_controller)
|
||||
set_frequency(frequency)
|
||||
|
||||
|
||||
|
||||
obj/machinery/door/airlock/Destroy()
|
||||
if(frequency && radio_controller)
|
||||
radio_controller.remove_object(src,frequency)
|
||||
..()
|
||||
|
||||
obj/machinery/airlock_sensor
|
||||
icon = 'icons/obj/airlock_machines.dmi'
|
||||
@@ -215,6 +217,10 @@ obj/machinery/airlock_sensor/New()
|
||||
if(radio_controller)
|
||||
set_frequency(frequency)
|
||||
|
||||
obj/machinery/airlock_sensor/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src,frequency)
|
||||
..()
|
||||
|
||||
obj/machinery/airlock_sensor/airlock_interior
|
||||
command = "cycle_interior"
|
||||
@@ -283,6 +289,11 @@ obj/machinery/access_button/New()
|
||||
if(radio_controller)
|
||||
set_frequency(frequency)
|
||||
|
||||
obj/machinery/access_button/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
..()
|
||||
|
||||
obj/machinery/access_button/airlock_interior
|
||||
frequency = 1379
|
||||
command = "cycle_interior"
|
||||
|
||||
@@ -13,6 +13,11 @@
|
||||
..()
|
||||
air_connection = new
|
||||
|
||||
/obj/machinery/door/airlock/alarmlock/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src,air_frequency)
|
||||
..()
|
||||
|
||||
/obj/machinery/door/airlock/alarmlock/initialize()
|
||||
..()
|
||||
radio_controller.remove_object(src, air_frequency)
|
||||
|
||||
@@ -68,7 +68,6 @@
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/door/Destroy()
|
||||
density = 0
|
||||
update_nearby_tiles()
|
||||
|
||||
@@ -9,6 +9,11 @@
|
||||
|
||||
var/on = 1
|
||||
|
||||
obj/machinery/embedded_controller/radio/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src,frequency)
|
||||
..()
|
||||
|
||||
/obj/machinery/embedded_controller/proc/post_signal(datum/signal/signal, comm_line)
|
||||
return 0
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ Class Variables:
|
||||
Class Procs:
|
||||
New() 'game/machinery/machine.dm'
|
||||
|
||||
Del() 'game/machinery/machine.dm'
|
||||
Destroy() 'game/machinery/machine.dm'
|
||||
|
||||
auto_use_power() 'game/machinery/machine.dm'
|
||||
This proc determines how power mode power is deducted by the machine.
|
||||
|
||||
@@ -190,8 +190,10 @@
|
||||
|
||||
pulling = 0
|
||||
|
||||
|
||||
|
||||
/obj/machinery/magnetic_module/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, freq)
|
||||
..()
|
||||
|
||||
/obj/machinery/magnetic_controller
|
||||
name = "Magnetic Control Console"
|
||||
@@ -399,25 +401,7 @@
|
||||
|
||||
// there doesn't HAVE to be separators but it makes paths syntatically visible
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/machinery/magnetic_controller/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
..()
|
||||
|
||||
@@ -240,6 +240,7 @@ Transponder Codes:<UL>"}
|
||||
|
||||
updateDialog()
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/machinery/navbeacon/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, freq)
|
||||
..()
|
||||
|
||||
@@ -80,37 +80,48 @@ var/list/obj/machinery/requests_console/allConsoles = list()
|
||||
//req_console_departments += department
|
||||
switch(departmentType)
|
||||
if(1)
|
||||
if(!("[department]" in req_console_assistance))
|
||||
req_console_assistance += department
|
||||
req_console_assistance |= department
|
||||
if(2)
|
||||
if(!("[department]" in req_console_supplies))
|
||||
req_console_supplies += department
|
||||
req_console_supplies |= department
|
||||
if(3)
|
||||
if(!("[department]" in req_console_information))
|
||||
req_console_information += department
|
||||
req_console_information |= department
|
||||
if(4)
|
||||
if(!("[department]" in req_console_assistance))
|
||||
req_console_assistance += department
|
||||
if(!("[department]" in req_console_supplies))
|
||||
req_console_supplies += department
|
||||
req_console_assistance |= department
|
||||
req_console_supplies |= department
|
||||
if(5)
|
||||
if(!("[department]" in req_console_assistance))
|
||||
req_console_assistance += department
|
||||
if(!("[department]" in req_console_information))
|
||||
req_console_information += department
|
||||
req_console_assistance |= department
|
||||
req_console_information |= department
|
||||
if(6)
|
||||
if(!("[department]" in req_console_supplies))
|
||||
req_console_supplies += department
|
||||
if(!("[department]" in req_console_information))
|
||||
req_console_information += department
|
||||
req_console_supplies |= department
|
||||
req_console_information |= department
|
||||
if(7)
|
||||
if(!("[department]" in req_console_assistance))
|
||||
req_console_assistance += department
|
||||
if(!("[department]" in req_console_supplies))
|
||||
req_console_supplies += department
|
||||
if(!("[department]" in req_console_information))
|
||||
req_console_information += department
|
||||
req_console_assistance |= department
|
||||
req_console_supplies |= department
|
||||
req_console_information |= department
|
||||
|
||||
/obj/machinery/requests_console/Destroy()
|
||||
allConsoles -= src
|
||||
switch(departmentType)
|
||||
if(1)
|
||||
req_console_assistance -= department
|
||||
if(2)
|
||||
req_console_supplies -= department
|
||||
if(3)
|
||||
req_console_information -= department
|
||||
if(4)
|
||||
req_console_assistance -= department
|
||||
req_console_supplies -= department
|
||||
if(5)
|
||||
req_console_assistance -= department
|
||||
req_console_information -= department
|
||||
if(6)
|
||||
req_console_supplies -= department
|
||||
req_console_information -= department
|
||||
if(7)
|
||||
req_console_assistance -= department
|
||||
req_console_supplies -= department
|
||||
req_console_information -= department
|
||||
..()
|
||||
|
||||
/obj/machinery/requests_console/attack_hand(user as mob)
|
||||
if(..(user))
|
||||
|
||||
@@ -45,6 +45,11 @@
|
||||
var/const/STATUS_DISPLAY_TIME = 4
|
||||
var/const/STATUS_DISPLAY_CUSTOM = 99
|
||||
|
||||
/obj/machinery/status_display/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src,frequency)
|
||||
..()
|
||||
|
||||
// register for radio system
|
||||
/obj/machinery/status_display/initialize()
|
||||
..()
|
||||
|
||||
@@ -130,9 +130,11 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
|
||||
for(var/obj/machinery/telecomms/T in telecomms_list)
|
||||
add_link(T)
|
||||
|
||||
|
||||
/obj/machinery/telecomms/Destroy()
|
||||
telecomms_list -= src
|
||||
for(var/obj/machinery/telecomms/comm in telecomms_list)
|
||||
comm.links -= src
|
||||
links = list()
|
||||
..()
|
||||
|
||||
// Used in auto linking
|
||||
|
||||
@@ -146,9 +146,8 @@
|
||||
/obj/machinery/vending/Destroy()
|
||||
qdel(wires)
|
||||
wires = null
|
||||
if(coin)
|
||||
qdel(coin)
|
||||
coin = null
|
||||
qdel(coin)
|
||||
coin = null
|
||||
..()
|
||||
|
||||
/obj/machinery/vending/ex_act(severity)
|
||||
|
||||
@@ -17,7 +17,7 @@ var/list/obj/effect/bump_teleporter/BUMP_TELEPORTERS = list()
|
||||
|
||||
/obj/effect/bump_teleporter/Destroy()
|
||||
BUMP_TELEPORTERS -= src
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/effect/bump_teleporter/Bumped(atom/user)
|
||||
if(!ismob(user))
|
||||
|
||||
@@ -24,7 +24,7 @@ var/global/list/image/splatter_cache=list()
|
||||
/obj/effect/decal/cleanable/blood/Destroy()
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure(0)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/New()
|
||||
..()
|
||||
|
||||
@@ -23,8 +23,7 @@ would spawn and follow the beaker, even if it is carried or thrown.
|
||||
/obj/effect/Destroy()
|
||||
if(reagents)
|
||||
reagents.delete()
|
||||
PlaceInPool(src)
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
/obj/effect/effect/water/Move(turf/newloc)
|
||||
//var/turf/T = src.loc
|
||||
@@ -140,8 +139,7 @@ steam.start() -- spawns the effect
|
||||
var/turf/T = src.loc
|
||||
if (istype(T, /turf))
|
||||
T.hotspot_expose(1000,100)
|
||||
..()
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/effect/effect/sparks/Move()
|
||||
..()
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
|
||||
/obj/effect/landmark/Destroy()
|
||||
landmarks_list -= src
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/effect/landmark/start
|
||||
name = "start"
|
||||
@@ -103,7 +103,8 @@
|
||||
|
||||
/obj/effect/landmark/start/ninja/New()
|
||||
..()
|
||||
ninjastart += src
|
||||
ninjastart += loc
|
||||
qdel(src)
|
||||
|
||||
//Costume spawner landmarks
|
||||
|
||||
|
||||
@@ -3,10 +3,6 @@
|
||||
unacidable = 1
|
||||
var/i_attached//Added for possible image attachments to objects. For hallucinations and the like.
|
||||
|
||||
/obj/effect/overlay/Destroy()
|
||||
PlaceInPool(src)
|
||||
return 1 //cancels the GCing
|
||||
|
||||
/obj/effect/overlay/beam//Not actually a projectile, just an effect.
|
||||
name="beam"
|
||||
icon='icons/effects/beam.dmi'
|
||||
|
||||
@@ -209,4 +209,4 @@
|
||||
src.visible_message("\red \the [src] splits open.")
|
||||
for(var/atom/movable/A in contents)
|
||||
A.loc = src.loc
|
||||
..()
|
||||
return ..()
|
||||
|
||||
@@ -115,7 +115,9 @@
|
||||
spawn(5)
|
||||
radio = new /obj/item/radio/integrated/signal(src)
|
||||
|
||||
|
||||
/obj/item/weapon/cartridge/signal/Destroy()
|
||||
qdel(radio)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/cartridge/quartermaster
|
||||
name = "\improper Space Parts & Space Vendors cartridge"
|
||||
|
||||
@@ -99,6 +99,12 @@
|
||||
post_signal(control_freq, "command", "summon", "active", active, "target", get_turf(PDA) , s_filter = RADIO_SECBOT)
|
||||
post_signal(control_freq, "command", "bot_status", "active", active, s_filter = RADIO_SECBOT)
|
||||
|
||||
|
||||
/obj/item/radio/integrated/beepsky/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, control_freq)
|
||||
..()
|
||||
|
||||
/obj/item/radio/integrated/mule
|
||||
var/list/botlist = null // list of bots
|
||||
var/obj/machinery/bot/mulebot/active // the active bot; if null, show bot list
|
||||
@@ -245,3 +251,8 @@
|
||||
radio_connection.post_signal(src, signal)
|
||||
|
||||
return
|
||||
|
||||
/obj/item/radio/integrated/signal/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
..()
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
/obj/item/device/radio/headset/Destroy()
|
||||
qdel(keyslot1)
|
||||
qdel(keyslot2)
|
||||
keyslot1 = null
|
||||
keyslot2 = null
|
||||
..()
|
||||
|
||||
/obj/item/device/radio/headset/examine(mob/user)
|
||||
|
||||
@@ -45,6 +45,15 @@
|
||||
if(radio_controller)
|
||||
initialize()
|
||||
|
||||
/obj/item/device/radio/Destroy()
|
||||
qdel(wires)
|
||||
wires = null
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
for (var/ch_name in channels)
|
||||
radio_controller.remove_object(src, radiochannels[ch_name])
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/device/radio/initialize()
|
||||
|
||||
@@ -625,7 +634,6 @@
|
||||
onclose(user, "radio")
|
||||
return
|
||||
|
||||
|
||||
/obj/item/device/radio/proc/config(op)
|
||||
if(radio_controller)
|
||||
for (var/ch_name in channels)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
var/icon/virtualIcon
|
||||
var/list/bulletholes = list()
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
// if a target is deleted and associated with a stake, force stake to forget
|
||||
for(var/obj/structure/target_stake/T in view(3,src))
|
||||
if(T.pinned_target == src)
|
||||
|
||||
@@ -31,10 +31,10 @@
|
||||
|
||||
/obj/item/stack/Destroy()
|
||||
if(uses_charge)
|
||||
return
|
||||
return 1
|
||||
if (src && usr && usr.machine == src)
|
||||
usr << browse(null, "window=stack")
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
|
||||
@@ -40,6 +40,11 @@
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
|
||||
/obj/item/weapon/rcd/Destroy()
|
||||
qdel(spark_system)
|
||||
spark_system = null
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/rcd/attackby(obj/item/weapon/W, mob/user)
|
||||
|
||||
if(istype(W, /obj/item/weapon/rcd_ammo))
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
icon_state = "implant_melted"
|
||||
malfunction = MALFUNCTION_PERMANENT
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
if(part)
|
||||
part.implants.Remove(src)
|
||||
..()
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
name = master_item.name
|
||||
verbs -= /obj/item/verb/verb_pickup //make sure this is never picked up.
|
||||
..()
|
||||
|
||||
/obj/item/weapon/storage/internal/Destroy()
|
||||
master_item = null
|
||||
..()
|
||||
|
||||
/obj/item/weapon/storage/internal/attack_hand()
|
||||
return //make sure this is never picked up
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
w_class = 3
|
||||
var/list/can_hold = new/list() //List of objects which this item can store (if set, it can't store anything else)
|
||||
var/list/cant_hold = new/list() //List of objects which this item can't store (in effect only if can_hold isn't set)
|
||||
var/list/is_seeing = new/list() //List of mobs which are currently seeing the contents of this item's storage
|
||||
var/max_w_class = 2 //Max size of objects that this object can store (in effect only if can_hold isn't set)
|
||||
var/max_storage_space = 14 //The sum of the storage costs of all the items in this storage item.
|
||||
var/storage_slots = 7 //The number of storage slots in this container.
|
||||
@@ -23,6 +24,12 @@
|
||||
var/collection_mode = 1; //0 = pick one at a time, 1 = pick all on tile
|
||||
var/use_sound = "rustle" //sound played when used. null for no sound.
|
||||
|
||||
/obj/item/weapon/storage/Destroy()
|
||||
close_all()
|
||||
qdel(boxes)
|
||||
qdel(closer)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/storage/MouseDrop(obj/over_object as obj)
|
||||
|
||||
if(!canremove)
|
||||
@@ -86,6 +93,7 @@
|
||||
user.client.screen += src.closer
|
||||
user.client.screen += src.contents
|
||||
user.s_active = src
|
||||
is_seeing |= user
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/proc/hide_from(mob/user as mob)
|
||||
@@ -97,7 +105,7 @@
|
||||
user.client.screen -= src.contents
|
||||
if(user.s_active == src)
|
||||
user.s_active = null
|
||||
return
|
||||
is_seeing -= user
|
||||
|
||||
/obj/item/weapon/storage/proc/open(mob/user as mob)
|
||||
if (src.use_sound)
|
||||
@@ -109,11 +117,24 @@
|
||||
show_to(user)
|
||||
|
||||
/obj/item/weapon/storage/proc/close(mob/user as mob)
|
||||
|
||||
src.hide_from(user)
|
||||
user.s_active = null
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/proc/close_all()
|
||||
for(var/mob/M in can_see_contents())
|
||||
close(M)
|
||||
. = 1
|
||||
|
||||
/obj/item/weapon/storage/proc/can_see_contents()
|
||||
var/list/cansee = list()
|
||||
for(var/mob/M in is_seeing)
|
||||
if(M.s_active == src && M.client)
|
||||
cansee |= M
|
||||
else
|
||||
is_seeing -= M
|
||||
return cansee
|
||||
|
||||
//This proc draws out the inventory and places the items on it. tx and ty are the upper left tile and mx, my are the bottm right.
|
||||
//The numbers are calculated from the bottom-left The bottom-left slot being 1,1.
|
||||
/obj/item/weapon/storage/proc/orient_objs(tx, ty, mx, my)
|
||||
@@ -463,4 +484,4 @@
|
||||
return depth
|
||||
|
||||
/obj/item/proc/get_storage_cost()
|
||||
return 2**(w_class-1) //1,2,4,8,16,...
|
||||
return 2**(w_class-1) //1,2,4,8,16,...
|
||||
|
||||
@@ -6,10 +6,11 @@
|
||||
var/parts
|
||||
|
||||
/obj/structure/Destroy()
|
||||
..()
|
||||
if(opacity)
|
||||
UpdateAffectingLights()
|
||||
if(parts)
|
||||
new parts(loc)
|
||||
density = 0
|
||||
..()
|
||||
|
||||
/obj/structure/attack_hand(mob/user)
|
||||
if(breakable)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
name = "[mineralType] door"
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
update_nearby_tiles()
|
||||
..()
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ var/list/mechtoys = list(
|
||||
T.blocks_air = 1
|
||||
..()
|
||||
|
||||
Del() //lazy hack to set the turf to allow air to pass if it's a simulated floor
|
||||
Destroy() //lazy hack to set the turf to allow air to pass if it's a simulated floor
|
||||
var/turf/T = get_turf(loc)
|
||||
if(T)
|
||||
if(istype(T, /turf/simulated/floor))
|
||||
|
||||
@@ -17,5 +17,5 @@
|
||||
flick("turf_animation",c_animation)
|
||||
spawn(10)
|
||||
if(c_animation)
|
||||
PlaceInPool(c_animation)
|
||||
qdel(c_animation)
|
||||
c_animation = null
|
||||
|
||||
Reference in New Issue
Block a user