mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-06-28 06:11:47 +02:00
Removed all whitespaces (using new script)
This commit is contained in:
@ -572,14 +572,14 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
if not minetest.get_modpath("technic") then
|
||||
if not minetest.get_modpath("technic") then
|
||||
minetest.register_node( ":technic:granite", {
|
||||
description = "Granite",
|
||||
tiles = { "technic_granite.png" },
|
||||
is_ground_content = true,
|
||||
groups = {cracky=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "technic:granite 9",
|
||||
|
@ -1,6 +1,6 @@
|
||||
local shapes = {
|
||||
{ { x = {0, 1, 0, 1}, y = {0, 0, 1, 1} } },
|
||||
|
||||
|
||||
{ { x = {1, 1, 1, 1}, y = {0, 1, 2, 3} },
|
||||
{ x = {0, 1, 2, 3}, y = {1, 1, 1, 1} } },
|
||||
|
||||
@ -70,7 +70,7 @@ end
|
||||
local function step(pos, fields)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local t = minetest.deserialize(meta:get_string("tetris"))
|
||||
|
||||
|
||||
local function new_game(pos)
|
||||
local nex = math.random(7)
|
||||
|
||||
@ -81,7 +81,7 @@ local function step(pos, fields)
|
||||
score = 0,
|
||||
cur = math.random(7),
|
||||
nex = nex,
|
||||
x=4, y=0, rot=1
|
||||
x=4, y=0, rot=1
|
||||
}
|
||||
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
@ -99,7 +99,7 @@ local function step(pos, fields)
|
||||
i*sizey+boardy, semi,
|
||||
size, comma, size, semi,
|
||||
colors[tile[2]], close }
|
||||
|
||||
|
||||
ins = ins + 1
|
||||
scr[ins] = concat(tmp)
|
||||
end
|
||||
@ -138,9 +138,9 @@ local function step(pos, fields)
|
||||
|
||||
for i=1,4 do
|
||||
local cx, cy = d.x[i]+x, d.y[i]+y
|
||||
|
||||
|
||||
if cx < 0 or cx > 9 or cy < 0 or cy > 19 then
|
||||
return false
|
||||
return false
|
||||
end
|
||||
|
||||
for _, tile in pairs(t.board[ cy ] or {}) do
|
||||
@ -157,7 +157,7 @@ local function step(pos, fields)
|
||||
end
|
||||
|
||||
local function tick()
|
||||
if stuck() then
|
||||
if stuck() then
|
||||
if t.y <= 0 then
|
||||
return false end
|
||||
add()
|
||||
@ -170,7 +170,7 @@ local function step(pos, fields)
|
||||
t.y = t.y + 1
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
local function move(dx, dy)
|
||||
local newx, newy = t.x+dx, t.y+dy
|
||||
@ -225,10 +225,10 @@ local function step(pos, fields)
|
||||
end
|
||||
|
||||
if t then
|
||||
local scr = { formsize, background,
|
||||
local scr = { formsize, background,
|
||||
t.boardstring, t.previewstring,
|
||||
draw_shape(t.cur, t.x, t.y, t.rot, boardx, boardy),
|
||||
"label[3.8,0.1;Next...]label[3.8,2.7;Score: ",
|
||||
"label[3.8,0.1;Next...]label[3.8,2.7;Score: ",
|
||||
t.score, close, buttons }
|
||||
|
||||
|
||||
|
@ -37,7 +37,7 @@ local function start_smoke(pos, node, clicker, chimney)
|
||||
s_handle = minetest.sound_play("fire_small", {
|
||||
pos = pos,
|
||||
max_hear_distance = 5,
|
||||
loop = true
|
||||
loop = true
|
||||
})
|
||||
this_spawner_meta:set_int("smoky", id)
|
||||
this_spawner_meta:set_int("sound", s_handle)
|
||||
@ -81,7 +81,7 @@ for _, f in ipairs(flame_types) do
|
||||
light_source = 14,
|
||||
waving = 1,
|
||||
tiles = {
|
||||
{name=f.."_fire_animated.png", animation={type="vertical_frames",
|
||||
{name=f.."_fire_animated.png", animation={type="vertical_frames",
|
||||
aspect_w=16, aspect_h=16, length=1.5}},
|
||||
},
|
||||
on_rightclick = function (pos, node, clicker)
|
||||
@ -111,7 +111,7 @@ minetest.register_node("fake_fire:fancy_fire", {
|
||||
damage_per_second = 4,
|
||||
on_rotate = screwdriver.rotate_simple,
|
||||
tiles = {
|
||||
{name="fake_fire_animated.png",
|
||||
{name="fake_fire_animated.png",
|
||||
animation={type='vertical_frames', aspect_w=16, aspect_h=16, length=1}}, {name='fake_fire_logs.png'}},
|
||||
on_rightclick = function (pos, node, clicker)
|
||||
start_smoke(pos, node, clicker)
|
||||
@ -169,7 +169,7 @@ for _, m in ipairs(materials) do
|
||||
stop_smoke(pos)
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = 'fake_fire:chimney_top_'..m,
|
||||
|
@ -7,7 +7,7 @@ local toilet_sbox = {
|
||||
|
||||
local toilet_cbox = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
fixed = {
|
||||
{-6/16, -8/16, -8/16, 6/16, 1/16, 8/16 },
|
||||
{-6/16, -8/16, 4/16, 6/16, 9/16, 8/16 }
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ local bed_sbox = {
|
||||
|
||||
local bed_cbox = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
fixed = {
|
||||
{ -0.5, -0.5, -0.5, 0.5, -0.05, 1.5 },
|
||||
{ -0.5, -0.5, 1.44, 0.5, 0.5, 1.5 },
|
||||
{ -0.5, -0.5, -0.5, 0.5, 0.18, -0.44 },
|
||||
@ -33,7 +33,7 @@ local kbed_sbox = {
|
||||
|
||||
local kbed_cbox = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
fixed = {
|
||||
{ -0.5, -0.5, -0.5, 1.5, -0.05, 1.5 },
|
||||
{ -0.5, -0.5, 1.44, 1.5, 0.5, 1.5 },
|
||||
{ -0.5, -0.5, -0.5, 1.5, 0.18, -0.44 },
|
||||
|
@ -137,7 +137,7 @@ local door_model_list = {
|
||||
tiles = {
|
||||
"homedecor_door_exterior_fancy.png",
|
||||
"homedecor_door_exterior_fancy_insert.png"
|
||||
},
|
||||
},
|
||||
usealpha = true
|
||||
},
|
||||
|
||||
|
@ -52,7 +52,7 @@ local kc_cbox = {
|
||||
|
||||
local ac_cbox = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0, 0.5 },
|
||||
{-0.5, -0.5, 0.4, 0.5, 0.5, 0.5 }
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ local wl_cbox = {
|
||||
homedecor.register("wall_lamp", {
|
||||
description = S("Wall Lamp"),
|
||||
mesh = "homedecor_wall_lamp.obj",
|
||||
tiles = {"homedecor_generic_metal_black.png^[brighten", "homedecor_generic_wood_luxury.png^[colorize:#000000:30",
|
||||
tiles = {"homedecor_generic_metal_black.png^[brighten", "homedecor_generic_wood_luxury.png^[colorize:#000000:30",
|
||||
"homedecor_light.png", "homedecor_generic_metal_wrought_iron.png"},
|
||||
use_texture_alpha = true,
|
||||
inventory_image = "homedecor_wall_lamp_inv.png",
|
||||
|
@ -143,7 +143,7 @@ function homedecor.bed_expansion(pos, placer, itemstack, pointed_thing, color)
|
||||
return true
|
||||
end
|
||||
|
||||
if minetest.is_protected(forwardpos, placer_name) then
|
||||
if minetest.is_protected(forwardpos, placer_name) then
|
||||
minetest.chat_send_player( placer:get_player_name(), "Someone already owns the spot where the headboard goes." )
|
||||
return true
|
||||
end
|
||||
@ -169,7 +169,7 @@ function homedecor.bed_expansion(pos, placer, itemstack, pointed_thing, color)
|
||||
minetest.set_node(rightpos, {name = "air"})
|
||||
minetest.set_node(pos, { name = newname, param2 = fdir})
|
||||
end
|
||||
|
||||
|
||||
local topnode = minetest.get_node({x=pos.x, y=pos.y+1.0, z=pos.z})
|
||||
local bottomnode = minetest.get_node({x=pos.x, y=pos.y-1.0, z=pos.z})
|
||||
|
||||
@ -202,7 +202,7 @@ function homedecor.place_banister(itemstack, placer, pointed_thing)
|
||||
|
||||
if def.on_rightclick then
|
||||
return def.on_rightclick(pointed_thing.under, minetest.get_node(pos), placer, itemstack)
|
||||
end
|
||||
end
|
||||
|
||||
local fdir = minetest.dir_to_facedir(placer:get_look_dir())
|
||||
|
||||
@ -217,7 +217,7 @@ function homedecor.place_banister(itemstack, placer, pointed_thing)
|
||||
return
|
||||
end
|
||||
|
||||
if minetest.is_protected(abovepos, placer_name) then
|
||||
if minetest.is_protected(abovepos, placer_name) then
|
||||
minetest.chat_send_player(placer_name, "Someone already owns that spot." )
|
||||
return
|
||||
end
|
||||
@ -242,7 +242,7 @@ function homedecor.place_banister(itemstack, placer, pointed_thing)
|
||||
local right_fwd_below_pos = { x=pos.x+rxd+fxd, y=pos.y-1, z=pos.z+rzd+fzd }
|
||||
local left_fwd_below_pos = { x=pos.x+lxd+fxd, y=pos.y-1, z=pos.z+lzd+fzd }
|
||||
|
||||
local below_node = minetest.get_node(below_pos)
|
||||
local below_node = minetest.get_node(below_pos)
|
||||
local fwd_node = minetest.get_node(fwd_pos)
|
||||
local left_node = minetest.get_node(left_pos)
|
||||
local right_node = minetest.get_node(right_pos)
|
||||
@ -280,12 +280,12 @@ function homedecor.place_banister(itemstack, placer, pointed_thing)
|
||||
|
||||
-- try to place a horizontal in-line with the nearest diagonal, at the top
|
||||
elseif left_fwd_below_node and string.find(left_fwd_below_node.name, "homedecor:banister_.*_diagonal")
|
||||
and is_buildable_to(placer_name, fwd_pos, nil, fwd_pos) then
|
||||
and is_buildable_to(placer_name, fwd_pos, nil, fwd_pos) then
|
||||
fdir = left_fwd_below_node.param2
|
||||
pos = fwd_pos
|
||||
new_place_name = string.gsub(left_fwd_below_node.name, "_diagonal_.-$", "_horizontal")
|
||||
elseif right_fwd_below_node and string.find(right_fwd_below_node.name, "homedecor:banister_.*_diagonal")
|
||||
and is_buildable_to(placer_name, fwd_pos, nil, fwd_pos) then
|
||||
and is_buildable_to(placer_name, fwd_pos, nil, fwd_pos) then
|
||||
fdir = right_fwd_below_node.param2
|
||||
pos = fwd_pos
|
||||
new_place_name = string.gsub(right_fwd_below_node.name, "_diagonal_.-$", "_horizontal")
|
||||
@ -299,13 +299,13 @@ function homedecor.place_banister(itemstack, placer, pointed_thing)
|
||||
new_place_name = string.gsub(right_node.name, "_diagonal_.-$", "_horizontal")
|
||||
|
||||
-- try to place a horizontal in-line with the nearest diagonal, at the bottom
|
||||
elseif left_fwd_node and string.find(left_fwd_node.name, "homedecor:banister_.*_diagonal")
|
||||
and is_buildable_to(placer_name, fwd_pos, nil, fwd_pos) then
|
||||
elseif left_fwd_node and string.find(left_fwd_node.name, "homedecor:banister_.*_diagonal")
|
||||
and is_buildable_to(placer_name, fwd_pos, nil, fwd_pos) then
|
||||
fdir = left_fwd_node.param2
|
||||
pos = fwd_pos
|
||||
new_place_name = string.gsub(left_fwd_node.name, "_diagonal_.-$", "_horizontal")
|
||||
elseif right_fwd_node and string.find(right_fwd_node.name, "homedecor:banister_.*_diagonal")
|
||||
and is_buildable_to(placer_name, fwd_pos, nil, fwd_pos) then
|
||||
and is_buildable_to(placer_name, fwd_pos, nil, fwd_pos) then
|
||||
fdir = right_fwd_node.param2
|
||||
pos = fwd_pos
|
||||
new_place_name = string.gsub(right_fwd_node.name, "_diagonal_.-$", "_horizontal")
|
||||
|
@ -158,7 +158,7 @@ homedecor.register("plasma_ball", {
|
||||
"homedecor_plasma_ball_glass.png"
|
||||
},
|
||||
inventory_image = "homedecor_plasma_ball_inv.png",
|
||||
selection_box = {
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.1875, -0.5, -0.1875, 0.1875, 0, 0.1875 }
|
||||
},
|
||||
@ -357,7 +357,7 @@ homedecor.register("ceiling_lantern", {
|
||||
use_texture_alpha = true,
|
||||
inventory_image = "homedecor_ceiling_lantern_inv.png",
|
||||
description = "Ceiling Lantern",
|
||||
groups = {snappy=3},
|
||||
groups = {snappy=3},
|
||||
light_source = 11,
|
||||
selection_box = cl_cbox,
|
||||
walkable = false
|
||||
@ -508,7 +508,7 @@ local dlamp_cbox = {
|
||||
|
||||
local dlamp_colors = { "red","blue","green","violet" }
|
||||
|
||||
for _, color in ipairs(dlamp_colors) do
|
||||
for _, color in ipairs(dlamp_colors) do
|
||||
homedecor.register("desk_lamp_"..color, {
|
||||
description = S("Desk Lamp ("..color..")"),
|
||||
mesh = "homedecor_desk_lamp.obj",
|
||||
|
@ -41,7 +41,7 @@ for i in ipairs(rug_types) do
|
||||
if type(m) == "table" then
|
||||
mesh = nil
|
||||
nodebox = {
|
||||
type = "fixed",
|
||||
type = "fixed",
|
||||
fixed = m
|
||||
}
|
||||
tiles = {
|
||||
@ -94,7 +94,7 @@ for i in ipairs(flowers_list) do
|
||||
local flowerdesc = flowers_list[i][1]
|
||||
local flower = flowers_list[i][2]
|
||||
local craftwith = flowers_list[i][3]
|
||||
|
||||
|
||||
homedecor.register("potted_"..flower, {
|
||||
description = S("Potted flower ("..flowerdesc..")"),
|
||||
mesh = "homedecor_flowerpot_small.obj",
|
||||
|
@ -27,7 +27,7 @@ if minetest.get_modpath("vessels")
|
||||
paramtype2 = "facedir",
|
||||
use_texture_alpha = true
|
||||
})
|
||||
|
||||
|
||||
local sbox = {
|
||||
type = "fixed",
|
||||
fixed = { -0.15, -0.5, -0.15, 0.15, -0.1, 0.15 }
|
||||
|
@ -1,6 +1,6 @@
|
||||
local lavalamps_list = {
|
||||
{ "Red Lava Lamp", "red"},
|
||||
{ "Orange Lava Lamp", "orange"},
|
||||
{ "Orange Lava Lamp", "orange"},
|
||||
{ "Yellow Lava Lamp", "yellow"},
|
||||
{ "Green Lava Lamp", "green"},
|
||||
{ "Blue Lava Lamp", "blue"},
|
||||
@ -52,7 +52,7 @@ for i in ipairs(lavalamps_list) do
|
||||
tiles = {
|
||||
"lavalamp_metal.png",
|
||||
"lavalamp_lamp_off.png",
|
||||
},
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
@ -78,5 +78,5 @@ for i in ipairs(lavalamps_list) do
|
||||
{"", "wool:black", "", }
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
end
|
||||
|
@ -12,7 +12,7 @@ local armchairs_list = {
|
||||
|
||||
local armchair_cbox = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0, 0.5 },
|
||||
{-0.5, -0.5, 0.4, 0.5, 0.5, 0.5 }
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ local longsofa_sbox = {
|
||||
|
||||
local longsofa_cbox = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0, 2.5 },
|
||||
{-0.5, -0.5, 0.5, -0.4, 0.5, 2.5 }
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ local sofa_sbox = {
|
||||
|
||||
local sofa_cbox = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0, 1.5 },
|
||||
{-0.5, -0.5, 0.5, -0.4, 0.5, 1.5 }
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ local function checkwall(pos)
|
||||
end
|
||||
|
||||
local node5 = minetest.get_node({x=pos.x+dxr, y=pos.y+1, z=pos.z+dzr})
|
||||
if not node5 or not minetest.registered_nodes[node5.name]
|
||||
if not node5 or not minetest.registered_nodes[node5.name]
|
||||
or not minetest.registered_nodes[node5.name].buildable_to then
|
||||
return false
|
||||
end
|
||||
|
@ -567,7 +567,7 @@ signs_lib.update_sign = function(pos, fields, owner)
|
||||
elseif signnode.name == "signs:sign_hanging" then
|
||||
sign_info = signs_lib.hanging_sign_model.textpos[minetest.get_node(pos).param2 + 1]
|
||||
elseif string.find(signnode.name, "sign_wall") then
|
||||
if signnode.name == "default:sign_wall"
|
||||
if signnode.name == "default:sign_wall"
|
||||
or signnode.name == "locked_sign:sign_wall_locked" then
|
||||
sign_info = signs_lib.regular_wall_sign_model.textpos[minetest.get_node(pos).param2 + 1]
|
||||
else
|
||||
|
Reference in New Issue
Block a user