diff --git a/blueprintcompiler/language/values.py b/blueprintcompiler/language/values.py index 5556d99..ce87178 100644 --- a/blueprintcompiler/language/values.py +++ b/blueprintcompiler/language/values.py @@ -212,12 +212,12 @@ class Flag(AstNode): return self.tokens["value"] @property - def value(self) -> T.Optional[int]: + def value(self) -> T.Optional[str]: type = self.context[ValueTypeCtx].value_type if not isinstance(type, Enumeration): return None elif member := type.members.get(self.name): - return member.value + return member.nick else: return None diff --git a/tests/samples/flags.ui b/tests/samples/flags.ui index 2f0a26e..44eb2c4 100644 --- a/tests/samples/flags.ui +++ b/tests/samples/flags.ui @@ -7,7 +7,7 @@ corresponding .blp file and regenerate this file with blueprint-compiler. - 1|4 + is-service|handles-open 1