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

Method createItem

source/game/scripting/StarRootLuaBindings.cpp:365–368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

363}
364
365Json LuaBindings::RootCallbacks::createItem(Root* root, Json const& descriptor, Maybe<float> const& level, Maybe<uint64_t> const& seed) {
366 auto item = root->itemDatabase()->item(ItemDescriptor(descriptor), level, seed);
367 return item->descriptor().toJson();
368}
369
370Json LuaBindings::RootCallbacks::tenantConfig(Root* root, String const& tenantName) {
371 return root->tenantDatabase()->getTenant(tenantName)->config;

Callers

nothing calls this directly

Calls 5

ItemDescriptorClass · 0.85
itemDatabaseMethod · 0.80
itemMethod · 0.45
toJsonMethod · 0.45
descriptorMethod · 0.45

Tested by

no test coverage detected