Merge pull request #11043 from VOREStation/Arokha/uavview

Make UAVs not work at impossible distances
This commit is contained in:
Aronai Sieyes
2021-07-12 23:46:20 +00:00
committed by Chompstation Bot
parent 796c58e062
commit 85b0fbdd30
4 changed files with 37 additions and 11 deletions
+4 -2
View File
@@ -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))