mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
69 lines
1.4 KiB
Plaintext
69 lines
1.4 KiB
Plaintext
include library.space_crafting;
|
|
include library.utils;
|
|
include library.create;
|
|
include library.space_transition;
|
|
include library.space_utils;
|
|
|
|
const string_id MNU_CREATE_VEHICLE = new string_id("sui", "create_vehicle");
|
|
const string STF = "space/space_item";
|
|
|
|
trigger OnInitialize()
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
|
|
}
|
|
|
|
trigger OnGetAttributes( obj_id player, string[] names, string[] attribs )
|
|
{
|
|
int idx = utils.getValidAttributeIndex(names);
|
|
if (idx == -1)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
return SCRIPT_CONTINUE;
|
|
|
|
}
|
|
|
|
|
|
trigger OnObjectMenuRequest(obj_id player, menu_info mi)
|
|
{
|
|
if ( !utils.isNestedWithin(self, player) )
|
|
return SCRIPT_CONTINUE;
|
|
|
|
int mnuColor = mi.addRootMenu(menu_info_types.SERVER_MENU1, MNU_CREATE_VEHICLE);
|
|
if ( mnuColor > -1 && (( getContainedBy(self) != getOwner(self) ) || isGod(player)) )
|
|
{
|
|
string template = utils.getTemplateFilenameNoPath(self);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnObjectMenuSelect(obj_id player, int item)
|
|
{
|
|
if ( !utils.isNestedWithin(self, player) )
|
|
return SCRIPT_CONTINUE;
|
|
|
|
string template = utils.getTemplateFilenameNoPath(self);
|
|
|
|
if ( item == menu_info_types.SERVER_MENU1 )
|
|
{
|
|
obj_id datapad = utils.getDatapad(player);
|
|
|
|
|
|
if (isIdValid(datapad))
|
|
{
|
|
obj_id newShip = space_crafting.createChassisFromDeed(player, self, 5000, 5000, 5000000, "yt2400");
|
|
return SCRIPT_CONTINUE;
|
|
|
|
|
|
}
|
|
space_transition.handlePotentialSceneChange(player) ;
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
|
|
|
|
|