use of org.terasology.anatomy.event.AnatomyStatusGatheringEvent in project Anatomy by Terasology.
the class AnatomySystem method showAnatomyEffects.
@Command(shortDescription = "Lists anatomy effects on all parts")
public String showAnatomyEffects(@Sender EntityRef client) {
EntityRef character = client.getComponent(ClientComponent.class).character;
String result = "Anatomy effects:\n";
AnatomyStatusGatheringEvent event = new AnatomyStatusGatheringEvent();
character.send(event);
Map<String, List<String>> partEffects = event.getEffectsMap();
for (Map.Entry<String, List<String>> partEntry : partEffects.entrySet()) {
result += getAnatomyNameFromID(partEntry.getKey(), character.getComponent(AnatomyComponent.class)) + ": ";
for (String partEffect : partEntry.getValue()) {
result += partEffect + ", ";
}
result += "\n";
}
return result;
}
Aggregations