From 840f51af4f76ae203be4f9bd11901c83678e3753 Mon Sep 17 00:00:00 2001 From: Paul Wedeck Date: Fri, 11 Oct 2019 15:45:32 +0200 Subject: [PATCH 01/21] backport d24ed35, fix BackendSelector on jre11 --- .../graphics/swing/contextcreator/BackendSelector.java | 6 +++++- .../go/graphics/swing/opengl/LWJGL15DrawContext.java | 10 +++++++++- .../go/graphics/swing/opengl/LWJGL20DrawContext.java | 9 ++++++++- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/go.graphics.swing/src/main/java/go/graphics/swing/contextcreator/BackendSelector.java b/go.graphics.swing/src/main/java/go/graphics/swing/contextcreator/BackendSelector.java index b4809fbacf..d2b584ff0d 100644 --- a/go.graphics.swing/src/main/java/go/graphics/swing/contextcreator/BackendSelector.java +++ b/go.graphics.swing/src/main/java/go/graphics/swing/contextcreator/BackendSelector.java @@ -35,7 +35,11 @@ public class BackendSelector extends JComboBox { public void actionPerformed(ActionEvent actionEvent) { super.actionPerformed(actionEvent); - if(actionEvent.getActionCommand() == "comboBoxChanged") { + if(actionEvent.getActionCommand().equals("comboBoxChanged")) { + if(getSelectedItem() instanceof String) { + setSelectedItem(current_item); + return; + } EBackendType bi = (EBackendType) getSelectedItem(); if (bi.platform != null && bi.platform != Platform.get()) { setSelectedItem(current_item); diff --git a/go.graphics.swing/src/main/java/go/graphics/swing/opengl/LWJGL15DrawContext.java b/go.graphics.swing/src/main/java/go/graphics/swing/opengl/LWJGL15DrawContext.java index 4687844f90..79cbdde4f0 100644 --- a/go.graphics.swing/src/main/java/go/graphics/swing/opengl/LWJGL15DrawContext.java +++ b/go.graphics.swing/src/main/java/go/graphics/swing/opengl/LWJGL15DrawContext.java @@ -333,7 +333,15 @@ public boolean isValid() { return contextValid; } + protected float nativeScale = 0; + public void resize(int width, int height) { + if(nativeScale == 0) { + int[] vp = new int[4]; + GL11.glGetIntegerv(GL11.GL_VIEWPORT, vp); + nativeScale = vp[2] / (float)width; + } + GL11.glMatrixMode(GL11.GL_PROJECTION); GL11.glLoadIdentity(); // coordinate system origin at lower left with width and height same as @@ -342,6 +350,6 @@ public void resize(int width, int height) { GL11.glMatrixMode(GL11.GL_MODELVIEW); GL11.glLoadIdentity(); - GL11.glViewport(0, 0, width, height); + GL11.glViewport(0, 0, (int)(width*nativeScale), (int)(height*nativeScale)); } } diff --git a/go.graphics.swing/src/main/java/go/graphics/swing/opengl/LWJGL20DrawContext.java b/go.graphics.swing/src/main/java/go/graphics/swing/opengl/LWJGL20DrawContext.java index 5f11d97812..416cbe9562 100644 --- a/go.graphics.swing/src/main/java/go/graphics/swing/opengl/LWJGL20DrawContext.java +++ b/go.graphics.swing/src/main/java/go/graphics/swing/opengl/LWJGL20DrawContext.java @@ -215,9 +215,16 @@ public void setGlobalAttributes(float x, float y, float z, float sx, float sy, f } } + protected float nativeScale = 0; + @Override public void resize(int width, int height) { - GL11.glViewport(0, 0, width, height); + if(nativeScale == 0) { + int[] vp = new int[4]; + GL11.glGetIntegerv(GL11.GL_VIEWPORT, vp); + nativeScale = vp[2] / (float)width; + } + GL11.glViewport(0, 0, (int)(width*nativeScale), (int)(height*nativeScale)); mat.identity(); mat.ortho(0, width, 0, height, -1, 1); From 4b33c839ca749c2000f7236afb3283785a2dd1d4 Mon Sep 17 00:00:00 2001 From: Paul Wedeck Date: Sun, 13 Oct 2019 14:16:33 +0200 Subject: [PATCH 02/21] fix MapCreator --- .../src/main/java/jsettlers/graphics/map/MapContent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/MapContent.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/MapContent.java index 77c94f5b22..2ce4d15095 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/MapContent.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/MapContent.java @@ -380,7 +380,7 @@ private float messageAlpha(IMessage m) { } private void drawWinStateMsg(GLDrawContext gl) { - if(localPlayer.getWinState() == EWinState.UNDECIDED) { + if(localPlayer == null || localPlayer.getWinState() == EWinState.UNDECIDED) { return; } Color color = localPlayer.getWinState() == EWinState.WON ? Color.GREEN : Color.RED; From d38fc0dddb7f6c577675db127acab205116015f2 Mon Sep 17 00:00:00 2001 From: Paul Wedeck Date: Fri, 25 Oct 2019 23:25:22 +0200 Subject: [PATCH 03/21] fix nativeScale with glfw --- .../main/java/go/graphics/swing/opengl/LWJGL15DrawContext.java | 2 ++ .../main/java/go/graphics/swing/opengl/LWJGL20DrawContext.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/go.graphics.swing/src/main/java/go/graphics/swing/opengl/LWJGL15DrawContext.java b/go.graphics.swing/src/main/java/go/graphics/swing/opengl/LWJGL15DrawContext.java index 79cbdde4f0..2a6fc3e617 100644 --- a/go.graphics.swing/src/main/java/go/graphics/swing/opengl/LWJGL15DrawContext.java +++ b/go.graphics.swing/src/main/java/go/graphics/swing/opengl/LWJGL15DrawContext.java @@ -340,6 +340,8 @@ public void resize(int width, int height) { int[] vp = new int[4]; GL11.glGetIntegerv(GL11.GL_VIEWPORT, vp); nativeScale = vp[2] / (float)width; + + if(nativeScale < 0.1f) nativeScale = 1; } GL11.glMatrixMode(GL11.GL_PROJECTION); diff --git a/go.graphics.swing/src/main/java/go/graphics/swing/opengl/LWJGL20DrawContext.java b/go.graphics.swing/src/main/java/go/graphics/swing/opengl/LWJGL20DrawContext.java index 416cbe9562..55a87c6b3b 100644 --- a/go.graphics.swing/src/main/java/go/graphics/swing/opengl/LWJGL20DrawContext.java +++ b/go.graphics.swing/src/main/java/go/graphics/swing/opengl/LWJGL20DrawContext.java @@ -223,6 +223,8 @@ public void resize(int width, int height) { int[] vp = new int[4]; GL11.glGetIntegerv(GL11.GL_VIEWPORT, vp); nativeScale = vp[2] / (float)width; + + if(nativeScale < 0.1f) nativeScale = 1; } GL11.glViewport(0, 0, (int)(width*nativeScale), (int)(height*nativeScale)); From 4880cb5ee9c4835e6ea0699bec105cd5ae8ad9f5 Mon Sep 17 00:00:00 2001 From: Paul Wedeck Date: Thu, 12 Mar 2020 17:07:11 +0100 Subject: [PATCH 04/21] Remove unnecessary block="true" attributes and always default to block="true" even if android won't --- .../common/buildings/loader/BuildingFile.java | 4 +- .../jsettlers/common/buildings/baker.xml | 50 +++--- .../jsettlers/common/buildings/barrack.xml | 70 ++++---- .../common/buildings/big_livinghouse.xml | 158 ++++++++--------- .../jsettlers/common/buildings/big_temple.xml | 162 +++++++++--------- .../jsettlers/common/buildings/big_tower.xml | 78 ++++----- .../jsettlers/common/buildings/castle.xml | 158 ++++++++--------- .../common/buildings/charcoal_burner.xml | 78 ++++----- .../jsettlers/common/buildings/coalmine.xml | 42 ++--- .../jsettlers/common/buildings/dockyard.xml | 48 +++--- .../common/buildings/donkey_farm.xml | 112 ++++++------ .../jsettlers/common/buildings/farm.xml | 134 +++++++-------- .../jsettlers/common/buildings/fisher.xml | 36 ++-- .../jsettlers/common/buildings/forester.xml | 58 +++---- .../jsettlers/common/buildings/goldmelt.xml | 72 ++++---- .../jsettlers/common/buildings/goldmine.xml | 42 ++--- .../jsettlers/common/buildings/harbor.xml | 42 ++--- .../jsettlers/common/buildings/hospital.xml | 84 ++++----- .../jsettlers/common/buildings/ironmelt.xml | 90 +++++----- .../jsettlers/common/buildings/ironmine.xml | 42 ++--- .../jsettlers/common/buildings/lagerhaus.xml | 34 ++-- .../common/buildings/lookout_tower.xml | 32 ++-- .../jsettlers/common/buildings/lumberjack.xml | 66 +++---- .../common/buildings/market_place.xml | 14 +- .../common/buildings/medium_livinghouse.xml | 92 +++++----- .../jsettlers/common/buildings/mill.xml | 30 ++-- .../jsettlers/common/buildings/pig_farm.xml | 100 +++++------ .../jsettlers/common/buildings/sawmill.xml | 84 ++++----- .../common/buildings/slaughterhouse.xml | 88 +++++----- .../common/buildings/small_livinghouse.xml | 46 ++--- .../common/buildings/stonecutter.xml | 54 +++--- .../jsettlers/common/buildings/temple.xml | 94 +++++----- .../jsettlers/common/buildings/toolsmith.xml | 68 ++++---- .../jsettlers/common/buildings/tower.xml | 26 +-- .../jsettlers/common/buildings/waterworks.xml | 52 +++--- .../common/buildings/weaponsmith.xml | 66 +++---- .../jsettlers/common/buildings/winegrower.xml | 54 +++--- 37 files changed, 1281 insertions(+), 1279 deletions(-) diff --git a/jsettlers.common/src/main/java/jsettlers/common/buildings/loader/BuildingFile.java b/jsettlers.common/src/main/java/jsettlers/common/buildings/loader/BuildingFile.java index 84be7f482d..ad004cca3f 100644 --- a/jsettlers.common/src/main/java/jsettlers/common/buildings/loader/BuildingFile.java +++ b/jsettlers.common/src/main/java/jsettlers/common/buildings/loader/BuildingFile.java @@ -146,7 +146,9 @@ public void startElement(String uri, String localName, String tagName, Attribute flag = readRelativeTile(attributes); } else if (TAG_BLOCKED.equals(tagName)) { RelativePoint point = readRelativeTile(attributes); - if ("true".equals(attributes.getValue("block"))) { + + // block should only be false or true. true is the default value but android sometimes does default to true but null. + if (!"false".equals(attributes.getValue("block"))) { blocked.add(point); } protectedTiles.add(point); diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/baker.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/baker.xml index 3648a6d2f0..f07e690f5b 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/baker.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/baker.xml @@ -5,31 +5,31 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/barrack.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/barrack.xml index a0f57778e3..133c57d2c7 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/barrack.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/barrack.xml @@ -5,41 +5,41 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/big_livinghouse.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/big_livinghouse.xml index 26464cd75d..fb21862bee 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/big_livinghouse.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/big_livinghouse.xml @@ -5,85 +5,85 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/big_temple.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/big_temple.xml index 7f67bc3661..ee7e4b55de 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/big_temple.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/big_temple.xml @@ -6,87 +6,87 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/big_tower.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/big_tower.xml index 7aff6bfa25..7344521846 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/big_tower.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/big_tower.xml @@ -5,45 +5,45 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/castle.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/castle.xml index 6208923dde..e933fe4ca6 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/castle.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/castle.xml @@ -5,85 +5,85 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/charcoal_burner.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/charcoal_burner.xml index 8fc99ea7af..d21730c56b 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/charcoal_burner.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/charcoal_burner.xml @@ -5,45 +5,45 @@ - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -66,7 +66,7 @@ - + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/coalmine.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/coalmine.xml index 9fa144e065..5a9fc3c34b 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/coalmine.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/coalmine.xml @@ -8,27 +8,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/dockyard.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/dockyard.xml index 95690e3778..0c600fcb7a 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/dockyard.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/dockyard.xml @@ -5,31 +5,31 @@ - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/donkey_farm.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/donkey_farm.xml index 5ba4e5d516..85372aaab9 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/donkey_farm.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/donkey_farm.xml @@ -4,62 +4,62 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/farm.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/farm.xml index 2d76e09e40..8610c15b33 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/farm.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/farm.xml @@ -5,73 +5,73 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/fisher.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/fisher.xml index d6b93da2c2..55c319f4df 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/fisher.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/fisher.xml @@ -4,24 +4,24 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/forester.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/forester.xml index 1f0478df6b..c6153ef047 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/forester.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/forester.xml @@ -4,35 +4,35 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/goldmelt.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/goldmelt.xml index 9460e9f9cd..e4f4f159a7 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/goldmelt.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/goldmelt.xml @@ -5,42 +5,42 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/goldmine.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/goldmine.xml index 14a12bf9a3..874899362d 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/goldmine.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/goldmine.xml @@ -8,27 +8,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/harbor.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/harbor.xml index d2d7d40fdc..00a08829cc 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/harbor.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/harbor.xml @@ -5,27 +5,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/hospital.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/hospital.xml index a69a9103ad..c8bad6c80b 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/hospital.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/hospital.xml @@ -4,48 +4,48 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/ironmelt.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/ironmelt.xml index 0e3f2c789c..e5c387b6db 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/ironmelt.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/ironmelt.xml @@ -5,52 +5,52 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/ironmine.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/ironmine.xml index f7c2cf8771..6845615cb3 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/ironmine.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/ironmine.xml @@ -8,27 +8,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/lagerhaus.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/lagerhaus.xml index 9561f303ee..b66fe3829c 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/lagerhaus.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/lagerhaus.xml @@ -5,23 +5,23 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/lookout_tower.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/lookout_tower.xml index b1b25a363d..06ca4ec4bf 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/lookout_tower.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/lookout_tower.xml @@ -5,22 +5,22 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/lumberjack.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/lumberjack.xml index 0ff10f9093..a58cf4890f 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/lumberjack.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/lumberjack.xml @@ -5,39 +5,39 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/market_place.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/market_place.xml index ee82e84970..41e601d952 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/market_place.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/market_place.xml @@ -5,13 +5,13 @@ - - - - - - - + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/medium_livinghouse.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/medium_livinghouse.xml index 64a8d9efc6..bb6f45a28d 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/medium_livinghouse.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/medium_livinghouse.xml @@ -3,52 +3,52 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/mill.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/mill.xml index 153e6f3c5e..bd4bbdc7d5 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/mill.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/mill.xml @@ -5,21 +5,21 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/pig_farm.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/pig_farm.xml index c83f5ebb90..0d365f6a9c 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/pig_farm.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/pig_farm.xml @@ -5,56 +5,56 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/sawmill.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/sawmill.xml index 0cb8e3673a..1bb2feb5bd 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/sawmill.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/sawmill.xml @@ -4,48 +4,48 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/slaughterhouse.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/slaughterhouse.xml index eef1def3c1..8603eb866d 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/slaughterhouse.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/slaughterhouse.xml @@ -5,50 +5,50 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/small_livinghouse.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/small_livinghouse.xml index 3c2eb905ee..71acad201f 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/small_livinghouse.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/small_livinghouse.xml @@ -3,29 +3,29 @@ - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/stonecutter.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/stonecutter.xml index ed5643d81e..b0e97cf98d 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/stonecutter.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/stonecutter.xml @@ -5,35 +5,35 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/temple.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/temple.xml index 1550eaf612..ec602e5f12 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/temple.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/temple.xml @@ -6,53 +6,53 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/toolsmith.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/toolsmith.xml index 16bcc69bcd..7c9dd4b484 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/toolsmith.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/toolsmith.xml @@ -4,40 +4,40 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/tower.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/tower.xml index 4f592c0780..ac0a441f0a 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/tower.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/tower.xml @@ -6,20 +6,20 @@ - - - + + + - - - - - - - - - - + + + + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/waterworks.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/waterworks.xml index b43784da5f..6e0af6621e 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/waterworks.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/waterworks.xml @@ -5,32 +5,32 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/weaponsmith.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/weaponsmith.xml index e3ed1441bf..1197fcedfc 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/weaponsmith.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/weaponsmith.xml @@ -5,40 +5,40 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/winegrower.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/winegrower.xml index a6bf59a7ae..e9d4da459d 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/winegrower.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/winegrower.xml @@ -5,33 +5,33 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + From 8dfa71bb3729c70a43c552c19badfbefc8f2c941 Mon Sep 17 00:00:00 2001 From: Paul Wedeck Date: Sun, 19 Apr 2020 15:20:03 +0200 Subject: [PATCH 05/21] fix comment --- .../java/jsettlers/common/buildings/loader/BuildingFile.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsettlers.common/src/main/java/jsettlers/common/buildings/loader/BuildingFile.java b/jsettlers.common/src/main/java/jsettlers/common/buildings/loader/BuildingFile.java index ad004cca3f..4c58be68b2 100644 --- a/jsettlers.common/src/main/java/jsettlers/common/buildings/loader/BuildingFile.java +++ b/jsettlers.common/src/main/java/jsettlers/common/buildings/loader/BuildingFile.java @@ -147,7 +147,7 @@ public void startElement(String uri, String localName, String tagName, Attribute } else if (TAG_BLOCKED.equals(tagName)) { RelativePoint point = readRelativeTile(attributes); - // block should only be false or true. true is the default value but android sometimes does default to true but null. + // block should only be false or true. true is the default value but android sometimes defaults to null. if (!"false".equals(attributes.getValue("block"))) { blocked.add(point); } From 3e25e0ab0c17bf49ea62e7fd78bd070333646ab8 Mon Sep 17 00:00:00 2001 From: Paul Wedeck Date: Mon, 20 Apr 2020 16:48:12 +0200 Subject: [PATCH 06/21] Extend ECivilisation to include all S3 nations and make them selectable on Android and Swing --- .../main/java/jsettlers/common/player/ECivilisation.java | 3 +++ .../jsettlers/graphics/localization/labels_de.properties | 5 +++++ .../jsettlers/graphics/localization/labels_en.properties | 5 +++++ .../main/android/mainmenu/gamesetup/MapSetupViewModel.java | 6 +++++- .../main/swing/menu/joinpanel/slots/PlayerSlot.java | 2 +- 5 files changed, 19 insertions(+), 2 deletions(-) diff --git a/jsettlers.common/src/main/java/jsettlers/common/player/ECivilisation.java b/jsettlers.common/src/main/java/jsettlers/common/player/ECivilisation.java index fcb78f0140..427a41848f 100644 --- a/jsettlers.common/src/main/java/jsettlers/common/player/ECivilisation.java +++ b/jsettlers.common/src/main/java/jsettlers/common/player/ECivilisation.java @@ -19,4 +19,7 @@ */ public enum ECivilisation { ROMAN, + EGYPTIAN, + ASIAN, + AMAZON, } diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/localization/labels_de.properties b/jsettlers.graphics/src/main/resources/jsettlers/graphics/localization/labels_de.properties index 713155347c..18b1c8efac 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/localization/labels_de.properties +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/localization/labels_de.properties @@ -374,8 +374,13 @@ player-type-AI_VERY_EASY = Computer (sehr einfach) player-type-AI_EASY = Computer (einfach) player-type-AI_HARD = Computer (schwer) player-type-AI_VERY_HARD = Computer (sehr schwer) + civilisation-ROMAN = Römer +civilisation-EGYPTIAN = Ägypter +civilisation-ASIAN = Asiaten +civilisation-AMAZON = Amazonen civilisation-random = Zufall + player-name-random = Zufall player-name-ROMAN-AI_VERY_EASY = Titus player-name-ROMAN-AI_EASY = Augustus diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/localization/labels_en.properties b/jsettlers.graphics/src/main/resources/jsettlers/graphics/localization/labels_en.properties index a0f62417b7..6d7f808f97 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/localization/labels_en.properties +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/localization/labels_en.properties @@ -376,8 +376,13 @@ player-type-AI_VERY_EASY = Computer (very easy) player-type-AI_EASY = Computer (easy) player-type-AI_HARD = Computer (hard) player-type-AI_VERY_HARD = Computer (very hard) + civilisation-ROMAN = Roman +civilisation-EGYPTIAN = Egyptian +civilisation-ASIAN = Asian +civilisation-AMAZON = Amazon civilisation-random = Random + player-name-random = Random player-name-ROMAN-AI_VERY_EASY = Titus player-name-ROMAN-AI_EASY = Augustus diff --git a/jsettlers.main.android/src/main/java/jsettlers/main/android/mainmenu/gamesetup/MapSetupViewModel.java b/jsettlers.main.android/src/main/java/jsettlers/main/android/mainmenu/gamesetup/MapSetupViewModel.java index ad99e11a98..9f0b33f17a 100644 --- a/jsettlers.main.android/src/main/java/jsettlers/main/android/mainmenu/gamesetup/MapSetupViewModel.java +++ b/jsettlers.main.android/src/main/java/jsettlers/main/android/mainmenu/gamesetup/MapSetupViewModel.java @@ -184,7 +184,11 @@ protected static void setHumanSlotPlayerTypes(PlayerSlotPresenter playerSlotPres } private static void setSlotCivilisations(PlayerSlotPresenter playerSlotPresenter, PlayerSetting playerSetting) { - playerSlotPresenter.setPossibleCivilisations(new Civilisation[] { new Civilisation(ECivilisation.ROMAN) }); + + ECivilisation[] ecivs = ECivilisation.values(); + Civilisation[] civs = new Civilisation[ecivs.length]; + for(int i=0; i Date: Mon, 20 Apr 2020 19:50:49 +0200 Subject: [PATCH 07/21] choose Image for movable based on movables civilisation (fallback is ROMAN) --- .../common/player/IInGamePlayer.java | 2 +- .../java/jsettlers/common/player/IPlayer.java | 7 ++ .../controls/original/OriginalControls.java | 10 +- .../panel/selection/SelectionRow.java | 7 +- .../panel/selection/ShipSelectionContent.java | 10 +- ...tent.java => SoldierSelectionContent.java} | 14 ++- .../selection/SpecialistSelectionContent.java | 5 +- .../graphics/map/draw/MapObjectDrawer.java | 4 +- .../draw/settlerimages/SettlerImageMap.java | 110 +++++++++++------- .../settlerimages/SettlerImageMapItem.java | 4 + .../{movables.txt => movables-ROMAN.txt} | 0 11 files changed, 111 insertions(+), 62 deletions(-) rename jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/{SoilderSelectionContent.java => SoldierSelectionContent.java} (85%) rename jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/{movables.txt => movables-ROMAN.txt} (100%) diff --git a/jsettlers.common/src/main/java/jsettlers/common/player/IInGamePlayer.java b/jsettlers.common/src/main/java/jsettlers/common/player/IInGamePlayer.java index cfb03f6e98..39a957db4e 100644 --- a/jsettlers.common/src/main/java/jsettlers/common/player/IInGamePlayer.java +++ b/jsettlers.common/src/main/java/jsettlers/common/player/IInGamePlayer.java @@ -48,5 +48,5 @@ public interface IInGamePlayer extends IPlayer { * Get win/lose state for the player * @return The win/lose state the player is in */ - public EWinState getWinState(); + EWinState getWinState(); } diff --git a/jsettlers.common/src/main/java/jsettlers/common/player/IPlayer.java b/jsettlers.common/src/main/java/jsettlers/common/player/IPlayer.java index 15071fa4b4..7e7ebc7134 100644 --- a/jsettlers.common/src/main/java/jsettlers/common/player/IPlayer.java +++ b/jsettlers.common/src/main/java/jsettlers/common/player/IPlayer.java @@ -29,6 +29,8 @@ public interface IPlayer { EWinState getWinState(); + ECivilisation getCivilisation(); + class DummyPlayer implements IPlayer { private final byte playerAndTeamId; @@ -54,5 +56,10 @@ public byte getTeamId() { public EWinState getWinState() { return EWinState.UNDECIDED; } + + @Override + public ECivilisation getCivilisation() { + return ECivilisation.ROMAN; + } } } diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/OriginalControls.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/OriginalControls.java index 9cf53a212d..fccfb53a10 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/OriginalControls.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/OriginalControls.java @@ -39,7 +39,7 @@ import jsettlers.graphics.map.controls.original.panel.selection.BearerSelectionContent; import jsettlers.graphics.map.controls.original.panel.selection.BuildingSelectionContent; import jsettlers.graphics.map.controls.original.panel.selection.ShipSelectionContent; -import jsettlers.graphics.map.controls.original.panel.selection.SoilderSelectionContent; +import jsettlers.graphics.map.controls.original.panel.selection.SoldierSelectionContent; import jsettlers.graphics.map.controls.original.panel.selection.SpecialistSelectionContent; import jsettlers.graphics.map.minimap.Minimap; import jsettlers.graphics.map.minimap.MinimapMode; @@ -64,6 +64,7 @@ public class OriginalControls implements IControls { private Minimap minimap; private boolean lastSelectionWasNull = true; private MapDrawContext context; + private final IInGamePlayer player; /** * Creates a new {@link OriginalControls} overlay. @@ -74,6 +75,7 @@ public class OriginalControls implements IControls { * The player this interface should be for. */ public OriginalControls(ActionFireable actionFireable, IInGamePlayer player) { + this.player = player; layoutProperties = ControlPanelLayoutProperties.getLayoutPropertiesFor(DEFAULT_LAYOUT_SIZE); final MiniMapLayoutProperties miniMap = layoutProperties.miniMap; mainPanel = new MainPanel(actionFireable, player); @@ -377,13 +379,13 @@ public void displaySelection(ISelectionSet selection) { mainPanel.setContent(new BearerSelectionContent(selection)); break; case SOLDIERS: - mainPanel.setContent(new SoilderSelectionContent(selection)); + mainPanel.setContent(new SoldierSelectionContent(player, selection)); break; case SPECIALISTS: - mainPanel.setContent(new SpecialistSelectionContent(selection)); + mainPanel.setContent(new SpecialistSelectionContent(player, selection)); break; case SHIPS: - mainPanel.setContent(new ShipSelectionContent(selection)); + mainPanel.setContent(new ShipSelectionContent(player, selection)); break; case BUILDING: mainPanel.setContent(new BuildingSelectionContent(selection)); diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/SelectionRow.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/SelectionRow.java index ae2772774f..096981fddd 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/SelectionRow.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/SelectionRow.java @@ -22,6 +22,7 @@ import jsettlers.common.movable.EMovableAction; import jsettlers.common.movable.EDirection; import jsettlers.common.movable.EMovableType; +import jsettlers.common.player.ECivilisation; import jsettlers.graphics.image.Image; import jsettlers.graphics.localization.Labels; import jsettlers.graphics.map.draw.settlerimages.SettlerImageMap; @@ -30,6 +31,7 @@ public class SelectionRow extends UIPanel { private final EMovableType type; + private final ECivilisation civ; private final int count; /** @@ -40,7 +42,8 @@ public class SelectionRow extends UIPanel { * @param count * How many of them are selected. */ - public SelectionRow(EMovableType type, int count) { + public SelectionRow(ECivilisation civ, EMovableType type, int count) { + this.civ = civ; this.type = type; this.count = count; } @@ -49,7 +52,7 @@ public SelectionRow(EMovableType type, int count) { public void drawAt(GLDrawContext gl) { float width = getPosition().getWidth(); Image image = - SettlerImageMap.getInstance().getImageForSettler(type, + SettlerImageMap.getInstance().getImageForSettler(civ, type, EMovableAction.NO_ACTION, EMaterialType.NO_MATERIAL, EDirection.SOUTH_EAST, 0); diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/ShipSelectionContent.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/ShipSelectionContent.java index 3a7cd66761..a252301e9b 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/ShipSelectionContent.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/ShipSelectionContent.java @@ -17,6 +17,8 @@ import jsettlers.common.action.Action; import jsettlers.common.action.EActionType; import jsettlers.common.movable.EMovableType; +import jsettlers.common.player.ECivilisation; +import jsettlers.common.player.IInGamePlayer; import jsettlers.common.selectable.ISelectionSet; import jsettlers.graphics.localization.Labels; import jsettlers.graphics.ui.LabeledButton; @@ -36,10 +38,10 @@ public class ShipSelectionContent extends AbstractSelectionContent { private final UIPanel panel; - public ShipSelectionContent(ISelectionSet selection) { + public ShipSelectionContent(IInGamePlayer player, ISelectionSet selection) { panel = new UIPanel(); - addRowsToPanel(panel, selection, shiptypes); + addRowsToPanel(panel, selection, player.getCivilisation(), shiptypes); UIPanel kill = new LabeledButton(Labels.getString("kill"), new Action(EActionType.DESTROY)); UIPanel unload = new LabeledButton(Labels.getString("unload"), new Action(EActionType.UNLOAD_FERRIES)); @@ -48,7 +50,7 @@ public ShipSelectionContent(ISelectionSet selection) { panel.addChild(unload, .1f, .1f, .9f, .2f); } - public static void addRowsToPanel(UIPanel panel, ISelectionSet selection, EMovableType[] types) { + public static void addRowsToPanel(UIPanel panel, ISelectionSet selection, ECivilisation civ, EMovableType[] types) { float rowHeight = 1f / ROWS; int rowi = ROWS - 1; // from bottom @@ -57,7 +59,7 @@ public static void addRowsToPanel(UIPanel panel, ISelectionSet selection, EMovab int count = selection.getMovableCount(type); if (count > 0) { - SelectionRow row = new SelectionRow(type, count); + SelectionRow row = new SelectionRow(civ, type, count); panel.addChild(row, 0.1f, rowHeight * (rowi - 1), .9f, rowHeight * (rowi)); rowi--; diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/SoilderSelectionContent.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/SoldierSelectionContent.java similarity index 85% rename from jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/SoilderSelectionContent.java rename to jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/SoldierSelectionContent.java index 37157d71df..b03c636a95 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/SoilderSelectionContent.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/SoldierSelectionContent.java @@ -16,15 +16,17 @@ import jsettlers.common.action.EActionType; import jsettlers.common.movable.EMovableType; +import jsettlers.common.player.ECivilisation; +import jsettlers.common.player.IInGamePlayer; import jsettlers.common.selectable.ISelectionSet; import jsettlers.common.action.Action; import jsettlers.graphics.localization.Labels; import jsettlers.graphics.ui.LabeledButton; import jsettlers.graphics.ui.UIPanel; -public class SoilderSelectionContent extends AbstractSelectionContent { +public class SoldierSelectionContent extends AbstractSelectionContent { - private static final EMovableType[] soildertypes = new EMovableType[] { + private static final EMovableType[] soldiertypes = new EMovableType[] { EMovableType.SWORDSMAN_L1, EMovableType.SWORDSMAN_L2, EMovableType.SWORDSMAN_L3, @@ -43,10 +45,10 @@ public class SoilderSelectionContent extends AbstractSelectionContent { private final UIPanel panel; - public SoilderSelectionContent(ISelectionSet selection) { + public SoldierSelectionContent(IInGamePlayer player, ISelectionSet selection) { panel = new UIPanel(); - addRowsToPanel(panel, selection, soildertypes); + addRowsToPanel(panel, selection, player.getCivilisation(), soldiertypes); UIPanel kill = new LabeledButton(Labels.getString("kill"), new Action(EActionType.DESTROY)); UIPanel stop = new LabeledButton(Labels.getString("stop"), new Action(EActionType.STOP_WORKING)); @@ -55,7 +57,7 @@ public SoilderSelectionContent(ISelectionSet selection) { panel.addChild(stop, .5f, .1f, .9f, .2f); } - public static void addRowsToPanel(UIPanel panel, ISelectionSet selection, + public static void addRowsToPanel(UIPanel panel, ISelectionSet selection, ECivilisation civ, EMovableType[] types) { float rowHeight = 1f / ROWS; @@ -65,7 +67,7 @@ public static void addRowsToPanel(UIPanel panel, ISelectionSet selection, int count = selection.getMovableCount(type); if (count > 0) { - SelectionRow row = new SelectionRow(type, count); + SelectionRow row = new SelectionRow(civ, type, count); panel.addChild(row, 0.1f, rowHeight * (rowi - 1), .9f, rowHeight * (rowi)); rowi--; diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/SpecialistSelectionContent.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/SpecialistSelectionContent.java index 433c456d33..fde1a59f51 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/SpecialistSelectionContent.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/SpecialistSelectionContent.java @@ -16,6 +16,7 @@ import jsettlers.common.action.EActionType; import jsettlers.common.movable.EMovableType; +import jsettlers.common.player.IInGamePlayer; import jsettlers.common.selectable.ISelectionSet; import jsettlers.common.action.Action; import jsettlers.common.action.ConvertAction; @@ -36,10 +37,10 @@ public class SpecialistSelectionContent extends AbstractSelectionContent { private final UIPanel panel; - public SpecialistSelectionContent(ISelectionSet selection) { + public SpecialistSelectionContent(IInGamePlayer player, ISelectionSet selection) { panel = new UIPanel(); - SoilderSelectionContent.addRowsToPanel(panel, selection, specialists); + SoldierSelectionContent.addRowsToPanel(panel, selection, player.getCivilisation(), specialists); UIPanel stop = new LabeledButton(Labels.getString("stop"), new Action(EActionType.STOP_WORKING)); diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/MapObjectDrawer.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/MapObjectDrawer.java index 0a6d6897ed..c227926682 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/MapObjectDrawer.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/MapObjectDrawer.java @@ -380,7 +380,7 @@ private void drawShip(IMovable ship, int x, int y) { if (yShift >= 0) { float xShift = PASSENGER_POSITION_TO_FRONT[j] * xShiftForward + PASSENGER_POSITION_TO_RIGHT[j] * xShiftRight; IMovable passenger = passengerList.get(j); - Image image = this.imageMap.getImageForSettler(passenger.getMovableType(), EMovableAction.NO_ACTION, + Image image = this.imageMap.getImageForSettler(passenger.getPlayer().getCivilisation(), passenger.getMovableType(), EMovableAction.NO_ACTION, EMaterialType.NO_MATERIAL, getPassengerDirection(direction, shipPosition, i), 0 ); image.drawAt(glDrawContext, viewX + xShift, viewY + yShift + PASSENGER_DECK_HEIGHT, 0, color, shade); @@ -413,7 +413,7 @@ EMaterialType.NO_MATERIAL, getPassengerDirection(direction, shipPosition, i), 0 if (yShift < 0) { float xShift = PASSENGER_POSITION_TO_FRONT[j] * xShiftForward + PASSENGER_POSITION_TO_RIGHT[j] * xShiftRight; IMovable passenger = passengerList.get(j); - Image image = this.imageMap.getImageForSettler(passenger.getMovableType(), EMovableAction.NO_ACTION, + Image image = this.imageMap.getImageForSettler(passenger.getPlayer().getCivilisation(), passenger.getMovableType(), EMovableAction.NO_ACTION, EMaterialType.NO_MATERIAL, getPassengerDirection(direction, shipPosition, i), 0 ); image.drawAt(glDrawContext, viewX + xShift, viewY + yShift + PASSENGER_DECK_HEIGHT, 0, color, shade); diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/SettlerImageMap.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/SettlerImageMap.java index 78a32a0819..1f3459f4a5 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/SettlerImageMap.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/SettlerImageMap.java @@ -26,6 +26,7 @@ import jsettlers.common.movable.EMovableAction; import jsettlers.common.movable.EMovableType; import jsettlers.common.movable.IMovable; +import jsettlers.common.player.ECivilisation; import jsettlers.graphics.image.Image; import jsettlers.graphics.localization.Labels; import jsettlers.graphics.map.draw.ImageProvider; @@ -45,13 +46,15 @@ public final class SettlerImageMap { private final ImageProvider imageProvider = ImageProvider.getInstance(); - private final SettlerImageMapItem[][][][] map; + private final SettlerImageMapItem[][][][][] map; private final Pattern linePattern = Pattern.compile("\\s*([\\w\\*]+)\\s*," + "\\s*([\\w\\*]+)\\s*," + "\\s*([\\w\\*]+)\\s*," + "\\s*([\\w\\*]+)\\s*" + "=\\s*(\\d+)\\s*," + "\\s*(\\d+)\\s*," + "\\s*(\\d+)\\s*," + "\\s*(-?\\d+)\\s*"); + private final int civilisations; + private final int types; private final int actions; @@ -64,44 +67,48 @@ public final class SettlerImageMap { * Creates a new settler image map. */ private SettlerImageMap() { + this.civilisations = ECivilisation.values().length; this.types = EMovableType.NUMBER_OF_MOVABLETYPES; this.actions = EMovableAction.values().length; this.materials = EMaterialType.NUMBER_OF_MATERIALS; this.directions = EDirection.VALUES.length; - this.map = new SettlerImageMapItem[this.types][this.actions][this.materials][this.directions]; + this.map = new SettlerImageMapItem[this.civilisations][this.types][this.actions][this.materials][this.directions]; - try { - InputStream file = getClass().getResourceAsStream("movables.txt"); - readFromFile(file); - } catch (IOException e) { - System.err.println("Error reading image file. " - + "Settler images might not work."); + + int[][][][][] priorities = new int[this.civilisations][this.types][this.actions][this.materials][this.directions]; + // add pseudo entry. + addEntryToMap(priorities, null, null, null, null, null, DEFAULT_ITEM, -1); + + readFromFile(priorities, null, "movables.txt"); + for(ECivilisation civ : ECivilisation.values()) { + readFromFile(priorities, civ, "movables-" + civ + ".txt"); } } /** * Reads the map from the given file. * - * @param file + * @param name * The file to read from. */ - private void readFromFile(InputStream file) throws IOException { - int[][][][] priorities = new int[this.types][this.actions][this.materials][this.directions]; - - // add pseudo entry. - addEntryToMap(priorities, null, null, null, null, DEFAULT_ITEM, -1); + private void readFromFile(int[][][][][] priorities, ECivilisation civ, String name) { + try { + InputStream file = getClass().getResourceAsStream(name); - readFromFile(file, priorities); + readFromFile(file, civ, priorities); + } catch (IOException e) { + System.err.println("Error reading image file. Settler images might not work."); + } } - private void readFromFile(InputStream file, int[][][][] priorities) throws IOException { + private void readFromFile(InputStream file, ECivilisation civ, int[][][][][] priorities) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(file)); String line = reader.readLine(); while (line != null) { if (!line.isEmpty() && !line.startsWith("#")) { try { - addByLine(priorities, line); + addByLine(priorities, civ, line); } catch (IllegalArgumentException e) { e.printStackTrace(); } @@ -121,7 +128,7 @@ private void readFromFile(InputStream file, int[][][][] priorities) throws IOExc * @throws IllegalArgumentException * if the line is not correct. */ - private void addByLine(int[][][][] priorities, String line) { + private void addByLine(int[][][][][] priorities, ECivilisation civ, String line) { final Matcher matcher = parseLine(line); final String typeString = matcher.group(1); final String actionString = matcher.group(2); @@ -133,14 +140,14 @@ private void addByLine(int[][][][] priorities, String line) { EMaterialType material = parseMaterial(materialString); EDirection direction = parseDirection(directionString); - int priority = calculatePriority(type, action, material, direction); + int priority = calculatePriority(civ, type, action, material, direction); final int fileIndex = Integer.parseInt(matcher.group(5)); final int sequence = Integer.parseInt(matcher.group(6)); final int start = Integer.parseInt(matcher.group(7)); final int duration = Integer.parseInt(matcher.group(8)); - addEntryToMap(priorities, type, action, material, direction, new SettlerImageMapItem(fileIndex, sequence, start, duration), priority); + addEntryToMap(priorities, civ, type, action, material, direction, new SettlerImageMapItem(fileIndex, sequence, start, duration), priority); } private EMovableType parseType(final String typeString) { @@ -183,20 +190,23 @@ private EDirection parseDirection(final String directionString) { return direction; } - private int calculatePriority(EMovableType type, EMovableAction action, EMaterialType material, EDirection direction) { + private int calculatePriority(ECivilisation civ, EMovableType type, EMovableAction action, EMaterialType material, EDirection direction) { int priority = 1;// more than 0. - if (type != null) { + if(civ != null) { priority += 10; } - if (action != null) { + if (type != null) { priority += 100; } - if (material != null) { + if (action != null) { priority += 1000; } - if (direction != null) { + if (material != null) { priority += 10000; } + if (direction != null) { + priority += 100000; + } return priority; } @@ -230,7 +240,16 @@ private Matcher parseLine(String line) { * @param item * @param priority */ - private void addEntryToMap(int[][][][] priorities, EMovableType type, EMovableAction action, EMaterialType material, EDirection direction, SettlerImageMapItem item, int priority) { + private void addEntryToMap(int[][][][][] priorities, ECivilisation civ, EMovableType type, EMovableAction action, EMaterialType material, EDirection direction, SettlerImageMapItem item, int priority) { + int minCiv, maxCiv; + if(civ == null) { + minCiv = 0; + maxCiv = this.civilisations; + } else { + minCiv = civ.ordinal(); + maxCiv = minCiv + 1; + } + int minType, maxType; if (type == null) { minType = 0; @@ -267,13 +286,16 @@ private void addEntryToMap(int[][][][] priorities, EMovableType type, EMovableAc maxDirection = minDirection + 1; } - for (int typeIndex = minType; typeIndex < maxType; typeIndex++) { - for (int actionIndex = minAction; actionIndex < maxAction; actionIndex++) { - for (int materialIndex = minMaterial; materialIndex < maxMaterial; materialIndex++) { - for (int direcitonIndex = minDirection; direcitonIndex < maxDirection; direcitonIndex++) { - if (priorities[typeIndex][actionIndex][materialIndex][direcitonIndex] < priority) { - this.map[typeIndex][actionIndex][materialIndex][direcitonIndex] = item; - priorities[typeIndex][actionIndex][materialIndex][direcitonIndex] = priority; + for (int civIndex = minCiv; civIndex < maxCiv; civIndex++) { + SettlerImageMapItem addItem = (civ != null)?item : item.derive(civIndex); + for (int typeIndex = minType; typeIndex < maxType; typeIndex++) { + for (int actionIndex = minAction; actionIndex < maxAction; actionIndex++) { + for (int materialIndex = minMaterial; materialIndex < maxMaterial; materialIndex++) { + for (int direcitonIndex = minDirection; direcitonIndex < maxDirection; direcitonIndex++) { + if (priorities[civIndex][typeIndex][actionIndex][materialIndex][direcitonIndex] < priority) { + map[civIndex][typeIndex][actionIndex][materialIndex][direcitonIndex] = addItem; + priorities[civIndex][typeIndex][actionIndex][materialIndex][direcitonIndex] = priority; + } } } } @@ -287,7 +309,7 @@ private void addEntryToMap(int[][][][] priorities, EMovableType type, EMovableAc * @param movable * The settler to get the image for * @return The image or an null-image. - * @see SettlerImageMap#getImageForSettler(EMovableType, EMovableAction, EMaterialType, EDirection, float) + * @see SettlerImageMap#getImageForSettler(ECivilisation, EMovableType, EMovableAction, EMaterialType, EDirection, float) */ public Image getImageForSettler(IMovable movable, float progress) { if (movable.getAction() == EMovableAction.WALKING) { @@ -296,7 +318,7 @@ public Image getImageForSettler(IMovable movable, float progress) { progress += .5f; } } - return getImageForSettler(movable.getMovableType(), + return getImageForSettler(movable.getPlayer().getCivilisation(), movable.getMovableType(), movable.getAction(), movable.getMaterial(), movable.getDirection(), progress); } @@ -304,6 +326,8 @@ public Image getImageForSettler(IMovable movable, float progress) { /** * Gets an image for a given settler. * + * @param civilisation + * The civilisation of the settler * @param movableType * The type of the settler. * @param action @@ -316,8 +340,8 @@ public Image getImageForSettler(IMovable movable, float progress) { * The progress. * @return The image. */ - public Image getImageForSettler(EMovableType movableType, EMovableAction action, EMaterialType material, EDirection direction, float progress) { - SettlerImageMapItem item = getMapItem(movableType, action, material, direction); + public Image getImageForSettler(ECivilisation civilisation, EMovableType movableType, EMovableAction action, EMaterialType material, EDirection direction, float progress) { + SettlerImageMapItem item = getMapItem(civilisation, movableType, action, material, direction); int duration = item.getDuration(); int imageIndex; @@ -332,17 +356,21 @@ public Image getImageForSettler(EMovableType movableType, EMovableAction action, /** * Gets a map item. * + * @param civilisation * @param movableType * @param action * @param material * @param direction - * @param progress * @return The item of the map at the given position. Is not null. */ - private SettlerImageMapItem getMapItem(EMovableType movableType, EMovableAction action, EMaterialType material, EDirection direction) { - SettlerImageMapItem item = this.map[movableType.ordinal()][action.ordinal()][material.ordinal][direction.ordinal]; + private SettlerImageMapItem getMapItem(ECivilisation civilisation, EMovableType movableType, EMovableAction action, EMaterialType material, EDirection direction) { + SettlerImageMapItem item = this.map[civilisation.ordinal()][movableType.ordinal()][action.ordinal()][material.ordinal][direction.ordinal]; if (item == null) { - return DEFAULT_ITEM; + if(civilisation != ECivilisation.ROMAN) { + return getMapItem(ECivilisation.ROMAN, movableType, action, material, direction); + } else { + return DEFAULT_ITEM; + } } else { return item; } diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/SettlerImageMapItem.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/SettlerImageMapItem.java index ae5df2309c..3d1890343c 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/SettlerImageMapItem.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/SettlerImageMapItem.java @@ -52,4 +52,8 @@ public int getStart() { public int getDuration() { return this.duration; } + + public SettlerImageMapItem derive(int civ) { + return new SettlerImageMapItem((civ+1)*10+file, sequenceIndex, start, duration); + } } diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt similarity index 100% rename from jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt rename to jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt From d991130022f209e21a107c972dafe65eeeebc448 Mon Sep 17 00:00:00 2001 From: Paul Wedeck Date: Tue, 21 Apr 2020 13:45:00 +0200 Subject: [PATCH 08/21] add template system to movable files --- .../common/player/ECivilisation.java | 18 +- .../map/draw/settlerimages/MovableParser.java | 108 + .../draw/settlerimages/SettlerImageMap.java | 50 +- .../settlerimages/SettlerImageMapItem.java | 4 - .../draw/settlerimages/movables-AMAZON.txt | 6 + .../map/draw/settlerimages/movables-ASIAN.txt | 6 + .../draw/settlerimages/movables-EGYPTIAN.txt | 6 + .../map/draw/settlerimages/movables-ROMAN.txt | 1802 ++--------------- .../map/draw/settlerimages/movables.txt | 104 + 9 files changed, 430 insertions(+), 1674 deletions(-) create mode 100644 jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/MovableParser.java create mode 100644 jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-AMAZON.txt create mode 100644 jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ASIAN.txt create mode 100644 jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-EGYPTIAN.txt create mode 100644 jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt diff --git a/jsettlers.common/src/main/java/jsettlers/common/player/ECivilisation.java b/jsettlers.common/src/main/java/jsettlers/common/player/ECivilisation.java index 427a41848f..ef8e83ec02 100644 --- a/jsettlers.common/src/main/java/jsettlers/common/player/ECivilisation.java +++ b/jsettlers.common/src/main/java/jsettlers/common/player/ECivilisation.java @@ -18,8 +18,18 @@ * @author codingberlin */ public enum ECivilisation { - ROMAN, - EGYPTIAN, - ASIAN, - AMAZON, + ROMAN(1), + EGYPTIAN(2), + ASIAN(3), + AMAZON(4); + + private int fileIndex; + + ECivilisation(int fileIndex) { + this.fileIndex = fileIndex; + } + + public int getFileIndex() { + return fileIndex; + } } diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/MovableParser.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/MovableParser.java new file mode 100644 index 0000000000..f7662b985b --- /dev/null +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/MovableParser.java @@ -0,0 +1,108 @@ +package jsettlers.graphics.map.draw.settlerimages; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import java8.util.function.Consumer; + +public class MovableParser { + + private final Map templates = new HashMap<>(); + + private class MovableTemplate implements Consumer { + private final List arguments = new ArrayList<>(); + private final List lines = new ArrayList<>(); + + private MovableTemplate(String declaration) { + int argBegin = declaration.indexOf(' '); + String name = declaration.substring(1, argBegin); + templates.put(name, this); + + int lastSpace = argBegin; + while(declaration.charAt(lastSpace+1) != '{') { + int nextSpace = declaration.indexOf(' ', lastSpace+1); + arguments.add("$" + declaration.substring(lastSpace+1, nextSpace)); + lastSpace = nextSpace; + } + } + + + @Override + public void accept(String line) { + lines.add(line); + } + } + + private void invokeTemplate(String line, Consumer lineCons) { + int argBegin = line.indexOf('('); + String name = line.substring(0, argBegin); + MovableTemplate template = templates.get(name); + + if(template == null) { + System.err.println("movable template " + name + " is undefined!"); + return; + } else if(template == lineCons) { + System.err.println("template " + name + " is recursive!"); + return; + } + + HashMap variableReplace = new HashMap<>(template.arguments.size()); + + int lastComma = argBegin; + int index = 0; + while(line.charAt(lastComma) != ')') { + int nextComma = line.indexOf(',', lastComma+1); + if(nextComma == -1) nextComma = line.indexOf(')'); + + String arg = template.arguments.get(index); + variableReplace.put(arg, Matcher.quoteReplacement(line.substring(lastComma+1, nextComma))); + index++; + + lastComma = nextComma; + } + + for(String templateLine : template.lines) { + + for(Map.Entry variable : variableReplace.entrySet()) { + templateLine = Pattern.compile(variable.getKey(), Pattern.LITERAL).matcher(templateLine).replaceAll(variable.getValue()); + } + + lineCons.accept(templateLine); + } + } + + public void parseFile(String name, Consumer external) throws IOException { + BufferedReader reader = new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(name))); + + Consumer lineConsumer = external; + + String line; + while((line = reader.readLine()) != null) { + if(line.isEmpty()) continue; + if(line.startsWith("#")) continue; + + if(line.startsWith("}")){ + if(lineConsumer == external) { + System.err.println("} is out of place!"); + } + lineConsumer = external; + continue; + } + + if(line.startsWith("!")) { + lineConsumer = new MovableTemplate(line); + } else if(line.contains("(")) { + invokeTemplate(line, lineConsumer); + } else { + lineConsumer.accept(line); + } + } + } +} diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/SettlerImageMap.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/SettlerImageMap.java index 1f3459f4a5..2911f04c52 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/SettlerImageMap.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/SettlerImageMap.java @@ -50,7 +50,7 @@ public final class SettlerImageMap { private final Pattern linePattern = Pattern.compile("\\s*([\\w\\*]+)\\s*," + "\\s*([\\w\\*]+)\\s*," + "\\s*([\\w\\*]+)\\s*," - + "\\s*([\\w\\*]+)\\s*" + "=\\s*(\\d+)\\s*," + "\\s*(\\d+)\\s*," + + "\\s*([\\w\\*]+)\\s*" + "=\\s*(c?\\d+)\\s*," + "\\s*(\\d+)\\s*," + "\\s*(\\d+)\\s*," + "\\s*(-?\\d+)\\s*"); private final int civilisations; @@ -74,14 +74,15 @@ private SettlerImageMap() { this.directions = EDirection.VALUES.length; this.map = new SettlerImageMapItem[this.civilisations][this.types][this.actions][this.materials][this.directions]; + MovableParser parser = new MovableParser(); int[][][][][] priorities = new int[this.civilisations][this.types][this.actions][this.materials][this.directions]; // add pseudo entry. addEntryToMap(priorities, null, null, null, null, null, DEFAULT_ITEM, -1); - readFromFile(priorities, null, "movables.txt"); + readFromFile(parser, priorities, null, "movables.txt"); for(ECivilisation civ : ECivilisation.values()) { - readFromFile(priorities, civ, "movables-" + civ + ".txt"); + readFromFile(parser, priorities, civ, "movables-" + civ + ".txt"); } } @@ -91,33 +92,14 @@ private SettlerImageMap() { * @param name * The file to read from. */ - private void readFromFile(int[][][][][] priorities, ECivilisation civ, String name) { + private void readFromFile(MovableParser parser, int[][][][][] priorities, ECivilisation civ, String name) { try { - InputStream file = getClass().getResourceAsStream(name); - - readFromFile(file, civ, priorities); + parser.parseFile(name, line -> addByLine(priorities, civ, line)); } catch (IOException e) { System.err.println("Error reading image file. Settler images might not work."); } } - private void readFromFile(InputStream file, ECivilisation civ, int[][][][][] priorities) throws IOException { - BufferedReader reader = new BufferedReader(new InputStreamReader(file)); - - String line = reader.readLine(); - while (line != null) { - if (!line.isEmpty() && !line.startsWith("#")) { - try { - addByLine(priorities, civ, line); - } catch (IllegalArgumentException e) { - e.printStackTrace(); - } - } - - line = reader.readLine(); - } - } - /** * Adds a line to the map * @@ -142,12 +124,25 @@ private void addByLine(int[][][][][] priorities, ECivilisation civ, String line) int priority = calculatePriority(civ, type, action, material, direction); - final int fileIndex = Integer.parseInt(matcher.group(5)); + final String fileString = matcher.group(5); final int sequence = Integer.parseInt(matcher.group(6)); final int start = Integer.parseInt(matcher.group(7)); final int duration = Integer.parseInt(matcher.group(8)); - addEntryToMap(priorities, civ, type, action, material, direction, new SettlerImageMapItem(fileIndex, sequence, start, duration), priority); + ECivilisation[] civs = (civ == null) ? ECivilisation.values() : new ECivilisation[] {civ}; + + for(ECivilisation c : civs) { + final int fileIndex = parseFile(fileString, c); + addEntryToMap(priorities, c, type, action, material, direction, new SettlerImageMapItem(fileIndex, sequence, start, duration), priority); + } + } + + private int parseFile(String fileString, ECivilisation civ) { + if(fileString.contains("c")) { + fileString = fileString.replace("c", Integer.toString(civ.getFileIndex())); + } + + return Integer.parseInt(fileString); } private EMovableType parseType(final String typeString) { @@ -287,13 +282,12 @@ private void addEntryToMap(int[][][][][] priorities, ECivilisation civ, EMovable } for (int civIndex = minCiv; civIndex < maxCiv; civIndex++) { - SettlerImageMapItem addItem = (civ != null)?item : item.derive(civIndex); for (int typeIndex = minType; typeIndex < maxType; typeIndex++) { for (int actionIndex = minAction; actionIndex < maxAction; actionIndex++) { for (int materialIndex = minMaterial; materialIndex < maxMaterial; materialIndex++) { for (int direcitonIndex = minDirection; direcitonIndex < maxDirection; direcitonIndex++) { if (priorities[civIndex][typeIndex][actionIndex][materialIndex][direcitonIndex] < priority) { - map[civIndex][typeIndex][actionIndex][materialIndex][direcitonIndex] = addItem; + map[civIndex][typeIndex][actionIndex][materialIndex][direcitonIndex] = item; priorities[civIndex][typeIndex][actionIndex][materialIndex][direcitonIndex] = priority; } } diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/SettlerImageMapItem.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/SettlerImageMapItem.java index 3d1890343c..ae5df2309c 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/SettlerImageMapItem.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/SettlerImageMapItem.java @@ -52,8 +52,4 @@ public int getStart() { public int getDuration() { return this.duration; } - - public SettlerImageMapItem derive(int civ) { - return new SettlerImageMapItem((civ+1)*10+file, sequenceIndex, start, duration); - } } diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-AMAZON.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-AMAZON.txt new file mode 100644 index 0000000000..e573c3de25 --- /dev/null +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-AMAZON.txt @@ -0,0 +1,6 @@ +# this is a map: +# type, action, material, direction = file, sequence index, start, duration +# See + +SETTLER_MATERIAL(BEARER, STONE, 40, 2) +SETTLER_MATERIAL(BEARER, PIG, 40, 3) diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ASIAN.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ASIAN.txt new file mode 100644 index 0000000000..6ed12883b1 --- /dev/null +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ASIAN.txt @@ -0,0 +1,6 @@ +# this is a map: +# type, action, material, direction = file, sequence index, start, duration +# See + +SETTLER_MATERIAL(BEARER, PIG, 30, 2) +SETTLER_MATERIAL(BEARER, BREAD, 30, 3) diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-EGYPTIAN.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-EGYPTIAN.txt new file mode 100644 index 0000000000..64ac6e0607 --- /dev/null +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-EGYPTIAN.txt @@ -0,0 +1,6 @@ +# this is a map: +# type, action, material, direction = file, sequence index, start, duration +# See + +SETTLER_MATERIAL(BEARER, STONE, 20, 2) +SETTLER_MATERIAL(BEARER, PIG, 20, 3) diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt index 3a47aefb32..c35ab48d4c 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt @@ -1,398 +1,44 @@ # this is a map: # type, action, material, direction = file, sequence index, start, duration -# See +# See + +*,*,*,* = 10, 0, 0, 1 -*,*,*,*=10, 0, 0, 1 ### # BEARER movables start ### -BEARER, WALKING, NO_MATERIAL, SOUTH_WEST = 10, 0, 0, 12 -BEARER, WALKING, NO_MATERIAL, WEST = 10, 0, 12, 12 -BEARER, WALKING, NO_MATERIAL, NORTH_WEST = 10, 0, 24, 12 -BEARER, WALKING, NO_MATERIAL, NORTH_EAST = 10, 0, 36, 12 -BEARER, WALKING, NO_MATERIAL, EAST = 10, 0, 48, 12 -BEARER, WALKING, NO_MATERIAL, SOUTH_EAST = 10, 0, 60, 12 -BEARER, WALKING, PLANK, SOUTH_WEST = 10, 1, 0, 12 -BEARER, WALKING, PLANK, WEST = 10, 1, 12, 12 -BEARER, WALKING, PLANK, NORTH_WEST = 10, 1, 24, 12 -BEARER, WALKING, PLANK, NORTH_EAST = 10, 1, 36, 12 -BEARER, WALKING, PLANK, EAST = 10, 1, 48, 12 -BEARER, WALKING, PLANK, SOUTH_EAST = 10, 1, 60, 12 -BEARER, WALKING, STONE, SOUTH_WEST = 10, 2, 0, 12 -BEARER, WALKING, STONE, WEST = 10, 2, 12, 12 -BEARER, WALKING, STONE, NORTH_WEST = 10, 2, 24, 12 -BEARER, WALKING, STONE, NORTH_EAST = 10, 2, 36, 12 -BEARER, WALKING, STONE, EAST = 10, 2, 48, 12 -BEARER, WALKING, STONE, SOUTH_EAST = 10, 2, 60, 12 -BEARER, WALKING, PIG, SOUTH_WEST = 10, 3, 0, 12 -BEARER, WALKING, PIG, WEST = 10, 3, 12, 12 -BEARER, WALKING, PIG, NORTH_WEST = 10, 3, 24, 12 -BEARER, WALKING, PIG, NORTH_EAST = 10, 3, 36, 12 -BEARER, WALKING, PIG, EAST = 10, 3, 48, 12 -BEARER, WALKING, PIG, SOUTH_EAST = 10, 3, 60, 12 -BEARER, WALKING, TRUNK, SOUTH_WEST = 10, 4, 0, 12 -BEARER, WALKING, TRUNK, WEST = 10, 4, 12, 12 -BEARER, WALKING, TRUNK, NORTH_WEST = 10, 4, 24, 12 -BEARER, WALKING, TRUNK, NORTH_EAST = 10, 4, 36, 12 -BEARER, WALKING, TRUNK, EAST = 10, 4, 48, 12 -BEARER, WALKING, TRUNK, SOUTH_EAST = 10, 4, 60, 12 -BEARER, WALKING, BREAD, SOUTH_WEST = 10, 5, 0, 12 -BEARER, WALKING, BREAD, WEST = 10, 5, 12, 12 -BEARER, WALKING, BREAD, NORTH_WEST = 10, 5, 24, 12 -BEARER, WALKING, BREAD, NORTH_EAST = 10, 5, 36, 12 -BEARER, WALKING, BREAD, EAST = 10, 5, 48, 12 -BEARER, WALKING, BREAD, SOUTH_EAST = 10, 5, 60, 12 -BEARER, WALKING, COAL, SOUTH_WEST = 10, 6, 0, 12 -BEARER, WALKING, COAL, WEST = 10, 6, 12, 12 -BEARER, WALKING, COAL, NORTH_WEST = 10, 6, 24, 12 -BEARER, WALKING, COAL, NORTH_EAST = 10, 6, 36, 12 -BEARER, WALKING, COAL, EAST = 10, 6, 48, 12 -BEARER, WALKING, COAL, SOUTH_EAST = 10, 6, 60, 12 -BEARER, WALKING, GOLDORE, SOUTH_WEST = 10, 7, 0, 12 -BEARER, WALKING, GOLDORE, WEST = 10, 7, 12, 12 -BEARER, WALKING, GOLDORE, NORTH_WEST = 10, 7, 24, 12 -BEARER, WALKING, GOLDORE, NORTH_EAST = 10, 7, 36, 12 -BEARER, WALKING, GOLDORE, EAST = 10, 7, 48, 12 -BEARER, WALKING, GOLDORE, SOUTH_EAST = 10, 7, 60, 12 -BEARER, WALKING, IRONORE, SOUTH_WEST = 10, 8, 0, 12 -BEARER, WALKING, IRONORE, WEST = 10, 8, 12, 12 -BEARER, WALKING, IRONORE, NORTH_WEST = 10, 8, 24, 12 -BEARER, WALKING, IRONORE, NORTH_EAST = 10, 8, 36, 12 -BEARER, WALKING, IRONORE, EAST = 10, 8, 48, 12 -BEARER, WALKING, IRONORE, SOUTH_EAST = 10, 8, 60, 12 -BEARER, WALKING, FISH, SOUTH_WEST = 10, 9, 0, 12 -BEARER, WALKING, FISH, WEST = 10, 9, 12, 12 -BEARER, WALKING, FISH, NORTH_WEST = 10, 9, 24, 12 -BEARER, WALKING, FISH, NORTH_EAST = 10, 9, 36, 12 -BEARER, WALKING, FISH, EAST = 10, 9, 48, 12 -BEARER, WALKING, FISH, SOUTH_EAST = 10, 9, 60, 12 -BEARER, WALKING, MEAT, SOUTH_WEST = 10, 10, 0, 12 -BEARER, WALKING, MEAT, WEST = 10, 10, 12, 12 -BEARER, WALKING, MEAT, NORTH_WEST = 10, 10, 24, 12 -BEARER, WALKING, MEAT, NORTH_EAST = 10, 10, 36, 12 -BEARER, WALKING, MEAT, EAST = 10, 10, 48, 12 -BEARER, WALKING, MEAT, SOUTH_EAST = 10, 10, 60, 12 -BEARER, WALKING, CROP, SOUTH_WEST = 10, 11, 0, 12 -BEARER, WALKING, CROP, WEST = 10, 11, 12, 12 -BEARER, WALKING, CROP, NORTH_WEST = 10, 11, 24, 12 -BEARER, WALKING, CROP, NORTH_EAST = 10, 11, 36, 12 -BEARER, WALKING, CROP, EAST = 10, 11, 48, 12 -BEARER, WALKING, CROP, SOUTH_EAST = 10, 11, 60, 12 -BEARER, WALKING, FLOUR, SOUTH_WEST = 10, 12, 0, 12 -BEARER, WALKING, FLOUR, WEST = 10, 12, 12, 12 -BEARER, WALKING, FLOUR, NORTH_WEST = 10, 12, 24, 12 -BEARER, WALKING, FLOUR, NORTH_EAST = 10, 12, 36, 12 -BEARER, WALKING, FLOUR, EAST = 10, 12, 48, 12 -BEARER, WALKING, FLOUR, SOUTH_EAST = 10, 12, 60, 12 -BEARER, WALKING, IRON, SOUTH_WEST = 10, 13, 0, 12 -BEARER, WALKING, IRON, WEST = 10, 13, 12, 12 -BEARER, WALKING, IRON, NORTH_WEST = 10, 13, 24, 12 -BEARER, WALKING, IRON, NORTH_EAST = 10, 13, 36, 12 -BEARER, WALKING, IRON, EAST = 10, 13, 48, 12 -BEARER, WALKING, IRON, SOUTH_EAST = 10, 13, 60, 12 -BEARER, WALKING, GOLD, SOUTH_WEST = 10, 14, 0, 12 -BEARER, WALKING, GOLD, WEST = 10, 14, 12, 12 -BEARER, WALKING, GOLD, NORTH_WEST = 10, 14, 24, 12 -BEARER, WALKING, GOLD, NORTH_EAST = 10, 14, 36, 12 -BEARER, WALKING, GOLD, EAST = 10, 14, 48, 12 -BEARER, WALKING, GOLD, SOUTH_EAST = 10, 14, 60, 12 -BEARER, WALKING, WATER, SOUTH_WEST = 10, 15, 0, 12 -BEARER, WALKING, WATER, WEST = 10, 15, 12, 12 -BEARER, WALKING, WATER, NORTH_WEST = 10, 15, 24, 12 -BEARER, WALKING, WATER, NORTH_EAST = 10, 15, 36, 12 -BEARER, WALKING, WATER, EAST = 10, 15, 48, 12 -BEARER, WALKING, WATER, SOUTH_EAST = 10, 15, 60, 12 -BEARER, WALKING, HAMMER, SOUTH_WEST = 10, 16, 0, 12 -BEARER, WALKING, HAMMER, WEST = 10, 16, 12, 12 -BEARER, WALKING, HAMMER, NORTH_WEST = 10, 16, 24, 12 -BEARER, WALKING, HAMMER, NORTH_EAST = 10, 16, 36, 12 -BEARER, WALKING, HAMMER, EAST = 10, 16, 48, 12 -BEARER, WALKING, HAMMER, SOUTH_EAST = 10, 16, 60, 12 -BEARER, WALKING, PICK, SOUTH_WEST = 10, 17, 0, 12 -BEARER, WALKING, PICK, WEST = 10, 17, 12, 12 -BEARER, WALKING, PICK, NORTH_WEST = 10, 17, 24, 12 -BEARER, WALKING, PICK, NORTH_EAST = 10, 17, 36, 12 -BEARER, WALKING, PICK, EAST = 10, 17, 48, 12 -BEARER, WALKING, PICK, SOUTH_EAST = 10, 17, 60, 12 -BEARER, WALKING, FISHINGROD, SOUTH_WEST = 10, 18, 0, 12 -BEARER, WALKING, FISHINGROD, WEST = 10, 18, 12, 12 -BEARER, WALKING, FISHINGROD, NORTH_WEST = 10, 18, 24, 12 -BEARER, WALKING, FISHINGROD, NORTH_EAST = 10, 18, 36, 12 -BEARER, WALKING, FISHINGROD, EAST = 10, 18, 48, 12 -BEARER, WALKING, FISHINGROD, SOUTH_EAST = 10, 18, 60, 12 -BEARER, WALKING, SCYTHE, SOUTH_WEST = 10, 19, 0, 12 -BEARER, WALKING, SCYTHE, WEST = 10, 19, 12, 12 -BEARER, WALKING, SCYTHE, NORTH_WEST = 10, 19, 24, 12 -BEARER, WALKING, SCYTHE, NORTH_EAST = 10, 19, 36, 12 -BEARER, WALKING, SCYTHE, EAST = 10, 19, 48, 12 -BEARER, WALKING, SCYTHE, SOUTH_EAST = 10, 19, 60, 12 -BEARER, WALKING, SAW, SOUTH_WEST = 10, 20, 0, 12 -BEARER, WALKING, SAW, WEST = 10, 20, 12, 12 -BEARER, WALKING, SAW, NORTH_WEST = 10, 20, 24, 12 -BEARER, WALKING, SAW, NORTH_EAST = 10, 20, 36, 12 -BEARER, WALKING, SAW, EAST = 10, 20, 48, 12 -BEARER, WALKING, SAW, SOUTH_EAST = 10, 20, 60, 12 -BEARER, WALKING, BLADE, SOUTH_WEST = 10, 21, 0, 12 -BEARER, WALKING, BLADE, WEST = 10, 21, 12, 12 -BEARER, WALKING, BLADE, NORTH_WEST = 10, 21, 24, 12 -BEARER, WALKING, BLADE, NORTH_EAST = 10, 21, 36, 12 -BEARER, WALKING, BLADE, EAST = 10, 21, 48, 12 -BEARER, WALKING, BLADE, SOUTH_EAST = 10, 21, 60, 12 -BEARER, WALKING, BOW, SOUTH_WEST = 10, 22, 0, 12 -BEARER, WALKING, BOW, WEST = 10, 22, 12, 12 -BEARER, WALKING, BOW, NORTH_WEST = 10, 22, 24, 12 -BEARER, WALKING, BOW, NORTH_EAST = 10, 22, 36, 12 -BEARER, WALKING, BOW, EAST = 10, 22, 48, 12 -BEARER, WALKING, BOW, SOUTH_EAST = 10, 22, 60, 12 -BEARER, WALKING, SPEAR, SOUTH_WEST = 10, 23, 0, 12 -BEARER, WALKING, SPEAR, WEST = 10, 23, 12, 12 -BEARER, WALKING, SPEAR, NORTH_WEST = 10, 23, 24, 12 -BEARER, WALKING, SPEAR, NORTH_EAST = 10, 23, 36, 12 -BEARER, WALKING, SPEAR, EAST = 10, 23, 48, 12 -BEARER, WALKING, SPEAR, SOUTH_EAST = 10, 23, 60, 12 -BEARER, WALKING, SWORD, SOUTH_WEST = 10, 24, 0, 12 -BEARER, WALKING, SWORD, WEST = 10, 24, 12, 12 -BEARER, WALKING, SWORD, NORTH_WEST = 10, 24, 24, 12 -BEARER, WALKING, SWORD, NORTH_EAST = 10, 24, 36, 12 -BEARER, WALKING, SWORD, EAST = 10, 24, 48, 12 -BEARER, WALKING, SWORD, SOUTH_EAST = 10, 24, 60, 12 -BEARER, WALKING, AXE, SOUTH_WEST = 10, 35, 0, 12 -BEARER, WALKING, AXE, WEST = 10, 35, 12, 12 -BEARER, WALKING, AXE, NORTH_WEST = 10, 35, 24, 12 -BEARER, WALKING, AXE, NORTH_EAST = 10, 35, 36, 12 -BEARER, WALKING, AXE, EAST = 10, 35, 48, 12 -BEARER, WALKING, AXE, SOUTH_EAST = 10, 35, 60, 12 -BEARER, WALKING, WINE, SOUTH_WEST = 10, 54, 0, 12 -BEARER, WALKING, WINE, WEST = 10, 54, 12, 12 -BEARER, WALKING, WINE, NORTH_WEST = 10, 54, 24, 12 -BEARER, WALKING, WINE, NORTH_EAST = 10, 54, 36, 12 -BEARER, WALKING, WINE, EAST = 10, 54, 48, 12 -BEARER, WALKING, WINE, SOUTH_EAST = 10, 54, 60, 12 -BEARER, WALKING, KEG, SOUTH_WEST = 10, 55, 0, 12 -BEARER, WALKING, KEG, WEST = 10, 55, 12, 12 -BEARER, WALKING, KEG, NORTH_WEST = 10, 55, 24, 12 -BEARER, WALKING, KEG, NORTH_EAST = 10, 55, 36, 12 -BEARER, WALKING, KEG, EAST = 10, 55, 48, 12 -BEARER, WALKING, KEG, SOUTH_EAST = 10, 55, 60, 12 -BEARER, WALKING, BOX, SOUTH_WEST = 10, 56, 0, 12 -BEARER, WALKING, BOX, WEST = 10, 56, 12, 12 -BEARER, WALKING, BOX, NORTH_WEST = 10, 56, 24, 12 -BEARER, WALKING, BOX, NORTH_EAST = 10, 56, 36, 12 -BEARER, WALKING, BOX, EAST = 10, 56, 48, 12 -BEARER, WALKING, BOX, SOUTH_EAST = 10, 56, 60, 12 -BEARER, WALKING, GEMS, SOUTH_WEST = 10, 57, 0, 12 -BEARER, WALKING, GEMS, WEST = 10, 57, 12, 12 -BEARER, WALKING, GEMS, NORTH_WEST = 10, 57, 24, 12 -BEARER, WALKING, GEMS, NORTH_EAST = 10, 57, 36, 12 -BEARER, WALKING, GEMS, EAST = 10, 57, 48, 12 -BEARER, WALKING, GEMS, SOUTH_EAST = 10, 57, 60, 12 -BEARER, WALKING, RICE, SOUTH_WEST = 10, 58, 0, 12 -BEARER, WALKING, RICE, WEST = 10, 58, 12, 12 -BEARER, WALKING, RICE, NORTH_WEST = 10, 58, 24, 12 -BEARER, WALKING, RICE, NORTH_EAST = 10, 58, 36, 12 -BEARER, WALKING, RICE, EAST = 10, 58, 48, 12 -BEARER, WALKING, RICE, SOUTH_EAST = 10, 58, 60, 12 -BEARER, WALKING, SULFUR, SOUTH_WEST = 10, 59, 0, 12 -BEARER, WALKING, SULFUR, WEST = 10, 59, 12, 12 -BEARER, WALKING, SULFUR, NORTH_WEST = 10, 59, 24, 12 -BEARER, WALKING, SULFUR, NORTH_EAST = 10, 59, 36, 12 -BEARER, WALKING, SULFUR, EAST = 10, 59, 48, 12 -BEARER, WALKING, SULFUR, SOUTH_EAST = 10, 59, 60, 12 - - -BEARER, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 10, 0, 0, 1 -BEARER, NO_ACTION, NO_MATERIAL, WEST = 10, 0, 12, 1 -BEARER, NO_ACTION, NO_MATERIAL, NORTH_WEST = 10, 0, 24, 1 -BEARER, NO_ACTION, NO_MATERIAL, NORTH_EAST = 10, 0, 36, 1 -BEARER, NO_ACTION, NO_MATERIAL, EAST = 10, 0, 48, 1 -BEARER, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 10, 0, 60, 1 -BEARER, NO_ACTION, PLANK, SOUTH_WEST = 10, 1, 0, 1 -BEARER, NO_ACTION, PLANK, WEST = 10, 1, 12, 1 -BEARER, NO_ACTION, PLANK, NORTH_WEST = 10, 1, 24, 1 -BEARER, NO_ACTION, PLANK, NORTH_EAST = 10, 1, 36, 1 -BEARER, NO_ACTION, PLANK, EAST = 10, 1, 48, 1 -BEARER, NO_ACTION, PLANK, SOUTH_EAST = 10, 1, 60, 1 -BEARER, NO_ACTION, STONE, SOUTH_WEST = 10, 2, 0, 1 -BEARER, NO_ACTION, STONE, WEST = 10, 2, 12, 1 -BEARER, NO_ACTION, STONE, NORTH_WEST = 10, 2, 24, 1 -BEARER, NO_ACTION, STONE, NORTH_EAST = 10, 2, 36, 1 -BEARER, NO_ACTION, STONE, EAST = 10, 2, 48, 1 -BEARER, NO_ACTION, STONE, SOUTH_EAST = 10, 2, 60, 1 -BEARER, NO_ACTION, PIG, SOUTH_WEST = 10, 3, 0, 1 -BEARER, NO_ACTION, PIG, WEST = 10, 3, 12, 1 -BEARER, NO_ACTION, PIG, NORTH_WEST = 10, 3, 24, 1 -BEARER, NO_ACTION, PIG, NORTH_EAST = 10, 3, 36, 1 -BEARER, NO_ACTION, PIG, EAST = 10, 3, 48, 1 -BEARER, NO_ACTION, PIG, SOUTH_EAST = 10, 3, 60, 1 -BEARER, NO_ACTION, TRUNK, SOUTH_WEST = 10, 4, 0, 1 -BEARER, NO_ACTION, TRUNK, WEST = 10, 4, 12, 1 -BEARER, NO_ACTION, TRUNK, NORTH_WEST = 10, 4, 24, 1 -BEARER, NO_ACTION, TRUNK, NORTH_EAST = 10, 4, 36, 1 -BEARER, NO_ACTION, TRUNK, EAST = 10, 4, 48, 1 -BEARER, NO_ACTION, TRUNK, SOUTH_EAST = 10, 4, 60, 1 -BEARER, NO_ACTION, BREAD, SOUTH_WEST = 10, 5, 0, 1 -BEARER, NO_ACTION, BREAD, WEST = 10, 5, 12, 1 -BEARER, NO_ACTION, BREAD, NORTH_WEST = 10, 5, 24, 1 -BEARER, NO_ACTION, BREAD, NORTH_EAST = 10, 5, 36, 1 -BEARER, NO_ACTION, BREAD, EAST = 10, 5, 48, 1 -BEARER, NO_ACTION, BREAD, SOUTH_EAST = 10, 5, 60, 1 -BEARER, NO_ACTION, COAL, SOUTH_WEST = 10, 6, 0, 1 -BEARER, NO_ACTION, COAL, WEST = 10, 6, 12, 1 -BEARER, NO_ACTION, COAL, NORTH_WEST = 10, 6, 24, 1 -BEARER, NO_ACTION, COAL, NORTH_EAST = 10, 6, 36, 1 -BEARER, NO_ACTION, COAL, EAST = 10, 6, 48, 1 -BEARER, NO_ACTION, COAL, SOUTH_EAST = 10, 6, 60, 1 -BEARER, NO_ACTION, GOLDORE, SOUTH_WEST = 10, 7, 0, 1 -BEARER, NO_ACTION, GOLDORE, WEST = 10, 7, 12, 1 -BEARER, NO_ACTION, GOLDORE, NORTH_WEST = 10, 7, 24, 1 -BEARER, NO_ACTION, GOLDORE, NORTH_EAST = 10, 7, 36, 1 -BEARER, NO_ACTION, GOLDORE, EAST = 10, 7, 48, 1 -BEARER, NO_ACTION, GOLDORE, SOUTH_EAST = 10, 7, 60, 1 -BEARER, NO_ACTION, IRONORE, SOUTH_WEST = 10, 8, 0, 1 -BEARER, NO_ACTION, IRONORE, WEST = 10, 8, 12, 1 -BEARER, NO_ACTION, IRONORE, NORTH_WEST = 10, 8, 24, 1 -BEARER, NO_ACTION, IRONORE, NORTH_EAST = 10, 8, 36, 1 -BEARER, NO_ACTION, IRONORE, EAST = 10, 8, 48, 1 -BEARER, NO_ACTION, IRONORE, SOUTH_EAST = 10, 8, 60, 1 -BEARER, NO_ACTION, FISH, SOUTH_WEST = 10, 9, 0, 1 -BEARER, NO_ACTION, FISH, WEST = 10, 9, 12, 1 -BEARER, NO_ACTION, FISH, NORTH_WEST = 10, 9, 24, 1 -BEARER, NO_ACTION, FISH, NORTH_EAST = 10, 9, 36, 1 -BEARER, NO_ACTION, FISH, EAST = 10, 9, 48, 1 -BEARER, NO_ACTION, FISH, SOUTH_EAST = 10, 9, 60, 1 -BEARER, NO_ACTION, MEAT, SOUTH_WEST = 10, 10, 0, 1 -BEARER, NO_ACTION, MEAT, WEST = 10, 10, 12, 1 -BEARER, NO_ACTION, MEAT, NORTH_WEST = 10, 10, 24, 1 -BEARER, NO_ACTION, MEAT, NORTH_EAST = 10, 10, 36, 1 -BEARER, NO_ACTION, MEAT, EAST = 10, 10, 48, 1 -BEARER, NO_ACTION, MEAT, SOUTH_EAST = 10, 10, 60, 1 -BEARER, NO_ACTION, CROP, SOUTH_WEST = 10, 11, 0, 1 -BEARER, NO_ACTION, CROP, WEST = 10, 11, 12, 1 -BEARER, NO_ACTION, CROP, NORTH_WEST = 10, 11, 24, 1 -BEARER, NO_ACTION, CROP, NORTH_EAST = 10, 11, 36, 1 -BEARER, NO_ACTION, CROP, EAST = 10, 11, 48, 1 -BEARER, NO_ACTION, CROP, SOUTH_EAST = 10, 11, 60, 1 -BEARER, NO_ACTION, FLOUR, SOUTH_WEST = 10, 12, 0, 1 -BEARER, NO_ACTION, FLOUR, WEST = 10, 12, 12, 1 -BEARER, NO_ACTION, FLOUR, NORTH_WEST = 10, 12, 24, 1 -BEARER, NO_ACTION, FLOUR, NORTH_EAST = 10, 12, 36, 1 -BEARER, NO_ACTION, FLOUR, EAST = 10, 12, 48, 1 -BEARER, NO_ACTION, FLOUR, SOUTH_EAST = 10, 12, 60, 1 -BEARER, NO_ACTION, IRON, SOUTH_WEST = 10, 13, 0, 1 -BEARER, NO_ACTION, IRON, WEST = 10, 13, 12, 1 -BEARER, NO_ACTION, IRON, NORTH_WEST = 10, 13, 24, 1 -BEARER, NO_ACTION, IRON, NORTH_EAST = 10, 13, 36, 1 -BEARER, NO_ACTION, IRON, EAST = 10, 13, 48, 1 -BEARER, NO_ACTION, IRON, SOUTH_EAST = 10, 13, 60, 1 -BEARER, NO_ACTION, GOLD, SOUTH_WEST = 10, 14, 0, 1 -BEARER, NO_ACTION, GOLD, WEST = 10, 14, 12, 1 -BEARER, NO_ACTION, GOLD, NORTH_WEST = 10, 14, 24, 1 -BEARER, NO_ACTION, GOLD, NORTH_EAST = 10, 14, 36, 1 -BEARER, NO_ACTION, GOLD, EAST = 10, 14, 48, 1 -BEARER, NO_ACTION, GOLD, SOUTH_EAST = 10, 14, 60, 1 -BEARER, NO_ACTION, WATER, SOUTH_WEST = 10, 15, 0, 1 -BEARER, NO_ACTION, WATER, WEST = 10, 15, 12, 1 -BEARER, NO_ACTION, WATER, NORTH_WEST = 10, 15, 24, 1 -BEARER, NO_ACTION, WATER, NORTH_EAST = 10, 15, 36, 1 -BEARER, NO_ACTION, WATER, EAST = 10, 15, 48, 1 -BEARER, NO_ACTION, WATER, SOUTH_EAST = 10, 15, 60, 1 -BEARER, NO_ACTION, HAMMER, SOUTH_WEST = 10, 16, 0, 1 -BEARER, NO_ACTION, HAMMER, WEST = 10, 16, 12, 1 -BEARER, NO_ACTION, HAMMER, NORTH_WEST = 10, 16, 24, 1 -BEARER, NO_ACTION, HAMMER, NORTH_EAST = 10, 16, 36, 1 -BEARER, NO_ACTION, HAMMER, EAST = 10, 16, 48, 1 -BEARER, NO_ACTION, HAMMER, SOUTH_EAST = 10, 16, 60, 1 -BEARER, NO_ACTION, PICK, SOUTH_WEST = 10, 17, 0, 1 -BEARER, NO_ACTION, PICK, WEST = 10, 17, 12, 1 -BEARER, NO_ACTION, PICK, NORTH_WEST = 10, 17, 24, 1 -BEARER, NO_ACTION, PICK, NORTH_EAST = 10, 17, 36, 1 -BEARER, NO_ACTION, PICK, EAST = 10, 17, 48, 1 -BEARER, NO_ACTION, PICK, SOUTH_EAST = 10, 17, 60, 1 -BEARER, NO_ACTION, FISHINGROD, SOUTH_WEST = 10, 18, 0, 1 -BEARER, NO_ACTION, FISHINGROD, WEST = 10, 18, 12, 1 -BEARER, NO_ACTION, FISHINGROD, NORTH_WEST = 10, 18, 24, 1 -BEARER, NO_ACTION, FISHINGROD, NORTH_EAST = 10, 18, 36, 1 -BEARER, NO_ACTION, FISHINGROD, EAST = 10, 18, 48, 1 -BEARER, NO_ACTION, FISHINGROD, SOUTH_EAST = 10, 18, 60, 1 -BEARER, NO_ACTION, SCYTHE, SOUTH_WEST = 10, 19, 0, 1 -BEARER, NO_ACTION, SCYTHE, WEST = 10, 19, 12, 1 -BEARER, NO_ACTION, SCYTHE, NORTH_WEST = 10, 19, 24, 1 -BEARER, NO_ACTION, SCYTHE, NORTH_EAST = 10, 19, 36, 1 -BEARER, NO_ACTION, SCYTHE, EAST = 10, 19, 48, 1 -BEARER, NO_ACTION, SCYTHE, SOUTH_EAST = 10, 19, 60, 1 -BEARER, NO_ACTION, SAW, SOUTH_WEST = 10, 20, 0, 1 -BEARER, NO_ACTION, SAW, WEST = 10, 20, 12, 1 -BEARER, NO_ACTION, SAW, NORTH_WEST = 10, 20, 24, 1 -BEARER, NO_ACTION, SAW, NORTH_EAST = 10, 20, 36, 1 -BEARER, NO_ACTION, SAW, EAST = 10, 20, 48, 1 -BEARER, NO_ACTION, SAW, SOUTH_EAST = 10, 20, 60, 1 -BEARER, NO_ACTION, BLADE, SOUTH_WEST = 10, 21, 0, 1 -BEARER, NO_ACTION, BLADE, WEST = 10, 21, 12, 1 -BEARER, NO_ACTION, BLADE, NORTH_WEST = 10, 21, 24, 1 -BEARER, NO_ACTION, BLADE, NORTH_EAST = 10, 21, 36, 1 -BEARER, NO_ACTION, BLADE, EAST = 10, 21, 48, 1 -BEARER, NO_ACTION, BLADE, SOUTH_EAST = 10, 21, 60, 1 -BEARER, NO_ACTION, BOW, SOUTH_WEST = 10, 22, 0, 1 -BEARER, NO_ACTION, BOW, WEST = 10, 22, 12, 1 -BEARER, NO_ACTION, BOW, NORTH_WEST = 10, 22, 24, 1 -BEARER, NO_ACTION, BOW, NORTH_EAST = 10, 22, 36, 1 -BEARER, NO_ACTION, BOW, EAST = 10, 22, 48, 1 -BEARER, NO_ACTION, BOW, SOUTH_EAST = 10, 22, 60, 1 -BEARER, NO_ACTION, SPEAR, SOUTH_WEST = 10, 23, 0, 1 -BEARER, NO_ACTION, SPEAR, WEST = 10, 23, 12, 1 -BEARER, NO_ACTION, SPEAR, NORTH_WEST = 10, 23, 24, 1 -BEARER, NO_ACTION, SPEAR, NORTH_EAST = 10, 23, 36, 1 -BEARER, NO_ACTION, SPEAR, EAST = 10, 23, 48, 1 -BEARER, NO_ACTION, SPEAR, SOUTH_EAST = 10, 23, 60, 1 -BEARER, NO_ACTION, SWORD, SOUTH_WEST = 10, 24, 0, 1 -BEARER, NO_ACTION, SWORD, WEST = 10, 24, 12, 1 -BEARER, NO_ACTION, SWORD, NORTH_WEST = 10, 24, 24, 1 -BEARER, NO_ACTION, SWORD, NORTH_EAST = 10, 24, 36, 1 -BEARER, NO_ACTION, SWORD, EAST = 10, 24, 48, 1 -BEARER, NO_ACTION, SWORD, SOUTH_EAST = 10, 24, 60, 1 -BEARER, NO_ACTION, AXE, SOUTH_WEST = 10, 35, 0, 1 -BEARER, NO_ACTION, AXE, WEST = 10, 35, 12, 1 -BEARER, NO_ACTION, AXE, NORTH_WEST = 10, 35, 24, 1 -BEARER, NO_ACTION, AXE, NORTH_EAST = 10, 35, 36, 1 -BEARER, NO_ACTION, AXE, EAST = 10, 35, 48, 1 -BEARER, NO_ACTION, AXE, SOUTH_EAST = 10, 35, 60, 1 -BEARER, NO_ACTION, WINE, SOUTH_WEST = 10, 54, 0, 1 -BEARER, NO_ACTION, WINE, WEST = 10, 54, 12, 1 -BEARER, NO_ACTION, WINE, NORTH_WEST = 10, 54, 24, 1 -BEARER, NO_ACTION, WINE, NORTH_EAST = 10, 54, 36, 1 -BEARER, NO_ACTION, WINE, EAST = 10, 54, 48, 1 -BEARER, NO_ACTION, WINE, SOUTH_EAST = 10, 54, 60, 1 -BEARER, NO_ACTION, KEG, SOUTH_WEST = 10, 55, 0, 1 -BEARER, NO_ACTION, KEG, WEST = 10, 55, 12, 1 -BEARER, NO_ACTION, KEG, NORTH_WEST = 10, 55, 24, 1 -BEARER, NO_ACTION, KEG, NORTH_EAST = 10, 55, 36, 1 -BEARER, NO_ACTION, KEG, EAST = 10, 55, 48, 1 -BEARER, NO_ACTION, KEG, SOUTH_EAST = 10, 55, 60, 1 -BEARER, NO_ACTION, BOX, SOUTH_WEST = 10, 56, 0, 1 -BEARER, NO_ACTION, BOX, WEST = 10, 56, 12, 1 -BEARER, NO_ACTION, BOX, NORTH_WEST = 10, 56, 24, 1 -BEARER, NO_ACTION, BOX, NORTH_EAST = 10, 56, 36, 1 -BEARER, NO_ACTION, BOX, EAST = 10, 56, 48, 1 -BEARER, NO_ACTION, BOX, SOUTH_EAST = 10, 56, 60, 1 -BEARER, NO_ACTION, GEMS, SOUTH_WEST = 10, 57, 0, 1 -BEARER, NO_ACTION, GEMS, WEST = 10, 57, 12, 1 -BEARER, NO_ACTION, GEMS, NORTH_WEST = 10, 57, 24, 1 -BEARER, NO_ACTION, GEMS, NORTH_EAST = 10, 57, 36, 1 -BEARER, NO_ACTION, GEMS, EAST = 10, 57, 48, 1 -BEARER, NO_ACTION, GEMS, SOUTH_EAST = 10, 57, 60, 1 -BEARER, NO_ACTION, RICE, SOUTH_WEST = 10, 58, 0, 1 -BEARER, NO_ACTION, RICE, WEST = 10, 58, 12, 1 -BEARER, NO_ACTION, RICE, NORTH_WEST = 10, 58, 24, 1 -BEARER, NO_ACTION, RICE, NORTH_EAST = 10, 58, 36, 1 -BEARER, NO_ACTION, RICE, EAST = 10, 58, 48, 1 -BEARER, NO_ACTION, RICE, SOUTH_EAST = 10, 58, 60, 1 -BEARER, NO_ACTION, SULFUR, SOUTH_WEST = 10, 59, 0, 1 -BEARER, NO_ACTION, SULFUR, WEST = 10, 59, 12, 1 -BEARER, NO_ACTION, SULFUR, NORTH_WEST = 10, 59, 24, 1 -BEARER, NO_ACTION, SULFUR, NORTH_EAST = 10, 59, 36, 1 -BEARER, NO_ACTION, SULFUR, EAST = 10, 59, 48, 1 -BEARER, NO_ACTION, SULFUR, SOUTH_EAST = 10, 59, 60, 1 +SETTLER_MATERIAL(BEARER, STONE, 10, 2) +SETTLER_MATERIAL(BEARER, PIG, 10, 3) +SETTLER_MATERIAL(BEARER, TRUNK, 10, 4) +SETTLER_MATERIAL(BEARER, BREAD, 10, 5) +SETTLER_MATERIAL(BEARER, COAL, 10, 6) +SETTLER_MATERIAL(BEARER, GOLDORE, 10, 7) +SETTLER_MATERIAL(BEARER, IRONORE, 10, 8) +SETTLER_MATERIAL(BEARER, FISH, 10, 9) +SETTLER_MATERIAL(BEARER, MEAT, 10, 10) +SETTLER_MATERIAL(BEARER, CROP, 10, 11) +SETTLER_MATERIAL(BEARER, FLOUR, 10, 12) +SETTLER_MATERIAL(BEARER, IRON, 10, 13) +SETTLER_MATERIAL(BEARER, GOLD, 10, 14) +SETTLER_MATERIAL(BEARER, WATER, 10, 15) +SETTLER_MATERIAL(BEARER, HAMMER, 10, 16) +SETTLER_MATERIAL(BEARER, PICK, 10, 17) +SETTLER_MATERIAL(BEARER, FISHINGROD, 10, 18) +SETTLER_MATERIAL(BEARER, SCYTHE, 10, 19) +SETTLER_MATERIAL(BEARER, SAW, 10, 20) +SETTLER_MATERIAL(BEARER, BLADE, 10, 21) +SETTLER_MATERIAL(BEARER, BOW, 10, 22) +SETTLER_MATERIAL(BEARER, SPEAR, 10, 23) +SETTLER_MATERIAL(BEARER, SWORD, 10, 24) +SETTLER_MATERIAL(BEARER, AXE, 10, 35) +SETTLER_MATERIAL(BEARER, WINE, 10, 54) +SETTLER_MATERIAL(BEARER, KEG, 10, 55) +SETTLER_MATERIAL(BEARER, BOX, 10, 56) +SETTLER_MATERIAL(BEARER, GEMS, 10, 57) +SETTLER_MATERIAL(BEARER, RICE, 10, 58) +SETTLER_MATERIAL(BEARER, SULFUR, 10, 59) + @@ -412,49 +58,13 @@ BEARER, ACTION1, *, NORTH_EAST = 10, 51, 9, 9 BEARER, ACTION1, *, EAST = 10, 52, 9, 9 BEARER, ACTION1, *, SOUTH_EAST = 10, 53, 9, 9 -BEARER, BEND_DOWN, *, SOUTH_WEST = 10, 25, 0, 4 -BEARER, BEND_DOWN, *, WEST = 10, 25, 4, 4 -BEARER, BEND_DOWN, *, NORTH_WEST = 10, 25, 8, 4 -BEARER, BEND_DOWN, *, NORTH_EAST = 10, 25, 12, 4 -BEARER, BEND_DOWN, *, EAST = 10, 25, 16, 4 -BEARER, BEND_DOWN, *, SOUTH_EAST = 10, 25, 20, 4 - -BEARER, BEND_DOWN, PLANK, SOUTH_WEST = 10, 26, 0, 4 -BEARER, BEND_DOWN, PLANK, WEST = 10, 26, 4, 4 -BEARER, BEND_DOWN, PLANK, NORTH_WEST = 10, 26, 8, 4 -BEARER, BEND_DOWN, PLANK, NORTH_EAST = 10, 26, 12, 4 -BEARER, BEND_DOWN, PLANK, EAST = 10, 26, 16, 4 -BEARER, BEND_DOWN, PLANK, SOUTH_EAST = 10, 26, 20, 4 -BEARER, BEND_DOWN, TRUNK, SOUTH_WEST = 10, 27, 0, 4 -BEARER, BEND_DOWN, TRUNK, WEST = 10, 27, 4, 4 -BEARER, BEND_DOWN, TRUNK, NORTH_WEST = 10, 27, 8, 4 -BEARER, BEND_DOWN, TRUNK, NORTH_EAST = 10, 27, 12, 4 -BEARER, BEND_DOWN, TRUNK, EAST = 10, 27, 16, 4 -BEARER, BEND_DOWN, TRUNK, SOUTH_EAST = 10, 27, 20, 4 -BEARER, BEND_DOWN, STONE, SOUTH_WEST = 10, 28, 0, 4 -BEARER, BEND_DOWN, STONE, WEST = 10, 28, 4, 4 -BEARER, BEND_DOWN, STONE, NORTH_WEST = 10, 28, 8, 4 -BEARER, BEND_DOWN, STONE, NORTH_EAST = 10, 28, 12, 4 -BEARER, BEND_DOWN, STONE, EAST = 10, 28, 16, 4 -BEARER, BEND_DOWN, STONE, SOUTH_EAST = 10, 28, 20, 4 -BEARER, BEND_DOWN, MEAT, SOUTH_WEST = 10, 29, 0, 4 -BEARER, BEND_DOWN, MEAT, WEST = 10, 29, 4, 4 -BEARER, BEND_DOWN, MEAT, NORTH_WEST = 10, 29, 8, 4 -BEARER, BEND_DOWN, MEAT, NORTH_EAST = 10, 29, 12, 4 -BEARER, BEND_DOWN, MEAT, EAST = 10, 29, 16, 4 -BEARER, BEND_DOWN, MEAT, SOUTH_EAST = 10, 29, 20, 4 -BEARER, BEND_DOWN, PIG, SOUTH_WEST = 10, 30, 0, 4 -BEARER, BEND_DOWN, PIG, WEST = 10, 30, 4, 4 -BEARER, BEND_DOWN, PIG, NORTH_WEST = 10, 30, 8, 4 -BEARER, BEND_DOWN, PIG, NORTH_EAST = 10, 30, 12, 4 -BEARER, BEND_DOWN, PIG, EAST = 10, 30, 16, 4 -BEARER, BEND_DOWN, PIG, SOUTH_EAST = 10, 30, 20, 4 -BEARER, BEND_DOWN, FLOUR, SOUTH_WEST = 10, 31, 0, 4 -BEARER, BEND_DOWN, FLOUR, WEST = 10, 31, 4, 4 -BEARER, BEND_DOWN, FLOUR, NORTH_WEST = 10, 31, 8, 4 -BEARER, BEND_DOWN, FLOUR, NORTH_EAST = 10, 31, 12, 4 -BEARER, BEND_DOWN, FLOUR, EAST = 10, 31, 16, 4 -BEARER, BEND_DOWN, FLOUR, SOUTH_EAST = 10, 31, 20, 4 +SETTLER_BEND(BEARER, *, 10, 25) +SETTLER_BEND(BEARER, PLANK, 10, 26) +SETTLER_BEND(BEARER, TRUNK, 10, 27) +SETTLER_BEND(BEARER, STONE, 10, 28) +SETTLER_BEND(BEARER, MEAT, 10, 29) +SETTLER_BEND(BEARER, PIG, 10, 30) +SETTLER_BEND(BEARER, FLOUR, 10, 31) # SOUTH_WEST animation only BEARER, BEND_DOWN, COAL, * = 10, 32, 0, 9 @@ -509,18 +119,7 @@ BEARER, BEND_DOWN, IRONORE, * = 10, 34, 0, 9 ### # DIGGER movables start ### -DIGGER, WALKING, *, SOUTH_WEST = 11, 13, 0, 12 -DIGGER, WALKING, *, WEST = 11, 13, 12, 12 -DIGGER, WALKING, *, NORTH_WEST = 11, 13, 24, 12 -DIGGER, WALKING, *, NORTH_EAST = 11, 13, 36, 12 -DIGGER, WALKING, *, EAST = 11, 13, 48, 12 -DIGGER, WALKING, *, SOUTH_EAST = 11, 13, 60, 12 -DIGGER, NO_ACTION, *, SOUTH_WEST = 11, 13, 0, 1 -DIGGER, NO_ACTION, *, WEST = 11, 13, 12, 1 -DIGGER, NO_ACTION, *, NORTH_WEST = 11, 13, 24, 1 -DIGGER, NO_ACTION, *, NORTH_EAST = 11, 13, 36, 1 -DIGGER, NO_ACTION, *, EAST = 11, 13, 48, 1 -DIGGER, NO_ACTION, *, SOUTH_EAST = 11, 13, 60, 1 +SETTLER_MATERIAL(DIGGER, *, 11, 13) DIGGER, ACTION1, *, SOUTH_WEST = 11, 206, 0, 12 DIGGER, ACTION1, *, WEST = 11, 207, 0, 12 @@ -537,72 +136,16 @@ DIGGER, ACTION1, *, SOUTH_EAST = 11, 211, 0, 12 ### # SAWMILLER movables start ### -SAWMILLER, WALKING, PLANK, SOUTH_WEST = 11, 14, 0, 12 -SAWMILLER, WALKING, PLANK, WEST = 11, 14, 12, 12 -SAWMILLER, WALKING, PLANK, NORTH_WEST = 11, 14, 24, 12 -SAWMILLER, WALKING, PLANK, NORTH_EAST = 11, 14, 36, 12 -SAWMILLER, WALKING, PLANK, EAST = 11, 14, 48, 12 -SAWMILLER, WALKING, PLANK, SOUTH_EAST = 11, 14, 60, 12 -SAWMILLER, NO_ACTION, PLANK, SOUTH_WEST = 11, 14, 0, 1 -SAWMILLER, NO_ACTION, PLANK, WEST = 11, 14, 12, 1 -SAWMILLER, NO_ACTION, PLANK, NORTH_WEST = 11, 14, 24, 1 -SAWMILLER, NO_ACTION, PLANK, NORTH_EAST = 11, 14, 36, 1 -SAWMILLER, NO_ACTION, PLANK, EAST = 11, 14, 48, 1 -SAWMILLER, NO_ACTION, PLANK, SOUTH_EAST = 11, 14, 60, 1 - -SAWMILLER, BEND_DOWN, PLANK, SOUTH_WEST = 11, 15, 0, 4 -SAWMILLER, BEND_DOWN, PLANK, WEST = 11, 15, 4, 4 -SAWMILLER, BEND_DOWN, PLANK, NORTH_WEST = 11, 15, 8, 4 -SAWMILLER, BEND_DOWN, PLANK, NORTH_EAST = 11, 15, 12, 4 -SAWMILLER, BEND_DOWN, PLANK, EAST = 11, 15, 16, 4 -SAWMILLER, BEND_DOWN, PLANK, SOUTH_EAST = 11, 15, 20, 4 - -SAWMILLER, WALKING, TRUNK, SOUTH_WEST = 11, 16, 0, 12 -SAWMILLER, WALKING, TRUNK, WEST = 11, 16, 12, 12 -SAWMILLER, WALKING, TRUNK, NORTH_WEST = 11, 16, 24, 12 -SAWMILLER, WALKING, TRUNK, NORTH_EAST = 11, 16, 36, 12 -SAWMILLER, WALKING, TRUNK, EAST = 11, 16, 48, 12 -SAWMILLER, WALKING, TRUNK, SOUTH_EAST = 11, 16, 60, 12 -SAWMILLER, NO_ACTION, TRUNK, SOUTH_WEST = 11, 16, 0, 1 -SAWMILLER, NO_ACTION, TRUNK, WEST = 11, 16, 12, 1 -SAWMILLER, NO_ACTION, TRUNK, NORTH_WEST = 11, 16, 24, 1 -SAWMILLER, NO_ACTION, TRUNK, NORTH_EAST = 11, 16, 36, 1 -SAWMILLER, NO_ACTION, TRUNK, EAST = 11, 16, 48, 1 -SAWMILLER, NO_ACTION, TRUNK, SOUTH_EAST = 11, 16, 60, 1 - -SAWMILLER, BEND_DOWN, TRUNK, SOUTH_WEST = 11, 17, 0, 4 -SAWMILLER, BEND_DOWN, TRUNK, WEST = 11, 17, 4, 4 -SAWMILLER, BEND_DOWN, TRUNK, NORTH_WEST = 11, 17, 8, 4 -SAWMILLER, BEND_DOWN, TRUNK, NORTH_EAST = 11, 17, 12, 4 -SAWMILLER, BEND_DOWN, TRUNK, EAST = 11, 17, 16, 4 -SAWMILLER, BEND_DOWN, TRUNK, SOUTH_EAST = 11, 17, 20, 4 - -SAWMILLER, BEND_DOWN, *, SOUTH_WEST = 11, 18, 0, 4 -SAWMILLER, BEND_DOWN, *, WEST = 11, 18, 4, 4 -SAWMILLER, BEND_DOWN, *, NORTH_WEST = 11, 18, 8, 4 -SAWMILLER, BEND_DOWN, *, NORTH_EAST = 11, 18, 12, 4 -SAWMILLER, BEND_DOWN, *, EAST = 11, 18, 16, 4 -SAWMILLER, BEND_DOWN, *, SOUTH_EAST = 11, 18, 20, 4 - -SAWMILLER, RAISE_UP, *, SOUTH_WEST = 11, 18, 3, -4 -SAWMILLER, RAISE_UP, *, WEST = 11, 18, 7, -4 -SAWMILLER, RAISE_UP, *, NORTH_WEST = 11, 18, 11, -4 -SAWMILLER, RAISE_UP, *, NORTH_EAST = 11, 18, 15, -4 -SAWMILLER, RAISE_UP, *, EAST = 11, 18, 19, -4 -SAWMILLER, RAISE_UP, *, SOUTH_EAST = 11, 18, 23, -4 - -SAWMILLER, WALKING, NO_MATERIAL, SOUTH_WEST = 11, 19, 0, 12 -SAWMILLER, WALKING, NO_MATERIAL, WEST = 11, 19, 12, 12 -SAWMILLER, WALKING, NO_MATERIAL, NORTH_WEST = 11, 19, 24, 12 -SAWMILLER, WALKING, NO_MATERIAL, NORTH_EAST = 11, 19, 36, 12 -SAWMILLER, WALKING, NO_MATERIAL, EAST = 11, 19, 48, 12 -SAWMILLER, WALKING, NO_MATERIAL, SOUTH_EAST = 11, 19, 60, 12 -SAWMILLER, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 11, 19, 0, 1 -SAWMILLER, NO_ACTION, NO_MATERIAL, WEST = 11, 19, 12, 1 -SAWMILLER, NO_ACTION, NO_MATERIAL, NORTH_WEST = 11, 19, 24, 1 -SAWMILLER, NO_ACTION, NO_MATERIAL, NORTH_EAST = 11, 19, 36, 1 -SAWMILLER, NO_ACTION, NO_MATERIAL, EAST = 11, 19, 48, 1 -SAWMILLER, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 11, 19, 60, 1 +SETTLER_MATERIAL(SAWMILLER, PLANK, 11, 14) +SETTLER_BEND(SAWMILLER, PLANK, 11, 15) + +SETTLER_MATERIAL(SAWMILLER, TRUNK, 11, 16) +SETTLER_BEND(SAWMILLER, TRUNK, 11, 17) +SETTLER_BEND(SAWMILLER, *, 11, 18) + +SETTLER_MOVE(SAWMILLER, RAISE_UP, *, 11, 18) + +SETTLER_MATERIAL(SAWMILLER, NO_MATERIAL, 11, 19) SAWMILLER, ACTION1, *, * = 11, 20, 0, 10 ### @@ -614,38 +157,11 @@ SAWMILLER, ACTION1, *, * = 11, 20, 0, 10 ### # DOCKWORKER movables start ### -DOCKWORKER, WALKING, NO_MATERIAL, SOUTH_WEST = 11, 21, 0, 12 -DOCKWORKER, WALKING, NO_MATERIAL, WEST = 11, 21, 12, 12 -DOCKWORKER, WALKING, NO_MATERIAL, NORTH_WEST = 11, 21, 24, 12 -DOCKWORKER, WALKING, NO_MATERIAL, NORTH_EAST = 11, 21, 36, 12 -DOCKWORKER, WALKING, NO_MATERIAL, EAST = 11, 21, 48, 12 -DOCKWORKER, WALKING, NO_MATERIAL, SOUTH_EAST = 11, 21, 60, 12 -DOCKWORKER, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 11, 21, 0, 1 -DOCKWORKER, NO_ACTION, NO_MATERIAL, WEST = 11, 21, 12, 1 -DOCKWORKER, NO_ACTION, NO_MATERIAL, NORTH_WEST = 11, 21, 24, 1 -DOCKWORKER, NO_ACTION, NO_MATERIAL, NORTH_EAST = 11, 21, 36, 1 -DOCKWORKER, NO_ACTION, NO_MATERIAL, EAST = 11, 21, 48, 1 -DOCKWORKER, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 11, 21, 60, 1 - -DOCKWORKER, ACTION1, *, SOUTH_WEST = 11, 22, 0, 12 -DOCKWORKER, ACTION1, *, WEST = 11, 22, 12, 12 -DOCKWORKER, ACTION1, *, NORTH_WEST = 11, 22, 24, 12 -DOCKWORKER, ACTION1, *, NORTH_EAST = 11, 22, 36, 12 -DOCKWORKER, ACTION1, *, EAST = 11, 22, 48, 12 -DOCKWORKER, ACTION1, *, SOUTH_EAST = 11, 22, 60, 12 - -DOCKWORKER, WALKING, PLANK, SOUTH_WEST = 11, 23, 0, 12 -DOCKWORKER, WALKING, PLANK, WEST = 11, 23, 12, 12 -DOCKWORKER, WALKING, PLANK, NORTH_WEST = 11, 23, 24, 12 -DOCKWORKER, WALKING, PLANK, NORTH_EAST = 11, 23, 36, 12 -DOCKWORKER, WALKING, PLANK, EAST = 11, 23, 48, 12 -DOCKWORKER, WALKING, PLANK, SOUTH_EAST = 11, 23, 60, 12 -DOCKWORKER, NO_ACTION, PLANK, SOUTH_WEST = 11, 23, 0, 1 -DOCKWORKER, NO_ACTION, PLANK, WEST = 11, 23, 12, 1 -DOCKWORKER, NO_ACTION, PLANK, NORTH_WEST = 11, 23, 24, 1 -DOCKWORKER, NO_ACTION, PLANK, NORTH_EAST = 11, 23, 36, 1 -DOCKWORKER, NO_ACTION, PLANK, EAST = 11, 23, 48, 1 -DOCKWORKER, NO_ACTION, PLANK, SOUTH_EAST = 11, 23, 60, 1 +SETTLER_MATERIAL(DOCKWORKER, NO_MATERIAL, 11, 21) + +SETTLER_ACTION(DOCKWORKER, ACTION1, *, 11, 22) + +SETTLER_MATERIAL(DOCKWORKER, PLANK, 11, 23) DOCKWORKER, BEND_DOWN, NO_MATERIAL, SOUTH_WEST = 11, 212, 0, 4 DOCKWORKER, BEND_DOWN, NO_MATERIAL, WEST = 11, 213, 0, 4 @@ -676,18 +192,7 @@ DOCKWORKER, RAISE_UP, IRON, NORTH_EAST = 11, 227, 4, 4 DOCKWORKER, RAISE_UP, IRON, EAST = 11, 228, 4, 4 DOCKWORKER, RAISE_UP, IRON, SOUTH_EAST = 11, 229, 4, 4 -DOCKWORKER, WALKING, IRON, SOUTH_WEST = 11, 230, 0, 12 -DOCKWORKER, WALKING, IRON, WEST = 11, 230, 12, 12 -DOCKWORKER, WALKING, IRON, NORTH_WEST = 11, 230, 24, 12 -DOCKWORKER, WALKING, IRON, NORTH_EAST = 11, 230, 36, 12 -DOCKWORKER, WALKING, IRON, EAST = 11, 230, 48, 12 -DOCKWORKER, WALKING, IRON, SOUTH_EAST = 11, 230, 60, 12 -DOCKWORKER, NO_ACTION, IRON, SOUTH_WEST = 11, 230, 0, 1 -DOCKWORKER, NO_ACTION, IRON, WEST = 11, 230, 12, 1 -DOCKWORKER, NO_ACTION, IRON, NORTH_WEST = 11, 230, 24, 1 -DOCKWORKER, NO_ACTION, IRON, NORTH_EAST = 11, 230, 36, 1 -DOCKWORKER, NO_ACTION, IRON, EAST = 11, 230, 48, 1 -DOCKWORKER, NO_ACTION, IRON, SOUTH_EAST = 11, 230, 60, 1 +SETTLER_MATERIAL(DOCKWORKER, IRON, 11, 230) ### # DOCKWORKER movables end ### @@ -697,25 +202,9 @@ DOCKWORKER, NO_ACTION, IRON, SOUTH_EAST = 11, 230, 60, 1 ### # BRICKLAYER movables start ### -BRICKLAYER, WALKING, NO_MATERIAL, SOUTH_WEST = 11, 21, 0, 12 -BRICKLAYER, WALKING, NO_MATERIAL, WEST = 11, 21, 12, 12 -BRICKLAYER, WALKING, NO_MATERIAL, NORTH_WEST = 11, 21, 24, 12 -BRICKLAYER, WALKING, NO_MATERIAL, NORTH_EAST = 11, 21, 36, 12 -BRICKLAYER, WALKING, NO_MATERIAL, EAST = 11, 21, 48, 12 -BRICKLAYER, WALKING, NO_MATERIAL, SOUTH_EAST = 11, 21, 60, 12 -BRICKLAYER, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 11, 21, 0, 1 -BRICKLAYER, NO_ACTION, NO_MATERIAL, WEST = 11, 21, 12, 1 -BRICKLAYER, NO_ACTION, NO_MATERIAL, NORTH_WEST = 11, 21, 24, 1 -BRICKLAYER, NO_ACTION, NO_MATERIAL, NORTH_EAST = 11, 21, 36, 1 -BRICKLAYER, NO_ACTION, NO_MATERIAL, EAST = 11, 21, 48, 1 -BRICKLAYER, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 11, 21, 60, 1 - -BRICKLAYER, ACTION1, *, SOUTH_WEST = 11, 22, 0, 12 -BRICKLAYER, ACTION1, *, WEST = 11, 22, 12, 12 -BRICKLAYER, ACTION1, *, NORTH_WEST = 11, 22, 24, 12 -BRICKLAYER, ACTION1, *, NORTH_EAST = 11, 22, 36, 12 -BRICKLAYER, ACTION1, *, EAST = 11, 22, 48, 12 -BRICKLAYER, ACTION1, *, SOUTH_EAST = 11, 22, 60, 12 +SETTLER_MATERIAL(BRICKLAYER, NO_MATERIAL, 11, 21) + +SETTLER_ACTION(BRICKLAYER, ACTION1, *, 11, 22) # this 218-223 1x1 copy of 22, checked on the gold edition ver. 1.60 #BRICKLAYER, ACTION1, *, SOUTH_WEST = 11, 218, 0, 12 @@ -733,66 +222,17 @@ BRICKLAYER, ACTION1, *, SOUTH_EAST = 11, 22, 60, 12 ### # STONECUTTER movables start ### -STONECUTTER, WALKING, NO_MATERIAL, SOUTH_WEST = 11, 24, 0, 12 -STONECUTTER, WALKING, NO_MATERIAL, WEST = 11, 24, 12, 12 -STONECUTTER, WALKING, NO_MATERIAL, NORTH_WEST = 11, 24, 24, 12 -STONECUTTER, WALKING, NO_MATERIAL, NORTH_EAST = 11, 24, 36, 12 -STONECUTTER, WALKING, NO_MATERIAL, EAST = 11, 24, 48, 12 -STONECUTTER, WALKING, NO_MATERIAL, SOUTH_EAST = 11, 24, 60, 12 -STONECUTTER, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 11, 24, 0, 1 -STONECUTTER, NO_ACTION, NO_MATERIAL, WEST = 11, 24, 12, 1 -STONECUTTER, NO_ACTION, NO_MATERIAL, NORTH_WEST = 11, 24, 24, 1 -STONECUTTER, NO_ACTION, NO_MATERIAL, NORTH_EAST = 11, 24, 36, 1 -STONECUTTER, NO_ACTION, NO_MATERIAL, EAST = 11, 24, 48, 1 -STONECUTTER, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 11, 24, 60, 1 - -STONECUTTER, ACTION1, *, SOUTH_WEST = 11, 25, 0, 12 -STONECUTTER, ACTION1, *, WEST = 11, 25, 12, 12 -STONECUTTER, ACTION1, *, NORTH_WEST = 11, 25, 24, 12 -STONECUTTER, ACTION1, *, NORTH_EAST = 11, 25, 36, 12 -STONECUTTER, ACTION1, *, EAST = 11, 25, 48, 12 -STONECUTTER, ACTION1, *, SOUTH_EAST = 11, 25, 60, 12 - -STONECUTTER, WALKING, STONE, SOUTH_WEST = 11, 26, 0, 12 -STONECUTTER, WALKING, STONE, WEST = 11, 26, 12, 12 -STONECUTTER, WALKING, STONE, NORTH_WEST = 11, 26, 24, 12 -STONECUTTER, WALKING, STONE, NORTH_EAST = 11, 26, 36, 12 -STONECUTTER, WALKING, STONE, EAST = 11, 26, 48, 12 -STONECUTTER, WALKING, STONE, SOUTH_EAST = 11, 26, 60, 12 -STONECUTTER, NO_ACTION, STONE, SOUTH_WEST = 11, 26, 0, 1 -STONECUTTER, NO_ACTION, STONE, WEST = 11, 26, 12, 1 -STONECUTTER, NO_ACTION, STONE, NORTH_WEST = 11, 26, 24, 1 -STONECUTTER, NO_ACTION, STONE, NORTH_EAST = 11, 26, 36, 1 -STONECUTTER, NO_ACTION, STONE, EAST = 11, 26, 48, 1 -STONECUTTER, NO_ACTION, STONE, SOUTH_EAST = 11, 26, 60, 1 - -STONECUTTER, BEND_DOWN, STONE, SOUTH_WEST = 11, 27, 0, 4 -STONECUTTER, BEND_DOWN, STONE, WEST = 11, 27, 4, 4 -STONECUTTER, BEND_DOWN, STONE, NORTH_WEST = 11, 27, 8, 4 -STONECUTTER, BEND_DOWN, STONE, NORTH_EAST = 11, 27, 12, 4 -STONECUTTER, BEND_DOWN, STONE, EAST = 11, 27, 16, 4 -STONECUTTER, BEND_DOWN, STONE, SOUTH_EAST = 11, 27, 20, 4 - -STONECUTTER, RAISE_UP, *, SOUTH_WEST = 11, 28, 3, -4 -STONECUTTER, RAISE_UP, *, WEST = 11, 28, 7, -4 -STONECUTTER, RAISE_UP, *, NORTH_WEST = 11, 28, 11, -4 -STONECUTTER, RAISE_UP, *, NORTH_EAST = 11, 28, 15, -4 -STONECUTTER, RAISE_UP, *, EAST = 11, 28, 19, -4 -STONECUTTER, RAISE_UP, *, SOUTH_EAST = 11, 28, 23, -4 - -STONECUTTER, BEND_DOWN, *, SOUTH_WEST = 11, 28, 0, 4 -STONECUTTER, BEND_DOWN, *, WEST = 11, 28, 4, 4 -STONECUTTER, BEND_DOWN, *, NORTH_WEST = 11, 28, 8, 4 -STONECUTTER, BEND_DOWN, *, NORTH_EAST = 11, 28, 12, 4 -STONECUTTER, BEND_DOWN, *, EAST = 11, 28, 16, 4 -STONECUTTER, BEND_DOWN, *, SOUTH_EAST = 11, 28, 20, 4 - -STONECUTTER, RAISE_UP, STONE, SOUTH_WEST = 11, 27, 3, -4 -STONECUTTER, RAISE_UP, STONE, WEST = 11, 27, 7, -4 -STONECUTTER, RAISE_UP, STONE, NORTH_WEST = 11, 27, 11, -4 -STONECUTTER, RAISE_UP, STONE, NORTH_EAST = 11, 27, 15, -4 -STONECUTTER, RAISE_UP, STONE, EAST = 11, 27, 19, -4 -STONECUTTER, RAISE_UP, STONE, SOUTH_EAST = 11, 27, 23, -4 +SETTLER_MATERIAL(STONECUTTER, NO_MATERIAL, 11, 24) + +SETTLER_ACTION(STONECUTTER, ACTION1, *, 11, 25) + +SETTLER_MATERIAL(STONECUTTER, STONE, 11, 26) + +SETTLER_BEND(STONECUTTER, STONE, 11, 27) +SETTLER_MOVE(STONECUTTER, RAISE_UP, STONE, 11, 27) + +SETTLER_BEND(STONECUTTER, *, 11, 28) +SETTLER_MOVE(STONECUTTER, RAISE_UP, *, 11, 28) ### # STONECUTTER movables end ### @@ -802,40 +242,13 @@ STONECUTTER, RAISE_UP, STONE, SOUTH_EAST = 11, 27, 23, -4 ### # LUMBERJACK movables start ### -LUMBERJACK, WALKING, *, SOUTH_WEST = 11, 29, 0, 12 -LUMBERJACK, WALKING, *, WEST = 11, 29, 12, 12 -LUMBERJACK, WALKING, *, NORTH_WEST = 11, 29, 24, 12 -LUMBERJACK, WALKING, *, NORTH_EAST = 11, 29, 36, 12 -LUMBERJACK, WALKING, *, EAST = 11, 29, 48, 12 -LUMBERJACK, WALKING, *, SOUTH_EAST = 11, 29, 60, 12 -LUMBERJACK, NO_ACTION, *, SOUTH_WEST = 11, 29, 0, 1 -LUMBERJACK, NO_ACTION, *, WEST = 11, 29, 12, 1 -LUMBERJACK, NO_ACTION, *, NORTH_WEST = 11, 29, 24, 1 -LUMBERJACK, NO_ACTION, *, NORTH_EAST = 11, 29, 36, 1 -LUMBERJACK, NO_ACTION, *, EAST = 11, 29, 48, 1 -LUMBERJACK, NO_ACTION, *, SOUTH_EAST = 11, 29, 60, 1 +SETTLER_MATERIAL(LUMBERJACK, *, 11, 29) LUMBERJACK, ACTION1, NO_MATERIAL, * = 11, 30, 0, 12 -LUMBERJACK, WALKING, TRUNK, SOUTH_WEST = 11, 31, 0, 12 -LUMBERJACK, WALKING, TRUNK, WEST = 11, 31, 12, 12 -LUMBERJACK, WALKING, TRUNK, NORTH_WEST = 11, 31, 24, 12 -LUMBERJACK, WALKING, TRUNK, NORTH_EAST = 11, 31, 36, 12 -LUMBERJACK, WALKING, TRUNK, EAST = 11, 31, 48, 12 -LUMBERJACK, WALKING, TRUNK, SOUTH_EAST = 11, 31, 60, 12 -LUMBERJACK, NO_ACTION, TRUNK, SOUTH_WEST = 11, 31, 0, 1 -LUMBERJACK, NO_ACTION, TRUNK, WEST = 11, 31, 12, 1 -LUMBERJACK, NO_ACTION, TRUNK, NORTH_WEST = 11, 31, 24, 1 -LUMBERJACK, NO_ACTION, TRUNK, NORTH_EAST = 11, 31, 36, 1 -LUMBERJACK, NO_ACTION, TRUNK, EAST = 11, 31, 48, 1 -LUMBERJACK, NO_ACTION, TRUNK, SOUTH_EAST = 11, 31, 60, 1 - -LUMBERJACK, BEND_DOWN, *, SOUTH_WEST = 11, 33, 0, 4 -LUMBERJACK, BEND_DOWN, *, WEST = 11, 33, 4, 4 -LUMBERJACK, BEND_DOWN, *, NORTH_WEST = 11, 33, 8, 4 -LUMBERJACK, BEND_DOWN, *, NORTH_EAST = 11, 33, 12, 4 -LUMBERJACK, BEND_DOWN, *, EAST = 11, 33, 16, 4 -LUMBERJACK, BEND_DOWN, *, SOUTH_EAST = 11, 33, 20, 4 +SETTLER_MATERIAL(LUMBERJACK, TRUNK, 11, 31) + +SETTLER_BEND(LUMBERJACK, *, 11, 33) LUMBERJACK, RAISE_UP, TRUNK, SOUTH_WEST = 11, 32, 0, 4 LUMBERJACK, RAISE_UP, TRUNK, WEST = 11, 32, 4, 4 @@ -844,19 +257,8 @@ LUMBERJACK, RAISE_UP, TRUNK, NORTH_EAST = 11, 32, 12, 4 LUMBERJACK, RAISE_UP, TRUNK, EAST = 11, 32, 16, 4 LUMBERJACK, RAISE_UP, TRUNK, SOUTH_EAST = 11, 32, 20, 4 -LUMBERJACK, BEND_DOWN, TRUNK, SOUTH_WEST = 11, 32, 3, -4 -LUMBERJACK, BEND_DOWN, TRUNK, WEST = 11, 32, 7, -4 -LUMBERJACK, BEND_DOWN, TRUNK, NORTH_WEST = 11, 32, 11, -4 -LUMBERJACK, BEND_DOWN, TRUNK, NORTH_EAST = 11, 32, 15, -4 -LUMBERJACK, BEND_DOWN, TRUNK, EAST = 11, 32, 19, -4 -LUMBERJACK, BEND_DOWN, TRUNK, SOUTH_EAST = 11, 32, 23, -4 - -LUMBERJACK, RAISE_UP, *, SOUTH_WEST = 11, 33, 3, -4 -LUMBERJACK, RAISE_UP, *, WEST = 11, 33, 7, -4 -LUMBERJACK, RAISE_UP, *, NORTH_WEST = 11, 33, 11, -4 -LUMBERJACK, RAISE_UP, *, NORTH_EAST = 11, 33, 15, -4 -LUMBERJACK, RAISE_UP, *, EAST = 11, 33, 19, -4 -LUMBERJACK, RAISE_UP, *, SOUTH_EAST = 11, 33, 23, -4 +SETTLER_MOVE(LUMBERJACK, BEND_DOWN, TRUNK, 11, 32) +SETTLER_MOVE(LUMBERJACK, RAISE_UP, *, 11, 33) ### # LUMBERJACK movables end ### @@ -866,31 +268,8 @@ LUMBERJACK, RAISE_UP, *, SOUTH_EAST = 11, 33, 23, -4 ### # FORESTER movables start ### -FORESTER, WALKING, NO_MATERIAL, SOUTH_WEST = 11, 34, 0, 12 -FORESTER, WALKING, NO_MATERIAL, WEST = 11, 34, 12, 12 -FORESTER, WALKING, NO_MATERIAL, NORTH_WEST = 11, 34, 24, 12 -FORESTER, WALKING, NO_MATERIAL, NORTH_EAST = 11, 34, 36, 12 -FORESTER, WALKING, NO_MATERIAL, EAST = 11, 34, 48, 12 -FORESTER, WALKING, NO_MATERIAL, SOUTH_EAST = 11, 34, 60, 12 -FORESTER, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 11, 34, 0, 1 -FORESTER, NO_ACTION, NO_MATERIAL, WEST = 11, 34, 12, 1 -FORESTER, NO_ACTION, NO_MATERIAL, NORTH_WEST = 11, 34, 24, 1 -FORESTER, NO_ACTION, NO_MATERIAL, NORTH_EAST = 11, 34, 36, 1 -FORESTER, NO_ACTION, NO_MATERIAL, EAST = 11, 34, 48, 1 -FORESTER, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 11, 34, 60, 1 - -FORESTER, WALKING, TREE, SOUTH_WEST = 11, 35, 0, 12 -FORESTER, WALKING, TREE, WEST = 11, 35, 12, 12 -FORESTER, WALKING, TREE, NORTH_WEST = 11, 35, 24, 12 -FORESTER, WALKING, TREE, NORTH_EAST = 11, 35, 36, 12 -FORESTER, WALKING, TREE, EAST = 11, 35, 48, 12 -FORESTER, WALKING, TREE, SOUTH_EAST = 11, 35, 60, 12 -FORESTER, NO_ACTION, TREE, SOUTH_WEST = 11, 35, 0, 1 -FORESTER, NO_ACTION, TREE, WEST = 11, 35, 12, 1 -FORESTER, NO_ACTION, TREE, NORTH_WEST = 11, 35, 24, 1 -FORESTER, NO_ACTION, TREE, NORTH_EAST = 11, 35, 36, 1 -FORESTER, NO_ACTION, TREE, EAST = 11, 35, 48, 1 -FORESTER, NO_ACTION, TREE, SOUTH_EAST = 11, 35, 60, 1 +SETTLER_MATERIAL(FORESTER, NO_MATERIAL, 11, 34) +SETTLER_MATERIAL(FORESTER, TREE, 11, 35) FORESTER, ACTION1, *, SOUTH_WEST = 11, 36, 0, 27 FORESTER, ACTION1, *, WEST = 11, 36, 0, 27 @@ -907,18 +286,7 @@ FORESTER, ACTION1, *, NORTH_EAST = 11, 36, 27, 27 ### # GEOLOGIST movables start ### -GEOLOGIST, WALKING, NO_MATERIAL, SOUTH_WEST = 11, 37, 0, 12 -GEOLOGIST, WALKING, NO_MATERIAL, WEST = 11, 37, 12, 12 -GEOLOGIST, WALKING, NO_MATERIAL, NORTH_WEST = 11, 37, 24, 12 -GEOLOGIST, WALKING, NO_MATERIAL, NORTH_EAST = 11, 37, 36, 12 -GEOLOGIST, WALKING, NO_MATERIAL, EAST = 11, 37, 48, 12 -GEOLOGIST, WALKING, NO_MATERIAL, SOUTH_EAST = 11, 37, 60, 12 -GEOLOGIST, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 11, 37, 0, 1 -GEOLOGIST, NO_ACTION, NO_MATERIAL, WEST = 11, 37, 12, 1 -GEOLOGIST, NO_ACTION, NO_MATERIAL, NORTH_WEST = 11, 37, 24, 1 -GEOLOGIST, NO_ACTION, NO_MATERIAL, NORTH_EAST = 11, 37, 36, 1 -GEOLOGIST, NO_ACTION, NO_MATERIAL, EAST = 11, 37, 48, 1 -GEOLOGIST, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 11, 37, 60, 1 +SETTLER_MATERIAL(GEOLOGIST, NO_MATERIAL, 11, 37) # setting signs GEOLOGIST, ACTION2, NO_MATERIAL, * = 11, 38, 0, 16 @@ -934,18 +302,7 @@ GEOLOGIST, ACTION1, NO_MATERIAL, * = 11, 39, 0, 31 ### # SMITH movables start ### -SMITH, WALKING, NO_MATERIAL, SOUTH_WEST = 11, 40, 0, 12 -SMITH, WALKING, NO_MATERIAL, WEST = 11, 40, 12, 12 -SMITH, WALKING, NO_MATERIAL, NORTH_WEST = 11, 40, 24, 12 -SMITH, WALKING, NO_MATERIAL, NORTH_EAST = 11, 40, 36, 12 -SMITH, WALKING, NO_MATERIAL, EAST = 11, 40, 48, 12 -SMITH, WALKING, NO_MATERIAL, SOUTH_EAST = 11, 40, 60, 12 -SMITH, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 11, 40, 0, 1 -SMITH, NO_ACTION, NO_MATERIAL, WEST = 11, 40, 12, 1 -SMITH, NO_ACTION, NO_MATERIAL, NORTH_WEST = 11, 40, 24, 1 -SMITH, NO_ACTION, NO_MATERIAL, NORTH_EAST = 11, 40, 36, 1 -SMITH, NO_ACTION, NO_MATERIAL, EAST = 11, 40, 48, 1 -SMITH, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 11, 40, 60, 1 +SETTLER_MATERIAL(SMITH, NO_MATERIAL, 11, 40) # action 3 is only smoke - the smith is standing still SMITH, ACTION3, NO_MATERIAL, SOUTH_WEST = 11, 40, 0, 1 @@ -961,25 +318,9 @@ SMITH, RAISE_UP, *, NORTH_WEST = 11, 41, 3, -4 SMITH, BEND_DOWN, *, NORTH_EAST = 11, 42, 0, 4 SMITH, RAISE_UP, *, NORTH_EAST = 11, 42, 3, -4 -SMITH, WALKING, IRON, SOUTH_WEST = 11, 43, 0, 12 -SMITH, WALKING, IRON, WEST = 11, 43, 12, 12 -SMITH, WALKING, IRON, NORTH_WEST = 11, 43, 24, 12 -SMITH, WALKING, IRON, NORTH_EAST = 11, 43, 36, 12 -SMITH, WALKING, IRON, EAST = 11, 43, 48, 12 -SMITH, WALKING, IRON, SOUTH_EAST = 11, 43, 60, 12 -SMITH, NO_ACTION, IRON, SOUTH_WEST = 11, 43, 0, 1 -SMITH, NO_ACTION, IRON, WEST = 11, 43, 12, 1 -SMITH, NO_ACTION, IRON, NORTH_WEST = 11, 43, 24, 1 -SMITH, NO_ACTION, IRON, NORTH_EAST = 11, 43, 36, 1 -SMITH, NO_ACTION, IRON, EAST = 11, 43, 48, 1 -SMITH, NO_ACTION, IRON, SOUTH_EAST = 11, 43, 60, 1 - -SMITH, WALKING, COAL, SOUTH_WEST = 11, 40, 0, 12 -SMITH, WALKING, COAL, WEST = 11, 40, 12, 12 -SMITH, WALKING, COAL, NORTH_WEST = 11, 40, 24, 12 -SMITH, WALKING, COAL, NORTH_EAST = 11, 40, 36, 12 -SMITH, WALKING, COAL, EAST = 11, 40, 48, 12 -SMITH, WALKING, COAL, SOUTH_EAST = 11, 40, 60, 12 +SETTLER_MATERIAL(SMITH, IRON, 11, 43) + +SETTLER_ACTION(SMITH, WALKING, COAL, 11, 40) # move iron in the fire - not used in the original game SMITH, ACTION2, *, NORTH_WEST = 11, 44, 0, 8 @@ -987,18 +328,7 @@ SMITH, ACTION2, *, NORTH_WEST = 11, 44, 7, -8 SMITH, ACTION2, *, NORTH_EAST = 11, 45, 0, 8 SMITH, ACTION2, *, NORTH_EAST = 11, 45, 7, -8 -SMITH, WALKING, SWORD, SOUTH_WEST = 11, 46, 0, 12 -SMITH, WALKING, SWORD, WEST = 11, 46, 12, 12 -SMITH, WALKING, SWORD, NORTH_WEST = 11, 46, 24, 12 -SMITH, WALKING, SWORD, NORTH_EAST = 11, 46, 36, 12 -SMITH, WALKING, SWORD, EAST = 11, 46, 48, 12 -SMITH, WALKING, SWORD, SOUTH_EAST = 11, 46, 60, 12 -SMITH, NO_ACTION, SWORD, SOUTH_WEST = 11, 46, 0, 1 -SMITH, NO_ACTION, SWORD, WEST = 11, 46, 12, 1 -SMITH, NO_ACTION, SWORD, NORTH_WEST = 11, 46, 24, 1 -SMITH, NO_ACTION, SWORD, NORTH_EAST = 11, 46, 36, 1 -SMITH, NO_ACTION, SWORD, EAST = 11, 46, 48, 1 -SMITH, NO_ACTION, SWORD, SOUTH_EAST = 11, 46, 60, 1 +SETTLER_MATERIAL(SMITH, SWORD, 11, 46) # hammering at the anvil SMITH, ACTION1, *, NORTH_WEST = 11, 47, 0, 12 @@ -1012,79 +342,23 @@ SMITH, ACTION1, *, NORTH_EAST = 11, 48, 0, 12 ### # MINER movables start ### -MINER, WALKING, COAL, SOUTH_WEST = 11, 49, 0, 12 -MINER, WALKING, COAL, WEST = 11, 49, 12, 12 -MINER, WALKING, COAL, NORTH_WEST = 11, 49, 24, 12 -MINER, WALKING, COAL, NORTH_EAST = 11, 49, 36, 12 -MINER, WALKING, COAL, EAST = 11, 49, 48, 12 -MINER, WALKING, COAL, SOUTH_EAST = 11, 49, 60, 12 -MINER, NO_ACTION, COAL, SOUTH_WEST = 11, 49, 0, 1 -MINER, NO_ACTION, COAL, WEST = 11, 49, 12, 1 -MINER, NO_ACTION, COAL, NORTH_WEST = 11, 49, 24, 1 -MINER, NO_ACTION, COAL, NORTH_EAST = 11, 49, 36, 1 -MINER, NO_ACTION, COAL, EAST = 11, 49, 48, 1 -MINER, NO_ACTION, COAL, SOUTH_EAST = 11, 49, 60, 1 +SETTLER_MATERIAL(MINER, COAL, 11, 49) # SOUTH_WEST animation only MINER, BEND_DOWN, COAL, * = 11, 50, 0, 10 -MINER, WALKING, GOLDORE, SOUTH_WEST = 11, 51, 0, 12 -MINER, WALKING, GOLDORE, WEST = 11, 51, 12, 12 -MINER, WALKING, GOLDORE, NORTH_WEST = 11, 51, 24, 12 -MINER, WALKING, GOLDORE, NORTH_EAST = 11, 51, 36, 12 -MINER, WALKING, GOLDORE, EAST = 11, 51, 48, 12 -MINER, WALKING, GOLDORE, SOUTH_EAST = 11, 51, 60, 12 -MINER, NO_ACTION, GOLDORE, SOUTH_WEST = 11, 51, 0, 1 -MINER, NO_ACTION, GOLDORE, WEST = 11, 51, 12, 1 -MINER, NO_ACTION, GOLDORE, NORTH_WEST = 11, 51, 24, 1 -MINER, NO_ACTION, GOLDORE, NORTH_EAST = 11, 51, 36, 1 -MINER, NO_ACTION, GOLDORE, EAST = 11, 51, 48, 1 -MINER, NO_ACTION, GOLDORE, SOUTH_EAST = 11, 51, 60, 1 +SETTLER_MATERIAL(MINER, GOLDORE, 11, 51) # SOUTH_WEST animation only MINER, BEND_DOWN, GOLDORE, * = 11, 52, 0, 10 -MINER, WALKING, IRONORE, SOUTH_WEST = 11, 53, 0, 12 -MINER, WALKING, IRONORE, WEST = 11, 53, 12, 12 -MINER, WALKING, IRONORE, NORTH_WEST = 11, 53, 24, 12 -MINER, WALKING, IRONORE, NORTH_EAST = 11, 53, 36, 12 -MINER, WALKING, IRONORE, EAST = 11, 53, 48, 12 -MINER, WALKING, IRONORE, SOUTH_EAST = 11, 53, 60, 12 -MINER, NO_ACTION, IRONORE, SOUTH_WEST = 11, 53, 0, 1 -MINER, NO_ACTION, IRONORE, WEST = 11, 53, 12, 1 -MINER, NO_ACTION, IRONORE, NORTH_WEST = 11, 53, 24, 1 -MINER, NO_ACTION, IRONORE, NORTH_EAST = 11, 53, 36, 1 -MINER, NO_ACTION, IRONORE, EAST = 11, 53, 48, 1 -MINER, NO_ACTION, IRONORE, SOUTH_EAST = 11, 53, 60, 1 +SETTLER_MATERIAL(MINER, IRONORE, 11, 53) # SOUTH_WEST animation only MINER, BEND_DOWN, IRONORE, * = 11, 54, 0, 10 -MINER, WALKING, NO_MATERIAL, SOUTH_WEST = 11, 55, 0, 12 -MINER, WALKING, NO_MATERIAL, WEST = 11, 55, 12, 12 -MINER, WALKING, NO_MATERIAL, NORTH_WEST = 11, 55, 24, 12 -MINER, WALKING, NO_MATERIAL, NORTH_EAST = 11, 55, 36, 12 -MINER, WALKING, NO_MATERIAL, EAST = 11, 55, 48, 12 -MINER, WALKING, NO_MATERIAL, SOUTH_EAST = 11, 55, 60, 12 -MINER, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 11, 55, 0, 1 -MINER, NO_ACTION, NO_MATERIAL, WEST = 11, 55, 12, 1 -MINER, NO_ACTION, NO_MATERIAL, NORTH_WEST = 11, 55, 24, 1 -MINER, NO_ACTION, NO_MATERIAL, NORTH_EAST = 11, 55, 36, 1 -MINER, NO_ACTION, NO_MATERIAL, EAST = 11, 55, 48, 1 -MINER, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 11, 55, 60, 1 - -MINER, WALKING, BASKET, SOUTH_WEST = 11, 56, 0, 12 -MINER, WALKING, BASKET, WEST = 11, 56, 12, 12 -MINER, WALKING, BASKET, NORTH_WEST = 11, 56, 24, 12 -MINER, WALKING, BASKET, NORTH_EAST = 11, 56, 36, 12 -MINER, WALKING, BASKET, EAST = 11, 56, 48, 12 -MINER, WALKING, BASKET, SOUTH_EAST = 11, 56, 60, 12 -MINER, NO_ACTION, BASKET, SOUTH_WEST = 11, 56, 0, 1 -MINER, NO_ACTION, BASKET, WEST = 11, 56, 12, 1 -MINER, NO_ACTION, BASKET, NORTH_WEST = 11, 56, 24, 1 -MINER, NO_ACTION, BASKET, NORTH_EAST = 11, 56, 36, 1 -MINER, NO_ACTION, BASKET, EAST = 11, 56, 48, 1 -MINER, NO_ACTION, BASKET, SOUTH_EAST = 11, 56, 60, 1 +SETTLER_MATERIAL(MINER, NO_MATERIAL, 11, 55) +SETTLER_MATERIAL(MINER, BASKET, 11, 56) # SOUTH_WEST animation only MINER, ACTION1, BASKET, * = 11, 57, 0, 32 @@ -1102,67 +376,22 @@ MINER, ACTION2, NO_MATERIAL, NORTH_EAST = 11, 203, 0, 24 ### # MELTER movables start ### -MELTER, WALKING, GOLDORE, SOUTH_WEST = 11, 58, 0, 12 -MELTER, WALKING, GOLDORE, WEST = 11, 58, 12, 12 -MELTER, WALKING, GOLDORE, NORTH_WEST = 11, 58, 24, 12 -MELTER, WALKING, GOLDORE, NORTH_EAST = 11, 58, 36, 12 -MELTER, WALKING, GOLDORE, EAST = 11, 58, 48, 12 -MELTER, WALKING, GOLDORE, SOUTH_EAST = 11, 58, 60, 12 -MELTER, NO_ACTION, GOLDORE, SOUTH_WEST = 11, 58, 0, 1 -MELTER, NO_ACTION, GOLDORE, WEST = 11, 58, 12, 1 -MELTER, NO_ACTION, GOLDORE, NORTH_WEST = 11, 58, 24, 1 -MELTER, NO_ACTION, GOLDORE, NORTH_EAST = 11, 58, 36, 1 -MELTER, NO_ACTION, GOLDORE, EAST = 11, 58, 48, 1 -MELTER, NO_ACTION, GOLDORE, SOUTH_EAST = 11, 58, 60, 1 +SETTLER_MATERIAL(MELTER, GOLDORE, 11, 58) MELTER, BEND_DOWN, GOLDORE, NORTH_WEST = 11, 59, 0, 4 MELTER, RAISE_UP, GOLDORE, NORTH_WEST = 11, 59, 3, -4 MELTER, BEND_DOWN, GOLDORE, NORTH_EAST = 11, 60, 0, 4 MELTER, RAISE_UP, GOLDORE, NORTH_EAST = 11, 60, 3, -4 -MELTER, WALKING, GOLD, SOUTH_WEST = 11, 61, 0, 12 -MELTER, WALKING, GOLD, WEST = 11, 61, 12, 12 -MELTER, WALKING, GOLD, NORTH_WEST = 11, 61, 24, 12 -MELTER, WALKING, GOLD, NORTH_EAST = 11, 61, 36, 12 -MELTER, WALKING, GOLD, EAST = 11, 61, 48, 12 -MELTER, WALKING, GOLD, SOUTH_EAST = 11, 61, 60, 12 -MELTER, NO_ACTION, GOLD, SOUTH_WEST = 11, 61, 0, 1 -MELTER, NO_ACTION, GOLD, WEST = 11, 61, 12, 1 -MELTER, NO_ACTION, GOLD, NORTH_WEST = 11, 61, 24, 1 -MELTER, NO_ACTION, GOLD, NORTH_EAST = 11, 61, 36, 1 -MELTER, NO_ACTION, GOLD, EAST = 11, 61, 48, 1 -MELTER, NO_ACTION, GOLD, SOUTH_EAST = 11, 61, 60, 1 - -MELTER, WALKING, IRONORE, SOUTH_WEST = 11, 62, 0, 12 -MELTER, WALKING, IRONORE, WEST = 11, 62, 12, 12 -MELTER, WALKING, IRONORE, NORTH_WEST = 11, 62, 24, 12 -MELTER, WALKING, IRONORE, NORTH_EAST = 11, 62, 36, 12 -MELTER, WALKING, IRONORE, EAST = 11, 62, 48, 12 -MELTER, WALKING, IRONORE, SOUTH_EAST = 11, 62, 60, 12 -MELTER, NO_ACTION, IRONORE, SOUTH_WEST = 11, 62, 0, 1 -MELTER, NO_ACTION, IRONORE, WEST = 11, 62, 12, 1 -MELTER, NO_ACTION, IRONORE, NORTH_WEST = 11, 62, 24, 1 -MELTER, NO_ACTION, IRONORE, NORTH_EAST = 11, 62, 36, 1 -MELTER, NO_ACTION, IRONORE, EAST = 11, 62, 48, 1 -MELTER, NO_ACTION, IRONORE, SOUTH_EAST = 11, 62, 60, 1 +SETTLER_MATERIAL(MELTER, GOLD, 11, 61) +SETTLER_MATERIAL(MELTER, IRONORE, 11, 62) MELTER, BEND_DOWN, IRONORE, NORTH_WEST = 11, 63, 0, 4 MELTER, RAISE_UP, IRONORE, NORTH_WEST = 11, 63, 3, -4 MELTER, BEND_DOWN, IRONORE, NORTH_EAST = 11, 64, 0, 4 MELTER, RAISE_UP, IRONORE, NORTH_EAST = 11, 64, 3, -4 -MELTER, WALKING, NO_MATERIAL, SOUTH_WEST = 11, 65, 0, 12 -MELTER, WALKING, NO_MATERIAL, WEST = 11, 65, 12, 12 -MELTER, WALKING, NO_MATERIAL, NORTH_WEST = 11, 65, 24, 12 -MELTER, WALKING, NO_MATERIAL, NORTH_EAST = 11, 65, 36, 12 -MELTER, WALKING, NO_MATERIAL, EAST = 11, 65, 48, 12 -MELTER, WALKING, NO_MATERIAL, SOUTH_EAST = 11, 65, 60, 12 -MELTER, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 11, 65, 0, 1 -MELTER, NO_ACTION, NO_MATERIAL, WEST = 11, 65, 12, 1 -MELTER, NO_ACTION, NO_MATERIAL, NORTH_WEST = 11, 65, 24, 1 -MELTER, NO_ACTION, NO_MATERIAL, NORTH_EAST = 11, 65, 36, 1 -MELTER, NO_ACTION, NO_MATERIAL, EAST = 11, 65, 48, 1 -MELTER, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 11, 65, 60, 1 +SETTLER_MATERIAL(MELTER, NO_MATERIAL, 11, 65) MELTER, BEND_DOWN, *, NORTH_WEST = 11, 66, 0, 4 MELTER, RAISE_UP, *, NORTH_WEST = 11, 66, 3, -4 @@ -1171,31 +400,8 @@ MELTER, RAISE_UP, *, NORTH_EAST = 11, 67, 3, -4 MELTER, ACTION1, *, NORTH_WEST = 11, 66, 0, 1 MELTER, ACTION1, *, NORTH_EAST = 11, 67, 0, 1 -MELTER, WALKING, IRON, SOUTH_WEST = 11, 68, 0, 12 -MELTER, WALKING, IRON, WEST = 11, 68, 12, 12 -MELTER, WALKING, IRON, NORTH_WEST = 11, 68, 24, 12 -MELTER, WALKING, IRON, NORTH_EAST = 11, 68, 36, 12 -MELTER, WALKING, IRON, EAST = 11, 68, 48, 12 -MELTER, WALKING, IRON, SOUTH_EAST = 11, 68, 60, 12 -MELTER, NO_ACTION, IRON, SOUTH_WEST = 11, 68, 0, 1 -MELTER, NO_ACTION, IRON, WEST = 11, 68, 12, 1 -MELTER, NO_ACTION, IRON, NORTH_WEST = 11, 68, 24, 1 -MELTER, NO_ACTION, IRON, NORTH_EAST = 11, 68, 36, 1 -MELTER, NO_ACTION, IRON, EAST = 11, 68, 48, 1 -MELTER, NO_ACTION, IRON, SOUTH_EAST = 11, 68, 60, 1 - -MELTER, WALKING, COAL, SOUTH_WEST = 11, 122, 0, 12 -MELTER, WALKING, COAL, WEST = 11, 122, 12, 12 -MELTER, WALKING, COAL, NORTH_WEST = 11, 122, 24, 12 -MELTER, WALKING, COAL, NORTH_EAST = 11, 122, 36, 12 -MELTER, WALKING, COAL, EAST = 11, 122, 48, 12 -MELTER, WALKING, COAL, SOUTH_EAST = 11, 122, 60, 12 -MELTER, NO_ACTION, COAL, SOUTH_WEST = 11, 122, 0, 1 -MELTER, NO_ACTION, COAL, WEST = 11, 122, 12, 1 -MELTER, NO_ACTION, COAL, NORTH_WEST = 11, 122, 24, 1 -MELTER, NO_ACTION, COAL, NORTH_EAST = 11, 122, 36, 1 -MELTER, NO_ACTION, COAL, EAST = 11, 122, 48, 1 -MELTER, NO_ACTION, COAL, SOUTH_EAST = 11, 122, 60, 1 +SETTLER_MATERIAL(MELTER, IRON, 11, 68) +SETTLER_MATERIAL(MELTER, COAL, 11, 122) MELTER, BEND_DOWN, COAL, NORTH_WEST = 11, 123, 0, 4 MELTER, RAISE_UP, COAL, NORTH_WEST = 11, 123, 3, -4 @@ -1210,18 +416,7 @@ MELTER, RAISE_UP, COAL, NORTH_EAST = 11, 124, 3, -4 ### # MILLER movables start ### -MILLER, WALKING, NO_MATERIAL, SOUTH_WEST = 11, 69, 0, 12 -MILLER, WALKING, NO_MATERIAL, WEST = 11, 69, 12, 12 -MILLER, WALKING, NO_MATERIAL, NORTH_WEST = 11, 69, 24, 12 -MILLER, WALKING, NO_MATERIAL, NORTH_EAST = 11, 69, 36, 12 -MILLER, WALKING, NO_MATERIAL, EAST = 11, 69, 48, 12 -MILLER, WALKING, NO_MATERIAL, SOUTH_EAST = 11, 69, 60, 12 -MILLER, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 11, 69, 0, 1 -MILLER, NO_ACTION, NO_MATERIAL, WEST = 11, 69, 12, 1 -MILLER, NO_ACTION, NO_MATERIAL, NORTH_WEST = 11, 69, 24, 1 -MILLER, NO_ACTION, NO_MATERIAL, NORTH_EAST = 11, 69, 36, 1 -MILLER, NO_ACTION, NO_MATERIAL, EAST = 11, 69, 48, 1 -MILLER, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 11, 69, 60, 1 +SETTLER_MATERIAL(MILLER, NO_MATERIAL, 11, 69) MILLER, BEND_DOWN, NO_MATERIAL, NORTH_WEST = 11, 70, 0, 4 MILLER, RAISE_UP, NO_MATERIAL, NORTH_WEST = 11, 70, 3, -4 @@ -1233,31 +428,8 @@ MILLER, BEND_DOWN, CROP, NORTH_WEST = 11, 72, 3, -4 MILLER, RAISE_UP, CROP, NORTH_EAST = 11, 73, 0, 4 MILLER, BEND_DOWN, CROP, NORTH_EAST = 11, 73, 3, -4 -MILLER, WALKING, CROP, SOUTH_WEST = 11, 74, 0, 12 -MILLER, WALKING, CROP, WEST = 11, 74, 12, 12 -MILLER, WALKING, CROP, NORTH_WEST = 11, 74, 24, 12 -MILLER, WALKING, CROP, NORTH_EAST = 11, 74, 36, 12 -MILLER, WALKING, CROP, EAST = 11, 74, 48, 12 -MILLER, WALKING, CROP, SOUTH_EAST = 11, 74, 60, 12 -MILLER, NO_ACTION, CROP, SOUTH_WEST = 11, 74, 0, 1 -MILLER, NO_ACTION, CROP, WEST = 11, 74, 12, 1 -MILLER, NO_ACTION, CROP, NORTH_WEST = 11, 74, 24, 1 -MILLER, NO_ACTION, CROP, NORTH_EAST = 11, 74, 36, 1 -MILLER, NO_ACTION, CROP, EAST = 11, 74, 48, 1 -MILLER, NO_ACTION, CROP, SOUTH_EAST = 11, 74, 60, 1 - -MILLER, WALKING, FLOUR, SOUTH_WEST = 11, 75, 0, 12 -MILLER, WALKING, FLOUR, WEST = 11, 75, 12, 12 -MILLER, WALKING, FLOUR, NORTH_WEST = 11, 75, 24, 12 -MILLER, WALKING, FLOUR, NORTH_EAST = 11, 75, 36, 12 -MILLER, WALKING, FLOUR, EAST = 11, 75, 48, 12 -MILLER, WALKING, FLOUR, SOUTH_EAST = 11, 75, 60, 12 -MILLER, NO_ACTION, FLOUR, SOUTH_WEST = 11, 75, 0, 1 -MILLER, NO_ACTION, FLOUR, WEST = 11, 75, 12, 1 -MILLER, NO_ACTION, FLOUR, NORTH_WEST = 11, 75, 24, 1 -MILLER, NO_ACTION, FLOUR, NORTH_EAST = 11, 75, 36, 1 -MILLER, NO_ACTION, FLOUR, EAST = 11, 75, 48, 1 -MILLER, NO_ACTION, FLOUR, SOUTH_EAST = 11, 75, 60, 1 +SETTLER_MATERIAL(MILLER, CROP, 11, 74) +SETTLER_MATERIAL(MILLER, FLOUR, 11, 75) MILLER, BEND_DOWN, FLOUR, NORTH_WEST = 11, 76, 0, 4 MILLER, RAISE_UP, FLOUR, NORTH_WEST = 11, 76, 3, -4 @@ -1272,54 +444,21 @@ MILLER, RAISE_UP, FLOUR, NORTH_EAST = 11, 77, 3, -4 ### # SLAUGHTERER movables start ### -SLAUGHTERER, WALKING, NO_MATERIAL, SOUTH_WEST = 11, 78, 0, 12 -SLAUGHTERER, WALKING, NO_MATERIAL, WEST = 11, 78, 12, 12 -SLAUGHTERER, WALKING, NO_MATERIAL, NORTH_WEST = 11, 78, 24, 12 -SLAUGHTERER, WALKING, NO_MATERIAL, NORTH_EAST = 11, 78, 36, 12 -SLAUGHTERER, WALKING, NO_MATERIAL, EAST = 11, 78, 48, 12 -SLAUGHTERER, WALKING, NO_MATERIAL, SOUTH_EAST = 11, 78, 60, 12 -SLAUGHTERER, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 11, 78, 0, 1 -SLAUGHTERER, NO_ACTION, NO_MATERIAL, WEST = 11, 78, 12, 1 -SLAUGHTERER, NO_ACTION, NO_MATERIAL, NORTH_WEST = 11, 78, 24, 1 -SLAUGHTERER, NO_ACTION, NO_MATERIAL, NORTH_EAST = 11, 78, 36, 1 -SLAUGHTERER, NO_ACTION, NO_MATERIAL, EAST = 11, 78, 48, 1 -SLAUGHTERER, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 11, 78, 60, 1 +SETTLER_MATERIAL(SLAUGHTERER, NO_MATERIAL, 11, 78) SLAUGHTERER, BEND_DOWN, *, NORTH_WEST = 11, 79, 0, 4 SLAUGHTERER, RAISE_UP, *, NORTH_WEST = 11, 79, 3, -4 SLAUGHTERER, BEND_DOWN, *, NORTH_EAST = 11, 80, 0, 4 SLAUGHTERER, RAISE_UP, *, NORTH_EAST = 11, 80, 3, -4 -SLAUGHTERER, WALKING, MEAT, SOUTH_WEST = 11, 81, 0, 12 -SLAUGHTERER, WALKING, MEAT, WEST = 11, 81, 12, 12 -SLAUGHTERER, WALKING, MEAT, NORTH_WEST = 11, 81, 24, 12 -SLAUGHTERER, WALKING, MEAT, NORTH_EAST = 11, 81, 36, 12 -SLAUGHTERER, WALKING, MEAT, EAST = 11, 81, 48, 12 -SLAUGHTERER, WALKING, MEAT, SOUTH_EAST = 11, 81, 60, 12 -SLAUGHTERER, NO_ACTION, MEAT, SOUTH_WEST = 11, 81, 0, 1 -SLAUGHTERER, NO_ACTION, MEAT, WEST = 11, 81, 12, 1 -SLAUGHTERER, NO_ACTION, MEAT, NORTH_WEST = 11, 81, 24, 1 -SLAUGHTERER, NO_ACTION, MEAT, NORTH_EAST = 11, 81, 36, 1 -SLAUGHTERER, NO_ACTION, MEAT, EAST = 11, 81, 48, 1 -SLAUGHTERER, NO_ACTION, MEAT, SOUTH_EAST = 11, 81, 60, 1 +SETTLER_MATERIAL(SLAUGHTERER, MEAT, 11, 81) SLAUGHTERER, BEND_DOWN, MEAT, NORTH_WEST = 11, 82, 0, 4 SLAUGHTERER, RAISE_UP, MEAT, NORTH_WEST = 11, 82, 3, -4 SLAUGHTERER, BEND_DOWN, MEAT, NORTH_EAST = 11, 83, 0, 4 SLAUGHTERER, RAISE_UP, MEAT, NORTH_EAST = 11, 83, 3, -4 -SLAUGHTERER, WALKING, PIG, SOUTH_WEST = 11, 84, 0, 12 -SLAUGHTERER, WALKING, PIG, WEST = 11, 84, 12, 12 -SLAUGHTERER, WALKING, PIG, NORTH_WEST = 11, 84, 24, 12 -SLAUGHTERER, WALKING, PIG, NORTH_EAST = 11, 84, 36, 12 -SLAUGHTERER, WALKING, PIG, EAST = 11, 84, 48, 12 -SLAUGHTERER, WALKING, PIG, SOUTH_EAST = 11, 84, 60, 12 -SLAUGHTERER, NO_ACTION, PIG, SOUTH_WEST = 11, 84, 0, 1 -SLAUGHTERER, NO_ACTION, PIG, WEST = 11, 84, 12, 1 -SLAUGHTERER, NO_ACTION, PIG, NORTH_WEST = 11, 84, 24, 1 -SLAUGHTERER, NO_ACTION, PIG, NORTH_EAST = 11, 84, 36, 1 -SLAUGHTERER, NO_ACTION, PIG, EAST = 11, 84, 48, 1 -SLAUGHTERER, NO_ACTION, PIG, SOUTH_EAST = 11, 84, 60, 1 +SETTLER_MATERIAL(SLAUGHTERER, PIG, 11, 84) SLAUGHTERER, BEND_DOWN, PIG, NORTH_WEST = 11, 85, 0, 4 SLAUGHTERER, RAISE_UP, PIG, NORTH_WEST = 11, 85, 3, -4 @@ -1334,54 +473,21 @@ SLAUGHTERER, RAISE_UP, PIG, NORTH_EAST = 11, 86, 3, -4 ### # FARMER movables start ### -FARMER, WALKING, CROP, SOUTH_WEST = 11, 87, 0, 12 -FARMER, WALKING, CROP, WEST = 11, 87, 12, 12 -FARMER, WALKING, CROP, NORTH_WEST = 11, 87, 24, 12 -FARMER, WALKING, CROP, NORTH_EAST = 11, 87, 36, 12 -FARMER, WALKING, CROP, EAST = 11, 87, 48, 12 -FARMER, WALKING, CROP, SOUTH_EAST = 11, 87, 60, 12 -FARMER, NO_ACTION, CROP, SOUTH_WEST = 11, 87, 0, 1 -FARMER, NO_ACTION, CROP, WEST = 11, 87, 12, 1 -FARMER, NO_ACTION, CROP, NORTH_WEST = 11, 87, 24, 1 -FARMER, NO_ACTION, CROP, NORTH_EAST = 11, 87, 36, 1 -FARMER, NO_ACTION, CROP, EAST = 11, 87, 48, 1 -FARMER, NO_ACTION, CROP, SOUTH_EAST = 11, 87, 60, 1 +SETTLER_MATERIAL(FARMER, CROP, 11, 87) FARMER, RAISE_UP, CROP, NORTH_WEST = 11, 88, 0, 4 FARMER, BEND_DOWN, CROP, NORTH_WEST = 11, 88, 3, -4 FARMER, RAISE_UP, CROP, NORTH_EAST = 11, 89, 0, 4 FARMER, BEND_DOWN, CROP, NORTH_EAST = 11, 89, 3, -4 -FARMER, WALKING, NO_MATERIAL, SOUTH_WEST = 11, 90, 0, 13 -FARMER, WALKING, NO_MATERIAL, WEST = 11, 90, 13, 13 -FARMER, WALKING, NO_MATERIAL, NORTH_WEST = 11, 90, 26, 13 -FARMER, WALKING, NO_MATERIAL, NORTH_EAST = 11, 90, 39, 13 -FARMER, WALKING, NO_MATERIAL, EAST = 11, 90, 52, 13 -FARMER, WALKING, NO_MATERIAL, SOUTH_EAST = 11, 90, 65, 13 -FARMER, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 11, 90, 0, 1 -FARMER, NO_ACTION, NO_MATERIAL, WEST = 11, 90, 13, 1 -FARMER, NO_ACTION, NO_MATERIAL, NORTH_WEST = 11, 90, 26, 1 -FARMER, NO_ACTION, NO_MATERIAL, NORTH_EAST = 11, 90, 39, 1 -FARMER, NO_ACTION, NO_MATERIAL, EAST = 11, 90, 52, 1 -FARMER, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 11, 90, 65, 1 +SETTLER_MATERIAL(FARMER, NO_MATERIAL, 11, 90) FARMER, BEND_DOWN, NO_MATERIAL, NORTH_WEST = 11, 91, 0, 4 FARMER, RAISE_UP, NO_MATERIAL, NORTH_WEST = 11, 91, 3, -4 FARMER, BEND_DOWN, NO_MATERIAL, NORTH_EAST = 11, 92, 0, 4 FARMER, RAISE_UP, NO_MATERIAL, NORTH_EAST = 11, 92, 3, -4 -FARMER, WALKING, PLANT, SOUTH_WEST = 11, 93, 0, 12 -FARMER, WALKING, PLANT, WEST = 11, 93, 12, 12 -FARMER, WALKING, PLANT, NORTH_WEST = 11, 93, 24, 12 -FARMER, WALKING, PLANT, NORTH_EAST = 11, 93, 36, 12 -FARMER, WALKING, PLANT, EAST = 11, 93, 48, 12 -FARMER, WALKING, PLANT, SOUTH_EAST = 11, 93, 60, 12 -FARMER, NO_ACTION, PLANT, SOUTH_WEST = 11, 93, 0, 1 -FARMER, NO_ACTION, PLANT, WEST = 11, 93, 12, 1 -FARMER, NO_ACTION, PLANT, NORTH_WEST = 11, 93, 24, 1 -FARMER, NO_ACTION, PLANT, NORTH_EAST = 11, 93, 36, 1 -FARMER, NO_ACTION, PLANT, EAST = 11, 93, 48, 1 -FARMER, NO_ACTION, PLANT, SOUTH_EAST = 11, 93, 60, 1 +SETTLER_MATERIAL(FARMER, PLANT, 11, 93) # sows the seeds FARMER, ACTION2, *, SOUTH_WEST = 11, 94, 0, 12 @@ -1389,18 +495,7 @@ FARMER, ACTION2, *, NORTH_WEST = 11, 95, 0, 12 FARMER, ACTION2, *, NORTH_EAST = 11, 96, 0, 12 FARMER, ACTION2, *, SOUTH_EAST = 11, 97, 0, 12 -FARMER, WALKING, SCYTHE, SOUTH_WEST = 11, 98, 0, 12 -FARMER, WALKING, SCYTHE, WEST = 11, 98, 12, 12 -FARMER, WALKING, SCYTHE, NORTH_WEST = 11, 98, 24, 12 -FARMER, WALKING, SCYTHE, NORTH_EAST = 11, 98, 36, 12 -FARMER, WALKING, SCYTHE, EAST = 11, 98, 48, 12 -FARMER, WALKING, SCYTHE, SOUTH_EAST = 11, 98, 60, 12 -FARMER, NO_ACTION, SCYTHE, SOUTH_WEST = 11, 98, 0, 1 -FARMER, NO_ACTION, SCYTHE, WEST = 11, 98, 12, 1 -FARMER, NO_ACTION, SCYTHE, NORTH_WEST = 11, 98, 24, 1 -FARMER, NO_ACTION, SCYTHE, NORTH_EAST = 11, 98, 36, 1 -FARMER, NO_ACTION, SCYTHE, EAST = 11, 98, 48, 1 -FARMER, NO_ACTION, SCYTHE, SOUTH_EAST = 11, 98, 60, 1 +SETTLER_MATERIAL(FARMER, SCYTHE, 11, 98) # cut FARMER, ACTION1, *, SOUTH_WEST = 11, 99, 0, 12 @@ -1416,18 +511,7 @@ FARMER, ACTION1, *, SOUTH_EAST = 11, 99, 36, 12 ### # FISHERMAN movables start ### -FISHERMAN, WALKING, NO_MATERIAL, SOUTH_WEST = 11, 100, 0, 12 -FISHERMAN, WALKING, NO_MATERIAL, WEST = 11, 100, 12, 12 -FISHERMAN, WALKING, NO_MATERIAL, NORTH_WEST = 11, 100, 24, 12 -FISHERMAN, WALKING, NO_MATERIAL, NORTH_EAST = 11, 100, 36, 12 -FISHERMAN, WALKING, NO_MATERIAL, EAST = 11, 100, 48, 12 -FISHERMAN, WALKING, NO_MATERIAL, SOUTH_EAST = 11, 100, 60, 12 -FISHERMAN, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 11, 100, 0, 1 -FISHERMAN, NO_ACTION, NO_MATERIAL, WEST = 11, 100, 12, 1 -FISHERMAN, NO_ACTION, NO_MATERIAL, NORTH_WEST = 11, 100, 24, 1 -FISHERMAN, NO_ACTION, NO_MATERIAL, NORTH_EAST = 11, 100, 36, 1 -FISHERMAN, NO_ACTION, NO_MATERIAL, EAST = 11, 100, 48, 1 -FISHERMAN, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 11, 100, 60, 1 +SETTLER_MATERIAL(FISHERMAN, NO_MATERIAL, 11, 100) #ACTION1 - throws the bait FISHERMAN, ACTION1, *, SOUTH_WEST = 11, 101, 0, 12 @@ -1453,18 +537,7 @@ FISHERMAN, ACTION3, *, NORTH_EAST = 11, 117, 0, 12 FISHERMAN, ACTION3, *, EAST = 11, 118, 0, 12 FISHERMAN, ACTION3, *, SOUTH_EAST = 11, 119, 0, 12 -FISHERMAN, WALKING, FISH, SOUTH_WEST = 11, 113, 0, 12 -FISHERMAN, WALKING, FISH, WEST = 11, 113, 12, 12 -FISHERMAN, WALKING, FISH, NORTH_WEST = 11, 113, 24, 12 -FISHERMAN, WALKING, FISH, NORTH_EAST = 11, 113, 36, 12 -FISHERMAN, WALKING, FISH, EAST = 11, 113, 48, 12 -FISHERMAN, WALKING, FISH, SOUTH_EAST = 11, 113, 60, 12 -FISHERMAN, NO_ACTION, FISH, SOUTH_WEST = 11, 113, 0, 1 -FISHERMAN, NO_ACTION, FISH, WEST = 11, 113, 12, 1 -FISHERMAN, NO_ACTION, FISH, NORTH_WEST = 11, 113, 24, 1 -FISHERMAN, NO_ACTION, FISH, NORTH_EAST = 11, 113, 36, 1 -FISHERMAN, NO_ACTION, FISH, EAST = 11, 113, 48, 1 -FISHERMAN, NO_ACTION, FISH, SOUTH_EAST = 11, 113, 60, 1 +SETTLER_MATERIAL(FISHERMAN, FISH, 11, 113) FISHERMAN, BEND_DOWN, FISH, SOUTH_WEST = 11, 120, 0, 4 FISHERMAN, RAISE_UP, FISH, SOUTH_WEST = 11, 120, 3, -4 @@ -1484,44 +557,9 @@ FISHERMAN, RAISE_UP, NO_MATERIAL, SOUTH_EAST = 11, 121, 4, 4 ### # BAKER movables start ### -BAKER, WALKING, BLADE, SOUTH_WEST = 11, 125, 0, 12 -BAKER, WALKING, BLADE, WEST = 11, 125, 12, 12 -BAKER, WALKING, BLADE, NORTH_WEST = 11, 125, 24, 12 -BAKER, WALKING, BLADE, NORTH_EAST = 11, 125, 36, 12 -BAKER, WALKING, BLADE, EAST = 11, 125, 48, 12 -BAKER, WALKING, BLADE, SOUTH_EAST = 11, 125, 60, 12 -BAKER, NO_ACTION, BLADE, SOUTH_WEST = 11, 125, 0, 1 -BAKER, NO_ACTION, BLADE, WEST = 11, 125, 12, 1 -BAKER, NO_ACTION, BLADE, NORTH_WEST = 11, 125, 24, 1 -BAKER, NO_ACTION, BLADE, NORTH_EAST = 11, 125, 36, 1 -BAKER, NO_ACTION, BLADE, EAST = 11, 125, 48, 1 -BAKER, NO_ACTION, BLADE, SOUTH_EAST = 11, 125, 60, 1 - -BAKER, WALKING, WHITE_BREAD, SOUTH_WEST = 11, 126, 0, 12 -BAKER, WALKING, WHITE_BREAD, WEST = 11, 126, 12, 12 -BAKER, WALKING, WHITE_BREAD, NORTH_WEST = 11, 126, 24, 12 -BAKER, WALKING, WHITE_BREAD, NORTH_EAST = 11, 126, 36, 12 -BAKER, WALKING, WHITE_BREAD, EAST = 11, 126, 48, 12 -BAKER, WALKING, WHITE_BREAD, SOUTH_EAST = 11, 126, 60, 12 -BAKER, NO_ACTION, WHITE_BREAD, SOUTH_WEST = 11, 126, 0, 1 -BAKER, NO_ACTION, WHITE_BREAD, WEST = 11, 126, 12, 1 -BAKER, NO_ACTION, WHITE_BREAD, NORTH_WEST = 11, 126, 24, 1 -BAKER, NO_ACTION, WHITE_BREAD, NORTH_EAST = 11, 126, 36, 1 -BAKER, NO_ACTION, WHITE_BREAD, EAST = 11, 126, 48, 1 -BAKER, NO_ACTION, WHITE_BREAD, SOUTH_EAST = 11, 126, 60, 1 - -BAKER, WALKING, BREAD, SOUTH_WEST = 11, 127, 0, 12 -BAKER, WALKING, BREAD, WEST = 11, 127, 12, 12 -BAKER, WALKING, BREAD, NORTH_WEST = 11, 127, 24, 12 -BAKER, WALKING, BREAD, NORTH_EAST = 11, 127, 36, 12 -BAKER, WALKING, BREAD, EAST = 11, 127, 48, 12 -BAKER, WALKING, BREAD, SOUTH_EAST = 11, 127, 60, 12 -BAKER, NO_ACTION, BREAD, SOUTH_WEST = 11, 127, 0, 1 -BAKER, NO_ACTION, BREAD, WEST = 11, 127, 12, 1 -BAKER, NO_ACTION, BREAD, NORTH_WEST = 11, 127, 24, 1 -BAKER, NO_ACTION, BREAD, NORTH_EAST = 11, 127, 36, 1 -BAKER, NO_ACTION, BREAD, EAST = 11, 127, 48, 1 -BAKER, NO_ACTION, BREAD, SOUTH_EAST = 11, 127, 60, 1 +SETTLER_MATERIAL(BAKER, BLADE, 11, 125) +SETTLER_MATERIAL(BAKER, WHITE_BREAD, 11, 126) +SETTLER_MATERIAL(BAKER, BREAD, 11, 127) BAKER, ACTION1, WHITE_BREAD, NORTH_WEST = 11, 128, 0, 12 BAKER, ACTION1, WHITE_BREAD, NORTH_EAST = 11, 129, 0, 12 @@ -1533,44 +571,9 @@ BAKER, ACTION1, BREAD, NORTH_EAST = 11, 131, 11, -12 BAKER, ACTION2, *, NORTH_WEST = 11, 130, 11, 1 BAKER, ACTION2, *, NORTH_EAST = 11, 131, 11, 1 -BAKER, WALKING, FLOUR, SOUTH_WEST = 11, 132, 0, 12 -BAKER, WALKING, FLOUR, WEST = 11, 132, 12, 12 -BAKER, WALKING, FLOUR, NORTH_WEST = 11, 132, 24, 12 -BAKER, WALKING, FLOUR, NORTH_EAST = 11, 132, 36, 12 -BAKER, WALKING, FLOUR, EAST = 11, 132, 48, 12 -BAKER, WALKING, FLOUR, SOUTH_EAST = 11, 132, 60, 12 -BAKER, NO_ACTION, FLOUR, SOUTH_WEST = 11, 132, 0, 1 -BAKER, NO_ACTION, FLOUR, WEST = 11, 132, 12, 1 -BAKER, NO_ACTION, FLOUR, NORTH_WEST = 11, 132, 24, 1 -BAKER, NO_ACTION, FLOUR, NORTH_EAST = 11, 132, 36, 1 -BAKER, NO_ACTION, FLOUR, EAST = 11, 132, 48, 1 -BAKER, NO_ACTION, FLOUR, SOUTH_EAST = 11, 132, 60, 1 - -BAKER, WALKING, WATER, SOUTH_WEST = 11, 133, 0, 12 -BAKER, WALKING, WATER, WEST = 11, 133, 12, 12 -BAKER, WALKING, WATER, NORTH_WEST = 11, 133, 24, 12 -BAKER, WALKING, WATER, NORTH_EAST = 11, 133, 36, 12 -BAKER, WALKING, WATER, EAST = 11, 133, 48, 12 -BAKER, WALKING, WATER, SOUTH_EAST = 11, 133, 60, 12 -BAKER, NO_ACTION, WATER, SOUTH_WEST = 11, 133, 0, 1 -BAKER, NO_ACTION, WATER, WEST = 11, 133, 12, 1 -BAKER, NO_ACTION, WATER, NORTH_WEST = 11, 133, 24, 1 -BAKER, NO_ACTION, WATER, NORTH_EAST = 11, 133, 36, 1 -BAKER, NO_ACTION, WATER, EAST = 11, 133, 48, 1 -BAKER, NO_ACTION, WATER, SOUTH_EAST = 11, 133, 60, 1 - -BAKER, WALKING, NO_MATERIAL, SOUTH_WEST = 11, 134, 0, 12 -BAKER, WALKING, NO_MATERIAL, WEST = 11, 134, 12, 12 -BAKER, WALKING, NO_MATERIAL, NORTH_WEST = 11, 134, 24, 12 -BAKER, WALKING, NO_MATERIAL, NORTH_EAST = 11, 134, 36, 12 -BAKER, WALKING, NO_MATERIAL, EAST = 11, 134, 48, 12 -BAKER, WALKING, NO_MATERIAL, SOUTH_EAST = 11, 134, 60, 12 -BAKER, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 11, 134, 0, 1 -BAKER, NO_ACTION, NO_MATERIAL, WEST = 11, 134, 12, 1 -BAKER, NO_ACTION, NO_MATERIAL, NORTH_WEST = 11, 134, 24, 1 -BAKER, NO_ACTION, NO_MATERIAL, NORTH_EAST = 11, 134, 36, 1 -BAKER, NO_ACTION, NO_MATERIAL, EAST = 11, 134, 48, 1 -BAKER, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 11, 134, 60, 1 +SETTLER_MATERIAL(BAKER, FLOUR, 11, 132) +SETTLER_MATERIAL(BAKER, WATER, 11, 133) +SETTLER_MATERIAL(BAKER, NO_MATERIAL, 11, 134) BAKER, BEND_DOWN, *, NORTH_WEST = 11, 135, 0, 4 BAKER, RAISE_UP, *, NORTH_WEST = 11, 135, 3, -4 @@ -1595,71 +598,12 @@ BAKER, BEND_DOWN, FLOUR, NORTH_EAST = 11, 140, 3, -4 ### # PIG_FARMER movables start ### -# wears a FEED_BUCKET to feed pigs (uncomment when implamented) -PIG_FARMER, WALKING, BASKET, SOUTH_WEST = 11, 141, 0, 12 -PIG_FARMER, WALKING, BASKET, WEST = 11, 141, 12, 12 -PIG_FARMER, WALKING, BASKET, NORTH_WEST = 11, 141, 24, 12 -PIG_FARMER, WALKING, BASKET, NORTH_EAST = 11, 141, 36, 12 -PIG_FARMER, WALKING, BASKET, EAST = 11, 141, 48, 12 -PIG_FARMER, WALKING, BASKET, SOUTH_EAST = 11, 141, 60, 12 -PIG_FARMER, NO_ACTION, BASKET, SOUTH_WEST = 11, 141, 0, 1 -PIG_FARMER, NO_ACTION, BASKET, WEST = 11, 141, 12, 1 -PIG_FARMER, NO_ACTION, BASKET, NORTH_WEST = 11, 141, 24, 1 -PIG_FARMER, NO_ACTION, BASKET, NORTH_EAST = 11, 141, 36, 1 -PIG_FARMER, NO_ACTION, BASKET, EAST = 11, 141, 48, 1 -PIG_FARMER, NO_ACTION, BASKET, SOUTH_EAST = 11, 141, 60, 1 - -PIG_FARMER, WALKING, WATER, SOUTH_WEST = 11, 142, 0, 12 -PIG_FARMER, WALKING, WATER, WEST = 11, 142, 12, 12 -PIG_FARMER, WALKING, WATER, NORTH_WEST = 11, 142, 24, 12 -PIG_FARMER, WALKING, WATER, NORTH_EAST = 11, 142, 36, 12 -PIG_FARMER, WALKING, WATER, EAST = 11, 142, 48, 12 -PIG_FARMER, WALKING, WATER, SOUTH_EAST = 11, 142, 60, 12 -PIG_FARMER, NO_ACTION, WATER, SOUTH_WEST = 11, 142, 0, 1 -PIG_FARMER, NO_ACTION, WATER, WEST = 11, 142, 12, 1 -PIG_FARMER, NO_ACTION, WATER, NORTH_WEST = 11, 142, 24, 1 -PIG_FARMER, NO_ACTION, WATER, NORTH_EAST = 11, 142, 36, 1 -PIG_FARMER, NO_ACTION, WATER, EAST = 11, 142, 48, 1 -PIG_FARMER, NO_ACTION, WATER, SOUTH_EAST = 11, 142, 60, 1 - -PIG_FARMER, WALKING, NO_MATERIAL, SOUTH_WEST = 11, 143, 0, 12 -PIG_FARMER, WALKING, NO_MATERIAL, WEST = 11, 143, 12, 12 -PIG_FARMER, WALKING, NO_MATERIAL, NORTH_WEST = 11, 143, 24, 12 -PIG_FARMER, WALKING, NO_MATERIAL, NORTH_EAST = 11, 143, 36, 12 -PIG_FARMER, WALKING, NO_MATERIAL, EAST = 11, 143, 48, 12 -PIG_FARMER, WALKING, NO_MATERIAL, SOUTH_EAST = 11, 143, 60, 12 -PIG_FARMER, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 11, 143, 0, 1 -PIG_FARMER, NO_ACTION, NO_MATERIAL, WEST = 11, 143, 12, 1 -PIG_FARMER, NO_ACTION, NO_MATERIAL, NORTH_WEST = 11, 143, 24, 1 -PIG_FARMER, NO_ACTION, NO_MATERIAL, NORTH_EAST = 11, 143, 36, 1 -PIG_FARMER, NO_ACTION, NO_MATERIAL, EAST = 11, 143, 48, 1 -PIG_FARMER, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 11, 143, 60, 1 - -PIG_FARMER, WALKING, PIG, SOUTH_WEST = 11, 144, 0, 12 -PIG_FARMER, WALKING, PIG, WEST = 11, 144, 12, 12 -PIG_FARMER, WALKING, PIG, NORTH_WEST = 11, 144, 24, 12 -PIG_FARMER, WALKING, PIG, NORTH_EAST = 11, 144, 36, 12 -PIG_FARMER, WALKING, PIG, EAST = 11, 144, 48, 12 -PIG_FARMER, WALKING, PIG, SOUTH_EAST = 11, 144, 60, 12 -PIG_FARMER, NO_ACTION, PIG, SOUTH_WEST = 11, 144, 0, 1 -PIG_FARMER, NO_ACTION, PIG, WEST = 11, 144, 12, 1 -PIG_FARMER, NO_ACTION, PIG, NORTH_WEST = 11, 144, 24, 1 -PIG_FARMER, NO_ACTION, PIG, NORTH_EAST = 11, 144, 36, 1 -PIG_FARMER, NO_ACTION, PIG, EAST = 11, 144, 48, 1 -PIG_FARMER, NO_ACTION, PIG, SOUTH_EAST = 11, 144, 60, 1 - -PIG_FARMER, WALKING, CROP, SOUTH_WEST = 11, 145, 0, 12 -PIG_FARMER, WALKING, CROP, WEST = 11, 145, 12, 12 -PIG_FARMER, WALKING, CROP, NORTH_WEST = 11, 145, 24, 12 -PIG_FARMER, WALKING, CROP, NORTH_EAST = 11, 145, 36, 12 -PIG_FARMER, WALKING, CROP, EAST = 11, 145, 48, 12 -PIG_FARMER, WALKING, CROP, SOUTH_EAST = 11, 145, 60, 12 -PIG_FARMER, NO_ACTION, CROP, SOUTH_WEST = 11, 145, 0, 1 -PIG_FARMER, NO_ACTION, CROP, WEST = 11, 145, 12, 1 -PIG_FARMER, NO_ACTION, CROP, NORTH_WEST = 11, 145, 24, 1 -PIG_FARMER, NO_ACTION, CROP, NORTH_EAST = 11, 145, 36, 1 -PIG_FARMER, NO_ACTION, CROP, EAST = 11, 145, 48, 1 -PIG_FARMER, NO_ACTION, CROP, SOUTH_EAST = 11, 145, 60, 1 +# wears a FEED_BUCKET to feed pigs +SETTLER_MATERIAL(PIG_FARMER, BASKET, 11, 141) +SETTLER_MATERIAL(PIG_FARMER, WATER, 11, 142) +SETTLER_MATERIAL(PIG_FARMER, NO_MATERIAL, 11, 143) +SETTLER_MATERIAL(PIG_FARMER, PIG, 11, 144) +SETTLER_MATERIAL(PIG_FARMER, CROP, 11, 145) # feed pigs PIG_FARMER, ACTION1, BASKET, NORTH_EAST = 11, 146, 0, 12 @@ -1692,58 +636,11 @@ PIG_FARMER, RAISE_UP, WATER, NORTH_EAST = 11, 153, 4, 4 ### # DONKEY_FARMER movables start ### -# wears a FEED_BUCKET to feed donkeys (uncomment when implamented) -DONKEY_FARMER, WALKING, BASKET, SOUTH_WEST = 11, 141, 0, 12 -DONKEY_FARMER, WALKING, BASKET, WEST = 11, 141, 12, 12 -DONKEY_FARMER, WALKING, BASKET, NORTH_WEST = 11, 141, 24, 12 -DONKEY_FARMER, WALKING, BASKET, NORTH_EAST = 11, 141, 36, 12 -DONKEY_FARMER, WALKING, BASKET, EAST = 11, 141, 48, 12 -DONKEY_FARMER, WALKING, BASKET, SOUTH_EAST = 11, 141, 60, 12 -DONKEY_FARMER, NO_ACTION, BASKET, SOUTH_WEST = 11, 141, 0, 1 -DONKEY_FARMER, NO_ACTION, BASKET, WEST = 11, 141, 12, 1 -DONKEY_FARMER, NO_ACTION, BASKET, NORTH_WEST = 11, 141, 24, 1 -DONKEY_FARMER, NO_ACTION, BASKET, NORTH_EAST = 11, 141, 36, 1 -DONKEY_FARMER, NO_ACTION, BASKET, EAST = 11, 141, 48, 1 -DONKEY_FARMER, NO_ACTION, BASKET, SOUTH_EAST = 11, 141, 60, 1 - -DONKEY_FARMER, WALKING, WATER, SOUTH_WEST = 11, 142, 0, 12 -DONKEY_FARMER, WALKING, WATER, WEST = 11, 142, 12, 12 -DONKEY_FARMER, WALKING, WATER, NORTH_WEST = 11, 142, 24, 12 -DONKEY_FARMER, WALKING, WATER, NORTH_EAST = 11, 142, 36, 12 -DONKEY_FARMER, WALKING, WATER, EAST = 11, 142, 48, 12 -DONKEY_FARMER, WALKING, WATER, SOUTH_EAST = 11, 142, 60, 12 -DONKEY_FARMER, NO_ACTION, WATER, SOUTH_WEST = 11, 142, 0, 1 -DONKEY_FARMER, NO_ACTION, WATER, WEST = 11, 142, 12, 1 -DONKEY_FARMER, NO_ACTION, WATER, NORTH_WEST = 11, 142, 24, 1 -DONKEY_FARMER, NO_ACTION, WATER, NORTH_EAST = 11, 142, 36, 1 -DONKEY_FARMER, NO_ACTION, WATER, EAST = 11, 142, 48, 1 -DONKEY_FARMER, NO_ACTION, WATER, SOUTH_EAST = 11, 142, 60, 1 - -DONKEY_FARMER, WALKING, NO_MATERIAL, SOUTH_WEST = 11, 143, 0, 12 -DONKEY_FARMER, WALKING, NO_MATERIAL, WEST = 11, 143, 12, 12 -DONKEY_FARMER, WALKING, NO_MATERIAL, NORTH_WEST = 11, 143, 24, 12 -DONKEY_FARMER, WALKING, NO_MATERIAL, NORTH_EAST = 11, 143, 36, 12 -DONKEY_FARMER, WALKING, NO_MATERIAL, EAST = 11, 143, 48, 12 -DONKEY_FARMER, WALKING, NO_MATERIAL, SOUTH_EAST = 11, 143, 60, 12 -DONKEY_FARMER, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 11, 143, 0, 1 -DONKEY_FARMER, NO_ACTION, NO_MATERIAL, WEST = 11, 143, 12, 1 -DONKEY_FARMER, NO_ACTION, NO_MATERIAL, NORTH_WEST = 11, 143, 24, 1 -DONKEY_FARMER, NO_ACTION, NO_MATERIAL, NORTH_EAST = 11, 143, 36, 1 -DONKEY_FARMER, NO_ACTION, NO_MATERIAL, EAST = 11, 143, 48, 1 -DONKEY_FARMER, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 11, 143, 60, 1 - -DONKEY_FARMER, WALKING, CROP, SOUTH_WEST = 11, 145, 0, 12 -DONKEY_FARMER, WALKING, CROP, WEST = 11, 145, 12, 12 -DONKEY_FARMER, WALKING, CROP, NORTH_WEST = 11, 145, 24, 12 -DONKEY_FARMER, WALKING, CROP, NORTH_EAST = 11, 145, 36, 12 -DONKEY_FARMER, WALKING, CROP, EAST = 11, 145, 48, 12 -DONKEY_FARMER, WALKING, CROP, SOUTH_EAST = 11, 145, 60, 12 -DONKEY_FARMER, NO_ACTION, CROP, SOUTH_WEST = 11, 145, 0, 1 -DONKEY_FARMER, NO_ACTION, CROP, WEST = 11, 145, 12, 1 -DONKEY_FARMER, NO_ACTION, CROP, NORTH_WEST = 11, 145, 24, 1 -DONKEY_FARMER, NO_ACTION, CROP, NORTH_EAST = 11, 145, 36, 1 -DONKEY_FARMER, NO_ACTION, CROP, EAST = 11, 145, 48, 1 -DONKEY_FARMER, NO_ACTION, CROP, SOUTH_EAST = 11, 145, 60, 1 +# wears a FEED_BUCKET to feed donkeys +SETTLER_MATERIAL(PIG_FARMER, BASKET, 11, 141) +SETTLER_MATERIAL(PIG_FARMER, WATER, 11, 142) +SETTLER_MATERIAL(PIG_FARMER, NO_MATERIAL, 11, 143) +SETTLER_MATERIAL(PIG_FARMER, CROP, 11, 145) # feed donkeys DONKEY_FARMER, ACTION1, BASKET, NORTH_EAST = 11, 146, 0, 12 @@ -1767,31 +664,8 @@ DONKEY_FARMER, BEND_DOWN, WATER, NORTH_EAST = 11, 153, 0, 8 # WATERWORKER movables start ### # go for WATER with EMPTY_BUCKET -WATERWORKER, WALKING, EMPTY_BUCKET, SOUTH_WEST = 11, 154, 0, 12 -WATERWORKER, WALKING, EMPTY_BUCKET, WEST = 11, 154, 12, 12 -WATERWORKER, WALKING, EMPTY_BUCKET, NORTH_WEST = 11, 154, 24, 12 -WATERWORKER, WALKING, EMPTY_BUCKET, NORTH_EAST = 11, 154, 36, 12 -WATERWORKER, WALKING, EMPTY_BUCKET, EAST = 11, 154, 48, 12 -WATERWORKER, WALKING, EMPTY_BUCKET, SOUTH_EAST = 11, 154, 60, 12 -WATERWORKER, NO_ACTION, EMPTY_BUCKET, SOUTH_WEST = 11, 154, 0, 12 -WATERWORKER, NO_ACTION, EMPTY_BUCKET, WEST = 11, 154, 12, 12 -WATERWORKER, NO_ACTION, EMPTY_BUCKET, NORTH_WEST = 11, 154, 24, 12 -WATERWORKER, NO_ACTION, EMPTY_BUCKET, NORTH_EAST = 11, 154, 36, 12 -WATERWORKER, NO_ACTION, EMPTY_BUCKET, EAST = 11, 154, 48, 12 -WATERWORKER, NO_ACTION, EMPTY_BUCKET, SOUTH_EAST = 11, 154, 60, 12 - -WATERWORKER, WALKING, WATER, SOUTH_WEST = 11, 155, 0, 12 -WATERWORKER, WALKING, WATER, WEST = 11, 155, 12, 12 -WATERWORKER, WALKING, WATER, NORTH_WEST = 11, 155, 24, 12 -WATERWORKER, WALKING, WATER, NORTH_EAST = 11, 155, 36, 12 -WATERWORKER, WALKING, WATER, EAST = 11, 155, 48, 12 -WATERWORKER, WALKING, WATER, SOUTH_EAST = 11, 155, 60, 12 -WATERWORKER, NO_ACTION, WATER, SOUTH_WEST = 11, 155, 0, 12 -WATERWORKER, NO_ACTION, WATER, WEST = 11, 155, 12, 12 -WATERWORKER, NO_ACTION, WATER, NORTH_WEST = 11, 155, 24, 12 -WATERWORKER, NO_ACTION, WATER, NORTH_EAST = 11, 155, 36, 12 -WATERWORKER, NO_ACTION, WATER, EAST = 11, 155, 48, 12 -WATERWORKER, NO_ACTION, WATER, SOUTH_EAST = 11, 155, 60, 12 +SETTLER_MATERIAL(WATERWORKER, EMPTY_BUCKET, 11, 154) +SETTLER_MATERIAL(WATERWORKER, WATER, 11, 155) # gathering water in a bucket WATERWORKER, ACTION1, *, SOUTH_WEST = 11, 156, 0, 14 @@ -1804,18 +678,7 @@ WATERWORKER, ACTION1, *, EAST = 11, 157, 0, 14 WATERWORKER, BEND_DOWN, WATER, * = 11, 158, 0, 4 WATERWORKER, RAISE_UP, WATER, * = 11, 158, 3, -4 -WATERWORKER, WALKING, NO_MATERIAL, SOUTH_WEST = 11, 159, 0, 12 -WATERWORKER, WALKING, NO_MATERIAL, WEST = 11, 159, 12, 12 -WATERWORKER, WALKING, NO_MATERIAL, NORTH_WEST = 11, 159, 24, 12 -WATERWORKER, WALKING, NO_MATERIAL, NORTH_EAST = 11, 159, 36, 12 -WATERWORKER, WALKING, NO_MATERIAL, EAST = 11, 159, 48, 12 -WATERWORKER, WALKING, NO_MATERIAL, SOUTH_EAST = 11, 159, 60, 12 -WATERWORKER, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 11, 159, 0, 12 -WATERWORKER, NO_ACTION, NO_MATERIAL, WEST = 11, 159, 12, 12 -WATERWORKER, NO_ACTION, NO_MATERIAL, NORTH_WEST = 11, 159, 24, 12 -WATERWORKER, NO_ACTION, NO_MATERIAL, NORTH_EAST = 11, 159, 36, 12 -WATERWORKER, NO_ACTION, NO_MATERIAL, EAST = 11, 159, 48, 12 -WATERWORKER, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 11, 159, 60, 12 +SETTLER_MATERIAL(WATERWORKER, NO_MATERIAL, 11, 159) WATERWORKER, BEND_DOWN, NO_MATERIAL, * = 11, 160, 0, 4 WATERWORKER, RAISE_UP, NO_MATERIAL, * = 11, 160, 3, -4 @@ -1828,44 +691,9 @@ WATERWORKER, RAISE_UP, NO_MATERIAL, * = 11, 160, 3, -4 ### # WINEGROWER movables start ### -WINEGROWER, WALKING, NO_MATERIAL, SOUTH_WEST = 11, 90, 0, 13 -WINEGROWER, WALKING, NO_MATERIAL, WEST = 11, 90, 13, 13 -WINEGROWER, WALKING, NO_MATERIAL, NORTH_WEST = 11, 90, 26, 13 -WINEGROWER, WALKING, NO_MATERIAL, NORTH_EAST = 11, 90, 39, 13 -WINEGROWER, WALKING, NO_MATERIAL, EAST = 11, 90, 52, 13 -WINEGROWER, WALKING, NO_MATERIAL, SOUTH_EAST = 11, 90, 65, 13 -WINEGROWER, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 11, 90, 0, 1 -WINEGROWER, NO_ACTION, NO_MATERIAL, WEST = 11, 90, 13, 1 -WINEGROWER, NO_ACTION, NO_MATERIAL, NORTH_WEST = 11, 90, 26, 1 -WINEGROWER, NO_ACTION, NO_MATERIAL, NORTH_EAST = 11, 90, 39, 1 -WINEGROWER, NO_ACTION, NO_MATERIAL, EAST = 11, 90, 52, 1 -WINEGROWER, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 11, 90, 65, 1 - -WINEGROWER, WALKING, BASKET, SOUTH_WEST = 11, 161, 0, 12 -WINEGROWER, WALKING, BASKET, WEST = 11, 161, 12, 12 -WINEGROWER, WALKING, BASKET, NORTH_WEST = 11, 161, 24, 12 -WINEGROWER, WALKING, BASKET, NORTH_EAST = 11, 161, 36, 12 -WINEGROWER, WALKING, BASKET, EAST = 11, 161, 48, 12 -WINEGROWER, WALKING, BASKET, SOUTH_EAST = 11, 161, 60, 12 -WINEGROWER, NO_ACTION, BASKET, SOUTH_WEST = 11, 161, 0, 1 -WINEGROWER, NO_ACTION, BASKET, WEST = 11, 161, 12, 1 -WINEGROWER, NO_ACTION, BASKET, NORTH_WEST = 11, 161, 24, 1 -WINEGROWER, NO_ACTION, BASKET, NORTH_EAST = 11, 161, 36, 1 -WINEGROWER, NO_ACTION, BASKET, EAST = 11, 161, 48, 1 -WINEGROWER, NO_ACTION, BASKET, SOUTH_EAST = 11, 161, 60, 1 - -WINEGROWER, WALKING, WINE, SOUTH_WEST = 11, 162, 0, 12 -WINEGROWER, WALKING, WINE, WEST = 11, 162, 12, 12 -WINEGROWER, WALKING, WINE, NORTH_WEST = 11, 162, 24, 12 -WINEGROWER, WALKING, WINE, NORTH_EAST = 11, 162, 36, 12 -WINEGROWER, WALKING, WINE, EAST = 11, 162, 48, 12 -WINEGROWER, WALKING, WINE, SOUTH_EAST = 11, 162, 60, 12 -WINEGROWER, NO_ACTION, WINE, SOUTH_WEST = 11, 162, 0, 1 -WINEGROWER, NO_ACTION, WINE, WEST = 11, 162, 12, 1 -WINEGROWER, NO_ACTION, WINE, NORTH_WEST = 11, 162, 24, 1 -WINEGROWER, NO_ACTION, WINE, NORTH_EAST = 11, 162, 36, 1 -WINEGROWER, NO_ACTION, WINE, EAST = 11, 162, 48, 1 -WINEGROWER, NO_ACTION, WINE, SOUTH_EAST = 11, 162, 60, 1 +SETTLER_MATERIAL(WINEGROWER, NO_MATERIAL, 11, 90) +SETTLER_MATERIAL(WINEGROWER, BASKET, 11, 161) +SETTLER_MATERIAL(WINEGROWER, WINE, 11, 162) # grapes cuts off WINEGROWER, BEND_DOWN, BASKET, NORTH_WEST = 11, 163, 0, 4 @@ -1883,18 +711,7 @@ WINEGROWER, BEND_DOWN, WINE, NORTH_WEST = 11, 167, 7, -4 WINEGROWER, RAISE_UP, WINE, NORTH_EAST = 11, 168, 0, 4 WINEGROWER, BEND_DOWN, WINE, NORTH_EAST = 11, 168, 7, -4 -WINEGROWER, WALKING, PLANT, SOUTH_WEST = 11, 169, 0, 12 -WINEGROWER, WALKING, PLANT, WEST = 11, 169, 12, 12 -WINEGROWER, WALKING, PLANT, NORTH_WEST = 11, 169, 24, 12 -WINEGROWER, WALKING, PLANT, NORTH_EAST = 11, 169, 36, 12 -WINEGROWER, WALKING, PLANT, EAST = 11, 169, 48, 12 -WINEGROWER, WALKING, PLANT, SOUTH_EAST = 11, 169, 60, 12 -WINEGROWER, NO_ACTION, PLANT, SOUTH_WEST = 11, 169, 0, 1 -WINEGROWER, NO_ACTION, PLANT, WEST = 11, 169, 12, 1 -WINEGROWER, NO_ACTION, PLANT, NORTH_WEST = 11, 169, 24, 1 -WINEGROWER, NO_ACTION, PLANT, NORTH_EAST = 11, 169, 36, 1 -WINEGROWER, NO_ACTION, PLANT, EAST = 11, 169, 48, 1 -WINEGROWER, NO_ACTION, PLANT, SOUTH_EAST = 11, 169, 60, 1 +SETTLER_MATERIAL(WINEGROWER, PLANT, 11, 169) # planting vine WINEGROWER, ACTION1, PLANT, SOUTH_WEST = 11, 170, 0, 27 @@ -1908,18 +725,7 @@ WINEGROWER, ACTION1, PLANT, SOUTH_EAST = 11, 171, 0, 27 ### # CHARCOAL_BURNER movables start ### -CHARCOAL_BURNER, WALKING, PLANK, SOUTH_WEST = 11, 172, 0, 12 -CHARCOAL_BURNER, WALKING, PLANK, WEST = 11, 172, 12, 12 -CHARCOAL_BURNER, WALKING, PLANK, NORTH_WEST = 11, 172, 24, 12 -CHARCOAL_BURNER, WALKING, PLANK, NORTH_EAST = 11, 172, 36, 12 -CHARCOAL_BURNER, WALKING, PLANK, EAST = 11, 172, 48, 12 -CHARCOAL_BURNER, WALKING, PLANK, SOUTH_EAST = 11, 172, 60, 12 -CHARCOAL_BURNER, NO_ACTION, PLANK, SOUTH_WEST = 11, 172, 0, 1 -CHARCOAL_BURNER, NO_ACTION, PLANK, WEST = 11, 172, 12, 1 -CHARCOAL_BURNER, NO_ACTION, PLANK, NORTH_WEST = 11, 172, 24, 1 -CHARCOAL_BURNER, NO_ACTION, PLANK, NORTH_EAST = 11, 172, 36, 1 -CHARCOAL_BURNER, NO_ACTION, PLANK, EAST = 11, 172, 48, 1 -CHARCOAL_BURNER, NO_ACTION, PLANK, SOUTH_EAST = 11, 172, 60, 1 +SETTLER_MATERIAL(CHARCOAL_BURNER, PLANK, 11, 172) CHARCOAL_BURNER, RAISE_UP, PLANK, SOUTH_WEST = 11, 173, 0, 4 CHARCOAL_BURNER, RAISE_UP, PLANK, WEST = 11, 174, 0, 4 @@ -1928,35 +734,13 @@ CHARCOAL_BURNER, RAISE_UP, PLANK, NORTH_EAST = 11, 176, 0, 4 CHARCOAL_BURNER, RAISE_UP, PLANK, EAST = 11, 177, 0, 4 CHARCOAL_BURNER, RAISE_UP, PLANK, SOUTH_EAST = 11, 178, 0, 4 -CHARCOAL_BURNER, WALKING, COAL, SOUTH_WEST = 11, 179, 0, 12 -CHARCOAL_BURNER, WALKING, COAL, WEST = 11, 179, 12, 12 -CHARCOAL_BURNER, WALKING, COAL, NORTH_WEST = 11, 179, 24, 12 -CHARCOAL_BURNER, WALKING, COAL, NORTH_EAST = 11, 179, 36, 12 -CHARCOAL_BURNER, WALKING, COAL, EAST = 11, 179, 48, 12 -CHARCOAL_BURNER, WALKING, COAL, SOUTH_EAST = 11, 179, 60, 12 -CHARCOAL_BURNER, NO_ACTION, COAL, SOUTH_WEST = 11, 179, 0, 1 -CHARCOAL_BURNER, NO_ACTION, COAL, WEST = 11, 179, 12, 1 -CHARCOAL_BURNER, NO_ACTION, COAL, NORTH_WEST = 11, 179, 24, 1 -CHARCOAL_BURNER, NO_ACTION, COAL, NORTH_EAST = 11, 179, 36, 1 -CHARCOAL_BURNER, NO_ACTION, COAL, EAST = 11, 179, 48, 1 -CHARCOAL_BURNER, NO_ACTION, COAL, SOUTH_EAST = 11, 179, 60, 1 +SETTLER_MATERIAL(CHARCOAL_BURNER, COAL, 11, 179) CHARCOAL_BURNER, ACTION1, COAL, SOUTH_EAST = 11, 179, 60, 1 CHARCOAL_BURNER, BEND_DOWN, COAL, SOUTH_WEST = 11, 180, 0, 9 CHARCOAL_BURNER, RAISE_UP, NO_MATERIAL, SOUTH_WEST = 11, 182, 3, -4 -CHARCOAL_BURNER, WALKING, NO_MATERIAL, SOUTH_WEST = 11, 181, 0, 12 -CHARCOAL_BURNER, WALKING, NO_MATERIAL, WEST = 11, 181, 12, 12 -CHARCOAL_BURNER, WALKING, NO_MATERIAL, NORTH_WEST = 11, 181, 24, 12 -CHARCOAL_BURNER, WALKING, NO_MATERIAL, NORTH_EAST = 11, 181, 36, 12 -CHARCOAL_BURNER, WALKING, NO_MATERIAL, EAST = 11, 181, 48, 12 -CHARCOAL_BURNER, WALKING, NO_MATERIAL, SOUTH_EAST = 11, 181, 60, 12 -CHARCOAL_BURNER, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 11, 181, 0, 1 -CHARCOAL_BURNER, NO_ACTION, NO_MATERIAL, WEST = 11, 181, 12, 1 -CHARCOAL_BURNER, NO_ACTION, NO_MATERIAL, NORTH_WEST = 11, 181, 24, 1 -CHARCOAL_BURNER, NO_ACTION, NO_MATERIAL, NORTH_EAST = 11, 181, 36, 1 -CHARCOAL_BURNER, NO_ACTION, NO_MATERIAL, EAST = 11, 181, 48, 1 -CHARCOAL_BURNER, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 11, 181, 60, 1 +SETTLER_MATERIAL(CHARCOAL_BURNER, NO_MATERIAL, 11, 181) CHARCOAL_BURNER, BEND_DOWN, NO_MATERIAL, SOUTH_WEST = 11, 182, 0, 4 CHARCOAL_BURNER, BEND_DOWN, NO_MATERIAL, WEST = 11, 183, 0, 4 @@ -1973,18 +757,7 @@ CHARCOAL_BURNER, BEND_DOWN, NO_MATERIAL, SOUTH_EAST = 11, 187, 0, 4 ### # HEALER movables start ### -HEALER, WALKING, *, SOUTH_WEST = 11, 188, 0, 12 -HEALER, WALKING, *, WEST = 11, 188, 12, 12 -HEALER, WALKING, *, NORTH_WEST = 11, 188, 24, 12 -HEALER, WALKING, *, NORTH_EAST = 11, 188, 36, 12 -HEALER, WALKING, *, EAST = 11, 188, 48, 12 -HEALER, WALKING, *, SOUTH_EAST = 11, 188, 60, 12 -HEALER, NO_ACTION, *, SOUTH_WEST = 11, 188, 0, 1 -HEALER, NO_ACTION, *, WEST = 11, 188, 12, 1 -HEALER, NO_ACTION, *, NORTH_WEST = 11, 188, 24, 1 -HEALER, NO_ACTION, *, NORTH_EAST = 11, 188, 36, 1 -HEALER, NO_ACTION, *, EAST = 11, 188, 48, 1 -HEALER, NO_ACTION, *, SOUTH_EAST = 11, 188, 60, 1 +SETTLER_MATERIAL(HEALER, *, 11, 188) # healing soldiers HEALER, ACTION1, *, SOUTH_WEST = 11, 189, 0, 12 @@ -2002,18 +775,7 @@ HEALER, ACTION1, *, SOUTH_EAST = 11, 194, 0, 12 ### # MAGE movables start ### -MAGE, WALKING, *, SOUTH_WEST = 11, 195, 0, 12 -MAGE, WALKING, *, WEST = 11, 195, 12, 12 -MAGE, WALKING, *, NORTH_WEST = 11, 195, 24, 12 -MAGE, WALKING, *, NORTH_EAST = 11, 195, 36, 12 -MAGE, WALKING, *, EAST = 11, 195, 48, 12 -MAGE, WALKING, *, SOUTH_EAST = 11, 195, 60, 12 -MAGE, NO_ACTION, *, SOUTH_WEST = 11, 195, 0, 1 -MAGE, NO_ACTION, *, WEST = 11, 195, 12, 1 -MAGE, NO_ACTION, *, NORTH_WEST = 11, 195, 24, 1 -MAGE, NO_ACTION, *, NORTH_EAST = 11, 195, 36, 1 -MAGE, NO_ACTION, *, EAST = 11, 195, 48, 1 -MAGE, NO_ACTION, *, SOUTH_EAST = 11, 195, 60, 1 +SETTLER_MATERIAL(MAGE, *, 11, 195) # casts a spell MAGE, ACTION1, *, SOUTH_WEST = 11, 196, 0, 30 @@ -2031,18 +793,7 @@ MAGE, ACTION1, *, SOUTH_EAST = 11, 201, 0, 30 ### # PIONEER movables start ### -PIONEER, WALKING, NO_MATERIAL, SOUTH_WEST = 11, 204, 0, 12 -PIONEER, WALKING, NO_MATERIAL, WEST = 11, 204, 12, 12 -PIONEER, WALKING, NO_MATERIAL, NORTH_WEST = 11, 204, 24, 12 -PIONEER, WALKING, NO_MATERIAL, NORTH_EAST = 11, 204, 36, 12 -PIONEER, WALKING, NO_MATERIAL, EAST = 11, 204, 48, 12 -PIONEER, WALKING, NO_MATERIAL, SOUTH_EAST = 11, 204, 60, 12 -PIONEER, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 11, 204, 0, 1 -PIONEER, NO_ACTION, NO_MATERIAL, WEST = 11, 204, 12, 1 -PIONEER, NO_ACTION, NO_MATERIAL, NORTH_WEST = 11, 204, 24, 1 -PIONEER, NO_ACTION, NO_MATERIAL, NORTH_EAST = 11, 204, 36, 1 -PIONEER, NO_ACTION, NO_MATERIAL, EAST = 11, 204, 48, 1 -PIONEER, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 11, 204, 60, 1 +SETTLER_MATERIAL(PIONEER, NO_MATERIAL, 11, 204) PIONEER, ACTION1, *, * = 11, 205, 0, 12 ### @@ -2055,32 +806,10 @@ PIONEER, ACTION1, *, * = 11, 205, 0, 12 # THIEF movables start ### # when hides stolen -THIEF, WALKING, *, SOUTH_WEST = 11, 231, 0, 12 -THIEF, WALKING, *, WEST = 11, 231, 12, 12 -THIEF, WALKING, *, NORTH_WEST = 11, 231, 24, 12 -THIEF, WALKING, *, NORTH_EAST = 11, 231, 36, 12 -THIEF, WALKING, *, EAST = 11, 231, 48, 12 -THIEF, WALKING, *, SOUTH_EAST = 11, 231, 60, 12 -THIEF, NO_ACTION, *, SOUTH_WEST = 11, 231, 0, 1 -THIEF, NO_ACTION, *, WEST = 11, 231, 12, 1 -THIEF, NO_ACTION, *, NORTH_WEST = 11, 231, 24, 1 -THIEF, NO_ACTION, *, NORTH_EAST = 11, 231, 36, 1 -THIEF, NO_ACTION, *, EAST = 11, 231, 48, 1 -THIEF, NO_ACTION, *, SOUTH_EAST = 11, 231, 60, 1 +SETTLER_MATERIAL(THIEF, *, 11, 231) # normal state, on the territory of the enemy appears for the enemy as his BEARER (can detect only soldiers) -THIEF, WALKING, NO_MATERIAL, SOUTH_WEST = 11, 232, 0, 12 -THIEF, WALKING, NO_MATERIAL, WEST = 11, 232, 12, 12 -THIEF, WALKING, NO_MATERIAL, NORTH_WEST = 11, 232, 24, 12 -THIEF, WALKING, NO_MATERIAL, NORTH_EAST = 11, 232, 36, 12 -THIEF, WALKING, NO_MATERIAL, EAST = 11, 232, 48, 12 -THIEF, WALKING, NO_MATERIAL, SOUTH_EAST = 11, 232, 60, 12 -THIEF, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 11, 232, 0, 1 -THIEF, NO_ACTION, NO_MATERIAL, WEST = 11, 232, 12, 1 -THIEF, NO_ACTION, NO_MATERIAL, NORTH_WEST = 11, 232, 24, 1 -THIEF, NO_ACTION, NO_MATERIAL, NORTH_EAST = 11, 232, 36, 1 -THIEF, NO_ACTION, NO_MATERIAL, EAST = 11, 232, 48, 1 -THIEF, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 11, 232, 60, 1 +SETTLER_MATERIAL(THIEF, NO_MATERIAL, 11, 232) # stealing resources THIEF, ACTION1, *, SOUTH_WEST = 11, 233, 0, 12 @@ -2095,74 +824,6 @@ THIEF, ACTION1, *, SOUTH_EAST = 11, 238, 0, 12 -### -# DONKEY movables start -### -DONKEY, WALKING, *, SOUTH_WEST = 6, 15, 0, 12 -DONKEY, WALKING, *, WEST = 6, 15, 12, 12 -DONKEY, WALKING, *, NORTH_WEST = 6, 15, 24, 12 -DONKEY, WALKING, *, NORTH_EAST = 6, 15, 36, 12 -DONKEY, WALKING, *, EAST = 6, 15, 48, 12 -DONKEY, WALKING, *, SOUTH_EAST = 6, 15, 60, 12 -DONKEY, NO_ACTION, *, SOUTH_WEST = 6, 15, 72, 1 -DONKEY, NO_ACTION, *, WEST = 6, 15, 73, 1 -DONKEY, NO_ACTION, *, NORTH_WEST = 6, 15, 74, 1 -DONKEY, NO_ACTION, *, NORTH_EAST = 6, 15, 75, 1 -DONKEY, NO_ACTION, *, EAST = 6, 15, 76, 1 -DONKEY, NO_ACTION, *, SOUTH_EAST = 6, 15, 77, 1 - -DONKEY, WALKING, NO_MATERIAL, SOUTH_WEST = 6, 17, 0, 12 -DONKEY, WALKING, NO_MATERIAL, WEST = 6, 17, 12, 12 -DONKEY, WALKING, NO_MATERIAL, NORTH_WEST = 6, 17, 24, 12 -DONKEY, WALKING, NO_MATERIAL, NORTH_EAST = 6, 17, 36, 12 -DONKEY, WALKING, NO_MATERIAL, EAST = 6, 17, 48, 12 -DONKEY, WALKING, NO_MATERIAL, SOUTH_EAST = 6, 17, 60, 12 -DONKEY, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 6, 17, 72, 1 -DONKEY, NO_ACTION, NO_MATERIAL, WEST = 6, 17, 73, 1 -DONKEY, NO_ACTION, NO_MATERIAL, NORTH_WEST = 6, 17, 74, 1 -DONKEY, NO_ACTION, NO_MATERIAL, NORTH_EAST = 6, 17, 75, 1 -DONKEY, NO_ACTION, NO_MATERIAL, EAST = 6, 17, 76, 1 -DONKEY, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 6, 17, 77, 1 -### -# DONKEY movables end -### - - - -### -# WHITEFLAGGED_DONKEY movables start -### -WHITEFLAGGED_DONKEY, WALKING, *, SOUTH_WEST = 6, 16, 0, 12 -WHITEFLAGGED_DONKEY, WALKING, *, WEST = 6, 16, 12, 12 -WHITEFLAGGED_DONKEY, WALKING, *, NORTH_WEST = 6, 16, 24, 12 -WHITEFLAGGED_DONKEY, WALKING, *, NORTH_EAST = 6, 16, 36, 12 -WHITEFLAGGED_DONKEY, WALKING, *, EAST = 6, 16, 48, 12 -WHITEFLAGGED_DONKEY, WALKING, *, SOUTH_EAST = 6, 16, 60, 12 -WHITEFLAGGED_DONKEY, NO_ACTION, *, SOUTH_WEST = 6, 16, 72, 1 -WHITEFLAGGED_DONKEY, NO_ACTION, *, WEST = 6, 16, 73, 1 -WHITEFLAGGED_DONKEY, NO_ACTION, *, NORTH_WEST = 6, 16, 74, 1 -WHITEFLAGGED_DONKEY, NO_ACTION, *, NORTH_EAST = 6, 16, 75, 1 -WHITEFLAGGED_DONKEY, NO_ACTION, *, EAST = 6, 16, 76, 1 -WHITEFLAGGED_DONKEY, NO_ACTION, *, SOUTH_EAST = 6, 16, 77, 1 - -WHITEFLAGGED_DONKEY, WALKING, NO_MATERIAL, SOUTH_WEST = 6, 18, 0, 12 -WHITEFLAGGED_DONKEY, WALKING, NO_MATERIAL, WEST = 6, 18, 12, 12 -WHITEFLAGGED_DONKEY, WALKING, NO_MATERIAL, NORTH_WEST = 6, 18, 24, 12 -WHITEFLAGGED_DONKEY, WALKING, NO_MATERIAL, NORTH_EAST = 6, 18, 36, 12 -WHITEFLAGGED_DONKEY, WALKING, NO_MATERIAL, EAST = 6, 18, 48, 12 -WHITEFLAGGED_DONKEY, WALKING, NO_MATERIAL, SOUTH_EAST = 6, 18, 60, 12 -WHITEFLAGGED_DONKEY, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 6, 18, 72, 1 -WHITEFLAGGED_DONKEY, NO_ACTION, NO_MATERIAL, WEST = 6, 18, 73, 1 -WHITEFLAGGED_DONKEY, NO_ACTION, NO_MATERIAL, NORTH_WEST = 6, 18, 74, 1 -WHITEFLAGGED_DONKEY, NO_ACTION, NO_MATERIAL, NORTH_EAST = 6, 18, 75, 1 -WHITEFLAGGED_DONKEY, NO_ACTION, NO_MATERIAL, EAST = 6, 18, 76, 1 -WHITEFLAGGED_DONKEY, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 6, 18, 77, 1 -### -# WHITEFLAGGED_DONKEY movables end -### - - - ### # CATAPULT movables start ### @@ -2218,67 +879,16 @@ WHITEFLAGGED_DONKEY, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 6, 18, 77, 1 ### # SWORDSMAN movables start ### -SWORDSMAN_L1, WALKING, *, SOUTH_WEST = 12, 9, 0, 12 -SWORDSMAN_L1, WALKING, *, WEST = 12, 9, 12, 12 -SWORDSMAN_L1, WALKING, *, NORTH_WEST = 12, 9, 24, 12 -SWORDSMAN_L1, WALKING, *, NORTH_EAST = 12, 9, 36, 12 -SWORDSMAN_L1, WALKING, *, EAST = 12, 9, 48, 12 -SWORDSMAN_L1, WALKING, *, SOUTH_EAST = 12, 9, 60, 12 -SWORDSMAN_L1, NO_ACTION, *, SOUTH_WEST = 12, 9, 0, 1 -SWORDSMAN_L1, NO_ACTION, *, WEST = 12, 9, 12, 1 -SWORDSMAN_L1, NO_ACTION, *, NORTH_WEST = 12, 9, 24, 1 -SWORDSMAN_L1, NO_ACTION, *, NORTH_EAST = 12, 9, 36, 1 -SWORDSMAN_L1, NO_ACTION, *, EAST = 12, 9, 48, 1 -SWORDSMAN_L1, NO_ACTION, *, SOUTH_EAST = 12, 9, 60, 1 - -SWORDSMAN_L1, ACTION1, *, SOUTH_WEST = 12, 12, 0, 12 -SWORDSMAN_L1, ACTION1, *, WEST = 12, 12, 12, 12 -SWORDSMAN_L1, ACTION1, *, NORTH_WEST = 12, 12, 24, 12 -SWORDSMAN_L1, ACTION1, *, NORTH_EAST = 12, 12, 36, 12 -SWORDSMAN_L1, ACTION1, *, EAST = 12, 12, 48, 12 -SWORDSMAN_L1, ACTION1, *, SOUTH_EAST = 12, 12, 60, 12 - - -SWORDSMAN_L2, WALKING, *, SOUTH_WEST = 12, 11, 0, 12 -SWORDSMAN_L2, WALKING, *, WEST = 12, 11, 12, 12 -SWORDSMAN_L2, WALKING, *, NORTH_WEST = 12, 11, 24, 12 -SWORDSMAN_L2, WALKING, *, NORTH_EAST = 12, 11, 36, 12 -SWORDSMAN_L2, WALKING, *, EAST = 12, 11, 48, 12 -SWORDSMAN_L2, WALKING, *, SOUTH_EAST = 12, 11, 60, 12 -SWORDSMAN_L2, NO_ACTION, *, SOUTH_WEST = 12, 11, 0, 1 -SWORDSMAN_L2, NO_ACTION, *, WEST = 12, 11, 12, 1 -SWORDSMAN_L2, NO_ACTION, *, NORTH_WEST = 12, 11, 24, 1 -SWORDSMAN_L2, NO_ACTION, *, NORTH_EAST = 12, 11, 36, 1 -SWORDSMAN_L2, NO_ACTION, *, EAST = 12, 11, 48, 1 -SWORDSMAN_L2, NO_ACTION, *, SOUTH_EAST = 12, 11, 60, 1 - -SWORDSMAN_L2, ACTION1, *, SOUTH_WEST = 12, 13, 0, 12 -SWORDSMAN_L2, ACTION1, *, WEST = 12, 13, 12, 12 -SWORDSMAN_L2, ACTION1, *, NORTH_WEST = 12, 13, 24, 12 -SWORDSMAN_L2, ACTION1, *, NORTH_EAST = 12, 13, 36, 12 -SWORDSMAN_L2, ACTION1, *, EAST = 12, 13, 48, 12 -SWORDSMAN_L2, ACTION1, *, SOUTH_EAST = 12, 13, 60, 12 - - -SWORDSMAN_L3, WALKING, *, SOUTH_WEST = 12, 10, 0, 12 -SWORDSMAN_L3, WALKING, *, WEST = 12, 10, 12, 12 -SWORDSMAN_L3, WALKING, *, NORTH_WEST = 12, 10, 24, 12 -SWORDSMAN_L3, WALKING, *, NORTH_EAST = 12, 10, 36, 12 -SWORDSMAN_L3, WALKING, *, EAST = 12, 10, 48, 12 -SWORDSMAN_L3, WALKING, *, SOUTH_EAST = 12, 10, 60, 12 -SWORDSMAN_L3, NO_ACTION, *, SOUTH_WEST = 12, 10, 0, 1 -SWORDSMAN_L3, NO_ACTION, *, WEST = 12, 10, 12, 1 -SWORDSMAN_L3, NO_ACTION, *, NORTH_WEST = 12, 10, 24, 1 -SWORDSMAN_L3, NO_ACTION, *, NORTH_EAST = 12, 10, 36, 1 -SWORDSMAN_L3, NO_ACTION, *, EAST = 12, 10, 48, 1 -SWORDSMAN_L3, NO_ACTION, *, SOUTH_EAST = 12, 10, 60, 1 - -SWORDSMAN_L3, ACTION1, *, SOUTH_WEST = 12, 14, 0, 12 -SWORDSMAN_L3, ACTION1, *, WEST = 12, 14, 12, 12 -SWORDSMAN_L3, ACTION1, *, NORTH_WEST = 12, 14, 24, 12 -SWORDSMAN_L3, ACTION1, *, NORTH_EAST = 12, 14, 36, 12 -SWORDSMAN_L3, ACTION1, *, EAST = 12, 14, 48, 12 -SWORDSMAN_L3, ACTION1, *, SOUTH_EAST = 12, 14, 60, 12 +SETTLER_MATERIAL(SWORDSMAN_L1, *, 12, 9) +SETTLER_ACTION(SWORDSMAN_L1, ACTION1, *, 12, 12) + + +SETTLER_MATERIAL(SWORDSMAN_L2, *, 12, 11) +SETTLER_ACTION(SWORDSMAN_L2, ACTION1, *, 12, 13) + + +SETTLER_MATERIAL(SWORDSMAN_L3, *, 12, 10) +SETTLER_ACTION(SWORDSMAN_L3, ACTION1, *, 12, 14) ### # SWORDSMAN movables end ### @@ -2288,67 +898,16 @@ SWORDSMAN_L3, ACTION1, *, SOUTH_EAST = 12, 14, 60, 12 ### # PIKEMAN movables start ### -PIKEMAN_L1, WALKING, *, SOUTH_WEST = 12, 15, 0, 12 -PIKEMAN_L1, WALKING, *, WEST = 12, 15, 12, 12 -PIKEMAN_L1, WALKING, *, NORTH_WEST = 12, 15, 24, 12 -PIKEMAN_L1, WALKING, *, NORTH_EAST = 12, 15, 36, 12 -PIKEMAN_L1, WALKING, *, EAST = 12, 15, 48, 12 -PIKEMAN_L1, WALKING, *, SOUTH_EAST = 12, 15, 60, 12 -PIKEMAN_L1, NO_ACTION, *, SOUTH_WEST = 12, 15, 0, 1 -PIKEMAN_L1, NO_ACTION, *, WEST = 12, 15, 12, 1 -PIKEMAN_L1, NO_ACTION, *, NORTH_WEST = 12, 15, 24, 1 -PIKEMAN_L1, NO_ACTION, *, NORTH_EAST = 12, 15, 36, 1 -PIKEMAN_L1, NO_ACTION, *, EAST = 12, 15, 48, 1 -PIKEMAN_L1, NO_ACTION, *, SOUTH_EAST = 12, 15, 60, 1 - -PIKEMAN_L1, ACTION1, *, SOUTH_WEST = 12, 18, 0, 12 -PIKEMAN_L1, ACTION1, *, WEST = 12, 18, 12, 12 -PIKEMAN_L1, ACTION1, *, NORTH_WEST = 12, 18, 24, 12 -PIKEMAN_L1, ACTION1, *, NORTH_EAST = 12, 18, 36, 12 -PIKEMAN_L1, ACTION1, *, EAST = 12, 18, 48, 12 -PIKEMAN_L1, ACTION1, *, SOUTH_EAST = 12, 18, 60, 12 - - -PIKEMAN_L2, WALKING, *, SOUTH_WEST = 12, 17, 0, 12 -PIKEMAN_L2, WALKING, *, WEST = 12, 17, 12, 12 -PIKEMAN_L2, WALKING, *, NORTH_WEST = 12, 17, 24, 12 -PIKEMAN_L2, WALKING, *, NORTH_EAST = 12, 17, 36, 12 -PIKEMAN_L2, WALKING, *, EAST = 12, 17, 48, 12 -PIKEMAN_L2, WALKING, *, SOUTH_EAST = 12, 17, 60, 12 -PIKEMAN_L2, NO_ACTION, *, SOUTH_WEST = 12, 17, 0, 1 -PIKEMAN_L2, NO_ACTION, *, WEST = 12, 17, 12, 1 -PIKEMAN_L2, NO_ACTION, *, NORTH_WEST = 12, 17, 24, 1 -PIKEMAN_L2, NO_ACTION, *, NORTH_EAST = 12, 17, 36, 1 -PIKEMAN_L2, NO_ACTION, *, EAST = 12, 17, 48, 1 -PIKEMAN_L2, NO_ACTION, *, SOUTH_EAST = 12, 17, 60, 1 - -PIKEMAN_L2, ACTION1, *, SOUTH_WEST = 12, 19, 0, 12 -PIKEMAN_L2, ACTION1, *, WEST = 12, 19, 12, 12 -PIKEMAN_L2, ACTION1, *, NORTH_WEST = 12, 19, 24, 12 -PIKEMAN_L2, ACTION1, *, NORTH_EAST = 12, 19, 36, 12 -PIKEMAN_L2, ACTION1, *, EAST = 12, 19, 48, 12 -PIKEMAN_L2, ACTION1, *, SOUTH_EAST = 12, 19, 60, 12 - - -PIKEMAN_L3, WALKING, *, SOUTH_WEST = 12, 16, 0, 12 -PIKEMAN_L3, WALKING, *, WEST = 12, 16, 12, 12 -PIKEMAN_L3, WALKING, *, NORTH_WEST = 12, 16, 24, 12 -PIKEMAN_L3, WALKING, *, NORTH_EAST = 12, 16, 36, 12 -PIKEMAN_L3, WALKING, *, EAST = 12, 16, 48, 12 -PIKEMAN_L3, WALKING, *, SOUTH_EAST = 12, 16, 60, 12 -PIKEMAN_L3, NO_ACTION, *, SOUTH_WEST = 12, 16, 0, 1 -PIKEMAN_L3, NO_ACTION, *, WEST = 12, 16, 12, 1 -PIKEMAN_L3, NO_ACTION, *, NORTH_WEST = 12, 16, 24, 1 -PIKEMAN_L3, NO_ACTION, *, NORTH_EAST = 12, 16, 36, 1 -PIKEMAN_L3, NO_ACTION, *, EAST = 12, 16, 48, 1 -PIKEMAN_L3, NO_ACTION, *, SOUTH_EAST = 12, 16, 60, 1 - -PIKEMAN_L3, ACTION1, *, SOUTH_WEST = 12, 20, 0, 12 -PIKEMAN_L3, ACTION1, *, WEST = 12, 20, 12, 12 -PIKEMAN_L3, ACTION1, *, NORTH_WEST = 12, 20, 24, 12 -PIKEMAN_L3, ACTION1, *, NORTH_EAST = 12, 20, 36, 12 -PIKEMAN_L3, ACTION1, *, EAST = 12, 20, 48, 12 -PIKEMAN_L3, ACTION1, *, SOUTH_EAST = 12, 20, 60, 12 +SETTLER_MATERIAL(PIKEMAN_L1, *, 12, 15) +SETTLER_ACTION(PIKEMAN_L1, ACTION1, *, 12, 18) + + +SETTLER_MATERIAL(PIKEMAN_L2, *, 12, 17) +SETTLER_ACTION(PIKEMAN_L2, ACTION1, *, 12, 19) + + +SETTLER_MATERIAL(PIKEMAN_L3, *, 12, 16) +SETTLER_ACTION(PIKEMAN_L3, ACTION1, *, 12, 20) ### # PIKEMAN movables end ### @@ -2358,18 +917,7 @@ PIKEMAN_L3, ACTION1, *, SOUTH_EAST = 12, 20, 60, 12 ### # BOWMAN movables start ### -BOWMAN_L1, WALKING, *, SOUTH_WEST = 12, 21, 0, 12 -BOWMAN_L1, WALKING, *, WEST = 12, 21, 12, 12 -BOWMAN_L1, WALKING, *, NORTH_WEST = 12, 21, 24, 12 -BOWMAN_L1, WALKING, *, NORTH_EAST = 12, 21, 36, 12 -BOWMAN_L1, WALKING, *, EAST = 12, 21, 48, 12 -BOWMAN_L1, WALKING, *, SOUTH_EAST = 12, 21, 60, 12 -BOWMAN_L1, NO_ACTION, *, SOUTH_WEST = 12, 21, 0, 1 -BOWMAN_L1, NO_ACTION, *, WEST = 12, 21, 12, 1 -BOWMAN_L1, NO_ACTION, *, NORTH_WEST = 12, 21, 24, 1 -BOWMAN_L1, NO_ACTION, *, NORTH_EAST = 12, 21, 36, 1 -BOWMAN_L1, NO_ACTION, *, EAST = 12, 21, 48, 1 -BOWMAN_L1, NO_ACTION, *, SOUTH_EAST = 12, 21, 60, 1 +SETTLER_MATERIAL(BOWMAN_L1, *, 12, 21) BOWMAN_L1, ACTION1, *, SOUTH_WEST = 12, 24, 0, 24 BOWMAN_L1, ACTION1, *, WEST = 12, 24, 24, 24 @@ -2379,18 +927,7 @@ BOWMAN_L1, ACTION1, *, EAST = 12, 24, 96, 24 BOWMAN_L1, ACTION1, *, SOUTH_EAST = 12, 24, 120, 24 -BOWMAN_L2, WALKING, *, SOUTH_WEST = 12, 23, 0, 12 -BOWMAN_L2, WALKING, *, WEST = 12, 23, 12, 12 -BOWMAN_L2, WALKING, *, NORTH_WEST = 12, 23, 24, 12 -BOWMAN_L2, WALKING, *, NORTH_EAST = 12, 23, 36, 12 -BOWMAN_L2, WALKING, *, EAST = 12, 23, 48, 12 -BOWMAN_L2, WALKING, *, SOUTH_EAST = 12, 23, 60, 12 -BOWMAN_L2, NO_ACTION, *, SOUTH_WEST = 12, 23, 0, 1 -BOWMAN_L2, NO_ACTION, *, WEST = 12, 23, 12, 1 -BOWMAN_L2, NO_ACTION, *, NORTH_WEST = 12, 23, 24, 1 -BOWMAN_L2, NO_ACTION, *, NORTH_EAST = 12, 23, 36, 1 -BOWMAN_L2, NO_ACTION, *, EAST = 12, 23, 48, 1 -BOWMAN_L2, NO_ACTION, *, SOUTH_EAST = 12, 23, 60, 1 +SETTLER_MATERIAL(BOWMAN_L2, *, 12, 23) BOWMAN_L2, ACTION1, *, SOUTH_WEST = 12, 25, 0, 24 BOWMAN_L2, ACTION1, *, WEST = 12, 25, 24, 24 @@ -2400,18 +937,7 @@ BOWMAN_L2, ACTION1, *, EAST = 12, 25, 96, 24 BOWMAN_L2, ACTION1, *, SOUTH_EAST = 12, 25, 120, 24 -BOWMAN_L3, WALKING, *, SOUTH_WEST = 12, 22, 0, 12 -BOWMAN_L3, WALKING, *, WEST = 12, 22, 12, 12 -BOWMAN_L3, WALKING, *, NORTH_WEST = 12, 22, 24, 12 -BOWMAN_L3, WALKING, *, NORTH_EAST = 12, 22, 36, 12 -BOWMAN_L3, WALKING, *, EAST = 12, 22, 48, 12 -BOWMAN_L3, WALKING, *, SOUTH_EAST = 12, 22, 60, 12 -BOWMAN_L3, NO_ACTION, *, SOUTH_WEST = 12, 22, 0, 1 -BOWMAN_L3, NO_ACTION, *, WEST = 12, 22, 12, 1 -BOWMAN_L3, NO_ACTION, *, NORTH_WEST = 12, 22, 24, 1 -BOWMAN_L3, NO_ACTION, *, NORTH_EAST = 12, 22, 36, 1 -BOWMAN_L3, NO_ACTION, *, EAST = 12, 22, 48, 1 -BOWMAN_L3, NO_ACTION, *, SOUTH_EAST = 12, 22, 60, 1 +SETTLER_MATERIAL(BOWMAN_L3, *, 12, 22) BOWMAN_L3, ACTION1, *, SOUTH_WEST = 12, 26, 0, 24 BOWMAN_L3, ACTION1, *, WEST = 12, 26, 24, 24 diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt new file mode 100644 index 0000000000..20b2090fd3 --- /dev/null +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt @@ -0,0 +1,104 @@ +# this is a map: +# type, action, material, direction = file, sequence index, start, duration +# 'c' in "file" is just a placeholder for civilisation specific files +# c0 => 10 (ROMAN), 20 (EGYPTIAN), 30 (ASIAN) or 40 (AMAZON) +# See + +!SETTLER_ACTION type action mat file seq { +$type, $action, $mat, SOUTH_WEST = $file, $seq, 0, 12 +$type, $action, $mat, WEST = $file, $seq, 12, 12 +$type, $action, $mat, NORTH_WEST = $file, $seq, 24, 12 +$type, $action, $mat, NORTH_EAST = $file, $seq, 36, 12 +$type, $action, $mat, EAST = $file, $seq, 48, 12 +$type, $action, $mat, SOUTH_EAST = $file, $seq, 60, 12 +} + +!SETTLER_MATERIAL type mat file seq { +SETTLER_ACTION($type, WALKING, $mat, $file, $seq) + +$type, NO_ACTION, $mat, SOUTH_WEST = $file, $seq, 0, 1 +$type, NO_ACTION, $mat, WEST = $file, $seq, 12, 1 +$type, NO_ACTION, $mat, NORTH_WEST = $file, $seq, 24, 1 +$type, NO_ACTION, $mat, NORTH_EAST = $file, $seq, 36, 1 +$type, NO_ACTION, $mat, EAST = $file, $seq, 48, 1 +$type, NO_ACTION, $mat, SOUTH_EAST = $file, $seq, 60, 1 +} + +!SETTLER_BEND type mat file seq { +$type, BEND_DOWN, $mat, SOUTH_WEST = $file, $seq, 0, 4 +$type, BEND_DOWN, $mat, WEST = $file, $seq, 4, 4 +$type, BEND_DOWN, $mat, NORTH_WEST = $file, $seq, 8, 4 +$type, BEND_DOWN, $mat, NORTH_EAST = $file, $seq, 12, 4 +$type, BEND_DOWN, $mat, EAST = $file, $seq, 16, 4 +$type, BEND_DOWN, $mat, SOUTH_EAST = $file, $seq, 20, 4 +} + +!SETTLER_MOVE type action mat file seq { +$type, $action, $mat, SOUTH_WEST = $file, $seq, 3, -4 +$type, $action, $mat, WEST = $file, $seq, 7, -4 +$type, $action, $mat, NORTH_WEST = $file, $seq, 11, -4 +$type, $action, $mat, NORTH_EAST = $file, $seq, 15, -4 +$type, $action, $mat, EAST = $file, $seq, 19, -4 +$type, $action, $mat, SOUTH_EAST = $file, $seq, 23, -4 +} + +# common movables + +### +# BEARER movables start +### +SETTLER_MATERIAL(BEARER, NO_MATERIAL, c0, 0) +SETTLER_MATERIAL(BEARER, PLANK, c0, 1) +### +# BEARER movables end +### + +### +# DONKEY movables start +### +SETTLER_ACTION(DONKEY, WALKING, *, 6, 15) + +DONKEY, NO_ACTION, *, SOUTH_WEST = 6, 15, 72, 1 +DONKEY, NO_ACTION, *, WEST = 6, 15, 73, 1 +DONKEY, NO_ACTION, *, NORTH_WEST = 6, 15, 74, 1 +DONKEY, NO_ACTION, *, NORTH_EAST = 6, 15, 75, 1 +DONKEY, NO_ACTION, *, EAST = 6, 15, 76, 1 +DONKEY, NO_ACTION, *, SOUTH_EAST = 6, 15, 77, 1 + +SETTLER_ACTION(DONKEY, WALKING, NO_MATERIAL, 6, 15) + +DONKEY, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 6, 17, 72, 1 +DONKEY, NO_ACTION, NO_MATERIAL, WEST = 6, 17, 73, 1 +DONKEY, NO_ACTION, NO_MATERIAL, NORTH_WEST = 6, 17, 74, 1 +DONKEY, NO_ACTION, NO_MATERIAL, NORTH_EAST = 6, 17, 75, 1 +DONKEY, NO_ACTION, NO_MATERIAL, EAST = 6, 17, 76, 1 +DONKEY, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 6, 17, 77, 1 +### +# DONKEY movables end +### + + + +### +# WHITEFLAGGED_DONKEY movables start +### +SETTLER_ACTION(WHITEFLAGGED_DONKEY, WALKING, *, 6, 16) + +WHITEFLAGGED_DONKEY, NO_ACTION, *, SOUTH_WEST = 6, 16, 72, 1 +WHITEFLAGGED_DONKEY, NO_ACTION, *, WEST = 6, 16, 73, 1 +WHITEFLAGGED_DONKEY, NO_ACTION, *, NORTH_WEST = 6, 16, 74, 1 +WHITEFLAGGED_DONKEY, NO_ACTION, *, NORTH_EAST = 6, 16, 75, 1 +WHITEFLAGGED_DONKEY, NO_ACTION, *, EAST = 6, 16, 76, 1 +WHITEFLAGGED_DONKEY, NO_ACTION, *, SOUTH_EAST = 6, 16, 77, 1 + +SETTLER_ACTION(WHITEFLAGGED_DONKEY, WALKING, NO_MATERIAL, 6, 18) + +WHITEFLAGGED_DONKEY, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 6, 18, 72, 1 +WHITEFLAGGED_DONKEY, NO_ACTION, NO_MATERIAL, WEST = 6, 18, 73, 1 +WHITEFLAGGED_DONKEY, NO_ACTION, NO_MATERIAL, NORTH_WEST = 6, 18, 74, 1 +WHITEFLAGGED_DONKEY, NO_ACTION, NO_MATERIAL, NORTH_EAST = 6, 18, 75, 1 +WHITEFLAGGED_DONKEY, NO_ACTION, NO_MATERIAL, EAST = 6, 18, 76, 1 +WHITEFLAGGED_DONKEY, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 6, 18, 77, 1 +### +# WHITEFLAGGED_DONKEY movables end +### From 1b69da551f0142586301aa9630741f1b36ea1208 Mon Sep 17 00:00:00 2001 From: Paul Wedeck Date: Tue, 21 Apr 2020 20:06:50 +0200 Subject: [PATCH 09/21] add civ-specific BEARER animations and missing Materials --- .../common/material/EMaterialType.java | 27 ++++---- .../jsettlers/common/buildings/building.dtd | 3 +- .../draw/settlerimages/SettlerImageMap.java | 7 +-- .../draw/settlerimages/movables-AMAZON.txt | 35 +++++++++++ .../map/draw/settlerimages/movables-ASIAN.txt | 61 +++++++++++++++++++ .../draw/settlerimages/movables-EGYPTIAN.txt | 61 +++++++++++++++++++ .../map/draw/settlerimages/movables-ROMAN.txt | 3 +- .../map/draw/settlerimages/movables.txt | 4 ++ .../main/window/sidebar/ToolSidebar.java | 14 ++++- .../mapcreator/presetloader/preset.xsd | 3 +- 10 files changed, 193 insertions(+), 25 deletions(-) diff --git a/jsettlers.common/src/main/java/jsettlers/common/material/EMaterialType.java b/jsettlers.common/src/main/java/jsettlers/common/material/EMaterialType.java index 238d41dffc..1fa99cb67b 100644 --- a/jsettlers.common/src/main/java/jsettlers/common/material/EMaterialType.java +++ b/jsettlers.common/src/main/java/jsettlers/common/material/EMaterialType.java @@ -57,20 +57,19 @@ public enum EMaterialType { NO_MATERIAL((short) 0, 0, 0, false, -1, false), - MEAD((short) 90, 14, 126, false, -1, true), - HONEY((short) 89, 14, 129, false, -1, true), - GEMS((short) 79, 24, 120, false, -1, false), - SULFUR((short) 80, 34, 126, false, -1, false), - RICE((short) 78, 34, 129, false, -1, false), - KEG((short) 70, 34, 132, false, -1, false), - BOX((short) 82, 0, 0, false, -1, false), - - // ammo for cannon (6 frames instead of 8) - CANNON_AMMO((short) 86, 0, 0, false, -1, false), - // ammo for ballista (6 frames instead of 8) - BALLISTA_AMMO((short) 87, 0, 0, false, -1, false), - // ammo for catapult (6 frames instead of 8) - CATAPULT_AMMO((short) 88, 0, 0, false, -1, false), + MEAD((short) 90, 14, 126, true, -1, true), + HONEY((short) 89, 14, 129, true, -1, true), + GEMS((short) 79, 24, 120, true, -1, false), + SULFUR((short) 80, 34, 126, true, -1, false), + RICE((short) 78, 34, 129, true, -1, false), + KEG((short) 70, 34, 132, true, -1, false), + LIQUOR((short)71, 34, 132, true, -1, false), + GUN_POWDER((short) 82, 34, 135, true, -1, false), + + // ammo for siege weapons (6 frames instead of 8) + CANNON_AMMO((short) 86, 34, 249, false, -1, false), + BALLISTA_AMMO((short) 87, 24, 234, false, -1, false), + CATAPULT_AMMO((short) 88, 14, 240, false, -1, false), WHITE_BREAD((short) 0, 0, 0, false, -1, false), BASKET((short) 0, 0, 0, false, -1, false), diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/building.dtd b/jsettlers.common/src/main/resources/jsettlers/common/buildings/building.dtd index d7be33c66e..0580a7c602 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/building.dtd +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/building.dtd @@ -34,7 +34,8 @@ SULFUR| RICE| KEG| - BOX| + LIQUOR| + GUN_POWDER| CANNON_AMMO| BALLISTA_AMMO| CATAPULT_AMMO| diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/SettlerImageMap.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/SettlerImageMap.java index 2911f04c52..c9473338d9 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/SettlerImageMap.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/SettlerImageMap.java @@ -14,10 +14,7 @@ *******************************************************************************/ package jsettlers.graphics.map.draw.settlerimages; -import java.io.BufferedReader; import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -32,9 +29,9 @@ import jsettlers.graphics.map.draw.ImageProvider; /** - * This is a settler image map that mapps the state of a settler to the sequence that is to be played. + * This is a settler image map that maps the state of a settler to the sequence that is to be played. *

- * The mapping is a function: (type, material, direction) => (file, sequence index, start, duration) + * The mapping is a function: (civilisation, type, material, direction) => (file, sequence index, start, duration) * * @author michael */ diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-AMAZON.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-AMAZON.txt index e573c3de25..a122b081c8 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-AMAZON.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-AMAZON.txt @@ -4,3 +4,38 @@ SETTLER_MATERIAL(BEARER, STONE, 40, 2) SETTLER_MATERIAL(BEARER, PIG, 40, 3) +SETTLER_MATERIAL(BEARER, TRUNK, 40, 4) +SETTLER_MATERIAL(BEARER, BREAD, 40, 5) +SETTLER_MATERIAL(BEARER, COAL, 40, 6) +SETTLER_MATERIAL(BEARER, GOLDORE, 40, 7) +SETTLER_MATERIAL(BEARER, IRONORE, 40, 8) +SETTLER_MATERIAL(BEARER, FISH, 40, 9) +SETTLER_MATERIAL(BEARER, MEAT, 40, 10) +SETTLER_MATERIAL(BEARER, CROP, 40, 11) +SETTLER_MATERIAL(BEARER, FLOUR, 40, 12) +SETTLER_MATERIAL(BEARER, IRON, 40, 13) +SETTLER_MATERIAL(BEARER, GOLD, 40, 14) +SETTLER_MATERIAL(BEARER, WATER, 40, 15) +SETTLER_MATERIAL(BEARER, HAMMER, 40, 16) +SETTLER_MATERIAL(BEARER, PICK, 40, 17) +SETTLER_MATERIAL(BEARER, FISHINGROD, 40, 18) +SETTLER_MATERIAL(BEARER, SCYTHE, 40, 19) +SETTLER_MATERIAL(BEARER, SAW, 40, 20) +SETTLER_MATERIAL(BEARER, BLADE, 40, 21) +SETTLER_MATERIAL(BEARER, BOW, 40, 22) +SETTLER_MATERIAL(BEARER, SPEAR, 40, 23) +SETTLER_MATERIAL(BEARER, SWORD, 40, 24) +SETTLER_MATERIAL(BEARER, AXE, 40, 35) +#not actually wine but close enough +SETTLER_MATERIAL(BEARER, WINE, 40, 54) +#there is no KEG animation +#there is no GUN_POWDER animation +SETTLER_MATERIAL(BEARER, GEMS, 40, 57) +#there is no RICE animation +SETTLER_MATERIAL(BEARER, SULFUR, 40, 59) +#there is no LIQUOR animation +SETTLER_MATERIAL(BEARER, MEAD, 40, 54) +SETTLER_MATERIAL(BEARER, HONEY, 40, 60) + +SETTLER_BEND(BEARER, *, 40, 25) +# this are no more AMAZON BEND_DOWN animations diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ASIAN.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ASIAN.txt index 6ed12883b1..70b03a6efa 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ASIAN.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ASIAN.txt @@ -2,5 +2,66 @@ # type, action, material, direction = file, sequence index, start, duration # See +SETTLER_MATERIAL(BEARER, STONE, 30, 19) SETTLER_MATERIAL(BEARER, PIG, 30, 2) +SETTLER_MATERIAL(BEARER, TRUNK, 30, 20) SETTLER_MATERIAL(BEARER, BREAD, 30, 3) +SETTLER_MATERIAL(BEARER, COAL, 30, 4) +SETTLER_MATERIAL(BEARER, GOLDORE, 30, 5) +SETTLER_MATERIAL(BEARER, IRONORE, 30, 6) +SETTLER_MATERIAL(BEARER, FISH, 30, 7) +SETTLER_MATERIAL(BEARER, MEAT, 30, 8) +SETTLER_MATERIAL(BEARER, CROP, 30, 9) +SETTLER_MATERIAL(BEARER, FLOUR, 30, 28) +SETTLER_MATERIAL(BEARER, IRON, 30, 10) +SETTLER_MATERIAL(BEARER, GOLD, 30, 11) +SETTLER_MATERIAL(BEARER, WATER, 30, 12) +SETTLER_MATERIAL(BEARER, HAMMER, 30, 13) +SETTLER_MATERIAL(BEARER, PICK, 30, 14) +SETTLER_MATERIAL(BEARER, FISHINGROD, 30, 15) +SETTLER_MATERIAL(BEARER, SCYTHE, 30, 16) +SETTLER_MATERIAL(BEARER, SAW, 30, 17) +SETTLER_MATERIAL(BEARER, BLADE, 30, 18) +SETTLER_MATERIAL(BEARER, BOW, 30, 21) +SETTLER_MATERIAL(BEARER, SPEAR, 30, 22) +SETTLER_MATERIAL(BEARER, SWORD, 30, 23) +SETTLER_MATERIAL(BEARER, AXE, 30, 35) +SETTLER_MATERIAL(BEARER, WINE, 30, 60) +SETTLER_MATERIAL(BEARER, KEG, 30, 58) +SETTLER_MATERIAL(BEARER, GUN_POWDER, 30, 39) +SETTLER_MATERIAL(BEARER, GEMS, 30, 59) +SETTLER_MATERIAL(BEARER, RICE, 30, 36) +SETTLER_MATERIAL(BEARER, SULFUR, 30, 38) +SETTLER_MATERIAL(BEARER, LIQUOR, 30, 37) + + + + +BEARER, RAISE_UP, *, SOUTH_WEST = 30, 52, 5, 4 +BEARER, RAISE_UP, *, WEST = 30, 53, 5, 4 +BEARER, RAISE_UP, *, NORTH_WEST = 30, 54, 5, 4 +BEARER, RAISE_UP, *, NORTH_EAST = 30, 55, 5, 4 +BEARER, RAISE_UP, *, EAST = 30, 56, 5, 4 +BEARER, RAISE_UP, *, SOUTH_EAST = 30, 57, 5, 4 + +# animation is available if the bears something in his hands (in the front) +# throw with a sweep to the right of the settler +BEARER, ACTION1, *, SOUTH_WEST = 30, 52, 9, 9 +BEARER, ACTION1, *, WEST = 30, 53, 9, 9 +BEARER, ACTION1, *, NORTH_WEST = 30, 54, 9, 9 +BEARER, ACTION1, *, NORTH_EAST = 30, 55, 9, 9 +BEARER, ACTION1, *, EAST = 30, 56, 9, 9 +BEARER, ACTION1, *, SOUTH_EAST = 30, 57, 9, 9 + +SETTLER_BEND(BEARER, *, 30, 24) +SETTLER_BEND(BEARER, PLANK, 30, 25) +SETTLER_BEND(BEARER, TRUNK, 30, 26) +SETTLER_BEND(BEARER, STONE, 30, 27) +SETTLER_BEND(BEARER, MEAT, 30, 29) +SETTLER_BEND(BEARER, PIG, 30, 30) +SETTLER_BEND(BEARER, FLOUR, 30, 31) + +# SOUTH_WEST animation only +BEARER, BEND_DOWN, COAL, * = 30, 32, 0, 9 +BEARER, BEND_DOWN, GOLDORE, * = 30, 33, 0, 9 +BEARER, BEND_DOWN, IRONORE, * = 30, 34, 0, 9 diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-EGYPTIAN.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-EGYPTIAN.txt index 64ac6e0607..c7cf3e90c2 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-EGYPTIAN.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-EGYPTIAN.txt @@ -4,3 +4,64 @@ SETTLER_MATERIAL(BEARER, STONE, 20, 2) SETTLER_MATERIAL(BEARER, PIG, 20, 3) +SETTLER_MATERIAL(BEARER, TRUNK, 20, 4) +SETTLER_MATERIAL(BEARER, BREAD, 20, 5) +SETTLER_MATERIAL(BEARER, COAL, 20, 6) +SETTLER_MATERIAL(BEARER, GOLDORE, 20, 7) +SETTLER_MATERIAL(BEARER, IRONORE, 20, 8) +SETTLER_MATERIAL(BEARER, FISH, 20, 9) +SETTLER_MATERIAL(BEARER, MEAT, 20, 10) +SETTLER_MATERIAL(BEARER, CROP, 20, 11) +SETTLER_MATERIAL(BEARER, FLOUR, 20, 12) +SETTLER_MATERIAL(BEARER, IRON, 20, 13) +SETTLER_MATERIAL(BEARER, GOLD, 20, 14) +SETTLER_MATERIAL(BEARER, WATER, 20, 15) +SETTLER_MATERIAL(BEARER, HAMMER, 20, 16) +SETTLER_MATERIAL(BEARER, PICK, 20, 17) +SETTLER_MATERIAL(BEARER, FISHINGROD, 20, 18) +SETTLER_MATERIAL(BEARER, SCYTHE, 20, 19) +SETTLER_MATERIAL(BEARER, SAW, 20, 20) +SETTLER_MATERIAL(BEARER, BLADE, 20, 21) +SETTLER_MATERIAL(BEARER, BOW, 20, 22) +SETTLER_MATERIAL(BEARER, SPEAR, 20, 23) +SETTLER_MATERIAL(BEARER, SWORD, 20, 24) +SETTLER_MATERIAL(BEARER, AXE, 20, 36) +SETTLER_MATERIAL(BEARER, WINE, 20, 60) +SETTLER_MATERIAL(BEARER, KEG, 20, 35) +SETTLER_MATERIAL(BEARER, GUN_POWDER, 20, 57) +SETTLER_MATERIAL(BEARER, GEMS, 20, 37) +SETTLER_MATERIAL(BEARER, RICE, 20, 58) +SETTLER_MATERIAL(BEARER, SULFUR, 20, 59) +SETTLER_MATERIAL(BEARER, LIQUOR, 20, 56) + + + + +BEARER, RAISE_UP, *, SOUTH_WEST = 20, 50, 5, 4 +BEARER, RAISE_UP, *, WEST = 20, 51, 5, 4 +BEARER, RAISE_UP, *, NORTH_WEST = 20, 52, 5, 4 +BEARER, RAISE_UP, *, NORTH_EAST = 20, 53, 5, 4 +BEARER, RAISE_UP, *, EAST = 20, 54, 5, 4 +BEARER, RAISE_UP, *, SOUTH_EAST = 20, 55, 5, 4 + +# animation is available if the bears something in his hands (in the front) +# throw with a sweep to the right of the settler +BEARER, ACTION1, *, SOUTH_WEST = 20, 50, 9, 9 +BEARER, ACTION1, *, WEST = 20, 51, 9, 9 +BEARER, ACTION1, *, NORTH_WEST = 20, 52, 9, 9 +BEARER, ACTION1, *, NORTH_EAST = 20, 53, 9, 9 +BEARER, ACTION1, *, EAST = 20, 54, 9, 9 +BEARER, ACTION1, *, SOUTH_EAST = 20, 55, 9, 9 + +SETTLER_BEND(BEARER, *, 20, 25) +SETTLER_BEND(BEARER, PLANK, 20, 26) +SETTLER_BEND(BEARER, TRUNK, 20, 27) +SETTLER_BEND(BEARER, STONE, 20, 28) +SETTLER_BEND(BEARER, MEAT, 20, 29) +SETTLER_BEND(BEARER, PIG, 20, 30) +SETTLER_BEND(BEARER, FLOUR, 20, 31) + +# SOUTH_WEST animation only +BEARER, BEND_DOWN, COAL, * = 20, 32, 0, 9 +BEARER, BEND_DOWN, GOLDORE, * = 20, 33, 0, 9 +BEARER, BEND_DOWN, IRONORE, * = 20, 34, 0, 9 diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt index c35ab48d4c..05df725c59 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt @@ -34,10 +34,11 @@ SETTLER_MATERIAL(BEARER, SWORD, 10, 24) SETTLER_MATERIAL(BEARER, AXE, 10, 35) SETTLER_MATERIAL(BEARER, WINE, 10, 54) SETTLER_MATERIAL(BEARER, KEG, 10, 55) -SETTLER_MATERIAL(BEARER, BOX, 10, 56) +SETTLER_MATERIAL(BEARER, GUN_POWDER, 10, 56) SETTLER_MATERIAL(BEARER, GEMS, 10, 57) SETTLER_MATERIAL(BEARER, RICE, 10, 58) SETTLER_MATERIAL(BEARER, SULFUR, 10, 59) +SETTLER_MATERIAL(BEARER, LIQUOR, 10, 55) diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt index 20b2090fd3..ca066fef06 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt @@ -49,6 +49,10 @@ $type, $action, $mat, SOUTH_EAST = $file, $seq, 23, -4 ### SETTLER_MATERIAL(BEARER, NO_MATERIAL, c0, 0) SETTLER_MATERIAL(BEARER, PLANK, c0, 1) + +# only AMAZONs have MEAD and HONEY animations +SETTLER_MATERIAL(BEARER, MEAD, 40, 54) +SETTLER_MATERIAL(BEARER, HONEY, 40, 60) ### # BEARER movables end ### diff --git a/jsettlers.mapcreator/src/main/java/jsettlers/mapcreator/main/window/sidebar/ToolSidebar.java b/jsettlers.mapcreator/src/main/java/jsettlers/mapcreator/main/window/sidebar/ToolSidebar.java index d09ca8e539..19cb02102d 100644 --- a/jsettlers.mapcreator/src/main/java/jsettlers/mapcreator/main/window/sidebar/ToolSidebar.java +++ b/jsettlers.mapcreator/src/main/java/jsettlers/mapcreator/main/window/sidebar/ToolSidebar.java @@ -194,14 +194,18 @@ public abstract class ToolSidebar extends JPanel implements IPlayerSetter { new PlaceStackToolbox(EMaterialType.WATER, 8), new PlaceStackToolbox(EMaterialType.WINE, 8), new PlaceStackToolbox(EMaterialType.HONEY, 8), - new PlaceStackToolbox(EMaterialType.MEAD, 8) + new PlaceStackToolbox(EMaterialType.MEAD, 8), + new PlaceStackToolbox(EMaterialType.LIQUOR, 8), + new PlaceStackToolbox(EMaterialType.KEG, 8) }), new ToolBox(EditorLabels.getLabel("tools.category.mat-resources"), new ToolNode[] { new PlaceStackToolbox(EMaterialType.COAL, 8), new PlaceStackToolbox(EMaterialType.IRON, 8), new PlaceStackToolbox(EMaterialType.IRONORE, 8), new PlaceStackToolbox(EMaterialType.GOLD, 8), - new PlaceStackToolbox(EMaterialType.GOLDORE, 8) + new PlaceStackToolbox(EMaterialType.GOLDORE, 8), + new PlaceStackToolbox(EMaterialType.SULFUR, 8), + new PlaceStackToolbox(EMaterialType.GEMS, 8), }), new ToolBox(EditorLabels.getLabel("tools.category.mat-tools"), new ToolNode[] { new PlaceStackToolbox(EMaterialType.HAMMER, 8), @@ -215,7 +219,11 @@ public abstract class ToolSidebar extends JPanel implements IPlayerSetter { new ToolBox(EditorLabels.getLabel("tools.category.mat-weapons"), new ToolNode[] { new PlaceStackToolbox(EMaterialType.SWORD, 8), new PlaceStackToolbox(EMaterialType.BOW, 8), - new PlaceStackToolbox(EMaterialType.SPEAR, 8) + new PlaceStackToolbox(EMaterialType.SPEAR, 8), + new PlaceStackToolbox(EMaterialType.GUN_POWDER, 8), + new PlaceStackToolbox(EMaterialType.BALLISTA_AMMO, 6), + new PlaceStackToolbox(EMaterialType.CATAPULT_AMMO, 6), + new PlaceStackToolbox(EMaterialType.CANNON_AMMO, 6), }), }), new ToolBox(EditorLabels.getLabel("tools.category.buildings"), new ToolNode[] { diff --git a/jsettlers.mapcreator/src/main/java/jsettlers/mapcreator/presetloader/preset.xsd b/jsettlers.mapcreator/src/main/java/jsettlers/mapcreator/presetloader/preset.xsd index 745da1bb18..0ae4558915 100644 --- a/jsettlers.mapcreator/src/main/java/jsettlers/mapcreator/presetloader/preset.xsd +++ b/jsettlers.mapcreator/src/main/java/jsettlers/mapcreator/presetloader/preset.xsd @@ -116,7 +116,8 @@ - + + From 36c91cf3076a1fae441968966b522ab038676075 Mon Sep 17 00:00:00 2001 From: Paul Wedeck Date: Tue, 21 Apr 2020 20:07:57 +0200 Subject: [PATCH 10/21] fix empty donkey --- .../jsettlers/graphics/map/draw/settlerimages/movables.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt index ca066fef06..f0d120fe92 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt @@ -69,7 +69,7 @@ DONKEY, NO_ACTION, *, NORTH_EAST = 6, 15, 75, 1 DONKEY, NO_ACTION, *, EAST = 6, 15, 76, 1 DONKEY, NO_ACTION, *, SOUTH_EAST = 6, 15, 77, 1 -SETTLER_ACTION(DONKEY, WALKING, NO_MATERIAL, 6, 15) +SETTLER_ACTION(DONKEY, WALKING, NO_MATERIAL, 6, 17) DONKEY, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 6, 17, 72, 1 DONKEY, NO_ACTION, NO_MATERIAL, WEST = 6, 17, 73, 1 From e9fdcd77feedd8939d904199642264e47d3d4232 Mon Sep 17 00:00:00 2001 From: Paul Wedeck Date: Tue, 21 Apr 2020 20:19:20 +0200 Subject: [PATCH 11/21] add DIGGER animation --- .../map/draw/settlerimages/movables-AMAZON.txt | 14 ++++++++++++++ .../map/draw/settlerimages/movables-ASIAN.txt | 12 ++++++++++++ .../map/draw/settlerimages/movables-EGYPTIAN.txt | 12 ++++++++++++ .../map/draw/settlerimages/movables-ROMAN.txt | 8 -------- .../graphics/map/draw/settlerimages/movables.txt | 11 +++-------- 5 files changed, 41 insertions(+), 16 deletions(-) diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-AMAZON.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-AMAZON.txt index a122b081c8..d3d18496aa 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-AMAZON.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-AMAZON.txt @@ -37,5 +37,19 @@ SETTLER_MATERIAL(BEARER, SULFUR, 40, 59) SETTLER_MATERIAL(BEARER, MEAD, 40, 54) SETTLER_MATERIAL(BEARER, HONEY, 40, 60) +#there is no RAISE_UP or ACTION1 animation + SETTLER_BEND(BEARER, *, 40, 25) # this are no more AMAZON BEND_DOWN animations + + + +### +# DIGGER movables start +### +DIGGER, ACTION1, *, SOUTH_WEST = 41, 213, 0, 12 +DIGGER, ACTION1, *, WEST = 41, 214, 0, 12 +DIGGER, ACTION1, *, NORTH_WEST = 41, 215, 0, 12 +DIGGER, ACTION1, *, NORTH_EAST = 41, 216, 0, 12 +DIGGER, ACTION1, *, EAST = 41, 217, 0, 12 +DIGGER, ACTION1, *, SOUTH_EAST = 41, 218, 0, 12 diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ASIAN.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ASIAN.txt index 70b03a6efa..f26b76fc7e 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ASIAN.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ASIAN.txt @@ -65,3 +65,15 @@ SETTLER_BEND(BEARER, FLOUR, 30, 31) BEARER, BEND_DOWN, COAL, * = 30, 32, 0, 9 BEARER, BEND_DOWN, GOLDORE, * = 30, 33, 0, 9 BEARER, BEND_DOWN, IRONORE, * = 30, 34, 0, 9 + + + +### +# DIGGER movables start +### +DIGGER, ACTION1, *, SOUTH_WEST = 31, 212, 0, 12 +DIGGER, ACTION1, *, WEST = 31, 213, 0, 12 +DIGGER, ACTION1, *, NORTH_WEST = 31, 214, 0, 12 +DIGGER, ACTION1, *, NORTH_EAST = 31, 215, 0, 12 +DIGGER, ACTION1, *, EAST = 31, 216, 0, 12 +DIGGER, ACTION1, *, SOUTH_EAST = 31, 217, 0, 12 diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-EGYPTIAN.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-EGYPTIAN.txt index c7cf3e90c2..88161e8d07 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-EGYPTIAN.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-EGYPTIAN.txt @@ -65,3 +65,15 @@ SETTLER_BEND(BEARER, FLOUR, 20, 31) BEARER, BEND_DOWN, COAL, * = 20, 32, 0, 9 BEARER, BEND_DOWN, GOLDORE, * = 20, 33, 0, 9 BEARER, BEND_DOWN, IRONORE, * = 20, 34, 0, 9 + + + +### +# DIGGER movables start +### +DIGGER, ACTION1, *, SOUTH_WEST = 21, 194, 0, 12 +DIGGER, ACTION1, *, WEST = 21, 195, 0, 12 +DIGGER, ACTION1, *, NORTH_WEST = 21, 196, 0, 12 +DIGGER, ACTION1, *, NORTH_EAST = 21, 197, 0, 12 +DIGGER, ACTION1, *, EAST = 21, 198, 0, 12 +DIGGER, ACTION1, *, SOUTH_EAST = 21, 199, 0, 12 diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt index 05df725c59..d496617eb7 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt @@ -111,26 +111,18 @@ BEARER, BEND_DOWN, IRONORE, * = 10, 34, 0, 9 #BEARER, HOMELESS4, NO_MATERIAL, NORTH_EAST = 10, 45, 10, 5 #BEARER, HOMELESS4, NO_MATERIAL, EAST = 10, 46, 10, 5 #BEARER, HOMELESS4, NO_MATERIAL, SOUTH_EAST = 10, 47, 10, 5 -### -# BEARER movables end -### ### # DIGGER movables start ### -SETTLER_MATERIAL(DIGGER, *, 11, 13) - DIGGER, ACTION1, *, SOUTH_WEST = 11, 206, 0, 12 DIGGER, ACTION1, *, WEST = 11, 207, 0, 12 DIGGER, ACTION1, *, NORTH_WEST = 11, 208, 0, 12 DIGGER, ACTION1, *, NORTH_EAST = 11, 209, 0, 12 DIGGER, ACTION1, *, EAST = 11, 210, 0, 12 DIGGER, ACTION1, *, SOUTH_EAST = 11, 211, 0, 12 -### -# DIGGER movables end -### diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt index f0d120fe92..d2d30befb8 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt @@ -53,9 +53,11 @@ SETTLER_MATERIAL(BEARER, PLANK, c0, 1) # only AMAZONs have MEAD and HONEY animations SETTLER_MATERIAL(BEARER, MEAD, 40, 54) SETTLER_MATERIAL(BEARER, HONEY, 40, 60) + ### -# BEARER movables end +# DIGGER movables start ### +SETTLER_MATERIAL(DIGGER, *, c1, 13) ### # DONKEY movables start @@ -77,10 +79,6 @@ DONKEY, NO_ACTION, NO_MATERIAL, NORTH_WEST = 6, 17, 74, 1 DONKEY, NO_ACTION, NO_MATERIAL, NORTH_EAST = 6, 17, 75, 1 DONKEY, NO_ACTION, NO_MATERIAL, EAST = 6, 17, 76, 1 DONKEY, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 6, 17, 77, 1 -### -# DONKEY movables end -### - ### @@ -103,6 +101,3 @@ WHITEFLAGGED_DONKEY, NO_ACTION, NO_MATERIAL, NORTH_WEST = 6, 18, 74, 1 WHITEFLAGGED_DONKEY, NO_ACTION, NO_MATERIAL, NORTH_EAST = 6, 18, 75, 1 WHITEFLAGGED_DONKEY, NO_ACTION, NO_MATERIAL, EAST = 6, 18, 76, 1 WHITEFLAGGED_DONKEY, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 6, 18, 77, 1 -### -# WHITEFLAGGED_DONKEY movables end -### From 0edf0d3e4f4d49a871667a5024fdeb9dd5c0f042 Mon Sep 17 00:00:00 2001 From: Paul Wedeck Date: Tue, 21 Apr 2020 22:42:38 +0200 Subject: [PATCH 12/21] add SAWMILLER and DOCKWORKER --- .../draw/settlerimages/movables-AMAZON.txt | 28 +++++++++++++++++ .../map/draw/settlerimages/movables-ASIAN.txt | 28 +++++++++++++++++ .../draw/settlerimages/movables-EGYPTIAN.txt | 28 +++++++++++++++++ .../map/draw/settlerimages/movables-ROMAN.txt | 30 ------------------- .../map/draw/settlerimages/movables.txt | 30 +++++++++++++++++++ 5 files changed, 114 insertions(+), 30 deletions(-) diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-AMAZON.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-AMAZON.txt index d3d18496aa..ed374f783e 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-AMAZON.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-AMAZON.txt @@ -53,3 +53,31 @@ DIGGER, ACTION1, *, NORTH_WEST = 41, 215, 0, 12 DIGGER, ACTION1, *, NORTH_EAST = 41, 216, 0, 12 DIGGER, ACTION1, *, EAST = 41, 217, 0, 12 DIGGER, ACTION1, *, SOUTH_EAST = 41, 218, 0, 12 + + + +### +# DOCKWORKER movables start +### +DOCKWORKER, BEND_DOWN, NO_MATERIAL, SOUTH_WEST = 41, 219, 0, 4 +DOCKWORKER, BEND_DOWN, NO_MATERIAL, WEST = 41, 220, 0, 4 +DOCKWORKER, BEND_DOWN, NO_MATERIAL, NORTH_WEST = 41, 221, 0, 4 +DOCKWORKER, BEND_DOWN, NO_MATERIAL, NORTH_EAST = 41, 222, 0, 4 +DOCKWORKER, BEND_DOWN, NO_MATERIAL, EAST = 41, 223, 0, 4 +DOCKWORKER, BEND_DOWN, NO_MATERIAL, SOUTH_EAST = 41, 224, 0, 4 + +DOCKWORKER, RAISE_UP, PLANK, SOUTH_WEST = 41, 219, 4, 4 +DOCKWORKER, RAISE_UP, PLANK, WEST = 41, 220, 4, 4 +DOCKWORKER, RAISE_UP, PLANK, NORTH_WEST = 41, 221, 4, 4 +DOCKWORKER, RAISE_UP, PLANK, NORTH_EAST = 41, 222, 4, 4 +DOCKWORKER, RAISE_UP, PLANK, EAST = 41, 223, 4, 4 +DOCKWORKER, RAISE_UP, PLANK, SOUTH_EAST = 41, 224, 4, 4 + +DOCKWORKER, RAISE_UP, IRON, SOUTH_WEST = 41, 231, 4, 4 +DOCKWORKER, RAISE_UP, IRON, WEST = 41, 232, 4, 4 +DOCKWORKER, RAISE_UP, IRON, NORTH_WEST = 41, 233, 4, 4 +DOCKWORKER, RAISE_UP, IRON, NORTH_EAST = 41, 234, 4, 4 +DOCKWORKER, RAISE_UP, IRON, EAST = 41, 235, 4, 4 +DOCKWORKER, RAISE_UP, IRON, SOUTH_EAST = 41, 236, 4, 4 + +SETTLER_MATERIAL(DOCKWORKER, IRON, 41, 237) diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ASIAN.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ASIAN.txt index f26b76fc7e..02fc065094 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ASIAN.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ASIAN.txt @@ -77,3 +77,31 @@ DIGGER, ACTION1, *, NORTH_WEST = 31, 214, 0, 12 DIGGER, ACTION1, *, NORTH_EAST = 31, 215, 0, 12 DIGGER, ACTION1, *, EAST = 31, 216, 0, 12 DIGGER, ACTION1, *, SOUTH_EAST = 31, 217, 0, 12 + + + +### +# DOCKWORKER movables start +### +DOCKWORKER, BEND_DOWN, NO_MATERIAL, SOUTH_WEST = 31, 218, 0, 4 +DOCKWORKER, BEND_DOWN, NO_MATERIAL, WEST = 31, 219, 0, 4 +DOCKWORKER, BEND_DOWN, NO_MATERIAL, NORTH_WEST = 31, 220, 0, 4 +DOCKWORKER, BEND_DOWN, NO_MATERIAL, NORTH_EAST = 31, 221, 0, 4 +DOCKWORKER, BEND_DOWN, NO_MATERIAL, EAST = 31, 222, 0, 4 +DOCKWORKER, BEND_DOWN, NO_MATERIAL, SOUTH_EAST = 31, 223, 0, 4 + +DOCKWORKER, RAISE_UP, PLANK, SOUTH_WEST = 31, 218, 4, 4 +DOCKWORKER, RAISE_UP, PLANK, WEST = 31, 219, 4, 4 +DOCKWORKER, RAISE_UP, PLANK, NORTH_WEST = 31, 220, 4, 4 +DOCKWORKER, RAISE_UP, PLANK, NORTH_EAST = 31, 221, 4, 4 +DOCKWORKER, RAISE_UP, PLANK, EAST = 31, 222, 4, 4 +DOCKWORKER, RAISE_UP, PLANK, SOUTH_EAST = 31, 223, 4, 4 + +DOCKWORKER, RAISE_UP, IRON, SOUTH_WEST = 31, 230, 4, 4 +DOCKWORKER, RAISE_UP, IRON, WEST = 31, 231, 4, 4 +DOCKWORKER, RAISE_UP, IRON, NORTH_WEST = 31, 232, 4, 4 +DOCKWORKER, RAISE_UP, IRON, NORTH_EAST = 31, 233, 4, 4 +DOCKWORKER, RAISE_UP, IRON, EAST = 31, 234, 4, 4 +DOCKWORKER, RAISE_UP, IRON, SOUTH_EAST = 31, 235, 4, 4 + +SETTLER_MATERIAL(DOCKWORKER, IRON, 31, 236) diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-EGYPTIAN.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-EGYPTIAN.txt index 88161e8d07..878f3eef7a 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-EGYPTIAN.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-EGYPTIAN.txt @@ -77,3 +77,31 @@ DIGGER, ACTION1, *, NORTH_WEST = 21, 196, 0, 12 DIGGER, ACTION1, *, NORTH_EAST = 21, 197, 0, 12 DIGGER, ACTION1, *, EAST = 21, 198, 0, 12 DIGGER, ACTION1, *, SOUTH_EAST = 21, 199, 0, 12 + + + +### +# DOCKWORKER movables start +### +DOCKWORKER, BEND_DOWN, NO_MATERIAL, SOUTH_WEST = 21, 200, 0, 4 +DOCKWORKER, BEND_DOWN, NO_MATERIAL, WEST = 21, 201, 0, 4 +DOCKWORKER, BEND_DOWN, NO_MATERIAL, NORTH_WEST = 21, 202, 0, 4 +DOCKWORKER, BEND_DOWN, NO_MATERIAL, NORTH_EAST = 21, 203, 0, 4 +DOCKWORKER, BEND_DOWN, NO_MATERIAL, EAST = 21, 204, 0, 4 +DOCKWORKER, BEND_DOWN, NO_MATERIAL, SOUTH_EAST = 21, 205, 0, 4 + +DOCKWORKER, RAISE_UP, PLANK, SOUTH_WEST = 21, 200, 4, 4 +DOCKWORKER, RAISE_UP, PLANK, WEST = 21, 201, 4, 4 +DOCKWORKER, RAISE_UP, PLANK, NORTH_WEST = 21, 202, 4, 4 +DOCKWORKER, RAISE_UP, PLANK, NORTH_EAST = 21, 203, 4, 4 +DOCKWORKER, RAISE_UP, PLANK, EAST = 21, 204, 4, 4 +DOCKWORKER, RAISE_UP, PLANK, SOUTH_EAST = 21, 205, 4, 4 + +DOCKWORKER, RAISE_UP, IRON, SOUTH_WEST = 21, 213, 4, 4 +DOCKWORKER, RAISE_UP, IRON, WEST = 21, 214, 4, 4 +DOCKWORKER, RAISE_UP, IRON, NORTH_WEST = 21, 215, 4, 4 +DOCKWORKER, RAISE_UP, IRON, NORTH_EAST = 21, 216, 4, 4 +DOCKWORKER, RAISE_UP, IRON, EAST = 21, 217, 4, 4 +DOCKWORKER, RAISE_UP, IRON, SOUTH_EAST = 21, 218, 4, 4 + +SETTLER_MATERIAL(DOCKWORKER, IRON, 21, 212) diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt index d496617eb7..514592be84 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt @@ -126,36 +126,9 @@ DIGGER, ACTION1, *, SOUTH_EAST = 11, 211, 0, 12 -### -# SAWMILLER movables start -### -SETTLER_MATERIAL(SAWMILLER, PLANK, 11, 14) -SETTLER_BEND(SAWMILLER, PLANK, 11, 15) - -SETTLER_MATERIAL(SAWMILLER, TRUNK, 11, 16) -SETTLER_BEND(SAWMILLER, TRUNK, 11, 17) -SETTLER_BEND(SAWMILLER, *, 11, 18) - -SETTLER_MOVE(SAWMILLER, RAISE_UP, *, 11, 18) - -SETTLER_MATERIAL(SAWMILLER, NO_MATERIAL, 11, 19) - -SAWMILLER, ACTION1, *, * = 11, 20, 0, 10 -### -# SAWMILLER movables end -### - - - ### # DOCKWORKER movables start ### -SETTLER_MATERIAL(DOCKWORKER, NO_MATERIAL, 11, 21) - -SETTLER_ACTION(DOCKWORKER, ACTION1, *, 11, 22) - -SETTLER_MATERIAL(DOCKWORKER, PLANK, 11, 23) - DOCKWORKER, BEND_DOWN, NO_MATERIAL, SOUTH_WEST = 11, 212, 0, 4 DOCKWORKER, BEND_DOWN, NO_MATERIAL, WEST = 11, 213, 0, 4 DOCKWORKER, BEND_DOWN, NO_MATERIAL, NORTH_WEST = 11, 214, 0, 4 @@ -186,9 +159,6 @@ DOCKWORKER, RAISE_UP, IRON, EAST = 11, 228, 4, 4 DOCKWORKER, RAISE_UP, IRON, SOUTH_EAST = 11, 229, 4, 4 SETTLER_MATERIAL(DOCKWORKER, IRON, 11, 230) -### -# DOCKWORKER movables end -### diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt index d2d30befb8..ebdfcf9d3e 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt @@ -59,6 +59,36 @@ SETTLER_MATERIAL(BEARER, HONEY, 40, 60) ### SETTLER_MATERIAL(DIGGER, *, c1, 13) + +### +# SAWMILLER movables start +### +SETTLER_MATERIAL(SAWMILLER, PLANK, c1, 14) +SETTLER_BEND(SAWMILLER, PLANK, c1, 15) + +SETTLER_MATERIAL(SAWMILLER, TRUNK, c1, 16) +SETTLER_BEND(SAWMILLER, TRUNK, c1, 17) +SETTLER_BEND(SAWMILLER, *, c1, 18) + +SETTLER_MOVE(SAWMILLER, RAISE_UP, *, c1, 18) + +SETTLER_MATERIAL(SAWMILLER, NO_MATERIAL, c1, 19) + +SAWMILLER, ACTION1, *, * = c1, 20, 0, 10 + + + +### +# DOCKWORKER movables start +### +SETTLER_MATERIAL(DOCKWORKER, NO_MATERIAL, c1, 21) + +SETTLER_ACTION(DOCKWORKER, ACTION1, *, c1, 22) + +SETTLER_MATERIAL(DOCKWORKER, PLANK, c1, 23) + + + ### # DONKEY movables start ### From 5112c7b7cb1be240ca731e7f9373b9600313f84c Mon Sep 17 00:00:00 2001 From: Paul Wedeck Date: Wed, 22 Apr 2020 10:30:38 +0200 Subject: [PATCH 13/21] add some movables --- .../draw/settlerimages/movables-AMAZON.txt | 165 +++++++++++++++++- .../map/draw/settlerimages/movables-ASIAN.txt | 132 +++++++++++++- .../draw/settlerimages/movables-EGYPTIAN.txt | 127 ++++++++++++++ .../map/draw/settlerimages/movables-ROMAN.txt | 136 --------------- .../map/draw/settlerimages/movables.txt | 122 +++++++++++++ 5 files changed, 542 insertions(+), 140 deletions(-) diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-AMAZON.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-AMAZON.txt index ed374f783e..02b91f5c39 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-AMAZON.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-AMAZON.txt @@ -38,6 +38,13 @@ SETTLER_MATERIAL(BEARER, MEAD, 40, 54) SETTLER_MATERIAL(BEARER, HONEY, 40, 60) #there is no RAISE_UP or ACTION1 animation +#this is just BEND_DOWN in reverse +BEARER, RAISE_UP, *, SOUTH_WEST = 40, 25, 3, -4 +BEARER, RAISE_UP, *, WEST = 40, 25, 7, -4 +BEARER, RAISE_UP, *, NORTH_WEST = 40, 25, 11, -4 +BEARER, RAISE_UP, *, NORTH_EAST = 40, 25, 15, -4 +BEARER, RAISE_UP, *, EAST = 40, 25, 19, -4 +BEARER, RAISE_UP, *, SOUTH_EAST = 40, 25, 23, -4 SETTLER_BEND(BEARER, *, 40, 25) # this are no more AMAZON BEND_DOWN animations @@ -61,14 +68,14 @@ DIGGER, ACTION1, *, SOUTH_EAST = 41, 218, 0, 12 ### DOCKWORKER, BEND_DOWN, NO_MATERIAL, SOUTH_WEST = 41, 219, 0, 4 DOCKWORKER, BEND_DOWN, NO_MATERIAL, WEST = 41, 220, 0, 4 -DOCKWORKER, BEND_DOWN, NO_MATERIAL, NORTH_WEST = 41, 221, 0, 4 +DOCKWORKER, BEND_DOWN, NO_MATERIAL, NORTH_WEST = 41, 241, 0, 4 DOCKWORKER, BEND_DOWN, NO_MATERIAL, NORTH_EAST = 41, 222, 0, 4 DOCKWORKER, BEND_DOWN, NO_MATERIAL, EAST = 41, 223, 0, 4 DOCKWORKER, BEND_DOWN, NO_MATERIAL, SOUTH_EAST = 41, 224, 0, 4 DOCKWORKER, RAISE_UP, PLANK, SOUTH_WEST = 41, 219, 4, 4 DOCKWORKER, RAISE_UP, PLANK, WEST = 41, 220, 4, 4 -DOCKWORKER, RAISE_UP, PLANK, NORTH_WEST = 41, 221, 4, 4 +DOCKWORKER, RAISE_UP, PLANK, NORTH_WEST = 41, 241, 4, 4 DOCKWORKER, RAISE_UP, PLANK, NORTH_EAST = 41, 222, 4, 4 DOCKWORKER, RAISE_UP, PLANK, EAST = 41, 223, 4, 4 DOCKWORKER, RAISE_UP, PLANK, SOUTH_EAST = 41, 224, 4, 4 @@ -81,3 +88,157 @@ DOCKWORKER, RAISE_UP, IRON, EAST = 41, 235, 4, 4 DOCKWORKER, RAISE_UP, IRON, SOUTH_EAST = 41, 236, 4, 4 SETTLER_MATERIAL(DOCKWORKER, IRON, 41, 237) + + + +### +# SMITH movables start +### +SMITH, BEND_DOWN, *, NORTH_WEST = 41, 41, 0, 4 +SMITH, RAISE_UP, *, NORTH_WEST = 41, 41, 3, -4 + +SMITH, BEND_DOWN, *, NORTH_EAST = 41, 42, 0, 4 +SMITH, RAISE_UP, *, NORTH_EAST = 41, 42, 3, -4 + +SETTLER_MATERIAL(SMITH, IRON, 41, 43) + +# move iron in the fire - not used in the original game +SMITH, ACTION2, *, NORTH_WEST = 41, 44, 0, 8 +SMITH, ACTION2, *, NORTH_WEST = 41, 44, 7, -8 +SMITH, ACTION2, *, NORTH_EAST = 41, 45, 0, 8 +SMITH, ACTION2, *, NORTH_EAST = 41, 45, 7, -8 + +SETTLER_MATERIAL(SMITH, SWORD, 41, 46) + +# hammering at the anvil +SMITH, ACTION1, *, NORTH_WEST = 41, 48, 0, 12 +SMITH, ACTION1, *, NORTH_EAST = 41, 49, 0, 12 + + + +### +# MINER movables start +### +SETTLER_MATERIAL(MINER, COAL, 41, 51) + +# SOUTH_WEST animation only +MINER, BEND_DOWN, COAL, * = 41, 52, 0, 10 + +SETTLER_MATERIAL(MINER, GOLDORE, 41, 53) + +# SOUTH_WEST animation only +MINER, BEND_DOWN, GOLDORE, * = 41, 54, 0, 10 + +SETTLER_MATERIAL(MINER, IRONORE, 41, 55) + +# SOUTH_WEST animation only +MINER, BEND_DOWN, IRONORE, * = 41, 56, 0, 10 + +SETTLER_MATERIAL(MINER, SULFUR, 41, 57) + +# SOUTH_WEST animation only +MINER, BEND_DOWN, SULFUR, * = 41, 58, 0, 10 + +SETTLER_MATERIAL(MINER, GEMS, 41, 59) + +# SOUTH_WEST animation only +MINER, BEND_DOWN, GEMS, * = 41, 60, 0, 10 + +SETTLER_MATERIAL(MINER, NO_MATERIAL, 41, 61) +SETTLER_MATERIAL(MINER, BASKET, 41, 62) + +# SOUTH_WEST animation only +MINER, ACTION1, BASKET, * = 41, 63, 0, 32 +MINER, RAISE_UP, NO_MATERIAL, * = 41, 58, 0, 1 + +# washing his face in the river (if there is a river) +MINER, ACTION2, NO_MATERIAL, NORTH_WEST = 41, 209, 0, 24 +MINER, ACTION2, NO_MATERIAL, NORTH_EAST = 41, 210, 0, 24 + + + +### +# MELTER movables start +### +SETTLER_MATERIAL(MELTER, GOLDORE, 41, 64) + +MELTER, BEND_DOWN, GOLDORE, NORTH_WEST = 41, 65, 0, 4 +MELTER, RAISE_UP, GOLDORE, NORTH_WEST = 41, 65, 3, -4 +MELTER, BEND_DOWN, GOLDORE, NORTH_EAST = 41, 66, 0, 4 +MELTER, RAISE_UP, GOLDORE, NORTH_EAST = 41, 66, 3, -4 + +SETTLER_MATERIAL(MELTER, GOLD, 41, 67) +SETTLER_MATERIAL(MELTER, IRONORE, 41, 68) + +MELTER, BEND_DOWN, IRONORE, NORTH_WEST = 41, 69, 0, 4 +MELTER, RAISE_UP, IRONORE, NORTH_WEST = 41, 69, 3, -4 +MELTER, BEND_DOWN, IRONORE, NORTH_EAST = 41, 70, 0, 4 +MELTER, RAISE_UP, IRONORE, NORTH_EAST = 41, 70, 3, -4 + +SETTLER_MATERIAL(MELTER, NO_MATERIAL, 41, 71) + +MELTER, BEND_DOWN, *, NORTH_WEST = 41, 72, 0, 4 +MELTER, RAISE_UP, *, NORTH_WEST = 41, 72, 3, -4 +MELTER, BEND_DOWN, *, NORTH_EAST = 41, 73, 0, 4 +MELTER, RAISE_UP, *, NORTH_EAST = 41, 73, 3, -4 +MELTER, ACTION1, *, NORTH_WEST = 41, 72, 0, 1 +MELTER, ACTION1, *, NORTH_EAST = 41, 73, 0, 1 + +SETTLER_MATERIAL(MELTER, IRON, 41, 74) +SETTLER_MATERIAL(MELTER, COAL, 41, 128) + +MELTER, BEND_DOWN, COAL, NORTH_WEST = 41, 129, 0, 4 +MELTER, RAISE_UP, COAL, NORTH_WEST = 41, 129, 3, -4 +MELTER, BEND_DOWN, COAL, NORTH_EAST = 41, 130, 0, 4 +MELTER, RAISE_UP, COAL, NORTH_EAST = 41, 130, 3, -4 + + + +### +# MILLER movables start +### +SETTLER_MATERIAL(MILLER, NO_MATERIAL, 41, 75) + +MILLER, BEND_DOWN, NO_MATERIAL, NORTH_WEST = 41, 76, 0, 4 +MILLER, RAISE_UP, NO_MATERIAL, NORTH_WEST = 41, 76, 3, -4 +MILLER, BEND_DOWN, NO_MATERIAL, NORTH_EAST = 41, 77, 0, 4 +MILLER, RAISE_UP, NO_MATERIAL, NORTH_EAST = 41, 77, 3, -4 + +MILLER, RAISE_UP, CROP, NORTH_WEST = 41, 78, 0, 4 +MILLER, BEND_DOWN, CROP, NORTH_WEST = 41, 78, 3, -4 +MILLER, RAISE_UP, CROP, NORTH_EAST = 41, 79, 0, 4 +MILLER, BEND_DOWN, CROP, NORTH_EAST = 41, 79, 3, -4 + +SETTLER_MATERIAL(MILLER, CROP, 41, 80) +SETTLER_MATERIAL(MILLER, FLOUR, 41, 81) + +MILLER, BEND_DOWN, FLOUR, NORTH_WEST = 41, 82, 0, 4 +MILLER, RAISE_UP, FLOUR, NORTH_WEST = 41, 82, 3, -4 +MILLER, BEND_DOWN, FLOUR, NORTH_EAST = 41, 83, 0, 4 +MILLER, RAISE_UP, FLOUR, NORTH_EAST = 41, 83, 3, -4 + + + +### +# SLAUGHTERER movables start +### +SETTLER_MATERIAL(SLAUGHTERER, NO_MATERIAL, 41, 84) + +SLAUGHTERER, BEND_DOWN, *, NORTH_WEST = 41, 85, 0, 4 +SLAUGHTERER, RAISE_UP, *, NORTH_WEST = 41, 85, 3, -4 +SLAUGHTERER, BEND_DOWN, *, NORTH_EAST = 41, 86, 0, 4 +SLAUGHTERER, RAISE_UP, *, NORTH_EAST = 41, 86, 3, -4 + +SETTLER_MATERIAL(SLAUGHTERER, MEAT, 41, 87) + +SLAUGHTERER, BEND_DOWN, MEAT, NORTH_WEST = 41, 88, 0, 4 +SLAUGHTERER, RAISE_UP, MEAT, NORTH_WEST = 41, 88, 3, -4 +SLAUGHTERER, BEND_DOWN, MEAT, NORTH_EAST = 41, 89, 0, 4 +SLAUGHTERER, RAISE_UP, MEAT, NORTH_EAST = 41, 89, 3, -4 + +SETTLER_MATERIAL(SLAUGHTERER, PIG, 41, 90) + +SLAUGHTERER, BEND_DOWN, PIG, NORTH_WEST = 41, 91, 0, 4 +SLAUGHTERER, RAISE_UP, PIG, NORTH_WEST = 41, 91, 3, -4 +SLAUGHTERER, BEND_DOWN, PIG, NORTH_EAST = 41, 92, 0, 4 +SLAUGHTERER, RAISE_UP, PIG, NORTH_EAST = 41, 92, 3, -4 diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ASIAN.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ASIAN.txt index 02fc065094..8fac69c56f 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ASIAN.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ASIAN.txt @@ -86,14 +86,14 @@ DIGGER, ACTION1, *, SOUTH_EAST = 31, 217, 0, 12 DOCKWORKER, BEND_DOWN, NO_MATERIAL, SOUTH_WEST = 31, 218, 0, 4 DOCKWORKER, BEND_DOWN, NO_MATERIAL, WEST = 31, 219, 0, 4 DOCKWORKER, BEND_DOWN, NO_MATERIAL, NORTH_WEST = 31, 220, 0, 4 -DOCKWORKER, BEND_DOWN, NO_MATERIAL, NORTH_EAST = 31, 221, 0, 4 +DOCKWORKER, BEND_DOWN, NO_MATERIAL, NORTH_EAST = 31, 231, 0, 4 DOCKWORKER, BEND_DOWN, NO_MATERIAL, EAST = 31, 222, 0, 4 DOCKWORKER, BEND_DOWN, NO_MATERIAL, SOUTH_EAST = 31, 223, 0, 4 DOCKWORKER, RAISE_UP, PLANK, SOUTH_WEST = 31, 218, 4, 4 DOCKWORKER, RAISE_UP, PLANK, WEST = 31, 219, 4, 4 DOCKWORKER, RAISE_UP, PLANK, NORTH_WEST = 31, 220, 4, 4 -DOCKWORKER, RAISE_UP, PLANK, NORTH_EAST = 31, 221, 4, 4 +DOCKWORKER, RAISE_UP, PLANK, NORTH_EAST = 31, 231, 4, 4 DOCKWORKER, RAISE_UP, PLANK, EAST = 31, 222, 4, 4 DOCKWORKER, RAISE_UP, PLANK, SOUTH_EAST = 31, 223, 4, 4 @@ -105,3 +105,131 @@ DOCKWORKER, RAISE_UP, IRON, EAST = 31, 234, 4, 4 DOCKWORKER, RAISE_UP, IRON, SOUTH_EAST = 31, 235, 4, 4 SETTLER_MATERIAL(DOCKWORKER, IRON, 31, 236) + + + +### +# SMITH movables start +### +SMITH, BEND_DOWN, *, NORTH_WEST = 31, 47, 0, 4 +SMITH, RAISE_UP, *, NORTH_WEST = 31, 47, 3, -4 + +SMITH, BEND_DOWN, *, NORTH_EAST = 31, 48, 0, 4 +SMITH, RAISE_UP, *, NORTH_EAST = 31, 48, 3, -4 + +SETTLER_MATERIAL(SMITH, IRON, 31, 41) + +# move iron in the fire - not used in the original game +SMITH, ACTION2, *, NORTH_WEST = 31, 45, 0, 8 +SMITH, ACTION2, *, NORTH_WEST = 31, 45, 7, -8 +SMITH, ACTION2, *, NORTH_EAST = 31, 46, 0, 8 +SMITH, ACTION2, *, NORTH_EAST = 31, 46, 7, -8 + +SETTLER_MATERIAL(SMITH, SWORD, 31, 44) + +# hammering at the anvil +SMITH, ACTION1, *, NORTH_WEST = 31, 45, 0, 12 +SMITH, ACTION1, *, NORTH_EAST = 31, 46, 0, 12 + + + +### +# MINER movables start +### + +SETTLER_MATERIAL(MINER, SULFUR, 31, 167) + +# SOUTH_WEST animation only +MINER, BEND_DOWN, SULFUR, * = 31, 168, 0, 10 + +# washing his face in the river (if there is a river) +MINER, ACTION2, NO_MATERIAL, NORTH_WEST = 31, 208, 0, 24 +MINER, ACTION2, NO_MATERIAL, NORTH_EAST = 31, 209, 0, 24 + + + +### +# MELTER movables start +### +SETTLER_MATERIAL(MELTER, GOLDORE, 31, 76) + +MELTER, BEND_DOWN, GOLDORE, NORTH_WEST = 31, 77, 0, 4 +MELTER, RAISE_UP, GOLDORE, NORTH_WEST = 31, 77, 3, -4 +MELTER, BEND_DOWN, GOLDORE, NORTH_EAST = 31, 78, 0, 4 +MELTER, RAISE_UP, GOLDORE, NORTH_EAST = 31, 78, 3, -4 + +SETTLER_MATERIAL(MELTER, GOLD, 31, 79) +SETTLER_MATERIAL(MELTER, IRONORE, 31, 80) + +MELTER, BEND_DOWN, IRONORE, NORTH_WEST = 31, 81, 0, 4 +MELTER, RAISE_UP, IRONORE, NORTH_WEST = 31, 81, 3, -4 +MELTER, BEND_DOWN, IRONORE, NORTH_EAST = 31, 82, 0, 4 +MELTER, RAISE_UP, IRONORE, NORTH_EAST = 31, 82, 3, -4 + +SETTLER_MATERIAL(MELTER, NO_MATERIAL, 31, 84) + +MELTER, BEND_DOWN, *, NORTH_WEST = 31, 85, 0, 4 +MELTER, RAISE_UP, *, NORTH_WEST = 31, 85, 3, -4 +MELTER, BEND_DOWN, *, NORTH_EAST = 31, 86, 0, 4 +MELTER, RAISE_UP, *, NORTH_EAST = 31, 86, 3, -4 +MELTER, ACTION1, *, NORTH_WEST = 31, 85, 0, 1 +MELTER, ACTION1, *, NORTH_EAST = 31, 86, 0, 1 + +SETTLER_MATERIAL(MELTER, IRON, 31, 83) +SETTLER_MATERIAL(MELTER, COAL, 31, 122) + +MELTER, BEND_DOWN, COAL, NORTH_WEST = 31, 123, 0, 4 +MELTER, RAISE_UP, COAL, NORTH_WEST = 31, 123, 3, -4 +MELTER, BEND_DOWN, COAL, NORTH_EAST = 31, 124, 0, 4 +MELTER, RAISE_UP, COAL, NORTH_EAST = 31, 124, 3, -4 + + + +### +# MILLER movables start +### +SETTLER_MATERIAL(MILLER, NO_MATERIAL, 31, 58) + +MILLER, BEND_DOWN, NO_MATERIAL, NORTH_WEST = 31, 59, 0, 4 +MILLER, RAISE_UP, NO_MATERIAL, NORTH_WEST = 31, 59, 3, -4 +MILLER, BEND_DOWN, NO_MATERIAL, NORTH_EAST = 31, 60, 0, 4 +MILLER, RAISE_UP, NO_MATERIAL, NORTH_EAST = 31, 60, 3, -4 + +MILLER, RAISE_UP, CROP, NORTH_WEST = 31, 62, 0, 4 +MILLER, BEND_DOWN, CROP, NORTH_WEST = 31, 62, 3, -4 +MILLER, RAISE_UP, CROP, NORTH_EAST = 31, 63, 0, 4 +MILLER, BEND_DOWN, CROP, NORTH_EAST = 31, 63, 3, -4 + +SETTLER_MATERIAL(MILLER, CROP, 31, 61) +SETTLER_MATERIAL(MILLER, FLOUR, 31, 66) + +MILLER, BEND_DOWN, FLOUR, NORTH_WEST = 31, 64, 0, 4 +MILLER, RAISE_UP, FLOUR, NORTH_WEST = 31, 64, 3, -4 +MILLER, BEND_DOWN, FLOUR, NORTH_EAST = 31, 65, 0, 4 +MILLER, RAISE_UP, FLOUR, NORTH_EAST = 31, 65, 3, -4 + + + +### +# SLAUGHTERER movables start +### +SETTLER_MATERIAL(SLAUGHTERER, NO_MATERIAL, 31, 67) + +SLAUGHTERER, BEND_DOWN, *, NORTH_WEST = 31, 68, 0, 4 +SLAUGHTERER, RAISE_UP, *, NORTH_WEST = 31, 68, 3, -4 +SLAUGHTERER, BEND_DOWN, *, NORTH_EAST = 31, 69, 0, 4 +SLAUGHTERER, RAISE_UP, *, NORTH_EAST = 31, 69, 3, -4 + +SETTLER_MATERIAL(SLAUGHTERER, MEAT, 31, 73) + +SLAUGHTERER, BEND_DOWN, MEAT, NORTH_WEST = 31, 74, 0, 4 +SLAUGHTERER, RAISE_UP, MEAT, NORTH_WEST = 31, 74, 3, -4 +SLAUGHTERER, BEND_DOWN, MEAT, NORTH_EAST = 31, 75, 0, 4 +SLAUGHTERER, RAISE_UP, MEAT, NORTH_EAST = 31, 75, 3, -4 + +SETTLER_MATERIAL(SLAUGHTERER, PIG, 31, 70) + +SLAUGHTERER, BEND_DOWN, PIG, NORTH_WEST = 31, 71, 0, 4 +SLAUGHTERER, RAISE_UP, PIG, NORTH_WEST = 31, 71, 3, -4 +SLAUGHTERER, BEND_DOWN, PIG, NORTH_EAST = 31, 72, 0, 4 +SLAUGHTERER, RAISE_UP, PIG, NORTH_EAST = 31, 72, 3, -4 diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-EGYPTIAN.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-EGYPTIAN.txt index 878f3eef7a..1d133f23aa 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-EGYPTIAN.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-EGYPTIAN.txt @@ -105,3 +105,130 @@ DOCKWORKER, RAISE_UP, IRON, EAST = 21, 217, 4, 4 DOCKWORKER, RAISE_UP, IRON, SOUTH_EAST = 21, 218, 4, 4 SETTLER_MATERIAL(DOCKWORKER, IRON, 21, 212) + + + +### +# SMITH movables start +### +SMITH, BEND_DOWN, *, NORTH_WEST = 21, 42, 0, 4 +SMITH, RAISE_UP, *, NORTH_WEST = 21, 42, 3, -4 + +SMITH, BEND_DOWN, *, NORTH_EAST = 21, 43, 0, 4 +SMITH, RAISE_UP, *, NORTH_EAST = 21, 43, 3, -4 + +SETTLER_MATERIAL(SMITH, IRON, 21, 41) + +# move iron in the fire - not used in the original game +SMITH, ACTION2, *, NORTH_WEST = 21, 47, 0, 8 +SMITH, ACTION2, *, NORTH_WEST = 21, 47, 7, -8 +SMITH, ACTION2, *, NORTH_EAST = 21, 48, 0, 8 +SMITH, ACTION2, *, NORTH_EAST = 21, 48, 7, -8 + +SETTLER_MATERIAL(SMITH, SWORD, 21, 46) + +# hammering at the anvil +SMITH, ACTION1, *, NORTH_WEST = 21, 47, 0, 12 +SMITH, ACTION1, *, NORTH_EAST = 21, 48, 0, 12 + + + +### +# MINER movables start +### +SETTLER_MATERIAL(MINER, GEMS, 21, 174) + +# SOUTH_WEST animation only +MINER, BEND_DOWN, GEMS, * = 21, 175, 0, 10 + +# washing his face in the river (if there is a river) +MINER, ACTION2, NO_MATERIAL, NORTH_WEST = 21, 190, 0, 24 +MINER, ACTION2, NO_MATERIAL, NORTH_EAST = 21, 191, 0, 24 + + + +### +# MELTER movables start +### +SETTLER_MATERIAL(MELTER, GOLDORE, 21, 76) + +MELTER, BEND_DOWN, GOLDORE, NORTH_WEST = 21, 77, 0, 4 +MELTER, RAISE_UP, GOLDORE, NORTH_WEST = 21, 77, 3, -4 +MELTER, BEND_DOWN, GOLDORE, NORTH_EAST = 21, 78, 0, 4 +MELTER, RAISE_UP, GOLDORE, NORTH_EAST = 21, 78, 3, -4 + +SETTLER_MATERIAL(MELTER, GOLD, 21, 79) +SETTLER_MATERIAL(MELTER, IRONORE, 21, 80) + +MELTER, BEND_DOWN, IRONORE, NORTH_WEST = 21, 81, 0, 4 +MELTER, RAISE_UP, IRONORE, NORTH_WEST = 21, 81, 3, -4 +MELTER, BEND_DOWN, IRONORE, NORTH_EAST = 21, 82, 0, 4 +MELTER, RAISE_UP, IRONORE, NORTH_EAST = 21, 82, 3, -4 + +SETTLER_MATERIAL(MELTER, NO_MATERIAL, 21, 83) + +MELTER, BEND_DOWN, *, NORTH_WEST = 21, 84, 0, 4 +MELTER, RAISE_UP, *, NORTH_WEST = 21, 84, 3, -4 +MELTER, BEND_DOWN, *, NORTH_EAST = 21, 85, 0, 4 +MELTER, RAISE_UP, *, NORTH_EAST = 21, 85, 3, -4 +MELTER, ACTION1, *, NORTH_WEST = 21, 84, 0, 1 +MELTER, ACTION1, *, NORTH_EAST = 21, 85, 0, 1 + +SETTLER_MATERIAL(MELTER, IRON, 21, 86) +SETTLER_MATERIAL(MELTER, COAL, 21, 87) + +MELTER, BEND_DOWN, COAL, NORTH_WEST = 21, 88, 0, 4 +MELTER, RAISE_UP, COAL, NORTH_WEST = 21, 88, 3, -4 +MELTER, BEND_DOWN, COAL, NORTH_EAST = 21, 89, 0, 4 +MELTER, RAISE_UP, COAL, NORTH_EAST = 21, 89, 3, -4 + + + +### +# MILLER movables start +### +SETTLER_MATERIAL(MILLER, NO_MATERIAL, 21, 58) + +MILLER, BEND_DOWN, NO_MATERIAL, NORTH_WEST = 21, 59, 0, 4 +MILLER, RAISE_UP, NO_MATERIAL, NORTH_WEST = 21, 59, 3, -4 +MILLER, BEND_DOWN, NO_MATERIAL, NORTH_EAST = 21, 60, 0, 4 +MILLER, RAISE_UP, NO_MATERIAL, NORTH_EAST = 21, 60, 3, -4 + +MILLER, RAISE_UP, CROP, NORTH_WEST = 21, 62, 0, 4 +MILLER, BEND_DOWN, CROP, NORTH_WEST = 21, 62, 3, -4 +MILLER, RAISE_UP, CROP, NORTH_EAST = 21, 63, 0, 4 +MILLER, BEND_DOWN, CROP, NORTH_EAST = 21, 63, 3, -4 + +SETTLER_MATERIAL(MILLER, CROP, 21, 61) +SETTLER_MATERIAL(MILLER, FLOUR, 21, 66) + +MILLER, BEND_DOWN, FLOUR, NORTH_WEST = 21, 64, 0, 4 +MILLER, RAISE_UP, FLOUR, NORTH_WEST = 21, 64, 3, -4 +MILLER, BEND_DOWN, FLOUR, NORTH_EAST = 21, 65, 0, 4 +MILLER, RAISE_UP, FLOUR, NORTH_EAST = 21, 65, 3, -4 + + + +### +# SLAUGHTERER movables start +### +SETTLER_MATERIAL(SLAUGHTERER, NO_MATERIAL, 21, 67) + +SLAUGHTERER, BEND_DOWN, *, NORTH_WEST = 21, 68, 0, 4 +SLAUGHTERER, RAISE_UP, *, NORTH_WEST = 21, 68, 3, -4 +SLAUGHTERER, BEND_DOWN, *, NORTH_EAST = 21, 69, 0, 4 +SLAUGHTERER, RAISE_UP, *, NORTH_EAST = 21, 69, 3, -4 + +SETTLER_MATERIAL(SLAUGHTERER, MEAT, 21, 73) + +SLAUGHTERER, BEND_DOWN, MEAT, NORTH_WEST = 21, 74, 0, 4 +SLAUGHTERER, RAISE_UP, MEAT, NORTH_WEST = 21, 74, 3, -4 +SLAUGHTERER, BEND_DOWN, MEAT, NORTH_EAST = 21, 75, 0, 4 +SLAUGHTERER, RAISE_UP, MEAT, NORTH_EAST = 21, 75, 3, -4 + +SETTLER_MATERIAL(SLAUGHTERER, PIG, 21, 70) + +SLAUGHTERER, BEND_DOWN, PIG, NORTH_WEST = 21, 71, 0, 4 +SLAUGHTERER, RAISE_UP, PIG, NORTH_WEST = 21, 71, 3, -4 +SLAUGHTERER, BEND_DOWN, PIG, NORTH_EAST = 21, 72, 0, 4 +SLAUGHTERER, RAISE_UP, PIG, NORTH_EAST = 21, 72, 3, -4 diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt index 514592be84..be07a4238f 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt @@ -165,10 +165,6 @@ SETTLER_MATERIAL(DOCKWORKER, IRON, 11, 230) ### # BRICKLAYER movables start ### -SETTLER_MATERIAL(BRICKLAYER, NO_MATERIAL, 11, 21) - -SETTLER_ACTION(BRICKLAYER, ACTION1, *, 11, 22) - # this 218-223 1x1 copy of 22, checked on the gold edition ver. 1.60 #BRICKLAYER, ACTION1, *, SOUTH_WEST = 11, 218, 0, 12 #BRICKLAYER, ACTION1, *, WEST = 11, 219, 0, 12 @@ -176,105 +172,12 @@ SETTLER_ACTION(BRICKLAYER, ACTION1, *, 11, 22) #BRICKLAYER, ACTION1, *, NORTH_EAST = 11, 221, 0, 12 #BRICKLAYER, ACTION1, *, EAST = 11, 222, 0, 12 #BRICKLAYER, ACTION1, *, SOUTH_EAST = 11, 223, 0, 12 -### -# BRICKLAYER movables end -### - - - -### -# STONECUTTER movables start -### -SETTLER_MATERIAL(STONECUTTER, NO_MATERIAL, 11, 24) - -SETTLER_ACTION(STONECUTTER, ACTION1, *, 11, 25) - -SETTLER_MATERIAL(STONECUTTER, STONE, 11, 26) - -SETTLER_BEND(STONECUTTER, STONE, 11, 27) -SETTLER_MOVE(STONECUTTER, RAISE_UP, STONE, 11, 27) - -SETTLER_BEND(STONECUTTER, *, 11, 28) -SETTLER_MOVE(STONECUTTER, RAISE_UP, *, 11, 28) -### -# STONECUTTER movables end -### - - - -### -# LUMBERJACK movables start -### -SETTLER_MATERIAL(LUMBERJACK, *, 11, 29) - -LUMBERJACK, ACTION1, NO_MATERIAL, * = 11, 30, 0, 12 - -SETTLER_MATERIAL(LUMBERJACK, TRUNK, 11, 31) - -SETTLER_BEND(LUMBERJACK, *, 11, 33) - -LUMBERJACK, RAISE_UP, TRUNK, SOUTH_WEST = 11, 32, 0, 4 -LUMBERJACK, RAISE_UP, TRUNK, WEST = 11, 32, 4, 4 -LUMBERJACK, RAISE_UP, TRUNK, NORTH_WEST = 11, 32, 8, 4 -LUMBERJACK, RAISE_UP, TRUNK, NORTH_EAST = 11, 32, 12, 4 -LUMBERJACK, RAISE_UP, TRUNK, EAST = 11, 32, 16, 4 -LUMBERJACK, RAISE_UP, TRUNK, SOUTH_EAST = 11, 32, 20, 4 - -SETTLER_MOVE(LUMBERJACK, BEND_DOWN, TRUNK, 11, 32) -SETTLER_MOVE(LUMBERJACK, RAISE_UP, *, 11, 33) -### -# LUMBERJACK movables end -### - - - -### -# FORESTER movables start -### -SETTLER_MATERIAL(FORESTER, NO_MATERIAL, 11, 34) -SETTLER_MATERIAL(FORESTER, TREE, 11, 35) - -FORESTER, ACTION1, *, SOUTH_WEST = 11, 36, 0, 27 -FORESTER, ACTION1, *, WEST = 11, 36, 0, 27 -FORESTER, ACTION1, *, NORTH_WEST = 11, 36, 0, 27 -FORESTER, ACTION1, *, SOUTH_EAST = 11, 36, 27, 27 -FORESTER, ACTION1, *, EAST = 11, 36, 27, 27 -FORESTER, ACTION1, *, NORTH_EAST = 11, 36, 27, 27 -### -# FORESTER movables end -### - - - -### -# GEOLOGIST movables start -### -SETTLER_MATERIAL(GEOLOGIST, NO_MATERIAL, 11, 37) - -# setting signs -GEOLOGIST, ACTION2, NO_MATERIAL, * = 11, 38, 0, 16 - -# study rocks -GEOLOGIST, ACTION1, NO_MATERIAL, * = 11, 39, 0, 31 -### -# GEOLOGIST movables end -### ### # SMITH movables start ### -SETTLER_MATERIAL(SMITH, NO_MATERIAL, 11, 40) - -# action 3 is only smoke - the smith is standing still -SMITH, ACTION3, NO_MATERIAL, SOUTH_WEST = 11, 40, 0, 1 -SMITH, ACTION3, NO_MATERIAL, WEST = 11, 40, 12, 1 -SMITH, ACTION3, NO_MATERIAL, NORTH_WEST = 11, 40, 24, 1 -SMITH, ACTION3, NO_MATERIAL, NORTH_EAST = 11, 40, 36, 1 -SMITH, ACTION3, NO_MATERIAL, EAST = 11, 40, 48, 1 -SMITH, ACTION3, NO_MATERIAL, SOUTH_EAST = 11, 40, 60, 1 - SMITH, BEND_DOWN, *, NORTH_WEST = 11, 41, 0, 4 SMITH, RAISE_UP, *, NORTH_WEST = 11, 41, 3, -4 @@ -283,8 +186,6 @@ SMITH, RAISE_UP, *, NORTH_EAST = 11, 42, 3, -4 SETTLER_MATERIAL(SMITH, IRON, 11, 43) -SETTLER_ACTION(SMITH, WALKING, COAL, 11, 40) - # move iron in the fire - not used in the original game SMITH, ACTION2, *, NORTH_WEST = 11, 44, 0, 8 SMITH, ACTION2, *, NORTH_WEST = 11, 44, 7, -8 @@ -296,43 +197,15 @@ SETTLER_MATERIAL(SMITH, SWORD, 11, 46) # hammering at the anvil SMITH, ACTION1, *, NORTH_WEST = 11, 47, 0, 12 SMITH, ACTION1, *, NORTH_EAST = 11, 48, 0, 12 -### -# SMITH movables end -### ### # MINER movables start ### -SETTLER_MATERIAL(MINER, COAL, 11, 49) - -# SOUTH_WEST animation only -MINER, BEND_DOWN, COAL, * = 11, 50, 0, 10 - -SETTLER_MATERIAL(MINER, GOLDORE, 11, 51) - -# SOUTH_WEST animation only -MINER, BEND_DOWN, GOLDORE, * = 11, 52, 0, 10 - -SETTLER_MATERIAL(MINER, IRONORE, 11, 53) - -# SOUTH_WEST animation only -MINER, BEND_DOWN, IRONORE, * = 11, 54, 0, 10 - -SETTLER_MATERIAL(MINER, NO_MATERIAL, 11, 55) -SETTLER_MATERIAL(MINER, BASKET, 11, 56) - -# SOUTH_WEST animation only -MINER, ACTION1, BASKET, * = 11, 57, 0, 32 -MINER, RAISE_UP, NO_MATERIAL, * = 11, 55, 0, 1 - # washing his face in the river (if there is a river) MINER, ACTION2, NO_MATERIAL, NORTH_WEST = 11, 202, 0, 24 MINER, ACTION2, NO_MATERIAL, NORTH_EAST = 11, 203, 0, 24 -### -# MINER movables end -### @@ -370,9 +243,6 @@ MELTER, BEND_DOWN, COAL, NORTH_WEST = 11, 123, 0, 4 MELTER, RAISE_UP, COAL, NORTH_WEST = 11, 123, 3, -4 MELTER, BEND_DOWN, COAL, NORTH_EAST = 11, 124, 0, 4 MELTER, RAISE_UP, COAL, NORTH_EAST = 11, 124, 3, -4 -### -# MELTER movables end -### @@ -398,9 +268,6 @@ MILLER, BEND_DOWN, FLOUR, NORTH_WEST = 11, 76, 0, 4 MILLER, RAISE_UP, FLOUR, NORTH_WEST = 11, 76, 3, -4 MILLER, BEND_DOWN, FLOUR, NORTH_EAST = 11, 77, 0, 4 MILLER, RAISE_UP, FLOUR, NORTH_EAST = 11, 77, 3, -4 -### -# MILLER movables end -### @@ -427,9 +294,6 @@ SLAUGHTERER, BEND_DOWN, PIG, NORTH_WEST = 11, 85, 0, 4 SLAUGHTERER, RAISE_UP, PIG, NORTH_WEST = 11, 85, 3, -4 SLAUGHTERER, BEND_DOWN, PIG, NORTH_EAST = 11, 86, 0, 4 SLAUGHTERER, RAISE_UP, PIG, NORTH_EAST = 11, 86, 3, -4 -### -# SLAUGHTERER movables end -### diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt index ebdfcf9d3e..82d0f01a4e 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt @@ -89,6 +89,128 @@ SETTLER_MATERIAL(DOCKWORKER, PLANK, c1, 23) +### +# BRICKLAYER movables start +### +SETTLER_MATERIAL(BRICKLAYER, NO_MATERIAL, c1, 21) + +SETTLER_ACTION(BRICKLAYER, ACTION1, *, c1, 22) + + + +### +# STONECUTTER movables start +### +SETTLER_MATERIAL(STONECUTTER, NO_MATERIAL, c1, 24) + +SETTLER_ACTION(STONECUTTER, ACTION1, *, c1, 25) + +SETTLER_MATERIAL(STONECUTTER, STONE, c1, 26) + +SETTLER_BEND(STONECUTTER, STONE, c1, 27) +SETTLER_MOVE(STONECUTTER, RAISE_UP, STONE, c1, 27) + +SETTLER_BEND(STONECUTTER, *, c1, 28) +SETTLER_MOVE(STONECUTTER, RAISE_UP, *, c1, 28) + + + +### +# LUMBERJACK movables start +### +SETTLER_MATERIAL(LUMBERJACK, *, c1, 29) + +LUMBERJACK, ACTION1, NO_MATERIAL, * = c1, 30, 0, 12 + +SETTLER_MATERIAL(LUMBERJACK, TRUNK, c1, 31) + +SETTLER_BEND(LUMBERJACK, *, c1, 33) + +LUMBERJACK, RAISE_UP, TRUNK, SOUTH_WEST = c1, 32, 0, 4 +LUMBERJACK, RAISE_UP, TRUNK, WEST = c1, 32, 4, 4 +LUMBERJACK, RAISE_UP, TRUNK, NORTH_WEST = c1, 32, 8, 4 +LUMBERJACK, RAISE_UP, TRUNK, NORTH_EAST = c1, 32, 12, 4 +LUMBERJACK, RAISE_UP, TRUNK, EAST = c1, 32, 16, 4 +LUMBERJACK, RAISE_UP, TRUNK, SOUTH_EAST = c1, 32, 20, 4 + +SETTLER_MOVE(LUMBERJACK, BEND_DOWN, TRUNK, c1, 32) +SETTLER_MOVE(LUMBERJACK, RAISE_UP, *, c1, 33) + + + +### +# FORESTER movables start +### +SETTLER_MATERIAL(FORESTER, NO_MATERIAL, c1, 34) +SETTLER_MATERIAL(FORESTER, TREE, c1, 35) + +FORESTER, ACTION1, *, SOUTH_WEST = c1, 36, 0, 27 +FORESTER, ACTION1, *, WEST = c1, 36, 0, 27 +FORESTER, ACTION1, *, NORTH_WEST = c1, 36, 0, 27 +FORESTER, ACTION1, *, SOUTH_EAST = c1, 36, 27, 27 +FORESTER, ACTION1, *, EAST = c1, 36, 27, 27 +FORESTER, ACTION1, *, NORTH_EAST = c1, 36, 27, 27 + + + +### +# GEOLOGIST movables start +### +SETTLER_MATERIAL(GEOLOGIST, NO_MATERIAL, c1, 37) + +# setting signs +GEOLOGIST, ACTION2, NO_MATERIAL, * = c1, 38, 0, 16 + +# study rocks +GEOLOGIST, ACTION1, NO_MATERIAL, * = c1, 39, 0, 31 + + + +### +# SMITH movables start +### +SETTLER_MATERIAL(SMITH, NO_MATERIAL, c1, 40) + +# action 3 is only smoke - the smith is standing still +SMITH, ACTION3, NO_MATERIAL, SOUTH_WEST = c1, 40, 0, 1 +SMITH, ACTION3, NO_MATERIAL, WEST = c1, 40, 12, 1 +SMITH, ACTION3, NO_MATERIAL, NORTH_WEST = c1, 40, 24, 1 +SMITH, ACTION3, NO_MATERIAL, NORTH_EAST = c1, 40, 36, 1 +SMITH, ACTION3, NO_MATERIAL, EAST = c1, 40, 48, 1 +SMITH, ACTION3, NO_MATERIAL, SOUTH_EAST = c1, 40, 60, 1 + +SETTLER_ACTION(SMITH, WALKING, COAL, c1, 40) + + + +### +# MINER movables start +# only original civilisations +### +SETTLER_MATERIAL(MINER, COAL, c1, 49) + +# SOUTH_WEST animation only +MINER, BEND_DOWN, COAL, * = c1, 50, 0, 10 + +SETTLER_MATERIAL(MINER, GOLDORE, c1, 51) + +# SOUTH_WEST animation only +MINER, BEND_DOWN, GOLDORE, * = c1, 52, 0, 10 + +SETTLER_MATERIAL(MINER, IRONORE, c1, 53) + +# SOUTH_WEST animation only +MINER, BEND_DOWN, IRONORE, * = c1, 54, 0, 10 + +SETTLER_MATERIAL(MINER, NO_MATERIAL, c1, 55) +SETTLER_MATERIAL(MINER, BASKET, c1, 56) + +# SOUTH_WEST animation only +MINER, ACTION1, BASKET, * = c1, 57, 0, 32 +MINER, RAISE_UP, NO_MATERIAL, * = c1, 55, 0, 1 + + + ### # DONKEY movables start ### From b1f005b367436c1eb1e83e03e8aba31f905b8200 Mon Sep 17 00:00:00 2001 From: Paul Wedeck Date: Wed, 22 Apr 2020 10:32:07 +0200 Subject: [PATCH 14/21] Fix SLAUGHTERHOUSE drawing in MapCreator --- .../mapcreator/data/objects/BuildingContainer.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/jsettlers.mapcreator/src/main/java/jsettlers/mapcreator/data/objects/BuildingContainer.java b/jsettlers.mapcreator/src/main/java/jsettlers/mapcreator/data/objects/BuildingContainer.java index 4723a8d066..fd93030ff1 100644 --- a/jsettlers.mapcreator/src/main/java/jsettlers/mapcreator/data/objects/BuildingContainer.java +++ b/jsettlers.mapcreator/src/main/java/jsettlers/mapcreator/data/objects/BuildingContainer.java @@ -35,7 +35,7 @@ import jsettlers.logic.map.loading.data.objects.BuildingMapDataObject; import jsettlers.mapcreator.data.LandscapeConstraint; -public class BuildingContainer implements ObjectContainer, IBuilding, LandscapeConstraint, IBuilding.IMill, IBuilding.IOccupied { +public class BuildingContainer implements ObjectContainer, IBuilding, LandscapeConstraint, IBuilding.IMill, IBuilding.IOccupied, IBuilding.ISoundRequestable { private final BuildingMapDataObject buildingObject; private final ShortPoint2D position; @@ -174,4 +174,14 @@ public IMapObject getMapObject(EMapObjectType type) { public boolean cannotWork() { return false; } + + @Override + public boolean isSoundRequested() { + return false; + } + + @Override + public void requestSound() { + + } } From a005eae48f25699ff20d2e1f9fdff9298bad2622 Mon Sep 17 00:00:00 2001 From: Paul Wedeck Date: Wed, 22 Apr 2020 20:58:24 +0200 Subject: [PATCH 15/21] add FARMER, FISHERMAN and BAKER, fix some minor animation bugs --- .../jsettlers/common/buildings/baker.xml | 9 +- .../draw/settlerimages/movables-AMAZON.txt | 126 +++++++++++++++++- .../map/draw/settlerimages/movables-ASIAN.txt | 93 ++++++++++++- .../draw/settlerimages/movables-EGYPTIAN.txt | 97 +++++++++++++- .../map/draw/settlerimages/movables-ROMAN.txt | 74 ++++------ .../map/draw/settlerimages/movables.txt | 34 +++++ 6 files changed, 373 insertions(+), 60 deletions(-) diff --git a/jsettlers.common/src/main/resources/jsettlers/common/buildings/baker.xml b/jsettlers.common/src/main/resources/jsettlers/common/buildings/baker.xml index f07e690f5b..33e2b6394b 100644 --- a/jsettlers.common/src/main/resources/jsettlers/common/buildings/baker.xml +++ b/jsettlers.common/src/main/resources/jsettlers/common/buildings/baker.xml @@ -133,11 +133,12 @@ - + - - - + + + + diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-AMAZON.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-AMAZON.txt index 02b91f5c39..928c833960 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-AMAZON.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-AMAZON.txt @@ -41,7 +41,7 @@ SETTLER_MATERIAL(BEARER, HONEY, 40, 60) #this is just BEND_DOWN in reverse BEARER, RAISE_UP, *, SOUTH_WEST = 40, 25, 3, -4 BEARER, RAISE_UP, *, WEST = 40, 25, 7, -4 -BEARER, RAISE_UP, *, NORTH_WEST = 40, 25, 11, -4 +BEARER, RAISE_UP, *, NORTH_WEST = 40, 25, 11, -4 BEARER, RAISE_UP, *, NORTH_EAST = 40, 25, 15, -4 BEARER, RAISE_UP, *, EAST = 40, 25, 19, -4 BEARER, RAISE_UP, *, SOUTH_EAST = 40, 25, 23, -4 @@ -242,3 +242,127 @@ SLAUGHTERER, BEND_DOWN, PIG, NORTH_WEST = 41, 91, 0, 4 SLAUGHTERER, RAISE_UP, PIG, NORTH_WEST = 41, 91, 3, -4 SLAUGHTERER, BEND_DOWN, PIG, NORTH_EAST = 41, 92, 0, 4 SLAUGHTERER, RAISE_UP, PIG, NORTH_EAST = 41, 92, 3, -4 + + + +### +# FARMER movables start +### +SETTLER_MATERIAL(FARMER, CROP, 41, 93) + +FARMER, RAISE_UP, CROP, NORTH_WEST = 41, 94, 0, 4 +FARMER, BEND_DOWN, CROP, NORTH_WEST = 41, 94, 3, -4 +FARMER, RAISE_UP, CROP, NORTH_EAST = 41, 95, 0, 4 +FARMER, BEND_DOWN, CROP, NORTH_EAST = 41, 95, 3, -4 + +#first image of animation is a ROMAN for some reason :/ +FARMER, WALKING, NO_MATERIAL, SOUTH_WEST = 41, 96, 1, 12 +FARMER, WALKING, NO_MATERIAL, WEST = 41, 96, 14, 12 +FARMER, WALKING, NO_MATERIAL, NORTH_WEST = 41, 96, 27, 12 +FARMER, WALKING, NO_MATERIAL, NORTH_EAST = 41, 96, 40, 12 +FARMER, WALKING, NO_MATERIAL, EAST = 41, 96, 53, 12 +FARMER, WALKING, NO_MATERIAL, SOUTH_EAST = 41, 96, 66, 12 +FARMER, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 41, 96, 1, 1 +FARMER, NO_ACTION, NO_MATERIAL, WEST = 41, 96, 14, 1 +FARMER, NO_ACTION, NO_MATERIAL, NORTH_WEST = 41, 96, 27, 1 +FARMER, NO_ACTION, NO_MATERIAL, NORTH_EAST = 41, 96, 40, 1 +FARMER, NO_ACTION, NO_MATERIAL, EAST = 41, 96, 53, 1 +FARMER, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 41, 96, 66, 1 + +FARMER, BEND_DOWN, NO_MATERIAL, NORTH_WEST = 41, 97, 0, 4 +FARMER, RAISE_UP, NO_MATERIAL, NORTH_WEST = 41, 97, 3, -4 +FARMER, BEND_DOWN, NO_MATERIAL, NORTH_EAST = 41, 98, 0, 4 +FARMER, RAISE_UP, NO_MATERIAL, NORTH_EAST = 41, 98, 3, -4 + +SETTLER_MATERIAL(FARMER, PLANT, 41, 99) + +# sows the seeds +FARMER, ACTION2, *, SOUTH_WEST = 41, 100, 0, 12 +FARMER, ACTION2, *, NORTH_WEST = 41, 101, 0, 12 +FARMER, ACTION2, *, NORTH_EAST = 41, 102, 0, 12 +FARMER, ACTION2, *, SOUTH_EAST = 41, 103, 0, 12 + +SETTLER_MATERIAL(FARMER, SCYTHE, 41, 104) + +# cut +FARMER, ACTION1, *, SOUTH_WEST = 41, 105, 0, 12 +FARMER, ACTION1, *, NORTH_WEST = 41, 105, 12, 12 +FARMER, ACTION1, *, NORTH_EAST = 41, 105, 24, 12 +FARMER, ACTION1, *, SOUTH_EAST = 41, 105, 36, 12 + + + +### +# FISHERMAN movables start +### +SETTLER_MATERIAL(FISHERMAN, NO_MATERIAL, 41, 106) + +#ACTION1 - throws the bait +FISHERMAN, ACTION1, *, SOUTH_WEST = 41, 107, 0, 12 +FISHERMAN, ACTION1, *, WEST = 41, 108, 0, 12 +FISHERMAN, ACTION1, *, NORTH_WEST = 41, 109, 0, 12 +FISHERMAN, ACTION1, *, NORTH_EAST = 41, 110, 0, 12 +FISHERMAN, ACTION1, *, EAST = 41, 111, 0, 12 +FISHERMAN, ACTION1, *, SOUTH_EAST = 41, 112, 0, 12 + +#ACTION2 - fish off the hook, fell on the ass, got up and continue fishing +FISHERMAN, ACTION2, *, SOUTH_WEST = 41, 113, 0, 24 +FISHERMAN, ACTION2, *, WEST = 41, 114, 0, 24 +FISHERMAN, ACTION2, *, NORTH_WEST = 41, 115, 0, 24 +FISHERMAN, ACTION2, *, NORTH_EAST = 41, 116, 0, 24 +FISHERMAN, ACTION2, *, EAST = 41, 117, 0, 24 +FISHERMAN, ACTION2, *, SOUTH_EAST = 41, 118, 0, 24 + +#ACTION3 - caught fish successfully +FISHERMAN, ACTION3, *, SOUTH_WEST = 41, 120, 0, 12 +FISHERMAN, ACTION3, *, WEST = 41, 121, 0, 12 +FISHERMAN, ACTION3, *, NORTH_WEST = 41, 122, 0, 12 +FISHERMAN, ACTION3, *, NORTH_EAST = 41, 123, 0, 12 +FISHERMAN, ACTION3, *, EAST = 41, 124, 0, 12 +FISHERMAN, ACTION3, *, SOUTH_EAST = 41, 125, 0, 12 + +SETTLER_MATERIAL(FISHERMAN, FISH, 41, 119) + +FISHERMAN, BEND_DOWN, FISH, SOUTH_WEST = 41, 126, 0, 4 +FISHERMAN, RAISE_UP, FISH, SOUTH_WEST = 41, 126, 3, -4 +FISHERMAN, BEND_DOWN, NO_MATERIAL, SOUTH_WEST = 41, 126, 7, -4 +FISHERMAN, RAISE_UP, NO_MATERIAL, SOUTH_WEST = 41, 126, 4, 4 + +FISHERMAN, BEND_DOWN, FISH, SOUTH_EAST = 41, 127, 0, 4 +FISHERMAN, RAISE_UP, FISH, SOUTH_EAST = 41, 127, 3, -4 +FISHERMAN, BEND_DOWN, NO_MATERIAL, SOUTH_EAST = 41, 127, 7, -4 +FISHERMAN, RAISE_UP, NO_MATERIAL, SOUTH_EAST = 41, 127, 4, 4 + + + +### +# BAKER movables start +### +SETTLER_MATERIAL(BAKER, BLADE, 41, 131) +SETTLER_MATERIAL(BAKER, WHITE_BREAD, 41, 132) +SETTLER_MATERIAL(BAKER, BREAD, 41, 133) + +BAKER, ACTION1, WHITE_BREAD, NORTH_WEST = 41, 134, 0, 12 +BAKER, ACTION1, WHITE_BREAD, NORTH_EAST = 41, 135, 0, 12 + +BAKER, ACTION1, BREAD, NORTH_WEST = 41, 136, 11, -12 +BAKER, ACTION1, BREAD, NORTH_EAST = 41, 137, 11, -12 + +SETTLER_MATERIAL(BAKER, FLOUR, 41, 138) +SETTLER_MATERIAL(BAKER, WATER, 41, 139) +SETTLER_MATERIAL(BAKER, NO_MATERIAL, 41, 140) + +BAKER, BEND_DOWN, *, NORTH_WEST = 41, 141, 0, 4 +BAKER, RAISE_UP, *, NORTH_WEST = 41, 141, 3, -4 +BAKER, BEND_DOWN, *, NORTH_EAST = 41, 142, 0, 4 +BAKER, RAISE_UP, *, NORTH_EAST = 41, 142, 3, -4 + +BAKER, BEND_DOWN, WATER, NORTH_WEST = 41, 143, 0, 4 +BAKER, RAISE_UP, WATER, NORTH_WEST = 41, 143, 3, -4 +BAKER, BEND_DOWN, WATER, NORTH_EAST = 41, 144, 0, 4 +BAKER, RAISE_UP, WATER, NORTH_EAST = 41, 144, 3, -4 + +BAKER, RAISE_UP, FLOUR, NORTH_WEST = 41, 145, 3, -4 +BAKER, BEND_DOWN, FLOUR, NORTH_WEST = 41, 145, 0, 4 +BAKER, RAISE_UP, FLOUR, NORTH_EAST = 41, 146, 3, -4 +BAKER, BEND_DOWN, FLOUR, NORTH_EAST = 41, 146, 0, 4 diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ASIAN.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ASIAN.txt index 8fac69c56f..87539eef27 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ASIAN.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ASIAN.txt @@ -86,14 +86,14 @@ DIGGER, ACTION1, *, SOUTH_EAST = 31, 217, 0, 12 DOCKWORKER, BEND_DOWN, NO_MATERIAL, SOUTH_WEST = 31, 218, 0, 4 DOCKWORKER, BEND_DOWN, NO_MATERIAL, WEST = 31, 219, 0, 4 DOCKWORKER, BEND_DOWN, NO_MATERIAL, NORTH_WEST = 31, 220, 0, 4 -DOCKWORKER, BEND_DOWN, NO_MATERIAL, NORTH_EAST = 31, 231, 0, 4 +DOCKWORKER, BEND_DOWN, NO_MATERIAL, NORTH_EAST = 31, 221, 0, 4 DOCKWORKER, BEND_DOWN, NO_MATERIAL, EAST = 31, 222, 0, 4 DOCKWORKER, BEND_DOWN, NO_MATERIAL, SOUTH_EAST = 31, 223, 0, 4 DOCKWORKER, RAISE_UP, PLANK, SOUTH_WEST = 31, 218, 4, 4 DOCKWORKER, RAISE_UP, PLANK, WEST = 31, 219, 4, 4 DOCKWORKER, RAISE_UP, PLANK, NORTH_WEST = 31, 220, 4, 4 -DOCKWORKER, RAISE_UP, PLANK, NORTH_EAST = 31, 231, 4, 4 +DOCKWORKER, RAISE_UP, PLANK, NORTH_EAST = 31, 221, 4, 4 DOCKWORKER, RAISE_UP, PLANK, EAST = 31, 222, 4, 4 DOCKWORKER, RAISE_UP, PLANK, SOUTH_EAST = 31, 223, 4, 4 @@ -233,3 +233,92 @@ SLAUGHTERER, BEND_DOWN, PIG, NORTH_WEST = 31, 71, 0, 4 SLAUGHTERER, RAISE_UP, PIG, NORTH_WEST = 31, 71, 3, -4 SLAUGHTERER, BEND_DOWN, PIG, NORTH_EAST = 31, 72, 0, 4 SLAUGHTERER, RAISE_UP, PIG, NORTH_EAST = 31, 72, 3, -4 + + + +### +# FARMER movables start +### +SETTLER_MATERIAL(FARMER, CROP, 31, 87) + +FARMER, RAISE_UP, CROP, NORTH_WEST = 31, 88, 0, 4 +FARMER, BEND_DOWN, CROP, NORTH_WEST = 31, 88, 3, -4 +FARMER, RAISE_UP, CROP, NORTH_EAST = 31, 89, 0, 4 +FARMER, BEND_DOWN, CROP, NORTH_EAST = 31, 89, 3, -4 + +FARMER, WALKING, NO_MATERIAL, SOUTH_WEST = 31, 90, 0, 13 +FARMER, WALKING, NO_MATERIAL, WEST = 31, 90, 13, 13 +FARMER, WALKING, NO_MATERIAL, NORTH_WEST = 31, 90, 26, 13 +FARMER, WALKING, NO_MATERIAL, NORTH_EAST = 31, 90, 39, 13 +FARMER, WALKING, NO_MATERIAL, EAST = 31, 90, 52, 13 +FARMER, WALKING, NO_MATERIAL, SOUTH_EAST = 31, 90, 65, 13 +FARMER, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 31, 90, 0, 1 +FARMER, NO_ACTION, NO_MATERIAL, WEST = 31, 90, 13, 1 +FARMER, NO_ACTION, NO_MATERIAL, NORTH_WEST = 31, 90, 26, 1 +FARMER, NO_ACTION, NO_MATERIAL, NORTH_EAST = 31, 90, 39, 1 +FARMER, NO_ACTION, NO_MATERIAL, EAST = 31, 90, 52, 1 +FARMER, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 31, 90, 65, 1 + +FARMER, BEND_DOWN, NO_MATERIAL, NORTH_WEST = 31, 91, 0, 4 +FARMER, RAISE_UP, NO_MATERIAL, NORTH_WEST = 31, 91, 3, -4 +FARMER, BEND_DOWN, NO_MATERIAL, NORTH_EAST = 31, 92, 0, 4 +FARMER, RAISE_UP, NO_MATERIAL, NORTH_EAST = 31, 92, 3, -4 + +SETTLER_MATERIAL(FARMER, PLANT, 31, 93) + +# sows the seeds +FARMER, ACTION2, *, SOUTH_WEST = 31, 94, 0, 12 +FARMER, ACTION2, *, NORTH_WEST = 31, 95, 0, 12 +FARMER, ACTION2, *, NORTH_EAST = 31, 96, 0, 12 +FARMER, ACTION2, *, SOUTH_EAST = 31, 97, 0, 12 + +SETTLER_MATERIAL(FARMER, SCYTHE, 31, 98) + +# cut +FARMER, ACTION1, *, SOUTH_WEST = 31, 99, 0, 12 +FARMER, ACTION1, *, NORTH_WEST = 31, 99, 12, 12 +FARMER, ACTION1, *, NORTH_EAST = 31, 99, 24, 12 +FARMER, ACTION1, *, SOUTH_EAST = 31, 99, 36, 12 + + + +### +# FISHERMAN movables start +### +SETTLER_MATERIAL(FISHERMAN, NO_MATERIAL, 31, 100) + +#ACTION1 - throws the bait +FISHERMAN, ACTION1, *, SOUTH_WEST = 31, 101, 0, 12 +FISHERMAN, ACTION1, *, WEST = 31, 102, 0, 12 +FISHERMAN, ACTION1, *, NORTH_WEST = 31, 103, 0, 12 +FISHERMAN, ACTION1, *, NORTH_EAST = 31, 104, 0, 12 +FISHERMAN, ACTION1, *, EAST = 31, 105, 0, 12 +FISHERMAN, ACTION1, *, SOUTH_EAST = 31, 106, 0, 12 + +#ACTION2 - fish off the hook, fell on the ass, got up and continue fishing +FISHERMAN, ACTION2, *, SOUTH_WEST = 31, 107, 0, 24 +FISHERMAN, ACTION2, *, WEST = 31, 108, 0, 24 +FISHERMAN, ACTION2, *, NORTH_WEST = 31, 109, 0, 24 +FISHERMAN, ACTION2, *, NORTH_EAST = 31, 110, 0, 24 +FISHERMAN, ACTION2, *, EAST = 31, 111, 0, 24 +FISHERMAN, ACTION2, *, SOUTH_EAST = 31, 112, 0, 24 + +#ACTION3 - caught fish successfully +FISHERMAN, ACTION3, *, SOUTH_WEST = 31, 116, 0, 12 +FISHERMAN, ACTION3, *, WEST = 31, 117, 0, 12 +FISHERMAN, ACTION3, *, NORTH_WEST = 31, 118, 0, 12 +FISHERMAN, ACTION3, *, NORTH_EAST = 31, 119, 0, 12 +FISHERMAN, ACTION3, *, EAST = 31, 120, 0, 12 +FISHERMAN, ACTION3, *, SOUTH_EAST = 31, 121, 0, 12 + +SETTLER_MATERIAL(FISHERMAN, FISH, 31, 113) + +FISHERMAN, BEND_DOWN, FISH, SOUTH_WEST = 31, 114, 0, 4 +FISHERMAN, RAISE_UP, FISH, SOUTH_WEST = 31, 114, 3, -4 +FISHERMAN, BEND_DOWN, NO_MATERIAL, SOUTH_WEST = 31, 114, 7, -4 +FISHERMAN, RAISE_UP, NO_MATERIAL, SOUTH_WEST = 31, 114, 4, 4 + +FISHERMAN, BEND_DOWN, FISH, SOUTH_EAST = 31, 115, 0, 4 +FISHERMAN, RAISE_UP, FISH, SOUTH_EAST = 31, 115, 3, -4 +FISHERMAN, BEND_DOWN, NO_MATERIAL, SOUTH_EAST = 31, 115, 7, -4 +FISHERMAN, RAISE_UP, NO_MATERIAL, SOUTH_EAST = 31, 115, 4, 4 diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-EGYPTIAN.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-EGYPTIAN.txt index 1d133f23aa..0aa8ce62b7 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-EGYPTIAN.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-EGYPTIAN.txt @@ -177,10 +177,10 @@ MELTER, ACTION1, *, NORTH_EAST = 21, 85, 0, 1 SETTLER_MATERIAL(MELTER, IRON, 21, 86) SETTLER_MATERIAL(MELTER, COAL, 21, 87) -MELTER, BEND_DOWN, COAL, NORTH_WEST = 21, 88, 0, 4 -MELTER, RAISE_UP, COAL, NORTH_WEST = 21, 88, 3, -4 -MELTER, BEND_DOWN, COAL, NORTH_EAST = 21, 89, 0, 4 -MELTER, RAISE_UP, COAL, NORTH_EAST = 21, 89, 3, -4 +MELTER, BEND_DOWN, COAL, NORTH_WEST = 21, 88, 3, -4 +MELTER, RAISE_UP, COAL, NORTH_WEST = 21, 88, 0, 4 +MELTER, BEND_DOWN, COAL, NORTH_EAST = 21, 89, 3, -4 +MELTER, RAISE_UP, COAL, NORTH_EAST = 21, 89, 0, 4 @@ -232,3 +232,92 @@ SLAUGHTERER, BEND_DOWN, PIG, NORTH_WEST = 21, 71, 0, 4 SLAUGHTERER, RAISE_UP, PIG, NORTH_WEST = 21, 71, 3, -4 SLAUGHTERER, BEND_DOWN, PIG, NORTH_EAST = 21, 72, 0, 4 SLAUGHTERER, RAISE_UP, PIG, NORTH_EAST = 21, 72, 3, -4 + + + +### +# FARMER movables start +### +SETTLER_MATERIAL(FARMER, CROP, 21, 90) + +FARMER, RAISE_UP, CROP, NORTH_WEST = 21, 91, 0, 4 +FARMER, BEND_DOWN, CROP, NORTH_WEST = 21, 91, 3, -4 +FARMER, RAISE_UP, CROP, NORTH_EAST = 21, 92, 0, 4 +FARMER, BEND_DOWN, CROP, NORTH_EAST = 21, 92, 3, -4 + +FARMER, WALKING, NO_MATERIAL, SOUTH_WEST = 21, 93, 0, 13 +FARMER, WALKING, NO_MATERIAL, WEST = 21, 93, 13, 13 +FARMER, WALKING, NO_MATERIAL, NORTH_WEST = 21, 93, 26, 13 +FARMER, WALKING, NO_MATERIAL, NORTH_EAST = 21, 93, 39, 13 +FARMER, WALKING, NO_MATERIAL, EAST = 21, 93, 52, 13 +FARMER, WALKING, NO_MATERIAL, SOUTH_EAST = 21, 93, 65, 13 +FARMER, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 21, 93, 0, 1 +FARMER, NO_ACTION, NO_MATERIAL, WEST = 21, 93, 13, 1 +FARMER, NO_ACTION, NO_MATERIAL, NORTH_WEST = 21, 93, 26, 1 +FARMER, NO_ACTION, NO_MATERIAL, NORTH_EAST = 21, 93, 39, 1 +FARMER, NO_ACTION, NO_MATERIAL, EAST = 21, 93, 52, 1 +FARMER, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 21, 93, 65, 1 + +FARMER, BEND_DOWN, NO_MATERIAL, NORTH_WEST = 21, 94, 0, 4 +FARMER, RAISE_UP, NO_MATERIAL, NORTH_WEST = 21, 94, 3, -4 +FARMER, BEND_DOWN, NO_MATERIAL, NORTH_EAST = 21, 95, 0, 4 +FARMER, RAISE_UP, NO_MATERIAL, NORTH_EAST = 21, 95, 3, -4 + +SETTLER_MATERIAL(FARMER, PLANT, 21, 96) + +# sows the seeds +FARMER, ACTION2, *, SOUTH_WEST = 21, 97, 0, 12 +FARMER, ACTION2, *, NORTH_WEST = 21, 98, 0, 12 +FARMER, ACTION2, *, NORTH_EAST = 21, 99, 0, 12 +FARMER, ACTION2, *, SOUTH_EAST = 21, 100, 0, 12 + +SETTLER_MATERIAL(FARMER, SCYTHE, 21, 101) + +# cut +FARMER, ACTION1, *, SOUTH_WEST = 21, 102, 0, 12 +FARMER, ACTION1, *, NORTH_WEST = 21, 102, 12, 12 +FARMER, ACTION1, *, NORTH_EAST = 21, 102, 24, 12 +FARMER, ACTION1, *, SOUTH_EAST = 21, 102, 36, 12 + + + +### +# FISHERMAN movables start +### +SETTLER_MATERIAL(FISHERMAN, NO_MATERIAL, 21, 103) + +#ACTION1 - throws the bait +FISHERMAN, ACTION1, *, SOUTH_WEST = 21, 104, 0, 12 +FISHERMAN, ACTION1, *, WEST = 21, 105, 0, 12 +FISHERMAN, ACTION1, *, NORTH_WEST = 21, 106, 0, 12 +FISHERMAN, ACTION1, *, NORTH_EAST = 21, 107, 0, 12 +FISHERMAN, ACTION1, *, EAST = 21, 108, 0, 12 +FISHERMAN, ACTION1, *, SOUTH_EAST = 21, 109, 0, 12 + +#ACTION2 - fish off the hook, fell on the ass, got up and continue fishing +FISHERMAN, ACTION2, *, SOUTH_WEST = 21, 110, 0, 24 +FISHERMAN, ACTION2, *, WEST = 21, 111, 0, 24 +FISHERMAN, ACTION2, *, NORTH_WEST = 21, 112, 0, 24 +FISHERMAN, ACTION2, *, NORTH_EAST = 21, 113, 0, 24 +FISHERMAN, ACTION2, *, EAST = 21, 114, 0, 24 +FISHERMAN, ACTION2, *, SOUTH_EAST = 21, 115, 0, 24 + +#ACTION3 - caught fish successfully +FISHERMAN, ACTION3, *, SOUTH_WEST = 21, 117, 0, 12 +FISHERMAN, ACTION3, *, WEST = 21, 118, 0, 12 +FISHERMAN, ACTION3, *, NORTH_WEST = 21, 119, 0, 12 +FISHERMAN, ACTION3, *, NORTH_EAST = 21, 120, 0, 12 +FISHERMAN, ACTION3, *, EAST = 21, 121, 0, 12 +FISHERMAN, ACTION3, *, SOUTH_EAST = 21, 122, 0, 12 + +SETTLER_MATERIAL(FISHERMAN, FISH, 21, 116) + +FISHERMAN, BEND_DOWN, FISH, SOUTH_WEST = 21, 123, 0, 4 +FISHERMAN, RAISE_UP, FISH, SOUTH_WEST = 21, 123, 3, -4 +FISHERMAN, BEND_DOWN, NO_MATERIAL, SOUTH_WEST = 21, 123, 7, -4 +FISHERMAN, RAISE_UP, NO_MATERIAL, SOUTH_WEST = 21, 123, 4, 4 + +FISHERMAN, BEND_DOWN, FISH, SOUTH_EAST = 21, 124, 0, 4 +FISHERMAN, RAISE_UP, FISH, SOUTH_EAST = 21, 124, 3, -4 +FISHERMAN, BEND_DOWN, NO_MATERIAL, SOUTH_EAST = 21, 124, 7, -4 +FISHERMAN, RAISE_UP, NO_MATERIAL, SOUTH_EAST = 21, 124, 4, 4 diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt index be07a4238f..13db5df3db 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt @@ -307,7 +307,18 @@ FARMER, BEND_DOWN, CROP, NORTH_WEST = 11, 88, 3, -4 FARMER, RAISE_UP, CROP, NORTH_EAST = 11, 89, 0, 4 FARMER, BEND_DOWN, CROP, NORTH_EAST = 11, 89, 3, -4 -SETTLER_MATERIAL(FARMER, NO_MATERIAL, 11, 90) +FARMER, WALKING, NO_MATERIAL, SOUTH_WEST = 11, 90, 0, 13 +FARMER, WALKING, NO_MATERIAL, WEST = 11, 90, 13, 13 +FARMER, WALKING, NO_MATERIAL, NORTH_WEST = 11, 90, 26, 13 +FARMER, WALKING, NO_MATERIAL, NORTH_EAST = 11, 90, 39, 13 +FARMER, WALKING, NO_MATERIAL, EAST = 11, 90, 52, 13 +FARMER, WALKING, NO_MATERIAL, SOUTH_EAST = 11, 90, 65, 13 +FARMER, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 11, 90, 0, 1 +FARMER, NO_ACTION, NO_MATERIAL, WEST = 11, 90, 13, 1 +FARMER, NO_ACTION, NO_MATERIAL, NORTH_WEST = 11, 90, 26, 1 +FARMER, NO_ACTION, NO_MATERIAL, NORTH_EAST = 11, 90, 39, 1 +FARMER, NO_ACTION, NO_MATERIAL, EAST = 11, 90, 52, 1 +FARMER, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 11, 90, 65, 1 FARMER, BEND_DOWN, NO_MATERIAL, NORTH_WEST = 11, 91, 0, 4 FARMER, RAISE_UP, NO_MATERIAL, NORTH_WEST = 11, 91, 3, -4 @@ -329,9 +340,6 @@ FARMER, ACTION1, *, SOUTH_WEST = 11, 99, 0, 12 FARMER, ACTION1, *, NORTH_WEST = 11, 99, 12, 12 FARMER, ACTION1, *, NORTH_EAST = 11, 99, 24, 12 FARMER, ACTION1, *, SOUTH_EAST = 11, 99, 36, 12 -### -# FARMER movables end -### @@ -375,50 +383,6 @@ FISHERMAN, BEND_DOWN, FISH, SOUTH_EAST = 11, 121, 0, 4 FISHERMAN, RAISE_UP, FISH, SOUTH_EAST = 11, 121, 3, -4 FISHERMAN, BEND_DOWN, NO_MATERIAL, SOUTH_EAST = 11, 121, 7, -4 FISHERMAN, RAISE_UP, NO_MATERIAL, SOUTH_EAST = 11, 121, 4, 4 -### -# FISHERMAN movables end -### - - - -### -# BAKER movables start -### -SETTLER_MATERIAL(BAKER, BLADE, 11, 125) -SETTLER_MATERIAL(BAKER, WHITE_BREAD, 11, 126) -SETTLER_MATERIAL(BAKER, BREAD, 11, 127) - -BAKER, ACTION1, WHITE_BREAD, NORTH_WEST = 11, 128, 0, 12 -BAKER, ACTION1, WHITE_BREAD, NORTH_EAST = 11, 129, 0, 12 - -BAKER, ACTION1, BREAD, NORTH_WEST = 11, 130, 11, -12 -BAKER, ACTION1, BREAD, NORTH_EAST = 11, 131, 11, -12 - -#stand there -BAKER, ACTION2, *, NORTH_WEST = 11, 130, 11, 1 -BAKER, ACTION2, *, NORTH_EAST = 11, 131, 11, 1 - -SETTLER_MATERIAL(BAKER, FLOUR, 11, 132) -SETTLER_MATERIAL(BAKER, WATER, 11, 133) -SETTLER_MATERIAL(BAKER, NO_MATERIAL, 11, 134) - -BAKER, BEND_DOWN, *, NORTH_WEST = 11, 135, 0, 4 -BAKER, RAISE_UP, *, NORTH_WEST = 11, 135, 3, -4 -BAKER, BEND_DOWN, *, NORTH_EAST = 11, 136, 0, 4 -BAKER, RAISE_UP, *, NORTH_EAST = 11, 136, 3, -4 - -BAKER, BEND_DOWN, WATER, NORTH_WEST = 11, 137, 0, 4 -BAKER, RAISE_UP, WATER, NORTH_WEST = 11, 137, 3, -4 -BAKER, BEND_DOWN, WATER, NORTH_EAST = 11, 138, 0, 4 -BAKER, RAISE_UP, WATER, NORTH_EAST = 11, 138, 3, -4 - -BAKER, RAISE_UP, FLOUR, NORTH_WEST = 11, 139, 0, 4 -BAKER, BEND_DOWN, FLOUR, NORTH_WEST = 11, 139, 3, -4 -BAKER, RAISE_UP, FLOUR, NORTH_EAST = 11, 140, 0, 4 -BAKER, BEND_DOWN, FLOUR, NORTH_EAST = 11, 140, 3, -4 -### -# BAKER movables end -### @@ -518,7 +482,19 @@ WATERWORKER, RAISE_UP, NO_MATERIAL, * = 11, 160, 3, -4 ### # WINEGROWER movables start ### -SETTLER_MATERIAL(WINEGROWER, NO_MATERIAL, 11, 90) +WINEGROWER, WALKING, NO_MATERIAL, SOUTH_WEST = 11, 90, 0, 13 +WINEGROWER, WALKING, NO_MATERIAL, WEST = 11, 90, 13, 13 +WINEGROWER, WALKING, NO_MATERIAL, NORTH_WEST = 11, 90, 26, 13 +WINEGROWER, WALKING, NO_MATERIAL, NORTH_EAST = 11, 90, 39, 13 +WINEGROWER, WALKING, NO_MATERIAL, EAST = 11, 90, 52, 13 +WINEGROWER, WALKING, NO_MATERIAL, SOUTH_EAST = 11, 90, 65, 13 +WINEGROWER, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 11, 90, 0, 1 +WINEGROWER, NO_ACTION, NO_MATERIAL, WEST = 11, 90, 13, 1 +WINEGROWER, NO_ACTION, NO_MATERIAL, NORTH_WEST = 11, 90, 26, 1 +WINEGROWER, NO_ACTION, NO_MATERIAL, NORTH_EAST = 11, 90, 39, 1 +WINEGROWER, NO_ACTION, NO_MATERIAL, EAST = 11, 90, 52, 1 +WINEGROWER, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 11, 90, 65, 1 + SETTLER_MATERIAL(WINEGROWER, BASKET, 11, 161) SETTLER_MATERIAL(WINEGROWER, WINE, 11, 162) diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt index 82d0f01a4e..75dda53377 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt @@ -211,6 +211,40 @@ MINER, RAISE_UP, NO_MATERIAL, * = c1, 55, 0, 1 +### +# BAKER movables start +### +SETTLER_MATERIAL(BAKER, BLADE, c1, 125) +SETTLER_MATERIAL(BAKER, WHITE_BREAD, c1, 126) +SETTLER_MATERIAL(BAKER, BREAD, c1, 127) + +BAKER, ACTION1, WHITE_BREAD, NORTH_WEST = c1, 128, 0, 12 +BAKER, ACTION1, WHITE_BREAD, NORTH_EAST = c1, 129, 0, 12 + +BAKER, ACTION1, BREAD, NORTH_WEST = c1, 130, 11, -12 +BAKER, ACTION1, BREAD, NORTH_EAST = c1, 131, 11, -12 + +SETTLER_MATERIAL(BAKER, FLOUR, c1, 132) +SETTLER_MATERIAL(BAKER, WATER, c1, 133) +SETTLER_MATERIAL(BAKER, NO_MATERIAL, c1, 134) + +BAKER, BEND_DOWN, *, NORTH_WEST = c1, 135, 0, 4 +BAKER, RAISE_UP, *, NORTH_WEST = c1, 135, 3, -4 +BAKER, BEND_DOWN, *, NORTH_EAST = c1, 136, 0, 4 +BAKER, RAISE_UP, *, NORTH_EAST = c1, 136, 3, -4 + +BAKER, BEND_DOWN, WATER, NORTH_WEST = c1, 137, 0, 4 +BAKER, RAISE_UP, WATER, NORTH_WEST = c1, 137, 3, -4 +BAKER, BEND_DOWN, WATER, NORTH_EAST = c1, 138, 0, 4 +BAKER, RAISE_UP, WATER, NORTH_EAST = c1, 138, 3, -4 + +BAKER, RAISE_UP, FLOUR, NORTH_WEST = c1, 139, 0, 4 +BAKER, BEND_DOWN, FLOUR, NORTH_WEST = c1, 139, 3, -4 +BAKER, RAISE_UP, FLOUR, NORTH_EAST = c1, 140, 0, 4 +BAKER, BEND_DOWN, FLOUR, NORTH_EAST = c1, 140, 3, -4 + + + ### # DONKEY movables start ### From 1beb70d637f64405f41ff54c4f4434497fdcfe57 Mon Sep 17 00:00:00 2001 From: Paul Wedeck Date: Thu, 23 Apr 2020 12:26:10 +0200 Subject: [PATCH 16/21] add missing common movables --- .../graphics/map/draw/MapObjectDrawer.java | 1 + .../draw/settlerimages/movables-AMAZON.txt | 187 +++++++++++++++ .../map/draw/settlerimages/movables-ASIAN.txt | 168 ++++++++++++++ .../draw/settlerimages/movables-EGYPTIAN.txt | 168 ++++++++++++++ .../map/draw/settlerimages/movables-ROMAN.txt | 218 +----------------- .../map/draw/settlerimages/movables.txt | 163 +++++++++++++ 6 files changed, 696 insertions(+), 209 deletions(-) diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/MapObjectDrawer.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/MapObjectDrawer.java index c227926682..ceea76f1ba 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/MapObjectDrawer.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/MapObjectDrawer.java @@ -1358,6 +1358,7 @@ private void drawWithConstructionMask(int x, int y, float maskState, Image unsaf } } + // TODO shadow is wrong private static final int DEAD_SETTLER_FILE = 12; private static final int DEAD_SETTLER_INDEX = 27; diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-AMAZON.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-AMAZON.txt index 928c833960..a4f81d4dc4 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-AMAZON.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-AMAZON.txt @@ -366,3 +366,190 @@ BAKER, RAISE_UP, FLOUR, NORTH_WEST = 41, 145, 3, -4 BAKER, BEND_DOWN, FLOUR, NORTH_WEST = 41, 145, 0, 4 BAKER, RAISE_UP, FLOUR, NORTH_EAST = 41, 146, 3, -4 BAKER, BEND_DOWN, FLOUR, NORTH_EAST = 41, 146, 0, 4 + + + +### +# PIG_FARMER movables start +### +# wears a FEED_BUCKET to feed pigs +SETTLER_MATERIAL(PIG_FARMER, BASKET, 41, 147) +SETTLER_MATERIAL(PIG_FARMER, WATER, 41, 148) +SETTLER_MATERIAL(PIG_FARMER, NO_MATERIAL, 41, 149) +SETTLER_MATERIAL(PIG_FARMER, PIG, 41, 150) +SETTLER_MATERIAL(PIG_FARMER, CROP, 41, 151) + +# feed pigs +PIG_FARMER, ACTION1, BASKET, NORTH_EAST = 41, 152, 0, 12 +PIG_FARMER, ACTION1, BASKET, SOUTH_EAST = 41, 153, 0, 12 + +PIG_FARMER, RAISE_UP, PIG, NORTH_WEST = 41, 154, 3, -4 +PIG_FARMER, BEND_DOWN, PIG, NORTH_WEST = 41, 154, 0, 4 + +PIG_FARMER, RAISE_UP, PIG, NORTH_EAST = 41, 155, 3, -4 +PIG_FARMER, BEND_DOWN, PIG, NORTH_EAST = 41, 155, 0, 4 + +PIG_FARMER, BEND_DOWN, *, NORTH_WEST = 41, 156, 0, 4 +PIG_FARMER, RAISE_UP, *, NORTH_WEST = 41, 156, 3, -4 + +PIG_FARMER, BEND_DOWN, *, NORTH_EAST = 41, 157, 0, 4 +PIG_FARMER, RAISE_UP, *, NORTH_EAST = 41, 157, 3, -4 + +PIG_FARMER, RAISE_UP, CROP, NORTH_WEST = 41, 158, 3, -4 +PIG_FARMER, BEND_DOWN, CROP, NORTH_WEST = 41, 158, 0, 4 + +PIG_FARMER, RAISE_UP, WATER, NORTH_WEST = 41, 159, 3, -4 +PIG_FARMER, BEND_DOWN, WATER, NORTH_WEST = 41, 159, 0, 4 + +PIG_FARMER, RAISE_UP, WATER, NORTH_EAST = 41, 160, 3, -4 +PIG_FARMER, BEND_DOWN, WATER, NORTH_EAST = 41, 160, 0, 4 + +PIG_FARMER, RAISE_UP, WATER, NORTH_WEST = 41, 159, 3, -4 +PIG_FARMER, BEND_DOWN, WATER, NORTH_WEST = 41, 159, 0, 4 + +PIG_FARMER, RAISE_UP, WATER, NORTH_EAST = 41, 160, 3, -4 +PIG_FARMER, BEND_DOWN, WATER, NORTH_EAST = 41, 160, 0, 4 + + + +### +# WATERWORKER movables start +### +# go for WATER with EMPTY_BUCKET +SETTLER_MATERIAL(WATERWORKER, EMPTY_BUCKET, 41, 161) +SETTLER_MATERIAL(WATERWORKER, WATER, 41, 162) + +# gathering water in a bucket +WATERWORKER, ACTION1, *, SOUTH_WEST = 41, 163, 0, 14 +WATERWORKER, ACTION1, *, SOUTH_EAST = 41, 164, 0, 14 +WATERWORKER, ACTION1, *, NORTH_WEST = 41, 163, 0, 14 +WATERWORKER, ACTION1, *, NORTH_EAST = 41, 164, 0, 14 +WATERWORKER, ACTION1, *, WEST = 41, 163, 0, 14 +WATERWORKER, ACTION1, *, EAST = 41, 164, 0, 14 + +WATERWORKER, BEND_DOWN, WATER, * = 41, 165, 0, 4 +WATERWORKER, RAISE_UP, WATER, * = 41, 165, 3, -4 + +SETTLER_MATERIAL(WATERWORKER, NO_MATERIAL, 41, 166) + +WATERWORKER, BEND_DOWN, NO_MATERIAL, * = 41, 167, 0, 4 +WATERWORKER, RAISE_UP, NO_MATERIAL, * = 41, 167, 3, -4 + + + +### +# HEALER movables start +### +SETTLER_MATERIAL(HEALER, *, 41, 194) + +# healing soldiers +HEALER, ACTION1, *, SOUTH_WEST = 41, 195, 0, 12 +HEALER, ACTION1, *, WEST = 41, 196, 0, 12 +HEALER, ACTION1, *, NORTH_WEST = 41, 197, 0, 12 +HEALER, ACTION1, *, NORTH_EAST = 41, 198, 0, 12 +HEALER, ACTION1, *, EAST = 41, 199, 0, 12 +HEALER, ACTION1, *, SOUTH_EAST = 41, 200, 0, 12 + + + +### +# MAGE movables start +### +SETTLER_MATERIAL(MAGE, *, 41, 202) + +# ACTION1 is not actually modelled :/ +SETTLER_ACTION(MAGE, ACTION1, *, 41, 202) + + + +### +# PIONEER movables start +### +SETTLER_MATERIAL(PIONEER, NO_MATERIAL, 41, 211) + +PIONEER, ACTION1, *, * = 41, 212, 0, 12 + + + +### +# THIEF movables start +### +# when hides stolen +SETTLER_MATERIAL(THIEF, *, 41, 343) + +# normal state, on the territory of the enemy appears for the enemy as his BEARER (can detect only soldiers) +SETTLER_MATERIAL(THIEF, NO_MATERIAL, 41, 344) + +# stealing resources +THIEF, ACTION1, *, SOUTH_WEST = 41, 345, 0, 12 +THIEF, ACTION1, *, WEST = 41, 346, 0, 12 +THIEF, ACTION1, *, NORTH_WEST = 41, 347, 0, 12 +THIEF, ACTION1, *, NORTH_EAST = 41, 348, 0, 12 +THIEF, ACTION1, *, EAST = 41, 349, 0, 12 +THIEF, ACTION1, *, SOUTH_EAST = 41, 350, 0, 12 + + + +### +# SWORDSMAN movables start +### +SETTLER_MATERIAL(SWORDSMAN_L1, *, 42, 7) +SETTLER_ACTION(SWORDSMAN_L1, ACTION1, *, 42, 10) + + +SETTLER_MATERIAL(SWORDSMAN_L2, *, 42, 9) +SETTLER_ACTION(SWORDSMAN_L2, ACTION1, *, 42, 11) + + +SETTLER_MATERIAL(SWORDSMAN_L3, *, 42, 8) +SETTLER_ACTION(SWORDSMAN_L3, ACTION1, *, 42, 12) + + + +### +# PIKEMAN movables start +### +SETTLER_MATERIAL(PIKEMAN_L1, *, 42, 13) +SETTLER_ACTION(PIKEMAN_L1, ACTION1, *, 42, 16) + + +SETTLER_MATERIAL(PIKEMAN_L2, *, 42, 15) +SETTLER_ACTION(PIKEMAN_L2, ACTION1, *, 42, 17) + + +SETTLER_MATERIAL(PIKEMAN_L3, *, 42, 14) +SETTLER_ACTION(PIKEMAN_L3, ACTION1, *, 42, 18) + + + +### +# BOWMAN movables start +### +SETTLER_MATERIAL(BOWMAN_L1, *, 42, 19) + +BOWMAN_L1, ACTION1, *, SOUTH_WEST = 42, 22, 0, 24 +BOWMAN_L1, ACTION1, *, WEST = 42, 22, 24, 24 +BOWMAN_L1, ACTION1, *, NORTH_WEST = 42, 22, 48, 24 +BOWMAN_L1, ACTION1, *, NORTH_EAST = 42, 22, 72, 24 +BOWMAN_L1, ACTION1, *, EAST = 42, 22, 96, 24 +BOWMAN_L1, ACTION1, *, SOUTH_EAST = 42, 22, 120, 24 + + +SETTLER_MATERIAL(BOWMAN_L2, *, 42, 21) + +BOWMAN_L2, ACTION1, *, SOUTH_WEST = 42, 23, 0, 24 +BOWMAN_L2, ACTION1, *, WEST = 42, 23, 24, 24 +BOWMAN_L2, ACTION1, *, NORTH_WEST = 42, 23, 48, 24 +BOWMAN_L2, ACTION1, *, NORTH_EAST = 42, 23, 72, 24 +BOWMAN_L2, ACTION1, *, EAST = 42, 23, 96, 24 +BOWMAN_L2, ACTION1, *, SOUTH_EAST = 42, 23, 120, 24 + + +SETTLER_MATERIAL(BOWMAN_L3, *, 42, 20) + +BOWMAN_L3, ACTION1, *, SOUTH_WEST = 42, 24, 0, 24 +BOWMAN_L3, ACTION1, *, WEST = 42, 24, 24, 24 +BOWMAN_L3, ACTION1, *, NORTH_WEST = 42, 24, 48, 24 +BOWMAN_L3, ACTION1, *, NORTH_EAST = 42, 24, 72, 24 +BOWMAN_L3, ACTION1, *, EAST = 42, 24, 96, 24 +BOWMAN_L3, ACTION1, *, SOUTH_EAST = 42, 24, 120, 24 diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ASIAN.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ASIAN.txt index 87539eef27..d4384db966 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ASIAN.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ASIAN.txt @@ -322,3 +322,171 @@ FISHERMAN, BEND_DOWN, FISH, SOUTH_EAST = 31, 115, 0, 4 FISHERMAN, RAISE_UP, FISH, SOUTH_EAST = 31, 115, 3, -4 FISHERMAN, BEND_DOWN, NO_MATERIAL, SOUTH_EAST = 31, 115, 7, -4 FISHERMAN, RAISE_UP, NO_MATERIAL, SOUTH_EAST = 31, 115, 4, 4 + + + +### +# PIG_FARMER movables start +### +SETTLER_MATERIAL(PIG_FARMER, WATER, 31, 151) +SETTLER_MATERIAL(PIG_FARMER, NO_MATERIAL, 31, 142) +SETTLER_MATERIAL(PIG_FARMER, PIG, 31, 143) +SETTLER_MATERIAL(PIG_FARMER, CROP, 31, 144) + +SETTLER_MATERIAL(DONKEY_FARMER, WATER, 31, 151) +SETTLER_MATERIAL(DONKEY_FARMER, NO_MATERIAL, 31, 142) +SETTLER_MATERIAL(DONKEY_FARMER, CROP, 31, 144) + +# feed pigs +PIG_FARMER, ACTION1, BASKET, NORTH_EAST = 31, 146, 0, 12 +PIG_FARMER, ACTION1, BASKET, SOUTH_EAST = 31, 145, 0, 12 + +# feed donkeys +DONKEY_FARMER, ACTION1, BASKET, NORTH_EAST = 31, 146, 0, 12 +DONKEY_FARMER, ACTION1, BASKET, SOUTH_EAST = 31, 145, 0, 12 + +PIG_FARMER, BEND_DOWN, NO_MATERIAL, NORTH_WEST = 31, 147, 0, 4 +PIG_FARMER, RAISE_UP, PIG, NORTH_WEST = 31, 147, 4, 4 +PIG_FARMER, BEND_DOWN, PIG, NORTH_WEST = 31, 147, 7, -4 +PIG_FARMER, RAISE_UP, NO_MATERIAL, NORTH_WEST = 31, 147, 3, -4 + +PIG_FARMER, BEND_DOWN, NO_MATERIAL, NORTH_EAST = 31, 148, 0, 4 +PIG_FARMER, RAISE_UP, PIG, NORTH_EAST = 31, 148, 4, 4 +PIG_FARMER, BEND_DOWN, PIG, NORTH_EAST = 31, 148, 7, -4 +PIG_FARMER, RAISE_UP, NO_MATERIAL, NORTH_EAST = 31, 148, 3, -4 + +PIG_FARMER, BEND_DOWN, *, NORTH_WEST = 31, 149, 0, 4 +PIG_FARMER, RAISE_UP, *, NORTH_WEST = 31, 149, 3, -4 + +PIG_FARMER, RAISE_UP, CROP, NORTH_WEST = 31, 150, 0, 4 +PIG_FARMER, BEND_DOWN, CROP, NORTH_WEST = 31, 150, 3, -4 + +DONKEY_FARMER, BEND_DOWN, *, NORTH_WEST = 31, 149, 0, 4 +DONKEY_FARMER, RAISE_UP, *, NORTH_WEST = 31, 149, 3, -4 + +DONKEY_FARMER, RAISE_UP, CROP, NORTH_WEST = 31, 150, 0, 4 +DONKEY_FARMER, BEND_DOWN, CROP, NORTH_WEST = 31, 150, 3, -4 + + + +### +# HEALER movables start +### +SETTLER_MATERIAL(HEALER, *, 31, 195) + +# healing soldiers +HEALER, ACTION1, *, SOUTH_WEST = 31, 196, 0, 12 +HEALER, ACTION1, *, WEST = 31, 197, 0, 12 +HEALER, ACTION1, *, NORTH_WEST = 31, 198, 0, 12 +HEALER, ACTION1, *, NORTH_EAST = 31, 199, 0, 12 +HEALER, ACTION1, *, EAST = 31, 200, 0, 12 +HEALER, ACTION1, *, SOUTH_EAST = 31, 201, 0, 12 + + + +### +# MAGE movables start +### +SETTLER_MATERIAL(MAGE, *, 31, 201) + +# casts a spell +MAGE, ACTION1, *, SOUTH_WEST = 31, 202, 0, 30 +MAGE, ACTION1, *, WEST = 31, 203, 0, 30 +MAGE, ACTION1, *, NORTH_WEST = 31, 204, 0, 30 +MAGE, ACTION1, *, NORTH_EAST = 31, 205, 0, 30 +MAGE, ACTION1, *, EAST = 31, 206, 0, 30 +MAGE, ACTION1, *, SOUTH_EAST = 31, 207, 0, 30 + + + +### +# PIONEER movables start +### +SETTLER_MATERIAL(PIONEER, NO_MATERIAL, 31, 210) + +PIONEER, ACTION1, *, * = 31, 211, 0, 12 + + + +### +# THIEF movables start +### +# when hides stolen +SETTLER_MATERIAL(THIEF, *, 31, 237) + +# normal state, on the territory of the enemy appears for the enemy as his BEARER (can detect only soldiers) +SETTLER_MATERIAL(THIEF, NO_MATERIAL, 31, 238) + +# stealing resources +THIEF, ACTION1, *, SOUTH_WEST = 31, 239, 0, 12 +THIEF, ACTION1, *, WEST = 31, 240, 0, 12 +THIEF, ACTION1, *, NORTH_WEST = 31, 241, 0, 12 +THIEF, ACTION1, *, NORTH_EAST = 31, 242, 0, 12 +THIEF, ACTION1, *, EAST = 31, 243, 0, 12 +THIEF, ACTION1, *, SOUTH_EAST = 31, 244, 0, 12 + + + +### +# SWORDSMAN movables start +### +SETTLER_MATERIAL(SWORDSMAN_L1, *, 32, 9) +SETTLER_ACTION(SWORDSMAN_L1, ACTION1, *, 32, 12) + + +SETTLER_MATERIAL(SWORDSMAN_L2, *, 32, 11) +SETTLER_ACTION(SWORDSMAN_L2, ACTION1, *, 32, 13) + + +SETTLER_MATERIAL(SWORDSMAN_L3, *, 32, 10) +SETTLER_ACTION(SWORDSMAN_L3, ACTION1, *, 32, 14) + + + +### +# PIKEMAN movables start +### +SETTLER_MATERIAL(PIKEMAN_L1, *, 32, 15) +SETTLER_ACTION(PIKEMAN_L1, ACTION1, *, 32, 18) + + +SETTLER_MATERIAL(PIKEMAN_L2, *, 32, 17) +SETTLER_ACTION(PIKEMAN_L2, ACTION1, *, 32, 19) + + +SETTLER_MATERIAL(PIKEMAN_L3, *, 32, 16) +SETTLER_ACTION(PIKEMAN_L3, ACTION1, *, 32, 20) + + + +### +# BOWMAN movables start +### +SETTLER_MATERIAL(BOWMAN_L1, *, 32, 21) + +BOWMAN_L1, ACTION1, *, SOUTH_WEST = 32, 24, 0, 24 +BOWMAN_L1, ACTION1, *, WEST = 32, 24, 24, 24 +BOWMAN_L1, ACTION1, *, NORTH_WEST = 32, 24, 48, 24 +BOWMAN_L1, ACTION1, *, NORTH_EAST = 32, 24, 72, 24 +BOWMAN_L1, ACTION1, *, EAST = 32, 24, 96, 24 +BOWMAN_L1, ACTION1, *, SOUTH_EAST = 32, 24, 120, 24 + + +SETTLER_MATERIAL(BOWMAN_L2, *, 32, 23) + +BOWMAN_L2, ACTION1, *, SOUTH_WEST = 32, 25, 0, 24 +BOWMAN_L2, ACTION1, *, WEST = 32, 25, 24, 24 +BOWMAN_L2, ACTION1, *, NORTH_WEST = 32, 25, 48, 24 +BOWMAN_L2, ACTION1, *, NORTH_EAST = 32, 25, 72, 24 +BOWMAN_L2, ACTION1, *, EAST = 32, 25, 96, 24 +BOWMAN_L2, ACTION1, *, SOUTH_EAST = 32, 25, 120, 24 + + +SETTLER_MATERIAL(BOWMAN_L3, *, 32, 22) + +BOWMAN_L3, ACTION1, *, SOUTH_WEST = 32, 26, 0, 24 +BOWMAN_L3, ACTION1, *, WEST = 32, 26, 24, 24 +BOWMAN_L3, ACTION1, *, NORTH_WEST = 32, 26, 48, 24 +BOWMAN_L3, ACTION1, *, NORTH_EAST = 32, 26, 72, 24 +BOWMAN_L3, ACTION1, *, EAST = 32, 26, 96, 24 +BOWMAN_L3, ACTION1, *, SOUTH_EAST = 32, 26, 120, 24 diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-EGYPTIAN.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-EGYPTIAN.txt index 0aa8ce62b7..87901a1564 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-EGYPTIAN.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-EGYPTIAN.txt @@ -321,3 +321,171 @@ FISHERMAN, BEND_DOWN, FISH, SOUTH_EAST = 21, 124, 0, 4 FISHERMAN, RAISE_UP, FISH, SOUTH_EAST = 21, 124, 3, -4 FISHERMAN, BEND_DOWN, NO_MATERIAL, SOUTH_EAST = 21, 124, 7, -4 FISHERMAN, RAISE_UP, NO_MATERIAL, SOUTH_EAST = 21, 124, 4, 4 + + + +### +# PIG_FARMER movables start +### +SETTLER_MATERIAL(PIG_FARMER, WATER, 21, 151) +SETTLER_MATERIAL(PIG_FARMER, NO_MATERIAL, 21, 142) +SETTLER_MATERIAL(PIG_FARMER, PIG, 21, 143) +SETTLER_MATERIAL(PIG_FARMER, CROP, 21, 144) + +SETTLER_MATERIAL(DONKEY_FARMER, WATER, 21, 151) +SETTLER_MATERIAL(DONKEY_FARMER, NO_MATERIAL, 21, 142) +SETTLER_MATERIAL(DONKEY_FARMER, CROP, 21, 144) + +# feed pigs +PIG_FARMER, ACTION1, BASKET, NORTH_EAST = 21, 146, 0, 12 +PIG_FARMER, ACTION1, BASKET, SOUTH_EAST = 21, 145, 0, 12 + +# feed donkeys +DONKEY_FARMER, ACTION1, BASKET, NORTH_EAST = 21, 146, 0, 12 +DONKEY_FARMER, ACTION1, BASKET, SOUTH_EAST = 21, 145, 0, 12 + +PIG_FARMER, BEND_DOWN, NO_MATERIAL, NORTH_WEST = 21, 147, 0, 4 +PIG_FARMER, RAISE_UP, PIG, NORTH_WEST = 21, 147, 4, 4 +PIG_FARMER, BEND_DOWN, PIG, NORTH_WEST = 21, 147, 7, -4 +PIG_FARMER, RAISE_UP, NO_MATERIAL, NORTH_WEST = 21, 147, 3, -4 + +PIG_FARMER, BEND_DOWN, NO_MATERIAL, NORTH_EAST = 21, 148, 0, 4 +PIG_FARMER, RAISE_UP, PIG, NORTH_EAST = 21, 148, 4, 4 +PIG_FARMER, BEND_DOWN, PIG, NORTH_EAST = 21, 148, 7, -4 +PIG_FARMER, RAISE_UP, NO_MATERIAL, NORTH_EAST = 21, 148, 3, -4 + +PIG_FARMER, BEND_DOWN, *, NORTH_WEST = 21, 149, 0, 4 +PIG_FARMER, RAISE_UP, *, NORTH_WEST = 21, 149, 3, -4 + +PIG_FARMER, RAISE_UP, CROP, NORTH_WEST = 21, 150, 0, 4 +PIG_FARMER, BEND_DOWN, CROP, NORTH_WEST = 21, 150, 3, -4 + +DONKEY_FARMER, BEND_DOWN, *, NORTH_WEST = 21, 149, 0, 4 +DONKEY_FARMER, RAISE_UP, *, NORTH_WEST = 21, 149, 3, -4 + +DONKEY_FARMER, RAISE_UP, CROP, NORTH_WEST = 21, 150, 0, 4 +DONKEY_FARMER, BEND_DOWN, CROP, NORTH_WEST = 21, 150, 3, -4 + + + +### +# HEALER movables start +### +SETTLER_MATERIAL(HEALER, *, 21, 183) + +# healing soldiers +HEALER, ACTION1, *, SOUTH_WEST = 21, 184, 0, 12 +HEALER, ACTION1, *, WEST = 21, 185, 0, 12 +HEALER, ACTION1, *, NORTH_WEST = 21, 186, 0, 12 +HEALER, ACTION1, *, NORTH_EAST = 21, 187, 0, 12 +HEALER, ACTION1, *, EAST = 21, 188, 0, 12 +HEALER, ACTION1, *, SOUTH_EAST = 21, 189, 0, 12 + + + +### +# MAGE movables start +### +SETTLER_MATERIAL(MAGE, *, 21, 183) + +# casts a spell +MAGE, ACTION1, *, SOUTH_WEST = 21, 184, 0, 30 +MAGE, ACTION1, *, WEST = 21, 185, 0, 30 +MAGE, ACTION1, *, NORTH_WEST = 21, 186, 0, 30 +MAGE, ACTION1, *, NORTH_EAST = 21, 187, 0, 30 +MAGE, ACTION1, *, EAST = 21, 188, 0, 30 +MAGE, ACTION1, *, SOUTH_EAST = 21, 199, 0, 30 + + + +### +# PIONEER movables start +### +SETTLER_MATERIAL(PIONEER, NO_MATERIAL, 21, 192) + +PIONEER, ACTION1, *, * = 21, 193, 0, 12 + + + +### +# THIEF movables start +### +# when hides stolen +SETTLER_MATERIAL(THIEF, *, 21, 219) + +# normal state, on the territory of the enemy appears for the enemy as his BEARER (can detect only soldiers) +SETTLER_MATERIAL(THIEF, NO_MATERIAL, 21, 220) + +# stealing resources +THIEF, ACTION1, *, SOUTH_WEST = 21, 221, 0, 12 +THIEF, ACTION1, *, WEST = 21, 222, 0, 12 +THIEF, ACTION1, *, NORTH_WEST = 21, 223, 0, 12 +THIEF, ACTION1, *, NORTH_EAST = 21, 224, 0, 12 +THIEF, ACTION1, *, EAST = 21, 225, 0, 12 +THIEF, ACTION1, *, SOUTH_EAST = 21, 226, 0, 12 + + +#TODO some shadows are wrong +### +# SWORDSMAN movables start +### +SETTLER_MATERIAL(SWORDSMAN_L1, *, 22, 14) +SETTLER_ACTION(SWORDSMAN_L1, ACTION1, *, 22, 22) + + +SETTLER_MATERIAL(SWORDSMAN_L2, *, 22, 16) +SETTLER_ACTION(SWORDSMAN_L2, ACTION1, *, 22, 23) + + +SETTLER_MATERIAL(SWORDSMAN_L3, *, 22, 15) +SETTLER_ACTION(SWORDSMAN_L3, ACTION1, *, 22, 24) + + + +### +# PIKEMAN movables start +### +SETTLER_MATERIAL(PIKEMAN_L1, *, 22, 17) +SETTLER_ACTION(PIKEMAN_L1, ACTION1, *, 22, 25) + + +SETTLER_MATERIAL(PIKEMAN_L2, *, 22, 19) +SETTLER_ACTION(PIKEMAN_L2, ACTION1, *, 22, 26) + + +SETTLER_MATERIAL(PIKEMAN_L3, *, 22, 18) +SETTLER_ACTION(PIKEMAN_L3, ACTION1, *, 22, 27) + + + +### +# BOWMAN movables start +### +SETTLER_MATERIAL(BOWMAN_L1, *, 22, 20) + +BOWMAN_L1, ACTION1, *, SOUTH_WEST = 22, 29, 0, 24 +BOWMAN_L1, ACTION1, *, WEST = 22, 29, 24, 24 +BOWMAN_L1, ACTION1, *, NORTH_WEST = 22, 29, 48, 24 +BOWMAN_L1, ACTION1, *, NORTH_EAST = 22, 29, 72, 24 +BOWMAN_L1, ACTION1, *, EAST = 22, 29, 96, 24 +BOWMAN_L1, ACTION1, *, SOUTH_EAST = 22, 29, 120, 24 + + +SETTLER_MATERIAL(BOWMAN_L2, *, 22, 28) + +BOWMAN_L2, ACTION1, *, SOUTH_WEST = 22, 30, 0, 24 +BOWMAN_L2, ACTION1, *, WEST = 22, 30, 24, 24 +BOWMAN_L2, ACTION1, *, NORTH_WEST = 22, 30, 48, 24 +BOWMAN_L2, ACTION1, *, NORTH_EAST = 22, 30, 72, 24 +BOWMAN_L2, ACTION1, *, EAST = 22, 30, 96, 24 +BOWMAN_L2, ACTION1, *, SOUTH_EAST = 22, 30, 120, 24 + + +SETTLER_MATERIAL(BOWMAN_L3, *, 22, 21) + +BOWMAN_L3, ACTION1, *, SOUTH_WEST = 22, 31, 0, 24 +BOWMAN_L3, ACTION1, *, WEST = 22, 31, 24, 24 +BOWMAN_L3, ACTION1, *, NORTH_WEST = 22, 31, 48, 24 +BOWMAN_L3, ACTION1, *, NORTH_EAST = 22, 31, 72, 24 +BOWMAN_L3, ACTION1, *, EAST = 22, 31, 96, 24 +BOWMAN_L3, ACTION1, *, SOUTH_EAST = 22, 31, 120, 24 diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt index 13db5df3db..b613880941 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt @@ -387,19 +387,25 @@ FISHERMAN, RAISE_UP, NO_MATERIAL, SOUTH_EAST = 11, 121, 4, 4 ### -# PIG_FARMER movables start +# PIG_FARMER and DONKEY_FARMER movables start ### -# wears a FEED_BUCKET to feed pigs -SETTLER_MATERIAL(PIG_FARMER, BASKET, 11, 141) SETTLER_MATERIAL(PIG_FARMER, WATER, 11, 142) SETTLER_MATERIAL(PIG_FARMER, NO_MATERIAL, 11, 143) SETTLER_MATERIAL(PIG_FARMER, PIG, 11, 144) SETTLER_MATERIAL(PIG_FARMER, CROP, 11, 145) +SETTLER_MATERIAL(DONKEY_FARMER, WATER, 11, 142) +SETTLER_MATERIAL(DONKEY_FARMER, NO_MATERIAL, 11, 143) +SETTLER_MATERIAL(DONKEY_FARMER, CROP, 11, 145) + # feed pigs PIG_FARMER, ACTION1, BASKET, NORTH_EAST = 11, 146, 0, 12 PIG_FARMER, ACTION1, BASKET, SOUTH_EAST = 11, 147, 0, 12 +#feed donkeys +DONKEY_FARMER, ACTION1, BASKET, NORTH_EAST = 11, 146, 0, 12 +DONKEY_FARMER, ACTION1, BASKET, SOUTH_EAST = 11, 147, 0, 12 + PIG_FARMER, BEND_DOWN, NO_MATERIAL, NORTH_WEST = 11, 148, 0, 4 PIG_FARMER, RAISE_UP, PIG, NORTH_WEST = 11, 148, 4, 4 PIG_FARMER, BEND_DOWN, PIG, NORTH_WEST = 11, 148, 7, -4 @@ -416,145 +422,12 @@ PIG_FARMER, RAISE_UP, *, NORTH_WEST = 11, 150, 3, -4 PIG_FARMER, RAISE_UP, CROP, NORTH_WEST = 11, 151, 0, 4 PIG_FARMER, BEND_DOWN, CROP, NORTH_WEST = 11, 151, 3, -4 -PIG_FARMER, RAISE_UP, WATER, NORTH_WEST = 11, 152, 4, 4 -PIG_FARMER, RAISE_UP, WATER, NORTH_EAST = 11, 153, 4, 4 -### -# PIG_FARMER movables end -### - - - -### -# DONKEY_FARMER movables start -### -# wears a FEED_BUCKET to feed donkeys -SETTLER_MATERIAL(PIG_FARMER, BASKET, 11, 141) -SETTLER_MATERIAL(PIG_FARMER, WATER, 11, 142) -SETTLER_MATERIAL(PIG_FARMER, NO_MATERIAL, 11, 143) -SETTLER_MATERIAL(PIG_FARMER, CROP, 11, 145) - -# feed donkeys -DONKEY_FARMER, ACTION1, BASKET, NORTH_EAST = 11, 146, 0, 12 -DONKEY_FARMER, ACTION1, BASKET, SOUTH_EAST = 11, 147, 0, 12 - DONKEY_FARMER, BEND_DOWN, *, NORTH_WEST = 11, 150, 0, 4 DONKEY_FARMER, RAISE_UP, *, NORTH_WEST = 11, 150, 3, -4 DONKEY_FARMER, RAISE_UP, CROP, NORTH_WEST = 11, 151, 0, 4 DONKEY_FARMER, BEND_DOWN, CROP, NORTH_WEST = 11, 151, 3, -4 -DONKEY_FARMER, RAISE_UP, WATER, NORTH_WEST = 11, 152, 0, 8 -DONKEY_FARMER, BEND_DOWN, WATER, NORTH_EAST = 11, 153, 0, 8 -### -# DONKEY_FARMER movables end -### - - - -### -# WATERWORKER movables start -### -# go for WATER with EMPTY_BUCKET -SETTLER_MATERIAL(WATERWORKER, EMPTY_BUCKET, 11, 154) -SETTLER_MATERIAL(WATERWORKER, WATER, 11, 155) - -# gathering water in a bucket -WATERWORKER, ACTION1, *, SOUTH_WEST = 11, 156, 0, 14 -WATERWORKER, ACTION1, *, SOUTH_EAST = 11, 157, 0, 14 -WATERWORKER, ACTION1, *, NORTH_WEST = 11, 156, 0, 14 -WATERWORKER, ACTION1, *, NORTH_EAST = 11, 157, 0, 14 -WATERWORKER, ACTION1, *, WEST = 11, 156, 0, 14 -WATERWORKER, ACTION1, *, EAST = 11, 157, 0, 14 - -WATERWORKER, BEND_DOWN, WATER, * = 11, 158, 0, 4 -WATERWORKER, RAISE_UP, WATER, * = 11, 158, 3, -4 - -SETTLER_MATERIAL(WATERWORKER, NO_MATERIAL, 11, 159) - -WATERWORKER, BEND_DOWN, NO_MATERIAL, * = 11, 160, 0, 4 -WATERWORKER, RAISE_UP, NO_MATERIAL, * = 11, 160, 3, -4 -### -# WATERWORKER movables end -### - - - -### -# WINEGROWER movables start -### -WINEGROWER, WALKING, NO_MATERIAL, SOUTH_WEST = 11, 90, 0, 13 -WINEGROWER, WALKING, NO_MATERIAL, WEST = 11, 90, 13, 13 -WINEGROWER, WALKING, NO_MATERIAL, NORTH_WEST = 11, 90, 26, 13 -WINEGROWER, WALKING, NO_MATERIAL, NORTH_EAST = 11, 90, 39, 13 -WINEGROWER, WALKING, NO_MATERIAL, EAST = 11, 90, 52, 13 -WINEGROWER, WALKING, NO_MATERIAL, SOUTH_EAST = 11, 90, 65, 13 -WINEGROWER, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 11, 90, 0, 1 -WINEGROWER, NO_ACTION, NO_MATERIAL, WEST = 11, 90, 13, 1 -WINEGROWER, NO_ACTION, NO_MATERIAL, NORTH_WEST = 11, 90, 26, 1 -WINEGROWER, NO_ACTION, NO_MATERIAL, NORTH_EAST = 11, 90, 39, 1 -WINEGROWER, NO_ACTION, NO_MATERIAL, EAST = 11, 90, 52, 1 -WINEGROWER, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 11, 90, 65, 1 - -SETTLER_MATERIAL(WINEGROWER, BASKET, 11, 161) -SETTLER_MATERIAL(WINEGROWER, WINE, 11, 162) - -# grapes cuts off -WINEGROWER, BEND_DOWN, BASKET, NORTH_WEST = 11, 163, 0, 4 -WINEGROWER, RAISE_UP, BASKET, NORTH_WEST = 11, 163, 3, -4 -WINEGROWER, BEND_DOWN, BASKET, NORTH_EAST = 11, 164, 0, 4 -WINEGROWER, RAISE_UP, BASKET, NORTH_EAST = 11, 164, 3, -4 - -WINEGROWER, BEND_DOWN, NO_MATERIAL, NORTH_WEST = 11, 165, 0, 4 -WINEGROWER, RAISE_UP, NO_MATERIAL, NORTH_WEST = 11, 165, 3, -4 -WINEGROWER, BEND_DOWN, NO_MATERIAL, NORTH_EAST = 11, 166, 0, 4 -WINEGROWER, RAISE_UP, NO_MATERIAL, NORTH_EAST = 11, 166, 3, -4 - -WINEGROWER, RAISE_UP, WINE, NORTH_WEST = 11, 167, 0, 4 -WINEGROWER, BEND_DOWN, WINE, NORTH_WEST = 11, 167, 7, -4 -WINEGROWER, RAISE_UP, WINE, NORTH_EAST = 11, 168, 0, 4 -WINEGROWER, BEND_DOWN, WINE, NORTH_EAST = 11, 168, 7, -4 - -SETTLER_MATERIAL(WINEGROWER, PLANT, 11, 169) - -# planting vine -WINEGROWER, ACTION1, PLANT, SOUTH_WEST = 11, 170, 0, 27 -WINEGROWER, ACTION1, PLANT, SOUTH_EAST = 11, 171, 0, 27 -### -# WINEGROWER movables end -### - - - -### -# CHARCOAL_BURNER movables start -### -SETTLER_MATERIAL(CHARCOAL_BURNER, PLANK, 11, 172) - -CHARCOAL_BURNER, RAISE_UP, PLANK, SOUTH_WEST = 11, 173, 0, 4 -CHARCOAL_BURNER, RAISE_UP, PLANK, WEST = 11, 174, 0, 4 -CHARCOAL_BURNER, RAISE_UP, PLANK, NORTH_WEST = 11, 175, 0, 4 -CHARCOAL_BURNER, RAISE_UP, PLANK, NORTH_EAST = 11, 176, 0, 4 -CHARCOAL_BURNER, RAISE_UP, PLANK, EAST = 11, 177, 0, 4 -CHARCOAL_BURNER, RAISE_UP, PLANK, SOUTH_EAST = 11, 178, 0, 4 - -SETTLER_MATERIAL(CHARCOAL_BURNER, COAL, 11, 179) -CHARCOAL_BURNER, ACTION1, COAL, SOUTH_EAST = 11, 179, 60, 1 - -CHARCOAL_BURNER, BEND_DOWN, COAL, SOUTH_WEST = 11, 180, 0, 9 -CHARCOAL_BURNER, RAISE_UP, NO_MATERIAL, SOUTH_WEST = 11, 182, 3, -4 - -SETTLER_MATERIAL(CHARCOAL_BURNER, NO_MATERIAL, 11, 181) - -CHARCOAL_BURNER, BEND_DOWN, NO_MATERIAL, SOUTH_WEST = 11, 182, 0, 4 -CHARCOAL_BURNER, BEND_DOWN, NO_MATERIAL, WEST = 11, 183, 0, 4 -CHARCOAL_BURNER, BEND_DOWN, NO_MATERIAL, NORTH_WEST = 11, 184, 0, 4 -CHARCOAL_BURNER, BEND_DOWN, NO_MATERIAL, NORTH_EAST = 11, 185, 0, 4 -CHARCOAL_BURNER, BEND_DOWN, NO_MATERIAL, EAST = 11, 186, 0, 4 -CHARCOAL_BURNER, BEND_DOWN, NO_MATERIAL, SOUTH_EAST = 11, 187, 0, 4 -### -# CHARCOAL_BURNER movables end -### - ### @@ -569,9 +442,6 @@ HEALER, ACTION1, *, NORTH_WEST = 11, 191, 0, 12 HEALER, ACTION1, *, NORTH_EAST = 11, 192, 0, 12 HEALER, ACTION1, *, EAST = 11, 193, 0, 12 HEALER, ACTION1, *, SOUTH_EAST = 11, 194, 0, 12 -### -# HEALER movables end -### @@ -587,9 +457,6 @@ MAGE, ACTION1, *, NORTH_WEST = 11, 198, 0, 30 MAGE, ACTION1, *, NORTH_EAST = 11, 199, 0, 30 MAGE, ACTION1, *, EAST = 11, 200, 0, 30 MAGE, ACTION1, *, SOUTH_EAST = 11, 201, 0, 30 -### -# MAGE movables end -### @@ -599,9 +466,6 @@ MAGE, ACTION1, *, SOUTH_EAST = 11, 201, 0, 30 SETTLER_MATERIAL(PIONEER, NO_MATERIAL, 11, 204) PIONEER, ACTION1, *, * = 11, 205, 0, 12 -### -# PIONEER movables end -### @@ -621,61 +485,6 @@ THIEF, ACTION1, *, NORTH_WEST = 11, 235, 0, 12 THIEF, ACTION1, *, NORTH_EAST = 11, 236, 0, 12 THIEF, ACTION1, *, EAST = 11, 237, 0, 12 THIEF, ACTION1, *, SOUTH_EAST = 11, 238, 0, 12 -### -# THIEF movables end -### - - - -### -# CATAPULT movables start -### -# TODO: uncommented when will be implemented -# CATAPULT body -#CATAPULT_BODY, WALKING, *, SOUTH_WEST = 12, 0, 0, 1 -#CATAPULT_BODY, WALKING, *, WEST = 12, 0, 1, 1 -#CATAPULT_BODY, WALKING, *, NORTH_WEST = 12, 0, 2, 1 -#CATAPULT_BODY, WALKING, *, NORTH_EAST = 12, 0, 3, 1 -#CATAPULT_BODY, WALKING, *, EAST = 12, 0, 4, 1 -#CATAPULT_BODY, WALKING, *, SOUTH_EAST = 12, 0, 5, 1 -#CATAPULT_BODY, NO_ACTION, *, SOUTH_WEST = 12, 0, 0, 1 -#CATAPULT_BODY, NO_ACTION, *, WEST = 12, 0, 1, 1 -#CATAPULT_BODY, NO_ACTION, *, NORTH_WEST = 12, 0, 2, 1 -#CATAPULT_BODY, NO_ACTION, *, NORTH_EAST = 12, 0, 3, 1 -#CATAPULT_BODY, NO_ACTION, *, EAST = 12, 0, 4, 1 -#CATAPULT_BODY, NO_ACTION, *, SOUTH_EAST = 12, 0, 5, 1 -# CATAPULT wheels -#CATAPULT_WHEELS, WALKING, *, SOUTH_WEST = 12, 1, 0, 36 -#CATAPULT_WHEELS, WALKING, *, WEST = 12, 1, 36, 36 -#CATAPULT_WHEELS, WALKING, *, NORTH_WEST = 12, 1, 72, 36 -#CATAPULT_WHEELS, WALKING, *, NORTH_EAST = 12, 1, 108, 36 -#CATAPULT_WHEELS, WALKING, *, EAST = 12, 1, 144, 36 -#CATAPULT_WHEELS, WALKING, *, SOUTH_EAST = 12, 1, 180, 36 -#CATAPULT_WHEELS, NO_ACTION, *, SOUTH_WEST = 12, 1, 0, 1 -#CATAPULT_WHEELS, NO_ACTION, *, WEST = 12, 1, 36, 1 -#CATAPULT_WHEELS, NO_ACTION, *, NORTH_WEST = 12, 1, 72, 1 -#CATAPULT_WHEELS, NO_ACTION, *, NORTH_EAST = 12, 1, 108, 1 -#CATAPULT_WHEELS, NO_ACTION, *, EAST = 12, 1, 144, 1 -#CATAPULT_WHEELS, NO_ACTION, *, SOUTH_EAST = 12, 1, 180, 1 - -# throws a boulder -#CATAPULT, ACTION1, BOULDER, SOUTH_WEST = 12, 2, 0, 24 -#CATAPULT, ACTION1, BOULDER, WEST = 12, 3, 0, 24 -#CATAPULT, ACTION1, BOULDER, NORTH_WEST = 12, 4, 0, 24 -#CATAPULT, ACTION1, BOULDER, NORTH_EAST = 12, 5, 0, 24 -#CATAPULT, ACTION1, BOULDER, EAST = 12, 6, 0, 24 -#CATAPULT, ACTION1, BOULDER, SOUTH_EAST = 12, 7, 0, 24 - -# boulder direction animation (projectile) -#CATAPULT_BOULDER, FLY, *, SOUTH_WEST = 12, 8, 11, -12 -#CATAPULT_BOULDER, FLY, *, WEST = 12, 8, 11, -12 -#CATAPULT_BOULDER, FLY, *, NORTH_WEST = 12, 8, 11, -12 -#CATAPULT_BOULDER, FLY, *, NORTH_EAST = 12, 8, 0, 12 -#CATAPULT_BOULDER, FLY, *, EAST = 12, 8, 0, 12 -#CATAPULT_BOULDER, FLY, *, SOUTH_EAST = 12, 8, 0, 12 -### -# CATAPULT movables end -### @@ -692,9 +501,6 @@ SETTLER_ACTION(SWORDSMAN_L2, ACTION1, *, 12, 13) SETTLER_MATERIAL(SWORDSMAN_L3, *, 12, 10) SETTLER_ACTION(SWORDSMAN_L3, ACTION1, *, 12, 14) -### -# SWORDSMAN movables end -### @@ -711,9 +517,6 @@ SETTLER_ACTION(PIKEMAN_L2, ACTION1, *, 12, 19) SETTLER_MATERIAL(PIKEMAN_L3, *, 12, 16) SETTLER_ACTION(PIKEMAN_L3, ACTION1, *, 12, 20) -### -# PIKEMAN movables end -### @@ -748,6 +551,3 @@ BOWMAN_L3, ACTION1, *, NORTH_WEST = 12, 26, 48, 24 BOWMAN_L3, ACTION1, *, NORTH_EAST = 12, 26, 72, 24 BOWMAN_L3, ACTION1, *, EAST = 12, 26, 96, 24 BOWMAN_L3, ACTION1, *, SOUTH_EAST = 12, 26, 120, 24 -### -# BOWMAN movables end -### diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt index 75dda53377..d505d2fac3 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt @@ -245,6 +245,169 @@ BAKER, BEND_DOWN, FLOUR, NORTH_EAST = c1, 140, 3, -4 +### +# PIG_FARMER and DONKEY_FARMER movables start +### +SETTLER_MATERIAL(PIG_FARMER, BASKET, c1, 141) + +PIG_FARMER, RAISE_UP, WATER, NORTH_WEST = c1, 152, 4, 4 +PIG_FARMER, RAISE_UP, WATER, NORTH_EAST = c1, 153, 4, 4 + +SETTLER_MATERIAL(PIG_FARMER, BASKET, c1, 141) + +DONKEY_FARMER, RAISE_UP, WATER, NORTH_WEST = c1, 152, 0, 8 +DONKEY_FARMER, BEND_DOWN, WATER, NORTH_EAST = c1, 153, 0, 8 + + + +### +# WATERWORKER movables start +### +# go for WATER with EMPTY_BUCKET +SETTLER_MATERIAL(WATERWORKER, EMPTY_BUCKET, c1, 154) +SETTLER_MATERIAL(WATERWORKER, WATER, c1, 155) + +# gathering water in a bucket +WATERWORKER, ACTION1, *, SOUTH_WEST = c1, 156, 0, 14 +WATERWORKER, ACTION1, *, SOUTH_EAST = c1, 157, 0, 14 +WATERWORKER, ACTION1, *, NORTH_WEST = c1, 156, 0, 14 +WATERWORKER, ACTION1, *, NORTH_EAST = c1, 157, 0, 14 +WATERWORKER, ACTION1, *, WEST = c1, 156, 0, 14 +WATERWORKER, ACTION1, *, EAST = c1, 157, 0, 14 + +WATERWORKER, BEND_DOWN, WATER, * = c1, 158, 0, 4 +WATERWORKER, RAISE_UP, WATER, * = c1, 158, 3, -4 + +SETTLER_MATERIAL(WATERWORKER, NO_MATERIAL, c1, 159) + +WATERWORKER, BEND_DOWN, NO_MATERIAL, * = c1, 160, 0, 4 +WATERWORKER, RAISE_UP, NO_MATERIAL, * = c1, 160, 3, -4 + + + +# ROMAN only + +### +# WINEGROWER movables start +### +WINEGROWER, WALKING, NO_MATERIAL, SOUTH_WEST = 11, 90, 0, 13 +WINEGROWER, WALKING, NO_MATERIAL, WEST = 11, 90, 13, 13 +WINEGROWER, WALKING, NO_MATERIAL, NORTH_WEST = 11, 90, 26, 13 +WINEGROWER, WALKING, NO_MATERIAL, NORTH_EAST = 11, 90, 39, 13 +WINEGROWER, WALKING, NO_MATERIAL, EAST = 11, 90, 52, 13 +WINEGROWER, WALKING, NO_MATERIAL, SOUTH_EAST = 11, 90, 65, 13 +WINEGROWER, NO_ACTION, NO_MATERIAL, SOUTH_WEST = 11, 90, 0, 1 +WINEGROWER, NO_ACTION, NO_MATERIAL, WEST = 11, 90, 13, 1 +WINEGROWER, NO_ACTION, NO_MATERIAL, NORTH_WEST = 11, 90, 26, 1 +WINEGROWER, NO_ACTION, NO_MATERIAL, NORTH_EAST = 11, 90, 39, 1 +WINEGROWER, NO_ACTION, NO_MATERIAL, EAST = 11, 90, 52, 1 +WINEGROWER, NO_ACTION, NO_MATERIAL, SOUTH_EAST = 11, 90, 65, 1 + +SETTLER_MATERIAL(WINEGROWER, BASKET, 11, 161) +SETTLER_MATERIAL(WINEGROWER, WINE, 11, 162) + +# grapes cuts off +WINEGROWER, BEND_DOWN, BASKET, NORTH_WEST = 11, 163, 0, 4 +WINEGROWER, RAISE_UP, BASKET, NORTH_WEST = 11, 163, 3, -4 +WINEGROWER, BEND_DOWN, BASKET, NORTH_EAST = 11, 164, 0, 4 +WINEGROWER, RAISE_UP, BASKET, NORTH_EAST = 11, 164, 3, -4 + +WINEGROWER, BEND_DOWN, NO_MATERIAL, NORTH_WEST = 11, 165, 0, 4 +WINEGROWER, RAISE_UP, NO_MATERIAL, NORTH_WEST = 11, 165, 3, -4 +WINEGROWER, BEND_DOWN, NO_MATERIAL, NORTH_EAST = 11, 166, 0, 4 +WINEGROWER, RAISE_UP, NO_MATERIAL, NORTH_EAST = 11, 166, 3, -4 + +WINEGROWER, RAISE_UP, WINE, NORTH_WEST = 11, 167, 0, 4 +WINEGROWER, BEND_DOWN, WINE, NORTH_WEST = 11, 167, 7, -4 +WINEGROWER, RAISE_UP, WINE, NORTH_EAST = 11, 168, 0, 4 +WINEGROWER, BEND_DOWN, WINE, NORTH_EAST = 11, 168, 7, -4 + +SETTLER_MATERIAL(WINEGROWER, PLANT, 11, 169) + +# planting vine +WINEGROWER, ACTION1, PLANT, SOUTH_WEST = 11, 170, 0, 27 +WINEGROWER, ACTION1, PLANT, SOUTH_EAST = 11, 171, 0, 27 + + + +### +# CHARCOAL_BURNER movables start +### +SETTLER_MATERIAL(CHARCOAL_BURNER, PLANK, 11, 172) + +CHARCOAL_BURNER, RAISE_UP, PLANK, SOUTH_WEST = 11, 173, 0, 4 +CHARCOAL_BURNER, RAISE_UP, PLANK, WEST = 11, 174, 0, 4 +CHARCOAL_BURNER, RAISE_UP, PLANK, NORTH_WEST = 11, 175, 0, 4 +CHARCOAL_BURNER, RAISE_UP, PLANK, NORTH_EAST = 11, 176, 0, 4 +CHARCOAL_BURNER, RAISE_UP, PLANK, EAST = 11, 177, 0, 4 +CHARCOAL_BURNER, RAISE_UP, PLANK, SOUTH_EAST = 11, 178, 0, 4 + +SETTLER_MATERIAL(CHARCOAL_BURNER, COAL, 11, 179) +CHARCOAL_BURNER, ACTION1, COAL, SOUTH_EAST = 11, 179, 60, 1 + +CHARCOAL_BURNER, BEND_DOWN, COAL, SOUTH_WEST = 11, 180, 0, 9 +CHARCOAL_BURNER, RAISE_UP, NO_MATERIAL, SOUTH_WEST = 11, 182, 3, -4 + +SETTLER_MATERIAL(CHARCOAL_BURNER, NO_MATERIAL, 11, 181) + +CHARCOAL_BURNER, BEND_DOWN, NO_MATERIAL, SOUTH_WEST = 11, 182, 0, 4 +CHARCOAL_BURNER, BEND_DOWN, NO_MATERIAL, WEST = 11, 183, 0, 4 +CHARCOAL_BURNER, BEND_DOWN, NO_MATERIAL, NORTH_WEST = 11, 184, 0, 4 +CHARCOAL_BURNER, BEND_DOWN, NO_MATERIAL, NORTH_EAST = 11, 185, 0, 4 +CHARCOAL_BURNER, BEND_DOWN, NO_MATERIAL, EAST = 11, 186, 0, 4 +CHARCOAL_BURNER, BEND_DOWN, NO_MATERIAL, SOUTH_EAST = 11, 187, 0, 4 + + + +### +# CATAPULT movables start +### +# TODO: uncommented when will be implemented +# CATAPULT body +#CATAPULT_BODY, WALKING, *, SOUTH_WEST = 12, 0, 0, 1 +#CATAPULT_BODY, WALKING, *, WEST = 12, 0, 1, 1 +#CATAPULT_BODY, WALKING, *, NORTH_WEST = 12, 0, 2, 1 +#CATAPULT_BODY, WALKING, *, NORTH_EAST = 12, 0, 3, 1 +#CATAPULT_BODY, WALKING, *, EAST = 12, 0, 4, 1 +#CATAPULT_BODY, WALKING, *, SOUTH_EAST = 12, 0, 5, 1 +#CATAPULT_BODY, NO_ACTION, *, SOUTH_WEST = 12, 0, 0, 1 +#CATAPULT_BODY, NO_ACTION, *, WEST = 12, 0, 1, 1 +#CATAPULT_BODY, NO_ACTION, *, NORTH_WEST = 12, 0, 2, 1 +#CATAPULT_BODY, NO_ACTION, *, NORTH_EAST = 12, 0, 3, 1 +#CATAPULT_BODY, NO_ACTION, *, EAST = 12, 0, 4, 1 +#CATAPULT_BODY, NO_ACTION, *, SOUTH_EAST = 12, 0, 5, 1 +# CATAPULT wheels +#CATAPULT_WHEELS, WALKING, *, SOUTH_WEST = 12, 1, 0, 36 +#CATAPULT_WHEELS, WALKING, *, WEST = 12, 1, 36, 36 +#CATAPULT_WHEELS, WALKING, *, NORTH_WEST = 12, 1, 72, 36 +#CATAPULT_WHEELS, WALKING, *, NORTH_EAST = 12, 1, 108, 36 +#CATAPULT_WHEELS, WALKING, *, EAST = 12, 1, 144, 36 +#CATAPULT_WHEELS, WALKING, *, SOUTH_EAST = 12, 1, 180, 36 +#CATAPULT_WHEELS, NO_ACTION, *, SOUTH_WEST = 12, 1, 0, 1 +#CATAPULT_WHEELS, NO_ACTION, *, WEST = 12, 1, 36, 1 +#CATAPULT_WHEELS, NO_ACTION, *, NORTH_WEST = 12, 1, 72, 1 +#CATAPULT_WHEELS, NO_ACTION, *, NORTH_EAST = 12, 1, 108, 1 +#CATAPULT_WHEELS, NO_ACTION, *, EAST = 12, 1, 144, 1 +#CATAPULT_WHEELS, NO_ACTION, *, SOUTH_EAST = 12, 1, 180, 1 + +# throws a boulder +#CATAPULT, ACTION1, BOULDER, SOUTH_WEST = 12, 2, 0, 24 +#CATAPULT, ACTION1, BOULDER, WEST = 12, 3, 0, 24 +#CATAPULT, ACTION1, BOULDER, NORTH_WEST = 12, 4, 0, 24 +#CATAPULT, ACTION1, BOULDER, NORTH_EAST = 12, 5, 0, 24 +#CATAPULT, ACTION1, BOULDER, EAST = 12, 6, 0, 24 +#CATAPULT, ACTION1, BOULDER, SOUTH_EAST = 12, 7, 0, 24 + +# boulder direction animation (projectile) +#CATAPULT_BOULDER, FLY, *, SOUTH_WEST = 12, 8, 11, -12 +#CATAPULT_BOULDER, FLY, *, WEST = 12, 8, 11, -12 +#CATAPULT_BOULDER, FLY, *, NORTH_WEST = 12, 8, 11, -12 +#CATAPULT_BOULDER, FLY, *, NORTH_EAST = 12, 8, 0, 12 +#CATAPULT_BOULDER, FLY, *, EAST = 12, 8, 0, 12 +#CATAPULT_BOULDER, FLY, *, SOUTH_EAST = 12, 8, 0, 12 + + + ### # DONKEY movables start ### From e1d7b4e4bcc164156c9093e2057ded2f139f47d8 Mon Sep 17 00:00:00 2001 From: Paul Wedeck Date: Fri, 24 Apr 2020 17:06:17 +0200 Subject: [PATCH 17/21] Implement some more nation specific images --- .../jsettlers/common/images/ImageLink.java | 27 +++- .../common/player/ECivilisation.java | 2 + .../common/selectable/ISelectionSet.java | 9 +- .../jsettlers/graphics/map/MapContent.java | 13 +- .../graphics/map/MapDrawContext.java | 2 +- .../controls/original/OriginalControls.java | 8 +- .../selection/BearerSelectionContent.java | 37 ++--- .../selection/BuildingSelectionContent.java | 30 +--- .../panel/selection/SelectionRow.java | 17 ++- .../panel/selection/ShipSelectionContent.java | 23 +-- .../selection/SoldierSelectionContent.java | 26 +++- .../selection/SpecialistSelectionContent.java | 6 +- .../graphics/map/draw/ECommonLinkType.java | 7 + .../graphics/map/draw/ImageLinkMap.java | 80 +++++++++++ .../graphics/map/draw/MapObjectDrawer.java | 19 +-- .../map/draw/settlerimages/MovableParser.java | 2 +- .../map/minimap/AbstractLineLoader.java | 8 +- .../jsettlers/graphics/map/draw/linkmap.txt | 134 ++++++++++++++++++ .../java/jsettlers/input/SelectionSet.java | 12 +- .../core/resources/ImageLinkFactory.java | 63 -------- .../selection/CarriersSelectionFragment.java | 10 +- .../selection/ShipsSelectionFragment.java | 2 +- .../selection/SoldiersSelectionFragment.java | 8 +- .../SpecialistsSelectionFragment.java | 8 +- .../selection/features/OccupiedFeature.java | 6 +- .../mapcreator/control/EditorControl.java | 3 +- 26 files changed, 360 insertions(+), 202 deletions(-) create mode 100644 jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/ECommonLinkType.java create mode 100644 jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/ImageLinkMap.java create mode 100644 jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/linkmap.txt delete mode 100644 jsettlers.main.android/src/main/java/jsettlers/main/android/core/resources/ImageLinkFactory.java diff --git a/jsettlers.common/src/main/java/jsettlers/common/images/ImageLink.java b/jsettlers.common/src/main/java/jsettlers/common/images/ImageLink.java index 1fab6711e7..8164708c75 100644 --- a/jsettlers.common/src/main/java/jsettlers/common/images/ImageLink.java +++ b/jsettlers.common/src/main/java/jsettlers/common/images/ImageLink.java @@ -29,10 +29,11 @@ public abstract class ImageLink implements Serializable { private static final long serialVersionUID = 1572028978425777114L; private static final Pattern ORIGINAL_LINK = Pattern - .compile("original_(\\d+)_(SETTLER|GUI|LANDSCAPE)_(\\d+)"); + .compile("original_(\\d+)_(SETTLER|GUI|LANDSCAPE)_(\\d+)(?:_(\\d+))?"); private static final int ORIGINAL_LINK_FILE = 1; private static final int ORIGINAL_LINK_TYPE = 2; private static final int ORIGINAL_LINK_SEQUENCE = 3; + private static final int ORIGINAL_LINK_INDEX = 4; /** * Converts a given name to an image link. @@ -57,6 +58,30 @@ public static ImageLink fromName(String name, int imageIndex) { } } + /** + * Converts a given name to an image link. + *

+ * Names can either be direct names of the png files or they can have the for "original_<file>_<type>_<sequence + * + * @param name + * The name. + * @return The image link for that image, no matter if it exists or not. + */ + public static ImageLink fromName(String name) { + Matcher matcher = ORIGINAL_LINK.matcher(name); + if (matcher.matches()) { + EImageLinkType type = EImageLinkType.valueOf(matcher.group(ORIGINAL_LINK_TYPE)); + int file = Integer.parseInt(matcher.group(ORIGINAL_LINK_FILE)); + int sequence = Integer.parseInt(matcher.group(ORIGINAL_LINK_SEQUENCE)); + int imageIndex = 0; + String indexStr = matcher.group(ORIGINAL_LINK_INDEX); + if(indexStr != null) imageIndex = Integer.parseInt(indexStr); + return new OriginalImageLink(type, file, sequence, imageIndex); + } else { + return new DirectImageLink(name); + } + } + /** * Gets the name of this link. * diff --git a/jsettlers.common/src/main/java/jsettlers/common/player/ECivilisation.java b/jsettlers.common/src/main/java/jsettlers/common/player/ECivilisation.java index ef8e83ec02..157a86f652 100644 --- a/jsettlers.common/src/main/java/jsettlers/common/player/ECivilisation.java +++ b/jsettlers.common/src/main/java/jsettlers/common/player/ECivilisation.java @@ -24,8 +24,10 @@ public enum ECivilisation { AMAZON(4); private int fileIndex; + public final int ordinal; ECivilisation(int fileIndex) { + ordinal = ordinal(); this.fileIndex = fileIndex; } diff --git a/jsettlers.common/src/main/java/jsettlers/common/selectable/ISelectionSet.java b/jsettlers.common/src/main/java/jsettlers/common/selectable/ISelectionSet.java index 6093115abf..7870710b01 100644 --- a/jsettlers.common/src/main/java/jsettlers/common/selectable/ISelectionSet.java +++ b/jsettlers.common/src/main/java/jsettlers/common/selectable/ISelectionSet.java @@ -14,9 +14,15 @@ *******************************************************************************/ package jsettlers.common.selectable; +import java.util.EnumMap; +import java.util.Map; + import jsettlers.common.movable.EMovableType; import java8.util.stream.Stream; +import jsettlers.common.player.ECivilisation; +import jsettlers.common.player.IInGamePlayer; +import jsettlers.common.player.IPlayer; /** * Interface for sets of selectables.
@@ -53,9 +59,10 @@ public interface ISelectionSet extends Iterable { * counts the movables in the set of the given type. * * @param type + * @param playerStatistic * @return */ - int getMovableCount(EMovableType type); + int getMovableCount(EMovableType type, Map playerStatistic); /** * gives the selected at given index. diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/MapContent.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/MapContent.java index 2ce4d15095..446e3d94e0 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/MapContent.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/MapContent.java @@ -400,7 +400,7 @@ private void drawMessages(GLDrawContext gl) { float a = messageAlpha(m); if (m.getSender() >= 0) { String name = getPlayername(m.getSender()) + ":"; - Color color = context.getPlayerColor(m.getSender()); + Color color = MapDrawContext.getPlayerColor(m.getSender()); float width = drawer.getWidth(name); float bright = color.getRed() + color.getGreen() + color.getBlue(); if (bright < .9f) { @@ -1081,15 +1081,4 @@ protected UIState getUIState() { ScreenPosition screen = context.getScreen(); return new UIState(screen.getScreenCenterX(), screen.getScreenCenterY(), screen.getZoom()); } - - /** - * Gets the color for a given player. - * - * @param player - * The player to get the color for. - * @return The color. - */ - public Color getPlayerColor(byte player) { - return context.getPlayerColor(player); - } } diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/MapDrawContext.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/MapDrawContext.java index 61ab436802..01b16d7223 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/MapDrawContext.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/MapDrawContext.java @@ -250,7 +250,7 @@ public boolean checkMapCoordinates(int x, int y) { * The player to get the color for. * @return The color. */ - public Color getPlayerColor(byte player) { + public static Color getPlayerColor(byte player) { if (player >= 0) { return PLAYER_COLORS[player % PLAYER_COLORS.length]; } else { diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/OriginalControls.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/OriginalControls.java index fccfb53a10..f1586f3997 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/OriginalControls.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/OriginalControls.java @@ -376,16 +376,16 @@ public void displaySelection(ISelectionSet selection) { switch (selection.getSelectionType()) { case PEOPLE: - mainPanel.setContent(new BearerSelectionContent(selection)); + mainPanel.setContent(new BearerSelectionContent(player, selection)); break; case SOLDIERS: - mainPanel.setContent(new SoldierSelectionContent(player, selection)); + mainPanel.setContent(new SoldierSelectionContent(selection)); break; case SPECIALISTS: - mainPanel.setContent(new SpecialistSelectionContent(player, selection)); + mainPanel.setContent(new SpecialistSelectionContent(selection)); break; case SHIPS: - mainPanel.setContent(new ShipSelectionContent(player, selection)); + mainPanel.setContent(new ShipSelectionContent(selection)); break; case BUILDING: mainPanel.setContent(new BuildingSelectionContent(selection)); diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/BearerSelectionContent.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/BearerSelectionContent.java index 6388748c9b..4f9fba077b 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/BearerSelectionContent.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/BearerSelectionContent.java @@ -14,12 +14,13 @@ *******************************************************************************/ package jsettlers.graphics.map.controls.original.panel.selection; -import jsettlers.common.images.EImageLinkType; -import jsettlers.common.images.OriginalImageLink; import jsettlers.common.movable.EMovableType; +import jsettlers.common.player.IInGamePlayer; import jsettlers.common.selectable.ISelectionSet; import jsettlers.common.action.ConvertAction; import jsettlers.graphics.localization.Labels; +import jsettlers.graphics.map.draw.ECommonLinkType; +import jsettlers.graphics.map.draw.ImageLinkMap; import jsettlers.graphics.ui.LabeledButton; import jsettlers.graphics.ui.UIPanel; @@ -31,39 +32,19 @@ */ public class BearerSelectionContent extends AbstractSelectionContent { private final UIPanel panel; - private final int count; - public BearerSelectionContent(ISelectionSet selection) { + public BearerSelectionContent(IInGamePlayer player, ISelectionSet selection) { panel = new UIPanel(); - count = selection.getMovableCount(EMovableType.BEARER); - addPioneers(.7f); - addGeologists(.45f); - addThieves(.2f); + drawButtongroup(.7f, player, EMovableType.PIONEER); + drawButtongroup(.45f, player, EMovableType.GEOLOGIST); + drawButtongroup( .2f, player, EMovableType.THIEF); } - private void addPioneers(float bottom) { - OriginalImageLink imageLink = new OriginalImageLink(EImageLinkType.GUI, 14, 204, 0); - - drawButtongroup(bottom, imageLink, EMovableType.PIONEER); - } - - private void addThieves(float bottom) { - OriginalImageLink imageLink = new OriginalImageLink(EImageLinkType.GUI, 14, 183, 0); - - drawButtongroup(bottom, imageLink, EMovableType.THIEF); - } - - private void addGeologists(float bottom) { - OriginalImageLink imageLink = new OriginalImageLink(EImageLinkType.GUI, 14, 186, 0); - - drawButtongroup(bottom, imageLink, EMovableType.GEOLOGIST); - } - - private void drawButtongroup(float bottom, OriginalImageLink imageLink, + private void drawButtongroup(float bottom, IInGamePlayer player, EMovableType type) { UIPanel icon = new UIPanel(); - icon.setBackground(imageLink); + icon.setBackground(ImageLinkMap.get(player.getCivilisation(), ECommonLinkType.SETTLER_GUI, type)); LabeledButton convert1 = new LabeledButton(Labels.getString("convert_1_to_" + type), diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/BuildingSelectionContent.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/BuildingSelectionContent.java index 9d94025003..37c73ff11b 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/BuildingSelectionContent.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/BuildingSelectionContent.java @@ -43,6 +43,8 @@ import jsettlers.graphics.map.controls.original.panel.button.stock.StockControlButton; import jsettlers.graphics.map.controls.original.panel.selection.BuildingState.OccupierState; import jsettlers.graphics.map.controls.original.panel.selection.BuildingState.StackState; +import jsettlers.graphics.map.draw.ECommonLinkType; +import jsettlers.graphics.map.draw.ImageLinkMap; import jsettlers.graphics.map.draw.ImageProvider; import jsettlers.graphics.ui.Button; import jsettlers.graphics.ui.Label; @@ -535,32 +537,8 @@ private void addOccupyerPlaces(UIPanel places, UIPanel missing, List 0) { - SelectionRow row = new SelectionRow(civ, type, count); - panel.addChild(row, 0.1f, rowHeight * (rowi - 1), .9f, - rowHeight * (rowi)); - rowi--; - } - } - - } - @Override public UIPanel getPanel() { return panel; diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/SoldierSelectionContent.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/SoldierSelectionContent.java index b03c636a95..58f7af445a 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/SoldierSelectionContent.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/SoldierSelectionContent.java @@ -14,10 +14,16 @@ *******************************************************************************/ package jsettlers.graphics.map.controls.original.panel.selection; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; + +import jsettlers.common.CommonConstants; import jsettlers.common.action.EActionType; import jsettlers.common.movable.EMovableType; import jsettlers.common.player.ECivilisation; import jsettlers.common.player.IInGamePlayer; +import jsettlers.common.player.IPlayer; import jsettlers.common.selectable.ISelectionSet; import jsettlers.common.action.Action; import jsettlers.graphics.localization.Labels; @@ -45,10 +51,10 @@ public class SoldierSelectionContent extends AbstractSelectionContent { private final UIPanel panel; - public SoldierSelectionContent(IInGamePlayer player, ISelectionSet selection) { + public SoldierSelectionContent(ISelectionSet selection) { panel = new UIPanel(); - addRowsToPanel(panel, selection, player.getCivilisation(), soldiertypes); + addRowsToPanel(panel, selection, soldiertypes); UIPanel kill = new LabeledButton(Labels.getString("kill"), new Action(EActionType.DESTROY)); UIPanel stop = new LabeledButton(Labels.getString("stop"), new Action(EActionType.STOP_WORKING)); @@ -57,17 +63,25 @@ public SoldierSelectionContent(IInGamePlayer player, ISelectionSet selection) { panel.addChild(stop, .5f, .1f, .9f, .2f); } - public static void addRowsToPanel(UIPanel panel, ISelectionSet selection, ECivilisation civ, - EMovableType[] types) { + public static void addRowsToPanel(UIPanel panel, ISelectionSet selection, EMovableType[] types) { float rowHeight = 1f / ROWS; int rowi = ROWS - 1; // from bottom for (int i = 0; i < types.length; i++) { EMovableType type = types[i]; - int count = selection.getMovableCount(type); + Map playerStatistic = new HashMap<>(); + int count = selection.getMovableCount(type, playerStatistic); + + Map.Entry bestEntry = null; + Iterator> iter = playerStatistic.entrySet().iterator(); + while(iter.hasNext()) { + Map.Entry currEntry = iter.next(); + + if(bestEntry == null || bestEntry.getValue() < currEntry.getValue()) bestEntry = currEntry; + } if (count > 0) { - SelectionRow row = new SelectionRow(civ, type, count); + SelectionRow row = new SelectionRow(bestEntry.getKey(), type, count); panel.addChild(row, 0.1f, rowHeight * (rowi - 1), .9f, rowHeight * (rowi)); rowi--; diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/SpecialistSelectionContent.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/SpecialistSelectionContent.java index fde1a59f51..6b8491905d 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/SpecialistSelectionContent.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/SpecialistSelectionContent.java @@ -37,10 +37,10 @@ public class SpecialistSelectionContent extends AbstractSelectionContent { private final UIPanel panel; - public SpecialistSelectionContent(IInGamePlayer player, ISelectionSet selection) { + public SpecialistSelectionContent(ISelectionSet selection) { panel = new UIPanel(); - SoldierSelectionContent.addRowsToPanel(panel, selection, player.getCivilisation(), specialists); + SoldierSelectionContent.addRowsToPanel(panel, selection, specialists); UIPanel stop = new LabeledButton(Labels.getString("stop"), new Action(EActionType.STOP_WORKING)); @@ -50,7 +50,7 @@ public SpecialistSelectionContent(IInGamePlayer player, ISelectionSet selection) panel.addChild(stop, .1f, .1f, .5f, .2f); panel.addChild(work, .5f, .1f, .9f, .2f); - if (selection.getMovableCount(EMovableType.PIONEER) > 0) { + if (selection.getMovableCount(EMovableType.PIONEER, null) > 0) { UIPanel convert = new LabeledButton(Labels.getString("convert_all_to_BEARER"), new ConvertAction(EMovableType.BEARER, Short.MAX_VALUE)); diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/ECommonLinkType.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/ECommonLinkType.java new file mode 100644 index 0000000000..11a0b797a9 --- /dev/null +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/ECommonLinkType.java @@ -0,0 +1,7 @@ +package jsettlers.graphics.map.draw; + +public enum ECommonLinkType { + SETTLER_GUI, + GARRISON_LEFT, + GARRISON_RIGHT, +} diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/ImageLinkMap.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/ImageLinkMap.java new file mode 100644 index 0000000000..e8aa64e894 --- /dev/null +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/ImageLinkMap.java @@ -0,0 +1,80 @@ +package jsettlers.graphics.map.draw; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.util.EnumMap; +import java.util.HashMap; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import jsettlers.common.images.ImageLink; +import jsettlers.common.movable.EMovableType; +import jsettlers.common.player.ECivilisation; + +public final class ImageLinkMap { + private static final Pattern BEGIN_PATTERN = Pattern.compile("\\s*([\\w\\*]+)\\s*,\\s*([\\w\\*]+)\\s*\\{\\s*"); + private static final Pattern LINE_PATTERN = Pattern.compile("\\s*([\\w\\*]+)\\s*:\\s*([\\w\\*]+)\\s*"); + + public static final ImageLinkMap INSTANCE = new ImageLinkMap("linkmap.txt"); + + private EnumMap>> map = new EnumMap<>(ECivilisation.class); + + private ImageLinkMap(String file) { + for(ECivilisation civ : ECivilisation.values()) { + EnumMap> typeMap = new EnumMap<>(ECommonLinkType.class); + for(ECommonLinkType type : ECommonLinkType.values()) typeMap.put(type, new HashMap<>()); + map.put(civ, typeMap); + } + + try(BufferedReader reader = new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(file)))) { + readFile(reader); + } catch(IOException ex) { + throw new Error(ex); + } + } + + private void readFile(BufferedReader reader) throws IOException { + + EMovableType movable = null; + ECommonLinkType type = null; + + String line; + while((line = reader.readLine()) != null) { + if(line.isEmpty()) continue; + if(line.startsWith("#")) continue; + + if(line.contains("{")) { + if(movable != null) throw new IllegalStateException("Section not closed!"); + + Matcher begin = BEGIN_PATTERN.matcher(line); + if(!begin.matches()) throw new IllegalStateException("Section marker not matching!"); + + type = ECommonLinkType.valueOf(begin.group(1)); + movable = EMovableType.valueOf(begin.group(2)); + } else if(line.equals("}")) { + if(movable == null) throw new IllegalStateException("Only Sections can be closed!"); + + movable = null; + type = null; + } else { + if(movable == null) throw new IllegalStateException("Declaration outside of section!"); + + Matcher declaration = LINE_PATTERN.matcher(line); + if(!declaration.matches()) throw new IllegalStateException("Declaration does not match!"); + + ECivilisation civ = ECivilisation.valueOf(declaration.group(1)); + ImageLink link = ImageLink.fromName(declaration.group(2)); + + map.get(civ).get(type).put(movable, link); + } + } + + reader.close(); + + } + + public static ImageLink get(ECivilisation civ, ECommonLinkType type, EMovableType movable) { + return INSTANCE.map.get(civ).get(type).get(movable); + } +} diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/MapObjectDrawer.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/MapObjectDrawer.java index ceea76f1ba..57c49d99e3 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/MapObjectDrawer.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/MapObjectDrawer.java @@ -97,8 +97,6 @@ public class MapObjectDrawer { private static final int SOUND_SETTLER_KILLED = 35; private static final int SOUND_FALLING_TREE = 36; - private static final OriginalImageLink INSIDE_BUILDING_RIGHT = new OriginalImageLink(EImageLinkType.SETTLER, 12, 28, 1); - private static final OriginalImageLink INSIDE_BUILDING_LEFT = new OriginalImageLink(EImageLinkType.SETTLER, 12, 28, 0); private static final int OBJECTS_FILE = 1; private static final int BUILDINGS_FILE = 13; @@ -285,6 +283,7 @@ public void drawStockFront(int x, int y, IBuilding stock) { } } + // TODO nations private void drawShipInConstruction(int x, int y, IShipInConstruction ship) { byte fogOfWarVisibleStatus = visibleGrid != null ? visibleGrid[x][y] : CommonConstants.FOG_OF_WAR_VISIBLE; EDirection direction = ship.getDirection(); @@ -298,6 +297,7 @@ private void drawShipInConstruction(int x, int y, IShipInConstruction ship) { drawWithConstructionMask(x, y, state, image, shade); } + // TODO nations private void drawShip(IMovable ship, int x, int y) { forceSetup(); @@ -317,7 +317,7 @@ private void drawShip(IMovable ship, int x, int y) { int sailSequence = (shipType == EMovableType.FERRY) ? 29 : 28; // get drawing position - Color color = context.getPlayerColor(ship.getPlayer().getPlayerId()); + Color color = MapDrawContext.getPlayerColor(ship.getPlayer().getPlayerId()); float viewX = context.getOffsetX(); float viewY = context.getOffsetY(); if (ship.getAction() == EMovableAction.WALKING) { @@ -850,13 +850,14 @@ private void playMovableSound(IMovable movable) { } } + // TODO pioneers are at a significant offset private void drawMovableAt(IMovable movable, int x, int y) { byte fogStatus = visibleGrid != null ? visibleGrid[x][y] : CommonConstants.FOG_OF_WAR_VISIBLE; if (fogStatus <= CommonConstants.FOG_OF_WAR_EXPLORED) { return; // break } final float moveProgress = movable.getMoveProgress(); - Color color = context.getPlayerColor(movable.getPlayer().getPlayerId()); + Color color = MapDrawContext.getPlayerColor(movable.getPlayer().getPlayerId()); float shade = MapObjectDrawer.getColor(fogStatus); Image image; int offX = context.getOffsetX(); @@ -1117,7 +1118,7 @@ public void drawPlayerBorderObject(int x, int y, byte player) { if (fogStatus <= CommonConstants.FOG_OF_WAR_EXPLORED) { return; // break } - Color color = context.getPlayerColor(player); + Color color = MapDrawContext.getPlayerColor(player); draw(imageProvider.getSettlerSequence(FILE_BORDER_POST, 65).getImageSafe(0, () -> "border-indicator"), x, y, BORDER_STONE_Z, color); } @@ -1215,7 +1216,7 @@ private void drawBuilding(int x, int y, IBuilding building, float color) { if (seq.length() > 0) { int i = getAnimationStep(x, y); int step = i % seq.length(); - drawOnlyImage(seq.getImageSafe(step, () -> "mill-" + step), x, y, 0, context.getPlayerColor(building.getPlayer().getPlayerId()), color); + drawOnlyImage(seq.getImageSafe(step, () -> "mill-" + step), x, y, 0, MapDrawContext.getPlayerColor(building.getPlayer().getPlayerId()), color); ImageLink[] images = type.getImages(); if (images.length > 0) { Image image = imageProvider.getImage(images[0]); @@ -1298,12 +1299,12 @@ private void drawOccupiers(int x, int y, IOccupied building, float baseColor) { OccupierPlace place = occupier.getPlace(); IMovable movable = occupier.getMovable(); - Color color = context.getPlayerColor(movable.getPlayer().getPlayerId()); + Color color = MapDrawContext.getPlayerColor(movable.getPlayer().getPlayerId()); Image image; switch (place.getSoldierClass()) { case INFANTRY: - OriginalImageLink imageLink = place.looksRight() ? INSIDE_BUILDING_RIGHT : INSIDE_BUILDING_LEFT; + ImageLink imageLink = ImageLinkMap.get(movable.getPlayer().getCivilisation(), place.looksRight() ? ECommonLinkType.GARRISON_RIGHT:ECommonLinkType.GARRISON_LEFT, movable.getMovableType()); image = imageProvider.getImage(imageLink); ((SettlerImage)image).setShadow(null); break; @@ -1372,7 +1373,7 @@ private void drawPlayerableByProgress(int x, int y, IMapObject object, float bas private Color getColor(IMapObject object) { Color color = null; if (object instanceof IPlayerable) { - color = context.getPlayerColor(((IPlayerable) object).getPlayer().getPlayerId()); + color = MapDrawContext.getPlayerColor(((IPlayerable) object).getPlayer().getPlayerId()); } return color; } diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/MovableParser.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/MovableParser.java index f7662b985b..e9f56f7a54 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/MovableParser.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/MovableParser.java @@ -46,7 +46,7 @@ private void invokeTemplate(String line, Consumer lineCons) { MovableTemplate template = templates.get(name); if(template == null) { - System.err.println("movable template " + name + " is undefined!"); + System.err.println("template " + name + " is undefined!"); return; } else if(template == lineCons) { System.err.println("template " + name + " is recursive!"); diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/minimap/AbstractLineLoader.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/minimap/AbstractLineLoader.java index 83eb3f2e60..b0cb32cb4c 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/minimap/AbstractLineLoader.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/minimap/AbstractLineLoader.java @@ -213,7 +213,7 @@ private short getSettlerForArea(IGraphicsGrid map, MapDrawContext context, int m if (visible && displaySettlers != SettlersMode.NONE) { IMovable settler = map.getMovableAt(x, y); if (settler != null && (displaySettlers == SettlersMode.ALL || settler.getMovableType().isPlayerControllable())) { - settlerColor = context.getPlayerColor(settler.getPlayer().getPlayerId()).toShortColor(1); + settlerColor = MapDrawContext.getPlayerColor(settler.getPlayer().getPlayerId()).toShortColor(1); // don't search any more. displaySettlers = SettlersMode.NONE; } else if (displaySettlers != SettlersMode.NONE) { @@ -223,7 +223,7 @@ private short getSettlerForArea(IGraphicsGrid map, MapDrawContext context, int m if (building instanceof IBuilding.IOccupied) { IBuilding.IOccupied occupyed = (IBuilding.IOccupied) building; if (occupyed.isOccupied()) { - settlerColor = context.getPlayerColor(occupyed.getPlayer().getPlayerId()).toShortColor(1); + settlerColor = MapDrawContext.getPlayerColor(occupyed.getPlayer().getPlayerId()).toShortColor(1); } } } @@ -232,7 +232,7 @@ private short getSettlerForArea(IGraphicsGrid map, MapDrawContext context, int m if (visible && displayOccupied == OccupiedAreaMode.BORDERS) { if (map.isBorder(x, y)) { byte player = map.getPlayerIdAt(x, y); - Color playerColor = context.getPlayerColor(player); + Color playerColor = MapDrawContext.getPlayerColor(player); occupiedColor = playerColor.toShortColor(1); displayOccupied = OccupiedAreaMode.NONE; } @@ -240,7 +240,7 @@ private short getSettlerForArea(IGraphicsGrid map, MapDrawContext context, int m } else if (visible && displayOccupied == OccupiedAreaMode.AREA) { byte player = map.getPlayerIdAt(x, y); if (player >= 0 && !map.getLandscapeTypeAt(x, y).isBlocking) { - Color playerColor = context.getPlayerColor(player); + Color playerColor = MapDrawContext.getPlayerColor(player); // Now add a landscape below that.... Color landscape = getColorForArea(map, mapminX, mapminY, mapmaxX, mapmaxY); playerColor = landscape.toGreyScale().multiply(playerColor); diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/linkmap.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/linkmap.txt new file mode 100644 index 0000000000..6f752bdd9a --- /dev/null +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/linkmap.txt @@ -0,0 +1,134 @@ +#this is a map ECommonLinkType, EMovableType, ECivilisation -> OriginalImageLink + +GARRISON_LEFT, SWORDSMAN_L1 { + ROMAN: original_12_SETTLER_31_0 + EGYPTIAN: original_22_SETTLER_37_0 + ASIAN: original_32_SETTLER_31_0 + AMAZON: original_42_SETTLER_29_0 +} + +GARRISON_RIGHT, SWORDSMAN_L1 { + ROMAN: original_12_SETTLER_31_1 + EGYPTIAN: original_22_SETTLER_37_1 + ASIAN: original_32_SETTLER_31_1 + AMAZON: original_42_SETTLER_29_1 +} + +GARRISON_LEFT, SWORDSMAN_L2 { + ROMAN: original_12_SETTLER_31_0 + EGYPTIAN: original_22_SETTLER_35_0 + ASIAN: original_32_SETTLER_31_0 + AMAZON: original_42_SETTLER_29_0 +} + +GARRISON_RIGHT, SWORDSMAN_L2 { + ROMAN: original_12_SETTLER_31_1 + EGYPTIAN: original_22_SETTLER_35_1 + ASIAN: original_32_SETTLER_31_1 + AMAZON: original_42_SETTLER_29_1 +} + + +GARRISON_LEFT, SWORDSMAN_L3 { + ROMAN: original_12_SETTLER_28_0 + EGYPTIAN: original_22_SETTLER_33_0 + ASIAN: original_32_SETTLER_28_0 + AMAZON: original_42_SETTLER_27_0 +} + +GARRISON_RIGHT, SWORDSMAN_L3 { + ROMAN: original_12_SETTLER_28_1 + EGYPTIAN: original_22_SETTLER_33_1 + ASIAN: original_32_SETTLER_28_1 + AMAZON: original_42_SETTLER_27_1 +} + + +SETTLER_GUI, SWORDSMAN_L1 { + ROMAN: original_14_GUI_207 + EGYPTIAN: original_24_GUI_201 + ASIAN: original_34_GUI_216 + AMAZON: original_44_GUI_210 +} + +SETTLER_GUI, SWORDSMAN_L2 { + ROMAN: original_14_GUI_216 + EGYPTIAN: original_24_GUI_210 + ASIAN: original_34_GUI_225 + AMAZON: original_44_GUI_219 +} + +SETTLER_GUI, SWORDSMAN_L3 { + ROMAN: original_14_GUI_225 + EGYPTIAN: original_24_GUI_219 + ASIAN: original_34_GUI_234 + AMAZON: original_44_GUI_228 +} + + +SETTLER_GUI, PIKEMAN_L1 { + ROMAN: original_14_GUI_210 + EGYPTIAN: original_24_GUI_204 + ASIAN: original_34_GUI_219 + AMAZON: original_44_GUI_213 +} + +SETTLER_GUI, PIKEMAN_L2 { + ROMAN: original_14_GUI_219 + EGYPTIAN: original_24_GUI_213 + ASIAN: original_34_GUI_228 + AMAZON: original_44_GUI_222 +} + +SETTLER_GUI, PIKEMAN_L3 { + ROMAN: original_14_GUI_228 + EGYPTIAN: original_24_GUI_222 + ASIAN: original_34_GUI_237 + AMAZON: original_44_GUI_231 +} + + +SETTLER_GUI, BOWMAN_L1 { + ROMAN: original_14_GUI_213 + EGYPTIAN: original_24_GUI_207 + ASIAN: original_34_GUI_222 + AMAZON: original_44_GUI_216 +} + +SETTLER_GUI, BOWMAN_L2 { + ROMAN: original_14_GUI_222 + EGYPTIAN: original_24_GUI_216 + ASIAN: original_34_GUI_231 + AMAZON: original_44_GUI_225 +} + +SETTLER_GUI, BOWMAN_L3 { + ROMAN: original_14_GUI_231 + EGYPTIAN: original_24_GUI_225 + ASIAN: original_34_GUI_240 + AMAZON: original_44_GUI_234 +} + + +SETTLER_GUI, PIONEER { + ROMAN: original_14_GUI_204 + EGYPTIAN: original_24_GUI_198 + ASIAN: original_34_GUI_210 + AMAZON: original_44_GUI_207 +} + +SETTLER_GUI, GEOLOGIST { + ROMAN: original_14_GUI_186 + EGYPTIAN: original_24_GUI_180 + ASIAN: original_34_GUI_192 + AMAZON: original_44_GUI_189 +} + +SETTLER_GUI, THIEF { + ROMAN: original_14_GUI_183 + EGYPTIAN: original_24_GUI_177 + ASIAN: original_34_GUI_189 + AMAZON: original_44_GUI_186 +} + + diff --git a/jsettlers.logic/src/main/java/jsettlers/input/SelectionSet.java b/jsettlers.logic/src/main/java/jsettlers/input/SelectionSet.java index bc5ab38807..d105da4e25 100644 --- a/jsettlers.logic/src/main/java/jsettlers/input/SelectionSet.java +++ b/jsettlers.logic/src/main/java/jsettlers/input/SelectionSet.java @@ -15,8 +15,10 @@ package jsettlers.input; import java.util.ArrayList; +import java.util.EnumMap; import java.util.Iterator; import java.util.List; +import java.util.Map; import java8.util.function.Predicate; import java8.util.stream.Collectors; @@ -24,6 +26,9 @@ import java8.util.stream.StreamSupport; import jsettlers.common.movable.EMovableType; import jsettlers.common.movable.IMovable; +import jsettlers.common.player.ECivilisation; +import jsettlers.common.player.IInGamePlayer; +import jsettlers.common.player.IPlayer; import jsettlers.common.selectable.ESelectionType; import jsettlers.common.selectable.ISelectable; import jsettlers.common.selectable.ISelectionSet; @@ -114,10 +119,15 @@ public ESelectionType getSelectionType() { } @Override - public synchronized int getMovableCount(EMovableType type) { + public synchronized int getMovableCount(EMovableType type, Map playerStatistic) { int ctr = 0; for (ISelectable curr : set) { if (curr instanceof IMovable && ((IMovable) curr).getMovableType() == type) { + if(playerStatistic != null) { + IPlayer player = curr.getPlayer(); + int count = playerStatistic.containsKey(player)?playerStatistic.get(player): 0; + playerStatistic.put(player, count+1); + } ctr++; } } diff --git a/jsettlers.main.android/src/main/java/jsettlers/main/android/core/resources/ImageLinkFactory.java b/jsettlers.main.android/src/main/java/jsettlers/main/android/core/resources/ImageLinkFactory.java deleted file mode 100644 index dabadca59b..0000000000 --- a/jsettlers.main.android/src/main/java/jsettlers/main/android/core/resources/ImageLinkFactory.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2017 - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -package jsettlers.main.android.core.resources; - -import jsettlers.common.images.EImageLinkType; -import jsettlers.common.images.ImageLink; -import jsettlers.common.images.OriginalImageLink; -import jsettlers.common.movable.EMovableType; - -/** - * Created by tompr on 13/01/2017. - */ -public class ImageLinkFactory { - - public static ImageLink get(EMovableType movableType) { - - switch (movableType) { - // Soldiers - case SWORDSMAN_L1: - return new OriginalImageLink(EImageLinkType.GUI, 14, 207, 0); - case SWORDSMAN_L2: - return new OriginalImageLink(EImageLinkType.GUI, 14, 216, 0); - case SWORDSMAN_L3: - return new OriginalImageLink(EImageLinkType.GUI, 14, 225, 0); - case PIKEMAN_L1: - return new OriginalImageLink(EImageLinkType.GUI, 14, 210, 0); - case PIKEMAN_L2: - return new OriginalImageLink(EImageLinkType.GUI, 14, 219, 0); - case PIKEMAN_L3: - return new OriginalImageLink(EImageLinkType.GUI, 14, 228, 0); - case BOWMAN_L1: - return new OriginalImageLink(EImageLinkType.GUI, 14, 213, 0); - case BOWMAN_L2: - return new OriginalImageLink(EImageLinkType.GUI, 14, 222, 0); - case BOWMAN_L3: - return new OriginalImageLink(EImageLinkType.GUI, 14, 231, 0); - - // Specialists - case PIONEER: - return new OriginalImageLink(EImageLinkType.GUI, 14, 204, 0); - case GEOLOGIST: - return new OriginalImageLink(EImageLinkType.GUI, 14, 186, 0); - case THIEF: - return new OriginalImageLink(EImageLinkType.GUI, 14, 183, 0); - - default: - throw new RuntimeException("No image found for movable type: " + movableType.name()); - } - } -} \ No newline at end of file diff --git a/jsettlers.main.android/src/main/java/jsettlers/main/android/gameplay/controlsmenu/selection/CarriersSelectionFragment.java b/jsettlers.main.android/src/main/java/jsettlers/main/android/gameplay/controlsmenu/selection/CarriersSelectionFragment.java index 57eefcddaf..e3226b446d 100644 --- a/jsettlers.main.android/src/main/java/jsettlers/main/android/gameplay/controlsmenu/selection/CarriersSelectionFragment.java +++ b/jsettlers.main.android/src/main/java/jsettlers/main/android/gameplay/controlsmenu/selection/CarriersSelectionFragment.java @@ -24,10 +24,12 @@ import jsettlers.common.action.ConvertAction; import jsettlers.common.movable.EMovableType; +import jsettlers.common.player.ECivilisation; +import jsettlers.graphics.map.draw.ECommonLinkType; +import jsettlers.graphics.map.draw.ImageLinkMap; import jsettlers.main.android.R; import jsettlers.main.android.core.controls.ActionControls; import jsettlers.main.android.core.controls.ControlsResolver; -import jsettlers.main.android.core.resources.ImageLinkFactory; import jsettlers.main.android.core.resources.OriginalImageProvider; /** @@ -51,9 +53,9 @@ public static CarriersSelectionFragment newInstance() { @AfterViews void setupImageProvider() { - OriginalImageProvider.get(ImageLinkFactory.get(EMovableType.PIONEER)).setAsImage(pioneerImageView); - OriginalImageProvider.get(ImageLinkFactory.get(EMovableType.GEOLOGIST)).setAsImage(geologistImageView); - OriginalImageProvider.get(ImageLinkFactory.get(EMovableType.THIEF)).setAsImage(thiefImageView); + OriginalImageProvider.get(ImageLinkMap.get(ECivilisation.ROMAN, ECommonLinkType.SETTLER_GUI, EMovableType.PIONEER)).setAsImage(pioneerImageView); + OriginalImageProvider.get(ImageLinkMap.get(ECivilisation.ROMAN, ECommonLinkType.SETTLER_GUI, EMovableType.GEOLOGIST)).setAsImage(geologistImageView); + OriginalImageProvider.get(ImageLinkMap.get(ECivilisation.ROMAN, ECommonLinkType.SETTLER_GUI, EMovableType.THIEF)).setAsImage(thiefImageView); actionControls = new ControlsResolver(getActivity()).getActionControls(); } diff --git a/jsettlers.main.android/src/main/java/jsettlers/main/android/gameplay/controlsmenu/selection/ShipsSelectionFragment.java b/jsettlers.main.android/src/main/java/jsettlers/main/android/gameplay/controlsmenu/selection/ShipsSelectionFragment.java index 0503a91161..bc12604192 100644 --- a/jsettlers.main.android/src/main/java/jsettlers/main/android/gameplay/controlsmenu/selection/ShipsSelectionFragment.java +++ b/jsettlers.main.android/src/main/java/jsettlers/main/android/gameplay/controlsmenu/selection/ShipsSelectionFragment.java @@ -73,7 +73,7 @@ public void onActivityCreated(@Nullable Bundle savedInstanceState) { for (int i = 0; i < shipTypes.length; i++) { EMovableType shipType = shipTypes[i]; - int count = getSelection().getMovableCount(shipType); + int count = getSelection().getMovableCount(shipType, null); if (count > 0) { OriginalImageProvider.get(shipImageLinks[i]).setAsImage(shipImageViews.get(i)); diff --git a/jsettlers.main.android/src/main/java/jsettlers/main/android/gameplay/controlsmenu/selection/SoldiersSelectionFragment.java b/jsettlers.main.android/src/main/java/jsettlers/main/android/gameplay/controlsmenu/selection/SoldiersSelectionFragment.java index 041f70db6b..0117dc92eb 100644 --- a/jsettlers.main.android/src/main/java/jsettlers/main/android/gameplay/controlsmenu/selection/SoldiersSelectionFragment.java +++ b/jsettlers.main.android/src/main/java/jsettlers/main/android/gameplay/controlsmenu/selection/SoldiersSelectionFragment.java @@ -31,10 +31,12 @@ import jsettlers.common.action.EActionType; import jsettlers.common.movable.EMovableType; +import jsettlers.common.player.ECivilisation; +import jsettlers.graphics.map.draw.ECommonLinkType; +import jsettlers.graphics.map.draw.ImageLinkMap; import jsettlers.main.android.R; import jsettlers.main.android.core.controls.ActionControls; import jsettlers.main.android.core.controls.ControlsResolver; -import jsettlers.main.android.core.resources.ImageLinkFactory; import jsettlers.main.android.core.resources.OriginalImageProvider; /** @@ -75,7 +77,7 @@ public void onActivityCreated(@Nullable Bundle savedInstanceState) { LayoutInflater layoutInflater = LayoutInflater.from(getActivity()); for (EMovableType movableType : soldierTypes) { - int count = getSelection().getMovableCount(movableType); + int count = getSelection().getMovableCount(movableType, null); if (count > 0) { LinearLayout soldiersLayout = getLevelLayout(movableType); @@ -84,7 +86,7 @@ public void onActivityCreated(@Nullable Bundle savedInstanceState) { ImageView imageView = (ImageView) view.findViewById(R.id.image_view_specialist); TextView textView = (TextView) view.findViewById(R.id.text_view_specialist_count); - OriginalImageProvider.get(ImageLinkFactory.get(movableType)).setAsImage(imageView); + OriginalImageProvider.get(ImageLinkMap.get(ECivilisation.ROMAN, ECommonLinkType.SETTLER_GUI, movableType)).setAsImage(imageView); textView.setText(count + ""); soldiersLayout.addView(view); diff --git a/jsettlers.main.android/src/main/java/jsettlers/main/android/gameplay/controlsmenu/selection/SpecialistsSelectionFragment.java b/jsettlers.main.android/src/main/java/jsettlers/main/android/gameplay/controlsmenu/selection/SpecialistsSelectionFragment.java index 53715405c9..c7d3353c4f 100644 --- a/jsettlers.main.android/src/main/java/jsettlers/main/android/gameplay/controlsmenu/selection/SpecialistsSelectionFragment.java +++ b/jsettlers.main.android/src/main/java/jsettlers/main/android/gameplay/controlsmenu/selection/SpecialistsSelectionFragment.java @@ -31,10 +31,12 @@ import jsettlers.common.action.ConvertAction; import jsettlers.common.action.EActionType; import jsettlers.common.movable.EMovableType; +import jsettlers.common.player.ECivilisation; +import jsettlers.graphics.map.draw.ECommonLinkType; +import jsettlers.graphics.map.draw.ImageLinkMap; import jsettlers.main.android.R; import jsettlers.main.android.core.controls.ActionControls; import jsettlers.main.android.core.controls.ControlsResolver; -import jsettlers.main.android.core.resources.ImageLinkFactory; import jsettlers.main.android.core.resources.OriginalImageProvider; /** @@ -65,14 +67,14 @@ public void onActivityCreated(@Nullable Bundle savedInstanceState) { LayoutInflater layoutInflater = LayoutInflater.from(getActivity()); for (EMovableType movableType : specialistTypes) { - int count = getSelection().getMovableCount(movableType); + int count = getSelection().getMovableCount(movableType, null); if (count > 0) { View view = layoutInflater.inflate(R.layout.view_specialist, specialistsLayout, false); ImageView imageView = (ImageView) view.findViewById(R.id.image_view_specialist); TextView textView = (TextView) view.findViewById(R.id.text_view_specialist_count); - OriginalImageProvider.get(ImageLinkFactory.get(movableType)).setAsImage(imageView); + OriginalImageProvider.get(ImageLinkMap.get(ECivilisation.ROMAN, ECommonLinkType.SETTLER_GUI, movableType)).setAsImage(imageView); textView.setText(count + ""); specialistsLayout.addView(view); diff --git a/jsettlers.main.android/src/main/java/jsettlers/main/android/gameplay/controlsmenu/selection/features/OccupiedFeature.java b/jsettlers.main.android/src/main/java/jsettlers/main/android/gameplay/controlsmenu/selection/features/OccupiedFeature.java index 81623ad595..e1653a155d 100644 --- a/jsettlers.main.android/src/main/java/jsettlers/main/android/gameplay/controlsmenu/selection/features/OccupiedFeature.java +++ b/jsettlers.main.android/src/main/java/jsettlers/main/android/gameplay/controlsmenu/selection/features/OccupiedFeature.java @@ -29,14 +29,16 @@ import jsettlers.common.images.OriginalImageLink; import jsettlers.common.movable.ESoldierClass; import jsettlers.common.movable.ESoldierType; +import jsettlers.common.player.ECivilisation; import jsettlers.graphics.action.ActionFireable; import jsettlers.graphics.map.controls.original.panel.selection.BuildingState; +import jsettlers.graphics.map.draw.ECommonLinkType; +import jsettlers.graphics.map.draw.ImageLinkMap; import jsettlers.main.android.R; import jsettlers.main.android.core.controls.ActionClickListener; import jsettlers.main.android.core.controls.ActionControls; import jsettlers.main.android.core.controls.DrawControls; import jsettlers.main.android.core.controls.DrawListener; -import jsettlers.main.android.core.resources.ImageLinkFactory; import jsettlers.main.android.core.resources.OriginalImageProvider; import jsettlers.main.android.gameplay.customviews.InGameButton; import jsettlers.main.android.gameplay.navigation.MenuNavigator; @@ -154,7 +156,7 @@ private void addOccupiers(LinearLayout container, List list, Object value, int i super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); Integer player = (Integer) value; - setIcon(new RectIcon(22, new Color(mapContent.getPlayerColor(player.byteValue()).getARGB()), Color.GRAY)); + setIcon(new RectIcon(22, new Color(MapDrawContext.getPlayerColor(player.byteValue()).getARGB()), Color.GRAY)); setText(String.format(Locale.ENGLISH, EditorLabels.getLabel("general.player_x"), player)); return this; From a27c5b37e6b7872e4e5b94630ad307c01ea3b7b4 Mon Sep 17 00:00:00 2001 From: Paul Wedeck Date: Fri, 24 Apr 2020 19:23:54 +0200 Subject: [PATCH 18/21] add nation specific ships --- .../common/movable/IShipInConstruction.java | 3 ++ .../panel/selection/SelectionRow.java | 6 +++- .../panel/selection/ShipSelectionContent.java | 8 ++++-- .../graphics/map/draw/MapObjectDrawer.java | 28 ++++++------------- .../draw/settlerimages/movables-AMAZON.txt | 16 +++++++++++ .../map/draw/settlerimages/movables-ASIAN.txt | 16 +++++++++++ .../draw/settlerimages/movables-EGYPTIAN.txt | 16 +++++++++++ .../map/draw/settlerimages/movables-ROMAN.txt | 16 +++++++++++ .../map/draw/settlerimages/movables.txt | 9 ++++++ .../buildings/workers/DockyardBuilding.java | 2 +- .../objects/ShipInConstructionMapObject.java | 10 ++++++- 11 files changed, 105 insertions(+), 25 deletions(-) diff --git a/jsettlers.common/src/main/java/jsettlers/common/movable/IShipInConstruction.java b/jsettlers.common/src/main/java/jsettlers/common/movable/IShipInConstruction.java index bd3a3c6b0a..16ab2dd3d5 100644 --- a/jsettlers.common/src/main/java/jsettlers/common/movable/IShipInConstruction.java +++ b/jsettlers.common/src/main/java/jsettlers/common/movable/IShipInConstruction.java @@ -16,6 +16,7 @@ package jsettlers.common.movable; import jsettlers.common.mapobject.EMapObjectType; +import jsettlers.common.player.IPlayer; /** * Created by Andreas Eberle on 07.09.2017. @@ -27,4 +28,6 @@ public interface IShipInConstruction { EDirection getDirection(); EMapObjectType getObjectType(); + + IPlayer getPlayer(); } diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/SelectionRow.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/SelectionRow.java index 215f9b18d7..dd9be61ef7 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/SelectionRow.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/SelectionRow.java @@ -64,7 +64,11 @@ public void drawAt(GLDrawContext gl) { .getMinY() + getPosition().getHeight() / 4; float left = getPosition().getMinX(); float imagex = left + width / 20; - image.drawAt(gl, imagex, bottomy, 0, color, 1); + if(type == EMovableType.FERRY || type == EMovableType.CARGO_SHIP) { + image.drawImageAtRect(gl, imagex, bottomy, width/5, width/5); + } else { + image.drawAt(gl, imagex, bottomy, 0, color, 1); + } TextDrawer drawer = gl.getTextDrawer(EFontSize.NORMAL); diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/ShipSelectionContent.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/ShipSelectionContent.java index f22e4e4bec..12bf351337 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/ShipSelectionContent.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/ShipSelectionContent.java @@ -43,10 +43,12 @@ public ShipSelectionContent(ISelectionSet selection) { SoldierSelectionContent.addRowsToPanel(panel, selection, shiptypes); UIPanel kill = new LabeledButton(Labels.getString("kill"), new Action(EActionType.DESTROY)); - UIPanel unload = new LabeledButton(Labels.getString("unload"), new Action(EActionType.UNLOAD_FERRIES)); - panel.addChild(kill, .1f, .3f, .9f, .4f); - panel.addChild(unload, .1f, .1f, .9f, .2f); + + if(selection.getMovableCount(EMovableType.FERRY, null) > 0) { + UIPanel unload = new LabeledButton(Labels.getString("unload"), new Action(EActionType.UNLOAD_FERRIES)); + panel.addChild(unload, .1f, .1f, .9f, .2f); + } } @Override diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/MapObjectDrawer.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/MapObjectDrawer.java index 57c49d99e3..ee8261aead 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/MapObjectDrawer.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/MapObjectDrawer.java @@ -22,6 +22,7 @@ import go.graphics.GLDrawContext; import jsettlers.common.Color; import jsettlers.common.CommonConstants; +import jsettlers.common.action.EActionType; import jsettlers.common.buildings.EBuildingType; import jsettlers.common.buildings.IBuilding; import jsettlers.common.buildings.IBuilding.IOccupied; @@ -283,21 +284,14 @@ public void drawStockFront(int x, int y, IBuilding stock) { } } - // TODO nations private void drawShipInConstruction(int x, int y, IShipInConstruction ship) { - byte fogOfWarVisibleStatus = visibleGrid != null ? visibleGrid[x][y] : CommonConstants.FOG_OF_WAR_VISIBLE; - EDirection direction = ship.getDirection(); - EDirection shipImageDirection = direction.rotateRight(3); // ship images have a different direction numbering - EMapObjectType shipType = ship.getObjectType(); - float shade = getColor(fogOfWarVisibleStatus); + EMovableType shipType = ship.getObjectType() == EMapObjectType.FERRY ? EMovableType.FERRY : EMovableType.CARGO_SHIP; + float shade = getColor(visibleGrid != null ? visibleGrid[x][y] : CommonConstants.FOG_OF_WAR_VISIBLE); float state = ship.getStateProgress(); - int baseSequence = (shipType == EMapObjectType.FERRY) ? FERRY_BASE_SEQUENCE : CARGO_SHIP_BASE_SEQUENCE; - ImageLink shipLink = new OriginalImageLink(EImageLinkType.SETTLER, SHIP_IMAGE_FILE, baseSequence + 3, shipImageDirection.ordinal); - Image image = imageProvider.getImage(shipLink); + Image image = imageMap.getImageForSettler(ship.getPlayer().getCivilisation(), shipType, EMovableAction.NO_ACTION, EMaterialType.TREE, ship.getDirection(), 0); drawWithConstructionMask(x, y, state, image, shade); } - // TODO nations private void drawShip(IMovable ship, int x, int y) { forceSetup(); @@ -307,14 +301,11 @@ private void drawShip(IMovable ship, int x, int y) { } float height = context.getMap().getHeightAt(x, y); EDirection direction = ship.getDirection(); - EDirection shipImageDirection = direction.rotateRight(3); // ship images have a different direction numbering EMovableType shipType = ship.getMovableType(); float shade = getColor(fogOfWarVisibleStatus); - int baseSequence = (shipType == EMovableType.FERRY) ? FERRY_BASE_SEQUENCE : CARGO_SHIP_BASE_SEQUENCE; GLDrawContext glDrawContext = context.getGl(); MapCoordinateConverter mapCoordinateConverter = context.getConverter(); - int sailSequence = (shipType == EMovableType.FERRY) ? 29 : 28; // get drawing position Color color = MapDrawContext.getPlayerColor(ship.getPlayer().getPlayerId()); @@ -330,7 +321,7 @@ private void drawShip(IMovable ship, int x, int y) { viewY += mapCoordinateConverter.getViewY(x, y, height); } // draw ship body - drawShipLink(SHIP_IMAGE_FILE, baseSequence, shipImageDirection, glDrawContext, viewX, viewY, color, shade); + drawShipLink(ship, EMaterialType.IRON, glDrawContext, viewX, viewY, color, shade); // prepare freight drawing List passengerList = ship.getPassengers(); @@ -404,7 +395,7 @@ EMaterialType.NO_MATERIAL, getPassengerDirection(direction, shipPosition, i), 0 } } // draw sail - drawShipLink(SHIP_IMAGE_FILE, sailSequence, shipImageDirection, glDrawContext, viewX, viewY, color, shade); + drawShipLink(ship, EMaterialType.TRUNK, glDrawContext, viewX, viewY, color, shade); if (shipType == EMovableType.FERRY) { // draw passengers in front of the sail for (int i = 0; i < numberOfFreight; i++) { @@ -437,7 +428,7 @@ EMaterialType.NO_MATERIAL, getPassengerDirection(direction, shipPosition, i), 0 } } // draw ship front - drawShipLink(SHIP_IMAGE_FILE, baseSequence + 2, shipImageDirection, glDrawContext, viewX, viewY, color, shade); + drawShipLink(ship, EMaterialType.PLANK, glDrawContext, viewX, viewY, color, shade); if (ship.isSelected()) { drawSelectionMark(viewX, viewY, ship.getHealth() / shipType.getHealth()); } @@ -450,9 +441,8 @@ private EDirection getPassengerDirection(EDirection shipDirection, ShortPoint2D return shipDirection.getNeighbor(((x + seatIndex + slowerAnimationStep) / 8 + (y + seatIndex + slowerAnimationStep) / 11 + seatIndex) % 3 - 1); } - private void drawShipLink(int imageFile, int sequence, EDirection direction, GLDrawContext gl, float viewX, float viewY, Color color, float shade) { - ImageLink shipLink = new OriginalImageLink(EImageLinkType.SETTLER, imageFile, sequence, direction.ordinal); - Image image = imageProvider.getImage(shipLink); + private void drawShipLink(IMovable ship, EMaterialType fakeMat, GLDrawContext gl, float viewX, float viewY, Color color, float shade) { + Image image = imageMap.getImageForSettler(ship.getPlayer().getCivilisation(), ship.getMovableType(), ship.getAction(), fakeMat, ship.getDirection(), 0); image.drawAt(gl, viewX, viewY, 0, color, shade); } diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-AMAZON.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-AMAZON.txt index a4f81d4dc4..cc211fb5f0 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-AMAZON.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-AMAZON.txt @@ -553,3 +553,19 @@ BOWMAN_L3, ACTION1, *, NORTH_WEST = 42, 24, 48, 24 BOWMAN_L3, ACTION1, *, NORTH_EAST = 42, 24, 72, 24 BOWMAN_L3, ACTION1, *, EAST = 42, 24, 96, 24 BOWMAN_L3, ACTION1, *, SOUTH_EAST = 42, 24, 120, 24 + + + +### +# FERRY and CARGO_SHIP movables start +### +#IRON = back, TRUNK = sail, PLANK = front, TREE or * = in construction +SHIP_SEQ(FERRY, IRON, 46, 4) +SHIP_SEQ(FERRY, TRUNK, 46, 8) +SHIP_SEQ(FERRY, PLANK, 46, 6) +SHIP_SEQ(FERRY, *, 46, 7) + +SHIP_SEQ(CARGO_SHIP, IRON, 46, 0) +SHIP_SEQ(CARGO_SHIP, TRUNK, 46, 8) +SHIP_SEQ(CARGO_SHIP, PLANK, 46, 2) +SHIP_SEQ(CARGO_SHIP, *, 46, 3) diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ASIAN.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ASIAN.txt index d4384db966..5554968635 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ASIAN.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ASIAN.txt @@ -490,3 +490,19 @@ BOWMAN_L3, ACTION1, *, NORTH_WEST = 32, 26, 48, 24 BOWMAN_L3, ACTION1, *, NORTH_EAST = 32, 26, 72, 24 BOWMAN_L3, ACTION1, *, EAST = 32, 26, 96, 24 BOWMAN_L3, ACTION1, *, SOUTH_EAST = 32, 26, 120, 24 + + + +### +# FERRY and CARGO_SHIP movables start +### +#IRON = back, TRUNK = sail, PLANK = front, TREE or * = in construction +SHIP_SEQ(FERRY, IRON, 36, 16) +SHIP_SEQ(FERRY, TRUNK, 36, 32) +SHIP_SEQ(FERRY, PLANK, 36, 18) +SHIP_SEQ(FERRY, *, 36, 19) + +SHIP_SEQ(CARGO_SHIP, IRON, 36, 20) +SHIP_SEQ(CARGO_SHIP, TRUNK, 36, 33) +SHIP_SEQ(CARGO_SHIP, PLANK, 36, 22) +SHIP_SEQ(CARGO_SHIP, *, 36, 23) diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-EGYPTIAN.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-EGYPTIAN.txt index 87901a1564..735a372cc4 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-EGYPTIAN.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-EGYPTIAN.txt @@ -489,3 +489,19 @@ BOWMAN_L3, ACTION1, *, NORTH_WEST = 22, 31, 48, 24 BOWMAN_L3, ACTION1, *, NORTH_EAST = 22, 31, 72, 24 BOWMAN_L3, ACTION1, *, EAST = 22, 31, 96, 24 BOWMAN_L3, ACTION1, *, SOUTH_EAST = 22, 31, 120, 24 + + + +### +# FERRY and CARGO_SHIP movables start +### +#IRON = back, TRUNK = sail, PLANK = front, TREE or * = in construction +SHIP_SEQ(FERRY, IRON, 36, 12) +SHIP_SEQ(FERRY, TRUNK, 36, 31) +SHIP_SEQ(FERRY, PLANK, 36, 14) +SHIP_SEQ(FERRY, *, 36, 15) + +SHIP_SEQ(CARGO_SHIP, IRON, 36, 8) +SHIP_SEQ(CARGO_SHIP, TRUNK, 36, 30) +SHIP_SEQ(CARGO_SHIP, PLANK, 36, 10) +SHIP_SEQ(CARGO_SHIP, *, 36, 11) diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt index b613880941..86f20aa6f6 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables-ROMAN.txt @@ -551,3 +551,19 @@ BOWMAN_L3, ACTION1, *, NORTH_WEST = 12, 26, 48, 24 BOWMAN_L3, ACTION1, *, NORTH_EAST = 12, 26, 72, 24 BOWMAN_L3, ACTION1, *, EAST = 12, 26, 96, 24 BOWMAN_L3, ACTION1, *, SOUTH_EAST = 12, 26, 120, 24 + + + +### +# FERRY and CARGO_SHIP movables start +### +#IRON = back, TRUNK = sail, PLANK = front, TREE or * = in construction +SHIP_SEQ(FERRY, IRON, 36, 4) +SHIP_SEQ(FERRY, TRUNK, 36, 29) +SHIP_SEQ(FERRY, PLANK, 36, 6) +SHIP_SEQ(FERRY, *, 36, 7) + +SHIP_SEQ(CARGO_SHIP, IRON, 36, 0) +SHIP_SEQ(CARGO_SHIP, TRUNK, 36, 28) +SHIP_SEQ(CARGO_SHIP, PLANK, 36, 2) +SHIP_SEQ(CARGO_SHIP, *, 36, 3) diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt index d505d2fac3..dc9bf416f9 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/settlerimages/movables.txt @@ -42,6 +42,15 @@ $type, $action, $mat, EAST = $file, $seq, 19, -4 $type, $action, $mat, SOUTH_EAST = $file, $seq, 23, -4 } +!SHIP_SEQ type mat file seq { +$type, *, $mat, SOUTH_WEST = $file, $seq, 0, 1 +$type, *, $mat, WEST = $file, $seq, 1, 1 +$type, *, $mat, NORTH_WEST = $file, $seq, 2, 1 +$type, *, $mat, NORTH_EAST = $file, $seq, 3, 1 +$type, *, $mat, EAST = $file, $seq, 4, 1 +$type, *, $mat, SOUTH_EAST = $file, $seq, 5, 1 +} + # common movables ### diff --git a/jsettlers.logic/src/main/java/jsettlers/logic/buildings/workers/DockyardBuilding.java b/jsettlers.logic/src/main/java/jsettlers/logic/buildings/workers/DockyardBuilding.java index d428c70d32..49b2568851 100644 --- a/jsettlers.logic/src/main/java/jsettlers/logic/buildings/workers/DockyardBuilding.java +++ b/jsettlers.logic/src/main/java/jsettlers/logic/buildings/workers/DockyardBuilding.java @@ -72,7 +72,7 @@ public void buildShipAction() { // make new ship EDirection direction = dockPosition.getDirection().getNeighbor(-1); - ship = new ShipInConstructionMapObject(orderedShipType, direction); + ship = new ShipInConstructionMapObject(getPlayer(), orderedShipType, direction); grid.getMapObjectsManager().addMapObject(getShipPosition(), ship); } diff --git a/jsettlers.logic/src/main/java/jsettlers/logic/objects/ShipInConstructionMapObject.java b/jsettlers.logic/src/main/java/jsettlers/logic/objects/ShipInConstructionMapObject.java index efe11f3a33..d57a68d8dc 100644 --- a/jsettlers.logic/src/main/java/jsettlers/logic/objects/ShipInConstructionMapObject.java +++ b/jsettlers.logic/src/main/java/jsettlers/logic/objects/ShipInConstructionMapObject.java @@ -20,13 +20,16 @@ import jsettlers.common.movable.EShipType; import jsettlers.common.movable.IShipInConstruction; import jsettlers.logic.map.grid.objects.AbstractHexMapObject; +import jsettlers.logic.player.Player; public class ShipInConstructionMapObject extends AbstractHexMapObject implements IShipInConstruction{ + private final Player player; private final EShipType shipType; private final EDirection direction; private int works = 0; - public ShipInConstructionMapObject(EShipType shipType, EDirection direction) { + public ShipInConstructionMapObject(Player player, EShipType shipType, EDirection direction) { + this.player = player; this.shipType = shipType; this.direction = direction; } @@ -45,6 +48,11 @@ public void workOnShip() { works++; } + @Override + public Player getPlayer() { + return player; + } + @Override public boolean cutOff() { return false; From c724a483f4fc41d4679f2f0d603f653937a34d2f Mon Sep 17 00:00:00 2001 From: Paul Wedeck Date: Wed, 29 Apr 2020 10:41:49 +0200 Subject: [PATCH 19/21] implement fallback graphics for non-ROMAN nations (if file couldn't be loaded), add clone mechanism to increase readability of linkmap.txt --- .../common/images/OriginalImageLink.java | 9 +++++++++ .../graphics/map/draw/ImageLinkMap.java | 20 +++++++++++++++++++ .../graphics/map/draw/ImageProvider.java | 8 +++++++- .../graphics/map/draw/MapObjectDrawer.java | 2 +- .../draw/settlerimages/SettlerImageMap.java | 5 ++++- .../jsettlers/graphics/map/draw/linkmap.txt | 7 +++++++ 6 files changed, 48 insertions(+), 3 deletions(-) diff --git a/jsettlers.common/src/main/java/jsettlers/common/images/OriginalImageLink.java b/jsettlers.common/src/main/java/jsettlers/common/images/OriginalImageLink.java index e4697f70f1..83b5686a54 100644 --- a/jsettlers.common/src/main/java/jsettlers/common/images/OriginalImageLink.java +++ b/jsettlers.common/src/main/java/jsettlers/common/images/OriginalImageLink.java @@ -33,6 +33,7 @@ public final class OriginalImageLink extends ImageLink { private final int image; private final int length; private final String humanName; + private OriginalImageLink fallback; /** * Creates a new image link description. @@ -160,4 +161,12 @@ public EImageLinkType type() { public String getHumanName() { return humanName; } + + public void setFallback(OriginalImageLink fallback) { + this.fallback = fallback; + } + + public OriginalImageLink getFallback() { + return fallback; + } } diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/ImageLinkMap.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/ImageLinkMap.java index e8aa64e894..763b30852c 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/ImageLinkMap.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/ImageLinkMap.java @@ -8,13 +8,16 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; +import jsettlers.common.action.EMoveToType; import jsettlers.common.images.ImageLink; +import jsettlers.common.images.OriginalImageLink; import jsettlers.common.movable.EMovableType; import jsettlers.common.player.ECivilisation; public final class ImageLinkMap { private static final Pattern BEGIN_PATTERN = Pattern.compile("\\s*([\\w\\*]+)\\s*,\\s*([\\w\\*]+)\\s*\\{\\s*"); private static final Pattern LINE_PATTERN = Pattern.compile("\\s*([\\w\\*]+)\\s*:\\s*([\\w\\*]+)\\s*"); + private static final Pattern CLONE_PATTERN = Pattern.compile("\\s*clone\\s*([\\w\\*]+)\\s*,\\s*([\\w\\*]+)\\s*to\\s*([\\w\\*]+)\\s*,\\s*([\\w\\*]+)\\s*"); public static final ImageLinkMap INSTANCE = new ImageLinkMap("linkmap.txt"); @@ -57,6 +60,19 @@ private void readFile(BufferedReader reader) throws IOException { movable = null; type = null; + } else if(movable == null && line.startsWith("clone ")) { + Matcher clone = CLONE_PATTERN.matcher(line); + if(!clone.matches()) throw new IllegalStateException("Illegal clone marker!"); + + ECommonLinkType origType = ECommonLinkType.valueOf(clone.group(1)); + EMovableType origMovable = EMovableType.valueOf(clone.group(2)); + + ECommonLinkType dstType = ECommonLinkType.valueOf(clone.group(3)); + EMovableType dstMovable = EMovableType.valueOf(clone.group(4)); + + for(EnumMap> civMap : map.values()) { + civMap.get(dstType).put(dstMovable, civMap.get(origType).get(origMovable)); + } } else { if(movable == null) throw new IllegalStateException("Declaration outside of section!"); @@ -65,6 +81,10 @@ private void readFile(BufferedReader reader) throws IOException { ECivilisation civ = ECivilisation.valueOf(declaration.group(1)); ImageLink link = ImageLink.fromName(declaration.group(2)); + if(civ != ECivilisation.ROMAN && link instanceof OriginalImageLink) { + ImageLink fallback = map.get(ECivilisation.ROMAN).get(type).get(movable); + if(fallback instanceof OriginalImageLink) ((OriginalImageLink)link).setFallback((OriginalImageLink)fallback); + } map.get(civ).get(type).put(movable, link); } diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/ImageProvider.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/ImageProvider.java index ba5e2c19b5..9f04c0f19e 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/ImageProvider.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/ImageProvider.java @@ -191,7 +191,13 @@ private Image getDetailedImage(OriginalImageLink link, float width, float height */ private Image getSequencedImage(OriginalImageLink link, int sequenceNumber) { if (link.getType() == EImageLinkType.SETTLER) { - return getSettlerSequence(link.getFile(), link.getSequence()).getImageSafe(link.getImage() + sequenceNumber, link::getHumanName); + Image image = getSettlerSequence(link.getFile(), link.getSequence()).getImageSafe(link.getImage() + sequenceNumber, link::getHumanName); + if(image != NullImage.getInstance()) return image; + + OriginalImageLink fallbackLink = link.getFallback(); + if(fallbackLink == null) return image; + + return getSequencedImage(fallbackLink, sequenceNumber); } else { return getGuiImage(link.getFile(), link.getSequence() + sequenceNumber, link::getHumanName); } diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/MapObjectDrawer.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/MapObjectDrawer.java index ee8261aead..195e008d41 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/MapObjectDrawer.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/MapObjectDrawer.java @@ -1296,7 +1296,7 @@ private void drawOccupiers(int x, int y, IOccupied building, float baseColor) { case INFANTRY: ImageLink imageLink = ImageLinkMap.get(movable.getPlayer().getCivilisation(), place.looksRight() ? ECommonLinkType.GARRISON_RIGHT:ECommonLinkType.GARRISON_LEFT, movable.getMovableType()); image = imageProvider.getImage(imageLink); - ((SettlerImage)image).setShadow(null); + if(image instanceof SettlerImage) ((SettlerImage)image).setShadow(null); break; case BOWMAN: default: diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/SettlerImageMap.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/SettlerImageMap.java index c9473338d9..09e5a24e7d 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/SettlerImageMap.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/SettlerImageMap.java @@ -25,6 +25,7 @@ import jsettlers.common.movable.IMovable; import jsettlers.common.player.ECivilisation; import jsettlers.graphics.image.Image; +import jsettlers.graphics.image.NullImage; import jsettlers.graphics.localization.Labels; import jsettlers.graphics.map.draw.ImageProvider; @@ -341,7 +342,9 @@ public Image getImageForSettler(ECivilisation civilisation, EMovableType movable } else { imageIndex = item.getStart() + Math.max((int) (progress * duration), duration + 1); } - return this.imageProvider.getSettlerSequence(item.getFile(), item.getSequenceIndex()).getImageSafe(imageIndex, () -> Labels.getName(movableType) + "-" + action + "-" + Labels.getName(material, false ) + "-" + direction + "%" + progress); + Image image = this.imageProvider.getSettlerSequence(item.getFile(), item.getSequenceIndex()).getImageSafe(imageIndex, () -> Labels.getName(movableType) + "-" + action + "-" + Labels.getName(material, false ) + "-" + direction + "%" + progress); + if(image == NullImage.getInstance() && civilisation != ECivilisation.ROMAN) image = getImageForSettler(ECivilisation.ROMAN, movableType, action, material, direction, progress); + return image; } /** diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/linkmap.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/linkmap.txt index 6f752bdd9a..7d212aa4d7 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/linkmap.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/linkmap.txt @@ -43,6 +43,13 @@ GARRISON_RIGHT, SWORDSMAN_L3 { AMAZON: original_42_SETTLER_27_1 } +clone GARRISON_LEFT, SWORDSMAN_L1 to GARRISON_LEFT, PIKEMAN_L1 +clone GARRISON_LEFT, SWORDSMAN_L2 to GARRISON_LEFT, PIKEMAN_L2 +clone GARRISON_LEFT, SWORDSMAN_L3 to GARRISON_LEFT, PIKEMAN_L3 + +clone GARRISON_RIGHT, SWORDSMAN_L1 to GARRISON_RIGHT, PIKEMAN_L1 +clone GARRISON_RIGHT, SWORDSMAN_L2 to GARRISON_RIGHT, PIKEMAN_L2 +clone GARRISON_RIGHT, SWORDSMAN_L3 to GARRISON_RIGHT, PIKEMAN_L3 SETTLER_GUI, SWORDSMAN_L1 { ROMAN: original_14_GUI_207 From 6a57b1f801174c80ae64cdc526d2bb190e41d8a7 Mon Sep 17 00:00:00 2001 From: Paul Wedeck Date: Wed, 29 Apr 2020 15:58:29 +0200 Subject: [PATCH 20/21] add nation specific images to SettlersStatisticsPanel --- .../graphics/ui/generate/LayoutLoader.java | 3 ++ .../ui/generate/LayoutSourceGenerator.java | 4 +-- .../graphics/ui/generate/LinkMapArgument.java | 21 ++++++++++++ .../statistics/SettlersStatisticsPanel.java | 4 ++- .../graphics/map/draw/ImageLinkMap.java | 1 - .../main/res/layout/StatisticLayoutRomans.xml | 24 ++++++------- .../src/main/res/layout/layout.dtd | 8 ++++- .../jsettlers/graphics/map/draw/linkmap.txt | 34 +++++++++++++++++++ 8 files changed, 82 insertions(+), 17 deletions(-) create mode 100644 jsettlers.graphics/layoutbuilder/src/main/java/jsettlers/graphics/ui/generate/LinkMapArgument.java diff --git a/jsettlers.graphics/layoutbuilder/src/main/java/jsettlers/graphics/ui/generate/LayoutLoader.java b/jsettlers.graphics/layoutbuilder/src/main/java/jsettlers/graphics/ui/generate/LayoutLoader.java index b6182f3269..2fc36da5e4 100644 --- a/jsettlers.graphics/layoutbuilder/src/main/java/jsettlers/graphics/ui/generate/LayoutLoader.java +++ b/jsettlers.graphics/layoutbuilder/src/main/java/jsettlers/graphics/ui/generate/LayoutLoader.java @@ -78,6 +78,9 @@ public void startElement(String uri, String localName, String qName, Attributes panelStack.getLast().addArgument( new UncheckedEnumArgument(attributes, "alignment", "jsettlers.graphics.ui.Label.EHorizontalAlignment")); break; + case "mappedImage": + panelStack.getLast().addArgument(new LinkMapArgument(attributes)); + break; } } diff --git a/jsettlers.graphics/layoutbuilder/src/main/java/jsettlers/graphics/ui/generate/LayoutSourceGenerator.java b/jsettlers.graphics/layoutbuilder/src/main/java/jsettlers/graphics/ui/generate/LayoutSourceGenerator.java index 4f3ce695ea..3d87eac12d 100644 --- a/jsettlers.graphics/layoutbuilder/src/main/java/jsettlers/graphics/ui/generate/LayoutSourceGenerator.java +++ b/jsettlers.graphics/layoutbuilder/src/main/java/jsettlers/graphics/ui/generate/LayoutSourceGenerator.java @@ -75,11 +75,11 @@ private void writeSourceTo(PrintWriter writer) { writer.println(); writer.println("public " + name + "() {"); - writer.println("this(null);"); + writer.println("this(null, null);"); writer.println("}"); writer.println(); - writer.println("public " + name + "(jsettlers.graphics.ui.ELayoutSize __size) {"); + writer.println("public " + name + "(jsettlers.graphics.ui.ELayoutSize __size, jsettlers.common.player.ECivilisation __civilisation) {"); for (Entry s : sizes.entrySet()) { writer.print("if (__size == " + s.getKey().getSymbol() + ")"); diff --git a/jsettlers.graphics/layoutbuilder/src/main/java/jsettlers/graphics/ui/generate/LinkMapArgument.java b/jsettlers.graphics/layoutbuilder/src/main/java/jsettlers/graphics/ui/generate/LinkMapArgument.java new file mode 100644 index 0000000000..80568e655d --- /dev/null +++ b/jsettlers.graphics/layoutbuilder/src/main/java/jsettlers/graphics/ui/generate/LinkMapArgument.java @@ -0,0 +1,21 @@ +package jsettlers.graphics.ui.generate; + +import org.xml.sax.Attributes; + +public class LinkMapArgument extends AbstractArgument { + + private String type; + private String movable; + + public LinkMapArgument(Attributes attributes) { + super(); + + type = attributes.getValue("type"); + movable = attributes.getValue("movableType"); + } + + @Override + public String getArgumentSource() { + return "jsettlers.graphics.map.draw.ImageLinkMap.get(__civilisation, jsettlers.graphics.map.draw.ECommonLinkType." + type + ", jsettlers.common.movable.EMovableType." + movable + ")"; + } +} diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/content/settlers/statistics/SettlersStatisticsPanel.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/content/settlers/statistics/SettlersStatisticsPanel.java index 8fcbc6da35..b01bb798b8 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/content/settlers/statistics/SettlersStatisticsPanel.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/content/settlers/statistics/SettlersStatisticsPanel.java @@ -16,6 +16,7 @@ import go.graphics.text.EFontSize; import jsettlers.common.movable.EMovableType; +import jsettlers.common.player.ECivilisation; import jsettlers.common.player.IInGamePlayer; import jsettlers.common.player.ISettlerInformation; import jsettlers.graphics.action.ActionFireable; @@ -37,7 +38,7 @@ */ public class SettlersStatisticsPanel extends AbstractContentProvider implements IUiContentReceiver { - private final UIPanel panel = new StatisticLayoutRomans()._root; + private UIPanel panel; private final UiPlayerDependingContentUpdater uiContentUpdater = new UiPlayerDependingContentUpdater<>(IInGamePlayer::getSettlerInformation); public SettlersStatisticsPanel() { @@ -45,6 +46,7 @@ public SettlersStatisticsPanel() { } public void setPlayer(IInGamePlayer player) { + panel = new StatisticLayoutRomans(null, player.getCivilisation())._root; uiContentUpdater.updatePlayer(player); } diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/ImageLinkMap.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/ImageLinkMap.java index 763b30852c..728e69fb88 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/ImageLinkMap.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/ImageLinkMap.java @@ -8,7 +8,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import jsettlers.common.action.EMoveToType; import jsettlers.common.images.ImageLink; import jsettlers.common.images.OriginalImageLink; import jsettlers.common.movable.EMovableType; diff --git a/jsettlers.graphics/src/main/res/layout/StatisticLayoutRomans.xml b/jsettlers.graphics/src/main/res/layout/StatisticLayoutRomans.xml index 1b9545ef3b..96bbd3dce7 100644 --- a/jsettlers.graphics/src/main/res/layout/StatisticLayoutRomans.xml +++ b/jsettlers.graphics/src/main/res/layout/StatisticLayoutRomans.xml @@ -31,7 +31,7 @@ - + @@ -40,7 +40,7 @@ - + @@ -48,7 +48,7 @@ - + @@ -56,7 +56,7 @@ - + @@ -64,7 +64,7 @@ - + @@ -73,7 +73,7 @@ - + @@ -81,7 +81,7 @@ - + @@ -89,7 +89,7 @@ - + @@ -97,7 +97,7 @@ - + @@ -106,7 +106,7 @@ - + @@ -114,7 +114,7 @@ - + @@ -122,7 +122,7 @@ - + diff --git a/jsettlers.graphics/src/main/res/layout/layout.dtd b/jsettlers.graphics/src/main/res/layout/layout.dtd index 79078830ec..3103760ad6 100644 --- a/jsettlers.graphics/src/main/res/layout/layout.dtd +++ b/jsettlers.graphics/src/main/res/layout/layout.dtd @@ -4,7 +4,7 @@ - + + + + diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/linkmap.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/linkmap.txt index 7d212aa4d7..9055522f64 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/linkmap.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/linkmap.txt @@ -51,6 +51,7 @@ clone GARRISON_RIGHT, SWORDSMAN_L1 to GARRISON_RIGHT, PIKEMAN_L1 clone GARRISON_RIGHT, SWORDSMAN_L2 to GARRISON_RIGHT, PIKEMAN_L2 clone GARRISON_RIGHT, SWORDSMAN_L3 to GARRISON_RIGHT, PIKEMAN_L3 + SETTLER_GUI, SWORDSMAN_L1 { ROMAN: original_14_GUI_207 EGYPTIAN: original_24_GUI_201 @@ -138,4 +139,37 @@ SETTLER_GUI, THIEF { AMAZON: original_44_GUI_186 } +SETTLER_GUI, MAGE { + ROMAN: original_14_GUI_201 + EGYPTIAN: original_24_GUI_195 + ASIAN: original_34_GUI_213 + AMAZON: original_44_GUI_204 +} +SETTLER_GUI, BEARER { + ROMAN: original_14_GUI_132 + EGYPTIAN: original_24_GUI_126 + ASIAN: original_34_GUI_138 + AMAZON: original_44_GUI_135 +} + +SETTLER_GUI, DIGGER { + ROMAN: original_14_GUI_135 + EGYPTIAN: original_24_GUI_129 + ASIAN: original_34_GUI_141 + AMAZON: original_44_GUI_138 +} + +SETTLER_GUI, BRICKLAYER { + ROMAN: original_14_GUI_138 + EGYPTIAN: original_24_GUI_132 + ASIAN: original_34_GUI_144 + AMAZON: original_44_GUI_141 +} + +SETTLER_GUI, SMITH { + ROMAN: original_14_GUI_150 + EGYPTIAN: original_24_GUI_144 + ASIAN: original_34_GUI_156 + AMAZON: original_44_GUI_153 +} From 769ab4613f0f401edb5ccae6a8e2d47829f53e47 Mon Sep 17 00:00:00 2001 From: Paul Wedeck Date: Wed, 29 Apr 2020 20:14:41 +0200 Subject: [PATCH 21/21] use different images on dockyard --- .../selection/BuildingSelectionContent.java | 2 +- .../graphics/map/draw/ECommonLinkType.java | 3 ++ .../res/layout/DockyardSelectionLayout.xml | 8 ++--- .../jsettlers/graphics/map/draw/linkmap.txt | 29 +++++++++++++++++++ 4 files changed, 37 insertions(+), 5 deletions(-) diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/BuildingSelectionContent.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/BuildingSelectionContent.java index 37c73ff11b..1b7bbd34cf 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/BuildingSelectionContent.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/selection/BuildingSelectionContent.java @@ -591,7 +591,7 @@ private BuildingBackgroundPanel createTradingBuildingContent(BuildingState state } private BuildingBackgroundPanel createDockyardBuildingContent(BuildingState state) { - DockyardSelectionLayout layout = new DockyardSelectionLayout(); + DockyardSelectionLayout layout = new DockyardSelectionLayout(null, building.getPlayer().getCivilisation()); loadPriorityButton(layout.background, layout.priority, state); layout.nameText.setType(building.getBuildingType(), state.isConstruction()); diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/ECommonLinkType.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/ECommonLinkType.java index 11a0b797a9..ebd41de7ca 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/ECommonLinkType.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/ECommonLinkType.java @@ -4,4 +4,7 @@ public enum ECommonLinkType { SETTLER_GUI, GARRISON_LEFT, GARRISON_RIGHT, + + SHIP_GUI_ACTIVE, + SHIP_GUI_INACTIVE, } diff --git a/jsettlers.graphics/src/main/res/layout/DockyardSelectionLayout.xml b/jsettlers.graphics/src/main/res/layout/DockyardSelectionLayout.xml index 88a43454e0..5f7f4395a1 100644 --- a/jsettlers.graphics/src/main/res/layout/DockyardSelectionLayout.xml +++ b/jsettlers.graphics/src/main/res/layout/DockyardSelectionLayout.xml @@ -17,14 +17,14 @@ - - + + - - + + diff --git a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/linkmap.txt b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/linkmap.txt index 9055522f64..bee6b878da 100644 --- a/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/linkmap.txt +++ b/jsettlers.graphics/src/main/resources/jsettlers/graphics/map/draw/linkmap.txt @@ -173,3 +173,32 @@ SETTLER_GUI, SMITH { ASIAN: original_34_GUI_156 AMAZON: original_44_GUI_153 } + + +SHIP_GUI_INACTIVE, FERRY { + ROMAN: original_14_GUI_270 + EGYPTIAN: original_24_GUI_270 + ASIAN: original_34_GUI_279 + AMAZON: original_44_GUI_273 +} + +SHIP_GUI_ACTIVE, FERRY { + ROMAN: original_14_GUI_273 + EGYPTIAN: original_24_GUI_273 + ASIAN: original_34_GUI_282 + AMAZON: original_44_GUI_276 +} + +SHIP_GUI_INACTIVE, CARGO_SHIP { + ROMAN: original_14_GUI_276 + EGYPTIAN: original_24_GUI_264 + ASIAN: original_34_GUI_285 + AMAZON: original_44_GUI_279 +} + +SHIP_GUI_ACTIVE, CARGO_SHIP { + ROMAN: original_14_GUI_279 + EGYPTIAN: original_24_GUI_267 + ASIAN: original_34_GUI_288 + AMAZON: original_44_GUI_282 +}