rem: this.actions.gather.valueOf()[evt.target.traits.supply.type] && 
add: this.actions.gather[evt.target.traits.supply.type] && 
context: function entity_event_targetchanged( evt ){	// This event lets us know when the user moves his/her cursor to a different unit (provided this	// unit is selected) - use it to tell the engine what context cursor should be displayed, given	// the target.	// Attack iff there's a target, it's our enemy, and we're armed. Otherwise, if we can gather, and	// the target supplies, gather. If all else fails, move.	// ToString is needed because every property is actually an object (though that's usually	// hidden from you) and comparing an object to any other object in JavaScript (1.5, at least)	// yields false. ToString converts them to their actual values (i.e. the four character	// string) first.	evt.defaultAction = ORDER_GOTO;	if( evt.target )	{	    if( this.actions.attack && 		  ( evt.target.traits.id.civ_code != "gaia" ) &&		  ( evt.target.traits.id.civ_code.toString() != this.traits.id.civ_code.toString() ) )		    evt.defaultAction = ORDER_ATTACK;	    if( this.actions.gather && evt.target.traits.supply &&		    this.actions.gather.valueOf()[evt.target.traits.supply.type] &&		  ( ( evt.target.traits.supply.curr > 0 ) || ( evt.target.traits.supply.max == 0 ) ) )		    evt.defaultAction = ORDER_GATHER;	}	}
meta: 1070	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1070/8d23eb7ccfc65eda3be7958d730bfc4fd69d2873/template_entity_script.js/buggy/binaries/data/mods/official/entities/template_entity_script.js