fixes item

This commit is contained in:
dddushesss 2022-01-05 17:39:00 +03:00
parent c87a906d97
commit 482a8371a3
5 changed files with 2 additions and 5 deletions

View File

@ -52,13 +52,13 @@ namespace Items
while (closedList.Contains(cell) || cell.Item != null) while (closedList.Contains(cell) || cell.Item != null)
{ {
cell = _openList[Random.Range(0, _openList.Count - 1)]; return;
} }
var type = GetWeightedType(); var type = GetWeightedType();
while (type == null) while (type == null)
{ {
type = GetWeightedType(); return;
} }
var info = _itemInfos[type.ToString().Replace("Items.", "")]; var info = _itemInfos[type.ToString().Replace("Items.", "")];
var obj = (Item)Activator.CreateInstance(type, info); var obj = (Item)Activator.CreateInstance(type, info);

View File

@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 32fec41995024d6f9b110df79b751c97
timeCreated: 1641238734

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 131 B