Skip to content

Commit

Permalink
remove debugPrint from rmod/main
Browse files Browse the repository at this point in the history
Also some gui enhancements, to match FS22 style
  • Loading branch information
Mmtrx committed Jan 22, 2022
1 parent a4c605c commit 5894000
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 15 deletions.
11 changes: 3 additions & 8 deletions betterContracts.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
---${title}
---@author ${author}
---@version r_version_r
---@date 18/01/2022

--=======================================================================================================
-- BetterContracts SCRIPT
--
Expand All @@ -14,10 +9,10 @@
-- v1.1.0.3 24.04.2021 (Mmtrx) gui enhancements: addtl details, sort buttons
-- v1.1.0.4 07.07.2021 (Mmtrx) add user-defined missionVehicles.xml, allow missions with no vehicles
-- v1.2.0.0 18.01.2022 (Mmtrx) adapt for FS22
-- v1.2.0.0.rc 22.01.2022 (Mmtrx) release candidate. Gui optics in blue
--=======================================================================================================
InitRoyalUtility(Utils.getFilename("lib/utility/", g_currentModDirectory))
InitRoyalMod(Utils.getFilename("lib/rmod/", g_currentModDirectory))
r_debug_r = true
SC = {
FERTILIZER = 1, -- prices index
LIQUIDFERT = 2,
Expand Down Expand Up @@ -50,15 +45,15 @@ SC = {
}
}
---@class BetterContracts : RoyalMod
BetterContracts = RoyalMod.new(r_debug_r, false)
BetterContracts = RoyalMod.new(true, false) --params bool debug, bool sync

function debugPrint(text, ...)
if BetterContracts.debug then
Logging.info(text,...)
end
end
function BetterContracts:initialize()
debugPrint("------- initialize(): %s", self.initialized)
debugPrint("[%s] initialize(): %s", self.name,self.initialized)
if self.initialized ~= nil then return end -- run only once
g_missionManager.missionMapNumChannels = 6
self.missionUpdTimeout = 15000
Expand Down
2 changes: 1 addition & 1 deletion gui/SCGui.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<GuiElement type="text" profile="betterContractsRight" id="valu6" position="100px 75px" />
<GuiElement type="text" profile="betterContractsRight" id="valu7" position="100px 42px" />
<!-- Sort buttons -->
<GuiElement type="empty" id="sortbox" profile="emptyPanel" size="305px 45px" position="3px 0px" anchors="1 1 0 0" hasFrame="true" frameThickness="1dp 1dp 1dp 1dp" >
<GuiElement type="empty" id="sortbox" profile="SeeContSortbox" size="305px 45px" position="3px 0px" anchors="1 1 0 0" >
<GuiElement type="boxLayout" profile="ingameMenuMapFilterButtonBox" id="layout" size="120px 42px" position="0px -18px" >
<GuiElement type="button" profile="SeeContsortCat" id="sortcat" />
<GuiElement type="button" profile="SeeContsortProf" id="sortprof" />
Expand Down
12 changes: 10 additions & 2 deletions gui/guiProfiles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
<GUIProfiles>
<Presets>
<Preset name="len398" value="398px 40px" />
<Preset name="colorMainUI" value="0.9910 0.3865 0.0100 1" />
<Preset name="colorGlass" value="0.718 0.716 0.715 0.04" />
<Preset name="colorMainUI" value="0.0227 0.5346 0.8519 1.0" />
<Preset name="colorGlass" value="0.0036 0.0056 0.0065 0.5" />
<!--Preset name="colorGlass" value="0.718 0.716 0.715 0.04" /-->
<Preset name="colorWhite" value="1 1 1 1" />
</Presets>
<Traits>
Expand All @@ -37,6 +38,13 @@
<Value name="textAlignment" value="right" />
</Profile>

<!-- Sortbox Frame - - - - - - - - - - - - - - - - - - - - - -->
<Profile name="SeeContSortbox" extends="emptyPanel">
<Value name="hasFrame" value="true" />
<Value name="frameThickness" value="0 1px 1px 0dp" />
<Value name="frameTopColor" value="$preset_colorMainUI" />
<Value name="frameRightColor" value="$preset_colorMainUI" />
</Profile>
<!-- Sortbox Buttons - - - - - - - - - - - - - - - - - - - - - -->
<Profile name="SeeContsortCat" extends="buttonBase">
<Value name="handleFocus" value="true" />
Expand Down
2 changes: 1 addition & 1 deletion lib/rmod/Main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
---@param rmodDirectory string
function InitRoyalMod(rmodDirectory)
source(Utils.getFilename("RoyalMod.lua", rmodDirectory))
printDebug("Royal Mod loaded successfully by " .. g_currentModName)
Logging.devInfo("Royal Mod loaded successfully by " .. g_currentModName)
return true
end
6 changes: 3 additions & 3 deletions modDesc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ Changelog ${version}:
<extraSourceFiles>
<sourceFile filename="lib/utility/Main.lua" />
<sourceFile filename="lib/rmod/Main.lua" />
<sourceFile filename="betterContractsNewEvent.lua" />
<sourceFile filename="betterContractsClearEvent.lua" />
<sourceFile filename="betterContracts.lua" />
<sourceFile filename="missionManagerFix.lua" />
<sourceFile filename="scripts/betterContractsNewEvent.lua" />
<sourceFile filename="scripts/betterContractsClearEvent.lua" />
<sourceFile filename="scripts/missionManagerFix.lua" />
<sourceFile filename="scripts/missionVehicles.lua" />
<sourceFile filename="scripts/debug.lua" />
<sourceFile filename="scripts/gui.lua" />
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 5894000

Please sign in to comment.