Oolite Bulletins

For information and discussion about Oolite.
It is currently Sat Dec 16, 2017 6:53 pm

All times are UTC




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sat Aug 20, 2016 2:04 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Wed Aug 15, 2012 4:19 am
Posts: 2469
Location: Finland
I'm tweaking primary markets and have edited the trade-goods.plist to have a market script for the goods. In that market script I have
Code:
this.updateGeneralCommodityDefinition = function(goodDefinition, station, system) {
	
	//only change the primary market and don't touch alien items.
	if (station || goodDefinition.key === "alien_items") {
		return goodDefinition;
	}
And later on a logger that triggers when the script is being executed. For some reason the script gets triggered twice per system and it seems that it triggers for a hermit. The quantities seem to match a hermit. The station parameter is null though. According to the wiki the script should be run once with null station when the system is created and later on with station as a parameter.

Is there something wrong somewhere or am I missing something?


Top
   
PostPosted: Sun Aug 21, 2016 7:56 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Wed Aug 15, 2012 4:19 am
Posts: 2469
Location: Finland
A bit more data. I jumped from Lave to Leesti and logged the system parameter. And it was interesting.
Code:
10:51:30.310 [test]: 55
10:51:30.310 [test]: 55
10:51:30.310 [test]: 55
10:51:30.310 [test]: 55
10:51:30.310 [test]: 55
10:51:30.311 [test]: 55
10:51:30.311 [test]: 55
10:51:30.311 [test]: 55
10:51:30.311 [test]: 55
10:51:30.311 [test]: 55
10:51:30.311 [test]: 55
10:51:30.312 [test]: 55
10:51:30.312 [test]: 55
10:51:30.312 [test]: 55
10:51:30.312 [test]: 55
10:51:30.312 [test]: 55
10:51:30.312 [test]: 55
10:51:31.014 [test]: 171
10:51:31.017 [test]: 144
10:51:31.026 [test]: 135
10:51:31.033 [test]: 254
10:51:31.037 [test]: 150
10:51:31.044 [test]: 18
10:51:31.055 [test]: 18
10:51:31.062 [test]: 121
10:51:31.066 [test]: 229
The first 55s are as they should be, one for each commodity, but those last ones?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


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

Search for:
cron
Powered by phpBB® Forum Software © phpBB Limited