Skip to content

Commit 8ef5ec8

Browse files
committed
NilName Support
1 parent 0bd7d7a commit 8ef5ec8

File tree

4 files changed

+29
-9
lines changed

4 files changed

+29
-9
lines changed

Diff for: .vscode/launch.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "lua",
9+
"name": "LUA Debug",
10+
"cpath": "C:/Program Files (x86)/Lua/5.1/?.dll",
11+
"cwd": "${workspaceFolder}",
12+
"program": "${workspaceFolder}/BadRotations.lua",
13+
"path": "${workspaceFolder}/?.lua",
14+
"request": "launch",
15+
}
16+
]
17+
}

Diff for: 3rd Party Files/NoName/_BRLoader.lua

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
local NoName = ...
2-
if --[[(...).name ~= "NoName" or]] NoName.Utils == nil then return end
3-
local read = NoName.Utils.Storage.read
4-
local write = NoName.Utils.Storage.write
5-
local JSON = NoName.Utils.JSON
6-
local AceGUI = NoName.Utils.AceGUI
1+
local Nn = ...
2+
-- if --[[(...).name ~= "Nn" or]] Nn == nil then return end
3+
-- local read = Nn.Utils.Storage.read
4+
-- local write = Nn.Utils.Storage.write
5+
-- local JSON = Nn.Utils.JSON
6+
-- local AceGUI = Nn.Utils.AceGUI
77
local toc = ReadFile('/scripts/BadRotations/BadRotations.toc')
88
local br = {}
99
br.files = {}
@@ -98,7 +98,8 @@ for i = 1, #br.files do
9898
local load = br.files[i].load
9999
if load then
100100
-- print("Loading File: /scripts/"..file)
101-
NoName:Require('/scripts/'..file, br)
101+
-- Nn:Require('/scripts/'..file, br)
102+
Nn:Require('/scripts/'..file, br)
102103
-- else
103104
-- print("Did not load File: /scripts/"..file)
104105
end

Diff for: System/Functions/Combat.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ function br.hasThreat(unit, playerUnit)
256256
else
257257
targetUnit = "None"
258258
end
259-
if targetUnit == "None" then
259+
if not targetUnit or targetUnit == "None" then
260260
targetFriend = false
261261
else
262262
targetFriend = (br.isTargeting(unit) or br._G.UnitName(targetUnit) == br._G.UnitName("player")

Diff for: Unlockers/nn.lua

+3-1
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,9 @@ function br.unlock:NNUnlock()
395395
end
396396
b.GetDirectoryFiles = function(...)
397397
local str = ...
398-
if str == nil then return "" end
398+
if str == nil or str == "*" then return "" end
399+
-- print("str: "..tostring(str))
400+
str = str.."*.lua"--:match("*.lua") or str
399401
local filter = str:gsub(str:match("*.lua"), "*")
400402
-- print("Filter: "..filter)
401403
local files = ListFiles(filter)

0 commit comments

Comments
 (0)