mirror of
https://github.com/random-geek/morelights.git
synced 2024-08-20 13:04:10 +02: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
|
Some nodes (ceiling lights, bar lights, poles) can be rotated to serve
|
||||||
different purposes.
|
different purposes.
|
||||||
|
|
||||||
Morelights currently supports both Minetest Game and MineClone 2.
|
Morelights currently supports Minetest Game, MineClone 2, and Hades Revisited.
|
||||||
|
|
||||||
## Craft Recipes
|
## Craft Recipes
|
||||||
|
|
||||||
|
23
crafts.md
23
crafts.md
@ -1,17 +1,21 @@
|
|||||||
# Craft recipes for Morelights items
|
# 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.
|
Dye = white or dark grey dye, depending on the desired color of the item.
|
||||||
For MineClone 2, use bone meal or grey dye.
|
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 = 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
|
## Basic items
|
||||||
|
|
||||||
@ -185,7 +189,7 @@ Use light/dark grey wool.
|
|||||||
|
|
||||||
### Brass Ingot
|
### 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.
|
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 |
|
| Glass |
|
||||||
+--------+
|
+--------+
|
||||||
| Cotton |
|
| String |
|
||||||
+--------+
|
+--------+
|
||||||
| Brass |
|
| Brass |
|
||||||
+--------+
|
+--------+
|
||||||
```
|
```
|
||||||
|
|
||||||
For MineClone 2, use string instead of cotton.
|
|
||||||
|
|
||||||
### Vintage Chandelier
|
### 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
|
### Grass Light
|
||||||
|
|
||||||
@ -343,6 +346,8 @@ For MineClone 2, use polished stone.
|
|||||||
|
|
||||||
For MineClone 2, use cut sandstone.
|
For MineClone 2, use cut sandstone.
|
||||||
|
|
||||||
|
For Hades Revisited, use fine sandstone.
|
||||||
|
|
||||||
### Stair Light
|
### Stair Light
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -19,8 +19,8 @@ end
|
|||||||
|
|
||||||
function morelights.on_place_hanging(itemstack, placer, pointed_thing,
|
function morelights.on_place_hanging(itemstack, placer, pointed_thing,
|
||||||
ceilingName)
|
ceilingName)
|
||||||
local ceiling = minetest.get_node(vector.add(pointed_thing.above,
|
local ceiling = minetest.get_node(
|
||||||
{x=0, y=1, z=0}))
|
vector.add(pointed_thing.above, vector.new(0, 1, 0)))
|
||||||
|
|
||||||
if ceiling.name ~= "air"
|
if ceiling.name ~= "air"
|
||||||
and minetest.get_item_group(ceiling.name, "mounted_ceiling") == 0
|
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"
|
morelights.game = "hades_revisited"
|
||||||
else
|
else
|
||||||
error("Morelights requires a compatible game " ..
|
error("Morelights requires a compatible game " ..
|
||||||
"(Minetest Game, MineClone 2 or Hades Revisited).")
|
"(Minetest Game, MineClone 2, or Hades Revisited).")
|
||||||
end
|
end
|
||||||
|
|
||||||
if morelights.game == "minetest_game" then
|
if morelights.game == "minetest_game" then
|
||||||
@ -96,7 +96,7 @@ morelights.craft_items = {
|
|||||||
sandstone_block = "default:sandstone_block",
|
sandstone_block = "default:sandstone_block",
|
||||||
dirt = "default:dirt",
|
dirt = "default:dirt",
|
||||||
grass = "default:grass_1",
|
grass = "default:grass_1",
|
||||||
cotton = "farming:cotton",
|
string = "farming:string",
|
||||||
stick = "default:stick",
|
stick = "default:stick",
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,13 +119,12 @@ if morelights.game == "mineclone2" then
|
|||||||
a.sandstone_block = "mcl_core:sandstonesmooth"
|
a.sandstone_block = "mcl_core:sandstonesmooth"
|
||||||
a.dirt = "mcl_core:dirt"
|
a.dirt = "mcl_core:dirt"
|
||||||
a.grass = "mcl_flowers:tallgrass"
|
a.grass = "mcl_flowers:tallgrass"
|
||||||
a.cotton = "mcl_mobitems:string"
|
a.string = "mcl_mobitems:string"
|
||||||
a.stick = "mcl_core:stick"
|
a.stick = "mcl_core:stick"
|
||||||
end
|
elseif morelights.game == "hades_revisited" then
|
||||||
|
|
||||||
if morelights.game == "hades_revisited" then
|
|
||||||
a.glass = "hades_core:glass"
|
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.steel = "hades_core:steel_ingot"
|
||||||
a.copper = "hades_core:copper_ingot"
|
a.copper = "hades_core:copper_ingot"
|
||||||
a.tin = "hades_core:tin_ingot"
|
a.tin = "hades_core:tin_ingot"
|
||||||
@ -139,16 +138,14 @@ if morelights.game == "hades_revisited" then
|
|||||||
a.sandstone_block = "hades_core:sandstone"
|
a.sandstone_block = "hades_core:sandstone"
|
||||||
a.dirt = "hades_core:dirt"
|
a.dirt = "hades_core:dirt"
|
||||||
a.grass = "hades_grass:grass_1"
|
a.grass = "hades_grass:grass_1"
|
||||||
a.cotton = "hades_farming:cotton"
|
a.string = "hades_farming:cotton"
|
||||||
a.stick = "hades_core:stick"
|
a.stick = "hades_core:stick"
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Use basic_materials brass if available, otherwise register our own.
|
-- Use basic_materials brass if available, otherwise register our own.
|
||||||
if minetest.get_modpath("basic_materials") then
|
if minetest.get_modpath("basic_materials") then
|
||||||
a.brass = "basic_materials:brass_ingot"
|
a.brass = "basic_materials:brass_ingot"
|
||||||
elseif minetest.get_modpath("basic_materials") then
|
|
||||||
a.brass = "hades_extramaterials:brass_ingot"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local path = minetest.get_modpath("morelights")
|
local path = minetest.get_modpath("morelights")
|
||||||
dofile(path .. DIR_DELIM .. "nodes.lua")
|
dofile(path .. "/nodes.lua")
|
||||||
|
@ -35,26 +35,25 @@ do
|
|||||||
-- For MineClone 2, use node coloring to match environment.
|
-- For MineClone 2, use node coloring to match environment.
|
||||||
-- See the mcl_core:dirt_with_grass definition in
|
-- See the mcl_core:dirt_with_grass definition in
|
||||||
-- ITEMS/mcl_core/nodes_base.lua.
|
-- ITEMS/mcl_core/nodes_base.lua.
|
||||||
local override = {
|
def.tiles = {
|
||||||
tiles = {
|
|
||||||
"mcl_core_grass_block_top.png",
|
"mcl_core_grass_block_top.png",
|
||||||
{name = "default_dirt.png", color = "#FFFFFF"}
|
{name = "default_dirt.png", color = "#FFFFFF"}
|
||||||
},
|
}
|
||||||
overlay_tiles = {
|
def.overlay_tiles = {
|
||||||
{name = "morelights_extras_blocklight.png", color = "#FFFFFF"},
|
{name = "morelights_extras_blocklight.png", color = "#FFFFFF"},
|
||||||
"",
|
"",
|
||||||
{
|
{
|
||||||
name = "mcl_core_grass_block_side_overlay.png",
|
name = "mcl_core_grass_block_side_overlay.png",
|
||||||
tileable_vertical = false
|
tileable_vertical = false
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
paramtype2 = "color",
|
def.paramtype2 = "color"
|
||||||
palette = "mcl_core_palette_grass.png",
|
def.palette = "mcl_core_palette_grass.png"
|
||||||
palette_index = 0,
|
def.palette_index = 0
|
||||||
color = "#55aa60",
|
def.color = "#55aa60"
|
||||||
drop = "morelights_extras:dirt_with_grass",
|
def.drop = "morelights_extras:dirt_with_grass"
|
||||||
|
|
||||||
on_construct = function(pos)
|
def.on_construct = function(pos)
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
if node.param2 == 0 then
|
if node.param2 == 0 then
|
||||||
local grass_node = mcl_core.get_grass_block_type(pos)
|
local grass_node = mcl_core.get_grass_block_type(pos)
|
||||||
@ -66,29 +65,33 @@ do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
}
|
|
||||||
|
|
||||||
for k, v in pairs(override) do
|
|
||||||
def[k] = v
|
|
||||||
end
|
|
||||||
elseif morelights.game == "hades_revisited" then
|
elseif morelights.game == "hades_revisited" then
|
||||||
local override = {
|
-- For Hades Revisited, grass color is seasonal.
|
||||||
tiles = {
|
-- See hades_core/dirt.lua, ABM in hades_core/functions.lua.
|
||||||
"hades_core_grass_cover_colorable.png^morelights_extras_blocklight.png",
|
def.tiles = {
|
||||||
{name="default_dirt.png", color="white"},
|
"hades_core_grass_cover_colorable.png",
|
||||||
},
|
{name = "default_dirt.png", color = "#FFFFFF"},
|
||||||
overlay_tiles = {
|
}
|
||||||
|
def.overlay_tiles = {
|
||||||
{name = "morelights_extras_blocklight.png", color = "#FFFFFF"},
|
{name = "morelights_extras_blocklight.png", color = "#FFFFFF"},
|
||||||
"",
|
"",
|
||||||
{name="hades_core_grass_side_cover_colorable.png", tileable_vertical=false},
|
{
|
||||||
|
name = "hades_core_grass_side_cover_colorable.png",
|
||||||
|
tileable_vertical = false
|
||||||
},
|
},
|
||||||
paramtype2 = "color",
|
|
||||||
palette = "hades_core_palette_grass.png",
|
|
||||||
color = "#acef6a",
|
|
||||||
}
|
}
|
||||||
|
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.on_place = function(itemstack, placer, pointed_thing)
|
||||||
def[k] = v
|
local param2 = hades_core.get_seasonal_grass_color_param2()
|
||||||
|
return minetest.item_place(itemstack, placer, pointed_thing, param2)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -179,8 +182,8 @@ minetest.register_node("morelights_extras:stairlight", {
|
|||||||
or node.name:match("^mcl_stairs:stair_")) then
|
or node.name:match("^mcl_stairs:stair_")) then
|
||||||
-- Set `above` to the node actually above the stair, since that's
|
-- Set `above` to the node actually above the stair, since that's
|
||||||
-- where the node is placed.
|
-- where the node is placed.
|
||||||
pointed_thing.above = vector.add(pointed_thing.under,
|
pointed_thing.above =
|
||||||
{x=0, y=1, z=0})
|
vector.add(pointed_thing.under, vector.new(0, 1, 0))
|
||||||
return minetest.item_place_node(itemstack, placer, pointed_thing,
|
return minetest.item_place_node(itemstack, placer, pointed_thing,
|
||||||
node.param2)
|
node.param2)
|
||||||
end
|
end
|
||||||
|
@ -348,7 +348,7 @@ minetest.register_craft({
|
|||||||
output = "morelights_vintage:oillamp",
|
output = "morelights_vintage:oillamp",
|
||||||
recipe = {
|
recipe = {
|
||||||
{"", a.glass, ""},
|
{"", a.glass, ""},
|
||||||
{"", a.cotton, ""},
|
{"", a.string, ""},
|
||||||
{"", a.brass, ""}
|
{"", a.brass, ""}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user