Skip to content

Commit

Permalink
Merge branch 'mods' into groovy
Browse files Browse the repository at this point in the history
  • Loading branch information
Zomis committed Aug 23, 2015
2 parents e91fdfd + 5b3442a commit 258bf06
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
public final class Attributes {
public static final ECSAttribute NAME = new ECSAttributeDefault("name");
public static final ECSAttribute FLAVOR = new ECSAttributeDefault("flavor");
public static final ECSAttribute IMAGE_PATH = new ECSAttributeDefault("imagePath");

private Attributes() {
throw new UnsupportedOperationException();
Expand Down
11 changes: 11 additions & 0 deletions extra-resources/mods/creatures.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ cardExtension('denyCounterAttack') {
cardExtension('flavor') {String value ->
ECSAttributeMap.createOrGetFor(entity).set(Attributes.FLAVOR, value)
}
/**
* Define creatures' imagePath property, for use client-side to specify a partial or full directory path.
* @example (partial path, preferred usage):
* imagePath "mods/mythos/zeus.jpg"
* @example (full path, not recommended due to dependency on other web servers:
* imagePath "https://upload.wikimedia.org/wikipedia/commons/c/c8/Jupiter_Smyrna_Louvre_Ma13.jpg"
*/
cardExtension('imagePath') {String value ->
ESCAttributeMap.createOrGetFor(entity).set(Attributes.IMAGE_PATH, value)
}

// Define creature entity and related actions and values
cardExtension('creature') {String type ->
// Creatures must have a type
Expand Down

0 comments on commit 258bf06

Please sign in to comment.