Dehardcode map

* Dehardcode maps (currently not working)
maps need work and proper configs

* Fix bugs
i'm terrible at lua

* Add proper maps and configs

* Fix some bugs
the game at least loads now, though it crashes when you run /start <a map>

* Fix more bugs
The map starts now though you don't get teleported to it.

* Teleport the player to the map spawn on start

* Fix lots of bugs
It mostly works now

* Add butterflies mod

* Another bugfix

* Add fireflies mod

* Add vessels mod (dependency for fireflies)

* Add a sprint mod

* Add a spawnpoint
no more falling into the void

* Update TODO.txt

* Fix the barriers being offset by 2
Also add more dependency mods
This commit is contained in:
a-bad-dev 2025-12-09 03:17:00 -04:00 committed by GitHub
commit 2259be43a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
306 changed files with 9142 additions and 31 deletions

22
mods/fireflies/README.txt Normal file
View file

@ -0,0 +1,22 @@
Minetest Game mod: fireflies
============================
Adds fireflies to the world on mapgen, which can then be caught in a net and placed in
bottles to provide light.
Authors of source code
----------------------
Shara RedCat (MIT)
Authors of media (textures)
---------------------------
Shara RedCat (CC BY-SA 3.0):
fireflies_firefly.png
fireflies_firefly_animated.png
fireflies_bugnet.png
fireflies_bottle.png
fireflies_bottle_animated.png
fireflies_bugnet.png is modified from a texture by tenplus1 (CC0)
fireflies_bottle.png and fireflies_bottle_animated.png are
modified from a texture by Vanessa Ezekowitz (CC BY-SA 3.0)

259
mods/fireflies/init.lua Normal file
View file

