write something there

This commit is contained in:
N-Nachtigal 2025-05-04 16:01:41 +02:00
commit b4b6c08f4f
8546 changed files with 309825 additions and 0 deletions

View file

@ -0,0 +1,136 @@
-- The better_farming mod was removed in favor of Farming Redo and X Farming,
-- and to avoid unknown nodes in existing worlds, the better_farming nodes are
-- aliased here.
for old,new in pairs({
adzuki = "x_farming:soybean",
agave = "air",
aloe = "air",
asparagus = "air",
beetroot = "x_farming:beetroot",
bokchoy = "x_farming:soybean",
cabbage = "farming:cabbage",
carrot = "x_farming:carrot",
cassava = "x_farming:coffee",
chilie = "farming:chili",
corn = "x_farming:corn",
cucumber = "farming:cucumber",
eggplants = "farming:eggplant",
ginger = "farming:ginger",
jute = "air",
kale = "farming:cabbage",
medicinal_plant = "air",
millet = "air",
mint = "farming:mint",
onion = "farming:onion",
pepper = "farming:pepper",
potato = "x_farming:potato",
rice = "farming:rice",
sisal = "air",
spiceleaf = "stevia",
spinach = "farming:spinach",
strawberry = "x_farming:strawberry",
tomatoes = "farming:tomato",
yucca = "air",
}) do
for i = 1, 8 do
minetest.register_alias("better_farming:" .. old .. "_" .. i,new == "air" and new or (new .. "_" .. i))
end
end
-- Alias Plantlife sunflowers to Farming Redo sunflowers
minetest.register_alias("flowers:sunflower","farming:sunflower_8")
minetest.register_alias("sunflower:sunflower","farming:sunflower_8")
-- Alias Plantlife bushes to default bushes
minetest.register_alias("bushes:bushbranches1","default:bush_stem")
minetest.register_alias("bushes:bushbranches2","default:bush_stem")
minetest.register_alias("bushes:bushbranches3","default:bush_stem")
minetest.register_alias("bushes:bushbranches4","default:bush_stem")
minetest.register_alias("bushes:BushLeaves1","default:bush_leaves")
minetest.register_alias("bushes:BushLeaves2","default:bush_leaves")
minetest.register_alias("bushes:youngtree2_bottom","air")
-- Alias Plantlife young trees to air
minetest.register_alias("youngtrees:bamboo","air")
minetest.register_alias("youngtrees:youngtree_top","air")
minetest.register_alias("youngtrees:youngtree_middle","air")
minetest.register_alias("youngtrees:youngtree_bottom","air")
-- Aliases for removed biomes/bambooforest nodes
minetest.register_alias("bambooforest:bamboo","everness:bamboo_1")
minetest.register_alias("bambooforest:bamboo_wood","everness:bamboo_wood")
minetest.register_alias("bambooforest:bamboo_block","everness:bamboo_block")
minetest.register_alias("bambooforest:dirt_with_bamboo","default:dirt_with_rainforest_litter")
minetest.register_alias("bambooforest:granite","too_many_stones:granite_gray")
minetest.register_alias("bambooforest:granite_block","too_many_stones:granite_gray_block")
minetest.register_alias("bambooforest:granite_brick","too_many_stones:granite_gray_brick")
minetest.register_alias("walls:granite_brick","too_many_stones:granite_gray_wall")
minetest.register_alias("bambooforest:melon","x_farming:melon_fruit")
minetest.register_alias("bambooforest:bamboo_trapdoor","everness:trapdoor_bamboo")
minetest.register_alias("bambooforest:fence_bamboo_wood","everness:fence_bamboo_wood")
minetest.register_alias("bambooforest:fence_rail_bamboo_wood","everness:fence_rail_bamboo_wood")
-- Aliases for Ethereal bamboo
minetest.register_alias_force("ethereal:bamboo_leaves","air")
minetest.register_alias_force("ethereal:bamboo","everness:bamboo_3")
minetest.register_alias_force("ethereal:bamboo_block","everness:bamboo_block")
minetest.register_alias_force("ethereal:bamboo_floor","stairs:slab_bamboo_wood")
-- Alias for palm trees and coconuts to the Everness versions of these nodes
minetest.register_alias_force("ethereal:palmleaves","everness:palm_leaves")
minetest.register_alias_force("ethereal:palm_trunk","everness:palm_tree")
minetest.register_alias_force("ethereal:palm_sapling","everness:palm_tree_sapling")
minetest.register_alias_force("ethereal:coconut","everness:coconut")
minetest.register_alias_force("ethereal:coconut_slice","everness:coconut_fruit")
minetest.register_alias_force("ethereal:palm_wood","everness:palm_tree_wood")
minetest.register_alias_force("ethereal:fence_palm","everness:fence_palm_wood")
minetest.register_alias_force("ethereal:fence_rail_palm","everness:fence_rail_palm_wood")
minetest.register_alias_force("ethereal:fencegate_palm_closed","everness:gate_palm_wood_closed")
minetest.register_alias_force("ethereal:fencegate_palm_open","everness:gate_palm_wood_open")
minetest.register_alias_force("ethereal:mese_post_palm","everness:mese_post_light_palm_wood")
minetest.register_alias_force("stairs:slab_palm_wood","stairs:slab_palm_tree_wood")
minetest.register_alias_force("stairs:stair_palm_wood","stairs:stair_palm_tree_wood")
minetest.register_alias_force("stairs:stair_outer_palm_wood","stairs:stair_outer_palm_tree_wood")
minetest.register_alias_force("stairs:stair_inner_palm_wood","stairs:stair_inner_palm_tree_wood")
-- Aliases for unused Natural Biomes nodes that are not registered
minetest.register_alias("naturalbiomes:bambooforest_litter","default:dirt_with_rainforest_litter")
minetest.register_alias("naturalbiomes:bamboo_trunk","everness:bamboo_3")
minetest.register_alias("naturalbiomes:bamboo_wood","everness:bamboo_block")
minetest.register_alias("naturalbiomes:bamboo_leaves","air")
minetest.register_alias("naturalbiomes:bamboo_sapling","everness:bamboo_2")
minetest.register_alias("stairs:slab_naturalbiomes_bambooforest_bamboo_wood2","stairs:slab_bamboo_wood")
minetest.register_alias("naturalbiomes:stair_naturalbiomes_bambooforest_bamboo_wood2","stairs:stair_bamboo_wood")
minetest.register_alias("naturalbiomes:stair_outer_naturalbiomes_bambooforest_bamboo_wood2","stairs:stair_outer_bamboo_wood")
minetest.register_alias("naturalbiomes:stair_inner_naturalbiomes_bambooforest_bamboo_wood2","stairs:stair_inner_bamboo_wood")
minetest.register_alias("stairs:slab_naturalbiomes_bambooforest_bamboo_trunk","stairs:slab_bamboo_wood")
minetest.register_alias("naturalbiomes:stair_naturalbiomes_bambooforest_bamboo_trunk","stairs:stair_bamboo_wood")
minetest.register_alias("naturalbiomes:stair_outer_naturalbiomes_bambooforest_bamboo_trunk","stairs:stair_outer_bamboo_wood")
minetest.register_alias("naturalbiomes:stair_inner_naturalbiomes_bambooforest_bamboo_trunk","stairs:stair_inner_bamboo_wood")
minetest.register_alias("naturalbiomes:smallbamboo","everness:bamboo_2")
minetest.register_alias("naturalbiomes:bambooforest_rock","default:cobble")
minetest.register_alias("naturalbiomes:bambooforest_groundgrass","default:grass_4")
minetest.register_alias("naturalbiomes:bambooforest_groundgrass2","default:grass_5")
minetest.register_alias("naturalbiomes:banana_trunk","ethereal:banana_trunk")
minetest.register_alias("naturalbiomes:banana_wood","ethereal:banana_wood")
minetest.register_alias("naturalbiomes:banana_leaves","ethereal:bananaleaves")
minetest.register_alias("naturalbiomes:banana_sapling","ethereal:banana_tree_sapling")
minetest.register_alias("naturalbiomes:palmbeach_sand","default:sand")
minetest.register_alias("naturalbiomes:palmbeach_rock","default:cobble")
minetest.register_alias("naturalbiomes:palm_trunk","everness:palm_tree")
minetest.register_alias("naturalbiomes:palm_wood","everness:palm_tree_wood")
minetest.register_alias("naturalbiomes:palm_leaves","everness:palm_leaves")
minetest.register_alias("naturalbiomes:palm_sapling","everness:palm_tree_sapling")
minetest.register_alias("naturalbiomes:beach_bush_stem","default:bush_stem")
minetest.register_alias("naturalbiomes:beach_bush_leaves","default:bush_leaves")
minetest.register_alias("naturalbiomes:beach_bush_sapling","default:bush_sapling")
minetest.register_alias("naturalbiomes:palmbeach_grass1","default:marram_grass_1")
minetest.register_alias("naturalbiomes:palmbeach_grass2","default:marram_grass_2")
minetest.register_alias("naturalbiomes:palmbeach_grass3","default:marram_grass_3")
minetest.register_alias("naturalbiomes:banana_bunch","ethereal:banana")
minetest.register_alias("naturalbiomes:banana","ethereal:banana")
minetest.register_alias("naturalbiomes:coconut_slice","everness:coconut_fruit")
minetest.register_alias("naturalbiomes:coconut","everness:coconut")

