feat: indicator for fields under construction

Also, all line separators are now Linux-style :-P

Closes #321
This commit is contained in:
Martin Ambrus
2017-11-22 15:32:31 +01:00
parent 63fadba36e
commit 2f9d134ec9
53 changed files with 227 additions and 128 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
<h1><img class="unit ugeb" src="img/x.gif"> Brewery</h1><img class="building g35" src="img/x.gif" alt="Brewery" title="Brewery" />Tasty mead is brewed in the brewery and later quaffed by the soldiers during the celebrations.
<br /><br />
These drinks make your soldiers braver and stronger in battles (1% per level). Unfortunately the chiefs power of persuasion is decreased and catapults can only do random hits.
These drinks make your soldiers braver and stronger in battles (1% per level). Unfortunately the chiefs power of persuasion is decreased and catapults can only do random hits.
<br /><br />
It can only be built by Teutons and only in their capital. It affects the whole empire.<p><b>Costs</b> and <b>construction time</b> for level 1:<br /><img class="r1" src="img/x.gif" alt="Lumber" title="Lumber" />1460 | <img class="r2" src="img/x.gif" alt="Clay" title="Clay" />930 | <img class="r3" src="img/x.gif" alt="Iron" title="Iron" />1250 | <img class="r4" src="img/x.gif" alt="Crop" title="Crop" />1740 | <img class="r5" src="img/x.gif" alt="Crop consumption" title="Crop consumption" />6 | <span class="dur"><img class="clock" alt="duration" title="duration" src="img/x.gif" />2:13:20</span></p>
<p><b>Prerequisites</b><br /><a href="manual.php?typ=4&gid=11">Granary</a> Level 20, <a href="manual.php?typ=4&gid=16">Rally Point</a> Level 10</p><map id="nav" name="nav">
+14 -4
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -15,7 +15,7 @@ $coorarray = array(1=>"101,33,28","165,32,28","224,46,28","46,63,28","138,74,28"
$arrayVillage = $village->resarray;
?>
<map name="rx" id="rx">
<?php
<?php
for($i=1;$i<=18;$i++) {echo " <area href=\"build.php?id=$i\" coords=\"$coorarray[$i]\" shape=\"circle\" title=\"".$building->procResType($arrayVillage['f'.$i.'t'])." Level ".$arrayVillage['f'.$i]."\"/>\r\n";
}
?>
@@ -23,7 +23,17 @@ for($i=1;$i<=18;$i++) {echo " <area href=\"build.php?id=$i\" coords=\"$coorarray
</map>
<div id="village_map" class="f<?php echo $village->type; ?>">
<?php
<?php
$jobs = $database->getJobs($village->wid);
$activeFields = [];
if (count($jobs)) {
foreach ($jobs as $job) {
if ( $job['type'] <= 4 ) {
$activeFields[ $job['field'] ] = true;
}
}
}
for($i=1;$i<=18;$i++) {
if($arrayVillage['f'.$i.'t'] != 0) {
$text = "";
@@ -33,7 +43,7 @@ for($i=1;$i<=18;$i++) {
case 3:$text = "Iron Mine Level";break;
case 4:$text = "Cropland Level";break;
}
echo "<img src=\"img/x.gif\" class=\"reslevel rf$i level".$arrayVillage['f'.$i]."\" alt=\"$text ".$arrayVillage['f'.$i]."\" />";
echo "<img src=\"img/x.gif\" class=\"reslevel rf$i level".$arrayVillage['f'.$i].(isset($activeFields[$i]) ? '_active' : '')."\" alt=\"$text ".$arrayVillage['f'.$i]."\" />";
}
}
?>