mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
qdel/Destroy entries.
This commit is contained in:
@@ -1628,9 +1628,7 @@
|
||||
#include "code\modules\spells\aoe_turf\conjure\forcewall.dm"
|
||||
#include "code\modules\spells\general\area_teleport.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\flesh_to_stone.dm"
|
||||
#include "code\modules\spells\targeted\genetic.dm"
|
||||
#include "code\modules\spells\targeted\harvest.dm"
|
||||
#include "code\modules\spells\targeted\mind_transfer.dm"
|
||||
|
||||
@@ -140,6 +140,25 @@ datum/hud/New(mob/owner)
|
||||
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()
|
||||
if(!mymob) return
|
||||
if(ishuman(mymob))
|
||||
|
||||
@@ -45,6 +45,10 @@
|
||||
/obj/screen/item_action
|
||||
var/obj/item/owner
|
||||
|
||||
/obj/screen/item_action/Destroy()
|
||||
..()
|
||||
owner = null
|
||||
|
||||
/obj/screen/item_action/Click()
|
||||
if(!usr || !owner)
|
||||
return 1
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
..()
|
||||
for(var/obj/screen/spell/spells in spell_objects)
|
||||
spells.spellmaster = null
|
||||
spell_objects = null
|
||||
spell_objects.Cut()
|
||||
if(spell_holder)
|
||||
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
|
||||
return
|
||||
|
||||
var/obj/screen/spell/newscreen = PoolOrNew(/obj/screen/spell)
|
||||
var/obj/screen/spell/newscreen = new /obj/screen/spell
|
||||
newscreen.spellmaster = src
|
||||
newscreen.spell = spell
|
||||
|
||||
@@ -147,6 +147,8 @@
|
||||
|
||||
/obj/screen/spell/Destroy()
|
||||
..()
|
||||
spell = null
|
||||
last_charged_icon = null
|
||||
if(spellmaster)
|
||||
spellmaster.spell_objects -= src
|
||||
if(spellmaster && !spellmaster.spell_objects.len)
|
||||
|
||||
@@ -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]")
|
||||
#endif
|
||||
break // Everything else is newer, skip them
|
||||
var/atom/A = locate(refID)
|
||||
var/datum/A = locate(refID)
|
||||
#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]")
|
||||
#endif
|
||||
|
||||
@@ -16,6 +16,10 @@
|
||||
var/damtype = "brute"
|
||||
var/force = 0
|
||||
|
||||
/obj/Destroy()
|
||||
processing_objects -= src
|
||||
..()
|
||||
|
||||
/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
|
||||
if(!nowindow && ..())
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
return -1
|
||||
|
||||
/turf/simulated/Destroy()
|
||||
updateVisibility(src)
|
||||
if(ticker)
|
||||
updateVisibility(src)
|
||||
..()
|
||||
|
||||
/turf/simulated/New()
|
||||
@@ -25,7 +26,8 @@
|
||||
// STRUCTURES
|
||||
|
||||
/obj/structure/Destroy()
|
||||
updateVisibility(src)
|
||||
if(ticker)
|
||||
updateVisibility(src)
|
||||
..()
|
||||
|
||||
/obj/structure/New()
|
||||
@@ -35,7 +37,8 @@
|
||||
// EFFECTS
|
||||
|
||||
/obj/effect/Destroy()
|
||||
updateVisibility(src)
|
||||
if(ticker)
|
||||
updateVisibility(src)
|
||||
return ..()
|
||||
|
||||
/obj/effect/New()
|
||||
|
||||
@@ -2,7 +2,15 @@
|
||||
mob_list -= src
|
||||
dead_mob_list -= src
|
||||
living_mob_list -= src
|
||||
unset_machine()
|
||||
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)
|
||||
spellremove(src)
|
||||
for(var/infection in viruses)
|
||||
@@ -10,6 +18,32 @@
|
||||
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_list += src
|
||||
if(stat == DEAD)
|
||||
|
||||
@@ -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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
@@ -121,7 +119,7 @@
|
||||
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
|
||||
for(var/spell/aspell in H.spell_list)
|
||||
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
|
||||
H.add_spell(new/spell/targeted/projectile/dumbfire/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")
|
||||
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)
|
||||
@@ -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
|
||||
H.add_spell(new/spell/targeted/equip_item/horsemask)
|
||||
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")
|
||||
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))
|
||||
@@ -253,7 +243,7 @@
|
||||
H.mutations.Add(XRAY)
|
||||
H.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS)
|
||||
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."
|
||||
max_uses--
|
||||
else
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
spell_master.add_spell(spell_to_add)
|
||||
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)
|
||||
src.client.screen += new_spell_master
|
||||
new_spell_master.spell_holder = src
|
||||
|
||||
@@ -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
|
||||
@@ -30,9 +30,10 @@
|
||||
|
||||
/spell/targeted/equip_item/horsemask/summon_item(var/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))
|
||||
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.voicechange = 1 //NEEEEIIGHH
|
||||
return new_item
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user