Created
May 16, 2018 19:07
-
-
Save Wolfolo/c113fa31d6cf81ded843239f17f55541 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/road.cpp b/src/road.cpp | |
index 90a9702..3da1662 100644 | |
--- a/src/road.cpp | |
+++ b/src/road.cpp | |
@@ -75,7 +75,7 @@ RoadBits CleanUpRoadBits(const TileIndex tile, RoadBits org_rb) | |
/* Always connective */ | |
connective = true; | |
} else { | |
- const RoadBits neighbor_rb = GetAnyRoadBits(neighbor_tile, ROADTYPE_ROAD) | GetAnyRoadBits(neighbor_tile, ROADTYPE_TRAM); // TODO | |
+ const RoadBits neighbor_rb = GetAnyRoadBits(neighbor_tile, ROADTYPE_ROAD) | GetAnyRoadBits(neighbor_tile, ROADTYPE_TRAM); // TODO: check the entire RoadTypeIdentifier | |
/* Accept only connective tiles */ | |
connective = (neighbor_rb & mirrored_rb) != ROAD_NONE; | |
@@ -113,7 +113,7 @@ RoadBits CleanUpRoadBits(const TileIndex tile, RoadBits org_rb) | |
bool HasRoadTypeAvail(const CompanyID company, RoadTypeIdentifier rtid) | |
{ | |
if (company == OWNER_DEITY || company == OWNER_TOWN || _game_mode == GM_EDITOR || _generating_world) { | |
- return true; // TODO | |
+ return true; // TODO: should there be a proper check? | |
} else { | |
Company *c = Company::GetIfValid(company); | |
if (c == NULL) return false; | |
@@ -176,7 +176,7 @@ RoadSubTypes GetCompanyRoadtypes(CompanyID company, RoadType rt) | |
{ | |
RoadSubTypes rst = ROADSUBTYPES_NONE; | |
- if (rt == ROADTYPE_ROAD) rst |= ROADSUBTYPES_NORMAL; // Road is always available. // TODO | |
+ if (rt == ROADTYPE_ROAD) rst |= ROADSUBTYPES_NORMAL; // Road is always available. // TODO: check if the loaded grfs don't remove all the ROAD compatible types | |
Engine *e; | |
FOR_ALL_ENGINES_OF_TYPE(e, VEH_ROAD) { | |
@@ -270,7 +270,7 @@ RoadSubTypes ExistingRoadSubTypesForRoadType(RoadType rt, CompanyID c) | |
RoadSubTypes known_roadsubtypes = ROADSUBTYPES_NONE; | |
/* Road is always visible and available. */ | |
- if (rt == ROADTYPE_ROAD) known_roadsubtypes |= ROADSUBTYPES_NORMAL; // TODO | |
+ if (rt == ROADTYPE_ROAD) known_roadsubtypes |= ROADSUBTYPES_NORMAL; // TODO: check if the loaded grfs don't remove all the ROAD compatible types | |
/* Find used roadtypes */ | |
Engine *e; | |
diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp | |
index b09db01..db0045b 100644 | |
--- a/src/road_cmd.cpp | |
+++ b/src/road_cmd.cpp | |
@@ -1045,9 +1045,9 @@ CommandCost CmdBuildLongRoad(TileIndex start_tile, DoCommandFlag flags, uint32 p | |
/* Determine which road parts should be built. */ | |
if (!is_ai && start_tile != end_tile) { | |
/* Only build the first and last roadbit if they can connect to something. */ | |
- if (tile == end_tile && !CanConnectToRoad(tile, rtid.basetype, dir)) { // TODO | |
+ if (tile == end_tile && !CanConnectToRoad(tile, rtid.basetype, dir)) { // TODO: check the entire RoadTypeIdentifier | |
bits = DiagDirToRoadBits(ReverseDiagDir(dir)); | |
- } else if (tile == start_tile && !CanConnectToRoad(tile, rtid.basetype, ReverseDiagDir(dir))) { // TODO | |
+ } else if (tile == start_tile && !CanConnectToRoad(tile, rtid.basetype, ReverseDiagDir(dir))) { // TODO: check the entire RoadTypeIdentifier | |
bits = DiagDirToRoadBits(dir); | |
} | |
} else { | |
@@ -2367,7 +2367,7 @@ CommandCost CmdConvertRoad(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 | |
default: continue; | |
} | |
- /* Trying to convert other's road */ // TODO allow upgrade? | |
+ /* Trying to convert other's road */ | |
Owner owner = GetRoadOwner(tile, to_type.basetype); | |
if (!CanConvertRoadType(owner, to_type.basetype)) { | |
CommandCost ret = CheckOwnership(owner, tile); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment