From 7ed7b9d3612aad978a8278a1985ddb4c377227a8 Mon Sep 17 00:00:00 2001 From: darkweird Date: Wed, 8 Sep 2021 15:56:54 +0300 Subject: [PATCH 1/3] feature(gestaltv7-events): extract netFilter from ReceiveEvent --- .../characters/humanoid/CharacterAppearanceClientSystem.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/terasology/characters/humanoid/CharacterAppearanceClientSystem.java b/src/main/java/org/terasology/characters/humanoid/CharacterAppearanceClientSystem.java index 7b71dbc..7fa2fe5 100644 --- a/src/main/java/org/terasology/characters/humanoid/CharacterAppearanceClientSystem.java +++ b/src/main/java/org/terasology/characters/humanoid/CharacterAppearanceClientSystem.java @@ -12,6 +12,7 @@ import org.terasology.engine.entitySystem.event.EventPriority; import org.terasology.engine.entitySystem.event.ReceiveEvent; import org.terasology.engine.entitySystem.systems.BaseComponentSystem; +import org.terasology.engine.entitySystem.systems.NetFilterEvent; import org.terasology.engine.entitySystem.systems.RegisterMode; import org.terasology.engine.entitySystem.systems.RegisterSystem; import org.terasology.engine.entitySystem.systems.UpdateSubscriberSystem; @@ -133,7 +134,8 @@ void showConfigurationScreen() { nuiManager.pushScreen(CONFIG_SCREEN); } - @ReceiveEvent(netFilter = RegisterMode.CLIENT) + @NetFilterEvent(netFilter = RegisterMode.CLIENT) + @ReceiveEvent public void onShowCharacterApperanceConfigurationScreenEvent(AwaitedLocalCharacterSpawnEvent event, EntityRef character, ShowCharacterAppearanceDialogComponent component) { From 68afb90c3e38ca36a260451473dfb717bc2bdf1b Mon Sep 17 00:00:00 2001 From: darkweird Date: Thu, 9 Sep 2021 10:26:10 +0300 Subject: [PATCH 2/3] feature(gestaltv7-events): extract priorities from ReceiveEvent --- .../characters/humanoid/CharacterAppearanceClientSystem.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/terasology/characters/humanoid/CharacterAppearanceClientSystem.java b/src/main/java/org/terasology/characters/humanoid/CharacterAppearanceClientSystem.java index 7fa2fe5..b83238a 100644 --- a/src/main/java/org/terasology/characters/humanoid/CharacterAppearanceClientSystem.java +++ b/src/main/java/org/terasology/characters/humanoid/CharacterAppearanceClientSystem.java @@ -10,6 +10,7 @@ import org.terasology.engine.entitySystem.entity.lifecycleEvents.BeforeDeactivateComponent; import org.terasology.engine.entitySystem.entity.lifecycleEvents.OnChangedComponent; import org.terasology.engine.entitySystem.event.EventPriority; +import org.terasology.engine.entitySystem.event.Priority; import org.terasology.engine.entitySystem.event.ReceiveEvent; import org.terasology.engine.entitySystem.systems.BaseComponentSystem; import org.terasology.engine.entitySystem.systems.NetFilterEvent; @@ -59,7 +60,8 @@ public class CharacterAppearanceClientSystem extends BaseComponentSystem impleme private Map entityToLastLocationMap = new HashMap<>(); - @ReceiveEvent(priority = EventPriority.PRIORITY_NORMAL) + @Priority(EventPriority.PRIORITY_NORMAL) + @ReceiveEvent public void onCreateDefaultVisualCharacter(CreateVisualCharacterEvent event, EntityRef characterEntity, CharacterAppearanceComponent characterAppearanceComponent) { EntityBuilder entityBuilder = event.getVisualCharacterBuilder(); From 8d049a91d4949c09c84c808c65d0c5a303a4aefa Mon Sep 17 00:00:00 2001 From: darkweird Date: Thu, 9 Sep 2021 11:18:54 +0300 Subject: [PATCH 3/3] feature(gestaltv7-events): replace ReceiveEvent with gestaltv7's ReceiveEvent --- .../characters/humanoid/CharacterAppearanceClientSystem.java | 2 +- .../characters/humanoid/CharacterAppearanceServerSystem.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/terasology/characters/humanoid/CharacterAppearanceClientSystem.java b/src/main/java/org/terasology/characters/humanoid/CharacterAppearanceClientSystem.java index b83238a..431c2f2 100644 --- a/src/main/java/org/terasology/characters/humanoid/CharacterAppearanceClientSystem.java +++ b/src/main/java/org/terasology/characters/humanoid/CharacterAppearanceClientSystem.java @@ -11,7 +11,6 @@ import org.terasology.engine.entitySystem.entity.lifecycleEvents.OnChangedComponent; import org.terasology.engine.entitySystem.event.EventPriority; import org.terasology.engine.entitySystem.event.Priority; -import org.terasology.engine.entitySystem.event.ReceiveEvent; import org.terasology.engine.entitySystem.systems.BaseComponentSystem; import org.terasology.engine.entitySystem.systems.NetFilterEvent; import org.terasology.engine.entitySystem.systems.RegisterMode; @@ -31,6 +30,7 @@ import org.terasology.engine.rendering.logic.SkeletalMeshComponent; import org.terasology.engine.rendering.nui.NUIManager; import org.terasology.gestalt.assets.management.AssetManager; +import org.terasology.gestalt.entitysystem.event.ReceiveEvent; import org.terasology.nui.Color; import java.util.HashMap; diff --git a/src/main/java/org/terasology/characters/humanoid/CharacterAppearanceServerSystem.java b/src/main/java/org/terasology/characters/humanoid/CharacterAppearanceServerSystem.java index 0c9cb13..b115cc9 100644 --- a/src/main/java/org/terasology/characters/humanoid/CharacterAppearanceServerSystem.java +++ b/src/main/java/org/terasology/characters/humanoid/CharacterAppearanceServerSystem.java @@ -16,10 +16,10 @@ package org.terasology.characters.humanoid; import org.terasology.engine.entitySystem.entity.EntityRef; -import org.terasology.engine.entitySystem.event.ReceiveEvent; import org.terasology.engine.entitySystem.systems.BaseComponentSystem; import org.terasology.engine.entitySystem.systems.RegisterMode; import org.terasology.engine.entitySystem.systems.RegisterSystem; +import org.terasology.gestalt.entitysystem.event.ReceiveEvent; /** * Makes human character appear