/** * 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; }