Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tavros lift convenience tweak #210

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
4 changes: 2 additions & 2 deletions includes/holidayEvents/2018XmasEvents.as
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ public function riyaXmasPartyInviteText():String
//Entering party(Should be accessible as a destination(( [Party] )) on the Tavros elevator):
public function riyaPartyLiftGo():void
{
liftMove("RIYAPARTY");
move("RIYAPARTY");

clearMenu();
addButton(0,"Next",party2018RiyaEntrance);
party2018RiyaEntrance();
}
public function party2018RiyaEntrance():void
{
Expand Down
67 changes: 50 additions & 17 deletions includes/tavros/roomFunctions.as
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,13 @@ public function exitToShipLocation():Boolean
return false;
}

public function liftMove(destination:String):void
{
clearOutput();
output("Your stomach drops as the lift kicks into gear. The gentle, steady thrum of powerful machinery fills the metallic tube as you are brought to your destination, slowly decelerating when you arrive.");
move(destination,false);
showLocationName();
clearMenu();
addButton(0,"Next",mainGameMenu);
}

public function hangarFloors(bonus:Boolean = false):Array
{
var floors:Array = [];
floors.push(["Hangar", liftMove, "TAVROS LIFT", "Hangar Deck", "the hangar deck"]);
floors.push(["Merchant", liftMove, "LIFT: MERCHANT DECK", "Merchant Deck", "the merchant deck"]);
floors.push(["Res. Deck", liftMove, "LIFT: RESIDENTIAL DECK", "Residential Deck", "the residential deck"]);
floors.push(["Nursery", liftMove, "NURSERYELEVATOR", "Nursery Deck", "the nursery deck"]);
floors.push(["Hangar", move, "TAVROS LIFT: TRANSIT", "Hangar Deck", "the hangar deck", "TAVROS LIFT"]);
floors.push(["Merchant", move, "LIFT: MERCHANT DECK: TRANSIT", "Merchant Deck", "the merchant deck", "LIFT: MERCHANT DECK"]);
floors.push(["Res. Deck", move, "LIFT: RESIDENTIAL DECK: TRANSIT", "Residential Deck", "the residential deck", "LIFT: RESIDENTIAL DECK"]);
floors.push(["Nursery", move, "NURSERYELEVATOR: TRANSIT", "Nursery Deck", "the nursery deck", "NURSERYELEVATOR"]);
if(bonus)
{
if(MailManager.isEntryViewed("riya_party_invite") && flags["RIYA_PARTIED_YEAR"] == undefined) floors.push(["Party", riyaPartyLiftGo, undefined, "Party, Deck 4", "the U.G.C. garrison party"]);
Expand Down Expand Up @@ -90,6 +80,49 @@ public function hangarBonus():Boolean
if(azraBonusProc(btnSlot++)) return true;
}

// Normal floors
var floors:Array = hangarFloors();
for(var i:int = 0; i < floors.length; i++)
{
if(floors[i][5] == currentLocation)
{
output("\n\n<b>You are currently on " + floors[i][4] + ".</b>");
if(floors[i - 1] != null)
{
addButton(7, "Down", floors[i - 1][1], floors[i - 1][2], floors[i - 1][3], ("Go to " + floors[i - 1][4] + "."));
}
if(floors[i + 1] != null)
{
addButton(5, "Up", floors[i + 1][1], floors[i + 1][2], floors[i + 1][3], ("Go to " + floors[i + 1][4] + "."));
}
}
}

return false;
}
public function hangarBonusTransit():Boolean
{
output("Your stomach drops as the lift kicks into gear. The gentle, steady thrum of powerful machinery fills the metallic tube as you are brought to your destination, slowly decelerating when you arrive.\n\n");
output("You’re within a stuffy tube of metal and plastic. Steady, mechanical thrums suffuse the air around you. The inside of the cylinder-like lift is lined by a brass-hued railing, used to steady oneself during high speed travel through the kilometers-long station.\n\nThere’s a sturdy mechanical keypad with which to designate your target level. Right now, the only floors of interest are the hangar, merchant, residential, and nursery levels.");

var btnSlot:int = 0;

addButton(btnSlot++, "Floors", hangarButtonMenu, undefined, "Control Panel", "Ride the elevator to a specific floor.");

// Special floors (add when needed)
if (flags["SAENDRA_XPACK1_STATUS"] == 1 || flags["SAENDRA_XPACK1_STATUS"] == 2)
{
output("\n\nYou also have the option to take the lift up to Deck 92 to meet up with Saendra");
if(flags["SAENDRA_XPACK1_STATUS"] == 2) output(". You are sure taking your time about it though");
output("--whatever she contacted you about, it sounded pretty urgent.");
addButton(btnSlot++, "Deck 92", saendraX1LiftGo, undefined, "Deck 92", "Go to Deck 92.");
}
// Azra encounter
if(days >= 8 && flags["AZRA_RECRUITED"] == undefined && flags["AZRA_DISABLED"] == undefined)
{
if(azraBonusProc(btnSlot++)) return true;
}

// Normal floors
var floors:Array = hangarFloors();
for(var i:int = 0; i < floors.length; i++)
Expand Down Expand Up @@ -121,15 +154,15 @@ public function hangarButtonMenu():void

for(i = 0; i < floors.length; i++)
{
if(floors[i][2] == currentLocation) floorIndex = i;
if(floors[i][2] == currentLocation || floors[i][5] == currentLocation) floorIndex = i;
}
for(i = 0; i < floors.length; i++)
{
if(i == floorIndex)
{
addDisabledButton(btnSlot++, floors[i][0], floors[i][3], "You are already on this floor.");
}
else if(floors[i][1] != liftMove)
else if(floors[i][1] != move)
{
addButton(btnSlot++, floors[i][0], floors[i][1], floors[i][2], floors[i][3], ("Go to " + floors[i][4] + "."));
}
Expand All @@ -147,7 +180,7 @@ public function hangarMoveTo(arg:Array):void

if(minExtra > 0) processTime(minExtra);

liftMove(destination);
move(destination);
}

public function tavrosHangarStuff():Boolean
Expand Down
70 changes: 67 additions & 3 deletions includes/tavros/rooms.as
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public function initTavrosRooms():void
//rooms["SHEAR BEAUTY"].addFlag(GLOBAL.NUDITY_ILLEGAL);
rooms["SHEAR BEAUTY"].addFlag(GLOBAL.COMMERCE);

//104 "LIFT: MERCHANT DECK". In The Lift - Merchant's Thoroughfare
//104a "LIFT: MERCHANT DECK". In The Lift - Merchant's Thoroughfare
rooms["LIFT: MERCHANT DECK"] = new RoomClass(this);
rooms["LIFT: MERCHANT DECK"].roomName = "LIFT:\nMERCHANT";
rooms["LIFT: MERCHANT DECK"].description = "";
Expand All @@ -155,6 +155,20 @@ public function initTavrosRooms():void
rooms["LIFT: MERCHANT DECK"].addFlag(GLOBAL.NUDITY_ILLEGAL);
rooms["LIFT: MERCHANT DECK"].runOnEnter = hangarBonus;

//104b "LIFT: MERCHANT DECK: TRANSIT" Used to display transit text when changing floors
rooms["LIFT: MERCHANT DECK: TRANSIT"] = new RoomClass(this);
rooms["LIFT: MERCHANT DECK: TRANSIT"].roomName = "LIFT:\nMERCHANT";
rooms["LIFT: MERCHANT DECK: TRANSIT"].description = "";
rooms["LIFT: MERCHANT DECK: TRANSIT"].planet = "TAVROS STATION";
rooms["LIFT: MERCHANT DECK: TRANSIT"].system = "SYSTEM: KALAS";
rooms["LIFT: MERCHANT DECK: TRANSIT"].eastExit = "MERCHANT'S THOROUGHFARE2";
rooms["LIFT: MERCHANT DECK: TRANSIT"].moveMinutes = 1;
rooms["LIFT: MERCHANT DECK: TRANSIT"].addFlag(GLOBAL.INDOOR);
rooms["LIFT: MERCHANT DECK: TRANSIT"].addFlag(GLOBAL.PUBLIC);
rooms["LIFT: MERCHANT DECK: TRANSIT"].addFlag(GLOBAL.LIFTDOWN);
rooms["LIFT: MERCHANT DECK: TRANSIT"].addFlag(GLOBAL.NUDITY_ILLEGAL);
rooms["LIFT: MERCHANT DECK: TRANSIT"].runOnEnter = hangarBonusTransit;

//105 "TAVROS HANGAR". The Hangar
rooms["TAVROS HANGAR"] = new RoomClass(this);
rooms["TAVROS HANGAR"].roomName = "THE\nHANGAR";
Expand All @@ -169,7 +183,7 @@ public function initTavrosRooms():void
rooms["TAVROS HANGAR"].addFlag(GLOBAL.NUDITY_ILLEGAL);
rooms["TAVROS HANGAR"].runOnEnter = tavrosHangarStuff;

//106"TAVROS LIFT". In The Lift - The Hangar
//106a "TAVROS LIFT". In The Lift - The Hangar
rooms["TAVROS LIFT"] = new RoomClass(this);
rooms["TAVROS LIFT"].roomName = "LIFT:\nHANGAR";
rooms["TAVROS LIFT"].description = "";
Expand All @@ -184,6 +198,22 @@ public function initTavrosRooms():void
rooms["TAVROS LIFT"].addFlag(GLOBAL.PUBLIC);
rooms["TAVROS LIFT"].addFlag(GLOBAL.NUDITY_ILLEGAL);
rooms["TAVROS LIFT"].runOnEnter = hangarBonus;

//106b "TAVROS LIFT: TRANSIT" Used to display transit text when changing floors
rooms["TAVROS LIFT: TRANSIT"] = new RoomClass(this);
rooms["TAVROS LIFT: TRANSIT"].roomName = "LIFT:\nHANGAR";
rooms["TAVROS LIFT: TRANSIT"].description = "";
rooms["TAVROS LIFT: TRANSIT"].planet = "TAVROS STATION";
rooms["TAVROS LIFT: TRANSIT"].system = "SYSTEM: KALAS";
rooms["TAVROS LIFT: TRANSIT"].eastExit = "TAVROS HANGAR";
rooms["TAVROS LIFT: TRANSIT"].moveMinutes = 1;
//rooms["TAVROS LIFT: TRANSIT"].inExit = "LIFT: MERCHANT DECK";
//rooms["TAVROS LIFT: TRANSIT"].inText = "ToMerchant";
rooms["TAVROS LIFT: TRANSIT"].addFlag(GLOBAL.INDOOR);
rooms["TAVROS LIFT: TRANSIT"].addFlag(GLOBAL.LIFTUP);
rooms["TAVROS LIFT: TRANSIT"].addFlag(GLOBAL.PUBLIC);
rooms["TAVROS LIFT: TRANSIT"].addFlag(GLOBAL.NUDITY_ILLEGAL);
rooms["TAVROS LIFT: TRANSIT"].runOnEnter = hangarBonusTransit;

//107 The Dark Chrysalis
rooms["DARK CHRYSALIS"] = new RoomClass(this);
Expand Down Expand Up @@ -523,6 +553,7 @@ public function initTavrosRooms():void
rooms["INESSA"].addFlag(GLOBAL.COMMERCE);
rooms["INESSA"].runOnEnter = happyTailsBonus;

//Lift: Residential Deck(a)
rooms["LIFT: RESIDENTIAL DECK"] = new RoomClass(this);
rooms["LIFT: RESIDENTIAL DECK"].roomName = "LIFT:\nRESIDENTIAL";
rooms["LIFT: RESIDENTIAL DECK"].description = "";
Expand All @@ -539,6 +570,23 @@ public function initTavrosRooms():void
rooms["LIFT: RESIDENTIAL DECK"].addFlag(GLOBAL.NUDITY_ILLEGAL);
rooms["LIFT: RESIDENTIAL DECK"].runOnEnter = hangarBonus;

//Lift: Residential Deck(b) Used to display transit text when changing floors.
rooms["LIFT: RESIDENTIAL DECK: TRANSIT"] = new RoomClass(this);
rooms["LIFT: RESIDENTIAL DECK: TRANSIT"].roomName = "LIFT:\nRESIDENTIAL";
rooms["LIFT: RESIDENTIAL DECK: TRANSIT"].description = "";
rooms["LIFT: RESIDENTIAL DECK: TRANSIT"].planet = "TAVROS STATION";
rooms["LIFT: RESIDENTIAL DECK: TRANSIT"].system = "SYSTEM: KALAS";
rooms["LIFT: RESIDENTIAL DECK: TRANSIT"].northExit = "RESIDENTIAL DECK 6";
rooms["LIFT: RESIDENTIAL DECK: TRANSIT"].southExit = "RESIDENTIAL DECK 2";
rooms["LIFT: RESIDENTIAL DECK: TRANSIT"].westExit = "";
rooms["LIFT: RESIDENTIAL DECK: TRANSIT"].eastExit = "";
rooms["LIFT: RESIDENTIAL DECK: TRANSIT"].moveMinutes = 1;
rooms["LIFT: RESIDENTIAL DECK: TRANSIT"].addFlag(GLOBAL.INDOOR);
rooms["LIFT: RESIDENTIAL DECK: TRANSIT"].addFlag(GLOBAL.LIFTDOWN);
rooms["LIFT: RESIDENTIAL DECK: TRANSIT"].addFlag(GLOBAL.PUBLIC);
rooms["LIFT: RESIDENTIAL DECK: TRANSIT"].addFlag(GLOBAL.NUDITY_ILLEGAL);
rooms["LIFT: RESIDENTIAL DECK: TRANSIT"].runOnEnter = hangarBonusTransit;

//1002 South Plaza
rooms["RESIDENTIAL DECK 2"] = new RoomClass(this);
rooms["RESIDENTIAL DECK 2"].roomName = "SOUTH\nPLAZA";
Expand Down Expand Up @@ -922,6 +970,7 @@ public function initTavrosRooms():void
rooms["RES DECK EAST ESTATE"].addFlag(GLOBAL.PUBLIC);

// Nursery
//Nursery Elevator(a)
rooms["NURSERYELEVATOR"] = new RoomClass(this);
rooms["NURSERYELEVATOR"].roomName = "ELEVATOR:\nNURSERY";
rooms["NURSERYELEVATOR"].description = "";
Expand All @@ -935,7 +984,22 @@ public function initTavrosRooms():void
rooms["NURSERYELEVATOR"].addFlag(GLOBAL.LIFTDOWN);
rooms["NURSERYELEVATOR"].addFlag(GLOBAL.NUDITY_ILLEGAL);
rooms["NURSERYELEVATOR"].addFlag(GLOBAL.NURSERY);


//Nursery Elevator(b): Used to display transit text when changing floors
rooms["NURSERYELEVATOR: TRANSIT"] = new RoomClass(this);
rooms["NURSERYELEVATOR: TRANSIT"].roomName = "ELEVATOR:\nNURSERY";
rooms["NURSERYELEVATOR: TRANSIT"].description = "";
rooms["NURSERYELEVATOR: TRANSIT"].runOnEnter = hangarBonusTransit;
rooms["NURSERYELEVATOR: TRANSIT"].northExit = "NURSERYE14";
rooms["NURSERYELEVATOR: TRANSIT"].planet = "TAVROS STATION";
rooms["NURSERYELEVATOR: TRANSIT"].system = "SYSTEM: KALAS";
rooms["NURSERYELEVATOR: TRANSIT"].moveMinutes = 1;
rooms["NURSERYELEVATOR: TRANSIT"].addFlag(GLOBAL.INDOOR);
rooms["NURSERYELEVATOR: TRANSIT"].addFlag(GLOBAL.PUBLIC);
rooms["NURSERYELEVATOR: TRANSIT"].addFlag(GLOBAL.LIFTDOWN);
rooms["NURSERYELEVATOR: TRANSIT"].addFlag(GLOBAL.NUDITY_ILLEGAL);
rooms["NURSERYELEVATOR: TRANSIT"].addFlag(GLOBAL.NURSERY);

rooms["NURSERYSTAIRS1F"] = new RoomClass(this);
rooms["NURSERYSTAIRS1F"].roomName = "NURSERY:\n1F STAIRWELL";
rooms["NURSERYSTAIRS1F"].description = "";
Expand Down