share/hedgewars/Data/Scripts/Achievements.lua
author alfadur
Thu, 01 Nov 2018 21:30:21 +0300
changeset 14064 c6745a1c827a
parent 13501 cbda0f842364
child 14236 74bf2d906097
permissions -rw-r--r--
start a physics engine to try out this data oriented thing everyone seems to be talking about

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