share/hedgewars/Data/Scripts/Achievements.lua
author Wuzzy <Wuzzy2@mail.ru>
Sat, 10 Nov 2018 20:58:00 +0100
changeset 14195 43ca01d4fb46
parent 13496 cbda0f842364
child 14231 74bf2d906097
permissions -rw-r--r--
Remove unused/out-commented "Structure" strings in engine locale files

HedgewarsScriptLoad("/Scripts/Locale.lua")

function awardAchievement(name, statMessage, capgrp)
	local achievementString = string.format(loc("Achievement gotten: %s"), name)
	if capgrp == nil then
		captionType = capgrpMessage2
	end
	if capgrp ~= false then
		AddCaption(achievementString, 0xFFBA00FF, capgrpMessage2)
	end
	if not statMessage then
		statMessage = achievementString
	end
	SendStat(siCustomAchievement, statMessage)
end