add:  case ACTION_REPAIR: if ( !this.actions.repair ) { evt.preventDefault(); return; } evt.notifyType = NOTIFY_NONE; this.forceCheckListeners( NOTIFY_ORDER_CHANGE, this ); break; 
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;	}		//evt.notifySource is the entity order data will be obtained from, so if we're attacking and we 	//want our listeners to copy us, then we will use our own order as the source.	//registerOrderChange() is used to adjust the flank penalty	switch( evt.orderType )	{		case ORDER_GOTO:			if ( !this.actions.move )			{				evt.preventDefault();				return;			}			evt.notifyType = NOTIFY_GOTO;			evt.notifySource = this;			this.forceCheckListeners( NOTIFY_ORDER_CHANGE, this );			break;					case ORDER_RUN:			if ( !this.actions.move.run )				{				evt.preventDefault();				return;			}			evt.notifyType = NOTIFY_RUN;			evt.notifySource = this;			this.forceCheckListeners( NOTIFY_ORDER_CHANGE, this );			break;					case ORDER_PATROL:			if ( !this.actions.patrol )			{				evt.preventDefault();				return;			}			this.registerOrderChange();			this.forceCheckListeners( NOTIFY_ORDER_CHANGE, this );			break;						case ORDER_GENERIC:			evt.notifySource = this;			switch ( evt.action )			{				case ACTION_ATTACK:				case ACTION_ATTACK_RANGED:					evt.action = getAttackAction( this, evt.target );					if ( evt.action == ACTION_NONE )					{						evt.preventDefault();						return;					}					evt.notifyType = NOTIFY_ATTACK;					this.forceCheckListeners( NOTIFY_ORDER_CHANGE, this );					break;				case ACTION_GATHER:					if ( !this.actions.gather )					{						evt.preventDefault();						return;					}					evt.notifyType = NOTIFY_GATHER;					this.forceCheckListeners( NOTIFY_ORDER_CHANGE, this );										// Change our gather animation based on the type of target					var a = this.actions.gather;					this.setActionParams( ACTION_GATHER, 0.0, a.range, a.speed,						"gather_" + evt.target.traits.supply.subtype );											break;									case ACTION_HEAL:					if ( !this.actions.heal )					{						evt.preventDefault();						return;					}					evt.notifyType = NOTIFY_HEAL;					this.forceCheckListeners( NOTIFY_ORDER_CHANGE, this );					break;										case ACTION_BUILD:					if ( !this.actions.build || !evt.target.building || evt.target.building=="" )					{						evt.preventDefault();						return;					}					evt.notifyType = NOTIFY_NONE;					this.forceCheckListeners( NOTIFY_ORDER_CHANGE, this );					break;				}			break;				case ORDER_PRODUCE:		case ORDER_START_CONSTRUCTION:			evt.notifyType = NOTIFY_NONE;			break;					default:			console.write("Unknown order type " + evt.orderType + "; ignoring.");			evt.preventDefault();			break;	}}
meta: 1070	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1070/bf615edbe75fd1937dad5e3f1c763f95636943bf/template_entity_script.js/clean/binaries/data/mods/official/entities/template_entity_script.js