mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 05:23:22 +01:00
Build mode drag-and-build functionality (#8936)
This commit is contained in:
@@ -734,3 +734,20 @@
|
||||
sleep(1)
|
||||
else
|
||||
stoplag(5)
|
||||
|
||||
/client/MouseDrag(src_object, over_object, src_location, over_location, src_control, over_control, params)
|
||||
. = ..()
|
||||
|
||||
if(over_object)
|
||||
var/mob/living/M = mob
|
||||
if(istype(get_turf(over_object), /atom))
|
||||
var/atom/A = get_turf(over_object)
|
||||
if(src && src.buildmode)
|
||||
build_click(M, src.buildmode, params, A)
|
||||
return
|
||||
|
||||
if(istype(M) && !M.incapacitated())
|
||||
var/obj/item/gun/gun = mob.get_active_hand()
|
||||
if(istype(gun) && gun.can_autofire())
|
||||
M.set_dir(get_dir(M, over_object))
|
||||
gun.Fire(get_turf(over_object), mob, params, (get_dist(over_object, mob) <= 1), FALSE)
|
||||
Reference in New Issue
Block a user