"use strict";
this.name = "riredi_market";
this.author = "phkb";
this.copyright = "2024";
this.license = "CC BY-NC-SA 4.0";

/*
	We're making radioactives illegal to import in Riredi, as well as reducing the price (they want to get rid of them)
	and reducing the number for sale (so there's not *too* much money for nothing)
*/
//-------------------------------------------------------------------------------------------------------------
this.$updateLocalCommodityDefinition = function (goodDefinition, station, systemID) {
	if (goodDefinition.key == "radioactives") {
		if ((station === 0 || station == null) && (galaxyNumber == 0 && systemID && systemID == 210)) {
			goodDefinition.legality_import = 1;
			goodDefinition.price *= 0.75;
			goodDefinition.quantity *= 0.5;
		}
	}
	return goodDefinition;
}

//-------------------------------------------------------------------------------------------------------------
this.startUp = function () {
	var msi = worldScripts.MarketScriptInterface_Main;
	msi.$addMarketInterface("system_local", "$updateLocalCommodityDefinition", this.name, "highest");
}