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

Function getStagehandBrush

source/game/StarTilesetDatabase.cpp:136–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134 }
135
136 BrushConstPtr getStagehandBrush(String const& typeName, Tiled::Properties& properties) {
137 JsonObject brush;
138 brush["type"] = typeName;
139 brush["parameters"] = properties.opt<Json>("parameters").value(JsonObject{});
140 if (properties.contains("broadcastArea"))
141 brush["parameters"] = brush["parameters"].set("broadcastArea", properties.get<Json>("broadcastArea"));
142 if (typeName == "radiomessage" && properties.contains("radioMessage"))
143 brush["parameters"] = brush["parameters"].set("radioMessage", properties.get<Json>("radioMessage"));
144 return make_shared<const StagehandBrush>(brush);
145 }
146
147 BrushConstPtr getDungeonIdBrush(String const& dungeonId, Tiled::Properties&) {
148 return make_shared<const DungeonIdBrush>(maybeLexicalCast<DungeonId>(dungeonId).value(NoDungeonId));

Callers

nothing calls this directly

Calls 3

valueMethod · 0.45
containsMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected