fix labels

This commit is contained in:
2026-04-21 15:55:10 +02:00
parent 5fe96068a4
commit edb96d6a89
3 changed files with 17 additions and 17 deletions

View File

@@ -6,17 +6,17 @@ class_name ChunkInfo
@export_group("Set Piece Rules (Unique pieces)") @export_group("Set Piece Rules (Unique pieces)")
@export var exclusive_biome: String = "" # Es: "Forest" @export var exclusive_biome: String = "" # Es: "Forest"
@export_group("Base exit (no roation)") @export_group("Base exit")
@export var north: bool = false @export var north: bool = false
@export var est: bool = false @export var est: bool = false
@export var south: bool = false @export var south: bool = false
@export var west: bool = false @export var west: bool = false
@export_group("Margin heights (level 0, 1, 2)") @export_group("Margin heights (level 0, 1, 2)")
@export var height_north: int = 0 @export_range(0, 2, 1) var height_north: int = 0
@export var height_est: int = 0 @export_range(0, 2, 1) var height_est: int = 0
@export var height_south: int = 0 @export_range(0, 2, 1) var height_south: int = 0
@export var height_west: int = 0 @export_range(0, 2, 1) var height_west: int = 0
@export_group("Lamppost") @export_group("Lamppost")
@export var have_lamppost: bool = false @export var have_lamppost: bool = false

View File

@@ -19,7 +19,7 @@ func set_particles_node_color(node: GPUParticles3D, new_color: Color) -> void:
unique_mat.shading_mode = BaseMaterial3D.SHADING_MODE_UNSHADED unique_mat.shading_mode = BaseMaterial3D.SHADING_MODE_UNSHADED
mesh.material = unique_mat mesh.material = unique_mat
func turnon() -> void: func turn_on() -> void:
if rocket: if rocket:
rocket.emitting = true rocket.emitting = true

View File

@@ -52,7 +52,7 @@ func _ready() -> void:
build_train() build_train()
_plan_stops() _plan_stops()
else: else:
print("WARNING: Draw your Path3D!") print("WARNING: Draw Path3D for rails!")
func build_rails() -> void: func build_rails() -> void:
var mat_wood = StandardMaterial3D.new() var mat_wood = StandardMaterial3D.new()
@@ -112,16 +112,16 @@ func build_rails() -> void:
rail_piece.add_child(rail_dx) rail_piece.add_child(rail_dx)
func _plan_stops() -> void: func _plan_stops() -> void:
var currnet_stops = [] var current_stops = []
for child in get_children(): for child in get_children():
if child is Marker3D: if child is Marker3D:
var offset = curve.get_closest_offset(child.position) var offset = curve.get_closest_offset(child.position)
currnet_stops.append({ current_stops.append({
"offset": offset, "offset": offset,
"position": child.global_position "position": child.global_position
}) })
currnet_stops.sort_custom(func(a, b): return a["offset"] < b["offset"]) current_stops.sort_custom(func(a, b): return a["offset"] < b["offset"])
for data in currnet_stops: for data in current_stops:
stop_offset.append(data["offset"]) stop_offset.append(data["offset"])
stops_position.append(data["position"]) stops_position.append(data["position"])
@@ -130,9 +130,9 @@ func _input(event: InputEvent) -> void:
if event.keycode == KEY_T: if event.keycode == KEY_T:
_goto_next_stop() _goto_next_stop()
elif event.keycode == KEY_F: elif event.keycode == KEY_F:
_test_manual_fires() _test_manual_fireworks()
func _test_manual_fires() -> void: func _test_manual_fireworks() -> void:
if fireworks_scene == null or train_instance == null: return if fireworks_scene == null or train_instance == null: return
var firework_number = randi_range(5, 8) var firework_number = randi_range(5, 8)
@@ -146,8 +146,8 @@ func _test_manual_fires() -> void:
if fire_root.has_method("set_color"): if fire_root.has_method("set_color"):
fire_root.set_color(fireworks_colors.pick_random()) fire_root.set_color(fireworks_colors.pick_random())
if fire_root.has_method("turnon"): if fire_root.has_method("turn_on"):
fire_root.turnon() fire_root.turn_on()
await get_tree().create_timer(randf_range(0.2, 0.6)).timeout await get_tree().create_timer(randf_range(0.2, 0.6)).timeout
@@ -260,8 +260,8 @@ func _execute_stop(go_forward: bool = true) -> void:
if fire_root.has_method("set_color"): if fire_root.has_method("set_color"):
fire_root.set_color(fireworks_colors.pick_random()) fire_root.set_color(fireworks_colors.pick_random())
if fire_root.has_method("turnon"): if fire_root.has_method("turn_on"):
fire_root.turnon() fire_root.turn_on()
await get_tree().create_timer(randf_range(0.3, 0.8)).timeout await get_tree().create_timer(randf_range(0.3, 0.8)).timeout