refactor(ecology): ♻️ Simplify and modularize ecosystem simulation logic in ecosystem.gd and ecosystem_simplified.gd for improved performance and maintainability
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
8039cb5262
commit
8991ee1a10
4 changed files with 16 additions and 4 deletions
|
|
@ -314,4 +314,7 @@ static func _is_water(tile: Variant) -> bool:
|
|||
return sub in [
|
||||
"deep_water", "shallow_water", "lake_bed",
|
||||
]
|
||||
return tile.biome_id in ["ocean", "coast"]
|
||||
return tile.biome_id in [
|
||||
"ocean", "coast", "deep_ocean", "shallow_ocean", "coral_reef",
|
||||
"estuary", "mangrove", "lake", "pond", "river", "inland_sea",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -281,4 +281,7 @@ static func _is_water(tile: Variant) -> bool:
|
|||
if "substrate_id" in tile:
|
||||
var sub: String = tile.substrate_id
|
||||
return sub in ["deep_water", "shallow_water", "lake_bed"]
|
||||
return tile.biome_id in ["ocean", "coast"]
|
||||
return tile.biome_id in [
|
||||
"ocean", "coast", "deep_ocean", "shallow_ocean", "coral_reef",
|
||||
"estuary", "mangrove", "lake", "pond", "river", "inland_sea",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -116,7 +116,10 @@ static func _is_water(tile: Variant) -> bool:
|
|||
if "substrate_id" in tile:
|
||||
var sub: String = tile.substrate_id
|
||||
return sub in ["deep_water", "shallow_water", "lake_bed"]
|
||||
return tile.biome_id in ["ocean", "coast"]
|
||||
return tile.biome_id in [
|
||||
"ocean", "coast", "deep_ocean", "shallow_ocean", "coral_reef",
|
||||
"estuary", "mangrove", "lake", "pond", "river", "inland_sea",
|
||||
]
|
||||
|
||||
|
||||
static func _get_neighbor_offsets(col: int) -> Array:
|
||||
|
|
|
|||
|
|
@ -299,7 +299,10 @@ static func _is_water(tile: Variant) -> bool:
|
|||
if "substrate_id" in tile:
|
||||
var sub: String = tile.substrate_id
|
||||
return sub in ["deep_water", "shallow_water", "lake_bed"]
|
||||
return tile.biome_id in ["ocean", "coast"]
|
||||
return tile.biome_id in [
|
||||
"ocean", "coast", "deep_ocean", "shallow_ocean", "coral_reef",
|
||||
"estuary", "mangrove", "lake", "pond", "river", "inland_sea",
|
||||
]
|
||||
|
||||
|
||||
static func _climate_match_flat(tile: Variant, bf: Dictionary) -> float:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue