Merge remote-tracking branch 'BenLubar/knowledge-scholar-category-flag' into develop
commit
700cb893ef
@ -0,0 +1,13 @@
|
|||||||
|
df::enums::dfhack_knowledge_scholar_flag::dfhack_knowledge_scholar_flag value() const
|
||||||
|
{
|
||||||
|
int32_t value = category * 32;
|
||||||
|
for (int32_t i = 0; i < 32; i++)
|
||||||
|
{
|
||||||
|
if (flags & (1 << i))
|
||||||
|
{
|
||||||
|
value += i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return df::enums::dfhack_knowledge_scholar_flag::dfhack_knowledge_scholar_flag(value);
|
||||||
|
}
|
Loading…
Reference in New Issue