Skip to content

Commit 2c581e4

Browse files
committed
todo
1 parent 5133f57 commit 2c581e4

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

TODO.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ Controlling non-RoN mobs
3434

3535
Bugfixes
3636
--------
37-
37+
[🟡] Can no longer send resources to a non-RTS ally
3838

3939

4040
Quality of Life
4141
---------------
42-
42+
[🟡] Updated /rts-help list
4343

4444
Balancing
4545
---------

src/main/java/com/solegendary/reignofnether/player/PlayerClientEvents.java

+2
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ public static void onRegisterCommand(RegisterClientCommandsEvent evt) {
113113
MC.player.sendSystemMessage(Component.translatable("commands.reignofnether.lock", "/rts-lock enable/disable"));
114114
MC.player.sendSystemMessage(Component.translatable("commands.reignofnether.ally", "/ally"));
115115
MC.player.sendSystemMessage(Component.translatable("commands.reignofnether.disband", "/disband"));
116+
MC.player.sendSystemMessage(Component.translatable("commands.reignofnether.send_resources", "/sendfood|wood|ore <playername> <amount>"));
117+
MC.player.sendSystemMessage(Component.translatable("commands.reignofnether.camera", "/rts-camera"));
116118
}
117119
return 1;
118120
}));

src/main/java/com/solegendary/reignofnether/resources/ResourcesServerEvents.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -330,9 +330,12 @@ public static int trySendingResources(CommandContext<CommandSourceStack> context
330330
if (sendingPlayerName.equals(receivingPlayerName)) {
331331
PlayerServerEvents.sendMessageToPlayer(sendingPlayerName, "server.resources.reignofnether.sending_to_self");
332332
return 0;
333-
} else if (!AlliancesServerEvents.isAllied(sendingPlayerName, receivingPlayerName)) {
333+
} else if (!PlayerServerEvents.isRTSPlayer(receivingPlayerName)) {
334334
PlayerServerEvents.sendMessageToPlayer(sendingPlayerName, "server.resources.reignofnether.not_allies");
335335
return 0;
336+
} else if (!AlliancesServerEvents.isAllied(sendingPlayerName, receivingPlayerName)) {
337+
PlayerServerEvents.sendMessageToPlayer(sendingPlayerName, "server.resources.reignofnether.not_rts_player");
338+
return 0;
336339
} else if (!canAfford(sendingPlayerName, resourceName, amount)) {
337340
ResourcesClientboundPacket.warnInsufficientResources(sendingPlayerName,
338341
resourceName == ResourceName.FOOD,

src/main/resources/assets/reignofnether/lang/en_us.json

+3
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,8 @@
468468
"commands.reignofnether.lock": "%s - Prevent all players from joining the RTS match",
469469
"commands.reignofnether.ally": "%s - Send an ally request to another player",
470470
"commands.reignofnether.disband": "%s - Disband an alliance with another player",
471+
"commands.reignofnether.send_resources": "%s - Send resources to an allied RTS player",
472+
"commands.reignofnether.camera": "%s - Toggle RTS camera",
471473
"commands.reignofnether.gamerule.do_log_falling": "Tree logs fall when cut",
472474
"commands.reignofnether.gamerule.neutral_aggro": "Auto-attack neutral units/buildings",
473475
"commands.reignofnether.gamerule.max_population": "Highest possible population limit",
@@ -646,6 +648,7 @@
646648
"server.resources.reignofnether.sent_ore": "You gave %d ore to %d!",
647649
"server.resources.reignofnether.received_ore": "You received %d ore from %d!",
648650
"server.resources.reignofnether.not_allies": "You can only send resources to allies",
651+
"server.resources.reignofnether.not_rts_player": "That player isn't an RTS player",
649652
"server.resources.reignofnether.sending_to_self": "You can't send resources to yourself",
650653

651654
"research.reignofnether.upgrade_completed": "Upgrade completed: %s",

0 commit comments

Comments
 (0)