Add portable RV homes and decor prototype

This commit is contained in:
Alexander Sellite 2026-08-30 21:37:26 -04:00
parent 81decf2b71
commit fe099f47dd
56 changed files with 5459 additions and 112 deletions

View file

@ -7,6 +7,9 @@ const FishingShopInteractionType = preload(
const PlayerStorageInteractionType = preload(
"res://world/player_storage_interaction.gd"
)
const DecorShopInteractionType = preload(
"res://world/decor_shop_interaction.gd"
)
const WorldLayoutType = preload("res://world/world_layout.gd")
const GENERATED_REGION_SCENE: PackedScene = preload(
"res://world/generation/generated_world_region.tscn"
@ -31,6 +34,7 @@ var _world_layout: StringName = WorldLayoutType.GENERATED
var _world_seed: int = PlayerSaveManager.DEFAULT_WORLD_SEED
var _light_performance_profile: bool = false
var _dedicated_simulation: bool = false
var _local_home_interior_presentation_active: bool = false
func get_player_water_triggers() -> Array[PlayerWaterTrigger]:
@ -67,6 +71,10 @@ func get_player_storage() -> PlayerStorageInteractionType:
return _active_region.get_player_storage()
func get_decor_shop() -> DecorShopInteractionType:
return _active_region.get_decor_shop()
func get_player_spawn_transform() -> Transform3D:
return _active_region.get_player_spawn_transform()
@ -85,6 +93,12 @@ func set_light_performance_profile(enabled: bool) -> void:
_active_region.set_light_performance_profile(enabled)
func set_local_home_interior_presentation_active(enabled: bool) -> void:
_local_home_interior_presentation_active = enabled
if _active_region != null and not _dedicated_simulation:
_active_region.visible = not enabled
func set_dedicated_simulation(enabled: bool) -> void:
_dedicated_simulation = enabled
if _active_region != null:
@ -272,6 +286,8 @@ func _replace_active_region(layout: StringName, seed: int) -> bool:
_active_region.set_light_performance_profile(_light_performance_profile)
if _dedicated_simulation:
_set_region_presentation_enabled(_active_region, false)
else:
_active_region.visible = not _local_home_interior_presentation_active
return true