Merge pull request 'develop' (#40) from develop into master

Reviewed-on: #40
This commit is contained in:
Milan Meduna 2021-09-19 15:40:57 +02:00
commit 9843a1ce00
61 changed files with 672 additions and 382 deletions

View file

@ -118,7 +118,7 @@ end
-- by ChillCode, available under the MIT license.
local function deserialize_workaround(content)
local nodes
if not jit then
if not minetest.global_exists("jit") then
nodes = minetest.deserialize(content, true)
else
-- XXX: This is a filthy hack that works surprisingly well

View file

@ -279,7 +279,8 @@ minetest.register_node("bees:hive_wild", {
{items = {"bees:honey_comb"}, rarity = 5}
}
},
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, attached_node = 1},
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
--, attached_node = 1},
node_box = { -- VanessaE's wild hive nodebox contribution
type = "fixed",
fixed = {

View file

@ -68,6 +68,7 @@ if minetest.get_modpath("ethereal") then
{"ethereal:mushroom_sapling", ethereal.grow_mushroom_tree, "soil"},
{"ethereal:willow_sapling", ethereal.grow_willow_tree, "soil"},
{"ethereal:redwood_sapling", ethereal.grow_redwood_tree, "soil"},
{"ethereal:giant_redwood_sapling", ethereal.grow_giant_redwood_tree, "soil"},
{"ethereal:orange_tree_sapling", ethereal.grow_orange_tree, "soil"},
{"ethereal:bamboo_sprout", ethereal.grow_bamboo_tree, "soil"},
{"ethereal:birch_sapling", ethereal.grow_birch_tree, "soil"},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 B

After

Width:  |  Height:  |  Size: 173 B

View file

@ -1,6 +1,16 @@
local S = mobs.intllib
local master_types = {
{ nodes = {"nether:rack"},
skins = {"mobs_dungeon_master_nether.png"},
},
{ nodes = {"nether:rack_deep"},
skins = {"mobs_dungeon_master_netherdeep.png"},
}
}
-- Dungeon Master by PilzAdam
@ -59,13 +69,39 @@ mobs:register_mob("mobs_monster:dungeon_master", {
speed_normal = 15,
speed_run = 15,
},
-- check surrounding nodes and spawn a specific monster
on_spawn = function(self)
local pos = self.object:get_pos() ; pos.y = pos.y - 1
local tmp
for n = 1, #master_types do
tmp = master_types[n]
if minetest.find_node_near(pos, 1, tmp.nodes) then
self.base_texture = tmp.skins
self.object:set_properties({textures = tmp.skins})
if tmp.drops then
self.drops = tmp.drops
end
return true
end
end
return true -- run only once, false/nil runs every activation
end
})
if not mobs.custom_spawn_monster then
mobs:spawn({
name = "mobs_monster:dungeon_master",
nodes = {"default:stone"},
nodes = {"default:stone", "nether:rack", "nether:rack_deep"},
max_light = 5,
chance = 9000,
active_object_count = 1,

View file

@ -30,3 +30,7 @@ mobs.fireball.png was originally made by Sapier and edited by Benrob:
--
-- (c) Sapier
-- Contact sapier a t gmx net
Textures created by wwar (cc0)
mobs_dungeon_master_nether.png
mobs_dungeon_master_netherdeep.png

View file

@ -12,6 +12,9 @@ mobs:register_mob("mobs_monster:mese_monster", {
shoot_interval = 0.5,
arrow = "mobs_monster:mese_arrow",
shoot_offset = 2,
--arrow_override = function(self)
-- self.velocity = 20
--end,
hp_min = 10,
hp_max = 25,
armor = 80,

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View file

@ -8,7 +8,7 @@ local use_cmi = minetest.global_exists("cmi")
mobs = {
mod = "redo",
version = "20210801",
version = "20210905",
intllib = S,
invis = minetest.global_exists("invisibility") and invisibility or {}
}
@ -160,6 +160,7 @@ local mob_class = {
attack_players = true,
attack_npcs = true,
facing_fence = false,
_breed_countdown = nil,
_cmi_is_mob = true
}
@ -722,6 +723,13 @@ function mobs:effect(pos, amount, texture, min_size, max_size,
end
-- Thanks Wuzzy for the following editable settings
local HORNY_TIME = 30
local HORNY_AGAIN_TIME = 60 * 5 -- 5 minutes
local CHILD_GROW_TIME = 60 * 20 -- 20 minutes
-- update nametag colour
function mob_class:update_tag()
@ -740,9 +748,25 @@ function mob_class:update_tag()
col = "#FF0000"
end
-- build infotext
local text = ""
if self.horny == true then
text = "\nLoving: " .. (self.hornytimer - (HORNY_TIME + HORNY_AGAIN_TIME))
elseif self.child == true then
text = "\nGrowing: " .. (self.hornytimer - CHILD_GROW_TIME)
elseif self._breed_countdown then
text = "\nBreeding: " .. self._breed_countdown
end
self.infotext = "Health: " .. self.health .. " / " .. self.hp_max
.. "\n" .. "Owner: " .. self.owner
.. text
-- set changes
self.object:set_properties({
@ -1358,10 +1382,6 @@ function mob_class:follow_holding(clicker)
return false
end
-- Thanks Wuzzy for the following editable settings
local HORNY_TIME = 30
local HORNY_AGAIN_TIME = 60 * 5 -- 5 minutes
local CHILD_GROW_TIME = 60 * 20 -- 20 minutes
-- find two animals of same type and breed if nearby and horny
function mob_class:breed()
@ -1414,6 +1434,8 @@ function mob_class:breed()
self.hornytimer = 0
self.horny = false
end
self:update_tag()
end
-- find another same animal who is also horny and mate if nearby
@ -1469,6 +1491,8 @@ function mob_class:breed()
self.hornytimer = HORNY_TIME + 1
ent.hornytimer = HORNY_TIME + 1
self:update_tag()
-- have we reached active mob limit
if active_limit > 0 and active_mobs >= active_limit then
minetest.chat_send_player(self.owner,
@ -4667,25 +4691,25 @@ function mobs:feed_tame(self, clicker, feed_count, breed, tame)
self.object:set_hp(self.health)
self:update_tag()
-- make children grow quicker
if self.child == true then
-- self.hornytimer = self.hornytimer + 20
-- deduct 10% of the time to adulthood
self.hornytimer = self.hornytimer + (
(CHILD_GROW_TIME - self.hornytimer) * 0.1)
self.hornytimer = math.floor(self.hornytimer + (
(CHILD_GROW_TIME - self.hornytimer) * 0.1))
--print ("====", self.hornytimer)
return true
end
-- feed and tame
self.food = (self.food or 0) + 1
self._breed_countdown = feed_count - self.food
if self.food >= feed_count then
self.food = 0
self._breed_countdown = nil
if breed and self.hornytimer == 0 then
self.horny = true
@ -4711,6 +4735,8 @@ function mobs:feed_tame(self, clicker, feed_count, breed, tame)
self:mob_sound(self.sounds.random)
end
self:update_tag()
return true
end
@ -4740,6 +4766,22 @@ function mobs:feed_tame(self, clicker, feed_count, breed, tame)
return true
end
-- if mob follows items and user right clicks while holding sneak it shows info
if self.follow then
if clicker:get_player_control().sneak then
if type(self.follow) == "string" then
self.follow = {self.follow}
end
minetest.chat_send_player(clicker:get_player_name(),
S("@1 follows:\n- @2",
self.name:split(":")[2],
table.concat(self.follow, "\n- ")))
end
end
return false
end

View file

@ -337,6 +337,10 @@ function circular_saw.on_metadata_inventory_take(
local input_stack = inv:get_stack(listname, index)
if not input_stack:is_empty() and input_stack:get_name()~=stack:get_name() then
local player_inv = player:get_inventory()
-- Prevent arbitrary item duplication.
inv:remove_item(listname, input_stack)
if player_inv:room_for_item("main", input_stack) then
player_inv:add_item("main", input_stack)
end
@ -363,9 +367,15 @@ function circular_saw.on_metadata_inventory_take(
-- The recycle field plays no role here since it is processed immediately.
end
local has_default_mod = minetest.get_modpath("default")
function circular_saw.on_construct(pos)
local meta = minetest.get_meta(pos)
local fancy_inv = default.gui_bg..default.gui_bg_img..default.gui_slots
local fancy_inv = ""
if has_default_mod then
-- prepend background and slot styles from default if available
fancy_inv = default.gui_bg..default.gui_bg_img..default.gui_slots
end
meta:set_string(
"formspec", "size[11,10]"..fancy_inv..
"label[0,0;" ..F(S("Input\nmaterial")).. "]" ..
@ -437,7 +447,7 @@ minetest.register_node("moreblocks:circular_saw", {
sunlight_propagates = true,
paramtype2 = "facedir",
groups = {choppy = 2,oddly_breakable_by_hand = 2},
sounds = default.node_sound_wood_defaults(),
sounds = moreblocks.node_sound_wood_defaults(),
on_construct = circular_saw.on_construct,
can_dig = circular_saw.can_dig,
-- Set the owner of this circular saw.

View file

@ -17,9 +17,13 @@ moreblocks.S = S
moreblocks.NS = NS
dofile(modpath .. "/config.lua")
dofile(modpath .. "/sounds.lua")
dofile(modpath .. "/circular_saw.lua")
dofile(modpath .. "/stairsplus/init.lua")
dofile(modpath .. "/nodes.lua")
dofile(modpath .. "/redefinitions.lua")
dofile(modpath .. "/crafting.lua")
dofile(modpath .. "/aliases.lua")
if minetest.get_modpath("default") then
dofile(modpath .. "/nodes.lua")
dofile(modpath .. "/redefinitions.lua")
dofile(modpath .. "/crafting.lua")
dofile(modpath .. "/aliases.lua")
end

View file

@ -1,5 +1,4 @@
name = moreblocks
description = Adds various miscellaneous blocks to the game.
depends = default
optional_depends = intllib,stairs,farming,wool,basic_materials
optional_depends = default,intllib,stairs,farming,wool,basic_materials
min_minetest_version = 5.0.0

View file

@ -7,15 +7,15 @@ Licensed under the zlib license. See LICENSE.md for more information.
local S = moreblocks.S
local sound_dirt = default.node_sound_dirt_defaults()
local sound_wood = default.node_sound_wood_defaults()
local sound_stone = default.node_sound_stone_defaults()
local sound_glass = default.node_sound_glass_defaults()
local sound_leaves = default.node_sound_leaves_defaults()
local sound_dirt = moreblocks.node_sound_dirt_defaults()
local sound_wood = moreblocks.node_sound_wood_defaults()
local sound_stone = moreblocks.node_sound_stone_defaults()
local sound_glass = moreblocks.node_sound_glass_defaults()
local sound_leaves = moreblocks.node_sound_leaves_defaults()
-- Don't break on 0.4.14 and earlier.
local sound_metal = (default.node_sound_metal_defaults
and default.node_sound_metal_defaults() or sound_stone)
local sound_metal = (moreblocks.node_sound_metal_defaults
and moreblocks.node_sound_metal_defaults() or sound_stone)
local function tile_tiles(name)
local tex = "moreblocks_" ..name.. ".png"

View file

@ -0,0 +1,20 @@
--[[
More Blocks: sound definitions
Copyright © 2011-2021 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information.
--]]
local has_default_mod = minetest.get_modpath("default")
for _, sound in ipairs({"dirt", "wood", "stone", "metal", "glass", "leaves"}) do
-- use sound-function from default if available
-- otherwise fall back to a no-op function (no sounds)
local sound_function_name = "node_sound_" .. sound .. "_defaults"
if has_default_mod then
-- use default sounds
moreblocks[sound_function_name] = default[sound_function_name]
else
-- no-op
moreblocks[sound_function_name] = function() end
end
end

View file

@ -10,7 +10,7 @@
description = "Wooden",
tiles = {"default_wood.png"},
groups = {oddly_breakabe_by_hand=1},
sounds = default.node_sound_wood_defaults(),
sounds = moreblocks.node_sound_wood_defaults(),
})
```
The following register only a particular type of microblock.

View file

@ -69,7 +69,7 @@ local function register_custom_subset(subset, modname, subname, recipeitem, grou
description = description,
drop = drop,
light_source = light,
sounds = default.node_sound_stone_defaults(),
sounds = moreblocks.node_sound_stone_defaults(),
})
end

View file

@ -15,7 +15,7 @@ local function register_micro(modname, subname, recipeitem, groups, images, desc
description = description,
drop = drop,
light_source = light,
sounds = default.node_sound_stone_defaults(),
sounds = moreblocks.node_sound_stone_defaults(),
})
end

View file

@ -15,7 +15,7 @@ local function register_panel(modname, subname, recipeitem, groups, images, desc
description = description,
drop = drop,
light_source = light,
sounds = default.node_sound_stone_defaults(),
sounds = moreblocks.node_sound_stone_defaults(),
})
end

View file

@ -6,75 +6,77 @@ Licensed under the zlib license. See LICENSE.md for more information.
--]]
-- default registrations
local default_nodes = { -- Default stairs/slabs/panels/microblocks:
"stone",
"stone_block",
"cobble",
"mossycobble",
"brick",
"sandstone",
"steelblock",
"goldblock",
"copperblock",
"bronzeblock",
"diamondblock",
"tinblock",
"desert_stone",
"desert_stone_block",
"desert_cobble",
"meselamp",
"glass",
"tree",
"wood",
"jungletree",
"junglewood",
"pine_tree",
"pine_wood",
"acacia_tree",
"acacia_wood",
"aspen_tree",
"aspen_wood",
"obsidian",
"obsidian_block",
"obsidianbrick",
"obsidian_glass",
"stonebrick",
"desert_stonebrick",
"sandstonebrick",
"silver_sandstone",
"silver_sandstone_brick",
"silver_sandstone_block",
"desert_sandstone",
"desert_sandstone_brick",
"desert_sandstone_block",
"sandstone_block",
"coral_skeleton",
"ice",
}
if minetest.get_modpath("default") then
local default_nodes = { -- Default stairs/slabs/panels/microblocks:
"stone",
"stone_block",
"cobble",
"mossycobble",
"brick",
"sandstone",
"steelblock",
"goldblock",
"copperblock",
"bronzeblock",
"diamondblock",
"tinblock",
"desert_stone",
"desert_stone_block",
"desert_cobble",
"meselamp",
"glass",
"tree",
"wood",
"jungletree",
"junglewood",
"pine_tree",
"pine_wood",
"acacia_tree",
"acacia_wood",
"aspen_tree",
"aspen_wood",
"obsidian",
"obsidian_block",
"obsidianbrick",
"obsidian_glass",
"stonebrick",
"desert_stonebrick",
"sandstonebrick",
"silver_sandstone",
"silver_sandstone_brick",
"silver_sandstone_block",
"desert_sandstone",
"desert_sandstone_brick",
"desert_sandstone_block",
"sandstone_block",
"coral_skeleton",
"ice",
}
for _, name in pairs(default_nodes) do
local mod = "default"
local nodename = mod .. ":" .. name
local ndef = table.copy(minetest.registered_nodes[nodename])
ndef.sunlight_propagates = true
for _, name in pairs(default_nodes) do
local mod = "default"
local nodename = mod .. ":" .. name
local ndef = table.copy(minetest.registered_nodes[nodename])
ndef.sunlight_propagates = true
-- Stone and desert_stone drop cobble and desert_cobble respectively.
if type(ndef.drop) == "string" then
ndef.drop = ndef.drop:gsub(".+:", "")
-- Stone and desert_stone drop cobble and desert_cobble respectively.
if type(ndef.drop) == "string" then
ndef.drop = ndef.drop:gsub(".+:", "")
end
-- Use the primary tile for all sides of cut glasslike nodes and disregard paramtype2.
if #ndef.tiles > 1 and ndef.drawtype and ndef.drawtype:find("glass") then
ndef.tiles = {ndef.tiles[1]}
ndef.paramtype2 = nil
end
mod = "moreblocks"
stairsplus:register_all(mod, name, nodename, ndef)
minetest.register_alias_force("stairs:stair_" .. name, mod .. ":stair_" .. name)
minetest.register_alias_force("stairs:stair_outer_" .. name, mod .. ":stair_" .. name .. "_outer")
minetest.register_alias_force("stairs:stair_inner_" .. name, mod .. ":stair_" .. name .. "_inner")
minetest.register_alias_force("stairs:slab_" .. name, mod .. ":slab_" .. name)
end
-- Use the primary tile for all sides of cut glasslike nodes and disregard paramtype2.
if #ndef.tiles > 1 and ndef.drawtype and ndef.drawtype:find("glass") then
ndef.tiles = {ndef.tiles[1]}
ndef.paramtype2 = nil
end
mod = "moreblocks"
stairsplus:register_all(mod, name, nodename, ndef)
minetest.register_alias_force("stairs:stair_" .. name, mod .. ":stair_" .. name)
minetest.register_alias_force("stairs:stair_outer_" .. name, mod .. ":stair_" .. name .. "_outer")
minetest.register_alias_force("stairs:stair_inner_" .. name, mod .. ":stair_" .. name .. "_inner")
minetest.register_alias_force("stairs:slab_" .. name, mod .. ":slab_" .. name)
end
-- farming registrations
@ -118,7 +120,7 @@ if minetest.get_modpath("basic_materials") then
description = "Concrete",
tiles = {"basic_materials_concrete_block.png",},
groups = {cracky=1, level=2, concrete=1},
sounds = default.node_sound_stone_defaults(),
sounds = moreblocks.node_sound_stone_defaults(),
})
minetest.register_alias("prefab:concrete_stair","technic:stair_concrete")
@ -128,7 +130,7 @@ if minetest.get_modpath("basic_materials") then
description = "Cement",
tiles = {"basic_materials_cement_block.png"},
groups = {cracky=2, not_in_creative_inventory=1},
sounds = default.node_sound_stone_defaults(),
sounds = moreblocks.node_sound_stone_defaults(),
sunlight_propagates = true,
})

View file

@ -15,7 +15,7 @@ local function register_slab(modname, subname, recipeitem, groups, images, descr
description = description,
drop = drop,
light_source = light,
sounds = default.node_sound_stone_defaults(),
sounds = moreblocks.node_sound_stone_defaults(),
})
end

View file

@ -15,7 +15,7 @@ local function register_slope(modname, subname, recipeitem, groups, images, desc
description = description,
drop = drop,
light_source = light,
sounds = default.node_sound_stone_defaults(),
sounds = moreblocks.node_sound_stone_defaults(),
})
end

View file

@ -15,7 +15,7 @@ local function register_stair(modname, subname, recipeitem, groups, images, desc
description = description,
drop = drop,
light_source = light,
sounds = default.node_sound_stone_defaults(),
sounds = moreblocks.node_sound_stone_defaults(),
})
end

View file

@ -17,7 +17,7 @@ models.
Some nodes (ceiling lights, bar lights, poles) can be rotated to serve
different purposes.
Morelights currently supports both Minetest Game and MineClone 2.
Morelights currently supports Minetest Game, MineClone 2, and Hades Revisited.
## Craft Recipes

View file

@ -1,17 +1,22 @@
# Craft recipes for Morelights items
Copper = copper ingot (Minetest Game) or redstone (MineClone 2)
Copper = copper ingot (Minetest Game, Hades Revisited) or redstone
(MineClone 2).
Dye = white or dark grey dye, depending on the desired color of the item.
For MineClone 2, use bone meal or grey dye.
Dark Wood = jungle wood planks (Minetest Game) or spruce wood (MineClone 2).
Dark Wood = jungle wood planks (Minetest Game), spruce wood (MineClone 2), or
tropical wood planks (Hades Revisited).
Glass = regular, non-stained glass block.
Glass Pane = regular, non-stained glass pane.
Glass Pane = regular, non-stained glass pane. For Hades Revisited, if
`hades_extensionmods`/`hades_xpanes` is not available, use regular glass
instead.
Steel = steel ingot (Minetest Game) or iron ingot (MineClone 2).
Steel = steel ingot (Minetest Game, Hades Revisited) or iron ingot
(MineClone 2).
## Basic items
@ -185,10 +190,12 @@ Use light/dark grey wool.
### Brass Ingot
Minetest Game: Craft from one steel and one tin ingot.
Minetest Game, Hades Revisited: Craft from one steel and one tin ingot.
MineClone 2: Craft from one iron ingot and one redstone.
If `basic_materials` is installed, its Brass Ingot will be used instead.
### Brass Chain
```
@ -259,14 +266,12 @@ MineClone 2: Craft from one iron ingot and one redstone.
+--------+
| Glass |
+--------+
| Cotton |
| String |
+--------+
| Brass |
+--------+
```
For MineClone 2, use string instead of cotton.
### Vintage Chandelier
```
@ -294,7 +299,8 @@ For MineClone 2, use string instead of cotton.
+---------+-------+---------+
```
Crystal = mese fragment (Minetest Game) or nether quartz (MineClone 2).
Crystal = mese fragment (Minetest Game, Hades Revisited) or nether quartz
(MineClone 2).
### Grass Light
@ -343,6 +349,8 @@ For MineClone 2, use polished stone.
For MineClone 2, use cut sandstone.
For Hades Revisited, use fine sandstone.
### Stair Light
```

View file

@ -1,2 +1,3 @@
name = morelights
description = A lightweight modpack providing flexible interior and exterior lighting options for different styles of builds.
min_minetest_version = 5.4

View file

@ -19,8 +19,8 @@ end
function morelights.on_place_hanging(itemstack, placer, pointed_thing,
ceilingName)
local ceiling = minetest.get_node(vector.add(pointed_thing.above,
{x=0, y=1, z=0}))
local ceiling = minetest.get_node(
vector.add(pointed_thing.above, vector.new(0, 1, 0)))
if ceiling.name ~= "air"
and minetest.get_item_group(ceiling.name, "mounted_ceiling") == 0
@ -53,9 +53,11 @@ if minetest.get_modpath("mcl_core") then
morelights.game = "mineclone2"
elseif minetest.get_modpath("default") then
morelights.game = "minetest_game"
elseif minetest.get_modpath("hades_core") then
morelights.game = "hades_revisited"
else
error("Morelights requires a compatible game " ..
"(Minetest Game or MineClone 2).")
"(Minetest Game, MineClone 2, or Hades Revisited).")
end
if morelights.game == "minetest_game" then
@ -70,6 +72,12 @@ elseif morelights.game == "mineclone2" then
glass = mcl_sounds.node_sound_glass_defaults(),
metal = mcl_sounds.node_sound_metal_defaults()
}
elseif morelights.game == "hades_revisited" then
morelights.sounds = {
default = hades_sounds.node_sound_defaults(),
glass = hades_sounds.node_sound_glass_defaults(),
metal = hades_sounds.node_sound_metal_defaults()
}
end
morelights.craft_items = {
@ -88,7 +96,7 @@ morelights.craft_items = {
sandstone_block = "default:sandstone_block",
dirt = "default:dirt",
grass = "default:grass_1",
cotton = "farming:cotton",
string = "farming:string",
stick = "default:stick",
}
@ -111,8 +119,31 @@ if morelights.game == "mineclone2" then
a.sandstone_block = "mcl_core:sandstonesmooth"
a.dirt = "mcl_core:dirt"
a.grass = "mcl_flowers:tallgrass"
a.cotton = "mcl_mobitems:string"
a.string = "mcl_mobitems:string"
a.stick = "mcl_core:stick"
elseif morelights.game == "hades_revisited" then
a.glass = "hades_core:glass"
-- HR doesn't have glass panes. :(
a.glass_pane = "hades_core:glass"
if minetest.get_modpath("hades_xpanes") then
a.glass_pane = "hades_xpanes:pane_flat"
end
a.steel = "hades_core:steel_ingot"
a.copper = "hades_core:copper_ingot"
a.tin = "hades_core:tin_ingot"
a.crystal_fragment = "hades_core:mese_crystal_fragment"
a.dye_dark = "dye:dark_grey"
a.dye_light = "dye:white"
a.wool_dark = "wool:grey"
a.wool_light = "wool:white"
a.wood_dark = "hades_trees:jungle_wood"
a.stone_block = "hades_core:stone_block"
a.sandstone_block = "hades_core:sandstone"
a.dirt = "hades_core:dirt"
a.grass = "hades_grass:grass_1"
a.string = "hades_farming:cotton"
a.stick = "hades_core:stick"
end
-- Use basic_materials brass if available, otherwise register our own.
@ -121,4 +152,4 @@ if minetest.get_modpath("basic_materials") then
end
local path = minetest.get_modpath("morelights")
dofile(path .. DIR_DELIM .. "nodes.lua")
dofile(path .. "/nodes.lua")

View file

@ -1,3 +1,3 @@
name = morelights
description = Base mod providing basic items, which the rest of the modpack depends on.
optional_depends = default, mcl_core
optional_depends = default, mcl_core, hades_core

View file

@ -35,41 +35,63 @@ do
-- For MineClone 2, use node coloring to match environment.
-- See the mcl_core:dirt_with_grass definition in
-- ITEMS/mcl_core/nodes_base.lua.
local override = {
tiles = {
"mcl_core_grass_block_top.png",
{name = "default_dirt.png", color = "#FFFFFF"}
},
overlay_tiles = {
{name = "morelights_extras_blocklight.png", color = "#FFFFFF"},
"",
{
name = "mcl_core_grass_block_side_overlay.png",
tileable_vertical = false
}
},
paramtype2 = "color",
palette = "mcl_core_palette_grass.png",
palette_index = 0,
color = "#55aa60",
drop = "morelights_extras:dirt_with_grass",
def.tiles = {
"mcl_core_grass_block_top.png",
{name = "default_dirt.png", color = "#FFFFFF"}
}
def.overlay_tiles = {
{name = "morelights_extras_blocklight.png", color = "#FFFFFF"},
"",
{
name = "mcl_core_grass_block_side_overlay.png",
tileable_vertical = false
}
}
def.paramtype2 = "color"
def.palette = "mcl_core_palette_grass.png"
def.palette_index = 0
def.color = "#55aa60"
def.drop = "morelights_extras:dirt_with_grass"
on_construct = function(pos)
local node = minetest.get_node(pos)
if node.param2 == 0 then
local grass_node = mcl_core.get_grass_block_type(pos)
if grass_node.param2 ~= 0 then
minetest.set_node(pos, {
name = "morelights_extras:dirt_with_grass",
param2 = grass_node.param2
})
end
def.on_construct = function(pos)
local node = minetest.get_node(pos)
if node.param2 == 0 then
local grass_node = mcl_core.get_grass_block_type(pos)
if grass_node.param2 ~= 0 then
minetest.set_node(pos, {
name = "morelights_extras:dirt_with_grass",
param2 = grass_node.param2
})
end
end
end
elseif morelights.game == "hades_revisited" then
-- For Hades Revisited, grass color is seasonal.
-- See hades_core/dirt.lua, ABM in hades_core/functions.lua.
def.tiles = {
"hades_core_grass_cover_colorable.png",
{name = "default_dirt.png", color = "#FFFFFF"},
}
def.overlay_tiles = {
{name = "morelights_extras_blocklight.png", color = "#FFFFFF"},
"",
{
name = "hades_core_grass_side_cover_colorable.png",
tileable_vertical = false
},
}
def.paramtype2 = "color"
def.palette = "hades_core_palette_grass.png"
def.palette_index = 0
def.color = "#acef6a"
-- To enable seasonal grass coloring.
def.groups.dirt_with_grass = 1
-- To prevent color retention on digging.
def.drop = "morelights_extras:dirt_with_grass"
for k, v in pairs(override) do
def[k] = v
def.on_place = function(itemstack, placer, pointed_thing)
local param2 = hades_core.get_seasonal_grass_color_param2()
return minetest.item_place(itemstack, placer, pointed_thing, param2)
end
end
@ -97,6 +119,8 @@ do
local tile = "default_sandstone_block.png"
if morelights.game == "mineclone2" then
tile = "mcl_core_sandstone_smooth.png"
elseif morelights.game == "hades_revisited" then
tile = "default_sandstone.png"
end
minetest.register_node("morelights_extras:sandstone_block", {
@ -158,8 +182,8 @@ minetest.register_node("morelights_extras:stairlight", {
or node.name:match("^mcl_stairs:stair_")) then
-- Set `above` to the node actually above the stair, since that's
-- where the node is placed.
pointed_thing.above = vector.add(pointed_thing.under,
{x=0, y=1, z=0})
pointed_thing.above =
vector.add(pointed_thing.under, vector.new(0, 1, 0))
return minetest.item_place_node(itemstack, placer, pointed_thing,
node.param2)
end

View file

@ -348,7 +348,7 @@ minetest.register_craft({
output = "morelights_vintage:oillamp",
recipe = {
{"", a.glass, ""},
{"", a.cotton, ""},
{"", a.string, ""},
{"", a.brass, ""}
}
})

View file

@ -805,4 +805,4 @@ if minetest.get_modpath("mesecons_mvps") then
end
print (S("[MOD] Protector Redo loaded"))
print ("[MOD] Protector Redo loaded")

View file

@ -23,7 +23,7 @@ and minetest.settings:get_bool("protector_pvp") then
if not player
or not hitter then
print(S("[Protector] on_punchplayer called with nil objects"))
print("[Protector] on_punchplayer called with nil objects")
end
if not hitter:is_player() then
@ -64,9 +64,9 @@ and minetest.settings:get_bool("protector_pvp") then
end)
else
print(S("[Protector] pvp_protect not active, update your version of Minetest"))
print("[Protector] pvp_protect not active, update your version of Minetest")
end
else
print(S("[Protector] pvp_protect is disabled"))
print("[Protector] pvp_protect is disabled")
end

View file

@ -78,6 +78,11 @@ minetest.register_craftitem("protector:tool", {
return
end
-- do not place protector out of map bounds
if minetest.find_node_near(pos, 1, {"ignore"}) then
return
end
-- do we have protectors to use ?
local nod
local inv = user:get_inventory()

View file

@ -1,3 +1,3 @@
Skeleton
I dont know
CC BY-SA 3.0
CC BY-SA 4.0

View file

@ -0,0 +1,3 @@
TommyInnit
Christian_Soldier
CC 0 (1.0)

View file

@ -0,0 +1,3 @@
Dream(fixed4Real)
Christian_Soldier
CC 0 (1.0)

View file

@ -0,0 +1,3 @@
Ranboo
Christian_Soldier
CC 0 (1.0)

View file

@ -0,0 +1,3 @@
nick_ I
nick_
CC BY-SA 3.0

View file

@ -0,0 +1,3 @@
RedMiniontoby
Miniontoby
CC BY-NC-SA 4.0

View file

@ -0,0 +1,3 @@
Steven
Tim7
CC BY-SA 3.0

View file

@ -0,0 +1,3 @@
Mal
TheMalaysianDude
CC BY-SA 3.0

View file

@ -0,0 +1,3 @@
Paintball Gun Pixel 3D Zombie
Mercenary S. Double 1.8W
CC BY-SA 4.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 580 B

View file

@ -186,6 +186,7 @@ tubelib_addons13 optional: minecart
- 2020-11-20 V2.04 * Switch to AGPL v3, adapt to minetest 5.3, add translation support, fix minor bugs
- 2021-01-24 V2.05 * PR #74, #76: Implement checks for valid connection sides for many nodes
- 2021-06-06 V2.06 * PR #78 - #89, chest cart added
- 2021-09-03 V2.07 * FR #103, Add Altitude to harvester menu
## New in v2 (from players point of view)

View file

@ -693,7 +693,7 @@ minetest.register_node("gravelsieve:compressed_gravel", {
})
minetest.register_craft({
output = "gravelsieve:sieve",
output = "gravelsieve:sieve3",
recipe = {
{"group:wood", "", "group:wood"},
{"group:wood", "default:steel_ingot", "group:wood"},
@ -702,10 +702,10 @@ minetest.register_craft({
})
minetest.register_craft({
output = "gravelsieve:auto_sieve",
output = "gravelsieve:auto_sieve3",
type = "shapeless",
recipe = {
"gravelsieve:sieve", "default:mese_crystal", "default:mese_crystal",
"gravelsieve:sieve3", "default:mese_crystal", "default:mese_crystal",
},
})

View file

@ -14,6 +14,18 @@
]]--
local function is_source(pos,meta, item)
local inv = minetest.get_inventory({type="node", pos=pos})
local name = item:get_name()
if meta:get_string("src_item") == name then
return true
elseif inv:get_stack("src", 1):get_name() == name then
meta:set_string("src_item", name)
return true
end
return false
end
tubelib.register_node("default:chest", {"default:chest_open"}, {
on_pull_item = function(pos, side)
local meta = minetest.get_meta(pos)
@ -65,7 +77,9 @@ tubelib.register_node("default:furnace", {"default:furnace_active"}, {
on_push_item = function(pos, side, item)
local meta = minetest.get_meta(pos)
minetest.get_node_timer(pos):start(1.0)
if minetest.get_craft_result({method="fuel", width=1, items={item}}).time ~= 0 then
if is_source(pos, meta, item) then
return tubelib.put_item(meta, "src", item)
elseif minetest.get_craft_result({method="fuel", width=1, items={item}}).time ~= 0 then
return tubelib.put_item(meta, "fuel", item)
else
return tubelib.put_item(meta, "src", item)

View file

@ -315,7 +315,75 @@ function tubelib.add_grinder_recipe(recipe)
recipe.type = "grinding"
unified_inventory.register_craft(recipe)
end
end
end
local function remove_unified_inventory_recipe(recipe)
if recipe.input and recipe.output then
local output_name = ItemStack(recipe.output):get_name()
local crafts = unified_inventory.crafts_for.recipe[output_name]
if crafts then
for i, craft in ipairs(crafts) do
if craft.type == recipe.type
and ItemStack(craft.output):get_name() == output_name
and #craft.items == 1
and craft.items[1] == recipe.input
then
table.remove(crafts, i)
break
end
end
end
elseif recipe.input then
for output_name, crafts in pairs(unified_inventory.crafts_for.recipe) do
for i, craft in ipairs(crafts) do
if craft.type == recipe.type
and #craft.items == 1
and craft.items[1] == recipe.input
then
table.remove(crafts, i)
break
end
end
end
elseif recipe.output then
local output_name = ItemStack(recipe.output):get_name()
local crafts = unified_inventory.crafts_for.recipe[output_name]
if crafts then
for i, craft in ipairs(crafts) do
if craft.type == recipe.type
and ItemStack(craft.output):get_name() == output_name then