diff --git a/baystation12.dme b/baystation12.dme index 7f3090e405..b10cfc162d 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -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" diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index f39499f3dc..e1e412a9ef 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.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)) diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 4a7d6f2acb..eafd8ee777 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -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 diff --git a/code/_onclick/hud/spell_screen_objects.dm b/code/_onclick/hud/spell_screen_objects.dm index 08c11e8680..31f6fbcb86 100644 --- a/code/_onclick/hud/spell_screen_objects.dm +++ b/code/_onclick/hud/spell_screen_objects.dm @@ -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) diff --git a/code/controllers/Processes/garbage.dm b/code/controllers/Processes/garbage.dm index ade159f1ac..31a28a91a5 100644 --- a/code/controllers/Processes/garbage.dm +++ b/code/controllers/Processes/garbage.dm @@ -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 diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index fc6ef5b99d..68bdf5e422 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -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 && ..()) diff --git a/code/modules/mob/freelook/update_triggers.dm b/code/modules/mob/freelook/update_triggers.dm index 8408083ba8..4527f80879 100644 --- a/code/modules/mob/freelook/update_triggers.dm +++ b/code/modules/mob/freelook/update_triggers.dm @@ -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() diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 14f67295d8..0010f189e6 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -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) diff --git a/code/modules/spells/spellbook.dm b/code/modules/spells/spellbook.dm index 6ddaf6331a..6013ebfa14 100644 --- a/code/modules/spells/spellbook.dm +++ b/code/modules/spells/spellbook.dm @@ -30,8 +30,6 @@ This spell fires several, slow moving, magic projectiles at nearby targets. If they hit a target, it is paralyzed and takes minor damage.
Fireball (10)
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.
- Disintegrate (60)
- This spell instantly kills somebody adjacent to you with the vilest of magick. It has a long cooldown.
Disable Technology (60)
This spell disables all weapons, cameras and most other technology in range.
Smoke (10)
@@ -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." temp = "You have purchased a scrying orb, and gained x-ray vision." max_uses-- else diff --git a/code/modules/spells/spells.dm b/code/modules/spells/spells.dm index 45895ad5b3..5e378f46a3 100644 --- a/code/modules/spells/spells.dm +++ b/code/modules/spells/spells.dm @@ -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 diff --git a/code/modules/spells/targeted/disintegrate.dm b/code/modules/spells/targeted/disintegrate.dm deleted file mode 100644 index c3f0ee80e9..0000000000 --- a/code/modules/spells/targeted/disintegrate.dm +++ /dev/null @@ -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 \ No newline at end of file diff --git a/code/modules/spells/targeted/equip/horsemask.dm b/code/modules/spells/targeted/equip/horsemask.dm index b5fbcf4fbb..92b85fdb36 100644 --- a/code/modules/spells/targeted/equip/horsemask.dm +++ b/code/modules/spells/targeted/equip/horsemask.dm @@ -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 diff --git a/code/modules/spells/targeted/flesh_to_stone.dm b/code/modules/spells/targeted/flesh_to_stone.dm deleted file mode 100644 index e640fba5c6..0000000000 --- a/code/modules/spells/targeted/flesh_to_stone.dm +++ /dev/null @@ -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 \ No newline at end of file