private void Awake() { context = this; modEnabled = Config.Bind <bool>("General", "Enabled", true, "Enable this mod"); isDebug = Config.Bind <bool>("General", "IsDebug", false, "Enable debug logs"); nexusID = Config.Bind <int>("General", "NexusID", 1346, "Nexus mod ID for updates"); modKey = Config.Bind <string>("Strings", "LockModKey", "left ctrl", "Modifier key used to create and lock/unlock a lockable door when interacting."); renameModKey = Config.Bind <string>("Strings", "RenameModKey", "left alt", "Modifier key used to rename a lockable door when interacting."); doorName = Config.Bind <string>("Strings", "DoorName", "{0} Door [Locked:{1}]", "Name of door - replaces {0} with the door coordinates or name and {1} with locked status."); keyName = Config.Bind <string>("Strings", "KeyName", "{0} Door Key", "Name of key - replaces {0} with the door coordinates."); keyDescription = Config.Bind <string>("Strings", "KeyDescription", "Opens {0} Door.", "Description of key in tooltip - replaces {0} with the door name."); lockedMessage = Config.Bind <string>("Strings", "LockedMessage", "Door locked: {0}", "Message to show when locking/unlocking the door. Replaces {0} with true or false."); namePrompt = Config.Bind <string>("Strings", "NamePrompt", "Enter Name for Door:", "Prompt to show when naming a door / key pair."); defaultName = Config.Bind <string>("Strings", "DefaultName", "Locked", "Default name for a door if left blank."); needKeyToClose = Config.Bind <bool>("Toggles", "NeedKeyToClose", false, "Require key in order to close a door as well as open it."); promptNameOnCreate = Config.Bind <bool>("Toggles", "PromptNameOnCreate", true, "Prompt to enter a name for the door / key pair on creation."); maxDoorNames = Config.Bind <int>("Variables", "maxDoorNames", 20, "Max door names before removing old names."); doorNames = Config.Bind <string>("ZAuto", "DoorNames", "", "List of doorName:coord pairs, populated when renaming your doors."); LoadAssets(); LoadDoorNames(); Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), null); }
public void SetText(string text) { this.text = text; BepInExPlugin.SetDoorName(guid, text); }