disposable singletons to an array in loader; single float for both notification and tooltip

This commit is contained in:
minjaesong
2019-05-24 20:38:35 +09:00
parent d08aae5db0
commit 3f692da03c
13 changed files with 116 additions and 69 deletions

View File

@@ -2,7 +2,6 @@ package net.torvald.terrarum.modulebasegame.console
import net.torvald.terrarum.Terrarum
import net.torvald.terrarum.console.ConsoleCommand
import net.torvald.terrarum.langpack.Lang
import net.torvald.terrarum.modulebasegame.Ingame
/**
@@ -10,19 +9,14 @@ import net.torvald.terrarum.modulebasegame.Ingame
*/
internal object SetBulletin : ConsoleCommand {
override fun execute(args: Array<String>) {
send(Lang["ERROR_SAVE_CORRUPTED"], Lang["MENU_LABEL_CONTINUE_QUESTION"])
//send(Lang["ERROR_SAVE_CORRUPTED"], Lang["MENU_LABEL_CONTINUE_QUESTION"])
(Terrarum.ingame!! as Ingame).sendNotification(args.sliceArray(1..args.lastIndex))
println("sent notifinator")
}
override fun printUsage() {
}
/**
* Actually send notifinator
* @param message real message
*/
fun send(msg1: String, msg2: String? = null) {
(Terrarum.ingame!! as Ingame).sendNotification(msg1, msg2)
println("sent notifinator")
}
}