fix: simplifica cmdCheat infinite lives, elimina getActionName mort
This commit is contained in:
@@ -836,13 +836,12 @@ static auto cmdCheat(const std::vector<std::string>& args) -> std::string { //
|
||||
if (args.size() < 2 || args[1] != "LIVES") { return "usage: cheat infinite lives [on|off]"; }
|
||||
auto& cheat = Options::cheats.infinite_lives;
|
||||
using State = Options::Cheat::State;
|
||||
const std::vector<std::string> REST(args.begin() + 2, args.end());
|
||||
if (REST.empty()) {
|
||||
if (args.size() == 2) {
|
||||
cheat = (cheat == State::ENABLED) ? State::DISABLED : State::ENABLED;
|
||||
} else if (REST[0] == "ON") {
|
||||
} else if (args[2] == "ON") {
|
||||
if (cheat == State::ENABLED) { return "Infinite lives already ON"; }
|
||||
cheat = State::ENABLED;
|
||||
} else if (REST[0] == "OFF") {
|
||||
} else if (args[2] == "OFF") {
|
||||
if (cheat == State::DISABLED) { return "Infinite lives already OFF"; }
|
||||
cheat = State::DISABLED;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user