From 82875448c485d26375ed6dea4e64e940f6e10f74 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Mon, 8 Jan 2024 15:10:10 +0100 Subject: gemini --- views/gemini/footer.twig | 5 +++++ views/gemini/send-units/01-units.twig | 3 +++ views/gemini/send-units/02-villages.twig | 5 +++++ views/gemini/send-units/03-actions.twig | 5 +++++ views/gemini/storage.twig | 2 ++ views/gemini/village.twig | 16 +++++++--------- views/gemini/villages.twig | 9 ++++++++- 7 files changed, 35 insertions(+), 10 deletions(-) create mode 100644 views/gemini/footer.twig create mode 100644 views/gemini/send-units/01-units.twig create mode 100644 views/gemini/send-units/02-villages.twig create mode 100644 views/gemini/send-units/03-actions.twig (limited to 'views/gemini') 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' %} -- cgit v1.2.3