mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-25 21:16:39 +01:00
Merge pull request #1991 from aztectornado/stack
Clicking a stack no longer transfers one sheet at a time.
This commit is contained in:
@@ -298,14 +298,16 @@
|
||||
|
||||
/obj/item/stack/attack_hand(mob/user as mob)
|
||||
if (user.get_inactive_hand() == src)
|
||||
var/obj/item/stack/F = src.split(1)
|
||||
if (F)
|
||||
user.put_in_hands(F)
|
||||
src.add_fingerprint(user)
|
||||
F.add_fingerprint(user)
|
||||
spawn(0)
|
||||
if (src && usr.machine==src)
|
||||
src.interact(usr)
|
||||
var/N = input("How many stacks of [src] would you like to split off?", "Split stacks", 1) as num|null
|
||||
if(N)
|
||||
var/obj/item/stack/F = src.split(N)
|
||||
if (F)
|
||||
user.put_in_hands(F)
|
||||
src.add_fingerprint(user)
|
||||
F.add_fingerprint(user)
|
||||
spawn(0)
|
||||
if (src && usr.machine==src)
|
||||
src.interact(usr)
|
||||
else
|
||||
..()
|
||||
return
|
||||
@@ -313,10 +315,7 @@
|
||||
/obj/item/stack/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/stack))
|
||||
var/obj/item/stack/S = W
|
||||
if (user.get_inactive_hand()==src)
|
||||
src.transfer_to(S, 1)
|
||||
else
|
||||
src.transfer_to(S)
|
||||
src.transfer_to(S)
|
||||
|
||||
spawn(0) //give the stacks a chance to delete themselves if necessary
|
||||
if (S && usr.machine==S)
|
||||
|
||||
Reference in New Issue
Block a user