write something there
This commit is contained in:
commit
b4b6c08f4f
8546 changed files with 309825 additions and 0 deletions
9
mods/asuna/asuna_awards/LICENSE
Normal file
9
mods/asuna/asuna_awards/LICENSE
Normal 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.
|
36
mods/asuna/asuna_awards/awards/at_the_end_of_the_tunnel.lua
Normal file
36
mods/asuna/asuna_awards/awards/at_the_end_of_the_tunnel.lua
Normal 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
|
25
mods/asuna/asuna_awards/awards/by_the_seashore.lua
Normal file
25
mods/asuna/asuna_awards/awards/by_the_seashore.lua
Normal 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
|
36
mods/asuna/asuna_awards/awards/cosmopolitan.lua
Normal file
36
mods/asuna/asuna_awards/awards/cosmopolitan.lua
Normal 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
|
15
mods/asuna/asuna_awards/awards/dont_touch_that.lua
Normal file
15
mods/asuna/asuna_awards/awards/dont_touch_that.lua
Normal 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
|
13
mods/asuna/asuna_awards/awards/ea_nasirs_legacy.lua
Normal file
13
mods/asuna/asuna_awards/awards/ea_nasirs_legacy.lua
Normal 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
|
35
mods/asuna/asuna_awards/awards/enter_sandman.lua
Normal file
35
mods/asuna/asuna_awards/awards/enter_sandman.lua
Normal 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
|
22
mods/asuna/asuna_awards/awards/fellowship_of_the_mese.lua
Normal file
22
mods/asuna/asuna_awards/awards/fellowship_of_the_mese.lua
Normal 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
|
13
mods/asuna/asuna_awards/awards/fools_gold.lua
Normal file
13
mods/asuna/asuna_awards/awards/fools_gold.lua
Normal 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
|
22
mods/asuna/asuna_awards/awards/fruit_of_the_heavens.lua
Normal file
22
mods/asuna/asuna_awards/awards/fruit_of_the_heavens.lua
Normal 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
|
28
mods/asuna/asuna_awards/awards/gourmand.lua
Normal file
28
mods/asuna/asuna_awards/awards/gourmand.lua
Normal 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
|
13
mods/asuna/asuna_awards/awards/have_a_heart.lua
Normal file
13
mods/asuna/asuna_awards/awards/have_a_heart.lua
Normal 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
|
20
mods/asuna/asuna_awards/awards/home_gardening.lua
Normal file
20
mods/asuna/asuna_awards/awards/home_gardening.lua
Normal 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
|
23
mods/asuna/asuna_awards/awards/how_can_she_slap.lua
Normal file
23
mods/asuna/asuna_awards/awards/how_can_she_slap.lua
Normal 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
|
17
mods/asuna/asuna_awards/awards/its_honest_work.lua
Normal file
17
mods/asuna/asuna_awards/awards/its_honest_work.lua
Normal 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
|
29
mods/asuna/asuna_awards/awards/johnny_appleseed.lua
Normal file
29
mods/asuna/asuna_awards/awards/johnny_appleseed.lua
Normal 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
|
29
mods/asuna/asuna_awards/awards/joys_of_spring.lua
Normal file
29
mods/asuna/asuna_awards/awards/joys_of_spring.lua
Normal 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
|
28
mods/asuna/asuna_awards/awards/let_there_be_light.lua
Normal file
28
mods/asuna/asuna_awards/awards/let_there_be_light.lua
Normal 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
|
16
mods/asuna/asuna_awards/awards/lost_but_not_forgotten.lua
Normal file
16
mods/asuna/asuna_awards/awards/lost_but_not_forgotten.lua
Normal 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
|
13
mods/asuna/asuna_awards/awards/lucy_in_the_sky.lua
Normal file
13
mods/asuna/asuna_awards/awards/lucy_in_the_sky.lua
Normal 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
|
14
mods/asuna/asuna_awards/awards/mightier_than_the_sword.lua
Normal file
14
mods/asuna/asuna_awards/awards/mightier_than_the_sword.lua
Normal 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
|
30
mods/asuna/asuna_awards/awards/mod_soup.lua
Normal file
30
mods/asuna/asuna_awards/awards/mod_soup.lua
Normal 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
|
15
mods/asuna/asuna_awards/awards/my_god_its_full_of_stars.lua
Normal file
15
mods/asuna/asuna_awards/awards/my_god_its_full_of_stars.lua
Normal 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
|
23
mods/asuna/asuna_awards/awards/net_worth.lua
Normal file
23
mods/asuna/asuna_awards/awards/net_worth.lua
Normal 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
|
27
mods/asuna/asuna_awards/awards/opalescent.lua
Normal file
27
mods/asuna/asuna_awards/awards/opalescent.lua
Normal 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
|
29
mods/asuna/asuna_awards/awards/paul_bunyan.lua
Normal file
29
mods/asuna/asuna_awards/awards/paul_bunyan.lua
Normal 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
|
14
mods/asuna/asuna_awards/awards/play_that_funky_music.lua
Normal file
14
mods/asuna/asuna_awards/awards/play_that_funky_music.lua
Normal 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
|
18
mods/asuna/asuna_awards/awards/prometheus.lua
Normal file
18
mods/asuna/asuna_awards/awards/prometheus.lua
Normal 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
|
30
mods/asuna/asuna_awards/awards/put_a_cork_in_it.lua
Normal file
30
mods/asuna/asuna_awards/awards/put_a_cork_in_it.lua
Normal 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
|
13
mods/asuna/asuna_awards/awards/rare_earth.lua
Normal file
13
mods/asuna/asuna_awards/awards/rare_earth.lua
Normal 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
|
13
mods/asuna/asuna_awards/awards/rarest_earth.lua
Normal file
13
mods/asuna/asuna_awards/awards/rarest_earth.lua
Normal 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
|
18
mods/asuna/asuna_awards/awards/reach_for_the_sky.lua
Normal file
18
mods/asuna/asuna_awards/awards/reach_for_the_sky.lua
Normal 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
|
29
mods/asuna/asuna_awards/awards/rock_on.lua
Normal file
29
mods/asuna/asuna_awards/awards/rock_on.lua
Normal 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
|
13
mods/asuna/asuna_awards/awards/sixteen_tons.lua
Normal file
13
mods/asuna/asuna_awards/awards/sixteen_tons.lua
Normal 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
|
13
mods/asuna/asuna_awards/awards/sleepy_hollow.lua
Normal file
13
mods/asuna/asuna_awards/awards/sleepy_hollow.lua
Normal 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
|
26
mods/asuna/asuna_awards/awards/slip_slidin_away.lua
Normal file
26
mods/asuna/asuna_awards/awards/slip_slidin_away.lua
Normal 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
|
13
mods/asuna/asuna_awards/awards/strike_while_its_hot.lua
Normal file
13
mods/asuna/asuna_awards/awards/strike_while_its_hot.lua
Normal 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
|
13
mods/asuna/asuna_awards/awards/super_mushroom.lua
Normal file
13
mods/asuna/asuna_awards/awards/super_mushroom.lua
Normal 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
|
20
mods/asuna/asuna_awards/awards/tarzan.lua
Normal file
20
mods/asuna/asuna_awards/awards/tarzan.lua
Normal 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
|
17
mods/asuna/asuna_awards/awards/the_careful_way_down.lua
Normal file
17
mods/asuna/asuna_awards/awards/the_careful_way_down.lua
Normal 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
|
14
mods/asuna/asuna_awards/awards/the_easy_way_down.lua
Normal file
14
mods/asuna/asuna_awards/awards/the_easy_way_down.lua
Normal 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
|
12
mods/asuna/asuna_awards/awards/the_matrix_reloaded.lua
Normal file
12
mods/asuna/asuna_awards/awards/the_matrix_reloaded.lua
Normal 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
|
20
mods/asuna/asuna_awards/awards/the_new_hotness.lua
Normal file
20
mods/asuna/asuna_awards/awards/the_new_hotness.lua
Normal 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
|
19
mods/asuna/asuna_awards/awards/the_prestige.lua
Normal file
19
mods/asuna/asuna_awards/awards/the_prestige.lua
Normal 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
|
13
mods/asuna/asuna_awards/awards/timeless.lua
Normal file
13
mods/asuna/asuna_awards/awards/timeless.lua
Normal 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
|
18
mods/asuna/asuna_awards/awards/under_the_sea.lua
Normal file
18
mods/asuna/asuna_awards/awards/under_the_sea.lua
Normal 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
|
16
mods/asuna/asuna_awards/awards/way_down_hadestown.lua
Normal file
16
mods/asuna/asuna_awards/awards/way_down_hadestown.lua
Normal 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
|
13
mods/asuna/asuna_awards/awards/worth_its_weight.lua
Normal file
13
mods/asuna/asuna_awards/awards/worth_its_weight.lua
Normal 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
|
24
mods/asuna/asuna_awards/init.lua
Normal file
24
mods/asuna/asuna_awards/init.lua
Normal 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
|
5
mods/asuna/asuna_awards/mod.conf
Normal file
5
mods/asuna/asuna_awards/mod.conf
Normal 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
|
31
mods/asuna/asuna_awards/register_on_interval.lua
Normal file
31
mods/asuna/asuna_awards/register_on_interval.lua
Normal 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)
|
Loading…
Add table
Add a link
Reference in a new issue