View file

@ -0,0 +1,4 @@
name = asuna_alias
description = Aliases for items/nodes across various mods
depends = ethereal, everness
author = EmptyStar

View file

@ -0,0 +1,9 @@
MIT License
Copyright © 2024 EmptyStar <https://github.com/EmptyStar>
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.

View file

@ -0,0 +1,36 @@
return function(award)
-- Process all applicable TMS and Caverealms glow gems/minerals
local goals = {}
for _,node in ipairs({
"caverealms:glow_amethyst",
"caverealms:glow_crystal",
"caverealms:glow_ruby",
"caverealms:glow_emerald",
"caverealms:glow_gem",
"too_many_stones:glow_apatite",
"too_many_stones:glow_calcite",
"too_many_stones:glow_esperite",
"too_many_stones:glow_fluorite",
"too_many_stones:glow_selenite",
"too_many_stones:glow_sodalite",
"too_many_stones:glow_willemite",
}) do
table.insert(goals,{
description = "Mine " .. minetest.registered_nodes[node].description,
trigger = {
type = "dig",
target = 1,
node = node,
},
})
end
-- Add triggers to award
return {
title = "At the End of the Tunnel",
description = "Mine every underground glow gem and glow mineral",
difficulty = 215,
icon = "[inventorycube{tms_glow_willemite.png{tms_glow_willemite.png{tms_glow_willemite.png",
goals = goals,
}
end

View file

@ -0,0 +1,25 @@
return function(award)
local goals = { target = 1 }
for node,def in pairs(minetest.registered_nodes) do
if node:find("^marinara:sand_with_seashells") then
table.insert(goals,{
id = node:gsub(":","_"),
description = "Dig " .. def.description,
trigger = {
type = "dig",
target = 1,
node = node,
},
})
end
end
return {
title = "By the Seashore",
description = "Dig up any seashells",
difficulty = 10,
icon = "[inventorycube{default_sand.png&marinara_seashells.png{default_sand.png&marinara_seashells.png{default_sand.png&marinara_seashells.png",
goals = goals,
}
end

View file

@ -0,0 +1,36 @@
return function(award)
-- Register goals for each base biome
local goals = {}
local biomes = {}
local excluded_biomes = {
mountain = true,
underground = true,
quicksand = true,
}
for _,biome in ipairs(asuna.biome_groups.base) do
if not excluded_biomes[biome] then
biomes[biome] = true
table.insert(goals,{
id = biome,
description = "Explore " .. asuna.biomes[biome].name,
})
end
end
-- Register interval callback to check player biome
asuna_awards.register_on_interval(award,function(player)
local biome = minetest.get_biome_name(minetest.get_biome_data(player:get_pos()).biome)
if biomes[biome] then
return award, biome
end
end)
-- Return award definition
return {
title = "Cosmopolitan",
description = "Explore all Asuna surface biomes",
difficulty = 400,
icon = "server_favorite.png",
goals = goals,
}
end

View file

@ -0,0 +1,15 @@
return function(award)
minetest.register_on_player_hpchange(function(player, hp_change, reason)
if reason.type == "node_damage" then
awards.unlock(player:get_player_name(),award)
end
end)
return {
title = "Don't Touch That",
description = "Take damage from a harmful node",
difficulty = 15,
icon = "fire_basic_flame.png",
condition = core.settings:get_bool("enable_damage"),
}
end

View file

@ -0,0 +1,13 @@
return function(award)
return {
title = "Ea-nāṣir's Legacy",
description = "Mine copper ore",
difficulty = 20,
icon = "[inventorycube{default_stone.png&default_mineral_copper.png{default_stone.png&default_mineral_copper.png{default_stone.png&default_mineral_copper.png",
trigger = {
type = "dig",
node = "default:stone_with_copper",
target = 1,
},
}
end

View file

@ -0,0 +1,35 @@
-- Get beds skip night setting
local is_night_skip_enabled = minetest.settings:get_bool("enable_bed_night_skip",true)
return function(award)
-- Unlock for actual sleeping if night skip is enabled, else unlock for laying down
if is_night_skip_enabled then
local ogbsn = beds.skip_night
beds.skip_night = function()
for _,player in ipairs(minetest.get_connected_players()) do
local player_name = player and player:get_player_name() or nil
if player_name and beds.player[player_name] then
awards.unlock(player_name,award)
end
end
ogbsn()
end
else
local ogborc = beds.on_rightclick
beds.on_rightclick = function(pos, player)
local retval = ogborc(pos, player)
local player_name = player and player:get_player_name() or nil
if beds.player[player_name] then
awards.unlock(player_name,award)
end
return retval
end
end
return {
title = "Enter Sandman",
description = "Sleep in a bed",
difficulty = 240,
icon = "beds_bed_fancy.png",
}
end

View file

@ -0,0 +1,22 @@
return function(award)
minetest.override_item("default:mese_block",{
dropped_step = function(self,pos)
-- Check if player explicitly dropped it
local dropper = self.dropped_by
if dropper and minetest.get_player_by_name(dropper) then
local groups = minetest.registered_nodes[minetest.get_node(pos).name].groups
if groups and groups.lava and groups.lava > 0 then
awards.unlock(dropper,award)
end
end
return true
end,
})
return {
title = "Fellowship of the Mese",
description = "Drop a mese block into lava",
difficulty = 280,
icon = "[inventorycube{default_mese_block.png{default_mese_block.png{default_mese_block.png^fire_basic_flame.png",
}
end

View file

@ -0,0 +1,13 @@
return function(award)
return {
title = "Fool's Gold",
description = "Mine pyrite ore",
difficulty = 25,
icon = "[inventorycube{default_stone.png&everness_mineral_pyrite.png{default_stone.png&everness_mineral_pyrite.png{default_stone.png&everness_mineral_pyrite.png",
trigger = {
type = "dig",
node = "everness:pyrite_ore",
target = 1,
},
}
end

View file

@ -0,0 +1,22 @@
return function(award)
local mese_fruit_on_dig = minetest.registered_nodes["everness:mese_tree_fruit"].on_dig
minetest.override_item("everness:mese_tree_fruit",{
on_dig = function(pos,node,digger)
if node.param2 == 0
and minetest.get_node({ x = pos.x, y = pos.y + 1, z = pos.z }).name == "everness:mese_leaves"
and digger
and digger:is_player()
then
awards.unlock(digger:get_player_name(),award)
end
return mese_fruit_on_dig(pos,node,digger)
end,
})
return {
title = "Fruit of the Heavens",
description = "Pluck a mese fruit from a mese tree",
difficulty = 140,
icon = "everness_mese_tree_fruit_item.png",
}
end

View file

@ -0,0 +1,28 @@
return function(award)
local goals = {
target = 20,
show_locked = false,
}
for item,def in pairs(minetest.registered_items) do
if def.on_use then
table.insert(goals,{
id = item:gsub(":","_"),
description = "Eat " .. def.description,
trigger = {
type = "eat",
target = 1,
item = item,
},
})
end
end
return {
title = "Gourmand",
description = "Eat 20 different food items",
difficulty = 180,
icon = "farming_bread.png",
goals = goals,
}
end

View file

@ -0,0 +1,13 @@
return function(award)
return {
title = "Have a Heart",
description = "Mine tin ore",
difficulty = 30,
icon = "[inventorycube{default_stone.png&default_mineral_tin.png{default_stone.png&default_mineral_tin.png{default_stone.png&default_mineral_tin.png",
trigger = {
type = "dig",
node = "default:stone_with_tin",
target = 1,
},
}
end

View file

@ -0,0 +1,20 @@
return function(award)
local forc = minetest.registered_items["flowerpot:empty"].on_rightclick
minetest.override_item("flowerpot:empty",{
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
local retval = forc(pos, node, clicker, itemstack, pointed_thing)
local node = minetest.get_node(pos).name
if node ~= "flowerpot:empty" and node:find("^flowerpot:") then
awards.unlock(clicker:get_player_name(),award)
end
return retval
end,
})
return {
title = "Home Gardening",
description = "Pot a flower in a flowerpot",
difficulty = 30,
icon = "pia.png",
}
end

View file

@ -0,0 +1,23 @@
return function(award)
for entity,def in pairs(minetest.registered_entities) do
if def._creatura_mob or def._cmi_is_mob then
local ogop = def.on_punch
def.on_punch = function(self,puncher,...)
if puncher and puncher:is_player() then
local player = puncher:get_player_name()
if not awards.player(player).unlocked[award] and puncher:get_wielded_item():get_name() == "" then
awards.unlock(player,award)
end
end
return ogop(self,puncher,...)
end
end
end
return {
title = "HOW CAN SHE SLAP???",
description = "Punch a critter with your bare hand",
difficulty = 45,
icon = "heart.png",
}
end

