share/hedgewars/Data/Scripts/Params.lua
author Wuzzy <Wuzzy2@mail.ru>
Fri, 31 Aug 2018 21:34:33 +0200
changeset 13731 247d1bcf3c5e
parent 9985 42cd42e44c9a
permissions -rw-r--r--
Add 2nd optional parameter to HedgewarsScriptLoad. If false, its OK if file does not exist. Also, return true/false on success

-- 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