mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 09:42:29 +00:00
Basketball minigame is now lazyloaded. Several notable changes include: - Basketball spawns in lazyload z-levels instead of Centcomm. The basketball landmark has been removed from Centcomm map. - `soviet_bear.dmm` basketball map was incorrectly referenced as `soviet_bears` in the old maploader code causing it to break when it tried to load this map - All `Basketball` maps were moved to a new map folder called `minigames` which I plan on placing all minigame maps inside - Basketball mobs would runtime when qdel since they have still have clients inside them. The solution was to ghostize the mobs before this happens. This does not directly fix the lag or runtimes being caused by basketball. That is caused by the maploader code inserting walls into the atmos subsystem due to some really weird behavior that I explained in #89649 . I have a seperate fix I'm planning for that.
18 lines
642 B
Plaintext
18 lines
642 B
Plaintext
GLOBAL_LIST_INIT(lazy_templates, generate_lazy_template_map())
|
|
|
|
/**
|
|
* Iterates through all lazy template datums that exist and returns a list of them as an associative list of key -> instance.
|
|
*
|
|
* Screams if more than one key exists, loudly.
|
|
*/
|
|
/proc/generate_lazy_template_map()
|
|
. = list()
|
|
for(var/datum/lazy_template/template as anything in subtypesof(/datum/lazy_template))
|
|
var/key = initial(template.key)
|
|
if(!key) // some subtypes like basketball and deathmatch have a base datum with no key
|
|
continue
|
|
if(key in .)
|
|
stack_trace("Found multiple lazy templates with the same key! '[key]'")
|
|
.[key] = new template
|
|
return .
|