Skip to content

Commit d63dc10

Browse files
committed
2 parents 63de675 + 448b469 commit d63dc10

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

assets/starpocalypse.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@
8383
# Black Market handling fee (bribe) as a fraction of the Open Market tariff. If tariff is 30%, Black Market bribe will be 15%.
8484
"blackMarketFenceCut": 0.5,# vanilla: 0
8585
# Black market access requires a pirate contact at that location.
86-
"blackMarketRequiresContact": true, # vanilla: false If Nexerelin is present: No contact will be required if the planet is in rebellion. Restrictions below will still apply though.
86+
"blackMarketRequiresContact": true, # vanilla: false If Nexerelin is present: No contact will be required if the planet is in rebellion.
87+
"blackMarketGoodStuffRequiresContact": true, # vanilla: false Accessing black market can be done but good stuff is sold by contacts as below.
8788
# Not every contact can get you the good stuff. At least this importance is required of the blackMarket contact to enable you buying this
8889
# 0: No Contact required
8990
# 1: Very Low

src/starpocalypse/helper/ConfigHelper.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ public class ConfigHelper {
5858
@Getter
5959
private static boolean blackMarketRequiresContact = false;
6060

61+
@Getter
62+
private static boolean blackMarketGoodStuffRequiresContact = false;
63+
6164
@Getter
6265
private static int blackMarketWeaponT0 = 0;
6366

@@ -275,6 +278,7 @@ private static void loadConfig(JSONObject settings) {
275278
regulationMaxTier = settings.optInt("regulationMaxLegalTier", 0);
276279
shyBlackMarket = settings.optBoolean("shyBlackMarket", true);
277280
blackMarketRequiresContact = settings.optBoolean("blackMarketRequiresContact", true);
281+
blackMarketGoodStuffRequiresContact = settings.optBoolean("blackMarketGoodStuffRequiresContact", true);
278282

279283
blackMarketWeaponT0 = settings.optInt("blackMarketWeaponT0", 0);
280284
blackMarketWeaponT1 = settings.optInt("blackMarketWeaponT1", 0);

src/starpocalypse/submarket/RegulatedBlackMarket.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public boolean isIllegalOnSubmarket(CargoStackAPI stack, TransferAction action)
145145
return false;
146146
}
147147

148-
if(ConfigHelper.isBlackMarketRequiresContact())
148+
if(ConfigHelper.isBlackMarketGoodStuffRequiresContact())
149149
{
150150
return bestContactLevel < getContactLevelFor(stack);
151151
}
@@ -203,7 +203,7 @@ public boolean isIllegalOnSubmarket(FleetMemberAPI member, TransferAction action
203203
return false;
204204
}
205205

206-
if(ConfigHelper.isBlackMarketRequiresContact())
206+
if(ConfigHelper.isBlackMarketGoodStuffRequiresContact())
207207
{
208208
return bestContactLevel < getContactLevelFor(member);
209209
}
@@ -239,7 +239,7 @@ else if(member.isCapital())
239239
public void updateCargoPrePlayerInteraction()
240240
{
241241
super.updateCargoPrePlayerInteraction();
242-
if(ConfigHelper.isBlackMarketRequiresContact())
242+
if(ConfigHelper.isBlackMarketGoodStuffRequiresContact())
243243
{
244244
getBestContact();
245245
}

0 commit comments

Comments
 (0)