Author Topic: [FIXED] Potentially incorrect award of globeTrotter commendation  (Read 1135 times)

Offline mtort

  • Squaddie
  • *
  • Posts: 1
    • View Profile
GlobeTrotter is currently awarded if the number of countries visited by a soldier equals the number of countries defined in the rules.

But this is incorrect, since when calculating the number of countries visited by a soldier, places outside the countries (with country="STR_UNKNOWN") are taken into account. That is, a soldier can receive this commendation if he has visited all countries except one, but has also been, for example, in Antarctica.

I propose to exclude from the calculation of countries visited by a soldier places with country = "STR_UNKNOWN". Small patch attached.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9078
    • View Profile
Re: Potentially incorrect award of globeTrotter commendation
« Reply #1 on: August 26, 2024, 09:27:04 pm »

You are correct.

And since we're gonna change it, I kinda thought, maybe we could also award globetrotter only if the soldier visited all countries + "Antarctica" (i.e. any STR_UNKNOWN).
Wouldn't that be technically correcter? :)

What do others think?

Online Delian

  • Colonel
  • ****
  • Posts: 492
    • View Profile
Re: Potentially incorrect award of globeTrotter commendation
« Reply #2 on: August 26, 2024, 10:06:25 pm »
Antarctica isn't a country. Yes, I'm being country-ist.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9078
    • View Profile
Re: Potentially incorrect award of globeTrotter commendation
« Reply #3 on: August 26, 2024, 10:37:05 pm »
It is a country in xcom diaries :)
And you can also visit any of the other 170+ xcom non-countries, like Poland, Switzerland, Mexico, Indonesia, etc.

Jokes aside, a chance your soldier doesn't visit a non-country before he visits all countries is smaller than astronomically small, so it makes no difference.
I was just trying to be funny I guess, unsuccessfully.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9078
    • View Profile
Re: [FIXED] Potentially incorrect award of globeTrotter commendation
« Reply #4 on: September 21, 2024, 05:58:53 pm »
Fixed: https://github.com/MeridianOXC/OpenXcom/commit/4a93288c62a4e0993fe4d0ea6e9a347a5d97da6b

Now you need to visit every country (+ any piece of land not belonging to any country)... which I now declare the official definition of globeTrotter in OXCE.

--

Besides that, the commendation was not awarded immediately, but one mission later... and nobody noticed, interesting :)

This is now also fixed: https://github.com/MeridianOXC/OpenXcom/commit/8f0e0f259b8ad45613b3b0ff5d92bdcac05e411e

It affected globeTrotter commendation, "all UFOs" commendation, "all missions" commendation and maybe more.
I hope I didn't break something else.
Fingers crossed.