mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-19 11:05:50 +01:00
Adds Destroys.
This commit is contained in:
@@ -259,6 +259,9 @@
|
||||
return
|
||||
|
||||
/obj/effect/beam/i_beam/Destroy()
|
||||
qdel(next)
|
||||
if(master.first == src)
|
||||
master.first = null
|
||||
if(next)
|
||||
qdel(next)
|
||||
next = null
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -141,6 +141,8 @@
|
||||
|
||||
|
||||
proc/set_frequency(new_frequency)
|
||||
if(!frequency)
|
||||
return
|
||||
if(!radio_controller)
|
||||
sleep(20)
|
||||
if(!radio_controller)
|
||||
@@ -170,3 +172,9 @@
|
||||
deadman = 1
|
||||
processing_objects.Add(src)
|
||||
usr.visible_message("\red [usr] moves their finger over [src]'s signal button...")
|
||||
|
||||
/obj/item/device/assembly/signaler/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src,frequency)
|
||||
frequency = 0
|
||||
..()
|
||||
|
||||
@@ -8,6 +8,11 @@
|
||||
pockets.max_w_class = 2 //fit only pocket sized items
|
||||
pockets.max_storage_space = 4
|
||||
|
||||
/obj/item/clothing/suit/storage/Destroy()
|
||||
qdel(pockets)
|
||||
pockets = null
|
||||
..()
|
||||
|
||||
/obj/item/clothing/suit/storage/attack_hand(mob/user as mob)
|
||||
if (pockets.handle_attack_hand(user))
|
||||
..(user)
|
||||
@@ -59,7 +64,6 @@
|
||||
pockets.max_w_class = 2
|
||||
pockets.max_storage_space = 8
|
||||
|
||||
|
||||
/obj/item/clothing/suit/storage/vest
|
||||
var/icon_badge
|
||||
var/icon_nobadge
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// The datum containing all the chunks.
|
||||
|
||||
/datum/visualnet/camera
|
||||
// The cameras on the map, no matter if they work or not. Updated in obj/machinery/camera.dm by New() and Del().
|
||||
// The cameras on the map, no matter if they work or not. Updated in obj/machinery/camera.dm by New() and Destroy().
|
||||
var/list/cameras = list()
|
||||
var/cameras_unsorted = 1
|
||||
chunk_type = /datum/chunk/camera
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
if(eyeobj)
|
||||
eyeobj.owner = null
|
||||
qdel(eyeobj) // No AI, no Eye
|
||||
eyeobj = null
|
||||
..()
|
||||
|
||||
/atom/proc/move_camera_by_click()
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
HOW IT WORKS
|
||||
|
||||
It works by first creating a camera network datum. Inside of this camera network are "chunks" (which will be
|
||||
explained later) and "cameras". The cameras list is kept up to date by obj/machinery/camera/New() and Del().
|
||||
explained later) and "cameras". The cameras list is kept up to date by obj/machinery/camera/New() and Destroy().
|
||||
|
||||
Next the camera network has chunks. These chunks are a 16x16 tile block of turfs and cameras contained inside the chunk.
|
||||
These turfs are then sorted out based on what the cameras can and cannot see. If none of the cameras can see the turf, inside
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
/obj/effect/Destroy()
|
||||
updateVisibility(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/effect/New()
|
||||
..()
|
||||
|
||||
@@ -115,6 +115,15 @@
|
||||
locked = 1
|
||||
return
|
||||
|
||||
/obj/item/device/mmi/Destroy()
|
||||
if(isrobot(loc))
|
||||
var/mob/living/silicon/robot/borg = loc
|
||||
borg.mmi = null
|
||||
if(brainmob)
|
||||
qdel(brainmob)
|
||||
brainmob = null
|
||||
..()
|
||||
|
||||
/obj/item/device/mmi/radio_enabled
|
||||
name = "radio-enabled man-machine interface"
|
||||
desc = "The Warrior's bland acronym, MMI, obscures the true horror of this monstrosity. This one comes with a built-in radio."
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
R.my_atom = src
|
||||
..()
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
if(key) //If there is a mob connected to this thing. Have to check key twice to avoid false death reporting.
|
||||
if(stat!=DEAD) //If not dead.
|
||||
death(1) //Brains can die again. AND THEY SHOULD AHA HA HA HA HA HA
|
||||
|
||||
@@ -27,6 +27,12 @@
|
||||
if(brainmob && brainmob.client)
|
||||
brainmob.client.screen.len = null //clear the hud
|
||||
|
||||
/obj/item/organ/brain/Destroy()
|
||||
if(brainmob)
|
||||
qdel(brainmob)
|
||||
brainmob = null
|
||||
..()
|
||||
|
||||
/obj/item/organ/brain/proc/transfer_identity(var/mob/living/carbon/H)
|
||||
name = "\the [H]'s [initial(src.name)]"
|
||||
brainmob = new(src)
|
||||
|
||||
@@ -7,6 +7,13 @@
|
||||
if(germ_level < GERM_LEVEL_AMBIENT && prob(30)) //if you're just standing there, you shouldn't get more germs beyond an ambient level
|
||||
germ_level++
|
||||
|
||||
/mob/living/carbon/Destroy()
|
||||
for(var/guts in internal_organs)
|
||||
qdel(guts)
|
||||
for(var/food in stomach_contents)
|
||||
qdel(food)
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/Move(NewLoc, direct)
|
||||
. = ..()
|
||||
if(.)
|
||||
|
||||
@@ -47,6 +47,11 @@
|
||||
dna.real_name = real_name
|
||||
make_blood()
|
||||
|
||||
/mob/living/carbon/human/Destroy()
|
||||
for(var/organ in organs)
|
||||
qdel(organ)
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/Stat()
|
||||
..()
|
||||
statpanel("Status")
|
||||
@@ -1358,4 +1363,4 @@
|
||||
/mob/living/carbon/human/drop_from_inventory(var/obj/item/W, var/atom/Target = null)
|
||||
if(W in organs)
|
||||
return
|
||||
..()
|
||||
..()
|
||||
|
||||
@@ -244,7 +244,7 @@ var/list/ai_verbs_default = list(
|
||||
/obj/machinery/ai_powersupply/New(var/mob/living/silicon/ai/ai=null)
|
||||
powered_ai = ai
|
||||
if(isnull(powered_ai))
|
||||
Del()
|
||||
qdel(src)
|
||||
|
||||
loc = powered_ai.loc
|
||||
use_power(1) // Just incase we need to wake up the power system.
|
||||
@@ -253,7 +253,7 @@ var/list/ai_verbs_default = list(
|
||||
|
||||
/obj/machinery/ai_powersupply/process()
|
||||
if(!powered_ai || powered_ai.stat & DEAD)
|
||||
Del()
|
||||
qdel(src)
|
||||
if(!powered_ai.anchored)
|
||||
loc = powered_ai.loc
|
||||
use_power = 0
|
||||
|
||||
@@ -228,11 +228,18 @@
|
||||
//If there's an MMI in the robot, have it ejected when the mob goes away. --NEO
|
||||
//Improved /N
|
||||
/mob/living/silicon/robot/Destroy()
|
||||
if(mmi)//Safety for when a cyborg gets dust()ed. Or there is no MMI inside.
|
||||
if(mmi && mind)//Safety for when a cyborg gets dust()ed. Or there is no MMI inside.
|
||||
var/turf/T = get_turf(loc)//To hopefully prevent run time errors.
|
||||
if(T) mmi.loc = T
|
||||
if(mind) mind.transfer_to(mmi.brainmob)
|
||||
if(mmi.brainmob)
|
||||
mind.transfer_to(mmi.brainmob)
|
||||
else
|
||||
src << "<span class='danger'>Oops! Something went very wrong, your MMI was unable to receive your mind. You have been ghosted. Please make a bug report so we can fix this bug.</span>"
|
||||
ghostize()
|
||||
//ERROR("A borg has been destroyed, but its MMI lacked a brainmob, so the mind could not be transferred. Player: [ckey].")
|
||||
mmi = null
|
||||
if(connected_ai)
|
||||
connected_ai.connected_robots -= src
|
||||
..()
|
||||
|
||||
/mob/living/silicon/robot/proc/pick_module()
|
||||
@@ -662,7 +669,7 @@
|
||||
C.r_arm = new/obj/item/robot_parts/r_arm(C)
|
||||
C.updateicon()
|
||||
new/obj/item/robot_parts/chest(loc)
|
||||
src.Del()
|
||||
qdel(src)
|
||||
else
|
||||
// Okay we're not removing the cell or an MMI, but maybe something else?
|
||||
var/list/removable_components = list()
|
||||
|
||||
@@ -11,6 +11,17 @@
|
||||
var/obj/item/emag = null
|
||||
var/obj/item/borg/upgrade/jetpack = null
|
||||
|
||||
/obj/item/weapon/robot_module/Destroy()
|
||||
qdel(modules)
|
||||
qdel(synths)
|
||||
qdel(emag)
|
||||
qdel(jetpack)
|
||||
modules = null
|
||||
synths = null
|
||||
emag = null
|
||||
jetpack = null
|
||||
..()
|
||||
|
||||
/obj/item/weapon/robot_module/emp_act(severity)
|
||||
if(modules)
|
||||
for(var/obj/O in modules)
|
||||
|
||||
@@ -210,7 +210,7 @@
|
||||
held_item = null
|
||||
|
||||
gibs(loc, viruses, null, null, /obj/effect/gibspawner/robot) //TODO: use gib() or refactor spiderbots into synthetics.
|
||||
src.Del()
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
//Cannibalized from the parrot mob. ~Zuhayr
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
return
|
||||
|
||||
Del() //if a chunk a destroyed, make a new worm out of the split halves
|
||||
Destroy() //if a chunk a destroyed, make a new worm out of the split halves
|
||||
if(previous)
|
||||
previous.Detach()
|
||||
..()
|
||||
|
||||
+7
-43
@@ -2,6 +2,11 @@
|
||||
mob_list -= src
|
||||
dead_mob_list -= src
|
||||
living_mob_list -= src
|
||||
qdel(hud_used)
|
||||
if(mind && mind.current == src)
|
||||
spellremove(src)
|
||||
for(var/infection in viruses)
|
||||
qdel(infection)
|
||||
ghostize()
|
||||
..()
|
||||
|
||||
@@ -726,52 +731,11 @@ note dizziness decrements automatically in the mob's Life() proc.
|
||||
statpanel("Status","CPU:","[world.cpu]")
|
||||
statpanel("Status","Instances:","[world.contents.len]")
|
||||
if(statpanel("Status") && processScheduler && processScheduler.getIsRunning())
|
||||
var/datum/controller/process/process
|
||||
|
||||
process = processScheduler.getProcess("air")
|
||||
statpanel("Status",process.name, "#[process.getTicks()]\t- [process.getLastRunTime()]")
|
||||
|
||||
process = processScheduler.getProcess("alarm")
|
||||
var/list/alarms = alarm_manager.active_alarms()
|
||||
statpanel("Status",process.name+"([alarms.len])","#[process.getTicks()]\t- [process.getLastRunTime()]")
|
||||
|
||||
process = processScheduler.getProcess("disease")
|
||||
statpanel("Status",process.name+"([active_diseases.len])","#[process.getTicks()]\t- [process.getLastRunTime()]")
|
||||
|
||||
process = processScheduler.getProcess("garbage")
|
||||
statpanel("Status",process.name+"([garbage_collector.dels])","#[process.getTicks()]\t- [process.getLastRunTime()]")
|
||||
|
||||
process = processScheduler.getProcess("machinery")
|
||||
statpanel("Status",process.name+"([machines.len])","#[process.getTicks()]\t- [process.getLastRunTime()]")
|
||||
|
||||
process = processScheduler.getProcess("mob")
|
||||
statpanel("Status",process.name+"([mob_list.len])","#[process.getTicks()]\t- [process.getLastRunTime()]")
|
||||
|
||||
process = processScheduler.getProcess("nanoui")
|
||||
statpanel("Status",process.name+"([nanomanager.processing_uis.len])","t#[process.getTicks()]\t- [process.getLastRunTime()]")
|
||||
|
||||
process = processScheduler.getProcess("lighting")
|
||||
statpanel("Status",process.name, "#[process.getTicks()]\t- [process.getLastRunTime()]")
|
||||
|
||||
process = processScheduler.getProcess("obj")
|
||||
statpanel("Status",process.name+"([processing_objects.len])","#[process.getTicks()]\t- [process.getLastRunTime()]")
|
||||
|
||||
process = processScheduler.getProcess("pipenet")
|
||||
statpanel("Status",process.name+"([pipe_networks.len])","#[process.getTicks()]\t- [process.getLastRunTime()]")
|
||||
|
||||
process = processScheduler.getProcess("powernet")
|
||||
statpanel("Status",process.name+"([powernets.len])","#[process.getTicks()]\t- [process.getLastRunTime()]")
|
||||
|
||||
process = processScheduler.getProcess("sun")
|
||||
statpanel("Status",process.name, "#[process.getTicks()]\t- [process.getLastRunTime()]")
|
||||
|
||||
process = processScheduler.getProcess("ticker")
|
||||
statpanel("Status",process.name, "#[process.getTicks()]\t- [process.getLastRunTime()]")
|
||||
|
||||
for(var/datum/controller/process/P in processScheduler.processes)
|
||||
statpanel("Status",P.getStatName(), P.getTickTime())
|
||||
else
|
||||
statpanel("Status","processScheduler is not running.")
|
||||
|
||||
|
||||
if(listed_turf && client)
|
||||
if(!TurfAdjacent(listed_turf))
|
||||
listed_turf = null
|
||||
|
||||
@@ -37,7 +37,14 @@
|
||||
|
||||
/obj/item/weapon/grab/Destroy()
|
||||
//make sure the grabbed_by list doesn't fill up with nulls
|
||||
if(affecting) affecting.grabbed_by -= src
|
||||
if(affecting)
|
||||
affecting.grabbed_by -= src
|
||||
affecting = null
|
||||
if(assailant)
|
||||
if(assailant.client)
|
||||
assailant.client.screen -= hud
|
||||
assailant = null
|
||||
qdel(hud)
|
||||
..()
|
||||
|
||||
//Used by throw code to hand over the mob, instead of throwing the grab. The grab is then deleted by the throw code.
|
||||
|
||||
@@ -31,7 +31,7 @@ field_generator power level display
|
||||
var/list/obj/machinery/containment_field/fields
|
||||
var/list/obj/machinery/field_generator/connected_gens
|
||||
var/clean_up = 0
|
||||
|
||||
|
||||
//If keeping field generators powered is hard then increase the emitter active power usage.
|
||||
var/gen_power_draw = 5500 //power needed per generator
|
||||
var/field_power_draw = 2000 //power needed per field object
|
||||
@@ -61,7 +61,6 @@ field_generator power level display
|
||||
connected_gens = list()
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/field_generator/process()
|
||||
if(Varedit_start == 1)
|
||||
if(active == 0)
|
||||
@@ -231,22 +230,22 @@ field_generator power level display
|
||||
//Tries to draw the needed power from our own power reserve, or connected generators if we can. Returns the amount of power we were able to get.
|
||||
/obj/machinery/field_generator/proc/draw_power(var/draw = 0, var/list/flood_list = list())
|
||||
flood_list += src
|
||||
|
||||
|
||||
if(src.power >= draw)//We have enough power
|
||||
src.power -= draw
|
||||
return draw
|
||||
|
||||
|
||||
//Need more power
|
||||
var/actual_draw = src.power //already checked that power < draw
|
||||
src.power = 0
|
||||
|
||||
|
||||
for(var/obj/machinery/field_generator/FG in connected_gens)
|
||||
if (FG in flood_list)
|
||||
continue
|
||||
actual_draw += FG.draw_power(draw - actual_draw, flood_list) //since the flood list reference is shared this actually works.
|
||||
if (actual_draw >= draw)
|
||||
return actual_draw
|
||||
|
||||
|
||||
return actual_draw
|
||||
|
||||
/obj/machinery/field_generator/proc/start_fields()
|
||||
|
||||
@@ -72,6 +72,12 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
|
||||
var/strength = null
|
||||
var/desc_holder = null
|
||||
|
||||
/obj/structure/particle_accelerator/Destroy()
|
||||
construction_state = 0
|
||||
if(master)
|
||||
master.part_scan()
|
||||
..()
|
||||
|
||||
/obj/structure/particle_accelerator/end_cap
|
||||
name = "Alpha Particle Generation Array"
|
||||
desc_holder = "This is where Alpha particles are generated from \[REDACTED\]"
|
||||
|
||||
@@ -27,6 +27,10 @@
|
||||
active_power_usage = initial(active_power_usage) * (strength + 1)
|
||||
..()
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/Destroy()
|
||||
if(active)
|
||||
toggle_power()
|
||||
..()
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/attack_hand(mob/user as mob)
|
||||
if(construction_state >= 3)
|
||||
|
||||
@@ -83,6 +83,12 @@
|
||||
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/power/smes/Destroy()
|
||||
if(terminal)
|
||||
disconnect_terminal()
|
||||
..()
|
||||
|
||||
/obj/machinery/power/smes/update_icon()
|
||||
overlays.Cut()
|
||||
if(stat & BROKEN) return
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
user << "[src] shatters into a scattering of overstressed metal shards as it leaves the crossbow."
|
||||
var/obj/item/weapon/shard/shrapnel/S = new()
|
||||
S.loc = get_turf(src)
|
||||
src.Del()
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/gun/launcher/crossbow
|
||||
name = "powered crossbow"
|
||||
|
||||
@@ -649,6 +649,15 @@ datum
|
||||
|
||||
return trans_data
|
||||
|
||||
datum/reagents/Destroy()
|
||||
..()
|
||||
for(var/datum/reagent/R in reagent_list)
|
||||
qdel(R)
|
||||
reagent_list.Cut()
|
||||
reagent_list = null
|
||||
if(my_atom && my_atom.reagents == src)
|
||||
my_atom.reagents = null
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ datum
|
||||
|
||||
/* Must check the transfering of reagents and their data first. They all can point to one disease datum.
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
if(src.data["virus"])
|
||||
var/datum/disease/D = src.data["virus"]
|
||||
D.cure(0)
|
||||
@@ -1790,7 +1790,7 @@ datum
|
||||
..()
|
||||
return
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
if(holder && ismob(holder.my_atom))
|
||||
var/mob/M = holder.my_atom
|
||||
M.status_flags &= ~FAKEDEATH
|
||||
@@ -4428,5 +4428,9 @@ datum
|
||||
..()
|
||||
return
|
||||
|
||||
datum/reagent/Destroy() // This should only be called by the holder, so it's already handled clearing its references
|
||||
..()
|
||||
holder = null
|
||||
|
||||
// Undefine the alias for REAGENTS_EFFECT_MULTIPLER
|
||||
#undef REM
|
||||
|
||||
@@ -43,6 +43,11 @@
|
||||
air_contents.volume = PRESSURE_TANK_VOLUME
|
||||
update()
|
||||
|
||||
/obj/machinery/disposal/Destroy()
|
||||
eject()
|
||||
if(trunk)
|
||||
trunk.linked = null
|
||||
..()
|
||||
|
||||
// attack by item places it in to disposal
|
||||
/obj/machinery/disposal/attackby(var/obj/item/I, var/mob/user)
|
||||
@@ -638,6 +643,11 @@
|
||||
location.assume_air(gas) // vent all gas to turf
|
||||
return
|
||||
|
||||
/obj/structure/disposalholder/Destroy()
|
||||
qdel(gas)
|
||||
active = 0
|
||||
..()
|
||||
|
||||
// Disposal pipes
|
||||
|
||||
/obj/structure/disposalpipe
|
||||
@@ -663,7 +673,7 @@
|
||||
|
||||
// pipe is deleted
|
||||
// ensure if holder is present, it is expelled
|
||||
Del()
|
||||
Destroy()
|
||||
var/obj/structure/disposalholder/H = locate() in src
|
||||
if(H)
|
||||
// holder was present
|
||||
@@ -920,6 +930,30 @@
|
||||
|
||||
qdel(src)
|
||||
|
||||
// pipe is deleted
|
||||
// ensure if holder is present, it is expelled
|
||||
/obj/structure/disposalpipe/Destroy()
|
||||
var/obj/structure/disposalholder/H = locate() in src
|
||||
if(H)
|
||||
// holder was present
|
||||
H.active = 0
|
||||
var/turf/T = src.loc
|
||||
if(T.density)
|
||||
// deleting pipe is inside a dense turf (wall)
|
||||
// this is unlikely, but just dump out everything into the turf in case
|
||||
|
||||
for(var/atom/movable/AM in H)
|
||||
AM.loc = T
|
||||
AM.pipe_eject(0)
|
||||
qdel(H)
|
||||
..()
|
||||
return
|
||||
|
||||
// otherwise, do normal expel from turf
|
||||
if(H)
|
||||
expel(H, T, 0)
|
||||
..()
|
||||
|
||||
// *** TEST verb
|
||||
//client/verb/dispstop()
|
||||
// for(var/obj/structure/disposalholder/H in world)
|
||||
@@ -1468,8 +1502,6 @@
|
||||
user << "You need more welding fuel to complete this task."
|
||||
return
|
||||
|
||||
|
||||
|
||||
// called when movable is expelled from a disposal pipe or outlet
|
||||
// by default does nothing, override for special behaviour
|
||||
|
||||
|
||||
@@ -307,6 +307,16 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/structure/bigDelivery/Destroy()
|
||||
if(wrapped) //sometimes items can disappear. For example, bombs. --rastaf0
|
||||
wrapped.loc = (get_turf(loc))
|
||||
if(istype(wrapped, /obj/structure/closet))
|
||||
var/obj/structure/closet/O = wrapped
|
||||
O.welded = 0
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/atom/movable/AM in contents)
|
||||
AM.loc = T
|
||||
..()
|
||||
|
||||
/obj/item/device/destTagger
|
||||
name = "destination tagger"
|
||||
@@ -440,3 +450,8 @@
|
||||
else
|
||||
user << "You need more welding fuel to complete this task."
|
||||
return
|
||||
|
||||
/obj/machinery/disposal/deliveryChute/Destroy()
|
||||
if(trunk)
|
||||
trunk.linked = null
|
||||
..()
|
||||
|
||||
@@ -153,7 +153,6 @@
|
||||
collapse_shields()
|
||||
..()
|
||||
|
||||
|
||||
/obj/machinery/shieldgen/proc/shields_up()
|
||||
if(active) return 0 //If it's already turned on, how did this get called?
|
||||
|
||||
@@ -161,7 +160,7 @@
|
||||
update_icon()
|
||||
|
||||
create_shields()
|
||||
|
||||
|
||||
idle_power_usage = 0
|
||||
for(var/obj/machinery/shield/shield_tile in deployed_shields)
|
||||
idle_power_usage += shield_tile.shield_idle_power
|
||||
@@ -174,7 +173,7 @@
|
||||
update_icon()
|
||||
|
||||
collapse_shields()
|
||||
|
||||
|
||||
update_use_power(0)
|
||||
|
||||
/obj/machinery/shieldgen/proc/create_shields()
|
||||
@@ -201,22 +200,22 @@
|
||||
/obj/machinery/shieldgen/process()
|
||||
if (!active || (stat & NOPOWER))
|
||||
return
|
||||
|
||||
|
||||
if(malfunction)
|
||||
if(deployed_shields.len && prob(5))
|
||||
qdel(pick(deployed_shields))
|
||||
else
|
||||
if (check_delay <= 0)
|
||||
create_shields()
|
||||
|
||||
|
||||
var/new_power_usage = 0
|
||||
for(var/obj/machinery/shield/shield_tile in deployed_shields)
|
||||
new_power_usage += shield_tile.shield_idle_power
|
||||
|
||||
|
||||
if (new_power_usage != idle_power_usage)
|
||||
idle_power_usage = new_power_usage
|
||||
use_power(0)
|
||||
|
||||
|
||||
check_delay = 60
|
||||
else
|
||||
check_delay--
|
||||
|
||||
@@ -39,6 +39,12 @@
|
||||
field = new/list()
|
||||
..()
|
||||
|
||||
/obj/machinery/shield_gen/Destroy()
|
||||
for(var/obj/effect/energy_field/D in field)
|
||||
field.Remove(D)
|
||||
D.loc = null
|
||||
..()
|
||||
|
||||
/obj/machinery/shield_gen/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/C = W
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
// Eject contents if deleted somehow
|
||||
for(var/atom/movable/AM in src)
|
||||
AM.loc = get_turf(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/effect/dummy/spell_jaunt/relaymove(var/mob/user, direction)
|
||||
if (!src.canmove || reappearing) return
|
||||
|
||||
Reference in New Issue
Block a user