Skip to content

Conversation

@bluebear94
Copy link

@bluebear94 bluebear94 commented Oct 19, 2025

This PR improves the quality of some of the code surrounding professions.

  • Make the fields in SkillItemTier final.
  • Switch to EnumMap for mapping from SkillItemTiers to the respective items.
    • This might become moot if/when SkillItemTiers become configurable, but in any case, the type of TIERED_ITEM_MATS is now exposed as Map<..., Map<...>> instead of mentioning the concrete types.
  • Hoist map lookups in ProfessionMapItems#init so we don’t have to look up the elements once for every tier.
  • Generify BaseGearType#tags field and BaseGearType#getTags() method.
  • Improvements to AllyOrEnemy:
    • Avoid serializing entity data in NoAI check in AllyOrEnemy.non_ai_enemies.
    • Use pattern matching to avoid some casts.
    • Add default implementation for AllyOrEnemy#getMatchingEntities.

@bluebear94 bluebear94 force-pushed the mf/cleanup-professions branch 2 times, most recently from a1f9902 to 855778d Compare October 24, 2025 06:25
@bluebear94 bluebear94 changed the title Cleanup profession-related code Cleanup code (originally profession-related) Oct 26, 2025
@bluebear94 bluebear94 force-pushed the mf/cleanup-professions branch from 41e467d to 11e7a0b Compare October 31, 2025 19:16
@bluebear94 bluebear94 force-pushed the mf/cleanup-professions branch from b7135c7 to a7794dc Compare November 16, 2025 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant