예제 #1
0
/**
 * Make the given tile a roadstop tile.
 * @param t the tile to make a roadstop
 * @param o the owner of the roadstop
 * @param sid the station to which this tile belongs
 * @param rst the type of roadstop to make this tile
 * @param rt the roadtypes on this tile
 * @param d the direction of the roadstop
 */
        public static void MakeRoadStop(this TileIndex t, Owner o, StationID sid, RoadStopType rst, RoadTypes rt,
                                        DiagDirection d)
        {
            MakeStation(t, o, sid,
                        (rst == RoadStopType.ROADSTOP_BUS ? StationType.STATION_BUS : StationType.STATION_TRUCK), d);
            t.SetRoadTypes(rt);
            t.SetRoadOwner(RoadType.ROADTYPE_ROAD, o);
            t.SetRoadOwner(RoadType.ROADTYPE_TRAM, o);
        }
예제 #2
0
/**
 * Make the given tile a drivethrough roadstop tile.
 * @param t the tile to make a roadstop
 * @param station the owner of the roadstop
 * @param road the owner of the road
 * @param tram the owner of the tram
 * @param sid the station to which this tile belongs
 * @param rst the type of roadstop to make this tile
 * @param rt the roadtypes on this tile
 * @param a the direction of the roadstop
 */
        public static void MakeDriveThroughRoadStop(this TileIndex t, Owner station, Owner road, Owner tram,
                                                    StationID sid, RoadStopType rst, RoadTypes rt, Axis a)
        {
            MakeStation(t, station, sid,
                        (rst == RoadStopType.ROADSTOP_BUS ? StationType.STATION_BUS : StationType.STATION_TRUCK),
                        GFX_TRUCK_BUS_DRIVETHROUGH_OFFSET + a);
            t.SetRoadTypes(rt);
            t.SetRoadOwner(RoadType.ROADTYPE_ROAD, road);
            t.SetRoadOwner(RoadType.ROADTYPE_TRAM, tram);
        }
예제 #3
0
/**
 * Makes a road tunnel entrance
 * @param t the entrance of the tunnel
 * @param o the owner of the entrance
 * @param d the direction facing out of the tunnel
 * @param r the road type used in the tunnel
 */
        public static void MakeRoadTunnel(this TileIndex t, Owner o, DiagDirection d, RoadTypes r)
        {
            TileMap.SetTileType(t, TileType.MP_TUNNELBRIDGE);
            TileMap.SetTileOwner(t, o);
            Map._m[t].m2  = 0;
            Map._m[t].m3  = 0;
            Map._m[t].m4  = 0;
            Map._m[t].m5  = (byte)((int)TransportType.TRANSPORT_ROAD << 2 | (int)d);
            Map._me[t].m6 = BitMath.SB(Map._me[t].m6, 2, 4, 0);
            Map._me[t].m7 = 0;
            t.SetRoadOwner(RoadType.ROADTYPE_ROAD, o);
            if (o != Owner.OWNER_TOWN)
            {
                t.SetRoadOwner(RoadType.ROADTYPE_TRAM, o);
            }
            t.SetRoadTypes(r);
        }