Is there a straightforward way to retrofit existing ships with the following functionality: Per 50TC of cargo space, the ship should launch additional escape-capsules.
I specifically thought of the workcom (Worker's Commuter in Commies), where it is odd that it launches only one escape-capsule. It would be nice ambience, if the ship spawns 5-6 escape pods in pairs, one every other second. This could shows how to spawn the pods, but the question is how to retrofit a ship like workcom from outside the OXP.
Code: Select all
this.debugManyCapsules = 1;
'use strict';
/** launch from station for testing */
this.shipWillLaunchFromStation = function() {
if (this.debugManyCapsules != 1) return;
player.ship.position = system.locationFromCode('OUTER_SYSTEM_OFFPLANE');
new Timer(this, this.$firePod, 2);
};
this.$firePod = function() {
system.addShips('escape-capsule', 2, player.ship.position.add([1E4, 0,0]), 100);
if(Math.random() < 0.5) new Timer(this, this.$firePod, 2);
}