Files
dsrc/sku.0/sys.server/compiled/game/script/powerup/pup.script
T

54 lines
1.4 KiB
Plaintext

/***** INCLUDES ********************************************************/
include library.powerup;
include library.utils;
/***** INHERITS ********************************************************/
/***** CONSTANTS *******************************************************/
const int LATEST_CONVERTED_VERSION = 2;
// Conversion 1
const string TEMPLATE_NAME_EXPLOSIVE = "object/tangible/powerup/weapon/thrown_explosive.iff";
const string TEMPLATE_NAME_WIRING = "object/tangible/powerup/weapon/thrown_wiring.iff";
// Conversion 2
const string TEMPLATE_NAME_DURABLE_LATHE = "object/tangible/powerup/weapon/fs_quest_sad/melee_speed_quest.iff";
/***** TRIGGER *********************************************************/
trigger OnApplyPowerup (obj_id player, obj_id target)
{
//if ( !powerup.applyPowerup(player, self, target) )
return SCRIPT_OVERRIDE;
//return SCRIPT_CONTINUE;
}
trigger OnGetAttributes(obj_id player, string[] names, string[] attribs)
{
powerup.getWeaponAttributes (player, self, names, attribs, false);
return SCRIPT_CONTINUE;
}
trigger OnInitialize()
{
//blow up the power up and the factory crates
obj_id container = getContainedBy(self);
if (!isIdValid(container) || !isGameObjectTypeOf(getGameObjectType(container), GOT_misc_factory_crate))
{
destroyObject(self);
}
else
{
destroyObject(container);
destroyObject(self);
}
return SCRIPT_CONTINUE;
}