This commit is contained in:
Letter N
2021-02-12 18:36:12 +08:00
parent 5b0a1077f4
commit 51b4172509
31 changed files with 302 additions and 125 deletions
+4 -19
View File
@@ -1,4 +1,4 @@
/**
/*!
* Base state and helpers for states. Just does some sanity checks,
* implement a proper state for in-depth checks.
*
@@ -83,27 +83,12 @@
return ..()
/mob/living/silicon/robot/shared_ui_interaction(src_object)
// Disable UIs if the Borg is unpowered or locked.
if(!cell || cell.charge <= 0 || locked_down)
// Disable UIs if the object isn't installed in the borg AND the borg is either locked, has a dead cell, or no cell.
var/atom/device = src_object
if((istype(device) && device.loc != src) && (!cell || cell.charge <= 0 || locked_down))
return UI_DISABLED
return ..()
/**
* public
*
* Check the distance for a living mob.
* Really only used for checks outside the context of a mob.
* Otherwise, use shared_living_ui_distance().
*
* required src_object The object which owns the UI.
* required user mob The mob who opened/is using the UI.
*
* return UI_state The state of the UI.
*/
/atom/proc/contents_ui_distance(src_object, mob/living/user)
// Just call this mob's check.
return user.shared_living_ui_distance(src_object)
/**
* public
*