View file

@ -0,0 +1,17 @@
return function(award)
local oghou = farming.hoe_on_use
farming.hoe_on_use = function(itemstack, user, pointed_thing, uses)
local retval = oghou(itemstack, user, pointed_thing, uses)
if retval ~= nil then
awards.unlock(user:get_player_name(),award)
end
return retval
end
return {
title = "It's Honest Work",
description = "Till soil for farming using a hoe",
difficulty = 40,
icon = "farming_tool_stonehoe.png",
}
end

View file

@ -0,0 +1,29 @@
return function(award)
local goals = {
target = 25,
show_locked = false,
}
for node,def in pairs(minetest.registered_nodes) do
local groups = def.groups
if groups and groups.sapling and groups.sapling > 0 then
table.insert(goals,{
id = node:gsub(":","_"),
description = "Plant a " .. def.description,
trigger = {
type = "place",
target = 1,
node = node,
},
})
end
end
return {
title = "Johnny Appleseed",
description = "Plant " .. goals.target .. " different types of tree sapling",
difficulty = 130,
icon = "default_sapling.png",
goals = goals,
}
end

View file

@ -0,0 +1,29 @@
return function(award)
local goals = {
target = 50,
show_locked = false,
}
for node,def in pairs(minetest.registered_nodes) do
local groups = def.groups
if groups and groups.flower and groups.flower > 0 then
table.insert(goals,{
id = node:gsub(":","_"),
description = "Pick " .. def.description,
trigger = {
type = "dig",
target = 1,
node = node,
},
})
end
end
return {
title = "Joys of Spring",
description = "Pick " .. goals.target .. " different types of flower",
difficulty = 140,
icon = "flowers_rose.png",
goals = goals,
}
end

View file

@ -0,0 +1,28 @@
return function(award)
local goals = {
target = 1,
show_locked = false,
}
for node,def in pairs(minetest.registered_nodes) do
if def.light_source and def.light_source > 0 then
table.insert(goals,{
id = node:gsub(":","_"),
description = "Place a " .. def.description,
trigger = {
type = "place",
target = 1,
node = node,
},
})
end
end
return {
title = "Let There Be Light",
description = "Place any light",
difficulty = 15,
icon = "default_torch_on_floor.png",
goals = goals,
}
end

View file

@ -0,0 +1,16 @@
return function(award)
minetest.override_item("lootchests_default:stone_chest",{
on_rightclick = function(pos,node,clicker)
if clicker:is_player() then
awards.unlock(clicker:get_player_name(),award)
end
end,
})
return {
title = "Lost But Not Forgotten",
description = "Open an ancient stone chest",
difficulty = 240,
icon = "[inventorycube{lootchests_default_stone_chest_top.png{lootchests_default_stone_chest_front.png{lootchests_default_stone_chest_side.png",
}
end

View file

@ -0,0 +1,13 @@
return function(award)
return {
title = "Lucy in the Sky",
description = "Mine diamond ore",
difficulty = 205,
icon = "[inventorycube{default_stone.png&default_mineral_diamond.png{default_stone.png&default_mineral_diamond.png{default_stone.png&default_mineral_diamond.png",
trigger = {
type = "dig",
node = "default:stone_with_diamond",
target = 1,
},
}
end

View file

@ -0,0 +1,14 @@
return function(award)
minetest.register_on_player_receive_fields(function(player, formname, fields)
if formname == "default:book" and fields.save and fields.title and fields.text then
awards.unlock(player:get_player_name(),award)
end
end)
return {
title = "Mightier Than the Sword",
description = "Write a book",
difficulty = 135,
icon = "default_book_written.png",
}
end

View file

@ -0,0 +1,30 @@
return function(award)
-- Process all soup items
local goals = { target = 1 }
for _,item in ipairs({
"farming:tomato_soup",
"ethereal:mushroom_soup",
"soup:chicken_noodle_soup",
"x_farming:beetroot_soup",
"farming:pea_soup",
"farming:onion_soup",
}) do
table.insert(goals,{
description = "Cook " .. minetest.registered_items[item].description,
trigger = {
type = "craft",
target = 1,
item = item,
},
})
end
-- Add triggers to award
return {
title = "Mod Soup",
description = "Cook any soup",
difficulty = 35,
icon = "chicken_noodle_soup.png",
goals = goals,
}
end

View file

@ -0,0 +1,15 @@
return function(award)
local ogtt = telemosaic.teleport
telemosaic.teleport = function(player,src,dst)
ogtt(player,src,dst)
awards.unlock(player:get_player_name(),award)
end
return {
title = "My God, It's Full of Stars",
description = "Teleport using a teleportation beacon",
difficulty = 60,
icon = "[inventorycube{telemosaic_beacon_top.png{telemosaic_beacon_side.png{telemosaic_beacon_side.png",
condition = asuna.content.wayfarer.worldgate,
}
end

View file

@ -0,0 +1,23 @@
return function(award)
for _,bug in ipairs({
"fireflies:firefly",
"butterflies:butterfly_red",
"butterflies:butterfly_white",
"butterflies:butterfly_violet",
}) do
minetest.override_item(bug,{
after_dig_node = function(pos,oldnode,oldmeta,digger)
if digger:is_player() and digger:get_wielded_item():get_name() == "fireflies:bug_net" then
awards.unlock(digger:get_player_name(),award)
end
end,
})
end
return {
title = "Net Worth",
description = "Use a bug net to catch a butterfly or a firefly",
difficulty = 55,
icon = "fireflies_bugnet.png",
}
end

View file

@ -0,0 +1,27 @@
return function(award)
-- Process all applicable TMS opal
local goals = { target = 1 }
for _,node in ipairs({
"too_many_stones:opal",
"too_many_stones:black_opal",
"too_many_stones:fire_opal",
}) do
table.insert(goals,{
description = "Mine " .. minetest.registered_nodes[node].description,
trigger = {
type = "dig",
target = 1,
node = node,
},
})
end
-- Add triggers to award
return {
title = "Opalescent",
description = "Mine any opal",
difficulty = 205,
icon = "[inventorycube{[combine:16x16:0,0=tms_opal_animated.png{[combine:16x16:0,0=tms_opal_animated.png{[combine:16x16:0,0=tms_opal_animated.png",
goals = goals,
}
end

View file

@ -0,0 +1,29 @@
return function(award)
local goals = {
target = 25,
show_locked = false,
}
for node,def in pairs(minetest.registered_nodes) do
local groups = def.groups
if groups and groups.tree and groups.tree > 0 then
table.insert(goals,{
id = node:gsub(":","_"),
description = "Chop " .. def.description,
trigger = {
type = "dig",
target = 1,
node = node,
},
})
end
end
return {
title = "Paul Bunyan",
description = "Chop " .. goals.target .. " different types of timber",
difficulty = 180,
icon = "[inventorycube{default_tree_top.png{default_tree.png{default_tree.png",
goals = goals,
}
end

View file

@ -0,0 +1,14 @@
return function(award)
minetest.register_on_player_receive_fields(function(player, formname, fields)
if formname == "music_settings" and fields.play then
awards.unlock(player:get_player_name(),award)
end
end)
return {
title = "Play That Funky Music",
description = "Use the music settings to play a music track",
difficulty = 4,
icon = "music_sfinv_buttons_icon.png",
}
end

View file

@ -0,0 +1,18 @@
return function(award)
local ogfsou = minetest.registered_items["fire:flint_and_steel"].on_use
minetest.override_item("fire:flint_and_steel",{
on_use = function(itemstack,user,pointed_thing)
ogfsou(itemstack,user,pointed_thing)
if pointed_thing.type == "node" and minetest.get_node(pointed_thing.above).name:find("^fire:") then
awards.unlock(user:get_player_name(),award)
end
end
})
return {
title = "Prometheus",
description = "Start a fire using Flint and Steel",
difficulty = 240,
icon = "fire_flint_steel.png",
}
end

View file

@ -0,0 +1,30 @@
return function(award)
local goals = {
target = 25,
show_locked = false,
}
for bottle,def in pairs(bottles.registered_filled_bottles) do
table.insert(goals,{
id = bottle:gsub(":","_"),
description = def.description:split("\n")[1],
})
end
local ogbf = bottles.fill
bottles.fill = function(itemstack,placer,target)
local retval, bottle = ogbf(itemstack,placer,target)
if bottle then
awards.unlock(placer:get_player_name(),award,bottle:gsub(":","_"))
end
return retval
end
return {
title = "Put a Cork in It",
description = "Fill bottles with " .. goals.target .. " different substances",
difficulty = 260,
icon = bottles.registered_filled_bottles["bottles:bottle_of_water"].image,
goals = goals,
}
end

View file

