From 84f5cf517cb18e4f302d0a69363418a8b152fc3b Mon Sep 17 00:00:00 2001 From: Nail Khanipov Date: Wed, 25 Aug 2021 17:36:03 +0300 Subject: [PATCH] fix(ecs-gestalt): Migrate Components to gestalt's Components. (#26) Ref: MovingBlocks/Terasology#4753 Co-authored-by: Michael Pollind Co-authored-by: Tobias Nett --- .../MineSweeper/component/CountComponent.java | 25 ++++++------------ .../component/FloatingCountComponent.java | 26 +++++++------------ .../MineSweeper/component/MineComponent.java | 25 ++++++------------ 3 files changed, 25 insertions(+), 51 deletions(-) diff --git a/src/main/java/org/terasology/MineSweeper/component/CountComponent.java b/src/main/java/org/terasology/MineSweeper/component/CountComponent.java index 42fd5fa..bb459cb 100644 --- a/src/main/java/org/terasology/MineSweeper/component/CountComponent.java +++ b/src/main/java/org/terasology/MineSweeper/component/CountComponent.java @@ -1,24 +1,15 @@ -/* - * 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.MineSweeper.component; -import org.terasology.engine.entitySystem.Component; +import org.terasology.gestalt.entitysystem.component.Component; /** * Created by michaelpollind on 8/27/16. */ -public class CountComponent implements Component { +public class CountComponent implements Component { + @Override + public void copyFrom(CountComponent other) { + + } } diff --git a/src/main/java/org/terasology/MineSweeper/component/FloatingCountComponent.java b/src/main/java/org/terasology/MineSweeper/component/FloatingCountComponent.java index c0eedb5..10ae802 100644 --- a/src/main/java/org/terasology/MineSweeper/component/FloatingCountComponent.java +++ b/src/main/java/org/terasology/MineSweeper/component/FloatingCountComponent.java @@ -1,25 +1,17 @@ -/* - * 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.MineSweeper.component; -import org.terasology.engine.entitySystem.Component; +import org.terasology.gestalt.entitysystem.component.Component; /** * Created by michaelpollind on 9/4/16. */ -public class FloatingCountComponent implements Component { +public class FloatingCountComponent implements Component { public int neighbors = 0; + + @Override + public void copyFrom(FloatingCountComponent other) { + this.neighbors = other.neighbors; + } } diff --git a/src/main/java/org/terasology/MineSweeper/component/MineComponent.java b/src/main/java/org/terasology/MineSweeper/component/MineComponent.java index e0d7f32..50b1c8d 100644 --- a/src/main/java/org/terasology/MineSweeper/component/MineComponent.java +++ b/src/main/java/org/terasology/MineSweeper/component/MineComponent.java @@ -1,24 +1,15 @@ -/* - * 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.MineSweeper.component; -import org.terasology.engine.entitySystem.Component; +import org.terasology.gestalt.entitysystem.component.Component; /** * Created by michaelpollind on 8/27/16. */ -public class MineComponent implements Component { +public class MineComponent implements Component { + @Override + public void copyFrom(MineComponent other) { + + } }