summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-01-11 13:15:02 +0100
committerDaniel Weipert <git@mail.dweipert.de>2024-01-11 13:15:02 +0100
commit09caff2b2a06d1f8ac8203567035a21c612165f9 (patch)
tree999be04ff0a418a33e438be9befc8c9297e383f4 /views
parent6301f63bd348109b8693a922f02e16d49205a8fd (diff)
send resources
Diffstat (limited to 'views')
-rw-r--r--views/gemini/send-resources/01-resource-types.twig2
-rw-r--r--views/gemini/send-resources/02-villages.twig2
-rw-r--r--views/gemini/send-units/02-villages.twig2
-rw-r--r--views/gemini/send-units/03-actions.twig3
-rw-r--r--views/gemini/village.twig20
-rw-r--r--views/http/village.twig2
6 files changed, 23 insertions, 8 deletions
diff --git a/views/gemini/send-resources/01-resource-types.twig b/views/gemini/send-resources/01-resource-types.twig
index a71afd4..6505024 100644
--- a/views/gemini/send-resources/01-resource-types.twig
+++ b/views/gemini/send-resources/01-resource-types.twig
@@ -1,4 +1,4 @@
-Sendable Resource Capability: {{ marketplace.getResourceCapabilities(village) }}
+Sendable Resource Capability: {{ postOffice.getResourceCapabilities(village) }}
{% for resourceType in ['wood', 'clay', 'iron', 'food'] %}
=> /village/{{ village.x }}/{{ village.y }}/send-resources/type/{{ resourceType }} {{ resourceType }}
diff --git a/views/gemini/send-resources/02-villages.twig b/views/gemini/send-resources/02-villages.twig
index 5cc0e75..6c29e42 100644
--- a/views/gemini/send-resources/02-villages.twig
+++ b/views/gemini/send-resources/02-villages.twig
@@ -1,5 +1,5 @@
{{ selectedResourceType }}
-Sendable Resource Capability: {{ marketplace.getResourceCapabilities(village) }}
+Sendable Resource Capability: {{ postOffice.getResourceCapabilities(village) }}
{% for listVillage in villages %}
=> /village/{{ village.x }}/{{ village.y }}/send-resources/type/{{ selectedResourceType }}/village/{{ listVillage.x }}/{{ listVillage.y }} {{ listVillage.name }} - {{ listVillage.x }} x {{ listVillage.y }}
diff --git a/views/gemini/send-units/02-villages.twig b/views/gemini/send-units/02-villages.twig
index 69170c8..55149d3 100644
--- a/views/gemini/send-units/02-villages.twig
+++ b/views/gemini/send-units/02-villages.twig
@@ -1,4 +1,4 @@
-{{ selectedUnit }}
+Send "{{ selectedUnit }}"
{% for listVillage in villages %}
=> /village/{{ village.x }}/{{ village.y }}/send-units/type/{{ selectedUnit }}/village/{{ listVillage.x }}/{{ listVillage.y }} {{ listVillage.name }} - {{ listVillage.x }} x {{ listVillage.y }}
diff --git a/views/gemini/send-units/03-actions.twig b/views/gemini/send-units/03-actions.twig
index 2b0ed45..4e39a5c 100644
--- a/views/gemini/send-units/03-actions.twig
+++ b/views/gemini/send-units/03-actions.twig
@@ -1,5 +1,4 @@
-{{ selectedUnit }}
-{{ selectedVillage.name }} - {{ selectedVillage.x }} x {{ selectedVillage.y }}
+Send "{{ selectedUnit }}" to "{{ 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/village.twig b/views/gemini/village.twig
index 21c480b..02679c1 100644
--- a/views/gemini/village.twig
+++ b/views/gemini/village.twig
@@ -24,7 +24,7 @@ Storage Capacity: {{ village.getStorage(village.id).getCapacity() }}
{% for event in typeEvents %}
### {{ event.type }}
Finished: {{ event.event.time | date('c') }}
- => /village/{{ village.x }}/{{ village.y }}/building/UpgradeBuilding/build/cancel Cancel
+ => /event/{{ event.event.id }}/cancel Cancel
{% endfor %}
{% endfor %}
{% endif %}
@@ -34,7 +34,7 @@ Storage Capacity: {{ village.getStorage(village.id).getCapacity() }}
### {{ event.type }}
Amount: {{ event.amount }}
Finished: {{ event.event.time | date('c') }}
- => /village/{{ village.x }}/{{ village.y }}/unit/train/cancel Cancel
+ => /event/{{ event.event.id }}/cancel Cancel
{% endfor %}
{% endif %}
{% if events['SendUnits'] %}
@@ -74,6 +74,22 @@ Storage Capacity: {{ village.getStorage(village.id).getCapacity() }}
{% endif %}
{% endfor %}
{% endif %}
+{% if events['SendResourcesCarriers'] %}
+ ## Send Resources Carriers
+ {% for event in events['SendResourcesCarriers'] %}
+ ### {{ village.get(event.source).name }} -> {{ village.get(event.destination).name }}
+ Source: {{ village.get(event.source).name }}
+ Destination: {{ village.get(event.destination).name }}
+ Finished: {{ event.event.time | date('c') }}
+ {% if event.isCanceled %}
+ Canceled
+ {% else %}
+ {% if event.event.villageId == village.id %}
+ => /event/{{ event.event.id }}/cancel Cancel
+ {% endif %}
+ {% endif %}
+ {% endfor %}
+{% endif %}
# Buildings
diff --git a/views/http/village.twig b/views/http/village.twig
index c72018c..c157a04 100644
--- a/views/http/village.twig
+++ b/views/http/village.twig
@@ -341,7 +341,7 @@
</form>
</div>
- {% if village.getBuilding(village.id, 'Marketplace') %}
+ {% if village.getBuilding(village.id, 'PostOffice') %}
<h3>Send Resources</h3>
<form action="/village/{{ village.x }}/{{ village.y }}/send-resources" method="post">
<input type="number" min="1" name="wood" placeholder="Amount Wood" required>