bugFreeciv - Bugs: bug #22160, Lua give_technology can't avoid...

 
 
Show feedback again

bug #22160: Lua give_technology can't avoid possibility of tech loss

Submitted by:  Jacob Nevins <jtn>
Submitted on:  Sun 08 Jun 2014 11:37:42 AM UTC  
 
Category: generalSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Release: Operating System: Any
Planned Release: 2.6.0, 3.0.0

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 17 Aug 2015 03:47:52 AM UTC, SVN revision 29564:

Lua's give_technology() can control what kind of penalty; freecost, conquercost, diplbulbcost, or custom
gets applied.

Reported by Jacob Nevins

See bug #22160

(Browse SVN revision 29564)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Mon 17 Aug 2015 03:47:44 AM UTC, SVN revision 29563:

Lua's give_technology() can control what kind of penalty; freecost, conquercost, diplbulbcost, or custom
gets applied.

Reported by Jacob Nevins

See bug #22160

(Browse SVN revision 29563)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Fri 14 Aug 2015 04:18:44 AM UTC, comment #1:

Attached patch adds 'cost' parameter to lua's give_technology().

  1. and positive values are used as the exact penalty %.

-1 means that freecost will be applied
-2 ... conquercost ...
-3 ... diplbulbcost ...

(file #24869)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sun 08 Jun 2014 11:37:42 AM UTC, original submission:

Technologies given with Lua's give_technology() function are always counted as 'free' technologies; if server settings freecost and techlossforgiveness are set appropriately, this can trigger the loss of a random other tech.

This prevents reliable use of self-root-req'd technologies as tokens given by Lua to hang other effects off (like we used to do with Darwin in the multiplayer ruleset).

I think there should be a way to give_technology without any possibility of tech loss or similar effects.

Jacob Nevins <jtn>
Project Administrator

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #24869:  GiveTechCost.patch added by cazfi (6kB - text/x-diff)

 

Depends on the following items: None found

Digest:
   task dependencies.

 

Carbon-Copy List
  • -unavailable- added by cazfi (Updated the item)
  • -unavailable- added by jtn (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 17 Aug 2015 03:48:29 AM UTCcazfiStatusReady For Test=>Fixed
      Assigned toNone=>cazfi
      Open/ClosedOpen=>Closed
    Fri 14 Aug 2015 04:18:44 AM UTCcazfiAttached File-=>Added GiveTechCost.patch, #24869
      CategoryNone=>general
      StatusNone=>Ready For Test
      Planned Release2.6.0=>2.6.0, 3.0.0
    Thu 03 Jul 2014 10:36:57 PM UTCjtnPlanned Release=>2.6.0
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup