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
Publicize CurrentRestMode #1965
Conversation
I'm happy to leave in IsLoitering and IsResting for overall compatibility. Thank you for fix! :) |
I'm currently tracking some regression: And git bisect points at commit 29e2616 |
Test game save, if you need one (thinking of it, it may not be the best save, it's in the middle of the ocean thanks to an issue with Interesting Terrains!) |
Maybe the removal of If not, should we create a quick issue for this one? I'm starting to unplug a little for Christmas and don't want to lose track. |
I think the issue is because when the window is pushed, it may still be using the last rest mode stored in GameManager because of an interruption. I'll take a look at it. |
That was my guess too, but I'm not sure how to emulate that back with a property. diff --git a/Assets/Scripts/Game/UserInterfaceWindows/DaggerfallRestWindow.cs b/Assets/Scripts/Game/UserInterfaceWindows/DaggerfallRestWindow.cs
index c359ac45c..273777315 100644
--- a/Assets/Scripts/Game/UserInterfaceWindows/DaggerfallRestWindow.cs
+++ b/Assets/Scripts/Game/UserInterfaceWindows/DaggerfallRestWindow.cs
@@ -116,6 +116,7 @@ namespace DaggerfallWorkshop.Game.UserInterfaceWindows
: base(uiManager)
{
this.ignoreAllocatedBed = ignoreAllocatedBed;
+ currentRestMode = RestModes.Selection;
}
#endregion and it seems to work... |
I think maybe putting it in OnPush() might be better? I forget how often the methods Start(), Setup() and the Constructor() are called when opening the window multiple times, but I know OnPush() is every time. |
Well, I think removed line
was only executed once too, when the window was built... |
Description of the bug in comments of the Interkarma#1965 PR
I created a PR |
Great work, thank you @petchema and @jefetienne. |
Fix regression introduced in #1965
This is for issue #1962.
This PR essentially would replace the utility of
PlayerEntity.IsLoitering
andPlayerEntity.IsResting
, but may be kept for mod compatibility reasons. I also have no problem with removing them if requested. :)I publicized the
RestModes
enum and kept it inDaggerfallRestWindow
, but I can move it elsewhere toDaggerfallUnityEnums
if mod compatibility is also not an issue.