Пирамида отрицания: своя костяная модель, новое имя, иконка
- модель: ступени из костей, черепа с тлеющими глазницами, костяная ось насквозь, наверху цветок из рваной плоти на коротком шипастом стебле из скрученных жил, в нём фиолетовый кристалл; бандл necroward (копия префаба оссуария) - блок на Shape="ModelEntity" как оссуарий; шейдер и теги коллайдера ставит GeoOssuaryPatch (теперь для обоих префабов); свой коллайдер-коробка - «Пирамида духов» переименована в «Пирамиду отрицания» (13 языков, и в описаниях); внутреннее имя блока прежнее - уже поставленные пирамиды в сейвах сохранятся - иконка - рендер модели Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
0dcb449f25
commit
20ee89323d
@@ -139,15 +139,17 @@ namespace NecromancerTome
|
||||
[HarmonyPatch(typeof(BlockShapeModelEntity), nameof(BlockShapeModelEntity.getPrefab))]
|
||||
public static class Patch_BlockShapeModelEntity_getPrefab_GeoOssuaryShader
|
||||
{
|
||||
const string ModelName = "necroOssuaryPrefab";
|
||||
const string VanillaModel = "@:Entities/Furniture/collectorDewPrefab.prefab";
|
||||
static bool done;
|
||||
// Пирамида отрицания (01.10) собрана из копии префаба оссуария - те же имена объектов,
|
||||
// тот же запасной шейдер, поэтому лечится тем же постфиксом.
|
||||
static readonly System.Collections.Generic.HashSet<string> models =
|
||||
new System.Collections.Generic.HashSet<string> { "necroOssuaryPrefab", "necroWardPrefab" };
|
||||
static readonly System.Collections.Generic.HashSet<string> done = new System.Collections.Generic.HashSet<string>();
|
||||
|
||||
public static void Postfix(Transform __result)
|
||||
{
|
||||
if (done || __result == null || __result.name != ModelName)
|
||||
if (__result == null || !models.Contains(__result.name) || !done.Add(__result.name))
|
||||
return;
|
||||
done = true;
|
||||
Transform vanilla = DataLoader.LoadAsset<Transform>(VanillaModel);
|
||||
Renderer src = vanilla != null ? vanilla.GetComponentInChildren<Renderer>(true) : null;
|
||||
Shader shader = src != null && src.sharedMaterial != null ? src.sharedMaterial.shader : null;
|
||||
|
||||
Reference in New Issue
Block a user