Replaces adding goliath plates to clothing and APLUs with a customizable tracking component (#37525)

add: Amount of goliath plates is now shown in examine for explorer suits and mining hardsuits.


I was peeved by being unable to tell whether the armour is upgraded or not except by trying to stick more plates on it.

I think a more correct way would be to add a plate amount var to these items similarly to APLU plating and then have description mention their amount and, for added transparency, that it's possible to improve it if there's 0 plates.

Please point the errors/wrongs in it, since "current armour value minus constant divided by value each plate adds" is rather clunky code.
This commit is contained in:
Barhandar
2018-05-14 02:55:31 +03:00
committed by letterjay
parent e089a8254f
commit bcd2b0a3b0
6 changed files with 105 additions and 40 deletions
+7 -4
View File
@@ -31,8 +31,6 @@
ore.forceMove(ore_box)
/obj/mecha/working/ripley/Destroy()
for(var/i=1, i <= hides, i++)
new /obj/item/stack/sheet/animalhide/goliath_hide(loc) //If a goliath-plated ripley gets killed, all the plates drop
for(var/atom/movable/A in cargo)
A.forceMove(drop_location())
step_rand(A)
@@ -49,13 +47,18 @@
/obj/mecha/working/ripley/update_icon()
..()
if (hides)
GET_COMPONENT(C,/datum/component/armor_plate)
if (C.amount)
cut_overlays()
if(hides < 3)
if(C.amount < 3)
add_overlay(occupant ? "ripley-g" : "ripley-g-open")
else
add_overlay(occupant ? "ripley-g-full" : "ripley-g-full-open")
/obj/mecha/working/ripley/Initialize()
. = ..()
AddComponent(/datum/component/armor_plate,3,/obj/item/stack/sheet/animalhide/goliath_hide,list("melee" = 10, "bullet" = 5, "laser" = 5))
/obj/mecha/working/ripley/firefighter
desc = "Autonomous Power Loader Unit. This model is refitted with additional thermal protection."