Re: Murgh - Obnoxicorp Inc.
Posted: Wed Mar 13, 2013 11:39 pm
<awards himself a cookie for drawing Cody to the dark side>Cody wrote:<awards himself a cookie>Cody wrote:<decides to take a look>
For information and discussion about Oolite.
https://bb.oolite.space/
<awards himself a cookie for drawing Cody to the dark side>Cody wrote:<awards himself a cookie>Cody wrote:<decides to take a look>
Code: Select all
this.name = "Mauiby Murghs_Stations2.0 station spawner";
this.author = "Mauiby de Fug, based upon a script by Thargoid";
this.copyright = "This script is hereby placed in the public domain.";
this.version = "1.0";
this.description = "Script to spawn Globestations and Torus stations as extra stations";
this.shipWillLaunchFromStation = function(station)
{
if(station.isMainStation)
{
this.spawnMurgh();
}
}
this.shipWillExitWitchspace = function()
{
this.spawnMurgh();
}
this.spawnMurgh = function()
{
this.$murghStationRole = "noStation";
switch (galaxyNumber) {
case 0:
if (system.ID === 23) this.$murghStationRole = "globestationxl";
if (system.ID === 33) this.$murghStationRole = "toriB";
if (system.ID === 246) this.$murghStationRole = "globestation";
if (system.ID === 250) this.$murghStationRole = "toriA";
if (system.ID === 151) this.$murghStationRole = "toriB";
break;
case 1:
if (system.ID === 66) this.$murghStationRole = "globestation";
if (system.ID === 98) this.$murghStationRole = "toriA";
if (system.ID === 231) this.$murghStationRole = "globestation";
break;
case 2:
if (system.ID === 5) this.$murghStationRole = "globestationxl";
if (system.ID === 36) this.$murghStationRole = "toriA";
if (system.ID === 38) this.$murghStationRole = "globestation";
if (system.ID === 42) this.$murghStationRole = "globestationxl";
if (system.ID === 54) this.$murghStationRole = "globestation";
if (system.ID === 69) this.$murghStationRole = "toriB";
if (system.ID === 79) this.$murghStationRole = "globestationxl";
break;
case 3:
if (system.ID === 141) this.$murghStationRole = "globestation";
if (system.ID === 197) this.$murghStationRole = "toriA";
break;
case 4:
if (system.ID === 39) this.$murghStationRole = "toriA";
if (system.ID === 70) this.$murghStationRole = "toriB";
if (system.ID === 99) this.$murghStationRole = "globestationxl";
if (system.ID === 126) this.$murghStationRole = "globestation";
if (system.ID === 249) this.$murghStationRole = "globestationxl";
if (system.ID === 198) this.$murghStationRole = "globestationxl";
break;
case 5:
if (system.ID === 6) this.$murghStationRole = "toriA";
if (system.ID === 40) this.$murghStationRole = "toriB";
if (system.ID === 50) this.$murghStationRole = "globestationxl";
if (system.ID === 144) this.$murghStationRole = "globestation";
if (system.ID === 204) this.$murghStationRole = "globestation";
if (system.ID === 149) this.$murghStationRole = "globestationxl";
break;
case 6:
if (system.ID === 6) this.$murghStationRole = "globestation";
if (system.ID === 71) this.$murghStationRole = "globestation";
if (system.ID === 87) this.$murghStationRole = "globestation";
if (system.ID === 103) this.$murghStationRole = "globestation";
if (system.ID === 119) this.$murghStationRole = "toriA";
if (system.ID === 184) this.$murghStationRole = "toriB";
if (system.ID === 229) this.$murghStationRole = "globestationxl";
if (system.ID === 53) this.$murghStationRole = "toriB";
if (system.ID === 66) this.$murghStationRole = "globestationxl";
break;
case 7:
if (system.ID === 251) this.$murghStationRole = "globestationxl";
}
if( this.$murghStationRole == "noStation" || system.countShipsWithRole("toriA") > 0 || system.countShipsWithRole("toriB") > 0 || system.countShipsWithRole("globestation") > 0 || system.countShipsWithRole("globestationxl") > 0 || this.murghBlock)
{
this.murghBlock = true;
return;
}
else
{
this.xOffset = (system.scrambledPseudoRandomNumber(27) * 10000) + 10000; // x offset between 10 and 20km
this.yOffset = (system.scrambledPseudoRandomNumber(18) * 10000) + 10000; // y offset between 10 and 20km
if(system.scrambledPseudoRandomNumber(28) > 0.5) // 50:50 chance of offsetting in the other direction
{
this.xOffset = -this.xOffset;
}
if(system.scrambledPseudoRandomNumber(183) > 0.5) // 50:50 chance of offsetting in the other direction
{
this.yOffset = -this.yOffset;
}
system.legacy_addShipsAtPrecisely(this.$murghStationRole, 1, "abs", system.mainStation.position.add([this.xOffset, this.yOffset, 0]));
}
}
this.shipWillEnterWitchspace = function()
{
this.murghBlock = null;
}
I only use the Torus stations, but I thinned them out for the same reason - I have only two or three Torus stations per octant.Mauiby de Fug wrote:The originator of this was that when I was last dedicatedly playing Oolite a few years ago, I would rarely see Ico stations, as the Torus oxp had replaced them.
Code: Select all
station_roll = 0.05;