46 if (CastTo(obj, entity))
47 return obj.GetDebugNameNative();
49 return entity.GetDebugName();
67 static void CanvasDrawLine(
float x1,
float y1,
float x2,
float y2,
float width,
int color)
114 if ( found_shape && found_shape == shape )
116 found_shape.Destroy();
185 string logMessage =
string.Format(
"%1: %2", entity.GetSimulationTimeStamp(), message);
245 for (
int i = 0; i < arr.Count(); i++)
256 for (
int i = 0; i < arr.Count(); i++)
291 float size_h = size * 0.5;
293 min[0] = min[0] - size_h;
294 min[1] = min[1] - size_h;
295 min[2] = min[2] - size_h;
297 max[0] = max[0] + size_h;
298 max[1] = max[1] + size_h;
299 max[2] = max[2] + size_h;
308 Shape shape =
Shape.CreateSphere(color, flags, pos, size);
316 Shape shape =
Shape.CreateFrustum(horizontalAngle, verticalAngle, length, color, flags);
324 Shape shape =
Shape.CreateCylinder(color, flags, pos, radius, height);
367 Shape shape =
Shape.CreateLines(color, flags, pts, 2);
377 Shape shape =
Shape.CreateLines(color, flags, positions, count);
385 Shape shape =
Shape.CreateArrow(from, to, size, color, flags);
398 base_classes.Clear();
422 filtered_classes.Clear();
426 for (
int s = 0; s < searching_in.Count(); ++s )
428 string config_path = searching_in.Get(s);
431 for (
int i = 0; i < objects_count; i++)
445 string nchName = childName;
448 if ( nchName.
Contains(search_string) != -1)
450 filtered_classes.Insert(childName);
461 static private void LogMessage(
string level,
string plugin,
string entity,
string author,
string label,
string message)
472 string env =
"Client";
473 string msg =
string.Empty;
480 msg =
string.
Format(
"%1 | %2 | %3 | %4 | %5 | %6 | %7", date, env, level, plugin, entity, label, message);
486 Param1<string> msg_p =
new Param1<string>(msg);
496 static private void SaveLog(
string log_message)
510 #ifdef DIAG_DEVELOPER
511 Print(
string.Format(
"%1", log_message));
546 string date = month.ToStringLen(2) +
"-" + day.ToStringLen(2) +
" " + hour.ToStringLen(2) +
":" + minute.ToStringLen(2) +
":" + second.ToStringLen(2);
565 #ifdef DIAG_DEVELOPER
694 for(
int i = 0; i < items.Count(); i++)
Dispatcher GetDispatcher()
const CallID CALL_ID_SEND_LOG
const CallID CALL_ID_SCR_CNSL_ADD_PRINT
Param CallMethod(CallID call_id, Param params)
override string GetDebugName()
Gets the debug name for the ParticleManager.
proto native int ConfigGetChildrenCount(string path)
Get count of subclasses in config class on path.
proto native int ConfigGetInt(string path)
Get int value from config on path.
proto native bool IsServer()
proto bool ConfigGetChildName(string path, int index, out string name)
Get name of subclass in config class on path.
proto native bool IsMultiplayer()
proto native WorkspaceWidget GetWorkspace()
static ref Param1< string > PARAM1_STRING
static void TriggerLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
static void SymptomLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
static void TFLog(string message=LOG_DEFAULT, TestFramework caller=null, string function="")
static void GetFiltredConfigClasses(string search_string, out TStringArray filtered_classes, bool only_public=true)
Returns config classes containing search_string in name.
static private const string LOG_DEBUG_WEIGHT
static private string GetDate()
static Shape DrawLines(vector[] positions, int count, int color=0xFFFFFFFF, int flags=0)
static private ref array< Shape > m_DebugShapes
static private const string LOG_DEBUG_TF
static Shape DrawBoxEx(vector pos1, vector pos2, int color=0x1fff7f7f, ShapeFlags flags=ShapeFlags.TRANSP|ShapeFlags.NOZWRITE)
static Shape DrawArrow(vector from, vector to, float size=0.5, int color=0xFFFFFFFF, int flags=0)
static string GetDebugName(Managed entity)
static private const string LOG_DEBUG_ACTION
static private const string LOG_DEBUG_WEATHER
static void WeatherLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
static private const string LOG_ERROR
static void CanvasDrawLine(float x1, float y1, float x2, float y2, float width, int color)
static private const string LOG_DEBUG_SYMPTOM
static private bool m_EnabledLogs
static void MeleeLog(Entity entity, string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT)
static void ClearScriptLogs()
static void DestroyAllShapes()
static void LogArrayString(array< string > arr=NULL, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
static private const string LOG_DEBUG
static void RemoveShape(out Shape shape)
static string GetFileName()
static private const string LOG_DEBUG_INV_HFSM
static private void SaveLog(string log_message)
static Shape DrawLine(vector from, vector to, int color=0xFFFFFFFF, int flags=0)
static Shape DrawCube(vector pos, float size=1, int color=0x1fff7f7f)
static private const string LOG_DEFAULT
static void WeightLog(string message=LOG_DEFAULT, Managed caller=null, string function="", Managed entity=null)
static Shape DrawFrustum(float horizontalAngle, float verticalAngle, float length, int color=0x1fff7f7f, ShapeFlags flags=ShapeFlags.TRANSP|ShapeFlags.WIREFRAME)
static void InventoryReservationLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
static Widget m_DebugLayoutCanvas
static private const string LOG_DEBUG_INV_RESERVATION
static void ActionLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
static private const string LOG_DEBUG_TRIGGER
static CanvasWidget m_CanvasDebug
static private const string LOG_INFO
static void LogError(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message as error message.
static void InventoryHFSMLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
static Shape DrawBox(vector pos1, vector pos2, int color=0x1fff7f7f)
static void InventoryMoveLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
static Shape DrawSphere(vector pos, float size=1, int color=0x1fff7f7f, ShapeFlags flags=ShapeFlags.TRANSP|ShapeFlags.NOOUTLINE)
static private void LogMessage(string level, string plugin, string entity, string author, string label, string message)
DEPRECATED.
static private const string LOG_DEBUG_MELEE
static array< Shape > DrawCone(vector pos, float lenght, float halfAngle, float offsetAngle, int color=0xFFFFFFFF, int flags=0)
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
static private const string LOG_DEBUG_INV_MOVE
static void LogInfo(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
static void LogArrayInt(array< int > arr=NULL, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
static Shape DrawCylinder(vector pos, float radius, float height=1, int color=0x1fff7f7f, ShapeFlags flags=ShapeFlags.TRANSP|ShapeFlags.NOOUTLINE)
static void GetBaseConfigClasses(out TStringArray base_classes)
Returns some of base config classes strings like CfgVehicles, CfgWeapons, etc. for searching purposes...
static void ReceivedLogMessageFromServer(string message)
static void ClearCanvas()
static void CanvasDrawPoint(float x1, float y1, int color)
Draws a "point" on the screen at x,y coordinates Debug.ClearCanvas(); for(int i = 0; i < 700;i++) { f...
static void LogWarning(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message as warning message.
static void ParticleLog(string message=LOG_DEFAULT, Managed caller=null, string function="", Managed entity=null)
static private const string LOG_DEBUG_PARTICLE
static private const string LOG_WARNING
Param CallMethod(CallID call_id, Param params)
script counterpart to engine's class Inventory
proto native bool EnumerateInventory(InventoryTraversalType tt, out array< EntityAI > items)
enumerate inventory using traversal type and filling items array
static bool IsInventoryHFSMLogEnable()
static bool m_DoInventoryReservationLog
static void SymptomLogEnable(bool enable)
static void InventoryMoveLogEnable(bool enable)
static bool IsInventoryMoveLogEnable()
static void InventoryHFSMLogEnable(bool enable)
static bool IsWeaponLogEnable()
static bool IsLogsEnable()
static bool IsWeatherLogEnabled()
static void ActionLogEnable(bool enable)
static void SetLogsEnabled(bool enable)
static bool m_DoActionDebugLog
static bool IsActionLogEnable()
static bool m_DoSymptomDebugLog
static bool m_DoInventoryMoveLog
static bool m_DoWeaponLog
static bool IsInventoryReservationLogEnable()
static bool m_DoWeatherLog
static bool IsSymptomLogEnable()
static void WeaponLogEnable(bool enable)
static bool m_DoInventoryHFSMLog
static void InventoryReservationLogEnable(bool enable)
void SetWeight(float weight)
void WeightDebugData(EntityAI entity)
void SetCalcDetails(string details)
void AddCalcDetails(string details)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto vector Normalized()
return normalized vector (keeps orginal vector untouched)
InventoryTraversalType
tree traversal type, for more see http://en.wikipedia.org/wiki/Tree_traversal
proto native CGame GetGame()
const string CFG_FILE_SCRIPT_LOG_EXT
proto void Print(void var)
Prints content of variable to console/log.
array< string > TStringArray
proto void CloseFile(FileHandle file)
Close the File.
proto FileHandle OpenFile(string name, FileMode mode)
Opens File.
proto bool FileExist(string name)
Check existence of file.
proto void FPrintln(FileHandle file, void var)
Write to file and add new line.
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static proto void ConePoints(vector origin, float length, float halfAngle, float angleOffset, out vector leftPoint, out vector rightPoint)
Calculates the points of a right 2D cone in 3D space.
static proto float Cos(float angle)
Returns cosinus of angle in radians.
static proto float Sin(float angle)
Returns sinus of angle in radians.
static proto string Format(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
Gets n-th character from string.
string Get(int index)
Gets n-th character from string.
bool Contains(string sample)
Returns true if sample is substring of string.
proto int ToLower()
Changes string to lowercase. Returns length.
static proto string ToString(void var, bool type=false, bool name=false, bool quotes=true)
Return string representation of variable.
proto void GetYearMonthDay(out int year, out int month, out int day)
Returns world date.
proto void GetHourMinuteSecond(out int hour, out int minute, out int second)
Returns world time.
proto native bool IsCLIParam(string param)
Returns if command line argument is present.