| 1234567891011121314151617181920212223242526272829303132333435363738394041 | 
							- class Torch_Video : LongTorch
 
- {
 
- 	protected float PARTICLE_DELAY = 15000;
 
- 	protected bool m_EnablePtc;
 
- 	
 
- 	void SetEnablePtc()
 
- 	{
 
- 		m_EnablePtc = true;
 
- 	}
 
- 		
 
- 	override void OnWork( float consumed_energy )
 
- 	{
 
- 		if (!m_EnablePtc)
 
- 			return;
 
- 		
 
- 		super.OnWork(consumed_energy);
 
- 	}
 
- 	
 
- 	override void OnWorkStart()
 
- 	{
 
- 		GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(SetEnablePtc, PARTICLE_DELAY);
 
- 		
 
- 		super.OnWorkStart();
 
- 	}
 
- 	
 
- 	override void OnWorkStop()
 
- 	{
 
- 		GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).Remove(SetEnablePtc);
 
- 		m_EnablePtc = false;
 
- 		
 
- 		super.OnWorkStop();
 
- 	}
 
- 	
 
- 	override void SetActions()
 
- 	{
 
- 		super.SetActions();
 
- 		
 
- 		AddAction(ActionLightTorchVideo);
 
- 		AddAction(ActionExtinquishTorchVideo);
 
- 	}
 
- }
 
 
  |