Add support for Aurum.

master
Beha 2021-06-14 12:01:28 -04:00
parent babd508a35
commit ca1c77696a
4 changed files with 58 additions and 11 deletions

5
.editorconfig Normal file
View File

@ -0,0 +1,5 @@
root = true
[*]
indent_style = space
indent_size = 4

View File

@ -5,6 +5,7 @@ local get_node = elevator.get_node
local homedecor_path = minetest.get_modpath("homedecor")
local mineclone_path = core.get_modpath("mcl_core") and mcl_core
local default_path = core.get_modpath("default") and default
local aurum_path = core.get_modpath("aurum") and aurum
local moditems = {} -- local table to hold substitutes
@ -46,7 +47,7 @@ if mineclone_path then
moditems.el_motor_gfx = "elevator_motor_mcl.png"
moditems.el_shaft_gfx = "elevator_shaft_mcl.png"
moditems.el_box_gfx = "elevator_box_mcl.png"
moditems.steel_block_image = "default_steel_block.png"
elseif default_path then
moditems.el_shaft_groups = {cracky=2,oddly_breakable_by_hand=0} -- removing ability to destroy by hand to prevent accidental breakage of whole elevators
moditems.el_motor_groups = {cracky=1}
@ -56,6 +57,21 @@ elseif default_path then
moditems.el_motor_gfx = "elevator_motor.png"
moditems.el_shaft_gfx = "elevator_shaft.png"
moditems.el_box_gfx = "elevator_box.png"
moditems.steel_block_image = "default_steel_block.png"
elseif aurum_path then
moditems.el_shaft_groups = {dig_pick = 2}
moditems.el_motor_groups = {dig_pick = 1}
moditems.elevator_groups = {dig_pick = 1}
moditems.elevator_special_groups = {not_in_creative_inventory=1}
moditems.sounds_stone = aurum.sounds.stone
moditems.el_motor_gfx = "elevator_motor.png"
moditems.el_shaft_gfx = "elevator_shaft.png"
moditems.el_box_gfx = "elevator_box.png"
moditems.steel_block_image = "aurum_ore_white.png^[colorize:#cbcdcd:255^aurum_ore_bumps.png^aurum_ore_block.png"
end
if minetest.global_exists("screwdriver") then
moditems.on_rotate_disallow = screwdriver.disallow
end
minetest.register_node("elevator:shaft", {
@ -63,7 +79,7 @@ minetest.register_node("elevator:shaft", {
tiles = { moditems.el_shaft_gfx },
drawtype = "nodebox",
paramtype = "light",
on_rotate = screwdriver.disallow,
on_rotate = moditems.on_rotate_disallow,
sunlight_propagates = true,
groups = moditems.el_shaft_groups,
sounds = moditems.sounds_stone(),
@ -100,8 +116,8 @@ minetest.register_node("elevator:shaft", {
minetest.register_node("elevator:motor", {
description = "Elevator Motor",
tiles = {
"default_steel_block.png",
"default_steel_block.png",
moditems.steel_block_image,
moditems.steel_block_image,
moditems.el_motor_gfx,
moditems.el_motor_gfx,
moditems.el_motor_gfx,
@ -162,8 +178,8 @@ minetest.register_node("elevator:elevator_box", {
},
tiles = {
"default_steel_block.png",
"default_steel_block.png",
moditems.steel_block_image,
moditems.steel_block_image,
moditems.el_box_gfx,
moditems.el_box_gfx,
moditems.el_box_gfx,
@ -212,7 +228,7 @@ for _,mode in ipairs({"on", "off"}) do
sunlight_propagates = false,
paramtype = "light",
paramtype2 = "facedir",
on_rotate = screwdriver.disallow,
on_rotate = moditems.on_rotate_disallow,
selection_box = {
type = "fixed",
@ -230,8 +246,8 @@ for _,mode in ipairs({"on", "off"}) do
},
tiles = on and {
"default_steel_block.png",
"default_steel_block.png",
moditems.steel_block_image,
moditems.steel_block_image,
moditems.el_box_gfx,
moditems.el_box_gfx,
moditems.el_box_gfx,

View File

@ -2,6 +2,7 @@
local technic_path = minetest.get_modpath("technic")
local chains_path = minetest.get_modpath("chains")
local mineclone_path = core.get_modpath("mcl_core") and mcl_core
local aurum_path = core.get_modpath("aurum") and aurum
if mineclone_path then
minetest.register_craft({
@ -29,7 +30,32 @@ if mineclone_path then
{"mcl_core:paper", "mcl_core:gold_ingot", "mcl_core:paper"}
},
})
elseif aurum_path then
minetest.register_craft({
output = "elevator:elevator",
recipe = {
{"aurum_ore:iron_ingot", "group:glass", "aurum_ore:iron_ingot"},
{"aurum_ore:iron_ingot", "aurum_ore:mana_bean", "aurum_ore:iron_ingot"},
{"aurum_ore:iron_ingot", "group:glass", "aurum_ore:iron_ingot"},
},
})
minetest.register_craft({
output = "elevator:shaft",
recipe = {
{"group:glass", "aurum_ore:iron_ingot"},
{"group:wood", "group:glass"},
},
})
minetest.register_craft({
output = "elevator:motor",
recipe = {
{"aurum_ore:gold_ingot", "aurum_ore:iron_ingot", "aurum_ore:gold_ingot"},
{"aurum_ore:iron_block", "aurum_cook:oven", "aurum_ore:iron_block"},
{"aurum_ore:gold_ingot", "aurum_ore:mana_bean", "aurum_ore:gold_ingot"}
},
})
elseif technic_path and chains_path then
minetest.register_craft({
output = "elevator:elevator",

View File

@ -1,3 +1,3 @@
name = elevator
description = An entity-based elevator allowing fast realtime travel in Minetest. Supports Minetest Game and MineClone2.
optional_depends = default, technic, homedecor, chains, farming, mcl_core, mcl_sounds
description = An entity-based elevator allowing fast realtime travel in Minetest. Supports Minetest Game, MineClone2, and Aurum
optional_depends = default, technic, homedecor, chains, farming, mcl_core, mcl_sounds, aurum, screwdriver