qdel/Destroy entries.

This commit is contained in:
PsiOmegaDelta
2015-07-02 13:38:24 +02:00
parent 1c7b860783
commit 617db485ee
13 changed files with 77 additions and 70 deletions

View File

@@ -1628,9 +1628,7 @@
#include "code\modules\spells\aoe_turf\conjure\forcewall.dm" #include "code\modules\spells\aoe_turf\conjure\forcewall.dm"
#include "code\modules\spells\general\area_teleport.dm" #include "code\modules\spells\general\area_teleport.dm"
#include "code\modules\spells\general\rune_write.dm" #include "code\modules\spells\general\rune_write.dm"
#include "code\modules\spells\targeted\disintegrate.dm"
#include "code\modules\spells\targeted\ethereal_jaunt.dm" #include "code\modules\spells\targeted\ethereal_jaunt.dm"
#include "code\modules\spells\targeted\flesh_to_stone.dm"
#include "code\modules\spells\targeted\genetic.dm" #include "code\modules\spells\targeted\genetic.dm"
#include "code\modules\spells\targeted\harvest.dm" #include "code\modules\spells\targeted\harvest.dm"
#include "code\modules\spells\targeted\mind_transfer.dm" #include "code\modules\spells\targeted\mind_transfer.dm"

View File

@@ -140,6 +140,25 @@ datum/hud/New(mob/owner)
instantiate() instantiate()
..() ..()
/datum/hud/Destroy()
..()
grab_intent = null
hurt_intent = null
disarm_intent = null
help_intent = null
lingchemdisplay = null
blobpwrdisplay = null
blobhealthdisplay = null
r_hand_hud_object = null
l_hand_hud_object = null
action_intent = null
move_intent = null
adding = null
other = null
hotkeybuttons = null
item_action_list = null
mymob = null
/datum/hud/proc/hidden_inventory_update() /datum/hud/proc/hidden_inventory_update()
if(!mymob) return if(!mymob) return
if(ishuman(mymob)) if(ishuman(mymob))

View File

@@ -45,6 +45,10 @@
/obj/screen/item_action /obj/screen/item_action
var/obj/item/owner var/obj/item/owner
/obj/screen/item_action/Destroy()
..()
owner = null
/obj/screen/item_action/Click() /obj/screen/item_action/Click()
if(!usr || !owner) if(!usr || !owner)
return 1 return 1

View File

@@ -16,7 +16,7 @@
..() ..()
for(var/obj/screen/spell/spells in spell_objects) for(var/obj/screen/spell/spells in spell_objects)
spells.spellmaster = null spells.spellmaster = null
spell_objects = null spell_objects.Cut()
if(spell_holder) if(spell_holder)
spell_holder.spell_masters -= src spell_holder.spell_masters -= src
@@ -80,7 +80,7 @@
if(spell.spell_flags & NO_BUTTON) //no button to add if we don't get one if(spell.spell_flags & NO_BUTTON) //no button to add if we don't get one
return return
var/obj/screen/spell/newscreen = PoolOrNew(/obj/screen/spell) var/obj/screen/spell/newscreen = new /obj/screen/spell
newscreen.spellmaster = src newscreen.spellmaster = src
newscreen.spell = spell newscreen.spell = spell
@@ -147,6 +147,8 @@
/obj/screen/spell/Destroy() /obj/screen/spell/Destroy()
..() ..()
spell = null
last_charged_icon = null
if(spellmaster) if(spellmaster)
spellmaster.spell_objects -= src spellmaster.spell_objects -= src
if(spellmaster && !spellmaster.spell_objects.len) if(spellmaster && !spellmaster.spell_objects.len)

View File

