Skip to content

Commit 8f32787

Browse files
Minor update to VFE-Deserters (#520)
* Minor update to VFE-Deserters Basically, the purchase contraband button had an extra argument that determines if the button should be forcibly disabled. I've added a simple check to handle it. * Include updated Deserters .dll, just as a precaution Using most recent .dll as reference in case something we've referenced was changed.
1 parent 136418f commit 8f32787

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

References/VFED.dll

-512 Bytes
Binary file not shown.

References/VFED.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
B6AD4C7CF2D9B5C479D4FD7BFF7AA46868469800
1+
D7209F463476A902E87925CDEC1A359D3681E1D1

Source_Referenced/VanillaFactionsDeserters.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -254,15 +254,15 @@ private static bool TrySpendIntel(int normalIntelCost, int criticalIntelCost, Ma
254254
#region Shared
255255

256256
// The purchase button is used by contraband tab to purchase contraband, and services tab to purchase quests.
257-
private static bool PreDoPurchaseButton(Rect inRect, string text, int intelCost, int criticalIntelCost, Dialog_DeserterNetwork parent, ref bool __result)
257+
private static bool PreDoPurchaseButton(Rect inRect, string text, int intelCost, int criticalIntelCost, Dialog_DeserterNetwork parent, bool forceDisabled, ref bool __result)
258258
{
259259
if (!MP.IsInMultiplayer)
260260
return true;
261261

262-
if (intelCost > parent.TotalIntel || criticalIntelCost > parent.TotalCriticalIntel)
262+
if (intelCost > parent.TotalIntel || criticalIntelCost > parent.TotalCriticalIntel || forceDisabled)
263263
GUI.color = Color.grey;
264264

265-
if (Widgets.ButtonText(inRect, text))
265+
if (Widgets.ButtonText(inRect, text) && !forceDisabled)
266266
{
267267
RecacheDialogIntel(ref parent.TotalIntel, ref parent.TotalCriticalIntel, parent.Map);
268268
// Check if actually can afford after re-caching, will have to do again after syncing.

0 commit comments

Comments
 (0)