/
githubmirror
/
vgstation13
Обзор
Документация
Войти
/
githubmirror
/
vgstation13
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
Bleeding-Edge
code/modules/tgui/states/hands.dm
30 строк
712 B
ShiftyRail
Byond 516 v2.0 (#37553)
12 май 2025, 08:50
Не верифицирован
12 май 2025, 08:50
d79c1fe
Код
Авторство
О чём код?
/*! * Copyright (c) 2020 Aleksej Komarov * SPDX-License-Identifier: MIT */ /** * tgui state: hands_state * * Checks that the src_object is in the user's hands. */ var/datum/ui_state/hands_state/hands_state = new /datum/ui_state/hands_state/can_use_topic(src_object, mob/user) . = user.shared_ui_interaction(src_object) if(. > UI_CLOSE) return min(., user.hands_can_use_topic(src_object)) /mob/proc/hands_can_use_topic(src_object) return UI_CLOSE /mob/living/hands_can_use_topic(src_object) if(get_active_hand() == src_object) return UI_INTERACTIVE return UI_CLOSE /mob/living/silicon/robot/hands_can_use_topic(src_object) if(activated(src_object)) return UI_INTERACTIVE return UI_CLOSE