diff --git a/GeneralMods/HappyBirthday/Framework/Events/EventHelper.cs b/GeneralMods/HappyBirthday/Framework/Events/EventHelper.cs index aecbacc5..3fa9c7fb 100644 --- a/GeneralMods/HappyBirthday/Framework/Events/EventHelper.cs +++ b/GeneralMods/HappyBirthday/Framework/Events/EventHelper.cs @@ -43,15 +43,17 @@ namespace Omegasis.HappyBirthday.Framework.Events private StringBuilder eventData; + public int eventID; + public EventHelper() { } - public EventHelper(TimePrecondition Time, EventDayExclusionPrecondition NotTheseDays) + public EventHelper(int ID,TimePrecondition Time, EventDayExclusionPrecondition NotTheseDays) { this.eventData = new StringBuilder(); - + this.eventID = ID; this.add(Time); this.add(NotTheseDays); @@ -140,6 +142,11 @@ namespace Omegasis.HappyBirthday.Framework.Events return s.Substring(0, 4); } + private string getEventID() + { + return this.getUniqueEventStartID() + this.eventID.ToString(); + } + /// /// Checks to ensure I don't create a id value that is too big for nexus. /// @@ -161,5 +168,15 @@ namespace Omegasis.HappyBirthday.Framework.Events if (Convert.ToInt32(IDToCheck) > 2147483647 ||Convert.ToInt32(IDToCheck) < 0) return false; else return true; } + + public virtual string getEventString() + { + return this.eventData.ToString(); + } + + public virtual StardewValley.Event getEvent(Farmer PlayerActor=null) + { + return new StardewValley.Event(this.getEventString(), Convert.ToInt32(this.getEventID()), PlayerActor); + } } }