mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 15:45:25 +01:00
Adds animations for picking up and placing items. (#18702)
* Add initial support for telegraphing item pickups * Add interaction to lockers * Undo some extraneous changes * Make pickpocket gloves not show any animation on pickup
This commit is contained in:
@@ -191,6 +191,7 @@
|
||||
to_chat(user, "<span class='notice'>\The [W] is stuck to your hand, you cannot put it in \the [src]!</span>")
|
||||
return
|
||||
if(W)
|
||||
W.do_drop_animation(user)
|
||||
W.forceMove(loc)
|
||||
return TRUE // It's resolved. No afterattack needed. Stops you from emagging lockers when putting in an emag
|
||||
else if(can_be_emaged && (istype(W, /obj/item/card/emag) || istype(W, /obj/item/melee/energy/blade) && !broken))
|
||||
|
||||
@@ -92,10 +92,6 @@
|
||||
new /obj/structure/table/wood(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table/do_climb(mob/living/user)
|
||||
. = ..()
|
||||
item_placed(user)
|
||||
|
||||
/obj/structure/table/attack_hand(mob/living/user)
|
||||
..()
|
||||
if(climber)
|
||||
@@ -111,8 +107,11 @@
|
||||
/obj/structure/table/attack_tk() // no telehulk sorry
|
||||
return
|
||||
|
||||
/obj/structure/table/proc/item_placed(item)
|
||||
return
|
||||
/**
|
||||
* Called when an item in particular is placed onto a table.
|
||||
*/
|
||||
/obj/structure/table/proc/item_placed(obj/item/I, mob/previous_holder)
|
||||
I.do_drop_animation(get_turf(previous_holder))
|
||||
|
||||
/obj/structure/table/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height == 0)
|
||||
@@ -206,7 +205,6 @@
|
||||
return FALSE
|
||||
G.affecting.forceMove(get_turf(src))
|
||||
G.affecting.Weaken(4 SECONDS)
|
||||
item_placed(G.affecting)
|
||||
G.affecting.visible_message("<span class='danger'>[G.assailant] pushes [G.affecting] onto [src].</span>", \
|
||||
"<span class='userdanger'>[G.assailant] pushes [G.affecting] onto [src].</span>")
|
||||
add_attack_logs(G.assailant, G.affecting, "Pushed onto a table")
|
||||
@@ -232,7 +230,7 @@
|
||||
//Clamp it so that the icon never moves more than 16 pixels in either direction (thus leaving the table turf)
|
||||
I.pixel_x = clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
I.pixel_y = clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
item_placed(I)
|
||||
item_placed(I, user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -705,7 +703,7 @@
|
||||
continue
|
||||
held.forceMove(NewLoc)
|
||||
|
||||
/obj/structure/table/tray/item_placed(atom/movable/item)
|
||||
/obj/structure/table/tray/item_placed(atom/movable/item, mob/previous_holder)
|
||||
. = ..()
|
||||
if(is_type_in_typecache(item, typecache_can_hold))
|
||||
held_items += item.UID()
|
||||
@@ -779,6 +777,7 @@
|
||||
if(!(W.flags & ABSTRACT))
|
||||
if(user.drop_item())
|
||||
W.Move(loc)
|
||||
W.do_drop_animation(user)
|
||||
return
|
||||
|
||||
/obj/structure/rack/wrench_act(mob/user, obj/item/I)
|
||||
|
||||
Reference in New Issue
Block a user