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: Select all
this.startUpComplete = function() {
log(this.name, "coronal_plasma = " + displayNameForCommodity("coronal_plasma"));
And here's the trade-goods.plist entry for coronal_plasma, for reference:16:58:47.276 [MyOxp]: coronal_plasma = coronal_plasma
Code: Select all
"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;
};