[MIRROR] Refactors z level trait checking to be less shit [MDB IGNORE] (#15751)

* Refactors z level trait checking to be less shit (#69334)

* Puts level traits and their associated z into a list and then uses it to make the z level trait procs less shit. They no longer need to loop through every z level to do what they aim to do.

* Also removes get_level from level_trait because it just does the same checks as already done above in the proc.

* Refactors z level trait checking to be less shit

Co-authored-by: Seth Scherer <supernovaa41@gmx.com>
This commit is contained in:
SkyratBot
2022-08-24 18:40:45 -04:00
committed by GitHub
co-authored by Seth Scherer
parent 2253198fc3
commit 1dce8047e5
3 changed files with 22 additions and 18 deletions
+3
View File
@@ -55,6 +55,9 @@ SUBSYSTEM_DEF(mapping)
///associative list of the form: list("[z level num]" = max generator gravity in that z level OR the gravity level trait)
var/list/gravity_by_z_level = list()
/// list of traits and their associated z leves
var/list/z_trait_levels = list()
/datum/controller/subsystem/mapping/New()
..()
#ifdef FORCE_MAP