mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2026-08-24 14:47:16 +01:00
KILLS STATPANEL (#4877)
Co-authored-by: VM_USER <VM_USER> Co-authored-by: silicons <no@you.cat>
This commit is contained in:
co-authored by
VM_USER <VM_USER>
silicons
parent
55da42c20a
commit
fb429e51a4
@@ -346,11 +346,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
|
||||
@@ -360,7 +360,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
|
||||
@@ -368,7 +368,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 class='warning'>You're suddenly somewhere else... and someone else?!</span>")
|
||||
to_chat(user, "<span class='warning'>Suddenly you're staring at [src] again... where are you, who are you?!</span>")
|
||||
|
||||
@@ -8,19 +8,43 @@
|
||||
spell_master.toggle_open(1)
|
||||
client.screen -= spell_master
|
||||
|
||||
/mob/Stat()
|
||||
/mob/statpanel_data(client/C)
|
||||
. = ..()
|
||||
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)
|
||||
//! WARNING
|
||||
//! NO, SERIOUSLY, READ THIS
|
||||
// DO NOT COPY PASTE THE FOLLOWING CODE.
|
||||
// THIS IS ALREADY SNOWFLAKED CODE; YOU *WILL* BREAK EVERYTHING IF YOU DO BY OVERWRITING DATA!!
|
||||
|
||||
// i'm going to trust people aren't stupid and won't put the name of a regular panel in spells.
|
||||
if(!length(spell_list))
|
||||
if(C.statpanel_spell_last)
|
||||
// dispose
|
||||
for(var/tab in C.statpanel_spell_last)
|
||||
C.statpanel_tab(tab, FALSE)
|
||||
C.statpanel_spell_last = null
|
||||
return
|
||||
LAZYINITLIST(C.statpanel_spell_last)
|
||||
var/list/collected = list()
|
||||
for(var/spell/S in spell_list)
|
||||
if(!S.panel || !S.connected_button)
|
||||
continue
|
||||
collected[S.panel] = TRUE
|
||||
if(!C.statpanel_tab(S.panel))
|
||||
continue
|
||||
switch(S.charge_type)
|
||||
if(Sp_RECHARGE)
|
||||
STATPANEL_DATA_CLICK("[S.charge_counter/10.0]/[S.charge_max/10]", "[S.connected_button]", "\ref[S.connected_button]")
|
||||
if(Sp_CHARGES)
|
||||
STATPANEL_DATA_CLICK("[S.charge_counter]/[S.charge_max]", "[S.connected_button]", "\ref[S.connected_button]")
|
||||
if(Sp_HOLDVAR)
|
||||
STATPANEL_DATA_CLICK("[S.holder_var_type] [S.holder_var_amount]", "[S.connected_button]", "\ref[S.connected_button]")
|
||||
// process tabs
|
||||
var/list/removing = C.statpanel_spell_last - collected
|
||||
var/list/adding = collected - C.statpanel_spell_last
|
||||
for(var/tab in adding)
|
||||
C.statpanel_tab(adding, TRUE)
|
||||
for(var/tab in removing)
|
||||
C.statpanel_tab(removing, TRUE)
|
||||
|
||||
/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
|
||||
|
||||
Reference in New Issue
Block a user