sqfdebugwatcher.c 872 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. class SqfDebugWatcher
  2. {
  3. private int m_Id;
  4. private string m_SqfCommand;
  5. private bool m_IsRunning;
  6. void SqfDebugWatcher( int id, string sqf_command )
  7. {
  8. m_Id = id;
  9. m_SqfCommand = sqf_command;
  10. m_IsRunning = false;
  11. }
  12. int GetId()
  13. {
  14. return m_Id;
  15. }
  16. void SetId( int id )
  17. {
  18. m_Id = id;
  19. }
  20. string GetSqfCommand()
  21. {
  22. return m_SqfCommand;
  23. }
  24. void SetSqfCommand( string sqf_command )
  25. {
  26. m_SqfCommand = sqf_command;
  27. }
  28. bool IsRunning()
  29. {
  30. return m_IsRunning;
  31. }
  32. void Run()
  33. {
  34. m_IsRunning = true;
  35. }
  36. void Stop()
  37. {
  38. m_IsRunning = false;
  39. }
  40. void Execute()
  41. {
  42. if ( m_IsRunning && m_SqfCommand != "" )
  43. {
  44. // string sqf_command = "_result = " + m_SqfCommand + "; _resultStr = format ['%1', _result]; null = callFunction ['OnSqfDebugWatcherResult', " + m_Id.ToString() + ", _resultStr];";
  45. // GetGame().ExecuteSQF( sqf_command );
  46. }
  47. }
  48. }