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

Enable webclient cultivate/plant migration #179

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

cazfi
Copy link
Contributor

@cazfi cazfi commented Nov 7, 2021

This PR backports freeciv.org patch "Separate cultivate/plant time from irrigation/mining time". The two other backports included are there just to reduce textual conflict when the main patch was applied.

The reason for backporting this is that with dedicated cultivate_time and plant_time terrain properties, webclient can e.g. check if the ruleset has cultivate enabled for the terrain by "if (tile_terrain(ptile)['cultivate_time'] > 0)". This is likely needed when migrating webclient to use cultivate/plant actions.

As usual with ruleset format changes, only rulesets supplied by freeciv.org have been updated. FCW's custom rulesets have not been touched.

@Lexxie9952
Copy link
Owner

tile.js and helpdata.js will get broken on webclient from this?

cazfi added 3 commits November 7, 2021 18:58
Freeciv ticket: hrm #872127
Freeciv commit: fc7f19a899cbb92b6566de768db7b5059dcee57b

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
Freeciv ticket: hrm #872584
Freeciv commit: 0fd5f1851c28dd1570b5ff3901e5cb6aca7d4467

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
…e time

This changes ruleset format.

This adds terrain cultivate_time and plant_time to the network protocol.
Those should make it easier to migrate webclient to use Cultivate and
Plant actions.
(one can check "if (tile_terrain(ptile)['cultivate_time'] > 0)" to see
if cultivate is enabled for the tile by the ruleset.)

As FCW, unlike freeciv.org at the time original patch was made, still
supports targetless irrigate/mine, FCW specific changes were needed
to tile_activity_time()

Freeciv ticket: hrm #872777
Freeciv commit: 4247bee632e4a94064edb72e7c9f4055d6344516

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
@cazfi cazfi force-pushed the cultivate-migration branch from cd11eda to ebf1b31 Compare November 7, 2021 19:37
…time

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
@cazfi
Copy link
Contributor Author

cazfi commented Mar 19, 2022

tile.js and helpdata.js will get broken on webclient from this?

PR has later been updated with commits to handle that.

It's still preferable to merge #185 before this one, and check and possibly rebase this one in between.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants