Back to Index Page generated: May 8, 2024, 6:16:03 AM

Expansion Alien Systems

Content

Warnings

  1. Information URL mismatch between OXP Manifest and Expansion Manager string length at character position 0

Manifest

from Expansion Manager's OXP list from Expansion Manifest
Description Adds flavour to non colonial systems based on inhabitant type Adds flavour to non colonial systems based on inhabitant type
Identifier oolite.oxp.redspear.alien_systems oolite.oxp.redspear.alien_systems
Title Alien Systems Alien Systems
Category Systems Systems
Author Redspear Redspear
Version 0.2 0.2
Tags
Required Oolite Version
Maximum Oolite Version
Required Expansions
Optional Expansions
Conflict Expansions
Information URL n/a
Download URL https://wiki.alioth.net/img_auth.php/2/29/Oolite.oxp.redspear.alien_systems.oxz n/a
License CC-BY-NC-SA 4.0 CC-BY-NC-SA 4.0
File Size n/a
Upload date 1710626682

Documentation

Also read http://wiki.alioth.net/index.php/Alien%20Systems

Equipment

This expansion declares no equipment. This may be related to warnings.

Ships

This expansion declares no ships. This may be related to warnings.

Models

This expansion declares no models. This may be related to warnings.

Scripts

Path
Config/script.js
this.name			= "alien_systems";
this.author			= "Redspear";
this.copyright		= "2022 Redspear";
this.licence		= "CC BY-NC-SA 4.0"; 
this.description	= "System variance by inhabitant type";
this.version		= "0.2";

"use strict";

this.shipWillEnterWitchspace = function() {
	Sound.stopMusic();
}

this.shipExitedWitchspace = function() {
    var birds = /bird/i;
    var felines = /feline/i;
    var frogs = /frog/i;
    var humanoids = /humanoid/i;
    var insects = /insect/i;
    var lizards = /lizard/i;
    var lobsters = /lobster/i;
    var rodents = /rodent/i;
    var colonials = /colonial/i;
	
	if(system.isInterstellarSpace)
	{
		Sound.playMusic("Reorte_Theme.ogg");
	}
    if(system.info.inhabitants.match(birds))
    {
		Sound.playMusic("Isinor_Theme.ogg");
		player.commsMessage("[bird-beacon-messsages]", 6);
    }
    if(system.info.inhabitants.match(felines))
    {
		Sound.playMusic("Tianve_Theme.ogg");
		player.commsMessage("[feline-beacon-messsages]", 6);
    }
    if(system.info.inhabitants.match(frogs))
    {
        Sound.playMusic("Lerelace_Theme.ogg");
		player.commsMessage("[frog-beacon-messsages]", 6);
    }
    if(system.info.inhabitants.match(humanoids))
    {
        Sound.playMusic("Leesti_Theme.ogg");
		player.commsMessage("[humanoid-beacon-messsages]", 6);
    }
    if(system.info.inhabitants.match(insects))
    {
        Sound.playMusic("Diso_Theme.ogg");
		player.commsMessage("[insect-beacon-messsages]", 6);
    }
    if(system.info.inhabitants.match(lizards))
    {
        Sound.playMusic("Tionisle_Theme.ogg");
		player.commsMessage("[lizard-beacon-messsages]", 6);
    }
    if(system.info.inhabitants.match(lobsters))
    {
        Sound.playMusic("Zaonce_Theme.ogg");
		player.commsMessage("[lobster-beacon-messsages]", 6);
    }
    if(system.info.inhabitants.match(rodents))
    {
        Sound.playMusic("Teraed_Theme.ogg");
		player.commsMessage("[rodent-beacon-messsages]", 6);
    }	
}

this.shipEnteredPlanetaryVicinity = function(entity) {
	if(entity.isSun) {
		Sound.playMusic("Lave_Theme.ogg");
	}
}

this.shipEnteredStationAegis = function(station) {
    if (station.isMainStation) {
		Sound.stopMusic();
        this.$startTimer();
	var birds = /bird/i;
    var felines = /feline/i;
    var frogs = /frog/i;
    var humanoids = /humanoid/i;
    var insects = /insect/i;
    var lizards = /lizard/i;
    var lobsters = /lobster/i;
    var rodents = /rodent/i;
    var colonials = /colonial/i;
	
    if(system.info.inhabitants.match(birds))
    {
		Sound.playMusic("Isinor_Theme.ogg");
    }
    if(system.info.inhabitants.match(felines))
    {
		Sound.playMusic("Tianve_Theme.ogg");
    }
    if(system.info.inhabitants.match(frogs))
    {
        Sound.playMusic("Lave_Theme.ogg");
    }
    if(system.info.inhabitants.match(humanoids))
    {
        Sound.playMusic("Leesti_Theme.ogg");
    }
    if(system.info.inhabitants.match(insects))
    {
        Sound.playMusic("Diso_Theme.ogg");
    }
    if(system.info.inhabitants.match(lizards))
    {
        Sound.playMusic("Tionisle_Theme.ogg");
    }
    if(system.info.inhabitants.match(lobsters))
    {
        Sound.playMusic("Zaonce_Theme.ogg");
    }
    if(system.info.inhabitants.match(rodents))
    {
        Sound.playMusic("Teread_Theme.ogg");
    }
    }
}

