context: function performGather( evt ){	g = this.actions.gather;	s = evt.target.traits.supply;		if( !s.dropsitecount[this.player.id] )	{		// Entity has become ungatherable for us, probably meaning our mill near it was killed; cancel order		evt.preventDefault();		return;	}	if( g.resource[s.type][s.subtype])		gather_amt = parseInt( g.resource[s.type][s.subtype] );	else		gather_amt = parseInt( g.resource[s.type] );	if( s.max > 0 )	{		if( s.curr <= gather_amt )		{			gather_amt = s.curr;		}		// Remove amount from target.		s.curr -= gather_amt;		// Add extracted resources to player's resource pool.		this.player.resources[s.type.toString()] += gather_amt;				// Kill the target if it's now out of resources		if( s.curr == 0 )		{			evt.target.kill();		}	}}
meta: 1070	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1070/3c4084ab033390d113f952cf160c077f2dd9a858/entity_functions.js/buggy/binaries/data/mods/official/scripts/entity_functions.js