Merge pull request 'Added MCL_Modpack_Ver' (#9) from mcl_modpak_version into master

Reviewed-on: MineClone2/MineClone2-Plus#9
This commit is contained in:
Michieal 2023-02-07 11:27:20 +00:00
commit 3e208f673a
5 changed files with 46 additions and 0 deletions

34
mcl_modpack_ver/init.lua Normal file
View File

@ -0,0 +1,34 @@
---
--- Generated by EmmyLua
--- Created by Michieal.
--- DateTime: 02/07/2023 6:20 AM
--- Copyright (C) 2023, Michieal. See License.txt
--- Last Update Time: 02/07/23 4:40 AM
--- See License.txt and Additional Terms.txt for licensing.
--- If you did not receive a copy of the license with this content package, please see:
--- https://www.gnu.org/licenses/gpl-3.0.en.html and https://creativecommons.org/licenses/by-sa/4.0/
local modname = minetest.get_current_modname()
local modpath = minetest.get_modpath(modname)
local S = minetest.get_translator(modname)
-- register normal user access to debug levels 1 and 0.
minetest.register_chatcommand("modpackver", {
description = S("Display Mineclone 2 Plus Modpack version."),
func = function(name, params)
local conf = Settings(modpath .. "/ver.conf")
local version = conf:get("version")
local game_info ={}
game_info.title = "Mineclone 2 Plus"
if version == nil or version == "" then
version = "0.1.0 running on Minetest 5.6.1 or unsupported."
end
game_info.version = version
minetest.chat_send_player(name, string.format("Version: %s - %s", game_info.title, game_info.version))
return true
end
})

View File

@ -0,0 +1,3 @@
# textdomain: mcl_modpack_ver
Display Mineclone 2 Plus Modpack version.=

View File

@ -0,0 +1,3 @@
# textdomain: mcl_modpack_ver
Display Mineclone 2 Plus Modpack version.=

5
mcl_modpack_ver/mod.conf Normal file
View File

@ -0,0 +1,5 @@
title = mcl_modpack_ver
name = mcl_modpack_ver
description = Prints MCL2 Plus modpack version information; /modpackver command.
depends = mcl_init
author = Michieal

1
mcl_modpack_ver/ver.conf Normal file
View File

@ -0,0 +1 @@
version = 0.1.0-INDEV