summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2018-08-03 09:49:19 +0200
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2018-08-03 09:49:19 +0200
commit8491cfd0974f0e12ad914b0cc618550b7fdfcb73 (patch)
treecfde8475be04183cf0b11b49faa2eb5b180d65c7 /src/map-editor
parent468809139d2f92f8160fe56bac70cbff6a22e8bc (diff)
Okay, now it works.
It's still not looking good, though.
Diffstat (limited to 'src/map-editor')
-rw-r--r--src/map-editor/src/Struct/Tile.elm5
-rw-r--r--src/map-editor/src/Struct/TilePattern.elm13
-rw-r--r--src/map-editor/www/style.css2
3 files changed, 10 insertions, 10 deletions
diff --git a/src/map-editor/src/Struct/Tile.elm b/src/map-editor/src/Struct/Tile.elm
index 7fa9260..16d42df 100644
--- a/src/map-editor/src/Struct/Tile.elm
+++ b/src/map-editor/src/Struct/Tile.elm
@@ -172,10 +172,7 @@ solve_tile_instance tiles tile_instance =
{tile_instance | crossing_cost = tile.crossing_cost}
Nothing ->
- (error_tile_instance
- tile_instance.location.x
- tile_instance.location.y
- )
+ {tile_instance | crossing_cost = -1}
decoder : (Json.Decode.Decoder Type)
decoder =
diff --git a/src/map-editor/src/Struct/TilePattern.elm b/src/map-editor/src/Struct/TilePattern.elm
index 5584d99..e86a80b 100644
--- a/src/map-editor/src/Struct/TilePattern.elm
+++ b/src/map-editor/src/Struct/TilePattern.elm
@@ -65,11 +65,14 @@ matches_internals source neighbors pattern maybe_border =
(
(maybe_border == (Just source))
|| (maybe_border == Nothing)
+ || (maybe_border == (Just n))
+ || (maybe_border == (Just -1))
)
- then
- (matches_internals source r_n r_p (Just n))
+ then (matches_internals source r_n r_p (Just n))
else
- (matches_internals source r_n r_p maybe_border)
+ if ((n == -1) || (n == source))
+ then (matches_internals source r_n r_p maybe_border)
+ else (matches_internals source r_n r_p maybe_border) --(False, source)
else
(False, source)
@@ -81,7 +84,7 @@ finish_decoding_pattern str =
"any" -> Any
"A" -> Minor
"B" -> Major
- _ -> Major
+ _ -> Minor
finish_decoding_target : (
(List String) ->
@@ -119,7 +122,7 @@ matches_pattern source n p =
case p of
Any -> True
Major -> (source < n)
- Minor -> (source >= n)
+ Minor -> ((source == n) || (n == -1))
matches : (List Int) -> Int -> Type -> (Bool, Int, Int, Int)
matches neighbors source tile_pattern =
diff --git a/src/map-editor/www/style.css b/src/map-editor/www/style.css
index 2d4d958..b286a10 100644
--- a/src/map-editor/www/style.css
+++ b/src/map-editor/www/style.css
@@ -365,7 +365,7 @@
.map-tile-icon {z-index: 0; position: absolute; background-size: 400%;}
-.map-tile {background-size: 300%;}
+.map-tile {background-size: 400%;}
.map-tabmenu-tiles-tab
{