Fridge loot logging broken since it needing electricity

Seems its no longer a StorageContainer but is now Fridge/ContainerIOEntity and so logging is currently broken for it

So, its not generating a log at all anymore, and neither does the /findid command work on it anymore.

Merged post

So, it turns out I was still using version 0.1.5 (which was a "May 4th 2023" fix) because I liked the file paths/names logging scheme much better in it, as opposed to 0.2.x that completely changed that with no mention of it in the changelog and no option to go back to the old scheme either.

Anyway, after finally caving in and updating to 0.2.1, it seems that fridge loot logging is working again (I guess 0.2.x was an even bigger code re-write than the changelog mentions).

However, the /findid chat command on a fridge is still broken.

Here is a patch that makes /findid on fridges work again, feel free to take it and create a v0.2.2 update with it:

@@ -125,7 +125,7 @@
RaycastHit raycastHit = m_RaycastHits[i];

BaseEntity baseEntity = raycastHit.GetEntity();
- if (baseEntity is StorageContainer)
+ if (baseEntity is StorageContainer || baseEntity is Fridge)
return baseEntity;
}
}
@@ -264,7 +264,7 @@
return;

BaseEntity entity = FindEntity(player);
- if (entity is StorageContainer)
+ if (entity is StorageContainer || entity is Fridge)
FormatString(player, "Message.Details", entity.GetType(), entity.net.ID.Value, entity.ShortPrefabName);
else TranslatedString(player, "Error.NoEntity");
}

Revised patch that now also includes the Vending Machine since it now also has been changed this wipe:

@@ -125,7 +125,7 @@
RaycastHit raycastHit = m_RaycastHits[i];

BaseEntity baseEntity = raycastHit.GetEntity();
- if (baseEntity is StorageContainer)
+ if (baseEntity is StorageContainer || baseEntity is Fridge || baseEntity is VendingMachine)
return baseEntity;
}
}
@@ -264,7 +264,7 @@
return;

BaseEntity entity = FindEntity(player);
- if (entity is StorageContainer)
+ if (entity is StorageContainer || entity is Fridge || entity is VendingMachine)
FormatString(player, "Message.Details", entity.GetType(), entity.net.ID.Value, entity.ShortPrefabName);
else TranslatedString(player, "Error.NoEntity");
}