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

Method createForPlacement

source/game/StarObjectDatabase.cpp:395–405  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

393}
394
395ObjectPtr ObjectDatabase::createForPlacement(World const* world, String const& objectName, Vec2I const& position,
396 Direction direction, Json const& parameters) const {
397 if (!canPlaceObject(world, position, objectName))
398 return {};
399
400 ObjectPtr object = createObject(objectName, parameters);
401 object->setTilePosition(world->geometry().xwrap(position));
402 object->setDirection(direction);
403
404 return object;
405}
406
407ObjectConfigPtr ObjectDatabase::readConfig(String const& path) {
408 try {

Callers 8

placeObjectMethod · 0.80
placeBiomeItemsMethod · 0.80
prepareSectorMethod · 0.80
reapplyBiomeMethod · 0.80
createTreasureChestMethod · 0.80
setCentralStructureMethod · 0.80
placeInWorldMethod · 0.80
placeObjectMethod · 0.80

Calls 4

setTilePositionMethod · 0.45
xwrapMethod · 0.45
geometryMethod · 0.45
setDirectionMethod · 0.45

Tested by

no test coverage detected