Skip to content

Commit

Permalink
#726 Remove armed freighters trait.
Browse files Browse the repository at this point in the history
  • Loading branch information
tuomount committed Feb 3, 2024
1 parent a1c6385 commit 3a2307a
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 20 deletions.
3 changes: 0 additions & 3 deletions src/main/java/org/openRealmOfStars/player/race/SpaceRace.java
Original file line number Diff line number Diff line change
Expand Up @@ -385,9 +385,6 @@ public static void initialize() {
TraitFactory.create(TraitIds.TOLERATE_LAVA).ifPresent(trait -> {
LITHORIANS.addTrait(trait);
});
TraitFactory.create(TraitIds.ARMED_FREIGHTERS).ifPresent(trait -> {
SMAUGIRIANS.addTrait(trait);
});
initialized = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,6 @@ public final class TraitIds {
public static final String TOLERATE_HOT = "TOLERATE_HOT";
/** Tolerate lava on planets. */
public static final String TOLERATE_LAVA = "TOLERATE_LAVA";
/** Can build freighters with hidden weapons, TODO: Replace, see GH-726 */
public static final String ARMED_FREIGHTERS = "ARMED_FREIGHTERS";

/** List storing all hardcoded IDs. Populated at runtime, via reflection. */
private static List<String> hardcodedIds = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

import org.openRealmOfStars.player.race.SpaceRace;
import org.openRealmOfStars.player.race.SpaceRaceUtility;
import org.openRealmOfStars.player.race.trait.TraitIds;
import org.openRealmOfStars.player.ship.ShipComponent;
import org.openRealmOfStars.player.ship.ShipComponentFactory;
import org.openRealmOfStars.player.ship.ShipComponentType;
Expand Down Expand Up @@ -921,14 +920,7 @@ public String getFlaws(final boolean banNukes, final boolean banPrivateer,
}
if (comp.getType() == ShipComponentType.PRIVATEERING_MODULE) {
privateerModule = true;
if (hull.getRace().hasTrait(TraitIds.ARMED_FREIGHTERS)) {
if (hull.getHullType() != ShipHullType.PRIVATEER
&& hull.getHullType() != ShipHullType.FREIGHTER) {
designOk = false;
sb.append(ShipDesignConsts.PRIVATEER_MODULE_IN_NOT_PRIVATEER);
sb.append("\n");
}
} else if (hull.getHullType() != ShipHullType.PRIVATEER) {
if (hull.getHullType() != ShipHullType.PRIVATEER) {
designOk = false;
sb.append(ShipDesignConsts.PRIVATEER_MODULE_IN_NOT_PRIVATEER);
sb.append("\n");
Expand Down
6 changes: 0 additions & 6 deletions src/main/resources/resources/data/traits/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -392,11 +392,5 @@
"conflictsWith": [
"TOLERATE_COLD", "TOLERATE_HOT"
]
},
{
"id": "ARMED_FREIGHTERS",
"name": "Armed freighters",
"description": "Can build Freighter Ships with privateering modules and single hidden weapon.",
"points": 2
}
]

0 comments on commit 3a2307a

Please sign in to comment.