AchievementCategory - jimdroberts/FishMMO GitHub Wiki

Description

Categories for achievements, used to group and organize different types of achievements in the game. This enum defines the various achievement categories available in FishMMO, allowing the system to classify and manage achievements based on their context, such as combat, crafting, exploration, and more.


Basic Usage

Setup

  1. No dependencies or prerequisites are required to use AchievementCategory.
  2. Reference the enum in your scripts to categorize or check achievement types.
  3. No configuration is necessary; all categories are predefined.
  4. The enum is available at runtime and can be used wherever achievement categorization is needed.

Example

// Example 1: Assigning an achievement category
// This example demonstrates how to assign a category to an achievement definition.
AchievementCategory category = AchievementCategory.Combat;
// Use the category to filter or check achievements
if (category == AchievementCategory.Combat)
{
    // Handle combat achievement logic
}

// Example 2: Iterating over all categories
// This example shows how to enumerate all possible achievement categories.
foreach (AchievementCategory cat in Enum.GetValues(typeof(AchievementCategory)))
{
    Console.WriteLine($"Category: {cat}");
}

Best Practices

  • Use the appropriate category for each achievement to ensure consistent organization and filtering.
  • When adding new achievement types, update the enum and document the new category.
  • Avoid using the Miscellaneous category unless no other category fits.
  • Reference the enum directly in achievement logic to reduce errors from string-based category names.
⚠️ **GitHub.com Fallback** ⚠️