mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
46 lines
1.2 KiB
Plaintext
46 lines
1.2 KiB
Plaintext
include library.space_transition;
|
|
include library.space_utils;
|
|
|
|
// ======================================================================
|
|
//
|
|
// space/ship/shipcontrol_falcon.script
|
|
//
|
|
// Copyright 2004 Sony Online Entertainment
|
|
//
|
|
// ======================================================================
|
|
|
|
const string_id SID_PILOT = new string_id("space/space_interaction", "pilot_ship");
|
|
|
|
// ======================================================================
|
|
|
|
trigger OnObjectMenuRequest(obj_id player, menu_info mi)
|
|
{
|
|
obj_id objShip = space_transition.getContainingShip(player);
|
|
|
|
if (space_utils.playerCanControlShipSlot(objShip, player, true))
|
|
{
|
|
mi.addRootMenu(menu_info_types.SERVER_MENU1, SID_PILOT);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
trigger OnObjectMenuSelect(obj_id player, int item)
|
|
{
|
|
if (item == menu_info_types.SERVER_MENU1)
|
|
{
|
|
obj_id objShip = space_transition.getContainingShip(player);
|
|
|
|
if (space_utils.playerCanControlShipSlot(objShip, player, false))
|
|
{
|
|
queueCommand(player, ##"pilotship", null, "", COMMAND_PRIORITY_DEFAULT);
|
|
}
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|