Skip to content

Commit

Permalink
Remove buildings feature: duplicates the discoveries with even less
Browse files Browse the repository at this point in the history
player agency.
  • Loading branch information
guillaume-alvarez committed Dec 26, 2015
1 parent 8dc6f11 commit 9f6196d
Show file tree
Hide file tree
Showing 14 changed files with 3 additions and 381 deletions.
17 changes: 0 additions & 17 deletions core/assets/data/buildings/culture.json

This file was deleted.

17 changes: 0 additions & 17 deletions core/assets/data/buildings/food.json

This file was deleted.

25 changes: 0 additions & 25 deletions core/assets/data/buildings/religion.json

This file was deleted.

9 changes: 0 additions & 9 deletions core/assets/data/buildings/science.json

This file was deleted.

25 changes: 0 additions & 25 deletions core/assets/data/buildings/trade.json

This file was deleted.

3 changes: 1 addition & 2 deletions core/src/com/galvarez/ttw/EntityFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import com.galvarez.ttw.model.components.AIControlled;
import com.galvarez.ttw.model.components.Army;
import com.galvarez.ttw.model.components.ArmyCommand;
import com.galvarez.ttw.model.components.Buildings;
import com.galvarez.ttw.model.components.Destination;
import com.galvarez.ttw.model.components.Diplomacy;
import com.galvarez.ttw.model.components.Discoveries;
Expand Down Expand Up @@ -79,7 +78,7 @@ public static Entity createEmpire(World world, int x, int y, String name, Empire
edit.add(sprite);

InfluenceSource source = new InfluenceSource();
edit.add(new MapPosition(x, y)).add(source).add(new Buildings()).add(new Destination(command.forbiddenTiles, 2));
edit.add(new MapPosition(x, y)).add(source).add(new Destination(command.forbiddenTiles, 2));

edit.add(new Name(name)).add(new Description("Tribe of " + name))
.add(new TextBox(() -> name + ": " + source.power()));
Expand Down
139 changes: 0 additions & 139 deletions core/src/com/galvarez/ttw/model/BuildingsSystem.java

This file was deleted.

17 changes: 1 addition & 16 deletions core/src/com/galvarez/ttw/model/DiscoverySystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import com.galvarez.ttw.model.components.Discoveries;
import com.galvarez.ttw.model.components.InfluenceSource;
import com.galvarez.ttw.model.components.Research;
import com.galvarez.ttw.model.data.Building;
import com.galvarez.ttw.model.data.Discovery;
import com.galvarez.ttw.model.data.Empire;
import com.galvarez.ttw.model.data.Policy;
Expand Down Expand Up @@ -73,8 +72,6 @@ public final class DiscoverySystem extends EntitySystem implements EventHandler
/** Discoveries free to be discovered by any empire. */
private final Map<String, Discovery> toDiscover;

private final Map<String, Building> buildings;

private final GameMap map;

private final Random rand = new Random();
Expand All @@ -98,7 +95,6 @@ public DiscoverySystem(SessionSettings s, GameMap map, OverworldScreen screen) {
super(Aspect.getAspectForAll(Discoveries.class));
this.discoveries = s.getDiscoveries();
this.toDiscover = new HashMap<>(discoveries);
this.buildings = s.getBuildings();
this.map = map;
this.screen = screen;
}
Expand All @@ -123,14 +119,6 @@ protected void initialize() {
log.warn("Cannot find previous {} for discovery {}", previous, d);
}

// check buildings discovery and previous type
for (Building b : buildings.values()) {
if (!discoveries.containsKey(b.getName()))
log.warn("Cannot find discovery {} for building {}", b.getName(), b);
if (b.previous != null && !buildings.containsKey(b.previous))
log.warn("Cannot find previous {} for building {}", b.previous, b);
}

world.getSystem(EventsSystem.class).addEventType(this);
}

Expand Down Expand Up @@ -269,10 +257,7 @@ private Iterable<Entity> getNeighbors(Entity empire) {
}

public List<String> effectsStrings(Discovery d) {
List<String> list = effects.toString(d.effects);
if (buildings.containsKey(d.name))
list.add("building: " + d.name);
return list;
return effects.toString(d.effects);
}

public void copyDiscoveries(Entity from, Entity to) {
Expand Down
20 changes: 0 additions & 20 deletions core/src/com/galvarez/ttw/model/components/Buildings.java

This file was deleted.

62 changes: 0 additions & 62 deletions core/src/com/galvarez/ttw/model/data/Building.java

This file was deleted.

Loading

0 comments on commit 9f6196d

Please sign in to comment.