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

Method netLoadObject

source/game/StarObjectDatabase.cpp:383–389  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

381}
382
383ObjectPtr ObjectDatabase::netLoadObject(ByteArray const& netStore, NetCompatibilityRules rules) const {
384 DataStreamBuffer ds(netStore);
385 ds.setStreamCompatibilityVersion(rules);
386 String name = ds.read<String>();
387 Json parameters = ds.read<Json>();
388 return createObject(name, parameters);
389}
390
391bool ObjectDatabase::canPlaceObject(World const* world, Vec2I const& position, String const& objectName) const {
392 return getConfig(objectName)->findValidOrientation(world, position) != NPos;

Callers 1

netLoadEntityMethod · 0.45

Calls 1

Tested by

no test coverage detected