forked from LizzyFleckenstein03/Memeclone
Merge branch 'master' into master
This commit is contained in:
commit
83ade6fadd
|
@ -214,7 +214,7 @@ function awards.unlock(name, award)
|
|||
|
||||
-- Get award
|
||||
minetest.log("action", name.." has gotten award "..award)
|
||||
minetest.chat_send_all(name .. " has made the archievement " .. minetest.colorize("#51EF4E", "[" .. (awdef.title or award) .. "]"))
|
||||
minetest.chat_send_all(S("@1 has made the achievement @2", name, minetest.colorize("#51EF4E", "[" .. (awdef.title or award) .. "]")))
|
||||
data.unlocked[award] = award
|
||||
awards.save()
|
||||
|
||||
|
|
|
@ -59,3 +59,4 @@ Invalid action.=Непредусмотренное действие.
|
|||
Player is not online.=Игрок не подключён.
|
||||
Done.=Сделано.
|
||||
Achievement “@1” does not exist.=Достижения “@1” не существует.
|
||||
@1 has made the achievement @2=@1 получил(а) достижение @2
|
||||
|
|
|
@ -59,3 +59,4 @@ Invalid action.=
|
|||
Player is not online.=
|
||||
Done.=
|
||||
Achievement “@1” does not exist.=
|
||||
@1 has made the achievement @2=
|
||||
|
|
|
@ -264,7 +264,8 @@ mcl_structures.generate_boulder = function(pos, rotation, pr)
|
|||
end
|
||||
|
||||
local newpos = {x=pos.x,y=pos.y-1,z=pos.z}
|
||||
return mcl_structures.place_schematic(newpos, path)
|
||||
|
||||
return minetest.place_schematic(newpos, path) -- don't serialize schematics for registered biome decorations, for MT 5.4.0, https://github.com/minetest/minetest/issues/10995
|
||||
end
|
||||
|
||||
local function hut_placement_callback(p1, p2, size, orientation, pr)
|
||||
|
@ -278,19 +279,19 @@ local function hut_placement_callback(p1, p2, size, orientation, pr)
|
|||
end
|
||||
end
|
||||
|
||||
mcl_structures.generate_witch_hut = function(pos, rotation)
|
||||
mcl_structures.generate_witch_hut = function(pos, rotation, pr)
|
||||
local path = minetest.get_modpath("mcl_structures").."/schematics/mcl_structures_witch_hut.mts"
|
||||
mcl_structures.place_schematic(pos, path, rotation, nil, true, nil, hut_placement_callback, pr)
|
||||
end
|
||||
|
||||
mcl_structures.generate_ice_spike_small = function(pos)
|
||||
local path = minetest.get_modpath("mcl_structures").."/schematics/mcl_structures_ice_spike_small.mts"
|
||||
return mcl_structures.place_schematic(pos, path, "random", nil, false)
|
||||
return minetest.place_schematic(pos, path, "random", nil, false) -- don't serialize schematics for registered biome decorations, for MT 5.4.0
|
||||
end
|
||||
|
||||
mcl_structures.generate_ice_spike_large = function(pos)
|
||||
local path = minetest.get_modpath("mcl_structures").."/schematics/mcl_structures_ice_spike_large.mts"
|
||||
return mcl_structures.place_schematic(pos, path, "random", nil, false)
|
||||
return minetest.place_schematic(pos, path, "random", nil, false) -- don't serialize schematics for registered biome decorations, for MT 5.4.0
|
||||
end
|
||||
|
||||
mcl_structures.generate_fossil = function(pos, rotation, pr)
|
||||
|
@ -517,39 +518,56 @@ mcl_structures.register_structures = function(structure_type, structures)
|
|||
registered_structures[structure_type] = structures
|
||||
end
|
||||
|
||||
local function dir_to_rotation(dir)
|
||||
local ax, az = math.abs(dir.x), math.abs(dir.z)
|
||||
if ax > az then
|
||||
if dir.x < 0 then
|
||||
return "270"
|
||||
end
|
||||
return "90"
|
||||
end
|
||||
if dir.z < 0 then
|
||||
return "180"
|
||||
end
|
||||
return "0"
|
||||
end
|
||||
|
||||
-- Debug command
|
||||
minetest.register_chatcommand("spawnstruct", {
|
||||
params = "desert_temple | desert_well | igloo | witch_hut | boulder | ice_spike_small | ice_spike_large | fossil | end_exit_portal | end_portal_shrine",
|
||||
description = S("Generate a pre-defined structure near your position."),
|
||||
privs = {debug = true},
|
||||
func = function(name, param)
|
||||
local pos = minetest.get_player_by_name(name):get_pos()
|
||||
if not pos then
|
||||
return
|
||||
end
|
||||
local player = minetest.get_player_by_name(name)
|
||||
if not player then return end
|
||||
local pos = player:get_pos()
|
||||
if not pos then return end
|
||||
pos = vector.round(pos)
|
||||
local dir = minetest.yaw_to_dir(player:get_look_horizontal())
|
||||
local rot = dir_to_rotation(dir)
|
||||
local pr = PseudoRandom(pos.x+pos.y+pos.z)
|
||||
local errord = false
|
||||
local message = S("Structure placed.")
|
||||
if param == "desert_temple" then
|
||||
mcl_structures.generate_desert_temple(pos)
|
||||
mcl_structures.generate_desert_temple(pos, rot, pr)
|
||||
elseif param == "desert_well" then
|
||||
mcl_structures.generate_desert_well(pos)
|
||||
mcl_structures.generate_desert_well(pos, rot, pr)
|
||||
elseif param == "igloo" then
|
||||
mcl_structures.generate_igloo(pos)
|
||||
mcl_structures.generate_igloo(pos, rot, pr)
|
||||
elseif param == "witch_hut" then
|
||||
mcl_structures.generate_witch_hut(pos)
|
||||
mcl_structures.generate_witch_hut(pos, rot, pr)
|
||||
elseif param == "boulder" then
|
||||
mcl_structures.generate_boulder(pos)
|
||||
mcl_structures.generate_boulder(pos, rot, pr)
|
||||
elseif param == "fossil" then
|
||||
mcl_structures.generate_fossil(pos)
|
||||
mcl_structures.generate_fossil(pos, rot, pr)
|
||||
elseif param == "ice_spike_small" then
|
||||
mcl_structures.generate_ice_spike_small(pos)
|
||||
mcl_structures.generate_ice_spike_small(pos, rot, pr)
|
||||
elseif param == "ice_spike_large" then
|
||||
mcl_structures.generate_ice_spike_large(pos)
|
||||
mcl_structures.generate_ice_spike_large(pos, rot, pr)
|
||||
elseif param == "end_exit_portal" then
|
||||
mcl_structures.generate_end_exit_portal(pos)
|
||||
mcl_structures.generate_end_exit_portal(pos, rot, pr)
|
||||
elseif param == "end_portal_shrine" then
|
||||
mcl_structures.generate_end_portal_shrine(pos)
|
||||
mcl_structures.generate_end_portal_shrine(pos, rot, pr)
|
||||
elseif param == "" then
|
||||
message = S("Error: No structure type given. Please use “/spawnstruct <type>”.")
|
||||
errord = true
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue