mirror of
https://bitbucket.org/seefoe/dsrc.git
synced 2026-07-31 01:15:55 -04:00
55 lines
1.3 KiB
Plaintext
55 lines
1.3 KiB
Plaintext
include library.create;
|
|
include library.utils;
|
|
include library.npe;
|
|
|
|
const string_id OPEN_HANGAR = new string_id("npe_hangar_1", "open_hangar");
|
|
|
|
trigger OnAttach()
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnObjectMenuRequest(obj_id player, menu_info mi)
|
|
{
|
|
|
|
menu_info_data mid = mi.getMenuItemByType(menu_info_types.ITEM_USE);
|
|
if ( mid != null )
|
|
mid.setServerNotify(true);
|
|
else
|
|
mi.addRootMenu(menu_info_types.ITEM_USE, new string_id("ui_radial", "item_use"));
|
|
|
|
return SCRIPT_CONTINUE;
|
|
|
|
}
|
|
|
|
trigger OnObjectMenuSelect(obj_id player, int item)
|
|
{
|
|
if ( item == menu_info_types.ITEM_USE )
|
|
{
|
|
//do that thing
|
|
|
|
removeObjVar(player, "canpickupmedikit");
|
|
removeObjVar(player, "finishedtutorial");
|
|
|
|
utils.removeScriptVar(player, "npe.hangarEventStarted");
|
|
|
|
|
|
if (checkGod(player))
|
|
return SCRIPT_CONTINUE;
|
|
//sendSystemMessageTestingOnly(player, "Going to turret...");
|
|
detachScript(player, "npe.han_solo_experience_player");
|
|
attachScript(player, "npe.npe_falcon_player");
|
|
npe.movePlayerFromHangarToFalcon(player);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
boolean checkGod(obj_id self)
|
|
{
|
|
if (isGod(self))
|
|
{
|
|
sendSystemMessageTestingOnly(self, "Please turn off god mode when moving between npe locations. God mode and instances do not get along");
|
|
return true;
|
|
}
|
|
return false;
|
|
} |