mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 20:45:28 +01:00
* first push woohoo * more stuff * Update code/datums/components/z_parallax.dm Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> * mothblockification * fuck * fuck 2 * uh * uh yeah style stuff ig * more changes * last changes * fuck * fuck 2 * i hate potatopotato * i hate potato * 2 * a * god * woops * Update code/modules/mapping/space_management/traits.dm Co-authored-by: Kylerace <kylerlumpkin1@gmail.com> * Update code/modules/mapping/space_management/traits.dm Co-authored-by: Kylerace <kylerlumpkin1@gmail.com> * Update code/modules/mapping/space_management/traits.dm Co-authored-by: Kylerace <kylerlumpkin1@gmail.com> Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> Co-authored-by: Kylerace <kylerlumpkin1@gmail.com> Co-authored-by: magatsuchi <88991542+magatsuchi@users.noreply.github.com> Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> Co-authored-by: Kylerace <kylerlumpkin1@gmail.com> Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
This commit is contained in:
@@ -31,23 +31,29 @@
|
||||
|
||||
/// Get a list of all z which have the specified trait
|
||||
/datum/controller/subsystem/mapping/proc/levels_by_trait(trait)
|
||||
. = list()
|
||||
var/list/_z_list = z_list
|
||||
for(var/A in _z_list)
|
||||
var/datum/space_level/S = A
|
||||
if (S.traits[trait])
|
||||
. += S.z_value
|
||||
var/list/final_return = list()
|
||||
for(var/datum/space_level/level as anything in z_list)
|
||||
if (level.traits[trait])
|
||||
final_return += level.z_value
|
||||
return final_return
|
||||
|
||||
/// Get a list of all z which have any of the specified traits
|
||||
/datum/controller/subsystem/mapping/proc/levels_by_any_trait(list/traits)
|
||||
. = list()
|
||||
var/list/_z_list = z_list
|
||||
for(var/A in _z_list)
|
||||
var/datum/space_level/S = A
|
||||
var/list/final_return = list()
|
||||
for(var/datum/space_level/level as anything in z_list)
|
||||
for (var/trait in traits)
|
||||
if (S.traits[trait])
|
||||
. += S.z_value
|
||||
if (level.traits[trait])
|
||||
final_return += level.z_value
|
||||
break
|
||||
return final_return
|
||||
|
||||
/// Get a list of all z which have all of the specified traits
|
||||
/datum/controller/subsystem/mapping/proc/levels_by_all_traits(list/traits)
|
||||
var/list/final_return = list()
|
||||
for(var/datum/space_level/level as anything in z_list)
|
||||
if(level_has_all_traits(level.z_value, traits))
|
||||
final_return += level.z_value
|
||||
return final_return
|
||||
|
||||
/// Attempt to get the turf below the provided one according to Z traits
|
||||
/datum/controller/subsystem/mapping/proc/get_turf_below(turf/T)
|
||||
|
||||
Reference in New Issue
Block a user