public MultiTiledObject(BasicItemInformation info, Vector2 TileLocation)
     : base(info, TileLocation)
 {
     this.objects       = new Dictionary <Vector2, StardewValley.Object>();
     this.childrenGuids = new Dictionary <Vector2, Guid>();
     this.guid          = Guid.NewGuid();
 }
示例#2
0
 /// <summary>Construct an instance.</summary>
 public CustomObject(BasicItemInformation info, Vector2 TileLocation)
     : base(info, TileLocation)
 {
     this.info = info;
     this.initializeBasics();
     this.guid = Guid.NewGuid();
 }
示例#3
0
 public MultiTiledObject(CustomObjectData PyTKData, BasicItemInformation info, Vector2 TileLocation, Dictionary <Vector2, MultiTiledComponent> ObjectsList)
     : base(PyTKData, info, TileLocation)
 {
     this.objects       = new Dictionary <Vector2, StardewValley.Object>();
     this.childrenGuids = new Dictionary <Vector2, Guid>();
     foreach (var v in ObjectsList)
     {
         MultiTiledComponent component = (MultiTiledComponent)v.Value.getOne();
         this.addComponent(v.Key, component);
     }
 }
 public MultiTiledObject(BasicItemInformation info, Vector2 TileLocation, Dictionary <Vector2, MultiTiledComponent> ObjectsList)
     : base(info, TileLocation)
 {
     this.objects       = new Dictionary <Vector2, StardewValley.Object>();
     this.childrenGuids = new Dictionary <Vector2, Guid>();
     foreach (var v in ObjectsList)
     {
         MultiTiledComponent component = (MultiTiledComponent)v.Value.getOne();
         this.addComponent(v.Key, (component as MultiTiledComponent));
     }
     this.guid = Guid.NewGuid();
 }
示例#5
0
 public MultiTiledObject(CustomObjectData PyTKData, BasicItemInformation info, Vector2 TileLocation)
     : base(PyTKData, info, TileLocation)
 {
     this.objects       = new Dictionary <Vector2, StardewValley.Object>();
     this.childrenGuids = new Dictionary <Vector2, Guid>();
 }
示例#6
0
        public override ICustomObject recreate(Dictionary <string, string> additionalSaveData, object replacement)
        {
            BasicItemInformation data = (BasicItemInformation)CustomObjectData.collection[additionalSaveData["id"]];

            return(new CustomObject(data, (replacement as Chest).TileLocation));
        }
 public MultiTiledComponent(BasicItemInformation info, Vector2 TileLocation, Vector2 offsetKey, MultiTiledObject obj = null) : base(info, TileLocation)
 {
     this.offsetKey       = offsetKey;
     this.containerObject = obj;
 }
示例#8
0
 /// <summary>
 /// Syncs all of the info to all players.
 /// </summary>
 /// <param name="syncData"></param>
 public override void sync(Dictionary <string, string> syncData)
 {
     Revitalize.ModCore.log("SYNC OBJECT DATA!");
     base.sync(syncData);
     this.info = Revitalize.ModCore.Serializer.DeserializeFromJSONString <BasicItemInformation>(syncData["BasicItemInfo"]);
 }
 public MultiTiledComponent(BasicItemInformation info) : base(info)
 {
 }
示例#10
0
 public GarbageTest(BasicItemInformation info, Vector2 TileLocation) : base(info, TileLocation)
 {
 }
示例#11
0
 public GarbageTest(BasicItemInformation info) : base(info)
 {
 }
 public MultiTiledComponent(CustomObjectData PyTKData, BasicItemInformation info, Vector2 TileLocation, MultiTiledObject obj = null) : base(PyTKData, info, TileLocation)
 {
     this.containerObject = obj;
 }
 public MultiTiledComponent(CustomObjectData PyTKData, BasicItemInformation info) : base(PyTKData, info)
 {
 }