Regnum 2 1.1.5 upload

Game-5.4.x
Der1248 2020-05-06 23:44:31 +02:00
parent abb0fb8df9
commit 447ebe2266
10 changed files with 57 additions and 12 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -5,11 +5,15 @@ ach3.get_formspec = function(player, pos)
return
end
local player_inv = player:get_inventory()
player_inv:set_size("year", 1)
player_inv:set_size("year", 2)
local year = player_inv:get_stack("year", 1):get_count()
local year2 = player_inv:get_stack("year", 2):get_count()
local d = 0
if year == 1 then
d = d+1
end
if year2 == 1 then
d = d+1
end
formspec= "size[10.5,11.3]"
.."background[10.5,11.3;1,1;gui_formbg.png;true]"
@ -17,9 +21,11 @@ ach3.get_formspec = function(player, pos)
.."bgcolor[#080808BB;true]"
.."button[0,0;2,0.5;ach;Back]"
.."button[2,0;2,0.5;main;Main]"
.."label[0.8,1.1;one year Trophy]"
.."label[5.5,0;"..d.."/1]"
.."label[0.8,1.1;One year Trophy]"
.."label[0.8,1.9;Two years Trophy]"
.."label[5.5,0;"..d.."/2]"
.."image[0,1;0.8,0.8;tutorial_"..year..".png]"
.."image[0,1.8;0.8,0.8;tutorial_"..year2..".png]"
return formspec
end
minetest.register_on_joinplayer(function(player)
@ -35,9 +41,12 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
end
if fields.achc then
local player_inv = player:get_inventory()
player_inv:set_size("year", 1)
player_inv:set_size("year", 2)
if player:get_inventory():contains_item("main", "tutorial:trophy_year1") then
player_inv:set_stack("year", 1,"tutorial:dirt")
end
if player:get_inventory():contains_item("main", "tutorial:trophy_year2") then
player_inv:set_stack("year", 2,"tutorial:dirt")
end
inventory_plus.set_inventory_formspec(player, ach3.get_formspec(player))
end

View File

@ -6,7 +6,7 @@ minetest.register_on_joinplayer(function(player)
offset = {x=0, y=10},
alignment = {x=1, y=0},
number = 0xFFFFFF ,
text = "For Minetest : 5.1.0",
text = "For Minetest : 5.1.x",
})
player:hud_add({
hud_elem_type = "text",
@ -14,7 +14,7 @@ minetest.register_on_joinplayer(function(player)
offset = {x=0, y=30},
alignment = {x=1, y=0},
number = 0xFFFFFF ,
text = "Game Version : 1.1.4",
text = "Game Version : 1.1.5",
})
end)
@ -31,10 +31,43 @@ dofile(minetest.get_modpath("tutorial").."/other/mummy.lua")
dofile(minetest.get_modpath("tutorial").."/other/regnum.lua")
--v.0.1.0+
minetest.register_node("tutorial:trophy_year2", {
description = "Two years Regnum 2!!",
tiles = {
"tutorial_trophy_year2.png"
},
groups = { snappy=3 },
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.125, -0.5, -0.125, 0.1875, -0.4375, 0.1875}, -- NodeBox1
{-0.0625, -0.4375, -0.0625, 0.125, -0.375, 0.125}, -- NodeBox2
{-0.02, -0.375, -0.02, 0.0825, -0.1875, 0.0825}, -- NodeBox3
{-0.0625, -0.1875, -0.0625, 0.125, -0.125, 0.125}, -- NodeBox4
{-0.125, -0.1875, -0.0625, -0.0625, 0.125, 0.125}, -- NodeBox5
{0.125, -0.1875, -0.0625, 0.1875, 0.125, 0.125}, -- NodeBox6
{-0.125, -0.1875, 0.125, 0.1875, 0.125, 0.1875}, -- NodeBox7
{-0.125, -0.1875, -0.125, 0.1875, 0.125, -0.0625}, -- NodeBox8
{-0.0625, -0.25, -0.0625, 0.125, -0.1875, 0.125}, -- NodeBox9
{0.1875, 0.05, 0, 0.23, 0.0925, 0.0625}, -- NodeBox10
{0.1875, -0.15, 0, 0.23, -0.11, 0.0625}, -- NodeBox11
{0.23, -0.15, 0, 0.2725, 0.0925, 0.0625}, -- NodeBox12
{-0.1675, -0.15, 0, -0.125, -0.11, 0.0625}, -- NodeBox13
{-0.1675, 0.05, 0, -0.125, 0.0925, 0.0625}, -- NodeBox14
{-0.21, -0.15, 0, -0.1675, 0.0925, 0.0625}, -- NodeBox15
}
},
selection_box = {
type = "fixed",
fixed = { -0.21, -0.5, -0.125, 0.2725, 0.125, 0.1875 }
}
})
minetest.register_node("tutorial:trophy_year1", {
description = "One year Regnum 2!!",
tiles = {
"moreores_mithril_block.png"
"tutorial_trophy_year1.png"
},
groups = { snappy=3 },
drawtype = "nodebox",
@ -292,6 +325,14 @@ minetest.register_globalstep(function(dtime)
if timer > 0.5 then
local players = minetest.get_connected_players()
for _,player in ipairs(players) do
local player_inv = player:get_inventory()
player_inv:set_size("year", 2)
if player_inv:room_for_item("main", "tutorial:trophy_year2") and player_inv:get_stack("year", 2):get_count() == 0 then
player_inv:add_item("main", "tutorial:trophy_year2")
player_inv:set_stack("year", 2, "default:dirt")
end
local stack = player:get_inventory():get_stack("heart", 1)
player:set_attribute("hpnum", player:get_hp())
if stack:get_name() == "tutorial:heart" then
@ -2175,11 +2216,6 @@ minetest.register_on_joinplayer(function(player)
player:set_physics_override(override_table)
local player_inv = player:get_inventory()
player_inv:set_stack("crtime", 1, nil)
--player_inv:set_size("year", 1)
--if player_inv:room_for_item("main", "tutorial:trophy_year1") and player_inv:get_stack("year", 1):get_count() == 0 then
-- player_inv:add_item("main", "tutorial:trophy_year1")
-- player_inv:set_stack("year", 1, "default:dirt")
--end
end)
local crafting6 = {}
crafting6.get_formspec = function(player, pos)

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 B