diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-10-29 16:19:55 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-10-29 17:16:37 +0100 |
commit | 6cd8881f1b11c99f8e72735017e743c50094e922 (patch) | |
tree | 7f6726d2ed01fe39b78c4e2eb6cc4561c6e0db80 /src/game.cpp | |
parent | 93ad5ec32de124dfa0c054acfd1f2a378cb9ca75 (diff) | |
download | mana-6cd8881f1b11c99f8e72735017e743c50094e922.tar.gz mana-6cd8881f1b11c99f8e72735017e743c50094e922.tar.bz2 mana-6cd8881f1b11c99f8e72735017e743c50094e922.tar.xz mana-6cd8881f1b11c99f8e72735017e743c50094e922.zip |
Turned the PlayerRelation struct into an enum class
Less code to achieve the same thing (strong type and namespaced values).
The permissions related values have been moved to a PlayerPermissions
struct, which is also a bit less confusing.
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game.cpp b/src/game.cpp index c0624425..96935981 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -703,15 +703,15 @@ void Game::handleInput() case KeyboardConfig::KEY_TRADE: // Toggle accepting of incoming trade requests unsigned int deflt = player_relations.getDefault(); - if (deflt & PlayerRelation::TRADE) + if (deflt & PlayerPermissions::TRADE) { serverNotice(_("Ignoring incoming trade requests")); - deflt &= ~PlayerRelation::TRADE; + deflt &= ~PlayerPermissions::TRADE; } else { serverNotice(_("Accepting incoming trade requests")); - deflt |= PlayerRelation::TRADE; + deflt |= PlayerPermissions::TRADE; } player_relations.setDefault(deflt); |