Module:ScriptItem2: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 38: Line 38:
-- Category Names. (String(s) to look for in an item name, case-INsensitive.)
-- Category Names. (String(s) to look for in an item name, case-INsensitive.)
'Blip', 'Building', 'Camera', 'Chatbox', 'Cheat', 'Client', 'Command', 'Cursor', 'Debug', 'Dodo',
'Blip', 'Building', 'Camera', 'Chatbox', 'Cheat', 'Client', 'Command', 'Cursor', 'Debug', 'Dodo',
'Element', 'Entity', 'Event', 'File', 'Font', 'Garage', 'HTTP', 'HUD', 'Key', 'Mission', 'Mouse', 'Network', 'Object',
'Element', 'Entity', 'Event', 'File', 'Font', 'Garage', 'HTTP', 'HUD', 'Key', 'Mission', 'Mouse', 'NetFlags', 'Network', 'Object',
'Pause', 'Ped', 'Pickup', 'Player', 'Process', 'Render', 'Resource', 'Screen', 'Socket', 'Sphere', 'Time', 'Vehicle', 'Weather', 'World'
'Pause', 'Ped', 'Pickup', 'Player', 'Process', 'Render', 'Resource', 'Screen', 'Socket', 'Sphere', 'Time', 'Vehicle', 'Weather', 'World'
}
}
Line 899: Line 899:
local args = p.getArgs(frame)
local args = p.getArgs(frame)
if p.isOOP(frame) then
if p.isOOP(frame) then
return args.class:lower().."."..args.name
return p.lowerFirstCharCase(args.class).."."..args.name
else
else
return args.name
return args.name
Line 918: Line 918:
local args = p.getArgs(frame)
local args = p.getArgs(frame)
if p.isOOP(frame) then
if p.isOOP(frame) then
return "<span style='color:"..typeRgb..";'>"..args.class:lower().."</span>.<span style='color:"..nameRgb.."';>"..args.name.."</span>"
return "<span style='color:"..typeRgb..";'>"..p.lowerFirstCharCase(args.class).."</span>.<span style='color:"..nameRgb.."';>"..args.name.."</span>"
else
else
return "<span style='color:"..nameRgb.."';>"..args.name.."</span>"
return "<span style='color:"..nameRgb.."';>"..args.name.."</span>"
Line 1,248: Line 1,248:
function p.properCase(text)
function p.properCase(text)
return text:sub(1,1):upper()..text:sub(2):lower()
return text:sub(1,1):upper()..text:sub(2):lower()
end
function p.lowerFirstCharCase(text)
return text:sub(1,1):lower()..text:sub(2)
end
end


6,834

edits

Navigation menu