mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-20 03:26:37 +01:00
Merge pull request #4611 from VOREStation/vplk-misc-fixes
Misc. Fixes for Destroy etc.
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
FG1.cleanup()
|
||||
if(FG2 && !FG2.clean_up)
|
||||
FG2.cleanup()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/containment_field/attack_hand(mob/user as mob)
|
||||
if(get_dist(src, user) > 1)
|
||||
|
||||
@@ -168,7 +168,7 @@ field_generator power level display
|
||||
|
||||
/obj/machinery/field_generator/Destroy()
|
||||
src.cleanup()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
|
||||
|
||||
@@ -312,12 +312,12 @@ field_generator power level display
|
||||
/obj/machinery/field_generator/proc/cleanup()
|
||||
clean_up = 1
|
||||
for (var/obj/machinery/containment_field/F in fields)
|
||||
if (isnull(F))
|
||||
if (QDELETED(F))
|
||||
continue
|
||||
qdel(F)
|
||||
fields = list()
|
||||
for(var/obj/machinery/field_generator/FG in connected_gens)
|
||||
if (isnull(FG))
|
||||
if (QDELETED(FG))
|
||||
continue
|
||||
FG.connected_gens.Remove(src)
|
||||
if(!FG.clean_up)//Makes the other gens clean up as well
|
||||
|
||||
@@ -55,7 +55,8 @@
|
||||
/obj/singularity/energy_ball/process(var/wait = 20)
|
||||
set waitfor = FALSE
|
||||
if(!orbiting)
|
||||
handle_energy()
|
||||
if (handle_energy())
|
||||
return
|
||||
|
||||
move_the_basket_ball(max(wait - 5, 4 + orbiting_balls.len * 1.5))
|
||||
|
||||
@@ -91,6 +92,11 @@
|
||||
sleep(1) // So movement is smooth
|
||||
|
||||
/obj/singularity/energy_ball/proc/handle_energy()
|
||||
if (energy <= 0)
|
||||
investigate_log("collapsed.", I_SINGULO)
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
if(energy >= energy_to_raise)
|
||||
energy_to_lower = energy_to_raise - 20
|
||||
energy_to_raise = energy_to_raise * 1.25
|
||||
|
||||
Reference in New Issue
Block a user