/// <summary> /// Constructs a Structure on an adjacent Tile. /// </summary> /// <param name="tile">The Tile to construct the Structure on. It must have enough materials on it for a Structure to be constructed.</param> /// <param name="type">The type of Structure to construct on that Tile.</param> /// <returns>True if successfully constructed a structure, false otherwise.</returns> public bool Construct(Catastrophe.Tile tile, string type) { return(this.RunOnServer <bool>("construct", new Dictionary <string, object> { { "tile", tile }, { "type", type } })); }
/// <summary> /// Picks up some materials or food on or adjacent to the Unit's Tile. Does not count as an action. /// </summary> /// <param name="tile">The Tile to pickup materials/food from.</param> /// <param name="resource">The type of resource to pickup ('materials' or 'food').</param> /// <param name="amount">The amount of the resource to pickup. Amounts <= 0 will pickup as much as possible.</param> /// <returns>True if successfully picked up a resource, false otherwise.</returns> public bool Pickup(Catastrophe.Tile tile, string resource, int amount = 0) { return(this.RunOnServer <bool>("pickup", new Dictionary <string, object> { { "tile", tile }, { "resource", resource }, { "amount", amount } })); }
/// <summary> /// Moves this Unit from its current Tile to an adjacent Tile. /// </summary> /// <param name="tile">The Tile this Unit should move to.</param> /// <returns>True if it moved, false otherwise.</returns> public bool Move(Catastrophe.Tile tile) { return(this.RunOnServer <bool>("move", new Dictionary <string, object> { { "tile", tile } })); }
/// <summary> /// Removes materials from an adjacent Tile's Structure. You cannot deconstruct friendly structures (see Unit.attack). /// </summary> /// <param name="tile">The Tile to deconstruct. It must have a Structure on it.</param> /// <returns>True if successfully deconstructed, false otherwise.</returns> public bool Deconstruct(Catastrophe.Tile tile) { return(this.RunOnServer <bool>("deconstruct", new Dictionary <string, object> { { "tile", tile } })); }