43 lines
1.1 KiB
Plaintext
43 lines
1.1 KiB
Plaintext
--[[
|
|
Binoculars, Pistol, Knife? Who cares?
|
|
29/11/2020
|
|
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License
|
|
Author: RavenAscendant
|
|
--]]
|
|
|
|
|
|
|
|
function on_game_start()
|
|
RegisterScriptCallback("GUI_on_show", delay_change)
|
|
end
|
|
|
|
|
|
function delay_change( name, path)
|
|
if (name ~= "UIInventory") then return end --return quickly if not the GUI we want
|
|
|
|
|
|
if ui_inventory.GUI then
|
|
|
|
ui_inventory.GUI.slot_cell = { -- base slot = {UI slots to fit in}
|
|
[1] = {1,5}, -- Knife - add binoc slot as valid destination
|
|
[2] = {2,1,3,5}, -- Pistol - add binoc slot as valid destination
|
|
[3] = {3,2}, -- Rifle
|
|
[4] = {4}, -- Grenade
|
|
[5] = {5,1}, -- Binoculars - add knife slot as valid destination
|
|
[6] = {6}, -- Bolt
|
|
[7] = {7}, -- Outfit
|
|
[8] = {8}, -- PDA
|
|
[9] = {9}, -- Detector
|
|
[10] = {10}, -- Torch
|
|
[11] = {11}, -- Artefact
|
|
[12] = {12}, -- Helmet
|
|
[13] = {13}, -- Backpack
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|