Skip to content

Commit

Permalink
Add resource gathering rate also to worker (where it should be). Not …
Browse files Browse the repository at this point in the history
…actually used yet. #44
  • Loading branch information
rehmsen committed Dec 14, 2014
1 parent 6650af1 commit c9bb4d9
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
22 changes: 11 additions & 11 deletions src/client/assets/rules/aoc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,8 @@ units:
lumber: 75
tasks:
harvest:
- coastal_fish
- deep_sea_fish
coastal_fish: 0.28
deep_sea_fish: 0.487
- id: galley
age: 1
source: dock
Expand Down Expand Up @@ -549,13 +549,13 @@ units:
food: 50
tasks:
harvest:
- berries
- sheep
- deer
- boar
- coastal_fish
- goldmine
- stonemine
- wood
- straggler
berries: 0.30
sheep: 0.33
deer: 0.59
boar: 0.33
coastal_fish: 0.426
goldmine: 0.4
stonemine: 0.38
wood: 0.299
straggler: 0.299
construct: []
2 changes: 1 addition & 1 deletion src/client/components/aoe2/model/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export class Unit extends core.Buildable implements core.IAssignable {
buildDuration: number,
cost: core.IResources,
source: string,
public tasks: {[verb: string]: string[]}) {
public tasks: {[verb: string]: {[source: string]: number}}) {
super(id, age, buildDuration, cost, source);
}

Expand Down
2 changes: 1 addition & 1 deletion src/client/components/aoe2/model/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export interface IResourceSource {

export interface IAssignable {
id: string;
tasks: {[verb: string]: string[]};
tasks: {[verb: string]: {[source: string]: number}};
}

export class Selection {
Expand Down
2 changes: 1 addition & 1 deletion src/client/components/aoe2/ui/build-pane-directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class BuildPaneDirectiveController {
return this.rulesService.tasks[this.taskVerb].filter((task: core.ITask) => {
var unitTasksObjects = this.selection.assignable.tasks[this.taskVerb];
return unitTasksObjects !== undefined &&
(task.verb != core.TaskVerb.harvest || unitTasksObjects.indexOf(task.object) > -1);
(task.verb != core.TaskVerb.harvest || !!unitTasksObjects[task.object]);
});
}

Expand Down

0 comments on commit c9bb4d9

Please sign in to comment.