diff --git a/CustomTable.cs b/CustomTable.cs index 6536c95..2662227 100644 --- a/CustomTable.cs +++ b/CustomTable.cs @@ -6,6 +6,8 @@ using TinyLife.Objects; using TinyLife.World; namespace ExampleMod { + // note that having a custom class for a furniture item like this is entirely optional + // but it allows for additional functionalities as displayed in this example public class CustomTable : Furniture { private static readonly Random Random = new(); diff --git a/ExampleMod.cs b/ExampleMod.cs index 8003f86..71f7bde 100644 --- a/ExampleMod.cs +++ b/ExampleMod.cs @@ -34,7 +34,10 @@ namespace ExampleMod { public override void AddGameContent(GameImpl game) { // adding a custom furniture item FurnitureType.Register(new FurnitureType.TypeSettings("ExampleMod.CustomTable", new Point(1, 1), ObjectCategory.Table, 150, ColorScheme.SimpleWood) { + // specify the type that should be constructed when this furniture type is placed + // if this is not specified, the Furniture class is used, which is used for furniture without special animations or data ConstructedType = typeof(CustomTable), + // specifying icons for custom clothes and furniture is optional, but using the mod's icon helps users recognize a mod's features Icon = this.Icon, // allow chairs and plates to be slotted into and onto the table ObjectSpots = ObjectSpot.TableSpots(new Point(1, 1)).ToArray()