[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
+4 -4
View File
@@ -11,6 +11,8 @@
max_integrity = 300
obj_flags = BLOCKS_CONSTRUCTION
state_open = TRUE
interaction_flags_mouse_drop = NEED_HANDS | NEED_DEXTERITY
/// Whether we have an ongoing connection
var/connected = FALSE
/// A player selected outfit by clicking the netpod
@@ -93,12 +95,10 @@
return ..()
/obj/machinery/netpod/MouseDrop_T(mob/target, mob/user)
/obj/machinery/netpod/mouse_drop_receive(mob/target, mob/user, params)
var/mob/living/carbon/player = user
if(!iscarbon(player) || !Adjacent(player) || !ISADVANCEDTOOLUSER(player) || !is_operational || !state_open)
return
if(player.buckled || HAS_TRAIT(player, TRAIT_HANDS_BLOCKED))
if(!iscarbon(player) || !is_operational || !state_open || player.buckled)
return
close_machine(target)