FreeOrion

Forums for the FreeOrion project
It is currently Fri Jan 19, 2018 3:19 am

All times are UTC




Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Sat Dec 09, 2017 5:19 pm 
Offline
Space Dragon

Joined: Tue Sep 30, 2014 10:01 am
Posts: 267
I mean the current PP in imperial stockpile should be accessible via scripting. E.g. as an empire meter.

_________________
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.


Top
 Profile  
 
PostPosted: Sat Dec 16, 2017 10:15 am 
Offline
Space Dragon

Joined: Tue Sep 30, 2014 10:01 am
Posts: 267
Geoff the Medio wrote:
Ophiuchus wrote:
Any objections to making the stockpile value into an empire meter...
What do you mean by "the stockpile value" ?

I mean that scripting should be able to change the current amount of PP in the stockpile. At least for prototyping and for whatever we come up with in the future.

Or the other way round - Is there a reason why storing the empire's stockpile PP directly in the c++ objects is (significantly) better than storing it in an empire meter?

_________________
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.


Top
 Profile  
 
PostPosted: Sat Dec 16, 2017 10:43 am 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12086
Location: Munich
Ophiuchus wrote:
I mean that scripting should be able to change the current amount of PP in the stockpile. At least for prototyping and for whatever we come up with in the future.

Or the other way round - Is there a reason why storing the empire's stockpile PP directly in the c++ objects is (significantly) better than storing it in an empire meter?
There is fully-implemented effect and scripting code for setting stockpiles, though it's presently set up to do so for a non-existant trade stockpile. Switching it to work for production shouldn't take long...

Edit: Done.For example, add this to Laefna to give empires that start with them 20 production stockpiled at the start of a game:
Code:
        EffectsGroup
            scope = Source
            activation = And [
                Turn high = 0
                Planet
            ]
            effects = SetEmpireStockpile value = Value + 20


Top
 Profile  
 
PostPosted: Sat Dec 16, 2017 1:47 pm 
Offline
Space Dragon

Joined: Tue Sep 30, 2014 10:01 am
Posts: 267
Wow, thank you :)

_________________
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group