mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-17 17:25:27 +00:00
refactor(component): the client's component lifecycle
Components get the client's per-component functions: LoadDataFromTemplate, PrepareConfigData, LoadConfigData, LoadFromSaveData, Startup, Run, OnEnterScope, OnLeaveScope, Preshutdown and Shutdown, called by the entity in the client's order. Update is renamed Run, LoadFromXml LoadFromSaveData and UpdateXml WriteSaveData. Nothing sent changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -60,7 +60,7 @@ TEST_F(ItemRemovalTests, ARemovedItemIsUsableUntilTheNextUpdate) {
|
||||
EXPECT_EQ(item->GetId(), id);
|
||||
EXPECT_EQ(item->GetCount(), 0u);
|
||||
|
||||
inventoryComponent->Update(0.0f);
|
||||
inventoryComponent->Run(0.0f);
|
||||
EXPECT_FALSE(items->HasRetiredItems());
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ TEST_F(ItemRemovalTests, RemovingSeveralItemsInALoop) {
|
||||
for (auto* const item : held | std::views::values) EXPECT_EQ(item->GetCount(), 0u);
|
||||
|
||||
EXPECT_TRUE(items->GetItems().empty());
|
||||
inventoryComponent->Update(0.0f);
|
||||
inventoryComponent->Run(0.0f);
|
||||
EXPECT_FALSE(items->HasRetiredItems());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user