@ -0,0 +1,259 @@
-- firefly/init.lua
-- Load support for MT game translation.
local S = minetest.get_translator("fireflies")
-- Legacy compatibility, when pointabilities don't exist, pointable is set to true.
local pointable_compat = not minetest.features.item_specific_pointabilities
minetest.register_node("fireflies:firefly", {
description = S("Firefly"),
drawtype = "plantlike",
tiles = {{
name = "fireflies_firefly_animated.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 1.5
},
}},
inventory_image = "fireflies_firefly.png",
wield_image = "fireflies_firefly.png",
waving = 1,
paramtype = "light",
sunlight_propagates = true,
buildable_to = true,
walkable = false,
pointable = pointable_compat,
groups = {catchable = 1},
selection_box = {
type = "fixed",
fixed = {-0.1, -0.1, -0.1, 0.1, 0.1, 0.1},
},
light_source = 6,
floodable = true,
on_construct = function(pos)
minetest.get_node_timer(pos):start(1)
end,
on_timer = function(pos, elapsed)
if minetest.get_node_light(pos) > 11 then
minetest.set_node(pos, {name = "fireflies:hidden_firefly"})
end
minetest.get_node_timer(pos):start(30)
end
})
minetest.register_node("fireflies:hidden_firefly", {
description = S("Hidden Firefly"),
drawtype = "airlike",
inventory_image = "fireflies_firefly.png^default_invisible_node_overlay.png",
wield_image = "fireflies_firefly.png^default_invisible_node_overlay.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
groups = {not_in_creative_inventory = 1},
floodable = true,
on_construct = function(pos)
minetest.get_node_timer(pos):start(1)
end,
on_timer = function(pos, elapsed)
if minetest.get_node_light(pos) <= 11 then
minetest.set_node(pos, {name = "fireflies:firefly"})
end
minetest.get_node_timer(pos):start(30)
end
})
-- bug net
minetest.register_tool("fireflies:bug_net", {
description = S("Bug Net"),
inventory_image = "fireflies_bugnet.png",
pointabilities = {nodes = {["group:catchable"] = true}},
tool_capabilities = {
groupcaps = {
catchable = { maxlevel = 1, uses = 256, times = { [1] = 0, [2] = 0, [3] = 0 } }
},
},
})
minetest.register_craft( {
output = "fireflies:bug_net",
recipe = {
{"farming:string", "farming:string"},
{"farming:string", "farming:string"},
{"group:stick", ""}
}
})
-- firefly in a bottle
minetest.register_node("fireflies:firefly_bottle", {
description = S("Firefly in a Bottle"),
inventory_image = "fireflies_bottle.png",
wield_image = "fireflies_bottle.png",
tiles = {{
name = "fireflies_bottle_animated.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 1.5
},
}},
drawtype = "plantlike",
paramtype = "light",
sunlight_propagates = true,
light_source = 9,
walkable = false,
groups = {vessel = 1, dig_immediate = 3, attached_node = 1},
selection_box = {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
},
sounds = default.node_sound_glass_defaults(),
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
local lower_pos = {x = pos.x, y = pos.y + 1, z = pos.z}
if minetest.is_protected(pos, player:get_player_name()) or
minetest.get_node(lower_pos).name ~= "air" then
return
end
local upper_pos = {x = pos.x, y = pos.y + 2, z = pos.z}
local firefly_pos
if not minetest.is_protected(upper_pos, player:get_player_name()) and
minetest.get_node(upper_pos).name == "air" then
firefly_pos = upper_pos
elseif not minetest.is_protected(lower_pos, player:get_player_name()) then
firefly_pos = lower_pos
end
if firefly_pos then
minetest.set_node(pos, {name = "vessels:glass_bottle"})
minetest.set_node(firefly_pos, {name = "fireflies:firefly"})
minetest.get_node_timer(firefly_pos):start(1)
end
end
})
minetest.register_craft( {
output = "fireflies:firefly_bottle",
recipe = {
{"fireflies:firefly"},
{"vessels:glass_bottle"}
}
})
-- register fireflies as decorations
if minetest.get_mapgen_setting("mg_name") == "v6" then
minetest.register_decoration({
name = "fireflies:firefly_low",
deco_type = "simple",
place_on = "default:dirt_with_grass",
place_offset_y = 2,
sidelen = 80,
fill_ratio = 0.0002,
y_max = 31000,
y_min = 1,
decoration = "fireflies:hidden_firefly",
})
minetest.register_decoration({
name = "fireflies:firefly_high",
deco_type = "simple",
place_on = "default:dirt_with_grass",
place_offset_y = 3,
sidelen = 80,
fill_ratio = 0.0002,
y_max = 31000,
y_min = 1,
decoration = "fireflies:hidden_firefly",
})
else
minetest.register_decoration({
name = "fireflies:firefly_low",
deco_type = "simple",
place_on = {
"default:dirt_with_grass",
"default:dirt_with_coniferous_litter",
"default:dirt_with_rainforest_litter",
"default:dirt"
},
place_offset_y = 2,
sidelen = 80,
fill_ratio = 0.0005,
biomes = {
"deciduous_forest",
"coniferous_forest",
"rainforest",
"rainforest_swamp"
},
y_max = 31000,
y_min = -1,
decoration = "fireflies:hidden_firefly",
})
minetest.register_decoration({
name = "fireflies:firefly_high",
deco_type = "simple",
place_on = {
"default:dirt_with_grass",
"default:dirt_with_coniferous_litter",
"default:dirt_with_rainforest_litter",
"default:dirt"
},
place_offset_y = 3,
sidelen = 80,
fill_ratio = 0.0005,
biomes = {
"deciduous_forest",
"coniferous_forest",
"rainforest",
"rainforest_swamp"
},
y_max = 31000,
y_min = -1,
decoration = "fireflies:hidden_firefly",
})
end
-- get decoration IDs
local firefly_low = minetest.get_decoration_id("fireflies:firefly_low")
local firefly_high = minetest.get_decoration_id("fireflies:firefly_high")
minetest.set_gen_notify({decoration = true}, {firefly_low, firefly_high})
-- start nodetimers
minetest.register_on_generated(function(minp, maxp, blockseed)
local gennotify = minetest.get_mapgen_object("gennotify")
local poslist = {}
for _, pos in ipairs(gennotify["decoration#"..firefly_low] or {}) do
local firefly_low_pos = {x = pos.x, y = pos.y + 3, z = pos.z}
table.insert(poslist, firefly_low_pos)
end
for _, pos in ipairs(gennotify["decoration#"..firefly_high] or {}) do
local firefly_high_pos = {x = pos.x, y = pos.y + 4, z = pos.z}
table.insert(poslist, firefly_high_pos)
end
if #poslist ~= 0 then
for i = 1, #poslist do
local pos = poslist[i]
minetest.get_node_timer(pos):start(1)
end
end
end)

