チケット #42683

Lua: basic player editing API

登録: 2021-07-31 02:20 最終更新: 2022-04-09 07:13

報告者:
担当者:
(未割り当て)
チケットの種類:
状況:
オープン
コンポーネント:
マイルストーン:
優先度:
5 - 中
重要度:
5 - 中
解決法:
なし
ファイル:
なし

詳細

Sub-ticket of #42501. Sciencebox editing is handled separately in #42502. Player server API should be extended with:

  • bool :rename(string new_plr_name)
  • bool :set_nation(Nation_Type nation)
  • bool :gov_change(Gov_Type government, int revolen = -1) -- edithand.c behaviour: normal govs are set immediately, gov during revolution starts untargeted revolution to anarchy with the default turns, if it is not allowed, it sends a notice to the player
  • bool :forget_tech(Tech_Type tech = NULL || int tech_id) -- edithand.c: reduces player.techs_researched
  • bool .scenario_reserved -- player flag
  • void :set_scenario_reserved(bool flag)

Server Gov_Type API must have int .changed_to property to control revolution length properly. Probably it should have also :revolution_length(Player revolter) method to get the default length (uses RNG in certain modes).

Common API should include Gov_Type game.government_during_revolution ruleset constant. Maybe we also need a constant enum for pretty checking of revolen mode option. Also, let's add here int (Player).age since it is shown in the form.

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

2021-07-31 02:20 更新者: ihnatus
  • 新しいチケット "Lua: basic player editing API" が作成されました
2021-07-31 02:58 更新者: ihnatus
  • 詳細が更新されました
2022-04-09 07:13 更新者: cazfi
  • マイルストーンS3_1 d3f (完了済み) から S3_2 d3f に更新されました
  • コンポーネント(未割り当て) から Scripting API に更新されました

添付ファイルリスト

添付ファイルはありません

編集

ログインしていません。ログインしていない状態では、コメントに記載者の記録が残りません。 » ログインする