fix fe+ compatibility
This commit is contained in:
parent
ea825853d0
commit
9a650c09fc
3 changed files with 20 additions and 9 deletions
|
|
@ -10,16 +10,12 @@ end
|
|||
|
||||
-- Remove an element of type t and name from data.raw
|
||||
function data_util.remove_raw(t, name)
|
||||
local index = -1
|
||||
for i, elem in pairs(data.raw) do
|
||||
if elem.type == t and elem.name == name then
|
||||
index = i
|
||||
for i, elem in pairs(data.raw[t]) do
|
||||
if elem.name == name then
|
||||
data.raw[t][i] = nil
|
||||
break
|
||||
end
|
||||
end
|
||||
if index > -1 then
|
||||
table.remove(data.raw, index)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue