mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-09-11 22:45:06 -04:00
Initial Cleanup
This commit is contained in:
@@ -134,7 +134,6 @@ public class advanced_turret extends script.base_script
|
||||
dictionary dict = new dictionary();
|
||||
dict.put("range", range);
|
||||
messageTo(turret, "createTriggerVolume", dict, 0.0f, false);
|
||||
return;
|
||||
}
|
||||
public static void deactivateTurret(obj_id turret) throws InterruptedException
|
||||
{
|
||||
@@ -146,7 +145,6 @@ public class advanced_turret extends script.base_script
|
||||
stopTrackingTarget(turret);
|
||||
utils.removeScriptVar(turret, IS_ACTIVE);
|
||||
setInvulnerable(turret, true);
|
||||
return;
|
||||
}
|
||||
public static boolean isActive(obj_id turret) throws InterruptedException
|
||||
{
|
||||
@@ -175,7 +173,6 @@ public class advanced_turret extends script.base_script
|
||||
return;
|
||||
}
|
||||
utils.setScriptVar(turret, IS_ENGAGED, target);
|
||||
return;
|
||||
}
|
||||
public static void stopTrackingTarget(obj_id turret) throws InterruptedException
|
||||
{
|
||||
@@ -185,7 +182,6 @@ public class advanced_turret extends script.base_script
|
||||
return;
|
||||
}
|
||||
utils.removeScriptVar(turret, IS_ENGAGED);
|
||||
return;
|
||||
}
|
||||
public static boolean isEngaged(obj_id turret) throws InterruptedException
|
||||
{
|
||||
@@ -193,11 +189,7 @@ public class advanced_turret extends script.base_script
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (utils.hasScriptVar(turret, IS_ENGAGED))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return utils.hasScriptVar(turret, IS_ENGAGED);
|
||||
}
|
||||
public static obj_id getCurrentTarget(obj_id turret) throws InterruptedException
|
||||
{
|
||||
@@ -276,7 +268,6 @@ public class advanced_turret extends script.base_script
|
||||
ri.maxRange = range;
|
||||
setWeaponRangeInfo(objWeapon, ri);
|
||||
activateTurret(turret);
|
||||
return;
|
||||
}
|
||||
public static boolean isValidTarget(obj_id turret, obj_id target) throws InterruptedException
|
||||
{
|
||||
@@ -367,7 +358,7 @@ public class advanced_turret extends script.base_script
|
||||
{
|
||||
if (!isValidTarget(turret, target))
|
||||
{
|
||||
doLogging("addTarget", "" + getName(target) + "/" + target + " was invalid");
|
||||
doLogging("addTarget", getName(target) + "/" + target + " was invalid");
|
||||
return;
|
||||
}
|
||||
Vector targets = null;
|
||||
@@ -391,7 +382,6 @@ public class advanced_turret extends script.base_script
|
||||
attackPulse(turret);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
public static void addTargets(obj_id turret, obj_id[] newTargets) throws InterruptedException
|
||||
{
|
||||
@@ -406,7 +396,7 @@ public class advanced_turret extends script.base_script
|
||||
}
|
||||
for (obj_id newTarget : newTargets) {
|
||||
if (!isValidTarget(turret, newTarget) || targets.indexOf(newTarget) != -1) {
|
||||
doLogging("addTargets", "" + getName(newTarget) + "/" + newTarget + " was invalid or already in my target array");
|
||||
doLogging("addTargets", getName(newTarget) + "/" + newTarget + " was invalid or already in my target array");
|
||||
continue;
|
||||
}
|
||||
targets.add(newTarget);
|
||||
@@ -419,7 +409,6 @@ public class advanced_turret extends script.base_script
|
||||
messageTo(turret, "handleTurretAttack", null, 1, false);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
public static void removeTarget(obj_id turret, obj_id target) throws InterruptedException
|
||||
{
|
||||
@@ -451,7 +440,6 @@ public class advanced_turret extends script.base_script
|
||||
utils.setBatchScriptVar(turret, TARGETS, targets);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
public static boolean handleTurretDamage(obj_id turret, obj_id attacker, obj_id weapon, int dmgAmount) throws InterruptedException
|
||||
{
|
||||
@@ -505,7 +493,6 @@ public class advanced_turret extends script.base_script
|
||||
deactivateTurret(turret);
|
||||
playClientEffectLoc(turret, "clienteffect/combat_explosion_lair_large.cef", death, 0);
|
||||
messageTo(turret, "handleDestroyTurret", null, 2, false);
|
||||
return;
|
||||
}
|
||||
public static obj_id getGoodTurretTarget(obj_id turret) throws InterruptedException
|
||||
{
|
||||
@@ -583,7 +570,6 @@ public class advanced_turret extends script.base_script
|
||||
dictionary params = new dictionary();
|
||||
params.put("target", target);
|
||||
messageTo(turret, "turretShot", params, getWeaponAttackSpeed(weapon), false);
|
||||
return;
|
||||
}
|
||||
public static void doLogging(String section, String message) throws InterruptedException
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user