待辦事項 #44173

mapgen: Expand adjust_int_map() to take arbitrary target minimum

啟用日期: 2022-03-24 04:13 最後更新: 2022-03-26 21:33

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

細節

adjust_int_map() and adjust_int_map_filtered() in mapgen_utils.[ch] produce values going from zero to their given int_map_max. Expand these to also take an int_map_min, for use cases like the FIXME introduced in #44167.

Ticket History (3/4 Histories)

2022-03-24 04:13 Updated by: alienvalkyrie
  • New Ticket "mapgen: Expand adjust_int_map() to take arbitrary target minimum" created
2022-03-25 02:07 Updated by: alienvalkyrie
  • 負責人 Update from (無) to alienvalkyrie
  • 處理結果 Update from to Accepted
評語

Since there weren't too many places that use it, I decided to change the existing function and all call sites, rather than try and come up with a name for a new function – this way, those calls where the desired minimum is zero explicitly state that.

2022-03-26 21:33 Updated by: alienvalkyrie
  • 狀態 Update from 開啟 to 關閉
  • 處理結果 Update from Accepted to 修正

編輯

Please login to add comment to this ticket » 登入