-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathlegendary_skins.lua
64 lines (57 loc) · 1.54 KB
/
legendary_skins.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
-- Purpose: Gives you all skins
-- Authors: Written by Simplity, fixes by Davy Jones
local tostring = tostring
local type = type
local M_blackmarket = managers.blackmarket
local weapon_skins = tweak_data.blackmarket.weapon_skins
local inventory_tradable = M_blackmarket._global.inventory_tradable
local i = 1
local j = tostring(i)
for id, data in pairs( weapon_skins ) do
if not string.find(id, "color") then
while inventory_tradable[j] ~= nil do
i = i + 1
j = tostring(i)
end
if not M_blackmarket:have_inventory_tradable_item( "weapon_skins", id ) then
M_blackmarket:tradable_add_item( j, "weapon_skins", id, "mint", true, 1 )
end
end
end
-- Temporary fix for the temporary fix
local convert
convert = function()
for inst, data in pairs(inventory_tradable) do
if type(inst) == "number" then
inventory_tradable[tostring(inst)] = data
inventory_tradable[inst] = nil
end
end
convert = nil
end
function BlackMarketManager:tradable_update()
if convert then
convert()
end
end
-- Modifiable Legendary Skins
local weapon_skins = tweak_data.blackmarket.weapon_skins
for id, data in pairs(weapon_skins) do
if not string.find(id, "color") then
data.locked = false
end
end
local crafted = managers.blackmarket._global.crafted_items
for _, cat in pairs({crafted.primaries, crafted.secondaries}) do
for _, data in pairs(cat) do
if data.cosmetics then
data.customize_locked = nil
end
end
end
-- Inspect All Safes
for _, safe in pairs(tweak_data.economy.safes) do
if not safe.market_link then
safe.market_link = "Fake Link"
end
end