[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:
CHOMPStation2
2024-10-17 14:29:59 -07:00
committed by GitHub
parent e68994c99d
commit 4d9879937f
207 changed files with 709 additions and 956 deletions

View File

@@ -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?!"))

View File

@@ -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)

View File

@@ -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