예제 #1
0
        public override Item getOne()
        {
            var result = new ToolRack(data);

            result.TileLocation = Vector2.Zero;
            result.BottomSlot   = BottomSlot;
            result.TopSlot      = TopSlot;
            return(result);
        }
예제 #2
0
        public override ICustomObject recreate(Dictionary <string, string> additionalSaveData, object replacement)
        {
            var customObjectData = CustomObjectData.collection[additionalSaveData["id"]];
            var replChest        = replacement as Chest;
            var toolRack         = new ToolRack(customObjectData, replChest.TileLocation);

            foreach (var itm in replChest.items)
            {
                if (itm is WateringCan)
                {
                    toolRack.BottomSlot = itm as WateringCan;
                }
                else
                {
                    toolRack.TopSlot = itm as Tool;
                }
            }
            return(toolRack);
        }