mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-01 01:15:59 -04:00
40 lines
1009 B
Plaintext
40 lines
1009 B
Plaintext
/**
|
|
* Copyright (c)2000-2002 Sony Online Entertainment Inc.
|
|
* All Rights Reserved
|
|
*
|
|
* Title: comestible.script
|
|
* Description: script for handling comestible consumption
|
|
* @author $Author:$
|
|
* @version $Revision:$
|
|
*/
|
|
|
|
include library.sui;
|
|
include library.utils;
|
|
include library.consumable;
|
|
|
|
const string SCRIPT_COMESTIBLE = "item.comestible.comestible";
|
|
const string EXAM_ATTRIB_MOD = "attribmods";
|
|
const string EXAM_NONE = "@consumable:none";
|
|
|
|
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 );
|
|
|
|
mid = mi.getMenuItemByType( menu_info_types.EXAMINE );
|
|
if ( mid != null )
|
|
mid.setServerNotify( true );
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnObjectMenuSelect( obj_id player, int item )
|
|
{
|
|
if ( item == menu_info_types.ITEM_USE )
|
|
queueCommand( player, ##"eat", self, "", COMMAND_PRIORITY_DEFAULT );
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|