diff --git a/src/app/components/dialog/planet-dialog/planet-dialog.component.html b/src/app/components/dialog/planet-dialog/planet-dialog.component.html
index b6b86b1..998d2bf 100644
--- a/src/app/components/dialog/planet-dialog/planet-dialog.component.html
+++ b/src/app/components/dialog/planet-dialog/planet-dialog.component.html
@@ -38,7 +38,7 @@
-
📦 Verbrauch:
+
🍽️ Verbrauch:
@for (item of consumedItems; track $index) {
- {{ item.type }}: {{ item.demandRate * planet.population | number:'0.0-1' }}/s
@@ -57,7 +57,7 @@
@if (goodsInTransit.length > 0) {
-
📦 In Lieferung:
+
⏱️ In Lieferung:
@for (item of goodsInTransit; track $index) {
- {{ item.type }}: {{ item.amount | number:'0.0-1' }}
diff --git a/src/app/components/dialog/planet-dialog/planet-dialog.component.ts b/src/app/components/dialog/planet-dialog/planet-dialog.component.ts
index 39e7d60..dafa2c6 100644
--- a/src/app/components/dialog/planet-dialog/planet-dialog.component.ts
+++ b/src/app/components/dialog/planet-dialog/planet-dialog.component.ts
@@ -63,8 +63,20 @@ export class PlanetDialogComponent {
this.gameService.showPlanetInfo = undefined;
}
- get goodsInTransit(): TradeInstance[] {
- return this.planet.goodsInTransit;
+ get goodsInTransit(): { type: GoodType, amount: number}[] {
+ const res: { type: GoodType, amount: number}[] = [];
+ this.planet.goodsInTransit.forEach(item => {
+ const ex = res.find(r => r.type == item.type);
+ if (ex) {
+ ex.amount += item.amount;
+ } else {
+ res.push({
+ type: item.type,
+ amount: item.amount
+ })
+ }
+ });
+ return res;
}
upgradeHarbour() {
diff --git a/src/app/components/ships/buy/buy.component.ts b/src/app/components/ships/buy/buy.component.ts
index e36e873..40b08b6 100644
--- a/src/app/components/ships/buy/buy.component.ts
+++ b/src/app/components/ships/buy/buy.component.ts
@@ -19,39 +19,39 @@ export class BuyComponent {
selectedPlanets: Planet[] = [];
config: ShipConfig = {
name: 'Pioneer-01',
- acceleration: 500,
- cargoSize: 20,
+ acceleration: 428,
+ cargoSize: 25,
cost: 0.6,
loadingSpeed: 15,
maxSpeed: 300,
planetRoute: [],
- buyCost: 2000,
+ buyCost: 3000,
desciption: 'Ein kleines, schnelles Schiff. Es hat wenig Platz für Ladung, lädt aber schnell und ist sehr wendig.',
texture: 'swift-hauler'
}
config2: ShipConfig = {
name: 'Colony Carrier',
- acceleration: 200,
- cargoSize: 50,
+ acceleration: 63,
+ cargoSize: 70,
cost: 1.6,
loadingSpeed: 20,
maxSpeed: 200,
planetRoute: [],
- buyCost: 4000,
+ buyCost: 8000,
desciption: 'Eine größere Version von der Pioneer-01. Der größere Frachtraum geht zu Lasten der Beschleunigung und Maximalgeschwindigkeit.',
texture: 'colony-carrier'
}
config3: ShipConfig = {
name: 'Industrial Tanker',
- acceleration: 5,
+ acceleration: 8,
cargoSize: 300,
cost: 3.8,
- loadingSpeed: 5,
+ loadingSpeed: 11,
maxSpeed: 600,
planetRoute: [],
- buyCost: 8000,
+ buyCost: 14000,
desciption: 'Ein großes behäbiges Schiff. Es wird durchaus schnell, beschleunigt aber sehr langsam und erreicht die Spitzengeschwindigkeit nur selten.',
texture: 'industrial-tanker'
}
diff --git a/src/app/data/planets.data.ts b/src/app/data/planets.data.ts
index d337026..afa9b88 100644
--- a/src/app/data/planets.data.ts
+++ b/src/app/data/planets.data.ts
@@ -10,7 +10,7 @@ export const PLANETCONFIGS: { x: number, y: number, texture: string, config: Pla
name: 'Terra Nova',
initialGoods: [
{ type: GoodType.Wasser, amount: 10 },
- { type: GoodType.Nahrung, amount: 10, productionBonus: 1.3 },
+ { type: GoodType.Nahrung, amount: 10, productionBonus: 2.6 },
]
}
},
@@ -23,7 +23,7 @@ export const PLANETCONFIGS: { x: number, y: number, texture: string, config: Pla
initialGoods: [
{ type: GoodType.Wasser, amount: 10 },
{ type: GoodType.Nahrung, amount: 10 },
- { type: GoodType.Metall, amount: 10, productionBonus: 1.5 },
+ { type: GoodType.Metall, amount: 10, productionBonus: 3 },
{ type: GoodType.Bauteile, amount: 10, productionBonus: 1.3 },
{ type: GoodType.Elektronik, amount: 10 }
]
@@ -36,7 +36,7 @@ export const PLANETCONFIGS: { x: number, y: number, texture: string, config: Pla
config: {
name: 'Aqualis',
initialGoods: [
- { type: GoodType.Wasser, amount: 200, productionBonus: 2.0 },
+ { type: GoodType.Wasser, amount: 200, productionBonus: 4 },
{ type: GoodType.Nahrung, amount: 10 },
{ type: GoodType.Treibstoff, amount: 10 }
]
@@ -79,7 +79,7 @@ export const PLANETCONFIGS: { x: number, y: number, texture: string, config: Pla
name: 'Volaris',
initialGoods: [
{ type: GoodType.Nahrung, amount: 10 },
- { type: GoodType.Wasser, amount: 10, productionBonus: 1.1 },
+ { type: GoodType.Wasser, amount: 10, productionBonus: 1.9 },
{ type: GoodType.Bauteile, amount: 10 }
]
}
diff --git a/src/app/model/goods/good-config.ts b/src/app/model/goods/good-config.ts
index 25ef79c..f0d6060 100644
--- a/src/app/model/goods/good-config.ts
+++ b/src/app/model/goods/good-config.ts
@@ -8,11 +8,11 @@ export interface GoodConfig {
}
export const GOODS_DATA: Record = {
- [GoodType.Erz]: { baseProduction: 1.0, baseDemand: 0.001, storageLimit: 500, isRawResource: true },
- [GoodType.Wasser]: { baseProduction: 1, baseDemand: 0.0015, storageLimit: 300, isRawResource: true },
- [GoodType.Nahrung]: { baseProduction: 1, baseDemand: 0.001, storageLimit: 200, isRawResource: true },
- [GoodType.Metall]: { baseProduction: 1, baseDemand: 0.001, storageLimit: 300, isRawResource: false },
- [GoodType.Treibstoff]: { baseProduction: 1, baseDemand: 0, storageLimit: 150, isRawResource: false },
- [GoodType.Elektronik]: { baseProduction: 1, baseDemand: 0.001, storageLimit: 100, isRawResource: false },
- [GoodType.Bauteile]: { baseProduction: 1, baseDemand: 0.001, storageLimit: 100, isRawResource: false }
+ [GoodType.Erz]: { baseProduction: 1.0, baseDemand: 0.005, storageLimit: 200, isRawResource: true },
+ [GoodType.Wasser]: { baseProduction: 1, baseDemand: 0.0075, storageLimit: 500, isRawResource: true },
+ [GoodType.Nahrung]: { baseProduction: 1, baseDemand: 0.005, storageLimit: 300, isRawResource: true },
+ [GoodType.Metall]: { baseProduction: 1, baseDemand: 0.005, storageLimit: 300, isRawResource: false },
+ [GoodType.Treibstoff]: { baseProduction: 1, baseDemand: 0.002, storageLimit: 150, isRawResource: false },
+ [GoodType.Elektronik]: { baseProduction: 1, baseDemand: 0.005, storageLimit: 100, isRawResource: false },
+ [GoodType.Bauteile]: { baseProduction: 1, baseDemand: 0.005, storageLimit: 100, isRawResource: false }
};
\ No newline at end of file
diff --git a/src/app/model/planet.model.ts b/src/app/model/planet.model.ts
index 4c6e315..0125ae0 100644
--- a/src/app/model/planet.model.ts
+++ b/src/app/model/planet.model.ts
@@ -16,7 +16,7 @@ export class Planet {
public isGrowing: boolean = false;
private populationGrowthRate = 0.002; // Basiswachstum pro Tick (%)
private populationDeclineRate = 0.005; // Basisrückgang bei Mangel (%)
- public demandSecondsBuffer = 150; // Anfrage immer mindestens 30 Sekunden überleben
+ public demandSecondsBuffer = 160; // Anfrage immer mindestens 30 Sekunden überleben
private productionLevel: Map = new Map();
private dockedShips: Ship[] = [];
@@ -204,11 +204,13 @@ export class Planet {
private updatePopulation(seconds: number): void {
const demands = this.calculateNaturalDemand(seconds);
let allSupplied = true;
+ let notSupplied = 0;
demands.forEach((amountNeeded, goodType) => {
const available = this.goods.get(goodType)?.amount ?? 0;
if (available < amountNeeded) {
allSupplied = false;
+ notSupplied++;
}
});
@@ -217,8 +219,11 @@ export class Planet {
this.isGrowing = true;
} else {
this.isGrowing = false;
- this.population -= this.population * this.populationDeclineRate * seconds;
- this.population = Math.max(this.population, 100);
+ if (notSupplied > 1) {
+ this.population -= this.population * this.populationDeclineRate * seconds;
+ this.population = Math.max(this.population, 100);
+ }
+
}
// if (this.isGrowing) {
@@ -328,7 +333,7 @@ export class Planet {
buildHarbour() {
this.hasHarbour = true;
- this.gameService.money -= 3000;
+ this.gameService.money -= 30000;
}
upgradeProduction() {
diff --git a/src/app/service/game.service.ts b/src/app/service/game.service.ts
index 44e668a..ae7afc6 100644
--- a/src/app/service/game.service.ts
+++ b/src/app/service/game.service.ts
@@ -15,7 +15,7 @@ export class GameService {
showTutorial = true;
- public money = 12500;
+ public money = 100000;
onShipCreate: EventEmitter = new EventEmitter();
onShipDestroy: EventEmitter = new EventEmitter();