Ticket #44591

Savegame conversion for irrigation/cultivate & mine/plant from 2.6 broken

Open Date: 2022-05-14 21:21 Last Update: 2022-05-15 11:07

Reporter:
Owner:
Type:
Status:
Open [Owner assigned]
Component:
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Accepted
File:
2

Details

Loading savegame from #44419 to master produces errors. The savegame has been saved from 2.6.5.

Looks like a problem in terrain transforming irrigate / mine conversion to cultivate / plant.

1: Unit doing illegal activity in savegame!
1: Activity: Mine, Target: Mine

and

1: Unit doing illegal activity in savegame!
1: Activity: Irrigate, Target: Irrigation

Ticket History (3/7 Histories)

2022-05-14 21:21 Updated by: cazfi
  • New Ticket "Savegame conversion for irrigation/cultivate & mine/plant from 2.6 broken" created
2022-05-14 21:21 Updated by: cazfi
  • Details Updated
2022-05-15 10:35 Updated by: cazfi
  • Milestone Update from (None) to 3.1.0
  • Component Update from (None) to General
Comment

This is due to next_extra_for_tile() -> can_build_extra() not checking if irrigation_time/mining_time for the terrain is zero to disable extra building. Thus they propose converting some activities to extra building ones (they think they find suitable extra target) when they should not.

Fix should consider multi-cause extras, i.e., we should not simply add checks similar to existing road_time/base_time checks in can_build_extra() - I think those are already wrong.

2022-05-15 10:51 Updated by: None
Comment

Reply To cazfi

Fix should consider multi-cause extras, i.e., we should not simply add checks similar to existing road_time/base_time checks in can_build_extra() - I think those are already wrong.

Looking at EC_PLACE stuff, they are the correct way. The rule is that even for multi-cause extras (such as EC_PLACE + EC_ROAD), simply having EC_ROAD as one of the causes makes the extra to require that it's possible to build a road to the tile. Well, that does make a sense too - if something counts as a road, it can't be built where a road cannot be built. Especially the EC_BASE conflict with city tile even for multi-cause extra is absolutely necessary (EC_BASE can bring functionality that is prohibited at city tile)

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login