diff --git a/main.lua b/main.lua index 209354b1..32bea9bc 100644 --- a/main.lua +++ b/main.lua @@ -86,6 +86,7 @@ mDraw=GC.draw Snd=SFX.playSample string.repD=STRING.repD string.sArg=STRING.sArg +string.split=STRING.split --Delete all naked files (from too old version) FILE.clear('') diff --git a/parts/net.lua b/parts/net.lua index 941ffcb6..2da98420 100644 --- a/parts/net.lua +++ b/parts/net.lua @@ -79,7 +79,7 @@ end --Parse notice local function _parseNotice(str) if str:find("///")then - str=STRING.split(str,"///") + str=str:split("///") for i=1,#str do local m=str[i] if m:find("=")then diff --git a/parts/scenes/app_console.lua b/parts/scenes/app_console.lua index 188eaddc..0c47acab 100644 --- a/parts/scenes/app_console.lua +++ b/parts/scenes/app_console.lua @@ -232,7 +232,7 @@ local commands={}do commands.mv={ code=function(arg) --Check arguments - arg=STRING.split(arg," ") + arg=arg:split(" ") if #arg>2 then log{C.lY,"Warning: file names must have no spaces"} return @@ -867,7 +867,7 @@ local commands={}do --Network commands.switchhost={ code=function(arg) - arg=STRING.split(arg," ") + arg=arg:split(" ") if arg[1]and #arg<=3 then WS.switchHost(unpack(arg)) log{C.Y,"Host switched"} diff --git a/parts/scenes/customGame.lua b/parts/scenes/customGame.lua index df2e08a1..17035f0d 100644 --- a/parts/scenes/customGame.lua +++ b/parts/scenes/customGame.lua @@ -103,7 +103,7 @@ function scene.keyDown(key,isRep) MES.new('check',text.exportSuccess) elseif key=='v'and kb.isDown('lctrl','rctrl')or key=='cV'then local str=sys.getClipboardText() - local args=STRING.split(str:sub((str:find(":")or 0)+1),"!") + local args=str:sub((str:find(":")or 0)+1):split("!") if #args<4 then goto THROW_fail end if not( DATA.pasteQuestArgs(args[1])and diff --git a/parts/scenes/history.lua b/parts/scenes/history.lua index 777971f3..86b529f2 100644 --- a/parts/scenes/history.lua +++ b/parts/scenes/history.lua @@ -2,7 +2,7 @@ local scene={} function scene.sceneInit() BG.set('cubes') - WIDGET.active.texts:setTexts(STRING.split(require"parts.updateLog","\n")) + WIDGET.active.texts:setTexts(require"parts.updateLog":split("\n")) end function scene.wheelMoved(_,y) diff --git a/parts/scenes/legals.lua b/parts/scenes/legals.lua index 87f8a42b..fec9a7cc 100644 --- a/parts/scenes/legals.lua +++ b/parts/scenes/legals.lua @@ -3,7 +3,7 @@ function scene.sceneInit() BG.set('cubes') local fileData=love.filesystem.read("legals.md") if fileData then - WIDGET.active.texts:setTexts(STRING.split(fileData,'\n')) + WIDGET.active.texts:setTexts(fileData:split('\n')) else WIDGET.active.texts:setTexts{"[legals.md not found]"} end diff --git a/parts/scenes/manual.lua b/parts/scenes/manual.lua index fe005ee1..7d730ad5 100644 --- a/parts/scenes/manual.lua +++ b/parts/scenes/manual.lua @@ -4,7 +4,7 @@ function scene.sceneInit() BG.set('cubes') local fileData=love.filesystem.read('parts/language/manual_'..(SETTING.locale:find'zh'and'zh'or'en')..'.txt') if fileData then - WIDGET.active.texts:setTexts(STRING.split(fileData,'\n')) + WIDGET.active.texts:setTexts(fileData:split('\n')) else WIDGET.active.texts:setTexts{"[manual file not found]"} end