diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm index 3ab70126e3..66912fa787 100644 --- a/code/__DEFINES/dcs/signals.dm +++ b/code/__DEFINES/dcs/signals.dm @@ -437,8 +437,9 @@ #define COMPONENT_BLOCK_SHARPEN_BLOCKED 2 #define COMPONENT_BLOCK_SHARPEN_ALREADY 4 #define COMPONENT_BLOCK_SHARPEN_MAXED 8 -#define COMSIG_ITEM_MICROWAVE_ACT "microwave_act" //called on item when microwaved (): (obj/machinery/microwave/M) +#define COMSIG_ITEM_MICROWAVE_ACT "microwave_act" //called on item when microwaved (): (obj/machinery/microwave/M) #define COMSIG_ITEM_WORN_OVERLAYS "item_worn_overlays" //from base of obj/item/worn_overlays(): (isinhands, icon_file, used_state, style_flags, list/overlays) +#define COMSIG_ARMOR_PLATED "armor_plated" //called when an armor plate is successfully applied to an object // THE FOLLOWING TWO BLOCKS SHOULD RETURN BLOCK FLAGS AS DEFINED IN __DEFINES/combat.dm! #define COMSIG_ITEM_CHECK_BLOCK "check_block" //from base of obj/item/check_block(): (mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return) #define COMSIG_ITEM_RUN_BLOCK "run_block" //from base of obj/item/run_block(): (mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return) diff --git a/code/datums/components/armor_plate.dm b/code/datums/components/armor_plate.dm index f026c89c60..763aef6a70 100644 --- a/code/datums/components/armor_plate.dm +++ b/code/datums/components/armor_plate.dm @@ -71,6 +71,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 4af9e7387d..cd48a81350 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -237,12 +237,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 icon_state = "hardsuit-mining" name = "mining hardsuit" desc = "A special suit that protects against hazardous, low pressure environments. Has reinforced plating for wildlife encounters." item_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" = 5, "bomb" = 50, "bio" = 100, "rad" = 50, "fire" = 50, "acid" = 75, "wound" = 15) @@ -254,6 +270,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 51675c8d7d..295052695d 100644 Binary files a/icons/mob/clothing/head.dmi and b/icons/mob/clothing/head.dmi differ diff --git a/icons/mob/clothing/head_muzzled.dmi b/icons/mob/clothing/head_muzzled.dmi index e99f1ff6d4..f8b194ad24 100644 Binary files a/icons/mob/clothing/head_muzzled.dmi and b/icons/mob/clothing/head_muzzled.dmi differ diff --git a/icons/mob/clothing/suit.dmi b/icons/mob/clothing/suit.dmi index 39ad5337a7..5699bd871f 100644 Binary files a/icons/mob/clothing/suit.dmi and b/icons/mob/clothing/suit.dmi differ diff --git a/icons/mob/clothing/suit_digi.dmi b/icons/mob/clothing/suit_digi.dmi index f80cb4a426..9014ec2701 100644 Binary files a/icons/mob/clothing/suit_digi.dmi and b/icons/mob/clothing/suit_digi.dmi differ diff --git a/icons/obj/clothing/hats.dmi b/icons/obj/clothing/hats.dmi index 854928f2ca..364ad501dd 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 f689ee5068..790defa0c0 100644 Binary files a/icons/obj/clothing/suits.dmi and b/icons/obj/clothing/suits.dmi differ