Componentized for sanity.

This commit is contained in:
Ghommie
2020-04-21 19:51:44 +02:00
parent 9c8f6cd00f
commit 824904844c
5 changed files with 196 additions and 215 deletions
+1 -1
View File
@@ -761,7 +761,7 @@
/obj/item/clothing/suit/space/hardsuit/shielded/ComponentInitialize()
. = ..()
AddElement(/datum/element/shielded, current_charges, max_charges, recharge_delay, recharge_rate, ITEM_SLOT_OCLOTHING, shield_state)
AddComponent(/datum/component/shielded, current_charges, max_charges, recharge_delay, recharge_rate, ITEM_SLOT_OCLOTHING, shield_state)
/obj/item/clothing/head/helmet/space/hardsuit/shielded
resistance_flags = FIRE_PROOF | ACID_PROOF
+3 -3
View File
@@ -238,7 +238,7 @@
if(!istype(W))
to_chat(user, "<span class='warning'>The rune can only be used on battlemage armour!</span>")
return
var/datum/element/shielded/S = SSdcs.GetElement(list(/datum/element/shielded, 0, W.max_charges, W.recharge_delay, W.recharge_rate, ITEM_SLOT_OCLOTHING, W.shield_state))
S.recharge(W, 8, forced = TRUE)
to_chat(user, "<span class='notice'>You charge \the [W]. It can now absorb [S.charges_per_atom[W]] hits.</span>")
var/datum/component/shielded/S = GetComponent(/datum/component/shielded)
S.adjust_charges(8)
to_chat(user, "<span class='notice'>You charge \the [W]. It can now absorb [S.charges] hits.</span>")
qdel(src)