mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
[MIRROR] Port tg statpanel (#9242)
Co-authored-by: ShadowLarkens <shadowlarkens@gmail.com> Co-authored-by: Kashargul <KashL@t-online.de>
This commit is contained in:
@@ -344,11 +344,11 @@
|
||||
|
||||
if(user.mind.special_verbs.len)
|
||||
for(var/V in user.mind.special_verbs)
|
||||
remove_verb(user,V) //CHOMPEdit
|
||||
remove_verb(user, V)
|
||||
|
||||
if(stored_swap.mind.special_verbs.len)
|
||||
for(var/V in stored_swap.mind.special_verbs)
|
||||
remove_verb(stored_swap,V) //CHOMPEdit
|
||||
remove_verb(stored_swap, V)
|
||||
|
||||
var/mob/observer/dead/ghost = stored_swap.ghostize(0)
|
||||
ghost.spell_list = stored_swap.spell_list
|
||||
@@ -358,7 +358,7 @@
|
||||
|
||||
if(stored_swap.mind.special_verbs.len)
|
||||
for(var/V in user.mind.special_verbs)
|
||||
add_verb(user,V) //CHOMPEdit
|
||||
add_verb(user, V)
|
||||
|
||||
ghost.mind.transfer_to(user)
|
||||
user.key = ghost.key
|
||||
@@ -366,7 +366,7 @@
|
||||
|
||||
if(user.mind.special_verbs.len)
|
||||
for(var/V in user.mind.special_verbs)
|
||||
add_verb(user,V) //CHOMPEdit
|
||||
add_verb(user, V)
|
||||
|
||||
to_chat(stored_swap, span_warning("You're suddenly somewhere else... and someone else?!"))
|
||||
to_chat(user, span_warning("Suddenly you're staring at [src] again... where are you, who are you?!"))
|
||||
|
||||
@@ -14,19 +14,20 @@
|
||||
spell_master.toggle_open(1)
|
||||
client.screen -= spell_master
|
||||
|
||||
/mob/Stat()
|
||||
. = ..()
|
||||
if(. && spell_list && spell_list.len)
|
||||
for(var/spell/S in spell_list)
|
||||
if((!S.connected_button) || !statpanel(S.panel))
|
||||
continue //Not showing the noclothes spell
|
||||
switch(S.charge_type)
|
||||
if(Sp_RECHARGE)
|
||||
statpanel(S.panel,"[S.charge_counter/10.0]/[S.charge_max/10]",S.connected_button)
|
||||
if(Sp_CHARGES)
|
||||
statpanel(S.panel,"[S.charge_counter]/[S.charge_max]",S.connected_button)
|
||||
if(Sp_HOLDVAR)
|
||||
statpanel(S.panel,"[S.holder_var_type] [S.holder_var_amount]",S.connected_button)
|
||||
// TODO: Investigate if this matters
|
||||
// /mob/Stat()
|
||||
// . = ..()
|
||||
// if(. && spell_list && spell_list.len)
|
||||
// for(var/spell/S in spell_list)
|
||||
// if((!S.connected_button) || !statpanel(S.panel))
|
||||
// continue //Not showing the noclothes spell
|
||||
// switch(S.charge_type)
|
||||
// if(Sp_RECHARGE)
|
||||
// statpanel(S.panel,"[S.charge_counter/10.0]/[S.charge_max/10]",S.connected_button)
|
||||
// if(Sp_CHARGES)
|
||||
// statpanel(S.panel,"[S.charge_counter]/[S.charge_max]",S.connected_button)
|
||||
// if(Sp_HOLDVAR)
|
||||
// statpanel(S.panel,"[S.holder_var_type] [S.holder_var_amount]",S.connected_button)
|
||||
|
||||
/hook/clone/proc/restore_spells(var/mob/H)
|
||||
if(H.mind && H.mind.learned_spells)
|
||||
|
||||
@@ -41,11 +41,11 @@
|
||||
//MIND TRANSFER BEGIN
|
||||
if(caster.mind.special_verbs.len)//If the caster had any special verbs, remove them from the mob verb list.
|
||||
for(var/V in caster.mind.special_verbs)//Since the caster is using an object spell system, this is mostly moot.
|
||||
remove_verb(caster,V) //But a safety nontheless. //CHOMPEdit
|
||||
remove_verb(caster, V)//But a safety nontheless.
|
||||
|
||||
if(victim.mind.special_verbs.len)//Now remove all of the victim's verbs.
|
||||
for(var/V in victim.mind.special_verbs)
|
||||
remove_verb(victim,V) //CHOMPEdit
|
||||
remove_verb(victim, V)
|
||||
|
||||
var/mob/observer/dead/ghost = victim.ghostize(0)
|
||||
ghost.spell_list += victim.spell_list//If they have spells, transfer them. Now we basically have a backup mob.
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
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.
|
||||
add_verb(caster,V) //CHOMPEdit
|
||||
add_verb(caster, V)
|
||||
|
||||
ghost.mind.transfer_to(caster)
|
||||
caster.key = ghost.key //have to transfer the key since the mind was not active
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
if(caster.mind.special_verbs.len)//If they had any special verbs, we add them here.
|
||||
for(var/V in caster.mind.special_verbs)
|
||||
add_verb(caster,V) //CHOMPEdit
|
||||
add_verb(caster, V)
|
||||
//MIND TRANSFER END
|
||||
|
||||
//Target is handled in ..(), so we handle the caster here
|
||||
|
||||
Reference in New Issue
Block a user