From 4ffdc88368bcc50e27dfa0af28b6569d38cedd7d Mon Sep 17 00:00:00 2001 From: Ole Rehmsen Date: Sat, 3 Jan 2015 14:17:21 +0100 Subject: [PATCH] Get rid of resource rate altogether - this is now done by the tasks of assignables. Fixes #44. --- src/client/assets/rules/aoc.yaml | 13 ------------- src/client/components/aoe2/model/build.ts | 1 - src/client/components/aoe2/model/core.ts | 12 ------------ 3 files changed, 26 deletions(-) diff --git a/src/client/assets/rules/aoc.yaml b/src/client/assets/rules/aoc.yaml index bdf89e6..b614289 100644 --- a/src/client/assets/rules/aoc.yaml +++ b/src/client/assets/rules/aoc.yaml @@ -35,37 +35,26 @@ startResources: resourceSources: - id: sheep resource: food - rate: 0.33 - id: boar resource: food - rate: 0.36 - id: deer resource: food - rate: 0.59 - id: berries resource: food - rate: 0.30 - id: farm resource: food - rate: 0.29 - id: coastal_fish resource: food - rate: 0.426 # TODO(rehmsen): For ship only 0.28 - id: deep_sea_fish resource: food - rate: 0.487 - id: fish_trap resource: food - rate: 0.206 - id: wood resource: lumber - rate: 0.299 - id: straggler resource: lumber - rate: 0.299 - id: goldmine resource: gold - rate: 0.4 - id: land_trade resource: gold - id: sea_trade @@ -74,8 +63,6 @@ resourceSources: resource: gold - id: stonemine resource: stone - rate: 0.38 - buildings: - id: archery_range diff --git a/src/client/components/aoe2/model/build.ts b/src/client/components/aoe2/model/build.ts index 6bebaf5..d51d5a5 100644 --- a/src/client/components/aoe2/model/build.ts +++ b/src/client/components/aoe2/model/build.ts @@ -28,7 +28,6 @@ export class ConstructionTask implements core.ITask { verb = core.TaskVerb.construct; object: string; id: string; - resourceRate: core.IResourceRate = {rate: 0}; initial: boolean = false; constructor(public building: Building) { diff --git a/src/client/components/aoe2/model/core.ts b/src/client/components/aoe2/model/core.ts index 858f5a8..5a265a9 100644 --- a/src/client/components/aoe2/model/core.ts +++ b/src/client/components/aoe2/model/core.ts @@ -93,11 +93,6 @@ export enum TaskVerb { construct } -export interface IResourceRate { - rate: number; - resource?: Resource; -} - export interface ITask { verb: TaskVerb; object?: string; @@ -105,8 +100,6 @@ export interface ITask { cssClass: string; initial: boolean; - resourceRate: IResourceRate; - computeDuration(count: number): number; onAssign(state: IState): void; } @@ -114,8 +107,6 @@ export interface ITask { export class IdleTask implements ITask { verb = TaskVerb.idle; id = TaskVerb[this.verb]; - resourceRate: IResourceRate = {rate: 0}; - constructor(public initial: boolean = false) { } @@ -135,9 +126,6 @@ export class HarvestTask implements ITask { id: string; initial: boolean = false; - get resourceRate() { - return {rate: this.source.rate, resource: this.source.resource }; - } get cssClass(): string { return 'icon-' + this.object; } constructor(public source: IResourceSource) {