Integrate per-save identity and interaction UI

This commit is contained in:
Alexander Sellite 2026-09-01 17:30:50 -04:00
parent ac82a28f3b
commit 4fda6e97f6
58 changed files with 3471 additions and 461 deletions

View file

@ -9,7 +9,9 @@ const GatheringControllerType = preload(
)
const WorldGatherableType = preload("res://gathering/world_gatherable.gd")
const CRAB_PIXEL_SIZE: float = 0.0005
const CRAB_PIXEL_SIZE: float = 0.01
const CRAB_SURFACE_OFFSET: float = 0.11
const CRAB_SPRITE_EXTENT: float = 0.64
const REDUCED_CATCH_RING_RADIUS: float = 0.175
const NET_STRIKE_MARKER_DISTANCE: float = 0.85
const CalendarSeasonType = preload("res://world/calendar_season.gd")
@ -30,7 +32,7 @@ func _run() -> void:
var snapshot_entities_per_envelope: int = (
NetworkWorldSpawnProtocol.SNAPSHOT_ENTITIES_PER_ENVELOPE
)
assert(protocol_version == 12)
assert(protocol_version == 13)
assert(
world_spawn_capability == protocol_world_spawn_capability
)
@ -56,6 +58,10 @@ func _validate_catalog_statuses() -> void:
CRAB_PIXEL_SIZE,
)
)
assert(is_equal_approx(
brown.sprite_surface_offset,
CRAB_SURFACE_OFFSET,
))
_validate_quality_behavior(brown)
assert(is_equal_approx(brown.capture_respawn_min_seconds, 480.0))
assert(is_equal_approx(brown.capture_respawn_max_seconds, 720.0))
@ -121,6 +127,11 @@ func _validate_catalog_statuses() -> void:
0.4,
))
assert(blue.maximum_surface_population == 16)
assert(is_equal_approx(blue.sprite_pixel_size, CRAB_PIXEL_SIZE))
assert(is_equal_approx(
blue.sprite_surface_offset,
CRAB_SURFACE_OFFSET,
))
assert(blue.target_population_for_surface_area(100.0) == 4)
assert(blue.target_population_for_surface_area(2250.0) == 9)
assert(FishCatalog.get_fish_by_id(&"crab_blue") == blue.catch_data)
@ -138,6 +149,10 @@ func _validate_catalog_statuses() -> void:
CRAB_PIXEL_SIZE,
)
)
assert(is_equal_approx(
entry.sprite_surface_offset,
CRAB_SURFACE_OFFSET,
))
assert(entry.catch_data.collection_method == FishData.CollectionMethod.NET)
assert(
entry.catch_data.logbook_section
@ -182,13 +197,22 @@ func _validate_catalog_statuses() -> void:
func _validate_billboard_presentation() -> void:
var gatherable := WorldGatherableType.new()
gatherable.call("_ensure_visual")
root.add_child(gatherable)
var brown: GatherableData = Gatherables.get_entry(&"crab_brown")
gatherable.configure("crab-size-validation", brown, Vector3.ZERO, 0.0)
var sprite := gatherable.get_node("GatherableSprite") as Sprite3D
assert(sprite != null)
assert(sprite.billboard == BaseMaterial3D.BILLBOARD_ENABLED)
assert(sprite.texture_filter == BaseMaterial3D.TEXTURE_FILTER_NEAREST)
assert(not sprite.shaded)
gatherable.free()
assert(is_equal_approx(sprite.pixel_size, CRAB_PIXEL_SIZE))
assert(is_equal_approx(sprite.position.y, CRAB_SURFACE_OFFSET))
assert(is_equal_approx(
float(sprite.texture.get_width()) * sprite.pixel_size,
CRAB_SPRITE_EXTENT,
))
gatherable.queue_free()
await process_frame
var unconfigured_hotspot := WorldGatherableType.new()
unconfigured_hotspot.call("_ensure_water_spurt_visual")