Module:Sandbox/LVL: Difference between revisionsGive feedback
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 203: | Line 203: | ||
local val_str = tostring(value) | local val_str = tostring(value) | ||
------------------------------------------------------------------ | ------------------------------------------------------------------ | ||
| Line 228: | Line 215: | ||
else | else | ||
val_str = prefix..val_str | val_str = prefix..val_str | ||
end | |||
end | |||
------------------------------------------------------------------ | |||
-- CSS-specific formatting | |||
------------------------------------------------------------------ | |||
if css == "move_speed" or css == "sprint_speed" then | |||
if postfix == "" or not postfix:find("%%") then | |||
val_str = val_str:gsub("/s", "") .. "/s" | |||
end | |||
local num = tonumber(val_str:match("^-?%d+%.?%d*")) | |||
if num and num > 0 and not val_str:find("^%+") then | |||
val_str = "+" .. val_str | |||
end | end | ||
end | end | ||