Category | Farming Simulator 22 |
Created | 10.06.2022 14:15 |
Dmitrii Artamonov (MadSochi) | 10.06.2022 14:15 |
---|---|
First of all. I am NOT a scripter. I am NOT a programmer. I just know english language and have human brains for trying to make a little changes in game files and mod files for my own server vision. I've disabled any teleports on my server with this mod. BUT... Players in my server found a bug. If you have any Production - you can choose it in ESC menu in Productions Chains tab and there is a button for teleport to this production. Need to disable teleport in there too to prevent anti-realism. It happens because mod was created for FS 19 where productions doesn't exists. So i've try to go inside "No teleport" mod look to the script structure and find any information how to add or edit it. This is how mod looks like RemoveTeleportButtons = { info = { Author = "nilBrain and Vilkas", buildID = "22012020:2230.47.A", title = " RemoveTeleportButtons", notes = " Remove Teleport Buttons in IngameMenu", date = " 02.12.2021", } }; function RemoveTeleportButtons:loadMap(mapFilename) InGameMenuMapFrame.onClickVisitPlace = function() return; end; InGameMenuMapFrame.onClickEnterVehicle = function() return; end; g_currentMission.inGameMenu.pageMapOverview.buttonVisitPlace:setDisabled(true); g_currentMission.inGameMenu.pageMapOverview.buttonEnterVehicle:setDisabled(true); end; addModEventListener(RemoveTeleportButtons); I found a list of functions of InGameMenuMapFrame.lua here: https://github.com/scfmod/fs19_LuaRefAutoGen/blob/master/Classes/InGameMenuMapFrame.lua and i found other luas for any tab in game when you press ESC button here: https://github.com/scfmod/fs19_LuaRefAutoGen/tree/master/Classes for example: InGameMenuContractsFrame.lua InGameMenuFinancesFrame.lua InGameMenuGameSettingsFrame.lua InGameMenuGeneralSettingsFrame.lua and other. But i didn't see lua like this: InGameMenuProductionsChainsFrame.lua cos this list on GitHub was created for FS19. So i've tryed to add this line to the code function RemoveTeleportButtons:loadMap(mapFilename) InGameMenuMapFrame.onClickVisitPlace = function() return; end; InGameMenuMapFrame.onClickEnterVehicle = function() return; end; InGameMenuProductionsChainsFrame.onClickVisitPlace = function() return; end; g_currentMission.inGameMenu.pageMapOverview.buttonVisitPlace:setDisabled(true); g_currentMission.inGameMenu.pageMapOverview.buttonEnterVehicle:setDisabled(true); end; addModEventListener(RemoveTeleportButtons); and got immediate error when map loading. People who understand all of this much better then me please help me with editing this mod. I need TWO things: 1) Disable button VISIT place in Productions Chains tab. 2) Disable button CHANGE OUTPUT MOD in Productions Chains tab when you select the OUTGOING PRODUCTS to save only Storing for outgoing products. Big thanks for your advise and help. |
Note: Log in to post. Create a new account here.