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 Dimension;
18class EntityContext;
19class EntityRegistry;
23class LevelChunk;
24class LevelStorage;
25class WeakEntityRef;
26struct ActorUniqueID;
27// clang-format on
28
29class AutonomousActorManager {
30public:
31 // member variables
32 // NOLINTBEGIN
33 ::ll::TypedStorage<8, 24, ::std::vector<::OwnerPtr<::EntityContext>>> mOwnedInactiveAutonomousActors;
34 ::ll::TypedStorage<8, 24, ::std::vector<::WeakEntityRef>> mActiveAutonomousActors;
35 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::ActorManager> const> mActorManager;
36 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnRemoveActorEntityReferences;
37 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnAutonomousActorRemovedSubscription;
38 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnChunkLoaded;
39 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnChunkDiscarded;
40 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnSaveGameDataSubscription;
41 ::ll::TypedStorage<8, 16, ::WeakRef<::EntityRegistry>> mEntityRegistry;
42 // NOLINTEND
43
44public:
45 // prevent constructor by default
46 AutonomousActorManager();
47
48public:
49 // member functions
50 // NOLINTBEGIN
51 MCAPI AutonomousActorManager(
52 ::gsl::not_null<::StackRefResult<::EntityRegistry>> const& entityRegistry,
53 ::Bedrock::NotNullNonOwnerPtr<::ActorManager> actorManager
54 );
55
56 MCAPI void _onChunkDiscarded(::LevelChunk& levelChunk);
57
58 MCAPI void _onRemoveActorEntityReferences(::Actor& actor);
59
60 MCAPI void _saveAllAutonomousActors(::LevelStorage& levelStorage);
61
62 MCAPI ::Actor*
63 addAutonomousActorEntity(::IAddActorEntityProxy& addActorEntityProxy, ::OwnerPtr<::EntityContext> entity);
64
65 MCAPI ::Actor* addAutonomousActorEntity(::Dimension& dimension, ::OwnerPtr<::EntityContext> entity);
66
67 MCAPI bool hasOwnedInactiveAutonomousActorWithUniqueID(::ActorUniqueID actorUniqueID) const;
68
69 MCAPI void loadAutonomousActorsFromDisk(::LevelStorage& levelStorage, ::ActorFactory& actorFactory);
70
71 MCAPI void registerForLevelChunkEvents(::ILevelChunkEventManagerConnector& levelChunkEventManagerConnector);
72
73 MCAPI void registerLevelStorageManagerListener(::ILevelStorageManagerConnector& levelStorageManagerConnector);
74
75 MCAPI ~AutonomousActorManager();
76 // NOLINTEND
77
78public:
79 // constructor thunks
80 // NOLINTBEGIN
81 MCAPI void* $ctor(
82 ::gsl::not_null<::StackRefResult<::EntityRegistry>> const& entityRegistry,
83 ::Bedrock::NotNullNonOwnerPtr<::ActorManager> actorManager
84 );
85 // NOLINTEND
86
87public:
88 // destructor thunk
89 // NOLINTBEGIN
90 MCAPI void $dtor();
91 // NOLINTEND
92};
Definition ActorFactory.h:33
Definition ActorManager.h:30
Definition Actor.h:114
Definition Dimension.h:86
Definition EntityContext.h:15
Definition EntityRegistry.h:10
Definition IAddActorEntityProxy.h:10
Definition ILevelChunkEventManagerConnector.h:14
Definition ILevelStorageManagerConnector.h:13
Definition LevelChunk.h:75
Definition LevelStorage.h:25
Definition OwnerPtr.h:7
Definition StackRefResult.h:7
Definition WeakEntityRef.h:14
Definition ActorUniqueID.h:5