From 1ac09a962c2ea61b2b2bbeec8fa7363b8f365e7a Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Thu, 21 Jul 2016 01:43:16 -0400 Subject: [PATCH] Cleans up Vars --- code/datums/mind.dm | 21 +++--- code/datums/spell.dm | 8 +-- code/datums/spells/charge.dm | 4 +- code/datums/spells/mind_transfer.dm | 13 ++-- code/game/dna/genes/goon_powers.dm | 8 +-- .../miniantags/slaughter/slaughter.dm | 2 +- code/game/gamemodes/shadowling/shadowling.dm | 12 ++-- .../shadowling/shadowling_abilities.dm | 20 +++--- .../special_shadowling_abilities.dm | 34 +++++----- code/game/gamemodes/wizard/artefact.dm | 16 ++--- code/game/gamemodes/wizard/spellbook.dm | 37 ++--------- code/game/gamemodes/wizard/wizard.dm | 15 ++--- code/modules/mob/dead/observer/observer.dm | 2 +- .../mob/living/carbon/alien/humanoid/life.dm | 2 +- .../mob/living/carbon/alien/humanoid/queen.dm | 35 +--------- .../mob/living/carbon/alien/larva/life.dm | 2 +- .../mob/living/carbon/brain/posibrain.dm | 1 - .../mob/living/carbon/carbon_defines.dm | 7 +- code/modules/mob/living/carbon/human/life.dm | 9 ++- .../living/carbon/human/species/species.dm | 33 +++++----- code/modules/mob/living/carbon/shock.dm | 2 - code/modules/mob/living/carbon/superheroes.dm | 5 +- code/modules/mob/living/living_defines.dm | 16 ++--- .../mob/living/simple_animal/constructs.dm | 2 +- .../living/simple_animal/hostile/statue.dm | 6 +- code/modules/mob/mob.dm | 33 +++++----- code/modules/mob/mob_defines.dm | 64 +++++++------------ code/modules/mob/spirit/mask/mask.dm | 6 +- code/modules/surgery/organs/pain.dm | 6 -- code/world.dm | 25 -------- 30 files changed, 161 insertions(+), 285 deletions(-) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index da332e3970f..2863e8a595c 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -1055,18 +1055,13 @@ switch(href_list["shadowling"]) if("clear") ticker.mode.update_shadow_icons_removed(src) - current.spell_list.Cut() if(src in ticker.mode.shadows) ticker.mode.shadows -= src special_role = null to_chat(current, "Your powers have been quenched! You are no longer a shadowling!") - current.spell_list.Cut() - if(current.mind) - current.mind.spell_list.Cut() message_admins("[key_name_admin(usr)] has de-shadowlinged [current].") log_admin("[key_name(usr)] has de-shadowlinged [current].") - remove_spell(/obj/effect/proc_holder/spell/targeted/shadowling_hatch) - remove_spell(/obj/effect/proc_holder/spell/targeted/shadowling_ascend) + current.spellremove(current) current.remove_language("Shadowling Hivemind") else if(src in ticker.mode.shadowling_thralls) ticker.mode.remove_thrall(src,0) @@ -1488,9 +1483,17 @@ return (duration <= world.time - brigged_since) -/datum/mind/proc/AddSpell(var/obj/effect/proc_holder/spell/spell) - spell_list += spell - spell.action.Grant(current) +/datum/mind/proc/AddSpell(obj/effect/proc_holder/spell/S) + spell_list += S + S.action.Grant(current) + +/datum/mind/proc/RemoveSpell(obj/effect/proc_holder/spell/spell) //To remove a specific spell from a mind + if(!spell) + return + for(var/obj/effect/proc_holder/spell/S in spell_list) + if(istype(S, spell)) + qdel(S) + spell_list -= S /datum/mind/proc/transfer_actions(var/mob/living/new_character) if(current && current.actions) diff --git a/code/datums/spell.dm b/code/datums/spell.dm index fa48fcd2ee7..c7aa3dfd9a0 100644 --- a/code/datums/spell.dm +++ b/code/datums/spell.dm @@ -57,7 +57,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin /obj/effect/proc_holder/spell/proc/cast_check(skipcharge = 0, mob/living/user = usr) //checks if the spell can be cast based on its settings; skipcharge is used when an additional cast_check is called inside the spell - if(((!user.mind) || !(src in user.mind.spell_list)) && !(src in user.spell_list)) + if(((!user.mind) || !(src in user.mind.spell_list)) && !(src in user.mob_spell_list)) to_chat(user, "You shouldn't have this spell! Something's wrong.") return 0 if(istype(user, /mob/living/carbon/human)) @@ -91,7 +91,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin if(ishuman(user) && (invocation_type == "whisper" || invocation_type == "shout") && user.is_muzzled()) to_chat(user, "Mmmf mrrfff!") return 0 - var/obj/effect/proc_holder/spell/noclothes/spell = locate() in (user.spell_list | (user.mind ? user.mind.spell_list : list())) + var/obj/effect/proc_holder/spell/noclothes/spell = locate() in (user.mob_spell_list | (user.mind ? user.mind.spell_list : list())) if(clothes_req && !(spell && istype(spell)))//clothes check if(!istype(user, /mob/living/carbon/human)) to_chat(user, "You aren't a human, Why are you trying to cast a human spell, silly non-human? Casting human spells is for humans.") @@ -360,7 +360,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin return 1 /obj/effect/proc_holder/spell/proc/can_cast(mob/user = usr) - if(((!user.mind) || !(src in user.mind.spell_list)) && !(src in user.spell_list)) + if(((!user.mind) || !(src in user.mind.spell_list)) && !(src in user.mob_spell_list)) return 0 if(user.z == ZLEVEL_CENTCOMM && !centcom_cancast) //Certain spells are not allowed on the centcom zlevel @@ -386,7 +386,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin if((invocation_type == "whisper" || invocation_type == "shout") && H.is_muzzled()) return 0 - var/obj/effect/proc_holder/spell/noclothes/clothcheck = locate() in user.spell_list + var/obj/effect/proc_holder/spell/noclothes/clothcheck = locate() in user.mob_spell_list var/obj/effect/proc_holder/spell/noclothes/clothcheck2 = locate() in user.mind.spell_list if(clothes_req && !(clothcheck && istype(clothcheck)) && !(clothcheck2 && istype(clothcheck2)))//clothes check if(!istype(H.wear_suit, /obj/item/clothing/suit/wizrobe) && !istype(H.wear_suit, /obj/item/clothing/suit/space/rig/wizard)) diff --git a/code/datums/spells/charge.dm b/code/datums/spells/charge.dm index b46472c35b9..1551dbc3b68 100644 --- a/code/datums/spells/charge.dm +++ b/code/datums/spells/charge.dm @@ -20,8 +20,8 @@ if(L.pulling && (istype(L.pulling, /mob/living))) var/mob/living/M = L.pulling - if(M.spell_list.len != 0 || (M.mind && M.mind.spell_list.len != 0)) - for(var/obj/effect/proc_holder/spell/S in M.spell_list) + if(M.mob_spell_list.len != 0 || (M.mind && M.mind.spell_list.len != 0)) + for(var/obj/effect/proc_holder/spell/S in M.mob_spell_list) S.charge_counter = S.charge_max if(M.mind) for(var/obj/effect/proc_holder/spell/S in M.mind.spell_list) diff --git a/code/datums/spells/mind_transfer.dm b/code/datums/spells/mind_transfer.dm index 514cb95dce4..4195052fdda 100644 --- a/code/datums/spells/mind_transfer.dm +++ b/code/datums/spells/mind_transfer.dm @@ -19,19 +19,18 @@ Urist: I don't feel like figuring out how you store object spells so I'm leaving Make sure spells that are removed from spell_list are actually removed and deleted when mind transfering. Also, you never added distance checking after target is selected. I've went ahead and did that. */ -/obj/effect/proc_holder/spell/targeted/mind_transfer/cast(list/targets,mob/user = usr) +/obj/effect/proc_holder/spell/targeted/mind_transfer/cast(list/targets, mob/user = usr, distanceoverride) if(!targets.len) to_chat(user, "No mind found.") return if(targets.len > 1) to_chat(user, "Too many minds! You're not a hive damnit!")//Whaa...aat? - return var/mob/living/target = targets[1] - if(!(target in oview(range)))//If they are not in overview after selection. Do note that !() is necessary for in to work because ! takes precedence over it. + if(!(target in oview(range)) && !distanceoverride)//If they are not in overview after selection. Do note that !() is necessary for in to work because ! takes precedence over it. to_chat(user, "They are too far away!") return @@ -64,18 +63,16 @@ Also, you never added distance checking after target is selected. I've went ahea victim.verbs -= V var/mob/dead/observer/ghost = victim.ghostize(0) - ghost.spell_list = victim.spell_list//If they have spells, transfer them. Now we basically have a backup mob. - caster.mind.transfer_to(victim) - victim.spell_list = caster.spell_list//Now they are inside the victim's body. if(victim.mind.special_verbs.len)//To add all the special verbs for the original caster. for(var/V in caster.mind.special_verbs)//Not too important but could come into play. caster.verbs += V ghost.mind.transfer_to(caster) - caster.key = ghost.key //have to transfer the key since the mind was not active - caster.spell_list = ghost.spell_list + if(ghost.key) + caster.key = ghost.key //have to transfer the key since the mind was not active + qdel(ghost) if(caster.mind.special_verbs.len)//If they had any special verbs, we add them here. for(var/V in caster.mind.special_verbs) diff --git a/code/game/dna/genes/goon_powers.dm b/code/game/dna/genes/goon_powers.dm index 3d9b045da13..394540c7762 100644 --- a/code/game/dna/genes/goon_powers.dm +++ b/code/game/dna/genes/goon_powers.dm @@ -92,14 +92,14 @@ var/obj/effect/proc_holder/spell/spelltype /datum/dna/gene/basic/grant_spell/activate(var/mob/M, var/connected, var/flags) - M.AddSpell(new spelltype(M)) + M.AddSpell(new spelltype(null)) ..() return 1 /datum/dna/gene/basic/grant_spell/deactivate(var/mob/M, var/connected, var/flags) - for(var/obj/effect/proc_holder/spell/S in M.spell_list) - if(istype(S,spelltype)) - M.spell_list.Remove(S) + for(var/obj/effect/proc_holder/spell/S in M.mob_spell_list) + if(istype(S, spelltype)) + M.RemoveSpell(S) ..() return 1 diff --git a/code/game/gamemodes/miniantags/slaughter/slaughter.dm b/code/game/gamemodes/miniantags/slaughter/slaughter.dm index ac32105229a..2f293b86825 100644 --- a/code/game/gamemodes/miniantags/slaughter/slaughter.dm +++ b/code/game/gamemodes/miniantags/slaughter/slaughter.dm @@ -179,7 +179,7 @@ ..() if(M.mind) M.bloodcrawl = 0 - M.mind.remove_spell(/obj/effect/proc_holder/spell/bloodcrawl) + M.mind.RemoveSpell(/obj/effect/proc_holder/spell/bloodcrawl) /obj/item/organ/internal/heart/demon/Stop() return 0 // Always beating. diff --git a/code/game/gamemodes/shadowling/shadowling.dm b/code/game/gamemodes/shadowling/shadowling.dm index 3b67e7bb4f3..2cc099cc115 100644 --- a/code/game/gamemodes/shadowling/shadowling.dm +++ b/code/game/gamemodes/shadowling/shadowling.dm @@ -132,7 +132,7 @@ Made by Xhuis /datum/game_mode/proc/finalize_shadowling(var/datum/mind/shadow_mind) var/mob/living/carbon/human/S = shadow_mind.current - shadow_mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadowling_hatch) + shadow_mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadowling_hatch(null)) spawn(0) shadow_mind.current.add_language("Shadowling Hivemind") update_shadow_icons_added(shadow_mind) @@ -149,9 +149,9 @@ Made by Xhuis update_shadow_icons_added(new_thrall_mind) new_thrall_mind.current.attack_log += "\[[time_stamp()]\] Became a thrall" new_thrall_mind.current.add_language("Shadowling Hivemind") - new_thrall_mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/lesser_glare) - new_thrall_mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/lesser_shadow_walk) - new_thrall_mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadow_vision/thrall) + new_thrall_mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/lesser_glare(null)) + new_thrall_mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/lesser_shadow_walk(null)) + new_thrall_mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadow_vision/thrall(null)) to_chat(new_thrall_mind.current, "You see the truth. Reality has been torn away and you realize what a fool you've been.") to_chat(new_thrall_mind.current, "The shadowlings are your masters. Serve them above all else and ensure they complete their goals.") to_chat(new_thrall_mind.current, "You may not harm other thralls or the shadowlings. However, you do not need to obey other thralls.") @@ -171,7 +171,7 @@ Made by Xhuis thrall_mind.special_role = null update_shadow_icons_removed(thrall_mind) for(var/obj/effect/proc_holder/spell/S in thrall_mind.spell_list) - thrall_mind.remove_spell(S) + thrall_mind.RemoveSpell(S) thrall_mind.current.remove_language("Shadowling Hivemind") if(kill && ishuman(thrall_mind.current)) //If dethrallization surgery fails, kill the mob as well as dethralling them var/mob/living/carbon/human/H = thrall_mind.current @@ -215,7 +215,7 @@ Made by Xhuis ling_mind.current.attack_log += "\[[time_stamp()]\] Deshadowlinged" ling_mind.special_role = null for(var/obj/effect/proc_holder/spell/S in ling_mind.spell_list) - ling_mind.remove_spell(S) + ling_mind.RemoveSpell(S) var/mob/living/M = ling_mind.current if(issilicon(M)) M.audible_message("[M] lets out a short blip.", \ diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm index 6106bb04ec4..f91b9fa1aee 100644 --- a/code/game/gamemodes/shadowling/shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm @@ -438,24 +438,24 @@ if(thralls >= 3 && !screech_acquired) screech_acquired = 1 to_chat(user, "The power of your thralls has granted you the Sonic Screech ability. This ability will shatter nearby windows and deafen enemies, plus stunning silicon lifeforms.") - user.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/unearthly_screech) + user.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/unearthly_screech(null)) if(thralls >= 5 && !blind_smoke_acquired) blind_smoke_acquired = 1 to_chat(user, "The power of your thralls has granted you the Blinding Smoke ability. \ It will create a choking cloud that will blind any non-thralls who enter.") - user.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/blindness_smoke) + user.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/blindness_smoke(null)) if(thralls >= 7 && !drainLifeAcquired) drainLifeAcquired = 1 to_chat(user, "The power of your thralls has granted you the Drain Life ability. You can now drain the health of nearby humans to heal yourself.") - user.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/drainLife) + user.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/drainLife(null)) if(thralls >= 9 && !reviveThrallAcquired) reviveThrallAcquired = 1 to_chat(user, "The power of your thralls has granted you the Black Recuperation ability. \ This will, after a short time, bring a dead thrall completely back to life with no bodily defects.") - user.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/reviveThrall) + user.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/reviveThrall(null)) if(thralls < victory_threshold) to_chat(user, "You do not have the power to ascend. You require [victory_threshold] thralls, but only [thralls] living thralls are present.") @@ -469,8 +469,8 @@ if(CM in M.mind.spell_list) M.mind.spell_list -= CM qdel(CM) - M.mind.remove_spell(/obj/effect/proc_holder/spell/targeted/shadowling_hatch) - M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadowling_ascend) + M.mind.RemoveSpell(/obj/effect/proc_holder/spell/targeted/shadowling_hatch) + M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadowling_ascend(null)) if(M == usr) to_chat(M, "You project this power to the rest of the shadowlings.") else @@ -674,10 +674,10 @@ "You feel new power flow into you. You have been gifted by your masters. You now closely resemble them. You are empowered in \ darkness but wither slowly in light. In addition, Lesser Glare and Guise have been upgraded into their true forms.") thrallToRevive.set_species("Lesser Shadowling") - thrallToRevive.mind.remove_spell(/obj/effect/proc_holder/spell/targeted/lesser_glare) - thrallToRevive.mind.remove_spell(/obj/effect/proc_holder/spell/targeted/lesser_shadow_walk) - thrallToRevive.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/glare) - thrallToRevive.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadow_walk) + thrallToRevive.mind.RemoveSpell(/obj/effect/proc_holder/spell/targeted/lesser_glare) + thrallToRevive.mind.RemoveSpell(/obj/effect/proc_holder/spell/targeted/lesser_shadow_walk) + thrallToRevive.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/glare(null)) + thrallToRevive.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadow_walk(null)) if("Revive") if(!is_thrall(thrallToRevive)) to_chat(usr, "[thrallToRevive] is not a thrall.") diff --git a/code/game/gamemodes/shadowling/special_shadowling_abilities.dm b/code/game/gamemodes/shadowling/special_shadowling_abilities.dm index 98f81f1d128..2c06168499e 100644 --- a/code/game/gamemodes/shadowling/special_shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/special_shadowling_abilities.dm @@ -92,19 +92,19 @@ var/list/possibleShadowlingNames = list("U'ruan", "Y`shej", "Nex", "Hel-uae", "N H.equip_to_slot_or_del(new /obj/item/clothing/glasses/shadowling(usr), slot_glasses) H.set_species("Shadowling") //can't be a shadowling without being a shadowling - H.mind.remove_spell(src) + H.mind.RemoveSpell(src) sleep(10) to_chat(H, "Your powers are awoken. You may now live to your fullest extent. Remember your goal. Cooperate with your thralls and allies.") - H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadow_vision) - H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/enthrall) - H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/glare) - H.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/veil) - H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadow_walk) - H.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/flashfreeze) - H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/collective_mind) - H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadowling_regenarmor) - H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadowling_extend_shuttle) + H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadow_vision(null)) + H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/enthrall(null)) + H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/glare(null)) + H.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/veil(null)) + H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadow_walk(null)) + H.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/flashfreeze(null)) + H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/collective_mind(null)) + H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadowling_regenarmor(null)) + H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadowling_extend_shuttle(null)) /obj/effect/proc_holder/spell/targeted/shadowling_ascend name = "Ascend" @@ -162,15 +162,15 @@ var/list/possibleShadowlingNames = list("U'ruan", "Y`shej", "Nex", "Hel-uae", "N var/mob/A = new /mob/living/simple_animal/ascendant_shadowling(H.loc) for(var/obj/effect/proc_holder/spell/S in H.mind.spell_list) if(S == src) continue - H.mind.remove_spell(S) + H.mind.RemoveSpell(S) H.mind.transfer_to(A) A.name = H.real_name A.languages = H.languages - A.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/annihilate) - A.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/hypnosis) - A.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadowling_phase_shift) - A.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/ascendant_storm) - A.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadowlingAscendantTransmit) + A.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/annihilate(null)) + A.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/hypnosis(null)) + A.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadowling_phase_shift(null)) + A.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/ascendant_storm(null)) + A.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadowlingAscendantTransmit(null)) if(A.real_name) A.real_name = H.real_name H.invisibility = 60 //This is pretty bad, but is also necessary for the shuttle call to function properly @@ -179,5 +179,5 @@ var/list/possibleShadowlingNames = list("U'ruan", "Y`shej", "Nex", "Hel-uae", "N if(!ticker.mode.shadowling_ascended) shuttle_master.emergency.request(null, 0.3) ticker.mode.shadowling_ascended = 1 - A.mind.remove_spell(src) + A.mind.RemoveSpell(src) qdel(H) diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index 514f612ca43..edbec8843e6 100644 --- a/code/game/gamemodes/wizard/artefact.dm +++ b/code/game/gamemodes/wizard/artefact.dm @@ -59,21 +59,21 @@ to_chat(M, "You are the [H.real_name]'s apprentice! You are bound by magic contract to follow their orders and help them in accomplishing their goals.") switch(href_list["school"]) if("destruction") - M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/projectile/magic_missile(M)) - M.mind.AddSpell(new /obj/effect/proc_holder/spell/dumbfire/fireball(M)) + M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/projectile/magic_missile(null)) + M.mind.AddSpell(new /obj/effect/proc_holder/spell/dumbfire/fireball(null)) to_chat(M, "Your service has not gone unrewarded, however. Studying under [H.real_name], you have learned powerful, destructive spells. You are able to cast magic missile and fireball.") if("bluespace") - M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/area_teleport/teleport(M)) - M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/ethereal_jaunt(M)) + M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/area_teleport/teleport(null)) + M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/ethereal_jaunt(null)) to_chat(M, "Your service has not gone unrewarded, however. Studying under [H.real_name], you have learned reality bending mobility spells. You are able to cast teleport and ethereal jaunt.") if("healing") - M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/charge(M)) - M.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/conjure/forcewall(M)) + M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/charge(null)) + M.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/conjure/forcewall(null)) M.equip_to_slot_or_del(new /obj/item/weapon/gun/magic/staff/healing(M), slot_r_hand) to_chat(M, "Your service has not gone unrewarded, however. Studying under [H.real_name], you have learned livesaving survival spells. You are able to cast charge and forcewall.") if("robeless") - M.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/knock(M)) - M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/mind_transfer(M)) + M.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/knock(null)) + M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/mind_transfer(null)) to_chat(M, "Your service has not gone unrewarded, however. Studying under [H.real_name], you have learned stealthy, robeless spells. You are able to cast knock and mindswap.") M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear) diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index 2daf3ab7e42..0dbcd3103fe 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -684,9 +684,9 @@ /obj/item/weapon/spellbook/oneuse/Initialize() //No need to init return -/obj/item/weapon/spellbook/oneuse/attack_self(mob/user as mob) +/obj/item/weapon/spellbook/oneuse/attack_self(mob/user) var/obj/effect/proc_holder/spell/S = new spell - for(var/obj/effect/proc_holder/spell/knownspell in user.spell_list) + for(var/obj/effect/proc_holder/spell/knownspell in user.mind.spell_list) if(knownspell.type == S.type) if(user.mind) if(user.mind.special_role == "apprentice" || user.mind.special_role == "Wizard") @@ -703,10 +703,10 @@ onlearned(user) -/obj/item/weapon/spellbook/oneuse/proc/recoil(mob/user as mob) +/obj/item/weapon/spellbook/oneuse/proc/recoil(mob/user) user.visible_message("[src] glows in a black light!") -/obj/item/weapon/spellbook/oneuse/proc/onlearned(mob/user as mob) +/obj/item/weapon/spellbook/oneuse/proc/onlearned(mob/user) used = 1 user.visible_message("[src] glows dark for a second!") @@ -762,7 +762,7 @@ name = "spellbook of [spellname]" //Note, desc doesn't change by design ..() -/obj/item/weapon/spellbook/oneuse/mindswap/recoil(mob/user as mob) +/obj/item/weapon/spellbook/oneuse/mindswap/recoil(mob/user) ..() if(stored_swap in dead_mob_list) stored_swap = null @@ -774,31 +774,8 @@ to_chat(user, "You stare at the book some more, but there doesn't seem to be anything else to learn...") return - if(user.mind.special_verbs.len) - for(var/V in user.mind.special_verbs) - user.verbs -= V - - if(stored_swap.mind.special_verbs.len) - for(var/V in stored_swap.mind.special_verbs) - stored_swap.verbs -= V - - var/mob/dead/observer/ghost = stored_swap.ghostize(0) - ghost.spell_list = stored_swap.spell_list - - user.mind.transfer_to(stored_swap) - stored_swap.spell_list = user.spell_list - - if(stored_swap.mind.special_verbs.len) - for(var/V in user.mind.special_verbs) - user.verbs += V - - ghost.mind.transfer_to(user) - user.key = ghost.key - user.spell_list = ghost.spell_list - - if(user.mind.special_verbs.len) - for(var/V in user.mind.special_verbs) - user.verbs += V + var/obj/effect/proc_holder/spell/targeted/mind_transfer/swapper = new + swapper.cast(user, stored_swap, 1) to_chat(stored_swap, "You're suddenly somewhere else... and someone else?!") to_chat(user, "Suddenly you're staring at [src] again... where are you, who are you?!") diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm index 4de241a2c81..338d088d6f1 100644 --- a/code/game/gamemodes/wizard/wizard.dm +++ b/code/game/gamemodes/wizard/wizard.dm @@ -240,20 +240,19 @@ //OTHER PROCS -//To batch-remove wizard spells. Linked to mind.dm. +//To batch-remove wizard spells. Linked to mind.dm /mob/proc/spellremove(mob/M) if(!mind) return - for(var/obj/effect/proc_holder/spell/spell_to_remove in src.mind.spell_list) + for(var/obj/effect/proc_holder/spell/spell_to_remove in mind.spell_list) qdel(spell_to_remove) mind.spell_list -= spell_to_remove -/datum/mind/proc/remove_spell(var/obj/effect/proc_holder/spell/spell) //To remove a specific spell from a mind - if(!spell) return - for(var/obj/effect/proc_holder/spell/S in spell_list) - if(istype(S, spell)) - qdel(S) - spell_list -= S +//To batch-remove mob spells. +/mob/proc/mobspellremove(mob/M) + for(var/obj/effect/proc_holder/spell/spell_to_remove in mob_spell_list) + qdel(spell_to_remove) + mob_spell_list -= spell_to_remove /*Checks if the wizard can cast spells. Made a proc so this is not repeated 14 (or more) times.*/ diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index c6636d034e0..b15761d8c57 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -36,7 +36,7 @@ var/list/image/ghost_darkness_images = list() //this is a list of images for thi verbs += /mob/dead/observer/proc/dead_tele // Our new boo spell. - AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/boo(src)) + AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/boo(null)) can_reenter_corpse = flags & GHOST_CAN_REENTER started_as_observer = flags & GHOST_IS_OBSERVER diff --git a/code/modules/mob/living/carbon/alien/humanoid/life.dm b/code/modules/mob/living/carbon/alien/humanoid/life.dm index d478194bc44..31a484a0c3b 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/life.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/life.dm @@ -59,7 +59,7 @@ blinded = 1 silent = 0 else //ALIVE. LIGHTS ARE ON - if(health < config.health_threshold_dead || brain_op_stage == 4.0) + if(health < config.health_threshold_dead || !get_int_organ(/obj/item/organ/internal/brain)) death() blinded = 1 stat = DEAD diff --git a/code/modules/mob/living/carbon/alien/humanoid/queen.dm b/code/modules/mob/living/carbon/alien/humanoid/queen.dm index e2862184b79..daba3852764 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/queen.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/queen.dm @@ -88,37 +88,4 @@ icon_state = "queen_s" for(var/image/I in overlays_standing) - overlays += I - - -/* -/mob/living/carbon/alien/humanoid/queen/verb/evolve() // -- TLE - set name = "Evolve (1000)" - set desc = "The ultimate transformation. Become an alien Empress. Only one empress can exist at a time." - set category = "Alien" - - if(powerc(1000)) - // Queen check - var/no_queen = 1 - for(var/mob/living/carbon/alien/humanoid/empress/E in living_mob_list) - if(!E.key && E.brain_op_stage != 4) - continue - no_queen = 0 - - if(no_queen) - adjustToxLoss(-1000) - to_chat(src, "You begin to evolve!") - for(var/mob/O in viewers(src, null)) - O.show_message(text("[src] begins to twist and contort!"), 1) - var/mob/living/carbon/alien/humanoid/empress/new_xeno = new(loc) - if(mind) - mind.transfer_to(new_xeno) - else - new_xeno.key = key - new_xeno.mind.name = new_xeno.name - qdel(src) - else - to_chat(src, "We already have an alive empress.") - return - -*/ \ No newline at end of file + overlays += I \ No newline at end of file diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm index 4e7b974d855..de750349237 100644 --- a/code/modules/mob/living/carbon/alien/larva/life.dm +++ b/code/modules/mob/living/carbon/alien/larva/life.dm @@ -19,7 +19,7 @@ blinded = 1 silent = 0 else //ALIVE. LIGHTS ARE ON - if(health < -25 || brain_op_stage == 4.0) + if(health < -25 || !get_int_organ(/obj/item/organ/internal/brain)) death() blinded = 1 silent = 0 diff --git a/code/modules/mob/living/carbon/brain/posibrain.dm b/code/modules/mob/living/carbon/brain/posibrain.dm index 7b04e52f69b..aad88276473 100644 --- a/code/modules/mob/living/carbon/brain/posibrain.dm +++ b/code/modules/mob/living/carbon/brain/posibrain.dm @@ -183,7 +183,6 @@ src.brainmob.container = src src.brainmob.stat = 0 src.brainmob.silent = 0 - src.brainmob.brain_op_stage = 4.0 dead_mob_list -= src.brainmob ..() diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm index 07a6a0d28cd..e900fc10517 100644 --- a/code/modules/mob/living/carbon/carbon_defines.dm +++ b/code/modules/mob/living/carbon/carbon_defines.dm @@ -1,15 +1,12 @@ -/mob/living/carbon/ +/mob/living/carbon gender = MALE hud_possible = list(HEALTH_HUD,STATUS_HUD,SPECIALROLE_HUD) var/list/stomach_contents = list() var/list/internal_organs = list() - var/brain_op_stage = 0.0 var/antibodies = 0 - var/last_eating = 0 //Not sure what this does... I found it hidden in food.dm var/life_tick = 0 // The amount of life ticks that have processed on this mob. - var/analgesic = 0 // when this is set, the mob isn't affected by shock or pain - // life should decrease this by 1 every tick + // total amount of wounds on mob, used to spread out healing and the like over all wounds var/number_wounds = 0 var/obj/item/handcuffed = null //Whether or not the mob is handcuffed diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 4ee83d8eb5f..5af70425d50 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -816,9 +816,6 @@ handle_organs() handle_blood() - //the analgesic effect wears off slowly - analgesic = max(0, analgesic - 1) - if(paralysis) blinded = 1 stat = UNCONSCIOUS @@ -987,8 +984,10 @@ /mob/living/carbon/human/handle_shock() ..() - if(status_flags & GODMODE) return 0 //godmode - if(analgesic || (species && species.flags & NO_PAIN)) return // analgesic avoids all traumatic shock temporarily + if(status_flags & GODMODE) + return 0 //godmode + if(species && species.flags & NO_PAIN) + return if(health <= config.health_threshold_softcrit)// health 0 makes you immediately collapse shock_stage = max(shock_stage, 61) diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 9091fcd9079..617d63c798b 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -615,25 +615,22 @@ /datum/species/proc/handle_hud_icons(mob/living/carbon/human/H) if(H.healths) - if(H.analgesic) - H.healths.icon_state = "health_health_numb" + if(H.stat == DEAD) + H.healths.icon_state = "health7" else - if(H.stat == DEAD) - H.healths.icon_state = "health7" - else - switch(H.hal_screwyhud) - if(1) H.healths.icon_state = "health6" - if(2) H.healths.icon_state = "health7" - if(5) H.healths.icon_state = "health0" - else - switch(100 - ((flags & NO_PAIN) ? 0 : H.traumatic_shock) - H.staminaloss) - if(100 to INFINITY) H.healths.icon_state = "health0" - if(80 to 100) H.healths.icon_state = "health1" - if(60 to 80) H.healths.icon_state = "health2" - if(40 to 60) H.healths.icon_state = "health3" - if(20 to 40) H.healths.icon_state = "health4" - if(0 to 20) H.healths.icon_state = "health5" - else H.healths.icon_state = "health6" + switch(H.hal_screwyhud) + if(1) H.healths.icon_state = "health6" + if(2) H.healths.icon_state = "health7" + if(5) H.healths.icon_state = "health0" + else + switch(100 - ((flags & NO_PAIN) ? 0 : H.traumatic_shock) - H.staminaloss) + if(100 to INFINITY) H.healths.icon_state = "health0" + if(80 to 100) H.healths.icon_state = "health1" + if(60 to 80) H.healths.icon_state = "health2" + if(40 to 60) H.healths.icon_state = "health3" + if(20 to 40) H.healths.icon_state = "health4" + if(0 to 20) H.healths.icon_state = "health5" + else H.healths.icon_state = "health6" if(H.healthdoll) H.healthdoll.overlays.Cut() diff --git a/code/modules/mob/living/carbon/shock.dm b/code/modules/mob/living/carbon/shock.dm index b1c83a1e7c1..0a86f2756cf 100644 --- a/code/modules/mob/living/carbon/shock.dm +++ b/code/modules/mob/living/carbon/shock.dm @@ -16,8 +16,6 @@ src.traumatic_shock -= R.shock_reduction // now you too can varedit cyanide to reduce shock by 1000 - Iamgoofball if(src.slurring) src.traumatic_shock -= 10 - if(src.analgesic) - src.traumatic_shock = 0 // broken or ripped off organs will add quite a bit of pain if(istype(src,/mob/living/carbon/human)) diff --git a/code/modules/mob/living/carbon/superheroes.dm b/code/modules/mob/living/carbon/superheroes.dm index ab12c584259..23233fd5e09 100644 --- a/code/modules/mob/living/carbon/superheroes.dm +++ b/code/modules/mob/living/carbon/superheroes.dm @@ -33,8 +33,9 @@ if(default_spells.len) for(var/spell in default_spells) var/obj/effect/proc_holder/spell/S = spell - if(!S) return - H.AddSpell(new S) + if(!S) + return + H.mind.AddSpell(new S(null)) /datum/superheroes/proc/assign_id(var/mob/living/carbon/human/H) var/obj/item/weapon/card/id/syndicate/W = new(H) diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index 0cb7b6c3457..19dc6f99cd1 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -7,10 +7,10 @@ //Damage related vars, NOTE: THESE SHOULD ONLY BE MODIFIED BY PROCS - var/bruteloss = 0.0 //Brutal damage caused by brute force (punching, being clubbed by a toolbox ect... this also accounts for pressure damage) - var/oxyloss = 0.0 //Oxygen depravation damage (no air in lungs) - var/toxloss = 0.0 //Toxic damage caused by being poisoned or radiated - var/fireloss = 0.0 //Burn damage caused by being way too hot, too cold or burnt. + var/bruteloss = 0 //Brutal damage caused by brute force (punching, being clubbed by a toolbox ect... this also accounts for pressure damage) + var/oxyloss = 0 //Oxygen depravation damage (no air in lungs) + var/toxloss = 0 //Toxic damage caused by being poisoned or radiated + var/fireloss = 0 //Burn damage caused by being way too hot, too cold or burnt. var/cloneloss = 0 //Damage caused by being cloned or ejected from the cloner early. slimes also deal cloneloss damage to victims var/brainloss = 0 //'Retardation' damage caused by someone hitting you in the head with a bible or being infected with brainrot. var/staminaloss = 0 //Stamina damage, or exhaustion. You recover it slowly naturally, and are stunned if it gets too high. Holodeck and hallucinations deal this. @@ -23,11 +23,6 @@ //Allows mobs to move through dense areas without restriction. For instance, in space or out of holder objects. var/incorporeal_move = 0 //0 is off, 1 is normal, 2 is for ninjas. - var/t_plasma = null - var/t_oxygen = null - var/t_sl_gas = null - var/t_n2 = null - var/now_pushing = null var/atom/movable/cameraFollow = null @@ -36,9 +31,8 @@ var/fire_stacks = 0 //Tracks how many stacks of fire we have on, max is usually 20 var/update_slimes = 1 - var/specialsauce = 0 //Has this person consumed enough special sauce? IF so they're a ticking time bomb of death. var/implanting = 0 //Used for the mind-slave implant - var/silent = null //Can't talk. Value goes down every life proc. + var/silent = 0 //Can't talk. Value goes down every life proc. //NOTE TO FUTURE CODERS: DO NOT INITIALIZE NUMERICAL VARS AS NULL OR I WILL MURDER YOU. var/floating = 0 var/nightvision = 0 diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm index 4cbf3dd91ce..4bcd234b9c0 100644 --- a/code/modules/mob/living/simple_animal/constructs.dm +++ b/code/modules/mob/living/simple_animal/constructs.dm @@ -27,7 +27,7 @@ name = text("[initial(name)] ([rand(1, 1000)])") real_name = name for(var/spell in construct_spells) - AddSpell(new spell(src)) + AddSpell(new spell(null)) updateglow() /mob/living/simple_animal/construct/death() diff --git a/code/modules/mob/living/simple_animal/hostile/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm index 1c7836c0a13..cb48c63b66f 100644 --- a/code/modules/mob/living/simple_animal/hostile/statue.dm +++ b/code/modules/mob/living/simple_animal/hostile/statue.dm @@ -52,9 +52,9 @@ /mob/living/simple_animal/hostile/statue/New(loc, var/mob/living/creator) ..() // Give spells - AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/flicker_lights(src)) - AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/blindness(src)) - AddSpell(new /obj/effect/proc_holder/spell/targeted/night_vision(src)) + AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/flicker_lights(null)) + AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/blindness(null)) + AddSpell(new /obj/effect/proc_holder/spell/targeted/night_vision(null)) // Give nightvision see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index f673fa5ab0d..76e5d03f4fd 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -6,6 +6,7 @@ hud_used = null if(mind && mind.current == src) spellremove(src) + mobspellremove(src) for(var/infection in viruses) qdel(infection) ghostize() @@ -158,8 +159,6 @@ /mob/proc/Life() // handle_typing_indicator() -// if(organStructure) -// organStructure.ProcessOrgans() return @@ -960,8 +959,8 @@ var/list/slot_equipment_priority = list( \ if(mind && mind.changeling) add_stings_to_statpanel(mind.changeling.purchasedpowers) - if(spell_list && spell_list.len) - for(var/obj/effect/proc_holder/spell/S in spell_list) + if(mob_spell_list && mob_spell_list.len) + for(var/obj/effect/proc_holder/spell/S in mob_spell_list) add_spell_to_statpanel(S) if(mind && istype(src, /mob/living) && mind.spell_list && mind.spell_list.len) for(var/obj/effect/proc_holder/spell/S in mind.spell_list) @@ -994,6 +993,7 @@ var/list/slot_equipment_priority = list( \ for(var/obj/effect/proc_holder/changeling/S in stings) if(S.chemical_cost >=0 && S.can_be_used_by(src)) statpanel("[S.panel]",((S.chemical_cost > 0) ? "[S.chemical_cost]" : ""),S) + /mob/proc/add_spell_to_statpanel(var/obj/effect/proc_holder/spell/S) switch(S.charge_type) if("recharge") @@ -1002,17 +1002,6 @@ var/list/slot_equipment_priority = list( \ statpanel(S.panel,"[S.charge_counter]/[S.charge_max]",S) if("holdervar") statpanel(S.panel,"[S.holder_var_type] [S.holder_var_amount]",S) - /* // Why have a duplicate set of turfs in the stat panel? - if(listed_turf) - if(get_dist(listed_turf,src) > 1) - listed_turf = null - else - statpanel(listed_turf.name,listed_turf.name,listed_turf) - for(var/atom/A in listed_turf) - if(A.invisibility > see_invisible) - continue - statpanel(listed_turf.name,A.name,A) - */ // facing verbs @@ -1366,9 +1355,17 @@ mob/proc/yank_out_object() /mob/proc/setEarDamage() return -/mob/proc/AddSpell(var/obj/effect/proc_holder/spell/spell) - spell_list += spell - spell.action.Grant(src) +/mob/proc/AddSpell(obj/effect/proc_holder/spell/S) + mob_spell_list += S + S.action.Grant(src) + +/mob/proc/RemoveSpell(obj/effect/proc_holder/spell/spell) //To remove a specific spell from a mind + if(!spell) + return + for(var/obj/effect/proc_holder/spell/S in mob_spell_list) + if(istype(S, spell)) + qdel(S) + mob_spell_list -= S //override to avoid rotating pixel_xy on mobs /mob/shuttleRotate(rotation) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index fca9a35212c..777ac70c109 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -2,15 +2,11 @@ density = 1 layer = 4.0 animate_movement = 2 -// flags = NOREACT pressure_resistance = 8 var/datum/mind/mind var/stat = 0 //Whether a mob is alive or dead. TODO: Move this to living - Nodrak - //Not in use yet - var/obj/effect/organstructure/organStructure = null - var/obj/screen/hands = null var/obj/screen/pullin = null var/obj/screen/i_select = null @@ -34,11 +30,9 @@ var/lastattacker = null var/lastattacked = null var/attack_log = list( ) - var/already_placed = 0.0 var/obj/machinery/machine = null var/other_mobs = null var/memory = "" - var/poll_answer = 0.0 var/sdisabilities = 0 //Carbon var/disabilities = 0 //Carbon var/atom/movable/pulling = null @@ -46,12 +40,12 @@ var/notransform = null //Carbon var/other = 0.0 var/hand = null - var/eye_blind = null //Carbon - var/eye_blurry = null //Carbon - var/ear_deaf = null //Carbon - var/ear_damage = null //Carbon - var/stuttering = null //Carbon - var/slurring = null //Carbon + var/eye_blind = 0 //Carbon + var/eye_blurry = 0 //Carbon + var/ear_deaf = 0 //Carbon + var/ear_damage = 0 //Carbon + var/stuttering = 0 //Carbon + var/slurring = 0 //Carbon var/real_name = null var/flavor_text = "" var/med_record = "" @@ -63,8 +57,6 @@ var/druggy = 0 //Carbon var/confused = 0 //Carbon var/drunk = 0 - var/antitoxs = null - var/plasma = null var/sleeping = 0 //Carbon var/resting = 0 //Carbon var/lying = 0 @@ -95,11 +87,11 @@ var/nutrition = 400.0//Carbon var/overeatduration = 0 // How long this guy is overeating //Carbon - var/paralysis = 0.0 - var/stunned = 0.0 - var/weakened = 0.0 + var/paralysis = 0 + var/stunned = 0 + var/weakened = 0 var/slowed = 0 - var/losebreath = 0.0//Carbon + var/losebreath = 0 //Carbon var/intent = null//Living var/shakecamera = 0 var/a_intent = I_HELP//Living @@ -123,8 +115,8 @@ var/research_scanner = 0 //For research scanner equipped mobs. Enable to show research data when examining. - var/list/grabbed_by = list( ) - var/list/requests = list( ) + var/list/grabbed_by = list() + var/list/requests = list() var/list/mapobjs = list() @@ -134,17 +126,10 @@ var/emote_cd = 0 // Used to supress emote spamming. 1 if on CD, 2 if disabled by admin (manually set), else 0 - var/music_lastplayed = "null" - var/job = null//Living - var/const/blindness = 1//Carbon - var/const/deafness = 2//Carbon - var/const/muteness = 4//Carbon - - var/datum/dna/dna = null//Carbon - var/radiation = 0.0//Carbon + var/radiation = 0 //Carbon var/list/mutations = list() //Carbon -- Doohl //see: setup.dm for list of mutations @@ -157,24 +142,24 @@ var/has_enabled_antagHUD = 0 var/antagHUD = 0 -//Generic list for proc holders. Only way I can see to enable certain verbs/procs. Should be modified if needed. - var/proc_holder_list[] = list()//Right now unused. - //Also unlike the spell list, this would only store the object in contents, not an object in itself. - /* Add this line to whatever stat module you need in order to use the proc holder list. +//Generic list for proc holders. Only way I can see to enable certain verbs/procs. Should be modified if needed. + var/proc_holder_list[] = list() + + /* //Also unlike the spell list, this would only store the object in contents, not an object in itself. + + Add this line to whatever stat module you need in order to use the proc holder list. Unlike the object spell system, it's also possible to attach verb procs from these objects to right-click menus. This requires creating a verb for the object proc holder. if(proc_holder_list.len)//Generic list for proc_holder objects. for(var/obj/effect/proc_holder/P in proc_holder_list) - statpanel("[P.panel]","",P) - */ + statpanel("[P.panel]","",P)*/ //The last mob/living/carbon to push/drag/grab this mob (mostly used by slimes friend recognition) var/mob/living/carbon/LAssailant = null -//Wizard mode, but can be used in other modes thanks to the brand new "Give Spell" badmin button - var/obj/effect/proc_holder/spell/list/spell_list = list() + var/list/mob_spell_list = list() //construct spells and mime spells. Spells that do not transfer from one mob to another and can not be lost in mindswap. //Changlings, but can be used in other modes // var/obj/effect/proc_holder/changpower/list/power_list = list() @@ -195,9 +180,6 @@ var/has_unlimited_silicon_privilege = 0 // Can they interact with station electronics - var/list/radar_blips = list() // list of screen objects, radar blips - var/radar_open = 0 // nonzero is radar is open - var/atom/movable/remote_control //Calls relaymove() to whatever it is var/remote_view = 0 // Set to 1 to prevent view resets on Life @@ -219,11 +201,11 @@ var/turf/listed_turf = null //the current turf being examined in the stat panel var/list/shouldnt_see = list(/atom/movable/lighting_overlay) //list of objects that this mob shouldn't see in the stat panel. this silliness is needed because of AI alt+click and cult blood runes - var/kills=0 + var/kills = 0 var/stance_damage = 0 //Whether this mob's ability to stand has been affected - var/list/active_genes=list() + var/list/active_genes = list() var/last_movement = -100 // Last world.time the mob actually moved of its own accord. diff --git a/code/modules/mob/spirit/mask/mask.dm b/code/modules/mob/spirit/mask/mask.dm index 03ba63dbe01..2b907ca7f5a 100644 --- a/code/modules/mob/spirit/mask/mask.dm +++ b/code/modules/mob/spirit/mask/mask.dm @@ -4,9 +4,9 @@ /mob/spirit/mask/New() ..() - AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/conjure/create_talisman(src)) - AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/blood_speech(src)) - AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/shatter_lights(src)) + AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/conjure/create_talisman(null)) + AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/blood_speech(null)) + AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/shatter_lights(null)) /mob/spirit/mask/verb/go_to_follower() diff --git a/code/modules/surgery/organs/pain.dm b/code/modules/surgery/organs/pain.dm index b2f6945b6f1..0bd2d138948 100644 --- a/code/modules/surgery/organs/pain.dm +++ b/code/modules/surgery/organs/pain.dm @@ -12,8 +12,6 @@ mob/living/carbon/proc/pain(var/partname, var/amount, var/force, var/burning = 0 return if(reagents.has_reagent("hydrocodone")) return - if(analgesic) - return if(world.time < next_pain_time && !force) return if(amount > 10 && istype(src,/mob/living/carbon/human)) @@ -55,8 +53,6 @@ mob/living/carbon/human/proc/custom_pain(var/message, var/flash_strength) return if(reagents.has_reagent("hydrocodone")) return - if(analgesic) - return var/msg = "\red [message]" if(flash_strength >= 1) msg = "\red [message]" @@ -94,8 +90,6 @@ mob/living/carbon/human/proc/handle_pain() return if(reagents.has_reagent("hydrocodone")) return - if(analgesic) - return var/maxdam = 0 var/obj/item/organ/external/damaged_organ = null for(var/obj/item/organ/external/E in organs) diff --git a/code/world.dm b/code/world.dm index e11070d8e79..6fa54acfbe7 100644 --- a/code/world.dm +++ b/code/world.dm @@ -282,31 +282,6 @@ var/world_topic_spam_protect_time = world.timeofday sleep_check = world.timeofday waiting++ //#undef INACTIVITY_KICK -/* -#define DISCONNECTED_DELETE 6000 //10 minutes in ticks (approx) -/world/proc/KickDisconnectedClients() - spawn(-1) - //set background = 1 - while(1) - sleep(DISCONNECTED_DELETE) - for(var/mob/living/carbon/human/C in living_mob_list) - if(dd_hasprefix(C.key,@)) return - if(!C.client && C.brain_op_stage!=4.0 && C.lastKnownIP) - sleep(600) - if(!C.client && C.stat != DEAD && C.brain_op_stage!=4.0) - job_master.FreeRole(C.job) - message_admins("[key_name_admin(C)], the [C.job] has been freed due to (Client disconnect for 10 minutes)\n") - for(var/obj/item/W in C) - C.unEquip(W) - del(C) - else if(!C.key && C.stat != DEAD && C.brain_op_stage!=4.0) - job_master.FreeRole(C.job) - message_admins("[key_name_admin(C)], the [C.job] has been freed due to (Client quit BYOND)\n") - for(var/obj/item/W in C) - C.unEquip(W) - del(C) -#undef INACTIVITY_KICK -*/ /hook/startup/proc/loadMode() world.load_mode()