MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / createTreasure

Method createTreasure

source/game/scripting/StarRootLuaBindings.cpp:427–431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

425}
426
427JsonArray LuaBindings::RootCallbacks::createTreasure(
428 Root* root, String const& pool, float level, Maybe<uint64_t> seed) {
429 auto treasure = root->treasureDatabase()->createTreasure(pool, level, seed.value(Random::randu64()));
430 return treasure.transformed([](ItemPtr const& item) { return item->descriptor().toJson(); });
431}
432
433Maybe<String> LuaBindings::RootCallbacks::materialMiningSound(
434 Root* root, String const& materialName, Maybe<String> const& modName) {

Callers 2

harvestMethod · 0.45
spawnTreasureMethod · 0.45

Calls 6

randu64Function · 0.85
treasureDatabaseMethod · 0.80
valueMethod · 0.45
transformedMethod · 0.45
toJsonMethod · 0.45
descriptorMethod · 0.45

Tested by

no test coverage detected