Hi,
is it possible to get an update?
Since todays update the boxes added with "/cls add 5 900" are invisible.
You will still get the "Loot" Interaction and it actually works, but the box is invisble.
(oxide 5532, HapisIsland Map)
Boxes are invisible now :(
same here boxes are invisible if you are ADDING new ones (this wipe) ..existing boxes that were added last wipe aare visible still
map is custom and i dont change it
The way the plugin locates valid boxes by name is wrong.
Several new invisible crates have been added that seem to be found as well.
https://www.corrosionhour.com/rust-prefab-list/
This fix worked for me:
exclude every entity that has "invisible" in its name.
See "//tolimans edit"
private void FindBoxTypes()
{
Dictionary<string, UnityEngine.Object> files = FileSystemBackend.cache;
int i = 1;
foreach (string str in files.Keys)
{
if ((str.StartsWith("assets/content/") || str.StartsWith("assets/bundled/") || str.StartsWith("assets/prefabs/")) && str.EndsWith(".prefab"))
{
if (str.Contains("resource/loot") || str.Contains("radtown/crate") || str.Contains("radtown/loot") || str.Contains("loot") || str.Contains("radtown/oil"))
{
if (!str.Contains("ot/dm tier1 lootb"))
{
//Tolimans edit :o
if (!str.Contains("invisible"))
{
GameObject gmobj = GameManager.server.FindPrefab(str);
if (gmobj?.GetComponent<BaseEntity>() != null)
{
boxTypes.Add(i, new CustomBoxData { boxType = new BoxType { Type = str, SkinID = 0 } });
i++;
}
}
}
}
}
}
boxTypes.Add(i, new CustomBoxData { boxType = new BoxType { Type = "assets/prefabs/deployable/large wood storage/box.wooden.large.prefab", SkinID = 0 } });
i++;
boxTypes.Add(i, new CustomBoxData { boxType = new BoxType { Type = "assets/prefabs/deployable/large wood storage/box.wooden.large.prefab", SkinID = 10124, SkinName = "Ammo" } });
i++;
boxTypes.Add(i, new CustomBoxData { boxType = new BoxType { Type = "assets/prefabs/deployable/large wood storage/box.wooden.large.prefab", SkinID = 10123, SkinName = "FirstAid" } });
i++;
boxTypes.Add(i, new CustomBoxData { boxType = new BoxType { Type = "assets/prefabs/deployable/large wood storage/box.wooden.large.prefab", SkinID = 10141, SkinName = "Guns" } });
i++;
foreach (KeyValuePair<string, CustomBoxData> box in clsData.customBoxes)
{
boxTypes.Add(i, box.Value);
i++;
}
}