// Discord Rich Presence - plugin made by Mathew Simon.

#pragma once

#include "CoreMinimal.h"
#include "DiscordRichPresenceTypes.generated.h"

/**
 * Ce que Discord affiche sous le nom du jeu.
 * Le nom du jeu lui-meme vient du Developer Portal (nom de l'application liee au Client ID).
 */
USTRUCT(BlueprintType)
struct DISCORDRICHPRESENCE_API FDiscordRichPresenceActivity
{
	GENERATED_BODY()

	/** 1ere ligne sous le nom du jeu. Discord ignore les textes de moins de 2 caracteres. */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Discord")
	FString Details;

	/** 2eme ligne sous le nom du jeu. */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Discord")
	FString State;

	/** Cle de l'image (Developer Portal > Rich Presence > Art Assets), ou une URL https directe. */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Discord|Images")
	FString LargeImageKey;

	/** Tooltip au survol de la grande image. */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Discord|Images")
	FString LargeImageText;

	/** Petite icone en bas a droite de la grande image. */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Discord|Images")
	FString SmallImageKey;

	/** Tooltip au survol de la petite image. */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Discord|Images")
	FString SmallImageText;

	/** Affiche "XX:XX ecoulees" — c'est le compteur de temps de jeu. */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Discord")
	bool bShowElapsedTime = true;

	/** Nombre de joueurs actuels (affiche "(2 sur 4)"). Laisser a 0 pour ne rien afficher. */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Discord|Party", meta = (ClampMin = "0"))
	int32 PartySize = 0;

	/** Nombre de joueurs max. Ignore si PartySize vaut 0. */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Discord|Party", meta = (ClampMin = "0"))
	int32 PartyMax = 0;

	bool operator==(const FDiscordRichPresenceActivity& Other) const
	{
		return Details == Other.Details
			&& State == Other.State
			&& LargeImageKey == Other.LargeImageKey
			&& LargeImageText == Other.LargeImageText
			&& SmallImageKey == Other.SmallImageKey
			&& SmallImageText == Other.SmallImageText
			&& bShowElapsedTime == Other.bShowElapsedTime
			&& PartySize == Other.PartySize
			&& PartyMax == Other.PartyMax;
	}

	bool operator!=(const FDiscordRichPresenceActivity& Other) const
	{
		return !(*this == Other);
	}
};
