Skip to content

Commit

Permalink
armor thickness now degrades
Browse files Browse the repository at this point in the history
  • Loading branch information
X0-11 committed Jun 8, 2024
1 parent 04290ca commit 53879a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion code/modules/halo/clothing/armor_repair/clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
damage /= 10
var/thickness_dam_cap = ARMOUR_THICKNESS_DAMAGE_CAP

var/new_thickness = round(armor_thickness - min(damage,thickness_dam_cap))
var/new_thickness = armor_thickness - min(damage,thickness_dam_cap)
new_thickness = max(0, new_thickness)

var/mob/user = src.loc
Expand All @@ -29,6 +29,8 @@
else if(istype(user))
to_chat(user, "<span class = 'warning'>Your [name]'s armor plating is [damage_type == BURN ? "scorched" : "damaged"]! </span>")
next_warning_time = world.time + WARNING_DELAY
armor_thickness = new_thickness
update_damage_description()

/obj/item/clothing/proc/update_damage_description(var/damage_type = BRUTE)
var/desc_addition_to_apply = "Its armor plating is nominal."
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1219,4 +1219,4 @@
var/obj/item/clothing/c = i
if(istype(c))
if(c.armor_thickness < c.armor_thickness_max)
c.armor_thickness = min(c.armor_thickness + 0.1,c.armor_thickness_max)
c.armor_thickness = min(c.armor_thickness + 0.05,c.armor_thickness_max)

0 comments on commit 53879a5

Please sign in to comment.