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

Function parseSurfaceBrush

source/game/StarDungeonGenerator.cpp:216–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214 }
215
216 BrushConstPtr parseSurfaceBrush(Json const& brush) {
217 Json settings = Json::ofType(Json::Type::Object);
218 if (brush.size() > 1)
219 settings = brush.get(1);
220 return make_shared<const SurfaceBrush>(settings.optInt("variant"), settings.optString("mod"));
221 }
222
223 BrushConstPtr parseSurfaceBackgroundBrush(Json const& brush) {
224 Json settings = Json::ofType(Json::Type::Object);

Callers 1

parseMethod · 0.85

Calls 4

optIntMethod · 0.80
optStringMethod · 0.80
sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected