Skip to content

Commit

Permalink
Publicize CurrentRestMode
Browse files Browse the repository at this point in the history
  • Loading branch information
jefetienne committed Nov 16, 2020
1 parent 0b8ab9d commit 29e2616
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
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

0 comments on commit 29e2616

Please sign in to comment.