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

Method filterMappedObjects

source/game/StarPlayerUniverseMap.cpp:177–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175}
176
177void PlayerUniverseMap::filterMappedObjects(CelestialCoordinate const& system, List<Uuid> const& allowed) {
178 auto& universeMap = m_universeMaps[*m_serverUuid];
179 if (auto systemMap = universeMap.systems.ptr(system.location())) {
180 auto& objects = systemMap->mappedObjects;
181 for (auto& uuid : objects.keys()) {
182 if (!allowed.contains(uuid))
183 objects.remove(uuid);
184 }
185 }
186}
187
188void PlayerUniverseMap::setServerUuid(Maybe<Uuid> serverUuid) {
189 m_serverUuid = std::move(serverUuid);

Callers 2

reloadPlayerMethod · 0.80
handleIncomingPacketMethod · 0.80

Calls 5

ptrMethod · 0.45
locationMethod · 0.45
keysMethod · 0.45
containsMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected