Skip to content

Adding event flags help #3948

Closed Answered by sora10pls
alvv-z asked this question in Q&A
Aug 1, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

public static class NamedEventTypeUtil
{
public static NamedEventType GetEventType(ReadOnlySpan<char> s) => s.Length == 0 ? None : GetEventType(s[0]);
public static NamedEventType GetEventType(char c) => c switch
{
'h' => HiddenItem,
'm' => Misc,
'f' => FlyToggle,
't' => TrainerToggle,
's' => StoryProgress,
'a' => Achievement,
'+' => Statistic,
'*' => UsefulFeature,
'e' => EventEncounter,
'g' => GiftAvailable,
'r' => Rebattle,
_ => None,
};
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@alvv-z
Comment options

Answer selected by alvv-z
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #3947 on August 01, 2023 15:10.