mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 15:37:36 +01:00
Fixes inaccuracy in changeling chemical storage UI element. (#21583)
* Fixes error in changeling chemical storage UI element. * Fixed argument path.
This commit is contained in:
@@ -69,6 +69,7 @@
|
||||
|
||||
/datum/action/changeling/proc/take_chemical_cost()
|
||||
cling.chem_charges -= chemical_cost
|
||||
cling.update_chem_charges_ui()
|
||||
|
||||
/datum/action/changeling/proc/can_sting(mob/user, mob/target)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
|
||||
@@ -183,15 +183,18 @@
|
||||
if(!owner || !owner.current)
|
||||
return PROCESS_KILL
|
||||
var/mob/living/carbon/human/H = owner.current
|
||||
if(H.hud_used?.lingchemdisplay)
|
||||
H.hud_used.lingchemdisplay.invisibility = 0
|
||||
H.hud_used.lingchemdisplay.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font face='Small Fonts' color='#dd66dd'>[round(chem_charges)]</font></div>"
|
||||
if(H.stat == DEAD)
|
||||
chem_charges = clamp(0, chem_charges + chem_recharge_rate - chem_recharge_slowdown, chem_storage * 0.5)
|
||||
genetic_damage = directional_bounded_sum(genetic_damage, -1, LING_DEAD_GENETIC_DAMAGE_HEAL_CAP, 0)
|
||||
else // Not dead? no chem/genetic_damage caps.
|
||||
chem_charges = clamp(0, chem_charges + chem_recharge_rate - chem_recharge_slowdown, chem_storage)
|
||||
genetic_damage = max(0, genetic_damage - 1)
|
||||
update_chem_charges_ui(H)
|
||||
|
||||
/datum/antagonist/changeling/proc/update_chem_charges_ui(mob/living/carbon/human/H = owner.current)
|
||||
if(H.hud_used?.lingchemdisplay)
|
||||
H.hud_used.lingchemdisplay.invisibility = 0
|
||||
H.hud_used.lingchemdisplay.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font face='Small Fonts' color='#dd66dd'>[round(chem_charges)]</font></div>"
|
||||
|
||||
/**
|
||||
* Respec the changeling's powers after first checking if they're able to respec.
|
||||
|
||||
Reference in New Issue
Block a user