update bonemeal, digistuff, facade, farming, pipeworks, technic, unified inventory

removed notify_hud_provider (nothing uses it, and it's broken)
This commit is contained in:
VanessaE 2020-05-07 12:48:23 -04:00
parent fd97137fac
commit 07fb475648
35 changed files with 682 additions and 177 deletions

View File

@ -32,5 +32,6 @@ Changelog:
- 1.0 - add_deco() now adds to existing item list while set_deco() replaces item list (thanks h-v-smacker)
- 1.1 - Added {can_bonemeal=1} group for special nodes
- 1.2 - Added support for minetest 5.0 cactus seedling, blueberry bush sapling and emergent jungle tree saplings, additional flowers and pine bush sapling.
- 1.3 - Ability to craft dye from mulch, bonemeal and fertiliser (thanks orbea)
Lucky Blocks: 6

View File

@ -6,3 +6,4 @@ moretrees?
technic_worldgen?
lucky_block?
flowers?
dye?

View File

@ -569,7 +569,8 @@ minetest.register_craftitem("bonemeal:fertiliser", {
-- bone
minetest.register_craftitem("bonemeal:bone", {
description = S("Bone"),
inventory_image = "bonemeal_bone.png"
inventory_image = "bonemeal_bone.png",
groups = {bone = 1}
})
-- gelatin powder
@ -589,7 +590,7 @@ minetest.register_craftitem("bonemeal:gelatin_powder", {
minetest.register_craft({
output = "bonemeal:gelatin_powder 4",
recipe = {
{"bonemeal:bone", "bonemeal:bone", "bonemeal:bone"},
{"group:bone", "group:bone", "group:bone"},
{"bucket:bucket_water", "bucket:bucket_water", "bucket:bucket_water"},
{"bucket:bucket_water", "default:torch", "bucket:bucket_water"},
},
@ -602,7 +603,7 @@ minetest.register_craft({
minetest.register_craft({
type = "shapeless",
output = "bonemeal:bonemeal 2",
recipe = {"bonemeal:bone"}
recipe = {"group:bone"}
})
-- bonemeal (from player bones)

View File

@ -141,3 +141,20 @@ if minetest.get_modpath("caverealms") then
{"caverealms:mushroom_sapling", add_shroom, "soil"}
})
end
if minetest.get_modpath("dye") then
local bonemeal_dyes = {
bonemeal = "white", fertiliser = "green", mulch = "brown"}
for mat, dye in pairs(bonemeal_dyes) do
minetest.register_craft({
output = "dye:" .. dye .. " 4",
recipe = {
{"bonemeal:" .. mat}
},
})
end
end

View File

@ -80,3 +80,13 @@ To write a card, send a command in the following format:
After sending the write command, swipe the card to be written and the reader will send back the following message:
{event = "write"}
Both blank and previously written cards can be written to. If the card was not blank, it will be overwritten.
How to use the game controller:
After setting a channel, right-click the controller to start/stop using it.
While using a controller, it will send a table with the control inputs, pitch, yaw, look vector, and name of the player using the controller each time one of these values changes, up to 5 times per second.
When a player leaves a controller, the string "player_left" is sent.
In addition to right-clicking the controller in use to stop using it, the following will also cause a player to stop using the controller:
* The controller is moved or removed
* The player leaves the game
* The player is teleported away from the controller
* The controller receives the string "release" on its digilines channel

238
digistuff/controller.lua Normal file
View File

@ -0,0 +1,238 @@
local digiline_rules = {
{x = 1,y = 0,z = 0},
{x = -1,y = 0,z = 0},
{x = 0,y = 0,z = 1},
{x = 0,y = 0,z = -1},
{x = 0,y = -1,z = 0},
{x = 1,y = -1,z = 0},
{x = -1,y = -1,z = 0},
{x = 0,y = -1,z = 1},
{x = 0,y = -1,z = -1},
}
local players_on_controller = {}
local last_seen_inputs = {}
local function process_inputs(pos)
local meta = minetest.get_meta(pos)
local hash = minetest.hash_node_position(pos)
if minetest.get_node(pos).name ~= "digistuff:controller_programmed" then
local player = minetest.get_player_by_name(players_on_controller[hash])
if player then
player:set_physics_override({speed = 1,jump = 1,})
player:set_pos(vector.add(pos,vector.new(0.25,0,0.25)))
minetest.chat_send_player(players_on_controller[hash],"You are now free to move.")
end
last_seen_inputs[players_on_controller[hash]] = nil
players_on_controller[hash] = nil
return
end
local name = players_on_controller[hash]
local player = minetest.get_player_by_name(name)
if not player then
digiline:receptor_send(pos,digiline_rules,meta:get_string("channel"),"player_left")
minetest.get_meta(pos):set_string("infotext","Digilines Game Controller Ready\n(right-click to use)")
players_on_controller[hash] = nil
return
end
local distance = vector.distance(pos,player:get_pos())
if distance > 1 then
digiline:receptor_send(pos,digiline_rules,meta:get_string("channel"),"player_left")
minetest.get_meta(pos):set_string("infotext","Digilines Game Controller Ready\n(right-click to use)")
player:set_physics_override({speed = 1,jump = 1,})
players_on_controller[hash] = nil
return
end
local inputs = player:get_player_control()
inputs.pitch = player:get_look_vertical()
inputs.yaw = player:get_look_horizontal()
local send_needed = false
if not last_seen_inputs[name] then
send_needed = true
else
for k,v in pairs(inputs) do
if v ~= last_seen_inputs[name][k] then
send_needed = true
break
end
end
end
last_seen_inputs[name] = inputs
if send_needed then
local channel = meta:get_string("channel")
local inputs = table.copy(inputs)
inputs.look_vector = player:get_look_dir()
inputs.name = name
digiline:receptor_send(pos,digiline_rules,channel,inputs)
end
end
local function release_player(pos)
local hash = minetest.hash_node_position(pos)
local player = minetest.get_player_by_name(players_on_controller[hash])
if player then
player:set_physics_override({speed = 1,jump = 1,})
player:set_pos(vector.add(pos,vector.new(0.25,0,0.25)))
minetest.chat_send_player(players_on_controller[hash],"You are now free to move.")
end
local meta = minetest.get_meta(pos)
meta:set_string("infotext","Digilines Game Controller Ready\n(right-click to use)")
last_seen_inputs[players_on_controller[hash]] = nil
players_on_controller[hash] = nil
digiline:receptor_send(pos,digiline_rules,meta:get_string("channel"),"player_left")
end
local function trap_player(pos,player)
local hash = minetest.hash_node_position(pos)
local oldname = players_on_controller[hash]
local newname = player:get_player_name()
if oldname and minetest.get_player_by_name(oldname) then
minetest.chat_send_player(player:get_player_name(),"Controller is already occupied by "..oldname)
return
else
players_on_controller[hash] = newname
player:set_pos(vector.add(pos,vector.new(0,-0.4,0)))
player:set_physics_override({speed = 0,jump = 0,})
minetest.chat_send_player(newname,"You are now using a digilines game controller. Right-click the controller again to be released.")
local meta = minetest.get_meta(pos)
meta:set_string("infotext","Digilines Game Controller\nIn use by: "..newname)
process_inputs(pos)
end
end
local function toggle_trap_player(pos,player)
if players_on_controller[minetest.hash_node_position(pos)] then
release_player(pos)
else
trap_player(pos,player)
end
end
minetest.register_node("digistuff:controller", {
description = "Digilines Game Controller",
tiles = {
"digistuff_controller_top.png",
"digistuff_controller_sides.png",
},
paramtype = "light",
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.5,-0.5,-0.5,0.5,-0.45,0.5},
}
},
_digistuff_channelcopier_fieldname = "channel",
_digistuff_channelcopier_onset = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec","")
meta:set_string("infotext","Digilines Game Controller Ready\n(right-click to use)")
minetest.swap_node(pos,{name = "digistuff:controller_programmed",})
end,
groups = {cracky = 1,},
is_ground_content = false,
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec","field[channel;Channel;${channel}")
end,
on_receive_fields = function(pos, formname, fields, sender)
local name = sender:get_player_name()
if minetest.is_protected(pos,name) and not minetest.check_player_privs(name,{protection_bypass=true}) then
minetest.record_protection_violation(pos,name)
return
end
local meta = minetest.get_meta(pos)
if fields.channel then
meta:set_string("channel",fields.channel)
meta:set_string("formspec","")
meta:set_string("infotext","Digilines Game Controller Ready\n(right-click to use)")
minetest.swap_node(pos,{name = "digistuff:controller_programmed",})
end
end,
digiline = {
receptor = {},
wire = {
rules = digiline_rules,
},
},
})
minetest.register_node("digistuff:controller_programmed", {
description = "Digilines Game Controller (programmed state - you hacker you!)",
drop = "digistuff:controller",
tiles = {
"digistuff_controller_top.png",
"digistuff_controller_sides.png",
},
paramtype = "light",
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.5,-0.5,-0.5,0.5,-0.45,0.5},
}
},
_digistuff_channelcopier_fieldname = "channel",
groups = {cracky = 1,not_in_creative_inventory = 1,},
is_ground_content = false,
on_rightclick = function(pos,_,clicker)
if clicker and clicker:get_player_name() then
toggle_trap_player(pos,clicker)
end
end,
_digistuff_channelcopier_fieldname = "channel",
digiline = {
receptor = {},
wire = {
rules = digiline_rules,
},
effector = {
action = function(pos,node,channel,msg)
local setchannel = minetest.get_meta(pos):get_string("channel")
if channel ~= setchannel then return end
if msg == "release" then
local hash = minetest.hash_node_position(pos)
if players_on_controller[hash] then
release_player(pos)
end
end
end,
},
},
})
local acc_dtime = 0
minetest.register_globalstep(function(dtime)
acc_dtime = acc_dtime + dtime
if acc_dtime < 0.2 then return end
acc_dtime = 0
for hash in pairs(players_on_controller) do
local pos = minetest.get_position_from_hash(hash)
process_inputs(pos)
end
end)
minetest.register_lbm({
name = "digistuff:reset_controllers",
label = "Reset game controllers to idle",
nodenames = {"digistuff:controller_programmed"},
run_at_every_load = true,
action = function(pos)
if not players_on_controller[minetest.hash_node_position(pos)] then
local meta = minetest.get_meta(pos)
digiline:receptor_send(pos,digiline_rules,meta:get_string("channel"),"player_left")
meta:set_string("infotext","Digilines Game Controller Ready\n(right-click to use)")
end
end,
})
minetest.register_craft({
output = "digistuff:controller",
recipe = {
{"","digistuff:button","",},
{"digistuff:button","group:wool","digistuff:button",},
{"","digistuff:button","",},
},
})

View File

@ -15,6 +15,7 @@ local components = {
"timer",
"cardreader",
"channelcopier",
"controller",
}
if minetest.get_modpath("mesecons_luacontroller") then table.insert(components,"ioexpander") end

View File

@ -105,7 +105,6 @@ minetest.register_node("digistuff:button", {
after_place_node = digistuff.place_receiver,
after_destruct = digistuff.remove_receiver,
on_receive_fields = function(pos, formname, fields, sender)
print(dump(fields))
local meta = minetest.get_meta(pos)
if fields.submit then
if fields.channel ~= "" then

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -81,8 +81,7 @@ caverealms_lite \
deezls_mods/extra_stairsplus \
blox \
campfire \
item_drop \
notify_hud_provider"
item_drop"
COPY_MODS_LIST="my_mods/dreambuilder_mp_extras \
nekogloops_mods/glooptest \

View File

@ -45,14 +45,6 @@ tar -jcf /home/vanessa/Digital-Audio-Concepts-Website/vanessa/hobbies/minetest/D
dreambuilder_modpack
rm /home/vanessa/Minetest-related/mods/my_mods/dreambuilder_modpack/build-date.txt
echo -e "\nSync the local mod cache to the web server ..."
echo -e "================================================\n"
rsync -L --exclude=\*.git \
--delete --progress -a -v -z -O --checksum -e "ssh" \
/home/vanessa/Minetest-related/mods/ \
minetest@daconcepts.com:/home/minetest/www/my-main-mod-archive
/home/vanessa/Scripts/sync-website.sh
echo -e "\nDone. Build timestamp: $timestamp \n"

View File

@ -0,0 +1,11 @@
on: [push, pull_request]
name: Check & Release
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: lint
uses: Roang-zero1/factorio-mod-luacheck@master
with:
luacheckrc_url: https://raw.githubusercontent.com/TumeniNodes/facade/master/.luacheckrc

19
facade/.luacheckrc Normal file
View File

@ -0,0 +1,19 @@
unused_args = false
allow_defined_top = true
max_line_length = 999
ignore = {
"clay",
}
globals = {
"minetest"
}
read_globals = {
string = {fields = {"split", "trim"}},
table = {fields = {"copy", "getn"}},
"stack", "default",
"chisel",
}

View File

@ -1,11 +1,15 @@
# Facade
[![](https://github.com/TumeniNodes/facade/workflows/Check%20&%20Release/badge.svg)](https://github.com/TumeniNodes/facade/actions)
[![License](https://img.shields.io/badge/license-LGPLv2.1%2B-blue.svg)](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html)
Adds decorative clay and stone-type nodes to Minetest Game.
## Dependencies
- default (included in minetest_game)
- [mychisel](https://github.com/minetest-mods/mychisel) (**optional dependency!**)
## Requierments
## Requirements
This requieres MT/MTG 0.4.16+ to run (may work on older versions).
## License

View File

@ -5,7 +5,7 @@
-- Balancing output per 1 input block with respect to apparent volume of output shape.
-- All current shapes are added, but shapes not present in this table will still be produced
-- All current shapes are added, but shapes not present in this table will still be produced
-- one at a time — if that is the desired quantity, adding them is not required.
local output_ratios = {
bannerstone = 1,
@ -44,7 +44,7 @@ local function prepare_formspec (material_name)
local output = string.gsub(material_name, "^.*:", "facade:")
local shaper_formspec =
local shaper_formspec =
"size[8,11;]"..
"label[0,0;" .. "Choose shape to produce:" .. "]"..
@ -79,7 +79,7 @@ local function prepare_formspec (material_name)
-- this code is a provision in case top column pieces enter service
if minetest.registered_nodes[output .. "_columnia_top"] then
shaper_formspec = shaper_formspec ..
shaper_formspec = shaper_formspec ..
"item_image_button[5,3.5;1,1;" .. output .. "_columnia_top" .. ";columnia_top; ]"
end
@ -89,10 +89,10 @@ local function prepare_formspec (material_name)
-- only one such shape exists so far, but more should be easy to add here
if minetest.registered_nodes[output .. "_corner_bricks"] then
shaper_formspec = shaper_formspec ..
shaper_formspec = shaper_formspec ..
"item_image_button[0,4.5;1,1;" .. output .. "_corner_bricks" .. ";corner_bricks; ]"
end
-- inventory part
shaper_formspec = shaper_formspec ..
@ -106,10 +106,10 @@ local function prepare_formspec (material_name)
"listring[current_name;dst]"..
"listring[current_player;main]"..
"listring[current_name;src]"..
"listring[current_player;main]"
"listring[current_player;main]"
return(shaper_formspec)
end
@ -135,9 +135,8 @@ local function update_formspec_put (pos, listname, index, stack, player)
if listname ~= "src" then
return
end
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
local material_name = stack:get_name()
if check_material_applicability(material_name) then
@ -159,7 +158,7 @@ local function update_formspec_take (pos, listname, index, stack, player)
if listname ~= "src" then
return
end
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
@ -182,9 +181,7 @@ local function check_inventory_put (pos, listname, index, stack, player)
if listname ~= "src" then
return 0
end
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
local material_name = stack:get_name()
if check_material_applicability(material_name) then
@ -206,20 +203,18 @@ local function check_inventory_take (pos, listname, index, stack, player)
end
return(stack:get_count())
end
local function check_inventory_move (pos, from_list, from_index, to_list, to_index, count, player)
if protect_inventories and minetest.is_protected(pos, player:get_player_name()) then
return 0
end
return(stack:get_count())
end
end
-- process the form fields and convert source material to desired shapes
local function form_handler(pos, formname, fields, sender)
@ -228,8 +223,8 @@ local function form_handler(pos, formname, fields, sender)
return
end
if fields.quit then
return
if fields.quit then
return
end
local meta = minetest.get_meta(pos)
@ -241,7 +236,7 @@ local function form_handler(pos, formname, fields, sender)
local inputstack = inv:get_stack("src", 1)
local inputname = inputstack:get_name()
for shape,_ in pairs(fields) do
local result = string.gsub(inputname, "^.*:", "facade:") .. "_" .. shape
@ -265,11 +260,9 @@ local function form_handler(pos, formname, fields, sender)
inv:add_item("dst", result)
end
return
end
local function check_removability (pos, player)
local meta = minetest.get_meta(pos)

View File

@ -547,7 +547,7 @@ end
--------------------------
--- Columnia shapes
--------------------------
-- From mod Columnia (2014 by Glunggi), LGPL 2.1
-- The shapes are using stock minetest.rotate_node() for positioning.
@ -584,7 +584,7 @@ if not minetest.get_modpath("columnia") then
return minetest.item_place(itemstack, placer, pointed_thing, param2)
end
-- Node will be called facade:<subname>_columnia_mid
function facade.register_columnia_mid(modname, subname, recipeitem, desc)
minetest.register_node("facade:" .. subname .. "_columnia_mid", {
@ -607,7 +607,7 @@ if not minetest.get_modpath("columnia") then
end
-- Normally, a single shape should be fine both for bottom and top parts of
-- a column. If materials with textures that don't match with themselves
-- a column. If materials with textures that don't match with themselves
-- when rotated upside-down are added later on, then enable the next function.
-- Node will be called facade:<subname>_columnia_bottom
function facade.register_columnia_bottom(modname, subname, recipeitem, desc)
@ -642,7 +642,7 @@ if not minetest.get_modpath("columnia") then
function facade.register_columnia_top(modname, subname, recipeitem, desc)
-- whitelist items with textures of clear directionality (e.g. bricks)
if string.match(recipeitem, "brick")
then
then
minetest.register_node("facade:" .. subname .. "_columnia_top", {
description = desc .. " Column Top/Bottom",
drawtype = "nodebox",
@ -657,7 +657,7 @@ if not minetest.get_modpath("columnia") then
type = "fixed",
fixed = {
{-0.25, -0.5, -0.25, 0.25, 0.5, 0.25},
{-0.5, 0.25, -0.5, 0.5, 0.5, 0.5},
{-0.5, 0.25, -0.5, 0.5, 0.5, 0.5},
{-0.375, 0, -0.375, 0.375, 0.5, 0.375},
},
},
@ -741,7 +741,7 @@ end
--Register Nodes
--------------------------
function facade.register_facade_nodes(modname, subname, recipeitem, desc)
facade.register_bannerstone(modname, subname, recipeitem, desc)
facade.register_bannerstone_corner(modname, subname, recipeitem, desc)
facade.register_centerstone(modname, subname, recipeitem, desc)
@ -756,7 +756,7 @@ function facade.register_facade_nodes(modname, subname, recipeitem, desc)
facade.register_rgspro_inner_corner(modname, subname, recipeitem, desc)
facade.register_rgspro_outer_corner(modname, subname, recipeitem, desc)
facade.register_corner_bricks(modname, subname, recipeitem, desc)
if not minetest.get_modpath("columnia") then
facade.register_columnia_mid(modname, subname, recipeitem, desc)
facade.register_columnia_bottom(modname, subname, recipeitem, desc)
@ -765,7 +765,7 @@ function facade.register_facade_nodes(modname, subname, recipeitem, desc)
facade.register_columnia_link(modname, subname, recipeitem, desc)
facade.register_columnia_linkdown(modname, subname, recipeitem, desc)
end
if wehavechisels then
-- register all nodes with mychisel mod to use them without creative priv
chisel.register_node("facade",subname, recipeitem, "bannerstone")
@ -782,7 +782,7 @@ function facade.register_facade_nodes(modname, subname, recipeitem, desc)
chisel.register_node("facade",subname, recipeitem, "rgspro_inner_corner")
chisel.register_node("facade",subname, recipeitem, "rgspro_outer_corner")
chisel.register_node("facade",subname, recipeitem, "corner_bricks")
if not minetest.get_modpath("columnia") then
chisel.register_node("facade",subname, recipeitem, "columnia_mid")
chisel.register_node("facade",subname, recipeitem, "columnia_bottom")

View File

@ -13,6 +13,7 @@ This mod works by adding your new plant to the {growing=1} group and numbering t
### Changelog:
- 1.45 - Dirt and Hoes are more in line with default by using dry/wet/base options
- 1.44 - Added 'farming_stage_length' in mod settings for speed of crop growth, also thanks to TheDarkTiger for translation updates
- 1.43 - Scythe works on use instead of right-click, added seed=1 groups to actual seeds and seed=2 group for plantable food items.
- 1.42 - Soil needs water to be present within 3 blocks horizontally and 1 below to make wet soil, Jack 'o Lanterns now check protection, add chocolate block.

View File

@ -96,8 +96,19 @@ function farming.hoe_on_use(itemstack, user, pointed_thing, uses)
return
end
-- check if (wet) soil defined
local ndef = minetest.registered_nodes[under.name]
if ndef.soil == nil or ndef.soil.wet == nil or ndef.soil.dry == nil then
return
end
if minetest.is_protected(pt.under, user:get_player_name()) then
minetest.record_protection_violation(pt.under, user:get_player_name())
return
end
-- turn the node into soil, wear out item and play sound
minetest.set_node(pt.under, {name = "farming:soil"})
minetest.set_node(pt.under, {name = ndef.soil.dry})
minetest.sound_play("default_dig_crumbly", {pos = pt.under, gain = 0.5})

View File

@ -7,7 +7,7 @@
farming = {
mod = "redo",
version = "20200426",
version = "20200430",
path = minetest.get_modpath("farming"),
select = {
type = "fixed",

View File

@ -1,40 +1,143 @@
local S = farming.intllib
-- add soil types to existing dirt blocks
minetest.override_item("default:dirt", {
soil = {
base = "default:dirt",
dry = "farming:soil",
wet = "farming:soil_wet"
}
})
minetest.override_item("default:dirt_with_grass", {
soil = {
base = "default:dirt_with_grass",
dry = "farming:soil",
wet = "farming:soil_wet"
}
})
minetest.override_item("default:dirt_with_dry_grass", {
soil = {
base = "default:dirt_with_dry_grass",
dry = "farming:soil",
wet = "farming:soil_wet"
}
})
minetest.override_item("default:dirt_with_rainforest_litter", {
soil = {
base = "default:dirt_with_rainforest_litter",
dry = "farming:soil",
wet = "farming:soil_wet"
}
})
minetest.override_item("default:dirt_with_coniferous_litter", {
soil = {
base = "default:dirt_with_coniferous_litter",
dry = "farming:soil",
wet = "farming:soil_wet"
}
})
minetest.override_item("default:dry_dirt", {
soil = {
base = "default:dry_dirt",
dry = "farming:dry_soil",
wet = "farming:dry_soil_wet"
}
})
minetest.override_item("default:dry_dirt_with_dry_grass", {
soil = {
base = "default:dry_dirt_with_dry_grass",
dry = "farming:dry_soil",
wet = "farming:dry_soil_wet"
}
})
-- normal soil
minetest.register_node("farming:soil", {
description = S("Soil"),
tiles = {"default_dirt.png^farming_soil.png", "default_dirt.png"},
drop = "default:dirt",
groups = {crumbly = 3, not_in_creative_inventory = 1, soil = 2},
groups = {crumbly = 3, not_in_creative_inventory = 1, soil = 2, field = 1},
sounds = default.node_sound_dirt_defaults(),
soil = {
base = "default:dirt",
dry = "farming:soil",
wet = "farming:soil_wet"
}
})
-- wet soil
minetest.register_node("farming:soil_wet", {
description = S("Wet Soil"),
tiles = {"default_dirt.png^farming_soil_wet.png", "default_dirt.png^farming_soil_wet_side.png"},
tiles = {
"default_dirt.png^farming_soil_wet.png",
"default_dirt.png^farming_soil_wet_side.png"},
drop = "default:dirt",
groups = {crumbly = 3, not_in_creative_inventory = 1, soil = 3},
groups = {crumbly = 3, not_in_creative_inventory = 1, soil = 3, field = 1},
sounds = default.node_sound_dirt_defaults(),
soil = {
base = "default:dirt",
dry = "farming:soil",
wet = "farming:soil_wet"
}
})
-- sand is not soil, change existing sand-soil to use normal soil
minetest.register_alias("farming:desert_sand_soil", "farming:soil")
minetest.register_alias("farming:desert_sand_soil_wet", "farming:soil_wet")
-- also change new dry soil to use normal soil
minetest.register_alias("farming:dry_soil", "farming:soil")
minetest.register_alias("farming:dry_soil_wet", "farming:soil_wet")
-- savanna soil
if minetest.registered_nodes["default:dry_dirt"] then
minetest.register_node("farming:dry_soil", {
description = S("Savanna Soil"),
tiles = {
"default_dry_dirt.png^farming_soil.png",
"default_dry_dirt.png"},
drop = "default:dry_dirt",
groups = {crumbly = 3, not_in_creative_inventory = 1, soil = 2, field = 1},
sounds = default.node_sound_dirt_defaults(),
soil = {
base = "default:dry_dirt",
dry = "farming:dry_soil",
wet = "farming:dry_soil_wet"
}
})
minetest.register_node("farming:dry_soil_wet", {
description = S("Wet Savanna Soil"),
tiles = {
"default_dry_dirt.png^farming_soil_wet.png",
"default_dry_dirt.png^farming_soil_wet_side.png"},
drop = "default:dry_dirt",
groups = {crumbly = 3, not_in_creative_inventory = 1, soil = 3, field = 1},
sounds = default.node_sound_dirt_defaults(),
soil = {
base = "default:dry_dirt",
dry = "farming:dry_soil",
wet = "farming:dry_soil_wet"
}
})
end
-- sand is not soil, change existing sand-soil to use dry soil
minetest.register_alias("farming:desert_sand_soil", "farming:dry_soil")
minetest.register_alias("farming:desert_sand_soil_wet", "farming:dry_soil_wet")
-- if water near soil then change to wet soil
minetest.register_abm({
nodenames = {"farming:soil", "farming:soil_wet"},
nodenames = {"group:field"},
interval = 15,
chance = 4,
catch_up = false,
action = function(pos, node)
local ndef = minetest.registered_nodes[node.name]
if not ndef or not ndef.soil or not ndef.soil.wet
or not ndef.soil.base or not ndef.soil.dry then return end
pos.y = pos.y + 1
local nn = minetest.get_node_or_nil(pos)
pos.y = pos.y - 1
@ -54,24 +157,20 @@ minetest.register_abm({
return
end
-- check if there is water nearby and change soil accordingly
-- if minetest.find_node_near(pos, 3, {"group:water"}) then
-- check if water is within 3 nodes horizontally and 1 below
if #minetest.find_nodes_in_area(
{x = pos.x + 3, y = pos.y - 1, z = pos.z + 3},
{x = pos.x - 3, y = pos.y , z = pos.z - 3},
{"group:water"}) > 0 then
if node.name == "farming:soil" then
minetest.set_node(pos, {name = "farming:soil_wet"})
end
minetest.set_node(pos, {name = ndef.soil.wet})
elseif node.name == "farming:soil_wet" then
minetest.set_node(pos, {name = "farming:soil"})
elseif node.name == ndef.soil.wet then
minetest.set_node(pos, {name = ndef.soil.dry})
elseif node.name == "farming:soil" and minetest.get_item_group(nn, "plant") == 0 then
minetest.set_node(pos, {name = "default:dirt"})
elseif node.name == ndef.soil.dry
and minetest.get_item_group(nn, "plant") == 0 then
minetest.set_node(pos, {name = ndef.soil.base})
end
end,
})

View File

@ -1,7 +0,0 @@
Copyright 2019 Pascal Abresch
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -1,16 +0,0 @@
Api:
notify.hud.sendtext(mt_player player, string text, optional int timeout)
usage:
add notify_hud_provider as an optional dependency to your mod,
and then check for the existance of the above api call before using it
You may call it like so for example
notify.hud.sendtext(minetest.get_player_by_name("bentaphile", "Hey there", 10)
or, for example if you are in a hook that already is in possesion of a player object
notify.hud.sendtext(player, "Your " .. tool .. " Has been repaired!", 5)
(This, so that subgames may provide their own implementation, without having to use the same modname, this also allows another mod to take this name to overide the subgame)

View File

@ -1,38 +0,0 @@
notify = notify or {}
notify.hud = notify.hud or {}
-- the only API gurantee is that notify.hud.sendtext(mt_player player, string text, optional int timeout) is available
minetest.register_on_joinplayer(function(player)
--register the hud elements to use later
--this is a simple implementation, so just one
local hud_fg = player:hud_add({
hud_elem_type = "text",
position = { x=0.5,y=0.8 },
text = "",
direction = 0,
number = "0xFFFFFF"
})
player:get_meta():set_int("notify_fg", hud_fg)
end)
notify.hud.sendtext = function(player, text, timeout)
if not player then return end
if not text then return end
if timeout <= 0 or not timeout then timeout = 1 end
minetest.after(1, notify.hud.timeout, player)
player:get_meta():set_int("time_left", timeout)
player:hud_change(player:get_meta():get_int("notify_fg"), "text", text)
end
notify.hud.timeout = function(player) -- checks whether player timed out yet
if not player then return end
local timeout = player:get_meta():get_int("time_left")
timeout = timeout -1
if timeout <= 0 then
player:hud_change(player:get_meta():get_int("notify_fg"), "text", "")
else
player:get_meta():set_int("time_left", timeout)
minetest.after(1, notify.hud.timeout, player)
end
end

View File

@ -1 +0,0 @@
name = notify_hud_provider

View File

@ -58,7 +58,7 @@ local register_one_tube = function(name, tname, dropname, desc, plain, noctrs, e
local tgroups = {snappy = 3, tube = 1, tubedevice = 1, not_in_creative_inventory = 1}
local tubedesc = string.format("%s %s", desc, dump(connects))
local iimg = plain[1]
local iimg = type(plain[1]) == "table" and plain[1].name or plain[1]
local wscale = {x = 1, y = 1, z = 1}
if #connects == 0 then

View File

@ -48,14 +48,17 @@ function technic.register_can(d)
on_place = function(itemstack, user, pointed_thing)
if pointed_thing.type ~= "node" then return end
local pos = pointed_thing.under
local def = minetest.registered_nodes[minetest.get_node(pos).name] or {}
local node_name = minetest.get_node(pos).name
local def = minetest.registered_nodes[node_name] or {}
if def.on_rightclick and user and not user:get_player_control().sneak then
return def.on_rightclick(pos, minetest.get_node(pos), user, itemstack, pointed_thing)
end
if not def.buildable_to then
if not def.buildable_to or node_name == data.liquid_source_name then
pos = pointed_thing.above
def = minetest.registered_nodes[minetest.get_node(pos).name] or {}
if not def.buildable_to then return end
node_name = minetest.get_node(pos).name
def = minetest.registered_nodes[node_name] or {}
-- Try to place node above the pointed source, or abort.
if not def.buildable_to or node_name == data.liquid_source_name then return end
end
local charge = get_can_level(itemstack)
if charge == 0 then return end

View File

@ -18,9 +18,10 @@ minetest.register_craft({
minetest.register_craft({
output = 'technic:copper_locked_chest 1',
type = "shapeless",
recipe = {
{'basic_materials:padlock'},
{'technic:copper_chest'},
'basic_materials:padlock',
'technic:copper_chest',
}
})

View File

@ -29,9 +29,10 @@ end
minetest.register_craft({
output = 'technic:gold_locked_chest',
type = "shapeless",
recipe = {
{'basic_materials:padlock'},
{'technic:gold_chest'},
'basic_materials:padlock',
'technic:gold_chest',
}
})

View File

@ -25,9 +25,10 @@ minetest.register_craft({
minetest.register_craft({
output = 'technic:iron_locked_chest 1',
type = "shapeless",
recipe = {
{'basic_materials:padlock'},
{'technic:iron_chest'},
'basic_materials:padlock',
'technic:iron_chest',
}
})

View File

@ -20,9 +20,10 @@ end
minetest.register_craft({
output = 'technic:mithril_locked_chest 1',
type = "shapeless",
recipe = {
{'basic_materials:padlock'},
{'technic:mithril_chest'},
'basic_materials:padlock',
'technic:mithril_chest',
}
})

View File

@ -20,9 +20,10 @@ end
minetest.register_craft({
output = 'technic:silver_locked_chest',
type = "shapeless",
recipe = {
{'basic_materials:padlock'},
{'technic:silver_chest'},
'basic_materials:padlock',
'technic:silver_chest',
}
})

View File

@ -1,38 +1,100 @@
# textdomain: unified_inventory
Crafting=Elaboración
Cooking=hornear
Bags=Bolsas
Bag @1=Bolsa @1
Small Bag=Bolsa Pequeña
Medium Bag=Bolsa Mediana
Large Bag=Bolsa Grande
Page=Página
@1 of @2=@1 de @2
Filter=Filtro
Can use the creative inventory=Puede usar el inventario creativo
Crafting Guide=Guía de Elaboración
Set home position=Posición en el mundo
Home position set to: @1=Posición de hogar cambiada a: @1
You don't have the "home" privilege!=¡No tienes el privilegio "home"!
Time of day set to 6am=Hora del día cambiada a 6AM
You don't have the settime privilege!=¡No tienes el privilegio "settime"!
Time of day set to 9pm=Hora del día cambiada a 9PM
Inventory cleared!=¡Inventario limpio!
Trash:=Basura:
Refill:=Rellenar:
Recipe @1 of @2=Receta @1 de @2
Result=Resultado
To craft grid:=Copiar al cuadro de elaboración
All=Todos
# waypoints.lua
White=Blanco
Yellow=Amarillo
Red=Rojo
Green=Verde
Blue=Azul
Waypoints=Puntos de paso
Waypoint @1=Puntos de paso @1
Waypoint active=Punto de paso activo
Waypoint inactive=Punto de paso inactivo
Waypoints=Puntos
Select Waypoint #@1=Seleccionar Punto #@1
Waypoint @1=Punto @1
Set waypoint to current location=Establecer el punto a la ubicación actual
Make waypoint @1=Hacer punto @1
invisible=invisible
visible=visible
@1 display of waypoint coordinates=Visualizar coordenadas del punto @1
Disable=Deshabilitado
Enable=Habilitado
Change color of waypoint display=Cambiar el color del punto
Edit waypoint name=Editar nombre del punto
Waypoint active=Punto activo
Waypoint inactive=Punto inactivo
Finish editing=Terminar edición
World position=Posición en el mundo
Name=Nombre
HUD text color=Color del HUD
HUD text color=Color del texto de la Interfaz
# group.lua
and = y
# register.lua
Can use the creative inventory=Puede usar el inventario creativo
Forces Unified Inventory to be displayed in Full mode if Lite mode is configured globally=Obliga al Inventario Unificado a mostrarse en modo Completo si el modo Simple está configurado globalmente
Crafting Grid=Cuadricula de Elaboración
Crafting Guide=Guía de Elaboración
Set home position=Establecer posición de la casa
Home position set to: @1=Posición de la casa cambiada a: @1
You don't have the \"home\" privilege!=¡No tienes el privilegio \"home\"!
Go home=Ir a casa
Set time to day=Cambiar a dia
Set time to night=Cambiar a noche
Time of day set to 6am=Hora del día cambiada a 6 AM
Time of day set to 9pm=Hora del día cambiada a 9 PM
You don't have the settime privilege!=¡No tienes el privilegio "settime"!
Clear inventory=Limpiar inventario
Inventory cleared!=¡Inventario limpio!
This button has been disabled outside=Este botón ha sido deshabilitado
Crafting=Elaboración
Trash:=Basura:
Refill:=Rellenar:
Any item belonging to the @1 group=Cualquier elemento que pertenezca al grupo @1
Any item belonging to the groups @1=Cualquier elemento perteneciente a los grupos @1
Recipe @1 of @2=Receta @1 de @2
Usage @1 of @2=Uso @1 de @2
No recipes=No tiene receta
No usages=No tiene uso
Result=Resultado
Ingredient=Ingrediente
Show next recipe=Mostrar la siguiente receta
Show next usage=Mostrar el siguiente uso
Show previous recipe=Mostrar la receta anterior
Show previous usage=Mostrar el uso anterior
@1 (@2)=@1 (@2)
Give me:=Dame:
This recipe is too@nlarge to be displayed.=Esta receta es demasiado@ngrande para ser mostrada.
To craft grid:=Construir:
All=Todos
# api.lua
Mixing=Mezclar
Cooking=Hornear
Digging=Recoger
# internal.lua
First page=Primera página
Back three pages=Volver tres páginas
Back one page=Volver una página
Forward one page=Avanzar una página
Forward three pages=Avanzar tres páginas
Last page=Ultima Pagina
Search=Buscar
Reset search and display everything=Limpiar la busqueda y mostrar todo
No matching items=No se encontraron elementos
No matches.=No hay resultados.
Page=Página
@1 of @2=@1 de @2
Filter=Filtro
# bags.lua
Bags=Bolsos
Bag @1=Bolso @1
Small Bag=Bolso Pequeño
Medium Bag=Bolso Mediano
Large Bag=Bolso Grande

View File

@ -0,0 +1,100 @@
# textdomain: unified_inventory
# waypoints.lua
White=
Yellow=
Red=
Green=
Blue=
Waypoints=
Select Waypoint #@1=
Waypoint @1=
Set waypoint to current location=
Make waypoint @1=
invisible=
visible=
@1 display of waypoint coordinates=
Disable=
Enable=
Change color of waypoint display=
Edit waypoint name=
Waypoint active=
Waypoint inactive=
Finish editing=
World position=
Name=
HUD text color=
# group.lua
and =
# register.lua
Can use the creative inventory=
Forces Unified Inventory to be displayed in Full mode if Lite mode is configured globally=
Crafting Grid=
Crafting Guide=
Set home position=
Home position set to: @1=
You don't have the \"home\" privilege!=
Go home=
Set time to day=
Set time to night=
Time of day set to 6am=
Time of day set to 9pm=
You don't have the settime privilege!=
Clear inventory=
Inventory cleared!=
This button has been disabled outside=
Crafting=
Trash:=
Refill:=
Any item belonging to the @1 group=
Any item belonging to the groups @1=
Recipe @1 of @2=
Usage @1 of @2=
No recipes=
No usages=
Result=
Ingredient=
Show next recipe=
Show next usage=
Show previous recipe=
Show previous usage=
@1 (@2)=
Give me:=
This recipe is too@nlarge to be displayed.=
To craft grid:=
All=
# api.lua
Mixing=
Cooking=
Digging=
# internal.lua
First page=
Back three pages=
Back one page=
Forward one page=
Forward three pages=
Last page=
Search=
Reset search and display everything=
No matching items=
No matches.=
Page=
@1 of @2=
Filter=
# bags.lua
Bags=
Bag @1=
Small Bag=
Medium Bag=
Large Bag=

View File

@ -386,7 +386,7 @@ unified_inventory.register_page("craftguide", {
else
-- Error
fs[#fs + 1] = string.format("label[2,%f;%s]",
formspecy, F(S("This recipe is too\nlarge to be displayed.")))
formspecy, F(S("This recipe is too@nlarge to be displayed.")))
end
if craft_type.uses_crafting_grid and display_size.width <= 3 then