24 lines
1,012 B
GDScript3
24 lines
1,012 B
GDScript3
|
|
extends SceneTree
|
||
|
|
|
||
|
|
# Run INSIDE an exported pack, not from source:
|
||
|
|
# godot --headless --main-pack builds/web/index.pck -s res://tests/_export_probe.gd
|
||
|
|
#
|
||
|
|
# The suite cannot see export-only faults - it runs from a source tree where
|
||
|
|
# every .tres is really there. This probe asks the questions that only have a
|
||
|
|
# different answer inside a pack, where text resources have been converted to
|
||
|
|
# binary and reached through .remap files.
|
||
|
|
|
||
|
|
|
||
|
|
func _initialize() -> void:
|
||
|
|
var setups: Array = load("res://surface/PlanetSetups.gd").all()
|
||
|
|
print("EXPORT_PROBE setups=%d" % setups.size())
|
||
|
|
for setup in setups:
|
||
|
|
print("EXPORT_PROBE %s (%s) enemies=%d" % [
|
||
|
|
String(setup.setup_id), String(setup.surface_profile_id),
|
||
|
|
setup.enemy_spawns.size()])
|
||
|
|
var rocky: Resource = load("res://surface/PlanetSetups.gd").setup_for_planet(
|
||
|
|
"probe:planet", "rocky")
|
||
|
|
print("EXPORT_PROBE rocky_pick=%s enemies=%d" % [
|
||
|
|
"none" if rocky == null else String(rocky.setup_id),
|
||
|
|
0 if rocky == null else rocky.enemy_spawns.size()])
|
||
|
|
quit(0)
|