For the really keen, here's what I did:
First, the startupComplete event, I added this code:
Code: Select all
if (worldScripts.GalCopAdminServices) {
var ga = worldScripts.GalCopAdminServices;
ga._purchase_ignore_equip.push("EQ_MAINTENANCE_TUNEUP"); // don't sent a normal purchase email for this one
}
Next, I added the following event handler
Code: Select all
this.guiScreenChanged = function(to, from) {
if (to === "GUI_SCREEN_EQUIP_SHIP") {
this._cost = player.ship.renovationCost;
}
}
Finally, in the "playerBoughtEquipment" routine, I added this code:
Code: Select all
if (worldScripts.GalCopAdminServices) {
var ga = worldScripts.GalCopAdminServices;
ga._maintCost = this._cost / 10;
ga.$setupRepNames();
ga.$sendMaintenanceEmail();
}
Hope that makes sense!