-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added SDK to Filter, initial implementation of new Flhook types.
- Loading branch information
Showing
28 changed files
with
1,544 additions
and
124 deletions.
There are no files selected for viewing
Submodule FLHookSDK
updated
from 696e35 to 93cead
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
#pragma once | ||
|
||
class DLL Admin | ||
namespace Hk | ||
{ | ||
static std::wstring GetPlayerIP(ClientId client); | ||
static Action<PlayerInfo, Error> GetPlayerInfo(const std::variant<uint, std::wstring_view>& player, bool alsoCharmenu); | ||
static std::list<PlayerInfo> GetPlayers(); | ||
static Action<DPN_CONNECTION_INFO, Error> GetConnectionStats(ClientId client); | ||
static Action<void, Error> ChangeNPCSpawn(bool disable); | ||
static Action<BaseHealth, Error> GetBaseStatus(std::wstring_view basename); | ||
static Fuse* GetFuseFromID(uint fuseId); | ||
static bool LightFuse(IObjRW* ship, uint fuseId, float delay, float lifetime, float skip); | ||
static bool UnLightFuse(IObjRW* ship, uint fuseId); | ||
static CEqObj* GetEqObjFromObjRW(IObjRW* objRW); | ||
static Action<void, Error> AddRoles(std::wstring_view characterName, const std::vector<std::wstring_view>& roles); | ||
static Action<void, Error> RemoveRoles(std::wstring_view characterName, const std::vector<std::wstring_view>& roles, bool clear); | ||
static Action<void, Error> SetRoles(std::wstring_view characterName, const std::vector<std::wstring_view>& roles); | ||
}; | ||
class DLL Admin | ||
{ | ||
static std::wstring GetPlayerIP(ClientId client); | ||
static Action<PlayerInfo, Error> GetPlayerInfo(const std::variant<uint, std::wstring_view>& player, bool alsoCharmenu); | ||
static std::list<PlayerInfo> GetPlayers(); | ||
static Action<DPN_CONNECTION_INFO, Error> GetConnectionStats(ClientId client); | ||
static Action<void, Error> ChangeNPCSpawn(bool disable); | ||
static Action<BaseHealth, Error> GetBaseStatus(std::wstring_view basename); | ||
static Fuse* GetFuseFromID(uint fuseId); | ||
static bool LightFuse(IObjRW* ship, uint fuseId, float delay, float lifetime, float skip); | ||
static bool UnLightFuse(IObjRW* ship, uint fuseId); | ||
static CEqObj* GetEqObjFromObjRW(IObjRW* objRW); | ||
static Action<void, Error> AddRoles(std::wstring_view characterName, const std::vector<std::wstring_view>& roles); | ||
static Action<void, Error> RemoveRoles(std::wstring_view characterName, const std::vector<std::wstring_view>& roles, bool clear); | ||
static Action<void, Error> SetRoles(std::wstring_view characterName, const std::vector<std::wstring_view>& roles); | ||
}; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#pragma once | ||
|
||
class BaseId | ||
{ | ||
const uint value; | ||
|
||
public: | ||
explicit BaseId(const uint val) : value(val) {} | ||
explicit BaseId(std::wstring_view name, bool isWildCard = false); | ||
explicit operator uint() const noexcept { return value; } | ||
bool operator==(const BaseId next) const { return value == next.value; } | ||
bool operator!() const; // TODO: Check if BaseId is valid here | ||
|
||
|
||
|
||
std::vector<ClientId> GetDockedPlayers(); | ||
void* GetMarket(); // Grab the bases market data. | ||
std::optional<std::wstring> GetAffiliation(); | ||
//TODO: @Laz, look into getting the physical base from abstract baseID. | ||
std::wstring GetName(); | ||
// std::pair<std::wstring, uint> GetDescription(); | ||
|
||
bool ToggleDocking(bool locked); //TODO: THis would be done via the CSolar. | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#pragma once | ||
|
||
class BaseId; | ||
class ShipId; | ||
|
||
class ClientId | ||
{ | ||
const uint value; | ||
|
||
Action<void, Error> AdjustCash(int amount); | ||
|
||
public: | ||
explicit ClientId(const uint val) : value(val) {} | ||
explicit ClientId(std::wstring_view name); | ||
explicit operator uint() const noexcept { return value; } | ||
bool operator==(const ClientId next) const { return value == next.value; } | ||
bool operator!() const { return !(value > 0 && value < 256); } | ||
|
||
// Returns the underlying value of the ClientId, it is generally recommended to not use this. | ||
uint GetValue(); | ||
|
||
// Type Conversions | ||
|
||
std::wstring_view GetCharacterName(); | ||
// TODO: These eventually will be their own types as well | ||
BaseId GetBaseId(); | ||
SystemId GetSystemId(); | ||
CAccount* GetAccount(); | ||
Archetype::Ship* GetShipArch(); | ||
ShipId GetShipId(); | ||
// std::list<ArchId> GetEquip(); | ||
CPlayerGroup* GetGroup(); | ||
std::optional<std::wstring> GetAffiliation(); | ||
CShip* GetShip(); | ||
uint GetRank(); | ||
uint GetWealth(); | ||
Action<int, Error> GetPvpKills(); | ||
Action<uint, Error> GetCash(); | ||
|
||
// State Checks | ||
|
||
bool InSpace(); | ||
bool InCharacterSelect(); | ||
bool IsAlive(); | ||
|
||
// Manipulation | ||
|
||
Action<void, Error> Kick(std::optional<std::wstring_view> reason = {}, std::optional<uint> delay = 10); | ||
Action<void, Error> SaveChar(); | ||
Action<void, Error> SetPvpKills(uint killAmount); | ||
Action<void, Error> AddCash(uint amount); | ||
Action<void, Error> RemoveCash(uint amount); | ||
Action<void, Error> Beam(std::variant<BaseId, std::wstring_view> base); | ||
Action<void, Error> Message(std::wstring message, std::optional<MessageFormat> format, std::optional<MessageColor> color); | ||
Action<void, Error> SetRep(std::variant<ushort, std::wstring_view> repGroup, float rep); | ||
Action<void, Error> Rename(std::wstring_view); | ||
void MarkObject(uint objId, int markStatus); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#pragma once | ||
|
||
class ObjectId | ||
{ | ||
const uint value; | ||
|
||
public: | ||
explicit ObjectId(const uint val) : value(val) {} | ||
explicit operator uint() const noexcept { return value; } | ||
bool operator==(const ObjectId next) const { return value == next.value; } | ||
bool operator!() const; | ||
|
||
ObjectType GetObjectType(); | ||
std::wstring GetNickName(); | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#pragma once | ||
|
||
class SystemId; | ||
|
||
class ShipId | ||
{ | ||
const uint value; | ||
|
||
public: | ||
explicit ShipId(const uint val) : value(val) {} | ||
explicit operator uint() const noexcept { return value; } | ||
bool operator==(const ShipId next) const { return value == next.value; } | ||
bool operator!() const; // TODO: Check if shipId is valid | ||
|
||
std::wstring GetNickname(); | ||
std::wstring GetName(); | ||
CShip* GetCShip(); | ||
Archetype::Ship* GetArchetype(); | ||
float GetHealth(bool percentage = false); | ||
st6::list<EquipDesc>& GetEquipment(); // TODO: We should define a lambda to make it easy for people to get Equip lists. | ||
float GetShields(bool percentage = false); | ||
void* GetCargo(); // TODO: Similar to equipment but for cargo (duh). | ||
void* GetNpcPersonality(); | ||
std::optional<ShipId> GetTarget(); | ||
std::wstring GetAffiliation(); | ||
// TODO: AI states such as formation, go to, dock etc. | ||
SystemId GetSystem(); | ||
Vector GetPosition(); | ||
Matrix GetOrientation(); | ||
Vector GetVelocity(); | ||
float GetSpeed(); | ||
|
||
bool IsPlayer(); | ||
bool IsNpc(); | ||
bool IsInTradeLane(); | ||
|
||
void Destroy(DestroyType type = DestroyType::Fuse); | ||
void SetHealth(float amount, bool percentage = false); | ||
void AddCargo(std::wstring_view good, int count, bool mission); | ||
void SetEquip(const st6::list<EquipDesc>& equip); | ||
void AddEquip(uint goodId, const std::wstring& hardpoint); | ||
void Relocate(Vector, std::optional<Matrix> orientation); | ||
|
||
// TODO: SetShields() potentially, @Aingar should know more about this. | ||
}; |
Oops, something went wrong.