From 3b7d2def6dbd74acc4c65fc29643de0decb05a11 Mon Sep 17 00:00:00 2001 From: Jason Jackson Date: Thu, 17 Oct 2024 06:34:21 -0400 Subject: [PATCH] Added hover over special to show values. --- README.md | 2 +- .../Components/Dwellers/Special.razor | 195 +++++++++++++++--- 2 files changed, 166 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 7524650..35b1162 100644 --- a/README.md +++ b/README.md @@ -7,4 +7,4 @@ This is not intended as a cheat, as such I do not have intentions of leveling up Currently this is in the beginning stages, however, it can be accessed via the [Shelter Viewer](https://jake1164.github.io/ShelterViewer/) page. -I am using the decryptor from http://fossd.bitballoon.com/ and inspiration from [text](https://github.com/rakion99/shelter-editor). \ No newline at end of file +I am using the decryptor from http://fossd.bitballoon.com/ and inspiration from [shelter-editor](https://github.com/rakion99/shelter-editor). \ No newline at end of file diff --git a/ShelterViewer/Components/Dwellers/Special.razor b/ShelterViewer/Components/Dwellers/Special.razor index 7d28e35..8c4d585 100644 --- a/ShelterViewer/Components/Dwellers/Special.razor +++ b/ShelterViewer/Components/Dwellers/Special.razor @@ -1,40 +1,175 @@ @using Models - - - - S - - - - P - - - - E - - - - C - - - - I - - - - A - - - - L - - + + + + + + S + + + + P + + + + E + + + + C + + + + I + + + + A + + + + L + + + + + + @for(int i = 1; i < Stats.stats.Length; i++) + { + var index = i; + var value = Stats.stats[index].value; + var mod = Stats.stats[index].mod; + + @Enum.GetName(typeof(SpecialStats), index)!.ToString().First() + + + @Enum.GetName(typeof(SpecialStats), index)!.ToUpper() + + + @Stats.stats[index].value + @if (@Stats.stats[index].mod > 0) + { + +@Stats.stats[index].mod + } + + + } + + + + @code { [Parameter, EditorRequired] public Stats Stats { get; set; } = null!; + enum SpecialStats + { + Strength = 1, + Perception = 2, + Endurance = 3, + Charisma = 4, + Intelligence = 5, + Agility = 6, + Luck = 7 + } }