diff --git a/DependencyControl.json b/DependencyControl.json index 70fba61..f55c982 100644 --- a/DependencyControl.json +++ b/DependencyControl.json @@ -499,20 +499,20 @@ "description": "Copy and Fax Things. Occasionally perform a necroscopy.", "channels": { "master": { - "version": "4.1.0", + "version": "4.2.0", "released": "2018-06-24", "default": true, "files": [ { "name": ".lua", "url": "@{fileBaseUrl}@{fileName}", - "sha1": "b25234859bc304d941b4c0a70a38345f11a55a21" + "sha1": "864db67d7b1a722c982663a6f580fd836b5bdb85" } ] } }, "changelog": { - "4.1.0": ["Check the Updates page"] + "4.2.0": ["Check the Updates page"] } }, diff --git a/ua.NecrosCopy.lua b/ua.NecrosCopy.lua index 66d1169..7caf271 100644 --- a/ua.NecrosCopy.lua +++ b/ua.NecrosCopy.lua @@ -1,12 +1,12 @@ script_name="NecrosCopy" script_description="Copy and fax things in the shadows while lines are splitting and breaking" script_author="reanimated" -script_version="4.1" +script_version="4.2" script_namespace="ua.NecrosCopy" local haveDepCtrl,DependencyControl,depRec=pcall(require,"l0.DependencyControl") if haveDepCtrl then - script_version="4.1.0" + script_version="4.2.0" depRec=DependencyControl{feed="https://raw.githubusercontent.com/unanimated/luaegisub/master/DependencyControl.json"} end @@ -19,8 +19,8 @@ function fucks(subs,sel) t=l.text if not t:match("\\i?clip%(m") and not t:match("//i?clip%(m") then t_error("Missing \\clip on line #"..i-line0..".",1) end - cx1,cy1,cx2,cy2,cx3,cy3,cx4,cy4=t:match("clip%(m ([%d%-]+) ([%d%-]+) l ([%d%-]+) ([%d%-]+) ([%d%-]+) ([%d%-]+) ([%d%-]+) ([%d%-]+)") - if not cx1 then cx1,cy1,cx2,cy2=t:match("clip%(m ([%d%-]+) ([%d%-]+) l ([%d%-]+) ([%d%-]+)") end + cx1,cy1,cx2,cy2,cx3,cy3,cx4,cy4=t:match("clip%(m ([%d%-%.]+) ([%d%-%.]+) l ([%d%-%.]+) ([%d%-%.]+) ([%d%-%.]+) ([%d%-%.]+) ([%d%-%.]+) ([%d%-%.]+)") + if not cx1 then cx1,cy1,cx2,cy2=t:match("clip%(m ([%d%-%.]+) ([%d%-%.]+) l ([%d%-%.]+) ([%d%-%.]+)") end if not cx1 then t_error("Line #"..i-line0..": Not enough clip points. 2 required.",1) end sr=stylechk(subs,l.style) nontra=t:gsub("\\t%b()","") @@ -79,8 +79,8 @@ function frozt(subs,sel) local l=subs[i] local text=l.text if not text:match("\\i?clip%(m") and not text:match("//i?clip%(m") then t_error("Missing \\clip on line #"..i-line0..".\nAborting.",1) end - cx1,cy1,cx2,cy2,cx3,cy3,cx4,cy4=text:match("clip%(m ([%d%-]+) ([%d%-]+) l ([%d%-]+) ([%d%-]+) ([%d%-]+) ([%d%-]+) ([%d%-]+) ([%d%-]+)") - if not cx1 then cx1,cy1,cx2,cy2=text:match("clip%(m ([%d%-]+) ([%d%-]+) l ([%d%-]+) ([%d%-]+)") end + cx1,cy1,cx2,cy2,cx3,cy3,cx4,cy4=text:match("clip%(m ([%d%-%.]+) ([%d%-%.]+) l ([%d%-%.]+) ([%d%-%.]+) ([%d%-%.]+) ([%d%-%.]+) ([%d%-%.]+) ([%d%-%.]+)") + if not cx1 then cx1,cy1,cx2,cy2=text:match("clip%(m ([%d%-%.]+) ([%d%-%.]+) l ([%d%-%.]+) ([%d%-%.]+)") end if not cx1 then t_error("Line #"..i-line0..": Not enough clip points. 2 required.",1) end local ad,op,tang,ang1,rota ad=cx2-cx1 @@ -410,8 +410,8 @@ function shad3(subs,sel) text2=addtag3('\\1a&HFE&',text2) txt=text2 if l==1 then txt=text end line2.text=txt - :gsub("\\xshad([%d%.%-]+)",function(a) xx=tostring(f*a) xx=xx:gsub("([%d%-]+%.%d%d)%d+","%1") return "\\xshad"..xx end) - :gsub("\\yshad([%d%.%-]+)",function(a) yy=tostring(f*a) yy=yy:gsub("([%d%-]+%.%d%d)%d+","%1") return "\\yshad"..yy end) + :gsub("\\xshad([%d%.%-]+)",function(a) xx=tostring(f*a) xx=xx:gsub("([%d%-%.]+%.%d%d)%d+","%1") return "\\xshad"..xx end) + :gsub("\\yshad([%d%.%-]+)",function(a) yy=tostring(f*a) yy=yy:gsub("([%d%-%.]+%.%d%d)%d+","%1") return "\\yshad"..yy end) line2.layer=layer+(lay-l) subs.insert(i+1,line2) end