| 413 | } |
| 414 | |
| 415 | JsonArray LuaBindings::RootCallbacks::monsterPortrait(Root* root, String const& typeName, Maybe<JsonObject> const& parameters) { |
| 416 | auto monsterDatabase = root->monsterDatabase(); |
| 417 | auto seed = 0; // use a static seed to utilize caching |
| 418 | auto monsterVariant = monsterDatabase->monsterVariant(typeName, seed, parameters.value(JsonObject{})); |
| 419 | auto drawables = monsterDatabase->monsterPortrait(monsterVariant); |
| 420 | return drawables.transformed(mem_fn(&Drawable::toJson)); |
| 421 | } |
| 422 | |
| 423 | bool LuaBindings::RootCallbacks::isTreasurePool(Root* root, String const& pool) { |
| 424 | return root->treasureDatabase()->isTreasurePool(pool); |
nothing calls this directly
no test coverage detected