@ -0,0 +1,13 @@
return function(award)
return {
title = "Rare Earth",
description = "Mine mese ore",
difficulty = 200,
icon = "[inventorycube{default_stone.png&default_mineral_mese.png{default_stone.png&default_mineral_mese.png{default_stone.png&default_mineral_mese.png",
trigger = {
type = "dig",
node = "default:stone_with_mese",
target = 1,
},
}
end

View file

@ -0,0 +1,13 @@
return function(award)
return {
title = "Rarest Earth",
description = "Mine a mese block",
difficulty = 250,
icon = "[inventorycube{default_mese_block.png{default_mese_block.png{default_mese_block.png",
trigger = {
type = "dig",
node = "default:mese_block",
target = 1,
},
}
end

View file

@ -0,0 +1,18 @@
return function(award)
-- Register interval callback to look for nearby sequoia trunks
asuna_awards.register_on_interval(award,function(player)
local pos = player:get_pos()
local tree_nodes = minetest.find_nodes_in_area(pos:add(vector.new(-10,0,-10)),pos:add(vector.new(10,2,10)),{"everness:sequoia_tree"},false)
if #tree_nodes > 60 then
return award
end
end)
-- Award definition
return {
title = "Reach for the Sky",
description = "Find a giant sequoia tree",
difficulty = 115,
icon = "everness_sequoia_tree_sapling.png",
}
end

View file

@ -0,0 +1,29 @@
return function(award)
local goals = {
target = 50,
show_locked = false,
}
for node,def in pairs(minetest.registered_nodes) do
local groups = def.groups
if def.is_ground_content and groups and groups.stone and groups.stone > 0 then
table.insert(goals,{
id = node:gsub(":","_"),
description = "Mine " .. def.description,
trigger = {
type = "dig",
target = 1,
node = node,
},
})
end
end
return {
title = "Rock On",
description = "Mine " .. goals.target .. " different types of stone",
difficulty = 180,
icon = "[inventorycube{default_stone.png{default_stone.png{default_stone.png",
goals = goals,
}
end

View file

@ -0,0 +1,13 @@
return function(award)
return {
title = "Sixteen Tons",
description = "Mine coal ore",
difficulty = 20,
icon = "[inventorycube{default_stone.png&default_mineral_coal.png{default_stone.png&default_mineral_coal.png{default_stone.png&default_mineral_coal.png",
trigger = {
type = "dig",
node = "default:stone_with_coal",
target = 1,
},
}
end

View file

@ -0,0 +1,13 @@
return function(award)
return {
title = "Sleepy Hollow",
description = "Craft a pumpkin lantern",
difficulty = 60,
icon = "[inventorycube{x_farming_pumpkin_fruit_top.png{x_farming_pumpkin_fruit_side_on.png{x_farming_pumpkin_fruit_side.png",
trigger = {
type = "craft",
item = "x_farming:pumpkin_lantern",
target = 1,
}
}
end

View file

@ -0,0 +1,26 @@
return function(award)
-- Get set of slippery nodes
local slippery_nodes = {}
for node,def in pairs(minetest.registered_nodes) do
local groups = def.groups
if groups and groups.slippery and groups.slippery > 0 then
slippery_nodes[node] = true
end
end
-- Register interval callback to check node below players
asuna_awards.register_on_interval(award,function(player)
local below = minetest.get_node(player:get_pos():add(vector.new(0,-1,0))).name
if below and slippery_nodes[below] then
return award
end
end)
-- Award definition
return {
title = "Slip Slidin' Away",
description = "Walk on a slippery surface",
difficulty = 30,
icon = "[inventorycube{default_ice.png{default_ice.png{default_ice.png",
}
end

View file

@ -0,0 +1,13 @@
return function(award)
return {
title = "Strike While It's Hot",
description = "Mine iron ore",
difficulty = 40,
icon = "[inventorycube{default_stone.png&default_mineral_iron.png{default_stone.png&default_mineral_iron.png{default_stone.png&default_mineral_iron.png",
trigger = {
type = "dig",
node = "default:stone_with_iron",
target = 1,
},
}
end

View file

@ -0,0 +1,13 @@
return function(award)
return {
title = "Super Mushroom",
description = "Mine a giant red mushroom cap",
difficulty = 35,
icon = "[inventorycube{ethereal_mushroom_block.png{ethereal_mushroom_block.png{ethereal_mushroom_block.png",
trigger = {
type = "dig",
node = "ethereal:mushroom",
target = 1,
},
}
end

View file

@ -0,0 +1,20 @@
return function(award)
-- Register interval callback to check y value
asuna_awards.register_on_interval(award,function(player)
local pos = player:get_pos()
if minetest.get_item_group(minetest.get_node(pos:add(vector.new(0,-0.5,0))).name,"leaves") > 0 then
local tree_nodes = minetest.find_nodes_in_area(pos:add(vector.new(-3,-3,-3)),pos:add(vector.new(3,3,3)),{"group:tree"},false)
if #tree_nodes > 1 and #minetest.find_nodes_in_area(pos:add(vector.new(0,-3,0)),pos,{"group:soil","group:stone"},false) == 0 then
return award
end
end
end)
-- Award definition
return {
title = "Tarzan",
description = "Climb a tree",
difficulty = 20,
icon = "[inventorycube{default_leaves.png{default_leaves.png{default_leaves.png",
}
end

View file

@ -0,0 +1,17 @@
return function(award)
-- Register interval callback to check node at each player's location
asuna_awards.register_on_interval(award,function(player)
local at = minetest.get_node(player:get_pos()).name
if at == "x_farming:rope" then
return award
end
end)
-- Award definition
return {
title = "The Careful Way Down",
description = "Climb on a rope made from vines, hemp, or barley",
difficulty = 40,
icon = "x_farming_rope_item.png",
}
end

View file

@ -0,0 +1,14 @@
return function(award)
minetest.register_on_player_hpchange(function(player, hp_change, reason)
if reason.type == "fall" then
awards.unlock(player:get_player_name(),award)
end
end)
return {
title = "The Easy Way Down",
description = "Take fall damage",
icon = "drop_btn.png",
condition = core.settings:get_bool("enable_damage"),
}
end

View file

@ -0,0 +1,12 @@
return function(award)
return {
title = "The Matrix Reloaded",
description = "Enter the world a second time",
difficulty = 5,
icon = "server_public.png",
trigger = {
type = "join",
target = 2,
}
}
end

View file

@ -0,0 +1,20 @@
return function(award)
local ogbou = minetest.registered_craftitems["bucket:bucket_empty"].on_use
minetest.override_item("bucket:bucket_empty",{
on_use = function(itemstack, player, pointed_thing)
local was_lava = pointed_thing.type == "node" and (minetest.get_node(pointed_thing.under).name == "default:lava_source") or false
local retval = ogbou(itemstack, player, pointed_thing)
if retval and was_lava and minetest.get_node(pointed_thing.under).name ~= "default:lava_source" then
awards.unlock(player:get_player_name(),award)
end
return retval
end,
})
return {
title = "The New Hotness",
description = "Collect a bucket of lava",
difficulty = 45,
icon = "bucket_lava.png",
}
end

View file

@ -0,0 +1,19 @@
return function(award)
local ogacp = awards.clear_player
awards.clear_player = function(name)
local had_cosmopolitan = awards.player(name).unlocked["asuna_awards:cosmopolitan"]
local retval = ogacp(name)
if had_cosmopolitan then
awards.unlock(name,award)
end
return retval
end
return {
title = "The Prestige",
description = "Reset your awards after earning Cosmopolitan",
difficulty = 1000,
icon = "cdb_update.png",
secret = true,
}
end

View file

@ -0,0 +1,13 @@
return function(award)
return {
title = "Timeless",
description = "Mine quartz ore",
difficulty = 25,
icon = "[inventorycube{default_stone.png&everness_quartz_ore.png{default_stone.png&everness_quartz_ore.png{default_stone.png&everness_quartz_ore.png",
trigger = {
type = "dig",
node = "everness:quartz_ore",
target = 1,
},
}
end

View file

@ -0,0 +1,18 @@
return function(award)
-- Register interval callback to check for deep water
asuna_awards.register_on_interval(award,function(player)
local pos = player:get_pos()
local y = pos.y
if y <= -20 and y >= -32 and minetest.get_node(pos).name:find("water") then
return award
end
end)
-- Award definition
return {
title = "Under the Sea",
description = "Dive into deep ocean",
difficulty = 50,
icon = "bubble.png",
}
end

View file

@ -0,0 +1,16 @@
return function(award)
-- Register interval callback to check y value
asuna_awards.register_on_interval(award,function(player)
if player:get_pos().y <= -1000 then
return award
end
end)
-- Award definition
return {
title = "Way Down Hadestown",
description = "Reach a depth of -1000",
difficulty = 110,
icon = "everness_weeping_obsidian.png",
}
end

View file

@ -0,0 +1,13 @@
return function(award)
return {
title = "Worth Its Weight",
description = "Mine gold ore",
difficulty = 90,
icon = "[inventorycube{default_stone.png&default_mineral_gold.png{default_stone.png&default_mineral_gold.png{default_stone.png&default_mineral_gold.png",
trigger = {
type = "dig",
node = "default:stone_with_gold",
target = 1,
},
}
end

