mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
Replaced last occurences of gc_destroyed by qdeleted().
This commit is contained in:
@@ -964,7 +964,7 @@ var/list/WALLITEMS_INVERSE = list(
|
||||
/proc/IsValidSrc(A)
|
||||
if(istype(A, /datum))
|
||||
var/datum/B = A
|
||||
return !B.gc_destroyed
|
||||
return !qdeleted(B)
|
||||
if(istype(A, /client))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -360,7 +360,7 @@
|
||||
audible_message("<span class='italics'>You hear a loud electrical buzzing sound!</span>")
|
||||
src << "<span class='warning'>Reprogramming machine behaviour...</span>"
|
||||
spawn(50)
|
||||
if(M && !M.gc_destroyed)
|
||||
if(M && !qdeleted(M))
|
||||
new /mob/living/simple_animal/hostile/mimic/copy/machine(get_turf(M), M, src, 1)
|
||||
else src << "<span class='notice'>Out of uses.</span>"
|
||||
else src << "<span class='notice'>That's not a machine.</span>"
|
||||
|
||||
@@ -340,7 +340,7 @@
|
||||
user << "<span class='revenwarning'>It is shifting and distorted. It would be wise to destroy this.</span>"
|
||||
|
||||
/obj/item/weapon/ectoplasm/revenant/proc/reform()
|
||||
if(gc_destroyed || !src || inert)
|
||||
if(!src || qdeleted(src) || inert)
|
||||
return
|
||||
var/key_of_revenant
|
||||
message_admins("Revenant ectoplasm was left undestroyed for 1 minute and is reforming into a new revenant.")
|
||||
|
||||
@@ -341,7 +341,7 @@
|
||||
|
||||
/obj/machinery/clonepod/ex_act(severity, target)
|
||||
..()
|
||||
if(!gc_destroyed)
|
||||
if(!qdeleted(src))
|
||||
go_out()
|
||||
|
||||
/*
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
A.unbolt()
|
||||
spawn()
|
||||
if(A && A.close())
|
||||
if(stat & NOPOWER || lostPower || !A || A.gc_destroyed)
|
||||
if(stat & NOPOWER || lostPower || !A || qdeleted(A))
|
||||
goIdle(1)
|
||||
return
|
||||
A.bolt()
|
||||
@@ -207,7 +207,7 @@
|
||||
A.unbolt()
|
||||
spawn()
|
||||
if(A && A.open())
|
||||
if(stat | (NOPOWER) && !lostPower && A && !A.gc_destroyed)
|
||||
if(stat | (NOPOWER) && !lostPower && A && !qdeleted(A))
|
||||
A.bolt()
|
||||
goIdle(1)
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
|
||||
/obj/machinery/vending/ex_act(severity, target)
|
||||
..()
|
||||
if(!gc_destroyed)
|
||||
if(!qdeleted(src))
|
||||
if(prob(25))
|
||||
malfunction()
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s
|
||||
/obj/item/ex_act(severity, target)
|
||||
if(severity == 1 || target == src)
|
||||
qdel(src)
|
||||
if(!gc_destroyed)
|
||||
if(!qdeleted(src))
|
||||
contents_explosion(severity, target)
|
||||
|
||||
//user: The mob that is suiciding
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
walk_away(P,loc,rand(1,4))
|
||||
|
||||
spawn(rand(15,60))
|
||||
if(P && !P.gc_destroyed)
|
||||
if(P && !qdeleted(P))
|
||||
P.prime()
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
else if(severity == 2)
|
||||
if(prob(50))
|
||||
qdel(src)
|
||||
if(!gc_destroyed)
|
||||
if(!qdeleted(src))
|
||||
..()
|
||||
|
||||
//If a mob logouts/logins in side of an object you can use this proc
|
||||
@@ -148,7 +148,7 @@
|
||||
|
||||
/obj/singularity_act()
|
||||
ex_act(1)
|
||||
if(src && isnull(gc_destroyed))
|
||||
if(src && !qdeleted(src))
|
||||
qdel(src)
|
||||
return 2
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
user << "<span class='warning'>As you begin unwrenching \the [src] a gush of air blows in your face... maybe you should reconsider?</span>"
|
||||
unsafe_wrenching = TRUE //Oh dear oh dear
|
||||
|
||||
if (do_after(user, 20/W.toolspeed, target = src) && !gc_destroyed)
|
||||
if (do_after(user, 20/W.toolspeed, target = src) && !qdeleted(src))
|
||||
user.visible_message( \
|
||||
"[user] unfastens \the [src].", \
|
||||
"<span class='notice'>You unfasten \the [src].</span>", \
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
qdel(meter)
|
||||
. = ..()
|
||||
|
||||
if(parent && !parent.gc_destroyed)
|
||||
if(parent && !qdeleted(parent))
|
||||
qdel(parent)
|
||||
parent = null
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
|
||||
/datum/round_event/brand_intelligence/tick()
|
||||
if(!originMachine || originMachine.gc_destroyed || originMachine.shut_up || originMachine.wires.is_all_cut()) //if the original vending machine is missing or has it's voice switch flipped
|
||||
if(!originMachine || qdeleted(originMachine) || originMachine.shut_up || originMachine.wires.is_all_cut()) //if the original vending machine is missing or has it's voice switch flipped
|
||||
for(var/obj/machinery/vending/saved in infectedMachines)
|
||||
saved.shoot_inventory = 0
|
||||
if(originMachine)
|
||||
@@ -49,7 +49,7 @@
|
||||
vendingMachines = removeNullsFromList(vendingMachines)
|
||||
if(!vendingMachines.len) //if every machine is infected
|
||||
for(var/obj/machinery/vending/upriser in infectedMachines)
|
||||
if(prob(70) && !upriser.gc_destroyed)
|
||||
if(prob(70) && !qdeleted(upriser))
|
||||
var/mob/living/simple_animal/hostile/mimic/copy/M = new(upriser.loc, upriser, null, 1) // it will delete upriser on creation and override any machine checks
|
||||
M.faction = list("profit")
|
||||
M.speak = rampant_speeches.Copy()
|
||||
|
||||
@@ -506,7 +506,7 @@
|
||||
var/list/obj/effect/spacevine/queue_end = list()
|
||||
|
||||
for( var/obj/effect/spacevine/SV in growth_queue )
|
||||
if(SV.gc_destroyed)
|
||||
if(qdeleted(SV))
|
||||
continue
|
||||
i++
|
||||
queue_end += SV
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
awakening = 1
|
||||
|
||||
spawn(30)
|
||||
if(!gc_destroyed)
|
||||
if(!qdeleted(src))
|
||||
var/mob/living/simple_animal/hostile/killertomato/K = new /mob/living/simple_animal/hostile/killertomato(get_turf(src.loc))
|
||||
K.maxHealth += round(endurance / 3)
|
||||
K.melee_damage_lower += round(potency / 10)
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
|
||||
/obj/structure/bookcase/ex_act(severity, target)
|
||||
..()
|
||||
if(!gc_destroyed)
|
||||
if(!qdeleted(src))
|
||||
for(var/obj/item/weapon/book/b in contents)
|
||||
b.loc = (get_turf(src))
|
||||
if(prob(50))
|
||||
|
||||
@@ -408,7 +408,7 @@
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/proc/RedeemVoucher(obj/item/weapon/mining_voucher/voucher, mob/redeemer)
|
||||
var/selection = input(redeemer, "Pick your equipment", "Mining Voucher Redemption") as null|anything in list("Kinetic Accelerator", "Resonator", "Mining Drone", "Advanced Scanner")
|
||||
if(!selection || !Adjacent(redeemer) || voucher.gc_destroyed || voucher.loc != redeemer)
|
||||
if(!selection || !Adjacent(redeemer) || qdeleted(voucher) || voucher.loc != redeemer)
|
||||
return
|
||||
switch(selection)
|
||||
if("Kinetic Accelerator")
|
||||
|
||||
@@ -56,7 +56,7 @@ var/global/posibrain_notif_cooldown = 0
|
||||
return
|
||||
|
||||
var/posi_ask = alert("Become a positronic brain? (Warning, You can no longer be cloned, and all past lives will be forgotten!)","Are you positive?","Yes","No")
|
||||
if(posi_ask == "No" || gc_destroyed)
|
||||
if(posi_ask == "No" || qdeleted(src))
|
||||
return
|
||||
transfer_personality(user)
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
user << "Can't become a drone before the game has started."
|
||||
return
|
||||
var/be_drone = alert("Become a drone? (Warning, You can no longer be cloned!)",,"Yes","No")
|
||||
if(be_drone == "No" || gc_destroyed)
|
||||
if(be_drone == "No" || qdeleted(src))
|
||||
return
|
||||
var/mob/living/simple_animal/drone/D = new drone_type(get_turf(loc))
|
||||
D.key = user.key
|
||||
|
||||
@@ -263,7 +263,7 @@
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user << "<span class='warning'>You start [anchored ? "unwrenching" : "wrenching"] [src]...</span>"
|
||||
if(do_after(user, 20/O.toolspeed, target = src))
|
||||
if(gc_destroyed)
|
||||
if(qdeleted(src))
|
||||
return
|
||||
user << "<span class='notice'>You [anchored ? "unwrench" : "wrench"] [src].</span>"
|
||||
anchored = !anchored
|
||||
@@ -305,7 +305,7 @@
|
||||
user.visible_message("<span class='warning'>[user] starts putting [target] onto the photocopier!</span>", "<span class='notice'>You start putting [target] onto the photocopier...</span>")
|
||||
|
||||
if(do_after(user, 20, target = src))
|
||||
if(!target || target.gc_destroyed || gc_destroyed || !Adjacent(target)) //check if the photocopier/target still exists.
|
||||
if(!target || qdeleted(target) || qdeleted(src) || !Adjacent(target)) //check if the photocopier/target still exists.
|
||||
return
|
||||
|
||||
if(target == user)
|
||||
@@ -343,7 +343,7 @@
|
||||
return 1
|
||||
|
||||
/obj/machinery/photocopier/proc/copier_blocked()
|
||||
if(gc_destroyed)
|
||||
if(qdeleted(src))
|
||||
return
|
||||
if(loc.density)
|
||||
return 1
|
||||
|
||||
@@ -1075,7 +1075,7 @@
|
||||
|
||||
/obj/machinery/power/apc/ex_act(severity, target)
|
||||
..()
|
||||
if(!gc_destroyed)
|
||||
if(!qdeleted(src))
|
||||
switch(severity)
|
||||
if(2)
|
||||
if(prob(50))
|
||||
|
||||
@@ -171,7 +171,7 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
//explosion handling
|
||||
/obj/structure/cable/ex_act(severity, target)
|
||||
..()
|
||||
if(!gc_destroyed)
|
||||
if(!qdeleted(src))
|
||||
switch(severity)
|
||||
if(2)
|
||||
if(prob(50))
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
|
||||
/obj/item/weapon/stock_parts/cell/ex_act(severity, target)
|
||||
..()
|
||||
if(!gc_destroyed)
|
||||
if(!qdeleted(src))
|
||||
switch(severity)
|
||||
if(2)
|
||||
if(prob(50))
|
||||
|
||||
@@ -517,7 +517,7 @@
|
||||
|
||||
/obj/machinery/light/ex_act(severity, target)
|
||||
..()
|
||||
if(!gc_destroyed)
|
||||
if(!qdeleted(src))
|
||||
switch(severity)
|
||||
if(2)
|
||||
if(prob(50))
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
|
||||
/obj/machinery/power/solar/ex_act(severity, target)
|
||||
..()
|
||||
if(!gc_destroyed)
|
||||
if(!qdeleted(src))
|
||||
switch(severity)
|
||||
if(2)
|
||||
if(prob(50))
|
||||
@@ -486,7 +486,7 @@
|
||||
|
||||
/obj/machinery/power/solar_control/ex_act(severity, target)
|
||||
..()
|
||||
if(!gc_destroyed)
|
||||
if(!qdeleted(src))
|
||||
switch(severity)
|
||||
if(2)
|
||||
if(prob(50))
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
/obj/structure/disposalpipe/New(loc,var/obj/structure/disposalconstruct/make_from)
|
||||
..()
|
||||
|
||||
if(make_from && !make_from.gc_destroyed)
|
||||
if(make_from && !qdeleted(make_from))
|
||||
base_icon_state = make_from.base_state
|
||||
dir = make_from.dir
|
||||
dpdir = make_from.dpdir
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
playsound(src, 'sound/machines/disposalflush.ogg', 50, 0, 0)
|
||||
last_sound = world.time
|
||||
sleep(5)
|
||||
if(gc_destroyed)
|
||||
if(qdeleted(src))
|
||||
return
|
||||
var/obj/structure/disposalholder/H = new()
|
||||
newHolderDestination(H)
|
||||
|
||||
@@ -176,7 +176,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
|
||||
/obj/effect/proc_holder/spell/proc/start_recharge()
|
||||
if(action)
|
||||
action.UpdateButtonIcon()
|
||||
while(charge_counter < charge_max && isnull(gc_destroyed))
|
||||
while(charge_counter < charge_max && !qdeleted(src))
|
||||
sleep(1)
|
||||
charge_counter++
|
||||
if(action)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
target.dna.add_mutation(A)
|
||||
target.disabilities |= disabilities
|
||||
spawn(duration)
|
||||
if(target && !target.gc_destroyed)
|
||||
if(target && !qdeleted(target))
|
||||
for(var/A in mutations)
|
||||
target.dna.remove_mutation(A)
|
||||
target.disabilities &= ~disabilities
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
name = "Instant Summons"
|
||||
marked_item = null
|
||||
|
||||
else if(marked_item && marked_item.gc_destroyed) //the item was destroyed at some point
|
||||
else if(marked_item && qdeleted(marked_item)) //the item was destroyed at some point
|
||||
message = "<span class='warning'>You sense your marked item has been destroyed!</span>"
|
||||
name = "Instant Summons"
|
||||
marked_item = null
|
||||
|
||||
Reference in New Issue
Block a user