Skip to content

Commit

Permalink
Fix Value for any other value than Int enum
Browse files Browse the repository at this point in the history
  • Loading branch information
louis1706 committed Nov 17, 2024
1 parent 56542e1 commit 1c0798e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 29 deletions.
56 changes: 28 additions & 28 deletions EXILED/docs/articles/SCPSLRessources/NW_Documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2915,10 +2915,10 @@ Last Update (13.5.0.1)

```
[0] = LowRange
[257] = MediumRange
[514] = HighRange
[771] = UltraRange
[255] = RadioDisabled
[1] = MediumRange
[2] = HighRange
[3] = UltraRange
[-1] = RadioDisabled
```

</details>
Expand Down Expand Up @@ -3062,30 +3062,30 @@ Last Update (13.5.0.1)

```
[0] = Scp173
[257] = ClassD
[514] = Spectator
[771] = Scp106
[1028] = NtfSpecialist
[1285] = Scp049
[1542] = Scientist
[1799] = Scp079
[2056] = ChaosConscript
[2313] = Scp096
[2570] = Scp0492
[2827] = NtfSergeant
[3084] = NtfCaptain
[3341] = NtfPrivate
[3598] = Tutorial
[3855] = FacilityGuard
[4112] = Scp939
[4369] = CustomRole
[4626] = ChaosRifleman
[4883] = ChaosMarauder
[5140] = ChaosRepressor
[5397] = Overwatch
[5654] = Filmmaker
[5911] = Scp3114
[255] = None
[1] = ClassD
[2] = Spectator
[3] = Scp106
[4] = NtfSpecialist
[5] = Scp049
[6] = Scientist
[7] = Scp079
[8] = ChaosConscript
[9] = Scp096
[10] = Scp0492
[11] = NtfSergeant
[12] = NtfCaptain
[13] = NtfPrivate
[14] = Tutorial
[15] = FacilityGuard
[16] = Scp939
[17] = CustomRole
[18] = ChaosRifleman
[19] = ChaosMarauder
[20] = ChaosRepressor
[21] = Overwatch
[22] = Filmmaker
[23] = Scp3114
[-1] = None
```

</details>
Expand Down
3 changes: 2 additions & 1 deletion EXILED/docs/articles/SCPSLRessources/NW_Documentation.tt
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,15 @@ try
{
if (type.IsEnum && !type.IsGenericType)
{
Type underlyingIntegralType = Enum.GetUnderlyingType(type);
WriteLine($"- [{type.Name}](#{type.Name.ToLower()})");
response += $"\n### {type.Name}\n\n";
response += $"<details><summary><b>{type.FullName}</b></summary>\n\n";
response += $"```\n";

foreach (var value in Enum.GetValues(type))
{
response += $" [{value.GetHashCode()}] = {value.ToString()}\n";
response += $" [{Convert.ToInt64(value)}] = {value.ToString()}\n";
}
response += "```\n\n</details>\n";
}
Expand Down

0 comments on commit 1c0798e

Please sign in to comment.