mirror of
https://github.com/random-geek/morelights.git
synced 2025-01-04 11:57:33 +01:00
Fix Hades Revisited support, use cotton instead of string.
This commit is contained in:
parent
61f71446c6
commit
2406c8338b
@ -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
|
||||
|
||||
|
23
crafts.md
23
crafts.md
@ -1,17 +1,21 @@
|
||||
# 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, use regular
|
||||
glass.
|
||||
|
||||
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,7 +189,7 @@ 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.
|
||||
|
||||
@ -259,14 +263,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 +296,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 +346,8 @@ For MineClone 2, use polished stone.
|
||||
|
||||
For MineClone 2, use cut sandstone.
|
||||
|
||||
For Hades Revisited, use fine sandstone.
|
||||
|
||||
### Stair Light
|
||||
|
||||
```
|
||||
|
@ -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
|
||||
@ -57,7 +57,7 @@ elseif minetest.get_modpath("hades_core") then
|
||||
morelights.game = "hades_revisited"
|
||||
else
|
||||
error("Morelights requires a compatible game " ..
|
||||
"(Minetest Game, MineClone 2 or Hades Revisited).")
|
||||
"(Minetest Game, MineClone 2, or Hades Revisited).")
|
||||
end
|
||||
|
||||
if morelights.game == "minetest_game" then
|
||||
@ -96,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",
|
||||
}
|
||||
|
||||
@ -119,13 +119,12 @@ 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"
|
||||
end
|
||||
|
||||
if morelights.game == "hades_revisited" then
|
||||
elseif morelights.game == "hades_revisited" then
|
||||
a.glass = "hades_core:glass"
|
||||
a.glass_pane = "hades_xpanes:pane_flat"
|
||||
-- HR doesn't have glass panes. :(
|
||||
a.glass_pane = "hades_core:glass"
|
||||
a.steel = "hades_core:steel_ingot"
|
||||
a.copper = "hades_core:copper_ingot"
|
||||
a.tin = "hades_core:tin_ingot"
|
||||
@ -139,16 +138,14 @@ if morelights.game == "hades_revisited" then
|
||||
a.sandstone_block = "hades_core:sandstone"
|
||||
a.dirt = "hades_core:dirt"
|
||||
a.grass = "hades_grass:grass_1"
|
||||
a.cotton = "hades_farming:cotton"
|
||||
a.string = "hades_farming:cotton"
|
||||
a.stick = "hades_core:stick"
|
||||
end
|
||||
|
||||
-- Use basic_materials brass if available, otherwise register our own.
|
||||
if minetest.get_modpath("basic_materials") then
|
||||
a.brass = "basic_materials:brass_ingot"
|
||||
elseif minetest.get_modpath("basic_materials") then
|
||||
a.brass = "hades_extramaterials:brass_ingot"
|
||||
end
|
||||
|
||||
local path = minetest.get_modpath("morelights")
|
||||
dofile(path .. DIR_DELIM .. "nodes.lua")
|
||||
dofile(path .. "/nodes.lua")
|
||||
|
@ -35,60 +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
|
||||
}
|
||||
|
||||
for k, v in pairs(override) do
|
||||
def[k] = v
|
||||
end
|
||||
elseif morelights.game == "hades_revisited" then
|
||||
local override = {
|
||||
tiles = {
|
||||
"hades_core_grass_cover_colorable.png^morelights_extras_blocklight.png",
|
||||
{name="default_dirt.png", color="white"},
|
||||
},
|
||||
overlay_tiles = {
|
||||
{name = "morelights_extras_blocklight.png", color = "#FFFFFF"},
|
||||
"",
|
||||
{name="hades_core_grass_side_cover_colorable.png", tileable_vertical=false},
|
||||
},
|
||||
paramtype2 = "color",
|
||||
palette = "hades_core_palette_grass.png",
|
||||
color = "#acef6a",
|
||||
-- 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"},
|
||||
}
|
||||
|
||||
for k, v in pairs(override) do
|
||||
def[k] = v
|
||||
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"
|
||||
|
||||
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
|
||||
|
||||
@ -179,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
|
||||
|
@ -348,7 +348,7 @@ minetest.register_craft({
|
||||
output = "morelights_vintage:oillamp",
|
||||
recipe = {
|
||||
{"", a.glass, ""},
|
||||
{"", a.cotton, ""},
|
||||
{"", a.string, ""},
|
||||
{"", a.brass, ""}
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user