mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
Cleans up Vars
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user