Skip to content

Commit

Permalink
Merge pull request #61 from McArcady/add-details-for-guilds-and-merce…
Browse files Browse the repository at this point in the history
…naries

Add details for Entities guilds and mercenaries
  • Loading branch information
robertjanetzko committed Mar 16, 2020
2 parents 8ad7dc9 + 07721e9 commit efd34f5
Show file tree
Hide file tree
Showing 34 changed files with 9,189 additions and 683 deletions.
4 changes: 2 additions & 2 deletions src/main/java/legends/model/Artifact.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ public static String getGlyph(String type) {
case "quire":
return "glyphicon glyphicon-book";
case "scroll":
return "glyphicon glyphicon-file";
return "fas fa-scroll";
case "slab":
return "fa fa-square";
return "fas fa-square";

default:
return "";
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/legends/model/DanceForm.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public String getUrl() {
public String getLink() {
if(id==-1)
return "<i>UNKNOWN DANCE FORM</i>";
return "<a href=\"" + getUrl() + "\" class=\"art-form danceform\"><i class=\"fa fa-dot-circle-o\"></i> " + getName() + "</a>";
return "<a href=\"" + getUrl() + "\" class=\"art-form danceform\"><i class=\"fas fa-shoe-prints\"></i> " + getName() + "</a>";
}

@Override
Expand Down
58 changes: 55 additions & 3 deletions src/main/java/legends/model/Entity.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ public class Entity extends AbstractObject {

@Xml(value = "honor", elementClass = EntityHonor.class, multiple = true)
private List<EntityHonor> honors = new ArrayList<>();
@Xml(value = "weapon", elementClass = String.class, multiple = true)
private List<String> weapons = new ArrayList<>();
@Xml(value = "profession")
private String profession = "unknown profession";

private Map<EntityPositionLink, Integer> hfPositions = new HashMap<>();

Expand Down Expand Up @@ -106,7 +110,49 @@ public List<Leader> getLeaders() {
}

public String getType() {
return type;
switch (type) {
case "merchantcompany":
return "merchant company";
case "migratinggroup":
return "group";
case "nomadicgroup":
return "bandit gang";
case "militaryunit":
return "mercenary order";
case "outcast":
return "collection of outcasts";
case "performancetroupe":
return "performance troupe";
case "sitegovernment":
return "group";
case "guild":
case "religion":
default:
return type;
}
}

public String getShortDescription() {
String description = "";
if (race != "unknown")
description += race + " ";
description += getType();
switch (type) {
case "religion":
if (worshipIds.size() > 0)
description += " centered around the worship of " + World.getHistoricalFigure(worshipIds.get(0)).getLink();
break;
case "militaryunit":
if (worshipIds.size() > 0)
description += " devoted to the worship of " + World.getHistoricalFigure(worshipIds.get(0)).getLink();
if (weapons.size() > 0)
description += ", dedicated to the mastery of " + weapons.stream().map(s -> "the "+s).collect(EventHelper.stringList());
break;
case "guild":
description += " of " + profession + "s";
break;
}
return EventHelper.capitalize(description);
}

public void setType(String type) {
Expand Down Expand Up @@ -323,17 +369,23 @@ public String getURL() {
public static String getGlyph(String type) {
switch (type) {
case "sitegovernment":
return "fa fa-balance-scale";
return "fas fa-balance-scale";
case "outcast":
return "glyphicon glyphicon-tent";
case "nomadicgroup":
return "glyphicon glyphicon-tree-deciduous";
case "religion":
return "fa fa-university";
return "fas fa-university";
case "performancetroupe":
return "glyphicon glyphicon-cd";
case "migratinggroup":
return "glyphicon glyphicon-transfer";
case "guild":
return "glyphicon glyphicon-wrench";
case "militaryunit":
return "glyphicon glyphicon-knight";
case "merchantcompany":
return "fas fa-coins";

case "civilization":
default:
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/legends/model/MusicalForm.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public String getUrl() {
public String getLink() {
if (id == -1)
return "<i>UNKNOWN MUSICAL FORM</i>";
return "<a href=\"" + getUrl() + "\" class=\"art-form musicalform\"><i class=\"fa fa-music\"></i> " + getName() + "</a>";
return "<a href=\"" + getUrl() + "\" class=\"art-form musicalform\"><i class=\"fas fa-music\"></i> " + getName() + "</a>";
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/legends/model/PoeticForm.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public String getUrl() {
public String getLink() {
if(id==-1)
return "<i>UNKNOWN POETIC FORM</i>";
return "<a href=\"" + getUrl() + "\" class=\"art-form poeticform\"><i class=\"fa fa-comment-o\"></i> " + getName() + "</a>";
return "<a href=\"" + getUrl() + "\" class=\"art-form poeticform\"><i class=\"far fa-comment-dots\"></i> " + getName() + "</a>";
}

@Override
Expand Down
11 changes: 6 additions & 5 deletions src/main/java/legends/model/Site.java
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public static String getGlyph(String type) {
case "dark fortress":
case "fort":
case "castle":
return "fa fa-fort-awesome";
return "fab fa-fort-awesome";
case "dark pits":
return "glyphicon glyphicon-oil";
case "hamlet":
Expand All @@ -201,14 +201,15 @@ public static String getGlyph(String type) {
case "shrine":
return "glyphicon glyphicon-pawn";
case "cave":
return "fas fa-dungeon";
case "lair":
return "fa fa-square";
return "fas fa-paw";
case "tomb":
return "fa fa-stop-circle-o";
return "fas fa-stop-circle";
case "labyrinth":
return "fa fa-gg";
return "fab fa-gg";
case "monastery":
return "fa fa-university";
return "fas fa-university";

default:
return "";
Expand Down
11 changes: 6 additions & 5 deletions src/main/java/legends/model/Structure.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,26 +136,27 @@ public static String getGlyph(String type) {
case "inn_tavern":
return "glyphicon glyphicon-cutlery";
case "temple":
return "fa fa-university";
return "fas fa-university";
case "market":
return "glyphicon glyphicon-apple";
case "dungeon":
return "glyphicon glyphicon-oil";
return "fas fa-dungeon";
case "keep":
return "fa fa-fort-awesome";
return "fab fa-fort-awesome";
case "library":
return "glyphicon glyphicon-book";
case "underworld spire":
case "underworld_spire":
return "glyphicon glyphicon-tower";
case "tomb":
return "fa fa-stop-circle-o";
return "fas fa-stop-circle";
case "tower":
return "glyphicon glyphicon-tower";
case "counting house":
case "counting_house":
return "fas fa-coins";
case "guildhall":
return "glyphicon glyphicon-wrench";

default:
return "";
}
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/legends/model/WorldConstruction.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ public static String getGlyph(String type) {
case "road":
return "glyphicon glyphicon-road";
case "bridge":
return "fa fa-chevron-up";
return "fas fa-chevron-up";
case "tunnel":
return "glyphicon glyphicon-minus-sign";
return "fas fa-archway";

default:
return "fa fa-share-alt";
return "fas fa-share-alt";
}
}

Expand Down
34 changes: 34 additions & 0 deletions src/main/resources/lib/font-awesome/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Font Awesome Free License
-------------------------

Font Awesome Free is free, open source, and GPL friendly. You can use it for
commercial projects, open source projects, or really almost whatever you want.
Full Font Awesome Free license: https://fontawesome.com/license/free.

# Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/)
In the Font Awesome Free download, the CC BY 4.0 license applies to all icons
packaged as SVG and JS file types.

# Fonts: SIL OFL 1.1 License (https://scripts.sil.org/OFL)
In the Font Awesome Free download, the SIL OFL license applies to all icons
packaged as web and desktop font files.

# Code: MIT License (https://opensource.org/licenses/MIT)
In the Font Awesome Free download, the MIT license applies to all non-font and
non-icon files.

# Attribution
Attribution is required by MIT, SIL OFL, and CC BY licenses. Downloaded Font
Awesome Free files already contain embedded comments with sufficient
attribution, so you shouldn't need to do anything additional when using these
files normally.

We've kept attribution comments terse, so we ask that you do not actively work
to remove them from files, especially code. They're a great way for folks to
learn about Font Awesome.

# Brand Icons
All brand icons are trademarks of their respective owners. The use of these
trademarks does not indicate endorsement of the trademark holder by Font
Awesome, nor vice versa. **Please do not use brand logos for any purpose except
to represent the company, product, or service to which they refer.**
5 changes: 5 additions & 0 deletions src/main/resources/lib/font-awesome/css/all.min.css

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions src/main/resources/lib/font-awesome/css/font-awesome.min.css

This file was deleted.

Binary file not shown.
Binary file not shown.
Loading

0 comments on commit efd34f5

Please sign in to comment.