diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm index 7d828dbbfca..7f64c29a545 100644 --- a/code/__DEFINES/dcs/signals.dm +++ b/code/__DEFINES/dcs/signals.dm @@ -607,6 +607,8 @@ #define COMPONENT_HANDLED_GRILLING (1<<0) ///Called when an object is turned into another item through grilling ontop of a griddle #define COMSIG_GRILL_COMPLETED "item_grill_completed" +///Called when an armor plate is successfully applied to an object +#define COMSIG_ARMOR_PLATED "armor_plated" ///from base of [/obj/item/proc/tool_check_callback]: (mob/living/user) #define COMSIG_TOOL_IN_USE "tool_in_use" diff --git a/code/datums/components/armor_plate.dm b/code/datums/components/armor_plate.dm index 88887dc80df..16d16ab83aa 100644 --- a/code/datums/components/armor_plate.dm +++ b/code/datums/components/armor_plate.dm @@ -75,6 +75,7 @@ R.update_icon() to_chat(user, "You strengthen [R], improving its resistance against melee, bullet and laser damage.") else + SEND_SIGNAL(O, COMSIG_ARMOR_PLATED, amount, maxamount) to_chat(user, "You strengthen [O], improving its resistance against melee attacks.") diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index 4357cb1fa8c..6f2eb47f2c8 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -285,12 +285,28 @@ /obj/item/clothing/head/helmet/space/hardsuit/mining/Initialize() . = ..() AddComponent(/datum/component/armor_plate) + RegisterSignal(src, COMSIG_ARMOR_PLATED, .proc/upgrade_icon) + +/obj/item/clothing/head/helmet/space/hardsuit/mining/proc/upgrade_icon(datum/source, amount, maxamount) + SIGNAL_HANDLER + + if(amount) + name = "reinforced [initial(name)]" + hardsuit_type = "mining_goliath" + if(amount == maxamount) + hardsuit_type = "mining_goliath_full" + icon_state = "hardsuit[on]-[hardsuit_type]" + if(ishuman(loc)) + var/mob/living/carbon/human/wearer = loc + if(wearer.head == src) + wearer.update_inv_head() /obj/item/clothing/suit/space/hardsuit/mining name = "mining hardsuit" desc = "A special suit that protects against hazardous, low pressure environments. Has reinforced plating for wildlife encounters." icon_state = "hardsuit-mining" inhand_icon_state = "mining_hardsuit" + hardsuit_type = "mining" max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT resistance_flags = FIRE_PROOF armor = list(MELEE = 30, BULLET = 5, LASER = 10, ENERGY = 20, BOMB = 50, BIO = 100, RAD = 50, FIRE = 50, ACID = 75, WOUND = 15) @@ -301,6 +317,21 @@ /obj/item/clothing/suit/space/hardsuit/mining/Initialize() . = ..() AddComponent(/datum/component/armor_plate) + RegisterSignal(src, COMSIG_ARMOR_PLATED, .proc/upgrade_icon) + +/obj/item/clothing/suit/space/hardsuit/mining/proc/upgrade_icon(datum/source, amount, maxamount) + SIGNAL_HANDLER + + if(amount) + name = "reinforced [initial(name)]" + hardsuit_type = "mining_goliath" + if(amount == maxamount) + hardsuit_type = "mining_goliath_full" + icon_state = "hardsuit-[hardsuit_type]" + if(ishuman(loc)) + var/mob/living/carbon/human/wearer = loc + if(wearer.wear_suit == src) + wearer.update_inv_wear_suit() //Syndicate hardsuit /obj/item/clothing/head/helmet/space/hardsuit/syndi diff --git a/icons/mob/clothing/head.dmi b/icons/mob/clothing/head.dmi index ac42c9d72b6..195777dbb0a 100644 Binary files a/icons/mob/clothing/head.dmi and b/icons/mob/clothing/head.dmi differ diff --git a/icons/mob/clothing/suit.dmi b/icons/mob/clothing/suit.dmi index 27e1cdd6681..f82060afaf4 100644 Binary files a/icons/mob/clothing/suit.dmi and b/icons/mob/clothing/suit.dmi differ diff --git a/icons/obj/clothing/hats.dmi b/icons/obj/clothing/hats.dmi index 36a7b7b87a9..9c7f0af0449 100644 Binary files a/icons/obj/clothing/hats.dmi and b/icons/obj/clothing/hats.dmi differ diff --git a/icons/obj/clothing/suits.dmi b/icons/obj/clothing/suits.dmi index c81a9436de6..a89e030f9f5 100644 Binary files a/icons/obj/clothing/suits.dmi and b/icons/obj/clothing/suits.dmi differ