待辦事項 #45021

Drop checks whether unit should be in game

啟用日期: 2022-07-05 11:21 最後更新: 2022-07-28 11:34

回報者:
負責人:
類型:
狀態:
關閉
元件:
里程碑:
優先權:
5 - 中
嚴重程度:
5 - 中
處理結果:
修正
檔案:
1

細節

Freeciv code often checks if unit tech req is A_NEVER, indicating that the unit isn't in the game at all.

That's relic from the time (obsolete at least 20 years) units were in a static array with fixed order, and those in the middle had to be marked as removed that way. With the current dynamically filled array we don't insert such units at all, and those checks are obsolete.

Get rid of them. Such a use of unit required_advance is also one of the bigger remaining blockers against #44927

Ticket History (3/5 Histories)

2022-07-05 11:21 Updated by: cazfi
  • New Ticket "Drop checks whether unit should be in game" created
2022-07-16 20:49 Updated by: cazfi
評語

Concern regarding savegame compatibility came up for similar "Never" support of techs: https://osdn.net/projects/freeciv/ticket/45115#comment:12505:45115:1657972075

2022-07-19 02:25 Updated by: cazfi
  • 負責人 Update from (無) to cazfi
  • 處理結果 Update from to Accepted
評語

Reply To cazfi

Concern regarding savegame compatibility came up for similar "Never" support of techs: https://osdn.net/projects/freeciv/ticket/45115#comment:12505:45115:1657972075

In case of units, it was already impossible to get such units to the game (prevented ruleset load time), and there are flags that can be used to mark unit as unbuildable etc.

2022-07-28 11:34 Updated by: cazfi
  • 狀態 Update from 開啟 to 關閉
  • 處理結果 Update from Accepted to 修正

編輯

Please login to add comment to this ticket » 登入