mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-14 17:45:02 +01:00
c487c73f39
* Grep for space indentation * aa * Update species.dm * Update species.dm * Update maps.dm * Update examine.dm Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com> Co-authored-by: Azarak <azarak10@gmail.com>
22 lines
575 B
Plaintext
22 lines
575 B
Plaintext
/*!
|
|
* Copyright (c) 2020 Aleksej Komarov
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
/**
|
|
* tgui state: human_adjacent_state
|
|
*
|
|
* In addition to default checks, only allows interaction for a
|
|
* human adjacent user.
|
|
*/
|
|
|
|
GLOBAL_DATUM_INIT(human_adjacent_state, /datum/ui_state/human_adjacent_state, new)
|
|
|
|
/datum/ui_state/human_adjacent_state/can_use_topic(src_object, mob/user)
|
|
. = user.default_can_use_topic(src_object)
|
|
|
|
var/dist = get_dist(src_object, user)
|
|
if((dist > 1) || (!ishuman(user)))
|
|
// Can't be used unless adjacent and human, even with TK
|
|
. = min(., UI_UPDATE)
|