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

Method setBackgroundMaterial

source/game/StarWorldGeneration.cpp:234–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232}
233
234void DungeonGeneratorWorld::setBackgroundMaterial(Vec2I const& position, MaterialId material, MaterialHue hueshift, MaterialColorVariant colorVariant) {
235 if (ServerTile* tile = m_worldServer->modifyServerTile(position)) {
236 m_worldServer->modifyLiquid(position, EmptyLiquidId, 0);
237 tile->background = material;
238 tile->backgroundHueShift = hueshift;
239 tile->backgroundColorVariant = colorVariant;
240 tile->backgroundMod = NoModId;
241 tile->backgroundModHueShift = MaterialHue();
242 }
243}
244
245void DungeonGeneratorWorld::placeObject(Vec2I const& pos, String const& objectName, Star::Direction direction, Json const& parameters) {
246 m_worldServer->signalRegion(RectI::withSize(pos, {1, 1}));

Callers

nothing calls this directly

Calls 2

modifyServerTileMethod · 0.80
modifyLiquidMethod · 0.80

Tested by

no test coverage detected