feat(trol): skin and hair colour pickers in Trol - Appearance
Two Color entries, Skin Color and Hair Color (hair and beard), defaulting to the old peacock blue and golden blonde so no Trol changes on update. Each Trol publishes its choice on its own ZDO and every client paints that player with it; a Trol on an older build publishes nothing and shows the defaults. The menu preview, with no ZDO, reads the local config. The section is kept local by ConfigSync. README: New in block, Trol features line and a 1.5.10 changelog entry.
This commit is contained in:
parent
bb1ca57924
commit
65b488b5dc
4 changed files with 56 additions and 9 deletions
|
|
@ -59,8 +59,23 @@ namespace RacesOfValheim
|
|||
// ─── Farming ───────────────────────────────────────────────────────────
|
||||
public static ConfigEntry<float> UnarmedFarmingDamageBonusPerState;
|
||||
|
||||
// ─── Appearance ────────────────────────────────────────────────────────
|
||||
public static ConfigEntry<Color> SkinColor;
|
||||
public static ConfigEntry<Color> HairColor;
|
||||
|
||||
// The colours every Trol wore before these became settings. Also what a Trol on an older
|
||||
// build of the mod shows as, since that build publishes no colour of its own.
|
||||
public static readonly Color DefaultSkinColor = new Color(0.1f, 0.6f, 0.7f, 1f);
|
||||
public static readonly Color DefaultHairColor = new Color(0.9f, 0.8f, 0.4f, 1f);
|
||||
|
||||
public static void Bind(ConfigFile config)
|
||||
{
|
||||
const string appearance = "Trol - Appearance";
|
||||
SkinColor = config.Bind(appearance, "Skin Color", DefaultSkinColor,
|
||||
new ConfigDescription("Your Trol's skin. Other players see it too. The game multiplies it with the skin texture, so it comes out a little darker than the swatch. For the look of Valheim's own trolls try 7FA8C9."));
|
||||
HairColor = config.Bind(appearance, "Hair Color", DefaultHairColor,
|
||||
new ConfigDescription("Your Trol's hair and beard. Other players see it too."));
|
||||
|
||||
const string keybinds = "Trol - Keybinds";
|
||||
ThrowRockKey = config.Bind(keybinds, "Throw Rock", new KeyboardShortcut(KeyCode.G),
|
||||
new ConfigDescription("Throws a rock (or the log you're holding), tier 3+."));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue