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

127
mods/dye/init.lua Normal file
View file

@ -0,0 +1,127 @@
-- dye/init.lua
dye = {}
-- Load support for MT game translation.
local S = minetest.get_translator("dye")
-- Make dye names and descriptions available globally
dye.dyes = {
{"white", "White"},
{"grey", "Grey"},
{"dark_grey", "Dark Grey"},
{"black", "Black"},
{"violet", "Violet"},
{"blue", "Blue"},
{"cyan", "Cyan"},
{"dark_green", "Dark Green"},
{"green", "Green"},
{"yellow", "Yellow"},
{"brown", "Brown"},
{"orange", "Orange"},
{"red", "Red"},
{"magenta", "Magenta"},
{"pink", "Pink"},
}
-- Define items
for _, row in ipairs(dye.dyes) do
local name = row[1]
local description = row[2]
local groups = {dye = 1}
groups["color_" .. name] = 1
minetest.register_craftitem("dye:" .. name, {
inventory_image = "dye_" .. name .. ".png",
description = S(description .. " Dye"),
groups = groups
})
minetest.register_craft({
output = "dye:" .. name .. " 4",
recipe = {
{"group:flower,color_" .. name}
},
})
end
-- Manually add coal -> black dye
minetest.register_craft({
output = "dye:black 4",
recipe = {
{"group:coal"}
},
})
-- Manually add blueberries->violet dye
minetest.register_craft({
output = "dye:violet 2",
recipe = {
{"default:blueberries"}
},
})
-- Mix recipes
local dye_recipes = {
-- src1, src2, dst
-- RYB mixes
{"red", "blue", "violet"}, -- "purple"
{"yellow", "red", "orange"},
{"yellow", "blue", "green"},
-- RYB complementary mixes
{"yellow", "violet", "dark_grey"},
{"blue", "orange", "dark_grey"},
-- CMY mixes - approximation
{"cyan", "yellow", "green"},
{"cyan", "magenta", "blue"},
{"yellow", "magenta", "red"},
-- other mixes that result in a color we have
{"red", "green", "brown"},
{"magenta", "blue", "violet"},
{"green", "blue", "cyan"},
{"pink", "violet", "magenta"},
-- mixes with black
{"white", "black", "grey"},
{"grey", "black", "dark_grey"},
{"green", "black", "dark_green"},
{"orange", "black", "brown"},
-- mixes with white
{"white", "red", "pink"},
{"white", "dark_grey", "grey"},
{"white", "dark_green", "green"},
}
for _, mix in pairs(dye_recipes) do
minetest.register_craft({
type = "shapeless",
output = "dye:" .. mix[3] .. " 2",
recipe = {"dye:" .. mix[1], "dye:" .. mix[2]},
})
end
-- Dummy calls to S() to allow translation scripts to detect the strings.
-- To update this run:
-- for _,e in ipairs(dye.dyes) do print(("S(%q)"):format(e[2].." Dye")) end
--[[
S("White Dye")
S("Grey Dye")
S("Dark Grey Dye")
S("Black Dye")
S("Violet Dye")
S("Blue Dye")
S("Cyan Dye")
S("Dark Green Dye")
S("Green Dye")
S("Yellow Dye")
S("Brown Dye")
S("Orange Dye")
S("Red Dye")
S("Magenta Dye")
S("Pink Dye")
--]]