mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2026-08-21 20:36:36 +01:00
14 lines
389 B
Plaintext
14 lines
389 B
Plaintext
/*
|
|
This state checks that the user is on the same Z-level as src_object
|
|
*/
|
|
|
|
/var/global/datum/topic_state/z_state/z_state = new()
|
|
|
|
/datum/topic_state/z_state/can_use_topic(var/src_object, var/mob/user)
|
|
var/turf/turf_obj = get_turf(src_object)
|
|
var/turf/turf_usr = get_turf(user)
|
|
if(!turf_obj || !turf_usr)
|
|
return UI_CLOSE
|
|
|
|
return turf_obj.z == turf_usr.z ? UI_INTERACTIVE : UI_CLOSE
|