Add starter RV progression and fishing feedback
This commit is contained in:
parent
eed361681a
commit
d8bf59bca0
47 changed files with 2268 additions and 467 deletions
|
|
@ -338,6 +338,11 @@ func load_player_data() -> bool:
|
|||
snapshot.reel_speed_level,
|
||||
snapshot.barrier_power_level
|
||||
)
|
||||
# Home tier is now the authority for private-storage capacity, so restore it
|
||||
# before the compatibility capacity adapter and inventory layout.
|
||||
var home_restored: bool = _home_state.restore_from_save_data(
|
||||
snapshot.home_data
|
||||
)
|
||||
var cooler_restored: bool = _cooler_capacity.restore_level(
|
||||
snapshot.cooler_capacity_level
|
||||
)
|
||||
|
|
@ -368,9 +373,6 @@ func load_player_data() -> bool:
|
|||
snapshot.world_weather_seconds_remaining,
|
||||
)
|
||||
var jobs_restored: bool = _jobs.restore_from_save_data(snapshot.jobs_data)
|
||||
var home_restored: bool = _home_state.restore_from_save_data(
|
||||
snapshot.home_data
|
||||
)
|
||||
_is_restoring = false
|
||||
if (
|
||||
not inventory_restored
|
||||
|
|
@ -1324,6 +1326,26 @@ func _build_load_snapshot(save_data: Dictionary) -> LoadSnapshot:
|
|||
PlayerCoolerCapacityType.MAX_LEVEL,
|
||||
"cooler.capacity_level"
|
||||
)
|
||||
# Before homes had upgrade tiers, storage was purchased separately. Preserve
|
||||
# those saves by granting the starter RV to anybody who owned at least one
|
||||
# legacy expansion. PlayerCoolerCapacity also retains the purchased legacy
|
||||
# capacity so entries beyond the new RV's first 18 slots remain accessible.
|
||||
if (
|
||||
snapshot.cooler_capacity_level > 0
|
||||
and int(snapshot.home_data.get("tier", 0))
|
||||
== PlayerHomeStateType.STARTER_TIER
|
||||
):
|
||||
var migrated_home: Dictionary = home_data.duplicate(true)
|
||||
migrated_home["tier"] = PlayerHomeStateType.STARTER_RV_TIER
|
||||
migrated_home["exterior_id"] = String(
|
||||
PlayerHomeStateType.STARTER_RV_EXTERIOR_ID
|
||||
)
|
||||
var sanitized_migrated_home := (
|
||||
PlayerHomeStateType.sanitize_save_data(migrated_home)
|
||||
)
|
||||
if sanitized_migrated_home.is_empty():
|
||||
return null
|
||||
snapshot.home_data = sanitized_migrated_home
|
||||
snapshot.art_unlock_mask = _read_integer(
|
||||
art_data.get("unlock_mask"),
|
||||
0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue