Codota Logo
ShipyardOrderRefit
Code IndexAdd Codota to your IDE (free)

How to use
ShipyardOrderRefit
in
ch.sahits.game.openpatrician.event.data

Best Java code snippets using ch.sahits.game.openpatrician.event.data.ShipyardOrderRefit (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: ch.sahits.game/OpenPatricianEngine

/**
 * Recieve the event from the event bus and delegate it.
 * @param event shipyard order refit
 */
@Subscribe
public void handleORderRefit(ShipyardOrderRefit event) {
  refit(event.getShipyard(), event.getShip(), event.getUpgradeLevel(), event.getProxy());
}
@VisibleForTesting
origin: ch.sahits.game/OpenPatricianDisplay

@Override
protected EventHandler<MouseEvent> getAction() {
  return mouseEvent -> {
    Optional<ITradingOffice> office = getPlayer().findTradingOffice(getCity());
    Preconditions.checkArgument(office.isPresent(), "Trading office must be present");
    for (EWare ware : MATERIALS) {
      int buyAmount = requirementsMap.get(ware).getBuyAmount().intValue();
      getCity().move(ware, -buyAmount, getPlayer());
      int needed = shipFactory.getUpgradeAmount(currentShip.get().getShipType(), ware);
      int fromWarhouse = needed - buyAmount;
      office.get().move(ware, -fromWarhouse, 0);
    }
    ShipyardOrderRefit event = new ShipyardOrderRefit(getCity().getCityState().getShipyardState(),currentShip.get(), currentShip.get().getShipUpgradeLevel().nextLevel(), city);
    clientServerEventBus.post(event);
    city.getPlayersShips().remove(currentShip.get());
    getPlayer().getCompany().updateCash(-calculateTotalUpgradeCosts());
    executeOnCloseButtonClicked();
  };
}
ch.sahits.game.openpatrician.event.dataShipyardOrderRefit

Most used methods

  • <init>
  • getProxy
  • getShip
  • getShipyard
  • getUpgradeLevel

Popular in Java

  • Reading from database using SQL prepared statement
  • getApplicationContext (Context)
  • getExternalFilesDir (Context)
  • getSystemService (Context)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • SortedSet (java.util)
    A Set that further provides a total ordering on its elements. The elements are ordered using their C
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Runner (org.openjdk.jmh.runner)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now