From 35e0ac1d8877f9eb9a96d2d4fa11f75822f354c6 Mon Sep 17 00:00:00 2001 From: Liriosha <57261793+Liriosha@users.noreply.github.com> Date: Sun, 15 Mar 2026 01:10:51 -0400 Subject: [PATCH] Added additional documentation to Achievement.cpp Clang formatter was throwing a fit so hopefully changing a cpp file will fix it --- Minecraft.World/Stats/Achievement.cpp | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/Minecraft.World/Stats/Achievement.cpp b/Minecraft.World/Stats/Achievement.cpp index b690b682b..3b4171191 100644 --- a/Minecraft.World/Stats/Achievement.cpp +++ b/Minecraft.World/Stats/Achievement.cpp @@ -5,6 +5,17 @@ #include "../Util/DescFormatter.h" #include "Achievement.h" +/** + * @class Achievement + * @brief Represents a Minecraft achievement. + * + * Achievements are stat objects that can be unlocked by the player. + * Each achievement has a position in the achievement tree + * a description and an optional icon and prerequisite. + * + * Use postConstruct() to register the achievement globally. + */ + /** * @brief Performs internal initialization for the achievement. * @@ -65,17 +76,18 @@ Achievement::Achievement(int id, const std::wstring& name, int x, int y, y(y), requires(requires) {} -/** - * @brief Sets the decription formatter (DescFormatter) - * @param descFormatter Pointer to the DescFormatter formatting the description text. - * @return self -**/ -Achievement* Achievement::setDescFormatter(DescFormatter* descFormatter) { + /** + * @brief Sets the decription formatter (DescFormatter) + * @param descFormatter Pointer to the DescFormatter formatting the + * description text. + * @return self + **/ + Achievement + * Achievement::setDescFormatter(DescFormatter * descFormatter) { this->descFormatter = descFormatter; return this; } - /** * @brief Returns whether the Achivement is golden * @return boolean