Jump to content

Raidable Bases Compatibility Issues

Closed 3.2.1 3.2.3

Vergbergler
Vergbergler

Posted

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
Mr01sam

Posted

Noted, I'll try to take a look, compatibility with Raidable Bases for this is a doozy

Vergbergler

Posted

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
Mr01sam

Posted

Changed Status from Pending to Work in Progress

Mr01sam

Posted

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.

Mr01sam

Posted

Changed Status from Work in Progress to Closed

Changed Fixed In to 3.2.3

1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.1k

Files Sold

Total number of files sold.

2m

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.