Scripts/traffic_redistributer.js |
this.name = "traffic_redistributer";
this.author = "Redspear";
this.copyright = "2024 Redspear";
this.licence = "CC BY-NC-SA 4.0";
this.description = "Slower ships in safer systems";
this.version = "3.0";
"use strict";
// chance of slower ships being more common
this.allowSpawnShip = function(shipKey) {
// slowest group
if (shipKey == "adder-safe_system" || shipKey == "anaconda-safe_system" || shipKey == "anaconda-pirate-safe_system" || shipKey == "boa-safe_system" || shipKey == "boa-pirate-safe_system" || shipKey == "cobra3-trader-safe_system"|| shipKey == "cobra3-alternate-safe_system" || shipKey == "cobramk1-safe_system" || shipKey == "cobramk1-alt-safe_system" || shipKey == "ferdelance-safe_system" || shipKey == "gecko-safe_system" || shipKey == "krait-safe_system" || shipKey == "mamba-safe_system" || shipKey == "mamba-escort-safe_system"|| shipKey == "moray-safe_system" || shipKey == "morayMED-safe_system" || shipKey == "python-safe_system" || shipKey == "python-blackdog-safe_system" || shipKey == "python-trader-safe_system" || shipKey == "transporter-safe_system") {
if (system.government == 7 || system.government == 6 || system.government == 5) {
return true; // 'Safe' systems : corporates, democracies & confederacies
} else {
return false; // Not 'safe'
}
}
// average group
if (shipKey == "adder-mid_system" || shipKey == "anaconda-mid_system" || shipKey == "anaconda-pirate-mid_system" || shipKey == "boa-mid_system" || shipKey == "boa-pirate-mid_system" || shipKey == "cobra3-trader-mid_system"|| shipKey == "cobra3-alternate-mid_system" || shipKey == "cobramk1-mid_system" || shipKey == "cobramk1-alt-mid_system" || shipKey == "ferdelance-mid_system" || shipKey == "gecko-mid_system" || shipKey == "krait-mid_system" || shipKey == "mamba-mid_system" || shipKey == "mamba-escort-mid_system"|| shipKey == "moray-mid_system" || shipKey == "morayMED-mid_system" || shipKey == "python-mid_system" || shipKey == "python-blackdog-mid_system" || shipKey == "python-trader-mid_system" || shipKey == "transporter-mid_system") {
if (system.government == 4 || system.government == 3 || system.government == 2 ) {
return true // 'Mid' systems : communists, dictatorships & multi-governments
} else {
return false; // Not 'mid'
}
}
}
|