View file

@ -0,0 +1,58 @@
License of source code
----------------------
The MIT License (MIT)
Copyright (c) 2018 Shara RedCat
Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
For more details:
https://opensource.org/licenses/MIT
Licenses of media (textures)
----------------------------
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
Copyright (C) 2018 Shara RedCat
You are free to:
Share — copy and redistribute the material in any medium or format.
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
Attribution — You must give appropriate credit, provide a link to the license, and
indicate if changes were made. You may do so in any reasonable manner, but not in any way
that suggests the licensor endorses you or your use.
ShareAlike — If you remix, transform, or build upon the material, you must distribute
your contributions under the same license as the original.
No additional restrictions — You may not apply legal terms or technological measures that
legally restrict others from doing anything the license permits.
Notices:
You do not have to comply with the license for elements of the material in the public
domain or where your use is permitted by an applicable exception or limitation.
No warranties are given. The license may not give you all of the permissions necessary
for your intended use. For example, other rights such as publicity, privacy, or moral
rights may limit how you use the material.
For more details:
http://creativecommons.org/licenses/by-sa/3.0/

View file

@ -0,0 +1,5 @@
# textdomain: fireflies
Firefly=Светулка
Hidden Firefly=Скрита светулка
Bug Net=Сак за насекоми
Firefly in a Bottle=Светулка в буркан

View file

@ -0,0 +1,5 @@
# textdomain: fireflies
Firefly=Ildflue
Hidden Firefly=Gemt ildflue
Bug Net=Insektnet
Firefly in a Bottle=Ildflue i en flaske

View file

@ -0,0 +1,5 @@
# textdomain: fireflies
Firefly=Glühwürmchen
Hidden Firefly=Verborgenes Glühwürmchen
Bug Net=Insektennetz
Firefly in a Bottle=Glühwürmchen in einer Flasche

View file

@ -0,0 +1,5 @@
# textdomain: fireflies
Firefly=Lampiro
Hidden Firefly=Kaŝita lampiro
Bug Net=Insekta reto
Firefly in a Bottle=Lampiro en botelo

View file

@ -0,0 +1,5 @@
# textdomain: fireflies
Firefly=Luciérnaga
Hidden Firefly=Luciérnaga oculta
Bug Net=Red de insectos
Firefly in a Bottle=Luciérnaga en botella

View file

@ -0,0 +1,5 @@
# textdomain: fireflies
Firefly=Ipurtargia
Hidden Firefly=Ezkutuk ipurtargi
Bug Net=Intsektu-sarea
Firefly in a Bottle=Ipurtargia botilan

View file

@ -0,0 +1,5 @@
# textdomain: fireflies
Firefly=Luciole
Hidden Firefly=Luciole cachée
Bug Net=Filet à papillon
Firefly in a Bottle=Luciole en bouteille

View file

@ -0,0 +1,5 @@
# textdomain: fireflies
Firefly=Szentjánosbogár
Hidden Firefly=Rejtett szentjánosbogár
Bug Net=Rovarháló
Firefly in a Bottle=Szentjánosbogár egy palackban

