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

Publicize CurrentRestMode #1965

Merged
merged 1 commit into from
Nov 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions Assets/Scripts/Game/Entities/PlayerEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ public class PlayerEntity : DaggerfallEntity
public bool PreventNormalizingReputations { get { return preventNormalizingReputations; } set { preventNormalizingReputations = value; } }
public bool IsResting { get { return isResting; } set { isResting = value; } }
public bool IsLoitering { get; set; }
public DaggerfallRestWindow.RestModes CurrentRestMode { get; set; }
public Races Race { get { return (Races)RaceTemplate.ID; } }
public RaceTemplate RaceTemplate { get { return GetLiveRaceTemplate(); } }
public RaceTemplate BirthRaceTemplate { get { return raceTemplate; } set { raceTemplate = value; } }
Expand Down
13 changes: 11 additions & 2 deletions Assets/Scripts/Game/UserInterfaceWindows/DaggerfallRestWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ public class DaggerfallRestWindow : DaggerfallPopupWindow
protected const float loiterWaitTimePerHour = 1.25f;
protected const int cityCampingIllegal = 17;

protected RestModes currentRestMode = RestModes.Selection;
protected int minutesOfHour = 0;
protected int hoursRemaining = 0;
protected int totalHours = 0;
Expand All @@ -89,9 +88,19 @@ public class DaggerfallRestWindow : DaggerfallPopupWindow

#endregion

#region Properties

protected RestModes currentRestMode
{
get { return GameManager.Instance.PlayerEntity.CurrentRestMode; }
set { GameManager.Instance.PlayerEntity.CurrentRestMode = value; }
}

#endregion

#region Enums

protected enum RestModes
public enum RestModes
{
Selection,
TimedRest,
Expand Down