share/hedgewars/Data/Scripts/Achievements.lua
author nemo
Sun, 16 Dec 2018 10:25:36 -0500
changeset 14463 99117df5a3d3
parent 14236 74bf2d906097
permissions -rw-r--r--
fix DiagonalMaze after the drawing scaling change, add some params since ginormous maze is kinda entertaining

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