View file

@ -0,0 +1,5 @@
# textdomain: fireflies
Firefly=Kunang-Kunang
Hidden Firefly=Kunang-Kunang Tersembunyi
Bug Net=Jaring Serangga
Firefly in a Bottle=Kunang-Kunang dalam Botol

View file

@ -0,0 +1,5 @@
# textdomain: fireflies
Firefly=Lucciola
Hidden Firefly=Lucciola nascosta
Bug Net=Retino
Firefly in a Bottle=Lucciola imbottigliata

View file

@ -0,0 +1,5 @@
# textdomain: fireflies
Firefly=ホタル
Hidden Firefly=隠されたホタル
Bug Net=虫取り網
Firefly in a Bottle=ホタルの入った瓶

View file

@ -0,0 +1,5 @@
# textdomain: fireflies
Firefly=lo gusycinki
Hidden Firefly=lo se mipri gusycinki
Bug Net=lo cinki julne
Firefly in a Bottle=lo gusycinki poi nenri lo botpi

View file

@ -0,0 +1,5 @@
# textdomain: fireflies
Firefly=Jāņtārpiņš
Hidden Firefly=Paslēpts jāņtārpiņš
Bug Net=Ķeramtīkls
Firefly in a Bottle=Jāņtārpiņš pudelē

View file

@ -0,0 +1,5 @@
# textdomain: fireflies
Firefly=Kelip-Kelip
Hidden Firefly=Kelip-Kelip Tersembunyi
Bug Net=Jaring Pepijat
Firefly in a Bottle=Kelip-Kelip dalam Botol

View file

@ -0,0 +1,5 @@
# textdomain: fireflies
Firefly=Świetlik
Hidden Firefly=Ukryty świetlik
Bug Net=Siatka na owady
Firefly in a Bottle=Świetlik w butelce

View file

@ -0,0 +1,5 @@
# textdomain: fireflies
Firefly=Vaga-lume
Hidden Firefly=Vaga-lume escondido
Bug Net=Rede de Insetos
Firefly in a Bottle=Vaga-lume em uma garrafa

View file

@ -0,0 +1,5 @@
# textdomain: fireflies
Firefly=Светлячок
Hidden Firefly=Притаившийся светлячок
Bug Net=Сачок
Firefly in a Bottle=Светлячок в бутылке

View file

@ -0,0 +1,5 @@
# textdomain: fireflies
Firefly=Svetluška
Hidden Firefly=Skrytá svetluška
Bug Net=Sieťka na hmyz
Firefly in a Bottle=Svetluška vo fľaši

View file

@ -0,0 +1,5 @@
# textdomain: fireflies
Firefly=Eldfluga
Hidden Firefly=Gömd eldfluga
Bug Net=Insektshåv
Firefly in a Bottle=Eldfluga i en flaska

View file

@ -0,0 +1,5 @@
# textdomain: fireflies
Firefly=Світляк
Hidden Firefly=Світляк, що причаївся
Bug Net=Сачок
Firefly in a Bottle=Світляк у пляшці

View file

@ -0,0 +1,5 @@
# textdomain: fireflies
Firefly=萤火虫
Hidden Firefly=隐藏的萤火虫
Bug Net=虫网
Firefly in a Bottle=放在瓶子里的萤火虫

View file

@ -0,0 +1,5 @@
# textdomain: fireflies
Firefly=螢火蟲
Hidden Firefly=隱藏的螢火蟲
Bug Net=蟲網
Firefly in a Bottle=放在瓶子裡的螢火蟲

View file

@ -0,0 +1,5 @@
# textdomain: fireflies
Firefly=
Hidden Firefly=
Bug Net=
Firefly in a Bottle=

3
mods/fireflies/mod.conf Normal file
View file

@ -0,0 +1,3 @@
name = fireflies
description = Minetest Game mod: fireflies
depends = default, vessels

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 B