mirror of
https://github.com/Jous99/F4MP.git
synced 2026-01-12 23:20:53 +01:00
33 lines
696 B
C
33 lines
696 B
C
#pragma once
|
|
|
|
#ifndef TP_INTERNAL_COMPONENTS_GUARD
|
|
#error Include Components.h instead
|
|
#endif
|
|
|
|
#include <Structs/GameId.h>
|
|
|
|
struct FormIdComponent
|
|
{
|
|
FormIdComponent() noexcept
|
|
: FormIdComponent(0, 0)
|
|
{
|
|
}
|
|
|
|
FormIdComponent(const GameId& acId) noexcept
|
|
: Id(acId)
|
|
{
|
|
}
|
|
|
|
FormIdComponent(const uint32_t aBaseId, const uint32_t aModId) noexcept
|
|
: Id(aModId, aBaseId)
|
|
{
|
|
}
|
|
|
|
bool operator==(const FormIdComponent& acRhs) const noexcept { return Id == acRhs.Id; }
|
|
|
|
bool operator!=(const FormIdComponent& acRhs) const noexcept { return !operator==(acRhs); }
|
|
|
|
operator bool() const noexcept { return Id != GameId{}; }
|
|
|
|
GameId Id;
|
|
};
|