Alien Cable Coil Fix (#5365)

* Prevents the infinite cable coil alien tool from making more infinite cable coil tools.

* Prevents you from going over the 30 cap.

* Tochat
This commit is contained in:
Cameron653
2018-06-21 03:26:02 -04:00
committed by VirgoBot
parent 65ddf25028
commit ef2c62c63a
+22 -1
View File
@@ -939,4 +939,25 @@ obj/structure/cable/proc/cableColor(var/colorC)
if(get_dist(src, user) <= 1)
msg += " It doesn't seem to have a beginning, or an end."
to_chat(user, msg)
to_chat(user, msg)
/obj/item/stack/cable_coil/alien/attack_hand(mob/user as mob)
if (user.get_inactive_hand() == src)
var/N = input("How many units of wire do you want to take from [src]? You can only take up to [amount] at a time.", "Split stacks", 1) as num|null
if(N && N <= amount)
var/obj/item/stack/cable_coil/CC = new/obj/item/stack/cable_coil(user.loc)
CC.amount = N
CC.update_icon()
to_chat(user,"<font color='blue'>You take [N] units of wire from the [src].</font>")
if (CC)
user.put_in_hands(CC)
src.add_fingerprint(user)
CC.add_fingerprint(user)
spawn(0)
if (src && usr.machine==src)
src.interact(usr)
else
return
else
..()
return