this.shipLaunchedFromStation = function(station) {
    if (station.isMainStation) {
        this.$startTimer();
	var birds = /bird/i;
    var felines = /feline/i;
    var frogs = /frog/i;
    var humanoids = /humanoid/i;
    var insects = /insect/i;
    var lizards = /lizard/i;
    var lobsters = /lobster/i;
    var rodents = /rodent/i;
    var colonials = /colonial/i;
	
    if(system.info.inhabitants.match(birds))
    {
		Sound.playMusic("Isinor_Theme.ogg");
    }
    if(system.info.inhabitants.match(felines))
    {
		Sound.playMusic("Tianve_Theme.ogg");
    }
    if(system.info.inhabitants.match(frogs))
    {
        Sound.playMusic("Lave_Theme.ogg");
    }
    if(system.info.inhabitants.match(humanoids))
    {
        Sound.playMusic("Leesti_Theme.ogg");
    }
    if(system.info.inhabitants.match(insects))
    {
        Sound.playMusic("Diso_Theme.ogg");
    }
    if(system.info.inhabitants.match(lizards))
    {
        Sound.playMusic("Tionisle_Theme.ogg");
    }
    if(system.info.inhabitants.match(lobsters))
    {
        Sound.playMusic("Zaonce_Theme.ogg");
    }
    if(system.info.inhabitants.match(rodents))
    {
        Sound.playMusic("Teread_Theme.ogg");
    }
    }
}

this.shipExitedStationAegis = function(station) {
    if (station.isMainStation) {
        this.$stopTimer();
    }
}

this.shipDockedWithStation = function(station) {
    if (station.isMainStation) {
        this.$stopTimer();
    }
}

this.shipDied = function() {
    this.$stopTimer();
}

this.$startTimer = function $startTimer () {
    this.$stopTimer(); // safety check
    this._myTimer = new Timer(this, this.$sendMessageTimer, 60, 120); // first and subsequent
}

this.$stopTimer = function $stopTimer () {
    if (this._myTimer && this._myTimer.isRunning) this._myTimer.stop();
}

this.$sendMessageTimer = function $sendMessageTimer () {
    var p = player.ship;
    var stn = system.mainStation;
    var dist = p.position.distanceTo(stn.position);
    if (dist < stn.scannerRange) { // only send a message if the player is within scanner range
        if (p.alertCondition != 3) { // only send if the player is not at condition red
            this.$sendStationMessage();
        }
    }
}

this.$sendStationMessage = function $sendStationMessage () {
    var birds = /bird/i;
    var felines = /feline/i;
    var frogs = /frog/i;
    var humanoids = /humanoid/i;
    var insects = /insect/i;
    var lizards = /lizard/i;
    var lobsters = /lobster/i;
    var rodents = /rodent/i;
    var colonials = /colonial/i;
	
    if(system.info.inhabitants.match(birds) && system.techLevel < 12)
    {
        system.mainStation.commsMessage("[bird-messages]", 6);
    }
    if(system.info.inhabitants.match(felines) && system.techLevel < 12)
    {
        system.mainStation.commsMessage("[feline-messages]", 6);
    }
    if(system.info.inhabitants.match(frogs) && system.techLevel < 12)
    {
        system.mainStation.commsMessage("[frog-messages]", 6);
    }
    if(system.info.inhabitants.match(humanoids) && system.techLevel < 12)
    {
        system.mainStation.commsMessage("[humanoid-messages]", 6);
    }
    if(system.info.inhabitants.match(insects) && system.techLevel < 12)
    {
        system.mainStation.commsMessage("[insect-messages]", 6);
    }
    if(system.info.inhabitants.match(lizards) && system.techLevel < 12)
    {
        system.mainStation.commsMessage("[lizard-messages]", 6);
    }
    if(system.info.inhabitants.match(lobsters) && system.techLevel < 12)
    {
        system.mainStation.commsMessage("[lobster-messages]", 6);
    }
    if(system.info.inhabitants.match(rodents) && system.techLevel < 12)
    {
        system.mainStation.commsMessage("[rodent-messages]", 6);
    }		
}