In-game resources views
* Added session records to carry resource information over to the clients * Added SQL support code for the various views * Added interface and implementation of the resource information access component * Hooked resources information queries into both the empire and planet management component * Added resources display to planet and overview pages
This commit is contained in:
parent
56eddcc4f0
commit
597429fadf
45 changed files with 3211 additions and 52 deletions
legacyworlds-web-main/Content/Raw/WEB-INF/fm/fr
|
@ -63,4 +63,11 @@
|
|||
</#macro>
|
||||
<#macro abbr_bgc><abbr title="milliards de crédits galactiques">mcg</abbr></#macro>
|
||||
<#macro abbr_st><abbr title="Temps Serveur">TS </abbr></#macro>
|
||||
<#macro abbr_gt><abbr title="Temps dans l'univers du jeu">TJ </abbr></#macro>
|
||||
<#macro abbr_gt><abbr title="Temps dans l'univers du jeu">TJ </abbr></#macro>
|
||||
<#macro over_time title feminin=false pluriel=false>
|
||||
<#if data.page.useRLTime>
|
||||
${title?xhtml} (pour 12h)
|
||||
<#else>
|
||||
${title?xhtml} mensuel<#if feminin>le</#if><#if pluriel>s</#if>
|
||||
</#if>
|
||||
</#macro>
|
|
@ -62,6 +62,63 @@
|
|||
</@right_column>
|
||||
</@tab>
|
||||
|
||||
<@tab id="economy" title="Économie">
|
||||
|
||||
<@listview>
|
||||
<@lv_line headers=true>
|
||||
<@lv_column width=30> </@lv_column>
|
||||
<@lv_column width="x">Ressource</@lv_column>
|
||||
<@lv_column width=100 centered=true><@over_time "Bénéfice" /></@lv_column>
|
||||
<@lv_column width=100 centered=true><@over_time title="Charges" feminin=true pluriel=true /></@lv_column>
|
||||
<@lv_column width=100 centered=true>Réserves</@lv_column>
|
||||
<@lv_column width=100 centered=true>Priorité d'extraction</@lv_column>
|
||||
</@lv_line>
|
||||
|
||||
<#list ov.economy as resource>
|
||||
|
||||
<#if previousCategory?has_content && !resource.category?has_content
|
||||
|| resource.category?has_content && !previousCategory?has_content
|
||||
|| resource.category?has_content && previousCategory?has_content
|
||||
&& resource.category != previousCategory>
|
||||
<@lv_line>
|
||||
<#if resource.category?has_content>
|
||||
<td colspan="5"><strong>${resource.category?xhtml}</strong></td>
|
||||
<#else>
|
||||
<td colspan="5"><hr /></td>
|
||||
</#if>
|
||||
</@lv_line>
|
||||
<#local previousCategory=resource.category>
|
||||
</#if>
|
||||
|
||||
<@lv_line>
|
||||
<@lv_column> </@lv_column>
|
||||
<@lv_column>${resource.title?xhtml}
|
||||
<div class="auto-hide">${resource.description?xhtml}</div>
|
||||
</@lv_column>
|
||||
<@lv_column centered=true>${resource.income?string(",##0")}</@lv_column>
|
||||
<@lv_column centered=true>${resource.upkeep?string(",##0")}</@lv_column>
|
||||
<@lv_column centered=true>${resource.stockpiled?string(",##0")}</@lv_column>
|
||||
<@lv_column centered=true>
|
||||
<#if resource.miningPriority?has_content>
|
||||
<#switch resource.miningPriority>
|
||||
<#case 0>très basse<#break>
|
||||
<#case 1>basse<#break>
|
||||
<#case 2>normale<#break>
|
||||
<#case 3>haute<#break>
|
||||
<#case 4>très haute<#break>
|
||||
</#switch>
|
||||
<#else>
|
||||
N/A
|
||||
</#if>
|
||||
</@lv_column>
|
||||
</@lv_line>
|
||||
|
||||
</#list>
|
||||
|
||||
</@listview>
|
||||
|
||||
</@tab>
|
||||
|
||||
<@tab id="research" title="Recherche">
|
||||
<#if rs?size == 0>
|
||||
<p>Nos scientifiques sont encore en train de s'installer.</p>
|
||||
|
|
|
@ -108,6 +108,55 @@
|
|||
</#if>
|
||||
|
||||
</@tab>
|
||||
|
||||
<#if data.own?has_content && data.own.resources?size gt 0>
|
||||
|
||||
<@tab id="resources" title="Économie">
|
||||
|
||||
<@listview>
|
||||
<#local previousCategory="">
|
||||
|
||||
<@lv_line headers=true>
|
||||
<@lv_column width=30> </@lv_column>
|
||||
<@lv_column width="x">Ressource</@lv_column>
|
||||
<@lv_column width=100 centered=true><@over_time "Bénéfice" /></@lv_column>
|
||||
<@lv_column width=100 centered=true><@over_time title="Charges" feminin=true pluriel=true /></@lv_column>
|
||||
<@lv_column width=100 centered=true>Investissement</@lv_column>
|
||||
</@lv_line>
|
||||
|
||||
<#list data.own.resources as resource>
|
||||
|
||||
<#if previousCategory?has_content && !resource.category?has_content
|
||||
|| resource.category?has_content && !previousCategory?has_content
|
||||
|| resource.category?has_content && previousCategory?has_content
|
||||
&& resource.category != previousCategory>
|
||||
<@lv_line>
|
||||
<#if resource.category?has_content>
|
||||
<td colspan="5"><strong>${resource.category?xhtml}</strong></td>
|
||||
<#else>
|
||||
<td colspan="5"><hr /></td>
|
||||
</#if>
|
||||
</@lv_line>
|
||||
<#local previousCategory=resource.category>
|
||||
</#if>
|
||||
|
||||
<@lv_line>
|
||||
<@lv_column> </@lv_column>
|
||||
<@lv_column>${resource.title?xhtml}
|
||||
<div class="auto-hide">${resource.description?xhtml}</div>
|
||||
</@lv_column>
|
||||
<@lv_column centered=true>${resource.income?string(",##0")}</@lv_column>
|
||||
<@lv_column centered=true>${resource.upkeep?string(",##0")}</@lv_column>
|
||||
<@lv_column centered=true>${resource.invested?string(",##0")}</@lv_column>
|
||||
</@lv_line>
|
||||
|
||||
</#list>
|
||||
|
||||
</@listview>
|
||||
|
||||
</@tab>
|
||||
|
||||
</#if>
|
||||
|
||||
<#if data.orbit?has_content>
|
||||
|
||||
|
@ -143,6 +192,7 @@
|
|||
<#case "DEF">défense<#break>
|
||||
<#case "WORK">production mil.<#break>
|
||||
<#case "POP">croissance<#break>
|
||||
<#case "MINE">extraction<#break>
|
||||
</#switch>
|
||||
</@lv_column>
|
||||
<@lv_column centered=true>${building.jobs?string(",##0")}</@lv_column>
|
||||
|
@ -189,6 +239,7 @@
|
|||
<#case "DEF">défense<#break>
|
||||
<#case "WORK">production mil.<#break>
|
||||
<#case "POP">croissance<#break>
|
||||
<#case "MINE">extraction<#break>
|
||||
</#switch>
|
||||
</@dt_entry>
|
||||
</@dt_main>
|
||||
|
@ -322,6 +373,56 @@
|
|||
</#if>
|
||||
</@tab>
|
||||
</#if>
|
||||
|
||||
<#list data.own.resources as resource>
|
||||
<#if resource.resourceProvider?has_content>
|
||||
<#local showResources=true>
|
||||
<#break>
|
||||
</#if>
|
||||
</#list>
|
||||
|
||||
<#if showResources?has_content>
|
||||
<@tab id="natres" title="Ressources naturelles">
|
||||
|
||||
<@listview>
|
||||
<@lv_line headers=true>
|
||||
<@lv_column width="x">Ressource</@lv_column>
|
||||
<@lv_column width=100 right=true>Quantité </@lv_column>
|
||||
<@lv_column width=100> Capacité</@lv_column>
|
||||
<@lv_column width=100 centered=true>Difficulté<br/>d'extraction</@lv_column>
|
||||
<@lv_column width=100 centered=true>Priorité</@lv_column>
|
||||
</@lv_line>
|
||||
|
||||
<#list data.own.resources as resource>
|
||||
<#if resource.resourceProvider?has_content>
|
||||
<#local resProv=resource.resourceProvider>
|
||||
|
||||
<@lv_line>
|
||||
<@lv_column>
|
||||
${resource.title?xhtml}
|
||||
<div class="auto-hide">${resource.description?xhtml}</div>
|
||||
</@lv_column>
|
||||
<@lv_column right=true>${resProv.quantity?string(",##0")} </@lv_column>
|
||||
<@lv_column>/ ${resProv.capacity?string(",##0")}</@lv_column>
|
||||
<@lv_column centered=true>${resProv.difficulty} %</@lv_column>
|
||||
<@lv_column centered=true>
|
||||
<#switch resProv.priority>
|
||||
<#case 0>très basse<#break>
|
||||
<#case 1>basse<#break>
|
||||
<#case 2>normale<#break>
|
||||
<#case 3>haute<#break>
|
||||
<#case 4>très haute<#break>
|
||||
</#switch>
|
||||
</@lv_column>
|
||||
</@lv_line>
|
||||
|
||||
</#if>
|
||||
</#list>
|
||||
</@listview>
|
||||
|
||||
</@tab>
|
||||
</#if>
|
||||
|
||||
</#if>
|
||||
|
||||
</@tabs>
|
||||
|
|
Reference in a new issue