share/hedgewars/Data/Scripts/Params.lua
author Wuzzy <Wuzzy2@mail.ru>
Mon, 19 Feb 2018 09:45:36 +0100
changeset 13032 91f23558c936
parent 9985 42cd42e44c9a
permissions -rw-r--r--
Lua library Animate: StoppedGear now returns true if gear does not exist Fixes Lua error spam in ACF1 when Leaks a Lot drows
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9908
81eb25ddf594 - Utility script for parameters handling
unc0rr
parents:
diff changeset
     1
-- Library for parameters handling
81eb25ddf594 - Utility script for parameters handling
unc0rr
parents:
diff changeset
     2
81eb25ddf594 - Utility script for parameters handling
unc0rr
parents:
diff changeset
     3
params = {}
81eb25ddf594 - Utility script for parameters handling
unc0rr
parents:
diff changeset
     4
81eb25ddf594 - Utility script for parameters handling
unc0rr
parents:
diff changeset
     5
function parseParams()
9985
42cd42e44c9a GravRacer, GravHigh, GravMutant, Grav... uhm... shoppamap? Easy! Gravity script could be combined with any other script now.
unc0rr
parents: 9908
diff changeset
     6
    if ScriptParam ~= nil then
42cd42e44c9a GravRacer, GravHigh, GravMutant, Grav... uhm... shoppamap? Easy! Gravity script could be combined with any other script now.
unc0rr
parents: 9908
diff changeset
     7
        for k, v in string.gmatch(ScriptParam, "(%w+)=([^,]+)") do
42cd42e44c9a GravRacer, GravHigh, GravMutant, Grav... uhm... shoppamap? Easy! Gravity script could be combined with any other script now.
unc0rr
parents: 9908
diff changeset
     8
            params[k] = v
42cd42e44c9a GravRacer, GravHigh, GravMutant, Grav... uhm... shoppamap? Easy! Gravity script could be combined with any other script now.
unc0rr
parents: 9908
diff changeset
     9
        end
9908
81eb25ddf594 - Utility script for parameters handling
unc0rr
parents:
diff changeset
    10
    end
81eb25ddf594 - Utility script for parameters handling
unc0rr
parents:
diff changeset
    11
end