share/hedgewars/Data/Scripts/Params.lua
author Wuzzy <Wuzzy2@mail.ru>
Sun, 11 Mar 2018 21:38:08 +0100
changeset 13165 89a6b862e692
parent 9985 42cd42e44c9a
permissions -rw-r--r--
Bazooka/Grenade Training: Make weapon selection detection future-proof The old check relied on hardcoded slot IDs for the weapons, which is not good.

-- Library for parameters handling

params = {}

function parseParams()
    if ScriptParam ~= nil then
        for k, v in string.gmatch(ScriptParam, "(%w+)=([^,]+)") do
            params[k] = v
        end
    end
end