mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-03 03:15:55 -04:00
29 lines
796 B
Plaintext
29 lines
796 B
Plaintext
/**
|
|
* Title: detector_deed.script
|
|
* Description: script to be attached to factional covert detectors
|
|
*/
|
|
|
|
/***** INCLUDES ********************************************************/
|
|
|
|
inherits faction_perk.base.factional_deed;
|
|
|
|
/***** TRIGGERS ********************************************************/
|
|
trigger OnAttach()
|
|
{
|
|
string templateName = getTemplateName(self);
|
|
string faction = "imperial";
|
|
if(templateName.indexOf ("_rebel") != -1)
|
|
faction = "rebel";
|
|
|
|
string_id currentStringId = getNameStringId(self);
|
|
string stringIdAsciiPart = currentStringId.getAsciiId();
|
|
stringIdAsciiPart = stringIdAsciiPart+"_"+faction;
|
|
|
|
string_id newFactionalizedName = new string_id("deed",stringIdAsciiPart);
|
|
setName(self, "");
|
|
setName(self, newFactionalizedName);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|