[Freeciv-tickets] [freeciv] #42502: Lua: player:give_bulbs() method

Zurück zum Archiv-Index
OSDN Ticket System norep****@osdn*****
Thu Nov 11 14:50:41 JST 2021


#42502: Lua: player:give_bulbs() method

  Open Date: 2021-06-09 20:54
Last Update: 2021-11-11 07:50

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

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

Last Changes/Comment on this Ticket:
2021-11-11 07:50 Updated by: cazfi
 * Resolution Update from None to Accepted

Comment:

Reply To cazfi
I've been thinking about the corner-cases when reducing the amount of bulbs (we do that for tech upkeep, so it's possible). Maybe the wisest course of action is to have this method with the restriction that only positive values are allowed. That should make it safe to implement to 3.1 already. We can always add separate take_bulbs() method in later versions, if we want.
Now I looked at it, and it might be a lot easier than I thought. Lower level code should do everything right even when we add very simple function to implement the lua API. So, the amount of bulbs is a signed value in the attached patch, after all.

---------------------------------------------------------------------
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: Accepted
---------------------------------------------------------------------

Ticket details:

There are requests for things like giving some profit to a target player of "Enter Marketplace" action, or we may make tech stealth effectivity more even with a custom action, or something. Let's make a method that provides player with a given amount of bulbs; by default, commit them to the current research stock, in multiresearch mode let it be possible to specify a tech to commit to (that better needs also a function to test the current progress and cost of a tech for the player).

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



More information about the Freeciv-tickets mailing list
Zurück zum Archiv-Index