mirror of
https://github.com/raeleus/Hashtag-DnD.git
synced 2025-07-06 05:30:28 -04:00
Fixed duplication of "the" in #take if the item has a capitalized "The" name.
This commit is contained in:
parent
23821d5436
commit
503794b6e4
1 changed files with 1 additions and 1 deletions
2
Input.js
2
Input.js
|
@ -1142,7 +1142,7 @@ function doTake(command) {
|
|||
if (item.quantity < 0) item.quantity = 1
|
||||
|
||||
var text = "\n"
|
||||
if (item.quantity == 1) text += `${character.name} ${commandName} the ${displayItemName}.\n`
|
||||
if (item.quantity == 1) text += `${character.name} ${commandName} ${displayItemName.toLowerCase().startsWith("the ") ? "" : "the "}${displayItemName}.\n`
|
||||
else text += `${character.name} ${commandName} ${item.quantity} ${displayItemName}.\n`
|
||||
|
||||
var index = character.inventory.findIndex((element) => element.name.toLowerCase() == item.name.toLowerCase())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue