Oolite Bulletins

For information and discussion about Oolite.
It is currently Tue Oct 17, 2017 2:51 pm

All times are UTC




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Wed Apr 27, 2016 7:44 am 
Offline
Commodore
Commodore
User avatar

Joined: Tue Jan 21, 2014 10:37 pm
Posts: 1738
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...
There seems to be a bug with the displayNameForCommodity function for non-core commodities (unless, of course, that displayNameForCommodity wasn't intended for this purpose!). For instance, using oxz's WIP "SolarHarvest" OXP, which has two additional commodities, "coronal_plasma", and "quirium_plasma", if I put this code into a startUpComplete routine I see the following:
Code:
this.startUpComplete = function() {
	log(this.name, "coronal_plasma = " + displayNameForCommodity("coronal_plasma"));
Quote:
16:58:47.276 [MyOxp]: coronal_plasma = coronal_plasma
And here's the trade-goods.plist entry for coronal_plasma, for reference:
Code:
	"coronal_plasma" = {
		"name" = "Coronal Plasma";
		"capacity" = "-1";
		"classes" = ("oolite-dangerous","oolite-mining","oolite-rawmaterials");
		"comment" = "High energy plasma harvested from the corona of a star. The mixture is just sub-critical and save to transport. It is commonly used to extract Quirium from it to create Witchfuel or to further process it.";
		//"market_script" = "";
		"quantity_unit" = 0;  
		"peak_export" = 7; 
		"peak_import" = 0; 
		"price_average" = 0; //10;
		"price_economic" = 0; //0.2;
		"price_random" = 0; //0.04;
		"quantity_average" = 0; //33.5;
		"quantity_economic" = 0; //0.5;
		"quantity_random" = 0; //0.04;
		//"short_comment" = "Plasma harvested from the corona of a star.";
		"sort_order" = 2350;
		"legality_export" = 0;
		"legality_import" = 0;
		"trumble_opinion" = 0;
	};
Based on this, I should have seen "Coronal Plasma" instead of "coronal_plasma".

_________________
My OXP's


Top
   
PostPosted: Wed Apr 27, 2016 1:36 pm 
Offline
Deadly
Deadly
User avatar

Joined: Sat Jan 25, 2014 2:35 am
Posts: 183
Location: floating the Blackfoot
Has the author defined the name in a descriptons.plist? I had to create one for my commodity:
Code:
{

	// Commodity names

	"commodity-name witchfire_whiskey"			= "Witchfire";


}

_________________
Realize collective conscious creation


Top
   
PostPosted: Wed Apr 27, 2016 9:42 pm 
Offline
Commodore
Commodore
User avatar

Joined: Tue Jan 21, 2014 10:37 pm
Posts: 1738
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...
Ah! That might be the problem. I'll check...

_________________
My OXP's


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 6 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