fix(C-01): review fixes — missing keys, duplicate, GPS shock i18n
- Add missing keephead_enabled/disabled translation keys (BUG-001) - Remove duplicate gui.tiedup.close key at line 403 (RISK-004) - Fix GPS shock: use null addon + send GPS_ZONE_VIOLATION separately (RISK-001)
This commit is contained in:
@@ -56,7 +56,8 @@ public class PlayerShockCollar {
|
||||
* Triggers a visual and auditory shock effect.
|
||||
* Damage is applied (shock can kill).
|
||||
*
|
||||
* @param messageAddon Optional message addon for HUD (e.g., GPS violation)
|
||||
* @param messageAddon Optional message addon for HUD (e.g., GPS violation).
|
||||
* For translatable messages, prefer calling shockKidnapped() then sending the message separately.
|
||||
* @param damage Shock damage amount
|
||||
*/
|
||||
public void shockKidnapped(@Nullable String messageAddon, float damage) {
|
||||
@@ -100,7 +101,7 @@ public class PlayerShockCollar {
|
||||
|
||||
// HUD Message via SystemMessageManager
|
||||
if (messageAddon != null) {
|
||||
// Custom message with addon (e.g., GPS violation)
|
||||
// Legacy addon path: append literal text to SLAVE_SHOCK message
|
||||
MutableComponent msg = Component.translatable(
|
||||
SystemMessageManager.getTranslationKey(MessageCategory.SLAVE_SHOCK)
|
||||
).append(Component.literal(messageAddon));
|
||||
@@ -197,9 +198,11 @@ public class PlayerShockCollar {
|
||||
|
||||
if (shouldShockGPS && gpsStackCopy != null) {
|
||||
this.shockKidnapped(
|
||||
" Return back to your allowed area!",
|
||||
null,
|
||||
GameConstants.DEFAULT_SHOCK_DAMAGE
|
||||
);
|
||||
// GPS-specific message (replaces hardcoded " Return back to your allowed area!")
|
||||
SystemMessageManager.sendToPlayer(host.getPlayer(), MessageCategory.GPS_ZONE_VIOLATION);
|
||||
warnOwnersGPSViolation(gpsStackCopy);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -282,6 +282,8 @@
|
||||
"command.tiedup.clothes.unknown_layer": "Unknown layer: %s",
|
||||
"command.tiedup.clothes.layer_visible": "Wearer's %s layer is now visible",
|
||||
"command.tiedup.clothes.layer_hidden": "Wearer's %s layer is now hidden",
|
||||
"command.tiedup.clothes.keephead_enabled": "Keep head mode enabled",
|
||||
"command.tiedup.clothes.keephead_disabled": "Keep head mode disabled",
|
||||
|
||||
"gui.tiedup.command_wand.title": "Command Wand",
|
||||
"gui.tiedup.command_wand.personality": "Personality",
|
||||
@@ -400,7 +402,6 @@
|
||||
|
||||
"gui.tiedup.slave_trader": "Slave Trader",
|
||||
"gui.tiedup.buy": "Buy",
|
||||
"gui.tiedup.close": "Close",
|
||||
"gui.tiedup.no_captives_available": "No captives available for sale",
|
||||
|
||||
"gui.tiedup.cell_manager": "Cell Manager",
|
||||
|
||||
Reference in New Issue
Block a user