mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-15 04:54:05 +09:00
quickslot works, new event for actor "actorValueChanged"
- "unpacking" fresh new tool would un-register quickslot desig. - priority issue on "equipped by quickslot change" and "equipped by inventory UI"
This commit is contained in:
@@ -7,7 +7,7 @@ import java.util.*
|
||||
/**
|
||||
* Created by minjaesong on 2016-12-29.
|
||||
*/
|
||||
object AVTracker : ConsoleCommand {
|
||||
internal object AVTracker : ConsoleCommand {
|
||||
private val jPanelInstances = ArrayList<ActorValueTracker>()
|
||||
|
||||
override fun execute(args: Array<String>) {
|
||||
|
||||
@@ -7,7 +7,7 @@ import java.util.*
|
||||
/**
|
||||
* Created by minjaesong on 2016-12-29.
|
||||
*/
|
||||
object ActorsList : ConsoleCommand {
|
||||
internal object ActorsList : ConsoleCommand {
|
||||
private val jPanelInstances = ArrayList<ActorsLister>()
|
||||
|
||||
override fun execute(args: Array<String>) {
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package net.torvald.terrarum.console
|
||||
|
||||
import net.torvald.terrarum.Terrarum
|
||||
|
||||
import java.util.HashMap
|
||||
|
||||
/**
|
||||
@@ -9,7 +7,7 @@ import java.util.HashMap
|
||||
*/
|
||||
object CommandDict {
|
||||
|
||||
internal var dict: HashMap<String, ConsoleCommand> = hashMapOf(
|
||||
internal val dict: HashMap<String, ConsoleCommand> = hashMapOf(
|
||||
Pair("echo", Echo),
|
||||
Pair("error", EchoError),
|
||||
Pair("setav", SetAV),
|
||||
@@ -60,4 +58,8 @@ object CommandDict {
|
||||
operator fun get(commandName: String): ConsoleCommand {
|
||||
return dict[commandName]!!
|
||||
}
|
||||
|
||||
fun add(name: String, obj: ConsoleCommand) {
|
||||
dict[name] = obj
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.util.regex.Pattern
|
||||
/**
|
||||
* Created by minjaesong on 16-01-15.
|
||||
*/
|
||||
object CommandInterpreter {
|
||||
internal object CommandInterpreter {
|
||||
|
||||
private val commandsNoAuth = arrayOf(
|
||||
"auth",
|
||||
@@ -31,7 +31,7 @@ object CommandInterpreter {
|
||||
private val ccY = GameFontBase.colToCode["y"]
|
||||
private val ccR = GameFontBase.colToCode["r"]
|
||||
|
||||
fun execute(command: String) {
|
||||
internal fun execute(command: String) {
|
||||
val cmd: Array<CommandInput?> = parse(command)
|
||||
|
||||
val error = Error()
|
||||
|
||||
@@ -11,7 +11,6 @@ interface ConsoleCommand {
|
||||
*
|
||||
* e.g. in ```setav mass 74```, zeroth args will be ```setav```.
|
||||
*/
|
||||
@Throws(Exception::class)
|
||||
fun execute(args: Array<String>)
|
||||
|
||||
fun printUsage()
|
||||
|
||||
@@ -8,7 +8,7 @@ import javax.swing.JFrame
|
||||
* Created by SKYHi14 on 2017-02-05.
|
||||
*/
|
||||
|
||||
object JavaIMTest : ConsoleCommand {
|
||||
internal object JavaIMTest : ConsoleCommand {
|
||||
|
||||
override fun execute(args: Array<String>) {
|
||||
IMStringReader(
|
||||
|
||||
@@ -6,7 +6,7 @@ import net.torvald.terrarum.langpack.Lang
|
||||
/**
|
||||
* Created by SKYHi14 on 2017-01-31.
|
||||
*/
|
||||
object KillActor : ConsoleCommand {
|
||||
internal object KillActor : ConsoleCommand {
|
||||
override fun execute(args: Array<String>) {
|
||||
if (args.size == 2) {
|
||||
try {
|
||||
|
||||
@@ -6,7 +6,7 @@ import net.torvald.terrarum.gameactors.ActorWithPhysics
|
||||
/**
|
||||
* Created by minjaesong on 2017-01-20.
|
||||
*/
|
||||
object SetScale : ConsoleCommand {
|
||||
internal object SetScale : ConsoleCommand {
|
||||
override fun execute(args: Array<String>) {
|
||||
if (args.size == 2 || args.size == 3) {
|
||||
try {
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.io.FileInputStream
|
||||
/**
|
||||
* Created by minjaesong on 2017-01-14.
|
||||
*/
|
||||
object SpawnTapestry : ConsoleCommand {
|
||||
internal object SpawnTapestry : ConsoleCommand {
|
||||
override fun execute(args: Array<String>) {
|
||||
if (args.size < 2) {
|
||||
printUsage()
|
||||
|
||||
@@ -8,7 +8,7 @@ import net.torvald.terrarum.gamecontroller.mouseY
|
||||
/**
|
||||
* Created by minjaesong on 2016-12-17.
|
||||
*/
|
||||
object SpawnTikiTorch : ConsoleCommand {
|
||||
internal object SpawnTikiTorch : ConsoleCommand {
|
||||
override fun execute(args: Array<String>) {
|
||||
val torch = FixtureTikiTorch()
|
||||
torch.setPosition(Terrarum.appgc.mouseX, Terrarum.appgc.mouseY)
|
||||
|
||||
Reference in New Issue
Block a user