Cleans up a lot of globals a few other vars (#23246)

* i hate globals i hate globals

* more fucking of these

* sirryan review
This commit is contained in:
Contrabang
2023-12-06 10:30:41 -05:00
committed by GitHub
parent 8046d5b267
commit c8dce33a8a
42 changed files with 11 additions and 157 deletions
+2
View File
@@ -4,9 +4,11 @@
* Checks that the user is inside the src_object.
*/
/*
GLOBAL_DATUM_INIT(contained_state, /datum/ui_state/contained_state, new)
/datum/ui_state/contained_state/can_use_topic(atom/src_object, mob/user)
if(!src_object.contains(user))
return STATUS_CLOSE
return user.shared_ui_interaction(src_object)
*/
+2
View File
@@ -4,6 +4,7 @@
* Checks that the user is not inside src_object, and then makes the default checks.
*/
/*
GLOBAL_DATUM_INIT(notcontained_state, /datum/ui_state/notcontained_state, new)
/datum/ui_state/notcontained_state/can_use_topic(atom/src_object, mob/user)
@@ -21,3 +22,4 @@ GLOBAL_DATUM_INIT(notcontained_state, /datum/ui_state/notcontained_state, new)
/mob/living/silicon/notcontained_can_use_topic(src_object)
return default_can_use_topic(src_object) // Silicons use default bevhavior.
*/
+2
View File
@@ -4,6 +4,7 @@
* Only checks that the Z-level of the user and src_object are the same.
*/
/*
GLOBAL_DATUM_INIT(z_state, /datum/ui_state/z_state, new)
/datum/ui_state/z_state/can_use_topic(src_object, mob/user)
@@ -12,3 +13,4 @@ GLOBAL_DATUM_INIT(z_state, /datum/ui_state/z_state, new)
if(turf_obj && turf_usr && turf_obj.z == turf_usr.z)
return STATUS_INTERACTIVE
return STATUS_CLOSE
*/