Airlock Hammer Fix (#12769)

This commit is contained in:
Geeves
2021-11-18 20:08:50 +01:00
committed by GitHub
parent 99719f5236
commit 89f5c96869
2 changed files with 8 additions and 3 deletions
+2 -3
View File
@@ -300,8 +300,8 @@
src.add_fingerprint(user)
if(I.ishammer() && user.a_intent != I_HURT)
var/obj/item/W = usr.get_inactive_hand()
if(W && istype(W, /obj/item/stack) && W.get_material_name() == src.get_material_name())
var/obj/item/stack/stack = usr.get_inactive_hand()
if(istype(stack) && stack.get_material_name() == get_material_name())
if(stat & BROKEN)
to_chat(user, SPAN_NOTICE("It looks like \the [src] is pretty busted. It's going to need more than just patching up now."))
return
@@ -316,7 +316,6 @@
var/amount_needed = (maxhealth - health) / DOOR_REPAIR_AMOUNT
amount_needed = (round(amount_needed) == amount_needed)? amount_needed : round(amount_needed) + 1 //Why does BYOND not have a ceiling proc?
var/obj/item/stack/stack = I
var/transfer
if (repairing)
transfer = stack.transfer_to(repairing, amount_needed - repairing.amount)
@@ -0,0 +1,6 @@
author: Geeves
delete-after: True
changes:
- bugfix: "Hammers can now properly repair airlocks."