share/hedgewars/Data/Scripts/Achievements.lua
author Wuzzy <Wuzzy2@mail.ru>
Mon, 04 Nov 2019 03:08:59 +0100
changeset 15508 ebc33ffb1cbd
parent 14236 74bf2d906097
permissions -rw-r--r--
Change color of hovered and pressed slider

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