various fixes
@@ -307,7 +307,7 @@ button {
307
307
.game-container {
308
308
background: white;
309
309
width: 95%;
310
max-width: 1400px;
310
max-width: 1260px;
311
311
height: 90vh;
312
312
border-radius: 10px;
313
313
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
@@ -343,9 +343,6 @@ button {
343
343
}
344
344
345
345
.game-left {
346
flex: 1;
347
display: flex;
348
flex-direction: column;
349
346
border-right: 2px solid #eee;
350
347
overflow-y: auto;
351
348
padding: 15px;
@@ -354,7 +351,7 @@ button {
354
351
355
352
.environment {
356
353
flex: 0 0 auto;
357
width: 100%;
354
width: 725px;
358
355
aspect-ratio: 1 / 1;
359
356
background: linear-gradient(to bottom, #87ceeb, #90ee90);
360
357
background-size: 100% 100%;
@@ -445,7 +442,7 @@ button {
445
442
}
446
443
447
444
.game-right {
448
width: 300px;
445
width: 500px;
449
446
display: flex;
450
447
flex-direction: column;
451
448
overflow-y: auto;
@@ -307,7 +307,7 @@ button {307
.game-container {307
.game-container {308
background: white;308
background: white;309
width: 95%;309
width: 95%;310
max-width: 1400px;310
max-width: 1260px;311
height: 90vh;311
height: 90vh;312
border-radius: 10px;312
border-radius: 10px;313
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);313
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);@@ -343,9 +343,6 @@ button {343
}343
}344
344
345
.game-left {345
.game-left {346
flex: 1;347
display: flex;348
flex-direction: column;349
border-right: 2px solid #eee;346
border-right: 2px solid #eee;350
overflow-y: auto;347
overflow-y: auto;351
padding: 15px;348
padding: 15px;@@ -354,7 +351,7 @@ button {354
351
355
.environment {352
.environment {356
flex: 0 0 auto;353
flex: 0 0 auto;357
width: 100%;354
width: 725px;358
aspect-ratio: 1 / 1;355
aspect-ratio: 1 / 1;359
background: linear-gradient(to bottom, #87ceeb, #90ee90);356
background: linear-gradient(to bottom, #87ceeb, #90ee90);360
background-size: 100% 100%;357
background-size: 100% 100%;@@ -445,7 +442,7 @@ button {445
}442
}446
443
447
.game-right {444
.game-right {448
width: 300px;445
width: 500px;449
display: flex;446
display: flex;450
flex-direction: column;447
flex-direction: column;451
overflow-y: auto;448
overflow-y: auto;@@ -873,10 +873,24 @@ class TribeGenApp
873
873
874
874
this.availableEvents.forEach(evt =>
875
875
{
876
function costToText (cost)
877
{
878
if (cost >= 95) return "impossible";
879
if (cost >= 80) return "near impossible";
880
if (cost >= 70) return "extreme";
881
if (cost >= 60) return "brutal";
882
if (cost >= 50) return "very hard";
883
if (cost >= 40) return "hard";
884
if (cost >= 30) return "difficult";
885
if (cost >= 20) return "moderate";
886
if (cost >= 10) return "easy";
887
return "trivial";
888
}
889
876
890
const item = document.createElement('div');
877
891
const isAvailable = !!evt.available;
878
892
item.className = `event-item ${isAvailable ? '' : 'disabled'}`.trim();
879
const costText = Number.isFinite(Number(evt.cost)) ? ` (Cost: ${evt.cost})` : '';
893
const costText = Number.isFinite(Number(evt.cost)) ? ` (${costToText(Number(evt.cost))})` : '';
880
894
item.textContent = `${evt.name || evt.type}${costText}${isAvailable ? '' : ' (Unavailable)'}`;
881
895
if (isAvailable)
882
896
{
@@ -873,10 +873,24 @@ class TribeGenApp873
873
874
this.availableEvents.forEach(evt =>874
this.availableEvents.forEach(evt =>875
{875
{876
function costToText (cost)877
{878
if (cost >= 95) return "impossible";879
if (cost >= 80) return "near impossible";880
if (cost >= 70) return "extreme";881
if (cost >= 60) return "brutal";882
if (cost >= 50) return "very hard";883
if (cost >= 40) return "hard";884
if (cost >= 30) return "difficult";885
if (cost >= 20) return "moderate";886
if (cost >= 10) return "easy";887
return "trivial";888
}889
876
const item = document.createElement('div');890
const item = document.createElement('div');877
const isAvailable = !!evt.available;891
const isAvailable = !!evt.available;878
item.className = `event-item ${isAvailable ? '' : 'disabled'}`.trim();892
item.className = `event-item ${isAvailable ? '' : 'disabled'}`.trim();879
const costText = Number.isFinite(Number(evt.cost)) ? ` (Cost: ${evt.cost})` : '';893
const costText = Number.isFinite(Number(evt.cost)) ? ` (${costToText(Number(evt.cost))})` : '';880
item.textContent = `${evt.name || evt.type}${costText}${isAvailable ? '' : ' (Unavailable)'}`;894
item.textContent = `${evt.name || evt.type}${costText}${isAvailable ? '' : ' (Unavailable)'}`;881
if (isAvailable)895
if (isAvailable)882
{896
{@@ -19,13 +19,13 @@ class FarmingEvent extends Event
19
19
{
20
20
switch ($this->tribe->getCurrentSeason()) {
21
21
case 'spring':
22
return 30;
22
return 20;
23
23
case 'summer':
24
return 35;
24
return 25;
25
25
case 'autumn':
26
return 40;
26
return 30;
27
27
case 'winter':
28
return 90;
28
return 60;
29
29
default:
30
30
return 60;
31
31
}
@@ -19,13 +19,13 @@ class FarmingEvent extends Event19
{19
{20
switch ($this->tribe->getCurrentSeason()) {20
switch ($this->tribe->getCurrentSeason()) {21
case 'spring':21
case 'spring':22
return 30;22
return 20;23
case 'summer':23
case 'summer':24
return 35;24
return 25;25
case 'autumn':25
case 'autumn':26
return 40;26
return 30;27
case 'winter':27
case 'winter':28
return 90;28
return 60;29
default:29
default:30
return 60;30
return 60;31
}31
}