6 protected static string m_DismantlePartName;
7 protected static bool m_DismantleConstructed;
8 protected static bool m_DismantleHasDependents;
9 protected static bool m_DismantleSupportFailed;
12 protected static string m_ActionDismantlePartName;
13 protected static string m_ActionDismantleReason;
16 protected static int m_TargetComponentIdx = -1;
20 protected static string m_CollidingPartName;
21 protected static ref array<string> m_ValidCollisions =
new array<string>();
24 protected static string m_InsideboxPartName;
28 m_DismantlePartName =
"";
29 m_DismantleConstructed =
false;
30 m_DismantleHasDependents =
false;
31 m_DismantleSupportFailed =
false;
33 m_ActionDismantlePartName =
"";
34 m_ActionDismantleReason =
"";
36 m_TargetComponentIdx = -1;
37 m_ActionInfoDebug.Clear();
39 m_CollidingPartName =
"";
40 m_ValidCollisions.Clear();
42 m_InsideboxPartName =
"";
45 static void SetCanDismantlePartData(ConstructionDismantleDebugData data)
47 m_DismantlePartName = data.partName;
48 m_DismantleConstructed = data.constructed;
49 m_DismantleHasDependents = data.hasDependents;
50 m_DismantleSupportFailed = !data.supportState;
53 static void ResetDismantlePartData()
55 m_DismantlePartName =
"";
58 static void SetActionDismantleData(ActionDismantleDebugData data)
60 m_ActionDismantlePartName = data.partName;
61 m_ActionDismantleReason = data.reason;
64 static void ResetActionDismantleData()
66 m_ActionDismantlePartName =
"";
69 static void AddBuildPartInfoData(ActionInfoDebugData data)
71 UpdateTargetComponentIdx(data.componentIdx);
73 m_ActionInfoDebug.Set(data.partName.Hash(), data);
76 static void RemoveBuildPartInfoData(
string partName)
78 m_ActionInfoDebug.Remove(partName.
Hash());
81 protected static void UpdateTargetComponentIdx(
int idx)
83 if (m_TargetComponentIdx != idx)
85 m_ActionInfoDebug.Clear();
86 m_TargetComponentIdx = idx;
90 static void SetCollisionPrintoutData(
string partName, notnull array<string> collisions)
92 m_CollidingPartName = partName;
93 m_ValidCollisions.Copy(collisions);
96 static void ResetCollisionPrintoutData()
98 m_CollidingPartName =
"";
99 m_ValidCollisions.Clear();
102 static void SetInsideboxCheckDebugData(
string partName)
104 m_InsideboxPartName = partName;
109 DrawCanDismantlePart();
110 DrawActionDismantle();
112 DrawCollisionPrintouts();
113 DrawInsideboxPrintouts();
116 protected static void DrawCanDismantlePart()
118 if (m_DismantlePartName !=
"")
120 DbgUI.Begin(
"CanDismantlePart Generic Debug", 0, 0);
122 DbgUI.Text(
"cannot dismantle: " + m_DismantlePartName);
123 if (!m_DismantleConstructed)
124 DbgUI.Text(
" not constructed");
125 if (m_DismantleHasDependents)
126 DbgUI.Text(
" has dependent part/s");
127 if (m_DismantleSupportFailed)
128 DbgUI.Text(
" support check failed");
134 protected static void DrawActionDismantle()
136 if (m_ActionDismantlePartName !=
"")
138 DbgUI.Begin(
"ActionDismantlePart Specific Debug", 0, 200);
140 DbgUI.Text(
"cannot dismantle: " + m_ActionDismantlePartName);
141 DbgUI.Text(
"reason: " + m_ActionDismantleReason);
147 protected static void DrawBuildPartInfo()
149 DbgUI.Begin(
"ActionPartInfo Debug", 400, 0);
151 DbgUI.Text(
"target component idx: " + m_TargetComponentIdx);
154 foreach (
int hash, ref ActionInfoDebugData data : m_ActionInfoDebug)
157 DbgUI.Text(data.partName +
" - missing required part/s!");
159 DbgUI.Text(data.partName +
" - missing statics support/s!");
161 DbgUI.Text(data.partName +
" - conflicts with part: " + data.conflictingPart +
"!");
163 DbgUI.Text(data.partName +
" - missing material in slot: " + data.missingSlot +
" (qty: " + data.missingQty +
")!");
165 DbgUI.Text(data.partName +
" - material/s ruined!");
167 DbgUI.Text(data.partName +
" - not buildable with: " + data.badToolType +
"!");
174 protected static void DrawCollisionPrintouts()
176 if (m_CollidingPartName !=
"")
178 DbgUI.Begin(
"IsCollidingEx Debug", 0, 300);
180 DbgUI.Text(
"part " + m_CollidingPartName +
" blocked by:");
181 foreach (
string name : m_ValidCollisions)
183 DbgUI.Text(
" " +
name);
190 protected static void DrawInsideboxPrintouts()
192 if (m_InsideboxPartName !=
"")
194 DbgUI.Begin(
"Insidebox Debug", 800, 0);
196 DbgUI.Text(
"insidebox check failed for part: " + m_InsideboxPartName);
203class ConstructionDismantleDebugData
211class ActionDismantleDebugData
217class ActionInfoDebugData
222 string conflictingPart;
230class CharacterStepsDebug
232 protected static string m_BoneName;
233 protected static string m_LastSurfaceType;
240 static void SetStepData(
string boneName,
string lastSurfaceName)
242 m_BoneName = boneName;
243 m_LastSurfaceType = lastSurfaceName;
246 protected static void DrawStepPrintouts()
248 if (m_BoneName !=
"")
250 DbgUI.Begin(
"PlayerSurface Debug", 10, 10);
252 DbgUI.Text(
"Leg: " + m_BoneName);
253 DbgUI.Text(
"Last surface type: " + m_LastSurfaceType);
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
EConstructionInfoCategories
proto native int Hash()
Returns hash of string.