DayZ 1.29
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ DumpToString()

string InventoryLocation::DumpToString ( )
inlineprivate

См. определение в файле InventoryLocation.c строка 240

241 {
242 string res = "{ type=" + typename.EnumToString(InventoryLocationType, GetType());
243 switch (GetType())
244 {
245 case InventoryLocationType.UNKNOWN:
246 {
247 break;
248 }
249 case InventoryLocationType.GROUND:
250 {
251 res = res + " item=" + Object.GetDebugName(GetItem());
252 vector pos = GetPos();
253 float dir[4];
254 GetDir(dir);
255 res = res + " pos=(" + pos[0] + ", " + pos[1] + ", " + pos[2] + ")";
256 res = res + " dir=(" + dir[0] + ", " + dir[1] + ", " + dir[2] + ", " + dir[3] + ")";
257 break;
258 }
259 case InventoryLocationType.ATTACHMENT:
260 {
261 res = res + " item=" + Object.GetDebugName(GetItem());
262 res = res + " parent=" + Object.GetDebugName(GetParent());
263 res = res + " slot=" + GetSlot();
264 break;
265 }
266 case InventoryLocationType.CARGO:
267 {
268 res = res + " item=" + Object.GetDebugName(GetItem());
269 res = res + " parent=" + Object.GetDebugName(GetParent());
270 res = res + " idx=" + GetIdx() + " row=" + GetRow() + " col=" + GetCol() + " f=" + GetFlip();
271 break;
272 }
273 case InventoryLocationType.HANDS:
274 {
275 res = res + " item=" + Object.GetDebugName(GetItem());
276 res = res + " parent=" + Object.GetDebugName(GetParent());
277 break;
278 }
279 case InventoryLocationType.PROXYCARGO:
280 {
281 res = res + " item=" + Object.GetDebugName(GetItem());
282 res = res + " parent=" + Object.GetDebugName(GetParent());
283 res = res + " idx=" + GetIdx() + " row=" + GetRow() + " col=" + GetCol() + " f=" + GetFlip();
284 break;
285 }
286 case InventoryLocationType.VEHICLE:
287 {
288 res = res + " item=" + Object.GetDebugName(GetItem());
289 res = res + " parent=" + Object.GetDebugName(GetParent());
290 res = res + " idx=" + GetIdx();
291 break;
292 }
293
294 case InventoryLocationType.TEMP:
295 {
296 res = res + " item=" + Object.GetDebugName(GetItem());
297 res = res + " parent=" + Object.GetDebugName(GetParent());
298 break;
299 }
300 default:
301 {
302 res = res + "??";
303 break;
304 }
305 }
306 res = res + " }";
307 return res;
308 }
InventoryLocationType
types of Inventory Location
Определения InventoryLocation.c:4
proto native EntityAI GetParent()
returns parent of current inventory location
proto native vector GetPos()
returns position of item in world if type is Ground
proto native void GetDir(out float dir[4])
returns direction of item in world if type is Ground
proto native int GetSlot()
returns slot id if current type is Attachment
proto native int GetCol()
returns column of cargo if current type is Cargo / ProxyCargo
proto native int GetRow()
returns row of cargo if current type is Cargo / ProxyCargo
proto native int GetType()
returns type of InventoryLocation
proto native int GetIdx()
returns index of cargo if current type is Cargo / ProxyCargo
proto native bool GetFlip()
returns flip status of cargo
proto native EntityAI GetItem()
returns item of current inventory location
class LOD Object

Перекрестные ссылки GetCol(), GetDir(), GetFlip(), GetIdx(), GetItem(), GetParent(), GetPos(), GetRow(), GetSlot() и GetType().

Используется в DumpToStringNullSafe() и CraftingManager::OnUpdate().