@@ -50,7 +50,7 @@ var/list/delayed_garbage = list()
testing("GC: [refID] not old enough, breaking at [world.time] for [GCd_at_time - time_to_kill] deciseconds until [GCd_at_time + collection_timeout]") testing("GC: [refID] not old enough, breaking at [world.time] for [GCd_at_time - time_to_kill] deciseconds until [GCd_at_time + collection_timeout]")
#endif #endif
break // Everything else is newer, skip them break // Everything else is newer, skip them
var/atom/A = locate(refID) var/datum/A = locate(refID)
#ifdef GC_DEBUG #ifdef GC_DEBUG
testing("GC: [refID] old enough to test: GCd_at_time: [GCd_at_time] time_to_kill: [time_to_kill] current: [world.time]") testing("GC: [refID] old enough to test: GCd_at_time: [GCd_at_time] time_to_kill: [time_to_kill] current: [world.time]")
#endif #endif

View File

@@ -16,6 +16,10 @@
var/damtype = "brute" var/damtype = "brute"
var/force = 0 var/force = 0
/obj/Destroy()
processing_objects -= src
..()
/obj/Topic(href, href_list, var/nowindow = 0, var/datum/topic_state/state = default_state) /obj/Topic(href, href_list, var/nowindow = 0, var/datum/topic_state/state = default_state)
// Calling Topic without a corresponding window open causes runtime errors // Calling Topic without a corresponding window open causes runtime errors
if(!nowindow && ..()) if(!nowindow && ..())

View File

@@ -14,6 +14,7 @@
return -1 return -1
/turf/simulated/Destroy() /turf/simulated/Destroy()
if(ticker)
updateVisibility(src) updateVisibility(src)
..() ..()
@@ -25,6 +26,7 @@
// STRUCTURES // STRUCTURES
/obj/structure/Destroy() /obj/structure/Destroy()
if(ticker)
updateVisibility(src) updateVisibility(src)
..() ..()
@@ -35,6 +37,7 @@
// EFFECTS // EFFECTS
/obj/effect/Destroy() /obj/effect/Destroy()
if(ticker)
updateVisibility(src) updateVisibility(src)
return ..() return ..()

View File

@@ -2,7 +2,15 @@
mob_list -= src mob_list -= src
dead_mob_list -= src dead_mob_list -= src
living_mob_list -= src living_mob_list -= src
unset_machine()
qdel(hud_used) qdel(hud_used)
if(client)
for(var/obj/screen/movable/spell_master/spell_master in spell_masters)
qdel(spell_master)
remove_screen_obj_references()
for(var/atom/movable/AM in client.screen)
qdel(AM)
client.screen = list()
if(mind && mind.current == src) if(mind && mind.current == src)
spellremove(src) spellremove(src)
for(var/infection in viruses) for(var/infection in viruses)
@@ -10,6 +18,32 @@
ghostize() ghostize()
..() ..()
/mob/proc/remove_screen_obj_references()
flash = null
blind = null
hands = null
pullin = null
purged = null
internals = null
oxygen = null
i_select = null
m_select = null
toxin = null
fire = null
bodytemp = null
healths = null
throw_icon = null
nutrition_icon = null
pressure = null
damageoverlay = null
pain = null
item_use_icon = null
gun_move_icon = null
gun_run_icon = null
gun_setting_icon = null
spell_masters = null
zone_sel = null
/mob/New() /mob/New()
mob_list += src mob_list += src
if(stat == DEAD) if(stat == DEAD)

View File

