Browse Source

Rebuild of ./createitem

combat-2
MagicBot 8 months ago
parent
commit
d999d00755
  1. 7
      src/engine/devcmd/cmds/CreateItemCmd.java

7
src/engine/devcmd/cmds/CreateItemCmd.java

@ -40,9 +40,10 @@ public class CreateItemCmd extends AbstractDevCmd {
int templateID = Integer.parseInt(words[0]); int templateID = Integer.parseInt(words[0]);
ItemTemplate template = ItemTemplate.templates.get(templateID); ItemTemplate template = ItemTemplate.templates.get(templateID);
if (template == null) if (template == null) {
ChatManager.chatSystemInfo(playerCharacter, "No such template found.");
return; return;
}
int size = 1; int size = 1;
if (words.length == 2) if (words.length == 2)
@ -51,7 +52,7 @@ public class CreateItemCmd extends AbstractDevCmd {
for (int i = 0; i < size; i++) { for (int i = 0; i < size; i++) {
if (!playerCharacter.charItemManager.hasRoomInventory(template.item_wt)) { if (!playerCharacter.charItemManager.hasRoomInventory(template.item_wt)) {
ChatManager.chatSystemInfo(playerCharacter, "You can not carry any more of that item."); ChatManager.chatSystemInfo(playerCharacter, "You are encumbered!.");
break; break;
} }

Loading…
Cancel
Save