Loading

Paste #pwcf1wdzf

  1.                 if (!AITown.HasStatue(town)) {
  2.                     if (AITown.IsActionAvailable(town, AITown.TOWN_ACTION_BUILD_STATUE)) {
  3.                         local perform_action = true;
  4.                         if (cvgs.IsCompanyValueGSGame() && cvgs.GetCompanyIDRank(AICompany.ResolveCompanyID(AICompany.COMPANY_SELF)) == 1 && cvgs.RankingList().Count() > 1) {
  5.                             AILog.Info("Cost of perfoming action: " + TestPerformTownAction().TestCost(town, AITown.TOWN_ACTION_BUILD_STATUE) + " ; Value difference to company behind: " + cvgs.GetCompanyIDDiffToNext(AICompany.ResolveCompanyID(AICompany.COMPANY_SELF), false));
  6.                             if (TestPerformTownAction().TestCost(town, AITown.TOWN_ACTION_BUILD_STATUE) > cvgs.GetCompanyIDDiffToNext(AIC

Paste #pnrowcvo8

  1. /* static */ VehicleID ScriptVehicle::GetVehicleID(UnitID unit_number, ScriptVehicle::VehicleType vehicle_type)
  2. {
  3.     EnforcePrecondition(INVALID_VEHICLE, vehicle_type == ScriptVehicle::VT_AIR || vehicle_type == ScriptVehicle::VT_ROAD || vehicle_type == ScriptVehicle::VT_RAIL || vehicle_type == ScriptVehicle::VT_WATER);
  4.     EnforcePrecondition(INVALID_VEHICLE, unit_number >= 0 && unit_number <= UINT16_MAX);

Paste #p807efevu

  1. struct { TrackBits next_track_1, next_track_2; } table[] = {
  2.     /*         t1x,t1y,t2x,t2y,              next_track_1          ,        next_track_2             opposite_tile */
  3.     /* CORNER_W  0,  1, -1,  0,  */ { TRACK_BIT_X | TRACK_BIT_RIGHT, TRACK_BIT_Y | TRACK_BIT_RIGHT }, /* -1,  1 */
  4.     /* CORNER_S  1,  0,  0,  1,  */ { TRACK_BIT_Y | TRACK_BIT_UPPER, TRACK_BIT_X | TRACK_BIT_UPPER }, /*  1,  1 */
  5.     /* CORNER_E  0, -1,  1,  0,  */ { TRACK_BIT_X | TRACK_BIT_LEFT , TRACK_BIT_Y | TRACK_BIT_LEFT  }, /*  1, -1 */

Paste #pgxdnm3kj

  1. /* ******************************************************************
  2.  * Definition of the industry tile, its callbacks, and graphics chain
  3.  * ******************************************************************/
  4.             spriteset(oil_rig_spriteset_0_0, "src/graphics/industries/groundtiles.png") {
  5.                     tmpl_ground_tile(360, 10)

Paste #pungzsg9l

  1. static void CheckIfAircraftNeedsService(Aircraft *v)
  2. {
  3.     bool needs_automatic_servicing = v->NeedsAutomaticServicing();
  4.     bool has_pending_replace = v->HasPendingReplace();
  5.     if (Company::Get(v->owner)->settings.vehicle.servint_aircraft == 0 || (!needs_automatic_servicing &&

Paste #p3c6qc5ys

  1. void ScriptConfig::ResetChangeableSettings()
  2. {
  3.     for (SettingValueList::iterator it = this->settings.begin(); it != this->settings.end();) {
  4.         const ScriptConfigItem *config_item = this->info->GetConfigItem((*it).first);
  5.         assert(config_item != NULL);

Paste #paxqo42ed

  1.     virtual void DrawWidget(const Rect &r, int widget) const
  2.     {
  3.         uint widest_icon = 0;
  4.         static const SpriteID icons[] = { SPR_AICONFIG_DEAD, SPR_AICONFIG_ELIGIBLE, SPR_AICONFIG_ALIVE, SPR_AICONFIG_HUMAN, SPR_AICONFIG_RANDOM };
  5.         for (uint i = 0; i < lengthof(icons); i++) {

Paste #pywdw2kik

  1.         if (economy==0) {
  2.             produce (blast_furnace_simple_produce_0,
  3.                     [
  4.                             IORE: incoming_cargo_waiting("IORE");
  5.                             COAL: incoming_cargo_waiting("COAL");

Paste #pumazxsaf

  1.     AirportTileTableIterator it(as->table[0], tile);
  2.     for (TileIndex cur_tile = it; cur_tile != INVALID_TILE; cur_tile = ++it) {
  3.         if (!::IsValidTile(cur_tile)) return INVALID_TOWN;
  4.     }

Paste #pn22rlzoh

  1. <body style="background: #e6e6df; padding-top: 1em; font-family: lato, arial, sans-serif;">
  2.  
  3. <div style="margin-left: auto;margin-right: auto;width: 1200px;">
  4.  
  5. <!--! rest of page content here -->

Paste #pqbylmyxq

  1.     for (local type = 0; type < 9999; type++) {
  2.         if (AIAirport.IsValidAirportType(type)) {
  3.             local w = AIAirport.GetAirportWidth(type);
  4.             local h = AIAirport.GetAirportHeight(type);
  5.             local r = AIAirport.GetAirportCoverageRadius(type);

Paste #pntip1imo

  1. /*
  2.  * This file is aimed to provide an example on how to code a basic industry 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 #pciylxx8w

  1. import("Library.SCPLib", "SCPLib", 45);
  2. import("Library.SCPClient_CompanyValue", "SCPClient_CompanyValue", 1);
  3. //require("scp.nut");
  4.  
  5. class LuDiAIAfterFix extends AIController {

Paste #po0sy3phj

  1. // Global function for checking if SCP is enabled at all
  2. function IsSCPEnabled()
  3. {
  4.     return GSController.GetSetting("scp_support");
  5. }

Paste #p7uvaedf7

  1. local myCID = Utils.MyCID();
  2.  
  3.                 if (!AITown.HasStatue(town)) {
  4.                     local action = AITown.TOWN_ACTION_BUILD_STATUE;
  5.                     if (AITown.IsActionAvailable(town, action)) {