first awards
This commit is contained in:
parent
5b9a8467d5
commit
654c2c42c2
2
streetsawards/depends.txt
Normal file
2
streetsawards/depends.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
streetsmod
|
||||||
|
awards?
|
22
streetsawards/init.lua
Normal file
22
streetsawards/init.lua
Normal file
@ -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
|
@ -57,6 +57,11 @@
|
|||||||
else
|
else
|
||||||
streets.extendedBy.prefab = false
|
streets.extendedBy.prefab = false
|
||||||
end
|
end
|
||||||
|
if minetest.get_modpath("awards") then
|
||||||
|
streets.extendedBy.awards = true
|
||||||
|
else
|
||||||
|
streets.extendedBy.awards = false
|
||||||
|
end
|
||||||
|
|
||||||
-- Streets chatcommand
|
-- Streets chatcommand
|
||||||
local function round(num, idp)
|
local function round(num, idp)
|
||||||
@ -74,8 +79,9 @@
|
|||||||
"label[0,2.5;Mesecons installed: " .. tostring(streets.extendedBy.mesecons) .. "]",
|
"label[0,2.5;Mesecons installed: " .. tostring(streets.extendedBy.mesecons) .. "]",
|
||||||
"label[0,3;Digilines installed: " .. tostring(streets.extendedBy.digilines) .. "]",
|
"label[0,3;Digilines installed: " .. tostring(streets.extendedBy.digilines) .. "]",
|
||||||
"label[0,3.5;Prefab installed: " .. tostring(streets.extendedBy.prefab) .. "]",
|
"label[0,3.5;Prefab installed: " .. tostring(streets.extendedBy.prefab) .. "]",
|
||||||
"label[0,4.5;Running version: " .. streets.version .. "]",
|
"label[0,4;Awards installed: " .. tostring(streets.extendedBy.awards) .. "]",
|
||||||
"label[0,5;Load time: " .. round(streets.load.fin - streets.load.start,4) .. "s]"
|
"label[0,5;Running version: " .. streets.version .. "]",
|
||||||
|
"label[0,5.5;Load time: " .. round(streets.load.fin - streets.load.start,4) .. "s]"
|
||||||
}))
|
}))
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user