MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / parseAppType

Method parseAppType

plugins/dm.difficulty/Setting.cpp:86–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86void Setting::parseAppType() {
87 appType = EAssign;
88
89 if (!argument.empty())
90 {
91 // Check for ignore argument
92 if (argument == game::current::getValue<std::string>(GKEY_APPTYPE_IGNORE))
93 {
94 appType = EIgnore;
95 argument.clear(); // clear the argument
96 }
97 // Check for special modifiers
98 else if (argument[0] == '+')
99 {
100 appType = EAdd;
101 // Remove the first character
102 argument = argument.substr(1);
103 }
104 else if (argument[0] == '*')
105 {
106 appType = EMultiply;
107 // Remove the first character
108 argument = argument.substr(1);
109 }
110 else if (argument[0] == '-')
111 {
112 appType = EAdd;
113 // Leave the "-" sign, it will be the sign of the parsed int
114 }
115 }
116}
117
118// Initialise the static member
119int Setting::_highestId = 0;

Callers 2

parseFromEntityDefMethod · 0.80
parseFromMapEntityMethod · 0.80

Calls 2

emptyMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected