From 1c838a79bd9df3bcd1e763a4c9ed0432bf91c8c8 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Sun, 20 Jul 2014 14:43:46 +0100 Subject: [PATCH] Added new ruleset and states to support it. --- resources/public/docs/mw-parser/uberdoc.html | 2 +- resources/public/img/tiles/abandoned.png | Bin 0 -> 605 bytes resources/public/img/tiles/inn.png | Bin 0 -> 587 bytes resources/public/img/tiles/plague.png | Bin 0 -> 643 bytes resources/rulesets/settlement.txt | 116 +++++++++++++++++++ resources/templates/rules.html | 3 - src/mw_ui/render_world.clj | 6 +- 7 files changed, 120 insertions(+), 7 deletions(-) create mode 100644 resources/public/img/tiles/abandoned.png create mode 100644 resources/public/img/tiles/inn.png create mode 100644 resources/public/img/tiles/plague.png create mode 100644 resources/rulesets/settlement.txt diff --git a/resources/public/docs/mw-parser/uberdoc.html b/resources/public/docs/mw-parser/uberdoc.html index e7b0e9f..9a00606 100644 --- a/resources/public/docs/mw-parser/uberdoc.html +++ b/resources/public/docs/mw-parser/uberdoc.html @@ -3162,7 +3162,7 @@ front of the sequence of tokens it returns nil.

([tokens expect-int] (or (parse-disjunct-value tokens expect-int) - (parse-simple-value tokens))) + (parse-simple-value tokens expect-int))) ([tokens] (parse-value tokens false)))

Parses a condition of the form '[property] in [value] or [value]...'

(defn parse-member-condition
diff --git a/resources/public/img/tiles/abandoned.png b/resources/public/img/tiles/abandoned.png
new file mode 100644
index 0000000000000000000000000000000000000000..1492e7e66d088a98ad33947f61cf8a00af94a8ba
GIT binary patch
literal 605
zcmV-j0;2tiP)wQ|+
z$9G@SOY;Eon;ULH?@z`XM9KEuB2`?FsD|r+7RZT^HmtN6diT=n<&DgzV504unP2yY
zZYLvtX-_yd`5s6d!VHK4aqv;z(yPVaK409)nP;|WTf3X9)}6sbv}A9IeGB3s2+0+~
zuq8U2(EC?u*WUZBf7?0J%yz^a?V*KwI!+h?KNyC1CH3s{?sxN?NG-gXdODF!vT}h{
z`RoECD!y)67|bmD^}mFKfy9vu&YTKB9d!=dfmu{
z5Q0VF1T0VyMJzZ0_vo66Z8-o)y+BuNx~WtN)DHxUN~o!b?O=Nzi_o-9g%qd|vwJi8
z&2RKRhU)7M{&opmU|k57zdJAh8xTMaqySG2n?MD|Rft=_2J{Ye56qLmQ$Q6m6wZBl
zxe99Y;BEeGo6{b+7<--n#2f_#n7}M#S9%Yu)^)Gbo>_EtRs$dEw9iF))-TUGMGZzI
z%lE9gs1yc`$Bt^1DtBoA4UPHh@WP4o_J^+$s$Lj{cGVQ$vg9p2tIzB*=
zpHEmF4xOa&R!ju$n8=k#%fviL~v$0&N|o1{AP((xlQ{IPv9Jmp<;FFl=&
z-A6qrKJKu&Rn=ZqTPvz5%E}G%!Wtu)Im`0AunfEN;?>R#$_@zt=wvV$UltQxXd*g|
zjY1(rmSxhESKceoSg8oCe^oJl=KydX#>4RTyb0jLr%VXJnnC|=FhcJlOJ$daku~g002ovPDHLkV1n-w^w|Ia

literal 0
HcmV?d00001

diff --git a/resources/public/img/tiles/plague.png b/resources/public/img/tiles/plague.png
new file mode 100644
index 0000000000000000000000000000000000000000..4235d08d05ddeaf346c1a6cade24d35fbb6d13d2
GIT binary patch
literal 643
zcmV-}0(||6P)F1SJZd;$5dg`%)tD`Hi@H{U($Bsl@(n&ne4lg&KB?{$JoQ(2H=AM~;X0
z9umVZA1%#4e*$1_`IBAL(<8Ai=~O(sO0Er(t(t>C6ly%6oe1?MMf}?iptFOz=
zX%??ah4s@H(;!fNX+c_F;kiv_21I}u_ypgR6tVl)o)%W~J`%v#it|ud%kRu%M-maI
zV#u-yS@%t{gK*N6gI3`2t$DjrYF>^8x!(bNTg~TlgHcPIHPJyo9Y(-9!%^-|UjF#~
zOWr4(b6meSYxd5KOWE8AYZO_FW*ZpSuwt0V=+h5M0Hy)zW1~Sn=eW!u7$rqfuACQ(
zi)-ifjz7H3Kyu?1tQpOk(R|v>fSMUlrIY|j5?C9-U&&2k3x+mfZ823-lbvlw
dlKr=z
 {{rule-text}}
 	
-	{% if error %}
-	

{{error}}

- {% endif %}

diff --git a/src/mw_ui/render_world.clj b/src/mw_ui/render_world.clj index 896b1d1..15af785 100644 --- a/src/mw_ui/render_world.clj +++ b/src/mw_ui/render_world.clj @@ -28,7 +28,7 @@ (let [state (:state cell)] [:td {:class (format-css-class state) :title (format-mouseover cell)} [:a {:href (format "inspect?x=%d&y=%d" (:x cell) (:y cell))} - [:img {:alt (world/format-cell cell) :src (format-image-path state)}]]])) + [:img {:alt (:state cell) :src (format-image-path state)}]]])) (defn render-world-row "Render this world row as a Hiccup table row." @@ -41,8 +41,8 @@ (let [world (or (session/get :world) (engine/transform-world (heightmap/apply-heightmap - ;;"resources/public/img/20x20/hill.png" - "resources/public/img/heightmaps/great_britain_and_ireland_small.png" + "resources/public/img/20x20/hill.png" + ;; "resources/public/img/heightmaps/great_britain_and_ireland_small.png" ) rules/init-rules)) rules (or (session/get :rules)