Can't override trade window
Posted: Tue Nov 02, 2021 10:23 pm
So I'm been trying to modify the trade window, by overriding it with a new one and using RegisterCustomUIWindow, for my UI mod. But I get the following error message when I do so.
I don't understand what the issue is exactly but I managed to pinpoint it being related to the constructor and specifically the WindowModes enum.
Anyone have any idea of what the issue might be?
Code: Select all
Error (): Constant does not match the defined type.
UnityEngine.Debug:LogError (object)
DaggerfallWorkshop.Game.Utility.ModSupport.ModManager:CompileFromSourceAssets (string[]) (at Assets/Game/Addons/ModSupport/ModManager.cs:774)
DaggerfallWorkshop.Game.Utility.ModSupport.Mod:CompileSourceToAssemblies () (at Assets/Game/Addons/ModSupport/Mod.cs:974)
DaggerfallWorkshop.Game.Utility.ModSupport.ModManager:Init () (at Assets/Game/Addons/ModSupport/ModManager.cs:698)
DaggerfallWorkshop.Game.Utility.ModSupport.ModManager:StateManager_OnStateChange (DaggerfallWorkshop.Game.StateManager/StateTypes) (at Assets/Game/Addons/ModSupport/ModManager.cs:1287)
DaggerfallWorkshop.Game.StateManager:TriggerStateChange (DaggerfallWorkshop.Game.StateManager/StateTypes) (at Assets/Scripts/Game/StateManager.cs:153)
DaggerfallWorkshop.Game.StateManager:ChangeState (DaggerfallWorkshop.Game.StateManager/StateTypes) (at Assets/Scripts/Game/StateManager.cs:91)
DaggerfallWorkshop.Game.StateManager:.ctor (DaggerfallWorkshop.Game.StateManager/StateTypes) (at Assets/Scripts/Game/StateManager.cs:57)
DaggerfallWorkshop.Game.GameManager:get_StateManager () (at Assets/Scripts/Game/GameManager.cs:118)
DaggerfallWorkshop.Game.Entity.PlayerEntity:Update (DaggerfallWorkshop.Game.Entity.DaggerfallEntityBehaviour) (at Assets/Scripts/Game/Entities/PlayerEntity.cs:373)
DaggerfallWorkshop.Game.Entity.DaggerfallEntityBehaviour:Update () (at Assets/Scripts/Game/Entities/DaggerfallEntityBehaviour.cs:81)
Code: Select all
public UTradeWindow(IUserInterfaceManager uiManager, DaggerfallBaseWindow previous = null, WindowModes windowMode = WindowModes.Sell, IGuild guild = null) : base(uiManager, previous)
{
}