mirror of
https://gitlab.com/rubenwardy/awards.git
synced 2024-11-22 23:33:45 +01:00
Rename background to hud_background
This commit is contained in:
parent
6dc91cf893
commit
37082d1186
@ -185,15 +185,16 @@ end
|
|||||||
* `secret` - boolean if this award is secret (i.e. showed on awards list)
|
* `secret` - boolean if this award is secret (i.e. showed on awards list)
|
||||||
* `sound` - `SimpleSoundSpec` table to play on unlock.
|
* `sound` - `SimpleSoundSpec` table to play on unlock.
|
||||||
`false` to disable unlock sound.
|
`false` to disable unlock sound.
|
||||||
* `icon` - the icon image, use default otherwise.
|
* `icon` - the icon image. Defaults to `awards_unknown.png`.
|
||||||
* `background` - the background image, use default otherwise.
|
* `hud_background` - the background image used in the HUD to contain the text and icon.
|
||||||
|
Defaults to `awards_bg_default.png`.
|
||||||
* `trigger` - trigger definition, see [Builtin Trigger Types](#builtin-trigger-types).
|
* `trigger` - trigger definition, see [Builtin Trigger Types](#builtin-trigger-types).
|
||||||
* `on_unlock(name, def)` - callback on unlock.
|
* `on_unlock(name, def)` - callback on unlock.
|
||||||
* `awards.registered_awards` - table of award name to definition.
|
* `awards.registered_awards` - table of award name to definition.
|
||||||
* `awards.register_on_unlock(func(name, def))`
|
* `awards.register_on_unlock(func(name, def))`
|
||||||
* `name` is the player name
|
* `name` is the player name
|
||||||
* `def` is the award def.
|
* `def` is the award def.
|
||||||
* return true to cancel HUD
|
* return true to cancel HUD from appearing.
|
||||||
* `awards.unlock(player_name, award_name)`
|
* `awards.unlock(player_name, award_name)`
|
||||||
* gives an award to a player
|
* gives an award to a player
|
||||||
* `awards.get_award_states(player_name)`
|
* `awards.get_award_states(player_name)`
|
||||||
|
@ -95,7 +95,7 @@ function awards.unlock(name, award)
|
|||||||
-- Get Notification Settings
|
-- Get Notification Settings
|
||||||
local title = awdef.title or award
|
local title = awdef.title or award
|
||||||
local desc = awdef.description or ""
|
local desc = awdef.description or ""
|
||||||
local background = awdef.background or "awards_bg_default.png"
|
local background = awdef.hud_background or awdef.background or "awards_bg_default.png"
|
||||||
local icon = (awdef.icon or "awards_unknown.png") .. "^[resize:32x32"
|
local icon = (awdef.icon or "awards_unknown.png") .. "^[resize:32x32"
|
||||||
local sound = awdef.sound
|
local sound = awdef.sound
|
||||||
if sound == nil then
|
if sound == nil then
|
||||||
|
@ -251,7 +251,7 @@ if minetest.get_modpath("default") then
|
|||||||
title = S("Lava and Water"),
|
title = S("Lava and Water"),
|
||||||
description = S("Mine your first obsidian."),
|
description = S("Mine your first obsidian."),
|
||||||
icon = "awards_lava_and_water.png^awards_level1.png",
|
icon = "awards_lava_and_water.png^awards_level1.png",
|
||||||
background = "awards_bg_mining.png",
|
hud_background = "awards_bg_mining.png",
|
||||||
difficulty = 1.5,
|
difficulty = 1.5,
|
||||||
trigger = {
|
trigger = {
|
||||||
type = "dig",
|
type = "dig",
|
||||||
@ -265,7 +265,7 @@ if minetest.get_modpath("default") then
|
|||||||
title = S("Obsessed with Obsidian"),
|
title = S("Obsessed with Obsidian"),
|
||||||
description = S("Mine 50 obsidian."),
|
description = S("Mine 50 obsidian."),
|
||||||
icon = "awards_obsessed_with_obsidian.png^awards_level2.png",
|
icon = "awards_obsessed_with_obsidian.png^awards_level2.png",
|
||||||
background = "awards_bg_mining.png",
|
hud_background = "awards_bg_mining.png",
|
||||||
difficulty = 1.5,
|
difficulty = 1.5,
|
||||||
trigger = {
|
trigger = {
|
||||||
type = "dig",
|
type = "dig",
|
||||||
@ -279,7 +279,7 @@ if minetest.get_modpath("default") then
|
|||||||
title = S("Lava Miner"),
|
title = S("Lava Miner"),
|
||||||
description = S("Mine any block while being very close to lava."),
|
description = S("Mine any block while being very close to lava."),
|
||||||
icon = "awards_lava_miner.png",
|
icon = "awards_lava_miner.png",
|
||||||
background = "awards_bg_mining.png",
|
hud_background = "awards_bg_mining.png",
|
||||||
difficulty = 1,
|
difficulty = 1,
|
||||||
})
|
})
|
||||||
awards.register_on_dig(function(player,data)
|
awards.register_on_dig(function(player,data)
|
||||||
@ -386,7 +386,7 @@ if minetest.get_modpath("default") then
|
|||||||
title = S("First Mese Find"),
|
title = S("First Mese Find"),
|
||||||
description = S("Mine your first mese ore."),
|
description = S("Mine your first mese ore."),
|
||||||
icon = "awards_first_mese_find.png",
|
icon = "awards_first_mese_find.png",
|
||||||
background = "awards_bg_mining.png",
|
hud_background = "awards_bg_mining.png",
|
||||||
difficulty = 1,
|
difficulty = 1,
|
||||||
trigger = {
|
trigger = {
|
||||||
type = "dig",
|
type = "dig",
|
||||||
@ -401,7 +401,7 @@ if minetest.get_modpath("default") then
|
|||||||
title = S("Mese Mastery"),
|
title = S("Mese Mastery"),
|
||||||
description = S("Mine a mese block."),
|
description = S("Mine a mese block."),
|
||||||
icon = "awards_mese_mastery.png",
|
icon = "awards_mese_mastery.png",
|
||||||
background = "awards_bg_mining.png",
|
hud_background = "awards_bg_mining.png",
|
||||||
difficulty = 1.1,
|
difficulty = 1.1,
|
||||||
trigger = {
|
trigger = {
|
||||||
type = "dig",
|
type = "dig",
|
||||||
@ -415,7 +415,7 @@ if minetest.get_modpath("default") then
|
|||||||
title = S("You’re a copper"),
|
title = S("You’re a copper"),
|
||||||
description = S("Dig 1,000 copper ores."),
|
description = S("Dig 1,000 copper ores."),
|
||||||
icon = "awards_youre_a_copper.png",
|
icon = "awards_youre_a_copper.png",
|
||||||
background = "awards_bg_mining.png",
|
hud_background = "awards_bg_mining.png",
|
||||||
difficulty = 0.2,
|
difficulty = 0.2,
|
||||||
trigger = {
|
trigger = {
|
||||||
type = "dig",
|
type = "dig",
|
||||||
@ -429,7 +429,7 @@ if minetest.get_modpath("default") then
|
|||||||
title = S("Mini Miner"),
|
title = S("Mini Miner"),
|
||||||
description = S("Dig 100 stone blocks."),
|
description = S("Dig 100 stone blocks."),
|
||||||
icon = "awards_mini_miner.png^awards_level1.png",
|
icon = "awards_mini_miner.png^awards_level1.png",
|
||||||
background = "awards_bg_mining.png",
|
hud_background = "awards_bg_mining.png",
|
||||||
difficulty = 0.02,
|
difficulty = 0.02,
|
||||||
trigger = {
|
trigger = {
|
||||||
type = "dig",
|
type = "dig",
|
||||||
@ -443,7 +443,7 @@ if minetest.get_modpath("default") then
|
|||||||
title = S("Hardened Miner"),
|
title = S("Hardened Miner"),
|
||||||
description = S("Dig 1,000 stone blocks."),
|
description = S("Dig 1,000 stone blocks."),
|
||||||
icon = "awards_hardened_miner.png^awards_level2.png",
|
icon = "awards_hardened_miner.png^awards_level2.png",
|
||||||
background = "awards_bg_mining.png",
|
hud_background = "awards_bg_mining.png",
|
||||||
difficulty = 0.02,
|
difficulty = 0.02,
|
||||||
trigger = {
|
trigger = {
|
||||||
type = "dig",
|
type = "dig",
|
||||||
@ -457,7 +457,7 @@ if minetest.get_modpath("default") then
|
|||||||
title = S("Master Miner"),
|
title = S("Master Miner"),
|
||||||
description = S("Dig 10,000 stone blocks."),
|
description = S("Dig 10,000 stone blocks."),
|
||||||
icon = "awards_master_miner.png^awards_level3.png",
|
icon = "awards_master_miner.png^awards_level3.png",
|
||||||
background = "awards_bg_mining.png",
|
hud_background = "awards_bg_mining.png",
|
||||||
difficulty = 0.02,
|
difficulty = 0.02,
|
||||||
trigger = {
|
trigger = {
|
||||||
type = "dig",
|
type = "dig",
|
||||||
@ -471,7 +471,7 @@ if minetest.get_modpath("default") then
|
|||||||
title = S("Marchand De Sable"),
|
title = S("Marchand De Sable"),
|
||||||
description = S("Dig 1,000 sand."),
|
description = S("Dig 1,000 sand."),
|
||||||
icon = "awards_marchand_de_sable.png",
|
icon = "awards_marchand_de_sable.png",
|
||||||
background = "awards_bg_mining.png",
|
hud_background = "awards_bg_mining.png",
|
||||||
difficulty = 0.05,
|
difficulty = 0.05,
|
||||||
trigger = {
|
trigger = {
|
||||||
type = "dig",
|
type = "dig",
|
||||||
@ -581,7 +581,7 @@ if minetest.get_modpath("default") then
|
|||||||
title = S("First Gold Find"),
|
title = S("First Gold Find"),
|
||||||
description = S("Mine your first gold ore."),
|
description = S("Mine your first gold ore."),
|
||||||
icon = "awards_first_gold_find.png^awards_level1.png",
|
icon = "awards_first_gold_find.png^awards_level1.png",
|
||||||
background = "awards_bg_mining.png",
|
hud_background = "awards_bg_mining.png",
|
||||||
difficulty = 0.9,
|
difficulty = 0.9,
|
||||||
trigger = {
|
trigger = {
|
||||||
type = "dig",
|
type = "dig",
|
||||||
@ -594,7 +594,7 @@ if minetest.get_modpath("default") then
|
|||||||
title = S("Gold Rush"),
|
title = S("Gold Rush"),
|
||||||
description = S("Mine 45 gold ores."),
|
description = S("Mine 45 gold ores."),
|
||||||
icon = "awards_gold_rush.png^awards_level2.png",
|
icon = "awards_gold_rush.png^awards_level2.png",
|
||||||
background = "awards_bg_mining.png",
|
hud_background = "awards_bg_mining.png",
|
||||||
difficulty = 0.9,
|
difficulty = 0.9,
|
||||||
trigger = {
|
trigger = {
|
||||||
type = "dig",
|
type = "dig",
|
||||||
@ -619,7 +619,7 @@ if minetest.get_modpath("default") then
|
|||||||
title = S("Girl's Best Friend"),
|
title = S("Girl's Best Friend"),
|
||||||
description = S("Mine 18 diamond ores."),
|
description = S("Mine 18 diamond ores."),
|
||||||
icon = "awards_girls_best_friend.png^awards_level2.png",
|
icon = "awards_girls_best_friend.png^awards_level2.png",
|
||||||
background = "awards_bg_mining.png",
|
hud_background = "awards_bg_mining.png",
|
||||||
difficulty = 1,
|
difficulty = 1,
|
||||||
trigger = {
|
trigger = {
|
||||||
type = "dig",
|
type = "dig",
|
||||||
|
Loading…
Reference in New Issue
Block a user