Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/main/java/nomadrealms/context/game/actor/Actor.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
*/
public interface Actor extends HasPosition, HasHealth, HasInventory, Target, Renderable {

String name();

default List<Action> actions() {
return new ArrayList<>();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,4 +197,9 @@ public void lastResolvedCard(WorldCard card) {
this.lastResolvedCard = card;
}

@Override
public String name() {
return "Card Player";
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,9 @@ public List<Appendage> appendages() {
return asList(HEAD, EYE, EYE, TORSO, ARM, ARM, LEG, LEG);
}

@Override
public String name() {
return name;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,9 @@ public List<Appendage> appendages() {
return asList(HEAD, EYE, EYE, TORSO, ARM, ARM, LEG, LEG, TAIL);
}

@Override
public String name() {
return name;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,9 @@ public List<Appendage> appendages() {
return asList(HEAD, EYE, EYE, TORSO, ARM, ARM, LEG, LEG);
}

@Override
public String name() {
return name;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,9 @@ public void reinitializeAfterLoad(World world) {
}
}

@Override
public String name() {
return name;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
import static engine.visuals.constraint.posdim.AbsoluteConstraint.zero;
import static nomadrealms.context.game.world.map.generation.status.biome.nomenclature.BiomeCategory.HUMIDITY_CEIL;
import static nomadrealms.context.game.world.map.generation.status.biome.nomenclature.BiomeCategory.HUMIDITY_FLOOR;
import static engine.common.colour.Colour.rgb;
import static nomadrealms.context.game.world.map.generation.status.biome.nomenclature.BiomeCategory.TEMPERATURE_CEIL;
import static nomadrealms.context.game.world.map.generation.status.biome.nomenclature.BiomeCategory.TEMPERATURE_FLOOR;

import nomadrealms.context.game.actor.Actor;
import nomadrealms.context.game.actor.HasTooltip;
import nomadrealms.context.game.world.map.area.Tile;
import nomadrealms.context.game.world.map.area.Zone;
Expand Down Expand Up @@ -51,6 +53,12 @@ public UIContent visit(Tile tile) {
500, 20, re.font,
container.constraintBox().coordinate().add(tileSpotlight.constraintBox().w(), zero())));
sb.append("Tile coordinates: ").append(tile.coord()).append("\n");
Actor actor = tile.actor();
if (actor != null) {
container.fill(rgb(255, 100, 100));
sb.append("Actor: ").append(actor.name()).append("\n");
sb.append("Health: ").append(actor.health()).append("\n");
}
Zone zone = tile.zone();
BiomeParameters p = zone.biomeGenerationStep().parametersAt(tile.coord());

Expand Down