Now when mutating plants have their name mutating as well (if not twitch)

This commit is contained in:
Victor
2026-08-23 16:37:22 +02:00
parent da91433135
commit 5c13bcea23
5 changed files with 134 additions and 36 deletions
+30
View File
@@ -0,0 +1,30 @@
@tool
extends Node
@export_tool_button("Test names", "Callable") var update_action = func(): print_random_names()
@export_tool_button("Test small mutate one name", "Callable") var test_small_mutation = func(): print_random_small_mutated_name()
@export_tool_button("Test big mutate one name", "Callable") var test_big_mutation = func(): print_random_big_mutated_name()
func _ready() -> void:
print_random_names()
func print_random_names(number: int = 10) -> void:
print("---------")
for i in range(number):
print(Random.generate_random_plant_name())
func print_random_small_mutated_name(n_mutations: int = 5) -> void:
print("---------")
var base := Random.generate_random_plant_name()
print("Base: ", base)
for i in range(n_mutations):
base = Random.small_mutate_plant_name(base)
print(i, ": ", base)
func print_random_big_mutated_name(n_mutations: int = 5) -> void:
print("---------")
var base := Random.generate_random_plant_name()
print("Base: ", base)
for i in range(n_mutations):
base = Random.big_mutate_plant_name(base)
print(i + 1, ": ", base)