mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 18:44:48 +01:00
-tg- atom pooling system, qdel changes
This commit first and foremost ports the -tg- atom pooling system, and removes the old experimental system entirely. Secondly, this PR modifies the qdel system to use a -tg- lookalike "destroy hint" system, which means that individual objects can tell qdel what to do with them beyond taking care of things they need to delete. This ties into the atom pooling system via a new hint define, QDEL_HINT_PUTINPOOL, which will place the atom in the pool instead of deleting it as per standard. Emitter beams are now fully pooled. Qdel now has semi-compatibility with all datum types, however it is not the same as -tg-'s "Queue everything!" system. It simply passes it through the GC immediately and adds it to the "hard del" lists. This means that reagents can be qdel'ed, but there is no purpose as of yet, as it is more or less the same as just deleting them, with the added effect of adding logs of them being deleted to the garbage collector.
This commit is contained in:
@@ -216,4 +216,4 @@
|
||||
if(previous)
|
||||
previous.next = null
|
||||
master.last = previous
|
||||
..()
|
||||
return ..()
|
||||
@@ -12,8 +12,7 @@
|
||||
/obj/item/assembly/shock_kit/Destroy()
|
||||
del(part1)
|
||||
del(part2)
|
||||
..()
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/assembly/shock_kit/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weapon/wrench) && !status)
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
/obj/item/clothing/mask/horsehead/Destroy()
|
||||
if(flags & NODROP)
|
||||
goodbye_horses(loc)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/mask/horsehead/proc/goodbye_horses(mob/user) //I'm flying over you
|
||||
if(!ismob(user))
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
/obj/item/clothing/head/helmet/space/chronos/Destroy()
|
||||
dropped()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/clothing/suit/space/chronos
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
/obj/item/clothing/suit/space/chronos/Destroy()
|
||||
dropped()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/suit/space/chronos/emp_act(severity)
|
||||
var/mob/living/carbon/human/user = src.loc
|
||||
@@ -209,4 +209,4 @@
|
||||
holder.remote_control = null
|
||||
if(holder.client && (holder.client.eye == src))
|
||||
holder.client.eye = holder
|
||||
..()
|
||||
return ..()
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
/obj/effect/landmark/animal_spawner/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
return ..()
|
||||
|
||||
/obj/effect/landmark/animal_spawner/panther
|
||||
name = "panther spawner"
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
/obj/effect/jungle_tribe_spawn/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
return ..()
|
||||
|
||||
/obj/effect/jungle_tribe_spawn/process()
|
||||
set background = 1
|
||||
|
||||
@@ -113,3 +113,5 @@
|
||||
D.effect_r -= src
|
||||
D.effect_g -= src
|
||||
D.effect_b -= src
|
||||
|
||||
return ..()
|
||||
@@ -133,7 +133,7 @@ obj/effect/liquid/Move()
|
||||
|
||||
obj/effect/liquid/Destroy()
|
||||
src.controller.liquid_objects.Remove(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
obj/effect/liquid/proc/update_icon2()
|
||||
//icon_state = num2text( max(1,min(7,(floor(volume),10)/10)) )
|
||||
|
||||
@@ -101,4 +101,4 @@
|
||||
|
||||
/obj/machinery/media/Destroy()
|
||||
disconnect_media_source()
|
||||
..()
|
||||
return ..()
|
||||
@@ -343,12 +343,12 @@
|
||||
if(5)
|
||||
var/quantity = rand(1,3)
|
||||
for(var/i=0, i<quantity, i++)
|
||||
getFromPool(/obj/item/weapon/shard, loc)
|
||||
PoolOrNew(/obj/item/weapon/shard, loc)
|
||||
|
||||
if(6)
|
||||
var/quantity = rand(1,3)
|
||||
for(var/i=0, i<quantity, i++)
|
||||
getFromPool(/obj/item/weapon/shard/plasma, loc)
|
||||
PoolOrNew(/obj/item/weapon/shard/plasma, loc)
|
||||
|
||||
if(7)
|
||||
var/obj/item/stack/sheet/mineral/uranium/R = new(src)
|
||||
|
||||
@@ -92,7 +92,7 @@ var/list/image/ghost_darkness_images = list() //this is a list of images for thi
|
||||
del(ghostimage)
|
||||
ghostimage = null
|
||||
updateallghostimages()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/mob/dead/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
return 1
|
||||
|
||||
@@ -25,7 +25,7 @@ var/const/ALIEN_AFK_BRACKET = 450 // 45 seconds
|
||||
affected_mob.status_flags &= ~(XENO_HOST)
|
||||
spawn(0)
|
||||
RemoveInfectionImages(affected_mob)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/alien_embryo/process()
|
||||
if(!affected_mob) return
|
||||
|
||||
@@ -225,7 +225,7 @@ var/list/ai_verbs_default = list(
|
||||
|
||||
/mob/living/silicon/ai/Destroy()
|
||||
ai_list -= src
|
||||
..()
|
||||
return ..()
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
del(ghostimage)
|
||||
ghostimage = null;
|
||||
updateallghostimages()
|
||||
return ..()
|
||||
|
||||
// Movement code. Returns 0 to stop air movement from moving it.
|
||||
/mob/aiEye/Move()
|
||||
|
||||
@@ -179,7 +179,7 @@ var/list/robot_verbs_default = list(
|
||||
if(T) mmi.loc = T
|
||||
if(mind) mind.transfer_to(mmi.brainmob)
|
||||
mmi = null
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/robot/proc/pick_module()
|
||||
if(module)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
/mob/living/simple_animal/bee/Destroy()
|
||||
if(parent)
|
||||
parent.owned_bee_swarms.Remove(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/bee/Life()
|
||||
..()
|
||||
|
||||
@@ -193,7 +193,7 @@
|
||||
|
||||
/mob/living/simple_animal/spiderbot/Destroy()
|
||||
eject_brain()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/spiderbot/New()
|
||||
|
||||
|
||||
@@ -170,16 +170,16 @@
|
||||
var/obj/O
|
||||
|
||||
//shards
|
||||
O = getFromPool(/obj/item/weapon/shard, loc)
|
||||
O = PoolOrNew(/obj/item/weapon/shard, loc)
|
||||
step_to(O, get_turf(pick(view(7, src))))
|
||||
if(prob(75))
|
||||
O = getFromPool(/obj/item/weapon/shard, loc)
|
||||
O = PoolOrNew(/obj/item/weapon/shard, loc)
|
||||
step_to(O, get_turf(pick(view(7, src))))
|
||||
if(prob(50))
|
||||
O = getFromPool(/obj/item/weapon/shard, loc)
|
||||
O = PoolOrNew(/obj/item/weapon/shard, loc)
|
||||
step_to(O, get_turf(pick(view(7, src))))
|
||||
if(prob(25))
|
||||
O = getFromPool(/obj/item/weapon/shard, loc)
|
||||
O = PoolOrNew(/obj/item/weapon/shard, loc)
|
||||
step_to(O, get_turf(pick(view(7, src))))
|
||||
|
||||
//rods
|
||||
@@ -270,7 +270,7 @@
|
||||
C.name = "Corrupted drone morality core"
|
||||
C.origin_tech = "illegal=[rand(3,6)]"
|
||||
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/projectile/beam/drone
|
||||
damage = 15
|
||||
|
||||
@@ -216,7 +216,7 @@
|
||||
/mob/living/simple_animal/hostile/spaceWorm/Destroy()
|
||||
if(previousWorm)
|
||||
previousWorm.Detach(0)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
|
||||
//Move all segments if one piece moves.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
dead_mob_list -= src
|
||||
living_mob_list -= src
|
||||
ghostize()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/mob/New()
|
||||
mob_list += src
|
||||
|
||||
@@ -416,7 +416,7 @@
|
||||
affecting.layer = initial(affecting.layer)
|
||||
affecting.grabbed_by -= src
|
||||
del(hud)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
#undef EAT_TIME_XENO
|
||||
#undef EAT_TIME_FAT
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
/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.
|
||||
Usage:
|
||||
To get a object, just called PoolOrNew(type, list of args to pass to New)
|
||||
To put a object back in the pool, call place in pool.
|
||||
This will call destroy on the object, set its loc to null,
|
||||
and reset all of its vars to their default
|
||||
You can override your object's destroy to return QDEL_HINT_PLACEINPOOL
|
||||
to ensure its always placed in this pool (this will only be acted on if qdel calls destroy, and destroy will not get called twice)
|
||||
*/
|
||||
|
||||
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))
|
||||
AM = new get_type (arglist(second_arg))
|
||||
else
|
||||
AM = new get_type (second_arg)
|
||||
|
||||
if(AM)
|
||||
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, destroy = 1)
|
||||
if(!istype(AM))
|
||||
return
|
||||
|
||||
if(AM in GlobalPool[AM.type])
|
||||
return
|
||||
|
||||
if(!GlobalPool[AM.type])
|
||||
GlobalPool[AM.type] = list()
|
||||
|
||||
GlobalPool[AM.type] |= AM
|
||||
|
||||
if (destroy)
|
||||
AM.Destroy()
|
||||
|
||||
AM.ResetVars()
|
||||
|
||||
|
||||
|
||||
/atom/movable/proc/ResetVars()
|
||||
var/list/excluded = list("animate_movement", "loc", "locs", "parent_type", "vars", "verbs", "type")
|
||||
|
||||
for(var/V in vars)
|
||||
if(V in excluded)
|
||||
continue
|
||||
|
||||
vars[V] = initial(vars[V])
|
||||
|
||||
vars["loc"] = null
|
||||
@@ -38,7 +38,7 @@
|
||||
/obj/machinery/power/am_control_unit/Destroy()//Perhaps damage and run stability checks rather than just del on the others
|
||||
for(var/obj/machinery/am_shielding/AMS in linked_shielding)
|
||||
del(AMS)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/machinery/power/am_control_unit/process()
|
||||
|
||||
@@ -70,8 +70,7 @@ proc/cardinalrange(var/center)
|
||||
if(processing) shutdown_core()
|
||||
visible_message("\red The [src.name] melts!")
|
||||
//Might want to have it leave a mess on the floor but no sprites for now
|
||||
..()
|
||||
return
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/machinery/am_shielding/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
|
||||
@@ -1335,7 +1335,7 @@ obj/machinery/power/apc/proc/autoset(var/val, var/on)
|
||||
area.power_change()
|
||||
if(occupant)
|
||||
malfvacate(1)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/apc/proc/shock(mob/user, prb)
|
||||
if(!prob(prb))
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
attached.anchored = 0
|
||||
attached.attached = null
|
||||
attached = null*/
|
||||
..() // then go ahead and delete the cable
|
||||
return ..() // then go ahead and delete the cable
|
||||
|
||||
/obj/structure/cable/hide(var/i)
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ var/const/GRAV_NEEDS_WRENCH = 3
|
||||
set_broken()
|
||||
if(main_part)
|
||||
qdel(main_part)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
//
|
||||
// Part generator which is mostly there for looks
|
||||
@@ -126,7 +126,7 @@ var/const/GRAV_NEEDS_WRENCH = 3
|
||||
if (!(A.z in config.station_levels)) continue
|
||||
A.gravitychange(0,A)
|
||||
shake_everyone()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
if(A)
|
||||
on = 0
|
||||
// A.update_lights()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/light/update_icon()
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ display round(lastgen) and plasmatank amount
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/Destroy()
|
||||
DropFuel()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/RefreshParts()
|
||||
var/temp_rating = 0
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
/obj/machinery/power/Destroy()
|
||||
disconnect_from_network()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
// common helper procs for all power machines
|
||||
/obj/machinery/power/proc/add_avail(var/amount)
|
||||
|
||||
@@ -23,7 +23,7 @@ var/global/list/rad_collectors = list()
|
||||
|
||||
/obj/machinery/power/rad_collector/Destroy()
|
||||
rad_collectors -= src
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/rad_collector/process()
|
||||
if(P)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
FG1.cleanup()
|
||||
if(FG2 && !FG2.clean_up)
|
||||
FG2.cleanup()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/containment_field/attack_hand(mob/user as mob)
|
||||
if(get_dist(src, user) > 1)
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
msg_admin_attack("Emitter deleted at ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("Emitter deleted at ([x],[y],[z])")
|
||||
investigate_log("<font color='red'>deleted</font> at ([x],[y],[z])","singulo")
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/emitter/update_icon()
|
||||
if (active && powernet && avail(active_power_usage))
|
||||
@@ -167,13 +167,16 @@
|
||||
else
|
||||
src.fire_delay = rand(20,100)
|
||||
src.shot_number = 0
|
||||
var/obj/item/projectile/beam/emitter/A = new /obj/item/projectile/beam/emitter(src.loc)
|
||||
|
||||
var/obj/item/projectile/beam/emitter/A = PoolOrNew(/obj/item/projectile/beam/emitter,src.loc)
|
||||
|
||||
A.dir = src.dir
|
||||
playsound(get_turf(src), 'sound/weapons/emitter.ogg', 25, 1)
|
||||
if(prob(35))
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
A.dir = src.dir
|
||||
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
A.yo = 20
|
||||
|
||||
@@ -175,7 +175,7 @@ field_generator power level display
|
||||
|
||||
/obj/machinery/field_generator/Destroy()
|
||||
src.cleanup()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
/obj/singularity/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/singularity/Move(atom/newloc, direct)
|
||||
if(current_size >= STAGE_FIVE || check_turfs_in(direct))
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
investigate_log("<font color='red'>deleted</font> at ([area.name])","singulo")
|
||||
if(terminal)
|
||||
disconnect_terminal()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
// create a terminal object pointing towards the SMES
|
||||
// wires will attach to this
|
||||
|
||||
@@ -29,7 +29,7 @@ var/list/solars_list = list()
|
||||
|
||||
/obj/machinery/power/solar/Destroy()
|
||||
unset_control() //remove from control computer
|
||||
..()
|
||||
return ..()
|
||||
|
||||
//set the control of the panel to a given computer if closer than SOLAR_MAX_DIST
|
||||
/obj/machinery/power/solar/proc/set_control(var/obj/machinery/power/solar_control/SC)
|
||||
@@ -304,7 +304,7 @@ var/list/solars_list = list()
|
||||
M.unset_control()
|
||||
if(connected_tracker)
|
||||
connected_tracker.unset_control()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/solar_control/disconnect_from_network()
|
||||
..()
|
||||
@@ -386,7 +386,7 @@ var/list/solars_list = list()
|
||||
data["connected_panels"] = connected_panels.len
|
||||
data["connected_tracker"] = (connected_tracker ? 1 : 0)
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "solar_control.tmpl", name, 490, 420)
|
||||
ui.set_initial_data(data)
|
||||
@@ -446,7 +446,7 @@ var/list/solars_list = list()
|
||||
/obj/machinery/power/solar_control/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
|
||||
|
||||
if(href_list["rate_control"])
|
||||
if(href_list["cdir"])
|
||||
src.cdir = dd_range(0,359,(360+src.cdir+text2num(href_list["cdir"]))%360)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
/obj/machinery/power/tracker/Destroy()
|
||||
unset_control() //remove from control computer
|
||||
..()
|
||||
return ..()
|
||||
|
||||
//set the control of the tracker to a given computer if closer than SOLAR_MAX_DIST
|
||||
/obj/machinery/power/tracker/proc/set_control(var/obj/machinery/power/solar_control/SC)
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
if (src.stat & BROKEN)
|
||||
user << "\blue The broken glass falls out."
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
||||
getFromPool(/obj/item/weapon/shard, loc)
|
||||
PoolOrNew(/obj/item/weapon/shard, loc)
|
||||
var/obj/item/weapon/circuitboard/turbine_control/M = new /obj/item/weapon/circuitboard/turbine_control( A )
|
||||
for (var/obj/C in src)
|
||||
C.loc = src.loc
|
||||
|
||||
@@ -38,7 +38,7 @@ obj/item/weapon/gun/energy/laser/retro
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/captain/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/captain/process()
|
||||
charge_tick++
|
||||
|
||||
@@ -312,7 +312,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
|
||||
/obj/item/weapon/gun/energy/disabler/cyborg/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/energy/disabler/cyborg/process() //Every [recharge_time] ticks, recharge a shot for the cyborg
|
||||
if(power_supply.charge == power_supply.maxcharge)
|
||||
@@ -369,7 +369,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
|
||||
/obj/item/weapon/gun/energy/printer/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/energy/printer/process()
|
||||
if(power_supply.charge == power_supply.maxcharge)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
/obj/item/weapon/gun/energy/taser/cyborg/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/energy/taser/cyborg/process() //Every [recharge_time] ticks, recharge a shot for the cyborg
|
||||
if(power_supply.charge == power_supply.maxcharge)
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
/obj/item/weapon/gun/energy/crossbow/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/energy/crossbow/process()
|
||||
charge_tick++
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
/obj/item/weapon/gun/magic/Destroy()
|
||||
if(can_charge) processing_objects.Remove(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/weapon/gun/magic/process()
|
||||
|
||||
@@ -75,6 +75,9 @@
|
||||
/obj/item/projectile/beam/emitter/singularity_pull()
|
||||
return //don't want the emitters to miss
|
||||
|
||||
/obj/item/projectile/beam/emitter/Destroy()
|
||||
return QDEL_HINT_PUTINPOOL
|
||||
|
||||
/obj/item/projectile/lasertag
|
||||
name = "laser tag beam"
|
||||
icon_state = "omnilaser"
|
||||
|
||||
@@ -633,4 +633,6 @@ atom/proc/create_reagents(var/max_vol)
|
||||
reagent.Destroy()
|
||||
|
||||
if(my_atom)
|
||||
my_atom = null
|
||||
my_atom = null
|
||||
|
||||
return ..()
|
||||
@@ -3215,3 +3215,5 @@ datum
|
||||
if(holder)
|
||||
holder.reagent_list -= src
|
||||
holder = null
|
||||
|
||||
return ..()
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/process()
|
||||
if(reagents)
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/process() //Every [recharge_time] seconds, recharge some reagents for the cyborg
|
||||
charge_tick++
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
var/obj/item/weapon/broken_bottle/B = new /obj/item/weapon/broken_bottle(user.loc)
|
||||
user.put_in_active_hand(B)
|
||||
if(prob(33))
|
||||
getFromPool(/obj/item/weapon/shard, target.loc) // Create a glass shard at the target's location!
|
||||
PoolOrNew(/obj/item/weapon/shard, target.loc) // Create a glass shard at the target's location!
|
||||
B.icon_state = src.icon_state
|
||||
|
||||
var/icon/I = new('icons/obj/drinks.dmi', src.icon_state)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
proc/smash(mob/living/target as mob, mob/living/user as mob)
|
||||
//Creates a shattering noise and replaces the drinking glass with a glass shard
|
||||
user.drop_item()
|
||||
var/obj/item/weapon/shard/S = getFromPool(/obj/item/weapon/shard, user.loc)
|
||||
var/obj/item/weapon/shard/S = PoolOrNew(/obj/item/weapon/shard, user.loc)
|
||||
user.put_in_active_hand(S)
|
||||
|
||||
playsound(src, "shatter", 70, 1)
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
/obj/item/weapon/reagent_containers/food/snacks/csandwich/Destroy()
|
||||
for(var/obj/item/O in ingredients)
|
||||
del(O)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/csandwich/examine()
|
||||
..()
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
if(contents)
|
||||
for(var/atom/movable/something in contents)
|
||||
something.loc = get_turf(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/attack_animal(mob/M)
|
||||
if(isanimal(M))
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/glowberries/Destroy()
|
||||
if(istype(loc,/mob))
|
||||
loc.set_light(round(loc.luminosity - potency/5,1))
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/glowberries/pickup(mob/user)
|
||||
src.set_light(0)
|
||||
@@ -614,7 +614,7 @@
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/Destroy()
|
||||
if(istype(loc,/mob))
|
||||
loc.set_light(round(loc.luminosity - potency/10,1))
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/pickup(mob/user)
|
||||
set_light(0)
|
||||
|
||||
@@ -68,8 +68,7 @@ var/global/list/obj/machinery/message_server/message_servers = list()
|
||||
|
||||
/obj/machinery/message_server/Destroy()
|
||||
message_servers -= src
|
||||
..()
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/machinery/message_server/process()
|
||||
//if(decryptkey == "password")
|
||||
@@ -185,7 +184,7 @@ var/obj/machinery/blackbox_recorder/blackbox
|
||||
var/list/msg_syndicate = list()
|
||||
var/list/msg_mining = list()
|
||||
var/list/msg_cargo = list()
|
||||
var/list/msg_service = list()
|
||||
var/list/msg_service = list()
|
||||
|
||||
var/list/datum/feedback_variable/feedback = new()
|
||||
|
||||
@@ -217,7 +216,7 @@ var/obj/machinery/blackbox_recorder/blackbox
|
||||
BR.messages_admin = messages_admin
|
||||
if(blackbox != BR)
|
||||
blackbox = BR
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/blackbox_recorder/proc/find_feedback_datum(var/variable)
|
||||
for(var/datum/feedback_variable/FV in feedback)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
/obj/machinery/r_n_d/server/Destroy()
|
||||
griefProtection()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/r_n_d/server/RefreshParts()
|
||||
var/tot_rating = 0
|
||||
|
||||
@@ -18,19 +18,19 @@
|
||||
"It's mesmerizing to behold.")
|
||||
|
||||
/obj/structure/crystal/Destroy()
|
||||
src.visible_message("\red<b>[src] shatters!</b>")
|
||||
src.visible_message("<span class='danger'>\The [src] shatters!</span>")
|
||||
if(prob(75))
|
||||
getFromPool(/obj/item/weapon/shard/plasma, loc)
|
||||
PoolOrNew(/obj/item/weapon/shard/plasma, loc)
|
||||
if(prob(50))
|
||||
getFromPool(/obj/item/weapon/shard/plasma, loc)
|
||||
PoolOrNew(/obj/item/weapon/shard/plasma, loc)
|
||||
if(prob(25))
|
||||
getFromPool(/obj/item/weapon/shard/plasma, loc)
|
||||
PoolOrNew(/obj/item/weapon/shard/plasma, loc)
|
||||
if(prob(75))
|
||||
getFromPool(/obj/item/weapon/shard, loc)
|
||||
PoolOrNew(/obj/item/weapon/shard, loc)
|
||||
if(prob(50))
|
||||
getFromPool(/obj/item/weapon/shard, loc)
|
||||
PoolOrNew(/obj/item/weapon/shard, loc)
|
||||
if(prob(25))
|
||||
getFromPool(/obj/item/weapon/shard, loc)
|
||||
..()
|
||||
PoolOrNew(/obj/item/weapon/shard, loc)
|
||||
return ..()
|
||||
|
||||
//todo: laser_act
|
||||
|
||||
@@ -311,9 +311,9 @@
|
||||
apply_material_decorations = 0
|
||||
if(22)
|
||||
if(prob(50))
|
||||
new_item = getFromPool(/obj/item/weapon/shard, loc)
|
||||
new_item = PoolOrNew(/obj/item/weapon/shard, loc)
|
||||
else
|
||||
new_item = getFromPool(/obj/item/weapon/shard/plasma, loc)
|
||||
new_item = PoolOrNew(/obj/item/weapon/shard/plasma, loc)
|
||||
|
||||
apply_prefix = 0
|
||||
apply_image_decorations = 0
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
G.attackby(NG, user, params)
|
||||
usr << "You add the newly-formed plasma glass to the stack. It now contains [NG.amount] sheets."
|
||||
//SN src = null
|
||||
returnToPool(src)
|
||||
qdel(src)
|
||||
return
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
|
||||
/obj/item/weapon/anodevice/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/anodevice/attack(mob/living/M as mob, mob/living/user as mob, def_zone)
|
||||
if (!istype(M))
|
||||
|
||||
@@ -315,7 +315,7 @@
|
||||
/obj/machinery/suspension_gen/Destroy()
|
||||
//safety checks: clear the field and drop anything it's holding
|
||||
deactivate()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/suspension_gen/verb/rotate_ccw()
|
||||
set src in view(1)
|
||||
@@ -347,4 +347,4 @@
|
||||
/obj/effect/suspension_field/Destroy()
|
||||
for(var/obj/I in src)
|
||||
I.loc = src.loc
|
||||
..()
|
||||
return ..()
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
/obj/item/device/beacon_locator/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/device/beacon_locator/process()
|
||||
if(target_radio)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
|
||||
/turf/simulated/floor/plating/smatter/Destroy()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
var/list/step_overlays = list("n" = NORTH, "s" = SOUTH, "e" = EAST, "w" = WEST)
|
||||
// Kill and update the space overlays around us.
|
||||
@@ -60,7 +60,7 @@
|
||||
turf_to_check.overlays += image('icons/turf/walls.dmi', "smatter_side_[direction]")
|
||||
|
||||
/turf/simulated/smatter/Destroy()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
var/list/step_overlays = list("n" = NORTH, "s" = SOUTH, "e" = EAST, "w" = WEST)
|
||||
// Kill and update the space overlays around us.
|
||||
|
||||
@@ -19,7 +19,7 @@ var/list/GPS_list = list()
|
||||
|
||||
/obj/item/device/gps/Destroy()
|
||||
GPS_list.Remove(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/device/gps/emp_act(severity)
|
||||
emped = 1
|
||||
|
||||
@@ -126,8 +126,8 @@
|
||||
|
||||
/obj/item/weapon/rcs/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/rcs/process()
|
||||
if(rcharges > 10)
|
||||
rcharges = 10
|
||||
@@ -156,4 +156,3 @@
|
||||
s.start()
|
||||
user << "<span class = 'caution'> You emag the RCS. Click on it to toggle between modes.</span>"
|
||||
return
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
if(inserted_gps)
|
||||
inserted_gps.loc = loc
|
||||
inserted_gps = null
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/telescience/examine(mob/user)
|
||||
..()
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
for(var/obj/tram/controlpad/CP in controllers)
|
||||
remove_controller(CP)
|
||||
killLoop()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/tram/tram_controller/emp_act(severity)
|
||||
if(automode) automode = 0
|
||||
|
||||
Reference in New Issue
Block a user