LeviLamina
Loading...
Searching...
No Matches
AutonomousActorManager.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/NonOwnerPointer.h"
7#include "mc/deps/core/utility/pub_sub/Subscription.h"
8#include "mc/deps/game_refs/OwnerPtr.h"
9#include "mc/deps/game_refs/StackRefResult.h"
10#include "mc/deps/game_refs/WeakRef.h"
11
12// auto generated forward declare list
13// clang-format off
14class Actor;
15class ActorFactory;
16class ActorManager;
17class EntityContext;
18class EntityRegistry;
22class LevelChunk;
23class LevelStorage;
24class ListTag;
25class WeakEntityRef;
26// clang-format on
27
28class AutonomousActorManager {
29public:
30 // member variables
31 // NOLINTBEGIN
32 ::ll::TypedStorage<8, 24, ::std::vector<::OwnerPtr<::EntityContext>>> mOwnedInactiveAutonomousActors;
33 ::ll::TypedStorage<8, 24, ::std::vector<::WeakEntityRef>> mActiveAutonomousActors;
34 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::ActorManager> const> mActorManager;
35 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnRemoveActorEntityReferences;
36 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnAutonomousActorRemovedSubscription;
37 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnChunkLoaded;
38 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnChunkDiscarded;
39 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnSaveGameDataSubscription;
40 ::ll::TypedStorage<8, 16, ::WeakRef<::EntityRegistry>> mEntityRegistry;
41 // NOLINTEND
42
43public:
44 // prevent constructor by default
45 AutonomousActorManager();
46
47public:
48 // member functions
49 // NOLINTBEGIN
50 MCAPI AutonomousActorManager(
51 ::gsl::not_null<::StackRefResult<::EntityRegistry>> const& entityRegistry,
52 ::Bedrock::NotNullNonOwnerPtr<::ActorManager> actorManager
53 );
54
55 MCAPI void _moveActiveAutonomousActorEntityToInactive(::Actor& actor, ::LevelChunk& levelChunk);
56
57 MCAPI void _onChunkDiscarded(::LevelChunk& levelChunk);
58
59 MCAPI void _onRemoveActorEntityReferences(::Actor& actor);
60
61 MCAPI void _saveAllAutonomousActors(::LevelStorage& levelStorage);
62
63 MCAPI ::Actor*
64 addAutonomousActorEntity(::IAddActorEntityProxy& addActorEntityProxy, ::OwnerPtr<::EntityContext> entity);
65
66 MCAPI void loadAutonomousActorsFromDisk(::LevelStorage& levelStorage, ::ActorFactory& actorFactory);
67
68 MCAPI void registerForLevelChunkEvents(::ILevelChunkEventManagerConnector& levelChunkEventManagerConnector);
69
70 MCAPI void registerLevelStorageManagerListener(::ILevelStorageManagerConnector& levelStorageManagerConnector);
71
72 MCAPI bool removeActiveAutonomousActorEntity(::WeakEntityRef weakEntityRef);
73
74 MCAPI ~AutonomousActorManager();
75 // NOLINTEND
76
77public:
78 // static functions
79 // NOLINTBEGIN
80 MCAPI static void _deduplicateDuplicateActorsFromList(::ListTag& listTag);
81 // NOLINTEND
82
83public:
84 // static variables
85 // NOLINTBEGIN
86 MCAPI static ::std::string_view const& AUTONOMOUS_ACTOR_KEY();
87
88 MCAPI static ::std::string_view const& AUTONOMOUS_ACTOR_LIST_KEY();
89 // NOLINTEND
90
91public:
92 // constructor thunks
93 // NOLINTBEGIN
94 MCAPI void* $ctor(
95 ::gsl::not_null<::StackRefResult<::EntityRegistry>> const& entityRegistry,
96 ::Bedrock::NotNullNonOwnerPtr<::ActorManager> actorManager
97 );
98 // NOLINTEND
99
100public:
101 // destructor thunk
102 // NOLINTBEGIN
103 MCAPI void $dtor();
104 // NOLINTEND
105};
Definition ActorFactory.h:34
Definition ActorManager.h:32
Definition Actor.h:105
Definition EntityContext.h:16
Definition EntityRegistry.h:11
Definition IAddActorEntityProxy.h:10
Definition ILevelChunkEventManagerConnector.h:14
Definition ILevelStorageManagerConnector.h:13
Definition LevelChunk.h:79
Definition LevelStorage.h:25
Definition ListTag.h:20
Definition OwnerPtr.h:7
Definition StackRefResult.h:7
Definition WeakEntityRef.h:14