rem: if( !this.actions.gather || !this.actions.gather.resource || !( this.actions.gather.resource[evt.target.traits.supply.type] ) || ( ( evt.target.traits.supply.curr == 0 ) && ( evt.target.traits.supply.max > 0 ) ) ) 
add: if( !canGather( this, evt.target ) ) 
context: function entityEventPrepareOrder( evt ){	// This event gives us a chance to veto any order we're given before we execute it.	// Not sure whether this really belongs here like this: the alternative is to override it in	// subtypes - then you wouldn't need to check tags, you could hardcode results.	if( !this.actions )	{		evt.preventDefault();		return;	}	switch( evt.orderType )	{		case ORDER_GOTO:			if( !this.actions.move )				evt.preventDefault();			break;		case ORDER_PATROL:			if( !this.actions.patrol )				evt.preventDefault();			break;			case ORDER_ATTACK:			if( !this.actions.attack || 			    !evt.target )				evt.preventDefault();			break;		case ORDER_GATHER:			if( !this.actions.gather || !this.actions.gather.resource ||			    !( this.actions.gather.resource[evt.target.traits.supply.type] ) ||			    ( ( evt.target.traits.supply.curr == 0 ) && ( evt.target.traits.supply.max > 0 ) ) )				evt.preventDefault();			break;		default:			evt.preventDefault();		break;	}}
meta: 1070	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1070/c6c006d4fe66743bdc399a80e96340a90ca4203c/template_entity_script.js/buggy/binaries/data/mods/official/entities/template_entity_script.js