Rouge blastoff
Posted: Thu Apr 03, 2014 12:12 pm
So this is something I want to change, but I suspect others might not agree, so posting here, rather than a PR at github.
Why do we have:
In my opinion, if you click "take off" button in worldview, i.e. without asking permission to launch, then this is brute force and should not care about any station rules or protocol, so even if ships are overhead, or the station is crowded you take off/Blastoff.
Removing that if-statement would allow us to use the permission-string only from ui-code, thus fixing this in Lobby.lua:
As it is now, it feels strange that you can be denied takeoff even when you're not asking permission.
Why do we have:
Code: Select all
void WorldView::OnClickBlastoff()
{
Pi::BoinkNoise();
if (Pi::player->GetFlightState() == Ship::DOCKED) {
if (!Pi::player->Undock()) {
Pi::cpan->MsgLog()->ImportantMessage(Pi::player->GetDockedWith()->GetLabel(),
Lang::LAUNCH_PERMISSION_DENIED_BUSY);
}
} else {
Pi::player->Blastoff();
}
}
Removing that if-statement would allow us to use the permission-string only from ui-code, thus fixing this in Lobby.lua:
Code: Select all
local l = Lang.GetResource("ui-core")
-- XXX for LAUNCH_PERMISSION_DENIED_BUSY, still needed by WorldView
local lcore = Lang.GetResource("core")