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

◆ DumpToString()

string InventoryLocation::DumpToString ( )
inlineprivate

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

234 {
235 string res = "{ type=" + typename.EnumToString(InventoryLocationType, GetType());
236 switch (GetType())
237 {
238 case InventoryLocationType.UNKNOWN:
239 {
240 break;
241 }
242 case InventoryLocationType.GROUND:
243 {
244 res = res + " item=" + Object.GetDebugName(GetItem());
245 vector pos = GetPos();
246 float dir[4];
247 GetDir(dir);
248 res = res + " pos=(" + pos[0] + ", " + pos[1] + ", " + pos[2] + ")";
249 res = res + " dir=(" + dir[0] + ", " + dir[1] + ", " + dir[2] + ", " + dir[3] + ")";
250 break;
251 }
252 case InventoryLocationType.ATTACHMENT:
253 {
254 res = res + " item=" + Object.GetDebugName(GetItem());
255 res = res + " parent=" + Object.GetDebugName(GetParent());
256 res = res + " slot=" + GetSlot();
257 break;
258 }
259 case InventoryLocationType.CARGO:
260 {
261 res = res + " item=" + Object.GetDebugName(GetItem());
262 res = res + " parent=" + Object.GetDebugName(GetParent());
263 res = res + " idx=" + GetIdx() + " row=" + GetRow() + " col=" + GetCol() + " f=" + GetFlip();
264 break;
265 }
266 case InventoryLocationType.HANDS:
267 {
268 res = res + " item=" + Object.GetDebugName(GetItem());
269 res = res + " parent=" + Object.GetDebugName(GetParent());
270 break;
271 }
272 case InventoryLocationType.PROXYCARGO:
273 {
274 res = res + " item=" + Object.GetDebugName(GetItem());
275 res = res + " parent=" + Object.GetDebugName(GetParent());
276 res = res + " idx=" + GetIdx() + " row=" + GetRow() + " col=" + GetCol() + " f=" + GetFlip();
277 break;
278 }
279 case InventoryLocationType.VEHICLE:
280 {
281 res = res + " item=" + Object.GetDebugName(GetItem());
282 res = res + " parent=" + Object.GetDebugName(GetParent());
283 res = res + " idx=" + GetIdx();
284 break;
285 }
286 default:
287 {
288 res = res + "??";
289 break;
290 }
291 }
292 res = res + " }";
293 return res;
294 }
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().