// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "Faye/GameObjects/TimeOfDayActor.h"

#include "FayeFunctionLibrary.generated.h"

/**
 * 
 */
UCLASS()
class FAYE_API UFayeFunctionLibrary : public UBlueprintFunctionLibrary
{
	GENERATED_BODY()
public:
	UFUNCTION(BlueprintCallable, Category = "Time Of Day")
	static void AddTime(FTimeOfDayDef& TimeOfDayDef, int32 InSeconds) { TimeOfDayDef.AddTime(InSeconds); }
	
	UFUNCTION(BlueprintPure, Category = "Time Of Day")
	static int32 SecondsFromMinutes(int32 Minutes) { return Minutes * MINUTES_TO_SECONDS; }
	UFUNCTION(BlueprintPure, Category = "Time Of Day")
	static int32 SecondsFromHours(int32 Hours) { return Hours * HOURS_TO_SECONDS; }
	UFUNCTION(BlueprintPure, Category = "Time Of Day")
	static int32 SecondsFromDays(int32 Days) { return Days * DAYS_TO_SECONDS; }
	
	UFUNCTION(BlueprintPure, Category = "Time Of Day")
	static int32 GetSeconds(const FTimeOfDayDef& TimeOfDayDef) { return TimeOfDayDef.GetSeconds(); }
	UFUNCTION(BlueprintPure, Category = "Time Of Day")
	static int32 GetMinutes(const FTimeOfDayDef& TimeOfDayDef) { return TimeOfDayDef.GetMinutes(); }
	UFUNCTION(BlueprintPure, Category = "Time Of Day")
	static int32 GetHours(const FTimeOfDayDef& TimeOfDayDef) { return TimeOfDayDef.GetHours(); }
	UFUNCTION(BlueprintPure, Category = "Time Of Day")
	static int32 GetDays(const FTimeOfDayDef& TimeOfDayDef) { return TimeOfDayDef.GetDays(); }
	UFUNCTION(BlueprintPure, Category = "Time Of Day")
	static EWeekday GetWeekday(const FTimeOfDayDef& TimeOfDayDef) { return TimeOfDayDef.GetWeekday(); }
};
