Browse Source

Devcmd output cleanup

combat-2
MagicBot 9 months ago
parent
commit
d2cbfd491a
  1. 12
      src/engine/devcmd/cmds/SlotNpcCmd.java

12
src/engine/devcmd/cmds/SlotNpcCmd.java

@ -53,7 +53,7 @@ public class SlotNpcCmd extends AbstractDevCmd {
if (stringIndex == -1) if (stringIndex == -1)
return false; return false;
// Validate we have a corrent building group name // Validate we have a correct building group name
for (BuildingGroup group : BuildingGroup.values()) { for (BuildingGroup group : BuildingGroup.values()) {
if (group.name().equals(userInput[0].toUpperCase())) if (group.name().equals(userInput[0].toUpperCase()))
@ -114,8 +114,7 @@ public class SlotNpcCmd extends AbstractDevCmd {
if (!DbManager.ContractQueries.updateAllowedBuildings(contract, contract.getAllowedBuildings().toLong())) { if (!DbManager.ContractQueries.updateAllowedBuildings(contract, contract.getAllowedBuildings().toLong())) {
Logger.error("Failed to update Database for Contract Allowed buildings"); Logger.error("Failed to update Database for Contract Allowed buildings");
ChatManager.chatSystemError(pc, "Failed to update Database for Contract Allowed buildings. " + ChatManager.chatSystemError(pc, "Failed to update Database for Contract Allowed buildings. ");
"Contact A CCR, oh wait, you are a CCR. You're Fubared.");
return; return;
} }
@ -125,8 +124,7 @@ public class SlotNpcCmd extends AbstractDevCmd {
contract.getAllowedBuildings().remove(buildingGroup); contract.getAllowedBuildings().remove(buildingGroup);
if (!DbManager.ContractQueries.updateAllowedBuildings(contract, contract.getAllowedBuildings().toLong())) { if (!DbManager.ContractQueries.updateAllowedBuildings(contract, contract.getAllowedBuildings().toLong())) {
Logger.error("Failed to update Database for Contract Allowed buildings"); Logger.error("Failed to update Database for Contract Allowed buildings");
ChatManager.chatSystemError(pc, "Failed to update Database for Contract Allowed buildings. " + ChatManager.chatSystemError(pc, "Failed to update Database for Contract Allowed buildings. ");
"Contact A CCR, oh wait, you are a CCR. You're Fubared.");
return; return;
} }
@ -138,14 +136,14 @@ public class SlotNpcCmd extends AbstractDevCmd {
@Override @Override
protected String _getHelpString() { protected String _getHelpString() {
return "Sets a building slot on a targeted npc"; return "Toggles a building group on a targeted npc";
} }
// Class methods // Class methods
@Override @Override
protected String _getUsageString() { protected String _getUsageString() {
String usage = "/npcslot [BuildingType] on-off \n"; String usage = "/npcslot [BuildingGroup] on-off \n";
for (BuildingGroup group : BuildingGroup.values()) { for (BuildingGroup group : BuildingGroup.values()) {
usage += group.name() + ' '; usage += group.name() + ' ';

Loading…
Cancel
Save