Building Grades
when using the metal upgrade, which uses the new container upgrade it turns into straw

i've also had this happen too

Same here. Player wanted to upgrade but ended up with a twig building loosing all metal.

The Adobe and Container upgrades are SKINS so there is no option to upgrade them afaik , the containers are metal and adobe are clay there is no function on the (standard) hammer to upgrade twig to them so i doubt you can change their skins with the hammer using this plugin.

don't forget theres, brick, and brutal

Having the same issue where /up to anything from Adobe converts the entire structure to twig and consumes all the materials to desired upgrade.

Merged post

Here's more detail... I originally thought this was a BuildingSkins plugin conflict, and held off on logging/communicating the issue until I could test it some more. It appears that the Facepunch skins function introduced a bug with BuildingGrades. If attempting to use the /up command on a building where skins are applied, the plugin:

1) converts the entire structure to twig
2) consumes all the materials required for the upgrade

This is making players who have the skins frustrated. Fortunately, few have tried to upgrade from Adobe to something else BEFORE attempting to use BuildingSkins (which is why I thought it was a conflict at first).

I removed BuildingSkins.cs from my plugins directory. With BuildingGrades.cs installed, here are steps to reproduce:

1) Build a small structure.
2) Upgrade the structure to Adobe. You can /up it to something between /1 and /2 beforehand if you like (consumes more mats).
3) /up 3 while looking at any Adobe block
4) All Adobe blocks in the structure will turn to twig.

Same issue here

Not sure if this is any help, or if its experienced by other admins/players. When I have the Ubertool active, it replicates the same issue - ie the /up command turns it all to twig. If Ubertool isnt active, then it upgrades as normal.
I dont hvae the new building skins, but when using Ubertool, it defaults to the Adobe skin.

Dana shared a patch for this in Discord for me to test, and the patch worked. I suspect an update will be posted soon.

Anyone that has the patched version and would want to share it?

 

Inserting this at line 962 (in SetBuildingBlockGrade before the buildingBlock.SetGrade line) sets the block skin back to default and seems to work for me:

buildingBlock.skinID = 0;

private static void SetBuildingBlockGrade(BuildingBlock buildingBlock, BuildingGrade.Enum targetGrade)
{
buildingBlock.skinID = 0; // to avoid upgrade/downgrade to twig when using building skin
buildingBlock.SetGrade(targetGrade);
buildingBlock.SetHealthToMax();
buildingBlock.StartBeingRotatable();
buildingBlock.SendNetworkUpdate();
buildingBlock.UpdateSkin();
buildingBlock.ResetUpkeepTime();
buildingBlock.UpdateSurroundingEntities();
BuildingManager.server.GetBuilding(buildingBlock.buildingID)?.Dirty();
if (targetGrade > BuildingGrade.Enum.Twigs)
{
Effect.server.Run("assets/bundled/prefabs/fx/build/promote_" + targetGrade.ToString().ToLower() + ".prefab", buildingBlock, 0u, Vector3.zero, Vector3.zero);
}
}

ESOwM2t5gxN4gYR.png KajWithAJ

Anyone that has the patched version and would want to share it?

 

A version is available for testing on Discord. Unfortunately, I am unable to share the link in uMod (restricted website error).