Key extractors by stable planet identity
This commit is contained in:
parent
14081ad230
commit
e2d4297ee5
11 changed files with 71 additions and 16 deletions
|
|
@ -91,7 +91,8 @@ static func planet_data_at_chunk(chunk: Vector2i) -> Dictionary:
|
|||
var definition: Resource = PLANET_DEFINITIONS.get_definition(definition_id)
|
||||
var names: PackedStringArray = definition.names
|
||||
var planet_name: String = names[rng.randi() % names.size()]
|
||||
return {"local_pos": local_pos, "name": planet_name, "shape_seed": shape_seed,
|
||||
var planet_id: String = "chunk:%d:%d" % [chunk.x, chunk.y]
|
||||
return {"planet_id": planet_id, "local_pos": local_pos, "name": planet_name, "shape_seed": shape_seed,
|
||||
"definition_id": definition_id}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue