Ejemplo n.º 1
0
        internal static async Task CancelProduction(Player player, int i, ISocketMessageChannel channel)
        {
            House house = await LoadHouse(player, channel);

            Sandbox sb = house.sandbox;
            await channel.SendMessageAsync(sb.tiles[i].Cancel(sb));

            await house.Save();

            await SandboxActions.InspectTile(player, sb, "house", i, channel);
        }
Ejemplo n.º 2
0
        public static async Task UpgradeTile(Player player, int index, ISocketMessageChannel chan)
        {
            House house = await LoadHouse(player, chan);

            Sandbox sb = house.sandbox;

            sb.UpgradeTile(sb.tiles[index]);
            await house.Save();

            await SandboxActions.InspectTile(player, sb, "house", sb.tiles.Count - 1, chan);
        }
Ejemplo n.º 3
0
        public static async Task BuildTile(Player player, SandboxTile.TileType type, ISocketMessageChannel chan)
        {
            House house = await LoadHouse(player, chan);

            Sandbox sb = house.sandbox;

            sb.Build(type);
            await house.Save();

            await SandboxActions.InspectTile(player, sb, "house", sb.tiles.Count - 1, chan);
        }
Ejemplo n.º 4
0
        internal static async Task Produce(Player player, int tileIndex, ProductionRecipe recipe, int amount, ISocketMessageChannel channel)
        {
            House house = await LoadHouse(player, channel);

            Sandbox sb = house.sandbox;

            recipe.Consume(sb, amount);
            sb.tiles[tileIndex].Start(recipe, amount);
            await house.Save();

            await SandboxActions.InspectTile(player, sb, "house", tileIndex, channel);
        }