Figured out clean way to do event actions. Yay.

This commit is contained in:
JoshuaNavarro 2019-12-04 01:33:28 -08:00
parent b5b6f500f9
commit b550f66233
1 changed files with 29 additions and 0 deletions

View File

@ -112,6 +112,16 @@ namespace Omegasis.HappyBirthday.Framework.Events
this.eventData.Append(Data.ToString()); this.eventData.Append(Data.ToString());
} }
public virtual void add(string Data)
{
if (this.eventData.Length > 0)
{
this.eventData.Append(this.getSeperator());
}
this.eventData.Append(Data);
}
/// <summary> /// <summary>
/// Converts the direction to enum. /// Converts the direction to enum.
@ -178,5 +188,24 @@ namespace Omegasis.HappyBirthday.Framework.Events
{ {
return new StardewValley.Event(this.getEventString(), Convert.ToInt32(this.getEventID()), PlayerActor); return new StardewValley.Event(this.getEventString(), Convert.ToInt32(this.getEventID()), PlayerActor);
} }
//~~~~~~~~~~~~~~~~//
// Actions //
//~~~~~~~~~~~~~~~~//
public virtual void addBigProp(int xTile, int yTile, int ID)
{
StringBuilder b = new StringBuilder();
b.Append("addBigProp ");
b.Append(xTile.ToString());
b.Append(" ");
b.Append(yTile.ToString());
b.Append(" ");
b.Append(ID.ToString());
this.add(b.ToString());
}
} }
} }