Jump to content

Raidable Bases Compatibility Issues

Closed 3.2.1 3.2.3

When shutting down server, RaidProtection records all RaidableBases TCs on the map. These bases have no owners and are destroyed on server restart.

When the server starts back up RaidProtection attempts to find all the TCs from the now deleted RaidableBases and throws loads of runtime errors. The functions name is "InitProtectedCupboard" throws an null exception for each RaidableBases TC not found.

Call stack:
OnServerInitialized() -> FindNewCupboards() -> AddProtectedCupboard() -> InitProtectedCupboard() -> null pointer

Apologies, null pointer object is unknown.

  • Like 1

Share this comment


Link to comment

I have a plugin here on Codefling called AdminTCMarkers. I noticed that Raidable Bases building blocks do not contain ownerIDs. This can easily be used to detect them VS other bases on the map.

Here's an example:
 

private bool IsRaidableBase(BuildingPrivlidge privlidge) // BuildingPrivlidge is just a ToolCupboard entity
{
	BuildingManager.Building TCBuilding = privlidge.GetBuilding();
	if (TCBuilding != null)
	{
		if (TCBuilding.buildingBlocks.Count > 0)
		{
			// Blocks of Raidable Bases do not have OwnerIDs
			if (TCBuilding.buildingBlocks[0].OwnerID == 0)
			{
				return true;
			}
		}
	}
	return false;
}


Hope this helps!
-Cheers!

  • Like 1

Share this comment


Link to comment

In v3.2.3 Raidable Bases should now be ignored by Raid Protection - they shouldn't show up in the ledgers and they shouldn't have the UI when you inspect them.

Share this comment


Link to comment
1.1m

Downloads

Total number of downloads.

5.7k

Customers

Total customers served.

83.2k

Files Sold

Total number of files sold.

1.6m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.