WulaWall是madeFromStuff的建筑,需要指定材料

This commit is contained in:
2025-08-29 14:57:15 +08:00
parent 0445d9bc30
commit 78a27c3d45
2 changed files with 3 additions and 1 deletions

View File

@@ -91,7 +91,9 @@ namespace WulaFallenEmpire
ThingDef wallDef = DefDatabase<ThingDef>.GetNamed("WulaWall", false);
if (wallDef != null)
{
Thing wall = ThingMaker.MakeThing(wallDef);
// WulaWall是madeFromStuff的建筑需要指定材料
ThingDef steelDef = DefDatabase<ThingDef>.GetNamed("Steel", false);
Thing wall = ThingMaker.MakeThing(wallDef, steelDef);
wall.SetFaction(null);
GenPlace.TryPlaceThing(wall, pos, map, ThingPlaceMode.Direct);
}