From d6f6a0bd00aab680e450c3b4c4b031df2633e780 Mon Sep 17 00:00:00 2001 From: Adrian Gaudebert Date: Wed, 23 Oct 2024 15:14:07 +0200 Subject: [PATCH] Show an icon for each resource. --- public/img/icons/food.png | Bin 0 -> 777 bytes public/img/icons/iron.png | Bin 0 -> 853 bytes public/img/icons/stone.png | Bin 0 -> 957 bytes public/img/icons/wood.png | Bin 0 -> 902 bytes src/hud/Resources.svelte | 36 +++++++++++++++++++++++++++++++----- 5 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 public/img/icons/food.png create mode 100644 public/img/icons/iron.png create mode 100644 public/img/icons/stone.png create mode 100644 public/img/icons/wood.png diff --git a/public/img/icons/food.png b/public/img/icons/food.png new file mode 100644 index 0000000000000000000000000000000000000000..c5e74a243135a3d3df1e63f18d5f9a0e7fb6c357 GIT binary patch literal 777 zcmV+k1NQuhP)EX>4Tx04R}tkv&MmKpe$iTcuhm4i*$~$WWauh+jBr6^c+H)C#RSm|Xe=O&XFE z7e~Rh;NZt%)xpJCR|i)?5c~jfc5qU3krMxx6k5c1aNLh~_a1le0DryARI_6YP&La) zCE`LRyD9`<5kfz@F$GA>)aOJo3D5C$4FbDic85?I6%LkMG0kCh|#K%Vj@NRaS#8X;}^*#ldA+q zjs;YpLUR1zfAG6oGe0rzCWYfb=ZkHB3Hn%i4*AEysMnz~Bf00)P_ zNP)7~J>K2b-rK)tn*IF%Vg_=cz^T`b00006VoOIv0RI600RN!9r;`8x010qNS#tmY z3ljhU3ljkVnw%H_000McNliru=n5AJHV8SZW&i*H0R~A#K~z}7?Uy|YgFq04-|j)u z+NAaXUO~t`^d1H~?;zv^f=!B4c9v;kX_pgh8kN;-f;;XHAufoZF!Olta~J{I5sN$d zaCknu08Y$)?ejeXI|BM90|3$0sdK^8_urPWFgXt>!$+7HN}Otckp#|Tc(cFCL$5Iy zY0h;TkM;w=5WzAAZ6QoU0F#>?qBGhu1^^sSm$8=6sQG&g%$gNRAQVhkWq`>H$nS<& z*xxf?or7845(7p?@@f%%lL?iGu1-k;n5F|>IhbW_iUY3c)>Qm@YXJcF$5Z7JoN*vu z5(icoPz|3?9JtvJzHngO0TpnhTASDMDi3{c_S+)x{$uh2&#S>GH-bMu00000NkvXX Hu0mjf=R8EH literal 0 HcmV?d00001 diff --git a/public/img/icons/iron.png b/public/img/icons/iron.png new file mode 100644 index 0000000000000000000000000000000000000000..c32f271b357be02f936d46e29ccaf49f138b01a3 GIT binary patch literal 853 zcmV-b1FHOqP)EX>4Tx04R}tkv&MmKpe$iTcuhm4i*$~$WWauh+jBr6^c+H)C#RSm|Xe=O&XFE z7e~Rh;NZt%)xpJCR|i)?5c~jfc5qU3krMxx6k5c1aNLh~_a1le0DryARI_6YP&La) zCE`LRyD9`<5kfz@F$GA>)aOJo3D5C$4FbDic85?I6%LkMG0kCh|#K%Vj@NRaS#8X;}^*#ldA+q zjs;YpLUR1zfAG6oGe0rzCWYfb=ZkHB3Hn%i4*AEysMnz~Bf00)P_ zNP)7~J>K2b-rK)tn*IF%Vg_=cz^T`b00006VoOIv0RI600RN!9r;`8x010qNS#tmY z3ljhU3ljkVnw%H_000McNliru=n5AJHw9h+EBpWe0a8gsK~z}7?Up}F!$25^pF(B@ zzk=W(1j5llL+DhJPf@ybZ7I08iJOZbsQmyOoh{_{c#_-WNxGhBlyFRe0Un+n0f>_n05J>ze5OH$0T^OS_9xmA#svwNjRp#YIGzV8{jq)16$w>8YgMK{;=Nx@cH#Y zCgJ=g`1pBFs&EzTN1+vPLEy08F_|xUeSXO${3y&NOoJ<@z>mUO2~*(0 z6a=HOoXnT`jm>IZS`M`*+Jeibpi-bp;#@F*dJfbcL|Hk0Kga~QPy*KzQVfIAhRb%Y z8y#@r4g4&UP4jLFTv~#z5?#QRJC+|OUny3HLuM|e00000NkvXXu0mjf3TbYM literal 0 HcmV?d00001 diff --git a/public/img/icons/stone.png b/public/img/icons/stone.png new file mode 100644 index 0000000000000000000000000000000000000000..af01089f5baf93c9adc4117259201f35b60a9a29 GIT binary patch literal 957 zcmV;u148_XP)EX>4Tx04R}tkv&MmKpe$iTcuhm4i*$~$WWauh+jBr6^c+H)C#RSm|Xe=O&XFE z7e~Rh;NZt%)xpJCR|i)?5c~jfc5qU3krMxx6k5c1aNLh~_a1le0DryARI_6YP&La) zCE`LRyD9`<5kfz@F$GA>)aOJo3D5C$4FbDic85?I6%LkMG0kCh|#K%Vj@NRaS#8X;}^*#ldA+q zjs;YpLUR1zfAG6oGe0rzCWYfb=ZkHB3Hn%i4*AEysMnz~Bf00)P_ zNP)7~J>K2b-rK)tn*IF%Vg_=cz^T`b00006VoOIv0RI600RN!9r;`8x010qNS#tmY z3ljhU3ljkVnw%H_000McNliru=n5AJH!kwM(!2lw0lG;KXn=u#tu8n%T6SF_NxlO3Sm@BkNrA|RLm@@8nZ7}A>!{}gYMYU3sDHV!9 z7&@uvqe09R0D8}lFwG*YQaP0YXSu-r!&6Ejl|=~!s+C$8HRc&c=U(8$Tn)BL!^BkMFM!BNG6gk&FrT-BdP3!-6s5M`xfuiXW_&k-9{V}3_4=1TqF7yy-2wG;T@ZBoJv zj3-0m^ZhOPq9IvOG3SpvwSY<==Ro22RvGXDKQUPJ8l}FTUtFy}!DO(?f9($mZK`Ur ft95zhwV(9^4D2;k90xF?00000NkvXXu0mjf&<37n literal 0 HcmV?d00001 diff --git a/public/img/icons/wood.png b/public/img/icons/wood.png new file mode 100644 index 0000000000000000000000000000000000000000..025b5a8243bc09303a39899f5decc7d6ae9bab8e GIT binary patch literal 902 zcmV;119|+3P)EX>4Tx04R}tkv&MmKpe$iTcuhm4i*$~$WWauh+jBr6^c+H)C#RSm|Xe=O&XFE z7e~Rh;NZt%)xpJCR|i)?5c~jfc5qU3krMxx6k5c1aNLh~_a1le0DryARI_6YP&La) zCE`LRyD9`<5kfz@F$GA>)aOJo3D5C$4FbDic85?I6%LkMG0kCh|#K%Vj@NRaS#8X;}^*#ldA+q zjs;YpLUR1zfAG6oGe0rzCWYfb=ZkHB3Hn%i4*AEysMnz~Bf00)P_ zNP)7~J>K2b-rK)tn*IF%Vg_=cz^T`b00006VoOIv0RI600RN!9r;`8x010qNS#tmY z3ljhU3ljkVnw%H_000McNliru=n5AJHYftcM#umF0fR|IK~z}7?Ulhw#4r$s|E(fO z4|eye3xReYpbsDmRq#FfmVzF{$FPAw^|~!WL0GV!QYN!WH>3qGol{9lzJF%^On@bp zSmK{!HOC=kk@vE0y#IguP^;Mllttb@KHNgd*1BJ*4gipe7?tXvg=!JeoN$pQ!=6YJ zRH{QJVgsIT*Txya0`@!6XCgM>{5uozPz4(t04_r_r-$orF610Mr~tAr zM@0Sa30&3^lSx9p=P)RQffvGZk1w`*h~#`F8n;N`bHJafUVqnO@=b1@aZ c#1a7T2Ra3Agb9||761SM07*qoM6N<$g0b9+;{X5v literal 0 HcmV?d00001 diff --git a/src/hud/Resources.svelte b/src/hud/Resources.svelte index 3c2997e..d5140db 100644 --- a/src/hud/Resources.svelte +++ b/src/hud/Resources.svelte @@ -1,16 +1,33 @@
-
Wood: { Math.floor($village.resources.wood) } / { capacity.wood }
-
Stone: { Math.floor($village.resources.stone) } / { capacity.stone }
-
Iron: { Math.floor($village.resources.iron) } / { capacity.iron }
-
Food: { Math.floor($village.resources.food) } / { capacity.food }
+
+ Wood + { Math.floor($village.resources.wood) } / { capacity.wood } + ({ production.wood >= 0 ? '+' : '' }{ production.wood }) +
+
+ Stone + { Math.floor($village.resources.stone) } / { capacity.stone } + ({ production.stone >= 0 ? '+' : '' }{ production.stone }) +
+
+ Iron + { Math.floor($village.resources.iron) } / { capacity.iron } + ({ production.iron >= 0 ? '+' : '' }{ production.iron }) +
+
+ Food + { Math.floor($village.resources.food) } / { capacity.food } + ({ production.food >= 0 ? '+' : '' }{ production.food }) +