| 1030 | } |
| 1031 | |
| 1032 | Maybe<EntityId> WorldCallbacks::spawnVehicle( |
| 1033 | World* world, String const& vehicleName, Vec2F const& pos, Json const& extraConfig) { |
| 1034 | auto vehicleDatabase = Root::singleton().vehicleDatabase(); |
| 1035 | auto vehicle = vehicleDatabase->create(vehicleName, extraConfig); |
| 1036 | vehicle->setPosition(pos); |
| 1037 | world->addEntity(vehicle); |
| 1038 | if (vehicle->inWorld()) |
| 1039 | return vehicle->entityId(); |
| 1040 | return {}; |
| 1041 | } |
| 1042 | |
| 1043 | double WorldCallbacks::time(World* world) { |
| 1044 | return world->epochTime(); |
nothing calls this directly
no test coverage detected