• 0 Posts
  • 37 Comments
Joined 11 months ago
cake
Cake day: December 2nd, 2023

help-circle










  • je_skirata@lemmy.todaytoLinuxWhy do you still hate Windows?
    link
    fedilink
    English
    arrow-up
    6
    ·
    4 months ago
    1. The joy of “figuring it out” and customizing everything you want to the minutest details

    Customization is my reason. I’ve got a two-monitor setup in KDE with different panels on each one. Each one is highly customized specifically to me, and the customizations can’t be done in Windows.




  • It’s hard to give advice about how code should be structured, since there’s many ways of accomplishing the same things, but you’re doing the right thing by thinking about scalability before you get too deep to change it.

    You could try separating eacg trigger condition into their own functions, so that if an OnAttack gets triggered it will only check and loop through OnAttack abilities.

    Something like:

    OnAttack.connect( CheckOnAttack )
    OnDamaged.connect( CheckOnDamaged )
    
    func CheckOnAttack( ATTACK_TYPE ):
              match ATTACK_TYPE:
                      ....
    
    func CheckOnDamaged( DAMAGE_TYPE ):
             match DAMAGE_TYPE:
                      ....