@@ -30,8 +30,6 @@
<I>This spell fires several, slow moving, magic projectiles at nearby targets. If they hit a target, it is paralyzed and takes minor damage.</I><BR> <I>This spell fires several, slow moving, magic projectiles at nearby targets. If they hit a target, it is paralyzed and takes minor damage.</I><BR>
<A href='byond://?src=\ref[src];spell_choice=fireball'>Fireball</A> (10)<BR> <A href='byond://?src=\ref[src];spell_choice=fireball'>Fireball</A> (10)<BR>
<I>This spell fires a fireball in the direction you're facing and does not require wizard garb. Be careful not to fire it at people that are standing next to you.</I><BR> <I>This spell fires a fireball in the direction you're facing and does not require wizard garb. Be careful not to fire it at people that are standing next to you.</I><BR>
<A href='byond://?src=\ref[src];spell_choice=disintegrate'>Disintegrate</A> (60)<BR>
<I>This spell instantly kills somebody adjacent to you with the vilest of magick. It has a long cooldown.</I><BR>
<A href='byond://?src=\ref[src];spell_choice=disabletech'>Disable Technology</A> (60)<BR> <A href='byond://?src=\ref[src];spell_choice=disabletech'>Disable Technology</A> (60)<BR>
<I>This spell disables all weapons, cameras and most other technology in range.</I><BR> <I>This spell disables all weapons, cameras and most other technology in range.</I><BR>
<A href='byond://?src=\ref[src];spell_choice=smoke'>Smoke</A> (10)<BR> <A href='byond://?src=\ref[src];spell_choice=smoke'>Smoke</A> (10)<BR>
@@ -121,7 +119,7 @@
uses-- uses--
/* /*
*/ */
var/list/available_spells = list(magicmissile = "Magic Missile", fireball = "Fireball", disintegrate = "Disintegrate", disabletech = "Disable Tech", smoke = "Smoke", blind = "Blind", subjugation = "Subjugation", mindswap = "Mind Transfer", forcewall = "Forcewall", blink = "Blink", teleport = "Teleport", mutate = "Mutate", etherealjaunt = "Ethereal Jaunt", knock = "Knock", horseman = "Curse of the Horseman", staffchange = "Staff of Change", mentalfocus = "Mental Focus", soulstone = "Six Soul Stone Shards and the spell Artificer", armor = "Mastercrafted Armor Set", staffanimate = "Staff of Animation", noclothes = "No Clothes",fleshtostone = "Flesh to Stone") var/list/available_spells = list(magicmissile = "Magic Missile", fireball = "Fireball", disabletech = "Disable Tech", smoke = "Smoke", blind = "Blind", subjugation = "Subjugation", mindswap = "Mind Transfer", forcewall = "Forcewall", blink = "Blink", teleport = "Teleport", mutate = "Mutate", etherealjaunt = "Ethereal Jaunt", knock = "Knock", horseman = "Curse of the Horseman", staffchange = "Staff of Change", mentalfocus = "Mental Focus", soulstone = "Six Soul Stone Shards and the spell Artificer", armor = "Mastercrafted Armor Set", staffanimate = "Staff of Animation", noclothes = "No Clothes",fleshtostone = "Flesh to Stone")
var/already_knows = 0 var/already_knows = 0
for(var/spell/aspell in H.spell_list) for(var/spell/aspell in H.spell_list)
if(available_spells[href_list["spell_choice"]] == initial(aspell.name)) if(available_spells[href_list["spell_choice"]] == initial(aspell.name))
@@ -161,10 +159,6 @@
feedback_add_details("wizard_spell_learned","FB") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells feedback_add_details("wizard_spell_learned","FB") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
H.add_spell(new/spell/targeted/projectile/dumbfire/fireball) H.add_spell(new/spell/targeted/projectile/dumbfire/fireball)
temp = "You have learned fireball." temp = "You have learned fireball."
if("disintegrate")
feedback_add_details("wizard_spell_learned","DG") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
H.add_spell(new/spell/targeted/disintegrate)
temp = "You have learned disintegrate."
if("disabletech") if("disabletech")
feedback_add_details("wizard_spell_learned","DT") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells feedback_add_details("wizard_spell_learned","DT") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
H.add_spell(new/spell/aoe_turf/disable_tech) H.add_spell(new/spell/aoe_turf/disable_tech)
@@ -213,10 +207,6 @@
feedback_add_details("wizard_spell_learned","HH") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells feedback_add_details("wizard_spell_learned","HH") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
H.add_spell(new/spell/targeted/equip_item/horsemask) H.add_spell(new/spell/targeted/equip_item/horsemask)
temp = "You have learned curse of the horseman." temp = "You have learned curse of the horseman."
if("fleshtostone")
feedback_add_details("wizard_spell_learned","FS") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
H.add_spell(new/spell/targeted/flesh_to_stone)
temp = "You have learned flesh to stone."
if("staffchange") if("staffchange")
feedback_add_details("wizard_spell_learned","ST") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells feedback_add_details("wizard_spell_learned","ST") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
new /obj/item/weapon/gun/energy/staff(get_turf(H)) new /obj/item/weapon/gun/energy/staff(get_turf(H))
@@ -253,7 +243,7 @@
H.mutations.Add(XRAY) H.mutations.Add(XRAY)
H.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS) H.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS)
H.see_invisible = SEE_INVISIBLE_LEVEL_TWO H.see_invisible = SEE_INVISIBLE_LEVEL_TWO
H << "\blue The walls suddenly disappear." H << "span class='notice'>The walls suddenly disappear.</span>"
temp = "You have purchased a scrying orb, and gained x-ray vision." temp = "You have purchased a scrying orb, and gained x-ray vision."
max_uses-- max_uses--
else else

