Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.96a is out! (05/05/23); Blog post: Colony Crises (11/24/23)

Author Topic: CheapCommodityMission?  (Read 248 times)

Timid

  • Admiral
  • *****
  • Posts: 627
  • Personal Text
    • View Profile
CheapCommodityMission?
« on: June 18, 2022, 04:31:41 PM »

I was duplicating something for my mod and I noticed the local variation never showed up for some reason...

Code
if (variation == Variation.LOCAL) {
requireMarketIs(market);
requireMarketLocationNot(createdAt.getContainingLocation());
requireCommodityIsNotPersonnel();
requireCommodityDeficitAtMost(0);
requireCommodityAvailableAtLeast(1);
requireCommoditySurplusAtLeast(1);
Not really sure what's happening here...

requireMarketIs and requireMarketLocationNot... shouldn't that be a remote thing and not local? I commented that line out and contacts were able to give out local variations.

Could be just bad luck on my part.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23012
    • View Profile
Re: CheapCommodityMission?
« Reply #1 on: June 18, 2022, 04:37:24 PM »

Yep, I think that's exactly right - thank you, fixed!
Logged

Timid

  • Admiral
  • *****
  • Posts: 627
  • Personal Text
    • View Profile
Re: CheapCommodityMission?
« Reply #2 on: June 18, 2022, 05:10:10 PM »

Yep, I think that's exactly right - thank you, fixed!
I'd also like to say that this mission should probably (with the exception of fuel and maintenance commodities) it should be limited to the player's maximum capacity (at least if their capacity is currently less than a thousand). So the price doesn't instantly kill them logistically (even if it is at a discount)