share/hedgewars/Data/Scripts/Achievements.lua
author nemo
Sun, 16 Sep 2018 09:25:10 -0400
changeset 13818 9c3f793cfe82
parent 13501 cbda0f842364
child 14252 74bf2d906097
permissions -rw-r--r--
update hashes changed in r79e13080b9db (critical sprites) ra675a94b5cc1 (critical scripts)

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