mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
37 lines
635 B
Plaintext
37 lines
635 B
Plaintext
include library.space_crafting;
|
|
include library.space_utils;
|
|
include library.utils;
|
|
include library.space_transition;
|
|
|
|
|
|
trigger OnAttach()
|
|
{
|
|
string strKitType= getStringObjVar(self, "strKitType");
|
|
if(strKitType=="plasma_conduit")
|
|
{
|
|
setCount(self, 10);
|
|
}
|
|
else
|
|
{
|
|
setCount(self, 1000);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnGetAttributes( obj_id player, string[] names, string[] attribs )
|
|
{
|
|
int idx = utils.getValidAttributeIndex(names);
|
|
if (idx == -1)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
int charges = getCount(self);
|
|
names[idx] = "repairpoints";
|
|
attribs[idx] = Integer.toString(charges);
|
|
|
|
idx++;
|
|
|
|
return SCRIPT_CONTINUE;
|
|
|
|
}
|
|
|