share/hedgewars/Data/Scripts/Params.lua
author Vittorio Giovara <vittorio.giovara@gmail.com>
Sat, 07 Nov 2015 17:33:43 +0100
changeset 11318 78d8255349d3
parent 9985 42cd42e44c9a
permissions -rw-r--r--
Add markdown extension to README so github can render it more nicely Keep a link to the standard README file too.
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