beacons
|
@ -0,0 +1,52 @@
|
||||||
|
(Open in Notepad++ for best experience)
|
||||||
|
,---,.
|
||||||
|
,' .' \
|
||||||
|
,---.' .' | ,---. ,---,
|
||||||
|
| | |: | ' ,'\ ,-+-. / | .--.--.
|
||||||
|
: : : / ,---. ,--.--. ,---. / / | ,--.'|' |/ / '
|
||||||
|
: | ; / \ / \ / \. ; ,. :| | ,"' | : /`./
|
||||||
|
| : \ / / | .--. .-. | / / '' | |: :| | / | | : ;_
|
||||||
|
| | . |. ' / | \__\/: . .. ' / ' | .; :| | | | |\ \ `.
|
||||||
|
' : '; |' ; /| ," .--.; |' ; :__| : || | | |/ `----. \
|
||||||
|
| | | ; ' | / | / / ,. |' | '.'|\ \ / | | |--' / /`--' /
|
||||||
|
| : / | : |; : .' \ : : `----' | |/ '--'. /
|
||||||
|
| | ,' \ \ / | , .-./\ \ / '---' `--'---'
|
||||||
|
`----' `----' `--`---' `----' v1.1, By AgentNagel42 for minetest
|
||||||
|
|
||||||
|
This mod adds Beacons to minetest that can be used as landmarks and thats just about it.
|
||||||
|
Refer to "crafts" folder to learn crafts
|
||||||
|
Official Video: https://youtu.be/NA1T4Vu6f5g
|
||||||
|
Forum Topic: https://forum.minetest.net/viewtopic.php?f=11&t=12041
|
||||||
|
|
||||||
|
Changelog:
|
||||||
|
-Beacons v1.1
|
||||||
|
-Cleaned up the messy beamgen code with for loops
|
||||||
|
-Renamed Purple --> Violet Beacon to reduce confusion with dye
|
||||||
|
-Added README.txt, For some reason I forgot to include it in the first release
|
||||||
|
-Changed "Screenshots" --> "Crafts" Folder, now only contains craft recipes
|
||||||
|
-Added little message in log/console when loaded "[OK] Beacons"
|
||||||
|
-Beacons v1.0
|
||||||
|
-Added Red Beacon
|
||||||
|
-Added Blue Beacon
|
||||||
|
-Added Purple Beacon
|
||||||
|
-Added Green Beacon
|
||||||
|
|
||||||
|
License:
|
||||||
|
WTFPL (see below)
|
||||||
|
|
||||||
|
See also:
|
||||||
|
http://minetest.net/
|
||||||
|
|
||||||
|
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||||
|
Version 2, December 2004
|
||||||
|
|
||||||
|
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
|
||||||
|
|
||||||
|
Everyone is permitted to copy and distribute verbatim or modified
|
||||||
|
copies of this license document, and changing it is allowed as long
|
||||||
|
as the name is changed.
|
||||||
|
|
||||||
|
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. You just DO WHAT THE FUCK YOU WANT TO.
|
|
@ -0,0 +1,56 @@
|
||||||
|
minetest.register_abm({
|
||||||
|
nodenames = {"beacon:blue"},
|
||||||
|
interval = 5,
|
||||||
|
chance = 1,
|
||||||
|
action = function(pos)
|
||||||
|
pos.y = pos.y + 1
|
||||||
|
minetest.add_node(pos, {name="beacon:bluebase"})
|
||||||
|
for i=1,179 do
|
||||||
|
minetest.add_node({x=pos.x, y=pos.y+i, z=pos.z}, {name="beacon:bluebeam"})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
--Red Beam generation
|
||||||
|
minetest.register_abm({
|
||||||
|
nodenames = {"beacon:red"},
|
||||||
|
interval = 5,
|
||||||
|
chance = 1,
|
||||||
|
action = function(pos)
|
||||||
|
pos.y = pos.y + 1
|
||||||
|
minetest.add_node(pos, {name="beacon:redbase"})
|
||||||
|
for i=1,179 do
|
||||||
|
minetest.add_node({x=pos.x, y=pos.y+i, z=pos.z}, {name="beacon:redbeam"})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
--Green Beam generation
|
||||||
|
minetest.register_abm({
|
||||||
|
nodenames = {"beacon:green"},
|
||||||
|
interval = 5,
|
||||||
|
chance = 1,
|
||||||
|
action = function(pos)
|
||||||
|
pos.y = pos.y + 1
|
||||||
|
minetest.add_node(pos, {name="beacon:greenbase"})
|
||||||
|
for i=1,179 do
|
||||||
|
minetest.add_node({x=pos.x, y=pos.y+i, z=pos.z}, {name="beacon:greenbeam"})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
--Purple Beam Generation
|
||||||
|
minetest.register_abm({
|
||||||
|
nodenames = {"beacon:purple"},
|
||||||
|
interval = 5,
|
||||||
|
chance = 1,
|
||||||
|
action = function(pos)
|
||||||
|
pos.y = pos.y + 1
|
||||||
|
minetest.add_node(pos, {name="beacon:purplebase"})
|
||||||
|
for i=1,179 do
|
||||||
|
minetest.add_node({x=pos.x, y=pos.y+i, z=pos.z}, {name="beacon:purplebeam"})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,187 @@
|
||||||
|
--Blue Beam
|
||||||
|
minetest.register_node("beacon:bluebase", {
|
||||||
|
visual_scale = 1.0,
|
||||||
|
drawtype = "plantlike",
|
||||||
|
tiles = {"bluebase.png"},
|
||||||
|
paramtype = "light",
|
||||||
|
walkable = false,
|
||||||
|
diggable = false,
|
||||||
|
light_source = 13,
|
||||||
|
groups = {not_in_creative_inventory=1}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("beacon:bluebeam", {
|
||||||
|
visual_scale = 1.0,
|
||||||
|
drawtype = "plantlike",
|
||||||
|
tiles = {"bluebeam.png"},
|
||||||
|
paramtype = "light",
|
||||||
|
walkable = false,
|
||||||
|
diggable = false,
|
||||||
|
light_source = 50,
|
||||||
|
groups = {not_in_creative_inventory=1}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_abm({
|
||||||
|
nodenames = {"beacon:bluebase"}, --makes small particles emanate from the beginning of a beam
|
||||||
|
interval = 1,
|
||||||
|
chance = 2,
|
||||||
|
action = function(pos, node)
|
||||||
|
minetest.add_particlespawner(
|
||||||
|
32, --amount
|
||||||
|
4, --time
|
||||||
|
{x=pos.x-0.25, y=pos.y-0.25, z=pos.z-0.25}, --minpos
|
||||||
|
{x=pos.x+0.25, y=pos.y+0.25, z=pos.z+0.25}, --maxpos
|
||||||
|
{x=-0.8, y=-0.8, z=-0.8}, --minvel
|
||||||
|
{x=0.8, y=0.8, z=0.8}, --maxvel
|
||||||
|
{x=0,y=0,z=0}, --minacc
|
||||||
|
{x=0,y=0,z=0}, --maxacc
|
||||||
|
0.5, --minexptime
|
||||||
|
1, --maxexptime
|
||||||
|
1, --minsize
|
||||||
|
2, --maxsize
|
||||||
|
false, --collisiondetection
|
||||||
|
"blueparticle.png" --texture
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
--Red Beam
|
||||||
|
minetest.register_node("beacon:redbase", {
|
||||||
|
visual_scale = 1.0,
|
||||||
|
drawtype = "plantlike",
|
||||||
|
tiles = {"redbase.png"},
|
||||||
|
paramtype = "light",
|
||||||
|
walkable = false,
|
||||||
|
diggable = false,
|
||||||
|
light_source = 13,
|
||||||
|
groups = {not_in_creative_inventory=1}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("beacon:redbeam", {
|
||||||
|
visual_scale = 1.0,
|
||||||
|
drawtype = "plantlike",
|
||||||
|
tiles = {"redbeam.png"},
|
||||||
|
paramtype = "light",
|
||||||
|
walkable = false,
|
||||||
|
diggable = false,
|
||||||
|
light_source = 50,
|
||||||
|
groups = {not_in_creative_inventory=1}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_abm({
|
||||||
|
nodenames = {"beacon:redbase"}, --makes small particles emanate from the beginning of a beam
|
||||||
|
interval = 1,
|
||||||
|
chance = 2,
|
||||||
|
action = function(pos, node)
|
||||||
|
minetest.add_particlespawner(
|
||||||
|
32, --amount
|
||||||
|
4, --time
|
||||||
|
{x=pos.x-0.25, y=pos.y-0.25, z=pos.z-0.25}, --minpos
|
||||||
|
{x=pos.x+0.25, y=pos.y+0.25, z=pos.z+0.25}, --maxpos
|
||||||
|
{x=-0.8, y=-0.8, z=-0.8}, --minvel
|
||||||
|
{x=0.8, y=0.8, z=0.8}, --maxvel
|
||||||
|
{x=0,y=0,z=0}, --minacc
|
||||||
|
{x=0,y=0,z=0}, --maxacc
|
||||||
|
0.5, --minexptime
|
||||||
|
1, --maxexptime
|
||||||
|
1, --minsize
|
||||||
|
2, --maxsize
|
||||||
|
false, --collisiondetection
|
||||||
|
"redparticle.png" --texture
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
--Green Beam
|
||||||
|
minetest.register_node("beacon:greenbase", {
|
||||||
|
visual_scale = 1.0,
|
||||||
|
drawtype = "plantlike",
|
||||||
|
tiles = {"greenbase.png"},
|
||||||
|
paramtype = "light",
|
||||||
|
walkable = false,
|
||||||
|
diggable = false,
|
||||||
|
light_source = 13,
|
||||||
|
groups = {not_in_creative_inventory=1}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("beacon:greenbeam", {
|
||||||
|
visual_scale = 1.0,
|
||||||
|
drawtype = "plantlike",
|
||||||
|
tiles = {"greenbeam.png"},
|
||||||
|
paramtype = "light",
|
||||||
|
walkable = false,
|
||||||
|
diggable = false,
|
||||||
|
light_source = 50,
|
||||||
|
groups = {not_in_creative_inventory=1}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_abm({
|
||||||
|
nodenames = {"beacon:greenbase"}, --makes small particles emanate from the beginning of a beam
|
||||||
|
interval = 1,
|
||||||
|
chance = 2,
|
||||||
|
action = function(pos, node)
|
||||||
|
minetest.add_particlespawner(
|
||||||
|
32, --amount
|
||||||
|
4, --time
|
||||||
|
{x=pos.x-0.25, y=pos.y-0.25, z=pos.z-0.25}, --minpos
|
||||||
|
{x=pos.x+0.25, y=pos.y+0.25, z=pos.z+0.25}, --maxpos
|
||||||
|
{x=-0.8, y=-0.8, z=-0.8}, --minvel
|
||||||
|
{x=0.8, y=0.8, z=0.8}, --maxvel
|
||||||
|
{x=0,y=0,z=0}, --minacc
|
||||||
|
{x=0,y=0,z=0}, --maxacc
|
||||||
|
0.5, --minexptime
|
||||||
|
1, --maxexptime
|
||||||
|
1, --minsize
|
||||||
|
2, --maxsize
|
||||||
|
false, --collisiondetection
|
||||||
|
"greenparticle.png" --texture
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
--Green Beam
|
||||||
|
minetest.register_node("beacon:purplebase", {
|
||||||
|
visual_scale = 1.0,
|
||||||
|
drawtype = "plantlike",
|
||||||
|
tiles = {"purplebase.png"},
|
||||||
|
paramtype = "light",
|
||||||
|
walkable = false,
|
||||||
|
diggable = false,
|
||||||
|
light_source = 13,
|
||||||
|
groups = {not_in_creative_inventory=1}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("beacon:purplebeam", {
|
||||||
|
visual_scale = 1.0,
|
||||||
|
drawtype = "plantlike",
|
||||||
|
tiles = {"purplebeam.png"},
|
||||||
|
paramtype = "light",
|
||||||
|
walkable = false,
|
||||||
|
diggable = false,
|
||||||
|
light_source = 50,
|
||||||
|
groups = {not_in_creative_inventory=1}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_abm({
|
||||||
|
nodenames = {"beacon:purplebase"}, --makes small particles emanate from the beginning of a beam
|
||||||
|
interval = 1,
|
||||||
|
chance = 2,
|
||||||
|
action = function(pos, node)
|
||||||
|
minetest.add_particlespawner( --I actually borrowed this code from the nether mod
|
||||||
|
32, --amount
|
||||||
|
4, --time
|
||||||
|
{x=pos.x-0.25, y=pos.y-0.25, z=pos.z-0.25}, --minpos
|
||||||
|
{x=pos.x+0.25, y=pos.y+0.25, z=pos.z+0.25}, --maxpos
|
||||||
|
{x=-0.8, y=-0.8, z=-0.8}, --minvel
|
||||||
|
{x=0.8, y=0.8, z=0.8}, --maxvel
|
||||||
|
{x=0,y=0,z=0}, --minacc
|
||||||
|
{x=0,y=0,z=0}, --maxacc
|
||||||
|
0.5, --minexptime
|
||||||
|
1, --maxexptime
|
||||||
|
1, --minsize
|
||||||
|
2, --maxsize
|
||||||
|
false, --collisiondetection
|
||||||
|
"purpleparticle.png" --texture
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
})
|
|
@ -0,0 +1,45 @@
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'beacon:blue',
|
||||||
|
recipe = {
|
||||||
|
{'', 'dye:blue', ''},
|
||||||
|
{'dye:blue', 'beacon:empty', 'dye:blue'},
|
||||||
|
{'', 'dye:blue', ''},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'beacon:empty',
|
||||||
|
recipe = {
|
||||||
|
{'default:steel_ingot', 'default:glass', 'default:steel_ingot'},
|
||||||
|
{'default:mese_crystal_fragment', 'default:torch', 'default:mese_crystal_fragment'},
|
||||||
|
{'default:obsidian', 'default:obsidian', 'default:obsidian'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'beacon:red',
|
||||||
|
recipe = {
|
||||||
|
{'', 'dye:red', ''},
|
||||||
|
{'dye:red', 'beacon:empty', 'dye:red'},
|
||||||
|
{'', 'dye:red', ''},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'beacon:purple',
|
||||||
|
recipe = {
|
||||||
|
{'', 'dye:violet', ''}, --geez i almost spelled violet wrong lol
|
||||||
|
{'dye:violet', 'beacon:empty', 'dye:violet'},
|
||||||
|
{'', 'dye:violet', ''}, --oh yea I havent played minecraft in 2 years, i can feel your judgement right now
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'beacon:green',
|
||||||
|
recipe = {
|
||||||
|
{'', 'dye:green', ''}, --geez i almost spelled violet wrong lol
|
||||||
|
{'dye:green', 'beacon:empty', 'dye:green'},
|
||||||
|
{'', 'dye:green', ''}, --oh yea I havent played minecraft in 2 years, i can feel your judgement right now
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 2.8 KiB |
|
@ -0,0 +1 @@
|
||||||
|
default
|
|
@ -0,0 +1,74 @@
|
||||||
|
--please view and edit with Notepad++
|
||||||
|
--Beacons v1.1 for minetest
|
||||||
|
|
||||||
|
--load other scripts
|
||||||
|
dofile(minetest.get_modpath("beacon").."/beaminit.lua")
|
||||||
|
dofile(minetest.get_modpath("beacon").."/beamgen.lua")
|
||||||
|
dofile(minetest.get_modpath("beacon").."/crafts.lua")
|
||||||
|
|
||||||
|
--code for "unactivated beacon"
|
||||||
|
minetest.register_node("beacon:empty", {
|
||||||
|
description = "Unactivated Beacon",
|
||||||
|
tiles = {"emptybeacon.png"},
|
||||||
|
light_source = 3,
|
||||||
|
groups = {cracky=3,oddly_breakable_by_hand=3},
|
||||||
|
drop = "beacon:empty",
|
||||||
|
})
|
||||||
|
|
||||||
|
--code for "Main blue source cube"
|
||||||
|
minetest.register_node("beacon:blue", {
|
||||||
|
description = "Blue Beacon",
|
||||||
|
tiles = {"bluebeacon.png"},
|
||||||
|
light_source = 13,
|
||||||
|
groups = {cracky=3,oddly_breakable_by_hand=3},
|
||||||
|
drop = "beacon:blue",
|
||||||
|
on_destruct = function(pos) --remove the beam above a source when source is removed
|
||||||
|
for i=1,180 do
|
||||||
|
minetest.remove_node({x=pos.x, y=pos.y+i, z=pos.z}) --thanks Morn76 for this bit of code!
|
||||||
|
end
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
--code for "Main red source cube"
|
||||||
|
minetest.register_node("beacon:red", {
|
||||||
|
description = "Red Beacon",
|
||||||
|
tiles = {"redbeacon.png"},
|
||||||
|
light_source = 13,
|
||||||
|
groups = {cracky=3,oddly_breakable_by_hand=3},
|
||||||
|
drop = "beacon:red",
|
||||||
|
on_destruct = function(pos) --remove the beam above a source when source is removed
|
||||||
|
for i=1,180 do
|
||||||
|
minetest.remove_node({x=pos.x, y=pos.y+i, z=pos.z})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
--code for "Main green source cube"
|
||||||
|
minetest.register_node("beacon:green", {
|
||||||
|
description = "Green Beacon",
|
||||||
|
tiles = {"greenbeacon.png"},
|
||||||
|
light_source = 13,
|
||||||
|
groups = {cracky=3,oddly_breakable_by_hand=3},
|
||||||
|
drop = "beacon:green",
|
||||||
|
on_destruct = function(pos) --remove the beam above a source when source is removed
|
||||||
|
for i=1,180 do
|
||||||
|
minetest.remove_node({x=pos.x, y=pos.y+i, z=pos.z})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
--code for "Main purple source cube"
|
||||||
|
minetest.register_node("beacon:purple", {
|
||||||
|
description = "Violet Beacon",
|
||||||
|
tiles = {"purplebeacon.png"},
|
||||||
|
light_source = 13,
|
||||||
|
groups = {cracky=3,oddly_breakable_by_hand=3},
|
||||||
|
drop = "beacon:purple",
|
||||||
|
on_destruct = function(pos) --remove the beam above a source when source is removed
|
||||||
|
for i=1,180 do
|
||||||
|
minetest.remove_node({x=pos.x, y=pos.y+i, z=pos.z})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
print("[OK] Beacons")
|
After Width: | Height: | Size: 650 B |
After Width: | Height: | Size: 628 B |
After Width: | Height: | Size: 233 B |
After Width: | Height: | Size: 225 B |
After Width: | Height: | Size: 551 B |
After Width: | Height: | Size: 475 B |
After Width: | Height: | Size: 615 B |
After Width: | Height: | Size: 208 B |
After Width: | Height: | Size: 213 B |
After Width: | Height: | Size: 453 B |
After Width: | Height: | Size: 599 B |
After Width: | Height: | Size: 208 B |
After Width: | Height: | Size: 218 B |
After Width: | Height: | Size: 450 B |
After Width: | Height: | Size: 590 B |
After Width: | Height: | Size: 205 B |
After Width: | Height: | Size: 217 B |