~harrison-rt/+junk/jaguar_company

« back to all changes in this revision

Viewing changes to trunk/jaguar_company.oxp/Scripts/jaguar_company_patrol.js

  • Committer: Richard Harrison
  • Date: 2013-01-19 22:59:12 UTC
  • Revision ID: harrison.rt@gmail.com-20130119225912-jcnbiiwb94uy0k7v
Tags: 2.3
* Integration with Snoopers OXP if available.
* Pilot name for patrol, tug and miner ships.
* Pilot name transfered to escape pod and then used in rescue message on arrival at a station.
* Use pilot's name if available in attack messages. Otherwise use the displayName.
* Use pilot's name if available as the Snoopers news source. Otherwise use a random name.
* Force Snoopers news to be shown at the base.
* New const in the main script for Snoopers Error Codes.
* Make sure thargoids/tharglets are ALWAYS seen as hostile.

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
 
71
71
        /* Register this ship as a friendly. */
72
72
        p_patrol.attackersScript.$addFriendly(this.ship);
 
73
        /* Random name for the pilot. Used when talking about attacks and sending a report to Snoopers. */
 
74
        this.ship.$pilotName = expandDescription("%N [nom1]");
73
75
        /* Get a unique name for the patrol ship. */
74
76
        this.ship.displayName = p_patrol.mainScript.$uniqueShipName(this.ship.name);
75
77
        /* Increase the number of patrol ships in the system. */
99
101
        }
100
102
    };
101
103
 
 
104
    /* The shipLaunchedEscapePod handler is called when the pilot bails out.
 
105
     *
 
106
     * INPUT
 
107
     *   escapepod - contains the main pod with the pilot.
 
108
     */
 
109
    this.shipLaunchedEscapePod = function(escapepod)
 
110
    {
 
111
        /* Identify this pod as containg a member of Jaguar Company. */
 
112
        escapepod.$jaguarCompany = true;
 
113
        /* Transfer pilot name to the escape pod. */
 
114
        escapepod.$pilotName = this.ship.$pilotName;
 
115
    };
 
116
 
102
117
    /* Thargoid's missile code. (Simplified - taken out the local function.)
103
118
     *
104
119
     * INPUT