Back to Index Page generated: Nov 12, 2024, 11:02:03 PM

Expansion Docked HUDs

Content

Manifest

from Expansion Manager's OXP list from Expansion Manifest
Description Sleek, minimalist HUD design when docked. If you use a HUD expansion pack, instead of the standard HUD, check the forum for compatibility notes. Sleek, minimalist HUD design when docked. If you use a HUD expansion pack, instead of the standard HUD, check the forum for compatibility notes.
Identifier oolite.hud.data.Wildeblood.Docked_HUDs oolite.hud.data.Wildeblood.Docked_HUDs
Title Docked HUDs Docked HUDs
Category HUDs HUDs
Author Wildeblood Wildeblood
Version 1.1 1.1
Tags
Required Oolite Version
Maximum Oolite Version
Required Expansions
Optional Expansions
Conflict Expansions
Information URL http://aegidian.org/bb/viewtopic.php?f=4&t=17217 n/a
Download URL https://wiki.alioth.net/img_auth.php/7/79/Wildefire_Docked_HUDs_1.1.oxz n/a
License Use your common sense. Use your common sense.
File Size n/a
Upload date 1610873342

Documentation

Also read http://wiki.alioth.net/index.php/Docked%20HUDs

Equipment

This expansion declares no equipment.

Ships

This expansion declares no ships.

Models

This expansion declares no models.

Scripts

Path
Config/script.js
"use strict";

this.name    = "Docked_HUDs";
this.version = "1.1";

    this.$flightHUD = "hud.plist";

    this.guiScreenChanged = function () {
        if (player.ship.docked) {
            this._selectDockedHUD();
        }
    }

    this.playerBoughtEquipment = function (equipment) {
        this._selectDockedHUD();
    }

    this._selectDockedHUD = function () {
     // if (!player.ship.docked) {
     //     return;
     // }
        if (guiScreen === "GUI_SCREEN_MARKET" &&
            player.ship.equipmentStatus("EQ_AI_TRADING_ASSISTANT") === "EQUIPMENT_OK") {
            return;
        } else if (player.ship.fuel < 7) {
            player.ship.hud = "docked-need-fuel-hud.plist";
            return;
        } else if (player.ship.missileCapacity > player.ship.missiles.length) {
            player.ship.hud = "docked-need-missiles-hud.plist";
            return;
        } else {
            player.ship.hud = "docked-need-nothing-hud.plist";
        }
    }

    this.shipWillLaunchFromStation = function () {
        if (this.$flightHUD) {
            player.ship.hud = this.$flightHUD;
        } else {
            delete this.shipWillLaunchFromStation;
        }
    }
/*
    this.shipLaunchedFromStation = function () {
        if (this.$flightHUD) {
            player.ship.hud = this.$flightHUD;
        } else {
            delete this.shipLaunchedFromStation;
        }
    }
*/