T-G-U-I
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user