summaryrefslogtreecommitdiff
path: root/init.lua
blob: 639ca3ab1183c5bdb0250f61ccd86f50537a6fc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
--	AWARDS
--		by Rubenwardy, CC-BY-SA
-------------------------------------------------------
-- this is the init file for the award mod
-------------------------------------------------------

local S
if (intllib) then
	dofile(minetest.get_modpath("intllib").."/intllib.lua")
	S = intllib.Getter(minetest.get_current_modname())
else
	S = function ( s ) return s end
end

dofile(minetest.get_modpath("awards").."/api.lua")

-- Light it up
awards.register_achievement("award_lightitup",{
	title = S("Light It Up"),
	description = S("Place 100 torches"),
	icon = "novicebuilder.png",
	trigger = {
		type = "place",
		node = "default:torch",
		target = 100
	}
})

-- Lumber Jack
awards.register_achievement("award_lumberjack",{
	title = S("Lumber Jack"),
	description = S("Dig 100 tree blocks"),
	trigger = {
		type = "dig",
		node = "default:tree",
		target = 100
	}
})

-- Found some Mese!
awards.register_achievement("award_mesefind",{
	title = S("First Mese Find"),
	description = S("Found some Mese!"),
	icon = "mese.png",
	background = "bg_mining.png",
	trigger = {
		type = "dig",
		node = "default:mese",
		target = 1
	}
})

-- Found a Nyan cat!
awards.register_achievement("award_nyanfind",{
	title = S("OMG, Nyan Cat!"),
	description = S("Find a nyan cat"),
	trigger = {
		type = "dig",
		node = "default:nyancat",
		target = 1
	}
})

-- Just entered the mine
awards.register_achievement("award_mine1",{
	title = S("Entering the mine"),
	description = S("You have dug 10 stone blocks"),
	icon = "miniminer.png",
	background = "bg_mining.png",
	trigger = {
		type = "dig",
		node = "default:stone",
		target = 10
	}
})

-- Mini Miner
awards.register_achievement("award_mine2",{
	title = S("Mini Miner"),
	description = S("You have dug 100 stone blocks"),
	icon = "miniminer.png",
	background = "bg_mining.png",
	trigger = {
		type = "dig",
		node = "default:stone",
		target = 100
	}
})

-- Hardened Miner
awards.register_achievement("award_mine3",{
	title = S("Hardened Miner"),
	description = S("You have dug 1000 stone blocks"),
	icon = "miniminer.png",
	background = "bg_mining.png",
	trigger = {
		type = "dig",
		node = "default:stone",
		target = 1000
	}
})

-- Master Miner
awards.register_achievement("award_mine4",{
	title = S("Master Miner"),
	description = S("You have dug 10000 stone blocks"),
	icon = "miniminer.png",
	background = "bg_mining.png",
	trigger = {
		type = "dig",
		node = "default:stone",
		target = 10000
	}
})

-- First Death
awards.register_achievement("award_death1",{
	title = S("First Death"),
	description = S("You have more lives than a cat!"),
	trigger = {
		type = "death",
		target = 1
	}
})

-- Burned to death
awards.register_achievement("award_burn",{
	title = S("You're a witch!"),
	description = S("Burn to death in a fire")
})

-- 1 sentence
awards.register_achievement("award_chat1",{
	title = S("First Word"),
	description = S("Use the chat to talk to players"),
	trigger = {
		type = "chat",
		target = 1
	}
})


-- Join
awards.register_achievement("award_join1",{
	title = S("Welcome!"),
	description = S("Connect to the server"),
	trigger = {
		type = "join",
		target = 1
	}
})
awards.register_achievement("award_join2",{
	title = S("Frequent Visitor"),
	description = S("Connect to the server 50 times"),
	trigger = {
		type = "join",
		target = 50
	},
	secret = true
})

awards.register_onDeath(function(player,data)
	local pos = player:getpos()
	if pos and minetest.find_node_near(pos, 1, "fire:basic_flame") ~= nil then
		return "award_burn"
	end	
	return nil
end)