share/hedgewars/Data/Scripts/Achievements.lua
author Wuzzy <Wuzzy2@mail.ru>
Wed, 19 Dec 2018 01:47:41 +0100
changeset 14479 2c3fb87ad1c5
parent 14236 74bf2d906097
permissions -rw-r--r--
Add fallback preview image for scenarios Feel free to improve the image

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