Back to Index Page generated: Dec 20, 2024, 7:22:09 AM

Expansion Eco Lasers

Content

Manifest

from Expansion Manager's OXP list from Expansion Manifest
Description Economical Lasers are developed for separated multiple mounts where energy usage is important. Eco Laser and Eco Cannon are strong but short range (5km) weapons, Eco Artillery is the strongest and long range (20km) but cost 400kCr. Eco Reactor is not a weapon but restore energy, useful in side mounts - a life saver in emergency. Economical Lasers are developed for separated multiple mounts where energy usage is important. Eco Laser and Eco Cannon are strong but short range (5km) weapons, Eco Artillery is the strongest and long range (20km) but cost 400kCr. Eco Reactor is not a weapon but restore energy, useful in side mounts - a life saver in emergency.
Identifier oolite.oxp.Norby.Eco_Lasers oolite.oxp.Norby.Eco_Lasers
Title Eco Lasers Eco Lasers
Category Weapons Weapons
Author Norby Norby
Version 1.0 1.0
Tags
Required Oolite Version
Maximum Oolite Version
Required Expansions
Optional Expansions
  • oolite.oxp.Norby.Separated_Lasers:1.1
  • oolite.oxp.Norby.Separated_Lasers:1.1
  • Conflict Expansions
    Information URL http://wiki.alioth.net/index.php/Separated_Lasers#Eco_Lasers n/a
    Download URL https://wiki.alioth.net/img_auth.php/2/26/Eco_Lasers_1.0.oxz n/a
    License CC BY-NC-SA 4 CC BY-NC-SA 4
    File Size n/a
    Upload date 1610873254

    Documentation

    Also read http://wiki.alioth.net/index.php/Eco%20Lasers

    Equipment

    Name Visible Cost [deci-credits] Tech-Level
    Eco Artillery yes 4000000 14+
    Eco Cannon yes 400000 10+
    Eco Laser yes 40000 5+
    Eco Reactor yes 100000 8+

    Ships

    This expansion declares no ships.

    Models

    This expansion declares no models.

    Scripts

    Path
    Scripts/ecolasers-conditions.js
    "use strict";
    this.name	= "ecolasers-conditions";
    this.author	= "Norby";
    this.copyright	= "2016 Norby";
    this.description= "Lasers will not heat up faster if there is at least 30m space between multiple mounts";
    this.licence	= "CC BY-NC-SA 4.0";
    
    //condition script
    this.allowAwardEquipment = function(equipment, ship, context)
    {
            // OXP hook to allow stations to forbid specific equipment
            if (context == "purchase" && player.ship.dockedStation && player.ship.dockedStation.scriptInfo["oolite-barred-equipment"])
            {
                    if (player.ship.dockedStation.scriptInfo["oolite-barred-equipment"].indexOf(equipment) != -1)
                    {
                            return false;
                    }
            }
    
            // OXP hook to allow ships to forbid specific "available to all" equipment
            if (ship.scriptInfo && ship.scriptInfo["oolite-barred-equipment"] && ship.scriptInfo["oolite-barred-equipment"].indexOf(equipment) != -1)
            {
                    return false;
            }
    
    //      player.consoleMessage( eqKey+" "+ship+" "+context );//debug
    
            //Eco Artillery need as large ship as an Anaconda
            if( ship.mass < 400000 && equipment.indexOf("EQ_WEAPON_CANNON_EA") > -1 ) return false;
    
            //Eco Reactor need a ship like Cobra Mark III
            if( ship.mass < 130000 && equipment.indexOf("EQ_WEAPON_ECO_REACTOR") > -1 ) return false;
    
            //Eco Laser fit into escort ships from 30t
            if( ship.mass <= 30000 && equipment.indexOf("EQ_WEAPON_ECO_LASER") > -1 ) return false;
    
            //Other cannons for large ships only like Cobra Mark III
            if( equipment.indexOf("EQ_WEAPON_CANNON") > -1 && ship.mass < 130000 ) return false;
    
            return true;
    }
    
    Scripts/ecolasers.js
    "use strict";
    this.name	= "ecolasers";
    this.author	= "Norby";
    this.copyright	= "2016 Norby";
    this.description= "placeholder to other js scripts can detect that Eco lasers are installed";
    this.licence	= "CC BY-NC-SA 4.0";