MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / WriteToScript

Method WriteToScript

engine/Poseidon/UI/Map/UIMapExtDisplay.cpp:1205–1221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1203 return ExtractValue(name, params, *ctx->args, ctx->required);
1204}
1205
1206void EditorObjectType::WriteToScript(QOStream& out, const Arguments& args) const
1207{
1208 CreateContext ctx;
1209 ctx.args = &args;
1210
1211 RString varName = args.Get("VARIABLE_NAME");
1212 WriteLine(out, Format("/*" PARSING_COMMENT "_OBJECT %s %s {*/", (const char*)_name, (const char*)varName));
1213 for (int i = 0; i < _create.Size(); i++)
1214 {
1215 ctx.some = false;
1216 ctx.required = false;
1217 RString line = ParseLine(_create[i], _params, CreateOnRequired, CreateOnValue, CreateOnExpression, &ctx);
1218 if (ctx.required || !ctx.some)
1219 WriteLine(out, line);
1220 }
1221 WriteLine(out, "/*" PARSING_COMMENT "}*/");
1222}
1223
1224// }

Callers 4

WriteTriggerFunction · 0.80
WriteVehicleFunction · 0.80
WriteUnitFunction · 0.80
ExportMissionFunction · 0.80

Calls 5

WriteLineFunction · 0.85
ParseLineFunction · 0.85
FormatFunction · 0.50
GetMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected