mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Merge pull request #11499 from VOREStation/upstream-merge-8233
[MIRROR] Ports sliding things along tables
This commit is contained in:
committed by
Chompstation Bot
parent
145f8172f4
commit
99d4db145d
@@ -60,14 +60,30 @@
|
||||
return 1
|
||||
return 1
|
||||
|
||||
/obj/structure/table/MouseDrop_T(obj/O as obj, mob/user as mob)
|
||||
/obj/structure/table/MouseDrop_T(obj/O, mob/user, src_location, over_location, src_control, over_control, params)
|
||||
if(ismob(O.loc)) //If placing an item
|
||||
if(!isitem(O) || user.get_active_hand() != O)
|
||||
return ..()
|
||||
if(isrobot(user))
|
||||
return
|
||||
user.drop_item()
|
||||
if(O.loc != src.loc)
|
||||
step(O, get_dir(O, src))
|
||||
|
||||
if ((!( istype(O, /obj/item/weapon) ) || user.get_active_hand() != O))
|
||||
return ..()
|
||||
if(isrobot(user))
|
||||
return
|
||||
user.unEquip(O, 0, src.loc)
|
||||
return
|
||||
else if(isturf(O.loc) && isitem(O)) //If pushing an item on the tabletop
|
||||
var/obj/item/I = O
|
||||
if(I.anchored)
|
||||
return
|
||||
|
||||
if((isliving(user)) && (Adjacent(user)) && !(user.incapacitated()))
|
||||
if(O.w_class <= user.can_pull_size)
|
||||
O.forceMove(loc)
|
||||
auto_align(I, params, TRUE)
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("\The [I] is too big for you to move!"))
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/table/attackby(obj/item/W as obj, mob/user as mob, var/hit_modifier, var/click_parameters)
|
||||
|
||||
Reference in New Issue
Block a user