diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 93f82991fd..49848824e4 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -556,23 +556,18 @@ By design, d1 is the smallest direction and d2 is the highest new_cable.update_icon() /obj/item/stack/cable_coil/attack_self(mob/user) - if(!check_cable_amount(user)) + if(!use(15)) + to_chat(user, "You dont have enough cable coil to make restraints out of them") return to_chat(user, "You start making some cable restraints.") - if(do_after(user, 30, TRUE, user) && check_cable_amount(user)) - amount -= 15 - var/obj/item/restraints/handcuffs/cable/result = new(get_turf(user)) - user.put_in_hands(result) - result.color = color - to_chat(user, "You make some restraints out of cable") + if(!do_after(user, 30, TRUE, user, TRUE)) + to_chat(user, "You fail to make cable restraints, you need to stand still while doing so.") + give(15) return - to_chat(user, "You fail to make cable restraints, you need to stand still while doing so.") - -/obj/item/stack/cable_coil/proc/check_cable_amount(user) - if(amount < 15) //We dont care about cyborgs here, so we dont use get_amount() - to_chat(user, "You dont have enough cable coil to make restraints out of them") - return FALSE - return TRUE + var/obj/item/restraints/handcuffs/cable/result = new(get_turf(user)) + user.put_in_hands(result) + result.color = color + to_chat(user, "You make some restraints out of cable") //add cables to the stack /obj/item/stack/cable_coil/proc/give(extra) @@ -854,4 +849,4 @@ By design, d1 is the smallest direction and d2 is the highest . = ..() var/list/cable_colors = GLOB.cable_colors color = pick(cable_colors) - \ No newline at end of file +