public static TownID Read(BinaryData data, int offset) { var ret = new TownID(); ret.UniqueID = data.ReadU32(offset); ret.Name = data.ReadString(offset + 0x04, 10); ret.Unknown = data.ReadU32(offset + 0x18); return(ret); }
public static PersonalID Read(BinaryData data, int offset) { var ret = new PersonalID(); ret.TownId = TownID.Read(data, offset); ret.UniqueId = data.ReadU32(offset + 0x1C); ret.Name = data.ReadString(offset + 0x20, 10); return(ret); }
/// <param name="company">The company.</param><param name="town">The town.</param> public AIEventExclusiveTransportRights(CompanyID company, TownID town) : base(AIEventType.ET_EXCLUSIVE_TRANSPORT_RIGHTS, company, town) { throw null; }
/// <param name="town">The town that was created.</param> public AIEventTownFounded(TownID town) : base(AIEventType.ET_TOWN_FOUNDED) { throw null; }
public TownNode(TownID townId, Point location, string name) { this.TownId = townId; this.Location = location; this.Name = name; }
/** * Get the name of the town. * @param town_id The town to get the name of. * @returns The name of the town. */ public static string GetName(TownID town_id) { throw null; }
/** * Get the road layout for a town. * @param town_id The town to get the road layout from. * @returns The RoadLayout for the town. */ public static RoadLayout GetRoadLayout(TownID town_id) { throw null; }
/** * Get the rating of a company within a town. * @param town_id The town to get the rating for. * @param company_id The company to get the rating for. * @returns The rating as shown to humans. */ public static TownRating GetRating(TownID town_id, CompanyID company_id) { throw null; }
/** * Get the square distance from the tile to the AITown.GetLocation() * of the town. * @param town_id The town to get the distance to. * @param tile The tile to get the distance to. * @returns The distance between town and tile. */ public static int GetDistanceSquareToTile(TownID town_id, TileIndex tile) { throw null; }
/** * Get the manhattan distance from the tile to the AITown.GetLocation() * of the town. * @param town_id The town to get the distance to. * @param tile The tile to get the distance to. * @returns The distance between town and tile. */ public static int GetDistanceManhattanToTile(TownID town_id, TileIndex tile) { throw null; }
/** * Get the amount of days between town growth. * @param town_id The index of the town. * @returns Amount of days between town growth, or TOWN_GROWTH_NONE. * @note This function does not indicate when it will grow next. It only tells you the time between growths. */ public static int GetGrowthRate(TownID town_id) { throw null; }
/** * Get the amount of cargo that needs to be delivered (per TownEffect) for a * town to grow. All goals need to be reached before a town will grow. * @param town_id The index of the town. * @param towneffect_id The index of the towneffect. * @returns The goal of the cargo. * @note Goals can change over time. For example with a changing snowline, or * with a growing town. */ public static int GetCargoGoal(TownID town_id, TownEffect towneffect_id) { throw null; }
/** * Get the total amount of cargo effects received by a town last month. * @param town_id The index of the town. * @param towneffect_id The index of the cargo. * @returns The amount of cargo received by this town last month for this cargo effect. */ public static int GetLastMonthReceived(TownID town_id, TownEffect towneffect_id) { throw null; }
/** * Get the percentage of transported production of the given cargo at a town. * @param town_id The index of the town. * @param cargo_id The index of the cargo. * @returns The percentage of given cargo transported from this town last month. */ public static int GetLastMonthTransportedPercentage(TownID town_id, CargoID cargo_id) { throw null; }
/** * Get the total amount of cargo supplied from a town last month. * @param town_id The index of the town. * @param cargo_id The index of the cargo. * @returns The amount of cargo supplied for transport from this town last month. */ public static int GetLastMonthSupplied(TownID town_id, CargoID cargo_id) { throw null; }
/** * Find out if an action can currently be performed on the town. * @param town_id The town to perform the action on. * @param town_action The action to perform on the town. * @returns True if and only if the action can performed. */ public static bool IsActionAvailable(TownID town_id, TownAction town_action) { throw null; }
/** * Perform a town action on this town. * @param town_id The town to perform the action on. * @param town_action The action to perform on the town. * @returns True if the action succeeded. */ public static bool PerformTownAction(TownID town_id, TownAction town_action) { throw null; }
/** * Find out if this tile is within the rating influence of a town. * If a station sign would be on this tile, the servicing quality of the station would * influence the rating of the town. * @param town_id The town to check. * @param tile The tile to check. * @returns True if the tile is within the rating influence of the town. */ public static bool IsWithinTownInfluence(TownID town_id, TileIndex tile) { throw null; }
/** * Get the maximum level of noise that still can be added by airports * before the town start to refuse building a new airport. * @param town_id The town to get the allowed noise from. * @returns The noise that still can be added. */ public static int GetAllowedNoise(TownID town_id) { throw null; }
/** * Find out if this town has a statue for the current company. * @param town_id The town to check. * @returns True if the town has a statue. */ public static bool HasStatue(TownID town_id) { throw null; }
/** * Checks whether the given town index is valid. * @param town_id The index to check. * @returns True if and only if the town is valid. */ public static bool IsValidTown(TownID town_id) { throw null; }
/** * Find out if the town is a city. * @param town_id The town to check. * @returns True if the town is a city. */ public static bool IsCity(TownID town_id) { throw null; }
/** * Make a normal road tile. * @param t Tile to make a normal road. * @param bits Road bits to set for all present road types. * @param rot New present road types. * @param town Town ID if the road is a town-owned road. * @param road New owner of road. * @param tram New owner of tram tracks. */ public static void MakeRoadNormal(this TileIndex t, RoadBits bits, RoadTypes rot, TownID town, Owner road, Owner tram) { TileMap.SetTileType(t, TileType.MP_ROAD); TileMap.SetTileOwner(t, road); Map._m[t].m2 = town; Map._m[t].m3 = (BitMath.HasBit(rot, RoadType.ROADTYPE_TRAM) ? bits : 0); Map._m[t].m4 = 0; Map._m[t].m5 = (BitMath.HasBit(rot, RoadType.ROADTYPE_ROAD) ? bits : 0) | RoadTileType.ROAD_TILE_NORMAL << 6; BitMath.SB(Map._me[t].m6, 2, 4, 0); Map._me[t].m7 = rot << 6; SetRoadOwner(t, RoadType.ROADTYPE_TRAM, tram); }
/** * Find out how long the town is undergoing road reconstructions. * @param town_id The town to check. * @returns The number of months the road reworks are still going to take. * The value 0 means that there are currently no road reworks. */ public static int GetRoadReworkDuration(TownID town_id) { throw null; }
/** * Set the town index for a road or house tile. * @param t the tile * @param index the index of the town * @pre TileMap.IsTileType(t, TileType.MP_HOUSE) or TileMap.IsTileType(t, TileType.MP_ROAD) but not a road depot */ public static void SetTownIndex(this TileIndex t, TownID index) { Debug.Assert(TileMap.IsTileType(t, TileType.MP_HOUSE) || (TileMap.IsTileType(t, TileType.MP_ROAD) && !t.IsRoadDepot())); Map._m[t].m2 = index; }
/** * Find out how long new buildings are still being funded in a town. * @param town_id The town to check. * @returns The number of months building construction is still funded. * The value 0 means that there is currently no funding. */ public static int GetFundBuildingsDuration(TownID town_id) { throw null; }
/// <param name="event">The eventtype.</param><param name="company">The company.</param><param name="town">The town.</param> public AIEventCompanyTown(AIEvent.AIEventType @event, CompanyID company, TownID town) : base(@event) { throw null; }
/** * Find out which company currently has the exclusive rights of this town. * @param town_id The town to check. * @returns The company that has the exclusive rights. The value * AICompany.COMPANY_INVALID means that there are currently no * exclusive rights given out to anyone. */ public static CompanyID GetExclusiveRightsCompany(TownID town_id) { throw null; }
/// <param name="company">The company.</param><param name="town">The town.</param> public AIEventRoadReconstruction(CompanyID company, TownID town) : base(AIEventType.ET_ROAD_RECONSTRUCTION, company, town) { throw null; }
/** * Find out how long the town is under influence of the exclusive rights. * @param town_id The town to check. * @returns The number of months the exclusive rights hold. * The value 0 means that there are currently no exclusive rights * given out to anyone. */ public static int GetExclusiveRightsDuration(TownID town_id) { throw null; }