Merge pull request #5889 from CHOMPStation2/upstream-merge-14630

[MIRROR] NIF damage minitweak
This commit is contained in:
Nadyr
2023-03-09 22:17:24 -05:00
committed by GitHub

View File

@@ -203,6 +203,7 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable
persist_nif_data(human)
if(durability <= 0)
durability = 0 //failsafe us to a minimum of 0% so we don't just wash into massively negative durability from repeated EMPs
stat = NIF_TEMPFAIL
update_icon()
@@ -230,6 +231,11 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable
if(C.get_amount() < 3)
to_chat(user,"<span class='warning'>You need at least three coils of wire to add them to \the [src].</span>")
return
if(durability >= initial(durability))
to_chat(user,"<span class='notice'>There's no damaged wiring that needs replacing!</span>")
open = 3
update_icon()
return
if(do_after(user, 6 SECONDS, src) && open == 1 && C.use(3))
user.visible_message("[user] replaces some wiring in \the [src].","<span class='notice'>You replace any burned out wiring in \the [src].</span>")
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)