Skip to content

Commit

Permalink
Calculate particle effects correctly
Browse files Browse the repository at this point in the history
the Effects enum sometimes acts like it has effects it doesn't... no
idea what's going on there, just give it a lowered priority under
ParticleEffect for now.
  • Loading branch information
mcmonkey4eva committed Dec 18, 2013
1 parent 02cc12a commit 50e2f92
Showing 1 changed file with 6 additions and 4 deletions.
Expand Up @@ -50,12 +50,11 @@ public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException
else if (!scriptEntry.hasObject("effect") &&
!scriptEntry.hasObject("particleeffect")) {

if (arg.matchesEnum(Effect.values())) {
scriptEntry.addObject("effect", Effect.valueOf(arg.getValue().toUpperCase()));
} else if (arg.matchesEnum(ParticleEffect.values())) {
if (arg.matchesEnum(ParticleEffect.values())) {
scriptEntry.addObject("particleeffect",
ParticleEffect.valueOf(arg.getValue().toUpperCase()));
} else if (arg.matches("random")) {
}
else if (arg.matches("random")) {
// Get another effect if "RANDOM" is used
ParticleEffect effect = null;
// Make sure the new effect is not an invisible effect
Expand All @@ -64,6 +63,9 @@ else if (!scriptEntry.hasObject("effect") &&
}
scriptEntry.addObject("particleeffect", effect);
}
else if (arg.matchesEnum(Effect.values())) {
scriptEntry.addObject("effect", Effect.valueOf(arg.getValue().toUpperCase()));
}
}

else if (!scriptEntry.hasObject("visibility")
Expand Down

0 comments on commit 50e2f92

Please sign in to comment.