Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring Save Slot Controllers to work more with Save Slot Views #1014

Open
wants to merge 81 commits into
base: CG-Tespy-CGTFungusSaveSystem
Choose a base branch
from

Commits on Sep 8, 2020

  1. Configuration menu
    Copy the full SHA
    5cad400 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e03289b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d4e4808 View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2020

  1. Revert "Added more versatile version of Message Received"

    This reverts commit d4e4808.
    CG-Tespy committed Sep 9, 2020
    Configuration menu
    Copy the full SHA
    4ac233d View commit details
    Browse the repository at this point in the history

Commits on Jan 11, 2021

  1. Merge pull request #2 from snozbot/develop

    Updating develop branch on my end
    CG-Tespy authored Jan 11, 2021
    Configuration menu
    Copy the full SHA
    00bd682 View commit details
    Browse the repository at this point in the history

Commits on Jan 12, 2021

  1. Revert "Updated test scene and narrative log prefab"

    This reverts commit e03289b.
    CG-Tespy committed Jan 12, 2021
    Configuration menu
    Copy the full SHA
    1df345d View commit details
    Browse the repository at this point in the history
  2. Revert "Added requested feature: Narrative Log not registering empty …

    …Say dialog entries"
    
    This reverts commit 5cad400.
    CG-Tespy committed Jan 12, 2021
    Configuration menu
    Copy the full SHA
    2ee5fb2 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #4 from snozbot/CG-Tespy-CGTFungusSaveSystem

    Updating the branch on my end
    CG-Tespy authored Jan 12, 2021
    Configuration menu
    Copy the full SHA
    9b40b15 View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2021

  1. Configuration menu
    Copy the full SHA
    cbf1524 View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2021

  1. Added unit test for music encoding result count

    Also did a little reorganizing of what's in the Fungus Save script folder
    CG-Tespy committed Jul 11, 2021
    Configuration menu
    Copy the full SHA
    2b89b56 View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2021

  1. Removed hard-coded view fields

    Thanks to the new view system, they're no longer necessary
    CG-Tespy committed Jul 13, 2021
    Configuration menu
    Copy the full SHA
    fbe3573 View commit details
    Browse the repository at this point in the history
  2. Added more tests. Seems the base slot views work as intended

    All the tests have passed at the time of this writing
    CG-Tespy committed Jul 13, 2021
    Configuration menu
    Copy the full SHA
    883f74c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d64908e View commit details
    Browse the repository at this point in the history

