Echo().execute(message) is now just Echo(message)

Former-commit-id: 851e141fc91b170190d6027f42f59906dda0f31f
Former-commit-id: 03dbb9da1788e1c50e84ae33d95f76194ad9a08d
This commit is contained in:
Song Minjae
2016-12-14 12:40:53 +09:00
parent 1dd156d172
commit 7078ecfed4
32 changed files with 127 additions and 121 deletions

View File

@@ -29,13 +29,13 @@ internal object Inventory : ConsoleCommand {
private fun listInventory() {
if (target.getTotalUniqueCount() == 0) {
Echo.execute("(inventory empty)")
Echo("(inventory empty)")
} else {
target.forEach { refId, amount ->
if (amount == 0) {
Error.execute("Unexpected zero-amounted item: ID $refId")
EchoError("Unexpected zero-amounted item: ID $refId")
}
Echo.execute("ID $refId${if (amount > 1) " ($amount)" else ""}")
Echo("ID $refId${if (amount > 1) " ($amount)" else ""}")
}
}
}
@@ -43,7 +43,7 @@ internal object Inventory : ConsoleCommand {
private fun setTarget(actorRefId: Int = Player.PLAYER_REF_ID) {
val actor = Terrarum.ingame.getActorByID(actorRefId)
if (actor !is Pocketed) {
Error.execute("Cannot edit inventory of incompatible actor: $actor")
EchoError("Cannot edit inventory of incompatible actor: $actor")
} else {
target = actor.inventory
}
@@ -58,8 +58,8 @@ internal object Inventory : ConsoleCommand {
}
override fun printUsage() {
Echo.execute("Usage: inventory command arguments")
Echo.execute("Available commands:")
Echo.execute("list | assign slot | add itemid [amount] | target [actorid]")
Echo("Usage: inventory command arguments")
Echo("Available commands:")
Echo("list | assign slot | add itemid [amount] | target [actorid]")
}
}