share/hedgewars/Data/Scripts/Achievements.lua
author unC0Rr
Thu, 22 Oct 2020 12:33:35 +0200
branch1.0.0
changeset 15887 6b10b0cdbeab
parent 14252 74bf2d906097
permissions -rw-r--r--
Mark global variables in implementation section static

HedgewarsScriptLoad("/Scripts/Locale.lua")

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