View file

@ -0,0 +1,24 @@
-- Globals
asuna_awards = {
awards = {},
}
-- Load awards after other mods are loaded if enabled
if asuna.content.wayfarer.awards then
minetest.register_on_mods_loaded(function()
local mpath = minetest.get_modpath("asuna_awards")
dofile(mpath .. "/register_on_interval.lua")
local awards_path = mpath .. "/awards/"
local award_files = minetest.get_dir_list(awards_path,false)
for i = 1, #award_files do
local file = award_files[i]
local award_name = "asuna_awards:" .. file:sub(1,-5)
local implementation = dofile(awards_path .. file)
local award_definition = implementation(award_name)
if award_definition.condition == nil or award_definition.condition then
asuna_awards.awards[award_name] = award_definition
awards.register_award(award_name,award_definition)
end
end
end)
end

View file

@ -0,0 +1,5 @@
name = asuna_awards
title = Asuna Awards
description = Adds awards to Asuna using the Awards mod
author = EmptyStar
depends = asuna_core, awards, bottles, ethereal, everness, naturalbiomes, caverealms, lootchests_default, too_many_stones, flowerpot

View file

@ -0,0 +1,31 @@
-- Settings
local INTERVAL = 1
-- Register interval callbacks
local interval_callbacks = {}
function asuna_awards.register_on_interval(award,fn)
table.insert(interval_callbacks,{
award = award,
fn = fn,
})
end
-- Do callbacks at regular intervals
local function analyze_players()
for _,player in ipairs(minetest.get_connected_players()) do
local name = player:get_player_name()
local award_data = awards.player(name)
for _,callback in ipairs(interval_callbacks) do
if not award_data.unlocked[callback.award] then
local award, goal = callback.fn(player)
if award then
awards.unlock(name,award,goal)
end
end
end
end
minetest.after(INTERVAL,analyze_players)
end
-- Start intervals
minetest.after(INTERVAL,analyze_players)

View file

@ -0,0 +1,9 @@
MIT License
Copyright © 2024 EmptyStar <https://github.com/EmptyStar>
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.

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,38 @@
minetest.set_mapgen_setting("mgv7_cave_width",0.0415,true)
minetest.set_mapgen_setting("mgv7_cavern_limit",-48,true)
minetest.set_mapgen_setting("mgv7_cavern_taper",64,true)
minetest.set_mapgen_setting("mgv7_cavern_threshold",0.5,true)
minetest.set_mapgen_setting("mgv7_large_cave_depth",0,true)
minetest.set_mapgen_setting("mgv7_large_cave_flooded",0,true)
minetest.set_mapgen_setting("mgv7_large_cave_num_min",0,true)
minetest.set_mapgen_setting("mgv7_large_cave_num_max",0,true)
minetest.set_mapgen_setting("mgv7_small_cave_num_min",0,true)
minetest.set_mapgen_setting("mgv7_small_cave_num_max",0,true)
minetest.set_mapgen_setting_noiseparams("mgv7_np_cave1",{
offset = 0.96,
scale = 11.45,
seed = 3141592653,
spread = {
x = 62,
y = 32.75,
z = 62,
},
octaves = 4,
persistence = 0.44,
lacunarity = 1.698,
},true)
minetest.set_mapgen_setting_noiseparams("mgv7_np_cave2",{
offset = 0,
scale = 11.25,
seed = 2718281828,
spread = {
x = 180,
y = 32.75,
z = 180,
},
octaves = 4,
persistence = 0.675,
lacunarity = 1.5,
},true)

View file

@ -0,0 +1,100 @@
--[[
Biome API noise settings
]]
-- Set heat noise params
minetest.set_mapgen_setting_noiseparams("mg_biome_np_heat",{
flags = "default",
lacunarity = 1,
persistence = 0.925,
seed = 5349,
spread = {
x = 2000,
y = 2000,
z = 2000,
},
scale = 42,
octaves = 2,
offset = 50,
},true)
-- Set humidity noise params
minetest.set_mapgen_setting_noiseparams("mg_biome_np_humidity",{
flags = "default",
lacunarity = 1,
persistence = 0.925,
seed = 842,
spread = {
x = 2000,
y = 2000,
z = 2000,
},
scale = 42,
octaves = 2,
offset = 50,
},true)
-- Set heat blend noise params
minetest.set_mapgen_setting_noiseparams("mg_biome_np_heat_blend",{
flags = "default",
lacunarity = 1.678,
persistence = 0.625,
seed = 13,
spread = {
x = 24,
y = 24,
z = 24,
},
scale = 0.525,
octaves = 2,
offset = 0,
},true)
-- Set humidity blend noise params
minetest.set_mapgen_setting_noiseparams("mg_biome_np_humidity_blend",{
flags = "default",
lacunarity = 1.678,
persistence = 0.625,
seed = 90003,
spread = {
x = 24,
y = 24,
z = 24,
},
scale = 0.525,
octaves = 2,
offset = 0,
},true)
--[[
Climate analysis command
]]
-- Register climate analysis privilege
minetest.register_privilege("climate",{
description = "Privilege required to use the /climate command",
give_to_singleplayer = false,
give_to_admin = true,
})
-- Register climate analysis command
minetest.register_chatcommand("climate",{
params = "",
description = "analyze climate at current position",
privs = { climate = true },
func = function(name)
local player = minetest.get_player_by_name(name)
if not minetest.check_player_privs("climate") then
return false, "You do not have the 'climate' privilege necessary to use this command."
end
local pos = player:get_pos()
local data = minetest.get_biome_data(pos)
if data then
return true, "(" .. math.floor(pos.x) .. "," .. math.floor(pos.y) .. "," .. math.floor(pos.z) .. "): biome = " .. minetest.get_biome_name(data.biome) .. ", heat = " .. data.heat .. ", humidity = " .. data.humidity
else
return false, "No biome data for your current position!"
end
end
})

View file

@ -0,0 +1,816 @@
asuna.decor = {}
--[[
Flowers
]]
-- Group flowers by color
local flower_colors = {
black = {
"flowers:tulip_black",
},
white = {
"beautiflowers:carla",
"beautiflowers:cloe",
"beautiflowers:genesis",
"beautiflowers:gloria",
"beautiflowers:hadassa",
"beautiflowers:ingrid",
"beautiflowers:irene",
"beautiflowers:iris",
"beautiflowers:ivette",
"beautiflowers:michelle",
"beautiflowers:suri",
"flowers:dandelion_white",
"herbs:achillea_white",
"herbs:leontopodium_white",
"herbs:leucanthemum_white",
"herbs:trifolium_white",
},
blue = {
"beautiflowers:beatriz",
"beautiflowers:berta",
"flowers:geranium",
"herbs:centaurea",
"herbs:campanula_blue",
"herbs:digitalis_blue",
"herbs:iris",
"bakedclay:delphinium",
},
cyan = {
"beautiflowers:thais",
"beautiflowers:valentina",
"beautiflowers:valeria",
"beautiflowers:vera",
"beautiflowers:victoria",
"beautiflowers:virginia",
"beautiflowers:xenia",
"beautiflowers:zaida",
},
orange = {
"beautiflowers:dafne",
"beautiflowers:dana",
"beautiflowers:delia",
"beautiflowers:elena",
"beautiflowers:erica",
"beautiflowers:estela",
"beautiflowers:eva",
"beautiflowers:fabiola",
"beautiflowers:fiona",
"beautiflowers:gala",
"flowers:tulip",
},
yellow = {
"beautiflowers:ada",
"beautiflowers:agnes",
"beautiflowers:alicia",
"beautiflowers:alma",
"beautiflowers:amaia",
"beautiflowers:anastasia",
"beautiflowers:any",
"flowers:dandelion_yellow",
"farming:sunflower_8",
"herbs:digitalis_yellow",
"herbs:plantago",
},
purple = {
"beautiflowers:arleth",
"beautiflowers:astrid",
"beautiflowers:belen",
"beautiflowers:blanca",
"beautiflowers:casandra",
"beautiflowers:clara",
"beautiflowers:claudia",
"beautiflowers:minerva",
"beautiflowers:miriam",
"beautiflowers:nazareth",
"beautiflowers:noemi",
"beautiflowers:olga",
"beautiflowers:paula",
"beautiflowers:regina",
"beautiflowers:rocio",
"beautiflowers:sabrina",
"beautiflowers:vanesa",
"flowers:viola",
"beautiflowers:xena",
},
red = {
"beautiflowers:arcoiris",
"beautiflowers:jennifer",
"beautiflowers:lara",
"beautiflowers:laura",
"beautiflowers:lidia",
"beautiflowers:lucia",
"beautiflowers:mara",
"beautiflowers:martina",
"beautiflowers:melania",
"beautiflowers:mireia",
"beautiflowers:nadia",
"beautiflowers:nerea",
"beautiflowers:noelia",
"flowers:rose",
"herbs:dosera",
"herbs:papaver_red",
},
pink = {
"beautiflowers:caroline",
"beautiflowers:cristina",
"beautiflowers:diana",
"beautiflowers:gisela",
"beautiflowers:olimpia",
"beautiflowers:oriana",
"beautiflowers:pia",
"beautiflowers:raquel",
"beautiflowers:ruth",
"beautiflowers:sandra",
"beautiflowers:sara",
"beautiflowers:silvia",
"beautiflowers:sofia",
"beautiflowers:sonia",
"beautiflowers:talia",
"herbs:antirrhinum",
"herbs:trifolium_red",
"bakedclay:thistle",
"bakedclay:lazarus",
"ethereal:lilac",
},
green = {
"flowers:chrysanthemum_green",
"beautiflowers:pasto_1",
"beautiflowers:pasto_2",
"beautiflowers:pasto_3",
"beautiflowers:pasto_4",
"beautiflowers:pasto_5",
"beautiflowers:pasto_6",
"beautiflowers:pasto_7",
"beautiflowers:pasto_8",
"beautiflowers:pasto_9",
"beautiflowers:pasto_10",
"bakedclay:mannagrass",
},
red_mushroom = {
"flowers:mushroom_red",
},
brown_mushroom = {
"flowers:mushroom_brown",
"herbs:mushroom_boletus",
"herbs:mushroom_cantharellus",
"herbs:mushroom_macrolepiota",
},
odd_mushroom = {
"herbs:mushroom_amanita_green",
"herbs:mushroom_gyromitra",
"herbs:mushroom_galerina",
}
}
-- Register flower decorations per biome
local function cf(biome)
local decor = {
flowers = {},
mushrooms = {},
}
-- Generate list of flowers
for _,flower in ipairs(biome.flowers or {}) do
for _,flower in ipairs(flower_colors[flower]) do
table.insert(decor.flowers,flower)
end
end
-- Generate list of mushrooms
for _,mushroom in ipairs(biome.mushrooms or {}) do
for _,mushroom in ipairs(flower_colors[mushroom .. "_mushroom"]) do
table.insert(decor.mushrooms,mushroom)
end
end
return decor
end
-- Do actual decoration registration after other mods are finished
minetest.register_on_mods_loaded(function()
-- Register shore grass
local sandy_biomes = {}
local desert_biomes = {
desert = true,
sandstone_desert = true,
desert_shore = true,
sandstone_desert_shore = true,
desert_below = true,
sandstone_desert_below = true,
}
for biome,def in pairs(asuna.biomes) do
if def.shore == "default:sand" and
(def.ocean == "temperate" or def.ocean == "tropical" or def.ocean == "cold") and
not desert_biomes[biome]
then
table.insert(sandy_biomes,biome)
end
end
minetest.register_decoration(asuna.biome_groups.shore.inject_decoration({
deco_type = "simple",
place_on = "default:sand",
decoration = {"default:marram_grass_1","default:marram_grass_2","default:marram_grass_3"},
y_min = 2,
y_max = 2,
sidelen = 16,
noise_params = {
offset = 0.004,
scale = 0.0195,
spread = {x = 11, y = 11, z = 11},
seed = 69420,
octaves = 1,
},
biomes = sandy_biomes,
}))
minetest.register_decoration(asuna.biome_groups.shore.inject_decoration({
deco_type = "simple",
place_on = "default:sand",
decoration = {"default:marram_grass_1","default:marram_grass_2","default:marram_grass_3"},
y_min = 3,
y_max = 4,
sidelen = 16,
noise_params = {
offset = 0.075,
scale = 0.175,
spread = {x = 10, y = 10, z = 10},
seed = 42069,
octaves = 1,
},
biomes = sandy_biomes,
}))
-- Register flowers and mushrooms
for name,biome in pairs(asuna.biomes) do
-- Get node groups for biome
local decor = cf(biome)
-- Register flowers
if #biome.flowers > 0 then
minetest.register_decoration({
name = "asuna_core:flowers_" .. name,
deco_type = "simple",
sidelen = 80,
place_on = biome.nodes.extra and {biome.nodes[1],unpack(biome.nodes.extra)} or biome.nodes[1],
noise_params = {
offset = 0.006786,
scale = 0.004175,
spread = {x = 8, y = 8, z = 8},
seed = 1999,
octaves = 2,
persist = 0.44,
lacunarity = 0.75,
},
biomes = {name},
y_max = 31000,
y_min = 1,
decoration = decor.flowers,
})
end
-- Register mushrooms
if #biome.mushrooms > 0 then
minetest.register_decoration({
name = "asuna_core:mushrooms_" .. name,
deco_type = "simple",
sidelen = 8,
place_on = biome.nodes.extra and {biome.nodes[1],unpack(biome.nodes.extra)} or biome.nodes[1],
noise_params = {
offset = -0.0069,
scale = 0.027525,
spread = {x = 8, y = 8, z = 8},
seed = 60659,
octaves = 2,
persist = 0.7625,
lacunarity = 0.6,
},
biomes = {name},
y_max = 31000,
y_min = 1,
decoration = decor.mushrooms,
})
end
end
-- Special sunflower decor for the Plains biome
minetest.register_decoration({
name = "asuna_core:plains_special_sunflower",
deco_type = "simple",
place_on = {"default:dry_dirt_with_dry_grass"},
sidelen = 80,
fill_ratio = 0.075,
biomes = {"plains"},
y_max = 31000,
y_min = 1,
decoration = "farming:sunflower_8",
})
-- Special dense flower decor for the Prairie biome
minetest.register_decoration({
name = "asuna_core:prairie_special_flowers",
deco_type = "simple",
place_on = "prairie:prairie_dirt_with_grass",
sidelen = 80,
fill_ratio = 0.265,
biomes = {"prairie"},
y_max = 31000,
y_min = 1,
decoration = cf({ flowers = {"blue","cyan","white","orange","yellow"} }).flowers,
})
-- Special mushroom decor for the Mushroom biome
minetest.register_decoration({
name = "asuna_core:mushroom_special_mushrooms",
deco_type = "simple",
place_on = "ethereal:mushroom_dirt",
sidelen = 80,
fill_ratio = 0.075,
biomes = {"mushroom"},
y_max = 31000,
y_min = 1,
decoration = cf({ mushrooms = {"odd","brown"} }).mushrooms,
})
-- Bushes for certain grassy biomes
minetest.register_decoration({
name = "bushes:default_replacement",
deco_type = "schematic",
place_on = "default:dirt_with_grass",
sidelen = 80,
fill_ratio = 0.00025,
y_min = 2,
y_max = 31000,
biomes = {
"grassland",
"deciduous_forest",
"grassytwo",
"jumble",
"marsh",
},
schematic = minetest.get_modpath("default") .. "/schematics/bush.mts",
flags = "place_center_x,place_center_z",
})
--[[
Butterflies
]]
if minetest.get_modpath("butterflies") then
minetest.register_decoration({
name = "butterflies:butterfly",
deco_type = "simple",
place_on = "group:soil",
place_offset_y = 1,
sidelen = 80,
fill_ratio = 0.005,
biomes = {
"grassland",
"deciduous_forest",
"grassytwo",
"prairie",
"dorwinion",
"jumble",
"bamboo",
"naturalbiomes:heath",
"naturalbiomes:alpine",
"everness:bamboo_forest",
},
y_max = 31000,
y_min = 1,
decoration = {
"butterflies:butterfly_white",
"butterflies:butterfly_red",
"butterflies:butterfly_violet",
},
spawn_by = "group:flower",
num_spawn_by = 1,
})
end
--[[
Fireflies
]]
if minetest.get_modpath("fireflies") then
minetest.register_decoration({
name = "fireflies:firefly_low",
deco_type = "simple",
place_on = "group:soil",
place_offset_y = 2,
sidelen = 16,
noise_params = {
offset = -0.005,
scale = 0.015,
spread = {x = 60, y = 20, z = 60},
seed = 2112,
octaves = 1,
persistence = 0.75,
flags = "eased"
},
biomes = {
"deciduous_forest",
"grassland",
"grassytwo",
"prairie",
"dorwinion",
"jumble",
"swamp",
"marsh",
"naturalbiomes:alderswamp",
"naturalbiomes:alpine",
"naturalbiomes:bushland",
"everness:bamboo_forest",
},
y_max = 31000,
y_min = -1,
place_offset_y = 2,
decoration = "fireflies:hidden_firefly",
})
minetest.register_decoration({
name = "fireflies:firefly_low_bamboo_cave",
deco_type = "simple",
place_on = "everness:moss_block",
place_offset_y = 2,
sidelen = 16,
fill_ratio = 0.0065,
biomes = asuna.features.cave.bamboo,
y_max = 0,
y_min = -31000,
place_offset_y = 1,
decoration = "fireflies:hidden_firefly",
})
minetest.register_decoration({
name = "fireflies:firefly_low_dorwinion_cave",
deco_type = "simple",
place_on = "dorwinion:dorwinion_grass",
place_offset_y = 2,
sidelen = 16,
fill_ratio = 0.0065,
biomes = asuna.features.cave.dorwinion,
y_max = 0,
y_min = -31000,
place_offset_y = 1,
decoration = "fireflies:hidden_firefly",
})
end
--[[
Large jungle trees
]]
local chunksize = tonumber(minetest.get_mapgen_setting("chunksize"))
if chunksize >= 5 then
minetest.register_decoration({
name = "default:emergent_jungle_tree",
deco_type = "schematic",
place_on = {
"default:dirt_with_rainforest_litter",
},
sidelen = 80,
noise_params = {
offset = 0.0,
scale = 0.0025,
spread = {x = 200, y = 200, z = 200},
seed = 2685,
octaves = 3,
persist = 0.7
},
biomes = {"rainforest"},
y_max = 30000,
y_min = 1,
schematic = minetest.get_modpath("default") .. "/schematics/emergent_jungle_tree.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
place_offset_y = -4,
})
end
--[[
Hanging vines
]]
local soil_nodes = {}
for _,soil_node in ipairs({
"default:dirt",
"default:dirt_with_grass",
"default:dirt_with_rainforest_litter",
"livingjungle:jungleground",
"livingjungle:leafyjungleground",
"naturalbiomes:alderswamp_litter",
"naturalbiomes:alderswamp_dirt",
"default:tree",
"default:jungletree",
"default:jungleleaves",
}) do
soil_nodes[minetest.get_content_id(soil_node)] = true
end
local cids = {
air = minetest.get_content_id("air"),
vine = minetest.get_content_id("ethereal:vine"),
water = minetest.get_content_id("default:water_source"), -- used for waterfalls below; unrelated to vines
water_flowing = minetest.get_content_id("default:water_flowing"), -- used for cave liquids below; unrelated to vines
lava = minetest.get_content_id("default:lava_source"), -- used for cave liquids below; unrelated to vines
lava_flowing = minetest.get_content_id("default:lava_flowing"), -- used for cave liquids below; unrelated to vines
stone = minetest.get_content_id("default:stone"),
jungleleaves = minetest.get_content_id("default:jungleleaves"),
}
local asuna_hanging_vines_fn = function(mapgen)
-- Get provided values
local pos = mapgen.pos
local va = mapgen.voxelarea
local vdata = mapgen.data
local vparam2 = mapgen.param2
-- Get stride values and set position
local ystride = va.ystride
local zstride = va.zstride
pos = va:index(pos.x,pos.y,pos.z)
-- Scan for dirt or surface nodes for a short distance above the position
for above = 1, 2 do
above = pos + above * ystride
if soil_nodes[vdata[above]] then
pos = above
break
end
end
-- List of cardinal directions relative to the current position
local cardinal = {
pos - 1,
pos + 1,
pos - zstride,
pos + zstride,
}
-- Iterate over cardinal positions and place vines at and below those positions
for i = 1, 4 do
local dir = cardinal[i]
if vdata[dir] == cids.air then
for below = 0, ((dir ^ 2 + (dir + pos) % 3) % 4 + 2) do
below = dir - below * ystride
if vdata[below] == cids.air then
vdata[below] = cids.vine
vparam2[below] = i + 1
else
break
end
end
end
end
end
abdecor.register_advanced_decoration("asuna_hanging_vines_jungletree",{
target = {
place_on = {
"default:jungletree",
},
sidelen = 80,
fill_ratio = 0.3,
biomes = {
"rainforest",
},
y_max = 31000,
y_min = 1,
flags = "all_ceilings",
},
fn = function(mapgen)
-- Get provided values
local pos = mapgen.pos
local va = mapgen.voxelarea
local vdata = mapgen.data
local vparam2 = mapgen.param2
-- Get stride values and set position
local ystride = va.ystride
local zstride = va.zstride
pos = va:index(pos.x,pos.y,pos.z)
-- Check surrounding nodes for jungle leaves
for x = -1, 1 do
for z = -zstride, zstride, zstride do
local lpos = pos + x + z
if vdata[lpos] == cids.jungleleaves and (pos * x + z) % 3 > 0 then
mapgen.pos = va:position(lpos)
asuna_hanging_vines_fn(mapgen)
end
end
end
end,
flags = {
param2 = true,
}
})
abdecor.register_advanced_decoration("asuna_hanging_vines",{
target = {
place_on = {
"group:stone",
"default:dirt",
"default:jungletree",
},
spawn_by = "air",
num_spawn_by = 5,
sidelen = 80,
fill_ratio = 0.3,
biomes = {
"swamp",
"naturalbiomes:alderswamp",
"marsh",
"rainforest",
"jumble",
"livingjungle:jungle",
},
y_max = 31000,
y_min = 1,
flags = "all_ceilings",
},
fn = asuna_hanging_vines_fn,
flags = {
param2 = true,
},
})
--[[
Ocean waterfalls
]]
local wall_stones = {
"default:stone_with_coal",
"default:stone_with_iron",
"default:stone_with_tin",
"default:stone_with_copper",
"default:stone_with_gold",
"default:stone_with_diamond",
"default:stone_with_mese",
}
for node,def in pairs(minetest.registered_nodes) do
if def.groups and def.groups.stone and def.groups.stone > 0 then
table.insert(wall_stones,node)
end
end
local valid_wall_stones = {}
for _,node in ipairs(wall_stones) do
valid_wall_stones[minetest.get_content_id(node)] = true
end
abdecor.register_advanced_decoration("asuna_waterfalls",{
target = {
place_on = "default:water_source",
spawn_by = wall_stones,
num_spawn_by = 3,
sidelen = 80,
fill_ratio = 0.11,
biomes = asuna.biome_groups.shore,
y_max = 1,
y_min = 1,
flags = "liquid_surface",
},
fn = function(mapgen)
-- Get provided values
local pos = mapgen.pos
local va = mapgen.voxelarea
local vdata = mapgen.data
-- Get stride values and adjust position
local ystride = va.ystride
local zstride = va.zstride
pos = va:index(pos.x,pos.y + 1,pos.z)
local too_low_pos = 0
-- Get stone wall direction
local cardinal = {
-1,
-zstride,
1,
zstride,
}
local found_stone = false
local check_wall = nil
for i = 1, 4 do
local wallpos = pos + cardinal[i]
local wallleft = cardinal[i % 4 + 1]
local wallright = cardinal[(i + 2) % 4 + 1]
check_wall = function(pos) -- is the entire row of wall nodes made of stone?
return valid_wall_stones[vdata[pos]] and valid_wall_stones[vdata[pos + wallleft]] and valid_wall_stones[vdata[pos + wallright]] and true or false
end
if check_wall(wallpos) then
pos = wallpos
too_low_pos = pos
found_stone = true
break
end
end
-- Do nothing if no stone wall found
if not found_stone then
return
end
-- Iterate above 'rows' of stone wall until we find something that isn't stone
repeat
pos = pos + ystride
until not check_wall(pos)
-- Set two below stone position to water if higher than one node
local placepos = pos - 2 * ystride
if placepos > too_low_pos then
vdata[placepos] = cids.water
end
end,
flags = {
liquid = true,
},
})
--[[
Cave ceiling liquids
]]
local enclosing_nodes = valid_wall_stones
abdecor.register_advanced_decoration("asuna_cave_liquids",{
target = {
place_on = {
"group:stone",
},
sidelen = 80,
spawn_by = {
"group:stone",
},
num_spawn_by = 8,
fill_ratio = 0.000015,
y_max = -30,
y_min = -31000,
flags = "all_ceilings",
},
fn = function(mapgen)
-- Get provided values
local va = mapgen.voxelarea
local vdata = mapgen.data
local vparam2 = mapgen.param2
local pos = mapgen.pos
-- Get stride values and set position
local ystride = va.ystride
local zstride = va.zstride
local pos = va:index(pos.x,pos.y,pos.z)
-- Liquid must be enclosed to its sides and above
for _,adjacent in ipairs({
ystride,
1,
-1,
zstride,
-zstride,
}) do
if not enclosing_nodes[vdata[pos + adjacent]] then
return -- liquid is not fully enclosed
end
end
-- Liquid must have sufficient clearance below
-- Scanning from bottom up should typically fail faster than top down
for below = pos - ystride * 8, pos - ystride, ystride do
if vdata[below] ~= minetest.CONTENT_AIR then
return -- not enough space between ceiling and ground
end
end
-- Fill the position and all air below with liquid based on climate + bias
-- Dry/hot climates are more likely to be lava, vice-versa with water
local liquid = (function()
local heatmap = minetest.get_mapgen_object("heatmap") or {}
local humiditymap = minetest.get_mapgen_object("humiditymap") or {}
local pos2d = mapgen.index2d(mapgen.pos)
local heat = heatmap[pos2d] or 50
local humidity = humiditymap[pos2d] or 50
local climate = 50 + (heat / 2 - 25) - (humidity / 2 - 25)
local pos_random = (pos ^ 2 + pos) % 38 * (pos % 2 == 0 and 1 or -1) + climate -- not actually random but good enough
return pos_random > 56 and {cids.lava,cids.lava_flowing} or {cids.water,cids.water_flowing} -- bias in favor of water
end)()
vdata[pos] = liquid[1]
pos = pos - ystride
while vdata[pos] == minetest.CONTENT_AIR do
vdata[pos] = liquid[2]
vparam2[pos] = 15
pos = pos - ystride
end
end,
flags = {
liquid = true,
param2 = true,
},
})
end)

