Try to simplify versioning

master
aa6 2016-04-30 10:10:04 +03:00
parent 8fc95f5a28
commit 41375941fa
4 changed files with 7 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# Wadsprint [0.2.0] [minetest_wadsprint]
# Wadsprint [![Version](/util/minetest_wadsprint_version.png")] [minetest_wadsprint]
Minetest mod for sprinting with W, A and D buttons.
@ -20,4 +20,4 @@ Edit `config.lua` at the mod directory.
**Credits:**
Thanks to [GunshipPenguin](https://github.com/GunshipPenguin) and his [sprint mod](https://github.com/GunshipPenguin/sprint) for giving a good example of how sprint mod for minetest can be done.
Thanks to [GunshipPenguin](https://github.com/GunshipPenguin) and his [sprint mod](https://github.com/GunshipPenguin/sprint) for giving a good example of how sprint mod for minetest can be done.

1
VERSION Normal file
View File

@ -0,0 +1 @@
0.2.0

View File

@ -2,8 +2,8 @@
-- @link https://github.com/aa6/minetest_wadsprint
minetest_wadsprint =
{
version = "0.2.0"
players = {},
version = io.open(minetest.get_modpath(minetest.get_current_modname()).."/VERSION","r"):read("*all"),
}
dofile(minetest.get_modpath(minetest.get_current_modname()).."/config.lua")
dofile(minetest.get_modpath(minetest.get_current_modname()).."/init_hudbars.lua")
@ -26,6 +26,7 @@ end
function minetest_wadsprint.set_sprinting(player,is_sprinting)
if player.is_sprinting ~= is_sprinting then
print(minetest_wadsprint.version)
if player.is_sprinting ~= nil then
local physics = player.obj:get_physics_override()
if is_sprinting then

View File

@ -0,0 +1,2 @@
cat ../VERSION | convert -background none -density 196 -fill black -pointsize 21 -resample 72 -unsharp 0x.5 text:- -trim +repage -bordercolor white -border 3 minetest_wadsprint_version.png
exit 0