From bcf5a1cec2cfec4372fa884e2a4d5a6aa60782c8 Mon Sep 17 00:00:00 2001 From: DarkWeird Date: Fri, 9 Jul 2021 16:53:17 +0300 Subject: [PATCH 1/3] fix(ecs-gestalt): Migrate Components to gestalt's Components. --- .../gooeysQuests/GooeyComponent.java | 21 ++++--------------- ...SpawnPrefabOnPlayerCollisionComponent.java | 21 ++++--------------- .../api/GooeysQuestComponent.java | 21 ++++--------------- .../api/PersonalQuestsComponent.java | 21 ++++--------------- .../SpawnMagicBuildParticlesComponent.java | 21 ++++--------------- .../StructureConnectionPointsComponent.java | 21 ++++--------------- .../quests/dungeon/DungeonQuestComponent.java | 21 ++++--------------- .../dwarfhalls/DwarfHallsQuestComponent.java | 21 ++++--------------- .../FortressVillageQuestComponent.java | 21 ++++--------------- .../quests/mines/MinesQuestComponent.java | 21 ++++--------------- 10 files changed, 40 insertions(+), 170 deletions(-) diff --git a/src/main/java/org/terasology/gooeysQuests/GooeyComponent.java b/src/main/java/org/terasology/gooeysQuests/GooeyComponent.java index 2455f71e9..ab8c3cc00 100644 --- a/src/main/java/org/terasology/gooeysQuests/GooeyComponent.java +++ b/src/main/java/org/terasology/gooeysQuests/GooeyComponent.java @@ -1,29 +1,16 @@ -/* - * Copyright 2016 MovingBlocks - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2021 The Terasology Foundation +// SPDX-License-Identifier: Apache-2.0 package org.terasology.gooeysQuests; -import org.terasology.engine.entitySystem.Component; import org.terasology.engine.entitySystem.entity.EntityRef; import org.terasology.engine.network.FieldReplicateType; import org.terasology.engine.network.Replicate; +import org.terasology.gestalt.entitysystem.component.Component; /** * Used to find the character "Gooey". */ -public class GooeyComponent implements Component { +public class GooeyComponent implements Component { @Replicate(FieldReplicateType.SERVER_TO_CLIENT) public EntityRef offeredQuest = EntityRef.NULL; } diff --git a/src/main/java/org/terasology/gooeysQuests/SpawnPrefabOnPlayerCollisionComponent.java b/src/main/java/org/terasology/gooeysQuests/SpawnPrefabOnPlayerCollisionComponent.java index ee9bca054..7215ab448 100644 --- a/src/main/java/org/terasology/gooeysQuests/SpawnPrefabOnPlayerCollisionComponent.java +++ b/src/main/java/org/terasology/gooeysQuests/SpawnPrefabOnPlayerCollisionComponent.java @@ -1,27 +1,14 @@ -/* - * Copyright 2016 MovingBlocks - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2021 The Terasology Foundation +// SPDX-License-Identifier: Apache-2.0 package org.terasology.gooeysQuests; -import org.terasology.engine.entitySystem.Component; import org.terasology.engine.entitySystem.prefab.Prefab; +import org.terasology.gestalt.entitysystem.component.Component; /** * Destroys this entity when a player collides with the current entity and spawns the specified prefab. */ -public class SpawnPrefabOnPlayerCollisionComponent implements Component { +public class SpawnPrefabOnPlayerCollisionComponent implements Component { public Prefab prefab; diff --git a/src/main/java/org/terasology/gooeysQuests/api/GooeysQuestComponent.java b/src/main/java/org/terasology/gooeysQuests/api/GooeysQuestComponent.java index ad0691063..2c73f9611 100644 --- a/src/main/java/org/terasology/gooeysQuests/api/GooeysQuestComponent.java +++ b/src/main/java/org/terasology/gooeysQuests/api/GooeysQuestComponent.java @@ -1,21 +1,8 @@ -/* - * Copyright 2016 MovingBlocks - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2021 The Terasology Foundation +// SPDX-License-Identifier: Apache-2.0 package org.terasology.gooeysQuests.api; -import org.terasology.engine.entitySystem.Component; +import org.terasology.gestalt.entitysystem.component.Component; /** * Marks an entity to be a quest offered by gooey. @@ -29,7 +16,7 @@ * preperation, it sends a {@link QuestReadyEvent} to the quest entitiy. * */ -public class GooeysQuestComponent implements Component { +public class GooeysQuestComponent implements Component { public String greetingText = "Hi"; public String startButtonText = "Start Quest"; public String description="Up for a quest?\n\n" diff --git a/src/main/java/org/terasology/gooeysQuests/api/PersonalQuestsComponent.java b/src/main/java/org/terasology/gooeysQuests/api/PersonalQuestsComponent.java index 51682ebcf..8599efe2b 100644 --- a/src/main/java/org/terasology/gooeysQuests/api/PersonalQuestsComponent.java +++ b/src/main/java/org/terasology/gooeysQuests/api/PersonalQuestsComponent.java @@ -1,23 +1,10 @@ -/* - * Copyright 2016 MovingBlocks - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2021 The Terasology Foundation +// SPDX-License-Identifier: Apache-2.0 package org.terasology.gooeysQuests.api; import com.google.common.collect.Lists; -import org.terasology.engine.entitySystem.Component; import org.terasology.engine.entitySystem.entity.EntityRef; +import org.terasology.gestalt.entitysystem.component.Component; import java.util.List; @@ -29,7 +16,7 @@ * to the component. The {@link CreateStartQuestsEvent} event can be consumed to prevent the creation of the default * quests. */ -public class PersonalQuestsComponent implements Component { +public class PersonalQuestsComponent implements Component { /** * Quests that are currently being prepared. Once the preperation is done, gooey will offer the quest to the player. diff --git a/src/main/java/org/terasology/gooeysQuests/api/SpawnMagicBuildParticlesComponent.java b/src/main/java/org/terasology/gooeysQuests/api/SpawnMagicBuildParticlesComponent.java index d6f50f1f6..b819e394a 100644 --- a/src/main/java/org/terasology/gooeysQuests/api/SpawnMagicBuildParticlesComponent.java +++ b/src/main/java/org/terasology/gooeysQuests/api/SpawnMagicBuildParticlesComponent.java @@ -1,22 +1,9 @@ -/* - * Copyright 2016 MovingBlocks - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2021 The Terasology Foundation +// SPDX-License-Identifier: Apache-2.0 package org.terasology.gooeysQuests.api; -import org.terasology.engine.entitySystem.Component; import org.terasology.engine.world.block.BlockRegion; +import org.terasology.gestalt.entitysystem.component.Component; import org.terasology.structureTemplates.events.SpawnStructureEvent; import org.terasology.structureTemplates.events.StructureBlocksSpawnedEvent; @@ -24,6 +11,6 @@ * If a entity with this component gets a {@link SpawnStructureEvent} (that triggers a * {@link StructureBlocksSpawnedEvent}) then particles will be spawned in the given region. */ -public class SpawnMagicBuildParticlesComponent implements Component { +public class SpawnMagicBuildParticlesComponent implements Component { public BlockRegion region; } diff --git a/src/main/java/org/terasology/gooeysQuests/api/StructureConnectionPointsComponent.java b/src/main/java/org/terasology/gooeysQuests/api/StructureConnectionPointsComponent.java index a923e492c..2ed2fb573 100644 --- a/src/main/java/org/terasology/gooeysQuests/api/StructureConnectionPointsComponent.java +++ b/src/main/java/org/terasology/gooeysQuests/api/StructureConnectionPointsComponent.java @@ -1,23 +1,10 @@ -/* - * Copyright 2016 MovingBlocks - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2021 The Terasology Foundation +// SPDX-License-Identifier: Apache-2.0 package org.terasology.gooeysQuests.api; import org.joml.Vector3i; -import org.terasology.engine.entitySystem.Component; import org.terasology.engine.math.Side; +import org.terasology.gestalt.entitysystem.component.Component; import org.terasology.reflection.MappedContainer; import java.util.ArrayList; @@ -26,7 +13,7 @@ /** * Describes how the current structure entity can be connected to other structure entities. */ -public class StructureConnectionPointsComponent implements Component { +public class StructureConnectionPointsComponent implements Component { public List points = new ArrayList<>(); @MappedContainer diff --git a/src/main/java/org/terasology/gooeysQuests/quests/dungeon/DungeonQuestComponent.java b/src/main/java/org/terasology/gooeysQuests/quests/dungeon/DungeonQuestComponent.java index 42d57b336..590e1ce04 100644 --- a/src/main/java/org/terasology/gooeysQuests/quests/dungeon/DungeonQuestComponent.java +++ b/src/main/java/org/terasology/gooeysQuests/quests/dungeon/DungeonQuestComponent.java @@ -1,25 +1,12 @@ -/* - * Copyright 2016 MovingBlocks - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2021 The Terasology Foundation +// SPDX-License-Identifier: Apache-2.0 package org.terasology.gooeysQuests.quests.dungeon; -import org.terasology.engine.entitySystem.Component; +import org.terasology.gestalt.entitysystem.component.Component; /** * Owned by the entity that represents a dungeon quest. */ -public class DungeonQuestComponent implements Component { +public class DungeonQuestComponent implements Component { } diff --git a/src/main/java/org/terasology/gooeysQuests/quests/dwarfhalls/DwarfHallsQuestComponent.java b/src/main/java/org/terasology/gooeysQuests/quests/dwarfhalls/DwarfHallsQuestComponent.java index faff15249..c0c17de8b 100644 --- a/src/main/java/org/terasology/gooeysQuests/quests/dwarfhalls/DwarfHallsQuestComponent.java +++ b/src/main/java/org/terasology/gooeysQuests/quests/dwarfhalls/DwarfHallsQuestComponent.java @@ -1,25 +1,12 @@ -/* - * Copyright 2016 MovingBlocks - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2021 The Terasology Foundation +// SPDX-License-Identifier: Apache-2.0 package org.terasology.gooeysQuests.quests.dwarfhalls; -import org.terasology.engine.entitySystem.Component; +import org.terasology.gestalt.entitysystem.component.Component; /** * Owned by the entity that represents a dwarf halls quest. */ -public class DwarfHallsQuestComponent implements Component { +public class DwarfHallsQuestComponent implements Component { } diff --git a/src/main/java/org/terasology/gooeysQuests/quests/fortressvillage/FortressVillageQuestComponent.java b/src/main/java/org/terasology/gooeysQuests/quests/fortressvillage/FortressVillageQuestComponent.java index f741688bc..503aedcbf 100644 --- a/src/main/java/org/terasology/gooeysQuests/quests/fortressvillage/FortressVillageQuestComponent.java +++ b/src/main/java/org/terasology/gooeysQuests/quests/fortressvillage/FortressVillageQuestComponent.java @@ -1,25 +1,12 @@ -/* - * Copyright 2016 MovingBlocks - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2021 The Terasology Foundation +// SPDX-License-Identifier: Apache-2.0 package org.terasology.gooeysQuests.quests.fortressvillage; -import org.terasology.engine.entitySystem.Component; +import org.terasology.gestalt.entitysystem.component.Component; /** * Owned by the entity that represents a fortressvillage quest. */ -public class FortressVillageQuestComponent implements Component { +public class FortressVillageQuestComponent implements Component { } diff --git a/src/main/java/org/terasology/gooeysQuests/quests/mines/MinesQuestComponent.java b/src/main/java/org/terasology/gooeysQuests/quests/mines/MinesQuestComponent.java index 6c43ed788..87f2b9b7f 100644 --- a/src/main/java/org/terasology/gooeysQuests/quests/mines/MinesQuestComponent.java +++ b/src/main/java/org/terasology/gooeysQuests/quests/mines/MinesQuestComponent.java @@ -1,25 +1,12 @@ -/* - * Copyright 2018 MovingBlocks - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2021 The Terasology Foundation +// SPDX-License-Identifier: Apache-2.0 package org.terasology.gooeysQuests.quests.mines; -import org.terasology.engine.entitySystem.Component; +import org.terasology.gestalt.entitysystem.component.Component; /** * Owned by the entity that represents a mines quest. */ -public class MinesQuestComponent implements Component { +public class MinesQuestComponent implements Component { } From 4baad9330888d151da1abd726ec9c1a18ad6b39e Mon Sep 17 00:00:00 2001 From: Michael Pollind Date: Sun, 11 Jul 2021 19:21:32 -0700 Subject: [PATCH 2/3] chore: update components --- .../java/org/terasology/gooeysQuests/GooeyComponent.java | 5 +++++ .../SpawnPrefabOnPlayerCollisionComponent.java | 4 ++++ .../terasology/gooeysQuests/api/GooeysQuestComponent.java | 7 +++++++ .../gooeysQuests/api/PersonalQuestsComponent.java | 5 +++++ .../api/SpawnMagicBuildParticlesComponent.java | 7 ++++++- .../api/StructureConnectionPointsComponent.java | 6 ++++++ .../gooeysQuests/quests/dungeon/DungeonQuestComponent.java | 4 ++++ .../quests/dwarfhalls/DwarfHallsQuestComponent.java | 4 ++++ .../fortressvillage/FortressVillageQuestComponent.java | 4 ++++ .../gooeysQuests/quests/mines/MinesQuestComponent.java | 4 ++++ 10 files changed, 49 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/terasology/gooeysQuests/GooeyComponent.java b/src/main/java/org/terasology/gooeysQuests/GooeyComponent.java index ab8c3cc00..be9bf02b4 100644 --- a/src/main/java/org/terasology/gooeysQuests/GooeyComponent.java +++ b/src/main/java/org/terasology/gooeysQuests/GooeyComponent.java @@ -13,4 +13,9 @@ public class GooeyComponent implements Component { @Replicate(FieldReplicateType.SERVER_TO_CLIENT) public EntityRef offeredQuest = EntityRef.NULL; + + @Override + public void copy(GooeyComponent other) { + this.offeredQuest = other.offeredQuest; + } } diff --git a/src/main/java/org/terasology/gooeysQuests/SpawnPrefabOnPlayerCollisionComponent.java b/src/main/java/org/terasology/gooeysQuests/SpawnPrefabOnPlayerCollisionComponent.java index 7215ab448..ca27f9281 100644 --- a/src/main/java/org/terasology/gooeysQuests/SpawnPrefabOnPlayerCollisionComponent.java +++ b/src/main/java/org/terasology/gooeysQuests/SpawnPrefabOnPlayerCollisionComponent.java @@ -12,4 +12,8 @@ public class SpawnPrefabOnPlayerCollisionComponent implements Component { public String description="Up for a quest?\n\n" + "Sadly I have no further description for you.\n\n" + "However be warned: Starting a quest can result in possibly unwanted world modifications!"; + + @Override + public void copy(GooeysQuestComponent other) { + this.greetingText = other.greetingText; + this.startButtonText = other.startButtonText; + this.description = other.description; + } } diff --git a/src/main/java/org/terasology/gooeysQuests/api/PersonalQuestsComponent.java b/src/main/java/org/terasology/gooeysQuests/api/PersonalQuestsComponent.java index 8599efe2b..edd2319a1 100644 --- a/src/main/java/org/terasology/gooeysQuests/api/PersonalQuestsComponent.java +++ b/src/main/java/org/terasology/gooeysQuests/api/PersonalQuestsComponent.java @@ -23,6 +23,11 @@ public class PersonalQuestsComponent implements Component questsInPreperation = Lists.newArrayList(); + @Override + public void copy(PersonalQuestsComponent other) { + this.questsInPreperation = Lists.newArrayList(other.questsInPreperation); + } + // public EntityRef activeQuest = EntityRef.NULL; // TODO allow the player to reject certain categories of quests diff --git a/src/main/java/org/terasology/gooeysQuests/api/SpawnMagicBuildParticlesComponent.java b/src/main/java/org/terasology/gooeysQuests/api/SpawnMagicBuildParticlesComponent.java index b819e394a..4b19ad241 100644 --- a/src/main/java/org/terasology/gooeysQuests/api/SpawnMagicBuildParticlesComponent.java +++ b/src/main/java/org/terasology/gooeysQuests/api/SpawnMagicBuildParticlesComponent.java @@ -12,5 +12,10 @@ * {@link StructureBlocksSpawnedEvent}) then particles will be spawned in the given region. */ public class SpawnMagicBuildParticlesComponent implements Component { - public BlockRegion region; + public BlockRegion region = new BlockRegion(BlockRegion.INVALID); + + @Override + public void copy(SpawnMagicBuildParticlesComponent other) { + this.region.set(other.region); + } } diff --git a/src/main/java/org/terasology/gooeysQuests/api/StructureConnectionPointsComponent.java b/src/main/java/org/terasology/gooeysQuests/api/StructureConnectionPointsComponent.java index 2ed2fb573..9869087a0 100644 --- a/src/main/java/org/terasology/gooeysQuests/api/StructureConnectionPointsComponent.java +++ b/src/main/java/org/terasology/gooeysQuests/api/StructureConnectionPointsComponent.java @@ -2,6 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.gooeysQuests.api; +import com.google.common.collect.Lists; import org.joml.Vector3i; import org.terasology.engine.math.Side; import org.terasology.gestalt.entitysystem.component.Component; @@ -16,6 +17,11 @@ public class StructureConnectionPointsComponent implements Component { public List points = new ArrayList<>(); + @Override + public void copy(StructureConnectionPointsComponent other) { + this.points = Lists.newArrayList(other.points); + } + @MappedContainer public static class ConnectionPoint { public Vector3i position; diff --git a/src/main/java/org/terasology/gooeysQuests/quests/dungeon/DungeonQuestComponent.java b/src/main/java/org/terasology/gooeysQuests/quests/dungeon/DungeonQuestComponent.java index 590e1ce04..d09cf4930 100644 --- a/src/main/java/org/terasology/gooeysQuests/quests/dungeon/DungeonQuestComponent.java +++ b/src/main/java/org/terasology/gooeysQuests/quests/dungeon/DungeonQuestComponent.java @@ -9,4 +9,8 @@ */ public class DungeonQuestComponent implements Component { + @Override + public void copy(DungeonQuestComponent other) { + + } } diff --git a/src/main/java/org/terasology/gooeysQuests/quests/dwarfhalls/DwarfHallsQuestComponent.java b/src/main/java/org/terasology/gooeysQuests/quests/dwarfhalls/DwarfHallsQuestComponent.java index c0c17de8b..c2b15cc16 100644 --- a/src/main/java/org/terasology/gooeysQuests/quests/dwarfhalls/DwarfHallsQuestComponent.java +++ b/src/main/java/org/terasology/gooeysQuests/quests/dwarfhalls/DwarfHallsQuestComponent.java @@ -9,4 +9,8 @@ */ public class DwarfHallsQuestComponent implements Component { + @Override + public void copy(DwarfHallsQuestComponent other) { + + } } diff --git a/src/main/java/org/terasology/gooeysQuests/quests/fortressvillage/FortressVillageQuestComponent.java b/src/main/java/org/terasology/gooeysQuests/quests/fortressvillage/FortressVillageQuestComponent.java index 503aedcbf..ce162d6aa 100644 --- a/src/main/java/org/terasology/gooeysQuests/quests/fortressvillage/FortressVillageQuestComponent.java +++ b/src/main/java/org/terasology/gooeysQuests/quests/fortressvillage/FortressVillageQuestComponent.java @@ -9,4 +9,8 @@ */ public class FortressVillageQuestComponent implements Component { + @Override + public void copy(FortressVillageQuestComponent other) { + + } } diff --git a/src/main/java/org/terasology/gooeysQuests/quests/mines/MinesQuestComponent.java b/src/main/java/org/terasology/gooeysQuests/quests/mines/MinesQuestComponent.java index 87f2b9b7f..5e76c508b 100644 --- a/src/main/java/org/terasology/gooeysQuests/quests/mines/MinesQuestComponent.java +++ b/src/main/java/org/terasology/gooeysQuests/quests/mines/MinesQuestComponent.java @@ -9,4 +9,8 @@ * Owned by the entity that represents a mines quest. */ public class MinesQuestComponent implements Component { + @Override + public void copy(MinesQuestComponent other) { + + } } From 06deb95d7856aeb8b4528955f2fc2993d4a4eb2f Mon Sep 17 00:00:00 2001 From: Tobias Nett Date: Sat, 14 Aug 2021 12:18:59 +0200 Subject: [PATCH 3/3] chore: rename copy >>> copyFrom (as per MovingBlocks/gestalt#123) --- src/main/java/org/terasology/gooeysQuests/GooeyComponent.java | 2 +- .../gooeysQuests/SpawnPrefabOnPlayerCollisionComponent.java | 2 +- .../org/terasology/gooeysQuests/api/GooeysQuestComponent.java | 2 +- .../terasology/gooeysQuests/api/PersonalQuestsComponent.java | 2 +- .../gooeysQuests/api/SpawnMagicBuildParticlesComponent.java | 2 +- .../gooeysQuests/api/StructureConnectionPointsComponent.java | 2 +- .../gooeysQuests/quests/dungeon/DungeonQuestComponent.java | 2 +- .../quests/dwarfhalls/DwarfHallsQuestComponent.java | 2 +- .../quests/fortressvillage/FortressVillageQuestComponent.java | 2 +- .../gooeysQuests/quests/mines/MinesQuestComponent.java | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/terasology/gooeysQuests/GooeyComponent.java b/src/main/java/org/terasology/gooeysQuests/GooeyComponent.java index be9bf02b4..25a77b75b 100644 --- a/src/main/java/org/terasology/gooeysQuests/GooeyComponent.java +++ b/src/main/java/org/terasology/gooeysQuests/GooeyComponent.java @@ -15,7 +15,7 @@ public class GooeyComponent implements Component { public EntityRef offeredQuest = EntityRef.NULL; @Override - public void copy(GooeyComponent other) { + public void copyFrom(GooeyComponent other) { this.offeredQuest = other.offeredQuest; } } diff --git a/src/main/java/org/terasology/gooeysQuests/SpawnPrefabOnPlayerCollisionComponent.java b/src/main/java/org/terasology/gooeysQuests/SpawnPrefabOnPlayerCollisionComponent.java index ca27f9281..172ef8bd1 100644 --- a/src/main/java/org/terasology/gooeysQuests/SpawnPrefabOnPlayerCollisionComponent.java +++ b/src/main/java/org/terasology/gooeysQuests/SpawnPrefabOnPlayerCollisionComponent.java @@ -13,7 +13,7 @@ public class SpawnPrefabOnPlayerCollisionComponent implements Component { + "However be warned: Starting a quest can result in possibly unwanted world modifications!"; @Override - public void copy(GooeysQuestComponent other) { + public void copyFrom(GooeysQuestComponent other) { this.greetingText = other.greetingText; this.startButtonText = other.startButtonText; this.description = other.description; diff --git a/src/main/java/org/terasology/gooeysQuests/api/PersonalQuestsComponent.java b/src/main/java/org/terasology/gooeysQuests/api/PersonalQuestsComponent.java index edd2319a1..f3855bc58 100644 --- a/src/main/java/org/terasology/gooeysQuests/api/PersonalQuestsComponent.java +++ b/src/main/java/org/terasology/gooeysQuests/api/PersonalQuestsComponent.java @@ -24,7 +24,7 @@ public class PersonalQuestsComponent implements Component questsInPreperation = Lists.newArrayList(); @Override - public void copy(PersonalQuestsComponent other) { + public void copyFrom(PersonalQuestsComponent other) { this.questsInPreperation = Lists.newArrayList(other.questsInPreperation); } diff --git a/src/main/java/org/terasology/gooeysQuests/api/SpawnMagicBuildParticlesComponent.java b/src/main/java/org/terasology/gooeysQuests/api/SpawnMagicBuildParticlesComponent.java index 4b19ad241..9dfc75740 100644 --- a/src/main/java/org/terasology/gooeysQuests/api/SpawnMagicBuildParticlesComponent.java +++ b/src/main/java/org/terasology/gooeysQuests/api/SpawnMagicBuildParticlesComponent.java @@ -15,7 +15,7 @@ public class SpawnMagicBuildParticlesComponent implements Component points = new ArrayList<>(); @Override - public void copy(StructureConnectionPointsComponent other) { + public void copyFrom(StructureConnectionPointsComponent other) { this.points = Lists.newArrayList(other.points); } diff --git a/src/main/java/org/terasology/gooeysQuests/quests/dungeon/DungeonQuestComponent.java b/src/main/java/org/terasology/gooeysQuests/quests/dungeon/DungeonQuestComponent.java index d09cf4930..d9d8c7c2c 100644 --- a/src/main/java/org/terasology/gooeysQuests/quests/dungeon/DungeonQuestComponent.java +++ b/src/main/java/org/terasology/gooeysQuests/quests/dungeon/DungeonQuestComponent.java @@ -10,7 +10,7 @@ public class DungeonQuestComponent implements Component { @Override - public void copy(DungeonQuestComponent other) { + public void copyFrom(DungeonQuestComponent other) { } } diff --git a/src/main/java/org/terasology/gooeysQuests/quests/dwarfhalls/DwarfHallsQuestComponent.java b/src/main/java/org/terasology/gooeysQuests/quests/dwarfhalls/DwarfHallsQuestComponent.java index c2b15cc16..85b3a59bb 100644 --- a/src/main/java/org/terasology/gooeysQuests/quests/dwarfhalls/DwarfHallsQuestComponent.java +++ b/src/main/java/org/terasology/gooeysQuests/quests/dwarfhalls/DwarfHallsQuestComponent.java @@ -10,7 +10,7 @@ public class DwarfHallsQuestComponent implements Component { @Override - public void copy(DwarfHallsQuestComponent other) { + public void copyFrom(DwarfHallsQuestComponent other) { } } diff --git a/src/main/java/org/terasology/gooeysQuests/quests/fortressvillage/FortressVillageQuestComponent.java b/src/main/java/org/terasology/gooeysQuests/quests/fortressvillage/FortressVillageQuestComponent.java index ce162d6aa..8e9c4a121 100644 --- a/src/main/java/org/terasology/gooeysQuests/quests/fortressvillage/FortressVillageQuestComponent.java +++ b/src/main/java/org/terasology/gooeysQuests/quests/fortressvillage/FortressVillageQuestComponent.java @@ -10,7 +10,7 @@ public class FortressVillageQuestComponent implements Component { @Override - public void copy(FortressVillageQuestComponent other) { + public void copyFrom(FortressVillageQuestComponent other) { } } diff --git a/src/main/java/org/terasology/gooeysQuests/quests/mines/MinesQuestComponent.java b/src/main/java/org/terasology/gooeysQuests/quests/mines/MinesQuestComponent.java index 5e76c508b..eaaa3eacd 100644 --- a/src/main/java/org/terasology/gooeysQuests/quests/mines/MinesQuestComponent.java +++ b/src/main/java/org/terasology/gooeysQuests/quests/mines/MinesQuestComponent.java @@ -10,7 +10,7 @@ */ public class MinesQuestComponent implements Component { @Override - public void copy(MinesQuestComponent other) { + public void copyFrom(MinesQuestComponent other) { } }