Skip to content

Commit

Permalink
feat(gestaltv7-eventsystem): Migration Event and @ReceiveEvent to ges…
Browse files Browse the repository at this point in the history
…talt's (#19)

Co-authored-by: jdrueckert <jd.rueckert@googlemail.com>
Co-authored-by: Michael Pollind <mpollind@gmail.com>
  • Loading branch information
3 people committed Dec 5, 2021
1 parent 01ebf60 commit da9ce88
Show file tree
Hide file tree
Showing 43 changed files with 172 additions and 682 deletions.
Expand Up @@ -4,9 +4,6 @@

import org.terasology.gestalt.entitysystem.component.Component;

/**
* @author Marcin Sciesinski <marcins78@gmail.com>
*/
public class OutputTypeComponent implements Component<OutputTypeComponent> {
public String type;

Expand Down
Expand Up @@ -10,9 +10,6 @@

import java.util.Map;

/**
* @author Marcin Sciesinski <marcins78@gmail.com>
*/
@ForceBlockActive
public class WorkstationInventoryComponent implements Component<WorkstationInventoryComponent> {
@Replicate
Expand Down
@@ -1,23 +1,10 @@
/*
* 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.workstation.event;

import org.terasology.engine.entitySystem.entity.EntityRef;
import org.terasology.engine.entitySystem.event.Event;
import org.terasology.engine.network.ServerEvent;
import org.terasology.gestalt.entitysystem.event.Event;

/**
* Send this event to the instigating entity (like the player character)
Expand Down
@@ -1,21 +1,8 @@
/*
* 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.workstation.event;

import org.terasology.engine.entitySystem.event.Event;
import org.terasology.gestalt.entitysystem.event.Event;

public class WorkstationStateChanged implements Event {
}
@@ -1,18 +1,5 @@
/*
* 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.workstation.process;

import java.util.Collection;
Expand Down
@@ -1,22 +1,6 @@
/*
* 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.workstation.process;

/**
* @author Marcin Sciesinski <marcins78@gmail.com>
*/
public class InvalidProcessException extends Exception {
}
@@ -1,18 +1,5 @@
/*
* 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.workstation.process;

public class InvalidProcessPartException extends Exception {
Expand Down
@@ -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.workstation.process;

import org.terasology.engine.entitySystem.entity.EntityRef;
import org.terasology.engine.entitySystem.event.ReceiveEvent;
import org.terasology.engine.entitySystem.systems.BaseComponentSystem;
import org.terasology.gestalt.entitysystem.event.ReceiveEvent;
import org.terasology.workstation.process.inventory.InventoryInputComponent;
import org.terasology.workstation.processPart.ProcessEntityFinishExecutionEvent;
import org.terasology.workstation.processPart.ProcessEntityGetDurationEvent;
Expand All @@ -34,8 +21,6 @@
*/
public class TemplateProcessPartCommonSystem extends BaseComponentSystem {

///// Processing

@ReceiveEvent
public void validateProcess(ProcessEntityIsInvalidEvent event, EntityRef processEntity,
InventoryInputComponent inventoryInputComponent) {
Expand All @@ -61,23 +46,16 @@ public void finishExecution(ProcessEntityFinishExecutionEvent event, EntityRef e
InventoryInputComponent inventoryInputComponent) {
}

///// Inventory

@ReceiveEvent
public void isValidInventoryItem(ProcessEntityIsInvalidForInventoryItemEvent event, EntityRef processEntity,
InventoryInputComponent inventoryInputComponent) {
}

///// Fluid

@ReceiveEvent
public void isValidFluid(ProcessEntityIsInvalidForFluidEvent event, EntityRef processEntity,
InventoryInputComponent inventoryInputComponent) {
}


///// Metadata

@ReceiveEvent
public void getInputDescriptions(ProcessEntityGetInputDescriptionEvent event, EntityRef processEntity,
InventoryInputComponent inventoryInputComponent) {
Expand Down
@@ -1,18 +1,5 @@
/*
* 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.workstation.process;

import org.terasology.engine.entitySystem.entity.EntityRef;
Expand Down
@@ -1,18 +1,5 @@
/*
* 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.workstation.process;

import com.google.common.collect.Lists;
Expand All @@ -24,9 +11,6 @@
import java.util.LinkedList;
import java.util.List;

/**
* @author Marcin Sciesinski <marcins78@gmail.com>
*/
public final class WorkstationInventoryUtils {
private WorkstationInventoryUtils() {
}
Expand Down
@@ -1,18 +1,5 @@
/*
* 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.workstation.process;

import org.terasology.engine.entitySystem.entity.EntityRef;
Expand Down
Expand Up @@ -4,8 +4,5 @@

import org.terasology.gestalt.entitysystem.component.EmptyComponent;

/**
* @author Marcin Sciesinski <marcins78@gmail.com>
*/
public class FillFluidInventoryPart extends EmptyComponent<FillFluidInventoryPart> {
}

0 comments on commit da9ce88

Please sign in to comment.