Port tg statpanel (#16463)

* Port tg statpanel

* Add verb descriptions using the title attribute

* Fix a dreamchecker error

* Remove chomp edits

* Add mentor tickets to ticket panel

---------

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
ShadowLarkens
2024-10-16 19:39:06 +02:00
committed by GitHub
co-authored by Kashargul
parent ed5fc193f7
commit c07027136e
211 changed files with 3233 additions and 1170 deletions
+4 -4
View File
@@ -344,11 +344,11 @@
if(user.mind.special_verbs.len)
for(var/V in user.mind.special_verbs)
user.verbs -= V
remove_verb(user, V)
if(stored_swap.mind.special_verbs.len)
for(var/V in stored_swap.mind.special_verbs)
stored_swap.verbs -= V
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)
user.verbs += V
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)
user.verbs += V
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 -13
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)
@@ -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.
caster.verbs -= V//But a safety nontheless.
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)
victim.verbs -= V
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.
caster.verbs += V
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)
caster.verbs += V
add_verb(caster, V)
//MIND TRANSFER END
//Target is handled in ..(), so we handle the caster here