diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index f4a38b2fbc..71fe285180 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -556,27 +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)) - return - to_chat(user, "You start making some cable restraints.") - 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.") - return - if(!check_cable_amount()) - return - if(!use(15)) - to_chat(user, "You need at least 15 lengths of cable! - 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(!use(15)) + to_chat(user, "You dont have enough cable coil to make restraints out of them") + to_chat(user, "You start making some cable restraints.") + 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 + 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") -/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 //add cables to the stack /obj/item/stack/cable_coil/proc/give(extra)