equal
deleted
inserted
replaced
661 |
661 |
662 t = ClosestTownFromTile(tile, (uint)-1); //needed for town rating penalty |
662 t = ClosestTownFromTile(tile, (uint)-1); //needed for town rating penalty |
663 // check if you're allowed to remove the tunnel owned by a town |
663 // check if you're allowed to remove the tunnel owned by a town |
664 // removal allowal depends on difficulty settings |
664 // removal allowal depends on difficulty settings |
665 if (IsTileOwner(tile, OWNER_TOWN) && _game_mode != GM_EDITOR) { |
665 if (IsTileOwner(tile, OWNER_TOWN) && _game_mode != GM_EDITOR) { |
666 if (!CheckforTownRating(tile, flags, t, TUNNELBRIDGE_REMOVE)) { |
666 if (!CheckforTownRating(flags, t, TUNNELBRIDGE_REMOVE)) { |
667 SetDParam(0, t->index); |
667 SetDParam(0, t->index); |
668 return_cmd_error(STR_2009_LOCAL_AUTHORITY_REFUSES); |
668 return_cmd_error(STR_2009_LOCAL_AUTHORITY_REFUSES); |
669 } |
669 } |
670 } |
670 } |
671 |
671 |
786 |
786 |
787 t = ClosestTownFromTile(tile, (uint)-1); //needed for town rating penalty |
787 t = ClosestTownFromTile(tile, (uint)-1); //needed for town rating penalty |
788 // check if you're allowed to remove the bridge owned by a town. |
788 // check if you're allowed to remove the bridge owned by a town. |
789 // removal allowal depends on difficulty settings |
789 // removal allowal depends on difficulty settings |
790 if (IsTileOwner(tile, OWNER_TOWN) && _game_mode != GM_EDITOR) { |
790 if (IsTileOwner(tile, OWNER_TOWN) && _game_mode != GM_EDITOR) { |
791 if (!CheckforTownRating(tile, flags, t, TUNNELBRIDGE_REMOVE)) |
791 if (!CheckforTownRating(flags, t, TUNNELBRIDGE_REMOVE)) return CMD_ERROR; |
792 return CMD_ERROR; |
|
793 } |
792 } |
794 |
793 |
795 if (flags & DC_EXEC) { |
794 if (flags & DC_EXEC) { |
796 byte m5; |
795 byte m5; |
797 uint c = tile; |
796 uint c = tile; |