Remove undead and inorganic enemies from Aswid diet
This commit is contained in:
parent
824622c582
commit
68dd2329dd
2 changed files with 9 additions and 17 deletions
|
|
@ -20,17 +20,8 @@ namespace RacesOfValheim
|
||||||
{ "Deer", "TrophyDeer" },
|
{ "Deer", "TrophyDeer" },
|
||||||
{ "Wolf", "TrophyWolf" },
|
{ "Wolf", "TrophyWolf" },
|
||||||
{ "Fenring", "TrophyFenring" },
|
{ "Fenring", "TrophyFenring" },
|
||||||
{ "Draugr", "TrophyDraugr" },
|
|
||||||
{ "Draugr_Elite", "TrophyDraugrElite" },
|
|
||||||
{ "Skeleton", "TrophySkeleton" },
|
|
||||||
{ "Skeleton_Poison", "TrophySkeletonPoison" },
|
|
||||||
{ "Surtling", "TrophySurtling" },
|
|
||||||
{ "Blob", "TrophyBlob" },
|
|
||||||
{ "BlobElite", "TrophyBlobElite" },
|
|
||||||
{ "Leech", "TrophyLeech" },
|
{ "Leech", "TrophyLeech" },
|
||||||
{ "Wraith", "TrophyWraith" },
|
|
||||||
{ "Hatchling", "TrophyHatchling" },
|
{ "Hatchling", "TrophyHatchling" },
|
||||||
{ "StoneGolem", "TrophySGolem" },
|
|
||||||
{ "Lox", "TrophyLox" },
|
{ "Lox", "TrophyLox" },
|
||||||
{ "Fuling", "TrophyGoblin" },
|
{ "Fuling", "TrophyGoblin" },
|
||||||
{ "FulingShaman", "TrophyGoblinShaman" },
|
{ "FulingShaman", "TrophyGoblinShaman" },
|
||||||
|
|
@ -46,10 +37,6 @@ namespace RacesOfValheim
|
||||||
{ "Cultist", "TrophyCultist" },
|
{ "Cultist", "TrophyCultist" },
|
||||||
{ "Bat", "TrophyBat" },
|
{ "Bat", "TrophyBat" },
|
||||||
{ "Asksvin", "TrophyAsksvin" },
|
{ "Asksvin", "TrophyAsksvin" },
|
||||||
{ "Charred_Melee", "TrophyCharredMelee" },
|
|
||||||
{ "Charred_Archer", "TrophyCharredArcher" },
|
|
||||||
{ "Charred_Mage", "TrophyCharredMage" },
|
|
||||||
{ "Morgen", "TrophyMorgen" },
|
|
||||||
{ "Volture", "TrophyVolture" }
|
{ "Volture", "TrophyVolture" }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -124,21 +124,26 @@ namespace RacesOfValheim
|
||||||
GameObject trophyPrefab = PrefabManager.Cache.GetPrefab<ItemDrop>("TrophyGoblin")?.gameObject;
|
GameObject trophyPrefab = PrefabManager.Cache.GetPrefab<ItemDrop>("TrophyGoblin")?.gameObject;
|
||||||
if (trophyPrefab != null)
|
if (trophyPrefab != null)
|
||||||
{
|
{
|
||||||
// instantiateInWorldSpace = false per ereditare esattamente la trasformazione base
|
bool wasActive = trophyPrefab.activeSelf;
|
||||||
|
trophyPrefab.SetActive(false);
|
||||||
GameObject trophyVisual = UnityEngine.Object.Instantiate(trophyPrefab, headBone, false);
|
GameObject trophyVisual = UnityEngine.Object.Instantiate(trophyPrefab, headBone, false);
|
||||||
|
trophyPrefab.SetActive(wasActive);
|
||||||
|
|
||||||
trophyVisual.name = "FurlingHead_Trophy";
|
trophyVisual.name = "FurlingHead_Trophy";
|
||||||
|
|
||||||
// Rimuoviamo tutti gli script (HoverText, ZNetView, ItemDrop, ecc.) per evitare prompt a schermo
|
// Rimuoviamo tutti gli script (HoverText, ZNetView, ItemDrop, ecc.) per evitare prompt a schermo
|
||||||
foreach (var comp in trophyVisual.GetComponentsInChildren<MonoBehaviour>())
|
foreach (var comp in trophyVisual.GetComponentsInChildren<MonoBehaviour>())
|
||||||
{
|
{
|
||||||
UnityEngine.Object.Destroy(comp);
|
UnityEngine.Object.DestroyImmediate(comp);
|
||||||
}
|
}
|
||||||
if (trophyVisual.GetComponent<Rigidbody>() != null)
|
if (trophyVisual.GetComponent<Rigidbody>() != null)
|
||||||
UnityEngine.Object.Destroy(trophyVisual.GetComponent<Rigidbody>());
|
UnityEngine.Object.DestroyImmediate(trophyVisual.GetComponent<Rigidbody>());
|
||||||
foreach (var col in trophyVisual.GetComponentsInChildren<Collider>())
|
foreach (var col in trophyVisual.GetComponentsInChildren<Collider>())
|
||||||
{
|
{
|
||||||
UnityEngine.Object.Destroy(col);
|
UnityEngine.Object.DestroyImmediate(col);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
trophyVisual.SetActive(true);
|
||||||
// Valheim rig scales are huge (100).
|
// Valheim rig scales are huge (100).
|
||||||
// Spostiamo la testa leggermente in alto (asse Y = 0.0015) e 5cm indietro rispetto al centro (asse X positivo = 0.0005)
|
// Spostiamo la testa leggermente in alto (asse Y = 0.0015) e 5cm indietro rispetto al centro (asse X positivo = 0.0005)
|
||||||
trophyVisual.transform.localPosition = new Vector3(0.0005f, 0.0015f, 0f);
|
trophyVisual.transform.localPosition = new Vector3(0.0005f, 0.0015f, 0f);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue