Example #1
0
 /**
  * Gets a message key for a short alarm message associated with the alarm level of this player.
  *
  * @param player The other <code>Player</code>.
  * @return The alarm message key.
  */
 public String getAlarmLevelKey(Player player) {
   return (!player.hasContacted(owner))
       ? "model.indianSettlement.tension.wary"
       : (!hasContacted(player))
           ? "model.indianSettlement.tension.unknown"
           : getAlarm(player).getNameKey();
 }
Example #2
0
 /** {@inheritDoc} */
 public StringTemplate getAlarmLevelLabel(Player player) {
   String key =
       (!player.hasContacted(owner))
           ? "model.indianSettlement.tension.wary"
           : (!hasContacted(player))
               ? "model.indianSettlement.tension.unknown"
               : "model.indianSettlement." + getAlarm(player).getKey();
   return StringTemplate.template(key).addStringTemplate("%nation%", getOwner().getNationName());
 }