[MIRROR] Mouse drag & drop refactored attack chain (#28156)

* Mouse drag & drop refactored attack chain

* fex

---------

Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
This commit is contained in:
SkyratBot
2024-06-15 18:09:14 +01:00
committed by GitHub
co-authored by SyncIt21 Gandalf
parent 573ddb5f5f
commit df90e547cc
84 changed files with 377 additions and 343 deletions
@@ -5,6 +5,7 @@
icon_state = "implantchair"
density = TRUE
opacity = FALSE
interaction_flags_mouse_drop = NEED_DEXTERITY
var/ready = TRUE
var/replenishing = FALSE
@@ -142,17 +143,11 @@
message_cooldown = world.time + 50
to_chat(user, span_warning("[src]'s door won't budge!"))
/obj/machinery/implantchair/MouseDrop_T(mob/target, mob/user)
if(user.stat || !Adjacent(user) || !user.Adjacent(target) || !isliving(target) || !ISADVANCEDTOOLUSER(user))
/obj/machinery/implantchair/mouse_drop_receive(mob/target, mob/user, params)
if(!isliving(target))
return
if(isliving(user))
var/mob/living/L = user
if(L.body_position == LYING_DOWN)
return
close_machine(target)
/obj/machinery/implantchair/close_machine(mob/living/user, density_to_set = TRUE)
if((isnull(user) || istype(user)) && state_open)
..(user)