Added BHB/Void pedestal
This commit is contained in:
parent
fb38d120c5
commit
df7d7136bd
|
@ -9,19 +9,19 @@
|
||||||
- [x] Make collectors use ProjectExpansion's textures
|
- [x] Make collectors use ProjectExpansion's textures
|
||||||
- [x] Add Evertide Amulet
|
- [x] Add Evertide Amulet
|
||||||
- [x] Add Volcanite Amulet
|
- [x] Add Volcanite Amulet
|
||||||
- [ ] Add Zero Ring
|
|
||||||
- [ ] Add Ring of Ignition
|
|
||||||
- [x] Add Black Hole Band (without bag functionality)
|
- [x] Add Black Hole Band (without bag functionality)
|
||||||
- [x] Add Void Ring
|
- [x] Add Void Ring
|
||||||
- [x] Add DM Pedestal
|
- [x] Add DM Pedestal
|
||||||
|
- [ ] Add Zero Ring
|
||||||
|
- [ ] Add Ring of Ignition
|
||||||
- [ ] Add Pedestal abilities
|
- [ ] Add Pedestal abilities
|
||||||
- [x] Passive Stones
|
- [x] Passive Stones
|
||||||
- [x] Talisman
|
- [x] Talisman
|
||||||
- [x] Evertide
|
- [x] Evertide
|
||||||
- [x] Volcanite
|
- [x] Volcanite
|
||||||
|
- [x] Black Hole/Void
|
||||||
- [ ] Zero
|
- [ ] Zero
|
||||||
- [ ] Ignition
|
- [ ] Ignition
|
||||||
- [ ] Black Hole/Void
|
|
||||||
- [ ] Update wiki
|
- [ ] Update wiki
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
|
@ -112,8 +112,8 @@ for color, color_data in pairs(exchangeclone.colors) do
|
||||||
end
|
end
|
||||||
if pointed_thing.type == "node"
|
if pointed_thing.type == "node"
|
||||||
and minetest.get_item_group(minetest.get_node(pointed_thing.under).name, "advanced_alchemical_chest") > 0 then
|
and minetest.get_item_group(minetest.get_node(pointed_thing.under).name, "advanced_alchemical_chest") > 0 then
|
||||||
if minetest.is_protected(player) then
|
if minetest.is_protected(pointed_thing.under, player:get_player_name()) then
|
||||||
minetest.record_protection_violation(player)
|
minetest.record_protection_violation(pointed_thing.under, player:get_player_name())
|
||||||
else
|
else
|
||||||
minetest.set_node(pointed_thing.under, {name=advanced_itemstring})
|
minetest.set_node(pointed_thing.under, {name=advanced_itemstring})
|
||||||
local on_construct = alchemical_on_construct(color_data.name)
|
local on_construct = alchemical_on_construct(color_data.name)
|
||||||
|
|
|
@ -5,9 +5,6 @@ local function pickup_items(player)
|
||||||
for j = 1, #objs do
|
for j = 1, #objs do
|
||||||
local obj = objs[j]
|
local obj = objs[j]
|
||||||
if obj:get_luaentity() and obj:get_luaentity().name == "__builtin:item" then
|
if obj:get_luaentity() and obj:get_luaentity().name == "__builtin:item" then
|
||||||
local objpos = obj:get_pos()
|
|
||||||
local objdir = vector.direction(pos, objpos)
|
|
||||||
local objdist = vector.distance(pos, objpos)
|
|
||||||
local itemstack = obj:get_luaentity().itemstring
|
local itemstack = obj:get_luaentity().itemstring
|
||||||
if player:get_inventory():room_for_item("main", itemstack) then
|
if player:get_inventory():room_for_item("main", itemstack) then
|
||||||
player:get_inventory():add_item("main", itemstack)
|
player:get_inventory():add_item("main", itemstack)
|
||||||
|
@ -57,20 +54,6 @@ local function void_ring_teleport(player)
|
||||||
exchangeclone.start_cooldown(player, "void_ring", 0.5)
|
exchangeclone.start_cooldown(player, "void_ring", 0.5)
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_tool("exchangeclone:black_hole_band", {
|
|
||||||
description = "Black Hole Band",
|
|
||||||
inventory_image = "exchangeclone_black_hole_band.png",
|
|
||||||
on_secondary_use = exchangeclone.toggle_active,
|
|
||||||
on_place = exchangeclone.toggle_active,
|
|
||||||
groups = {exchangeclone_passive = 1, disable_repair = 1, immune_to_fire = 1},
|
|
||||||
_exchangeclone_passive = {
|
|
||||||
func = pickup_items,
|
|
||||||
hotbar = true,
|
|
||||||
active_image = "exchangeclone_black_hole_band_active.png",
|
|
||||||
exclude = {"exchangeclone:void_ring"}
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- A lot of duplication here, unfortunately
|
-- A lot of duplication here, unfortunately
|
||||||
local function get_void_ring_description(itemstack)
|
local function get_void_ring_description(itemstack)
|
||||||
local meta = itemstack:get_meta()
|
local meta = itemstack:get_meta()
|
||||||
|
@ -173,6 +156,47 @@ local void_ring_leftclick = function(itemstack, player, pointed_thing)
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function black_hole_pedestal(pos)
|
||||||
|
local nearby_chests = {}
|
||||||
|
for _, neighbor_pos in ipairs(exchangeclone.neighbors) do
|
||||||
|
local new_pos = vector.add(pos, neighbor_pos)
|
||||||
|
if minetest.get_node(new_pos).name == "exchangeclone:alchemical_chest" then
|
||||||
|
table.insert(nearby_chests, new_pos)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if not nearby_chests[1] then return end
|
||||||
|
local objs = minetest.get_objects_inside_radius(pos, 5)
|
||||||
|
for j = 1, #objs do
|
||||||
|
local obj = objs[j]
|
||||||
|
if obj:get_luaentity() and obj:get_luaentity().name == "__builtin:item" then
|
||||||
|
local itemstack = obj:get_luaentity().itemstring
|
||||||
|
for _, chest in ipairs(nearby_chests) do
|
||||||
|
local inv = minetest.get_meta(chest):get_inventory()
|
||||||
|
if inv:room_for_item("main", itemstack) then
|
||||||
|
inv:add_item("main", itemstack)
|
||||||
|
obj:remove()
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_tool("exchangeclone:black_hole_band", {
|
||||||
|
description = "Black Hole Band",
|
||||||
|
inventory_image = "exchangeclone_black_hole_band.png",
|
||||||
|
on_secondary_use = exchangeclone.toggle_active,
|
||||||
|
on_place = exchangeclone.toggle_active,
|
||||||
|
groups = {exchangeclone_passive = 1, disable_repair = 1, immune_to_fire = 1},
|
||||||
|
_exchangeclone_passive = {
|
||||||
|
func = pickup_items,
|
||||||
|
hotbar = true,
|
||||||
|
active_image = "exchangeclone_black_hole_band_active.png",
|
||||||
|
exclude = {"exchangeclone:void_ring"}
|
||||||
|
},
|
||||||
|
_exchangeclone_pedestal = black_hole_pedestal,
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_tool("exchangeclone:void_ring", {
|
minetest.register_tool("exchangeclone:void_ring", {
|
||||||
description = "Void Ring",
|
description = "Void Ring",
|
||||||
inventory_image = "exchangeclone_void_ring.png",
|
inventory_image = "exchangeclone_void_ring.png",
|
||||||
|
@ -195,32 +219,7 @@ minetest.register_tool("exchangeclone:void_ring", {
|
||||||
active_image = "exchangeclone_void_ring_active.png",
|
active_image = "exchangeclone_void_ring_active.png",
|
||||||
exclude = {"exchangeclone:black_hole_band", "exchangeclone:gem_of_eternal_density"}
|
exclude = {"exchangeclone:black_hole_band", "exchangeclone:gem_of_eternal_density"}
|
||||||
},
|
},
|
||||||
})
|
_exchangeclone_pedestal = black_hole_pedestal,
|
||||||
|
|
||||||
minetest.register_craftitem("exchangeclone:iron_band", {
|
|
||||||
description = "Iron Band", -- I could easily make it "Steel Band" in MTG but I don't care.
|
|
||||||
groups = {craftitem = 1},
|
|
||||||
inventory_image = "exchangeclone_iron_band.png"
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "exchangeclone:iron_band",
|
|
||||||
recipe = {
|
|
||||||
{exchangeclone.itemstrings.iron, exchangeclone.itemstrings.iron, exchangeclone.itemstrings.iron},
|
|
||||||
{exchangeclone.itemstrings.iron, exchangeclone.itemstrings.lava_bucket, exchangeclone.itemstrings.iron},
|
|
||||||
{exchangeclone.itemstrings.iron, exchangeclone.itemstrings.iron, exchangeclone.itemstrings.iron},
|
|
||||||
},
|
|
||||||
replacements = {{exchangeclone.itemstrings.lava_bucket, exchangeclone.itemstrings.empty_bucket}}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "exchangeclone:iron_band",
|
|
||||||
recipe = {
|
|
||||||
{exchangeclone.itemstrings.iron, exchangeclone.itemstrings.iron, exchangeclone.itemstrings.iron},
|
|
||||||
{exchangeclone.itemstrings.iron, "exchangeclone:volcanite_amulet", exchangeclone.itemstrings.iron},
|
|
||||||
{exchangeclone.itemstrings.iron, exchangeclone.itemstrings.iron, exchangeclone.itemstrings.iron},
|
|
||||||
},
|
|
||||||
replacements = {{"exchangeclone:volcanite_amulet", "exchangeclone:volcanite_amulet"}}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
local ingredient = exchangeclone.mcl and "mcl_mobitems:string" or "farming:cotton"
|
local ingredient = exchangeclone.mcl and "mcl_mobitems:string" or "farming:cotton"
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
minetest.register_craftitem("exchangeclone:iron_band", {
|
||||||
|
description = "Iron Band", -- I could easily make it "Steel Band" in MTG but I don't care.
|
||||||
|
groups = {craftitem = 1},
|
||||||
|
inventory_image = "exchangeclone_iron_band.png"
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "exchangeclone:iron_band",
|
||||||
|
recipe = {
|
||||||
|
{exchangeclone.itemstrings.iron, exchangeclone.itemstrings.iron, exchangeclone.itemstrings.iron},
|
||||||
|
{exchangeclone.itemstrings.iron, exchangeclone.itemstrings.lava_bucket, exchangeclone.itemstrings.iron},
|
||||||
|
{exchangeclone.itemstrings.iron, exchangeclone.itemstrings.iron, exchangeclone.itemstrings.iron},
|
||||||
|
},
|
||||||
|
replacements = {{exchangeclone.itemstrings.lava_bucket, exchangeclone.itemstrings.empty_bucket}}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "exchangeclone:iron_band",
|
||||||
|
recipe = {
|
||||||
|
{exchangeclone.itemstrings.iron, exchangeclone.itemstrings.iron, exchangeclone.itemstrings.iron},
|
||||||
|
{exchangeclone.itemstrings.iron, "exchangeclone:volcanite_amulet", exchangeclone.itemstrings.iron},
|
||||||
|
{exchangeclone.itemstrings.iron, exchangeclone.itemstrings.iron, exchangeclone.itemstrings.iron},
|
||||||
|
},
|
||||||
|
replacements = {{"exchangeclone:volcanite_amulet", "exchangeclone:volcanite_amulet"}}
|
||||||
|
})
|
|
@ -142,6 +142,9 @@ minetest.register_node("exchangeclone:dark_matter_pedestal", {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
on_punch = function(pos, node, player, pointed_thing)
|
on_punch = function(pos, node, player, pointed_thing)
|
||||||
|
if minetest.is_protected(pos, player:get_player_name()) then
|
||||||
|
minetest.record_protection_violation(pos, player:get_player_name())
|
||||||
|
end
|
||||||
local wielded_item = player:get_wielded_item()
|
local wielded_item = player:get_wielded_item()
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
|
@ -156,6 +159,9 @@ minetest.register_node("exchangeclone:dark_matter_pedestal", {
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
on_rightclick = function(pos, node, player, pointed_thing)
|
on_rightclick = function(pos, node, player, pointed_thing)
|
||||||
|
if minetest.is_protected(pos, player:get_player_name()) then
|
||||||
|
minetest.record_protection_violation(pos, player:get_player_name())
|
||||||
|
end
|
||||||
local wielded_item = player:get_wielded_item()
|
local wielded_item = player:get_wielded_item()
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
|
|
|
@ -109,10 +109,10 @@ if exchangeclone.mcl2 then
|
||||||
end
|
end
|
||||||
|
|
||||||
local files = {
|
local files = {
|
||||||
|
"craftitems",
|
||||||
"fuels",
|
"fuels",
|
||||||
"matter",
|
"matter",
|
||||||
"amulets",
|
"amulets",
|
||||||
"black_hole_band",
|
|
||||||
"deprecated_stuff",
|
"deprecated_stuff",
|
||||||
"energy_collectors",
|
"energy_collectors",
|
||||||
"klein_stars",
|
"klein_stars",
|
||||||
|
@ -136,6 +136,7 @@ local files = {
|
||||||
"emc_link",
|
"emc_link",
|
||||||
"alchemical_books",
|
"alchemical_books",
|
||||||
"dark_matter_pedestal",
|
"dark_matter_pedestal",
|
||||||
|
"black_hole_band",
|
||||||
}
|
}
|
||||||
|
|
||||||
if exchangeclone.mcl or minetest.get_modpath("3d_armor") then
|
if exchangeclone.mcl or minetest.get_modpath("3d_armor") then
|
||||||
|
|
|
@ -733,10 +733,10 @@ minetest.register_chatcommand("set_player_emc", {
|
||||||
})
|
})
|
||||||
|
|
||||||
exchangeclone.neighbors = {
|
exchangeclone.neighbors = {
|
||||||
{x=-1, y=0, z=0},
|
|
||||||
{x=1, y=0, z=0},
|
|
||||||
{x=0, y=-1, z=0},
|
{x=0, y=-1, z=0},
|
||||||
{x=0, y=1, z=0},
|
{x=0, y=1, z=0},
|
||||||
|
{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=0, z=1},
|
{x=0, y=0, z=1},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue