| 992 | } |
| 993 | |
| 994 | Maybe<EntityId> WorldCallbacks::spawnStagehand( |
| 995 | World* world, Vec2F const& spawnPosition, String const& typeName, Json const& overrides) { |
| 996 | auto stagehandDatabase = Root::singleton().stagehandDatabase(); |
| 997 | try { |
| 998 | auto stagehand = stagehandDatabase->createStagehand(typeName, overrides); |
| 999 | stagehand->setPosition(spawnPosition); |
| 1000 | world->addEntity(stagehand); |
| 1001 | return stagehand->inWorld() ? stagehand->entityId() : Maybe<EntityId>(); |
| 1002 | } catch (StarException const& exception) { |
| 1003 | Logger::warn( |
| 1004 | "Could not spawn Stagehand of type '{}', exception caught: {}", typeName, outputException(exception, false)); |
| 1005 | return {}; |
| 1006 | } |
| 1007 | } |
| 1008 | |
| 1009 | Maybe<EntityId> WorldCallbacks::spawnProjectile(World* world, |
| 1010 | String const& projectileType, |
nothing calls this directly
no test coverage detected