Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions DependencyControl.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
},

Expand Down
16 changes: 8 additions & 8 deletions ua.NecrosCopy.lua
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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()","")
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down