チケット #44730

Fix city_size limitations for units.ruleset

登録: 2022-05-31 03:53 最終更新: 2022-06-03 23:34

報告者:
担当者:
チケットの種類:
状況:
完了
コンポーネント:
マイルストーン:
優先度:
5 - 中
重要度:
5 - 中
解決法:
修正済み
ファイル:
2

詳細

A split of #44703 for all active branches.

Currently, city_size is lifted from non-positive values to 1 for units having "Settlers" flag. Obviously, it should be for units that can found cities that is for long a different category. Also, for them overflow of this value should be also fitted in (now, does not fail the application but breaks helptext and produces warnings).

EDIT: Tested the case. Underflow value emulates HQ9+ "+" operator and fails the ruleset to load. Overflow value takes the lower byte that may result in 0, then the city is actually deleted after creation. If we remove the "Settlers" flag from city builders, loads any values, for negative ones the lower byte goes to helptext but the city size is 1. Server complains only on bad unit type packet values. So yes, it needs to be fixed.

チケットの履歴 (12 件中 3 件表示)

2022-05-31 03:53 更新者: ihnatus
  • 新しいチケット "Fix city_size limitations for units.ruleset" が作成されました
2022-05-31 04:15 更新者: cazfi
コメント

Sounds like something that would still have a good chance to make it to 3.0.2 (in time). Can you make the patch relatively soon?

2022-05-31 04:59 更新者: ihnatus
  • 詳細が更新されました
2022-05-31 05:02 更新者: ihnatus
コメント

I'll try tomorrow.

2022-06-01 03:38 更新者: ihnatus
コメント

Patch for d3f branches. The check was moved into postprocessing to access actions cache. I don't know what meant the assignment to 1 before setting ok = false, likely some ruledit autofix, but we can live without it. I'll put it back in master.

2022-06-01 09:36 更新者: cazfi
コメント

S3_0 / S3_1 patch looks good (have not yet compiled or tested in)

The would do some changes to the master patch:
- Maybe rscompat_set_valid_value() function name should contain '_3_2' to indicate that it's something to clear out when the rscompat code is change to do 3.2 -> 3.3 update instead
- The rscompat update should be in the ruleset loading (ruleset.c), and the sanity check side should fail if the ruleset is not ok by then (no matter whether it was ok to begin with, or just fixed by the rscompat code)
- "(!compat->compat_mode || compat->version < RSFORMAT_3_2)" seems wrong (you probably mean to check for >= _3_2 and not < _3_2 (which means 3.1 in practice)), but you need to rework that part for the previous point anyway

2022-06-02 00:34 更新者: cazfi
  • 担当者(未割り当て) から cazfi に更新されました
  • 解決法なし から 受領 に更新されました
コメント

Sorry if you're just about to submit updated master patch, but as I'm not counting on it, I propose that at this point we push the S3_0 / S3_1 patch also to master (and we get the review period for that running immediately), and open a new ticket about further master changes.

2022-06-02 03:04 更新者: ihnatus
コメント

Reply To cazfi

Sorry if you're just about to submit updated master patch, but as I'm not counting on it, I propose that at this point we push the S3_0 / S3_1 patch also to master (and we get the review period for that running immediately), and open a new ticket about further master changes.

Well, it would be right, and I don't have the patch ready now any way.

2022-06-03 23:32 更新者: cazfi
コメント

Reply To cazfi

open a new ticket about further master changes.

-> #44747

2022-06-03 23:34 更新者: cazfi
  • 状況オープン から 完了 に更新されました
  • 解決法受領 から 修正済み に更新されました

編集

このチケットにコメントを追加するには、ログインが必要です » ログインする