Commits on Aug 25, 2021

  1. Merge remote-tracking branch 'origin/CG-Tespy-CGTFungusSaveSystem' in…

    …to SaveDataCreationTesting
    CG-Tespy committed Aug 25, 2021
    Configuration menu
    Copy the full SHA
    21cc13e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9233af0 View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2021

  1. Added unit test for encoding many numeric vars at once

    Added an Encode func to NumericVarSaveEncoder that can take an IList of vars, returning an IList of said vars encoded. I know that Fungus would normally return just a regular List, but I felt it'd be better to go with IList here due to how it's good practice to code more to interfaces than to concrete implementations.
    
    Especially in this case. If the client really wants a regular List of the encoded results, they can easily make their own by passing said results to the regular List's constructor.
    CG-Tespy committed Aug 27, 2021
    Configuration menu
    Copy the full SHA
    86034be View commit details
    Browse the repository at this point in the history
  2. Refactored number saver so it works off a generic implementation

    One that lets subclasses decide which var types they can support. This should cut down on boilerplate code we'd otherwise make when working on other var encoders.
    CG-Tespy committed Aug 27, 2021
    Configuration menu
    Copy the full SHA
    8b00934 View commit details
    Browse the repository at this point in the history
  3. Added tests for ensuring invalid inputs get rejected

    Also deleted the sound tests, since we're quite a ways off from testing that stuff
    CG-Tespy committed Aug 27, 2021
    Configuration menu
    Copy the full SHA
    ec08b18 View commit details
    Browse the repository at this point in the history
  4. Reorganized the num-saving test suite

    FlowchartSavingTests was getting a bit big, and I felt that testing other var type encodings would take similar amounts of code. Hence, I made FlowchartSavingTests an abstract class for various suites that each focus on certain var types or groups.
    
    Hence the new FlowchartNumSavingTests suite.
    CG-Tespy committed Aug 27, 2021
    Configuration menu
    Copy the full SHA
    fcdc19a View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2021

  1. Added unit tests for saving string vars

    To cut down on code duplication, I created a testing extensions script. I may have to do something about the code duplication in the string var tests as they are now...
    CG-Tespy committed Aug 28, 2021
    Configuration menu
    Copy the full SHA
    29ac3db View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    389784f View commit details
    Browse the repository at this point in the history
  3. Test suite cleanup

    CG-Tespy committed Aug 28, 2021
    Configuration menu
    Copy the full SHA
    1b7601c View commit details
    Browse the repository at this point in the history
  4. More suite cleanup

    Will need to add back in the tests that check to make sure that invalid inputs get rejected
    CG-Tespy committed Aug 28, 2021
    Configuration menu
    Copy the full SHA
    adbbce8 View commit details
    Browse the repository at this point in the history
  5. Readded input-rejecting tests, renamed var test suite

    That test suite was set up only for var-encoding, so naming it "FlowchartSavingTests" was a bit misleading
    CG-Tespy committed Aug 28, 2021
    Configuration menu
    Copy the full SHA
    2697698 View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2021

  1. Configuration menu
    Copy the full SHA
    4a6222b View commit details
    Browse the repository at this point in the history
  2. Altered tests so they work with json by default

    As jsons don't work with all var types, I refactored the encoders to be more flexible about whether their values get encoded as json strings or regular strings
    CG-Tespy committed Sep 8, 2021
    Configuration menu
    Copy the full SHA
    aa467b7 View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2021

  1. Added vec 3 var unit tests

    Renamed a couple flowcharts to reduce confusion, too
    CG-Tespy committed Sep 19, 2021
    Configuration menu
    Copy the full SHA
    cd8c882 View commit details
    Browse the repository at this point in the history
  2. Renamed the SaveEncoder classes to have "Saver" instead of "SaveEncoder"

    It's shorter and more intuitive, considering this is a Save/Load system
    CG-Tespy committed Sep 19, 2021
    Configuration menu
    Copy the full SHA
    33a0cc4 View commit details
    Browse the repository at this point in the history

Commits on Oct 7, 2021

  1. Laying out groundwork for restructure in how save data is defined

    I feel that rather than relying on StringPairs to be the save data units, there should be different classes handling the job for different types of state.
    
    I find this approach a lot more extensible, flexible, and as a result, more user-friendly.
    
    Of course, this means that the unit tests may need to be restructured. New tests will be written as the restructure continues.
    CG-Tespy committed Oct 7, 2021
    Configuration menu
    Copy the full SHA
    51b7af8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    100b911 View commit details
    Browse the repository at this point in the history
  3. More groundwork

    Currently expecting VarSaver to become obsolete and its subclasses to be reworked to fit the new ISaveCreator interface
    CG-Tespy committed Oct 7, 2021
    Configuration menu
    Copy the full SHA
    d27769b View commit details
    Browse the repository at this point in the history

Commits on Oct 13, 2021

  1. Reworking variable-saving to be more consolidated

    Also reworked the unit tests
    CG-Tespy committed Oct 13, 2021
    Configuration menu
    Copy the full SHA
    2f2ee3d View commit details
    Browse the repository at this point in the history
  2. Removed invalid input checks and redundant code

    All variables are saved in units with the values stored as normal strings, after all
    CG-Tespy committed Oct 13, 2021
    Configuration menu
    Copy the full SHA
    4524437 View commit details
    Browse the repository at this point in the history
  3. Undid some of the consolidation in the saver architecture

    Turns out that simply saving every var as a string by applying ToString on their values doesn't always get the right results. Revised the architecture so that it lets you make more variable-specific savers without necessarily having to make new ones for each variable type.
    CG-Tespy committed Oct 13, 2021
    Configuration menu
    Copy the full SHA
    00df2b6 View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2021

  1. Configuration menu
    Copy the full SHA
    8cfedd2 View commit details
    Browse the repository at this point in the history

