Author Topic: Don't exit on losing all lemmings (feature development)  (Read 6363 times)

0 Members and 1 Guest are viewing this topic.

Offline Simon

  • Administrator
  • Posts: 3895
    • View Profile
    • Lix
Re: Don't exit on losing all lemmings (feature development)
« Reply #120 on: May 13, 2024, 05:11:04 PM »
I'm sitting in Mumble. Join anytime.

BRB in 20 minutes (17:30 UTC). Back.

-- Simon
« Last Edit: May 13, 2024, 05:34:08 PM by Simon »

Offline Dullstar

  • Posts: 2093
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
Re: Don't exit on losing all lemmings (feature development)
« Reply #121 on: May 13, 2024, 07:55:33 PM »
I understand your desire for the singular option, but there are benefits to keeping them separate (and, identified by strings rather than numbers). My instinct on this one is, let's keep it as it is at least for now.

I agree with Simon here regarding the use of an enum. There *should* always be one and exactly one of the options active, but an enum will consistently enforce it across the entire codebase. Even if everything's correct now, this has maintenance benefits long-term. It shows that it's intended that exactly one of the options is true, and you won't have to worry about any bad behavior as a result of attempting to run multiple options at once (sure, maybe setting them all to true doesn't misbehave for now... until some other change happens and it no longer gets handled gracefully but nobody checked).

You can still identify them with strings in the options file, and the enum values have names so it's not like you need to remember that "OptionA" is 0, "OptionB" is 1... keeping track of that is the compiler's responsibility.

Offline WillLem

  • Posts: 3453
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: Don't exit on losing all lemmings (feature development)
« Reply #122 on: May 13, 2024, 09:58:26 PM »
I'm sitting in Mumble. Join anytime.

Hi Simon, I've ended up being super busy this evening with IRL stuff. If you're free another evening this week I'll make sure to get it in the calendar. I could try to do the PR by myself, but would much prefer to do it with your guidance.

I agree with Simon here regarding the use of an enum. There *should* always be one and exactly one of the options active, but an enum will consistently enforce it across the entire codebase. Even if everything's correct now, this has maintenance benefits long-term.

OK, I'll give it a try. Can't promise anything, because I currently have no idea what an enum is, let alone how it works or how to properly implement it. With that said, lack of prior knowledge hasn't exactly stopped me so far ;P

I'll aim to get something done before Simon and I next meet.

Offline Simon

  • Administrator
  • Posts: 3895
    • View Profile
    • Lix
Re: Don't exit on losing all lemmings (feature development)
« Reply #123 on: May 13, 2024, 10:42:22 PM »
All right, leaving Mumble and going to bed.

another evening this week I'll make sure to get it in the calendar.

Wednesday, 16th, from 16:00 UTC is good. I'll have time until 21:00 UTC. Please choose a definite starting time beforehand, and I'll confirm it.

-- Simon