abstract class WorkSpotTask extends AIbehaviortaskScript
{
}

class ReserveWorkSpotTask extends WorkSpotTask
{
	var workspotRef : NodeRef;
	var workspotObject : weak< GameObject >;

	protected override function Activate( context : ScriptExecutionContext )
	{
		var reserveWorkspotEvent : OnReserveWorkspotEvent;
		reserveWorkspotEvent = new OnReserveWorkspotEvent;
		workspotRef = ScriptExecutionContext.GetArgumentNodeRef( context, 'WorkspotNode' );
		reserveWorkspotEvent.workspotRef = workspotRef;
		workspotObject = ScriptExecutionContext.GetArgumentObject( context, 'StimTarget' );
		workspotObject.QueueEvent( reserveWorkspotEvent );
	}

}

class ReleaseWorkSpotTask extends WorkSpotTask
{
	var workspotRef : NodeRef;
	var workspotObject : weak< GameObject >;

	protected override function Activate( context : ScriptExecutionContext )
	{
		var reserveWorkspotEvent : OnReleaseWorkspotEvent;
		reserveWorkspotEvent = new OnReleaseWorkspotEvent;
		workspotRef = ScriptExecutionContext.GetArgumentNodeRef( context, 'WorkspotNode' );
		reserveWorkspotEvent.workspotRef = workspotRef;
		workspotObject = ScriptExecutionContext.GetArgumentObject( context, 'StimTarget' );
		workspotObject.QueueEvent( reserveWorkspotEvent );
	}

}

