[MIRROR] moves obj_integrity and associated procs to the atom level (#8016)

* moves obj_integrity and associated procs to the atom level

* Feex good

* Whoops forgot the maps

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
This commit is contained in:
SkyratBot
2021-09-10 16:47:01 +01:00
committed by GitHub
co-authored by Kylerace GoldenAlpharex Gandalf
parent 8e1298c21f
commit 04302a770a
136 changed files with 32295 additions and 32228 deletions
+5 -5
View File
@@ -42,13 +42,13 @@
if(iscyborg(user) || I.tool_behaviour == TOOL_MULTITOOL)
toggle_lock(user)
else if(I.tool_behaviour == TOOL_WELDER && !user.combat_mode && !broken)
if(obj_integrity < max_integrity)
if(atom_integrity < max_integrity)
if(!I.tool_start_check(user, amount=2))
return
to_chat(user, span_notice("You begin repairing [src]."))
if(I.use_tool(src, user, 40, volume=50, amount=2))
obj_integrity = max_integrity
atom_integrity = max_integrity
update_appearance()
to_chat(user, span_notice("You repair [src]."))
else
@@ -62,7 +62,7 @@
to_chat(user, span_notice("You start fixing [src]..."))
if(do_after(user, 20, target = src) && G.use(2))
broken = FALSE
obj_integrity = max_integrity
atom_integrity = max_integrity
update_appearance()
else if(open || broken)
if(istype(I, /obj/item/fireaxe) && !fireaxe)
@@ -98,7 +98,7 @@
if(.)
update_appearance()
/obj/structure/fireaxecabinet/obj_break(damage_flag)
/obj/structure/fireaxecabinet/atom_break(damage_flag)
. = ..()
if(!broken && !(flags_1 & NODECONSTRUCT_1))
update_appearance()
@@ -165,7 +165,7 @@
if(open)
. += "glass_raised"
return
var/hp_percent = obj_integrity/max_integrity * 100
var/hp_percent = atom_integrity/max_integrity * 100
if(broken)
. += "glass4"
else