From d9610bea3bc0c0c1ce46bc7790e6372585930258 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Thu, 28 Mar 2024 09:58:20 -0500 Subject: [PATCH] fixed initialization display bugs on game page --- app.lua | 8 +++++++- database.sqlite3 | Bin 40960 -> 28672 bytes setup_db | 6 +++++- views/game.etlua | 17 ++++++++++++----- 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/app.lua b/app.lua index eed884b..09ccd4a 100644 --- a/app.lua +++ b/app.lua @@ -79,12 +79,13 @@ app:match("/map/render", function(self) for i = 1, 10 do -- The map database has floor_stone and wall_floor instead of simple ASCII characters -- So we run mapFunc:mapDecrypt to convert it back to the desired characters for visual display - local tile = map:find({ x = h, y = i }) + local tile = map:find({ x = h, y = i, game_ref = self.session.gameref }) self.tiles[h][i] = mapFunc:mapDecrypt(tile.occupied_by_type) end end return { render = "map", layout = false } end + return { layout = false } end) return app @@ -146,6 +147,11 @@ return app + + + + + diff --git a/database.sqlite3 b/database.sqlite3 index 4413c81295e8b29868b103b46ffd97b20a118f64..f65b7b0c51c13e368e0fb8c77f87a4b2e7f2f0ed 100644 GIT binary patch delta 161 zcmZoTz|`=7ae@>ZLnZ?Q1N%e;J1HPbFPV`S$YtXxWZ)0r`^RU++rz8OQ@FA5CpTxK zJ{!BZv@~PWzDmq-8oD~Y5ej%>zu0bG9B{C-?H8H0oWAc4I`OV6_cbV8hhNiIV yPG&DSxv?>pZL@Cqbq+R0{_hO@-!}^yyyfR)XJi&;%uOsv*<`??u$jf+k30Znyeb<2 literal 40960 zcmeI4e~cZ~b;sYlnR#z!-g`4K@69|@GvnDn+Y}WSr zN4(x$uh(D$0nIq70wq6)6eT2tmZnKa{)m#ap+rgusVX6bf=bemhPF`?sv=rQ6-XO_ zNYwAS@80!2*F+JODkafffmxsLoqOkV?#w&idv?Wj+cqDbo9H?)J$rO~uB)f?mXhO? z)^~N4O3tTBrBZ}{)t8TNJoOj+*U`TJ4c}spckXi*d3mUzo~nZmz~)_x*vAKhi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AR&cx3J5cVsb%JCj=yEOocU%f@yA2({SW0zflRs+nn!#K+wiX0dwt^ zm+-R!gd3D#Lhn)nhtBeyN-#dW^Y)5S)RD~tBDBoFrotoW* z-VTAFjnf0zw#iGlHG{BK2`2QlN-&{Elwd+{QGyA*nFK)VCka4bqry6LmS3%=G530t z5;*q4{3@6hfo(KN-88?F{0uFvTQj$vZ=Clzj2p`Eyu!etY?xOVIg~5r6^0Jw@_B{5 z-fk-&A_X64x;4WE>*p_E_)spJR~SE(OOY7jH>?>JStnDhTQh_&QDM!R;m2s|K*6mU z1aY9C1vq$?iz5XIoIA_Kp@IaC-OR=);HBx)z7V$YR}i6s{K{% z)3u^DS-Y;bwzi}eMXyB9MvvjA{vVD`M0=tuqKl&i;cMYf@H77}haV5`3=f1`!rpLE z=mjqY-w(bK{AuvPU@905)&^ZcrTR16s{OJVuo_uHq@Vv?Ok=D?w##UvGGOrW60Bo$`KprFkp6=qJLpwA=~=1%<9X|$Toa^ScC zjV5^k^JGxaX_5*vWl*Tw^ac(bi->j;OsDR^5vFDnolErQsGpryohI(UA*fChci<3I zr-?go2%^(;mIL>jh3GYL2adkCYBcfYCNxS{CYm#z;y?X@v7;>o1;jSXgbk&&4FXQYB}-dC{QBaGn z6R7p(C{|ECC*B-|AbL);v`HuhtyJU5Z{4-M`7J zx=ng>6ui`JB3`38ikVcyi8n_fP{WD#xYyic)o<$MAK|S+^qat}H%E~Q(QTrz)*QwB zs@KGSRRV(QHSu4TfFOEJbVnw%>Ne@WFac=lHW9SZ9K}qk-Nc)t5YTQC(EQgXAfVaQ z5lm=wo5W+GH%BoZt)|X+zR|4$ou <% if not isPopulated then %>
- +
<% end %>
-

Game

-
-
+
+ + <% if isPopulated then %>
- <% render("views.player_ui") %> +

Map

+
+
+ +
+ <% render("views.player_ui") %> +
+ <% end %>