mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-18 11:54:59 -04:00
about command
This commit is contained in:
parent
7904cc3c1d
commit
7e495e9ba5
@ -274,7 +274,7 @@ interface ProfileManager<T : Profile> {
|
|||||||
} finally {
|
} finally {
|
||||||
profile.reloading = false
|
profile.reloading = false
|
||||||
}
|
}
|
||||||
Log.log(LogMessageType.PROFILES, LogLevels.INFO) { "Reloaded profile: $profileName ($namespace);" }
|
Log.log(LogMessageType.PROFILES, LogLevels.INFO) { "Reloaded profile: $profileName ($namespace)" }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* Minosoft
|
||||||
|
* Copyright (C) 2020-2022 Moritz Zwerger
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package de.bixilon.minosoft.terminal.commands
|
||||||
|
|
||||||
|
import de.bixilon.minosoft.commands.nodes.LiteralNode
|
||||||
|
import de.bixilon.minosoft.commands.stack.print.PrintTarget
|
||||||
|
import de.bixilon.minosoft.properties.MinosoftProperties
|
||||||
|
|
||||||
|
object AboutCommand : Command {
|
||||||
|
override var node: LiteralNode = LiteralNode("about", setOf("version"), executor = { it.print.printAbout() })
|
||||||
|
|
||||||
|
private fun PrintTarget.printAbout() {
|
||||||
|
print("-------------- Minosoft --------------")
|
||||||
|
print("This is minosoft version §e${MinosoftProperties.general.name}")
|
||||||
|
val git = MinosoftProperties.git
|
||||||
|
if (git == null) {
|
||||||
|
print("Sadly git version information is not available.")
|
||||||
|
} else {
|
||||||
|
print("This version was built from §e${git.branch}§r on top of §e${git.commit}")
|
||||||
|
}
|
||||||
|
|
||||||
|
print("This software was mainly created by §eMoritz Zwerger§r (https://bixilon.de)")
|
||||||
|
print("and is licensed under the §eGPL3§r license.")
|
||||||
|
|
||||||
|
print("The source code is available under https://gitlab.bixilon.de/bixilon/minosoft.")
|
||||||
|
print("Feel free to §econtribute§r, §efork§r and §esubmit§r a pull request!")
|
||||||
|
}
|
||||||
|
}
|
@ -27,5 +27,7 @@ object Commands {
|
|||||||
PingCommand, ConnectCommand,
|
PingCommand, ConnectCommand,
|
||||||
|
|
||||||
CrashCommand, DumpCommand,
|
CrashCommand, DumpCommand,
|
||||||
|
|
||||||
|
AboutCommand,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ import de.bixilon.minosoft.commands.nodes.LiteralNode
|
|||||||
object ReloadCommand : RenderingCommand {
|
object ReloadCommand : RenderingCommand {
|
||||||
override var node = LiteralNode("reload", setOf("rl"))
|
override var node = LiteralNode("reload", setOf("rl"))
|
||||||
.addChild(LiteralNode("shaders", executor = {
|
.addChild(LiteralNode("shaders", executor = {
|
||||||
it.connection.rendering!!.context.system.reloadShaders()
|
it.connection.rendering?.context?.system?.reloadShaders() ?: throw IllegalStateException("Rendering is not loaded!")
|
||||||
it.connection.util.sendDebugMessage("Shaders reloaded!")
|
it.connection.util.sendDebugMessage("Shaders reloaded!")
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user