Commits on Oct 28, 2021

  1. Configuration menu
    Copy the full SHA
    7c51a0d View commit details
    Browse the repository at this point in the history

Commits on Oct 31, 2021

  1. Layout out groundwork for stage-saving tests

    With the first stage stuff to save being the states of the portraits
    CG-Tespy committed Oct 31, 2021
    Configuration menu
    Copy the full SHA
    49112ae View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0c3a26f View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2021

  1. PortraitSaveState refactor for position field

    PortraitSaveState now saves the name of the position instead of the point in space said position is in. Makes things more flexible, like for when the user decides to slightly change the coords of a Stage Pos.
    CG-Tespy committed Nov 6, 2021
    Configuration menu
    Copy the full SHA
    84258ea View commit details
    Browse the repository at this point in the history
  2. Removed sibling index test, implemented stage name check test

    It doesn't seem like it'll be necessary to record the sibling indexes of the portraits, hence the removal
    CG-Tespy committed Nov 6, 2021
    Configuration menu
    Copy the full SHA
    2bc9efa View commit details
    Browse the repository at this point in the history
  3. Fixed error in stage name test, did cleanup, implemented correct char…

    …acter test
    
    Given how not all the setup can be done in one function call, all the tests will need to be IEnumerators
    CG-Tespy committed Nov 6, 2021
    Configuration menu
    Copy the full SHA
    6652199 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    428d6b7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e0436e4 View commit details
    Browse the repository at this point in the history
  6. Portrait indexes now saved instead of names. Added tests for said ind…

    …exes
    
    Indexes are a lot less volatile than names, hence it should lead to less problems if we just record indexes there.
    CG-Tespy committed Nov 6, 2021
    Configuration menu
    Copy the full SHA
    e7c0c3d View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2021

  1. Configuration menu
    Copy the full SHA
    8a12778 View commit details
    Browse the repository at this point in the history
  2. Added support for saving portrait names, fixed testing bugs caused by…

    … Dude
    
    Figured it might help code in backwards-compatible saves if we have the index AND the name registered, so...
    
    Also, a couple tests broke due to adding the Character named Dude. Fixed those
    CG-Tespy committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    03c639f View commit details
    Browse the repository at this point in the history
  3. Refactored all InfoStructs as ISaveUnits

    I realized that given the purpose of save units, there is no need to have info structs and save units be separate classes. The latter were just working as needless wrappers for the former.
    
    Some refactoring of the stage-saving tests was needed since the portrait state containers are now structs instead of classes.
    CG-Tespy committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    64ea9ec View commit details
    Browse the repository at this point in the history
  4. Renamed info structs to clarify their roles

    - Deleted the old VariableSaveUnit class
    - Renamed the info structs (VariableInfo, PortraitSaveState, etc) to reflect their roles as save units
    - Refactored tests and savers to fit the above changes
    CG-Tespy committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    f0f1c6e View commit details
    Browse the repository at this point in the history

Commits on Nov 9, 2021

  1. Adjustments to help pass portrait tests

    - Added generic DataSaver
    - Renamed PortraitStateSaver to PortraitSaver
    - Had portrait tests use the above saver
    CG-Tespy committed Nov 9, 2021
    Configuration menu
    Copy the full SHA
    2cc400b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2a8f0f1 View commit details
    Browse the repository at this point in the history

Commits on Nov 10, 2021

  1. Big Cleanup Nov 9 2021

    These changes were applied to the save sys code involved in the tests I've made.
    
    - Removed unnecessary usings
    - Put things under a new namespace for better code organization: LionManeSaveSys
    - Reorganized source files
    CG-Tespy committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    68b9bc5 View commit details
    Browse the repository at this point in the history

Commits on Nov 15, 2021

  1. Configuration menu
    Copy the full SHA
    a6dc646 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a152f19 View commit details
    Browse the repository at this point in the history

Commits on Nov 26, 2021

  1. Started work on command-saving tests, made Say Execution Count public

    I can't save the state of the Say Commands' execution counts when they're inaccessible from outside code, so I changed it into an auto-property
    CG-Tespy committed Nov 26, 2021
    Configuration menu
    Copy the full SHA
    cf5c252 View commit details
    Browse the repository at this point in the history

Commits on Nov 27, 2021

  1. Configuration menu
    Copy the full SHA
    f8caa14 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b86d056 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d0d6412 View commit details
    Browse the repository at this point in the history

Commits on Dec 3, 2021

  1. Configuration menu
    Copy the full SHA
    1b01107 View commit details
    Browse the repository at this point in the history
  2. Block execution counts saved

    This definitely matters for the Menu Command's HideIfVisited field, since that there depends on block execution counts
    CG-Tespy committed Dec 3, 2021
    Configuration menu
    Copy the full SHA
    1d4efb9 View commit details
    Browse the repository at this point in the history

Commits on Dec 10, 2021

  1. Configuration menu
    Copy the full SHA
    563aac2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    154c14a View commit details
    Browse the repository at this point in the history
  3. Remove MenuHideIfVisitedSaved test since it's no longer needed

    Hide If Visited procs based on the blocks' execution counts, and as making sure that is saved should depend on the Block-specific unit tests...
    CG-Tespy committed Dec 10, 2021
    Configuration menu
    Copy the full SHA
    36430d2 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8bd0863 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d8e7305 View commit details
    Browse the repository at this point in the history

Commits on Dec 16, 2021

  1. Refactor for making Blocks save in a more plug-and-play way

    What with how different Commands' states may need to be saved in different ways.
    CG-Tespy committed Dec 16, 2021
    Configuration menu
    Copy the full SHA
    b20a578 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3b6818b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e0b8050 View commit details
    Browse the repository at this point in the history
  4. Fixed CommandIndexesSaved test

    Before, it didn't properly check the block state before deciding whether the test was successful. And to make sure that the test passed, I had to alter the Block and Say Savers so they... well, properly had the command indexes saved.
    CG-Tespy committed Dec 16, 2021
    Configuration menu
    Copy the full SHA
    c23c61e View commit details
    Browse the repository at this point in the history

Commits on Dec 19, 2021

  1. Configuration menu
    Copy the full SHA
    d101b82 View commit details
    Browse the repository at this point in the history
  2. Removed SayCommandSaved test from BlockSavingTests, moved BlockExecution

    Since the stuff for saving the state of say commands should be in CommandSavingTests. And that stuff for checking the execution counts of blocks should be in BlockSavingTests
    CG-Tespy committed Dec 19, 2021
    Configuration menu
    Copy the full SHA
    8268a31 View commit details
    Browse the repository at this point in the history

Commits on Dec 19, 2022

  1. Configuration menu
    Copy the full SHA
    4e492fb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8780d8e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ed94af5 View commit details
    Browse the repository at this point in the history
  4. Save units are no longer structs

    Since they can potentially hold thousands of bytes (the GameSaveData and UISaveData most likely will), which is too much for a struct
    CG-Tespy committed Dec 19, 2022
    Configuration menu
    Copy the full SHA
    b68a9a4 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b602970 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ec62423 View commit details
    Browse the repository at this point in the history
  7. Refactored Contents fields out of SaveUnit classes

    Any client code can also set the typenames in case there's any need to differentiate instances beyond just their class, like with VariableSaveUnit
    CG-Tespy committed Dec 19, 2022
    Configuration menu
    Copy the full SHA
    795f27d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    cd42c31 View commit details
    Browse the repository at this point in the history

Commits on Dec 24, 2022

  1. Configuration menu
    Copy the full SHA
    228d16a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    944b0dd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    041280d View commit details
    Browse the repository at this point in the history