Code: Select all
// Show the mission screen.
mission.runScreen({
titleKey: "oolite_trumble_title",
messageKey: "oolite_trumble_offer",
overlay: {name:"trumblebox.png", height:512},
choicesKey: "oolite_trumble_offer_yesno"
},
Code: Select all
var w = worldScripts["oolite-trumbles"];
w.missionScreenOpportunity = function missionScreenOpportunity() {
if (pendingOffer && player.credits > 6553.5)
{
pendingOffer = false;
// Show the mission screen.
mission.runScreen({
screenID: "oolite-trumbles",
titleKey: "oolite_trumble_title",
messageKey: "oolite_trumble_offer",
overlay: {name:"trumblebox.png", height:512},
choicesKey: "oolite_trumble_offer_yesno"
},
function (choice)
{
if (choice === "OOLITE_TRUMBLE_YES")
{
player.credits -= 30;
player.ship.awardEquipment("EQ_TRUMBLE");
missionVariables.trumbles = "TRUMBLE_BOUGHT";
cleanUp(this);
}
else
{
missionVariables.trumbles = "NOT_NOW";
}
});
}
};