Fix for NaN of resource types. Food resources still outstanding ... I think it's an issue where need to get the value of a supply object's subtype, but the evt .speed is only for the type. Will need to check with Mark.
This was SVN commit r2143.
This commit is contained in:
parent
26d3f69ebf
commit
6ae111d0d7
@ -21,7 +21,7 @@ function entity_event_gather( evt )
|
||||
gather_amt = evt.target.traits.supply.curr;
|
||||
evt.target.kill();
|
||||
}
|
||||
console.write( evt.target.traits.supply.type );
|
||||
console.write( evt.target.traits.supply.type + " " + evt.target.traits.supply.type + " " + this.actions.gather[evt.target.traits.supply.type].speed + " " + " " + gather_amt + " " + evt.target.traits.supply.curr + " " + evt.target.traits.supply.max);
|
||||
console.write( evt.target.traits.supply.type.toString().toUpperCase() );
|
||||
evt.target.traits.supply.curr -= gather_amt;
|
||||
this.player.resource.valueOf()[evt.target.traits.supply.type.toString().toUpperCase()] += gather_amt;
|
||||
|
@ -48,10 +48,11 @@
|
||||
hack="0.5"
|
||||
pierce="0.5"
|
||||
/>
|
||||
<Gather
|
||||
food="true"
|
||||
food.meat="2"
|
||||
/>
|
||||
<Gather>
|
||||
<Food>
|
||||
<Meat speed="2" />
|
||||
</Food>
|
||||
</Gather>
|
||||
<Move
|
||||
speed="10.0"
|
||||
turningRadius="1.0"
|
||||
|
@ -52,15 +52,16 @@
|
||||
list.structciv="cc;fc;ho;rc;tc;hc"
|
||||
list.structmil="mc;pc;ff;tf;wc;wg;wt"
|
||||
/>
|
||||
<Gather
|
||||
food="true"
|
||||
food.meat="1"
|
||||
food.fruit="1"
|
||||
food.grain="1"
|
||||
food.fish="1"
|
||||
stone="1"
|
||||
ore="1" >
|
||||
<Gather>
|
||||
<Food>
|
||||
<Meat speed="1" />
|
||||
<Fruit speed="1" />
|
||||
<Grain speed="1" />
|
||||
<Fish speed="1" />
|
||||
</Food>
|
||||
<Wood speed="1" />
|
||||
<Stone speed="1" />
|
||||
<Ore speed="1" />
|
||||
</Gather>
|
||||
<Repair
|
||||
rate="1"
|
||||
|
@ -15,13 +15,14 @@
|
||||
list=""
|
||||
list.structciv="cc;fc;ho;rc;tc;hc"
|
||||
/>
|
||||
<Gather
|
||||
food="true"
|
||||
food.meat="2"
|
||||
food.fruit="2"
|
||||
food.grain="2"
|
||||
food.fish="2"
|
||||
/>
|
||||
<Gather>
|
||||
<Food>
|
||||
<Meat speed="2" />
|
||||
<Fruit speed="2" />
|
||||
<Grain speed="2" />
|
||||
<Fish speed="2" />
|
||||
</Food>
|
||||
</Gather>
|
||||
<Repair
|
||||
rate="0.5"
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user