Drive planets from definitions
This commit is contained in:
parent
2f68515f33
commit
02643c76c4
22 changed files with 183 additions and 82 deletions
|
|
@ -1,5 +1,7 @@
|
|||
extends Node2D
|
||||
|
||||
const PLANET_DEFINITIONS = preload("res://PlanetDefinitions.gd")
|
||||
|
||||
const WORLD_TO_LOCAL: float = 0.04
|
||||
|
||||
# Mirrors Building.gd's own MOTHERSHIP_COLOR/CRAFTER_COLOR/COMMAND_COLOR so a
|
||||
|
|
@ -105,7 +107,8 @@ func _draw() -> void:
|
|||
# spawn_radius_chunks of the fleet).
|
||||
var data: Dictionary = WorldGen.planet_data_at_chunk(chunk)
|
||||
var planet_local: Vector2 = origin_local + data.local_pos * WORLD_TO_LOCAL
|
||||
draw_circle(planet_local, 5.0, Color(0.7, 0.65, 0.55))
|
||||
var definition: Resource = PLANET_DEFINITIONS.get_definition(String(data.definition_id))
|
||||
draw_circle(planet_local, 5.0, definition.map_color)
|
||||
draw_arc(planet_local, 5.0, 0.0, TAU, 16, Color(1.0, 1.0, 1.0, 0.9), 1.0, true)
|
||||
|
||||
if chunk_has_extractor_badge(chunk):
|
||||
|
|
|
|||
Loading…
Reference in a new issue