| 393 | } |
| 394 | |
| 395 | ObjectPtr 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 | |
| 407 | ObjectConfigPtr ObjectDatabase::readConfig(String const& path) { |
| 408 | try { |
no test coverage detected