mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 11:04:05 +09:00
still wip modularisation, game somehow boots
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package net.torvald.terrarum.modulebasegame.console
|
||||
|
||||
import net.torvald.terrarum.Terrarum
|
||||
import net.torvald.terrarum.console.ConsoleCommand
|
||||
import net.torvald.terrarum.console.Echo
|
||||
import net.torvald.terrarum.modulebasegame.Ingame
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2016-01-19.
|
||||
*/
|
||||
internal object ToggleNoClip : ConsoleCommand {
|
||||
override fun execute(args: Array<String>) {
|
||||
val status = (Terrarum.ingame!! as Ingame).player.isNoClip()
|
||||
|
||||
(Terrarum.ingame!! as Ingame).player.setNoClip(!status)
|
||||
Echo("Set no-clip status to " + (!status).toString())
|
||||
}
|
||||
|
||||
override fun printUsage() {
|
||||
Echo("toggle no-clip status of player")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user