View file

@ -0,0 +1,46 @@
asuna = {
modpath = core.get_modpath("asuna_core"),
content = {
nutrition = {
enabled = core.settings:get_bool("asuna.content.nutrition.enabled",true),
exhaustion_level = core.settings:get_bool("asuna.content.nutrition.enabled",true) and tonumber(core.settings:get("asuna.content.nutrition.exhaustion_level",160) or 160),
starvation = core.settings:get_bool("asuna.content.nutrition.enabled",true) and core.settings:get_bool("asuna.content.nutrition.starvation",false),
},
wayfarer = {
enabled = core.settings:get_bool("asuna.content.wayfarer.enabled",true),
awards = core.settings:get_bool("asuna.content.wayfarer.enabled",true) and core.settings:get_bool("asuna.content.wayfarer.awards",true),
loot_chests = core.settings:get_bool("asuna.content.wayfarer.enabled",true) and core.settings:get_bool("asuna.content.wayfarer.loot_chests",true),
worldgate = core.settings:get_bool("asuna.content.wayfarer.enabled",true) and core.settings:get_bool("asuna.content.wayfarer.worldgate",true),
},
menagerie = {
enabled = core.settings:get_bool("asuna.content.menagerie.enabled",true),
animals = core.settings:get_bool("asuna.content.menagerie.enabled",true) and core.settings:get_bool("asuna.content.menagerie.animals",true),
slimes = core.settings:get_bool("asuna.content.menagerie.enabled",true) and core.settings:get_bool("asuna.content.menagerie.slimes",true),
},
research = {
enabled = core.settings:get_bool("asuna.content.research.enabled",true),
},
},
settings = {
particles = {
amount = core.settings:get("asuna.settings.particles.amount","less") or "less",
},
mod_override_warnings = {
enabled = core.settings:get_bool("asuna.settings.mod_override_warnings.enabled",true),
},
},
}
local function runfile(file,condition)
if condition == nil or condition then
dofile(asuna.modpath .. "/" .. file .. ".lua")
end
end
runfile("biomes")
runfile("terrain")
runfile("climate")
runfile("caves")
runfile("decor")
runfile("music")
runfile("mod_override_warnings",asuna.settings.mod_override_warnings.enabled)

