Fix divinggear containable
This commit is contained in:
@@ -13,9 +13,14 @@
|
|||||||
- name: containerscontainable
|
- name: containerscontainable
|
||||||
regex: (?-s)Containable!anyitems="([^"]+)"
|
regex: (?-s)Containable!anyitems="([^"]+)"
|
||||||
lua: |
|
lua: |
|
||||||
|
-- If we fuck with the diving gear the game fucking explodes
|
||||||
|
-- Thinking we don't have oxygen tanks and killing us
|
||||||
|
if file:find("divinggear.xml") then
|
||||||
|
return false
|
||||||
|
end
|
||||||
local gurantee = {"ammobox", "deepdiving", "smallitem", "mediumitem", "largeitem"}
|
local gurantee = {"ammobox", "deepdiving", "smallitem", "mediumitem", "largeitem"}
|
||||||
local has = {}
|
local has = {}
|
||||||
|
|
||||||
local items = strsplit(s1, ",")
|
local items = strsplit(s1, ",")
|
||||||
for i, item in pairs(items) do
|
for i, item in pairs(items) do
|
||||||
for _, g in pairs(gurantee) do
|
for _, g in pairs(gurantee) do
|
||||||
@@ -24,7 +29,7 @@
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
for _, g in pairs(gurantee) do
|
for _, g in pairs(gurantee) do
|
||||||
if not has[g] then
|
if not has[g] then
|
||||||
s1 = s1 .. "," .. g
|
s1 = s1 .. "," .. g
|
||||||
|
Reference in New Issue
Block a user