Additions

+Added the beerfest (in the brewery)
+Added a better catapult targets checking system
+Updated the sql struct with the new one
This commit is contained in:
iopietro
2018-09-22 15:13:04 +02:00
parent 0065cb3970
commit b4da6e2274
15 changed files with 1013 additions and 1320 deletions
+2 -4
View File
@@ -69,13 +69,11 @@
<tr>
<th>{$smarty.const.DESTINATION}:</th>
<td colspan="{$colspan}">
{$targetName = 'ctar1'}
{$randomTargetValue = 0}
{$targetType = 1}
{include file=$smarty.const.TEMPLATES_DIR|cat:'sendUnits/catapultTargets.tpl'}
{if $units[8] >= 20}
{$targetName = 'ctar2'}
{$randomTargetValue = -1}
{$targetType = 2}
{include file=$smarty.const.TEMPLATES_DIR|cat:'sendUnits/catapultTargets.tpl'}
{/if}
</td>
+12 -6
View File
@@ -1,10 +1,16 @@
{$groupNames = [$smarty.const.RESOURCES, $smarty.const.INFRASTRUCTURE, $smarty.const.MILITARY]}
{$groupNames = [1 => $smarty.const.RESOURCES, $smarty.const.INFRASTRUCTURE, $smarty.const.MILITARY]}
<select name="{$targetName}" class="dropdown">
{if $randomTargetValue < 0}
<option value="{$randomTargetValue + 1}">-</option>
<select name="ctar{$targetType}" class="dropdown">
{if $targetType > 1}
<option value="-1">-</option>
{/if}
<option value="{$randomTargetValue}">{$smarty.const.RANDOM}</option>
{if !empty($catapultTargetBuildings[0])}
{foreach $catapultTargetBuildings[0] as $building}
<option value="{$building.id}">{$building.name}</option>
{/foreach}
{/if}
{foreach $groupNames as $type => $groupName}
{if !empty($catapultTargetBuildings[$type])}
<optgroup label="{$groupName}">
@@ -14,4 +20,4 @@
</optgroup>
{/if}
{/foreach}
</select>
</select>