Skip to content

Commit

Permalink
feature(ecs-gestalt): Migrate Components to gestalt's Components
Browse files Browse the repository at this point in the history
  • Loading branch information
pollend committed Jul 12, 2021
1 parent 4496bc1 commit ab9a729
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import org.terasology.engine.entitySystem.systems.RegisterMode;
import org.terasology.engine.entitySystem.systems.RegisterSystem;
import org.terasology.engine.logic.common.DisplayNameComponent;
import org.terasology.module.inventory.components.InventoryItem;
import org.terasology.module.inventory.systems.InventoryManager;
import org.terasology.module.inventory.components.StartingInventoryComponent;
import org.terasology.engine.logic.players.event.OnPlayerSpawnedEvent;
Expand Down Expand Up @@ -77,17 +76,17 @@ public void onPlayerSpawn(OnPlayerSpawnedEvent event, EntityRef player) {
});
}

private InventoryItem chest(InventoryItem... content) {
final InventoryItem chest = new InventoryItem();
private StartingInventoryComponent.InventoryItem chest(StartingInventoryComponent.InventoryItem... content) {
final StartingInventoryComponent.InventoryItem chest = new StartingInventoryComponent.InventoryItem();
chest.uri = "CoreAdvancedAssets:Chest";
chest.items.addAll(Arrays.asList(content));
return chest;
}

private InventoryItem randomItem() {
private StartingInventoryComponent.InventoryItem randomItem() {
String uri = presents.get(RNG.nextInt(presents.size()));

final InventoryItem inventoryItem = new InventoryItem();
final StartingInventoryComponent.InventoryItem inventoryItem = new StartingInventoryComponent.InventoryItem();
inventoryItem.uri = uri;
return inventoryItem;
}
Expand Down

0 comments on commit ab9a729

Please sign in to comment.