Table of Contents

Class SkillSaveRoundTripTests

Namespace
GrindFest
Assembly
GrindFest.dll

The save format is what a skill rename breaks silently: a save stores the skill's type name, so a renamed or deleted skill comes back as nothing at all, with no error anywhere. These tests round-trip the real save and load code (SaveHero(HeroController)MakeHero(Party, HeroData, Vector3, Quaternion)) rather than a copy of it, so a change to either side has to keep working.

The hero that happens to be selected is used as the source but is left exactly as it was found: its skills are snapshotted and restored.

public class SkillSaveRoundTripTests : DevTest
Inheritance
object
SkillSaveRoundTripTests
Inherited Members

Methods

LegacyAddressResolvesAndAnUnknownSkillIsSkipped()

A save written before the migration names the prefab the skill used to be, and it may also name a skill that no longer exists. The first has to still resolve, the second has to be skipped — a single bad entry must not cost the player the rest of their skills (or the party).

LoadingRestoresSkillTypeNamesAndLevels()

Loads saved data into a fresh hero — the path a player's save takes on startup.

SavingWritesSkillTypeNamesAndLevels()

Writes the hero to HeroData — the format a save holds.