small fixes

This commit is contained in:
unknown 2021-10-10 14:01:11 -04:00
parent 41af49583c
commit 6743a4784d
3 changed files with 9 additions and 5 deletions

View File

@ -69,9 +69,10 @@ local function logic()
local bdata = minetest.get_biome_data(player:get_pos())
local bdef = minetest.registered_biomes[minetest.get_biome_name(bdata.biome)] or {}
if bs.players[pname] and bs.players[pname].id == bdata.biome then break end
if bdef._sky_data then
if bs.players[pname] and bs.players[pname].id == bdata.biome then
--do nothing
bs.players[pname].id = bdata.biome
elseif bdef._sky_data then
for k, _ in pairs(bs.defaults) do
if bdef._sky_data[k] == nil then bdef._sky_data[k] = {} end
end

View File

@ -59,6 +59,9 @@ minetest.register_entity("fl_trains:train_engine", {
if not player then return end
if player:get_player_control().up and speed_check(vel, 5) then
self.object:add_velocity(vector.multiply(dir, 0.2))
elseif player:get_player_control().down and speed_check(vel, 5) then
--track always looks engine forwards, fix me
self.object:add_velocity(vector.multiply(dir, -0.2))
end
end,
@ -104,5 +107,5 @@ minetest.register_craftitem("fl_trains:train_engine", {
end
end
end,
--groups = {not_in_creative_inventory = 1}
groups = {not_in_creative_inventory = 1}
})

View File

@ -5,7 +5,7 @@ minetest.register_node("fl_trains:straight_track", {
drawtype = "mesh",
mesh = "farlands_straight.obj",
tiles = {"farlands_rail.png", "farlands_ties.png"},
groups = {oddly_breakable_by_hand = 3},--, not_in_creative_inventory = 1},
groups = {oddly_breakable_by_hand = 3, not_in_creative_inventory = 1},
selection_box = {
type = "fixed",
fixed = {-0.5,-0.5,-0.5,0.5,-0.475,0.5},