warvulture
This commit is contained in:
parent
8580d65a56
commit
0aa1dc4dc8
19 changed files with 2432 additions and 24 deletions
|
|
@ -295,6 +295,17 @@ namespace RacesOfValheim
|
|||
// Trol/TrolTotemStore.cs, which is generic and is deliberately NOT copied here.
|
||||
Trader trader = prefab.GetComponent<Trader>() ?? prefab.AddComponent<Trader>();
|
||||
trader.m_name = PieceDisplayName;
|
||||
|
||||
// DISABLED ON PURPOSE, and it is the line that keeps the log clean. Trader was written for
|
||||
// Haldor, who is a creature with an animator and a LookAt rig: Trader.Update() calls
|
||||
// m_animator.SetBool("Stand", ...) and m_lookAt.ResetTarget() with no null check on every
|
||||
// frame no player is nearby, and Trader.Start() calls InvokeRepeating("RandomTalk", 0, 0)
|
||||
// on a component nobody authored in the editor. On a table both of those are null, so the
|
||||
// bank threw a NullReferenceException every frame from the moment it was built. A disabled
|
||||
// component runs neither, and StoreGui needs neither: Show() only reads fields off the
|
||||
// Trader and asks it for its item list, and GetComponent finds it disabled just the same.
|
||||
// This is the same fix SvermHiveStore.Mount already carries for the Hive Market.
|
||||
trader.enabled = false;
|
||||
trader.m_items = new List<Trader.TradeItem>();
|
||||
trader.m_useItems = new List<Trader.TraderUseItem>();
|
||||
trader.m_randomTalk = new List<string>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue