mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Merge pull request #2526 from CHOMPStationBot/upstream-merge-11043
[MIRROR] Make UAVs not work at impossible distances
This commit is contained in:
@@ -378,6 +378,7 @@
|
||||
|
||||
/atom/movable/proc/onTransitZ(old_z,new_z)
|
||||
GLOB.z_moved_event.raise_event(src, old_z, new_z)
|
||||
SEND_SIGNAL(src, COMSIG_MOVABLE_Z_CHANGED, old_z, new_z)
|
||||
for(var/item in src) // Notify contents of Z-transition. This can be overridden IF we know the items contents do not care.
|
||||
var/atom/movable/AM = item
|
||||
AM.onTransitZ(old_z,new_z)
|
||||
|
||||
@@ -97,8 +97,10 @@
|
||||
return
|
||||
// Can disasemble or reassemble from packed or off (and this one takes time)
|
||||
if("(Dis)Assemble")
|
||||
if(can_transition_to(state == UAV_PACKED ? UAV_OFF : UAV_PACKED, user) && do_after(user, 10 SECONDS, src))
|
||||
return toggle_packed(user)
|
||||
if(can_transition_to(state == UAV_PACKED ? UAV_OFF : UAV_PACKED, user))
|
||||
user.visible_message("<b>[user]</b> starts [state == UAV_PACKED ? "unpacking" : "packing"] [src].", "You start [state == UAV_PACKED ? "unpacking" : "packing"] [src].")
|
||||
if(do_after(user, 10 SECONDS, src))
|
||||
return toggle_packed(user)
|
||||
// Can toggle power from on and off
|
||||
if("Toggle Power")
|
||||
if(can_transition_to(state == UAV_ON ? UAV_OFF : UAV_ON, user))
|
||||
|
||||
Reference in New Issue
Block a user