mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 15:45:25 +01:00
Merge pull request #7554 from SamHPurp/more-qdel-nulls
Uses more QDEL_NULLs
This commit is contained in:
@@ -376,10 +376,8 @@
|
||||
return 1
|
||||
|
||||
/datum/click_intercept/buildmode/proc/deselect_region()
|
||||
qdel(cornerA)
|
||||
cornerA = null
|
||||
qdel(cornerB)
|
||||
cornerB = null
|
||||
QDEL_NULL(cornerA)
|
||||
QDEL_NULL(cornerB)
|
||||
|
||||
/datum/click_intercept/buildmode/proc/Reset()//Reset temporary variables
|
||||
deselect_region()
|
||||
|
||||
@@ -163,13 +163,8 @@
|
||||
to_chat(user, "<span class='danger'>You cannot eject your currently stored AI. Purge it manually.</span>")
|
||||
return 0
|
||||
to_chat(user, "<span class='danger'>You purge the remaining scraps of data from your previous AI, freeing it for use.</span>")
|
||||
if(integrated_ai)
|
||||
integrated_ai.ghostize()
|
||||
qdel(integrated_ai)
|
||||
integrated_ai = null
|
||||
if(ai_card)
|
||||
qdel(ai_card)
|
||||
ai_card = null
|
||||
QDEL_NULL(integrated_ai)
|
||||
QDEL_NULL(ai_card)
|
||||
else if(user)
|
||||
user.put_in_hands(ai_card)
|
||||
else
|
||||
|
||||
@@ -286,9 +286,7 @@
|
||||
drink_container.desc = "[recipe_to_use.description]"
|
||||
flick("bottler_on", src)
|
||||
spawn(45)
|
||||
for(var/i = 1, i <= slots.len, i++)
|
||||
qdel(slots[i])
|
||||
slots[i] = null
|
||||
QDEL_LIST_ASSOC_VAL(slots)
|
||||
bottling = 0
|
||||
drink_container.forceMove(loc)
|
||||
updateUsrDialog()
|
||||
@@ -406,4 +404,4 @@
|
||||
else if(bottling)
|
||||
icon_state = "bottler_on"
|
||||
else
|
||||
icon_state = "bottler_off"
|
||||
icon_state = "bottler_off"
|
||||
|
||||
@@ -296,8 +296,7 @@
|
||||
var/datum/plant_gene/core/gene = disk.gene
|
||||
gene.value = min(gene.value, max_extract_pot)
|
||||
disk.update_name()
|
||||
qdel(seed)
|
||||
seed = null
|
||||
QDEL_NULL(seed)
|
||||
update_icon()
|
||||
if("replace")
|
||||
if(disk && disk.gene && istype(disk.gene, G.type) && istype(G, /datum/plant_gene/core))
|
||||
@@ -421,4 +420,4 @@
|
||||
/obj/item/weapon/storage/box/disks_plantgene/New()
|
||||
..()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/weapon/disk/plantgene(src)
|
||||
new /obj/item/weapon/disk/plantgene(src)
|
||||
|
||||
@@ -373,8 +373,7 @@
|
||||
var/oldPlantName
|
||||
if(myseed) // In case there's nothing in the tray beforehand
|
||||
oldPlantName = myseed.plantname
|
||||
qdel(myseed)
|
||||
myseed = null
|
||||
QDEL_NULL(myseed)
|
||||
else
|
||||
oldPlantName = "empty tray"
|
||||
switch(rand(1,18)) // randomly pick predominative weed
|
||||
@@ -422,8 +421,7 @@
|
||||
var/oldPlantName = myseed.plantname
|
||||
if(myseed.mutatelist.len > 0)
|
||||
var/mutantseed = pick(myseed.mutatelist)
|
||||
qdel(myseed)
|
||||
myseed = null
|
||||
QDEL_NULL(myseed)
|
||||
myseed = new mutantseed
|
||||
else
|
||||
return
|
||||
@@ -444,9 +442,7 @@
|
||||
|
||||
/obj/machinery/hydroponics/proc/mutateweed() // If the weeds gets the mutagent instead. Mind you, this pretty much destroys the old plant
|
||||
if( weedlevel > 5 )
|
||||
if(myseed)
|
||||
qdel(myseed)
|
||||
myseed = null
|
||||
QDEL_NULL(myseed)
|
||||
var/newWeed = pick(/obj/item/seeds/liberty, /obj/item/seeds/angel, /obj/item/seeds/nettle/death, /obj/item/seeds/kudzu)
|
||||
myseed = new newWeed
|
||||
dead = 0
|
||||
@@ -935,8 +931,7 @@
|
||||
else if(dead)
|
||||
dead = 0
|
||||
to_chat(user, "<span class='notice'>You remove the dead plant from [src].</span>")
|
||||
qdel(myseed)
|
||||
myseed = null
|
||||
QDEL_NULL(myseed)
|
||||
update_icon()
|
||||
plant_hud_set_status()
|
||||
plant_hud_set_health()
|
||||
@@ -953,8 +948,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You harvest [myseed.getYield()] items from the [myseed.plantname].</span>")
|
||||
if(!myseed.get_gene(/datum/plant_gene/trait/repeated_harvest))
|
||||
qdel(myseed)
|
||||
myseed = null
|
||||
QDEL_NULL(myseed)
|
||||
dead = 0
|
||||
plant_hud_set_status()
|
||||
plant_hud_set_health()
|
||||
@@ -1041,4 +1035,4 @@
|
||||
else
|
||||
..()
|
||||
|
||||
#undef HYDRO_CYCLES_PER_AGE
|
||||
#undef HYDRO_CYCLES_PER_AGE
|
||||
|
||||
@@ -178,8 +178,7 @@
|
||||
M = new manual_type()
|
||||
dat += "<tr><td><A href='?src=[UID()];manual=[manualcount]'>[M.title]</A></td></tr>"
|
||||
manualcount++
|
||||
qdel(M)
|
||||
M = null
|
||||
QDEL_NULL(M)
|
||||
dat += "</table>"
|
||||
dat += "<BR><A href='?src=[UID()];switchscreen=0'>(Return to main menu)</A><BR>"
|
||||
|
||||
|
||||
@@ -1040,8 +1040,7 @@
|
||||
mark = 0
|
||||
if(L.mob_size >= MOB_SIZE_LARGE)
|
||||
L.underlays -= marked_image
|
||||
qdel(marked_image)
|
||||
marked_image = null
|
||||
QDEL_NULL(marked_image)
|
||||
var/backstab = check_target_facings(user, L)
|
||||
var/def_check = L.getarmor(type = "bomb")
|
||||
if(backstab == FACING_INIT_FACING_TARGET_TARGET_FACING_PERPENDICULAR || backstab == FACING_SAME_DIR)
|
||||
|
||||
@@ -1205,13 +1205,11 @@ var/list/robot_verbs_default = list(
|
||||
canmove = 1
|
||||
scrambledcodes = 1
|
||||
//Disconnect it's camera so it's not so easily tracked.
|
||||
if(src.camera)
|
||||
qdel(src.camera)
|
||||
src.camera = null
|
||||
// I'm trying to get the Cyborg to not be listed in the camera list
|
||||
// Instead of being listed as "deactivated". The downside is that I'm going
|
||||
// to have to check if every camera is null or not before doing anything, to prevent runtime errors.
|
||||
// I could change the network to null but I don't know what would happen, and it seems too hacky for me.
|
||||
QDEL_NULL(src.camera)
|
||||
// I'm trying to get the Cyborg to not be listed in the camera list
|
||||
// Instead of being listed as "deactivated". The downside is that I'm going
|
||||
// to have to check if every camera is null or not before doing anything, to prevent runtime errors.
|
||||
// I could change the network to null but I don't know what would happen, and it seems too hacky for me.
|
||||
|
||||
/mob/living/silicon/robot/proc/ResetSecurityCodes()
|
||||
set category = "Robot Commands"
|
||||
|
||||
@@ -167,9 +167,8 @@
|
||||
mode = BOT_CLEANING
|
||||
spawn(50)
|
||||
if(mode == BOT_CLEANING)
|
||||
qdel(target)
|
||||
QDEL_NULL(target)
|
||||
anchored = 0
|
||||
target = null
|
||||
mode = BOT_IDLE
|
||||
icon_state = "cleanbot[on]"
|
||||
|
||||
@@ -222,4 +221,4 @@ text("<A href='?src=[UID()];power=1'>[on ? "On" : "Off"]</A>"))
|
||||
if(istype(A,/obj/effect/decal/cleanable))
|
||||
clean(A)
|
||||
else
|
||||
..()
|
||||
..()
|
||||
|
||||
@@ -213,8 +213,7 @@
|
||||
if("PRG_deletechannel")
|
||||
. = 1
|
||||
if(channel && ((channel.operator == src) || netadmin_mode))
|
||||
qdel(channel)
|
||||
channel = null
|
||||
QDEL_NULL(channel)
|
||||
if("PRG_setpassword")
|
||||
. = 1
|
||||
if(!channel || ((channel.operator != src) && !netadmin_mode))
|
||||
@@ -228,4 +227,4 @@
|
||||
if(newpassword == "nopassword")
|
||||
channel.password = ""
|
||||
else
|
||||
channel.password = newpassword
|
||||
channel.password = newpassword
|
||||
|
||||
@@ -31,12 +31,8 @@
|
||||
/obj/machinery/lapvend/proc/reset_order()
|
||||
state = 0
|
||||
devtype = 0
|
||||
if(fabricated_laptop)
|
||||
qdel(fabricated_laptop)
|
||||
fabricated_laptop = null
|
||||
if(fabricated_tablet)
|
||||
qdel(fabricated_tablet)
|
||||
fabricated_tablet = null
|
||||
QDEL_NULL(fabricated_laptop)
|
||||
QDEL_NULL(fabricated_tablet)
|
||||
dev_cpu = 1
|
||||
dev_battery = 1
|
||||
dev_disk = 1
|
||||
@@ -303,4 +299,4 @@ obj/machinery/lapvend/attackby(obj/item/I, mob/user)
|
||||
T.time = worldtime2text()
|
||||
vendor_account.transaction_log.Add(T)
|
||||
return 1
|
||||
return 0
|
||||
return 0
|
||||
|
||||
@@ -28,9 +28,8 @@
|
||||
|
||||
sleep(10)
|
||||
to_chat(usr, "<span style='color: #0000ff;'>Disconnecting neural-net interface...</span> <span style='color: #32CD32'><b>Success</b>.</span>")
|
||||
if(usr.hud_used)
|
||||
qdel(usr.hud_used)
|
||||
usr.hud_used = null
|
||||
|
||||
QDEL_NULL(usr.hud_used)
|
||||
usr.create_mob_hud()
|
||||
usr.regenerate_icons()
|
||||
|
||||
@@ -64,9 +63,8 @@
|
||||
|
||||
sleep(5)
|
||||
to_chat(usr, "<span style='color: #0000ff;'>Suit secured, extending neural-net interface...</span>")
|
||||
if(usr.hud_used)
|
||||
qdel(usr.hud_used)
|
||||
usr.hud_used = null
|
||||
|
||||
QDEL_NULL(usr.hud_used)
|
||||
usr.hud_used = new /datum/hud/human(usr, 'icons/mob/screen_ninja.dmi', "#ffffff", 255)
|
||||
if(usr.hud_used)
|
||||
usr.hud_used.show_hud(usr.hud_used.hud_version)
|
||||
@@ -91,4 +89,4 @@
|
||||
to_chat(usr, "<span style='color: #0000ff;'><b>NOTICE: </b>Suit de-activation protocals aborted.</span>")
|
||||
else
|
||||
to_chat(usr, "<span style='color: #ff0000;'><b>FĆAL �Rr�R</b>: ŧer nt recgnized, c-cntr-r䣧-ç äcked.")
|
||||
return
|
||||
return
|
||||
|
||||
@@ -43,8 +43,7 @@
|
||||
if(targloc == curloc)
|
||||
if(target) //if the target is right on our location we go straight to bullet_act()
|
||||
target.bullet_act(BB, BB.def_zone)
|
||||
qdel(BB)
|
||||
BB = null
|
||||
QDEL_NULL(BB)
|
||||
return 1
|
||||
|
||||
BB.preparePixelProjectile(target, targloc, user, params, spread)
|
||||
|
||||
@@ -377,8 +377,7 @@
|
||||
user.visible_message(user, "<span class='warning'>[user] is drilling through the [src]'s lock!</span>",
|
||||
"<span class='notice'>You start drilling through the [src]'s lock!</span>")
|
||||
if(do_after(user, 100 * W.toolspeed, target = src))
|
||||
qdel(equipment_system.lock_system)
|
||||
equipment_system.lock_system = null
|
||||
QDEL_NULL(equipment_system.lock_system)
|
||||
user.visible_message(user, "<span class='warning'>[user] has destroyed the [src]'s lock!</span>",
|
||||
"<span class='notice'>You destroy the [src]'s lock!</span>")
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user