Exemple #1
0
 public TrinketTool() {
   super(ADD_REMOVE_OP, MOVE_ROTATE_OP);
   List<String> builderIDs = new ArrayList<>();
   for (TrinketBuilder b : BuilderManager.getAllEditableTrinketBuilders()) {
     builderIDs.add(b.getId());
   }
   set = new AssetSet(builderIDs, false);
 }
Exemple #2
0
  private static void finalizeMapOn(Battlefield b) {
    Map m = b.getMap();
    m.setStyle(BuilderManager.getMapStyleBuilder(m.getMapStyleID()).build());
    TileArtisanUtil.finalizeTilesOn(m);
    TileArtisanUtil.readElevation(m.getAll());
    m.setParcelling(new Parcelling(m));

    attachInitialTrinkets(m);
    for (Ramp r : m.getRamps()) {
      r.connect(m);
    }
    AtlasArtisanUtil.buildAtlas(m);
  }
Exemple #3
0
 private void add() {
   Point2D coord = pencil.getCoord();
   for (Trinket t : ModelManager.getBattlefield().getMap().get(coord).getData(Trinket.class)) {
     if (t.pos.equals(coord)) {
       coord = coord.getTranslation(RandomUtil.between(AngleUtil.FLAT, -AngleUtil.FLAT), 0.1);
     }
   }
   Trinket t =
       BuilderManager.getAllEditableTrinketBuilders()
           .get(set.actual)
           .build(coord.get3D(ModelManager.getBattlefield().getMap().getAltitudeAt(coord)));
   MapArtisanUtil.attachTrinket(t, ModelManager.getBattlefield().getMap());
   t.drawOnBattlefield();
 }
Exemple #4
0
 private static void createMapOn(Battlefield b) {
   Map m = new Map(BuilderManager.getMapStyleBuilder("StdMapStyle").build());
   AtlasArtisanUtil.buildAtlas(m);
   b.setMap(m);
 }