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

Feature: Moveable depots #6328 #7051

Closed
wants to merge 6 commits into from
Closed

Feature: Moveable depots #6328 #7051

wants to merge 6 commits into from

Conversation

Eddi-z
Copy link
Contributor

@Eddi-z Eddi-z commented Jan 12, 2019

patch imported from flyspray
minor conflict resolved
savegame bump rebased (TODO: put correct version info) now resolved with new saveload enum
patch queue seems "unclean" (partial patch did not compile, whole queue does) now resolved by reordering some patches

@andythenorth
Copy link
Contributor

@andythenorth andythenorth commented Jan 12, 2019

Gave this 5 minutes of testing, initial impressions are that all worked as expected. Vehicle orders are preserved for up to 1 month, then invalidated if the depot isn't rebuilt by then. The search radius for 'preserve depot' seems to be about 8 tiles or so. In use, it's pretty neat.

FWIW, adf88 considered there was more to do on the original patch #6328 (comment)

However it might be useful as is.

@andythenorth
Copy link
Contributor

@andythenorth andythenorth commented Jan 12, 2019

From CI: 2019-01-12T22:39:23.2400344Z Running ai/regression/tst_regression... failed!

@glx22
Copy link
Contributor

@glx22 glx22 commented Jan 13, 2019

First regression error is at main.nut:1062, it's because the rail depot list is empty but it shouldn't as a rail depot as been built.

Second regression error is at main.nut:1167, it's because the road depot list actually contains the water depot list.

src/script/api/script_depotlist.cpp Outdated Show resolved Hide resolved
@@ -2092,7 +2078,7 @@ bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth, bool
v->IncrementRealOrderIndex();
} else {
if (v->type != VEH_AIRCRAFT) {
v->SetDestTile(Depot::Get(order->GetDestination())->xy);
v->SetDestTile(v->GetOrderDepotLocation(order->GetDestination()));
} else {
Copy link
Contributor Author

@Eddi-z Eddi-z Feb 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm not 100% sure i correctly resolved conflicts with 3e0e3cf and 81330b8 here

@PeterN PeterN added this to the 1.10.0 milestone Mar 4, 2019
@PeterN
Copy link
Member

@PeterN PeterN commented Mar 21, 2019

@Eddi-z will you update this?

@Eddi-z Eddi-z force-pushed the 6328 branch 2 times, most recently from bf40b42 to df86ea9 Compare Mar 21, 2019
@Eddi-z
Copy link
Contributor Author

@Eddi-z Eddi-z commented Mar 21, 2019

So, i resolved the saveload part, but the viewport part is way over my head with the kdtree changes.

@nielsmh
Copy link
Contributor

@nielsmh nielsmh commented Apr 4, 2019

I rebased this branch and updated it to use Kdtree here: https://github.com/nielsmh/OpenTTD/tree/movable-depots
Since I rebased I can't make a PR, and I don't want to push to Eddi's branch without an ok first.

Update: Got an ok on IRC.

src/depot.cpp Outdated Show resolved Hide resolved
src/depot_cmd.cpp Outdated Show resolved Hide resolved
@PeterN
Copy link
Member

@PeterN PeterN commented Apr 8, 2019

Found a crash:

  1. Build a depot
  2. Build an engine
  3. Sell the engine
  4. Bulldoze the depot
  5. Profit?

Something to do with Order backups...

@LordAro
Copy link
Member

@LordAro LordAro commented Aug 17, 2019

Hi, there's been no activity on this for over 4 months. If no more effort will be put into this PR, it will be closed in the next week or so

J0anJosep added a commit to J0anJosep/OpenTTD that referenced this issue Dec 30, 2021
J0anJosep added a commit to J0anJosep/OpenTTD that referenced this issue Jan 5, 2022
J0anJosep added a commit to J0anJosep/OpenTTD that referenced this issue Jan 5, 2022
J0anJosep added a commit to J0anJosep/OpenTTD that referenced this issue Jan 6, 2022
J0anJosep added a commit to J0anJosep/OpenTTD that referenced this issue Jan 6, 2022
J0anJosep added a commit to J0anJosep/OpenTTD that referenced this issue Jan 7, 2022
J0anJosep added a commit to J0anJosep/OpenTTD that referenced this issue Jan 7, 2022
J0anJosep added a commit to J0anJosep/OpenTTD that referenced this issue Jan 9, 2022
J0anJosep added a commit to J0anJosep/OpenTTD that referenced this issue Jan 9, 2022
J0anJosep added a commit to J0anJosep/OpenTTD that referenced this issue Jan 16, 2022
J0anJosep added a commit to J0anJosep/OpenTTD that referenced this issue Jan 29, 2022
J0anJosep added a commit to J0anJosep/OpenTTD that referenced this issue Feb 5, 2022
J0anJosep added a commit to J0anJosep/OpenTTD that referenced this issue Feb 5, 2022
J0anJosep added a commit to J0anJosep/OpenTTD that referenced this issue Feb 12, 2022
J0anJosep added a commit to J0anJosep/OpenTTD that referenced this issue Feb 13, 2022
J0anJosep added a commit to J0anJosep/OpenTTD that referenced this issue Feb 20, 2022
J0anJosep added a commit to J0anJosep/OpenTTD that referenced this issue Apr 2, 2022
J0anJosep added a commit to J0anJosep/OpenTTD that referenced this issue Apr 2, 2022
J0anJosep added a commit to J0anJosep/OpenTTD that referenced this issue Apr 16, 2022
J0anJosep added a commit to J0anJosep/OpenTTD that referenced this issue May 7, 2022
J0anJosep added a commit to J0anJosep/OpenTTD that referenced this issue May 7, 2022
J0anJosep added a commit to J0anJosep/OpenTTD that referenced this issue Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants