Skip to content

Saving enum bug #575

Open
Open
@qqqbbb

Description

@qqqbbb

Nautilus can not save or load config with techtypes when using certain mods

Steps to reproduce the bug with BZ

  1. Create a new project with this configFile
    public class Config : ConfigFile
    {
        public HashSet<TechType> hashSet = new HashSet<TechType> { TechType.Aerogel, TechType.ArcticPeeper };
    }
  1. Register the config with
    public static Config config { get; } = OptionsPanelHandler.RegisterModOptions<Config>();
  2. Compile the project and copy dll to SubnauticaZero\BepInEx\plugins
  3. Install any one of these mods:
    More modified Items
    Replenish ReactorRods
    Seatruck Armor Upgrades
    Seatruck Thermal And Solar
    SnowFox Perimeter Defense
    BaseLightSwitch
  4. Start the game with Nautilus BZ 1.0.0-pre.33
  5. Your config will not be saved when main menu loads because Nautilus throws "NullReferenceException: Object reference not set to an instance of an object at Newtonsoft.Json.Utilities.EnumUtils.InitializeValuesAndNames"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions