-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ecs-gestalt): Migrate Components to gestalt's Components. (#55)
Ref: MovingBlocks/Terasology#4753 Co-authored-by: Michael Pollind <mpollind@gmail.com> Co-authored-by: Tobias Nett <skaldarnar@googlemail.com>
- Loading branch information
1 parent
1b046fc
commit 2c8abd9
Showing
29 changed files
with
254 additions
and
486 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 8 additions & 17 deletions
25
src/main/java/org/terasology/entityNetwork/components/EntityNetworkComponent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,12 @@ | ||
/* | ||
* Copyright 2015 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.entityNetwork.components; | ||
|
||
import org.terasology.engine.entitySystem.Component; | ||
import org.terasology.gestalt.entitysystem.component.Component; | ||
|
||
public class EntityNetworkComponent implements Component { | ||
public class EntityNetworkComponent implements Component<EntityNetworkComponent> { | ||
@Override | ||
public void copyFrom(EntityNetworkComponent other) { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 9 additions & 17 deletions
26
src/main/java/org/terasology/fluidTransport/components/FluidDisplayComponent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,17 @@ | ||
/* | ||
* Copyright 2014 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.fluidTransport.components; | ||
|
||
import org.terasology.engine.entitySystem.Component; | ||
import org.terasology.engine.entitySystem.Owns; | ||
import org.terasology.engine.entitySystem.entity.EntityRef; | ||
import org.terasology.gestalt.entitysystem.component.Component; | ||
|
||
public class FluidDisplayComponent implements Component { | ||
public class FluidDisplayComponent implements Component<FluidDisplayComponent> { | ||
@Owns | ||
public EntityRef renderedEntity; | ||
|
||
@Override | ||
public void copyFrom(FluidDisplayComponent other) { | ||
|
||
} | ||
} |
29 changes: 12 additions & 17 deletions
29
src/main/java/org/terasology/fluidTransport/components/FluidInletOutletComponent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,28 @@ | ||
/* | ||
* Copyright 2014 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.fluidTransport.components; | ||
|
||
import org.terasology.engine.entitySystem.Component; | ||
import org.terasology.engine.world.block.ForceBlockActive; | ||
import org.terasology.gestalt.entitysystem.component.Component; | ||
|
||
/** | ||
* Marks a block that also has a FluidInventoryComponent as able to exchange fluid with adjacent liquid blocks. | ||
*/ | ||
@ForceBlockActive | ||
public class FluidInletOutletComponent implements Component { | ||
public class FluidInletOutletComponent implements Component<FluidInletOutletComponent> { | ||
/** The maximum amount of liquid that can flow into the container, in litres (thousandths of a block) per second. */ | ||
public float inletRate; | ||
/** The maximum amount of liquid that can flow from the container, in litres (thousandths of a block) per second. */ | ||
public float outletRate; | ||
|
||
public float inletVolume; | ||
public float outletVolume; | ||
|
||
@Override | ||
public void copyFrom(FluidInletOutletComponent other) { | ||
this.inletRate = other.inletRate; | ||
this.outletRate = other.outletRate; | ||
this.inletVolume = other.inletVolume; | ||
this.outletVolume = other.outletVolume; | ||
} | ||
} |
26 changes: 9 additions & 17 deletions
26
src/main/java/org/terasology/fluidTransport/components/FluidPipeComponent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,14 @@ | ||
/* | ||
* Copyright 2014 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.fluidTransport.components; | ||
|
||
import org.terasology.engine.entitySystem.Component; | ||
import org.terasology.gestalt.entitysystem.component.Component; | ||
|
||
public class FluidPipeComponent implements Component { | ||
public class FluidPipeComponent implements Component<FluidPipeComponent> { | ||
public float maximumFlowRate; | ||
|
||
@Override | ||
public void copyFrom(FluidPipeComponent other) { | ||
this.maximumFlowRate = other.maximumFlowRate; | ||
} | ||
} |
27 changes: 10 additions & 17 deletions
27
src/main/java/org/terasology/fluidTransport/components/FluidPumpComponent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,20 @@ | ||
/* | ||
* Copyright 2014 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.fluidTransport.components; | ||
|
||
import org.terasology.engine.entitySystem.Component; | ||
import org.terasology.engine.network.Replicate; | ||
import org.terasology.engine.world.block.ForceBlockActive; | ||
import org.terasology.gestalt.entitysystem.component.Component; | ||
|
||
@ForceBlockActive | ||
public class FluidPumpComponent implements Component { | ||
public class FluidPumpComponent implements Component<FluidPumpComponent> { | ||
@Replicate | ||
public float pressure; | ||
public float maximumFlowRate; | ||
|
||
@Override | ||
public void copyFrom(FluidPumpComponent other) { | ||
this.pressure = other.pressure; | ||
this.maximumFlowRate = other.maximumFlowRate; | ||
} | ||
} |
25 changes: 8 additions & 17 deletions
25
src/main/java/org/terasology/fluidTransport/components/FluidTankDisplayComponent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,12 @@ | ||
/* | ||
* Copyright 2014 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.fluidTransport.components; | ||
|
||
import org.terasology.engine.entitySystem.Component; | ||
import org.terasology.gestalt.entitysystem.component.Component; | ||
|
||
public class FluidTankDisplayComponent implements Component { | ||
public class FluidTankDisplayComponent implements Component<FluidTankDisplayComponent> { | ||
@Override | ||
public void copyFrom(FluidTankDisplayComponent other) { | ||
|
||
} | ||
} |
25 changes: 8 additions & 17 deletions
25
src/main/java/org/terasology/fluidTransport/components/FluidTankDropsFluidComponent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,12 @@ | ||
/* | ||
* Copyright 2015 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.fluidTransport.components; | ||
|
||
import org.terasology.engine.entitySystem.Component; | ||
import org.terasology.gestalt.entitysystem.component.Component; | ||
|
||
public class FluidTankDropsFluidComponent implements Component { | ||
public class FluidTankDropsFluidComponent implements Component<FluidTankDropsFluidComponent> { | ||
@Override | ||
public void copyFrom(FluidTankDropsFluidComponent other) { | ||
|
||
} | ||
} |
21 changes: 4 additions & 17 deletions
21
...in/java/org/terasology/fluidTransport/components/FluidTransportBlockNetworkComponent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 8 additions & 17 deletions
25
...n/java/org/terasology/fluidTransport/processParts/MechanicalPowerToPressureComponent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,12 @@ | ||
/* | ||
* Copyright 2014 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.fluidTransport.processParts; | ||
|
||
import org.terasology.engine.entitySystem.Component; | ||
import org.terasology.gestalt.entitysystem.component.Component; | ||
|
||
public class MechanicalPowerToPressureComponent implements Component { | ||
public class MechanicalPowerToPressureComponent implements Component<MechanicalPowerToPressureComponent> { | ||
@Override | ||
public void copyFrom(MechanicalPowerToPressureComponent other) { | ||
|
||
} | ||
} |
Oops, something went wrong.