mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
Made MINOR changes to cybernetic scripts. Would be best to re-write these if any problems are found.
This commit is contained in:
Regular → Executable
+9
-26
@@ -1,15 +1,7 @@
|
||||
package script.cybernetic;
|
||||
|
||||
import script.*;
|
||||
import script.base_class.*;
|
||||
import script.combat_engine.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.Hashtable;
|
||||
import java.util.Vector;
|
||||
import script.base_script;
|
||||
|
||||
import script.library.cybernetic;
|
||||
import script.library.utils;
|
||||
import script.dictionary;
|
||||
import script.obj_id;
|
||||
|
||||
public class cybernetic_anakin_arm_fix extends script.base_script
|
||||
{
|
||||
@@ -18,31 +10,22 @@ public class cybernetic_anakin_arm_fix extends script.base_script
|
||||
}
|
||||
public int OnAttach(obj_id self) throws InterruptedException
|
||||
{
|
||||
obj_id cybernetic = getSelf();
|
||||
messageTo(cybernetic, "delayedCyberneticForearmFix", null, 4.0f, false);
|
||||
messageTo(self, "delayedCyberneticForearmFix", null, 4.0f, false);
|
||||
return SCRIPT_CONTINUE;
|
||||
}
|
||||
public int OnInitialize(obj_id self) throws InterruptedException
|
||||
{
|
||||
obj_id cybernetic = getSelf();
|
||||
messageTo(cybernetic, "delayedCyberneticForearmFix", null, 4.0f, false);
|
||||
messageTo(self, "delayedCyberneticForearmFix", null, 4.0f, false);
|
||||
return SCRIPT_CONTINUE;
|
||||
}
|
||||
public int delayedCyberneticForearmFix(obj_id self, dictionary params) throws InterruptedException
|
||||
{
|
||||
obj_id cybernetic = getSelf();
|
||||
if (!hasObjVar(cybernetic, "cybernetic_reward_fixed"))
|
||||
if (!hasObjVar(self, "cybernetic_reward_fixed"))
|
||||
{
|
||||
clearBioLink(cybernetic);
|
||||
if (hasScript(cybernetic, "item.armor.biolink_item_non_faction"))
|
||||
{
|
||||
detachScript(cybernetic, "item.armor.biolink_item_non_faction");
|
||||
}
|
||||
if (hasObjVar(cybernetic, "biolink.id"))
|
||||
{
|
||||
removeObjVar(cybernetic, "biolink.id");
|
||||
}
|
||||
setObjVar(cybernetic, "cybernetic_reward_fixed", 1);
|
||||
clearBioLink(self);
|
||||
detachScript(self, "item.armor.biolink_item_non_faction");
|
||||
removeObjVar(self, "biolink.id");
|
||||
setObjVar(self, "cybernetic_reward_fixed", 1);
|
||||
}
|
||||
return SCRIPT_CONTINUE;
|
||||
}
|
||||
|
||||
Regular → Executable
+6
-13
@@ -1,19 +1,12 @@
|
||||
package script.cybernetic;
|
||||
|
||||
import script.*;
|
||||
import script.base_class.*;
|
||||
import script.combat_engine.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.Hashtable;
|
||||
import java.util.Vector;
|
||||
import script.base_script;
|
||||
|
||||
import script.library.features;
|
||||
import script.library.cybernetic;
|
||||
import script.library.utils;
|
||||
import script.library.hue;
|
||||
import script.dictionary;
|
||||
import script.library.armor;
|
||||
import script.library.cybernetic;
|
||||
import script.library.proc;
|
||||
import script.library.utils;
|
||||
import script.obj_id;
|
||||
import script.string_id;
|
||||
|
||||
public class cybernetic_crafted_item extends script.base_script
|
||||
{
|
||||
@@ -196,7 +189,7 @@ public class cybernetic_crafted_item extends script.base_script
|
||||
if (specialCommand != null && !specialCommand.equals(""))
|
||||
{
|
||||
names[free] = utils.packStringId(new string_id("ep3/cybernetic", "special_command"));
|
||||
attribs[free++] = utils.packStringId(new string_id("ep3/cybernetic", specialCommand));
|
||||
attribs[free] = utils.packStringId(new string_id("ep3/cybernetic", specialCommand));
|
||||
}
|
||||
return SCRIPT_CONTINUE;
|
||||
}
|
||||
|
||||
Regular → Executable
+6
-16
@@ -1,19 +1,9 @@
|
||||
package script.cybernetic;
|
||||
|
||||
import script.*;
|
||||
import script.base_class.*;
|
||||
import script.combat_engine.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.Hashtable;
|
||||
import java.util.Vector;
|
||||
import script.base_script;
|
||||
|
||||
import script.library.features;
|
||||
import script.library.cybernetic;
|
||||
import script.library.utils;
|
||||
import script.library.hue;
|
||||
import script.library.armor;
|
||||
import script.library.proc;
|
||||
import script.dictionary;
|
||||
import script.library.*;
|
||||
import script.obj_id;
|
||||
import script.string_id;
|
||||
|
||||
public class cybernetic_item extends script.base_script
|
||||
{
|
||||
@@ -66,7 +56,7 @@ public class cybernetic_item extends script.base_script
|
||||
else
|
||||
{
|
||||
String templateName = getTemplateName(self);
|
||||
if (templateName.indexOf("s01") == -1)
|
||||
if (!templateName.contains("s01"))
|
||||
{
|
||||
if (!features.hasEpisode3Expansion(destContainer))
|
||||
{
|
||||
@@ -220,7 +210,7 @@ public class cybernetic_item extends script.base_script
|
||||
if (specialCommand != null && !specialCommand.equals(""))
|
||||
{
|
||||
names[free] = utils.packStringId(new string_id("ep3/cybernetic", "special_command"));
|
||||
attribs[free++] = utils.packStringId(new string_id("ep3/cybernetic", specialCommand));
|
||||
attribs[free] = utils.packStringId(new string_id("ep3/cybernetic", specialCommand));
|
||||
}
|
||||
return SCRIPT_CONTINUE;
|
||||
}
|
||||
|
||||
Regular → Executable
+6
-17
@@ -1,20 +1,9 @@
|
||||
package script.cybernetic;
|
||||
|
||||
import script.*;
|
||||
import script.base_class.*;
|
||||
import script.combat_engine.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.Hashtable;
|
||||
import java.util.Vector;
|
||||
import script.base_script;
|
||||
|
||||
import script.library.cybernetic;
|
||||
import script.library.utils;
|
||||
import script.library.buff;
|
||||
import script.library.sui;
|
||||
import script.library.money;
|
||||
import script.library.features;
|
||||
import script.library.ai_lib;
|
||||
import script.dictionary;
|
||||
import script.library.*;
|
||||
import script.obj_id;
|
||||
import script.string_id;
|
||||
|
||||
public class cybernetic_player extends script.systems.combat.combat_base
|
||||
{
|
||||
@@ -232,7 +221,7 @@ public class cybernetic_player extends script.systems.combat.combat_base
|
||||
return SCRIPT_CONTINUE;
|
||||
}
|
||||
String itemTemplate = getTemplateName(item);
|
||||
if ((itemTemplate.indexOf("crafted") > -1) && hasScript(item, "item.armor.biolink_item_non_faction"))
|
||||
if ((itemTemplate.contains("crafted")) && hasScript(item, "item.armor.biolink_item_non_faction"))
|
||||
{
|
||||
CustomerServiceLog("cyborg", "Crafted Cybernetic Fix -Player(" + self + ") Cybernetic(" + item + ") had the bio-link script removed because it is not needed.");
|
||||
detachScript(item, "item.armor.biolink_item_non_faction");
|
||||
@@ -306,7 +295,7 @@ public class cybernetic_player extends script.systems.combat.combat_base
|
||||
{
|
||||
playClientEffectObj(self, "clienteffect/cyborg_itm_installed.cef", self, "");
|
||||
CustomerServiceLog("cyborg", "Cybernetic Item(" + item + ") was successfully installed on Player(" + self + ")");
|
||||
if ((getTemplateName(item)).indexOf("crafted") > -1)
|
||||
if ((getTemplateName(item)).contains("crafted"))
|
||||
{
|
||||
CustomerServiceLog("cyborg", "Cybernetic Item(" + item + ") was installed on Player(" + self + ") and Bio-Linked - as designed.");
|
||||
setBioLink(item, self);
|
||||
|
||||
Reference in New Issue
Block a user