Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build on competitor canal #7937

Closed

Conversation

@SamuXarick
Copy link
Contributor

@SamuXarick SamuXarick commented Jan 14, 2020

Feature: Build on competitor canal

  1. Major feature: Canal Owners, it allows everything that is a canal or was built over a canal to have a 'canal owner'. Stuff like Canal, Ship Depot, Dock, Buoy, Lock, Oil Rig, Object, if built on a
    canal or if it is a canal, will have a 'canal owner'.
  • Querying these tiles will display 'Canal owner:' to retrieve the respective owner of that canal.
  • Added a game setting allowing or disallowing building over canals of competitors.
  • Savegame conversion.
  1. Another semi-major feature: Permanent rivers, which mean, rivers are indestructible, unless cheating or in the scenario editor.
  • Demolishing a canal that was built on rivers will restore the river.
  • Added a game setting that can turn on or off this feature.
  • Savegame conversion.
  1. Less relevant stuff:
  • Improved Lock pricing and infrastructure counting, to achieve better consistency.
@SamuXarick SamuXarick force-pushed the build-on-competitor-canal branch 4 times, most recently from 7e7775b to 0a980b9 Jan 15, 2020
@SamuXarick SamuXarick force-pushed the build-on-competitor-canal branch 6 times, most recently from fa30b50 to 4744095 Jan 19, 2020
@SamuXarick SamuXarick force-pushed the build-on-competitor-canal branch from 4744095 to 23b6222 Feb 9, 2020
@SamuXarick SamuXarick force-pushed the build-on-competitor-canal branch from 23b6222 to b6dd266 Feb 23, 2020
@SamuXarick
Copy link
Contributor Author

@SamuXarick SamuXarick commented Mar 4, 2020

Helpful files
build%20industry%20on%20competitor%20canal
Deity prospect || OWNER_DEITY | OWNER_TOWN | company 1 | fail | fail | fail
Deity build || OWNER_DEITY | OWNER_DEITY | company 1 | fail | fail | fail

ALL THESE WATERS ARE CANALS of Company 1.zip

Notes:

  • Buoys are no longer the owner of the water, now they're always OWNER_NONE (GetTileOwner)
  • GetTileOwner of a clear water tile canal should always be the same as GetCanalOwner (stores the same owner twice, they should not mismatch!)
  • The tile owner of LOCK_PART_LOWER and LOCK_PART_UPPER was either the owner of the water or the owner of the lock. The tile owner of LOCK_PART_MIDDLE was the real owner of the lock. Now, the tile owner of any lock part (GetTileOwner) is always the owner of the lock and is the same owner for the 3 lock parts.
  • The owner of the canal under LOCK_PART_LOWER and LOCK_PART_UPPER are retrieved via GetCanalOwner. GetCanalOwner of LOCK_PART_MIDDLE is the same as the owner of the lock.
  • LOCK_PART_MIDDLE may now be considered for canal infrastructure counts, but only if it's not built on a river tile. Previously it was never considered. Even though the owner of the lock is the same as the middle part, do not use GetCanalOwner on it if it was built on a river, because the water class of the tile is river in this situation, not canal! This is still done this way so that rivers can be restored when demolishing the lock.
  • Counting of lock infrastructure is no longer computed via middle tile with value 3 * LOCK_DEPOT_TILE_FACTOR while ignoring the upper and lower tile parts. Now each lock tile part is accounted for as a single LOCK_DEPOT_TILE_FACTOR. Since there are still 3 parts for each lock, the resulting value is the same. These changes greatly simplifies coding around many functions such as ChangeTileOwner_Water and those in company_sl.cpp

@SamuXarick SamuXarick force-pushed the build-on-competitor-canal branch 8 times, most recently from 3152f4a to 67f71ee Mar 5, 2020
@SamuXarick SamuXarick force-pushed the build-on-competitor-canal branch from 67f71ee to 8b6d76e Mar 30, 2020
@SamuXarick SamuXarick force-pushed the build-on-competitor-canal branch 4 times, most recently from d5d7528 to c38a97a May 12, 2020
SamuXarick and others added 3 commits Jul 12, 2020
1) Major feature: Canal Owners, it allows everything that is a canal or was built over a canal to have a 'canal owner'. Stuff like Canal, Ship Depot, Dock, Buoy, Lock, Oil Rig, Object, if built on a
canal or if it is a canal, will have a 'canal owner'.
- Querying these tiles will display 'Canal owner:' to retrieve the respective owner of that canal.
- Added a game setting allowing or disallowing building over canals of competitors.
- Savegame conversion.

2) Another semi-major feature: Permanent rivers, which mean, rivers are indestructible, unless cheating or in the scenario editor.
- Demolishing a canal that was built on rivers will restore the river.
- Added a game setting that can turn on or off this feature.
- Savegame conversion.

3) Less relevant stuff:
- Improved Lock pricing and infrastructure counting, to achieve better consistency.
@SamuXarick SamuXarick force-pushed the build-on-competitor-canal branch from c38a97a to 740a8ac Jul 12, 2020
@TrueBrain
Copy link
Member

@TrueBrain TrueBrain commented Dec 14, 2020

This patch is currently too big for our team to process, validate, and accept. This because of two reasons:

  1. we are currently a bit thin on developers that can look into patches of this size
  2. your past PRs have shown they require a higher level of "what is going on here". This is not meant in any bad way, you are clearly trying to learn C++ as we all have. But this puts an additional strain on the developers available.

I am really sorry about that, but that is simply what is current is So I am closing this for now, as it is unrealistic towards you to give the suggestion we will one day get to this .. it is very unlikely.

@TrueBrain TrueBrain closed this Dec 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants