worldbox-observer-mod/IdleSpectator/Events/Catalogs/EventCatalog.Trait.cs
2026-07-16 00:40:53 -05:00

169 lines
4.9 KiB
C#

using System;
using System.Collections.Generic;
namespace IdleSpectator;
/// <summary>Authored interest overlay for every live traits library asset.</summary>
public static partial class EventCatalog
{
public static class Trait
{
private static readonly Dictionary<string, DiscreteEventEntry> Entries =
new Dictionary<string, DiscreteEventEntry>(StringComparer.OrdinalIgnoreCase);
static Trait()
{
Add("zombie", 82f);
Add("wise", 42f);
Add("whirlwind", 82f);
Add("weightless", 42f);
Add("weak", 42f);
Add("veteran", 42f);
Add("venomous", 82f);
Add("unlucky", 42f);
Add("ugly", 42f);
Add("tumor_infection", 82f);
Add("tough", 42f);
Add("titan_lungs", 42f);
Add("tiny", 42f);
Add("thorns", 42f);
Add("thief", 42f);
Add("super_health", 42f);
Add("sunblessed", 42f);
Add("stupid", 42f);
Add("strong_minded", 42f);
Add("strong", 42f);
Add("soft_skin", 42f);
Add("slow", 42f);
Add("skin_burns", 42f);
Add("short_sighted", 42f);
Add("shiny", 42f);
Add("scar_of_divinity", 82f);
Add("savage", 82f);
Add("regeneration", 42f);
Add("pyromaniac", 82f);
Add("psychopath", 82f);
Add("poisonous", 82f);
Add("poison_immune", 42f);
Add("plague", 82f);
Add("peaceful", 42f);
Add("paranoid", 42f);
Add("pacifist", 42f);
Add("nightchild", 42f);
Add("mute", 42f);
Add("mush_spores", 82f);
Add("moonchild", 42f);
Add("miracle_born", 82f);
Add("miracle_bearer", 82f);
Add("miner", 42f);
Add("metamorphed", 42f);
Add("mega_heartbeat", 42f);
Add("mageslayer", 82f);
Add("madness", 82f);
Add("lustful", 42f);
Add("lucky", 42f);
Add("long_liver", 42f);
Add("light_lamp", 42f);
Add("kingslayer", 82f);
Add("infertile", 42f);
Add("infected", 82f);
Add("immune", 42f);
Add("immortal", 82f);
Add("hotheaded", 42f);
Add("honest", 42f);
Add("heliophobia", 42f);
Add("heart_of_wizard", 42f);
Add("healing_aura", 42f);
Add("hard_skin", 42f);
Add("greedy", 42f);
Add("golden_tooth", 42f);
Add("gluttonous", 42f);
Add("giant", 82f);
Add("genius", 42f);
Add("freeze_proof", 42f);
Add("fragile_health", 42f);
Add("flower_prints", 42f);
Add("flesh_eater", 82f);
Add("fire_proof", 42f);
Add("fire_blood", 82f);
Add("fertile", 42f);
Add("fat", 42f);
Add("fast", 42f);
Add("eyepatch", 42f);
Add("evil", 82f);
Add("energized", 42f);
Add("eagle_eyed", 42f);
Add("dragonslayer", 82f);
Add("dodge", 42f);
Add("desire_harp", 42f);
Add("desire_golden_egg", 42f);
Add("desire_computer", 42f);
Add("desire_alien_mold", 42f);
Add("deflect_projectile", 42f);
Add("deceitful", 42f);
Add("death_nuke", 82f);
Add("death_mark", 82f);
Add("death_bomb", 82f);
Add("dash", 42f);
Add("crippled", 42f);
Add("content", 42f);
Add("contagious", 82f);
Add("cold_aura", 82f);
Add("clumsy", 42f);
Add("clone", 42f);
Add("chosen_one", 82f);
Add("burning_feet", 82f);
Add("bubble_defense", 42f);
Add("boosted_vitality", 42f);
Add("bomberman", 82f);
Add("boat", 42f);
Add("bloodlust", 82f);
Add("block", 42f);
Add("blessed", 42f);
Add("battle_reflexes", 42f);
Add("backstep", 42f);
Add("attractive", 42f);
Add("arcane_reflexes", 42f);
Add("ambitious", 42f);
Add("agile", 42f);
Add("acid_touch", 82f);
Add("acid_proof", 42f);
Add("acid_blood", 42f);
}
private static void Add(string id, float strength)
{
Entries[id] = new DiscreteEventEntry
{
Id = id,
EventStrength = strength,
Category = "Trait",
CreatesInterest = true,
LabelTemplate = "Trait: {id} ({a})"
};
}
public static IEnumerable<string> AuthoredIds => Entries.Keys;
public static bool HasAuthored(string id) =>
!string.IsNullOrEmpty(id) && Entries.ContainsKey(id.Trim());
public static DiscreteEventEntry GetOrFallback(string id)
{
if (!string.IsNullOrEmpty(id) && Entries.TryGetValue(id.Trim(), out DiscreteEventEntry entry))
{
return entry;
}
string key = string.IsNullOrEmpty(id) ? "unknown" : id.Trim();
return new DiscreteEventEntry
{
Id = key,
EventStrength = 40f,
Category = "Trait",
LabelTemplate = "Trait: {id} ({a})",
IsFallback = true
};
}
}
}