feat(races): Skadi hollow chain, plus the pending Dvergar and Fenrir ones
Three per-race item chains had accumulated uncommitted. They land together because FactionMerchantCatalog.cs carries hunks from all three and cannot be split without interactive staging. Skadi (new this session): - SkadiNokkel - "Skadis Nokkel", a StaffSkeleton clone recoloured to ice, stripped of its eitr and health costs and of the skeleton summon, opening an ice-blue portal to a troll cave the player claims as their own. Crafted at the forge after Moder from a 1500-coin Greater Frost Heart, a DragonTear and a TrophySkeleton. - SkadiFrostHeart - the bought leg of that recipe, sold by the Cultist bench. - SkadiHollow / SkadiHollowPortal - claims one existing TrollCave02 in the Black Forest, half a world radius out and south of the equator, and opens a linked local portal pair to it. - RaceCaveBuilding - Skadi and Trol may build inside any troll cave. Two facts worth keeping, both paid for the hard way: - a troll cave counts as a DUNGEON, so the flag that refuses a piece there is the per-piece Piece.m_allowedInDungeons, not the per-location Location.m_noBuild. Player.m_placementStatus names the exact refusal reason and is now logged. - Object.DestroyImmediate is forbidden inside an animation event callback, and a staff cast runs in one - it fails silently there. Also carried in, from earlier sessions and unverified in game: - Dvergar contract bank and barrel (DvergarBanco*, DvergarBotte*) - Fenrir Ulvsblod trough (FenrirMangiatoia*) - the Wolf -> Ulv merchant bench move, so tameable wolves stop answering the E key with a shop window Status: compiles clean with no new warnings. The Skadi chain has NOT been confirmed working in game - the most recent fix to the troll cave detection is still untested. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
4976ef66aa
commit
5c5b8c34d2
20 changed files with 3784 additions and 17 deletions
|
|
@ -141,7 +141,28 @@ namespace RacesOfValheim
|
|||
{
|
||||
if (__instance != Player.m_localPlayer || __0 == null) return true;
|
||||
|
||||
if (!HollowAllowsPiece(__instance, __0)) return false;
|
||||
|
||||
return PieceDensityLimit.Allow(__instance, Utils.GetPrefabName(__0.gameObject), __1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// "You may build in your hollow, but nothing takes root there." Rides along on this prefix
|
||||
/// rather than adding a second one, which is the whole reason this class exists.
|
||||
///
|
||||
/// Worth knowing that the refusal is about the MESSAGE, not about making the impossible
|
||||
/// impossible: a Plant needs cultivated ground and a matching biome (Plant.m_needCultivated-
|
||||
/// Ground, Plant.m_biome), and five kilometres above the sea there is no terrain to cultivate
|
||||
/// and no biome to match, so a seed would have failed anyway - with a vanilla error that says
|
||||
/// nothing useful about why.
|
||||
/// </summary>
|
||||
private static bool HollowAllowsPiece(Player player, Piece piece)
|
||||
{
|
||||
if (!SkadiHollow.IsInside(player)) return true;
|
||||
if (piece.GetComponentInChildren<Plant>(true) == null) return true;
|
||||
|
||||
player.Message(MessageHud.MessageType.Center, "Nothing takes root here.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue