Loading

opf find depot

  1. FindDepotData OPFShipFindNearestDepot(const Ship *v, int max_distance) // todo
  2. {
  3.     Trackdir trackdir = v->GetVehicleTrackdir();
  4.     DiagDirection enterdir = TrackdirToExitdir(trackdir);  
  5.     TrackBits tracks = TrackdirBitsToTrackBits(DiagdirReachesTrackdirs(enterdir));

Wolf01

  1. Hello people, the crowdfunded announcement for this new release didn't go so well:
  2. "The"
  3. "OpenTTD"
  4. "1.7.2-RC1"

Paste #pub5u3rna

  1. // add the trailing units to articulated consist
  2. switch (FEAT_ROADVEHS, SELF, big_rigg_articulated_cb_switch, extra_callback_info1) {
  3.    
  4.         0: return big_rigg;

Paste #ptqwpdna7

  1.  
  2. switch (FEAT_TRAINS, SELF, box_car_antelope_gen_1_1_switch_cargo_capacity, cargo_classes & bitmask(CC_MAIL)) {
  3.     bitmask(CC_MAIL): return 110;
  4.     return 55;
  5. }

Paste #p2e9mosxp

  1. class MyTest extends AIController {
  2.   function Start();
  3. }
  4.  
  5. function MyTest::Start() {

Paste #pwme4lx6r

  1.             Slope tileh_north_aqueduct = GetTileSlope(tile_start);
  2.             if (tileh_north_aqueduct != ComplementSlope(tileh_end)) {
  3.                 Slope tileh_north_result;
  4.                 switch (tileh_end) {
  5.                     case SLOPE_NE:

Paste #prlkxblhm

  1. # Various needed programs
  2. HG= hg
  3. PYTHON3 = python3
  4. SED = sed
  5. ZIP = zip

Paste #pykz1xpdb

  1.     def get_engine_cost_points(self):
  2.         # Up to 40 points for power. 1 point per 50hp
  3.         # Power is therefore capped at 2000hp by design, this isn't a hard limit, but raise a warning
  4.         if self.power > 2000:
  5.             utils.echo_message("Consist " + self.id + " has power > 2000hp, which is too much")

Paste #pidwxoqtk

  1. switch (FEAT_ROADVEHS, SELF, mk1_open_liquid_graphics, cargo_classes & bitmask(CC_LIQUID)) {
  2.   bitmask(CC_LIQUID): spritegroup_mki_t_open_drum;
  3.   default:            spritegroup_mki_t_open;
  4. }

Paste #pu3qrnwrg

  1. Index: src/newgrf_text.cpp
  2. ===================================================================
  3. --- src/newgrf_text.cpp (revision 27702)
  4. +++ src/newgrf_text.cpp (working copy)
  5. @@ -527,6 +527,7 @@

Paste #p6yvowge9

  1. +       if (e->u.rail.running_cost_class == INVALID_PRICE) {
  2. +           const Train *a = v;
  3. +
  4. +           do {
  5. +               cost += a->purchase_cost_or_what_is_called / 8;

Paste #p528iusnc

  1. bool TileHasTree(TileIndex t, void *user_data)
  2. {
  3.     TreeType found_tree = *(TreeType*)user_data;
  4.  
  5.     if (IsValidTile(t) && IsTileType(t, MP_TREES)) {

Paste #p9aqp8gte

  1. /*
  2.  * This file is aimed to provide an example on how to code a roadtype in NML.
  3.  * To keep the code readable, not every property or variable is documented in
  4.  * detail, refer to the object-specific reference in the documentation.
  5.  *

Paste #pw40ohj1e

  1.  
  2. static ChangeInfoResult RoadTypeReserveInfo(uint id, int numinfo, int prop, ByteReader *buf, RoadType basetype)
  3. {
  4.     ChangeInfoResult ret = CIR_SUCCESS;

Paste #p97vrjhju

  1. Index: src/pathfinder/opf/opf_ship.cpp
  2. ===================================================================
  3. --- src/pathfinder/opf/opf_ship.cpp (revision 27846)
  4. +++ src/pathfinder/opf/opf_ship.cpp (working copy)
  5. @@ -20,7 +20,7 @@