[Freeciv-tickets] [freeciv] #42683: Lua: basic player editing API

Back to archive index
OSDN Ticket System norep****@osdn*****
Sat Jul 31 02:20:58 JST 2021


#42683: Lua: basic player editing API

  Open Date: 2021-07-30 20:20
Last Update: 2021-07-30 20:20

URL for this Ticket:
    https://osdn.net//projects/freeciv/ticket/42683
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=42683

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2021-07-30 20:20 Updated by: ihnatus
 * New Ticket "Lua: basic player editing API" created


---------------------------------------------------------------------
Ticket Status:

      Reporter: ihnatus
         Owner: (None)
          Type: Feature Requests
        Status: Open
      Priority: 5 - Medium
     MileStone: S3_1 d3f
     Component: (None)
      Severity: 5 - Medium
    Resolution: None
---------------------------------------------------------------------

Ticket details:

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.

-- 
Ticket information of Freeciv project
Freeciv Project is hosted on OSDN

Project URL: https://osdn.net/projects/freeciv/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/freeciv/ticket/42683
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=42683



More information about the Freeciv-tickets mailing list
Back to archive index