diff options
author | Daniel Weipert <git@mail.dweipert.de> | 2024-01-08 15:10:10 +0100 |
---|---|---|
committer | Daniel Weipert <git@mail.dweipert.de> | 2024-01-08 15:10:10 +0100 |
commit | 82875448c485d26375ed6dea4e64e940f6e10f74 (patch) | |
tree | ff2580447429309824e7d64401ad75e7f756e45e /views | |
parent | b21316248572cb27ed1f504529ad6680a473022e (diff) |
gemini
Diffstat (limited to 'views')
-rw-r--r-- | views/gemini/footer.twig | 5 | ||||
-rw-r--r-- | views/gemini/send-units/01-units.twig | 3 | ||||
-rw-r--r-- | views/gemini/send-units/02-villages.twig | 5 | ||||
-rw-r--r-- | views/gemini/send-units/03-actions.twig | 5 | ||||
-rw-r--r-- | views/gemini/storage.twig | 2 | ||||
-rw-r--r-- | views/gemini/village.twig | 16 | ||||
-rw-r--r-- | views/gemini/villages.twig | 9 | ||||
-rw-r--r-- | views/http/villages.twig | 2 |
8 files changed, 36 insertions, 11 deletions
diff --git a/views/gemini/footer.twig b/views/gemini/footer.twig new file mode 100644 index 0000000..6784124 --- /dev/null +++ b/views/gemini/footer.twig @@ -0,0 +1,5 @@ +# _ _ _ _ + +Logged in as {{ session.user.username }} + +Server Time: {{ 'now' | date('c') }} diff --git a/views/gemini/send-units/01-units.twig b/views/gemini/send-units/01-units.twig new file mode 100644 index 0000000..6996c3b --- /dev/null +++ b/views/gemini/send-units/01-units.twig @@ -0,0 +1,3 @@ +{% for unit in village.getUnits(village.id, 1) %} +=> /village/{{ village.x }}/{{ village.y }}/send-units/type/{{ unit.type }} {{ unit.type }} +{% endfor %} diff --git a/views/gemini/send-units/02-villages.twig b/views/gemini/send-units/02-villages.twig new file mode 100644 index 0000000..80f5326 --- /dev/null +++ b/views/gemini/send-units/02-villages.twig @@ -0,0 +1,5 @@ +{{ selectedUnit }} + +{% for listVillage in villages %} +=> /village/{{ village.x }}/{{ village.y }}/send-units/type/{{ selectedUnit }}/village/{{ listVillage.x }}/{{ listVillage.y }} {{ listVillage.name }} - {{ listVillage.x }} - {{ listVillage.y }} +{% endfor %} diff --git a/views/gemini/send-units/03-actions.twig b/views/gemini/send-units/03-actions.twig new file mode 100644 index 0000000..2b0ed45 --- /dev/null +++ b/views/gemini/send-units/03-actions.twig @@ -0,0 +1,5 @@ +{{ selectedUnit }} +{{ selectedVillage.name }} - {{ selectedVillage.x }} x {{ selectedVillage.y }} + +=> /village/{{ village.x }}/{{ village.y }}/send-units/type/{{ selectedUnit }}/village/{{ selectedVillage.x }}/{{ selectedVillage.y }}/action/Borrow Borrow +=> /village/{{ village.x }}/{{ village.y }}/send-units/type/{{ selectedUnit }}/village/{{ selectedVillage.x }}/{{ selectedVillage.y }}/action/Gift Gift diff --git a/views/gemini/storage.twig b/views/gemini/storage.twig index c9ecd4f..2b02445 100644 --- a/views/gemini/storage.twig +++ b/views/gemini/storage.twig @@ -14,3 +14,5 @@ Clay: {{ village.clay }} / {{ village.getStorage(village.id).getResourceCapacity Iron: {{ village.iron }} / {{ village.getStorage(village.id).getResourceCapacity('iron') }} - Increment: {{ village.getBuilding(village.id, 'IronMine').getResourceIncrementor() }} Food: {{ village.food }} / {{ village.getStorage(village.id).getResourceCapacity('food') }} - Increment: {{ village.getBuilding(village.id, 'Farm').getResourceIncrementor() }} Storage Capacity: {{ village.getStorage(village.id).getCapacity() }} + +{% include 'footer.twig' %} diff --git a/views/gemini/village.twig b/views/gemini/village.twig index 199f53a..d351eb6 100644 --- a/views/gemini/village.twig +++ b/views/gemini/village.twig @@ -90,6 +90,7 @@ Resources: {% if village.canTrain(village, unit, 1) %} => /village/{{ village.x }}/{{ village.y }}/unit/{{ unit.type }}/create Train {% endif %} +=> /village/{{ village.x }}/{{ village.y }}/send-units/type/{{ unit.type }} Send {% else %} ~traveling~ {% endif %} @@ -116,21 +117,18 @@ Travel Time: {{ unit.getTravelTime(unit, village.getDistance(unit.getHomeVillage # Send Units -TODO -* list possible units -* list possible villages -* send INPUT request for amount +{% include 'send-units/01-units.twig' %} # Send Resources TODO * list possible resource types +=> /village/{{ village.x }}/{{ village.y }}/send-resources/type/wood Wood +=> /village/{{ village.x }}/{{ village.y }}/send-resources/type/clay Clay +=> /village/{{ village.x }}/{{ village.y }}/send-resources/type/iron Iron +=> /village/{{ village.x }}/{{ village.y }}/send-resources/type/food Food * list possible villages * send INPUT request for amount - -Logged in as {{ session.user.username }} -=> /logout Logout - -Server Time: {{ 'now' | date('c') }} +{% include 'footer.twig' %} diff --git a/views/gemini/villages.twig b/views/gemini/villages.twig index 1c8eb82..fb0f606 100644 --- a/views/gemini/villages.twig +++ b/views/gemini/villages.twig @@ -1,3 +1,10 @@ +# Your villages + {% for village in villages %} -=> /village/{{ village.x }}/{{ village.y }} {{ village.name }} +=> /village/{{ village.x }}/{{ village.y }} {{ village.name }} - {{ village.x }} x {{ village.y }} +Resources: {{ village.wood + village.clay + village.iron + village.food }} / {{ village.getStorage(village.id).getCapacity() }} +Satisfaction: {{ village.satisfaction }} + {% endfor %} + +{% include 'footer.twig' %} diff --git a/views/http/villages.twig b/views/http/villages.twig index bdb87be..d4449cf 100644 --- a/views/http/villages.twig +++ b/views/http/villages.twig @@ -29,7 +29,7 @@ <td>{{ village.clay }}</td> <td>{{ village.iron }}</td> <td>{{ village.food }}</td> - <td>{{ village.getStorage(village.id).getCapacity() * (25 / 100) }}</td> + <td>{{ village.getStorage(village.id).getCapacity() }}</td> <td>{{ village.satisfaction }}</td> </tr> {% endfor %} |