MCPcopy Create free account
hub / github.com/demoth/jake2 / printOrSet

Method printOrSet

qcommon/src/main/java/jake2/qcommon/exec/Cvar.java:309–326  ·  view source on GitHub ↗

Handles variable inspection and changing from the console.

(List<String> args)

Source from the content-addressed store, hash-verified

307 * Handles variable inspection and changing from the console.
308 */
309 boolean printOrSet(List<String> args) {
310 if (args.isEmpty())
311 return false;
312
313 // check variables
314 cvar_t v = FindVar(args.get(0));
315 if (v == null)
316 return false;
317
318 // perform a variable print or set
319 if (args.size() == 1) {
320 Com.Printf("\"" + v.name + "\" is \"" + v.string + "\"\n");
321 return true;
322 }
323
324 Set(v.name, args.get(1));
325 return true;
326 }
327
328 private String BitInfo(int flags) {
329 String info = "";

Callers 1

ExecuteStringMethod · 0.80

Calls 5

FindVarMethod · 0.95
PrintfMethod · 0.95
SetMethod · 0.95
sizeMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected