Back to Index Page generated: Sep 1, 2025, 4:12:03 AM

Expansion Display Reputation

Content

Warnings

  1. No version in dependency reference to oolite.oxp.Commander_McLane.Display_reputation:null
  2. Conflict Expansions mismatch between OXP Manifest and Expansion Manager at character position 0080 (DIGIT ZERO vs LATIN SMALL LETTER N)

Manifest

from Expansion Manager's OXP list from Expansion Manifest
Description Displays your current reputations as a passenger, parcel and contract cargo carrier under the heading 'Reputation' on your ship's manifest screen. Displays your current reputations as a passenger, parcel and contract cargo carrier under the heading 'Reputation' on your ship's manifest screen.
Identifier oolite.oxp.Wildeblood.Display_Reputation oolite.oxp.Wildeblood.Display_Reputation
Title Display Reputation Display Reputation
Category Ambience Ambience
Author Wildeblood Wildeblood
Version 1.5 1.5
Tags
Required Oolite Version
Maximum Oolite Version
Required Expansions
Optional Expansions
Conflict Expansions
  • oolite.oxp.Commander_McLane.Display_reputation:0
  • oolite.oxp.Commander_McLane.Display_reputation:
  • Information URL http://wiki.alioth.net/index.php/Display_Reputation n/a
    Download URL https://wiki.alioth.net/img_auth.php/9/94/Display_Reputation.oxz n/a
    License CC BY-NC-SA 4.0 CC BY-NC-SA 4.0
    File Size n/a
    Upload date 1755074371

    Documentation

    Also read http://wiki.alioth.net/index.php/Display%20Reputation

    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
    "use strict";
    
    this.name    = "display_reputation";
    this.version = "1.5";
    
    // Other scripts can limit the text set, by toggling the Booleans 
    // below at any time during or after StartUpComplete, e.g. 
    // worldScripts.display_reputation.parcel = false;
    // Use some caution: if these remain false after StartUp it implies their 
    // controlling scripts are absent and displaying the reputation is meaningless. 
    
    this.passenger  = false;
    this.parcel     = false;
    this.contract   = false;
    this.explorer   = false;
    
    this.reputation = [expandMissionText("display_reputation_title_word")];
    
    this.startUp = function () {
        if (worldScripts["oolite-contracts-cargo"]) {
            this.contract = true;
        }
        if (worldScripts["oolite-contracts-parcels"]) {
            this.parcel = true;
        }
        if (worldScripts["oolite-contracts-passengers"]) {
            this.passenger = true;
        }
        if (worldScripts["Explorers Club"]) {
            this.explorer = true;
        }
        delete this.startUp;
    }
    
    this.shipExitedWitchspace = this.missionScreenOpportunity = function () {
        this._setReputations();
    }
    
        this._setReputations = function () {
            if (this.passenger) {
                if (player.passengerReputation >= 0) {
                    this.reputation.push(expandMissionText("display_reputation_passenger_" + player.passengerReputation));
                } else {
                    this.reputation.push(expandMissionText("display_reputation_passenger_minus"));
                }
            }
            if (this.contract) {
                if (player.contractReputation >= 0) {
                    this.reputation.push(expandMissionText("display_reputation_contract_" + player.contractReputation));
                } else {
                    this.reputation.push(expandMissionText("display_reputation_contract_minus"));
                }
            }
            if (this.parcel) {
                if (player.parcelReputation >= 0) {
                    this.reputation.push(expandMissionText("display_reputation_parcel_" + player.parcelReputation));
                } else {
                    this.reputation.push(expandMissionText("display_reputation_parcel_minus"));
                }
            }
            if (this.explorer) {
                this.reputation.push(worldScripts['Explorers Club']._playerRank());
            }
            mission.setInstructions(this.reputation);
            this.reputation.length = 1;
        }