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:
@@ -25,6 +25,14 @@
|
||||
armor = list("melee" = 30, "bullet" = 20, "laser" = 20, "energy" = 20, "bomb" = 50, "bio" = 100, "rad" = 50, "fire" = 50, "acid" = 50)
|
||||
resistance_flags = FIRE_PROOF
|
||||
|
||||
/obj/item/clothing/suit/hooded/explorer/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/armor_plate)
|
||||
|
||||
/obj/item/clothing/head/hooded/explorer/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/armor_plate)
|
||||
|
||||
/obj/item/clothing/mask/gas/explorer
|
||||
name = "explorer gas mask"
|
||||
desc = "A military-grade gas mask that can be connected to an air supply."
|
||||
|
||||
@@ -9,38 +9,4 @@
|
||||
novariants = FALSE
|
||||
flags_1 = NOBLUDGEON_1
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
layer = MOB_LAYER
|
||||
var/static/list/goliath_platable_armor_typecache = typecacheof(list(
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/mining,
|
||||
/obj/item/clothing/suit/space/hardsuit/mining,
|
||||
/obj/item/clothing/head/hooded/explorer,
|
||||
/obj/item/clothing/suit/hooded/explorer))
|
||||
|
||||
/obj/item/stack/sheet/animalhide/goliath_hide/afterattack(atom/target, mob/user, proximity_flag)
|
||||
if(!proximity_flag)
|
||||
return
|
||||
if(is_type_in_typecache(target, goliath_platable_armor_typecache))
|
||||
var/obj/item/clothing/C = target
|
||||
if(C.armor.melee < 60)
|
||||
C.armor = C.armor.setRating(melee = min(C.armor.melee + 10, 60))
|
||||
to_chat(user, "<span class='info'>You strengthen [target], improving its resistance against melee attacks.</span>")
|
||||
use(1)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't improve [C] any further!</span>")
|
||||
else if(istype(target, /obj/mecha/working/ripley))
|
||||
var/obj/mecha/working/ripley/D = target
|
||||
if(D.hides < 3)
|
||||
D.hides++
|
||||
D.armor = D.armor.setRating(\
|
||||
melee = min(D.armor.melee + 10, 70),\
|
||||
bullet = min(D.armor.bullet + 5, 50),\
|
||||
laser = min(D.armor.laser + 5, 50))
|
||||
to_chat(user, "<span class='info'>You strengthen [target], improving its resistance against melee attacks.</span>")
|
||||
D.update_icon()
|
||||
if(D.hides == 3)
|
||||
D.desc = "Autonomous Power Loader Unit. It's wearing a fearsome carapace entirely composed of goliath hide plates - its pilot must be an experienced monster hunter."
|
||||
else
|
||||
D.desc = "Autonomous Power Loader Unit. Its armour is enhanced with some goliath hide plates."
|
||||
use(1)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't improve [D] any further!</span>")
|
||||
layer = MOB_LAYER
|
||||
Reference in New Issue
Block a user