update basic_signs, digistuff, farming redo, led_marqueee, mesecons,

moreblocks, pipeworks, and signs_lib
master
Vanessa Dannenberg 2021-03-01 20:49:32 -05:00
parent 4f3c7beeb3
commit f400b577b0
15 changed files with 105 additions and 21 deletions

1
build-date Normal file
View File

@ -0,0 +1 @@
20210301-2049

View File

@ -23,6 +23,7 @@ signs_lib.register_sign("basic_signs:sign_wall_locked", {
allow_onpole = true,
allow_onpole_horizontal = true,
allow_yard = true,
use_texture_alpha = "clip",
})
signs_lib.register_sign("basic_signs:sign_wall_glass", {
@ -45,7 +46,7 @@ signs_lib.register_sign("basic_signs:sign_wall_glass", {
allow_onpole = true,
allow_onpole_horizontal = true,
allow_yard = true,
use_texture_alpha = true,
use_texture_alpha = "blend",
})
signs_lib.register_sign("basic_signs:sign_wall_obsidian_glass", {
@ -68,7 +69,7 @@ signs_lib.register_sign("basic_signs:sign_wall_obsidian_glass", {
allow_onpole = true,
allow_onpole_horizontal = true,
allow_yard = true,
use_texture_alpha = true,
use_texture_alpha = "blend",
})
minetest.register_alias("locked_sign:sign_wall_locked", "basic_signs:sign_wall_locked")
@ -93,7 +94,7 @@ signs_lib.register_sign("basic_signs:sign_wall_plastic", {
allow_onpole = true,
allow_onpole_horizontal = true,
allow_yard = true,
use_texture_alpha = true,
use_texture_alpha = "clip",
})
-- array : color, translated color, default text color
@ -137,6 +138,7 @@ for i, color in ipairs(sign_colors) do
allow_onpole = true,
allow_onpole_horizontal = true,
allow_yard = true,
use_texture_alpha = "clip",
})
minetest.register_alias("basic_signs:sign_wall_steel_"..color[1].."_onpole", "basic_signs:sign_steel_"..color[1].."_onpole")

View File

@ -23,7 +23,7 @@ Parameters:
buffer [integer 0-7]: The slot number to create the new buffer in. If the slot is already occupied, the existing contents will be erased.
xsize [integer 1-64]: The width of the new buffer in pixels.
ysize [integer 1-64]: The height of the new buffer in pixels.
color [hex color, default "000000"]: A color to fill the new buffer with.
fill [hex color, default "000000"]: A color to fill the new buffer with.
Command: send
-------------
@ -133,3 +133,17 @@ x [integer 1-64]: The X position of the left side of the text.
y [integer 1-64]: The Y position of the right side of the text.
color [hex color, default "ff6600"]: The color of the text.
text: The text string to draw.
Command: drawline
-----------------
Draws a line on a buffer.
Parameters:
buffer [integer 0-7]: The buffer to draw the line on.
x1 [integer 1-64]: The X position of the start of the line.
x2 [integer 1-64]: The X position of the end of the line.
y1 [integer 1-64]: The Y position of the start of the line.
y2 [integer 1-64]: The Y position of the end of the line.
color [hex color, default "000000"]: The nominal color of the line (may not be the color of every pixel, see the "antialias" setting)
antialias [boolean, default false]: Whether to apply a (very) crude smoothing algorithm to the line to reduce jagged edges at the expense of making the line slightly blurry.

View File

@ -268,6 +268,41 @@ local function runcommand(pos,meta,command)
end
end
meta:set_string("buffer"..bufnum,minetest.serialize(buffer))
elseif command.command == "drawline" then
if type(command.buffer) ~= "number" or type(command.x1) ~= "number" or type(command.y1) ~= "number" or type(command.x2) ~= "number" or type(command.y2) ~= "number" then return end
local bufnum = math.floor(command.buffer)
if bufnum < 0 or bufnum > 7 then return end
local x1 = math.min(64,math.floor(command.x1))
local y1 = math.min(64,math.floor(command.y1))
local x2 = math.min(64,math.floor(command.x2))
local y2 = math.min(64,math.floor(command.y2))
if x1 < 1 or y1 < 1 or x2 < 1 or y2 < 1 then return end
local buffer = meta:get_string("buffer"..bufnum)
if string.len(buffer) == 0 then return end
buffer = minetest.deserialize(buffer)
if type(buffer) ~= "table" then return end
x2 = math.min(x2,buffer.xsize)
y2 = math.min(y2,buffer.ysize)
local color = command.color
if type(color) ~= "string" or string.len(color) > 7 or string.len(color) < 6 then color = "000000" end
if string.sub(color,1,1) == "#" then color = string.sub(color,2,7) end
if not tonumber(color,16) then color = "000000" end
local p1 = vector.new(x1,y1,0)
local p2 = vector.new(x2,y2,0)
local length = vector.distance(p1,p2)
local dir = vector.direction(p1,p2)
if length > 0 then
for i=0,length,0.3 do
local point = vector.add(p1,vector.multiply(dir,i))
point = vector.floor(point)
if command.antialias then
buffer[point.y][point.x] = blend(buffer[point.y][point.x],color,"average")
else
buffer[point.y][point.x] = color
end
end
end
meta:set_string("buffer"..bufnum,minetest.serialize(buffer))
elseif command.command == "drawpoint" then
if type(command.buffer) ~= "number" or type(command.x) ~= "number" or type(command.y) ~= "number" then return end
local bufnum = math.floor(command.buffer)

View File

@ -148,7 +148,7 @@ minetest.register_abm({
if minetest.registered_nodes[nn]
and minetest.registered_nodes[nn].walkable
and minetest.get_item_group(nn, "plant") == 0 then
minetest.set_node(pos, {name = "default:dirt"})
minetest.set_node(pos, {name = ndef.soil.base})
return
end

View File

@ -437,7 +437,7 @@ for i = 31, 255 do
inventory_image = wimage,
wield_image = wimage,
palette="led_marquee_palette.png",
use_texture_alpha = true,
use_texture_alpha = "blend",
groups = groups,
paramtype = "light",
paramtype2 = "colorwallmounted",

View File

@ -10,6 +10,7 @@ minetest.register_chatcommand("say", {
minetest.register_chatcommand("tell", {
params = "<name> <text>",
description = "Say <text> to <name> privately",
privs = {shout=true},
func = function(name, param)
local found, _, target, message = param:find("^([^%s]+)%s+(.*)$")
if found == nil then

View File

@ -30,7 +30,6 @@ minetest.register_node("mesecons_extrawires:corner_on", {
walkable = false,
sunlight_propagates = true,
selection_box = corner_selectionbox,
node_box = corner_nodebox,
groups = {dig_immediate = 3, not_in_creative_inventory = 1},
drop = "mesecons_extrawires:corner_off",
sounds = default.node_sound_defaults(),
@ -58,7 +57,6 @@ minetest.register_node("mesecons_extrawires:corner_off", {
walkable = false,
sunlight_propagates = true,
selection_box = corner_selectionbox,
node_box = corner_nodebox,
groups = {dig_immediate = 3},
sounds = default.node_sound_defaults(),
mesecons = {conductor =

View File

@ -16,6 +16,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Fixed
- [Shapeless crafting recipes are now handled in redefinitions.](https://github.com/minetest-mods/moreblocks/pull/171)
- [Aliases are now resolved in Stairs+ circular saw cost calculation.](https://github.com/minetest-mods/moreblocks/pull/175)
- [Fixed strange placement behavior for non-default Stairs+ nodes.](https://github.com/minetest-mods/moreblocks/pull/168)
- [Fixed stairs placement over oddly-shaped nodes.](https://github.com/minetest-mods/moreblocks/pull/166)

View File

@ -17,9 +17,10 @@ local reconstruct_internal_craft = function(recipe)
{ "", "", "" },
{ "", "", "" },
}
local width = recipe.width
for idx, item in pairs(recipe.items) do
local row = math.ceil(idx / recipe.width)
local col = idx - (row-1)*recipe.width
local row = math.ceil(idx / width)
local col = idx - (row-1)*width
recp[row][col] = item
end
return recp
@ -27,7 +28,11 @@ end
-- Change the amount produced by recipe by apply func to the old amount
local change_recipe_amount = function(product, recipe, func)
local recp = reconstruct_internal_craft(recipe)
-- if width == 0, this is a shapeless recipe, for which the
-- internal and Lua API recipe table is the same.
-- Otherwise we need to reconstruct the table for the shaped recipe.
local shapeless = (recipe.width == 0)
local recp = shapeless and recipe.items or reconstruct_internal_craft(recipe)
local oldamount = tonumber(recipe.output:match(" [0-9]+$") or "1")
@ -35,6 +40,10 @@ local change_recipe_amount = function(product, recipe, func)
-- remove old crafting recipe
local redo = { recipe = recp }
-- preserve shapelessness
if shapeless then
redo.type = "shapeless"
end
minetest.clear_craft(redo)
-- new output

View File

@ -0,0 +1,24 @@
unused_args = false
max_line_length= 240
redefined = false
globals = {
"pipeworks",
"luaentity"
}
read_globals = {
-- Stdlib
string = {fields = {"split"}},
table = {fields = {"copy", "getn"}},
-- Minetest
"vector", "ItemStack",
"dump", "minetest",
"VoxelManip", "VoxelArea",
-- mods
"default", "mesecon", "digiline",
"screwdriver"
}

View File

@ -1,7 +0,0 @@
default
intllib?
screwdriver?
streetspoles?
streetlamps?
cottages?
prefab_redo?

View File

@ -1 +0,0 @@
Adds signs with readable text.

View File

@ -1,2 +1,6 @@
name = signs_lib
author = VanessaE
depends = default
optional_depends = intllib, screwdriver, streetspoles, streetlamps, cottages, prefab_redo
description = Adds signs with readable text.
min_minetest_version = 5.2.0

View File

@ -14,7 +14,8 @@ signs_lib.register_sign("default:sign_wall_wood", {
allow_widefont = true,
allow_onpole = true,
allow_onpole_horizontal = true,
allow_yard = true
allow_yard = true,
use_texture_alpha = "clip",
})
signs_lib.register_sign("default:sign_wall_steel", {
@ -35,7 +36,8 @@ signs_lib.register_sign("default:sign_wall_steel", {
allow_widefont = true,
allow_onpole = true,
allow_onpole_horizontal = true,
allow_yard = true
allow_yard = true,
use_texture_alpha = "clip",
})
minetest.register_alias("signs:sign_hanging", "default:sign_wood_hanging")