summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwebdesigner97 <Christian_D_97@gmx.de>2014-04-15 09:35:12 +0200
committerwebdesigner97 <Christian_D_97@gmx.de>2014-04-15 09:35:12 +0200
commit654c2c42c22830305275b70a28abdd628680abb4 (patch)
tree3bf1adbed0551c327ed8a4b961e28a6d426e05c4
parent5b9a8467d5612a81779b93809c95cdfc54ad92ac (diff)
downloadroads-654c2c42c22830305275b70a28abdd628680abb4.tar
roads-654c2c42c22830305275b70a28abdd628680abb4.tar.gz
roads-654c2c42c22830305275b70a28abdd628680abb4.tar.bz2
roads-654c2c42c22830305275b70a28abdd628680abb4.tar.xz
roads-654c2c42c22830305275b70a28abdd628680abb4.zip
first awards
-rw-r--r--streetsawards/depends.txt2
-rw-r--r--streetsawards/init.lua22
-rw-r--r--streetsmod/init.lua10
3 files changed, 32 insertions, 2 deletions
diff --git a/streetsawards/depends.txt b/streetsawards/depends.txt
new file mode 100644
index 0000000..42d368b
--- /dev/null
+++ b/streetsawards/depends.txt
@@ -0,0 +1,2 @@
+streetsmod
+awards? \ No newline at end of file
diff --git a/streetsawards/init.lua b/streetsawards/init.lua
new file mode 100644
index 0000000..fedc768
--- /dev/null
+++ b/streetsawards/init.lua
@@ -0,0 +1,22 @@
+if streets.extendedBy.awards == true then
+ awards.register_achievement("award_countryroads",{
+ title = "Roadbuilder",
+ description = "You built some quite big roads!",
+ icon = "novicebuilder.png",
+ trigger = {
+ type = "place",
+ node = "streets:asphalt",
+ target = 175,
+ },
+ })
+ awards.register_achievement("award_underworld",{
+ title = "Start your sewers!",
+ description = "You placed your first manhole! Did you know that you can open it with a right-click?",
+ icon = "novicebuilder.png",
+ trigger = {
+ type = "place",
+ node = "streets:manhole_adv_closed",
+ target = 1,
+ },
+ })
+end \ No newline at end of file
diff --git a/streetsmod/init.lua b/streetsmod/init.lua
index ac67614..bf89a60 100644
--- a/streetsmod/init.lua
+++ b/streetsmod/init.lua
@@ -57,6 +57,11 @@
else
streets.extendedBy.prefab = false
end
+ if minetest.get_modpath("awards") then
+ streets.extendedBy.awards = true
+ else
+ streets.extendedBy.awards = false
+ end
-- Streets chatcommand
local function round(num, idp)
@@ -74,8 +79,9 @@
"label[0,2.5;Mesecons installed: " .. tostring(streets.extendedBy.mesecons) .. "]",
"label[0,3;Digilines installed: " .. tostring(streets.extendedBy.digilines) .. "]",
"label[0,3.5;Prefab installed: " .. tostring(streets.extendedBy.prefab) .. "]",
- "label[0,4.5;Running version: " .. streets.version .. "]",
- "label[0,5;Load time: " .. round(streets.load.fin - streets.load.start,4) .. "s]"
+ "label[0,4;Awards installed: " .. tostring(streets.extendedBy.awards) .. "]",
+ "label[0,5;Running version: " .. streets.version .. "]",
+ "label[0,5.5;Load time: " .. round(streets.load.fin - streets.load.start,4) .. "s]"
}))
end
})