ui tweak
This commit is contained in:
@@ -12,8 +12,7 @@ window.renderTowns = function() {
|
||||
// Get active filters
|
||||
const searchTerm = (document.getElementById('town-search')?.value || '').toLowerCase();
|
||||
const reqFullWh = document.getElementById('filter-full-wh')?.checked;
|
||||
const reqFestival = document.getElementById('filter-festival')?.checked;
|
||||
const reqPoints = document.getElementById('filter-points')?.checked;
|
||||
const reqNotBuilding = document.getElementById('filter-not-building')?.checked;
|
||||
|
||||
const filteredTowns = window.towns.filter(t => {
|
||||
// 1. Search by name
|
||||
@@ -29,13 +28,8 @@ window.renderTowns = function() {
|
||||
// 2. Full WH (>95%)
|
||||
if (reqFullWh && Math.max(wPct, sPct, iPct) < 0.95) return false;
|
||||
|
||||
// 3. Festival (Wood>15k, Stone>18k, Iron>15k)
|
||||
// City Festival exact costs = 15000, 18000, 15000
|
||||
if (reqFestival && ((res.wood || 0) < 15000 || (res.stone || 0) < 18000 || (res.iron || 0) < 15000)) return false;
|
||||
|
||||
// 4. Large Points
|
||||
const pts = typeof t.points === 'number' ? t.points : parseInt(t.points) || 0;
|
||||
if (reqPoints && pts < 10000) return false;
|
||||
// 3. Not Building (no items in build_queue)
|
||||
if (reqNotBuilding && t.build_queue && t.build_queue.length > 0) return false;
|
||||
|
||||
return true;
|
||||
});
|
||||
@@ -62,9 +56,6 @@ window.renderTowns = function() {
|
||||
if (wPct >= 0.95 || sPct >= 0.95 || iPct >= 0.95) {
|
||||
markers += '<span title="Γεμάτη Αποθήκη!" style="margin-right:4px;">⚠️</span>';
|
||||
}
|
||||
if ((res.wood || 0) >= 15000 && (res.stone || 0) >= 18000 && (res.iron || 0) >= 15000) {
|
||||
markers += '<span title="Αρκετοί πόροι για Φεστιβάλ!" style="margin-right:4px;">🎭</span>';
|
||||
}
|
||||
|
||||
const getC = (pct) => pct >= 0.95 ? 'color:#ff4a4a;font-weight:bold;' : '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user