[Freeciv-tickets] [freeciv] #44273: Lua: player losing method

Back to archive index
OSDN Ticket System norep****@osdn*****
Fri Apr 8 02:27:16 JST 2022


#44273: Lua: player losing method

  Open Date: 2022-04-02 23:14
Last Update: 2022-04-07 20:27

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

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

Last Changes/Comment on this Ticket:
2022-04-07 20:27 Updated by: cazfi

Comment:

The patch looks good, compiles fine.
I just have not tested the patch on master, most probably it needs a bit of reworking.
At least it applies cleanly, in case you were referring to the possibility that the looting code you are moving around has changed (as it's removal from original location applies cleanly -> it has not changed)
Reply To ihnatus
Actually, it's not this feature problem, killing a Leader by script also makes your client not aware that you are already dead.
This makes me a bit uneasy. While the patch is not introducing the problem, it's clearly making it worse, and introducing more explicit way to end to the error situation. I would be much happier if the issue is resolved first, and this one would go in only after that.
I think I'll take this patch to my local queue already, but won't push it in to github just yet.

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

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

Ticket details:

Yet another split of #44216. A method to make a player immediately losing a game, as like by losing a king. Since existing callbacks already can kill a king, this one won't create more potentially unstable code than it already exists.
Syntax: (Player):lose(Player looter?, bool loot?) (if looter is specified and loot is true or is not specified and gameloss style includes "Loot", looter gets some part of cities, map and gold of the player).
This method was intended to set PSTATUS_DYING to the player while further killing is done by kill_dying_players(), but actually I am not sure we call that function in a right time now (it goes when AIs start a phase, at phase end, and after handling any incoming game packet), so it should be thought about better.

-- 
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/44273
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=44273



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