some more globals (#19098)

* some more globals

* .
This commit is contained in:
Kashargul
2026-01-29 09:21:58 -08:00
committed by GitHub
parent 24e68536bc
commit fdfb49012b
50 changed files with 164 additions and 176 deletions
+4 -5
View File
@@ -55,14 +55,13 @@ GLOBAL_LIST(word_to_uristrune_table)
return get_uristrune(bits, animated)
var/list/uristrune_cache = list()
GLOBAL_LIST_EMPTY(uristrune_cache)
/proc/get_uristrune(symbol_bits, animated = 0)
var/lookup = "[symbol_bits]-[animated]"
if(lookup in uristrune_cache)
return uristrune_cache[lookup]
if(lookup in GLOB.uristrune_cache)
return GLOB.uristrune_cache[lookup]
var/icon/I = icon('icons/effects/uristrunes.dmi', "blank")
@@ -125,6 +124,6 @@ var/list/uristrune_cache = list()
result.Insert(I3, "", frame = 7, delay = 2)
result.Insert(I2, "", frame = 8, delay = 2)
uristrune_cache[lookup] = result
GLOB.uristrune_cache[lookup] = result
return result
+2 -2
View File
@@ -4,7 +4,7 @@
#define BOOK_VERSION_MAX 2
#define BOOK_PATH "data/books/"
var/global/datum/book_manager/book_mgr = new()
GLOBAL_DATUM_INIT(book_mgr, /datum/book_manager, new)
/datum/book_manager/proc/path(id)
if(isnum(id)) // kill any path exploits
@@ -131,7 +131,7 @@ var/global/datum/book_manager/book_mgr = new()
/datum/archived_book/proc/save()
var/savefile/F = new(book_mgr.path(id))
var/savefile/F = new(GLOB.book_mgr.path(id))
F["version"] << BOOK_VERSION_MAX
F["author"] << author