View File

@@ -44,7 +44,7 @@
spell_master.add_spell(spell_to_add) spell_master.add_spell(spell_to_add)
return 1 return 1
var/obj/screen/movable/spell_master/new_spell_master = PoolOrNew(master_type) //we're here because either we didn't find our type, or we have no spell masters to attach to var/obj/screen/movable/spell_master/new_spell_master = new master_type //we're here because either we didn't find our type, or we have no spell masters to attach to
if(client) if(client)
src.client.screen += new_spell_master src.client.screen += new_spell_master
new_spell_master.spell_holder = src new_spell_master.spell_holder = src

View File

@@ -1,27 +0,0 @@
/spell/targeted/disintegrate
name = "Disintegrate"
desc = "This spell instantly kills somebody adjacent to you with the vilest of magick."
school = "evocation"
charge_max = 600
spell_flags = NEEDSCLOTHES
invocation = "EI NATH"
invocation_type = SpI_SHOUT
range = 1
cooldown_min = 200 //100 deciseconds reduction per rank
sparks_spread = 1
sparks_amt = 4
hud_state = "wiz_disint"
/spell/targeted/disintegrate/cast(var/list/targets)
..()
for(var/mob/living/target in targets)
if(ishuman(target))
var/mob/living/carbon/C = target
if(!C.has_brain()) // Their brain is already taken out
var/obj/item/organ/brain/B = new(C.loc)
B.transfer_identity(C)
target.gib()
return

View File

@@ -30,9 +30,10 @@
/spell/targeted/equip_item/horsemask/summon_item(var/new_type) /spell/targeted/equip_item/horsemask/summon_item(var/new_type)
var/obj/item/new_item = new new_type var/obj/item/new_item = new new_type
new_item.canremove = 0 //curses!
new_item.unacidable = 1
if(istype(new_item, /obj/item/clothing/mask/horsehead)) if(istype(new_item, /obj/item/clothing/mask/horsehead))
var/obj/item/clothing/mask/horsehead/magichead = new_item var/obj/item/clothing/mask/horsehead/magichead = new_item
magichead.canremove = 0 //curses!
magichead.flags_inv = null //so you can still see their face magichead.flags_inv = null //so you can still see their face
magichead.voicechange = 1 //NEEEEIIGHH magichead.voicechange = 1 //NEEEEIIGHH
return new_item return new_item

View File

@@ -1,21 +0,0 @@
/spell/targeted/flesh_to_stone
name = "Flesh to Stone"
desc = "This spell turns a single person into an inert statue for a long period of time."
school = "transmutation"
charge_max = 600
spell_flags = NEEDSCLOTHES
range = 3
max_targets = 1
invocation = "STAUN EI"
invocation_type = SpI_SHOUT
amt_stunned = 5//just exists to make sure the statue "catches" them
cooldown_min = 200 //100 deciseconds reduction per rank
hud_state = "wiz_statue"
/spell/targeted/flesh_to_stone/cast(var/list/targets, mob/user)
..()
for(var/mob/living/target in targets)
new /obj/structure/closet/statue(target.loc, target) //makes the statue
return