View file

@ -0,0 +1,6 @@
name = asuna_core
title = Asuna Core
description = The core mod that defines functionality specific to Asuna and its content
author = EmptyStar
depends = music_api
# ephemeral_depends = abdecor, default, flowers, beautiflowers, herbs, bakedclay, fireflies, ethereal, badland, dorwinion, prairie, naturalbiomes, livingjungle, bambooforest, frost_land, japaneseforest, nightshade, terracotta, too_many_stones

View file

@ -0,0 +1,46 @@
local asuna_mod_path = core.get_game_info().path .. "/mods"
local bundled_mods = core.get_dir_list(asuna_mod_path,true)
local warn
if asuna.settings.mod_override_warnings.enabled then
local messages = {}
warn = function(mod)
local message = "MOD OVERRIDE WARNING: Mod '" .. mod .. "' is enabled externally which overrides Asuna's version of this mod. This may cause issues."
core.log("warning",message)
table.insert(messages,core.colorize("#eeee00",message))
end
core.register_on_joinplayer(function(player)
local name = player:get_player_name()
local privs = core.get_player_privs(name)
if privs.server or privs.debug or name == "singleplayer" then
for _,message in ipairs(messages) do
core.chat_send_player(name,message)
end
end
end)
else
warn = function(mod)
core.log("warning","MOD OVERRIDE WARNING: Mod '" .. mod .. "' is enabled externally which overrides Asuna's version of this mod. This may cause issues.")
end
end
for _,mod in ipairs(bundled_mods) do
local mods = { mod }
local mpath = asuna_mod_path .. "/" .. mod
local mfiles = core.get_dir_list(mpath,false)
for _,mfile in ipairs(mfiles) do
if mfile:find("^modpack\\.") then
mods = core.get_dir_list(mpath,true)
break
end
end
for _,mpath in ipairs(mods) do
mod = mpath
mpath = core.get_modpath(mpath)
if mpath and not mpath:find("[\\/]games[\\/][^\\/]+[\\/]mods[\\/]") then
warn(mod)
end
end
end

View file

@ -0,0 +1,105 @@
--[[
Day or night
]]
music.register_track({
name = "reparateur",
length = 200 + 30,
gain = 1.25,
day = true,
night = true,
ymin = -12,
ymax = 31000,
})
music.register_track({
name = "blood",
length = 89 + 30,
gain = 1,
day = true,
night = true,
ymin = -12,
ymax = 31000,
})
--[[
Daytime only
]]
for track,length in pairs({
castlesinthesky = 107,
firefly = 152,
bathedinthelight = 166,
roquefortprolog = 85,
meditatingbeat = 132,
pond = 142,
onefineday = 51,
antarctica = 65,
simplicity = 122,
endtitles = 135,
imagefilm033 = 121,
}) do
music.register_track({
name = track,
length = length + 30,
gain = 1,
day = true,
night = false,
ymin = -12,
ymax = 31000,
})
end
--[[
Nighttime only
]]
for track,length in pairs({
jul = 204,
skyward = 149,
thelongwayhome = 171,
--moonlight = 176,
--walkingstars = 172,
hymn = 73,
reverie = 136,
atemubungen = 177,
breezyreflections = 91,
dreamsphere1 = 177,
dreamsphere2 = 109,
dreamsphere4 = 104,
lonelyfish = 107,
}) do
music.register_track({
name = track,
length = length + 30,
gain = 1,
day = false,
night = true,
ymin = -12,
ymax = 31000,
})
end
--[[
Underground
]]
for track,length in pairs({
machina = 192,
tearsinrain = 172,
screensaver = 113,
cobalt = 176,
infinitepeace = 73,
thevisitors = 160,
sunriseonmars = 129,
}) do
music.register_track({
name = track,
length = length + 30,
gain = 1,
day = true,
night = true,
ymin = -31000,
ymax = -12,
})
end

View file

@ -0,0 +1,39 @@
All of the music in this mod is listed/credited below by author, license, and source. Each track followed by an asterisk (`*`) has been edited from its original form, often to trim and fade the end of the track.
- **Scott Buckley** -- [CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/), <https://www.scottbuckley.com.au/>
- Blood (blood.ogg)*
- Castles In The Sky (castlesinthesky.ogg)*
- Firefly (firefly.ogg)
- Jul (jul.ogg)*
- Machina (machina.ogg)*
- Reparateur (reparateur.ogg)*
- Skyward (skyward.ogg)*
- Tears In Rain (tearsinrain.ogg)*
- The Long Way Home (thelongwayhome.ogg)*
- Cobalt (cobalt.ogg)*
- Hymn (hymn.ogg)*
- Reverie (reverie.ogg)*
- Simplicity (simplicity.ogg)*
- **Kevin MacLeod** -- [CC-BY 3.0](https://creativecommons.org/licenses/by/3.0/), <https://incompetech.com/>
- Bathed in the Light (bathedinthelight.ogg)
- **Kevin MacLeod** -- [CC0](https://creativecommons.org/publicdomain/zero/1.0/), <https://www.freepd.com/>
- Screen Saver (screensaver.ogg)*
- Roquefort Prolog (roquefortprolog.ogg)*
- Infinite Peace (infinitepeace.ogg)*
- Meditating Beat (meditatingbeat.ogg)*
- **Rafael Krux** -- [CC0](https://creativecommons.org/publicdomain/zero/1.0/), <https://www.freepd.com/>
- Pond (pond.ogg)*
- **Jason Shaw** -- [CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/legalcode), <https://audionautix.com/>
- Antarctica (antarctica.ogg)*
- One Fine Day (onefineday.ogg)*
- The Visitors (thevisitors.ogg)*
- Sunrise on Mars (sunriseonmars.ogg)*
- **Sascha Ende** -- [CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/legalcode), <https://filmmusic.io/>
- Atemubüngen (atemubungen.ogg)*
- Breezy Reflections (breezyreflections.ogg)*
- Dreamsphere 1 (dreamsphere1.ogg)*
- Dreamsphere 2 (dreamsphere2.ogg)*
- Dreamsphere 4 (dreamsphere4.ogg)*
- End Titles (endtitles.ogg)*
- Image Film 033 (imagefilm033.ogg)*
- Lonely Fish (lonelyfish.ogg)*

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show more