Add setRange(...) and setRealisticLooking(...) to LookClose. Add getPose(...) to Pose.

This commit is contained in:
Jeremy Schroeder 2013-03-03 00:42:20 -05:00
parent 330565340a
commit 3ceb5d884e
3 changed files with 34 additions and 0 deletions

17
Citizens2.iml Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -114,6 +114,14 @@ public class LookClose extends Trait implements Toggleable, CommandConfigurable
key.setBoolean("realisticlooking", realisticLooking);
}
public void setRange(int range) {
this.range = range;
}
public void setRealisticLooking(boolean realistic) {
this.realisticLooking = realistic;
}
@Override
public boolean toggle() {
enabled = !enabled;

View File

@ -63,6 +63,15 @@ public class Poses extends Trait {
throw new CommandException(Messages.COMMAND_PAGE_MISSING);
}
public Pose getAnchor(String name) {
for (Pose pose : poses.values())
if (pose.getName().equalsIgnoreCase(name))
return pose;
return null;
}
public boolean hasPose(String pose) {
return poses.containsKey(pose.toLowerCase());
}