Modding-API

Schlage Dateioptionen und die Skriptklassen der Simulation nach.

Skriptsymbole

Der Index enthält Funktionen, Eigenschaften, Signale, Konstanten und benannte Aufzählungen der Simulations- und Modding-Klassen. Signaturen und Quellcodekommentare sind auf Englisch. Mod definiert die Einstiegspunkte für Skripte. Andere Klassen und Mitglieder mit führendem Unterstrich können sich zwischen Versionen ändern.

Ergebnisse

Mod

  • Mod.info varMetadata for the loaded mod.
    Link zu diesem Eintragvar info := {}

    Common keys are id, name, version, author, description, and path. Use this to inspect which copy was loaded.

    Deklariert in scripts/core/mod.gd:21
  • Mod._on_load funcRuns after Fourways reapplies enabled mods, including after a rescan.
    Link zu diesem Eintragfunc _on_load() -> void

    Read mod files or initialize settings here. Use _on_new_game or _on_game_loaded for work that needs a simulation.

    Rückgabewert
    void
    Deklariert in scripts/core/mod.gd:25
  • Mod._on_new_game funcA new game has been created (world generated, companies founded), before the first day.
    Link zu diesem Eintragfunc _on_new_game(_sim: Sim) -> void
    Parameter
    • _sim: Sim
    Rückgabewert
    void
    Deklariert in scripts/core/mod.gd:30
  • Mod._on_game_loaded funcA saved game has been loaded.
    Link zu diesem Eintragfunc _on_game_loaded(_sim: Sim) -> void
    Parameter
    • _sim: Sim
    Rückgabewert
    void
    Deklariert in scripts/core/mod.gd:35
  • Mod._on_day funcRuns once for each simulated calendar day after daily town, competitor and vehicle updates, and before the daily goal checks and month-end bookkeeping.
    Link zu diesem Eintragfunc _on_day(_sim: Sim) -> void

    Read sim.day_int for the day that has just started.

    Parameter
    • _sim: Sim
    Rückgabewert
    void
    Deklariert in scripts/core/mod.gd:40
  • Mod._on_month funcRuns at the month boundary after Fourways closes the previous month’s accounts.
    Link zu diesem Eintragfunc _on_month(_sim: Sim) -> void

    Money credited here is recorded in the new month.

    Parameter
    • _sim: Sim
    Rückgabewert
    void

    Beispiel

    func _on_month(sim: Sim) -> void:
        sim.company.earn(500)
        news(sim, L.t("Monthly transport grant"), "good")
    Deklariert in scripts/core/mod.gd:45
  • Mod._on_year funcAt the start of every year; year is the one that has just ended.
    Link zu diesem Eintragfunc _on_year(_sim: Sim, _year: int) -> void
    Parameter
    • _sim: Sim
    • _year: int
    Rückgabewert
    void
    Deklariert in scripts/core/mod.gd:50
  • Mod._on_delivery funcRuns after a vehicle earns a fare by delivering cargo.
    Link zu diesem Eintragfunc _on_delivery(_sim: Sim, _vehicle: Vehicle, _station: Station, _amount: int) -> void

    amount is the total payment for that unload, in game dollars. It is not the number of units delivered or a per-cargo breakdown.

    Parameter
    • _sim: Sim
    • _vehicle: Vehicle
    • _station: Station
    • _amount: int
    Rückgabewert
    void
    Deklariert in scripts/core/mod.gd:55
  • Mod._on_vehicle_bought funcA vehicle has been bought.
    Link zu diesem Eintragfunc _on_vehicle_bought(_sim: Sim, _vehicle: Vehicle) -> void
    Parameter
    • _sim: Sim
    • _vehicle: Vehicle
    Rückgabewert
    void
    Deklariert in scripts/core/mod.gd:60
  • Mod._on_station_built funcA station has been built (or extended).
    Link zu diesem Eintragfunc _on_station_built(_sim: Sim, _station: Station) -> void
    Parameter
    • _sim: Sim
    • _station: Station
    Rückgabewert
    void
    Deklariert in scripts/core/mod.gd:65
  • Mod._on_news funcRuns before a news item is posted.
    Link zu diesem Eintragfunc _on_news(_sim: Sim, _item: Dictionary) -> bool

    Return false to suppress it or true to let it proceed through the other active mods. The item includes text, kind, pos, and day. Posting news from this hook calls the hook again.

    Parameter
    • _sim: Sim
    • _item: Dictionary
    Rückgabewert
    bool
    Deklariert in scripts/core/mod.gd:70
  • Mod._save funcReturns the mod’s persistent state as a dictionary of plain values.
    Link zu diesem Eintragfunc _save(_sim: Sim) -> Dictionary

    An empty dictionary is omitted, so _load will not run for that save. Return the data rather than writing a separate file.

    Parameter
    • _sim: Sim
    Rückgabewert
    Dictionary
    Deklariert in scripts/core/mod.gd:76
  • Mod._load funcRestores this mod’s data before _on_game_loaded.
    Link zu diesem Eintragfunc _load(_sim: Sim, _data: Dictionary) -> void

    Called only if the save contains a dictionary for this mod’s ID. Use data.get("key", default) so older saves can omit keys added by a later mod version.

    Parameter
    • _sim: Sim
    • _data: Dictionary
    Rückgabewert
    void
    Deklariert in scripts/core/mod.gd:80
  • Mod.news funcPost a news item ("good", "info", "warn" or "bad").
    Link zu diesem Eintragfunc news(sim: Sim, text: String, kind: String = "info", at: Vector2 = Vector2(-1, -1)) -> void

    at is a tile to jump to when it's clicked.

    Parameter
    • sim: Sim
    • text: String
    • kind: String = "info"
    • at: Vector2 = Vector2(-1, -1)
    Rückgabewert
    void
    Deklariert in scripts/core/mod.gd:87
  • Mod.note funcWrite a line to the game's log, tagged with the mod's id.
    Link zu diesem Eintragfunc note(text: String) -> void
    Parameter
    • text: String
    Rückgabewert
    void
    Deklariert in scripts/core/mod.gd:92
  • Mod.path funcA file inside the mod's folder, e.g.
    Link zu diesem Eintragfunc path(file: String) -> String

    path("data/extra.json").

    Parameter
    • file: String
    Rückgabewert
    String
    Deklariert in scripts/core/mod.gd:97

Sim

  • Sim.news_posted signal{"text", "kind": good|info|warn|bad, "pos": Vector2, "day"[, "veh"][, "urgent"][, "world"]}
    Link zu diesem Eintragsignal news_posted(item: Dictionary)
    Parameter
    • item: Dictionary
    Rückgabewert
    signal news_posted(item: Dictionary)
    Deklariert in scripts/sim/sim.gd:6
  • Sim.income signal
    Link zu diesem Eintragsignal income(vehicle: Vehicle, station: Station, amount: int)
    Parameter
    • vehicle: Vehicle
    • station: Station
    • amount: int
    Rückgabewert
    signal income(vehicle: Vehicle, station: Station, amount: int)

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/sim.gd:7
  • Sim.vehicles_changed signal
    Link zu diesem Eintragsignal vehicles_changed
    Rückgabewert
    signal vehicles_changed

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/sim.gd:8
  • Sim.company_bankrupt signal
    Link zu diesem Eintragsignal company_bankrupt(c: Company)
    Parameter
    • c: Company
    Rückgabewert
    signal company_bankrupt(c: Company)

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/sim.gd:9
  • Sim.SPEEDS const
    Link zu diesem Eintragconst SPEEDS := [0, 1, 2, 4, 8]

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/sim.gd:11
  • Sim.map varThe live world map.
    Link zu diesem Eintragvar map: WorldMap

    Use it to read towns, industries, stations, and terrain. Use simulation construction methods when changing infrastructure.

    Deklariert in scripts/sim/sim.gd:13
  • Sim.companies varThe companies in the current simulation, including the player.
    Link zu diesem Eintragvar companies: Array[Company] = []

    Compare a vehicle or station’s owner with a company object to filter its assets.

    Deklariert in scripts/sim/sim.gd:14
  • Sim.company varThe player’s company.
    Link zu diesem Eintragvar company: Company

    Use its id for council ratings and its earn() and spend() methods to record changes in the accounts.

    Deklariert in scripts/sim/sim.gd:15
  • Sim.vehicles varThe vehicles active in the current simulation.
    Link zu diesem Eintragvar vehicles: Array[Vehicle] = []

    Use buying and selling methods to manage ownership and accounting.

    Deklariert in scripts/sim/sim.gd:16
  • Sim.next_vehicle_id var
    Link zu diesem Eintragvar next_vehicle_id := 1

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/sim.gd:17
  • Sim.seed_value var
    Link zu diesem Eintragvar seed_value := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/sim.gd:18
  • Sim.rng varThe simulation’s seeded random-number generator.
    Link zu diesem Eintragvar rng := RandomNumberGenerator.new()

    Calls advance the same random stream the simulation uses.

    Deklariert in scripts/sim/sim.gd:19
  • Sim.day var
    Link zu diesem Eintragvar day := 0.0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/sim.gd:20
  • Sim.day_int var
    Link zu diesem Eintragvar day_int := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/sim.gd:21
  • Sim.speed var
    Link zu diesem Eintragvar speed := 1

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/sim.gd:22
  • Sim.news var
    Link zu diesem Eintragvar news: Array = []

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/sim.gd:23
  • Sim.ais varAI controllers (see ai.gd)
    Link zu diesem Eintragvar ais: Array = []Deklariert in scripts/sim/sim.gd:24
  • Sim.options varGame rules chosen at setup: "cost" construction cost multiplier, "blocking" (trains wait for each other at signals, and crash into each other where there are none), "ai_level" 0..2, "max_loan".
    Link zu diesem Eintragvar options := {"cost": 1.0, "blocking": false, "ai_level": 1, "max_loan": Data.MAX_LOAN, "depots": false, "breakdowns": 0, "goal": "none"}

    "depots": road vehicles and trains are bought at (and serviced in) depots; "breakdowns" 0..2; "goal": the company goal (one of Goals.GOAL_IDS).

    Deklariert in scripts/sim/sim.gd:29
  • Sim.occupied varsignal block id -> Vehicle (realistic blocking only)
    Link zu diesem Eintragvar occupied := {}Deklariert in scripts/sim/sim.gd:30
  • Sim.CRASH_R constTrain crashes (see _check_crashes).
    Link zu diesem Eintragconst CRASH_R := 0.25

    Not saved: after loading, trains that already overlap are let go until they part. how close a train's nose may come to another train before they touch

    Deklariert in scripts/sim/sim.gd:33
  • Sim.CRASH_STEP constthe most a train moves between two crash checks
    Link zu diesem Eintragconst CRASH_STEP := 0.2Deklariert in scripts/sim/sim.gd:34
  • Sim.CRASH_CELL constmap cells (in tiles) for finding trains near each other
    Link zu diesem Eintragconst CRASH_CELL := 8.0Deklariert in scripts/sim/sim.gd:35
  • Sim._touching var"id:id" -> true: trains overlapping at the last check that didn't crash
    Link zu diesem Eintragvar _touching := {}Deklariert in scripts/sim/sim.gd:36
  • Sim._checked varvehicle id -> true: trains taking part in the last check
    Link zu diesem Eintragvar _checked := {}Deklariert in scripts/sim/sim.gd:37
  • Sim.WRECK_DAYS constCrashed trains lying on the line until it is cleared, WRECK_DAYS later: [{"pos": Vector2 (where they met), "day": float, "trains": [Vehicle, Vehicle] (as they were, for the view), "tiles": {Vector2i: true}}].
    Link zu diesem Eintragconst WRECK_DAYS := 20.0

    Trains stop short of a wreck's tiles (see wreck_tiles). Not saved.

    Deklariert in scripts/sim/sim.gd:41
  • Sim.wrecks var
    Link zu diesem Eintragvar wrecks: Array = []

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/sim.gd:42
  • Sim.wreck_tiles varVector2i -> true: track blocked by a wreck
    Link zu diesem Eintragvar wreck_tiles := {}Deklariert in scripts/sim/sim.gd:43
  • Sim.road_at varQueues (RAIL-26): who is where, worked out afresh at the start of every advance (_index_queues) and kept up to date as vehicles take a berth or a stand.
    Link zu diesem Eintragvar road_at := PackedInt32Array()

    Road vehicles by the tile their front is in, as lists threaded through road_next, so each one only looks at the few near it. tile index -> index in road_list of a road vehicle there (-1: none)

    Deklariert in scripts/sim/sim.gd:47
  • Sim.road_list var
    Link zu diesem Eintragvar road_list: Array[Vehicle] = []

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/sim.gd:48
  • Sim.road_next varindex in road_list -> the next one in the same tile (-1: none)
    Link zu diesem Eintragvar road_next := PackedInt32Array()Deklariert in scripts/sim/sim.gd:49
  • Sim._road_tiles varthe tiles set in road_at, to clear again
    Link zu diesem Eintragvar _road_tiles := PackedInt32Array()Deklariert in scripts/sim/sim.gd:50
  • Sim.ships_at vartile -> a ship whose front is in it
    Link zu diesem Eintragvar ships_at := {}Deklariert in scripts/sim/sim.gd:51
  • Sim.stands varStation -> aircraft on the ground there or coming in to land
    Link zu diesem Eintragvar stands := {}Deklariert in scripts/sim/sim.gd:52
  • Sim.holding_over varStation -> aircraft holding over it
    Link zu diesem Eintragvar holding_over := {}Deklariert in scripts/sim/sim.gd:53
  • Sim.missing_mods varAfter loading: mods this game was saved with that aren't switched on now, and vehicles left out because their model came from one of them.
    Link zu diesem Eintragvar missing_mods: Array = []Deklariert in scripts/sim/sim.gd:56
  • Sim.dropped_vehicles var
    Link zu diesem Eintragvar dropped_vehicles := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/sim.gd:57
  • Sim.undo varThe player's last construction actions, for Ctrl+Z (see undo.gd).
    Link zu diesem Eintragvar undo := UndoStack.new()

    Not saved.

    Deklariert in scripts/sim/sim.gd:59
  • Sim.goals varfirst steps, achievements and the company goal (RAIL-25)
    Link zu diesem Eintragvar goals := Goals.new()Deklariert in scripts/sim/sim.gd:60
  • Sim.opportunities varsubsidies and town requests (RAIL-24)
    Link zu diesem Eintragvar opportunities := Opportunities.new()Deklariert in scripts/sim/sim.gd:61
  • Sim.lines varThe player's lines: vehicles sharing one order list (see line.gd).
    Link zu diesem Eintragvar lines: Array = []Deklariert in scripts/sim/sim.gd:63
  • Sim.next_line_id var
    Link zu diesem Eintragvar next_line_id := 1

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/sim.gd:64
  • Sim.next_industry_id varIndustries open and close during the game (RAIL-23, IndustryLife).
    Link zu diesem Eintragvar next_industry_id := 0

    Ids are never used twice, so nothing that remembers a closed industry's id mistakes a new one for it (see new_industry_id).

    Deklariert in scripts/sim/sim.gd:67
  • Sim.industry_target varHow many industries the map started with (counted at the first month end): openings and closures lean back toward it.
    Link zu diesem Eintragvar industry_target := 0Deklariert in scripts/sim/sim.gd:70
  • Sim.industry_room varThe room the map has for industries (WorldGen.industry_room), worked out when first needed.
    Link zu diesem Eintragvar industry_room := Vector2i(-1, -1)

    Not saved: the coast hardly moves in a game.

    Deklariert in scripts/sim/sim.gd:73
  • Sim.introduce_wait varA new era's kinds of industry that found no site (IndustryLife._introduce): type -> the game day before which they are not tried again.
    Link zu diesem Eintragvar introduce_wait := {}

    Not saved.

    Deklariert in scripts/sim/sim.gd:76
  • Sim.create static funcA brand-new game from setup parameters (see the new-game screen for the keys).
    Link zu diesem Eintragstatic func create(params: Dictionary) -> Sim
    Parameter
    • params: Dictionary
    Rückgabewert
    Sim
    Ruft auf
    WorldGen.generate, Calendar.day_of_year_start, AiPlayer.create_competitors, Mods.hook
    Deklariert in scripts/sim/sim.gd:80
  • Sim._init func
    Link zu diesem Eintragfunc _init(p_seed: int, size: int = Const.MAP_SIZE, generate: bool = true, size_h: int = -1) -> void
    Parameter
    • p_seed: int
    • size: int = Const.MAP_SIZE
    • generate: bool = true
    • size_h: int = -1
    Rückgabewert
    void
    Ruft auf
    WorldGen.generate, L.t

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/sim.gd:110
  • Sim.date_text funcFormats the current simulation day for display using the active language.
    Link zu diesem Eintragfunc date_text() -> String

    For date calculations use day_int or year().

    Rückgabewert
    String
    Ruft auf
    Calendar.format
    Deklariert in scripts/sim/sim.gd:121
  • Sim.year funcReturns the calendar year of day_int.
    Link zu diesem Eintragfunc year() -> int

    Use it for year-based rules instead of dividing the elapsed day count by 365.

    Rückgabewert
    int
    Ruft auf
    Calendar.from_day
    Deklariert in scripts/sim/sim.gd:125
  • Sim.tick funcAdvance by real seconds at the current game speed.
    Link zu diesem Eintragfunc tick(real_dt: float) -> void
    Parameter
    • real_dt: float
    Rückgabewert
    void
    Deklariert in scripts/sim/sim.gd:132
  • Sim.advance funcAdvance by dd game days.
    Link zu diesem Eintragfunc advance(dd: float) -> void
    Parameter
    • dd: float
    Rückgabewert
    void
    Deklariert in scripts/sim/sim.gd:139
  • Sim._update_occupancy funcWhich track blocks trains are standing in (only matters with realistic blocking).
    Link zu diesem Eintragfunc _update_occupancy() -> void

    Since RAIL-80 junctions are blocks too, so this runs without signals as well.

    Rückgabewert
    void
    Deklariert in scripts/sim/sim.gd:162
  • Sim._index_queues funcWhere road vehicles, ships and aircraft are, for the queues (RAIL-26).
    Link zu diesem Eintragfunc _index_queues() -> void

    One pass over the vehicles, with nothing allocated for each road vehicle: those out of a depot go into road_at by the tile of their front.

    Rückgabewert
    void
    Deklariert in scripts/sim/sim.gd:206
  • Sim.claim_stand funcWhether a plane may land at airport st now (RAIL-26), and if so it is counted in: fewer than Vehicle.STANDS aircraft are on the ground there or coming in to land.
    Link zu diesem Eintragfunc claim_stand(st: Station, holding: bool) -> bool

    One already holding goes before one only just arriving.

    Parameter
    • st: Station
    • holding: bool
    Rückgabewert
    bool
    Deklariert in scripts/sim/sim.gd:252
  • Sim._rail_steps funcHow many steps to move the trains in this frame, so none goes further than CRASH_STEP in one.
    Link zu diesem Eintragfunc _rail_steps(dd: float) -> int

    Only where two trains could meet within the frame: everywhere else one step does (most frames, since trains mostly run apart, and stepping every train many times a frame is what costs).

    Parameter
    • dd: float
    Rückgabewert
    int
    Deklariert in scripts/sim/sim.gd:263
  • Sim._check_crashes funcTrains on the same track crash (with realistic blocking): when a train's nose runs into another train, both are wrecked.
    Link zu diesem Eintragfunc _check_crashes() -> void

    Signals are what keeps them apart. Trains in a depot shed or being serviced there are out of the way. Two trains that already overlapped at the last check, or where one has only just appeared (bought onto a busy platform, out of the depot together with another, a game just loaded), are let go until they part: only running into each other counts.

    Rückgabewert
    void
    Deklariert in scripts/sim/sim.gd:298
  • Sim._contact funcWhere the nose of train a touches the body of train b on the same level (not one on a bridge over the other), or null.
    Link zu diesem Eintragfunc _contact(a: Dictionary, b: Dictionary) -> Variant

    a and b are entries of _check_crashes' list.

    Parameter
    • a: Dictionary
    • b: Dictionary
    Rückgabewert
    Variant
    Deklariert in scripts/sim/sim.gd:346
  • Sim._crash funcTwo trains have run into each other at at: both are wrecked, with all they carried.
    Link zu diesem Eintragfunc _crash(a: Vehicle, b: Vehicle, at: Vector2) -> void
    Parameter
    • a: Vehicle
    • b: Vehicle
    • at: Vector2
    Rückgabewert
    void
    Ruft auf
    Station.nearest_town, L.t
    Deklariert in scripts/sim/sim.gd:374
  • Sim._dir_index static func
    Link zu diesem Eintragstatic func _dir_index(v: Vector2) -> int
    Parameter
    • v: Vector2
    Rückgabewert
    int

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/sim.gd:403
  • Sim._on_day func
    Link zu diesem Eintragfunc _on_day() -> void
    Rückgabewert
    void
    Ruft auf
    Economy.produce, IndustryLife.near_wind_farm, Calendar.from_day, Mods.hook, Economy.monthly, IndustryLife.monthly, Data.intros, Data.model, L.t, L.lower

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/sim.gd:409
  • Sim._growth_context funcWhat a town's land values depend on: stations with recent passenger service and nearby industry.
    Link zu diesem Eintragfunc _growth_context(t: Town) -> Dictionary
    Parameter
    • t: Town
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/sim.gd:471
  • Sim._new_era funcA new age: industry modernises (more output from the same mines, fields and plants, except those on their way out), and the chains change (RAIL-29: Sim.sync_era has moved the map to it already).
    Link zu diesem Eintragfunc _new_era(era: Dictionary) -> void
    Parameter
    • era: Dictionary
    Rückgabewert
    void
    Ruft auf
    Data.retiring, L.t, Data.era_changes
    Deklariert in scripts/sim/sim.gd:492
  • Sim.sync_era funcMove the industry chains to the era of the date (RAIL-29): at the start of a game, after loading and at every month end, so a game that crosses into a new era (or was saved before the chains changed) takes it on.
    Link zu diesem Eintragfunc sync_era() -> void

    Stations look again at what they accept and supply.

    Rückgabewert
    void
    Ruft auf
    Data.era_index
    Deklariert in scripts/sim/sim.gd:504
  • Sim._match_days funcStadiums hold a match once a month, each on its own day (see match_offset).
    Link zu diesem Eintragfunc _match_days() -> void

    The crowd of fans is one per stadium: the stations that reach it share it the way they share ordinary passengers (Economy.shares: the best two by rating), so a second station next to a stadium doesn't double it.

    Rückgabewert
    void
    Ruft auf
    Economy.shares, L.t
    Deklariert in scripts/sim/sim.gd:516
  • Sim.match_offset static funcThe day in each 30 a stadium standing at t (its north-west tile) holds its match: the match is on the days where (day + this) is a multiple of 30.
    Link zu diesem Eintragstatic func match_offset(t: Vector2i) -> int

    TownLife shows the fans walking to it then.

    Parameter
    • t: Vector2i
    Rückgabewert
    int
    Deklariert in scripts/sim/sim.gd:546
  • Sim._update_town_service func
    Link zu diesem Eintragfunc _update_town_service(t: Town) -> void
    Parameter
    • t: Town
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/sim.gd:550
  • Sim._yearly func
    Link zu diesem Eintragfunc _yearly(old_year: int) -> void
    Parameter
    • old_year: int
    Rückgabewert
    void
    Ruft auf
    IndustryLife.yearly, L.t, Fmt.money

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/sim.gd:559
  • Sim._check_bankruptcy funcMonth end: companies in the red are warned, draw on their credit (rivals), and after Data.BANKRUPT_MONTHS months go bankrupt.
    Link zu diesem Eintragfunc _check_bankruptcy() -> void
    Rückgabewert
    void
    Ruft auf
    L.t
    Deklariert in scripts/sim/sim.gd:578
  • Sim._go_bankrupt func
    Link zu diesem Eintragfunc _go_bankrupt(c: Company) -> void
    Parameter
    • c: Company
    Rückgabewert
    void
    Ruft auf
    L.t, WorldMap.crossing_tiles

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/sim.gd:606
  • Sim.post_news funcveh: the id of the vehicle the news is about, if any (clicking the news opens it).
    Link zu diesem Eintragfunc post_news(text: String, kind: String, pos: Vector2, veh: int = 0, about: String = "", urgent: bool = false, world: bool = false) -> void

    about: the screen clicking it opens instead ("goals"). urgent: news the player mustn't miss (a crash of their trains: the HUD shows it on a card in the middle of the screen, see Hud.show_crash). world: see post_world_news.

    Parameter
    • text: String
    • kind: String
    • pos: Vector2
    • veh: int = 0
    • about: String = ""
    • urgent: bool = false
    • world: bool = false
    Rückgabewert
    void
    Ruft auf
    Mods.allow_news
    Deklariert in scripts/sim/sim.gd:671
  • Sim.post_world_news funcNews about the world rather than the player's company: rivals' new lines, other towns' requests coming and going, industries opening and closing.
    Link zu diesem Eintragfunc post_world_news(text: String, kind: String, pos: Vector2, about: String = "") -> void

    It goes in the News window (under All news), without a note popping up on screen, so the player's own news isn't lost among it.

    Parameter
    • text: String
    • kind: String
    • pos: Vector2
    • about: String = ""
    Rückgabewert
    void
    Deklariert in scripts/sim/sim.gd:692
  • Sim.new_industry_id funcAn id for an industry opening now: never one an industry has had before, whether it is still on the map (one placed by hand, as test maps do, counts too) or has closed.
    Link zu diesem Eintragfunc new_industry_id() -> int
    Rückgabewert
    int
    Deklariert in scripts/sim/sim.gd:698
  • Sim.vehicle_by_id funcThe vehicle with this id, or null.
    Link zu diesem Eintragfunc vehicle_by_id(id: int) -> Vehicle
    Parameter
    • id: int
    Rückgabewert
    Vehicle
    Deklariert in scripts/sim/sim.gd:706
  • Sim.on_income func
    Link zu diesem Eintragfunc on_income(v: Vehicle, st: Station, amount: int) -> void
    Parameter
    • v: Vehicle
    • st: Station
    • amount: int
    Rückgabewert
    void
    Ruft auf
    Mods.hook

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/sim.gd:713
  • Sim._with_money funcMarks a plan as unaffordable if the company can't pay for it.
    Link zu diesem Eintragfunc _with_money(p: Dictionary, who: Company) -> Dictionary
    Parameter
    • p: Dictionary
    • who: Company
    Rückgabewert
    Dictionary
    Ruft auf
    L.t, Fmt.money
    Deklariert in scripts/sim/sim.gd:721
  • Sim._ownership funcTrack and stations belonging to other companies can't be touched.
    Link zu diesem Eintragfunc _ownership(p: Dictionary, who: Company, tiles: Array) -> Dictionary
    Parameter
    • p: Dictionary
    • who: Company
    • tiles: Array
    Rückgabewert
    Dictionary
    Ruft auf
    L.t
    Deklariert in scripts/sim/sim.gd:734
  • Sim.preview_line funcChecks a path of adjacent road or rail tiles for construction, ownership, and affordability.
    Link zu diesem Eintragfunc preview_line(kind: String, pts: Array[Vector2i], who: Company = null) -> Dictionary

    Returns a plan with ok, reason and cost without laying track or spending money.

    Parameter
    • kind: String
    • pts: Array[Vector2i]
    • who: Company = null
    Rückgabewert
    Dictionary
    Ruft auf
    BuildOps.plan_line
    Deklariert in scripts/sim/sim.gd:754
  • Sim.build_line funcLays road or track along consecutive adjacent tiles and debits construction costs on success.
    Link zu diesem Eintragfunc build_line(kind: String, pts: Array[Vector2i], who: Company = null) -> Dictionary

    Pass at least two tiles as Array[Vector2i]. The return value is a construction plan, so check ok before using it.

    Parameter
    • kind: String
    • pts: Array[Vector2i]
    • who: Company = null
    Rückgabewert
    Dictionary
    Ruft auf
    BuildOps.apply_line

    Beispiel

    var tiles: Array[Vector2i] = [Vector2i(5, 6), Vector2i(6, 6)]
    var plan := sim.build_line("road", tiles)
    if not plan.ok:
        note(plan.reason)
    Deklariert in scripts/sim/sim.gd:762
  • Sim.plan_route funcA line along pts (each tile next to the one before) with bridges and tunnels on it (crossings, as RouteBuilder.last_crossings gives them, RAIL-52): the stretches of land between them as build_line lays them and each crossing as build_crossing builds it.
    Link zu diesem Eintragfunc plan_route(kind: String, pts: Array[Vector2i], crossings: Array, who: Company = null) -> Dictionary

    Without the money check (see preview_route). Keys as plan_line's - "add" every piece, "cost" the total - plus "tiles" (every bridge span and tunnel tile), "spans" (bridge spans only) and "parts" (each stretch's and crossing's own plan, in order).

    Parameter
    • kind: String
    • pts: Array[Vector2i]
    • crossings: Array
    • who: Company = null
    Rückgabewert
    Dictionary
    Ruft auf
    BuildOps.plan_line, L.t, BuildOps.plan_bridge, BuildOps.plan_tunnel
    Deklariert in scripts/sim/sim.gd:785
  • Sim._join_plan funcAdd a stretch's or crossing's plan to a route's (plan_route).
    Link zu diesem Eintragfunc _join_plan(p: Dictionary, part: Dictionary) -> void
    Parameter
    • p: Dictionary
    • part: Dictionary
    Rückgabewert
    void
    Deklariert in scripts/sim/sim.gd:835
  • Sim.preview_route funcReturns the cost and validity of a road or rail route that can include bridges or tunnels.
    Link zu diesem Eintragfunc preview_route(kind: String, pts: Array[Vector2i], crossings: Array, who: Company = null) -> Dictionary

    It runs the route planner and checks funds without building the route.

    Parameter
    • kind: String
    • pts: Array[Vector2i]
    • crossings: Array
    • who: Company = null
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/sim.gd:853
  • Sim.build_route funcBuild a route planned by preview_route: every stretch and crossing exactly as previewed, paid for at once, and taken back by one undo.
    Link zu diesem Eintragfunc build_route(kind: String, pts: Array[Vector2i], crossings: Array, who: Company = null) -> Dictionary
    Parameter
    • kind: String
    • pts: Array[Vector2i]
    • crossings: Array
    • who: Company = null
    Rückgabewert
    Dictionary
    Ruft auf
    BuildOps.apply_crossing, BuildOps.apply_line
    Deklariert in scripts/sim/sim.gd:860
  • Sim.preview_station funcChecks placement, ownership, council permission, and affordability for a new station or extension.
    Link zu diesem Eintragfunc preview_station(kind: String, pts: Array[Vector2i], axis: int, who: Company = null) -> Dictionary

    Returns a plan without building the station.

    Parameter
    • kind: String
    • pts: Array[Vector2i]
    • axis: int
    • who: Company = null
    Rückgabewert
    Dictionary
    Ruft auf
    BuildOps.plan_station, Station.nearest_town
    Deklariert in scripts/sim/sim.gd:886
  • Sim.build_station funcBuilds or extends a station, charges the company, and fires Mod._on_station_built.
    Link zu diesem Eintragfunc build_station(kind: String, pts: Array[Vector2i], axis: int, who: Company = null) -> Dictionary

    Pass rail, road, dock, or air, a typed tile array, and an orientation. On success the plan includes the resulting station; on failure use reason.

    Parameter
    • kind: String
    • pts: Array[Vector2i]
    • axis: int
    • who: Company = null
    Rückgabewert
    Dictionary
    Ruft auf
    BuildOps.apply_station, Mods.hook
    Deklariert in scripts/sim/sim.gd:904
  • Sim.preview_bulldoze funcChecks which objects in the tile rectangle can be cleared by the company, and estimates the cost.
    Link zu diesem Eintragfunc preview_bulldoze(rect: Rect2i, who: Company = null) -> Dictionary

    Read the plan before calling build_bulldoze.

    Parameter
    • rect: Rect2i
    • who: Company = null
    Rückgabewert
    Dictionary
    Ruft auf
    BuildOps.plan_bulldoze, BuildOps.bulldoze_target, L.t, WorldMap.crossing_tiles
    Deklariert in scripts/sim/sim.gd:924
  • Sim.build_bulldoze funcClears the allowed parts of a tile rectangle, updates track ownership counts, and charges the company.
    Link zu diesem Eintragfunc build_bulldoze(rect: Rect2i, who: Company = null) -> Dictionary

    Removing scenery and buildings can affect town council ratings.

    Parameter
    • rect: Rect2i
    • who: Company = null
    Rückgabewert
    Dictionary
    Ruft auf
    UndoStack.bulldoze_tiles, BuildOps.apply_bulldoze
    Deklariert in scripts/sim/sim.gd:957
  • Sim.preview_crossing funcBridges (b is the far ramp) and tunnels (from hillside tile a).
    Link zu diesem Eintragfunc preview_crossing(kind: String, type: String, a: Vector2i, b: Vector2i, who: Company = null, style: String = "") -> Dictionary
    Parameter
    • kind: String
    • type: String
    • a: Vector2i
    • b: Vector2i
    • who: Company = null
    • style: String = ""
    Rückgabewert
    Dictionary
    Ruft auf
    BuildOps.plan_bridge, BuildOps.plan_tunnel, L.t
    Deklariert in scripts/sim/sim.gd:981
  • Sim.build_crossing funcBuilds a bridge between the ramp tiles or a tunnel from the hillside tile.
    Link zu diesem Eintragfunc build_crossing(kind: String, type: String, a: Vector2i, b: Vector2i, who: Company = null, style: String = "") -> Dictionary

    Pass bridge or tunnel for type. A successful plan contains the new crossing.

    Parameter
    • kind: String
    • type: String
    • a: Vector2i
    • b: Vector2i
    • who: Company = null
    • style: String = ""
    Rückgabewert
    Dictionary
    Ruft auf
    UndoStack.terraform_tiles, BuildOps.apply_crossing
    Deklariert in scripts/sim/sim.gd:992
  • Sim.preview_signal funcChecks placement, ownership, and cost for the signal action on a rail tile.
    Link zu diesem Eintragfunc preview_signal(t: Vector2i, who: Company = null) -> Dictionary

    Returns the plan without applying it.

    Parameter
    • t: Vector2i
    • who: Company = null
    Rückgabewert
    Dictionary
    Ruft auf
    BuildOps.plan_signal
    Deklariert in scripts/sim/sim.gd:1012
  • Sim.build_signal funcApplies the signal action to the rail tile after validating ownership and cost, and records the operation for undo.
    Link zu diesem Eintragfunc build_signal(t: Vector2i, who: Company = null) -> Dictionary
    Parameter
    • t: Vector2i
    • who: Company = null
    Rückgabewert
    Dictionary
    Ruft auf
    BuildOps.apply_signal
    Deklariert in scripts/sim/sim.gd:1019
  • Sim.preview_terraform funcChecks the cost and rules for raising or lowering a map corner.
    Link zu diesem Eintragfunc preview_terraform(corner: Vector2i, delta: int, who: Company = null) -> Dictionary

    It also rejects a plan if a vehicle occupies any affected tile.

    Parameter
    • corner: Vector2i
    • delta: int
    • who: Company = null
    Rückgabewert
    Dictionary
    Ruft auf
    BuildOps.plan_terraform, L.t
    Deklariert in scripts/sim/sim.gd:1030
  • Sim.build_terraform funcApplies an affordable height change to a map corner.
    Link zu diesem Eintragfunc build_terraform(corner: Vector2i, delta: int, who: Company = null) -> Dictionary

    A positive delta raises it and a negative one lowers it.

    Parameter
    • corner: Vector2i
    • delta: int
    • who: Company = null
    Rückgabewert
    Dictionary
    Ruft auf
    UndoStack.terraform_tiles, BuildOps.apply_terraform
    Deklariert in scripts/sim/sim.gd:1042
  • Sim.preview_level funcLevel the tiles in rect to corner height height as far as the rules allow (see BuildOps.plan_level): tiles under vehicles or belonging to other companies are left alone too.
    Link zu diesem Eintragfunc preview_level(rect: Rect2i, height: int, who: Company = null) -> Dictionary
    Parameter
    • rect: Rect2i
    • height: int
    • who: Company = null
    Rückgabewert
    Dictionary
    Ruft auf
    L.t, BuildOps.plan_level
    Deklariert in scripts/sim/sim.gd:1057
  • Sim.build_level funcLevels the eligible tiles in a rectangle to a target corner height, charges the construction cost, and records the change for undo.
    Link zu diesem Eintragfunc build_level(rect: Rect2i, height: int, who: Company = null) -> Dictionary

    Check the returned plan for skipped tiles.

    Parameter
    • rect: Rect2i
    • height: int
    • who: Company = null
    Rückgabewert
    Dictionary
    Ruft auf
    UndoStack.terraform_tiles, BuildOps.apply_level
    Deklariert in scripts/sim/sim.gd:1073
  • Sim._level_upsets_towns funcLevelling clears the trees on the tiles it reshapes, which the nearby councils mind the way they mind bulldozing them (see _bulldoze_upsets_towns).
    Link zu diesem Eintragfunc _level_upsets_towns(tiles: Array, who: Company) -> void
    Parameter
    • tiles: Array
    • who: Company
    Rückgabewert
    void
    Ruft auf
    Station.nearest_town, L.t
    Deklariert in scripts/sim/sim.gd:1090
  • Sim._bulldoze_upsets_towns funcKnocking down houses, tearing up town streets and clearing trees near a town hurts the company's standing with its council.
    Link zu diesem Eintragfunc _bulldoze_upsets_towns(r: Rect2i, who: Company) -> void

    Only what belongs to the town counts: houses, streets inside its built-up area, and trees in and just around it. Roads and woods out in the country are the company's own business.

    Parameter
    • r: Rect2i
    • who: Company
    Rückgabewert
    void
    Ruft auf
    BuildOps.bulldoze_target, Station.nearest_town, L.t
    Deklariert in scripts/sim/sim.gd:1109
  • Sim.council_news funcTell the player the moment a council turns against them (or comes round).
    Link zu diesem Eintragfunc council_news(t: Town, who: Company, was: float) -> void
    Parameter
    • t: Town
    • who: Company
    • was: float
    Rückgabewert
    void
    Ruft auf
    L.t, Town.rating_name
    Deklariert in scripts/sim/sim.gd:1141
  • Sim.council_refusal funcWhy a council refuses who near t, in words a player can act on.
    Link zu diesem Eintragfunc council_refusal(t: Town, who: Company) -> String
    Parameter
    • t: Town
    • who: Company
    Rückgabewert
    String
    Ruft auf
    L.t, Town.rating_name, L.lower
    Deklariert in scripts/sim/sim.gd:1153
  • Sim.town_action funcTown actions from the town window: "advertise", "trees" or "fund".
    Link zu diesem Eintragfunc town_action(t: Town, action: String, who: Company = null) -> Dictionary

    Returns {ok, reason, cost}.

    Parameter
    • t: Town
    • action: String
    • who: Company = null
    Rückgabewert
    Dictionary
    Ruft auf
    L.t, Fmt.money
    Deklariert in scripts/sim/sim.gd:1168
  • Sim.renew_vehicle funcCharges the owner the renewal price and resets the vehicle’s age, reliability, and last-service date.
    Link zu diesem Eintragfunc renew_vehicle(v: Vehicle, who: Company = null) -> Dictionary

    Check ok before reading the successful result’s cost.

    Parameter
    • v: Vehicle
    • who: Company = null
    Rückgabewert
    Dictionary
    Ruft auf
    L.t, Fmt.money, Data.reliability
    Deklariert in scripts/sim/sim.gd:1215
  • Sim.renew_price funcWhat renew_vehicle would charge for v right now.
    Link zu diesem Eintragfunc renew_price(v: Vehicle) -> int
    Parameter
    • v: Vehicle
    Rückgabewert
    int
    Deklariert in scripts/sim/sim.gd:1231
  • Sim.same_route static funcWhether two vehicles run the same route: the same company and kind of transport, calling at the same stations in the same order, wherever in the round each of them starts.
    Link zu diesem Eintragstatic func same_route(a: Vehicle, b: Vehicle) -> bool
    Parameter
    • a: Vehicle
    • b: Vehicle
    Rückgabewert
    bool
    Deklariert in scripts/sim/sim.gd:1239
  • Sim.vehicles_on_stops funcHow many of who's vehicles of kind call at exactly stops, in that order (wherever in the round each one starts), as same_route counts them.
    Link zu diesem Eintragfunc vehicles_on_stops(kind: String, stops: Array, who: Company) -> int
    Parameter
    • kind: String
    • stops: Array
    • who: Company
    Rückgabewert
    int
    Deklariert in scripts/sim/sim.gd:1258
  • Sim.route_vehicles funcEvery vehicle on v's route (see same_route), v included; for a vehicle on a line, every vehicle on that line.
    Link zu diesem Eintragfunc route_vehicles(v: Vehicle) -> Array
    Parameter
    • v: Vehicle
    Rückgabewert
    Array
    Deklariert in scripts/sim/sim.gd:1280
  • Sim.make_line funcTurn v's route into a line: v and every other vehicle of its company on the same route (see same_route) that isn't on a line yet join it.
    Link zu diesem Eintragfunc make_line(v: Vehicle, line_name: String = "") -> Line

    Returns the line.

    Parameter
    • v: Vehicle
    • line_name: String = ""
    Rückgabewert
    Line
    Deklariert in scripts/sim/sim.gd:1290
  • Sim.line_problem funcWhy v can't run ln's stops ("" when it can).
    Link zu diesem Eintragfunc line_problem(v: Vehicle, ln: Line) -> String
    Parameter
    • v: Vehicle
    • ln: Line
    Rückgabewert
    String
    Ruft auf
    L.t
    Deklariert in scripts/sim/sim.gd:1305
  • Sim.join_line funcPut v on line ln (it takes the line's stops).
    Link zu diesem Eintragfunc join_line(v: Vehicle, ln: Line) -> Dictionary

    Returns {"ok", "reason"}.

    Parameter
    • v: Vehicle
    • ln: Line
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/sim.gd:1314
  • Sim._put_on_line funcThe vehicle shares the line's order list and keeps heading for the stop it was heading for, when the line calls there too.
    Link zu diesem Eintragfunc _put_on_line(v: Vehicle, ln: Line) -> void
    Parameter
    • v: Vehicle
    • ln: Line
    Rückgabewert
    void
    Deklariert in scripts/sim/sim.gd:1327
  • Sim.leave_line funcTake v off its line: it keeps the stops as its own.
    Link zu diesem Eintragfunc leave_line(v: Vehicle) -> void
    Parameter
    • v: Vehicle
    Rückgabewert
    void
    Deklariert in scripts/sim/sim.gd:1340
  • Sim.set_line_orders funcGive line ln new stops (validated for every model running on it).
    Link zu diesem Eintragfunc set_line_orders(ln: Line, new_orders: Array) -> Dictionary

    The vehicles keep heading for the stop they were heading for where it is still on the line. Returns {"ok", "reason"}.

    Parameter
    • ln: Line
    • new_orders: Array
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/sim.gd:1350
  • Sim.set_vehicle_orders funcGive a vehicle new stops: its own, or (on a line) the whole line's.
    Link zu diesem Eintragfunc set_vehicle_orders(v: Vehicle, new_orders: Array, idx: int = -1) -> Dictionary

    Returns {"ok", "reason"}.

    Parameter
    • v: Vehicle
    • new_orders: Array
    • idx: int = -1
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/sim.gd:1381
  • Sim._stops_problem funcA line with no vehicles can still be checked for its stops: what check_orders asks of every model, without the model.
    Link zu diesem Eintragfunc _stops_problem(kind: String, stops: Array, who: Company) -> String
    Parameter
    • kind: String
    • stops: Array
    • who: Company
    Rückgabewert
    String
    Ruft auf
    L.t
    Deklariert in scripts/sim/sim.gd:1402
  • Sim.delete_line funcDelete a line: its vehicles keep running its stops, each on its own.
    Link zu diesem Eintragfunc delete_line(ln: Line) -> void
    Parameter
    • ln: Line
    Rückgabewert
    void
    Deklariert in scripts/sim/sim.gd:1419
  • Sim.buy_for_line funcBuy one more vehicle for line ln, like template (the same model, cargo and wagons).
    Link zu diesem Eintragfunc buy_for_line(ln: Line, template: Vehicle) -> Dictionary

    Returns buy_vehicle's answer.

    Parameter
    • ln: Line
    • template: Vehicle
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/sim.gd:1429
  • Sim.stop_line funcStop (or start again) every vehicle on a line.
    Link zu diesem Eintragfunc stop_line(ln: Line, stop: bool) -> void
    Parameter
    • ln: Line
    • stop: bool
    Rückgabewert
    void
    Deklariert in scripts/sim/sim.gd:1445
  • Sim.renew_line funcRenew every vehicle on a line that is past its working life.
    Link zu diesem Eintragfunc renew_line(ln: Line) -> Dictionary

    Returns {"n", "cost", "reason"}.

    Parameter
    • ln: Line
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/sim.gd:1454
  • Sim.line_by_id funcLooks for a line with the given ID in the simulation and returns null if no line matches.
    Link zu diesem Eintragfunc line_by_id(line_id: int) -> Line
    Parameter
    • line_id: int
    Rückgabewert
    Line
    Deklariert in scripts/sim/sim.gd:1470
  • Sim._index_of static func
    Link zu diesem Eintragstatic func _index_of(list: Array, st: Station, fallback: int) -> int
    Parameter
    • list: Array
    • st: Station
    • fallback: int
    Rückgabewert
    int

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/sim.gd:1477
  • Sim._mark_served func
    Link zu diesem Eintragfunc _mark_served(v: Vehicle) -> void
    Parameter
    • v: Vehicle
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/sim.gd:1487
  • Sim.route_text static funcA vehicle's route in a few words: "Ashford → Millbury".
    Link zu diesem Eintragstatic func route_text(v: Vehicle) -> String
    Parameter
    • v: Vehicle
    Rückgabewert
    String
    Deklariert in scripts/sim/sim.gd:1496
  • Sim.replace_plan funcWhat swapping v for a new model_id would take: the model must be of the same kind, on sale, able to carry what v carries and able to run its orders (wires for an electric train, a depot where depots are needed).
    Link zu diesem Eintragfunc replace_plan(v: Vehicle, model_id: String, checked: Dictionary = {}) -> Dictionary

    A train keeps its wagons, as many as the new engine pulls. Returns {"ok", "reason"} and, when it can be done, "price" (the new one, with its wagons), "trade_in" (what the old one is worth, as when it is sold), "cost" (the difference: negative when the old one is worth more) and "wagons". checked remembers the route checks between calls for vehicles of one route.

    Parameter
    • v: Vehicle
    • model_id: String
    • checked: Dictionary = {}
    Rückgabewert
    Dictionary
    Ruft auf
    Data.has_model, Data.model, L.t, Data.available, Data.intro_year
    Deklariert in scripts/sim/sim.gd:1513
  • Sim.replace_vehicle funcSwap a vehicle for a new one of another model, where it stands, as renew_vehicle does for the same model: it keeps its number, name, orders, cargo and history, and is new again.
    Link zu diesem Eintragfunc replace_vehicle(v: Vehicle, model_id: String, who: Company = null) -> Dictionary

    Charges the new price less what the old one is worth (see replace_plan, whose answer this returns).

    Parameter
    • v: Vehicle
    • model_id: String
    • who: Company = null
    Rückgabewert
    Dictionary
    Ruft auf
    L.t, Fmt.money
    Deklariert in scripts/sim/sim.gd:1540
  • Sim.replace_route_plan funcWhat replace_route would do: {"ok", "reason", "cost" (for all of them together), "vehicles" (the ones that would change), "costs" (for each of those), "skipped" (how many on the route can't take the model, say for their cargo; ones that already are that model aren't counted)}.
    Link zu diesem Eintragfunc replace_route_plan(v: Vehicle, model_id: String, checked: Dictionary = {}) -> Dictionary
    Parameter
    • v: Vehicle
    • model_id: String
    • checked: Dictionary = {}
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/sim.gd:1559
  • Sim.replace_route funcreplace_vehicle for every vehicle on v's route that can take the model (see same_route and replace_route_plan, whose answer this returns): all of them or, when the money isn't there, none.
    Link zu diesem Eintragfunc replace_route(v: Vehicle, model_id: String, who: Company = null) -> Dictionary

    The player is told in one news item.

    Parameter
    • v: Vehicle
    • model_id: String
    • who: Company = null
    Rückgabewert
    Dictionary
    Ruft auf
    L.t, Fmt.money, Data.model
    Deklariert in scripts/sim/sim.gd:1577
  • Sim._pay_vehicles funcPay for vehicles, or be paid when cost is negative (trading in for something cheaper).
    Link zu diesem Eintragfunc _pay_vehicles(who: Company, cost: int) -> void
    Parameter
    • who: Company
    • cost: int
    Rückgabewert
    void
    Deklariert in scripts/sim/sim.gd:1608
  • Sim._become funcThe swap itself: v becomes a brand-new model_id (what renew_vehicle resets, on a new model).
    Link zu diesem Eintragfunc _become(v: Vehicle, model_id: String) -> void
    Parameter
    • v: Vehicle
    • model_id: String
    Rückgabewert
    void
    Ruft auf
    Data.reliability
    Deklariert in scripts/sim/sim.gd:1617
  • Sim.AUTO_RENEW_MAX constMonth end, for the player's company when it has asked for it: renew vehicles past their working life (the ones the news warns about), oldest first, exactly as the Renew button would, while the cash left afterwards stays at or above the company's threshold.
    Link zu diesem Eintragconst AUTO_RENEW_MAX := 3

    At most AUTO_RENEW_MAX a month, so a fleet bought together doesn't empty the bank at once. Returns how many were renewed.

    Deklariert in scripts/sim/sim.gd:1629
  • Sim._auto_renew func
    Link zu diesem Eintragfunc _auto_renew() -> int
    Rückgabewert
    int
    Ruft auf
    L.t, Fmt.money

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/sim.gd:1630
  • Sim.refit_cost funcWhat changing a vehicle's cargo would cost.
    Link zu diesem Eintragfunc refit_cost(v: Vehicle, consist: Array) -> Dictionary

    consist: the cargo of each wagon for a train (front to back, so wagons can be added, dropped or mixed), one cargo for anything else. Returns {"ok", "reason", "cost"}: cost is negative when dropping wagons pays more than the rest costs.

    Parameter
    • v: Vehicle
    • consist: Array
    Rückgabewert
    Dictionary
    Ruft auf
    L.t
    Deklariert in scripts/sim/sim.gd:1664
  • Sim.refit_place funcWhere a change of cargo ordered now would be done: "now" (it is standing in one of its depots), "depot" (it goes to one after its next stop), "station" (at its next stop: ships, aircraft, and companies playing without depots that have none on the route) or "" (it needs a depot first).
    Link zu diesem Eintragfunc refit_place(v: Vehicle) -> String
    Parameter
    • v: Vehicle
    Rückgabewert
    String
    Deklariert in scripts/sim/sim.gd:1701
  • Sim.refit_plan funcrefit_cost plus "at", where the change would be done (see refit_place); refused when the vehicle needs a depot and none is linked to its route.
    Link zu diesem Eintragfunc refit_plan(v: Vehicle, consist: Array) -> Dictionary
    Parameter
    • v: Vehicle
    • consist: Array
    Rückgabewert
    Dictionary
    Ruft auf
    L.t
    Deklariert in scripts/sim/sim.gd:1714
  • Sim.refit_vehicle funcOrder a change of what a vehicle carries (see refit_cost) and pay for it.
    Link zu diesem Eintragfunc refit_vehicle(v: Vehicle, consist: Array, who: Company = null) -> Dictionary

    The vehicle delivers what it has at its next stop, takes nothing on and goes to a depot, where finish_refit does the work; its orders, age and history stay. An earlier order still waiting is replaced. Returns refit_plan's answer.

    Parameter
    • v: Vehicle
    • consist: Array
    • who: Company = null
    Rückgabewert
    Dictionary
    Ruft auf
    L.t, Fmt.money
    Deklariert in scripts/sim/sim.gd:1729
  • Sim.cancel_refit funcCall off a change of cargo that hasn't been done yet; returns the money given back.
    Link zu diesem Eintragfunc cancel_refit(v: Vehicle, who: Company = null) -> int
    Parameter
    • v: Vehicle
    • who: Company = null
    Rückgabewert
    int
    Deklariert in scripts/sim/sim.gd:1752
  • Sim.finish_refit funcDo the change of cargo a vehicle is waiting for (it has reached the depot).
    Link zu diesem Eintragfunc finish_refit(v: Vehicle) -> void
    Parameter
    • v: Vehicle
    Rückgabewert
    void
    Deklariert in scripts/sim/sim.gd:1765
  • Sim._occupied_tiles func
    Link zu diesem Eintragfunc _occupied_tiles() -> Dictionary
    Rückgabewert
    Dictionary

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/sim.gd:1779
  • Sim.check_orders funcCheck a vehicle order list: returns "" if fine, else why not.
    Link zu diesem Eintragfunc check_orders(model_id: String, cargo: String, stops: Array, who: Company) -> String
    Parameter
    • model_id: String
    • cargo: String
    • stops: Array
    • who: Company
    Rückgabewert
    String
    Ruft auf
    Data.model, L.t
    Deklariert in scripts/sim/sim.gd:1796
  • Sim.vehicle_price funcReturns the model purchase price plus the cost of the specified number of rail wagons.
    Link zu diesem Eintragfunc vehicle_price(model_id: String, wagons: int) -> int

    Non-rail models ignore the wagon count. It does not check funds, routes, or sale year.

    Parameter
    • model_id: String
    • wagons: int
    Rückgabewert
    int
    Ruft auf
    Data.model
    Deklariert in scripts/sim/sim.gd:1832
  • Sim.buy_vehicle funcBuys a model for a route of existing stations.
    Link zu diesem Eintragfunc buy_vehicle(model_id: String, cargo: String, wagons: int, stops: Array, full_load_first: bool, who: Company = null, consist: Array = [], transfer_at: Array = []) -> Dictionary

    full_load_first sets the first order’s load flag. consist is one cargo ID per wagon, from front to back; a nonempty rail consist replaces cargo and wagons. transfer_at is a list of zero-based stop indices. Check ok and read reason on failure. A successful purchase returns the new vehicle.

    Parameter
    • model_id: String
    • cargo: String
    • wagons: int
    • stops: Array
    • full_load_first: bool
    • who: Company = null
    • consist: Array = []
    • transfer_at: Array = []
    Rückgabewert
    Dictionary
    Ruft auf
    Data.model, L.t, Data.available, Data.intro_year, Fmt.money, Data.reliability, Mods.hook, BuildOps.dir_between
    Deklariert in scripts/sim/sim.gd:1840
  • Sim.depots_required func
    Link zu diesem Eintragfunc depots_required(who: Company) -> bool
    Parameter
    • who: Company
    Rückgabewert
    bool

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/sim.gd:1932
  • Sim.depot_tiles funcwho's depots for vehicles of kind (road or rail), as a set of tiles.
    Link zu diesem Eintragfunc depot_tiles(kind: String, who: Company) -> Dictionary
    Parameter
    • kind: String
    • who: Company
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/sim.gd:1937
  • Sim.find_depot funcThe nearest of who's depots that's linked to station st, or (-1, -1): the one a vehicle leaving st would drive to.
    Link zu diesem Eintragfunc find_depot(kind: String, st: Station, who: Company, wired: bool = false) -> Vector2i

    For the one a new vehicle drives out of, see depot_out.

    Parameter
    • kind: String
    • st: Station
    • who: Company
    • wired: bool = false
    Rückgabewert
    Vector2i
    Deklariert in scripts/sim/sim.gd:1948
  • Sim.depot_out funcThe nearest of who's depots that a new vehicle can drive out of to station st, or (-1, -1).
    Link zu diesem Eintragfunc depot_out(kind: String, st: Station, who: Company, wired: bool = false, obey_signals: bool = true) -> Vector2i

    Searched from the depot's door to the station, not the other way: one-way signals can let trains from a depot into a station and not back.

    Parameter
    • kind: String
    • st: Station
    • who: Company
    • wired: bool = false
    • obey_signals: bool = true
    Rückgabewert
    Vector2i
    Ruft auf
    Pathfinder.find
    Deklariert in scripts/sim/sim.gd:1958
  • Sim.route_from funcThe shortest route from station st to any of the goals tiles, as Pathfinder.find returns it ({} when there is none).
    Link zu diesem Eintragfunc route_from(kind: String, st: Station, goals: Dictionary, wired: bool = false, obey_signals: bool = true) -> Dictionary

    A station's platforms (or stops) needn't be joined to each other, so every separate one is tried: the route may leave from any of them.

    Parameter
    • kind: String
    • st: Station
    • goals: Dictionary
    • wired: bool = false
    • obey_signals: bool = true
    Rückgabewert
    Dictionary
    Ruft auf
    Pathfinder.find
    Deklariert in scripts/sim/sim.gd:1973
  • Sim.preview_electrify func
    Link zu diesem Eintragfunc preview_electrify(pts: Array[Vector2i], who: Company = null) -> Dictionary
    Parameter
    • pts: Array[Vector2i]
    • who: Company = null
    Rückgabewert
    Dictionary
    Ruft auf
    BuildOps.plan_electrify

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/sim.gd:1996
  • Sim.build_electrify func
    Link zu diesem Eintragfunc build_electrify(pts: Array[Vector2i], who: Company = null) -> Dictionary
    Parameter
    • pts: Array[Vector2i]
    • who: Company = null
    Rückgabewert
    Dictionary
    Ruft auf
    BuildOps.apply_electrify

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/sim.gd:2003
  • Sim.preview_depot func
    Link zu diesem Eintragfunc preview_depot(kind: String, t: Vector2i, facing: int, who: Company = null) -> Dictionary
    Parameter
    • kind: String
    • t: Vector2i
    • facing: int
    • who: Company = null
    Rückgabewert
    Dictionary
    Ruft auf
    BuildOps.plan_depot, Station.nearest_town

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/sim.gd:2014
  • Sim.build_depot func
    Link zu diesem Eintragfunc build_depot(kind: String, t: Vector2i, facing: int, who: Company = null) -> Dictionary
    Parameter
    • kind: String
    • t: Vector2i
    • facing: int
    • who: Company = null
    Rückgabewert
    Dictionary
    Ruft auf
    BuildOps.apply_depot

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/sim.gd:2031
  • Sim.sell_vehicle funcSell a vehicle.
    Link zu diesem Eintragfunc sell_vehicle(v: Vehicle, who: Company = null) -> int

    who must own it (defaults to the player); returns the refund, or -1 if refused.

    Parameter
    • v: Vehicle
    • who: Company = null
    Rückgabewert
    int
    Deklariert in scripts/sim/sim.gd:2048
  • Sim.company_vehicles funcReturns the vehicles owned by the supplied Company.
    Link zu diesem Eintragfunc company_vehicles(who: Company) -> Array

    The returned array can be filtered or reordered independently, but its vehicle objects are live.

    Parameter
    • who: Company
    Rückgabewert
    Array
    Deklariert in scripts/sim/sim.gd:2061
  • Sim.company_value funcCalculates cash minus loans plus vehicle resale value, station tile value, and owned track value.
    Link zu diesem Eintragfunc company_value(who: Company) -> int

    This is the value used for company comparisons.

    Parameter
    • who: Company
    Rückgabewert
    int
    Deklariert in scripts/sim/sim.gd:2065

Company

  • Company.COLORS const
    Link zu diesem Eintragconst COLORS

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/company.gd:5
  • Company.CATEGORIES const
    Link zu diesem Eintragconst CATEGORIES := ["construction", "vehicles", "running", "property", "infrastructure", "interest", "income"]

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/company.gd:8
  • Company.id var
    Link zu diesem Eintragvar id := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/company.gd:10
  • Company.name var
    Link zu diesem Eintragvar name := "Fourways Transport Co."

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/company.gd:11
  • Company.color var
    Link zu diesem Eintragvar color := Color(0.18, 0.45, 0.85)

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/company.gd:12
  • Company.is_ai var
    Link zu diesem Eintragvar is_ai := false

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/company.gd:13
  • Company.money varThe company’s current cash balance in game dollars.
    Link zu diesem Eintragvar money: int = Data.START_LOAN

    Use the accounting methods to change it when the transaction should appear in the ledger.

    Deklariert in scripts/sim/company.gd:14
  • Company.loan varThe company’s outstanding debt in game dollars.
    Link zu diesem Eintragvar loan: int = Data.START_LOAN

    Use borrow and repay to adjust cash and debt together.

    Deklariert in scripts/sim/company.gd:15
  • Company.ledger var
    Link zu diesem Eintragvar ledger := {}

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/company.gd:16
  • Company.ledger_last var
    Link zu diesem Eintragvar ledger_last := {}

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/company.gd:17
  • Company.founded_day var
    Link zu diesem Eintragvar founded_day := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/company.gd:18
  • Company.max_loan var
    Link zu diesem Eintragvar max_loan: int = Data.MAX_LOAN

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/company.gd:19
  • Company.rail_tiles vartiles of track owned (counted in company value)
    Link zu diesem Eintragvar rail_tiles := 0Deklariert in scripts/sim/company.gd:20
  • Company.history varmonthly company value, oldest first (last 120 months)
    Link zu diesem Eintragvar history: Array = []Deklariert in scripts/sim/company.gd:21
  • Company.months_in_red varconsecutive month-ends with a negative balance
    Link zu diesem Eintragvar months_in_red := 0Deklariert in scripts/sim/company.gd:22
  • Company.bankrupt var
    Link zu diesem Eintragvar bankrupt := false

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/company.gd:23
  • Company.month varthis month so far: "income", "spend" (all), "invest" (building and buying), "cargo": {c: [units, $]}
    Link zu diesem Eintragvar month := {}Deklariert in scripts/sim/company.gd:25
  • Company.months varclosed months, oldest first (last 24): {"income", "spend", "value", "cargo"}
    Link zu diesem Eintragvar months: Array = []Deklariert in scripts/sim/company.gd:26
  • Company.cargo_year varcargo -> [units, $] delivered this year
    Link zu diesem Eintragvar cargo_year := {}Deklariert in scripts/sim/company.gd:27
  • Company.cargo_last var
    Link zu diesem Eintragvar cargo_last := {}

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/company.gd:28
  • Company.kind_year varvehicle kind -> $ earned this year
    Link zu diesem Eintragvar kind_year := {}Deklariert in scripts/sim/company.gd:29
  • Company.kind_last var
    Link zu diesem Eintragvar kind_last := {}

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/company.gd:30
  • Company.years varclosed years, oldest first (last 60): see _year_row
    Link zu diesem Eintragvar years: Array = []Deklariert in scripts/sim/company.gd:31
  • Company.auto_renew var
    Link zu diesem Eintragvar auto_renew := false

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/company.gd:33
  • Company.auto_renew_keep varonly renew while this much cash is left afterwards
    Link zu diesem Eintragvar auto_renew_keep := 50000Deklariert in scripts/sim/company.gd:34
  • Company.auto_renew_reminded varthe year of the last "can't afford to renew" reminder
    Link zu diesem Eintragvar auto_renew_reminded := -1Deklariert in scripts/sim/company.gd:35
  • Company.record_month func
    Link zu diesem Eintragfunc record_month(value: int) -> void
    Parameter
    • value: int
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/company.gd:38
  • Company.note_delivery funcA delivery: units of cargo c paid pay, carried by a vehicle of kind.
    Link zu diesem Eintragfunc note_delivery(c: String, units: int, pay: int, kind: String) -> void
    Parameter
    • c: String
    • units: int
    • pay: int
    • kind: String
    Rückgabewert
    void
    Deklariert in scripts/sim/company.gd:50
  • Company._init func
    Link zu diesem Eintragfunc _init(p_id: int = 0, p_name: String = "Fourways Transport Co.") -> void
    Parameter
    • p_id: int = 0
    • p_name: String = "Fourways Transport Co."
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/company.gd:61
  • Company.can_afford funcChecks whether the company’s current cash covers cost.
    Link zu diesem Eintragfunc can_afford(cost: int) -> bool

    It does not borrow money or change its balance.

    Parameter
    • cost: int
    Rückgabewert
    bool
    Deklariert in scripts/sim/company.gd:70
  • Company.spend funcDeducts the cost from cash and records it in the category and monthly accounts.
    Link zu diesem Eintragfunc spend(cost: int, category: String) -> bool

    Returns false and leaves the accounts untouched if cash is insufficient. Typical categories include construction and vehicles.

    Parameter
    • cost: int
    • category: String
    Rückgabewert
    bool
    Deklariert in scripts/sim/company.gd:74
  • Company.charge funcCosts that are paid whether or not there is cash (running costs, interest).
    Link zu diesem Eintragfunc charge(cost: int, category: String) -> void
    Parameter
    • cost: int
    • category: String
    Rückgabewert
    void
    Deklariert in scripts/sim/company.gd:86
  • Company.earn funcAdds game dollars to cash and records the amount as income in the ledger and current month’s accounts.
    Link zu diesem Eintragfunc earn(amount: int) -> void
    Parameter
    • amount: int
    Rückgabewert
    void
    Deklariert in scripts/sim/company.gd:92
  • Company.borrow funcAdds up to amount to cash and debt, limited by the company’s remaining loan allowance.
    Link zu diesem Eintragfunc borrow(amount: int) -> bool

    Returns whether any money was borrowed.

    Parameter
    • amount: int
    Rückgabewert
    bool
    Deklariert in scripts/sim/company.gd:98
  • Company.repay funcRepays up to amount, limited by cash and outstanding debt.
    Link zu diesem Eintragfunc repay(amount: int) -> bool

    Returns whether a payment was made.

    Parameter
    • amount: int
    Rückgabewert
    bool
    Deklariert in scripts/sim/company.gd:107
  • Company.roll_year funcClose the books on year; value is the company value at its end.
    Link zu diesem Eintragfunc roll_year(year: int = 0, value: int = 0) -> void
    Parameter
    • year: int = 0
    • value: int = 0
    Rückgabewert
    void
    Deklariert in scripts/sim/company.gd:117
  • Company.profit funcCalculates net profit from a ledger dictionary by subtracting recorded expense categories from income.
    Link zu diesem Eintragfunc profit(l: Dictionary) -> int
    Parameter
    • l: Dictionary
    Rückgabewert
    int
    Deklariert in scripts/sim/company.gd:130
  • Company._year_row funcA ledger boiled down to one line of the yearly summary.
    Link zu diesem Eintragfunc _year_row(l: Dictionary, year: int, value: int) -> Dictionary
    Parameter
    • l: Dictionary
    • year: int
    • value: int
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/company.gd:139
  • Company.year_rows funcThe yearly summary, oldest first: every closed year, then the year in progress ("open": true).
    Link zu diesem Eintragfunc year_rows(year: int, month: int, value: int) -> Array

    year and month (0 = January) are today's, value the company value now. Saves from before the yearly records were kept still get last year's line, from last year's ledger.

    Parameter
    • year: int
    • month: int
    • value: int
    Rückgabewert
    Array
    Ruft auf
    Calendar.from_day
    Deklariert in scripts/sim/company.gd:149

Town

  • Town.id var
    Link zu diesem Eintragvar id := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:5
  • Town.name var
    Link zu diesem Eintragvar name := ""

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:6
  • Town.cx var
    Link zu diesem Eintragvar cx := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:7
  • Town.cy var
    Link zu diesem Eintragvar cy := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:8
  • Town.grid varroad spacing; houses fill the blocks between grid lines
    Link zu diesem Eintragvar grid := 3Deklariert in scripts/sim/town.gd:9
  • Town.pop var
    Link zu diesem Eintragvar pop := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:10
  • Town.house_count var
    Link zu diesem Eintragvar house_count := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:11
  • Town.grow_timer var
    Link zu diesem Eintragvar grow_timer := 30

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:12
  • Town.pax varpassengers generated this month
    Link zu diesem Eintragvar pax := 0.0Deklariert in scripts/sim/town.gd:13
  • Town.pax_moved var...and picked up by stations
    Link zu diesem Eintragvar pax_moved := 0.0Deklariert in scripts/sim/town.gd:14
  • Town.pax_last var
    Link zu diesem Eintragvar pax_last := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:15
  • Town.pax_moved_last var
    Link zu diesem Eintragvar pax_moved_last := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:16
  • Town.supplied vargoods and food delivered this month
    Link zu diesem Eintragvar supplied := 0.0Deklariert in scripts/sim/town.gd:17
  • Town.supplied_last var
    Link zu diesem Eintragvar supplied_last := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:18
  • Town.served_until vargame day until which the town counts as served
    Link zu diesem Eintragvar served_until := -1Deklariert in scripts/sim/town.gd:19
  • Town.dirty vartiles changed by growth since the view last redrew them
    Link zu diesem Eintragvar dirty := Rect2i()Deklariert in scripts/sim/town.gd:20
  • Town.ratings varLocal authority: how the council sees each company (company id -> 0..100), and town actions.
    Link zu diesem Eintragvar ratings := {}Deklariert in scripts/sim/town.gd:22
  • Town.advert varcompany id -> game day the advertising campaign ends
    Link zu diesem Eintragvar advert := {}Deklariert in scripts/sim/town.gd:23
  • Town.fund_until vargame day funded building ends
    Link zu diesem Eintragvar fund_until := -1Deklariert in scripts/sim/town.gd:24
  • Town.exclusive varRewards for meeting the council's requests (RAIL-24, Opportunities): the company with exclusive transport rights here (-1: none) and the day they end, and company id -> the day its half-price stations and depots end.
    Link zu diesem Eintragvar exclusive := -1Deklariert in scripts/sim/town.gd:28
  • Town.exclusive_until var
    Link zu diesem Eintragvar exclusive_until := -1

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:29
  • Town.cheap var
    Link zu diesem Eintragvar cheap := {}

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:30
  • Town.rating_log varWhy each company's rating moved lately: company id -> [{"day", "delta", "why"}], newest last.
    Link zu diesem Eintragvar rating_log := {}Deklariert in scripts/sim/town.gd:33
  • Town.RATING_START const
    Link zu diesem Eintragconst RATING_START := 60.0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:35
  • Town.RATING_REFUSE const
    Link zu diesem Eintragconst RATING_REFUSE := 30.0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:36
  • Town.COUNCIL_RADIUS const
    Link zu diesem Eintragconst COUNCIL_RADIUS := 18

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:37
  • Town.RATING_CRASH const
    Link zu diesem Eintragconst RATING_CRASH := -20.0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:38
  • Town.RATING_NEGLECT_FLOOR constNeglect alone never costs a company its building permission: it stops lowering the rating here.
    Link zu diesem Eintragconst RATING_NEGLECT_FLOOR := 40.0Deklariert in scripts/sim/town.gd:40
  • Town.RATING_HOUSE constWhat demolition costs, per tile.
    Link zu diesem Eintragconst RATING_HOUSE := -8.0

    Tree clearing in one bulldoze action never costs more than RATING_TREES_MAX, so cutting a strip for a railway is a nuisance, not a ban.

    Deklariert in scripts/sim/town.gd:43
  • Town.RATING_STREET const
    Link zu diesem Eintragconst RATING_STREET := -3.0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:44
  • Town.RATING_TREE const
    Link zu diesem Eintragconst RATING_TREE := -0.5

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:45
  • Town.RATING_TREES_MAX const
    Link zu diesem Eintragconst RATING_TREES_MAX := -6.0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:46
  • Town.BUSY_NOISE constHow far the noise of a busy industry lowers land values (Industry.BUSY, land_value).
    Link zu diesem Eintragconst BUSY_NOISE := 9.0Deklariert in scripts/sim/town.gd:48
  • Town.LOG_SIZE const
    Link zu diesem Eintragconst LOG_SIZE := 8

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:49
  • Town.rating funcReturns the council’s current rating for a company ID on the 0–100 scale.
    Link zu diesem Eintragfunc rating(cid: int) -> float

    Companies without a recorded rating receive the starting value.

    Parameter
    • cid: int
    Rückgabewert
    float
    Deklariert in scripts/sim/town.gd:52
  • Town.change_rating funcwhy (a short phrase such as "Demolished buildings") and day record the change in the rating log, so the town window can explain where a rating came from.
    Link zu diesem Eintragfunc change_rating(cid: int, delta: float, why: String = "", day: int = -1) -> void
    Parameter
    • cid: int
    • delta: float
    • why: String = ""
    • day: int = -1
    Rückgabewert
    void
    Deklariert in scripts/sim/town.gd:58
  • Town.is_street funcA town's own streets: roads inside the built-up area.
    Link zu diesem Eintragfunc is_street(x: int, y: int) -> bool

    Roads a company lays in open country aren't.

    Parameter
    • x: int
    • y: int
    Rückgabewert
    bool
    Deklariert in scripts/sim/town.gd:77
  • Town.rating_name static func
    Link zu diesem Eintragstatic func rating_name(r: float) -> String
    Parameter
    • r: float
    Rückgabewert
    String
    Ruft auf
    L.t

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:81
  • Town._mark func
    Link zu diesem Eintragfunc _mark(x: int, y: int) -> void
    Parameter
    • x: int
    • y: int
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:91
  • Town._init func
    Link zu diesem Eintragfunc _init(p_id: int, p_name: String, x: int, y: int, p_grid: int) -> void
    Parameter
    • p_id: int
    • p_name: String
    • x: int
    • y: int
    • p_grid: int
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:96
  • Town.roll_month func
    Link zu diesem Eintragfunc roll_month() -> void
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:104
  • Town.growth_interval funcDays between growth spurts: faster when served by stations and supplied with goods / food.
    Link zu diesem Eintragfunc growth_interval(day: int) -> int
    Parameter
    • day: int
    Rückgabewert
    int
    Ruft auf
    Data.era_index, Calendar.from_day
    Deklariert in scripts/sim/town.gd:117
  • Town.bounds funcTile rectangle the town's buildings occupy (used for redraws after growth).
    Link zu diesem Eintragfunc bounds() -> Rect2i
    Rückgabewert
    Rect2i
    Deklariert in scripts/sim/town.gd:131
  • Town.on_grid_x func
    Link zu diesem Eintragfunc on_grid_x(x: int) -> bool
    Parameter
    • x: int
    Rückgabewert
    bool

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:136
  • Town.on_grid_y func
    Link zu diesem Eintragfunc on_grid_y(y: int) -> bool
    Parameter
    • y: int
    Rückgabewert
    bool

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:140
  • Town.seed_roads funcThe initial crossroads at the town centre.
    Link zu diesem Eintragfunc seed_roads(m: WorldMap, rng: RandomNumberGenerator) -> void
    Parameter
    • m: WorldMap
    • rng: RandomNumberGenerator
    Rückgabewert
    void
    Ruft auf
    BuildOps.can_link_road, BuildOps.link_road
    Deklariert in scripts/sim/town.gd:145
  • Town.zone_pop varPeople by zone (kept up to date as buildings come and go), the street layout, and what this town needs most right now.
    Link zu diesem Eintragvar zone_pop := {"R": 0, "C": 0, "I": 0, "L": 0, "A": 0}Deklariert in scripts/sim/town.gd:159
  • Town.layout vargrid | organic
    Link zu diesem Eintragvar layout := "grid"Deklariert in scripts/sim/town.gd:160
  • Town.style varbuilding style: classic | tudor | mediterranean | nordic | brick
    Link zu diesem Eintragvar style := "classic"Deklariert in scripts/sim/town.gd:161
  • Town.landmarks varbuilding type -> true once built
    Link zu diesem Eintragvar landmarks := {}Deklariert in scripts/sim/town.gd:162
  • Town.pop_history varpopulation at each month end (last 36)
    Link zu diesem Eintragvar pop_history: Array = []Deklariert in scripts/sim/town.gd:163
  • Town.demand funcResidential / commercial / industrial demand, each -1..1 (SimCity's RCI meter).
    Link zu diesem Eintragfunc demand(day: int = -1) -> Vector3

    Homes follow jobs, shops follow residents and deliveries, workshops follow residents.

    Parameter
    • day: int = -1
    Rückgabewert
    Vector3
    Deklariert in scripts/sim/town.gd:168
  • Town._pick_zone func
    Link zu diesem Eintragfunc _pick_zone(rng: RandomNumberGenerator, day: int) -> String
    Parameter
    • rng: RandomNumberGenerator
    • day: int
    Rückgabewert
    String

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:180
  • Town.land_value funcLand value of a plot (roughly 0..100): the centre, busy stations, water, trees and landmarks raise it; industry and railway noise lower it.
    Link zu diesem Eintragfunc land_value(m: WorldMap, x: int, y: int, ctx: Dictionary) -> float

    ctx may carry "stations" (served station positions), "industries" and "busy" (positions of well-staffed industries, heard up to BUSY_NOISE tiles away: RAIL-28) from the sim.

    Parameter
    • m: WorldMap
    • x: int
    • y: int
    • ctx: Dictionary
    Rückgabewert
    float
    Deklariert in scripts/sim/town.gd:195
  • Town._type_for funcThe building a zone gets on a plot of this land value, in this year's style.
    Link zu diesem Eintragfunc _type_for(zone: String, lv: float, rng: RandomNumberGenerator, year: int = 1950) -> String
    Parameter
    • zone: String
    • lv: float
    • rng: RandomNumberGenerator
    • year: int = 1950
    Rückgabewert
    String
    Ruft auf
    Data.can_build
    Deklariert in scripts/sim/town.gd:240
  • Town.grow funcOne growth step: maybe a landmark, else a building for the zone in demand, a new street, or a rebuild into something denser where land has become valuable.
    Link zu diesem Eintragfunc grow(m: WorldMap, rng: RandomNumberGenerator, ctx: Dictionary = {}) -> bool
    Parameter
    • m: WorldMap
    • rng: RandomNumberGenerator
    • ctx: Dictionary = {}
    Rückgabewert
    bool
    Deklariert in scripts/sim/town.gd:267
  • Town._try_house func
    Link zu diesem Eintragfunc _try_house(m: WorldMap, x: int, y: int, rng: RandomNumberGenerator, zone: String = "R", ctx: Dictionary = {}) -> bool
    Parameter
    • m: WorldMap
    • x: int
    • y: int
    • rng: RandomNumberGenerator
    • zone: String = "R"
    • ctx: Dictionary = {}
    Rückgabewert
    bool
    Ruft auf
    BuildOps.can_build_house, Const.opp

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:290
  • Town._try_road func
    Link zu diesem Eintragfunc _try_road(m: WorldMap, x: int, y: int, rng: RandomNumberGenerator) -> bool
    Parameter
    • m: WorldMap
    • x: int
    • y: int
    • rng: RandomNumberGenerator
    Rückgabewert
    bool
    Ruft auf
    BuildOps.can_link_road, BuildOps.link_road

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:306
  • Town._organic_ok funcOrganic streets wander, but never run right alongside another street (which would leave no room for buildings).
    Link zu diesem Eintragfunc _organic_ok(m: WorldMap, x: int, y: int, d: int) -> bool
    Parameter
    • m: WorldMap
    • x: int
    • y: int
    • d: int
    Rückgabewert
    bool
    Deklariert in scripts/sim/town.gd:345
  • Town._try_upgrade func
    Link zu diesem Eintragfunc _try_upgrade(m: WorldMap, rng: RandomNumberGenerator, ctx: Dictionary = {}) -> bool
    Parameter
    • m: WorldMap
    • rng: RandomNumberGenerator
    • ctx: Dictionary = {}
    Rückgabewert
    bool

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:358
  • Town._try_landmark funcLandmarks arrive as the town grows: a church, then a park, then a town hall.
    Link zu diesem Eintragfunc _try_landmark(m: WorldMap, rng: RandomNumberGenerator) -> bool

    Attractions (cinema, museum, funfair, stadium, and a resort by the sea) follow as it gets bigger.

    Parameter
    • m: WorldMap
    • rng: RandomNumberGenerator
    Rückgabewert
    bool
    Deklariert in scripts/sim/town.gd:392
  • Town._place_landmark func
    Link zu diesem Eintragfunc _place_landmark(m: WorldMap, rng: RandomNumberGenerator, want: String) -> bool
    Parameter
    • m: WorldMap
    • rng: RandomNumberGenerator
    • want: String
    Rückgabewert
    bool
    Ruft auf
    BuildOps.can_build_house

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:418
  • Town._redevelop funcNo free plot: rebuild a modest building near the centre as the new landmark or attraction.
    Link zu diesem Eintragfunc _redevelop(m: WorldMap, rng: RandomNumberGenerator, want: String, r: int) -> bool
    Parameter
    • m: WorldMap
    • rng: RandomNumberGenerator
    • want: String
    • r: int
    Rückgabewert
    bool
    Deklariert in scripts/sim/town.gd:432
  • Town.pick_style static funcA town's building style, from where it stands: seaside towns lean Mediterranean, hill towns Nordic, the rest a mix.
    Link zu diesem Eintragstatic func pick_style(m: WorldMap, t: Town) -> String

    Derived from the name so it doesn't disturb world generation.

    Parameter
    • m: WorldMap
    • t: Town
    Rückgabewert
    String
    Deklariert in scripts/sim/town.gd:462
  • Town._near_sea func
    Link zu diesem Eintragfunc _near_sea(m: WorldMap) -> bool
    Parameter
    • m: WorldMap
    Rückgabewert
    bool

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:478
  • Town._place_attraction funcAttractions go on a free plot by a road: the stadium and funfair towards the edge of town, the resort by the water, the rest near the centre.
    Link zu diesem Eintragfunc _place_attraction(m: WorldMap, rng: RandomNumberGenerator, want: String) -> bool
    Parameter
    • m: WorldMap
    • rng: RandomNumberGenerator
    • want: String
    Rückgabewert
    bool
    Ruft auf
    BuildOps.can_build_house
    Deklariert in scripts/sim/town.gd:489
  • Town._water_distance func
    Link zu diesem Eintragfunc _water_distance(m: WorldMap, x: int, y: int) -> float
    Parameter
    • m: WorldMap
    • x: int
    • y: int
    Rückgabewert
    float

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:525
  • Town._set_building func
    Link zu diesem Eintragfunc _set_building(o: Dictionary, type: String, rng: RandomNumberGenerator) -> void
    Parameter
    • o: Dictionary
    • type: String
    • rng: RandomNumberGenerator
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:534
  • Town._count func
    Link zu diesem Eintragfunc _count(type: String, people: int) -> void
    Parameter
    • type: String
    • people: int
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:544
  • Town.remove_building funcRemove a building's people (it was demolished).
    Link zu diesem Eintragfunc remove_building(o: Dictionary) -> void
    Parameter
    • o: Dictionary
    Rückgabewert
    void
    Deklariert in scripts/sim/town.gd:551
  • Town.restore_building funcPut back a building's people (its demolition was undone): the opposite of remove_building.
    Link zu diesem Eintragfunc restore_building(o: Dictionary) -> void
    Parameter
    • o: Dictionary
    Rückgabewert
    void
    Deklariert in scripts/sim/town.gd:559
  • Town.recount funcRebuild the zone tallies from the map (after loading).
    Link zu diesem Eintragfunc recount(m: WorldMap) -> void
    Parameter
    • m: WorldMap
    Rückgabewert
    void
    Deklariert in scripts/sim/town.gd:567
  • Town.recount_all static funcrecount for every town of the map in one pass over its tiles.
    Link zu diesem Eintragstatic func recount_all(m: WorldMap) -> void
    Parameter
    • m: WorldMap
    Rückgabewert
    void
    Deklariert in scripts/sim/town.gd:578
  • Town.place_house funcPlace a house facing direction facing (towards its road).
    Link zu diesem Eintragfunc place_house(m: WorldMap, x: int, y: int, facing: int, type: String, rng: RandomNumberGenerator) -> void
    Parameter
    • m: WorldMap
    • x: int
    • y: int
    • facing: int
    • type: String
    • rng: RandomNumberGenerator
    Rückgabewert
    void
    Deklariert in scripts/sim/town.gd:592
  • Town.MODEST const
    Link zu diesem Eintragconst MODEST := ["cottage", "house", "shop", "modern", "workshop"]

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:619
  • Town.size_of static funcHow many tiles along each side a building of type takes.
    Link zu diesem Eintragstatic func size_of(type: String) -> int
    Parameter
    • type: String
    Rückgabewert
    int
    Deklariert in scripts/sim/town.gd:623
  • Town.building_at static funcThe town building on tile t, whichever of its tiles that is; null where there is none.
    Link zu diesem Eintragstatic func building_at(m: WorldMap, t: Vector2i) -> Variant
    Parameter
    • m: WorldMap
    • t: Vector2i
    Rückgabewert
    Variant
    Deklariert in scripts/sim/town.gd:628
  • Town.anchor_of static funcThe north-west tile of the building on t (t itself for a one-tile building).
    Link zu diesem Eintragstatic func anchor_of(m: WorldMap, t: Vector2i) -> Vector2i
    Parameter
    • m: WorldMap
    • t: Vector2i
    Rückgabewert
    Vector2i
    Deklariert in scripts/sim/town.gd:638
  • Town.footprint static funcEvery tile of the building whose north-west tile is anchor.
    Link zu diesem Eintragstatic func footprint(m: WorldMap, anchor: Vector2i) -> Array[Vector2i]
    Parameter
    • m: WorldMap
    • anchor: Vector2i
    Rückgabewert
    Array[Vector2i]
    Deklariert in scripts/sim/town.gd:644
  • Town.big_plot funcThe 2 x 2 plot for a big building whose front tile (x, y) faces a road in direction facing: it reaches one tile back from the road and one to either side, whichever is free.
    Link zu diesem Eintragfunc big_plot(m: WorldMap, x: int, y: int, facing: int, rebuild: bool = false) -> Rect2i

    With rebuild, a tile holding a modest building of this town counts as free (the building makes way). An empty rect where there is no room.

    Parameter
    • m: WorldMap
    • x: int
    • y: int
    • facing: int
    • rebuild: bool = false
    Rückgabewert
    Rect2i
    Deklariert in scripts/sim/town.gd:658
  • Town._plot_free func
    Link zu diesem Eintragfunc _plot_free(m: WorldMap, t: Vector2i, rebuild: bool) -> bool
    Parameter
    • m: WorldMap
    • t: Vector2i
    • rebuild: bool
    Rückgabewert
    bool
    Ruft auf
    BuildOps.can_build_house

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/town.gd:673
  • Town._place_big funcPut a big building on plot (see big_plot), facing facing.
    Link zu diesem Eintragfunc _place_big(m: WorldMap, plot: Rect2i, facing: int, type: String, rng: RandomNumberGenerator) -> void
    Parameter
    • m: WorldMap
    • plot: Rect2i
    • facing: int
    • type: String
    • rng: RandomNumberGenerator
    Rückgabewert
    void
    Deklariert in scripts/sim/town.gd:683
  • Town.restore_annexes static funcMark the other tiles of every big building (after loading: only its own tile is saved).
    Link zu diesem Eintragstatic func restore_annexes(m: WorldMap) -> void
    Parameter
    • m: WorldMap
    Rückgabewert
    void
    Deklariert in scripts/sim/town.gd:705
  • Town.enlarge_old_buildings static funcA game saved before big buildings has its stadium on a single tile.
    Link zu diesem Eintragstatic func enlarge_old_buildings(m: WorldMap) -> void

    Give each one its full plot where there is room behind it - modest buildings next door make way, as they do when a town builds a new one - and leave it small where roads or bigger buildings hem it in.

    Parameter
    • m: WorldMap
    Rückgabewert
    void
    Deklariert in scripts/sim/town.gd:720

Station

  • Station.CATCH_RAIL const
    Link zu diesem Eintragconst CATCH_RAIL := 4

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/station.gd:5
  • Station.CATCH_ROAD const
    Link zu diesem Eintragconst CATCH_ROAD := 3

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/station.gd:6
  • Station.CATCH_DOCK const
    Link zu diesem Eintragconst CATCH_DOCK := 4

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/station.gd:7
  • Station.CATCH_AIR const
    Link zu diesem Eintragconst CATCH_AIR := 5

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/station.gd:8
  • Station.TRANSFER_DISTANCE const
    Link zu diesem Eintragconst TRANSFER_DISTANCE := 3

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/station.gd:9
  • Station.SUFFIXES const
    Link zu diesem Eintragconst SUFFIXES

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/station.gd:10
  • Station.id var
    Link zu diesem Eintragvar id := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/station.gd:13
  • Station.name var
    Link zu diesem Eintragvar name := ""

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/station.gd:14
  • Station.tiles var
    Link zu diesem Eintragvar tiles: Array[Vector2i] = []

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/station.gd:15
  • Station.has_rail var
    Link zu diesem Eintragvar has_rail := false

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/station.gd:16
  • Station.has_road var
    Link zu diesem Eintragvar has_road := false

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/station.gd:17
  • Station.has_dock var
    Link zu diesem Eintragvar has_dock := false

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/station.gd:18
  • Station.has_air var
    Link zu diesem Eintragvar has_air := false

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/station.gd:19
  • Station.catchment vartile index -> true
    Link zu diesem Eintragvar catchment := {}Deklariert in scripts/sim/station.gd:20
  • Station.accepts varCargo IDs that can be delivered in this station’s catchment.
    Link zu diesem Eintragvar accepts: Array = []

    A vehicle can unload and earn a fare here for a supported cargo.

    Deklariert in scripts/sim/station.gd:21
  • Station.supplies varCargo IDs supplied by towns or industries in the station’s catchment.
    Link zu diesem Eintragvar supplies: Array = []

    Read waiting for the amount currently available to load.

    Deklariert in scripts/sim/station.gd:22
  • Station.deleted var
    Link zu diesem Eintragvar deleted := false

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/station.gd:23
  • Station.owner varThe company that owns the station.
    Link zu diesem Eintragvar owner: Company = null

    Can be null, for example at an oil rig dock. Use usable_by(company) to check access.

    Deklariert in scripts/sim/station.gd:24
  • Station.rig varThe industry out at sea this dock is built into (an oil rig), or null.
    Link zu diesem Eintragvar rig: Industry = null

    Such a dock belongs to nobody: every company's ships may call there, and it is never built or removed by hand.

    Deklariert in scripts/sim/station.gd:27
  • Station.town varthe town whose council looks after this station's area
    Link zu diesem Eintragvar town: Town = nullDeklariert in scripts/sim/station.gd:28
  • Station.attractions varattraction types inside the catchment (tourist fares)
    Link zu diesem Eintragvar attractions: Array = []Deklariert in scripts/sim/station.gd:29
  • Station.workers varan industry in reach employs passengers who come here (RAIL-28)
    Link zu diesem Eintragvar workers := falseDeklariert in scripts/sim/station.gd:30
  • Station.waiting varamount waiting (float)
    Link zu diesem Eintragvar waiting := {}Deklariert in scripts/sim/station.gd:33
  • Station.transfers varCargo left here by vehicles with a transfer order, for another vehicle to carry on (RAIL-20): [{"amt", "c", "from", "pos", "day", "credit"}], oldest first.
    Link zu diesem Eintragvar transfers: Array = []

    It is part of waiting too; these packets remember where and when it was first loaded, so the last leg is paid for the whole trip.

    Deklariert in scripts/sim/station.gd:37
  • Station.rating var0..1, share of nearby production this station receives
    Link zu diesem Eintragvar rating := {}Deklariert in scripts/sim/station.gd:38
  • Station.served vartrue once a vehicle with this cargo has orders here
    Link zu diesem Eintragvar served := {}Deklariert in scripts/sim/station.gd:39
  • Station.last_pickup vargame day of the last loading attempt
    Link zu diesem Eintragvar last_pickup := {}Deklariert in scripts/sim/station.gd:40
  • Station.last_speed varspeed of the last vehicle that loaded here (tiles/day)
    Link zu diesem Eintragvar last_speed := {}Deklariert in scripts/sim/station.gd:41
  • Station.last_age varage in years of the last vehicle that loaded here
    Link zu diesem Eintragvar last_age := {}Deklariert in scripts/sim/station.gd:42
  • Station.first_arrival var
    Link zu diesem Eintragvar first_arrival := true

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/station.gd:43
  • Station.match_told varthe player has had the news of this station's first match day
    Link zu diesem Eintragvar match_told := falseDeklariert in scripts/sim/station.gd:44
  • Station.last_visit vargame day a vehicle last called here
    Link zu diesem Eintragvar last_visit := -1.0Deklariert in scripts/sim/station.gd:45
  • Station.picked varcargo -> units loaded this month
    Link zu diesem Eintragvar picked := {}Deklariert in scripts/sim/station.gd:46
  • Station.picked_last var
    Link zu diesem Eintragvar picked_last := {}

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/station.gd:47
  • Station.delivered varcargo -> units unloaded (and paid for) this month
    Link zu diesem Eintragvar delivered := {}Deklariert in scripts/sim/station.gd:48
  • Station.delivered_last var
    Link zu diesem Eintragvar delivered_last := {}

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/station.gd:49
  • Station.earned varfares paid for deliveries here this month
    Link zu diesem Eintragvar earned := 0Deklariert in scripts/sim/station.gd:50
  • Station.earned_last var
    Link zu diesem Eintragvar earned_last := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/station.gd:51
  • Station.inflow varHow much of each cargo comes here in a month, as a running estimate (Economy._update_ratings): what waits beyond this slowly gives up (RAIL-56).
    Link zu diesem Eintragvar inflow := {}

    Production and transfers count; a match-day crowd doesn't, so the fans who can't get away go home over the following weeks.

    Deklariert in scripts/sim/station.gd:55
  • Station.arrived varcargo -> units come since the last production run
    Link zu diesem Eintragvar arrived := {}Deklariert in scripts/sim/station.gd:56
  • Station.catch_rect var
    Link zu diesem Eintragvar catch_rect := Rect2i()

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/station.gd:59
  • Station.house_ok var
    Link zu diesem Eintragvar house_ok := false

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/station.gd:60
  • Station._houses var
    Link zu diesem Eintragvar _houses := PackedInt32Array()

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/station.gd:61
  • Station.roll_month func
    Link zu diesem Eintragfunc roll_month() -> void
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/station.gd:64
  • Station._init func
    Link zu diesem Eintragfunc _init(p_id: int, p_name: String) -> void
    Parameter
    • p_id: int
    • p_name: String
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/station.gd:73
  • Station.tiles_of funcTiles vehicles of kind stop on: platforms, road stops, the water in front of a dock, the airfield.
    Link zu diesem Eintragfunc tiles_of(m: WorldMap, kind: String) -> Dictionary
    Parameter
    • m: WorldMap
    • kind: String
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/station.gd:79
  • Station.usable_by funcWhether who's vehicles may have orders here: its own stations and the open docks of oil rigs.
    Link zu diesem Eintragfunc usable_by(who: Company) -> bool
    Parameter
    • who: Company
    Rückgabewert
    bool
    Deklariert in scripts/sim/station.gd:100
  • Station.has_kind funcTests whether the station supports rail, road, water, or air.
    Link zu diesem Eintragfunc has_kind(kind: String) -> bool

    For ships use water, even though the construction kind for a dock is dock.

    Parameter
    • kind: String
    Rückgabewert
    bool
    Deklariert in scripts/sim/station.gd:104
  • Station.transfer_neighbors funcOther stations of the same company within TRANSFER_DISTANCE steps of any of our tiles.
    Link zu diesem Eintragfunc transfer_neighbors(m: WorldMap) -> Array[Station]
    Parameter
    • m: WorldMap
    Rückgabewert
    Array[Station]
    Deklariert in scripts/sim/station.gd:114
  • Station.transfer_amount funcUnits of c left here by transfers and still waiting.
    Link zu diesem Eintragfunc transfer_amount(c: String) -> int
    Parameter
    • c: String
    Rückgabewert
    int
    Deklariert in scripts/sim/station.gd:132
  • Station.add_transfer funcLeave cargo from a vehicle here for another to pick up (see Economy.unload).
    Link zu diesem Eintragfunc add_transfer(p: Dictionary) -> void
    Parameter
    • p: Dictionary
    Rückgabewert
    void
    Deklariert in scripts/sim/station.gd:141
  • Station.add_waiting funcCargo c comes here to wait: counted in waiting and in what arrives (see inflow).
    Link zu diesem Eintragfunc add_waiting(c: String, amt: float) -> void
    Parameter
    • c: String
    • amt: float
    Rückgabewert
    void
    Deklariert in scripts/sim/station.gd:147
  • Station.take_transfers funcTake up to n units of transferred c (oldest first), as packets to put on board.
    Link zu diesem Eintragfunc take_transfers(c: String, n: int) -> Array

    Waiting cargo that went away (a poor rating, the cap) takes the transferred share with it first.

    Parameter
    • c: String
    • n: int
    Rückgabewert
    Array
    Deklariert in scripts/sim/station.gd:154
  • Station.platform_len funcLength in tiles of the platform t is part of: the straight row of this station's rail tiles along the track through t (0 if t isn't one of them).
    Link zu diesem Eintragfunc platform_len(m: WorldMap, t: Vector2i) -> int
    Parameter
    • m: WorldMap
    • t: Vector2i
    Rückgabewert
    int
    Deklariert in scripts/sim/station.gd:185
  • Station.longest_platform funcThe longest of this station's platforms, in tiles (0 without any).
    Link zu diesem Eintragfunc longest_platform(m: WorldMap) -> int
    Parameter
    • m: WorldMap
    Rückgabewert
    int
    Deklariert in scripts/sim/station.gd:205
  • Station.air_pos funcWhere aircraft park: the middle of the runway.
    Link zu diesem Eintragfunc air_pos(m: WorldMap) -> Vector2
    Parameter
    • m: WorldMap
    Rückgabewert
    Vector2
    Deklariert in scripts/sim/station.gd:215
  • Station.is_runway static funcAirfields are 3 x 2 tiles: the runway is the first row (axis 0) or first column (axis 1).
    Link zu diesem Eintragstatic func is_runway(o: Dictionary) -> bool
    Parameter
    • o: Dictionary
    Rückgabewert
    bool
    Deklariert in scripts/sim/station.gd:227
  • Station.total_waiting funcSums the station’s waiting quantities across all cargo IDs and converts the result to a whole number.
    Link zu diesem Eintragfunc total_waiting() -> int

    For a single cargo read that key in waiting.

    Rückgabewert
    int
    Deklariert in scripts/sim/station.gd:232
  • Station.sign_pos funcReturns the average position of the station’s tile centers, in world tile coordinates.
    Link zu diesem Eintragfunc sign_pos() -> Vector2

    Useful for locating a news item on the map.

    Rückgabewert
    Vector2
    Deklariert in scripts/sim/station.gd:239
  • Station.stop_pos funcFor a road vehicle, point to the roadside stop even when it shares a station with other modes.
    Link zu diesem Eintragfunc stop_pos(m: WorldMap, kind: String) -> Vector2
    Parameter
    • m: WorldMap
    • kind: String
    Rückgabewert
    Vector2
    Deklariert in scripts/sim/station.gd:247
  • Station.refresh funcRecompute station type flags, catchment and what it accepts / supplies.
    Link zu diesem Eintragfunc refresh(m: WorldMap) -> void
    Parameter
    • m: WorldMap
    Rückgabewert
    void
    Deklariert in scripts/sim/station.gd:257
  • Station.refresh_coverage funcRecheck what reaches this station after its surroundings change.
    Link zu diesem Eintragfunc refresh_coverage(m: WorldMap) -> void
    Parameter
    • m: WorldMap
    Rückgabewert
    void
    Deklariert in scripts/sim/station.gd:300
  • Station.house_tiles funcThe tiles of the catchment with a house on them, in catchment order.
    Link zu diesem Eintragfunc house_tiles(m: WorldMap) -> PackedInt32Array
    Parameter
    • m: WorldMap
    Rückgabewert
    PackedInt32Array
    Deklariert in scripts/sim/station.gd:309
  • Station.add_catchment static func
    Link zu diesem Eintragstatic func add_catchment(m: WorldMap, catch: Dictionary, t: Vector2i, r: int) -> void
    Parameter
    • m: WorldMap
    • catch: Dictionary
    • t: Vector2i
    • r: int
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/station.gd:335
  • Station.coverage static funcWhat a catchment area accepts and supplies.
    Link zu diesem Eintragstatic func coverage(m: WorldMap, catch: Dictionary) -> Dictionary

    Towns accept passengers from 12 residents and goods / food from 60; houses supply passengers and mail (waste too, from the Late century). Some buildings take more in later eras, and so does every house of a big enough town (Data.TOWN_TAKES: electronics, cars). An industry that employs people takes passengers as workers and sends some home again ("workers": true).

    Parameter
    • m: WorldMap
    • catch: Dictionary
    Rückgabewert
    Dictionary
    Ruft auf
    Data.town_takes, Data.town_takes_by_size, Data.town_makes
    Deklariert in scripts/sim/station.gd:346
  • Station.nearest_town static func
    Link zu diesem Eintragstatic func nearest_town(m: WorldMap, p: Vector2, within: float) -> Town
    Parameter
    • m: WorldMap
    • p: Vector2
    • within: float
    Rückgabewert
    Town

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/station.gd:409
  • Station.make_name static func
    Link zu diesem Eintragstatic func make_name(m: WorldMap, at: Vector2i) -> String
    Parameter
    • m: WorldMap
    • at: Vector2i
    Rückgabewert
    String
    Ruft auf
    L.t

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/station.gd:420

Vehicle

  • Vehicle.LOCO_LEN const
    Link zu diesem Eintragconst LOCO_LEN := 0.56

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:8
  • Vehicle.CAR_LEN const
    Link zu diesem Eintragconst CAR_LEN := 0.5

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:9
  • Vehicle.RV_LEN const
    Link zu diesem Eintragconst RV_LEN := 0.46

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:10
  • Vehicle.SHIP_LEN const
    Link zu diesem Eintragconst SHIP_LEN := 0.9

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:11
  • Vehicle.PLANE_LEN const
    Link zu diesem Eintragconst PLANE_LEN := 0.7

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:12
  • Vehicle.CRUISE constflight altitude above the ground
    Link zu diesem Eintragconst CRUISE := 3.2Deklariert in scripts/sim/vehicle.gd:13
  • Vehicle.LOAD_RATE constunits moved per day while loading
    Link zu diesem Eintragconst LOAD_RATE := 40.0Deklariert in scripts/sim/vehicle.gd:14
  • Vehicle.LANE constroad vehicles keep right by this much
    Link zu diesem Eintragconst LANE := 0.12Deklariert in scripts/sim/vehicle.gd:15
  • Vehicle.ROAD_GAP constQueues (RAIL-26).
    Link zu diesem Eintragconst ROAD_GAP := 0.12

    A road vehicle keeps ROAD_GAP behind the one ahead in its lane and, stuck for ROAD_GIVE_UP days, drives through, so a jam always clears (as trains do at signals). A ship waits for a free berth and a plane holds for a free stand at most QUEUE_GIVE_UP days, then goes in anyway.

    Deklariert in scripts/sim/vehicle.gd:19
  • Vehicle.ROAD_GIVE_UP const
    Link zu diesem Eintragconst ROAD_GIVE_UP := 3.0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:20
  • Vehicle.QUEUE_GIVE_UP const
    Link zu diesem Eintragconst QUEUE_GIVE_UP := 15.0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:21
  • Vehicle.STANDS constaircraft an airport takes at a time
    Link zu diesem Eintragconst STANDS := 3Deklariert in scripts/sim/vehicle.gd:22
  • Vehicle.HOLD_AT consthow far out a plane asks for a stand: where it would start to descend
    Link zu diesem Eintragconst HOLD_AT := 5.0Deklariert in scripts/sim/vehicle.gd:23
  • Vehicle.HOLD_R constradius of the circle a plane holds on, at cruising height...
    Link zu diesem Eintragconst HOLD_R := 2.5Deklariert in scripts/sim/vehicle.gd:24
  • Vehicle.HOLD_STEP const...or that much wider, or twice that (see _hold_r)
    Link zu diesem Eintragconst HOLD_STEP := 0.7Deklariert in scripts/sim/vehicle.gd:25
  • Vehicle.HOLD_BANK consthow far it leans into that circle (radians)
    Link zu diesem Eintragconst HOLD_BANK := 0.35Deklariert in scripts/sim/vehicle.gd:26
  • Vehicle.ORDER_FLAGS constWhat an order can say besides "full": leave unaccepted cargo for another vehicle (RAIL-20); unload everything and take nothing on; deliver but take nothing on; call at a depot before the next stop (RAIL-36).
    Link zu diesem Eintragconst ORDER_FLAGS := ["transfer", "unload", "no_load", "depot"]

    Saved in this order (see SaveGame).

    Deklariert in scripts/sim/vehicle.gd:30
  • Vehicle.id var
    Link zu diesem Eintragvar id := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:32
  • Vehicle.name var
    Link zu diesem Eintragvar name := ""

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:33
  • Vehicle.model_id var
    Link zu diesem Eintragvar model_id := ""

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:34
  • Vehicle.model var
    Link zu diesem Eintragvar model: Dictionary

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:35
  • Vehicle.kind var
    Link zu diesem Eintragvar kind := "road"

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:36
  • Vehicle.cargo var
    Link zu diesem Eintragvar cargo := "pax"

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:37
  • Vehicle.wagons var
    Link zu diesem Eintragvar wagons := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:38
  • Vehicle.owner var
    Link zu diesem Eintragvar owner: Company

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:39
  • Vehicle.orders var[{"st": Station, "full": bool, and any of ORDER_FLAGS: bool (missing: false)}]
    Link zu diesem Eintragvar orders: Array = []Deklariert in scripts/sim/vehicle.gd:40
  • Vehicle.order_idx var
    Link zu diesem Eintragvar order_idx := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:41
  • Vehicle.state varloading | moving | lost | stopped | servicing | wrecked (see Sim.wrecks)
    Link zu diesem Eintragvar state := "loading"Deklariert in scripts/sim/vehicle.gd:43
  • Vehicle.status var
    Link zu diesem Eintragvar status := ""

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:44
  • Vehicle.timer var
    Link zu diesem Eintragvar timer := 0.0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:45
  • Vehicle.segs varpath history; the last one is the one the head is on
    Link zu diesem Eintragvar segs: Array = []Deklariert in scripts/sim/vehicle.gd:46
  • Vehicle.t varprogress along the last segment (0..1)
    Link zu diesem Eintragvar t := 1.0Deklariert in scripts/sim/vehicle.gd:47
  • Vehicle.route var
    Link zu diesem Eintragvar route: Array[Vector2i] = []

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:48
  • Vehicle.rp varindex in route of the tile the head is in
    Link zu diesem Eintragvar rp := 0Deklariert in scripts/sim/vehicle.gd:49
  • Vehicle.speed varcurrent speed, tiles per day
    Link zu diesem Eintragvar speed := 0.0Deklariert in scripts/sim/vehicle.gd:50
  • Vehicle.at_station var
    Link zu diesem Eintragvar at_station: Station = null

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:51
  • Vehicle.lost_ctx var
    Link zu diesem Eintragvar lost_ctx := {}

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:52
  • Vehicle.lost_tries var
    Link zu diesem Eintragvar lost_tries := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:53
  • Vehicle.cap var
    Link zu diesem Eintragvar cap := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:55
  • Vehicle.packets var[{"amt": int, "from": Station, "day": float}]
    Link zu diesem Eintragvar packets: Array = []Deklariert in scripts/sim/vehicle.gd:56
  • Vehicle.profit_this var
    Link zu diesem Eintragvar profit_this := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:57
  • Vehicle.profit_last var
    Link zu diesem Eintragvar profit_last := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:58
  • Vehicle.income_total var
    Link zu diesem Eintragvar income_total := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:59
  • Vehicle.age_days var
    Link zu diesem Eintragvar age_days := 0.0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:60
  • Vehicle.cost var
    Link zu diesem Eintragvar cost := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:61
  • Vehicle.trips var
    Link zu diesem Eintragvar trips := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:62
  • Vehicle.stopped_by_player var
    Link zu diesem Eintragvar stopped_by_player := false

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:63
  • Vehicle.sig_wait vardays spent waiting at a red signal or in front of a junction
    Link zu diesem Eintragvar sig_wait := 0.0Deklariert in scripts/sim/vehicle.gd:64
  • Vehicle.held_at varWhat the train waited at when it last moved: 0 nothing, 1 a signal, 2 a junction (RAIL-80).
    Link zu diesem Eintragvar held_at := 0Deklariert in scripts/sim/vehicle.gd:66
  • Vehicle.GIVE_UP_DAYS consta train held this long at a signal or junction is deadlocked
    Link zu diesem Eintragconst GIVE_UP_DAYS := 30.0Deklariert in scripts/sim/vehicle.gd:67
  • Vehicle._backoff_try varwhen it last tried turning round out of a deadlock
    Link zu diesem Eintragvar _backoff_try := -1000.0Deklariert in scripts/sim/vehicle.gd:68
  • Vehicle._backed_off_at varwhen it last did
    Link zu diesem Eintragvar _backed_off_at := -1000.0Deklariert in scripts/sim/vehicle.gd:69
  • Vehicle._forced_at varwhen it last went on anyway, unable to turn round
    Link zu diesem Eintragvar _forced_at := -1000.0Deklariert in scripts/sim/vehicle.gd:70
  • Vehicle._turned var_held_up turned it round just now (see _advance)
    Link zu diesem Eintragvar _turned := falseDeklariert in scripts/sim/vehicle.gd:71
  • Vehicle._detour_day varwhen it last looked for a way round a busy stretch (see _detour)
    Link zu diesem Eintragvar _detour_day := -1000.0Deklariert in scripts/sim/vehicle.gd:72
  • Vehicle.queue_wait vardays held up in a queue: in traffic, for a berth, or holding (RAIL-26)
    Link zu diesem Eintragvar queue_wait := 0.0Deklariert in scripts/sim/vehicle.gd:73
  • Vehicle.hold_a varaircraft holding over a full airport: its angle round the circle, -1 when not
    Link zu diesem Eintragvar hold_a := -1.0Deklariert in scripts/sim/vehicle.gd:74
  • Vehicle.old_warned var
    Link zu diesem Eintragvar old_warned := false

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:75
  • Vehicle.electric varneeds overhead wires (set from the model)
    Link zu diesem Eintragvar electric := falseDeklariert in scripts/sim/vehicle.gd:76
  • Vehicle.wagon_cargos vartrains: the cargo of each wagon, front to back (mixed trains)
    Link zu diesem Eintragvar wagon_cargos: Array = []Deklariert in scripts/sim/vehicle.gd:77
  • Vehicle.reliability var0..1; wears down day by day, restored by servicing
    Link zu diesem Eintragvar reliability := 1.0Deklariert in scripts/sim/vehicle.gd:78
  • Vehicle.last_service vargame day of the last service
    Link zu diesem Eintragvar last_service := 0.0Deklariert in scripts/sim/vehicle.gd:79
  • Vehicle.breakdowns var
    Link zu diesem Eintragvar breakdowns := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:80
  • Vehicle.broken vardays left standing broken down
    Link zu diesem Eintragvar broken := 0.0Deklariert in scripts/sim/vehicle.gd:81
  • Vehicle.service_to varthe depot it's heading to for servicing
    Link zu diesem Eintragvar service_to := Vector2i(-1, -1)Deklariert in scripts/sim/vehicle.gd:82
  • Vehicle.load_avg varrunning average of how full it leaves stations (0..1), -1 until known
    Link zu diesem Eintragvar load_avg := -1.0Deklariert in scripts/sim/vehicle.gd:83
  • Vehicle.last_trip varlast paid delivery: {"pay", "units", "day", "st"}
    Link zu diesem Eintragvar last_trip := {}Deklariert in scripts/sim/vehicle.gd:84
  • Vehicle.look_rev vargoes up when a refit changes how it looks (the view redraws it)
    Link zu diesem Eintragvar look_rev := 0Deklariert in scripts/sim/vehicle.gd:85
  • Vehicle.refit_to vara change of cargo ordered and paid for, done at the depot (see refit)
    Link zu diesem Eintragvar refit_to: Array = []Deklariert in scripts/sim/vehicle.gd:86
  • Vehicle.refit_paid varwhat ordering it cost (given back if it is cancelled)
    Link zu diesem Eintragvar refit_paid := 0Deklariert in scripts/sim/vehicle.gd:87
  • Vehicle.stuck_cargo vara cargo on board that no stop in the orders accepts (see _check_stuck)
    Link zu diesem Eintragvar stuck_cargo := ""Deklariert in scripts/sim/vehicle.gd:88
  • Vehicle.stuck_stops varstops it has called at with that cargo on board, undelivered
    Link zu diesem Eintragvar stuck_stops := 0Deklariert in scripts/sim/vehicle.gd:89
  • Vehicle.stuck_news vargame day the player was last told about it (-1: never)
    Link zu diesem Eintragvar stuck_news := -1Deklariert in scripts/sim/vehicle.gd:90
  • Vehicle.line varthe line it runs on (its orders are then the line's), or null
    Link zu diesem Eintragvar line: Line = nullDeklariert in scripts/sim/vehicle.gd:91
  • Vehicle.lap_start vargame day it last left its line's first stop (-1: not yet)
    Link zu diesem Eintragvar lap_start := -1.0Deklariert in scripts/sim/vehicle.gd:92
  • Vehicle.held vardays held at the first stop this round to keep the line evenly spaced
    Link zu diesem Eintragvar held := 0.0Deklariert in scripts/sim/vehicle.gd:93
  • Vehicle.air_from var
    Link zu diesem Eintragvar air_from := Vector2.ZERO

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:95
  • Vehicle.air_to var
    Link zu diesem Eintragvar air_to := Vector2.ZERO

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:96
  • Vehicle.air_d var
    Link zu diesem Eintragvar air_d := 0.0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:97
  • Vehicle.air_y0 var
    Link zu diesem Eintragvar air_y0 := 0.0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:98
  • Vehicle.air_y1 var
    Link zu diesem Eintragvar air_y1 := 0.0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:99
  • Vehicle._accel varacceleration as a multiple of the top speed, by kind
    Link zu diesem Eintragvar _accel := 2.5Deklariert in scripts/sim/vehicle.gd:101
  • Vehicle._len varlength of a road vehicle, ship or aircraft (of model _len_of)
    Link zu diesem Eintragvar _len := -1.0Deklariert in scripts/sim/vehicle.gd:102
  • Vehicle._len_of var
    Link zu diesem Eintragvar _len_of := ""

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:103
  • Vehicle._back_u varsecond result of _back_i
    Link zu diesem Eintragvar _back_u := 0.0Deklariert in scripts/sim/vehicle.gd:104
  • Vehicle._routes varroutes found before, by order (see _find)
    Link zu diesem Eintragvar _routes := {}Deklariert in scripts/sim/vehicle.gd:105
  • Vehicle._fit vartrains: the share of the train alongside the platform it stands at
    Link zu diesem Eintragvar _fit := 1.0Deklariert in scripts/sim/vehicle.gd:106
  • Vehicle._course varships: the straight course route follows (see water_course), {} for none
    Link zu diesem Eintragvar _course := {}Deklariert in scripts/sim/vehicle.gd:107
  • Vehicle._queued varheld up in a queue this step (counts towards queue_wait)
    Link zu diesem Eintragvar _queued := falseDeklariert in scripts/sim/vehicle.gd:108
  • Vehicle._blocked_by varroad vehicles: id of the one it is keeping behind (0: none)
    Link zu diesem Eintragvar _blocked_by := 0Deklariert in scripts/sim/vehicle.gd:109
  • Vehicle.route_cache static varSwitch for the tests: with it off every departure searches for its route again.
    Link zu diesem Eintragstatic var route_cache := trueDeklariert in scripts/sim/vehicle.gd:111
  • Vehicle._seg_cache static varmake_seg results by tile, sides and shape
    Link zu diesem Eintragstatic var _seg_cache := {}Deklariert in scripts/sim/vehicle.gd:112
  • Vehicle.SEG_CACHE_MAX const
    Link zu diesem Eintragconst SEG_CACHE_MAX := 200000

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:113
  • Vehicle._init func
    Link zu diesem Eintragfunc _init(p_id: int, p_model: String, p_cargo: String, p_wagons: int, p_owner: Company) -> void
    Parameter
    • p_id: int
    • p_model: String
    • p_cargo: String
    • p_wagons: int
    • p_owner: Company
    Rückgabewert
    void
    Ruft auf
    Data.model, Data.wagon_cap

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:116
  • Vehicle._default_name funcThe name a vehicle gets when bought: what it is and its number.
    Link zu diesem Eintragfunc _default_name() -> String
    Rückgabewert
    String
    Ruft auf
    L.t
    Deklariert in scripts/sim/vehicle.gd:135
  • Vehicle.load_amount func
    Link zu diesem Eintragfunc load_amount() -> int
    Rückgabewert
    int

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:145
  • Vehicle.set_consist funcA train's wagons, one cargo each (front to back).
    Link zu diesem Eintragfunc set_consist(list: Array) -> void

    cargo becomes the first wagon's.

    Parameter
    • list: Array
    Rückgabewert
    void
    Ruft auf
    Data.wagon_cap
    Deklariert in scripts/sim/vehicle.gd:153
  • Vehicle.refit funcChange what the vehicle carries: a train's wagons (one cargo each, front to back) or the one cargo of anything else.
    Link zu diesem Eintragfunc refit(list: Array, m: WorldMap = null) -> void

    Cargo on board that no longer has room is lost. Sim.refit_vehicle orders it and Sim.finish_refit calls this once the vehicle is at a depot.

    Parameter
    • list: Array
    • m: WorldMap = null
    Rückgabewert
    void
    Deklariert in scripts/sim/vehicle.gd:168
  • Vehicle._trim_load funcDrop what no longer fits on board (was: the cargo of packets from before they were labelled).
    Link zu diesem Eintragfunc _trim_load(was: String) -> void
    Parameter
    • was: String
    Rückgabewert
    void
    Deklariert in scripts/sim/vehicle.gd:187
  • Vehicle.change_model funcBecome another model of the same kind, where it stands (see Sim.replace_vehicle, which checks that the model can carry its cargo and run its route).
    Link zu diesem Eintragfunc change_model(p_model: String) -> void

    A train keeps its wagons, as many as the new engine pulls; anything else gets the new model's capacity. Cargo without room is lost.

    Parameter
    • p_model: String
    Rückgabewert
    void
    Ruft auf
    Data.model, Data.wagon_cap
    Deklariert in scripts/sim/vehicle.gd:205
  • Vehicle._grow_tail funcLay more history behind the tail, following the track, so a train that just got longer has somewhere to stand (the same walk spawn does).
    Link zu diesem Eintragfunc _grow_tail(m: WorldMap) -> void
    Parameter
    • m: WorldMap
    Rückgabewert
    void
    Ruft auf
    Const.opp
    Deklariert in scripts/sim/vehicle.gd:228
  • Vehicle.cargos funcThe cargos this vehicle carries (several for a mixed train).
    Link zu diesem Eintragfunc cargos() -> Array
    Rückgabewert
    Array
    Deklariert in scripts/sim/vehicle.gd:263
  • Vehicle.is_mixed func
    Link zu diesem Eintragfunc is_mixed() -> bool
    Rückgabewert
    bool

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:273
  • Vehicle.cap_of funcReturns the capacity for one cargo ID.
    Link zu diesem Eintragfunc cap_of(c: String) -> int

    For mixed trains, it counts only wagons assigned to that cargo. A cargo the vehicle cannot currently carry has capacity zero.

    Parameter
    • c: String
    Rückgabewert
    int
    Ruft auf
    Data.wagon_cap
    Deklariert in scripts/sim/vehicle.gd:277
  • Vehicle.load_of funcAdds up the units in the vehicle’s cargo packets for one cargo ID.
    Link zu diesem Eintragfunc load_of(c: String) -> int

    This is the current load, rather than available room.

    Parameter
    • c: String
    Rückgabewert
    int
    Deklariert in scripts/sim/vehicle.gd:287
  • Vehicle.running_cost funcReturns the annual running cost of the model plus its wagons.
    Link zu diesem Eintragfunc running_cost() -> int
    Rückgabewert
    int
    Deklariert in scripts/sim/vehicle.gd:295
  • Vehicle.life_years funcReturns the usual service life in years for the vehicle’s transport kind.
    Link zu diesem Eintragfunc life_years() -> int
    Rückgabewert
    int
    Deklariert in scripts/sim/vehicle.gd:299
  • Vehicle.is_old funcChecks whether the vehicle’s age in days exceeds its service life in years, using 365 days per year.
    Link zu diesem Eintragfunc is_old() -> bool
    Rückgabewert
    bool
    Deklariert in scripts/sim/vehicle.gd:303
  • Vehicle.value funcReturns the current resale value in dollars.
    Link zu diesem Eintragfunc value() -> int

    The value falls with age and bottoms out at 15 percent of purchase cost.

    Rückgabewert
    int
    Deklariert in scripts/sim/vehicle.gd:307
  • Vehicle.max_speed funcReturns the model’s maximum speed in tiles per game day.
    Link zu diesem Eintragfunc max_speed() -> float

    Steam trains lose three percent of model speed per wagon in this calculation.

    Rückgabewert
    float
    Deklariert in scripts/sim/vehicle.gd:311
  • Vehicle.train_length func
    Link zu diesem Eintragfunc train_length() -> float
    Rückgabewert
    float

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:318
  • Vehicle.tiles_long static funcHow many platform tiles a train with n_wagons wagons needs to stand alongside in full.
    Link zu diesem Eintragstatic func tiles_long(n_wagons: int) -> int

    A buffer's worth of overhang (OVERHANG_OK) doesn't count: two wagons a tile, less one for the engine, so 3 tiles take 5 wagons.

    Parameter
    • n_wagons: int
    Rückgabewert
    int
    Deklariert in scripts/sim/vehicle.gd:330
  • Vehicle.OVERHANG_OK const
    Link zu diesem Eintragconst OVERHANG_OK := 0.1

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:334
  • Vehicle.platform_fit static funcThe share of a train of length tiles that is alongside a platform of platform tiles.
    Link zu diesem Eintragstatic func platform_fit(length: float, platform: int) -> float

    Only those wagons load and unload at a time, so loading a train longer than the platform takes longer (the rest are drawn up in turns) while its back wagons stick out onto the line behind (RAIL-18).

    Parameter
    • length: float
    • platform: int
    Rückgabewert
    float
    Deklariert in scripts/sim/vehicle.gd:340
  • Vehicle.body_len static funcLength of a road vehicle, ship or aircraft of this model (see Data.LENGTH).
    Link zu diesem Eintragstatic func body_len(id: String) -> float
    Parameter
    • id: String
    Rückgabewert
    float
    Ruft auf
    Data.model, Data.look
    Deklariert in scripts/sim/vehicle.gd:347
  • Vehicle.dest func
    Link zu diesem Eintragfunc dest() -> Station
    Rückgabewert
    Station

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:356
  • Vehicle._edge static func
    Link zu diesem Eintragstatic func _edge(t: Vector2i, d: int) -> Vector2
    Parameter
    • t: Vector2i
    • d: int
    Rückgabewert
    Vector2

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:362
  • Vehicle._center static func
    Link zu diesem Eintragstatic func _center(t: Vector2i) -> Vector2
    Parameter
    • t: Vector2i
    Rückgabewert
    Vector2

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:366
  • Vehicle.make_seg static funcA segment crossing tile t, entering through side a and leaving through side b (-1 means starting or stopping at the tile centre).
    Link zu diesem Eintragstatic func make_seg(t: Vector2i, a: int, b: int, chord: int = 0) -> Dictionary

    chord: the piece's shape (see WorldMap.piece_shape) when it is part of a diagonal run or eases into one; the piece is then a cubic curve.

    Parameter
    • t: Vector2i
    • a: int
    • b: int
    • chord: int = 0
    Rückgabewert
    Dictionary
    Ruft auf
    Const.opp, WorldMap.piece_curve
    Deklariert in scripts/sim/vehicle.gd:374
  • Vehicle._seg_len static func
    Link zu diesem Eintragstatic func _seg_len(s: Dictionary) -> float
    Parameter
    • s: Dictionary
    Rückgabewert
    float

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:404
  • Vehicle.seg_pos static func
    Link zu diesem Eintragstatic func seg_pos(s: Dictionary, u: float) -> Vector2
    Parameter
    • s: Dictionary
    • u: float
    Rückgabewert
    Vector2

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:414
  • Vehicle.seg_dir static funcThe way along segment s at u (not normalised; zero only half-way round a U-turn).
    Link zu diesem Eintragstatic func seg_dir(s: Dictionary, u: float) -> Vector2
    Parameter
    • s: Dictionary
    • u: float
    Rückgabewert
    Vector2
    Deklariert in scripts/sim/vehicle.gd:426
  • Vehicle.rev_seg static func
    Link zu diesem Eintragstatic func rev_seg(s: Dictionary) -> Dictionary
    Parameter
    • s: Dictionary
    Rückgabewert
    Dictionary
    Ruft auf
    WorldMap.flip_shape

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:437
  • Vehicle._seg funcA segment through tile t that knows whether it's part of a diagonal run.
    Link zu diesem Eintragfunc _seg(m: WorldMap, t: Vector2i, a: int, b: int) -> Dictionary
    Parameter
    • m: WorldMap
    • t: Vector2i
    • a: int
    • b: int
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/vehicle.gd:442
  • Vehicle.SEA_ROOM constHow far a ship's straight leg keeps from land on either side (tiles).
    Link zu diesem Eintragconst SEA_ROOM := 0.3Deklariert in scripts/sim/vehicle.gd:449
  • Vehicle.water_course static funcShips aren't held to the grid: they sail straight legs across open water, which bend only where something is in the way.
    Link zu diesem Eintragstatic func water_course(m: WorldMap, tiles: Array) -> Dictionary

    tiles is a route of neighbouring sailable tiles (a Pathfinder answer); the course runs between its ends along the shortest way by water (Pathfinder.find_sea), pulled tight. Returns {"tiles": the tiles the legs pass through, neighbours again, "cross": where the course enters each of them (the first: its centre), "turn": 1 at each tile where two legs meet}.

    Parameter
    • m: WorldMap
    • tiles: Array
    Rückgabewert
    Dictionary
    Ruft auf
    Pathfinder.find_sea
    Deklariert in scripts/sim/vehicle.gd:457
  • Vehicle._sea_clear static funcWhether a ship can sail straight from the centre of tile a to the centre of tile b, keeping SEA_ROOM clear of anything that isn't open water.
    Link zu diesem Eintragstatic func _sea_clear(m: WorldMap, a: Vector2i, b: Vector2i) -> bool
    Parameter
    • m: WorldMap
    • a: Vector2i
    • b: Vector2i
    Rückgabewert
    bool
    Deklariert in scripts/sim/vehicle.gd:498
  • Vehicle._walk_line static funcThe tiles a straight line from p to q passes through after the first, in order and each the neighbour of the one before (through a corner it goes across first), appended to tiles, and where it enters each one appended to cross.
    Link zu diesem Eintragstatic func _walk_line(p: Vector2, q: Vector2, tiles: Array[Vector2i], cross: PackedVector2Array) -> void
    Parameter
    • p: Vector2
    • q: Vector2
    • tiles: Array[Vector2i]
    • cross: PackedVector2Array
    Rückgabewert
    void
    Deklariert in scripts/sim/vehicle.gd:515
  • Vehicle.course_seg static funcThe piece of a ship's course (see water_course) in its kth tile.
    Link zu diesem Eintragstatic func course_seg(c: Dictionary, k: int, a: int = -2, from: Variant = null) -> Dictionary

    a: the side it comes in by (-2: from the course, -1: from the tile centre); from: where it starts instead of the course's own entry point (a ship turning onto a new course mid-tile).

    Parameter
    • c: Dictionary
    • k: int
    • a: int = -2
    • from: Variant = null
    Rückgabewert
    Dictionary
    Ruft auf
    Const.opp, BuildOps.dir_between
    Deklariert in scripts/sim/vehicle.gd:552
  • Vehicle.free_seg static funcA segment through tile t (sides a to b) along any curve: from p0 to p2, pulled towards c.
    Link zu diesem Eintragstatic func free_seg(t: Vector2i, a: int, b: int, p0: Vector2, c: Vector2, p2: Vector2) -> Dictionary
    Parameter
    • t: Vector2i
    • a: int
    • b: int
    • p0: Vector2
    • c: Vector2
    • p2: Vector2
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/vehicle.gd:569
  • Vehicle.course_segs static funcEvery piece of a ship's course, first to last.
    Link zu diesem Eintragstatic func course_segs(c: Dictionary) -> Array
    Parameter
    • c: Dictionary
    Rückgabewert
    Array
    Deklariert in scripts/sim/vehicle.gd:576
  • Vehicle._set_route funcSet off along tiles (from the head's tile): a ship's course is pulled straight first.
    Link zu diesem Eintragfunc _set_route(m: WorldMap, tiles: Array[Vector2i]) -> void
    Parameter
    • m: WorldMap
    • tiles: Array[Vector2i]
    Rückgabewert
    void
    Deklariert in scripts/sim/vehicle.gd:584
  • Vehicle._first_seg funcThe first piece of a new route, from where the head is now.
    Link zu diesem Eintragfunc _first_seg(m: WorldMap, a: int) -> Dictionary
    Parameter
    • m: WorldMap
    • a: int
    Rückgabewert
    Dictionary
    Ruft auf
    BuildOps.dir_between
    Deklariert in scripts/sim/vehicle.gd:594
  • Vehicle._pos_back funcWalk d back from the head along the history: {"i": segment index, "u": position in it}.
    Link zu diesem Eintragfunc _pos_back(d: float) -> Dictionary
    Parameter
    • d: float
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/vehicle.gd:605
  • Vehicle._back_i funcThe same walk as _pos_back without building a Dictionary: returns the segment index and leaves the position in it in _back_u.
    Link zu diesem Eintragfunc _back_i(d: float) -> int
    Parameter
    • d: float
    Rückgabewert
    int
    Deklariert in scripts/sim/vehicle.gd:623
  • Vehicle.pos_at funcPosition d behind the nose, or Vector2.INF for a hidden segment when it is excluded.
    Link zu diesem Eintragfunc pos_at(d: float, include_hidden: bool = true) -> Vector2
    Parameter
    • d: float
    • include_hidden: bool = true
    Rückgabewert
    Vector2
    Deklariert in scripts/sim/vehicle.gd:642
  • Vehicle.body_points funcPoints every step along the train from the nose to the tail (both included), leaving out the part still inside a depot shed.
    Link zu diesem Eintragfunc body_points(step: float) -> PackedVector2Array

    For crash checks (see Sim._check_crashes).

    Parameter
    • step: float
    Rückgabewert
    PackedVector2Array
    Deklariert in scripts/sim/vehicle.gd:651
  • Vehicle.heading funcDirection of travel in the current tile (0..3).
    Link zu diesem Eintragfunc heading() -> int
    Rückgabewert
    int
    Ruft auf
    Const.opp
    Deklariert in scripts/sim/vehicle.gd:663
  • Vehicle.head_tile func
    Link zu diesem Eintragfunc head_tile() -> Vector2i
    Rückgabewert
    Vector2i

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:674
  • Vehicle.spawn funcPlace the vehicle stopped at the centre of station tile tile, facing direction facing.
    Link zu diesem Eintragfunc spawn(tile: Vector2i, facing: int, m: WorldMap = null, hide_behind: bool = false) -> void

    A train's wagons are laid back along the actual track where there is some.

    Parameter
    • tile: Vector2i
    • facing: int
    • m: WorldMap = null
    • hide_behind: bool = false
    Rückgabewert
    void
    Ruft auf
    Const.opp
    Deklariert in scripts/sim/vehicle.gd:684
  • Vehicle.update func
    Link zu diesem Eintragfunc update(sim: Sim, dt: float) -> void
    Parameter
    • sim: Sim
    • dt: float
    Rückgabewert
    void
    Ruft auf
    L.t

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:724
  • Vehicle._remaining func
    Link zu diesem Eintragfunc _remaining() -> float
    Rückgabewert
    float

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:763
  • Vehicle._on_course funcWhether the ship is following a course worked out for its route (not one from an older save).
    Link zu diesem Eintragfunc _on_course() -> bool
    Rückgabewert
    bool
    Deklariert in scripts/sim/vehicle.gd:780
  • Vehicle._move func
    Link zu diesem Eintragfunc _move(sim: Sim, dt: float) -> void
    Parameter
    • sim: Sim
    • dt: float
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:784
  • Vehicle._trim funcDrop the history further back than the tail needs (the walk of _pos_back, stopping as soon as it is clear nothing can go).
    Link zu diesem Eintragfunc _trim() -> void
    Rückgabewert
    void
    Deklariert in scripts/sim/vehicle.gd:836
  • Vehicle._advance funcStep the head into the next tile of the route.
    Link zu diesem Eintragfunc _advance(sim: Sim) -> bool

    Returns false if movement must stop.

    Parameter
    • sim: Sim
    Rückgabewert
    bool
    Ruft auf
    BuildOps.dir_between, L.t, Const.opp
    Deklariert in scripts/sim/vehicle.gd:852
  • Vehicle._gate funcRealistic blocking: whether the train must stop before it enters route[k], coming from route[k - 1]: 1 where a signal there faces it, 2 where route[k] is the first tile of a junction (RAIL-80: a junction is guarded as if signals stood round it), else 0.
    Link zu diesem Eintragfunc _gate(m: WorldMap, k: int) -> int
    Parameter
    • m: WorldMap
    • k: int
    Rückgabewert
    int
    Ruft auf
    BuildOps.dir_between
    Deklariert in scripts/sim/vehicle.gd:908
  • Vehicle.way_ahead funcThe blocks the train must have to itself before it may pass the gate in front of route[k] (see _gate): past a signal, the track beyond it; at a junction, the junction itself and the stretch it leaves it by.
    Link zu diesem Eintragfunc way_ahead(m: WorldMap, blocks: Dictionary, k: int, gate: int) -> Array

    A train never stops on a junction: where the stretch past a junction is too short to hold the whole train before the next signal or junction, the way goes on past that one too, to the first place the train can wait clear of every junction. So a train is never let onto a junction it would then have to block while it waits for the track beyond.

    Parameter
    • m: WorldMap
    • blocks: Dictionary
    • k: int
    • gate: int
    Rückgabewert
    Array
    Ruft auf
    BuildOps.dir_between
    Deklariert in scripts/sim/vehicle.gd:927
  • Vehicle._dir_in funcThe way the head entered the tile it is in, or -1.
    Link zu diesem Eintragfunc _dir_in() -> int
    Rückgabewert
    int
    Ruft auf
    Const.opp
    Deklariert in scripts/sim/vehicle.gd:973
  • Vehicle.claims_ahead funcThe blocks ahead the train has been let into but not reached yet, for Sim._update_occupancy: standing on a signal, the way past it; inside a junction, the stretch it leaves it by.
    Link zu diesem Eintragfunc claims_ahead(m: WorldMap, blocks: Dictionary) -> Array
    Parameter
    • m: WorldMap
    • blocks: Dictionary
    Rückgabewert
    Array
    Ruft auf
    BuildOps.dir_between
    Deklariert in scripts/sim/vehicle.gd:981
  • Vehicle._held_up funcWhether another train holds any of the way past the gate in front of route[k] (see _gate).
    Link zu diesem Eintragfunc _held_up(sim: Sim, k: int, gate: int) -> bool

    When it doesn't, the way is claimed at once, so a second train at the same junction waits. Held at a junction, the train looks for another way round once a day: the other side of a passing loop. After waiting GIVE_UP_DAYS (a deadlock) it turns round if it can (see _deadlocked).

    Parameter
    • sim: Sim
    • k: int
    • gate: int
    Rückgabewert
    bool
    Deklariert in scripts/sim/vehicle.gd:998
  • Vehicle._deadlocked funcA train that has waited GIVE_UP_DAYS for the way ahead.
    Link zu diesem Eintragfunc _deadlocked(sim: Sim, need: Array) -> bool

    It turns round and finds another way if there is one; only when there is none does it go on anyway. Of the trains that hold each other up, one acts at a time: they never all drive off at once into each other. Returns whether it still waits (or has just turned round: see _turned).

    Parameter
    • sim: Sim
    • need: Array
    Rückgabewert
    bool
    Deklariert in scripts/sim/vehicle.gd:1022
  • Vehicle._busy func
    Link zu diesem Eintragfunc _busy(sim: Sim, need: Array) -> bool
    Parameter
    • sim: Sim
    • need: Array
    Rückgabewert
    bool

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:1051
  • Vehicle._detour funcAnother way to where the route goes that keeps off the blocks other trains hold, from the tile the head is in through the same next tile (the junction ahead): the free side of a passing loop.
    Link zu diesem Eintragfunc _detour(sim: Sim, blocks: Dictionary, need: Array) -> bool

    Taken only when it isn't much longer. Returns whether the route changed.

    Parameter
    • sim: Sim
    • blocks: Dictionary
    • need: Array
    Rückgabewert
    bool
    Ruft auf
    Pathfinder.find
    Deklariert in scripts/sim/vehicle.gd:1062
  • Vehicle._red_signal_dist funcDistance to a red signal or a busy junction (or a wreck on the line) ahead within the next couple of tiles, or -1.
    Link zu diesem Eintragfunc _red_signal_dist(sim: Sim) -> float
    Parameter
    • sim: Sim
    Rückgabewert
    float
    Deklariert in scripts/sim/vehicle.gd:1087
  • Vehicle._traffic_gap funcRoad traffic (RAIL-26): how far the front may go before it comes ROAD_GAP short of the back of the vehicle ahead in its lane, or -1 when nothing is in the way.
    Link zu diesem Eintragfunc _traffic_gap(sim: Sim) -> float

    Only the vehicles whose front is in its own tile or the next three on its route are looked at (Sim.road_at); one is in its lane when it heads the way this one will cross that tile, so traffic the other way and across a junction passes. Held up for ROAD_GIVE_UP days on end, it drives through until the way is clear, so a jam always clears.

    Parameter
    • sim: Sim
    Rückgabewert
    float
    Ruft auf
    L.t
    Deklariert in scripts/sim/vehicle.gd:1109
  • Vehicle._berth_dist funcShips (RAIL-26): each water tile in front of a dock is a berth for one ship.
    Link zu diesem Eintragfunc _berth_dist(sim: Sim) -> float

    While another ship lies at the berth this one is heading for, it stops short of it: returns how far it may still go, or -1 when it may go in. After QUEUE_GIVE_UP days waiting it goes in anyway.

    Parameter
    • sim: Sim
    Rückgabewert
    float
    Ruft auf
    L.t
    Deklariert in scripts/sim/vehicle.gd:1180
  • Vehicle._end_queue funcOut of a queue: the wait is over, and the status says where it is going again.
    Link zu diesem Eintragfunc _end_queue() -> void
    Rückgabewert
    void
    Deklariert in scripts/sim/vehicle.gd:1198
  • Vehicle._heading_status func
    Link zu diesem Eintragfunc _heading_status() -> String
    Rückgabewert
    String
    Ruft auf
    L.t

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:1204
  • Vehicle._free_stops funcThe stop tiles no other vehicle of its kind stands at or is on its way to (all of them when every one is): buses and trucks spread over a stop's tiles and ships over a dock's berths, as trains pick a free platform (RAIL-26).
    Link zu diesem Eintragfunc _free_stops(sim: Sim, tiles: Dictionary) -> Dictionary
    Parameter
    • sim: Sim
    • tiles: Dictionary
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/vehicle.gd:1215
  • Vehicle._usable funcA stop the vehicle can actually use: still exists and has tiles of this vehicle's kind.
    Link zu diesem Eintragfunc _usable(sim: Sim, st: Station) -> bool
    Parameter
    • sim: Sim
    • st: Station
    Rückgabewert
    bool
    Deklariert in scripts/sim/vehicle.gd:1226
  • Vehicle._skip_to_usable funcMove order_idx forward (starting at the current order) to the first usable stop.
    Link zu diesem Eintragfunc _skip_to_usable(sim: Sim) -> bool
    Parameter
    • sim: Sim
    Rückgabewert
    bool
    Deklariert in scripts/sim/vehicle.gd:1231
  • Vehicle._go_lost funcNo route right now: wait and retry, backing off, and after a few failures try the next stop.
    Link zu diesem Eintragfunc _go_lost(target: Station, ctx: Dictionary) -> void
    Parameter
    • target: Station
    • ctx: Dictionary
    Rückgabewert
    void
    Ruft auf
    L.t
    Deklariert in scripts/sim/vehicle.gd:1240
  • Vehicle._reroute funcThe way ahead disappeared: find a new route from tile tile, where the head sits on edge side.
    Link zu diesem Eintragfunc _reroute(sim: Sim, tile: Vector2i, side: int) -> bool
    Parameter
    • sim: Sim
    • tile: Vector2i
    • side: int
    Rückgabewert
    bool
    Ruft auf
    Pathfinder.find, Const.opp, L.t
    Deklariert in scripts/sim/vehicle.gd:1252
  • Vehicle._extend_platform func
    Link zu diesem Eintragfunc _extend_platform(sim: Sim, tiles: Array[Vector2i]) -> Array[Vector2i]
    Parameter
    • sim: Sim
    • tiles: Array[Vector2i]
    Rückgabewert
    Array[Vector2i]
    Ruft auf
    BuildOps.dir_between

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:1273
  • Vehicle._arrive func
    Link zu diesem Eintragfunc _arrive(sim: Sim) -> void
    Parameter
    • sim: Sim
    Rückgabewert
    void
    Ruft auf
    L.t, Economy.unload

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:1296
  • Vehicle._load func
    Link zu diesem Eintragfunc _load(sim: Sim, st: Station) -> int
    Parameter
    • sim: Sim
    • st: Station
    Rückgabewert
    int

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:1337
  • Vehicle._load_transfers func
    Link zu diesem Eintragfunc _load_transfers(source: Station, pickup: Station, c: String, room: int) -> int
    Parameter
    • source: Station
    • pickup: Station
    • c: String
    • room: int
    Rückgabewert
    int

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:1371
  • Vehicle._note_pickup func
    Link zu diesem Eintragfunc _note_pickup(st: Station, c: String, day: float) -> void
    Parameter
    • st: Station
    • c: String
    • day: float
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:1384
  • Vehicle._nearby_transfer_sources funcA feeder can't take transfers from its own drop-off orders, even from a nearby pickup stop.
    Link zu diesem Eintragfunc _nearby_transfer_sources(sim: Sim, st: Station) -> Array[Station]
    Parameter
    • sim: Sim
    • st: Station
    Rückgabewert
    Array[Station]
    Deklariert in scripts/sim/vehicle.gd:1392
  • Vehicle.order_flag funcWhether the order this vehicle is carrying out at st has flag key (see ORDER_FLAGS).
    Link zu diesem Eintragfunc order_flag(st: Station, key: String) -> bool
    Parameter
    • st: Station
    • key: String
    Rückgabewert
    bool
    Deklariert in scripts/sim/vehicle.gd:1403
  • Vehicle.transfers_at funcWhether this vehicle's orders say to leave cargo st doesn't accept there, for another vehicle (see Economy.unload): a transfer stop (RAIL-20) or an unload-only one (RAIL-36).
    Link zu diesem Eintragfunc transfers_at(st: Station) -> bool
    Parameter
    • st: Station
    Rückgabewert
    bool
    Deklariert in scripts/sim/vehicle.gd:1412
  • Vehicle.loads_at funcWhether this vehicle may take cargo on at st: not at an unload-only or don't-load stop.
    Link zu diesem Eintragfunc loads_at(st: Station) -> bool
    Parameter
    • st: Station
    Rückgabewert
    bool
    Deklariert in scripts/sim/vehicle.gd:1417
  • Vehicle.drops static funcWhether order o leaves the cargo its stop doesn't accept there: transfer and unload-only stops.
    Link zu diesem Eintragstatic func drops(o: Dictionary) -> bool
    Parameter
    • o: Dictionary
    Rückgabewert
    bool
    Deklariert in scripts/sim/vehicle.gd:1422
  • Vehicle.transfer_stops static funcThe stations in orders where cargo is left for another vehicle (see drops).
    Link zu diesem Eintragstatic func transfer_stops(p_orders: Array) -> Array
    Parameter
    • p_orders: Array
    Rückgabewert
    Array
    Deklariert in scripts/sim/vehicle.gd:1427
  • Vehicle.stranded static funcCargo that would be left on board for good: for each of cargos that a vehicle calling at stops could never deliver, [cargo, Station it is picked up at (null when no stop accepts it at all)].
    Link zu diesem Eintragstatic func stranded(cargos: Array, stops: Array, transfers: Array = []) -> Array

    A stop never takes back what was loaded there (see Economy.unload), so cargo a stop supplies needs another stop that accepts it. A stop in transfers takes any cargo (to pass it on).

    Parameter
    • cargos: Array
    • stops: Array
    • transfers: Array = []
    Rückgabewert
    Array
    Deklariert in scripts/sim/vehicle.gd:1439
  • Vehicle._check_stuck funcCalled on arriving at st, after unloading: note cargo still on board that no stop in the orders accepts.
    Link zu diesem Eintragfunc _check_stuck(sim: Sim, st: Station) -> void

    It stays there unpaid, filling the vehicle, until the orders change; the player is told (the vehicle window, the "needs attention" lists and, at most once a year, the news).

    Parameter
    • sim: Sim
    • st: Station
    Rückgabewert
    void
    Ruft auf
    L.t, L.lower
    Deklariert in scripts/sim/vehicle.gd:1459
  • Vehicle.clear_stuck funcForget the undeliverable cargo (it was delivered, or the orders or the cargo changed).
    Link zu diesem Eintragfunc clear_stuck() -> void
    Rückgabewert
    void
    Deklariert in scripts/sim/vehicle.gd:1494
  • Vehicle.problem funcWhat is wrong with the vehicle's route, for the player ("" when nothing is).
    Link zu diesem Eintragfunc problem() -> String
    Rückgabewert
    String
    Ruft auf
    L.t, L.lower, L.n
    Deklariert in scripts/sim/vehicle.gd:1500
  • Vehicle._wants_more funcWhether a full-load order should keep waiting: some wagon still has room for a cargo this station supplies, or that another of the company's vehicles brings here to transfer (a feeder's drop-off point that produces nothing itself); a mixed train doesn't wait for cargo that never comes here.
    Link zu diesem Eintragfunc _wants_more(sim: Sim, st: Station) -> bool

    Never at a stop where it takes nothing on.

    Parameter
    • sim: Sim
    • st: Station
    Rückgabewert
    bool
    Deklariert in scripts/sim/vehicle.gd:1511
  • Vehicle._fed_here funcWhether another vehicle of the same company can leave cargo c here or at a nearby station.
    Link zu diesem Eintragfunc _fed_here(sim: Sim, st: Station, nearby: Array[Station], c: String) -> bool
    Parameter
    • sim: Sim
    • st: Station
    • nearby: Array[Station]
    • c: String
    Rückgabewert
    bool
    Deklariert in scripts/sim/vehicle.gd:1531
  • Vehicle._pickup_fill funcHow full (0..1) the vehicle leaves st, counting only the cargos it can pick up here: ones the station supplies, or ones it actually took on (a transfer).
    Link zu diesem Eintragfunc _pickup_fill(st: Station) -> float

    -1 at a pure drop-off, so leaving the far end of a one-way freight run empty doesn't halve the average load.

    Parameter
    • st: Station
    Rückgabewert
    float
    Deklariert in scripts/sim/vehicle.gd:1546
  • Vehicle._update_loading func
    Link zu diesem Eintragfunc _update_loading(sim: Sim, dt: float) -> void
    Parameter
    • sim: Sim
    • dt: float
    Rückgabewert
    void
    Ruft auf
    L.t

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:1562
  • Vehicle._spacing_wait funcDays still to wait at the line's first stop to keep an even gap behind the vehicle that left before (0: go now).
    Link zu diesem Eintragfunc _spacing_wait(sim: Sim) -> float

    Never longer than one gap all told, so a slow round can't hold a line up.

    Parameter
    • sim: Sim
    Rückgabewert
    float
    Deklariert in scripts/sim/vehicle.gd:1611
  • Vehicle.daily funcOnce a day: wear, and perhaps a breakdown.
    Link zu diesem Eintragfunc daily(sim: Sim) -> void
    Parameter
    • sim: Sim
    Rückgabewert
    void
    Deklariert in scripts/sim/vehicle.gd:1629
  • Vehicle.service_due func
    Link zu diesem Eintragfunc service_due(sim: Sim) -> bool
    Parameter
    • sim: Sim
    Rückgabewert
    bool

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:1638
  • Vehicle._break_down func
    Link zu diesem Eintragfunc _break_down(sim: Sim) -> void
    Parameter
    • sim: Sim
    Rückgabewert
    void
    Ruft auf
    L.t

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:1642
  • Vehicle._serviced func
    Link zu diesem Eintragfunc _serviced(sim: Sim) -> void
    Parameter
    • sim: Sim
    Rückgabewert
    void
    Ruft auf
    Data.reliability

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:1652
  • Vehicle._try_service funcHead for the nearest depot if one is close (any_distance: however far).
    Link zu diesem Eintragfunc _try_service(sim: Sim, any_distance := false) -> bool

    Ships, aircraft and rivals' fleets are looked after at their stations instead. Returns true if the vehicle is now on its way to a depot.

    Parameter
    • sim: Sim
    • any_distance := false
    Rückgabewert
    bool
    Ruft auf
    Pathfinder.find
    Deklariert in scripts/sim/vehicle.gd:1660
  • Vehicle._try_refit funcA change of cargo is waiting (see Sim.refit_vehicle): head for the nearest depot, however far, where it is done.
    Link zu diesem Eintragfunc _try_refit(sim: Sim) -> bool

    Ships, aircraft and rivals have it done where they stand, and so does a company playing without depots when none can be reached. Returns true if now on its way to a depot.

    Parameter
    • sim: Sim
    Rückgabewert
    bool
    Ruft auf
    Pathfinder.find
    Deklariert in scripts/sim/vehicle.gd:1679
  • Vehicle._depot_status func
    Link zu diesem Eintragfunc _depot_status() -> String
    Rückgabewert
    String
    Ruft auf
    L.t

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:1694
  • Vehicle._go_to_depot funcLeave for the depot at the end of res (a Pathfinder route from the head's tile).
    Link zu diesem Eintragfunc _go_to_depot(sim: Sim, res: Dictionary, goals: Dictionary) -> void
    Parameter
    • sim: Sim
    • res: Dictionary
    • goals: Dictionary
    Rückgabewert
    void
    Ruft auf
    BuildOps.dir_between, Const.opp
    Deklariert in scripts/sim/vehicle.gd:1699
  • Vehicle._stop_no_orders funcHalt because no stop can be used.
    Link zu diesem Eintragfunc _stop_no_orders(ctx: Dictionary = {}) -> void

    ctx remembers where the head is if it stopped mid-route, so starting again resumes from there instead of jumping to the tile centre.

    Parameter
    • ctx: Dictionary = {}
    Rückgabewert
    void
    Ruft auf
    L.t
    Deklariert in scripts/sim/vehicle.gd:1720
  • Vehicle.resume funcRestart a stopped vehicle (from the vehicle window).
    Link zu diesem Eintragfunc resume() -> void
    Rückgabewert
    void
    Deklariert in scripts/sim/vehicle.gd:1728
  • Vehicle._route_to_order funcLeave the current tile for the current order's station.
    Link zu diesem Eintragfunc _route_to_order(sim: Sim) -> void
    Parameter
    • sim: Sim
    Rückgabewert
    void
    Ruft auf
    L.t, BuildOps.dir_between, Const.opp
    Deklariert in scripts/sim/vehicle.gd:1736
  • Vehicle._find funcPathfinder.find for this vehicle, remembering the answer under slot (-1: don't).
    Link zu diesem Eintragfunc _find(sim: Sim, slot: int, start: Vector2i, h: int, goals: Dictionary, reverse_start: bool, uturn: bool) -> Dictionary

    The search depends only on the network, where it starts, the heading and the goal tiles, so the route found last time is still the one it would find as long as those are the same and the network hasn't changed anywhere the search looked (WorldMap.net_changed_in). Every departure asks again, and a remembered route is walked once more before it is used: never a route over track that has gone.

    Parameter
    • sim: Sim
    • slot: int
    • start: Vector2i
    • h: int
    • goals: Dictionary
    • reverse_start: bool
    • uturn: bool
    Rückgabewert
    Dictionary
    Ruft auf
    Pathfinder.find
    Deklariert in scripts/sim/vehicle.gd:1781
  • Vehicle._route_stands funcWhether every step of tiles can still be driven (the checks _advance makes on the way).
    Link zu diesem Eintragfunc _route_stands(m: WorldMap, tiles: Array[Vector2i]) -> bool
    Parameter
    • m: WorldMap
    • tiles: Array[Vector2i]
    Rückgabewert
    bool
    Deklariert in scripts/sim/vehicle.gd:1801
  • Vehicle._free_platforms funcThe platforms of a station no other train is standing at (all of them if every one is taken).
    Link zu diesem Eintragfunc _free_platforms(sim: Sim, tiles: Dictionary) -> Dictionary

    A platform is a straight row of station tiles.

    Parameter
    • sim: Sim
    • tiles: Dictionary
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/vehicle.gd:1831
  • Vehicle._platform_row static func
    Link zu diesem Eintragstatic func _platform_row(m: WorldMap, t: Vector2i) -> Vector2i
    Parameter
    • m: WorldMap
    • t: Vector2i
    Rückgabewert
    Vector2i

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:1859
  • Vehicle._turn funcTurn the train round where it stands (RAIL-80) and route it on, keeping off the blocks in avoid.
    Link zu diesem Eintragfunc _turn(sim: Sim, avoid: Dictionary = {}, skip_depot: bool = false) -> bool

    It heads for the depot it is on its way to, or else its next stop, or else another of its stops (taking that order up from there), or else any of the company's depots. With skip_depot (the player's Turn around) a trip to a depot for a service is dropped first. Returns whether it turned.

    Parameter
    • sim: Sim
    • avoid: Dictionary = {}
    • skip_depot: bool = false
    Rückgabewert
    bool
    Ruft auf
    L.t
    Deklariert in scripts/sim/vehicle.gd:1870
  • Vehicle.turn_around funcThe player's Turn around (vehicle window): reverse a train out on the line and send it on to its next stop, the way it came if need be.
    Link zu diesem Eintragfunc turn_around(sim: Sim) -> String

    A trip to a depot for a service is dropped. Returns "" or why it can't.

    Parameter
    • sim: Sim
    Rückgabewert
    String
    Ruft auf
    L.t
    Deklariert in scripts/sim/vehicle.gd:1910
  • Vehicle._flip funcReverse a train in place: the last wagon becomes the front, then route onward from there, keeping off the blocks in avoid (see _turn).
    Link zu diesem Eintragfunc _flip(sim: Sim, goals: Dictionary, slot: int = -1, avoid: Dictionary = {}) -> bool
    Parameter
    • sim: Sim
    • goals: Dictionary
    • slot: int = -1
    • avoid: Dictionary = {}
    Rückgabewert
    bool
    Ruft auf
    Pathfinder.find
    Deklariert in scripts/sim/vehicle.gd:1924
  • Vehicle.car_poses funcWorld transforms of each car: [{"pos": Vector3, "dir": Vector3}] front to back.
    Link zu diesem Eintragfunc car_poses(m: WorldMap) -> Array
    Parameter
    • m: WorldMap
    Rückgabewert
    Array
    Deklariert in scripts/sim/vehicle.gd:1959
  • Vehicle.place_at_airport funcPark at an airport (start of service).
    Link zu diesem Eintragfunc place_at_airport(st: Station, m: WorldMap) -> void
    Parameter
    • st: Station
    • m: WorldMap
    Rückgabewert
    void
    Deklariert in scripts/sim/vehicle.gd:1999
  • Vehicle.head_tile_air func
    Link zu diesem Eintragfunc head_tile_air() -> Vector2i
    Rückgabewert
    Vector2i

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:2007
  • Vehicle._air_len func
    Link zu diesem Eintragfunc _air_len() -> float
    Rückgabewert
    float

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:2012
  • Vehicle._air_xy func
    Link zu diesem Eintragfunc _air_xy() -> Vector2
    Rückgabewert
    Vector2

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:2016
  • Vehicle._hold_entry funcWhere the plane broke off its approach: HOLD_AT short of the airport.
    Link zu diesem Eintragfunc _hold_entry() -> Vector2
    Rückgabewert
    Vector2
    Deklariert in scripts/sim/vehicle.gd:2029
  • Vehicle._hold_centre func
    Link zu diesem Eintragfunc _hold_centre() -> Vector2
    Rückgabewert
    Vector2

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:2033
  • Vehicle._hold_r funcThe circle's radius: one of three sizes (by the plane's number), so planes that arrive together hold apart.
    Link zu diesem Eintragfunc _hold_r() -> float
    Rückgabewert
    float
    Deklariert in scripts/sim/vehicle.gd:2040
  • Vehicle._hold_start funcThe angle round the circle of the point where the plane broke off.
    Link zu diesem Eintragfunc _hold_start() -> float
    Rückgabewert
    float
    Deklariert in scripts/sim/vehicle.gd:2045
  • Vehicle._take_off funcStart a flight to target's airport.
    Link zu diesem Eintragfunc _take_off(sim: Sim, target: Station) -> void
    Parameter
    • sim: Sim
    • target: Station
    Rückgabewert
    void
    Ruft auf
    L.t
    Deklariert in scripts/sim/vehicle.gd:2051
  • Vehicle._move_air func
    Link zu diesem Eintragfunc _move_air(sim: Sim, dt: float) -> void
    Parameter
    • sim: Sim
    • dt: float
    Rückgabewert
    void
    Ruft auf
    L.t

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:2082
  • Vehicle._hold funcOnce round the holding circle, the plane is back where it broke off its approach: it carries on with it if a stand has come free (or it has held for QUEUE_GIVE_UP days), else it goes round again.
    Link zu diesem Eintragfunc _hold(sim: Sim, st: Station, vmax: float, dt: float) -> void
    Parameter
    • sim: Sim
    • st: Station
    • vmax: float
    • dt: float
    Rückgabewert
    void
    Deklariert in scripts/sim/vehicle.gd:2120
  • Vehicle._air_alt funcAltitude profile: taxi, climb out, cruise, descend and land.
    Link zu diesem Eintragfunc _air_alt() -> float
    Rückgabewert
    float
    Deklariert in scripts/sim/vehicle.gd:2134
  • Vehicle._air_pose func
    Link zu diesem Eintragfunc _air_pose(m: WorldMap) -> Dictionary
    Parameter
    • m: WorldMap
    Rückgabewert
    Dictionary

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/vehicle.gd:2143

WorldMap

  • WorldMap.Terrain enum
    Link zu diesem Eintragenum Terrain { GRASS, SAND, ROCK, SNOW, WATER }

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:6
  • WorldMap.changed signalEmitted after construction changes a rectangle of tiles.
    Link zu diesem Eintragsignal changed(rect: Rect2i, what: int)

    what is a mask of CH_* flags.

    Parameter
    • rect: Rect2i
    • what: int
    Rückgabewert
    signal changed(rect: Rect2i, what: int)
    Deklariert in scripts/sim/world_map.gd:9
  • WorldMap.CH_TERRAIN const
    Link zu diesem Eintragconst CH_TERRAIN := 1

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:10
  • WorldMap.CH_NETWORK const
    Link zu diesem Eintragconst CH_NETWORK := 2

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:11
  • WorldMap.CH_OBJECTS const
    Link zu diesem Eintragconst CH_OBJECTS := 4

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:12
  • WorldMap.CH_TREES const
    Link zu diesem Eintragconst CH_TREES := 8

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:13
  • WorldMap.CH_ALL const
    Link zu diesem Eintragconst CH_ALL := 15

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:14
  • WorldMap.w var
    Link zu diesem Eintragvar w: int

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:16
  • WorldMap.h var
    Link zu diesem Eintragvar h: int

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:17
  • WorldMap.heights var(w+1)*(h+1) corner heights, 0..MAX_HEIGHT; 0 = sea floor
    Link zu diesem Eintragvar heights := PackedByteArray()Deklariert in scripts/sim/world_map.gd:18
  • WorldMap.corner_y varrendered corner heights in world units (seabed depth applied)
    Link zu diesem Eintragvar corner_y := PackedFloat32Array()Deklariert in scripts/sim/world_map.gd:19
  • WorldMap.terrain var
    Link zu diesem Eintragvar terrain := PackedByteArray()

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:20
  • WorldMap.trees var
    Link zu diesem Eintragvar trees := PackedByteArray()

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:21
  • WorldMap.variant var
    Link zu diesem Eintragvar variant := PackedByteArray()

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:22
  • WorldMap.road varconnection bitmask N=1 E=2 S=4 W=8
    Link zu diesem Eintragvar road := PackedByteArray()Deklariert in scripts/sim/world_map.gd:23
  • WorldMap.rail var
    Link zu diesem Eintragvar rail := PackedByteArray()

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:24
  • WorldMap.rail_owner varcompany id + 1 for track; 0 = none
    Link zu diesem Eintragvar rail_owner := PackedByteArray()Deklariert in scripts/sim/world_map.gd:25
  • WorldMap.objs varnull or a Dictionary with "kind": "house" | "industry" | "station"
    Link zu diesem Eintragvar objs: Array = []Deklariert in scripts/sim/world_map.gd:26
  • WorldMap.towns varTown objects generated for this world.
    Link zu diesem Eintragvar towns: Array[Town] = []

    A town object gives access to its population, position, and council ratings.

    Deklariert in scripts/sim/world_map.gd:27
  • WorldMap.industries varIndustries currently on the map.
    Link zu diesem Eintragvar industries: Array[Industry] = []

    This collection can change as industries open, close, or progress through the eras.

    Deklariert in scripts/sim/world_map.gd:28
  • WorldMap.industry_rev varBumped whenever an industry opens or closes during the game (RAIL-23, IndustryLife): what is made from the list of industries (their models, smoke, lights and labels, and the caches below and in Economy) is made again.
    Link zu diesem Eintragvar industry_rev := 0

    Not saved.

    Deklariert in scripts/sim/world_map.gd:32
  • WorldMap.era varThe era (an index into Data.ERAS) whose industry chains apply (RAIL-29): what industries take and make, and what towns make and take.
    Link zu diesem Eintragvar era := 0

    Follows the date (Sim.sync_era); not saved.

    Deklariert in scripts/sim/world_map.gd:35
  • WorldMap._near_ind var1 on tiles within BuildOps.INDUSTRY_GAP of an industry, rebuilt whenever an industry has come or gone since it was made (or the list has grown: the world is made, or loaded, by appending to it).
    Link zu diesem Eintragvar _near_ind := PackedByteArray()Deklariert in scripts/sim/world_map.gd:38
  • WorldMap._near_ind_n var
    Link zu diesem Eintragvar _near_ind_n := -1

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:39
  • WorldMap._near_ind_rev var
    Link zu diesem Eintragvar _near_ind_rev := -1

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:40
  • WorldMap.stations varStation objects in the current world.
    Link zu diesem Eintragvar stations: Array[Station] = []

    A station can serve more than one transport mode, so use has_kind to select the desired type.

    Deklariert in scripts/sim/world_map.gd:41
  • WorldMap.next_station_id var
    Link zu diesem Eintragvar next_station_id := 1

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:42
  • WorldMap.crossings varBridges and tunnels: {"id", "kind" rail|road, "type" bridge|tunnel, "s0", "s1" (first and last span tile), "dir" (s0 -> s1), "level" (height level of the deck / tunnel floor), "owner" (company id + 1)}.
    Link zu diesem Eintragvar crossings: Array = []

    For bridges the spans are the tiles strictly between the two ramps; for tunnels they include both portals.

    Deklariert in scripts/sim/world_map.gd:46
  • WorldMap.spans varVector2i -> crossing
    Link zu diesem Eintragvar spans := {}Deklariert in scripts/sim/world_map.gd:47
  • WorldMap.depots varVector2i -> depot object (also in objs)
    Link zu diesem Eintragvar depots := {}Deklariert in scripts/sim/world_map.gd:48
  • WorldMap.elec var1 where the track has overhead wires
    Link zu diesem Eintragvar elec := PackedByteArray()Deklariert in scripts/sim/world_map.gd:49
  • WorldMap.next_crossing_id var
    Link zu diesem Eintragvar next_crossing_id := 1

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:50
  • WorldMap.signals varRail signals on straight track: Vector2i -> 0 (two-way) or 1 + d (one-way, trains may only pass heading d).
    Link zu diesem Eintragvar signals := {}Deklariert in scripts/sim/world_map.gd:52
  • WorldMap.diag2 varTiles carrying two parallel diagonal pieces instead of a junction, per network: Vector2i -> 0 (pieces N-E and S-W) or 1 (pieces E-S and W-N).
    Link zu diesem Eintragvar diag2 := {"rail": {}, "road": {}}Deklariert in scripts/sim/world_map.gd:55
  • WorldMap.DIAG2_PAIRS const
    Link zu diesem Eintragconst DIAG2_PAIRS := [[[0, 1], [2, 3]], [[1, 2], [3, 0]]]

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:56
  • WorldMap.EASE consthow far off the edge midpoint an eased join crosses (see piece_shape)
    Link zu diesem Eintragconst EASE := 0.125Deklariert in scripts/sim/world_map.gd:57
  • WorldMap.net_version varbumped whenever the network or the objects change (the view redraws on it)
    Link zu diesem Eintragvar net_version := 0Deklariert in scripts/sim/world_map.gd:58
  • WorldMap.block_cache var
    Link zu diesem Eintragvar block_cache := {}

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:59
  • WorldMap.block_version varthe rail revision block_cache was built for (see net_rev)
    Link zu diesem Eintragvar block_version := -1Deklariert in scripts/sim/world_map.gd:60
  • WorldMap.NET_LOG_MAX constRevisions of the road and the rail network: they go up only when the network itself really changed (track, wires, signals, bridges, tunnels), not when a town merely adds a house.
    Link zu diesem Eintragconst NET_LOG_MAX := 512

    Each keeps the rectangles that changed lately, so a cached route can tell whether a change touched the part of the map it was searched over (see net_changed_in). None of this is saved.

    Deklariert in scripts/sim/world_map.gd:65
  • WorldMap.road_rev var
    Link zu diesem Eintragvar road_rev := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:66
  • WorldMap.rail_rev var
    Link zu diesem Eintragvar rail_rev := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:67
  • WorldMap._road_log var
    Link zu diesem Eintragvar _road_log: Array[Rect2i] = []

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:68
  • WorldMap._rail_log var
    Link zu diesem Eintragvar _rail_log: Array[Rect2i] = []

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:69
  • WorldMap._net_synced var
    Link zu diesem Eintragvar _net_synced := false

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:70
  • WorldMap._sh_road varthe network as it was at the last notify, to spot real changes
    Link zu diesem Eintragvar _sh_road := PackedByteArray()Deklariert in scripts/sim/world_map.gd:71
  • WorldMap._sh_rail var
    Link zu diesem Eintragvar _sh_rail := PackedByteArray()

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:72
  • WorldMap._sh_elec var
    Link zu diesem Eintragvar _sh_elec := PackedByteArray()

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:73
  • WorldMap._sh_state var
    Link zu diesem Eintragvar _sh_state := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:74
  • WorldMap.station_rev varBumped when the stations' catchments change; with the two counts it keys eco_cache (Economy's industry <-> station links).
    Link zu diesem Eintragvar station_rev := 0

    Not saved.

    Deklariert in scripts/sim/world_map.gd:77
  • WorldMap.eco_cache var
    Link zu diesem Eintragvar eco_cache := {}

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:78
  • WorldMap._town_cargo_levels var
    Link zu diesem Eintragvar _town_cargo_levels: Array[int] = []

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:79
  • WorldMap._shape_memo varpiece_shape results by tile (see shape_of): tile index -> {sides and network -> shape}.
    Link zu diesem Eintragvar _shape_memo := {}

    Emptied around every change that is announced with notify. Not saved.

    Deklariert in scripts/sim/world_map.gd:82
  • WorldMap.sea_memo varRoutes over water found by Pathfinder, by question (see Pathfinder._sea_memo).
    Link zu diesem Eintragvar sea_memo := {}

    Emptied whenever the ground changes. Not saved.

    Deklariert in scripts/sim/world_map.gd:85
  • WorldMap._init func
    Link zu diesem Eintragfunc _init(width: int = Const.MAP_SIZE, height: int = Const.MAP_SIZE) -> void
    Parameter
    • width: int = Const.MAP_SIZE
    • height: int = Const.MAP_SIZE
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:88
  • WorldMap.set_era funcMove the chains to era e: every industry takes and makes what its kind does then.
    Link zu diesem Eintragfunc set_era(e: int) -> void

    Stations take it on when they are next refreshed.

    Parameter
    • e: int
    Rückgabewert
    void
    Deklariert in scripts/sim/world_map.gd:106
  • WorldMap.is_electrified funcOverhead wires over this tile's track (bridge decks and tunnels count as wired).
    Link zu diesem Eintragfunc is_electrified(t: Vector2i) -> bool
    Parameter
    • t: Vector2i
    Rückgabewert
    bool
    Deklariert in scripts/sim/world_map.gd:114
  • WorldMap.notify func
    Link zu diesem Eintragfunc notify(rect: Rect2i, what: int) -> void
    Parameter
    • rect: Rect2i
    • what: int
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:121
  • WorldMap._town_cargo_levels_changed funcA population threshold changes acceptance at any stop serving that town, even far from the build.
    Link zu diesem Eintragfunc _town_cargo_levels_changed() -> bool
    Rückgabewert
    bool
    Ruft auf
    Data.town_takes_by_size
    Deklariert in scripts/sim/world_map.gd:150
  • WorldMap.net_rev funcThe revision of the road or rail network (-1 for anything else, which has none).
    Link zu diesem Eintragfunc net_rev(kind: String) -> int

    Whatever caches something derived from the network keeps this number with it.

    Parameter
    • kind: String
    Rückgabewert
    int
    Deklariert in scripts/sim/world_map.gd:169
  • WorldMap.net_changed_in funcWhether the kind network changed inside box since revision since (true when it can't tell).
    Link zu diesem Eintragfunc net_changed_in(kind: String, since: int, box: Rect2i) -> bool
    Parameter
    • kind: String
    • since: int
    • box: Rect2i
    Rückgabewert
    bool
    Deklariert in scripts/sim/world_map.gd:178
  • WorldMap.net_touch funcRecord that the kind network changed inside rect.
    Link zu diesem Eintragfunc net_touch(kind: String, rect: Rect2i) -> void

    notify does this by itself for anything it can see (track, wires, signals, bridges and tunnels), so this is only for changes it can't.

    Parameter
    • kind: String
    • rect: Rect2i
    Rückgabewert
    void
    Deklariert in scripts/sim/world_map.gd:194
  • WorldMap.net_reset funcForget everything cached about the network and the stations (after loading, or after editing the map's arrays directly without notify).
    Link zu diesem Eintragfunc net_reset() -> void
    Rückgabewert
    void
    Deklariert in scripts/sim/world_map.gd:209
  • WorldMap._net_state func
    Link zu diesem Eintragfunc _net_state() -> int
    Rückgabewert
    int

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:223
  • WorldMap._net_sync func
    Link zu diesem Eintragfunc _net_sync() -> void
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:227
  • WorldMap._net_scan funcAfter a change inside rect: compare the network there with how it was, and record what changed.
    Link zu diesem Eintragfunc _net_scan(rect: Rect2i) -> void
    Parameter
    • rect: Rect2i
    Rückgabewert
    void
    Deklariert in scripts/sim/world_map.gd:236
  • WorldMap.sig_allows funcWhether a train heading h may pass the signal on tile t (one-way signals only allow one way).
    Link zu diesem Eintragfunc sig_allows(t: Vector2i, h: int) -> bool
    Parameter
    • t: Vector2i
    • h: int
    Rückgabewert
    bool
    Deklariert in scripts/sim/world_map.gd:272
  • WorldMap.sig_faces funcWhether the signal on t controls trains heading h (it faces them).
    Link zu diesem Eintragfunc sig_faces(t: Vector2i, h: int) -> bool
    Parameter
    • t: Vector2i
    • h: int
    Rückgabewert
    bool
    Deklariert in scripts/sim/world_map.gd:278
  • WorldMap.block_key funcKey for the track a train travelling in direction d occupies on tile t: the tile itself on the ground, or a separate key on a bridge or in a tunnel (so the line overhead and the line underneath are different blocks).
    Link zu diesem Eintragfunc block_key(t: Vector2i, d: int) -> Variant
    Parameter
    • t: Vector2i
    • d: int
    Rückgabewert
    Variant
    Ruft auf
    Const.opp
    Deklariert in scripts/sim/world_map.gd:288
  • WorldMap.rail_junction funcWhether tile t is a junction on the ground, where three or four lines of track meet (RAIL-80).
    Link zu diesem Eintragfunc rail_junction(t: Vector2i, d: int = -1) -> bool

    A junction is a block of its own even without signals (see blocks), and trains wait in front of it until it and the track beyond it are clear (Vehicle._way_ahead). With d, a train travelling that way on a bridge or in a tunnel over the tile isn't on the junction.

    Parameter
    • t: Vector2i
    • d: int = -1
    Rückgabewert
    bool
    Deklariert in scripts/sim/world_map.gd:302
  • WorldMap.block_key_at funcBlock key from a position (on a tile with two parallel diagonals, the half you're in decides).
    Link zu diesem Eintragfunc block_key_at(p: Vector2, d: int) -> Variant
    Parameter
    • p: Vector2
    • d: int
    Rückgabewert
    Variant
    Deklariert in scripts/sim/world_map.gd:312
  • WorldMap.blocks funcTrack blocks: rail tiles grouped into connected stretches, split at signal tiles and where track meets a junction: a junction, or a few junctions side by side, is a block of its own (RAIL-80).
    Link zu diesem Eintragfunc blocks() -> Dictionary

    Keyed by block_key().

    Rückgabewert
    Dictionary
    Ruft auf
    WorldMap.axis_of
    Deklariert in scripts/sim/world_map.gd:325
  • WorldMap.ci func
    Link zu diesem Eintragfunc ci(x: int, y: int) -> int
    Parameter
    • x: int
    • y: int
    Rückgabewert
    int

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:384
  • WorldMap.ti func
    Link zu diesem Eintragfunc ti(x: int, y: int) -> int
    Parameter
    • x: int
    • y: int
    Rückgabewert
    int

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:388
  • WorldMap.in_bounds func
    Link zu diesem Eintragfunc in_bounds(x: int, y: int) -> bool
    Parameter
    • x: int
    • y: int
    Rückgabewert
    bool

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:392
  • WorldMap.near_industry funcWhether (x, y) lies within BuildOps.INDUSTRY_GAP tiles of an industry's footprint, diagonals included.
    Link zu diesem Eintragfunc near_industry(x: int, y: int) -> bool
    Parameter
    • x: int
    • y: int
    Rückgabewert
    bool
    Deklariert in scripts/sim/world_map.gd:397
  • WorldMap.net_bits func
    Link zu diesem Eintragfunc net_bits(kind: String, i: int) -> int
    Parameter
    • kind: String
    • i: int
    Rückgabewert
    int

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:411
  • WorldMap.sailable funcOpen water ships can sail through (not under an oil rig or other industry).
    Link zu diesem Eintragfunc sailable(i: int) -> bool

    The dock out at a rig stands in open water and ships sail onto it to berth.

    Parameter
    • i: int
    Rückgabewert
    bool
    Deklariert in scripts/sim/world_map.gd:421
  • WorldMap.linked funcTrue when tile t connects to its neighbour in direction d on the given network (both tiles carry the matching bit), including along bridges and through tunnels.
    Link zu diesem Eintragfunc linked(kind: String, t: Vector2i, d: int) -> bool
    Parameter
    • kind: String
    • t: Vector2i
    • d: int
    Rückgabewert
    bool
    Ruft auf
    Const.opp
    Deklariert in scripts/sim/world_map.gd:428
  • WorldMap.pieces funcThe pieces of track or road on a tile, as [edge, edge] pairs ([edge, -1] for a dead end).
    Link zu diesem Eintragfunc pieces(kind: String, t: Vector2i) -> Array
    Parameter
    • kind: String
    • t: Vector2i
    Rückgabewert
    Array
    Deklariert in scripts/sim/world_map.gd:445
  • WorldMap._lone_corner funcWhether tile t has exactly the corner piece {a, b} on its own (or as one of two parallel diagonals).
    Link zu diesem Eintragfunc _lone_corner(kind: String, t: Vector2i, a: int, b: int) -> bool
    Parameter
    • kind: String
    • t: Vector2i
    • a: int
    • b: int
    Rückgabewert
    bool
    Deklariert in scripts/sim/world_map.gd:464
  • WorldMap.chord_ends funcDiagonal runs: a corner piece (edges a, b) that continues across an edge into the mirrored corner on the next tile.
    Link zu diesem Eintragfunc chord_ends(kind: String, t: Vector2i, a: int, b: int) -> int

    Returns a mask of which ends continue diagonally (1 = end a, 2 = end b), or 0 for an ordinary curve. Diagonal stretches are drawn and driven as straight 45-degree lines; an end that meets straight track eases in with a curve that leaves the edge square.

    Parameter
    • kind: String
    • t: Vector2i
    • a: int
    • b: int
    Rückgabewert
    int
    Ruft auf
    Const.opp
    Deklariert in scripts/sim/world_map.gd:480
  • WorldMap.is_chord func
    Link zu diesem Eintragfunc is_chord(kind: String, t: Vector2i, a: int, b: int) -> bool
    Parameter
    • kind: String
    • t: Vector2i
    • a: int
    • b: int
    Rückgabewert
    bool

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:493
  • WorldMap._plain_straight funcWhether tile t carries nothing but one straight piece running through side d: plain ground track or road, with no station, level crossing, bridge or tunnel on it.
    Link zu diesem Eintragfunc _plain_straight(kind: String, t: Vector2i, d: int) -> bool
    Parameter
    • kind: String
    • t: Vector2i
    • d: int
    Rückgabewert
    bool
    Ruft auf
    Const.opp
    Deklariert in scripts/sim/world_map.gd:499
  • WorldMap.piece_shape funcThe full shape of the piece from edge a to edge b, as a mask (0 = an ordinary piece): 1, 2 end a / end b continues diagonally (see chord_ends) 4, 8 end a / end b is eased: where a diagonal run meets plain straight track, the bend is one wide curve from the middle of the straight tile to the far end of the first diagonal tile, so it crosses their shared edge EASE to one side of the midpoint 16, 32 (straight pieces) which side end a / end b is eased towards: clear = the next direction clockwise from that end, set = the one before it
    Link zu diesem Eintragfunc piece_shape(kind: String, t: Vector2i, a: int, b: int) -> int
    Parameter
    • kind: String
    • t: Vector2i
    • a: int
    • b: int
    Rückgabewert
    int
    Ruft auf
    Const.opp
    Deklariert in scripts/sim/world_map.gd:515
  • WorldMap.shape_of funcpiece_shape for road and rail, remembered: vehicles ask for the same pieces over and over as they drive.
    Link zu diesem Eintragfunc shape_of(kind: String, t: Vector2i, a: int, b: int) -> int

    The answer only depends on the map near the tile, and notify forgets what it knew around every change.

    Parameter
    • kind: String
    • t: Vector2i
    • a: int
    • b: int
    Rückgabewert
    int
    Deklariert in scripts/sim/world_map.gd:545
  • WorldMap.flip_shape static funcshape for the same piece travelled the other way (ends a and b swapped).
    Link zu diesem Eintragstatic func flip_shape(shape: int) -> int
    Parameter
    • shape: int
    Rückgabewert
    int
    Deklariert in scripts/sim/world_map.gd:565
  • WorldMap.piece_curve static funcControl points (tile-local, 0..1) of a piece from edge a to edge b with a non-zero shape (see piece_shape): a cubic curve.
    Link zu diesem Eintragstatic func piece_curve(a: int, b: int, shape: int) -> Array

    Diagonal pieces are straight where both ends continue diagonally; an end that meets plain straight track is eased, sharing one wide bend with that tile; an end that meets anything else leaves the edge square, with a tighter S-bend.

    Parameter
    • a: int
    • b: int
    • shape: int
    Rückgabewert
    Array
    Ruft auf
    Const.opp
    Deklariert in scripts/sim/world_map.gd:573
  • WorldMap.chord_curve static func
    Link zu diesem Eintragstatic func chord_curve(a: int, b: int, ends: int) -> Array
    Parameter
    • a: int
    • b: int
    • ends: int
    Rückgabewert
    Array

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:619
  • WorldMap.cubic_tangent static func
    Link zu diesem Eintragstatic func cubic_tangent(c: Array, u: float) -> Vector2
    Parameter
    • c: Array
    • u: float
    Rückgabewert
    Vector2

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:623
  • WorldMap.cubic static func
    Link zu diesem Eintragstatic func cubic(c: Array, u: float) -> Vector2
    Parameter
    • c: Array
    • u: float
    Rückgabewert
    Vector2

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:629
  • WorldMap.axis_of static func
    Link zu diesem Eintragstatic func axis_of(d: int) -> int
    Parameter
    • d: int
    Rückgabewert
    int

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:634
  • WorldMap.span_along funcThe bridge or tunnel of kind that tile t is part of, if travel in direction d runs along it.
    Link zu diesem Eintragfunc span_along(kind: String, t: Vector2i, d: int) -> Variant
    Parameter
    • kind: String
    • t: Vector2i
    • d: int
    Rückgabewert
    Variant
    Deklariert in scripts/sim/world_map.gd:639
  • WorldMap.exit_bits funcDirections a vehicle heading h inside tile t may leave by: straight on along a bridge or tunnel, otherwise the ground connections.
    Link zu diesem Eintragfunc exit_bits(kind: String, t: Vector2i, h: int) -> int
    Parameter
    • kind: String
    • t: Vector2i
    • h: int
    Rückgabewert
    int
    Ruft auf
    Const.opp
    Deklariert in scripts/sim/world_map.gd:648
  • WorldMap.travel_y funcHeight vehicles travel at: the bridge deck or tunnel floor when running along one, else the ground.
    Link zu diesem Eintragfunc travel_y(kind: String, fx: float, fz: float, dir: Vector2) -> float
    Parameter
    • kind: String
    • fx: float
    • fz: float
    • dir: Vector2
    Rückgabewert
    float
    Deklariert in scripts/sim/world_map.gd:662
  • WorldMap.portal_level funcLevel of the tunnel mouth on tile (x, y), or -1.
    Link zu diesem Eintragfunc portal_level(x: int, y: int) -> int

    Mouth tiles are dug out flat to the tunnel floor.

    Parameter
    • x: int
    • y: int
    Rückgabewert
    int
    Deklariert in scripts/sim/world_map.gd:675
  • WorldMap.add_crossing func
    Link zu diesem Eintragfunc add_crossing(c: Dictionary) -> void
    Parameter
    • c: Dictionary
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:682
  • WorldMap.remove_crossing func
    Link zu diesem Eintragfunc remove_crossing(c: Dictionary) -> void
    Parameter
    • c: Dictionary
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:688
  • WorldMap.crossing_tiles static func
    Link zu diesem Eintragstatic func crossing_tiles(c: Dictionary) -> Array[Vector2i]
    Parameter
    • c: Dictionary
    Rückgabewert
    Array[Vector2i]

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:695
  • WorldMap.corner func
    Link zu diesem Eintragfunc corner(x: int, y: int) -> int
    Parameter
    • x: int
    • y: int
    Rückgabewert
    int

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:706
  • WorldMap.corners funcCorner heights in order NW (x,y), NE (x+1,y), SE (x+1,y+1), SW (x,y+1).
    Link zu diesem Eintragfunc corners(x: int, y: int) -> Vector4i
    Parameter
    • x: int
    • y: int
    Rückgabewert
    Vector4i
    Deklariert in scripts/sim/world_map.gd:711
  • WorldMap.tile_min func
    Link zu diesem Eintragfunc tile_min(x: int, y: int) -> int
    Parameter
    • x: int
    • y: int
    Rückgabewert
    int

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:715
  • WorldMap.tile_max func
    Link zu diesem Eintragfunc tile_max(x: int, y: int) -> int
    Parameter
    • x: int
    • y: int
    Rückgabewert
    int

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:720
  • WorldMap.is_water func
    Link zu diesem Eintragfunc is_water(x: int, y: int) -> bool
    Parameter
    • x: int
    • y: int
    Rückgabewert
    bool

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:725
  • WorldMap.slope funcBits of corners raised above the tile minimum (1=NW, 2=NE, 4=SE, 8=SW), plus 16 when steep.
    Link zu diesem Eintragfunc slope(x: int, y: int) -> int
    Parameter
    • x: int
    • y: int
    Rückgabewert
    int
    Deklariert in scripts/sim/world_map.gd:730
  • WorldMap.is_flat func
    Link zu diesem Eintragfunc is_flat(x: int, y: int) -> bool
    Parameter
    • x: int
    • y: int
    Rückgabewert
    bool

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_map.gd:743
  • WorldMap.incline_axis funcAxis a tile is a simple incline along: 0 = along x, 1 = along y, -1 = not a simple incline.
    Link zu diesem Eintragfunc incline_axis(x: int, y: int) -> int
    Parameter
    • x: int
    • y: int
    Rückgabewert
    int
    Deklariert in scripts/sim/world_map.gd:748
  • WorldMap.split_nw_se funcThe mesh folds along NW-SE when those corners match, else along NE-SW.
    Link zu diesem Eintragfunc split_nw_se(x: int, y: int) -> bool
    Parameter
    • x: int
    • y: int
    Rückgabewert
    bool
    Deklariert in scripts/sim/world_map.gd:758
  • WorldMap.terrain_y funcExact height of the rendered terrain surface (matches the mesh triangles).
    Link zu diesem Eintragfunc terrain_y(fx: float, fz: float) -> float
    Parameter
    • fx: float
    • fz: float
    Rückgabewert
    float
    Deklariert in scripts/sim/world_map.gd:763
  • WorldMap.surface_y funcVisible surface: terrain or water, whichever is higher.
    Link zu diesem Eintragfunc surface_y(fx: float, fz: float) -> float

    Outside the map returns -INF.

    Parameter
    • fx: float
    • fz: float
    Rückgabewert
    float
    Deklariert in scripts/sim/world_map.gd:786
  • WorldMap.compute_corner_y funcRecompute rendered corner heights.
    Link zu diesem Eintragfunc compute_corner_y() -> void

    Sea-floor corners sink deeper the farther they are from land.

    Rückgabewert
    void
    Deklariert in scripts/sim/world_map.gd:793

Industry

  • Industry.SIZE const
    Link zu diesem Eintragconst SIZE := 3

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/industry.gd:7
  • Industry.LOCAL_REACH constStaff (RAIL-28): people walk in from towns up to LOCAL_REACH tiles from the footprint, fewer the farther the edge of the town is; right next to it, a town lends LOCAL_PER_POP workers per resident.
    Link zu diesem Eintragconst LOCAL_REACH := 8.0

    Walkers-in fill at most LOCAL_MAX of the jobs: the rest takes commuters, however big the town.

    Deklariert in scripts/sim/industry.gd:11
  • Industry.LOCAL_PER_POP const
    Link zu diesem Eintragconst LOCAL_PER_POP := 0.16

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/industry.gd:12
  • Industry.LOCAL_MAX const
    Link zu diesem Eintragconst LOCAL_MAX := 0.55

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/industry.gd:13
  • Industry.PRIMARY_MIN constOutput with nobody at work and with a full staff (see output_factor).
    Link zu diesem Eintragconst PRIMARY_MIN := 0.7Deklariert in scripts/sim/industry.gd:15
  • Industry.PRIMARY_MAX const
    Link zu diesem Eintragconst PRIMARY_MAX := 1.5

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/industry.gd:16
  • Industry.PLANT_MIN const
    Link zu diesem Eintragconst PLANT_MIN := 0.8

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/industry.gd:17
  • Industry.PLANT_MAX const
    Link zu diesem Eintragconst PLANT_MAX := 1.3

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/industry.gd:18
  • Industry.SHIFT_BACK constOf the commuters who come to work, the share that goes home again by the same stations.
    Link zu diesem Eintragconst SHIFT_BACK := 1.0 / 3.0Deklariert in scripts/sim/industry.gd:20
  • Industry.BUSY constStaffing from which an industry counts as busy: its noise carries farther (Town.land_value).
    Link zu diesem Eintragconst BUSY := 0.75Deklariert in scripts/sim/industry.gd:22
  • Industry.id var
    Link zu diesem Eintragvar id := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/industry.gd:24
  • Industry.type var
    Link zu diesem Eintragvar type := ""

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/industry.gd:25
  • Industry.x var
    Link zu diesem Eintragvar x := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/industry.gd:26
  • Industry.y var
    Link zu diesem Eintragvar y := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/industry.gd:27
  • Industry.name var
    Link zu diesem Eintragvar name := ""

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/industry.gd:28
  • Industry.prod_rate varmonthly output of a primary industry
    Link zu diesem Eintragvar prod_rate := 0Deklariert in scripts/sim/industry.gd:29
  • Industry.stock varsecondary output waiting to be shipped
    Link zu diesem Eintragvar stock := {}Deklariert in scripts/sim/industry.gd:30
  • Industry.produced varthis month, by cargo
    Link zu diesem Eintragvar produced := {}Deklariert in scripts/sim/industry.gd:31
  • Industry.transported var
    Link zu diesem Eintragvar transported := {}

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/industry.gd:32
  • Industry.received var
    Link zu diesem Eintragvar received := {}

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/industry.gd:33
  • Industry.produced_last var
    Link zu diesem Eintragvar produced_last := {}

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/industry.gd:34
  • Industry.transported_last var
    Link zu diesem Eintragvar transported_last := {}

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/industry.gd:35
  • Industry.received_last var
    Link zu diesem Eintragvar received_last := {}

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/industry.gd:36
  • Industry.history var[produced, transported] at each month end (last 24)
    Link zu diesem Eintragvar history: Array = []Deklariert in scripts/sim/industry.gd:37
  • Industry.workers varcommuters delivered to stations in reach this month (RAIL-28)
    Link zu diesem Eintragvar workers := 0.0Deklariert in scripts/sim/industry.gd:38
  • Industry.workers_last var
    Link zu diesem Eintragvar workers_last := 0.0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/industry.gd:39
  • Industry.shift_pax varcommuters going home, handed to stations at the next production run
    Link zu diesem Eintragvar shift_pax := 0.0Deklariert in scripts/sim/industry.gd:40
  • Industry.local_staff varwalkers-in from nearby towns, counted once a month (-1: not yet)
    Link zu diesem Eintragvar local_staff := -1.0Deklariert in scripts/sim/industry.gd:41
  • Industry.closing_day varIndustries come and go during the game (RAIL-23, IndustryLife): the game day a struggling one closes, warned a year ahead (-1: not at risk), and whether it has closed and left the map (what still holds on to it, a window or a label, lets go).
    Link zu diesem Eintragvar closing_day := -1Deklariert in scripts/sim/industry.gd:45
  • Industry.closed var
    Link zu diesem Eintragvar closed := false

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/industry.gd:46
  • Industry.accepts varWhat it takes and makes in the map's era (Data.accepts / produces, RAIL-29): WorldMap.set_era keeps them up to date.
    Link zu diesem Eintragvar accepts: Array = []

    Shared and read-only.

    Deklariert in scripts/sim/industry.gd:49
  • Industry.produces var
    Link zu diesem Eintragvar produces: Array = []

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/industry.gd:50
  • Industry.held varCargo delivered and not used yet: what a plant that needs every input holds until the rest comes, and what a wind farm site has had towards its total (Data.INDUSTRY "needs_all" and "builds").
    Link zu diesem Eintragvar held := {}Deklariert in scripts/sim/industry.gd:53
  • Industry.builders vara wind farm site: company id -> units it delivered
    Link zu diesem Eintragvar builders := {}Deklariert in scripts/sim/industry.gd:54
  • Industry.last_delivery vargame day cargo was last delivered to it (-1: never)
    Link zu diesem Eintragvar last_delivery := -1.0Deklariert in scripts/sim/industry.gd:55
  • Industry._init func
    Link zu diesem Eintragfunc _init(p_id: int, p_type: String, px: int, py: int) -> void
    Parameter
    • p_id: int
    • p_type: String
    • px: int
    • py: int
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/industry.gd:58
  • Industry.info func
    Link zu diesem Eintragfunc info() -> Dictionary
    Rückgabewert
    Dictionary

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/industry.gd:67
  • Industry.set_era funcTake on what its kind takes and makes in era era.
    Link zu diesem Eintragfunc set_era(era: int) -> void
    Parameter
    • era: int
    Rückgabewert
    void
    Ruft auf
    Data.accepts, Data.produces
    Deklariert in scripts/sim/industry.gd:72
  • Industry.built_share funcA wind farm site's progress: the share of the least complete of the cargos it needs (0..1).
    Link zu diesem Eintragfunc built_share() -> float
    Rückgabewert
    float
    Deklariert in scripts/sim/industry.gd:78
  • Industry.center funcReturns the center of the industry footprint in map coordinates.
    Link zu diesem Eintragfunc center() -> Vector2

    It can be used as the destination for a news message.

    Rückgabewert
    Vector2
    Deklariert in scripts/sim/industry.gd:86
  • Industry.tile_indices func
    Link zu diesem Eintragfunc tile_indices(m: WorldMap) -> Array[int]
    Parameter
    • m: WorldMap
    Rückgabewert
    Array[int]

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/industry.gd:90
  • Industry.roll_month func
    Link zu diesem Eintragfunc roll_month() -> void
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/industry.gd:98
  • Industry.transported_share funcShare of last month's production that was carried away (0..1).
    Link zu diesem Eintragfunc transported_share(c: String) -> float
    Parameter
    • c: String
    Rückgabewert
    float
    Deklariert in scripts/sim/industry.gd:120
  • Industry.wanted funcStaff it wants each month (0: it runs without, and stations by it take no commuters).
    Link zu diesem Eintragfunc wanted() -> int
    Rückgabewert
    int
    Deklariert in scripts/sim/industry.gd:128
  • Industry.local funcPeople who walk in from the towns around (see LOCAL_REACH), counted once a month.
    Link zu diesem Eintragfunc local(m: WorldMap, index: StaffingIndex = null) -> float
    Parameter
    • m: WorldMap
    • index: StaffingIndex = null
    Rückgabewert
    float
    Deklariert in scripts/sim/industry.gd:168
  • Industry.local_from_towns func
    Link zu diesem Eintragfunc local_from_towns(m: WorldMap, index: StaffingIndex = null) -> float
    Parameter
    • m: WorldMap
    • index: StaffingIndex = null
    Rückgabewert
    float

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/industry.gd:174
  • Industry.rect_gap static funcDistance between the nearest edges of two rectangles (0 when they touch or overlap).
    Link zu diesem Eintragstatic func rect_gap(a: Rect2, b: Rect2) -> float
    Parameter
    • a: Rect2
    • b: Rect2
    Rückgabewert
    float
    Deklariert in scripts/sim/industry.gd:186
  • Industry.commuters funcCommuters counting toward the staff: this month's, or last month's while this one is young.
    Link zu diesem Eintragfunc commuters() -> float
    Rückgabewert
    float
    Deklariert in scripts/sim/industry.gd:193
  • Industry.staffing funcShare of the staff it wants that turns up (0..1); 1 for an industry that wants none.
    Link zu diesem Eintragfunc staffing(m: WorldMap, index: StaffingIndex = null) -> float
    Parameter
    • m: WorldMap
    • index: StaffingIndex = null
    Rückgabewert
    float
    Deklariert in scripts/sim/industry.gd:198
  • Industry.output_factor funcHow the staff changes output: a primary industry makes PRIMARY_MIN..PRIMARY_MAX times its prod_rate, a processing plant turns PLANT_MIN..PLANT_MAX of each input unit into output.
    Link zu diesem Eintragfunc output_factor(m: WorldMap, index: StaffingIndex = null) -> float

    An industry that wants no staff runs at 1.

    Parameter
    • m: WorldMap
    • index: StaffingIndex = null
    Rückgabewert
    float
    Deklariert in scripts/sim/industry.gd:208
  • Industry.hire funcCommuters delivered to a station in reach: takes on up to what it still needs this month and returns how many it took.
    Link zu diesem Eintragfunc hire(m: WorldMap, n: float) -> float

    A third of them go home again (SHIFT_BACK, see Economy.produce).

    Parameter
    • m: WorldMap
    • n: float
    Rückgabewert
    float
    Deklariert in scripts/sim/industry.gd:219
  • Industry.nearest_town funcThe town with the nearest centre: where the industry window suggests bringing workers from.
    Link zu diesem Eintragfunc nearest_town(m: WorldMap) -> Town
    Parameter
    • m: WorldMap
    Rückgabewert
    Town
    Deklariert in scripts/sim/industry.gd:227

Data

  • Data.CARGO constwagon: what one wagon holds (30 when not given).
    Link zu diesem Eintragconst CARGODeklariert in scripts/core/data.gd:5
  • Data.INDUSTRY constworkers: the staff it wants each month (RAIL-28, Industry.staffing), processing plants more than mines and farms.
    Link zu diesem Eintragconst INDUSTRY

    A power station makes nothing for staff to raise, so it wants none. The eras rewrite the chains (RAIL-29). takes and makes are what a kind takes and makes when it first appears; never read them (or later) directly, ask accepts / produces (or Industry's own lists, kept up to date with the map's era): - era: the era (index into ERAS) from which it is found on new maps and opens during the game. - later: what it takes and makes as well from a later era on: {era: {"takes": [...], "makes": [...]}}. - retires: the era from which it is on its way out: a mine's output drifts down every year, a customer nobody supplies may close, and no new ones open (IndustryLife). - needs_all: a plant that only works with every input (two or more): it holds what comes until the rest does, and turns each full set into as many units of output (Economy.deliver_to_industries). It is sited near makers of each input (WorldGen.find_site). - builds: a construction site: it takes these totals, then becomes the kind in becomes. count 0: never found on a new map or opened, only made from another (a finished wind farm). site: where it stands: on "land" (when not given), at "sea", on the "coast", or by a "town" (one of the biggest: a printing works, see WorldGen.find_site). Adding a chain: a new kind with its era, or a later entry on an existing one; town cargos go in TOWN_MAKES / TOWN_TAKES. Everything else (stations, AI, the map's chains, the timeline) follows.

    Deklariert in scripts/core/data.gd:48
  • Data.TOWN_MAKES constCargo houses make the way they make mail (by the people in them), from the era given on: from the Late century towns stop being only customers.
    Link zu diesem Eintragconst TOWN_MAKES := {"mail": 0, "waste": 2}Deklariert in scripts/core/data.gd:86
  • Data.TOWN_TAKES constCargo towns take, from the era given on: at stations that reach one of the buildings in at, or (pop) any house of a town of at least that many people.
    Link zu diesem Eintragconst TOWN_TAKESDeklariert in scripts/core/data.gd:89
  • Data.HOUSES constzone: R residential, C commercial, I light industry, L landmark.
    Link zu diesem Eintragconst HOUSES

    pop counts the people a building brings (residents or workers) - they all travel, so they all make passengers.

    Deklariert in scripts/core/data.gd:95
  • Data.ZONE_NAMES const
    Link zu diesem Eintragconst ZONE_NAMES := {"R": "Residential", "C": "Commercial", "I": "Industrial", "L": "Landmark", "A": "Attraction"}

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/data.gd:115
  • Data.ATTRACTIONS constAttractions towns build as they grow: population needed, and whether it has to be by the sea.
    Link zu diesem Eintragconst ATTRACTIONSDeklariert in scripts/core/data.gd:117
  • Data.TOURIST_FARE constpassengers to a station serving an attraction pay this much more
    Link zu diesem Eintragconst TOURIST_FARE := 1.3Deklariert in scripts/core/data.gd:124
  • Data.ERAS constAges of progress.
    Link zu diesem Eintragconst ERAS

    Each brings new kinds of buildings, more productive industry and faster-growing towns.

    Deklariert in scripts/core/data.gd:127
  • Data.BUILD_INTRO constYear each building type starts appearing in towns.
    Link zu diesem Eintragconst BUILD_INTRO := {"apartment": 1955, "tower": 1962, "highrise": 1968, "modern": 1975, "mall": 1983, "techpark": 1992}Deklariert in scripts/core/data.gd:135
  • Data.era_index static func
    Link zu diesem Eintragstatic func era_index(year: int) -> int
    Parameter
    • year: int
    Rückgabewert
    int

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/data.gd:138
  • Data.can_build static func
    Link zu diesem Eintragstatic func can_build(type: String, year: int) -> bool
    Parameter
    • type: String
    • year: int
    Rückgabewert
    bool

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/data.gd:146
  • Data._chains static vartype -> [{"accepts", "produces"} for each era], read-only
    Link zu diesem Eintragstatic var _chains := {}Deklariert in scripts/core/data.gd:152
  • Data._town_makes static varera -> cargos houses make
    Link zu diesem Eintragstatic var _town_makes: Array = []Deklariert in scripts/core/data.gd:153
  • Data._town_takes static varera -> {house type: [cargos it takes]}
    Link zu diesem Eintragstatic var _town_takes: Array = []Deklariert in scripts/core/data.gd:154
  • Data._town_sizes static varera -> {cargo: the people a town needs to take it}
    Link zu diesem Eintragstatic var _town_sizes: Array = []Deklariert in scripts/core/data.gd:155
  • Data._cargos static varera -> the cargos there are (see cargos)
    Link zu diesem Eintragstatic var _cargos: Array = []Deklariert in scripts/core/data.gd:156
  • Data.accepts static funcWhat an industry of type takes in era era (an index into ERAS): what it took when it first appeared and everything later eras added.
    Link zu diesem Eintragstatic func accepts(type: String, era: int) -> Array

    Shared and read-only.

    Parameter
    • type: String
    • era: int
    Rückgabewert
    Array
    Deklariert in scripts/core/data.gd:161
  • Data.produces static funcWhat an industry of type makes in era era.
    Link zu diesem Eintragstatic func produces(type: String, era: int) -> Array

    Shared and read-only.

    Parameter
    • type: String
    • era: int
    Rückgabewert
    Array
    Deklariert in scripts/core/data.gd:166
  • Data._chain static func
    Link zu diesem Eintragstatic func _chain(type: String, era: int) -> Dictionary
    Parameter
    • type: String
    • era: int
    Rückgabewert
    Dictionary

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/data.gd:170
  • Data.exists static funcWhether industries of type are around by era era.
    Link zu diesem Eintragstatic func exists(type: String, era: int) -> bool
    Parameter
    • type: String
    • era: int
    Rückgabewert
    bool
    Deklariert in scripts/core/data.gd:192
  • Data.opens static funcWhether industries of type are found on new maps and open during the game by era era (a kind with count 0 is only ever made from another).
    Link zu diesem Eintragstatic func opens(type: String, era: int) -> bool
    Parameter
    • type: String
    • era: int
    Rückgabewert
    bool
    Deklariert in scripts/core/data.gd:198
  • Data.retiring static funcWhether type is on its way out by era era (see INDUSTRY's retires).
    Link zu diesem Eintragstatic func retiring(type: String, era: int) -> bool
    Parameter
    • type: String
    • era: int
    Rückgabewert
    bool
    Deklariert in scripts/core/data.gd:203
  • Data.town_makes static funcThe cargos houses make in era era, passengers aside (see TOWN_MAKES).
    Link zu diesem Eintragstatic func town_makes(era: int) -> Array
    Parameter
    • era: int
    Rückgabewert
    Array
    Deklariert in scripts/core/data.gd:208
  • Data.town_takes static funcThe cargos each kind of house takes in era era, beyond what any town does (see TOWN_TAKES).
    Link zu diesem Eintragstatic func town_takes(era: int) -> Dictionary
    Parameter
    • era: int
    Rückgabewert
    Dictionary
    Deklariert in scripts/core/data.gd:214
  • Data.town_takes_by_size static funcThe cargos any house of a big enough town takes in era era: {cargo: the people the town needs} (see TOWN_TAKES' pop).
    Link zu diesem Eintragstatic func town_takes_by_size(era: int) -> Dictionary
    Parameter
    • era: int
    Rückgabewert
    Dictionary
    Deklariert in scripts/core/data.gd:221
  • Data.town_pop static funcThe people a town needs before it takes c (0: any town, or only some of its buildings).
    Link zu diesem Eintragstatic func town_pop(c: String) -> int
    Parameter
    • c: String
    Rückgabewert
    int
    Deklariert in scripts/core/data.gd:227
  • Data._town_tables static func
    Link zu diesem Eintragstatic func _town_tables() -> void
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/data.gd:231
  • Data.cargos static funcThe cargos there are in era era, in ALL_CARGO order: passengers, what towns make and take, and what the kinds of industry around by then take and make.
    Link zu diesem Eintragstatic func cargos(era: int) -> Array

    Shared and read-only.

    Parameter
    • era: int
    Rückgabewert
    Array
    Deklariert in scripts/core/data.gd:260
  • Data.era_changes static funcWhat era i changes in the industry chains, a sentence each (for the news and the Timeline).
    Link zu diesem Eintragstatic func era_changes(i: int) -> Array
    Parameter
    • i: int
    Rückgabewert
    Array
    Ruft auf
    L.t, L.lower, Fmt.cargo_list, Fmt.int_commas
    Deklariert in scripts/core/data.gd:278
  • Data.TOWN_PREFIX const
    Link zu diesem Eintragconst TOWN_PREFIX

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/data.gd:308
  • Data.TOWN_SUFFIX const
    Link zu diesem Eintragconst TOWN_SUFFIX

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/data.gd:312
  • Data.FREIGHT constCars (RAIL-32) are in ALL_CARGO only: trains carry them on car wagons, roads on the car transporter.
    Link zu diesem Eintragconst FREIGHT := ["coal", "wood", "grain", "oil", "goods", "food", "iron_ore", "steel", "fish", "mail", "paper", "news", "plastics", "waste", "electronics"]Deklariert in scripts/core/data.gd:316
  • Data.ALL_CARGO const
    Link zu diesem Eintragconst ALL_CARGO

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/data.gd:317
  • Data.BULK constWhat ships carry: newspapers aren't among them, as they would go stale long before a ship got anywhere.
    Link zu diesem Eintragconst BULK := ["coal", "wood", "grain", "oil", "goods", "food", "iron_ore", "steel", "fish", "paper", "plastics", "waste", "electronics"]Deklariert in scripts/core/data.gd:320
  • Data.MODELS const
    Link zu diesem Eintragconst MODELS

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/data.gd:323
  • Data.WAGON const
    Link zu diesem Eintragconst WAGON := {"cost": 6500, "run": 450}

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/data.gd:335
  • Data.REFIT constChanging cargo costs this share of the price: of a wagon for each wagon converted, of the whole vehicle for anything that isn't a train.
    Link zu diesem Eintragconst REFIT := 0.15Deklariert in scripts/core/data.gd:338
  • Data.LENGTH constBody length in tiles for road vehicles, ships and aircraft that aren't the standard size (road 0.46, ships 0.9, aircraft 0.7).
    Link zu diesem Eintragconst LENGTHDeklariert in scripts/core/data.gd:342
  • Data.INTRO const
    Link zu diesem Eintragconst INTRO

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/data.gd:351
  • Data.LATER_MODELS const
    Link zu diesem Eintragconst LATER_MODELS

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/data.gd:359
  • Data.MOD_MODELS static varvehicle id -> the same fields as MODELS, plus "look" or "model", "mod"
    Link zu diesem Eintragstatic var MOD_MODELS := {}Deklariert in scripts/core/data.gd:402
  • Data.MOD_CARGO static varcargo id -> {"rate", "days"} overrides
    Link zu diesem Eintragstatic var MOD_CARGO := {}Deklariert in scripts/core/data.gd:403
  • Data.MOD_COMPANY_NAMES static var
    Link zu diesem Eintragstatic var MOD_COMPANY_NAMES: Array = []

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/data.gd:404
  • Data._town_prefixes static var
    Link zu diesem Eintragstatic var _town_prefixes: Array = TOWN_PREFIX

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/data.gd:405
  • Data._town_suffixes static var
    Link zu diesem Eintragstatic var _town_suffixes: Array = TOWN_SUFFIX

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/data.gd:406
  • Data.clear_mods static func
    Link zu diesem Eintragstatic func clear_mods() -> void
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/data.gd:409
  • Data.add_model static func
    Link zu diesem Eintragstatic func add_model(id: String, m: Dictionary) -> void
    Parameter
    • id: String
    • m: Dictionary
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/data.gd:417
  • Data.add_town_names static funcExtra name pieces for towns; replace drops the game's own.
    Link zu diesem Eintragstatic func add_town_names(prefixes: Array, suffixes: Array, replace: bool = false) -> void
    Parameter
    • prefixes: Array
    • suffixes: Array
    • replace: bool = false
    Rückgabewert
    void
    Deklariert in scripts/core/data.gd:422
  • Data.town_prefixes static func
    Link zu diesem Eintragstatic func town_prefixes() -> Array
    Rückgabewert
    Array

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/data.gd:429
  • Data.town_suffixes static func
    Link zu diesem Eintragstatic func town_suffixes() -> Array
    Rückgabewert
    Array

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/data.gd:433
  • Data.has_model static funcChecks for an ID in the stock and enabled mod vehicle catalogs.
    Link zu diesem Eintragstatic func has_model(id: String) -> bool

    Use this before looking up an ID from a mod or save.

    Parameter
    • id: String
    Rückgabewert
    bool
    Deklariert in scripts/core/data.gd:437
  • Data.model static funcReturns the definition dictionary for an existing vehicle model ID, including enabled mods.
    Link zu diesem Eintragstatic func model(id: String) -> Dictionary

    Use has_model(id) first when the ID might be missing.

    Parameter
    • id: String
    Rückgabewert
    Dictionary

    Beispiel

    if Data.has_model("diesel"):
        var diesel := Data.model("diesel")
        note(str(diesel.cost))
    Deklariert in scripts/core/data.gd:441
  • Data.all_models static funcReturns the model IDs from the stock and enabled mod catalogs.
    Link zu diesem Eintragstatic func all_models() -> Array

    Use available(id, year) to filter by sale date.

    Rückgabewert
    Array
    Deklariert in scripts/core/data.gd:447
  • Data.intro_year static funcThe year a model goes on sale (0: from the start).
    Link zu diesem Eintragstatic func intro_year(id: String) -> int
    Parameter
    • id: String
    Rückgabewert
    int
    Deklariert in scripts/core/data.gd:452
  • Data.intros static funcEvery model with an introduction year: id -> year.
    Link zu diesem Eintragstatic func intros() -> Dictionary
    Rückgabewert
    Dictionary
    Deklariert in scripts/core/data.gd:459
  • Data.available static funcChecks whether the current year is at or after a model’s introduction year.
    Link zu diesem Eintragstatic func available(id: String, year: int) -> bool

    Use has_model(id) separately to verify the ID.

    Parameter
    • id: String
    • year: int
    Rückgabewert
    bool
    Deklariert in scripts/core/data.gd:467
  • Data.look static funcThe game model whose 3D model (and size) a vehicle uses: itself, or a mod vehicle's "look".
    Link zu diesem Eintragstatic func look(id: String) -> String
    Parameter
    • id: String
    Rückgabewert
    String
    Deklariert in scripts/core/data.gd:472
  • Data.cargo_rate static funcReturns the payment rate per unit of the named cargo over 25 tiles before age penalties.
    Link zu diesem Eintragstatic func cargo_rate(c: String) -> float

    Uses the active mod override when one is set.

    Parameter
    • c: String
    Rückgabewert
    float
    Deklariert in scripts/core/data.gd:477
  • Data.cargo_days static funcReturns how many days the named cargo qualifies for the full rate.
    Link zu diesem Eintragstatic func cargo_days(c: String) -> float

    Uses the active mod override when one is set.

    Parameter
    • c: String
    Rückgabewert
    float
    Deklariert in scripts/core/data.gd:481
  • Data.COST const
    Link zu diesem Eintragconst COST

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/data.gd:484
  • Data.START_LOAN constwhat rivals start with (cash, all borrowed)
    Link zu diesem Eintragconst START_LOAN := 100000Deklariert in scripts/core/data.gd:495
  • Data.PLAYER_START_LOANS constthe player's start-up loan choices
    Link zu diesem Eintragconst PLAYER_START_LOANS := [100000, 250000, 500000]Deklariert in scripts/core/data.gd:496
  • Data.PLAYER_START_LOAN const...and the default
    Link zu diesem Eintragconst PLAYER_START_LOAN := 250000Deklariert in scripts/core/data.gd:497
  • Data.BANKRUPT_MONTHS constmonths in the red before a company goes bankrupt
    Link zu diesem Eintragconst BANKRUPT_MONTHS := 12Deklariert in scripts/core/data.gd:498
  • Data.MAX_LOAN const
    Link zu diesem Eintragconst MAX_LOAN := 500000

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/data.gd:499
  • Data.LOAN_INTEREST const
    Link zu diesem Eintragconst LOAN_INTEREST := 0.04

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/data.gd:500
  • Data.wagon_cap static func
    Link zu diesem Eintragstatic func wagon_cap(cargo: String) -> int
    Parameter
    • cargo: String
    Rückgabewert
    int

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/data.gd:503
  • Data.BRIDGES constBridge styles: cost multiplier, longest span (tiles between the ramps), year available.
    Link zu diesem Eintragconst BRIDGESDeklariert in scripts/core/data.gd:508
  • Data.BRIDGE_ORDER const
    Link zu diesem Eintragconst BRIDGE_ORDER := ["beam", "truss", "viaduct", "arch", "suspension"]

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/data.gd:515
  • Data.LIFE constYears a vehicle of this kind runs well; older ones put customers off.
    Link zu diesem Eintragconst LIFE := {"road": 15, "rail": 25, "water": 30, "air": 20}Deklariert in scripts/core/data.gd:519
  • Data.BREAKDOWN_NAMES constBreakdowns (a new-game option): none, reduced, normal.
    Link zu diesem Eintragconst BREAKDOWN_NAMES := ["None", "Reduced", "Normal"]Deklariert in scripts/core/data.gd:522
  • Data.BREAKDOWN_RATE const
    Link zu diesem Eintragconst BREAKDOWN_RATE := [0.0, 0.4, 1.0]

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/data.gd:523
  • Data.SERVICE_DAYS consta vehicle wants servicing this often
    Link zu diesem Eintragconst SERVICE_DAYS := 120Deklariert in scripts/core/data.gd:524
  • Data.reliability static funcHow reliable a model is when new or just serviced (0..1): later designs are better made.
    Link zu diesem Eintragstatic func reliability(model_id: String) -> float
    Parameter
    • model_id: String
    Rückgabewert
    float
    Deklariert in scripts/core/data.gd:528
  • Data.kind_name static func
    Link zu diesem Eintragstatic func kind_name(kind: String) -> String
    Parameter
    • kind: String
    Rückgabewert
    String
    Ruft auf
    L.t

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/data.gd:536

AiPlayer

  • AiPlayer.NAMES const
    Link zu diesem Eintragconst NAMES

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:10
  • AiPlayer.ROUTES_PER_YEAR const
    Link zu diesem Eintragconst ROUTES_PER_YEAR := [1.0, 1.5, 3.0]

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:13
  • AiPlayer.CEILINGS constshare of the maximum loan the AI will use for expansion
    Link zu diesem Eintragconst CEILINGS := [0.5, 0.75, 0.9]Deklariert in scripts/sim/ai_player.gd:14
  • AiPlayer.THINK const
    Link zu diesem Eintragconst THINK := [[30, 60], [18, 40], [10, 24]]

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:15
  • AiPlayer.FOUNDING const
    Link zu diesem Eintragconst FOUNDING := [150, 120, 50]

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:18
  • AiPlayer.FOUNDING_GAP const
    Link zu diesem Eintragconst FOUNDING_GAP := [70, 60, 30]

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:19
  • AiPlayer.COMPETE_SHARE const
    Link zu diesem Eintragconst COMPETE_SHARE := [0.35, 0.55, 0.8]

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:21
  • AiPlayer.EXTRA_VEHICLES const
    Link zu diesem Eintragconst EXTRA_VEHICLES := [1, 3, 5]

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:23
  • AiPlayer.RESERVE constcash kept in hand before repaying the loan
    Link zu diesem Eintragconst RESERVE := 100000Deklariert in scripts/sim/ai_player.gd:24
  • AiPlayer.MIN_EARNING consta year's profit each vehicle must make before its route gets more
    Link zu diesem Eintragconst MIN_EARNING := 2500Deklariert in scripts/sim/ai_player.gd:25
  • AiPlayer.PAIRS_COMPARED constindustry pairs weighed up before choosing a freight route
    Link zu diesem Eintragconst PAIRS_COMPARED := [1, 2, 4]Deklariert in scripts/sim/ai_player.gd:26
  • AiPlayer.CLOSE_STEP consttiles of a closed route torn up in one go
    Link zu diesem Eintragconst CLOSE_STEP := 16Deklariert in scripts/sim/ai_player.gd:27
  • AiPlayer.NO_PATH_FOR constnowhere to lay the line: the ground rarely changes, so wait four years
    Link zu diesem Eintragconst NO_PATH_FOR := 365 * 3Deklariert in scripts/sim/ai_player.gd:28
  • AiPlayer.CLOSED_FOR consta route closed for losing money isn't tried again for ten years
    Link zu diesem Eintragconst CLOSED_FOR := 365 * 9Deklariert in scripts/sim/ai_player.gd:29
  • AiPlayer.BUILD_RATE const
    Link zu diesem Eintragconst BUILD_RATE := {"rail": [2, 3, 4], "road": [3, 5, 7]}

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:32
  • AiPlayer.REROUTES constways round something built across a line still being laid
    Link zu diesem Eintragconst REROUTES := 3Deklariert in scripts/sim/ai_player.gd:33
  • AiPlayer.SHIPS_ROOM constmoney a rival can raise before it opens a ship route
    Link zu diesem Eintragconst SHIPS_ROOM := 120000Deklariert in scripts/sim/ai_player.gd:35
  • AiPlayer.AIR_CASH constmoney in hand before it opens an air service...
    Link zu diesem Eintragconst AIR_CASH := 200000Deklariert in scripts/sim/ai_player.gd:36
  • AiPlayer.AIR_ROUTES const...and how many it runs at most, by skill: airports aren't cheap
    Link zu diesem Eintragconst AIR_ROUTES := [1, 2, 4]Deklariert in scripts/sim/ai_player.gd:37
  • AiPlayer.AIR_MIN consttiles between two towns worth flying
    Link zu diesem Eintragconst AIR_MIN := 40.0Deklariert in scripts/sim/ai_player.gd:38
  • AiPlayer.SHIP_MAX consttiles apart at most: ships are slow, whatever the map's size
    Link zu diesem Eintragconst SHIP_MAX := {"freight": 80.0, "ferry": 60.0}Deklariert in scripts/sim/ai_player.gd:39
  • AiPlayer.AIRPORT_REACH constan airport goes this close to the town centre
    Link zu diesem Eintragconst AIRPORT_REACH := 10Deklariert in scripts/sim/ai_player.gd:40
  • AiPlayer.FERRIES constferry services a rival runs at most, by skill
    Link zu diesem Eintragconst FERRIES := [1, 1, 2]Deklariert in scripts/sim/ai_player.gd:41
  • AiPlayer.FERRY_TOWN constpeople in each town a ferry links
    Link zu diesem Eintragconst FERRY_TOWN := 500Deklariert in scripts/sim/ai_player.gd:42
  • AiPlayer.PORT_POP constpeople a town's dock or airport must have within reach
    Link zu diesem Eintragconst PORT_POP := {"water": 150, "air": 200}Deklariert in scripts/sim/ai_player.gd:43
  • AiPlayer.SITES_FOR constdays a search for dock and airport sites is remembered
    Link zu diesem Eintragconst SITES_FOR := 30Deklariert in scripts/sim/ai_player.gd:44
  • AiPlayer.WASTE_TOWN constpeople in a town a recycling line starts from (RAIL-29)
    Link zu diesem Eintragconst WASTE_TOWN := 800Deklariert in scripts/sim/ai_player.gd:45
  • AiPlayer.level var
    Link zu diesem Eintragvar level := 1

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:47
  • AiPlayer.loan_ceiling var
    Link zu diesem Eintragvar loan_ceiling: float

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:48
  • AiPlayer.company var
    Link zu diesem Eintragvar company: Company

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:51
  • AiPlayer.rng var
    Link zu diesem Eintragvar rng := RandomNumberGenerator.new()

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:52
  • AiPlayer.next_think var
    Link zu diesem Eintragvar next_think := 20

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:53
  • AiPlayer.routes var[{"kind", "cargo", "a": Station, "b": Station, "model", "wagons", "max"}], and optionally "consist" (a mixed train's wagons), "key" (its entry in failed) and "closing" (being torn up).
    Link zu diesem Eintragvar routes: Array = []Deklariert in scripts/sim/ai_player.gd:56
  • AiPlayer.failed var"kind:x,y" -> day it failed; tried again a year later
    Link zu diesem Eintragvar failed := {}Deklariert in scripts/sim/ai_player.gd:57
  • AiPlayer.project varThe route being built, or {}.
    Link zu diesem Eintragvar project := {}

    "kind" (rail/road), "line" (the points to lay, in order), "at" (index of the last point laid so far), "head"/"tail" (points at either end that are station platforms, kept when the rest is re-routed), "reserved" (tiles a re-route must avoid), "route" (its entry for routes once it opens; its stations may still be missing), "buy" (vehicles to buy on opening), "finish" ("", or "bus"/"delivery"/"pickup": stops still to place in towns "town_a"/"town_b"), "news", "news_at" and "reroutes".

    Deklariert in scripts/sim/ai_player.gd:64
  • AiPlayer._searched varthis think already ran a construction search (one a day is enough)
    Link zu diesem Eintragvar _searched := falseDeklariert in scripts/sim/ai_player.gd:65
  • AiPlayer._sites varDock and airport sites found lately: key -> [day searched, sites].
    Link zu diesem Eintragvar _sites := {}

    Not saved: it is only a cache.

    Deklariert in scripts/sim/ai_player.gd:67
  • AiPlayer.debug static varprint why route attempts fail (playtest tooling)
    Link zu diesem Eintragstatic var debug := falseDeklariert in scripts/sim/ai_player.gd:68
  • AiPlayer.slowest_manage static varthe longest think so far, in microseconds: looking after routes...
    Link zu diesem Eintragstatic var slowest_manage := 0Deklariert in scripts/sim/ai_player.gd:69
  • AiPlayer.slowest_expand static var...and planning a new one (benchmark tooling)
    Link zu diesem Eintragstatic var slowest_expand := 0Deklariert in scripts/sim/ai_player.gd:70
  • AiPlayer.create_competitors static func
    Link zu diesem Eintragstatic func create_competitors(sim: Sim, count: int) -> void
    Parameter
    • sim: Sim
    • count: int
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:73
  • AiPlayer.daily func
    Link zu diesem Eintragfunc daily(sim: Sim) -> void
    Parameter
    • sim: Sim
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:94
  • AiPlayer._expand func
    Link zu diesem Eintragfunc _expand(sim: Sim) -> void
    Parameter
    • sim: Sim
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:111
  • AiPlayer._operating static funcIncome less the cost of running the network (vehicles, stations, track, interest) in ledger l.
    Link zu diesem Eintragstatic func _operating(l: Dictionary) -> int
    Parameter
    • l: Dictionary
    Rückgabewert
    int
    Deklariert in scripts/sim/ai_player.gd:124
  • AiPlayer._troubled funcIn the red, or about to be: no time for new ventures.
    Link zu diesem Eintragfunc _troubled() -> bool
    Rückgabewert
    bool
    Deklariert in scripts/sim/ai_player.gd:130
  • AiPlayer._open_routes func
    Link zu diesem Eintragfunc _open_routes() -> int
    Rückgabewert
    int

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:134
  • AiPlayer._count_routes funcRoutes still open, of one kind ("" for all), and of one cargo if cargo is given.
    Link zu diesem Eintragfunc _count_routes(kind: String, cargo := "") -> int
    Parameter
    • kind: String
    • cargo := ""
    Rückgabewert
    int
    Deklariert in scripts/sim/ai_player.gd:139
  • AiPlayer._scaled static funcConstruction prices follow the game's building-cost setting, for rivals as for the player.
    Link zu diesem Eintragstatic func _scaled(sim: Sim, cost: int) -> int
    Parameter
    • sim: Sim
    • cost: int
    Rückgabewert
    int
    Deklariert in scripts/sim/ai_player.gd:148
  • AiPlayer._manage func
    Link zu diesem Eintragfunc _manage(sim: Sim) -> void
    Parameter
    • sim: Sim
    Rückgabewert
    void
    Ruft auf
    Data.wagon_cap, Data.model

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:154
  • AiPlayer._fleets funcOur vehicles sorted by the route they were bought for: one list for each entry of routes.
    Link zu diesem Eintragfunc _fleets(sim: Sim) -> Array
    Parameter
    • sim: Sim
    Rückgabewert
    Array
    Deklariert in scripts/sim/ai_player.gd:245
  • AiPlayer._buy funcOne more vehicle of model for route r.
    Link zu diesem Eintragfunc _buy(sim: Sim, r: Dictionary, model: String) -> bool
    Parameter
    • sim: Sim
    • r: Dictionary
    • model: String
    Rückgabewert
    bool
    Ruft auf
    Vehicle.stranded
    Deklariert in scripts/sim/ai_player.gd:263
  • AiPlayer._close_route funcTear up a route nothing runs on any more: its stations (unless another route still calls there, or they aren't ours, like an oil rig's dock) and, for a railway, its track.
    Link zu diesem Eintragfunc _close_route(sim: Sim, r: Dictionary) -> bool

    A stretch at a time, so a long line doesn't hold the game up. Returns true once nothing is left; vehicles in the way or an empty bank account mean another try next time.

    Parameter
    • sim: Sim
    • r: Dictionary
    Rückgabewert
    bool
    Deklariert in scripts/sim/ai_player.gd:282
  • AiPlayer.industry_closed funcAn industry has closed (RAIL-23): a route left with nothing to load, or without one of its stops (an oil rig's dock goes with the rig), is given up at once - its vehicles sold, then its stations and track torn up like those of any route that stops paying - and so is a line still being built.
    Link zu diesem Eintragfunc industry_closed(sim: Sim) -> void
    Parameter
    • sim: Sim
    Rückgabewert
    void
    Deklariert in scripts/sim/ai_player.gd:320
  • AiPlayer._orphaned static funcA freight route whose loading end no longer has its cargo (the industry there closed), or whose other end no longer takes it (a wind farm site finished, a power station closed), or any route one of whose stations is gone.
    Link zu diesem Eintragstatic func _orphaned(r: Dictionary) -> bool

    Stops a route doesn't have yet (a bus line still being built) are null.

    Parameter
    • r: Dictionary
    Rückgabewert
    bool
    Deklariert in scripts/sim/ai_player.gd:337
  • AiPlayer._station_in_use func
    Link zu diesem Eintragfunc _station_in_use(sim: Sim, st: Station, r: Dictionary) -> bool
    Parameter
    • sim: Sim
    • st: Station
    • r: Dictionary
    Rückgabewert
    bool

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:346
  • AiPlayer._own_track_from funcOur own plain track joined to station st (the AI never shares track between its lines).
    Link zu diesem Eintragfunc _own_track_from(sim: Sim, st: Station) -> Array[Vector2i]
    Parameter
    • sim: Sim
    • st: Station
    Rückgabewert
    Array[Vector2i]
    Deklariert in scripts/sim/ai_player.gd:359
  • AiPlayer._best_model funcThe newest model of a family the AI knows that's on sale and carries the cargo.
    Link zu diesem Eintragfunc _best_model(sim: Sim, kind: String, cargo: String, current: String) -> String

    Aircraft stop at the narrowbody: the big jets want more passengers than the towns a rival flies between have.

    Parameter
    • sim: Sim
    • kind: String
    • cargo: String
    • current: String
    Rückgabewert
    String
    Ruft auf
    Data.available, Data.model
    Deklariert in scripts/sim/ai_player.gd:386
  • AiPlayer._plan_line funcA construction plan without the money check (_afford borrows when the AI commits to it).
    Link zu diesem Eintragfunc _plan_line(sim: Sim, kind: String, pts: Array[Vector2i]) -> Dictionary
    Parameter
    • sim: Sim
    • kind: String
    • pts: Array[Vector2i]
    Rückgabewert
    Dictionary
    Ruft auf
    BuildOps.plan_line
    Deklariert in scripts/sim/ai_player.gd:400
  • AiPlayer._plan_route funcThe same for a line with bridges and tunnels on it (RouteBuilder.last_crossings, RAIL-52).
    Link zu diesem Eintragfunc _plan_route(sim: Sim, kind: String, pts: Array[Vector2i], crossings: Array) -> Dictionary
    Parameter
    • sim: Sim
    • kind: String
    • pts: Array[Vector2i]
    • crossings: Array
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/ai_player.gd:408
  • AiPlayer._afford funcMake sure cost can be paid, borrowing if needed.
    Link zu diesem Eintragfunc _afford(sim: Sim, cost: int) -> bool

    Returns false if it can't.

    Parameter
    • sim: Sim
    • cost: int
    Rückgabewert
    bool
    Deklariert in scripts/sim/ai_player.gd:413
  • AiPlayer._try_new_route func
    Link zu diesem Eintragfunc _try_new_route(sim: Sim) -> void
    Parameter
    • sim: Sim
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:426
  • AiPlayer._nothing_to_build static funcA line plan that is refused only because everything on it exists already (a road that's there).
    Link zu diesem Eintragstatic func _nothing_to_build(plan: Dictionary) -> bool
    Parameter
    • plan: Dictionary
    Rückgabewert
    bool
    Deklariert in scripts/sim/ai_player.gd:469
  • AiPlayer._why func
    Link zu diesem Eintragfunc _why(msg: String) -> void
    Parameter
    • msg: String
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:473
  • AiPlayer._try_buses func
    Link zu diesem Eintragfunc _try_buses(sim: Sim) -> bool
    Parameter
    • sim: Sim
    Rückgabewert
    bool
    Ruft auf
    RouteBuilder.find, RouteBuilder.jumps_for, L.t

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:478
  • AiPlayer._links_towns funcWhether one of our passenger lines of kind (road or rail) already runs between these two towns.
    Link zu diesem Eintragfunc _links_towns(a: Town, b: Town, kind: String = "road") -> bool
    Parameter
    • a: Town
    • b: Town
    • kind: String = "road"
    Rückgabewert
    bool
    Deklariert in scripts/sim/ai_player.gd:541
  • AiPlayer._try_mail funcA mail van for one of our bus lines that has none yet: the stops are there already.
    Link zu diesem Eintragfunc _try_mail(sim: Sim) -> bool
    Parameter
    • sim: Sim
    Rückgabewert
    bool
    Deklariert in scripts/sim/ai_player.gd:552
  • AiPlayer._town_stop_tile static funcA straight town road tile near the centre that can take a stop.
    Link zu diesem Eintragstatic func _town_stop_tile(m: WorldMap, t: Town) -> Dictionary
    Parameter
    • m: WorldMap
    • t: Town
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/ai_player.gd:578
  • AiPlayer._map_scale static func
    Link zu diesem Eintragstatic func _map_scale(sim: Sim) -> float
    Parameter
    • sim: Sim
    Rückgabewert
    float

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:594
  • AiPlayer._industry_pair funcPick a producing industry and the nearest industry that accepts its cargo within a distance band.
    Link zu diesem Eintragfunc _industry_pair(sim: Sim, min_d: float, max_d: float, kind: String) -> Array

    A relaxed rival takes the first pair it comes across; better ones compare a few and take the one that should earn most (output not yet carried away x fare for the distance).

    Parameter
    • sim: Sim
    • min_d: float
    • max_d: float
    • kind: String
    Rückgabewert
    Array
    Ruft auf
    Data.town_pop, Data.cargo_rate
    Deklariert in scripts/sim/ai_player.gd:601
  • AiPlayer._customer_rank static funcHow good a customer for c industry q is (RAIL-29), the best first, then the nearest: 2 a plant that needs every input and has the others, waiting for c (this completes a chain); 1 an ordinary customer; 0 one that won't keep making something of it: a wind farm site (finished one day, when it takes no more) or a plant still missing another input.
    Link zu diesem Eintragstatic func _customer_rank(q: Industry, c: String) -> int

    Those pay for what is delivered all the same, so they do when there is nothing better.

    Parameter
    • q: Industry
    • c: String
    Rückgabewert
    int
    Deklariert in scripts/sim/ai_player.gd:661
  • AiPlayer._output static funcHow much c p makes in a month: a primary's rate, or what a processing plant made last month.
    Link zu diesem Eintragstatic func _output(p: Industry, c: String) -> float
    Parameter
    • p: Industry
    • c: String
    Rückgabewert
    float
    Deklariert in scripts/sim/ai_player.gd:674
  • AiPlayer._customer_town static funcThe nearest town big enough to want goods and food (and of at least pop people), within a distance band of p.
    Link zu diesem Eintragstatic func _customer_town(sim: Sim, p: Industry, min_d: float, max_d: float, pop: int = 0) -> Town
    Parameter
    • sim: Sim
    • p: Industry
    • min_d: float
    • max_d: float
    • pop: int = 0
    Rückgabewert
    Town
    Deklariert in scripts/sim/ai_player.gd:680
  • AiPlayer._good_source static funcA producing industry on land (see _producing).
    Link zu diesem Eintragstatic func _good_source(ind: Industry) -> bool
    Parameter
    • ind: Industry
    Rückgabewert
    bool
    Deklariert in scripts/sim/ai_player.gd:694
  • AiPlayer._producing static funcA primary industry, or a processing plant that's being supplied.
    Link zu diesem Eintragstatic func _producing(ind: Industry) -> bool
    Parameter
    • ind: Industry
    Rückgabewert
    bool
    Deklariert in scripts/sim/ai_player.gd:699
  • AiPlayer._served_by static func
    Link zu diesem Eintragstatic func _served_by(sim: Sim, ind: Industry, c: String, who: Company) -> bool
    Parameter
    • sim: Sim
    • ind: Industry
    • c: String
    • who: Company
    Rückgabewert
    bool
    Ruft auf
    Economy.industry_stations

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:710
  • AiPlayer._served_by_anyone static func
    Link zu diesem Eintragstatic func _served_by_anyone(sim: Sim, ind: Industry, c: String) -> bool
    Parameter
    • sim: Sim
    • ind: Industry
    • c: String
    Rückgabewert
    bool
    Ruft auf
    Economy.industry_stations

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:717
  • AiPlayer._terminal funcFind platform tiles near ind for a terminal of length tiles, ending on the side facing toward.
    Link zu diesem Eintragfunc _terminal(sim: Sim, kind: String, ind: Industry, length: int, toward: Vector2, partner: Dictionary = {}) -> Dictionary

    Returns {"tiles", "axis", "end", "exit", "exit_dir"} or {}. partner: the terminal at the other end of the line, when that is chosen already.

    Parameter
    • sim: Sim
    • kind: String
    • ind: Industry
    • length: int
    • toward: Vector2
    • partner: Dictionary = {}
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/ai_player.gd:727
  • AiPlayer._terminal_in funcThe same for any area: the best site whose first tile lies in area.
    Link zu diesem Eintragfunc _terminal_in(sim: Sim, kind: String, area: Rect2i, length: int, toward: Vector2, min_pop: int, partner: Dictionary = {}) -> Dictionary

    With min_pop, only sites whose catchment houses at least that many people count, and busier ones are preferred.

    Parameter
    • sim: Sim
    • kind: String
    • area: Rect2i
    • length: int
    • toward: Vector2
    • min_pop: int
    • partner: Dictionary = {}
    Rückgabewert
    Dictionary
    Ruft auf
    BuildOps.station_tile_problem, BuildOps.rail_tile_problem, BuildOps.road_tile_problem
    Deklariert in scripts/sim/ai_player.gd:735
  • AiPlayer._try_waste funcA recycling line (RAIL-29): trucks carry the waste from a town's centre to a recycling plant within reach.
    Link zu diesem Eintragfunc _try_waste(sim: Sim) -> bool

    Towns big enough to fill a truck now and then, and not served by us already.

    Parameter
    • sim: Sim
    Rückgabewert
    bool
    Deklariert in scripts/sim/ai_player.gd:791
  • AiPlayer._count_routes_from funcOur open routes loading cargo at a stop in town t.
    Link zu diesem Eintragfunc _count_routes_from(t: Town, cargo: String) -> int
    Parameter
    • t: Town
    • cargo: String
    Rückgabewert
    int
    Deklariert in scripts/sim/ai_player.gd:816
  • AiPlayer._try_trucks func
    Link zu diesem Eintragfunc _try_trucks(sim: Sim) -> bool
    Parameter
    • sim: Sim
    Rückgabewert
    bool

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:824
  • AiPlayer._try_rail func
    Link zu diesem Eintragfunc _try_rail(sim: Sim) -> bool
    Parameter
    • sim: Sim
    Rückgabewert
    bool

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:833
  • AiPlayer._try_pax_rail funcA passenger (and mail) railway between two sizeable towns a good way apart.
    Link zu diesem Eintragfunc _try_pax_rail(sim: Sim) -> bool
    Parameter
    • sim: Sim
    Rückgabewert
    bool
    Deklariert in scripts/sim/ai_player.gd:841
  • AiPlayer._build_pax_rail func
    Link zu diesem Eintragfunc _build_pax_rail(sim: Sim, a: Town, b: Town, key: String) -> bool
    Parameter
    • sim: Sim
    • a: Town
    • b: Town
    • key: String
    Rückgabewert
    bool
    Ruft auf
    RouteBuilder.find, Const.opp, RouteBuilder.jumps_for, L.t

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:864
  • AiPlayer._build_freight func
    Link zu diesem Eintragfunc _build_freight(sim: Sim, kind: String, p: Industry, q: Industry, cargo: String) -> bool
    Parameter
    • sim: Sim
    • kind: String
    • p: Industry
    • q: Industry
    • cargo: String
    Rückgabewert
    bool
    Ruft auf
    RouteBuilder.find, Const.opp, RouteBuilder.jumps_for, Data.available, L.t

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:913
  • AiPlayer._build_town_delivery funcA truck line from a processing plant to a stop in the middle of a town that takes its cargo, or with pickup the other way round: from a town stop that supplies it (waste) to p, which takes it.
    Link zu diesem Eintragfunc _build_town_delivery(sim: Sim, p: Industry, town: Town, cargo: String, pickup := false) -> bool
    Parameter
    • sim: Sim
    • p: Industry
    • town: Town
    • cargo: String
    • pickup := false
    Rückgabewert
    bool
    Ruft auf
    Station.add_catchment, Station.coverage, RouteBuilder.find, RouteBuilder.jumps_for, L.t
    Deklariert in scripts/sim/ai_player.gd:979
  • AiPlayer._try_ships funcA ship route: freight, or when there's none to try (no search was run), a ferry.
    Link zu diesem Eintragfunc _try_ships(sim: Sim) -> bool

    A ferry earns far less than a freighter, so a rival runs only a few (FERRIES).

    Parameter
    • sim: Sim
    Rückgabewert
    bool
    Deklariert in scripts/sim/ai_player.gd:1044
  • AiPlayer._try_ship_freight funcFreight by sea: a producing industry ships can call at (an oil rig, or one near the shore) and the nearest industry by the sea that takes its cargo, weighed up as in _industry_pair.
    Link zu diesem Eintragfunc _try_ship_freight(sim: Sim) -> bool
    Parameter
    • sim: Sim
    Rückgabewert
    bool
    Ruft auf
    Data.cargo_rate
    Deklariert in scripts/sim/ai_player.gd:1052
  • AiPlayer._build_ship_freight func
    Link zu diesem Eintragfunc _build_ship_freight(sim: Sim, p: Industry, q: Industry, cargo: String) -> bool
    Parameter
    • sim: Sim
    • p: Industry
    • q: Industry
    • cargo: String
    Rückgabewert
    bool
    Ruft auf
    L.t

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:1098
  • AiPlayer._try_ferry funcA ferry between two towns of FERRY_TOWN+ people on the same water, 14 to SHIP_MAX tiles apart.
    Link zu diesem Eintragfunc _try_ferry(sim: Sim) -> bool
    Parameter
    • sim: Sim
    Rückgabewert
    bool
    Deklariert in scripts/sim/ai_player.gd:1115
  • AiPlayer._try_air funcAn air service between two big towns a good way apart: from a town, to the biggest one far enough away.
    Link zu diesem Eintragfunc _try_air(sim: Sim) -> bool

    A town's airport is used again for its next service rather than building another.

    Parameter
    • sim: Sim
    Rückgabewert
    bool
    Deklariert in scripts/sim/ai_player.gd:1145
  • AiPlayer._pair_key static func
    Link zu diesem Eintragstatic func _pair_key(what: String, a: Town, b: Town) -> String
    Parameter
    • what: String
    • a: Town
    • b: Town
    Rückgabewert
    String

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:1171
  • AiPlayer._build_town_link funcA passenger service of kind ("water" or "air") between two towns, calling at pa and pb (see _town_port).
    Link zu diesem Eintragfunc _build_town_link(sim: Sim, kind: String, a: Town, b: Town, pa: Dictionary, pb: Dictionary) -> bool
    Parameter
    • sim: Sim
    • kind: String
    • a: Town
    • b: Town
    • pa: Dictionary
    • pb: Dictionary
    Rückgabewert
    bool
    Ruft auf
    L.t
    Deklariert in scripts/sim/ai_player.gd:1177
  • AiPlayer._open_port_route funcBuild what a ship or air route still needs at either end (r.a, r.b: {"station"} for one that's there already, or a site {"tiles", "axis"}), buy its first count vehicles and open it.
    Link zu diesem Eintragfunc _open_port_route(sim: Sim, r: Dictionary, count: int, news: String, news_at: Vector2) -> bool

    Nothing is built unless both ends can be, and each must supply or take the cargo as its end of the route should.

    Parameter
    • sim: Sim
    • r: Dictionary
    • count: int
    • news: String
    • news_at: Vector2
    Rückgabewert
    bool
    Deklariert in scripts/sim/ai_player.gd:1194
  • AiPlayer._town_port funcWhere a passenger service of kind ("water" or "air") calls in town: a dock or airport of ours there already, or else the best site for a new one ({} when there's none).
    Link zu diesem Eintragfunc _town_port(sim: Sim, kind: String, town: Town) -> Dictionary
    Parameter
    • sim: Sim
    • kind: String
    • town: Town
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/ai_player.gd:1243
  • AiPlayer._port_toward funcWhere a ship route for ind calls: our own dock that serves it already, an oil rig's open dock, or the shore site nearest toward.
    Link zu diesem Eintragfunc _port_toward(sim: Sim, ind: Industry, toward: Vector2) -> Dictionary

    {} if ships can't reach it.

    Parameter
    • sim: Sim
    • ind: Industry
    • toward: Vector2
    Rückgabewert
    Dictionary
    Ruft auf
    Economy.industry_stations
    Deklariert in scripts/sim/ai_player.gd:1254
  • AiPlayer._ports_of funcWhere ships can call for ind: an oil rig's own open dock, or the shore tiles near enough for a dock's catchment to reach it ([] inland).
    Link zu diesem Eintragfunc _ports_of(sim: Sim, ind: Industry) -> Array

    Remembered for a while.

    Parameter
    • sim: Sim
    • ind: Industry
    Rückgabewert
    Array
    Deklariert in scripts/sim/ai_player.gd:1272
  • AiPlayer._industry_docks static func
    Link zu diesem Eintragstatic func _industry_docks(m: WorldMap, ind: Industry) -> Array
    Parameter
    • m: WorldMap
    • ind: Industry
    Rückgabewert
    Array

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:1276
  • AiPlayer._remembered funcA search for sites, done again only once it's SITES_FOR days old: the coast and the towns barely change from one think to the next, and a site that has gone is caught when it's built on.
    Link zu diesem Eintragfunc _remembered(sim: Sim, key: String, search: Callable)
    Parameter
    • sim: Sim
    • key: String
    • search: Callable
    Rückgabewert
    func _remembered(sim: Sim, key: String, search: Callable)
    Deklariert in scripts/sim/ai_player.gd:1293
  • AiPlayer._port_site static funcThe best site near the centre of town for a dock (a shore tile) or an airport (a level 3x2 or 2x3 patch): most people within its reach, at least PORT_POP, less a little for each tile from the centre.
    Link zu diesem Eintragstatic func _port_site(m: WorldMap, kind: String, town: Town) -> Dictionary

    {"tiles", "axis"}, or {} when there's none.

    Parameter
    • m: WorldMap
    • kind: String
    • town: Town
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/ai_player.gd:1304
  • AiPlayer._port_fits static funcWhether a dock (kind "water", one tile) or an airport ("air") can go on the tiles of r.
    Link zu diesem Eintragstatic func _port_fits(m: WorldMap, kind: String, r: Rect2i) -> bool
    Parameter
    • m: WorldMap
    • kind: String
    • r: Rect2i
    Rückgabewert
    bool
    Ruft auf
    BuildOps.station_tile_problem
    Deklariert in scripts/sim/ai_player.gd:1335
  • AiPlayer._pop_table static funcRunning totals of the people in the houses of area, so that those in any rectangle of it take four lookups (_pop_in) instead of a count tile by tile.
    Link zu diesem Eintragstatic func _pop_table(m: WorldMap, area: Rect2i) -> PackedInt32Array
    Parameter
    • m: WorldMap
    • area: Rect2i
    Rückgabewert
    PackedInt32Array
    Deklariert in scripts/sim/ai_player.gd:1356
  • AiPlayer._pop_in static func
    Link zu diesem Eintragstatic func _pop_in(sums: PackedInt32Array, area: Rect2i, r: Rect2i) -> int
    Parameter
    • sums: PackedInt32Array
    • area: Rect2i
    • r: Rect2i
    Rückgabewert
    int

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:1374
  • AiPlayer._berth static funcThe water tile ships berth at for a dock end of a route ({"station"} or a shore site).
    Link zu diesem Eintragstatic func _berth(m: WorldMap, port: Dictionary) -> Vector2i
    Parameter
    • m: WorldMap
    • port: Dictionary
    Rückgabewert
    Vector2i
    Ruft auf
    BuildOps.dock_facing
    Deklariert in scripts/sim/ai_player.gd:1387
  • AiPlayer._second_berth funcShips take turns at a berth (RAIL-26).
    Link zu diesem Eintragfunc _second_berth(sim: Sim, fleet: Array) -> void

    A ship seen waiting (thinks are weeks apart, so it waits often) off one of our one-berth docks, where the ship in the berth is waiting for a full load, gets a second dock tile built beside the first, with a berth of its own - but only when the waiting ship has other work there: cargo to unload, or a different cargo to load. Two ships waiting for the same cargo gain nothing from a berth each: they would share it out between them, fill up no sooner, and then sail in convoy with nobody loading in between. Two berths at most, and an oil rig's dock is nobody's to extend.

    Parameter
    • sim: Sim
    • fleet: Array
    Rückgabewert
    void
    Deklariert in scripts/sim/ai_player.gd:1403
  • AiPlayer._berth_beside static funcA shore tile beside dock tile t, whose ships berth on the water facing it, where a second dock tile would have a berth of its own: on the same shore, facing the same way, so the two berths lie side by side, and on water no other dock berths at.
    Link zu diesem Eintragstatic func _berth_beside(m: WorldMap, t: Vector2i, facing: int) -> Vector2i

    (-1, -1) if there's none.

    Parameter
    • m: WorldMap
    • t: Vector2i
    • facing: int
    Rückgabewert
    Vector2i
    Ruft auf
    BuildOps.dock_facing
    Deklariert in scripts/sim/ai_player.gd:1429
  • AiPlayer._berth_taken static funcWhether a dock already berths at water tile w: one on the shore facing it, or an oil rig's dock standing on it.
    Link zu diesem Eintragstatic func _berth_taken(m: WorldMap, w: Vector2i) -> bool
    Parameter
    • m: WorldMap
    • w: Vector2i
    Rückgabewert
    bool
    Deklariert in scripts/sim/ai_player.gd:1442
  • AiPlayer._sea_link static funcWhether ships can sail between the water tiles a and b by a way not much longer than the straight line (a long way round the coast pays no more than the short one).
    Link zu diesem Eintragstatic func _sea_link(m: WorldMap, a: Vector2i, b: Vector2i) -> bool

    The search keeps to the water near that line, so even on a big sea it's quick.

    Parameter
    • m: WorldMap
    • a: Vector2i
    • b: Vector2i
    Rückgabewert
    bool
    Ruft auf
    Pathfinder.find_sea
    Deklariert in scripts/sim/ai_player.gd:1457
  • AiPlayer._carries_from funcWhether one of our routes already loads c at a station serving ind (an oil rig's dock is nobody's, so _served_by doesn't see our tankers there).
    Link zu diesem Eintragfunc _carries_from(sim: Sim, ind: Industry, c: String) -> bool
    Parameter
    • sim: Sim
    • ind: Industry
    • c: String
    Rückgabewert
    bool
    Ruft auf
    Economy.industry_stations
    Deklariert in scripts/sim/ai_player.gd:1463
  • AiPlayer._start funcBegin laying line, a stretch a day (see project).
    Link zu diesem Eintragfunc _start(line: Array[Vector2i], head: int, tail: int, reserved: Dictionary, to_lay: bool, route: Dictionary, buy: int, news: String, news_at: Vector2, extra: Dictionary = {}) -> void

    head/tail: points at the start/end of the line that are platforms. to_lay: false when every piece of it exists already (an existing road).

    Parameter
    • line: Array[Vector2i]
    • head: int
    • tail: int
    • reserved: Dictionary
    • to_lay: bool
    • route: Dictionary
    • buy: int
    • news: String
    • news_at: Vector2
    • extra: Dictionary = {}
    Rückgabewert
    void
    Deklariert in scripts/sim/ai_player.gd:1475
  • AiPlayer._construct funcA day's work on the line under construction, and opening it once it's finished.
    Link zu diesem Eintragfunc _construct(sim: Sim) -> void
    Parameter
    • sim: Sim
    Rückgabewert
    void
    Deklariert in scripts/sim/ai_player.gd:1484
  • AiPlayer._next_crossing static funcThe next bridge or tunnel the line under construction comes to ({} when none is left).
    Link zu diesem Eintragstatic func _next_crossing(p: Dictionary) -> Dictionary
    Parameter
    • p: Dictionary
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/ai_player.gd:1536
  • AiPlayer._reroute funcA new way from where the line has got to, to its far end.
    Link zu diesem Eintragfunc _reroute(sim: Sim) -> bool

    False if there's none (or the line has been re-routed too often already).

    Parameter
    • sim: Sim
    Rückgabewert
    bool
    Ruft auf
    BuildOps.dir_between, RouteBuilder.jumps_for, RouteBuilder.find
    Deklariert in scripts/sim/ai_player.gd:1550
  • AiPlayer._open funcThe line is finished: place the stops still missing, buy the first vehicles and open for business.
    Link zu diesem Eintragfunc _open(sim: Sim) -> void
    Parameter
    • sim: Sim
    Rückgabewert
    void
    Deklariert in scripts/sim/ai_player.gd:1606
  • AiPlayer._abandon funcGive up the line under construction: what was built of it is torn up again (roads stay, as they do when a route closes) and the place isn't tried again for a while.
    Link zu diesem Eintragfunc _abandon(sim: Sim, why: String) -> void
    Parameter
    • sim: Sim
    • why: String
    Rückgabewert
    void
    Deklariert in scripts/sim/ai_player.gd:1642
  • AiPlayer.to_dict func
    Link zu diesem Eintragfunc to_dict() -> Dictionary
    Rückgabewert
    Dictionary

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:1661
  • AiPlayer._route_to_dict static func
    Link zu diesem Eintragstatic func _route_to_dict(r: Dictionary) -> Dictionary
    Parameter
    • r: Dictionary
    Rückgabewert
    Dictionary

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:1681
  • AiPlayer._route_from_dict static funcA route saved by _route_to_dict, or {} if one of its stations is gone.
    Link zu diesem Eintragstatic func _route_from_dict(r: Dictionary, by_id: Dictionary, partial := false) -> Dictionary

    With partial, a station not placed yet (-1) is allowed.

    Parameter
    • r: Dictionary
    • by_id: Dictionary
    • partial := false
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/ai_player.gd:1692
  • AiPlayer._flat static func
    Link zu diesem Eintragstatic func _flat(tiles: Array) -> Array
    Parameter
    • tiles: Array
    Rückgabewert
    Array

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:1713
  • AiPlayer._tiles static func
    Link zu diesem Eintragstatic func _tiles(flat: Array) -> Array[Vector2i]
    Parameter
    • flat: Array
    Rückgabewert
    Array[Vector2i]

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:1721
  • AiPlayer.from_dict static func
    Link zu diesem Eintragstatic func from_dict(sim: Sim, d: Dictionary) -> AiPlayer
    Parameter
    • sim: Sim
    • d: Dictionary
    Rückgabewert
    AiPlayer

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/ai_player.gd:1728

BuildOps

  • BuildOps._plan static func
    Link zu diesem Eintragstatic func _plan() -> Dictionary
    Rückgabewert
    Dictionary

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/build_ops.gd:8
  • BuildOps._fail static func
    Link zu diesem Eintragstatic func _fail(p: Dictionary, t: Vector2i, why: String) -> void
    Parameter
    • p: Dictionary
    • t: Vector2i
    • why: String
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/build_ops.gd:12
  • BuildOps.dir_between static func
    Link zu diesem Eintragstatic func dir_between(a: Vector2i, b: Vector2i) -> int
    Parameter
    • a: Vector2i
    • b: Vector2i
    Rückgabewert
    int

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/build_ops.gd:18
  • BuildOps.network_bits_ok static funcWhether a tile can carry a road or rail piece with the given full connection bitmask.
    Link zu diesem Eintragstatic func network_bits_ok(m: WorldMap, x: int, y: int, bits: int, strict: bool = false) -> bool

    Flat tiles take any shape; simple inclines only take pieces running along the incline.

    Parameter
    • m: WorldMap
    • x: int
    • y: int
    • bits: int
    • strict: bool = false
    Rückgabewert
    bool
    Deklariert in scripts/sim/build_ops.gd:26
  • BuildOps._slope_reason static func
    Link zu diesem Eintragstatic func _slope_reason(m: WorldMap, x: int, y: int) -> String
    Parameter
    • m: WorldMap
    • x: int
    • y: int
    Rückgabewert
    String
    Ruft auf
    L.t

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/build_ops.gd:50
  • BuildOps._obj_reason static func
    Link zu diesem Eintragstatic func _obj_reason(o: Dictionary) -> String
    Parameter
    • o: Dictionary
    Rückgabewert
    String
    Ruft auf
    L.t

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/build_ops.gd:58
  • BuildOps._is_crossing static func
    Link zu diesem Eintragstatic func _is_crossing(existing_other: int, bits: int) -> bool
    Parameter
    • existing_other: int
    • bits: int
    Rückgabewert
    bool

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/build_ops.gd:67
  • BuildOps.span_problem static funcGround construction under a bridge or over a tunnel: allowed only across its line.
    Link zu diesem Eintragstatic func span_problem(m: WorldMap, x: int, y: int, bits: int) -> String
    Parameter
    • m: WorldMap
    • x: int
    • y: int
    • bits: int
    Rückgabewert
    String
    Ruft auf
    L.t, WorldMap.axis_of
    Deklariert in scripts/sim/build_ops.gd:72
  • BuildOps.under_bridge static func
    Link zu diesem Eintragstatic func under_bridge(m: WorldMap, x: int, y: int) -> bool
    Parameter
    • m: WorldMap
    • x: int
    • y: int
    Rückgabewert
    bool

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/build_ops.gd:86
  • BuildOps.rail_tile_problem static funcWhy rail with full bitmask bits can't go on this tile, or "" if it can.
    Link zu diesem Eintragstatic func rail_tile_problem(m: WorldMap, x: int, y: int, bits: int) -> String
    Parameter
    • m: WorldMap
    • x: int
    • y: int
    • bits: int
    Rückgabewert
    String
    Ruft auf
    L.t
    Deklariert in scripts/sim/build_ops.gd:92
  • BuildOps.road_tile_problem static funcWhy road with full bitmask bits can't go on this tile, or "" if it can.
    Link zu diesem Eintragstatic func road_tile_problem(m: WorldMap, x: int, y: int, bits: int) -> String
    Parameter
    • m: WorldMap
    • x: int
    • y: int
    • bits: int
    Rückgabewert
    String
    Ruft auf
    L.t
    Deklariert in scripts/sim/build_ops.gd:118
  • BuildOps.INDUSTRY_GAP constTiles of open ground towns leave around an industry's footprint: room for the player's station or loading bay, and no houses pressed against a cooling tower.
    Link zu diesem Eintragconst INDUSTRY_GAP := 2Deklariert in scripts/sim/build_ops.gd:147
  • BuildOps.can_link_road static funcStricter rule used by town growth: no crossings, no stations, and no new street into the ground kept clear around an industry (joining a road already there is fine).
    Link zu diesem Eintragstatic func can_link_road(m: WorldMap, x: int, y: int, d: int, strict: bool = false) -> bool
    Parameter
    • m: WorldMap
    • x: int
    • y: int
    • d: int
    • strict: bool = false
    Rückgabewert
    bool
    Ruft auf
    Const.opp
    Deklariert in scripts/sim/build_ops.gd:152
  • BuildOps.link_road static func
    Link zu diesem Eintragstatic func link_road(m: WorldMap, x: int, y: int, d: int) -> void
    Parameter
    • m: WorldMap
    • x: int
    • y: int
    • d: int
    Rückgabewert
    void
    Ruft auf
    Const.opp

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/build_ops.gd:171
  • BuildOps.can_build_house static funcHouses need a flat, dry, empty tile, clear of the ground kept around industries.
    Link zu diesem Eintragstatic func can_build_house(m: WorldMap, x: int, y: int) -> bool
    Parameter
    • m: WorldMap
    • x: int
    • y: int
    Rückgabewert
    bool
    Deklariert in scripts/sim/build_ops.gd:181
  • BuildOps.plan_line static funcPlan a road or rail line through consecutive, 4-adjacent tiles pts.
    Link zu diesem Eintragstatic func plan_line(m: WorldMap, kind: String, pts: Array[Vector2i]) -> Dictionary

    Extra keys: kind, add (Vector2i -> bits to add).

    Parameter
    • m: WorldMap
    • kind: String
    • pts: Array[Vector2i]
    Rückgabewert
    Dictionary
    Ruft auf
    L.t, Const.opp
    Deklariert in scripts/sim/build_ops.gd:194
  • BuildOps._parallel_diagonal static funcIf existing is one corner piece and adding the opposite corner, the pairing they form as two parallel diagonals (see WorldMap.diag2), else -1.
    Link zu diesem Eintragstatic func _parallel_diagonal(existing: int, adding: int) -> int
    Parameter
    • existing: int
    • adding: int
    Rückgabewert
    int
    Deklariert in scripts/sim/build_ops.gd:245
  • BuildOps.apply_line static func
    Link zu diesem Eintragstatic func apply_line(m: WorldMap, p: Dictionary) -> void
    Parameter
    • m: WorldMap
    • p: Dictionary
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/build_ops.gd:255
  • BuildOps.dock_facing static funcDirection from a shore tile down to open water, or -1.
    Link zu diesem Eintragstatic func dock_facing(m: WorldMap, x: int, y: int) -> int

    Docks sit on a shore slope whose low edge meets the water (or on a level tile at the water's edge).

    Parameter
    • m: WorldMap
    • x: int
    • y: int
    Rückgabewert
    int
    Deklariert in scripts/sim/build_ops.gd:276
  • BuildOps.station_tile_problem static func
    Link zu diesem Eintragstatic func station_tile_problem(m: WorldMap, kind: String, x: int, y: int, axis: int) -> String
    Parameter
    • m: WorldMap
    • kind: String
    • x: int
    • y: int
    • axis: int
    Rückgabewert
    String
    Ruft auf
    L.t

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/build_ops.gd:284
  • BuildOps.MAX_STATION_SPREAD consta station's tiles fit in a square this many tiles across
    Link zu diesem Eintragconst MAX_STATION_SPREAD := 20Deklariert in scripts/sim/build_ops.gd:328
  • BuildOps.plan_station static funcPlan station tiles of kind ("rail" or "road") along axis.
    Link zu diesem Eintragstatic func plan_station(m: WorldMap, kind: String, pts: Array[Vector2i], axis: int) -> Dictionary

    Extra keys: kind, axis, tiles, join (Station or null), catch (catchment incl. joined station), accepts, supplies, attractions (attraction types in the catchment).

    Parameter
    • m: WorldMap
    • kind: String
    • pts: Array[Vector2i]
    • axis: int
    Rückgabewert
    Dictionary
    Ruft auf
    L.t, Station.add_catchment, Station.coverage
    Deklariert in scripts/sim/build_ops.gd:333
  • BuildOps.apply_station static func
    Link zu diesem Eintragstatic func apply_station(m: WorldMap, p: Dictionary) -> Station
    Parameter
    • m: WorldMap
    • p: Dictionary
    Rückgabewert
    Station
    Ruft auf
    Station.make_name, WorldMap.axis_of

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/build_ops.gd:389
  • BuildOps.add_rig_dock static funcThe open dock an industry at sea (an oil rig) comes with, so a rig can be served by ship however far from the shore it stands.
    Link zu diesem Eintragstatic func add_rig_dock(m: WorldMap, ind: Industry) -> Station

    Nobody owns it and every company's ships may load there. Made with the map, and on loading a save from before rigs had one. Returns the dock (the one it already has, if any), or null when no open water touches the rig.

    Parameter
    • m: WorldMap
    • ind: Industry
    Rückgabewert
    Station
    Ruft auf
    L.t, WorldMap.axis_of
    Deklariert in scripts/sim/build_ops.gd:424
  • BuildOps.rig_dock_spot static funcWhere a rig's dock goes: a free water tile along one of the rig's sides, the one with the most open water around it (away from any shore), so ships come and go easily.
    Link zu diesem Eintragstatic func rig_dock_spot(m: WorldMap, ind: Industry) -> Vector2i

    (-1, -1) if none.

    Parameter
    • m: WorldMap
    • ind: Industry
    Rückgabewert
    Vector2i
    Deklariert in scripts/sim/build_ops.gd:455
  • BuildOps.is_rig_dock static funcTrue on the tile of a rig's own dock (see add_rig_dock).
    Link zu diesem Eintragstatic func is_rig_dock(o) -> bool
    Parameter
    • o
    Rückgabewert
    bool
    Deklariert in scripts/sim/build_ops.gd:486
  • BuildOps.bulldoze_target static funcWhat bulldozing a tile would remove (one layer: station, track, road, building or trees) and its cost.
    Link zu diesem Eintragstatic func bulldoze_target(m: WorldMap, x: int, y: int, who_id: int = -1) -> Dictionary

    who_id: the company bulldozing. On a level crossing over someone else's track it takes the road.

    Parameter
    • m: WorldMap
    • x: int
    • y: int
    • who_id: int = -1
    Rückgabewert
    Dictionary
    Ruft auf
    Town.anchor_of, Town.footprint, WorldMap.crossing_tiles
    Deklariert in scripts/sim/build_ops.gd:494
  • BuildOps.plan_bulldoze static funcExtra keys: rect, count.
    Link zu diesem Eintragstatic func plan_bulldoze(m: WorldMap, rect: Rect2i, who_id: int = -1) -> Dictionary
    Parameter
    • m: WorldMap
    • rect: Rect2i
    • who_id: int = -1
    Rückgabewert
    Dictionary
    Ruft auf
    L.t
    Deklariert in scripts/sim/build_ops.gd:526
  • BuildOps.apply_bulldoze static funcApplies to every removable tile in the rect; industries are skipped.
    Link zu diesem Eintragstatic func apply_bulldoze(m: WorldMap, p: Dictionary) -> void
    Parameter
    • m: WorldMap
    • p: Dictionary
    Rückgabewert
    void
    Ruft auf
    WorldMap.crossing_tiles, Town.footprint, Const.opp
    Deklariert in scripts/sim/build_ops.gd:566
  • BuildOps.plan_terraform static funcRaise (delta = 1) or lower (delta = -1) one tile corner.
    Link zu diesem Eintragstatic func plan_terraform(m: WorldMap, c: Vector2i, delta: int) -> Dictionary

    Neighbouring corners follow so that edge-adjacent corners never differ by more than one level. Extra keys: corner, corners (Vector2i -> new height), tiles (affected tiles).

    Parameter
    • m: WorldMap
    • c: Vector2i
    • delta: int
    Rückgabewert
    Dictionary
    Ruft auf
    L.t
    Deklariert in scripts/sim/build_ops.gd:648
  • BuildOps.apply_terraform static func
    Link zu diesem Eintragstatic func apply_terraform(m: WorldMap, p: Dictionary) -> void
    Parameter
    • m: WorldMap
    • p: Dictionary
    Rückgabewert
    void
    Ruft auf
    TerrainGen.classify_tile

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/build_ops.gd:701
  • BuildOps.plan_level static funcLevel the tiles in rect (all their corners) to height, as far as the rules allow.
    Link zu diesem Eintragstatic func plan_level(m: WorldMap, rect: Rect2i, height: int, blocked: Dictionary = {}) -> Dictionary

    Corners move one level at a time - cutting from the top down, then filling from the bottom up - and drag their neighbours along the way plan_terraform does, so edge-adjacent corners never differ by more than one level. A tile that can't change shape (a building, road or track, a bridge or tunnel, water, or a tile in blocked: tile -> reason) pins its corners, and any move that would disturb a pinned corner is left out; the rest of the area is still levelled. Trees on tiles that change shape are cleared. Extra keys: rect, height, corners (Vector2i -> new height), steps (corner moves, each costing Data.COST.terraform), tiles (tiles that change shape), trees (those of them with trees), why (refused tile -> reason; the same tiles are in bad).

    Parameter
    • m: WorldMap
    • rect: Rect2i
    • height: int
    • blocked: Dictionary = {}
    Rückgabewert
    Dictionary
    Ruft auf
    L.t
    Deklariert in scripts/sim/build_ops.gd:723
  • BuildOps._level_problem static funcWhy tile t can't change shape while levelling ("" if it can).
    Link zu diesem Eintragstatic func _level_problem(m: WorldMap, t: Vector2i, blocked: Dictionary) -> String
    Parameter
    • m: WorldMap
    • t: Vector2i
    • blocked: Dictionary
    Rückgabewert
    String
    Ruft auf
    L.t
    Deklariert in scripts/sim/build_ops.gd:783
  • BuildOps._level_step static funcMove corner c one level (delta) to v, dragging neighbours along.
    Link zu diesem Eintragstatic func _level_step(m: WorldMap, c: Vector2i, v: int, delta: int, work: Dictionary, blocked: Dictionary, problems: Dictionary, p: Dictionary) -> bool

    Fails, changing nothing in work, when a corner that would move belongs to a tile that can't change (recorded in p.why).

    Parameter
    • m: WorldMap
    • c: Vector2i
    • v: int
    • delta: int
    • work: Dictionary
    • blocked: Dictionary
    • problems: Dictionary
    • p: Dictionary
    Rückgabewert
    bool
    Deklariert in scripts/sim/build_ops.gd:800
  • BuildOps.apply_level static func
    Link zu diesem Eintragstatic func apply_level(m: WorldMap, p: Dictionary) -> void
    Parameter
    • m: WorldMap
    • p: Dictionary
    Rückgabewert
    void
    Ruft auf
    TerrainGen.classify_tile

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/build_ops.gd:838
  • BuildOps.MAX_BRIDGE const
    Link zu diesem Eintragconst MAX_BRIDGE := 24

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/build_ops.gd:857
  • BuildOps.MAX_TUNNEL const
    Link zu diesem Eintragconst MAX_TUNNEL := 30

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/build_ops.gd:858
  • BuildOps.edge_heights static funcCorner heights of the edge of tile t facing direction d.
    Link zu diesem Eintragstatic func edge_heights(m: WorldMap, t: Vector2i, d: int) -> Vector2i
    Parameter
    • m: WorldMap
    • t: Vector2i
    • d: int
    Rückgabewert
    Vector2i
    Deklariert in scripts/sim/build_ops.gd:862
  • BuildOps._end_piece static funcThe network piece a bridge or tunnel needs on tile t (toward direction d), added to the plan.
    Link zu diesem Eintragstatic func _end_piece(m: WorldMap, p: Dictionary, t: Vector2i, d: int) -> void
    Parameter
    • m: WorldMap
    • p: Dictionary
    • t: Vector2i
    • d: int
    Rückgabewert
    void
    Deklariert in scripts/sim/build_ops.gd:871
  • BuildOps.plan_bridge static funcA bridge from ramp tile a to ramp tile b (same row or column).
    Link zu diesem Eintragstatic func plan_bridge(m: WorldMap, kind: String, a: Vector2i, b: Vector2i, style: String = "") -> Dictionary

    The deck sits at the height of the ramps' inner edges, which must match. The ground underneath may not rise above the deck, and roads or track passing under need a level of clearance. Extra keys: kind, type, s0, s1, dir, level, add (ramp pieces), tiles (spans).

    Parameter
    • m: WorldMap
    • kind: String
    • a: Vector2i
    • b: Vector2i
    • style: String = ""
    Rückgabewert
    Dictionary
    Ruft auf
    L.t, L.lower, Const.opp, WorldMap.axis_of
    Deklariert in scripts/sim/build_ops.gd:890
  • BuildOps.plan_electrify static funcOverhead wires over the track along pts.
    Link zu diesem Eintragstatic func plan_electrify(m: WorldMap, pts: Array[Vector2i]) -> Dictionary

    Tiles without track are skipped; wired ones are free. Extra keys: tiles (the tiles that get wires).

    Parameter
    • m: WorldMap
    • pts: Array[Vector2i]
    Rückgabewert
    Dictionary
    Ruft auf
    L.t
    Deklariert in scripts/sim/build_ops.gd:966
  • BuildOps.apply_electrify static func
    Link zu diesem Eintragstatic func apply_electrify(m: WorldMap, p: Dictionary) -> void
    Parameter
    • m: WorldMap
    • p: Dictionary
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/build_ops.gd:984
  • BuildOps.plan_depot static funcA depot on tile t, its door - and its one road or track connection - facing facing.
    Link zu diesem Eintragstatic func plan_depot(m: WorldMap, kind: String, t: Vector2i, facing: int) -> Dictionary

    Extra keys: kind, tile, facing, link (joins the road/track in front), link_reason.

    Parameter
    • m: WorldMap
    • kind: String
    • t: Vector2i
    • facing: int
    Rückgabewert
    Dictionary
    Ruft auf
    L.t, Const.opp
    Deklariert in scripts/sim/build_ops.gd:999
  • BuildOps.apply_depot static func
    Link zu diesem Eintragstatic func apply_depot(m: WorldMap, p: Dictionary, owner: Company) -> void
    Parameter
    • m: WorldMap
    • p: Dictionary
    • owner: Company
    Rückgabewert
    void
    Ruft auf
    Const.opp

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/build_ops.gd:1034
  • BuildOps.tunnel_exit static funcWhere a tunnel from hillside tile a (heading d, its mouth at height level) comes out: how many tiles on the far mouth is, at the first tile whose far edge comes back down to level at either corner.
    Link zu diesem Eintragstatic func tunnel_exit(m: WorldMap, a: Vector2i, d: int, level: int) -> int

    0 when the ground doesn't come down that far within MAX_TUNNEL tiles (or the map ends first).

    Parameter
    • m: WorldMap
    • a: Vector2i
    • d: int
    • level: int
    Rückgabewert
    int
    Deklariert in scripts/sim/build_ops.gd:1060
  • BuildOps._edge_corners static funcThe corners of the edge of tile t facing direction d, in edge_heights' order.
    Link zu diesem Eintragstatic func _edge_corners(t: Vector2i, d: int) -> Array[Vector2i]
    Parameter
    • t: Vector2i
    • d: int
    Rückgabewert
    Array[Vector2i]
    Deklariert in scripts/sim/build_ops.gd:1072
  • BuildOps.plan_tunnel static funcA tunnel starting at hillside tile a (an incline rising straight ahead).
    Link zu diesem Eintragstatic func plan_tunnel(m: WorldMap, kind: String, a: Vector2i, hint: bool = true) -> Dictionary

    It runs into the hill to the first tile where the ground comes back down to the entrance's height (tunnel_exit), and that tile is the far mouth. A hill seldom ends in a slope exactly like the one it started with - it comes down on a slant, or one corner sticks up - so the far mouth's tile is evened out into one, its corners lowered the way Level land lowers them (dragging the land around along). Extra keys as plan_bridge, plus corners (corner -> new height, evening out the far mouth: see apply_level) and trees (tiles that change shape and lose their trees). hint: when there's no way out, look further up the slope for a hillside that has one.

    Parameter
    • m: WorldMap
    • kind: String
    • a: Vector2i
    • hint: bool = true
    Rückgabewert
    Dictionary
    Ruft auf
    L.t, Const.opp
    Deklariert in scripts/sim/build_ops.gd:1088
  • BuildOps._no_exit static funcplan_tunnel finding no way out: say so, on the entrance alone (not the whole line it looked along).
    Link zu diesem Eintragstatic func _no_exit(m: WorldMap, p: Dictionary, a: Vector2i, d: int, level: int, hint: bool) -> void

    The ground may come back down on the far side, only not as low as here: then a hillside further up the same slope, still on the way up (before the ground first levels off or falls), may well take a tunnel - when one does, say where.

    Parameter
    • m: WorldMap
    • p: Dictionary
    • a: Vector2i
    • d: int
    • level: int
    • hint: bool
    Rückgabewert
    void
    Ruft auf
    L.t, WorldMap.axis_of, L.n
    Deklariert in scripts/sim/build_ops.gd:1162
  • BuildOps._even_out_mouth static funcEven out tunnel tile t (heading d) into the far mouth: a straight incline from level + 1 on its near edge down to level on its far edge.
    Link zu diesem Eintragstatic func _even_out_mouth(m: WorldMap, p: Dictionary, t: Vector2i, d: int, level: int, keep: Array) -> void

    Adds the corners that move, their cost and the trees they take to p; keep are tiles that mustn't change shape.

    Parameter
    • m: WorldMap
    • p: Dictionary
    • t: Vector2i
    • d: int
    • level: int
    • keep: Array
    Rückgabewert
    void
    Ruft auf
    Const.opp, L.t
    Deklariert in scripts/sim/build_ops.gd:1189
  • BuildOps._set_corners static funcPut corner heights (corner -> height) on the map as they are, without redrawing anything.
    Link zu diesem Eintragstatic func _set_corners(m: WorldMap, corners: Dictionary) -> Dictionary

    Returns the heights they had, to put back the same way.

    Parameter
    • m: WorldMap
    • corners: Dictionary
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/build_ops.gd:1234
  • BuildOps.apply_crossing static func
    Link zu diesem Eintragstatic func apply_crossing(m: WorldMap, p: Dictionary) -> Dictionary
    Parameter
    • m: WorldMap
    • p: Dictionary
    Rückgabewert
    Dictionary

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/build_ops.gd:1243
  • BuildOps.signal_problem static func
    Link zu diesem Eintragstatic func signal_problem(m: WorldMap, t: Vector2i) -> String
    Parameter
    • m: WorldMap
    • t: Vector2i
    Rückgabewert
    String
    Ruft auf
    L.t

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/build_ops.gd:1268
  • BuildOps.plan_signal static funcPlace a two-way signal, or cycle an existing one: two-way -> one-way -> one-way the other way -> two-way.
    Link zu diesem Eintragstatic func plan_signal(m: WorldMap, t: Vector2i) -> Dictionary

    Extra keys: tile, state (see WorldMap.signals).

    Parameter
    • m: WorldMap
    • t: Vector2i
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/build_ops.gd:1288
  • BuildOps.apply_signal static func
    Link zu diesem Eintragstatic func apply_signal(m: WorldMap, p: Dictionary) -> void
    Parameter
    • m: WorldMap
    • p: Dictionary
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/build_ops.gd:1307
  • BuildOps._corner_of static func[a, b] if bits is a single corner piece, else [].
    Link zu diesem Eintragstatic func _corner_of(bits: int) -> Array
    Parameter
    • bits: int
    Rückgabewert
    Array
    Deklariert in scripts/sim/build_ops.gd:1314
  • BuildOps.signal_dirs static funcThe two directions trains can pass a signal on tile t (headings on entering the tile).
    Link zu diesem Eintragstatic func signal_dirs(m: WorldMap, t: Vector2i) -> Array
    Parameter
    • m: WorldMap
    • t: Vector2i
    Rückgabewert
    Array
    Ruft auf
    Const.opp
    Deklariert in scripts/sim/build_ops.gd:1323

Calendar

  • Calendar.MONTHS const
    Link zu diesem Eintragconst MONTHS := ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/calendar.gd:4
  • Calendar.MONTH_DAYS const
    Link zu diesem Eintragconst MONTH_DAYS := [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/calendar.gd:5
  • Calendar.is_leap static func
    Link zu diesem Eintragstatic func is_leap(y: int) -> bool
    Parameter
    • y: int
    Rückgabewert
    bool

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/calendar.gd:8
  • Calendar.year_days static func
    Link zu diesem Eintragstatic func year_days(y: int) -> int
    Parameter
    • y: int
    Rückgabewert
    int

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/calendar.gd:12
  • Calendar.from_day static funcReturns Vector3i(year, month 0-11, day of month 1-31).
    Link zu diesem Eintragstatic func from_day(day: int) -> Vector3i
    Parameter
    • day: int
    Rückgabewert
    Vector3i
    Deklariert in scripts/core/calendar.gd:17
  • Calendar.format static func
    Link zu diesem Eintragstatic func format(day: int) -> String
    Parameter
    • day: int
    Rückgabewert
    String
    Ruft auf
    L.t

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/calendar.gd:33
  • Calendar.is_christmas static funcChristmas time in the towns: 1 December to 6 January.
    Link zu diesem Eintragstatic func is_christmas(day: int) -> bool
    Parameter
    • day: int
    Rückgabewert
    bool
    Deklariert in scripts/core/calendar.gd:39
  • Calendar.doy_is_christmas static funcThe same for a day of the year (0 = 1 January), ignoring leap years.
    Link zu diesem Eintragstatic func doy_is_christmas(doy: int) -> bool
    Parameter
    • doy: int
    Rückgabewert
    bool
    Deklariert in scripts/core/calendar.gd:45
  • Calendar.day_of_year_start static funcDay number of 1 January of year.
    Link zu diesem Eintragstatic func day_of_year_start(year: int) -> int
    Parameter
    • year: int
    Rückgabewert
    int
    Deklariert in scripts/core/calendar.gd:50

ConnectPlanner

  • ConnectPlanner.MAX_DIST consttiles apart (along the grid) beyond which it doesn't search at all
    Link zu diesem Eintragconst MAX_DIST := 160Deklariert in scripts/sim/connect_planner.gd:15
  • ConnectPlanner.ENDS_TRIED constsides of a joined end worth trying
    Link zu diesem Eintragconst ENDS_TRIED := 2Deklariert in scripts/sim/connect_planner.gd:16
  • ConnectPlanner.PAIRS const(start side, end side) pairs searched at most
    Link zu diesem Eintragconst PAIRS := 2Deklariert in scripts/sim/connect_planner.gd:17
  • ConnectPlanner.LIVE_EXPANSIONS constRouteBuilder's budget while the pointer moves (the click that builds searches with its own, larger one), so a search that finds nothing doesn't hold up the game.
    Link zu diesem Eintragconst LIVE_EXPANSIONS := 4000Deklariert in scripts/sim/connect_planner.gd:20
  • ConnectPlanner.SHORTCUT_SAVES constA bridge or tunnel is taken over the cheapest way round when it saves at least SHORTCUT_SAVES tiles and SHORTCUT_SHARE of the line's length.
    Link zu diesem Eintragconst SHORTCUT_SAVES := 4

    In that search a crossing tile costs plain line plus SHORTCUT_PRICE of what it costs over that, and each crossing SHORTCUT_CROSSING tiles on top.

    Deklariert in scripts/sim/connect_planner.gd:24
  • ConnectPlanner.SHORTCUT_SHARE const
    Link zu diesem Eintragconst SHORTCUT_SHARE := 0.3

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/connect_planner.gd:25
  • ConnectPlanner.SHORTCUT_PRICE const
    Link zu diesem Eintragconst SHORTCUT_PRICE := 0.25

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/connect_planner.gd:26
  • ConnectPlanner.SHORTCUT_CROSSING const
    Link zu diesem Eintragconst SHORTCUT_CROSSING := 2.0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/connect_planner.gd:27
  • ConnectPlanner.path static funcTiles from a to b (both included, each one next to the one before), or [] when no line was found within the search's budget; never over water or through a hill (see route for those).
    Link zu diesem Eintragstatic func path(m: WorldMap, kind: String, a: Vector2i, b: Vector2i, arriving: int = -1, max_expansions: int = 0, pairs_tried: int = PAIRS) -> Array[Vector2i]

    arriving: the way a line already reaches a (a waypoint), so this one carries on from it instead of doubling back (-1: none). max_expansions: RouteBuilder's budget (0: its own default, which grows with the distance; otherwise never more than that). pairs_tried: how many (start side, end side) pairs to try at most.

    Parameter
    • m: WorldMap
    • kind: String
    • a: Vector2i
    • b: Vector2i
    • arriving: int = -1
    • max_expansions: int = 0
    • pairs_tried: int = PAIRS
    Rückgabewert
    Array[Vector2i]
    Deklariert in scripts/sim/connect_planner.gd:36
  • ConnectPlanner.route static funcpath, with bridges and tunnels where the way needs them: {"tiles", "crossings": as RouteBuilder.last_crossings gives them}.
    Link zu diesem Eintragstatic func route(m: WorldMap, kind: String, a: Vector2i, b: Vector2i, year: int, arriving: int = -1, max_expansions: int = 0, pairs_tried: int = PAIRS) -> Dictionary

    year: the bridge styles there are by then (-1: no bridges or tunnels at all).

    Parameter
    • m: WorldMap
    • kind: String
    • a: Vector2i
    • b: Vector2i
    • year: int
    • arriving: int = -1
    • max_expansions: int = 0
    • pairs_tried: int = PAIRS
    Rückgabewert
    Dictionary
    Ruft auf
    RouteBuilder.jumps_for
    Deklariert in scripts/sim/connect_planner.gd:44
  • ConnectPlanner._shortcut static funcjumps (RouteBuilder.jumps_for) with every crossing weighed mostly by its length: a span or tunnel tile costs little more than a tile of plain line, and a crossing little on top.
    Link zu diesem Eintragstatic func _shortcut(jumps: Dictionary) -> Dictionary
    Parameter
    • jumps: Dictionary
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/connect_planner.gd:73
  • ConnectPlanner._route static funcOne search with jumps, from the best sides of the ends: route's {"tiles", "crossings"}.
    Link zu diesem Eintragstatic func _route(m: WorldMap, kind: String, a: Vector2i, b: Vector2i, jumps: Dictionary, arriving: int, max_expansions: int, pairs_tried: int) -> Dictionary
    Parameter
    • m: WorldMap
    • kind: String
    • a: Vector2i
    • b: Vector2i
    • jumps: Dictionary
    • arriving: int
    • max_expansions: int
    • pairs_tried: int
    Rückgabewert
    Dictionary
    Ruft auf
    Const.opp, RouteBuilder.find
    Deklariert in scripts/sim/connect_planner.gd:83
  • ConnectPlanner.ends static funcWhere a search may start from end p (or, read backwards, finish at it), the other end being at toward: [{"tile", "dir": the way in (-1 any), "joined": true when p itself is an existing piece the line joins from the free tile beside it}], best first.
    Link zu diesem Eintragstatic func ends(m: WorldMap, kind: String, p: Vector2i, toward: Vector2i) -> Array
    Parameter
    • m: WorldMap
    • kind: String
    • p: Vector2i
    • toward: Vector2i
    Rückgabewert
    Array
    Deklariert in scripts/sim/connect_planner.gd:129
  • ConnectPlanner._takes_a_piece static funcWhether any piece of road or track at all (straight or a bend) could go on tile t.
    Link zu diesem Eintragstatic func _takes_a_piece(m: WorldMap, kind: String, t: Vector2i) -> bool
    Parameter
    • m: WorldMap
    • kind: String
    • t: Vector2i
    Rückgabewert
    bool
    Ruft auf
    RouteBuilder._tile_cost
    Deklariert in scripts/sim/connect_planner.gd:154
  • ConnectPlanner._open static funcWhether a line of kind can be searched through tile t as it is: no building, station or depot on it, and no track already there for a railway (a road may run along a road).
    Link zu diesem Eintragstatic func _open(m: WorldMap, kind: String, t: Vector2i) -> bool
    Parameter
    • m: WorldMap
    • kind: String
    • t: Vector2i
    Rückgabewert
    bool
    Deklariert in scripts/sim/connect_planner.gd:163

Const

  • Const.MAP_SIZE const
    Link zu diesem Eintragconst MAP_SIZE := 128

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/constants.gd:4
  • Const.CHUNK const
    Link zu diesem Eintragconst CHUNK := 16

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/constants.gd:5
  • Const.HEIGHT_STEP constworld units per height level
    Link zu diesem Eintragconst HEIGHT_STEP := 0.4Deklariert in scripts/core/constants.gd:6
  • Const.MAX_HEIGHT const
    Link zu diesem Eintragconst MAX_HEIGHT := 10

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/constants.gd:7
  • Const.WATER_Y constwater surface height in world units
    Link zu diesem Eintragconst WATER_Y := 0.12Deklariert in scripts/core/constants.gd:8
  • Const.DAY_SECONDS constreal seconds per game day at 1x (OpenTTD: 74 ticks x 30 ms = 2.22 s)
    Link zu diesem Eintragconst DAY_SECONDS := 2.2Deklariert in scripts/core/constants.gd:10
  • Const.VEHICLE_PACE constVehicles get this much done per game day - moving, loading, being serviced - so trips take fewer days while they move on screen exactly as fast as before the day got longer.
    Link zu diesem Eintragconst VEHICLE_PACE := 1.6Deklariert in scripts/core/constants.gd:13
  • Const.START_YEAR const
    Link zu diesem Eintragconst START_YEAR := 1950

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/constants.gd:14
  • Const.DIRS const
    Link zu diesem Eintragconst DIRS: Array[Vector2i] = [Vector2i(0, -1), Vector2i(1, 0), Vector2i(0, 1), Vector2i(-1, 0)]

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/constants.gd:17
  • Const.BIT const
    Link zu diesem Eintragconst BIT: Array[int] = [1, 2, 4, 8]

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/constants.gd:18
  • Const.AXIS_BITS const
    Link zu diesem Eintragconst AXIS_BITS: Array[int] = [10, 5]

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/constants.gd:20
  • Const.opp static func
    Link zu diesem Eintragstatic func opp(d: int) -> int
    Parameter
    • d: int
    Rückgabewert
    int

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/constants.gd:23

Economy

  • Economy.PRODUCTION_DAYS constproduction runs every this many days
    Link zu diesem Eintragconst PRODUCTION_DAYS := 3Deklariert in scripts/sim/economy.gd:5
  • Economy.LATE_SPAN consta late cargo loses its fare, on average, at a rate that would take all of it over this many times its on-time days
    Link zu diesem Eintragconst LATE_SPAN := 10.0Deklariert in scripts/sim/economy.gd:6
  • Economy.LATE_EARLY constbelow 1 the S-curve starts falling sooner after the on-time days; 1 is a symmetric S
    Link zu diesem Eintragconst LATE_EARLY := 0.75Deklariert in scripts/sim/economy.gd:7
  • Economy.LATE_FLOOR constno delivery pays less than this share of the full fare
    Link zu diesem Eintragconst LATE_FLOOR := 0.3Deklariert in scripts/sim/economy.gd:8
  • Economy.PAX_PER_POP constpassengers per resident per month
    Link zu diesem Eintragconst PAX_PER_POP := 1.0 / 7.0Deklariert in scripts/sim/economy.gd:9
  • Economy.MAIL_PER_POP constbags of mail per resident per month
    Link zu diesem Eintragconst MAIL_PER_POP := 1.0 / 26.0Deklariert in scripts/sim/economy.gd:10
  • Economy.WASTE_PER_POP consttonnes of waste per resident per month (from the Late century, RAIL-29)
    Link zu diesem Eintragconst WASTE_PER_POP := 1.0 / 12.0Deklariert in scripts/sim/economy.gd:11
  • Economy.PER_POP const
    Link zu diesem Eintragconst PER_POP := {"pax": PAX_PER_POP, "mail": MAIL_PER_POP, "waste": WASTE_PER_POP}

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/economy.gd:12
  • Economy.MAX_WAITING const
    Link zu diesem Eintragconst MAX_WAITING := 3000.0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/economy.gd:13
  • Economy.GIVE_UP consteach production run, cargo waiting beyond a month's worth loses this share times (1 - rating)
    Link zu diesem Eintragconst GIVE_UP := 0.06Deklariert in scripts/sim/economy.gd:14
  • Economy.INFLOW_EASE consthow fast a station's estimate of its monthly inflow follows what arrives (per production run)
    Link zu diesem Eintragconst INFLOW_EASE := 0.1Deklariert in scripts/sim/economy.gd:15
  • Economy.STAFF_NEUTRAL conststaffing at which an industry leans neither to growing nor shrinking (see staff_lean)
    Link zu diesem Eintragconst STAFF_NEUTRAL := 0.4Deklariert in scripts/sim/economy.gd:16
  • Economy.STAFF_TILT consthow far staff_lean moves the odds that a production change is a rise
    Link zu diesem Eintragconst STAFF_TILT := 0.4Deklariert in scripts/sim/economy.gd:17
  • Economy.PROD_MIN constthe least a mine, farm or well makes in a month
    Link zu diesem Eintragconst PROD_MIN := 16Deklariert in scripts/sim/economy.gd:18
  • Economy.payment static funcPayment for delivering amount of cargo c over dist tiles in days days.
    Link zu diesem Eintragstatic func payment(c: String, amount: float, dist: float, days: float) -> int
    Parameter
    • c: String
    • amount: float
    • dist: float
    • days: float
    Rückgabewert
    int
    Deklariert in scripts/sim/economy.gd:22
  • Economy.fare static funcWhat one unit of cargo c pays for dist tiles after days on the way.
    Link zu diesem Eintragstatic func fare(c: String, dist: float, days: float) -> float

    Fares don't change over the years: distance raises them in proportion, and lateness lowers them (see time_factor).

    Parameter
    • c: String
    • dist: float
    • days: float
    Rückgabewert
    float
    Ruft auf
    Data.cargo_rate
    Deklariert in scripts/sim/economy.gd:28
  • Economy.time_factor static funcShare of the full fare still paid after days on the way: all of it up to the cargo's own number of days, then easing down in a smooth S-curve (slowly at first, fastest half-way, slowly again at the end) to LATE_FLOOR, reached at 8 times that long (see LATE_SPAN).
    Link zu diesem Eintragstatic func time_factor(c: String, days: float) -> float
    Parameter
    • c: String
    • days: float
    Rückgabewert
    float
    Ruft auf
    Data.cargo_days
    Deklariert in scripts/sim/economy.gd:35
  • Economy.late_loss_per_day static funcShare of the full fare lost, on average, for every day between the cargo's own number of days and the day it reaches the floor.
    Link zu diesem Eintragstatic func late_loss_per_day(c: String) -> float

    In the steep part of the curve it falls about twice as fast.

    Parameter
    • c: String
    Rückgabewert
    float
    Ruft auf
    Data.cargo_days
    Deklariert in scripts/sim/economy.gd:44
  • Economy.station_distance static func
    Link zu diesem Eintragstatic func station_distance(a: Station, b: Station) -> float
    Parameter
    • a: Station
    • b: Station
    Rückgabewert
    float

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/economy.gd:48
  • Economy.produce static func
    Link zu diesem Eintragstatic func produce(sim: Sim) -> void
    Parameter
    • sim: Sim
    Rückgabewert
    void
    Ruft auf
    Data.town_makes, Calendar.from_day

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/economy.gd:56
  • Economy._links static funcWhich stations reach which industries, both ways round: {"sts": Industry -> [Station], "inds": Station -> [Industry]}, each list in map order.
    Link zu diesem Eintragstatic func _links(m: WorldMap) -> Dictionary

    Kept on the map and rebuilt only when a station's catchment changes or a station or industry comes or goes (never saved).

    Parameter
    • m: WorldMap
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/economy.gd:112
  • Economy.industry_stations static funcStations whose catchment touches any tile of the industry.
    Link zu diesem Eintragstatic func industry_stations(m: WorldMap, ind: Industry) -> Array
    Parameter
    • m: WorldMap
    • ind: Industry
    Rückgabewert
    Array
    Deklariert in scripts/sim/economy.gd:142
  • Economy._distribute static funcGive amt of cargo to the (up to two) best-rated stations that serve it.
    Link zu diesem Eintragstatic func _distribute(stations: Array, c: String, amt: float) -> float

    Returns the amount moved.

    Parameter
    • stations: Array
    • c: String
    • amt: float
    Rückgabewert
    float
    Deklariert in scripts/sim/economy.gd:157
  • Economy.shares static funcHow cargo c made in reach of stations is split right now: Station -> the share of everything made that goes to it.
    Link zu diesem Eintragstatic func shares(stations: Array, c: String) -> Dictionary

    Only stations that load the cargo take part, and only the best-rated two of them; the best rating sets how much leaves at all, and the two split that in proportion to their ratings. The shares add up to the best rating; the rest is lost. Stations left out aren't listed, nor are those of companies shut out of their town by another's exclusive rights (RAIL-24).

    Parameter
    • stations: Array
    • c: String
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/economy.gd:173
  • Economy.shut_out static funcWhether st gets no new cargo because another company holds exclusive transport rights in its town (a town request's reward, see Opportunities).
    Link zu diesem Eintragstatic func shut_out(st: Station) -> bool
    Parameter
    • st: Station
    Rückgabewert
    bool
    Deklariert in scripts/sim/economy.gd:195
  • Economy._update_ratings static funcRatings drift toward a target set by pickup frequency, vehicle speed and waiting cargo.
    Link zu diesem Eintragstatic func _update_ratings(sim: Sim) -> void

    Then cargo that has piled up gives up (see give_up).

    Parameter
    • sim: Sim
    Rückgabewert
    void
    Deklariert in scripts/sim/economy.gd:201
  • Economy.give_up static funcCargo c waiting at st that gives up this production run (RAIL-56): of what waits beyond a month's worth (Station.inflow), a share of GIVE_UP times what the rating falls short of 100%.
    Link zu diesem Eintragstatic func give_up(st: Station, c: String) -> float

    At 50% that is 3% every run, about a quarter a month; at 90%, 0.6%. A queue that fits the station's own trade is never touched, and every queue settles instead of filling to MAX_WAITING.

    Parameter
    • st: Station
    • c: String
    Rückgabewert
    float
    Deklariert in scripts/sim/economy.gd:234
  • Economy._update_inflow static funcFold what came to st since the last production run into its estimate of a month's inflow.
    Link zu diesem Eintragstatic func _update_inflow(st: Station) -> void
    Parameter
    • st: Station
    Rückgabewert
    void
    Deklariert in scripts/sim/economy.gd:242
  • Economy.unload static funcUnload what this station accepts; pay the owner.
    Link zu diesem Eintragstatic func unload(sim: Sim, v: Vehicle, st: Station) -> int

    Returns units moved.

    Parameter
    • sim: Sim
    • v: Vehicle
    • st: Station
    Rückgabewert
    int
    Deklariert in scripts/sim/economy.gd:256
  • Economy.FEEDER_SHARE constA feeder's share of the fare for cargo it leaves at a transfer stop: part of what the trip so far would pay, less what earlier feeders already showed.
    Link zu diesem Eintragconst FEEDER_SHARE := 0.75

    It only goes on the vehicle's books (its profit); the money comes when the cargo is delivered, so passing cargo back and forth earns nothing.

    Deklariert in scripts/sim/economy.gd:324
  • Economy.feeder_share static func
    Link zu diesem Eintragstatic func feeder_share(sim: Sim, p: Dictionary, c: String, st: Station) -> int
    Parameter
    • sim: Sim
    • p: Dictionary
    • c: String
    • st: Station
    Rückgabewert
    int

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/economy.gd:326
  • Economy.deliver_to_industries static func
    Link zu diesem Eintragstatic func deliver_to_industries(sim: Sim, st: Station, c: String, amount: int) -> void
    Parameter
    • sim: Sim
    • st: Station
    • c: String
    • amount: int
    Rückgabewert
    void
    Ruft auf
    IndustryLife.build

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/economy.gd:333
  • Economy._full_sets static funcA plant that needs every input (Data.INDUSTRY "needs_all") holds what comes until the rest does: amount of c joins its store, and every full set (one unit of each input) goes into the works.
    Link zu diesem Eintragstatic func _full_sets(ind: Industry, c: String, amount: float) -> float

    Returns how many units go in, so each set makes as many units of output as it took in.

    Parameter
    • ind: Industry
    • c: String
    • amount: float
    Rückgabewert
    float
    Deklariert in scripts/sim/economy.gd:369
  • Economy.hire_commuters static funcPassengers delivered to st go to work at the industries it reaches (RAIL-28), each taking on what it still needs this month, in map order.
    Link zu diesem Eintragstatic func hire_commuters(m: WorldMap, st: Station, amount: float) -> float

    Returns how many found work; the rest are ordinary passengers (the fare is the same either way).

    Parameter
    • m: WorldMap
    • st: Station
    • amount: float
    Rückgabewert
    float
    Deklariert in scripts/sim/economy.gd:384
  • Economy.reaches static funcWhether st's catchment touches ind (from the cached links: nothing is copied).
    Link zu diesem Eintragstatic func reaches(m: WorldMap, st: Station, ind: Industry) -> bool
    Parameter
    • m: WorldMap
    • st: Station
    • ind: Industry
    Rückgabewert
    bool
    Deklariert in scripts/sim/economy.gd:394
  • Economy.industry_stations_reverse static func
    Link zu diesem Eintragstatic func industry_stations_reverse(m: WorldMap, st: Station) -> Array
    Parameter
    • m: WorldMap
    • st: Station
    Rückgabewert
    Array

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/economy.gd:398
  • Economy.monthly static func
    Link zu diesem Eintragstatic func monthly(sim: Sim) -> void
    Parameter
    • sim: Sim
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/economy.gd:413
  • Economy._charge_infrastructure static funcMonthly upkeep of everything companies own besides stations: track, overhead wires, signals, bridges and tunnels, and depots.
    Link zu diesem Eintragstatic func _charge_infrastructure(sim: Sim) -> void
    Parameter
    • sim: Sim
    Rückgabewert
    void
    Ruft auf
    WorldMap.crossing_tiles
    Deklariert in scripts/sim/economy.gd:446
  • Economy._council static funcCouncils like companies that serve their town and grow tired of neglected stations.
    Link zu diesem Eintragstatic func _council(sim: Sim, t: Town) -> void
    Parameter
    • sim: Sim
    • t: Town
    Rückgabewert
    void
    Ruft auf
    L.t
    Deklariert in scripts/sim/economy.gd:491
  • Economy.staff_lean static funcHow staffing leans an industry's future (RAIL-28): from -STAFF_NEUTRAL with nobody at work to 1 - STAFF_NEUTRAL with a full staff, 0 at about what walkers-in from a nearby town give.
    Link zu diesem Eintragstatic func staff_lean(m: WorldMap, ind: Industry, index: Industry.StaffingIndex = null) -> float

    _maybe_change_production weighs it into growing or shrinking; closures (RAIL-23) can too.

    Parameter
    • m: WorldMap
    • ind: Industry
    • index: Industry.StaffingIndex = null
    Rückgabewert
    float
    Deklariert in scripts/sim/economy.gd:528
  • Economy._maybe_change_production static func
    Link zu diesem Eintragstatic func _maybe_change_production(sim: Sim, ind: Industry, index: Industry.StaffingIndex) -> void
    Parameter
    • sim: Sim
    • ind: Industry
    • index: Industry.StaffingIndex
    Rückgabewert
    void
    Ruft auf
    L.t

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/economy.gd:532

FirstSteps

  • FirstSteps.PAIR_DIST consttiles apart a first bus route pays well over and costs little road for
    Link zu diesem Eintragconst PAIR_DIST := 20.0Deklariert in scripts/sim/first_steps.gd:7
  • FirstSteps.PAIR_MIN constcloser than this, two towns are one place to a passenger
    Link zu diesem Eintragconst PAIR_MIN := 8.0Deklariert in scripts/sim/first_steps.gd:8
  • FirstSteps.PAIR_FROM constpairs are chosen among this many towns nearest the view
    Link zu diesem Eintragconst PAIR_FROM := 10Deklariert in scripts/sim/first_steps.gd:9
  • FirstSteps.CENTRE consttiles from a town's centre whose roads count as the town's
    Link zu diesem Eintragconst CENTRE := 3Deklariert in scripts/sim/first_steps.gd:10
  • FirstSteps.town_pair static funcTwo towns near around (a tile) that make a good first bus route: about PAIR_DIST apart, near the view, the bigger the better.
    Link zu diesem Eintragstatic func town_pair(m: WorldMap, around: Vector2) -> Array

    [Town, Town], or [] on a map with fewer than two towns.

    Parameter
    • m: WorldMap
    • around: Vector2
    Rückgabewert
    Array
    Deklariert in scripts/sim/first_steps.gd:15
  • FirstSteps._from static func
    Link zu diesem Eintragstatic func _from(t: Town, p: Vector2) -> float
    Parameter
    • t: Town
    • p: Vector2
    Rückgabewert
    float

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/first_steps.gd:35
  • FirstSteps.towns_joined static funcWhether a road runs from the middle of town a to the middle of town b.
    Link zu diesem Eintragstatic func towns_joined(m: WorldMap, a: Town, b: Town) -> bool
    Parameter
    • m: WorldMap
    • a: Town
    • b: Town
    Rückgabewert
    bool
    Ruft auf
    Pathfinder.find
    Deklariert in scripts/sim/first_steps.gd:40
  • FirstSteps._centre_roads static funcThe road tiles near a town's centre (its first crossroads is there), as a set.
    Link zu diesem Eintragstatic func _centre_roads(m: WorldMap, t: Town) -> Dictionary
    Parameter
    • m: WorldMap
    • t: Town
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/first_steps.gd:49
  • FirstSteps.road_stops static funcwho's road stops (a station with a road stop).
    Link zu diesem Eintragstatic func road_stops(m: WorldMap, who: Company) -> Array
    Parameter
    • m: WorldMap
    • who: Company
    Rückgabewert
    Array
    Deklariert in scripts/sim/first_steps.gd:59
  • FirstSteps.joined_stops static funcTwo of who's road stops that a road joins, so a bus could run between them: [Station, Station], or [].
    Link zu diesem Eintragstatic func joined_stops(sim: Sim, who: Company) -> Array

    One search per stop at most, each towards all the stops after it.

    Parameter
    • sim: Sim
    • who: Company
    Rückgabewert
    Array
    Deklariert in scripts/sim/first_steps.gd:69
  • FirstSteps.depot_ready static funcWhether a new bus could leave for st now: with depots in the rules, one of who's road depots must be joined to it.
    Link zu diesem Eintragstatic func depot_ready(sim: Sim, who: Company, st: Station) -> bool
    Parameter
    • sim: Sim
    • who: Company
    • st: Station
    Rückgabewert
    bool
    Deklariert in scripts/sim/first_steps.gd:87
  • FirstSteps.route_vehicle static funcwho's newest vehicle that has a route (two stops or more), or null.
    Link zu diesem Eintragstatic func route_vehicle(sim: Sim, who: Company) -> Vehicle
    Parameter
    • sim: Sim
    • who: Company
    Rückgabewert
    Vehicle
    Deklariert in scripts/sim/first_steps.gd:92
  • FirstSteps.has_station static funcWhether who has a station of any kind.
    Link zu diesem Eintragstatic func has_station(m: WorldMap, who: Company) -> bool
    Parameter
    • m: WorldMap
    • who: Company
    Rückgabewert
    bool
    Deklariert in scripts/sim/first_steps.gd:101
  • FirstSteps.town_link static funcA vehicle of who's that carries passengers between stops in two different towns, or null.
    Link zu diesem Eintragstatic func town_link(sim: Sim, who: Company) -> Vehicle
    Parameter
    • sim: Sim
    • who: Company
    Rückgabewert
    Vehicle
    Deklariert in scripts/sim/first_steps.gd:109
  • FirstSteps._taken static varcargo -> true: what some industry takes, in any era (industry_takes)
    Link zu diesem Eintragstatic var _taken := {}Deklariert in scripts/sim/first_steps.gd:123
  • FirstSteps.industry_takes static funcWhether cargo c is something an industry takes in, in any era (so delivering it delivers to an industry).
    Link zu diesem Eintragstatic func industry_takes(c: String) -> bool
    Parameter
    • c: String
    Rückgabewert
    bool
    Ruft auf
    Data.accepts
    Deklariert in scripts/sim/first_steps.gd:128

Fmt

  • Fmt.int_commas static func
    Link zu diesem Eintragstatic func int_commas(n: int) -> String
    Parameter
    • n: int
    Rückgabewert
    String
    Ruft auf
    L.thousands

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/fmt.gd:5
  • Fmt.money static funcFormats an integer dollar amount with the active language’s digit grouping and currency placement.
    Link zu diesem Eintragstatic func money(n: int) -> String

    The result is a string for display.

    Parameter
    • n: int
    Rückgabewert
    String
    Ruft auf
    L.t
    Deklariert in scripts/core/fmt.gd:15
  • Fmt.cargo_list static func
    Link zu diesem Eintragstatic func cargo_list(ids: Array) -> String
    Parameter
    • ids: Array
    Rückgabewert
    String
    Ruft auf
    L.t

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/fmt.gd:19
  • Fmt.short_money static funcCompact money for chart axes and tiles: $950, $12k, $1.4M.
    Link zu diesem Eintragstatic func short_money(n: int) -> String
    Parameter
    • n: int
    Rückgabewert
    String
    Ruft auf
    L.t
    Deklariert in scripts/core/fmt.gd:27

Goals

  • Goals.STEPS constThe checklist, in the order a company usually gets there: [id, title, how to do it].
    Link zu diesem Eintragconst STEPSDeklariert in scripts/sim/goals.gd:20
  • Goals.ACHIEVEMENTS constAchievements: tiers gives one achievement per number ("<kind>_<number>"); the others are one each.
    Link zu diesem Eintragconst ACHIEVEMENTSDeklariert in scripts/sim/goals.gd:32
  • Goals.KINDS const
    Link zu diesem Eintragconst KINDS := ["road", "rail", "water", "air"]

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/goals.gd:42
  • Goals.SERVED_DAYS consta town counts as served while one of your stations there has picked up passengers this recently
    Link zu diesem Eintragconst SERVED_DAYS := 30.0Deklariert in scripts/sim/goals.gd:43
  • Goals.LEAGUE_AGE constdays: a lead in the league counts once the company is this old (before, it is
    Link zu diesem Eintragconst LEAGUE_AGE := 365Deklariert in scripts/sim/goals.gd:44
  • Goals.GOAL_IDS constThe company goals a new game can set, and what each takes: a company value, or first place in the league, within so many years of the company's founding.
    Link zu diesem Eintragconst GOAL_IDS := ["none", "value_1m", "value_10m", "league"]Deklariert in scripts/sim/goals.gd:49
  • Goals.GOALS const
    Link zu diesem Eintragconst GOALS

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/goals.gd:50
  • Goals.steps varstep id -> game day it was done
    Link zu diesem Eintragvar steps := {}Deklariert in scripts/sim/goals.gd:56
  • Goals.unlocked varachievement id -> game day it was won
    Link zu diesem Eintragvar unlocked := {}Deklariert in scripts/sim/goals.gd:57
  • Goals.goal_result var"won" or "missed" once the company goal is decided
    Link zu diesem Eintragvar goal_result := ""Deklariert in scripts/sim/goals.gd:58
  • Goals.goal_day var...and the day it was
    Link zu diesem Eintragvar goal_day := -1Deklariert in scripts/sim/goals.gd:59
  • Goals.pax varpassengers delivered, all closed months together
    Link zu diesem Eintragvar pax := 0Deklariert in scripts/sim/goals.gd:60
  • Goals.delivered varcargo -> true: every cargo the company has delivered
    Link zu diesem Eintragvar delivered := {}Deklariert in scripts/sim/goals.gd:61
  • Goals.rev vargoes up whenever something is ticked off, won or missed
    Link zu diesem Eintragvar rev := 0Deklariert in scripts/sim/goals.gd:62
  • Goals._station_id varthe map's next station id at the last look (a new station since?)
    Link zu diesem Eintragvar _station_id := -1Deklariert in scripts/sim/goals.gd:63
  • Goals._vehicle_id varthe same for vehicles
    Link zu diesem Eintragvar _vehicle_id := -1Deklariert in scripts/sim/goals.gd:64
  • Goals._pax_month varpassengers delivered this month at the last look
    Link zu diesem Eintragvar _pax_month := -1Deklariert in scripts/sim/goals.gd:65
  • Goals._quiet varcatching up an old save: no news
    Link zu diesem Eintragvar _quiet := falseDeklariert in scripts/sim/goals.gd:66
  • Goals.check_steps funcTick off the first steps done since the last look.
    Link zu diesem Eintragfunc check_steps(sim: Sim) -> void

    Cheap: see the top of the file.

    Parameter
    • sim: Sim
    Rückgabewert
    void
    Deklariert in scripts/sim/goals.gd:72
  • Goals._check_steps funccargo: what the company has delivered lately, cargo -> [units, $]; rail_paid: a train has earned.
    Link zu diesem Eintragfunc _check_steps(sim: Sim, cargo: Dictionary, rail_paid: bool) -> void
    Parameter
    • sim: Sim
    • cargo: Dictionary
    • rail_paid: bool
    Rückgabewert
    void
    Ruft auf
    FirstSteps.has_station, FirstSteps.route_vehicle, FirstSteps.town_link, FirstSteps.industry_takes
    Deklariert in scripts/sim/goals.gd:80
  • Goals._tick func
    Link zu diesem Eintragfunc _tick(sim: Sim, id: String) -> void
    Parameter
    • sim: Sim
    • id: String
    Rückgabewert
    void
    Ruft auf
    L.t

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/goals.gd:107
  • Goals.step_title static func
    Link zu diesem Eintragstatic func step_title(id: String) -> String
    Parameter
    • id: String
    Rückgabewert
    String

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/goals.gd:116
  • Goals.monthly funcMonth end (Sim._on_day, once the month's books are closed): the month in profit, the achievements and the company goal.
    Link zu diesem Eintragfunc monthly(sim: Sim) -> void
    Parameter
    • sim: Sim
    Rückgabewert
    void
    Deklariert in scripts/sim/goals.gd:127
  • Goals._judge funcLook at the figures again and unlock what they reach, then decide the goal if it is due.
    Link zu diesem Eintragfunc _judge(sim: Sim) -> void
    Parameter
    • sim: Sim
    Rückgabewert
    void
    Deklariert in scripts/sim/goals.gd:140
  • Goals.operating_profit static funcA month's income less its running costs and upkeep (buying and building aside), as the company overview's chart counts it.
    Link zu diesem Eintragstatic func operating_profit(mo: Dictionary) -> int
    Parameter
    • mo: Dictionary
    Rückgabewert
    int
    Deklariert in scripts/sim/goals.gd:151
  • Goals.measure funcThe figures the achievements and the goal are judged by: one pass over the vehicles and the stations, and the company value of each company for the league.
    Link zu diesem Eintragfunc measure(sim: Sim) -> Dictionary

    best is the best rival's value; leads, whether the company is worth more than every rival and old enough to count.

    Parameter
    • sim: Sim
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/goals.gd:158
  • Goals.cargos_in_game static funcThe cargos this map has now: passengers, mail (and from the Late century waste) from the towns, and what its industries make.
    Link zu diesem Eintragstatic func cargos_in_game(m: WorldMap) -> Array

    Cargos whose industries haven't appeared yet (a later era's) aren't among them until one opens.

    Parameter
    • m: WorldMap
    Rückgabewert
    Array
    Ruft auf
    Data.town_makes
    Deklariert in scripts/sim/goals.gd:190
  • Goals.ids_of static funcThe ids of an achievement's tiers (or its one id).
    Link zu diesem Eintragstatic func ids_of(a: Dictionary) -> Array
    Parameter
    • a: Dictionary
    Rückgabewert
    Array
    Deklariert in scripts/sim/goals.gd:201
  • Goals.reached static funcWhether the figures f (see measure) reach achievement id.
    Link zu diesem Eintragstatic func reached(id: String, f: Dictionary) -> bool
    Parameter
    • id: String
    • f: Dictionary
    Rückgabewert
    bool
    Deklariert in scripts/sim/goals.gd:208
  • Goals.unlock funcWin achievement id today (if it isn't already), with news.
    Link zu diesem Eintragfunc unlock(sim: Sim, id: String) -> void
    Parameter
    • sim: Sim
    • id: String
    Rückgabewert
    void
    Ruft auf
    L.t
    Deklariert in scripts/sim/goals.gd:219
  • Goals.achievement_name static funcWhat an achievement is called: the tier's own name, or the achievement's.
    Link zu diesem Eintragstatic func achievement_name(id: String) -> String
    Parameter
    • id: String
    Rückgabewert
    String
    Ruft auf
    L.t, Fmt.money, Fmt.int_commas
    Deklariert in scripts/sim/goals.gd:228
  • Goals.title_of static funcAn achievement's heading in the Goals window.
    Link zu diesem Eintragstatic func title_of(kind: String) -> String
    Parameter
    • kind: String
    Rückgabewert
    String
    Ruft auf
    L.t
    Deklariert in scripts/sim/goals.gd:240
  • Goals.goal_of static func
    Link zu diesem Eintragstatic func goal_of(sim: Sim) -> String
    Parameter
    • sim: Sim
    Rückgabewert
    String

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/goals.gd:255
  • Goals.goal_name static funcWhat a goal asks, in a few words.
    Link zu diesem Eintragstatic func goal_name(id: String) -> String
    Parameter
    • id: String
    Rückgabewert
    String
    Ruft auf
    L.t, Fmt.money
    Deklariert in scripts/sim/goals.gd:260
  • Goals.goal_short static funcThe same, short enough for the new-game screen's list.
    Link zu diesem Eintragstatic func goal_short(id: String) -> String
    Parameter
    • id: String
    Rückgabewert
    String
    Ruft auf
    L.t
    Deklariert in scripts/sim/goals.gd:270
  • Goals.round_number static funcA round number in few characters: 50, 100k, 10M.
    Link zu diesem Eintragstatic func round_number(n: int) -> String
    Parameter
    • n: int
    Rückgabewert
    String
    Deklariert in scripts/sim/goals.gd:280
  • Goals.deadline static funcThe last day to reach the goal: so many years after the company was founded.
    Link zu diesem Eintragstatic func deadline(sim: Sim) -> int
    Parameter
    • sim: Sim
    Rückgabewert
    int
    Ruft auf
    Calendar.from_day, Calendar.day_of_year_start
    Deklariert in scripts/sim/goals.gd:289
  • Goals.goal_met static funcWhether figures f (see measure) meet the game's goal.
    Link zu diesem Eintragstatic func goal_met(sim: Sim, f: Dictionary) -> bool
    Parameter
    • sim: Sim
    • f: Dictionary
    Rückgabewert
    bool
    Deklariert in scripts/sim/goals.gd:297
  • Goals._check_goal func
    Link zu diesem Eintragfunc _check_goal(sim: Sim, f: Dictionary) -> void
    Parameter
    • sim: Sim
    • f: Dictionary
    Rückgabewert
    void
    Ruft auf
    L.t

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/goals.gd:306
  • Goals._news func
    Link zu diesem Eintragfunc _news(sim: Sim, text: String, kind: String = "good") -> void
    Parameter
    • sim: Sim
    • text: String
    • kind: String = "good"
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/goals.gd:322
  • Goals.to_dict func
    Link zu diesem Eintragfunc to_dict() -> Dictionary
    Rückgabewert
    Dictionary

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/goals.gd:329
  • Goals.from_dict static func
    Link zu diesem Eintragstatic func from_dict(d: Dictionary) -> Goals
    Parameter
    • d: Dictionary
    Rückgabewert
    Goals

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/goals.gd:334
  • Goals.caught_up static funcA game saved before there were goals: tick off and unlock what it has done already, quietly, from what the save remembers (the last two years of deliveries, the last 24 months' books).
    Link zu diesem Eintragstatic func caught_up(sim: Sim) -> Goals
    Parameter
    • sim: Sim
    Rückgabewert
    Goals
    Deklariert in scripts/sim/goals.gd:350

IndustryLife

  • IndustryLife.OPENS_A_YEAR constopenings a year for each industry the map started with
    Link zu diesem Eintragconst OPENS_A_YEAR := 0.012Deklariert in scripts/sim/industry_life.gd:27
  • IndustryLife.WARNS_A_YEAR constchance a year a struggling industry is warned (staff tilt it)
    Link zu diesem Eintragconst WARNS_A_YEAR := 0.3Deklariert in scripts/sim/industry_life.gd:28
  • IndustryLife.UNSERVED_MONTHS constnobody has loaded its cargo for this long before it can struggle
    Link zu diesem Eintragconst UNSERVED_MONTHS := 24Deklariert in scripts/sim/industry_life.gd:29
  • IndustryLife.FLOOR const...and it makes at most this share of its kind's usual output
    Link zu diesem Eintragconst FLOOR := 0.75Deklariert in scripts/sim/industry_life.gd:30
  • IndustryLife.WARN_DAYS consthow long before closing it is warned
    Link zu diesem Eintragconst WARN_DAYS := 365Deklariert in scripts/sim/industry_life.gd:31
  • IndustryLife.RESCUE_DAYS consta pickup (or delivery) this recent lifts the warning
    Link zu diesem Eintragconst RESCUE_DAYS := 31Deklariert in scripts/sim/industry_life.gd:32
  • IndustryLife.FADE consta retiring mine loses this share of its output every year
    Link zu diesem Eintragconst FADE := 0.03Deklariert in scripts/sim/industry_life.gd:33
  • IndustryLife.RENEWABLE consthow much likelier a renewable kind is to open than its count says
    Link zu diesem Eintragconst RENEWABLE := 4.0Deklariert in scripts/sim/industry_life.gd:34
  • IndustryLife.WIND_REACH consttowns this close to a wind farm grow faster and thank its builders
    Link zu diesem Eintragconst WIND_REACH := 24.0Deklariert in scripts/sim/industry_life.gd:35
  • IndustryLife.WIND_RATING constcouncil rating a builder gains, times its share of the deliveries
    Link zu diesem Eintragconst WIND_RATING := 25.0Deklariert in scripts/sim/industry_life.gd:36
  • IndustryLife.WIND_GROWTH const...and growth waits this share as long in a town near one
    Link zu diesem Eintragconst WIND_GROWTH := 0.8Deklariert in scripts/sim/industry_life.gd:37
  • IndustryLife.monthly static func
    Link zu diesem Eintragstatic func monthly(sim: Sim) -> void
    Parameter
    • sim: Sim
    Rückgabewert
    void
    Ruft auf
    L.t, Economy.staff_lean

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/industry_life.gd:40
  • IndustryLife.yearly static funcOnce a year: retiring mines make a little less.
    Link zu diesem Eintragstatic func yearly(sim: Sim) -> void
    Parameter
    • sim: Sim
    Rückgabewert
    void
    Ruft auf
    Data.retiring
    Deklariert in scripts/sim/industry_life.gd:72
  • IndustryLife._room static funcThe map's room for industries ashore and at sea (see Sim.industry_room).
    Link zu diesem Eintragstatic func _room(sim: Sim) -> Vector2i
    Parameter
    • sim: Sim
    Rückgabewert
    Vector2i
    Ruft auf
    WorldGen.industry_room
    Deklariert in scripts/sim/industry_life.gd:79
  • IndustryLife.served static funcWhether a company has loaded ind's cargo at a station in its reach, or delivered cargo to it, within the last days.
    Link zu diesem Eintragstatic func served(sim: Sim, ind: Industry, days: float) -> bool
    Parameter
    • sim: Sim
    • ind: Industry
    • days: float
    Rückgabewert
    bool
    Ruft auf
    Economy.industry_stations
    Deklariert in scripts/sim/industry_life.gd:89
  • IndustryLife.struggling static funcA primary industry at least UNSERVED_MONTHS old that nobody has served in that time, and whose output (staff included) is down to FLOOR of its kind's usual rate.
    Link zu diesem Eintragstatic func struggling(sim: Sim, ind: Industry, index: Industry.StaffingIndex = null) -> bool

    One with nobody at work gets there at its usual rate (Industry.PRIMARY_MIN); one with a town at its gate only after a cut. A customer on its way out (a power station in the Green age) struggles once nobody has supplied it for that long.

    Parameter
    • sim: Sim
    • ind: Industry
    • index: Industry.StaffingIndex = null
    Rückgabewert
    bool
    Ruft auf
    Data.retiring
    Deklariert in scripts/sim/industry_life.gd:107
  • IndustryLife.warn static funcTell everyone ind closes in a year unless it is served by then.
    Link zu diesem Eintragstatic func warn(sim: Sim, ind: Industry) -> void
    Parameter
    • sim: Sim
    • ind: Industry
    Rückgabewert
    void
    Ruft auf
    L.t
    Deklariert in scripts/sim/industry_life.gd:119
  • IndustryLife.closing_text static funcThe day a struggling industry closes and what saves it, for its window and the Problems list.
    Link zu diesem Eintragstatic func closing_text(ind: Industry) -> String
    Parameter
    • ind: Industry
    Rückgabewert
    String
    Ruft auf
    L.t, Calendar.format
    Deklariert in scripts/sim/industry_life.gd:127
  • IndustryLife.rescue static funcThe cargo that saves a struggling industry, in lower case: what it makes, carried away, or for a customer (a power station) what it takes, brought to it.
    Link zu diesem Eintragstatic func rescue(ind: Industry) -> String
    Parameter
    • ind: Industry
    Rückgabewert
    String
    Ruft auf
    L.lower, Fmt.cargo_list
    Deklariert in scripts/sim/industry_life.gd:135
  • IndustryLife.close static funcTake ind off the map: its tiles, an oil rig's own dock, what the stations around it accept and supply, the rivals' routes that served it, and the subsidies about it (Opportunities).
    Link zu diesem Eintragstatic func close(sim: Sim, ind: Industry) -> void
    Parameter
    • sim: Sim
    • ind: Industry
    Rückgabewert
    void
    Ruft auf
    L.t
    Deklariert in scripts/sim/industry_life.gd:141
  • IndustryLife._pick_type static funcWhich kind opens: weighed by how common each is on a new map, among those of this era that the map has room for.
    Link zu diesem Eintragstatic func _pick_type(sim: Sim) -> String

    Kinds on their way out open no more, and from the era that retires the old ones (the Green age) the new kinds that take their place (wind farm sites) are favoured.

    Parameter
    • sim: Sim
    Rückgabewert
    String
    Ruft auf
    Data.opens, Data.retiring
    Deklariert in scripts/sim/industry_life.gd:169
  • IndustryLife._renewable static funcA kind that comes with the era that retires others (the Green age's wind farm sites).
    Link zu diesem Eintragstatic func _renewable(type: String) -> bool
    Parameter
    • type: String
    Rückgabewert
    bool
    Deklariert in scripts/sim/industry_life.gd:191
  • IndustryLife._introduce static funcThe kinds of a later era, once it has come, that the map has fewer of than a new map would get each open one more this month (at the era's start, or in a game saved before it had them).
    Link zu diesem Eintragstatic func _introduce(sim: Sim) -> void

    A kind made from another (a wind farm from its site) counts with it. Where no site turns up, the next try waits a year (Sim.introduce_wait).

    Parameter
    • sim: Sim
    Rückgabewert
    void
    Ruft auf
    Data.opens, WorldGen.type_count
    Deklariert in scripts/sim/industry_life.gd:205
  • IndustryLife._made_from static funcThe kind an industry of type was before it was finished (a wind farm: its site), or type.
    Link zu diesem Eintragstatic func _made_from(type: String) -> String
    Parameter
    • type: String
    Rückgabewert
    String
    Deklariert in scripts/sim/industry_life.gd:221
  • IndustryLife.build static funcamount of c delivered to a construction site (Data.INDUSTRY "builds") by who: it counts towards the site's totals, and once they are all in the site becomes what it was building.
    Link zu diesem Eintragstatic func build(sim: Sim, ind: Industry, c: String, amount: float, who: Company) -> void
    Parameter
    • sim: Sim
    • ind: Industry
    • c: String
    • amount: float
    • who: Company
    Rückgabewert
    void
    Deklariert in scripts/sim/industry_life.gd:232
  • IndustryLife.finish static funcA site has all it needs: it becomes a wind farm.
    Link zu diesem Eintragstatic func finish(sim: Sim, ind: Industry) -> void

    Its builders gain standing with the councils of the towns around it, in proportion to what each delivered, and the stations around it stop taking what it took.

    Parameter
    • sim: Sim
    • ind: Industry
    Rückgabewert
    void
    Ruft auf
    WorldGen.industry_name, L.t
    Deklariert in scripts/sim/industry_life.gd:243
  • IndustryLife.near_wind_farm static funcWhether a wind farm stands within WIND_REACH of town t (it grows faster: see Sim).
    Link zu diesem Eintragstatic func near_wind_farm(m: WorldMap, t: Town) -> bool
    Parameter
    • m: WorldMap
    • t: Town
    Rückgabewert
    bool
    Deklariert in scripts/sim/industry_life.gd:270
  • IndustryLife.open static funcOpen an industry of type where WorldGen would put one, on ground where nothing is built.
    Link zu diesem Eintragstatic func open(sim: Sim, type: String) -> Industry

    Returns it, or null when there is no such site (or a ship is on its way through the one found).

    Parameter
    • sim: Sim
    • type: String
    Rückgabewert
    Industry
    Ruft auf
    WorldGen.find_site, WorldGen.spacing, WorldGen.unserved_feeders, WorldGen.put_industry, WorldGen.industry_name, BuildOps.add_rig_dock, WorldGen.level_ground, L.t, L.lower
    Deklariert in scripts/sim/industry_life.gd:280
  • IndustryLife._ships_through static funcWhether a ship's course runs through r (an oil rig opening there would stand in its way).
    Link zu diesem Eintragstatic func _ships_through(sim: Sim, r: Rect2i) -> bool
    Parameter
    • sim: Sim
    • r: Rect2i
    Rückgabewert
    bool
    Deklariert in scripts/sim/industry_life.gd:312
  • IndustryLife._changed static funcAfter an industry came or went inside r: stations around it look again at what they accept and supply, and everything made from the list of industries is made again (WorldMap.industry_rev).
    Link zu diesem Eintragstatic func _changed(sim: Sim, r: Rect2i) -> void
    Parameter
    • sim: Sim
    • r: Rect2i
    Rückgabewert
    void
    Deklariert in scripts/sim/industry_life.gd:323

L

  • L.DIRS const
    Link zu diesem Eintragconst DIRS := ["res://lang", "user://lang"]

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/l.gd:18
  • L.FALLBACK const
    Link zu diesem Eintragconst FALLBACK := "en"

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/l.gd:19
  • L.ELIDE_DE constLanguages where "de" before a vowel is written "d'" (see tidy).
    Link zu diesem Eintragconst ELIDE_DE := ["ca", "fr"]Deklariert in scripts/core/l.gd:21
  • L.KEEP_CASE constLanguages whose nouns keep their capital in mid-sentence (see lower).
    Link zu diesem Eintragconst KEEP_CASE := ["de"]Deklariert in scripts/core/l.gd:23
  • L.lang static var
    Link zu diesem Eintragstatic var lang := "en"

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/l.gd:25
  • L._tables static varlanguage code -> {english: translated}
    Link zu diesem Eintragstatic var _tables := {}Deklariert in scripts/core/l.gd:26
  • L._table static varthe current language's table
    Link zu diesem Eintragstatic var _table := {}Deklariert in scripts/core/l.gd:27
  • L._loaded static var
    Link zu diesem Eintragstatic var _loaded := false

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/l.gd:28
  • L._registered static varlanguage code -> Translation given to the TranslationServer
    Link zu diesem Eintragstatic var _registered := {}Deklariert in scripts/core/l.gd:29
  • L.misses static varSet to a dictionary to collect every text looked up that has no translation (for tools/i18n_report).
    Link zu diesem Eintragstatic var misses = nullDeklariert in scripts/core/l.gd:31
  • L._miss_mutex static var
    Link zu diesem Eintragstatic var _miss_mutex := Mutex.new()

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/l.gd:32
  • L._guarded static var
    Link zu diesem Eintragstatic var _guarded := false

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/l.gd:33
  • L._elide static var
    Link zu diesem Eintragstatic var _elide: RegEx = null

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/l.gd:34
  • L.t static funcThe text in the current language.
    Link zu diesem Eintragstatic func t(s: String) -> String
    Parameter
    • s: String
    Rückgabewert
    String
    Deklariert in scripts/core/l.gd:58
  • L.tidy static funcSmooth text assembled from pieces, where a name was dropped into a translated sentence.
    Link zu diesem Eintragstatic func tidy(s: String) -> String

    Catalan and French write "de" as "d'" before a vowel: "Mina de carbó de Elmley" -> "Mina de carbó d'Elmley", "Mine de charbon de Ashford" -> "Mine de charbon d'Ashford". (Not before h: these are English-style names, where the h is sounded.)

    Parameter
    • s: String
    Rückgabewert
    String
    Deklariert in scripts/core/l.gd:75
  • L.lower static funcA name (cargo, building...) in lower case for use mid-sentence - except in German, where nouns keep their capital: "Takes coal", "Nimmt Kohle".
    Link zu diesem Eintragstatic func lower(s: String) -> String
    Parameter
    • s: String
    Rückgabewert
    String
    Deklariert in scripts/core/l.gd:86
  • L.n static func"1 tile" / "7 tiles": one is used for exactly one, many (with a %d) otherwise.
    Link zu diesem Eintragstatic func n(one: String, many: String, count: int) -> String
    Parameter
    • one: String
    • many: String
    • count: int
    Rückgabewert
    String
    Deklariert in scripts/core/l.gd:91
  • L.each static funcA list of names in the current language, e.g.
    Link zu diesem Eintragstatic func each(items: Array) -> PackedStringArray

    cargo names from the data tables.

    Parameter
    • items: Array
    Rückgabewert
    PackedStringArray
    Deklariert in scripts/core/l.gd:98
  • L.load_all static funcRead every language file.
    Link zu diesem Eintragstatic func load_all(extra_dirs: Array = []) -> void

    Later directories (the player's own, then mods) override earlier ones.

    Parameter
    • extra_dirs: Array = []
    Rückgabewert
    void
    Deklariert in scripts/core/l.gd:106
  • L.load_file static funcParse one language file into the tables.
    Link zu diesem Eintragstatic func load_file(path: String) -> int

    Returns the number of translations read.

    Parameter
    • path: String
    Rückgabewert
    int
    Deklariert in scripts/core/l.gd:122
  • L._unquote static funcText that starts or ends with a space is written in double quotes: > "Tip: "
    Link zu diesem Eintragstatic func _unquote(s: String) -> String
    Parameter
    • s: String
    Rückgabewert
    String
    Deklariert in scripts/core/l.gd:148
  • L.languages static funcLanguages the player can pick: [[code, name in that language]], English first.
    Link zu diesem Eintragstatic func languages() -> Array
    Rückgabewert
    Array
    Deklariert in scripts/core/l.gd:155
  • L.system_language static funcThe language to use for a setting of "auto": the system's, if we have it.
    Link zu diesem Eintragstatic func system_language() -> String
    Rückgabewert
    String
    Deklariert in scripts/core/l.gd:168
  • L.set_language static funcSwitch language.
    Link zu diesem Eintragstatic func set_language(code: String) -> void

    "auto" follows the system.

    Parameter
    • code: String
    Rückgabewert
    void
    Deklariert in scripts/core/l.gd:176
  • L.release static funcTake our translations back out of the TranslationServer (see _Guard).
    Link zu diesem Eintragstatic func release() -> void
    Rückgabewert
    void
    Deklariert in scripts/core/l.gd:195
  • L.thousands static funcHow thousands are grouped: 1,234 in English, 1.234 in most others, 1 234 in French.
    Link zu diesem Eintragstatic func thousands() -> String
    Rückgabewert
    String
    Deklariert in scripts/core/l.gd:203
  • L._guard static func
    Link zu diesem Eintragstatic func _guard() -> void
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/l.gd:207

Line

  • Line.COLORS const
    Link zu diesem Eintragconst COLORS

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/line.gd:11
  • Line.id var
    Link zu diesem Eintragvar id := 0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/line.gd:14
  • Line.name var
    Link zu diesem Eintragvar name := ""

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/line.gd:15
  • Line.color var
    Link zu diesem Eintragvar color := Color.WHITE

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/line.gd:16
  • Line.kind var
    Link zu diesem Eintragvar kind := "road"

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/line.gd:17
  • Line.owner var
    Link zu diesem Eintragvar owner: Company

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/line.gd:18
  • Line.orders var[{"st": Station, "full": bool, "transfer": bool}], shared with every vehicle on it
    Link zu diesem Eintragvar orders: Array = []Deklariert in scripts/sim/line.gd:19
  • Line.spacing varKeep the vehicles evenly spread round the line: each one waits at the first stop until the one before it is a fair share of a round trip ahead.
    Link zu diesem Eintragvar spacing := falseDeklariert in scripts/sim/line.gd:22
  • Line.lap_days vara round trip, on average (days); -1 until one has been timed
    Link zu diesem Eintragvar lap_days := -1.0Deklariert in scripts/sim/line.gd:23
  • Line.last_departure vargame day a vehicle of the line last left the first stop
    Link zu diesem Eintragvar last_departure := -1.0Deklariert in scripts/sim/line.gd:24
  • Line._init func
    Link zu diesem Eintragfunc _init(p_id: int = 0, p_name: String = "", p_kind: String = "road", p_owner: Company = null) -> void
    Parameter
    • p_id: int = 0
    • p_name: String = ""
    • p_kind: String = "road"
    • p_owner: Company = null
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/line.gd:27
  • Line.stops funcReturns the station objects in the order vehicles visit them on this line.
    Link zu diesem Eintragfunc stops() -> Array
    Rückgabewert
    Array
    Deklariert in scripts/sim/line.gd:35
  • Line.vehicles funcThe vehicles on this line, in the order they were bought.
    Link zu diesem Eintragfunc vehicles(sim: Sim) -> Array
    Parameter
    • sim: Sim
    Rückgabewert
    Array
    Deklariert in scripts/sim/line.gd:40
  • Line.gap funcThe gap (in days) the vehicles should keep at the first stop: a round trip shared out among n of them.
    Link zu diesem Eintragfunc gap(n: int) -> float

    0 when there is nothing to keep apart, or no round trip timed yet.

    Parameter
    • n: int
    Rückgabewert
    float
    Deklariert in scripts/sim/line.gd:46
  • Line.note_departure funcA vehicle of this line just left the first stop; lap is how long it took to come round since it last left it (-1 the first time).
    Link zu diesem Eintragfunc note_departure(day: float, lap: float) -> void
    Parameter
    • day: float
    • lap: float
    Rückgabewert
    void
    Deklariert in scripts/sim/line.gd:54
  • Line.route_text funcA route in a few words: "Ashford → Millbury".
    Link zu diesem Eintragfunc route_text() -> String
    Rückgabewert
    String
    Deklariert in scripts/sim/line.gd:61
  • Line.totals funcThe line's numbers, added up over its vehicles: {"count", "profit", "last", "load" (-1 when none known), "running", "old", "stopped"}.
    Link zu diesem Eintragfunc totals(sim: Sim) -> Dictionary
    Parameter
    • sim: Sim
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/line.gd:73

Mods

  • Mods.DIRS const
    Link zu diesem Eintragconst DIRS := ["res://mods", "user://mods"]

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/mods.gd:14
  • Mods.USER_DIR const
    Link zu diesem Eintragconst USER_DIR := "user://mods"

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/mods.gd:15
  • Mods.UNPACKED const
    Link zu diesem Eintragconst UNPACKED := "user://mods/.unpacked"

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/mods.gd:16
  • Mods.SAMPLES_ZIP constAn exported game can't hold the samples' folder as it is (the editor skips it: see mods/.gdignore), so tools/release.sh packs it into this zip, which is unpacked to SAMPLES whenever it changes.
    Link zu diesem Eintragconst SAMPLES_ZIP := "res://sample_mods.zip"Deklariert in scripts/core/mods.gd:19
  • Mods.SAMPLES const
    Link zu diesem Eintragconst SAMPLES := "user://mods/.samples"

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/mods.gd:20
  • Mods.KINDS const
    Link zu diesem Eintragconst KINDS := ["rail", "road", "water", "air"]

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/mods.gd:21
  • Mods.found static varEvery mod found: {"id", "name", "version", "author", "description", "path", "builtin", "has": {"data", "lang", "maps", "models", "script"}, "enabled", "error"}.
    Link zu diesem Eintragstatic var found: Array = []Deklariert in scripts/core/mods.gd:25
  • Mods.scripts static varlive Mod instances of the enabled script mods
    Link zu diesem Eintragstatic var scripts: Array = []Deklariert in scripts/core/mods.gd:26
  • Mods.maps static varMaps offered in New game: {"name", "description", "heightmap", "params", "mod"}.
    Link zu diesem Eintragstatic var maps: Array = []Deklariert in scripts/core/mods.gd:28
  • Mods._meshes static varmodel id -> ArrayMesh loaded from a mod's .glb
    Link zu diesem Eintragstatic var _meshes := {}Deklariert in scripts/core/mods.gd:29
  • Mods._applied static var
    Link zu diesem Eintragstatic var _applied := false

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/mods.gd:30
  • Mods.log_lines static varwhat went wrong, for the Mods screen
    Link zu diesem Eintragstatic var log_lines: Array[String] = []Deklariert in scripts/core/mods.gd:31
  • Mods.scan static funcLook through the mod folders.
    Link zu diesem Eintragstatic func scan() -> void

    Zips in the player's folder are unpacked first.

    Rückgabewert
    void
    Deklariert in scripts/core/mods.gd:37
  • Mods.read_info static funcRead a mod folder's mod.json.
    Link zu diesem Eintragstatic func read_info(path: String) -> Dictionary

    Returns {} if it isn't a mod (with a note in the log if it tried to be).

    Parameter
    • path: String
    Rückgabewert
    Dictionary
    Deklariert in scripts/core/mods.gd:72
  • Mods._unpack_zips static funcA .zip dropped in the mods folder is unpacked next to the others (once per version of the file).
    Link zu diesem Eintragstatic func _unpack_zips() -> void
    Rückgabewert
    void
    Deklariert in scripts/core/mods.gd:102
  • Mods._unpack_samples static funcUnpack the samples that ship in an exported game (once per version of them).
    Link zu diesem Eintragstatic func _unpack_samples() -> bool

    False if that failed.

    Rückgabewert
    bool
    Deklariert in scripts/core/mods.gd:143
  • Mods._remove_tree static func
    Link zu diesem Eintragstatic func _remove_tree(path: String) -> void
    Parameter
    • path: String
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/mods.gd:172
  • Mods._note static func
    Link zu diesem Eintragstatic func _note(line: String) -> void
    Parameter
    • line: String
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/mods.gd:184
  • Mods.enabled static func
    Link zu diesem Eintragstatic func enabled() -> Array
    Rückgabewert
    Array

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/mods.gd:189
  • Mods.by_id static func
    Link zu diesem Eintragstatic func by_id(id: String) -> Dictionary
    Parameter
    • id: String
    Rückgabewert
    Dictionary

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/mods.gd:193
  • Mods.set_enabled static funcSwitch a mod on or off and rebuild what mods add.
    Link zu diesem Eintragstatic func set_enabled(id: String, on: bool) -> void

    Remembered in the settings.

    Parameter
    • id: String
    • on: bool
    Rückgabewert
    void
    Deklariert in scripts/core/mods.gd:201
  • Mods.apply static funcRebuild everything the enabled mods add.
    Link zu diesem Eintragstatic func apply(rescan: bool = true) -> void

    Safe to call again: it starts from the plain game.

    Parameter
    • rescan: bool = true
    Rückgabewert
    void
    Ruft auf
    Data.clear_mods, L.load_all, L.set_language
    Deklariert in scripts/core/mods.gd:214
  • Mods._apply_one static func
    Link zu diesem Eintragstatic func _apply_one(m: Dictionary) -> String
    Parameter
    • m: Dictionary
    Rückgabewert
    String

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/mods.gd:241
  • Mods._apply_data static funcCheck and merge one mod's data.json.
    Link zu diesem Eintragstatic func _apply_data(m: Dictionary, d: Dictionary) -> String

    Returns "" or what's wrong (nothing is added then).

    Parameter
    • m: Dictionary
    • d: Dictionary
    Rückgabewert
    String
    Ruft auf
    Data.has_model, Data.model, Data.add_model, Data.add_town_names
    Deklariert in scripts/core/mods.gd:265
  • Mods._collect_maps static funcmaps/NAME.png, with an optional maps/NAME.json: {"name", "description", "settings": {...}} where settings are new-game parameters (w, h, towns, industries, year, ...).
    Link zu diesem Eintragstatic func _collect_maps(m: Dictionary) -> void
    Parameter
    • m: Dictionary
    Rückgabewert
    void
    Deklariert in scripts/core/mods.gd:333
  • Mods.vehicle_mesh static funcThe mesh a mod supplies for a vehicle model (from its .glb), or null to use the game's own.
    Link zu diesem Eintragstatic func vehicle_mesh(model_id: String) -> ArrayMesh

    The mesh keeps the materials it was made with.

    Parameter
    • model_id: String
    Rückgabewert
    ArrayMesh
    Ruft auf
    Data.model, Data.has_model
    Deklariert in scripts/core/mods.gd:364
  • Mods.load_glb static funcRead a .glb / .gltf into one mesh (every mesh in the file, in place, with its materials).
    Link zu diesem Eintragstatic func load_glb(file: String) -> ArrayMesh

    Convention, as for the game's own models: the vehicle faces -Z, stands on y = 0, centred.

    Parameter
    • file: String
    Rückgabewert
    ArrayMesh
    Deklariert in scripts/core/mods.gd:379
  • Mods._merge_meshes static func
    Link zu diesem Eintragstatic func _merge_meshes(n: Node, xf: Transform3D, out: ArrayMesh) -> void
    Parameter
    • n: Node
    • xf: Transform3D
    • out: ArrayMesh
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/core/mods.gd:393
  • Mods.hook static funcCall a hook on every enabled script mod.
    Link zu diesem Eintragstatic func hook(method: String, args: Array = []) -> void

    A mod whose hook fails is reported, not fatal.

    Parameter
    • method: String
    • args: Array = []
    Rückgabewert
    void
    Deklariert in scripts/core/mods.gd:424
  • Mods.allow_news static funcNews goes out unless a mod's _on_news returns false.
    Link zu diesem Eintragstatic func allow_news(sim: Sim, item: Dictionary) -> bool
    Parameter
    • sim: Sim
    • item: Dictionary
    Rückgabewert
    bool
    Deklariert in scripts/core/mods.gd:430
  • Mods.save_state static funcWhat goes into a saved game: which mods were on, and each script mod's own data.
    Link zu diesem Eintragstatic func save_state(sim: Sim) -> Dictionary
    Parameter
    • sim: Sim
    Rückgabewert
    Dictionary
    Deklariert in scripts/core/mods.gd:438
  • Mods.load_state static funcAfter loading a game: hand script mods their data, and return the mods the save was made with that aren't on now (names, for a warning).
    Link zu diesem Eintragstatic func load_state(sim: Sim, state: Dictionary) -> Array
    Parameter
    • sim: Sim
    • state: Dictionary
    Rückgabewert
    Array
    Deklariert in scripts/core/mods.gd:451

Opportunities

  • Opportunities.MAX_SUBSIDIES constFew at once, and seldom (a new one of each kind every eight months or so): each is news, and a stream of them buries the player's own (RAIL-78).
    Link zu diesem Eintragconst MAX_SUBSIDIES := 2

    subsidies on offer at once (won ones aside)

    Deklariert in scripts/sim/opportunities.gd:44
  • Opportunities.MAX_REQUESTS consttown requests open on the map at once
    Link zu diesem Eintragconst MAX_REQUESTS := 2Deklariert in scripts/sim/opportunities.gd:45
  • Opportunities.OFFER_CHANCE constchance a month of a new subsidy while there is room, and the same for a request
    Link zu diesem Eintragconst OFFER_CHANCE := 0.12Deklariert in scripts/sim/opportunities.gd:46
  • Opportunities.DAY_CHANCE const...as a chance a day (daily), so that over a month it comes to OFFER_CHANCE.
    Link zu diesem Eintragconst DAY_CHANCE := 1.0 - pow(1.0 - OFFER_CHANCE, 1.0 / 30.0)Deklariert in scripts/sim/opportunities.gd:48
  • Opportunities.TRIES constsources (or towns) tried for a new offer
    Link zu diesem Eintragconst TRIES := 6Deklariert in scripts/sim/opportunities.gd:49
  • Opportunities.SUBSIDY_MIN consttiles between the ends of a subsidised route (along the axes)
    Link zu diesem Eintragconst SUBSIDY_MIN := 15Deklariert in scripts/sim/opportunities.gd:50
  • Opportunities.SUBSIDY_MAX const
    Link zu diesem Eintragconst SUBSIDY_MAX := 60

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/opportunities.gd:51
  • Opportunities.SUBSIDY_DAYS constan offer nobody takes lapses after this long
    Link zu diesem Eintragconst SUBSIDY_DAYS := 365Deklariert in scripts/sim/opportunities.gd:52
  • Opportunities.SUBSIDY_MULT constthe winner's fares on the route...
    Link zu diesem Eintragconst SUBSIDY_MULT := 2.0Deklariert in scripts/sim/opportunities.gd:53
  • Opportunities.SUBSIDY_YEARS const...for this long
    Link zu diesem Eintragconst SUBSIDY_YEARS := 2Deklariert in scripts/sim/opportunities.gd:54
  • Opportunities.UNSERVED_DAYS consta source whose cargo was loaded this recently is served already
    Link zu diesem Eintragconst UNSERVED_DAYS := 90.0Deklariert in scripts/sim/opportunities.gd:55
  • Opportunities.TOWN_CARGO constwhat every town takes besides passengers and mail (Station.coverage)
    Link zu diesem Eintragconst TOWN_CARGO := ["goods", "food"]Deklariert in scripts/sim/opportunities.gd:56
  • Opportunities.TOWN_TAKES_POP consta town this big takes them (a station in its centre reaches 60 people)
    Link zu diesem Eintragconst TOWN_TAKES_POP := 400Deklariert in scripts/sim/opportunities.gd:57
  • Opportunities.LINK_POP consta town this big asks for passenger links...
    Link zu diesem Eintragconst LINK_POP := 700Deklariert in scripts/sim/opportunities.gd:58
  • Opportunities.LINK_TO_POP const...to a town at least this big
    Link zu diesem Eintragconst LINK_TO_POP := 200Deklariert in scripts/sim/opportunities.gd:59
  • Opportunities.RAIL_POP consttwo towns this big may want the link by rail
    Link zu diesem Eintragconst RAIL_POP := 1500Deklariert in scripts/sim/opportunities.gd:60
  • Opportunities.SUPPLY_PER_POP consta supply asks this many units a resident a month of its time
    Link zu diesem Eintragconst SUPPLY_PER_POP := 0.025Deklariert in scripts/sim/opportunities.gd:61
  • Opportunities.VISITORS_PER_POP const...and visitors as many
    Link zu diesem Eintragconst VISITORS_PER_POP := 0.04Deklariert in scripts/sim/opportunities.gd:62
  • Opportunities.SERVICE_RATING consta service request: every station rated this or more...
    Link zu diesem Eintragconst SERVICE_RATING := 0.6Deklariert in scripts/sim/opportunities.gd:63
  • Opportunities.SERVICE_MONTHS const...this many month ends in a row...
    Link zu diesem Eintragconst SERVICE_MONTHS := 12Deklariert in scripts/sim/opportunities.gd:64
  • Opportunities.SERVICE_DEADLINE const...within this many months
    Link zu diesem Eintragconst SERVICE_DEADLINE := 18Deklariert in scripts/sim/opportunities.gd:65
  • Opportunities.REQUEST_MONTHS constthe time other requests give
    Link zu diesem Eintragconst REQUEST_MONTHS := Vector2i(6, 18)Deklariert in scripts/sim/opportunities.gd:66
  • Opportunities.REWARDS constThe rewards that fit each request; one is chosen when it is made.
    Link zu diesem Eintragconst REWARDS

    Exclusive rights take a new link: good service alone, which rivals' stations give without trying, doesn't shut the others out.

    Deklariert in scripts/sim/opportunities.gd:69
  • Opportunities.RATING_BOOST const
    Link zu diesem Eintragconst RATING_BOOST := 25.0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/opportunities.gd:71
  • Opportunities.GRANT const
    Link zu diesem Eintragconst GRANT := 50000

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/opportunities.gd:72
  • Opportunities.RIGHTS_DAYS constexclusive rights and half-price stations last this long
    Link zu diesem Eintragconst RIGHTS_DAYS := 365Deklariert in scripts/sim/opportunities.gd:73
  • Opportunities.CHEAP constwhat stations and depots cost then
    Link zu diesem Eintragconst CHEAP := 0.5Deklariert in scripts/sim/opportunities.gd:74
  • Opportunities.BOOM_DAYS consta growth reward: fast growth this long (as Fund buildings)
    Link zu diesem Eintragconst BOOM_DAYS := 180Deklariert in scripts/sim/opportunities.gd:75
  • Opportunities.offers var
    Link zu diesem Eintragvar offers: Array = []

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/opportunities.gd:77
  • Opportunities.rng varIts own random numbers (seeded by Sim from the game's seed, saved), so offers don't reshuffle the rest of the game's.
    Link zu diesem Eintragvar rng := RandomNumberGenerator.new()Deklariert in scripts/sim/opportunities.gd:80
  • Opportunities.rev vargoes up whenever something is offered, won, met, lapses or makes progress
    Link zu diesem Eintragvar rev := 0Deklariert in scripts/sim/opportunities.gd:81
  • Opportunities.on_delivery funcamt units of c loaded at from (null when that station is gone) delivered by v at st: wins and progress.
    Link zu diesem Eintragfunc on_delivery(sim: Sim, v: Vehicle, from: Station, st: Station, c: String, amt: int) -> float

    Returns what the fare is multiplied by (a won subsidy's SUBSIDY_MULT, else 1).

    Parameter
    • sim: Sim
    • v: Vehicle
    • from: Station
    • st: Station
    • c: String
    • amt: int
    Rückgabewert
    float
    Deklariert in scripts/sim/opportunities.gd:88
  • Opportunities._reaches static funcWhether station st reaches place: an industry in its catchment, or a town it belongs to.
    Link zu diesem Eintragstatic func _reaches(m: WorldMap, st: Station, place: Object) -> bool
    Parameter
    • m: WorldMap
    • st: Station
    • place: Object
    Rückgabewert
    bool
    Ruft auf
    Economy.reaches
    Deklariert in scripts/sim/opportunities.gd:117
  • Opportunities._joins static func
    Link zu diesem Eintragstatic func _joins(o: Dictionary, a: Town, b: Town) -> bool
    Parameter
    • o: Dictionary
    • a: Town
    • b: Town
    Rückgabewert
    bool

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/opportunities.gd:123
  • Opportunities._win_subsidy func
    Link zu diesem Eintragfunc _win_subsidy(sim: Sim, o: Dictionary, who: Company) -> void
    Parameter
    • sim: Sim
    • o: Dictionary
    • who: Company
    Rückgabewert
    void
    Ruft auf
    L.t, Calendar.format

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/opportunities.gd:127
  • Opportunities._met funcRequest k is met by who: its reward, news, and it leaves the list.
    Link zu diesem Eintragfunc _met(sim: Sim, k: int, who: Company) -> void
    Parameter
    • sim: Sim
    • k: int
    • who: Company
    Rückgabewert
    void
    Ruft auf
    L.t
    Deklariert in scripts/sim/opportunities.gd:139
  • Opportunities.monthly funcMonth end (Sim._on_day, after the industries' month): service months and rights that end.
    Link zu diesem Eintragfunc monthly(sim: Sim) -> void

    Then what lapses, as every day.

    Parameter
    • sim: Sim
    Rückgabewert
    void
    Deklariert in scripts/sim/opportunities.gd:169
  • Opportunities.daily funcEvery day (Sim._on_day): offers that lapse or end that day, and now and then a new subsidy or a new request while there is room, so news of them comes at any time of the month.
    Link zu diesem Eintragfunc daily(sim: Sim) -> void
    Parameter
    • sim: Sim
    Rückgabewert
    void
    Deklariert in scripts/sim/opportunities.gd:187
  • Opportunities._lapse funcTakes off the offers whose day has come, with news; a service request only at the month end (month_end), once its last month is counted.
    Link zu diesem Eintragfunc _lapse(sim: Sim, month_end: bool) -> Vector2i

    Returns how many subsidies (x) and requests (y) are still open.

    Parameter
    • sim: Sim
    • month_end: bool
    Rückgabewert
    Vector2i
    Ruft auf
    L.t
    Deklariert in scripts/sim/opportunities.gd:198
  • Opportunities._count_service funcOne more month for each company whose stations in the town are all rated SERVICE_RATING or more (it needs one at least); back to none for the others.
    Link zu diesem Eintragfunc _count_service(sim: Sim, o: Dictionary) -> void
    Parameter
    • sim: Sim
    • o: Dictionary
    Rückgabewert
    void
    Deklariert in scripts/sim/opportunities.gd:231
  • Opportunities._leader static funcThe company furthest on with a request (-1: nobody has started).
    Link zu diesem Eintragstatic func _leader(o: Dictionary) -> int
    Parameter
    • o: Dictionary
    Rückgabewert
    int
    Deklariert in scripts/sim/opportunities.gd:251
  • Opportunities.industry_closed funcAn industry closes (IndustryLife.close): offers about it are withdrawn, and a won subsidy ends.
    Link zu diesem Eintragfunc industry_closed(sim: Sim, ind: Industry) -> void
    Parameter
    • sim: Sim
    • ind: Industry
    Rückgabewert
    void
    Ruft auf
    L.t
    Deklariert in scripts/sim/opportunities.gd:260
  • Opportunities.offer_subsidy funcOffer a subsidy for a route nobody serves yet, if one turns up in a few tries: a cargo an industry makes (or, from the Late century, the waste a town makes: Data.town_makes) that nobody loads there, to a place in reach that takes it.
    Link zu diesem Eintragfunc offer_subsidy(sim: Sim) -> Dictionary

    Returns it, or {}.

    Parameter
    • sim: Sim
    Rückgabewert
    Dictionary
    Ruft auf
    IndustryLife.served, Data.town_makes, Data.town_pop, L.t, Calendar.format
    Deklariert in scripts/sim/opportunities.gd:276
  • Opportunities.pos_of static funcWhere an industry or a town is: its middle.
    Link zu diesem Eintragstatic func pos_of(place: Object) -> Vector2
    Parameter
    • place: Object
    Rückgabewert
    Vector2
    Deklariert in scripts/sim/opportunities.gd:324
  • Opportunities.offer_request funcAsk for something from a town without a request, if one in a few tries can ask for anything: the bigger the town, the likelier it is to ask.
    Link zu diesem Eintragfunc offer_request(sim: Sim) -> Dictionary

    Returns the request, or {}.

    Parameter
    • sim: Sim
    Rückgabewert
    Dictionary
    Ruft auf
    Goals.cargos_in_game
    Deklariert in scripts/sim/opportunities.gd:330
  • Opportunities.request_kinds funcWhat town t could ask for: links when it is big, supplies when it takes goods or food and the map makes some (have: Goals.cargos_in_game), visitors when it has an attraction, service when some company has a station there.
    Link zu diesem Eintragfunc request_kinds(sim: Sim, t: Town, have: Array) -> Array
    Parameter
    • sim: Sim
    • t: Town
    • have: Array
    Rückgabewert
    Array
    Deklariert in scripts/sim/opportunities.gd:359
  • Opportunities.make_request funcMake a request of type from town t (see request_kinds), with news.
    Link zu diesem Eintragfunc make_request(sim: Sim, t: Town, type: String, have: Array) -> Dictionary

    {} when there is nothing to ask for after all (a link with no town in reach that isn't linked already).

    Parameter
    • sim: Sim
    • t: Town
    • type: String
    • have: Array
    Rückgabewert
    Dictionary
    Ruft auf
    L.t, Calendar.format
    Deklariert in scripts/sim/opportunities.gd:376
  • Opportunities._link_partner funcA town for a link from t: SUBSIDY_MIN..SUBSIDY_MAX tiles away, at least LINK_TO_POP people, and no passenger vehicle of anyone's calling at both yet.
    Link zu diesem Eintragfunc _link_partner(sim: Sim, t: Town) -> Town

    Null when there is none.

    Parameter
    • sim: Sim
    • t: Town
    Rückgabewert
    Town
    Deklariert in scripts/sim/opportunities.gd:412
  • Opportunities._offer func
    Link zu diesem Eintragfunc _offer(sim: Sim, type: String, cargo: String, expires: int) -> Dictionary
    Parameter
    • sim: Sim
    • type: String
    • cargo: String
    • expires: int
    Rückgabewert
    Dictionary

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/opportunities.gd:434
  • Opportunities._offered funcWhether an industry or a town is the source of a subsidy already.
    Link zu diesem Eintragfunc _offered(place: Object) -> bool
    Parameter
    • place: Object
    Rückgabewert
    bool
    Deklariert in scripts/sim/opportunities.gd:443
  • Opportunities._in_range static func
    Link zu diesem Eintragstatic func _in_range(a: Vector2, b: Vector2) -> bool
    Parameter
    • a: Vector2
    • b: Vector2
    Rückgabewert
    bool

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/opportunities.gd:447
  • Opportunities._round static funcA target in round numbers: to the nearest 50, at least 100.
    Link zu diesem Eintragstatic func _round(n: float) -> int
    Parameter
    • n: float
    Rückgabewert
    int
    Deklariert in scripts/sim/opportunities.gd:453
  • Opportunities.attractions_of static funcThe attractions town t has, as Data.HOUSES types.
    Link zu diesem Eintragstatic func attractions_of(t: Town) -> Array
    Parameter
    • t: Town
    Rückgabewert
    Array
    Deklariert in scripts/sim/opportunities.gd:458
  • Opportunities.request_of funcThe request town t has open, or {}.
    Link zu diesem Eintragfunc request_of(t: Town) -> Dictionary
    Parameter
    • t: Town
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/opportunities.gd:463
  • Opportunities.what static funcWhat an offer asks, in a few words, as it reads mid-sentence: "coal from Ashford Mine to Elmford Power Station", "300 food for Elmford" (title for the start of one).
    Link zu diesem Eintragstatic func what(o: Dictionary) -> String
    Parameter
    • o: Dictionary
    Rückgabewert
    String
    Ruft auf
    L.t, L.lower, Fmt.int_commas
    Deklariert in scripts/sim/opportunities.gd:474
  • Opportunities.title static funcwhat, starting with a capital: a heading.
    Link zu diesem Eintragstatic func title(o: Dictionary) -> String
    Parameter
    • o: Dictionary
    Rückgabewert
    String
    Deklariert in scripts/sim/opportunities.gd:488
  • Opportunities.reward_name static funcWhat meeting a request brings, in a few words ("a grant of $50,000").
    Link zu diesem Eintragstatic func reward_name(reward: String) -> String
    Parameter
    • reward: String
    Rückgabewert
    String
    Ruft auf
    L.t, Fmt.money
    Deklariert in scripts/sim/opportunities.gd:494
  • Opportunities.place static funcWhere an offer is, for the map: the middle of its route (or the town), and a zoom that shows it.
    Link zu diesem Eintragstatic func place(o: Dictionary) -> Array
    Parameter
    • o: Dictionary
    Rückgabewert
    Array
    Deklariert in scripts/sim/opportunities.gd:505
  • Opportunities._news funcworld: news the player can't act on (a rival's win, an offer that lapsed): Sim.post_world_news.
    Link zu diesem Eintragfunc _news(sim: Sim, text: String, kind: String, o: Dictionary, world: bool = false) -> void

    A new offer is the player's news: it is a chance for them.

    Parameter
    • sim: Sim
    • text: String
    • kind: String
    • o: Dictionary
    • world: bool = false
    Rückgabewert
    void
    Deklariert in scripts/sim/opportunities.gd:513
  • Opportunities.to_dict func
    Link zu diesem Eintragfunc to_dict() -> Dictionary
    Rückgabewert
    Dictionary

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/opportunities.gd:519
  • Opportunities._ref static funcAn industry or a town as a save keeps it: ["i" or "t", its id] ([] for none).
    Link zu diesem Eintragstatic func _ref(place: Object) -> Array
    Parameter
    • place: Object
    Rückgabewert
    Array
    Deklariert in scripts/sim/opportunities.gd:531
  • Opportunities.restore funcTake back the offers of a save (d: to_dict's) on map m.
    Link zu diesem Eintragfunc restore(d: Dictionary, m: WorldMap) -> void

    An offer about a place that isn't there is left out. A save from before there were any leaves none, and the seed Sim gave.

    Parameter
    • d: Dictionary
    • m: WorldMap
    Rückgabewert
    void
    Deklariert in scripts/sim/opportunities.gd:537

Pathfinder

  • Pathfinder.MAX_EXPANSIONS const
    Link zu diesem Eintragconst MAX_EXPANSIONS := 400000

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/pathfinder.gd:8
  • Pathfinder.find static funcReturns {"tiles": Array[Vector2i], "end_heading": int} or {} when there is no route.
    Link zu diesem Eintragstatic func find(m: WorldMap, kind: String, start: Vector2i, heading: int, goals: Dictionary, allow_reverse_start: bool, allow_dead_end_uturn: bool, wired: bool = false, obey_signals: bool = true, avoid: Dictionary = {}) -> Dictionary

    A route that took a search also carries "box": every tile the search looked at lies inside it, so as long as the network doesn't change in there the same search gives the same route. goals: Dictionary of goal tiles. heading -1 means any first move is allowed. wired: an electric train, which can only run under overhead wires. obey_signals false: as if one-way signals let trains through both ways (to tell the player when they are what stands in the way). avoid: track blocks (ids of WorldMap.blocks) to keep off, where other trains are (RAIL-80).

    Parameter
    • m: WorldMap
    • kind: String
    • start: Vector2i
    • heading: int
    • goals: Dictionary
    • allow_reverse_start: bool
    • allow_dead_end_uturn: bool
    • wired: bool = false
    • obey_signals: bool = true
    • avoid: Dictionary = {}
    Rückgabewert
    Dictionary
    Ruft auf
    Const.opp
    Deklariert in scripts/sim/pathfinder.gd:19
  • Pathfinder._find_water static funcThe way over water from start to the nearest of goals.
    Link zu diesem Eintragstatic func _find_water(m: WorldMap, start: Vector2i, goals: Dictionary) -> Dictionary

    Ships turn where they like and sail a straight course afterwards (Vehicle.water_course), so this is the eight-way way of find_sea with each diagonal step split in two: a search over tiles rather than tiles and headings, with a heuristic that fits open water. Remembered on the map (see _sea_memo).

    Parameter
    • m: WorldMap
    • start: Vector2i
    • goals: Dictionary
    Rückgabewert
    Dictionary
    Ruft auf
    BuildOps.dir_between
    Deklariert in scripts/sim/pathfinder.gd:101
  • Pathfinder.find_sea static funcThe shortest way by water from start to goal, moving between tiles in eight directions (diagonally only where both tiles beside the step are water too), or [] when there is none.
    Link zu diesem Eintragstatic func find_sea(m: WorldMap, start: Vector2i, goal: Vector2i, max_len: float = INF) -> Array[Vector2i]

    Ships pull it straight afterwards (Vehicle.water_course): unlike the four-way route, it already runs close to the direct line, so the pulled course doesn't keep the corners of an L. max_len: ways longer than this don't count, which keeps the search to the water near the straight line (an answer of "none" then comes quickly even on a big sea).

    Parameter
    • m: WorldMap
    • start: Vector2i
    • goal: Vector2i
    • max_len: float = INF
    Rückgabewert
    Array[Vector2i]
    Deklariert in scripts/sim/pathfinder.gd:127
  • Pathfinder._sea_memo static funcA way over water found earlier under key from start to one of ends ([] if none, if it no longer runs over open water, or if it answers another question whose key hashed the same).
    Link zu diesem Eintragstatic func _sea_memo(m: WorldMap, key: int, start: Vector2i, ends: Dictionary) -> Array[Vector2i]

    Ships ask the same questions at every departure, and open water only changes with the ground (WorldMap.notify empties sea_memo then).

    Parameter
    • m: WorldMap
    • key: int
    • start: Vector2i
    • ends: Dictionary
    Rückgabewert
    Array[Vector2i]
    Deklariert in scripts/sim/pathfinder.gd:142
  • Pathfinder._sea_remember static func
    Link zu diesem Eintragstatic func _sea_remember(m: WorldMap, key: int, tiles: Array[Vector2i]) -> void
    Parameter
    • m: WorldMap
    • key: int
    • tiles: Array[Vector2i]
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/pathfinder.gd:155
  • Pathfinder._find_sea static funcfind_sea's search, to the nearest of goals.
    Link zu diesem Eintragstatic func _find_sea(m: WorldMap, start: Vector2i, goals: Array, max_len: float) -> Array[Vector2i]
    Parameter
    • m: WorldMap
    • start: Vector2i
    • goals: Array
    • max_len: float
    Rückgabewert
    Array[Vector2i]
    Deklariert in scripts/sim/pathfinder.gd:162
  • Pathfinder._octile static funcThe eight-way distance over open water from (x, y) to the nearest of goals.
    Link zu diesem Eintragstatic func _octile(x: int, y: int, goals: Array) -> float
    Parameter
    • x: int
    • y: int
    • goals: Array
    Rückgabewert
    float
    Deklariert in scripts/sim/pathfinder.gd:223
  • Pathfinder._heuristic static func
    Link zu diesem Eintragstatic func _heuristic(t: Vector2i, goals: Array) -> float
    Parameter
    • t: Vector2i
    • goals: Array
    Rückgabewert
    float

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/pathfinder.gd:232
  • Pathfinder._build static func
    Link zu diesem Eintragstatic func _build(m: WorldMap, came: Dictionary, s: int, end_heading: int) -> Dictionary
    Parameter
    • m: WorldMap
    • came: Dictionary
    • s: int
    • end_heading: int
    Rückgabewert
    Dictionary

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/pathfinder.gd:239
  • Pathfinder._push static func
    Link zu diesem Eintragstatic func _push(f: PackedFloat32Array, s: PackedInt32Array, pri: float, state: int) -> void
    Parameter
    • f: PackedFloat32Array
    • s: PackedInt32Array
    • pri: float
    • state: int
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/pathfinder.gd:250
  • Pathfinder._pop static func
    Link zu diesem Eintragstatic func _pop(f: PackedFloat32Array, s: PackedInt32Array) -> void
    Parameter
    • f: PackedFloat32Array
    • s: PackedInt32Array
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/pathfinder.gd:263

Problems

  • Problems.SIGNAL_DAYS consta train held at a red signal this long
    Link zu diesem Eintragconst SIGNAL_DAYS := 10.0Deklariert in scripts/sim/problems.gd:22
  • Problems.QUEUE_DAYS consta vehicle held up in traffic, off a berth or holding this long (RAIL-26)
    Link zu diesem Eintragconst QUEUE_DAYS := 2.0Deklariert in scripts/sim/problems.gd:23
  • Problems.NO_CALL_DAYS consta station in use that no vehicle has called at for this long
    Link zu diesem Eintragconst NO_CALL_DAYS := 60.0Deklariert in scripts/sim/problems.gd:24
  • Problems.PILE_UP constcargo piling up: at least this much waiting, more than comes in a month...
    Link zu diesem Eintragconst PILE_UP := 150.0Deklariert in scripts/sim/problems.gd:25
  • Problems.PILE_RATING const...and the station's rating for it under this, so some of it gives up
    Link zu diesem Eintragconst PILE_RATING := 0.6Deklariert in scripts/sim/problems.gd:26
  • Problems.SERVICE_LATE constoverdue a service: this many service intervals since the last one
    Link zu diesem Eintragconst SERVICE_LATE := 1.6Deklariert in scripts/sim/problems.gd:27
  • Problems.STAFF_SHORT constan industry with under this share of the staff it wants
    Link zu diesem Eintragconst STAFF_SHORT := 0.5Deklariert in scripts/sim/problems.gd:28
  • Problems.HELD_UP consta plant that needs every input holding this much while it waits for another
    Link zu diesem Eintragconst HELD_UP := 60.0Deklariert in scripts/sim/problems.gd:29
  • Problems.REFRESH constreal seconds between two looks (tick)
    Link zu diesem Eintragconst REFRESH := 0.5Deklariert in scripts/sim/problems.gd:30
  • Problems.TOLD_DAYS consta vehicle that gets lost is announced at most once in this many days
    Link zu diesem Eintragconst TOLD_DAYS := 30Deklariert in scripts/sim/problems.gd:31
  • Problems.rows varthe last look, most serious first
    Link zu diesem Eintragvar rows: Array = []Deklariert in scripts/sim/problems.gd:33
  • Problems.serious varrows of level 0
    Link zu diesem Eintragvar serious := 0Deklariert in scripts/sim/problems.gd:34
  • Problems.rev vargoes up when what is on the list (things and kinds) changes
    Link zu diesem Eintragvar rev := 0Deklariert in scripts/sim/problems.gd:35
  • Problems._of varthing -> its most serious row
    Link zu diesem Eintragvar _of := {}Deklariert in scripts/sim/problems.gd:36
  • Problems._sig var
    Link zu diesem Eintragvar _sig: Array = []

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/problems.gd:37
  • Problems._wait var
    Link zu diesem Eintragvar _wait := 0.0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/problems.gd:38
  • Problems._lost varids of the vehicles lost at the last look
    Link zu diesem Eintragvar _lost := {}Deklariert in scripts/sim/problems.gd:39
  • Problems._told varvehicle id -> game day it was last announced as lost
    Link zu diesem Eintragvar _told := {}Deklariert in scripts/sim/problems.gd:40
  • Problems._primed varthe first look announces nothing: those were lost already
    Link zu diesem Eintragvar _primed := falseDeklariert in scripts/sim/problems.gd:41
  • Problems._alerts var
    Link zu diesem Eintragvar _alerts: Array = []

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/problems.gd:42
  • Problems.tick funcLook again if REFRESH seconds have passed since the last look.
    Link zu diesem Eintragfunc tick(sim: Sim, delta: float) -> bool

    True when it did.

    Parameter
    • sim: Sim
    • delta: float
    Rückgabewert
    bool
    Deklariert in scripts/sim/problems.gd:46
  • Problems.refresh funcLook again now.
    Link zu diesem Eintragfunc refresh(sim: Sim) -> void
    Parameter
    • sim: Sim
    Rückgabewert
    void
    Deklariert in scripts/sim/problems.gd:55
  • Problems.has func
    Link zu diesem Eintragfunc has(thing: Object) -> bool
    Parameter
    • thing: Object
    Rückgabewert
    bool

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/problems.gd:83
  • Problems.of funcThe most serious row about thing, or {}.
    Link zu diesem Eintragfunc of(thing: Object) -> Dictionary
    Parameter
    • thing: Object
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/problems.gd:88
  • Problems.take_alerts funcVehicles that got lost since the last call (at most once a month each): for a toast.
    Link zu diesem Eintragfunc take_alerts() -> Array
    Rückgabewert
    Array
    Deklariert in scripts/sim/problems.gd:93
  • Problems.list static funcEvery problem of the player's company, most serious first.
    Link zu diesem Eintragstatic func list(sim: Sim) -> Array

    Cheap enough for a few times a second with hundreds of vehicles: one pass over vehicles, stations, towns and the industries the stations reach, text only for the rows, and each platform measured once.

    Parameter
    • sim: Sim
    Rückgabewert
    Array
    Ruft auf
    L.t, Economy.industry_stations_reverse, SignalTraps.find, SignalTraps.text
    Deklariert in scripts/sim/problems.gd:104
  • Problems.vehicle_row static funcThe worst problem of one vehicle, or {}.
    Link zu diesem Eintragstatic func vehicle_row(sim: Sim, v: Vehicle) -> Dictionary
    Parameter
    • sim: Sim
    • v: Vehicle
    Rückgabewert
    Dictionary
    Ruft auf
    L.t, L.lower, Fmt.money
    Deklariert in scripts/sim/problems.gd:146
  • Problems._station_rows static funccalls is cargo -> the player's vehicles that take it on at st (see _note_calls).
    Link zu diesem Eintragstatic func _station_rows(sim: Sim, st: Station, out: Array, calls: Dictionary) -> void
    Parameter
    • sim: Sim
    • st: Station
    • out: Array
    • calls: Dictionary
    Rückgabewert
    void
    Ruft auf
    L.t
    Deklariert in scripts/sim/problems.gd:173
  • Problems._piling_row static funcCargo c piling up at st, and what holds it back.
    Link zu diesem Eintragstatic func _piling_row(st: Station, c: String, w: float, r: float, vs: Array) -> Dictionary

    When more waits than the biggest of the vehicles that load it there can take, each of them leaves full: a train wants more wagons (its fix opens that train, where Change cargo adds them), anything else more vehicles. When there is room on board they call too seldom. A player who sees a full train leave thinks it took everything, so the hint says how much it takes.

    Parameter
    • st: Station
    • c: String
    • w: float
    • r: float
    • vs: Array
    Rückgabewert
    Dictionary
    Ruft auf
    L.lower, L.t
    Deklariert in scripts/sim/problems.gd:189
  • Problems._note_calls static funcNote the stops where v takes cargo on (not unload-only or don't-load ones), in calls: Station -> cargo -> [Vehicle].
    Link zu diesem Eintragstatic func _note_calls(v: Vehicle, calls: Dictionary) -> void
    Parameter
    • v: Vehicle
    • calls: Dictionary
    Rückgabewert
    void
    Deklariert in scripts/sim/problems.gd:219
  • Problems._short_platforms static funcNote the longest of the player's trains too long for each of its rail stops (as VehicleWindow.short_platform_text works it out), measuring each station once.
    Link zu diesem Eintragstatic func _short_platforms(m: WorldMap, v: Vehicle, platforms: Dictionary, short: Dictionary) -> void
    Parameter
    • m: WorldMap
    • v: Vehicle
    • platforms: Dictionary
    • short: Dictionary
    Rückgabewert
    void
    Ruft auf
    Vehicle.tiles_long
    Deklariert in scripts/sim/problems.gd:232
  • Problems._trades static funcWhether st carries a cargo ind makes or takes.
    Link zu diesem Eintragstatic func _trades(ind: Industry, st: Station) -> bool
    Parameter
    • ind: Industry
    • st: Station
    Rückgabewert
    bool
    Deklariert in scripts/sim/problems.gd:246
  • Problems._industry_rows static func
    Link zu diesem Eintragstatic func _industry_rows(sim: Sim, ind: Industry, out: Array) -> void
    Parameter
    • sim: Sim
    • ind: Industry
    • out: Array
    Rückgabewert
    void
    Ruft auf
    L.t, IndustryLife.closing_text, L.lower, Fmt.cargo_list

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/problems.gd:253
  • Problems._where static funcWhere a vehicle is: the tile its front is on (or, before it has set off, its next stop).
    Link zu diesem Eintragstatic func _where(v: Vehicle) -> Vector2
    Parameter
    • v: Vehicle
    Rückgabewert
    Vector2
    Deklariert in scripts/sim/problems.gd:291
  • Problems._row static func
    Link zu diesem Eintragstatic func _row(kind: String, level: int, obj: Object, pos: Vector2, text: String, fix: String) -> Dictionary
    Parameter
    • kind: String
    • level: int
    • obj: Object
    • pos: Vector2
    • text: String
    • fix: String
    Rückgabewert
    Dictionary

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/problems.gd:298
  • Problems._before static funcMost serious first, then by name.
    Link zu diesem Eintragstatic func _before(a: Dictionary, b: Dictionary) -> bool
    Parameter
    • a: Dictionary
    • b: Dictionary
    Rückgabewert
    bool
    Deklariert in scripts/sim/problems.gd:303

RouteBuilder

  • RouteBuilder.MAX_EXPANSIONS const
    Link zu diesem Eintragconst MAX_EXPANSIONS := 8000

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/route_builder.gd:20
  • RouteBuilder.SHAPE_EXPANSIONS constThe second pass's share of the search budget, at the most.
    Link zu diesem Eintragconst SHAPE_EXPANSIONS := 3000Deklariert in scripts/sim/route_builder.gd:22
  • RouteBuilder.REACH constHow far from the rough path (in tiles) the second pass may stray.
    Link zu diesem Eintragconst REACH := 3Deklariert in scripts/sim/route_builder.gd:24
  • RouteBuilder.DETOUR constA rough path up to this much longer than the straight distance had nothing much in its way.
    Link zu diesem Eintragconst DETOUR := 1.3Deklariert in scripts/sim/route_builder.gd:26
  • RouteBuilder.TURN constWhat the shape of the line costs, in tiles of track: the first turning tile after straight track
    Link zu diesem Eintragconst TURN := 1.2Deklariert in scripts/sim/route_builder.gd:28
  • RouteBuilder.LONE_BEND const...when straight track follows it: a 90-degree bend (2.0 in all)
    Link zu diesem Eintragconst LONE_BEND := 0.8Deklariert in scripts/sim/route_builder.gd:29
  • RouteBuilder.SECOND_TURN const...when it turns back on the next tile: the start of a diagonal (1.5)
    Link zu diesem Eintragconst SECOND_TURN := 0.3Deklariert in scripts/sim/route_builder.gd:30
  • RouteBuilder.SIDESTEP consta diagonal that ends after those two tiles: a one-tile sidestep (4.0)
    Link zu diesem Eintragconst SIDESTEP := 2.5Deklariert in scripts/sim/route_builder.gd:31
  • RouteBuilder.RUN consteach further tile of a diagonal: it is that much shorter to drive
    Link zu diesem Eintragconst RUN := -0.25Deklariert in scripts/sim/route_builder.gd:32
  • RouteBuilder.HAIRPIN consttwo turns the same way on neighbouring tiles
    Link zu diesem Eintragconst HAIRPIN := 3.0Deklariert in scripts/sim/route_builder.gd:33
  • RouteBuilder.CAREFUL constThe second pass first looks for the best line with this share of its budget; if that runs out it settles for a good one, weighting the distance left by HASTY.
    Link zu diesem Eintragconst CAREFUL := 0.65Deklariert in scripts/sim/route_builder.gd:36
  • RouteBuilder.HASTY const
    Link zu diesem Eintragconst HASTY := 2.0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/route_builder.gd:37
  • RouteBuilder.TURN_INDEX const(way out - way in) & 3 -> straight on, right, left
    Link zu diesem Eintragconst TURN_INDEX: Array[int] = [0, 1, 0, 2]Deklariert in scripts/sim/route_builder.gd:38
  • RouteBuilder.last_expansions static varstates looked at by the last search (benchmark tooling)
    Link zu diesem Eintragstatic var last_expansions := 0Deklariert in scripts/sim/route_builder.gd:39
  • RouteBuilder.last_refined static varwhether the last search's second pass finished (benchmark tooling)
    Link zu diesem Eintragstatic var last_refined := falseDeklariert in scripts/sim/route_builder.gd:40
  • RouteBuilder.log_to static varan Array: every search adds its describe entry (benchmark tooling)
    Link zu diesem Eintragstatic var log_to = nullDeklariert in scripts/sim/route_builder.gd:41
  • RouteBuilder.last_crossings static varThe bridges and tunnels on the path the last search returned, in order along it: [{"type": "bridge" | "tunnel", "from", "to": the tiles either side (a bridge's ramps, the tiles before and after a tunnel's mouths), "between": the tiles in between (spans / tunnel), "dir", "a", "b", "style": what Sim.build_crossing takes}].
    Link zu diesem Eintragstatic var last_crossings: Array = []

    Empty when jumps was.

    Deklariert in scripts/sim/route_builder.gd:46
  • RouteBuilder.CROSSING constWhat a crossing costs on top of its tiles, in tiles of track: short detours still win.
    Link zu diesem Eintragconst CROSSING := 8.0

    (The first pass leans towards the goal, so a tile sideways looks dearer to it than it is: this has to cover that too.)

    Deklariert in scripts/sim/route_builder.gd:50
  • RouteBuilder.find static funcPath of tiles from start to goal (both included).
    Link zu diesem Eintragstatic func find(m: WorldMap, kind: String, start: Vector2i, start_dir: int, goal: Vector2i, goal_dir: int, reserved: Dictionary = {}, max_expansions: int = 0, jumps: Dictionary = {}) -> Array[Vector2i]

    start_dir: direction of travel when entering start (-1: any). goal_dir: direction the path must leave goal in (-1: any). reserved tiles are never used. Returns [] if none found. jumps (jumps_for): the bridges and tunnels it may build; {} for none. The path then may not be buildable by Sim.build_line alone: see last_crossings and Sim.build_route.

    Parameter
    • m: WorldMap
    • kind: String
    • start: Vector2i
    • start_dir: int
    • goal: Vector2i
    • goal_dir: int
    • reserved: Dictionary = {}
    • max_expansions: int = 0
    • jumps: Dictionary = {}
    Rückgabewert
    Array[Vector2i]
    Deklariert in scripts/sim/route_builder.gd:58
  • RouteBuilder.describe static funcThe shape of a path: how many tiles turn, and how those turns group.
    Link zu diesem Eintragstatic func describe(path: Array[Vector2i], start_dir: int = -1, goal_dir: int = -1) -> Dictionary

    A run of turning tiles is a bend one turn on its own, a sidestep a left and a right (or right and left) with straight track either side: the line jumps one tile sideways, which shows as a wobble, a diagonal three or more alternating turns, drawn and driven as one straight 45-degree line, a hairpin two turns the same way on neighbouring tiles. start_dir / goal_dir: the directions the path is entered and left in, when known.

    Parameter
    • path: Array[Vector2i]
    • start_dir: int = -1
    • goal_dir: int = -1
    Rückgabewert
    Dictionary
    Ruft auf
    BuildOps.dir_between
    Deklariert in scripts/sim/route_builder.gd:104
  • RouteBuilder._rough static funcThe first pass.
    Link zu diesem Eintragstatic func _rough(m: WorldMap, kind: String, start: Vector2i, start_dir: int, goal: Vector2i, goal_dir: int, reserved: Dictionary, budget: int, jumps: Dictionary = {}, out_crossings: Array = []) -> Array[Vector2i]

    With jumps, the bridges and tunnels on the path found go into out_crossings.

    Parameter
    • m: WorldMap
    • kind: String
    • start: Vector2i
    • start_dir: int
    • goal: Vector2i
    • goal_dir: int
    • reserved: Dictionary
    • budget: int
    • jumps: Dictionary = {}
    • out_crossings: Array = []
    Rückgabewert
    Array[Vector2i]
    Ruft auf
    Pathfinder._push, Pathfinder._pop, Const.opp
    Deklariert in scripts/sim/route_builder.gd:140
  • RouteBuilder._refine static funcThe second pass: the best-shaped path through corridor (see _corridor).
    Link zu diesem Eintragstatic func _refine(m: WorldMap, kind: String, rough: Array[Vector2i], corridor: Dictionary, start_dir: int, goal_dir: int, reserved: Dictionary, budget: int, weight: float) -> Array[Vector2i]

    A* over (tile, entry direction, shape), where shape remembers the turning tiles just behind: 0 straight track 1, 2 one turn so far, to the right / to the left 3, 4 two alternating turns, the last to the right / left 5, 6 three or more: a diagonal Open ground costs the same everywhere here (the rough pass has weighed up trees and slopes), which is what lets the search run straight to the goal. weight: 1 for the best line, more to settle sooner for a good one. Returns [] when budget runs out.

    Parameter
    • m: WorldMap
    • kind: String
    • rough: Array[Vector2i]
    • corridor: Dictionary
    • start_dir: int
    • goal_dir: int
    • reserved: Dictionary
    • budget: int
    • weight: float
    Rückgabewert
    Array[Vector2i]
    Ruft auf
    Pathfinder._push, Pathfinder._pop, Const.opp
    Deklariert in scripts/sim/route_builder.gd:222
  • RouteBuilder._corridor static funcThe tiles the second pass may use: every tile within REACH of the rough path (and, where little was in its way, of the two straight-and-diagonal lines between its ends), each with its distance to the goal through the corridor, so the search is drawn round a lake the way the rough path went.
    Link zu diesem Eintragstatic func _corridor(m: WorldMap, rough: Array[Vector2i]) -> Dictionary
    Parameter
    • m: WorldMap
    • rough: Array[Vector2i]
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/route_builder.gd:336
  • RouteBuilder.jumps_for static funcWhat find() may use to cross water and hills in year: every bridge style there is by then, cheapest first ("unit": a span tile's price in tiles of plain kind), and tunnels (likewise).
    Link zu diesem Eintragstatic func jumps_for(kind: String, year: int) -> Dictionary

    A caller may add "crossing": what each crossing costs on top of its tiles (CROSSING if not).

    Parameter
    • kind: String
    • year: int
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/route_builder.gd:399
  • RouteBuilder._jump static funcA bridge or tunnel from tile t heading d (see last_crossings for its keys, plus "cost" in tiles of track), or {} when there is none to build.
    Link zu diesem Eintragstatic func _jump(m: WorldMap, kind: String, t: Vector2i, d: int, jumps: Dictionary, reserved: Dictionary, cache: Dictionary) -> Dictionary

    A bridge is tried where the tile ahead is water or takes no piece, a tunnel where the ground ahead rises straight up the way it goes.

    Parameter
    • m: WorldMap
    • kind: String
    • t: Vector2i
    • d: int
    • jumps: Dictionary
    • reserved: Dictionary
    • cache: Dictionary
    Rückgabewert
    Dictionary
    Ruft auf
    WorldMap.axis_of
    Deklariert in scripts/sim/route_builder.gd:413
  • RouteBuilder._rises static funcWhether the ground on tile n climbs on its way across it heading d.
    Link zu diesem Eintragstatic func _rises(m: WorldMap, n: Vector2i, d: int) -> bool
    Parameter
    • m: WorldMap
    • n: Vector2i
    • d: int
    Rückgabewert
    bool
    Ruft auf
    BuildOps.edge_heights, Const.opp
    Deklariert in scripts/sim/route_builder.gd:447
  • RouteBuilder._bridge static funcThe shortest bridge from ramp t heading d that the player's bridge tool would allow, in the cheapest style long enough for it.
    Link zu diesem Eintragstatic func _bridge(m: WorldMap, kind: String, t: Vector2i, d: int, jumps: Dictionary, reserved: Dictionary) -> Dictionary
    Parameter
    • m: WorldMap
    • kind: String
    • t: Vector2i
    • d: int
    • jumps: Dictionary
    • reserved: Dictionary
    Rückgabewert
    Dictionary
    Ruft auf
    BuildOps.edge_heights, Const.opp, BuildOps.plan_bridge
    Deklariert in scripts/sim/route_builder.gd:455
  • RouteBuilder._tunnel static funcThe tunnel the player's tunnel tool would dig from the hillside just ahead of t (heading d): the line goes from t into it and comes out on the tile beyond its far mouth.
    Link zu diesem Eintragstatic func _tunnel(m: WorldMap, kind: String, t: Vector2i, d: int, jumps: Dictionary, reserved: Dictionary) -> Dictionary
    Parameter
    • m: WorldMap
    • kind: String
    • t: Vector2i
    • d: int
    • jumps: Dictionary
    • reserved: Dictionary
    Rückgabewert
    Dictionary
    Ruft auf
    WorldMap.axis_of, BuildOps.edge_heights, BuildOps.plan_tunnel
    Deklariert in scripts/sim/route_builder.gd:494
  • RouteBuilder._build_jumped static func_build for a first pass that jumped: the bridges' spans and the tunnels' tiles go into the path where they are, and the crossings into out_crossings.
    Link zu diesem Eintragstatic func _build_jumped(m: WorldMap, came: Dictionary, s: int, jumped: Dictionary, out_crossings: Array) -> Array[Vector2i]
    Parameter
    • m: WorldMap
    • came: Dictionary
    • s: int
    • jumped: Dictionary
    • out_crossings: Array
    Rückgabewert
    Array[Vector2i]
    Deklariert in scripts/sim/route_builder.gd:539
  • RouteBuilder._refine_between static funcThe second pass for a path with crossings: each stretch of land between them is shaped on its own (a stretch it can't improve on in its share of the budget stays as the first pass laid it), leaving every bridge and tunnel where it is and entered and left straight on.
    Link zu diesem Eintragstatic func _refine_between(m: WorldMap, kind: String, path: Array[Vector2i], crossings: Array, start_dir: int, goal_dir: int, reserved: Dictionary, budget: int) -> Array[Vector2i]
    Parameter
    • m: WorldMap
    • kind: String
    • path: Array[Vector2i]
    • crossings: Array
    • start_dir: int
    • goal_dir: int
    • reserved: Dictionary
    • budget: int
    Rückgabewert
    Array[Vector2i]
    Deklariert in scripts/sim/route_builder.gd:562
  • RouteBuilder._manhattan static func
    Link zu diesem Eintragstatic func _manhattan(a: Vector2i, b: Vector2i) -> float
    Parameter
    • a: Vector2i
    • b: Vector2i
    Rückgabewert
    float

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/route_builder.gd:599
  • RouteBuilder._tile_cost static funcCost of putting a piece with bits on tile t, or -1 when it can't be built.
    Link zu diesem Eintragstatic func _tile_cost(m: WorldMap, kind: String, t: Vector2i, bits: int, fine: bool = false) -> float

    fine: for the second pass, which doesn't tell trees and slopes from open ground.

    Parameter
    • m: WorldMap
    • kind: String
    • t: Vector2i
    • bits: int
    • fine: bool = false
    Rückgabewert
    float
    Ruft auf
    BuildOps.rail_tile_problem, BuildOps.road_tile_problem
    Deklariert in scripts/sim/route_builder.gd:605
  • RouteBuilder._build static func
    Link zu diesem Eintragstatic func _build(m: WorldMap, came: Dictionary, s: int, per_tile: int) -> Array[Vector2i]
    Parameter
    • m: WorldMap
    • came: Dictionary
    • s: int
    • per_tile: int
    Rückgabewert
    Array[Vector2i]

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/route_builder.gd:645

SaveGame

  • SaveGame.VERSION const
    Link zu diesem Eintragconst VERSION := 1

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/save_game.gd:6
  • SaveGame.DIR const
    Link zu diesem Eintragconst DIR := "user://saves"

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/save_game.gd:7
  • SaveGame.list_saves static func
    Link zu diesem Eintragstatic func list_saves() -> Array
    Rückgabewert
    Array

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/save_game.gd:10
  • SaveGame.delete_save static func
    Link zu diesem Eintragstatic func delete_save(path: String) -> void
    Parameter
    • path: String
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/save_game.gd:29
  • SaveGame._v static func
    Link zu diesem Eintragstatic func _v(v: Vector2i) -> Array
    Parameter
    • v: Vector2i
    Rückgabewert
    Array

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/save_game.gd:36
  • SaveGame._vi static func
    Link zu diesem Eintragstatic func _vi(a: Array) -> Vector2i
    Parameter
    • a: Array
    Rückgabewert
    Vector2i

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/save_game.gd:40
  • SaveGame._b64 static func
    Link zu diesem Eintragstatic func _b64(p: PackedByteArray) -> String
    Parameter
    • p: PackedByteArray
    Rückgabewert
    String

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/save_game.gd:44
  • SaveGame._unb64 static func
    Link zu diesem Eintragstatic func _unb64(s: String) -> PackedByteArray
    Parameter
    • s: String
    Rückgabewert
    PackedByteArray

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/save_game.gd:48
  • SaveGame.save static func
    Link zu diesem Eintragstatic func save(sim: Sim, path: String) -> Error
    Parameter
    • sim: Sim
    • path: String
    Rückgabewert
    Error
    Ruft auf
    Mods.save_state, Town.size_of

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/save_game.gd:54
  • SaveGame.load_sim static func
    Link zu diesem Eintragstatic func load_sim(path: String) -> Sim
    Parameter
    • path: String
    Rückgabewert
    Sim
    Ruft auf
    Data.era_index, Town.restore_annexes, Town.enlarge_old_buildings, Town.recount_all, WorldGen.add_rig_docks, Data.has_model, Data.reliability, Vehicle.make_seg, Vehicle.free_seg, AiPlayer.from_dict, Goals.from_dict, Goals.caught_up, Mods.load_state, Mods.hook

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/save_game.gd:177
  • SaveGame._order_out static funcAn order as saved: [station id, full, then each of Vehicle.ORDER_FLAGS].
    Link zu diesem Eintragstatic func _order_out(o: Dictionary) -> Array
    Parameter
    • o: Dictionary
    Rückgabewert
    Array
    Deklariert in scripts/sim/save_game.gd:532
  • SaveGame._order_in static funcAn order back from row (see _order_out), at station st.
    Link zu diesem Eintragstatic func _order_in(row: Array, st: Station) -> Dictionary

    Flags an older save didn't have are off.

    Parameter
    • row: Array
    • st: Station
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/save_game.gd:540
  • SaveGame._floats static func
    Link zu diesem Eintragstatic func _floats(src: Dictionary) -> Dictionary
    Parameter
    • src: Dictionary
    Rückgabewert
    Dictionary

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/save_game.gd:547
  • SaveGame._ints static func
    Link zu diesem Eintragstatic func _ints(d: Dictionary) -> Dictionary
    Parameter
    • d: Dictionary
    Rückgabewert
    Dictionary

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/save_game.gd:554
  • SaveGame._pairs static funccargo -> [units, $]
    Link zu diesem Eintragstatic func _pairs(d: Dictionary) -> Dictionary
    Parameter
    • d: Dictionary
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/save_game.gd:562
  • SaveGame._stat_month static func
    Link zu diesem Eintragstatic func _stat_month(mo: Dictionary) -> Dictionary
    Parameter
    • mo: Dictionary
    Rückgabewert
    Dictionary

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/save_game.gd:569
  • SaveGame._course_out static funcA ship's course (see Vehicle.water_course) as [x, y, turn, x, y, turn, ...] over its route.
    Link zu diesem Eintragstatic func _course_out(v: Vehicle) -> Array
    Parameter
    • v: Vehicle
    Rückgabewert
    Array
    Deklariert in scripts/sim/save_game.gd:585
  • SaveGame._course_in static func
    Link zu diesem Eintragstatic func _course_in(v: Vehicle, a: Array) -> void
    Parameter
    • v: Vehicle
    • a: Array
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/save_game.gd:596

SignalTraps

  • SignalTraps._memo_key static var
    Link zu diesem Eintragstatic var _memo_key := []

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/signal_traps.gd:17
  • SignalTraps._memo static var
    Link zu diesem Eintragstatic var _memo: Array = []

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/signal_traps.gd:18
  • SignalTraps.find static funcThe stations of who that one-way signals shut: [{"station", "way": "out" | "in", "signal"}], one per station ("out" when both are true), the order of map.stations.
    Link zu diesem Eintragstatic func find(sim: Sim, who: Company, over: Dictionary = {}) -> Array

    signal is the tile of the first signal in the way, seen from the station. over ({tile: state}) stands in for those tiles' signals (see WorldMap.signals), to ask what a click would do; without it the answer is remembered until the rail network, the stations or the depots change.

    Parameter
    • sim: Sim
    • who: Company
    • over: Dictionary = {}
    Rückgabewert
    Array
    Deklariert in scripts/sim/signal_traps.gd:26
  • SignalTraps.after_click static funcWhat setting the signal on t to state would change: {"shut": [...], "freed": [...]}, each in find's form, "shut" for stations it would shut that are open now and "freed" for those it would open again.
    Link zu diesem Eintragstatic func after_click(sim: Sim, who: Company, t: Vector2i, state: int) -> Dictionary

    A station that stays shut (say, the far end of a line made one-way) isn't news.

    Parameter
    • sim: Sim
    • who: Company
    • t: Vector2i
    • state: int
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/signal_traps.gd:64
  • SignalTraps.text static funcOne of find's rows in words.
    Link zu diesem Eintragstatic func text(r: Dictionary, when: String) -> String

    when: "careful" (what the click under the mouse would do), "now" (what the click just did), "freed" (what the click would put right) or "problem" (a Problems row, which names the station already).

    Parameter
    • r: Dictionary
    • when: String
    Rückgabewert
    String
    Ruft auf
    L.t
    Deklariert in scripts/sim/signal_traps.gd:73
  • SignalTraps.blocker static funcThe tile of the one-way signal that keeps trains from getting between tiles and any of the goals tiles - out of tiles or, with inward, into them - or (-1, -1) when they can, or when there is no track between them at all.
    Link zu diesem Eintragstatic func blocker(m: WorldMap, tiles: Dictionary, goals: Dictionary, inward: bool, over: Dictionary = {}) -> Vector2i
    Parameter
    • m: WorldMap
    • tiles: Dictionary
    • goals: Dictionary
    • inward: bool
    • over: Dictionary = {}
    Rückgabewert
    Vector2i
    Deklariert in scripts/sim/signal_traps.gd:92
  • SignalTraps._passes static funcWhether a train heading h (or, inward, heading the other way) may pass tile n's signal.
    Link zu diesem Eintragstatic func _passes(m: WorldMap, n: Vector2i, h: int, inward: bool, over: Dictionary) -> bool
    Parameter
    • m: WorldMap
    • n: Vector2i
    • h: int
    • inward: bool
    • over: Dictionary
    Rückgabewert
    bool
    Ruft auf
    Const.opp
    Deklariert in scripts/sim/signal_traps.gd:104
  • SignalTraps._flood static funcFlood the rail network outward from tiles until one of goals is reached.
    Link zu diesem Eintragstatic func _flood(m: WorldMap, tiles: Dictionary, goals: Dictionary, obey: bool, inward: bool, over: Dictionary) -> Array

    Returns the steps from the start to that goal, [{"t": tile, "h": heading on entering it}], or [] when none is reached. obey false lets trains through one-way signals both ways.

    Parameter
    • m: WorldMap
    • tiles: Dictionary
    • goals: Dictionary
    • obey: bool
    • inward: bool
    • over: Dictionary
    Rückgabewert
    Array
    Ruft auf
    Const.opp
    Deklariert in scripts/sim/signal_traps.gd:112
  • SignalTraps._step static func
    Link zu diesem Eintragstatic func _step(m: WorldMap, tile: Vector2i, d: int, bits: int, from: int, obey: bool, inward: bool, over: Dictionary, came: Dictionary, queue: PackedInt32Array) -> void
    Parameter
    • m: WorldMap
    • tile: Vector2i
    • d: int
    • bits: int
    • from: int
    • obey: bool
    • inward: bool
    • over: Dictionary
    • came: Dictionary
    • queue: PackedInt32Array
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/signal_traps.gd:142
  • SignalTraps._minus static func
    Link zu diesem Eintragstatic func _minus(a: Array, b: Array) -> Array
    Parameter
    • a: Array
    • b: Array
    Rückgabewert
    Array

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/signal_traps.gd:156

TerrainGen

  • TerrainGen.generate static funcTerrain only (no towns or industries).
    Link zu diesem Eintragstatic func generate(m: WorldMap, seed_value: int) -> void

    WorldGen.generate builds a full world.

    Parameter
    • m: WorldMap
    • seed_value: int
    Rückgabewert
    void
    Deklariert in scripts/sim/terrain_gen.gd:7
  • TerrainGen.heights_from_image static funcHeights from a greyscale image (white = high, black = sea), like OpenTTD heightmaps.
    Link zu diesem Eintragstatic func heights_from_image(m: WorldMap, path: String) -> bool
    Parameter
    • m: WorldMap
    • path: String
    Rückgabewert
    bool
    Deklariert in scripts/sim/terrain_gen.gd:14
  • TerrainGen.generate_heights static funcwater: sea level 0 (low) ..
    Link zu diesem Eintragstatic func generate_heights(m: WorldMap, seed_value: int, water: int = 1, rough: int = 2, sample_scale: float = 1.0) -> void

    3 (islands). rough: 0 flat .. 3 mountainous. sample_scale stretches the noise so a small preview map shows the same world as a big one.

    Parameter
    • m: WorldMap
    • seed_value: int
    • water: int = 1
    • rough: int = 2
    • sample_scale: float = 1.0
    Rückgabewert
    void
    Deklariert in scripts/sim/terrain_gen.gd:30
  • TerrainGen.enforce_slopes static funcLower corners until every pair of edge-adjacent corners differs by at most one level.
    Link zu diesem Eintragstatic func enforce_slopes(m: WorldMap) -> void
    Parameter
    • m: WorldMap
    Rückgabewert
    void
    Deklariert in scripts/sim/terrain_gen.gd:73
  • TerrainGen.classify static funcTerrain types (from heights) and tree cover.
    Link zu diesem Eintragstatic func classify(m: WorldMap, seed_value: int) -> void
    Parameter
    • m: WorldMap
    • seed_value: int
    Rückgabewert
    void
    Deklariert in scripts/sim/terrain_gen.gd:100
  • TerrainGen.terrain_type static func
    Link zu diesem Eintragstatic func terrain_type(m: WorldMap, x: int, y: int) -> int
    Parameter
    • m: WorldMap
    • x: int
    • y: int
    Rückgabewert
    int

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/terrain_gen.gd:123
  • TerrainGen.classify_tile static funcRe-derive one tile's terrain after its corners changed; trees only survive on grass.
    Link zu diesem Eintragstatic func classify_tile(m: WorldMap, x: int, y: int) -> void
    Parameter
    • m: WorldMap
    • x: int
    • y: int
    Rückgabewert
    void
    Deklariert in scripts/sim/terrain_gen.gd:138
  • TerrainGen._near_water static func
    Link zu diesem Eintragstatic func _near_water(m: WorldMap, x: int, y: int) -> bool
    Parameter
    • m: WorldMap
    • x: int
    • y: int
    Rückgabewert
    bool

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/terrain_gen.gd:145

UndoStack

  • UndoStack.MAX_STEPS const
    Link zu diesem Eintragconst MAX_STEPS := 20

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/undo.gd:23
  • UndoStack.MAX_AGE_DAYS const
    Link zu diesem Eintragconst MAX_AGE_DAYS := 60.0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/undo.gd:24
  • UndoStack.steps varoldest first
    Link zu diesem Eintragvar steps: Array = []Deklariert in scripts/sim/undo.gd:29
  • UndoStack.enabled var
    Link zu diesem Eintragvar enabled := true

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/undo.gd:30
  • UndoStack.lost varThe step that was given up last, for the button's tooltip: {"what", "why"}.
    Link zu diesem Eintragvar lost := {}

    Emptied by the next action.

    Deklariert in scripts/sim/undo.gd:32
  • UndoStack.clear func
    Link zu diesem Eintragfunc clear() -> void
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/undo.gd:35
  • UndoStack.size func
    Link zu diesem Eintragfunc size() -> int
    Rückgabewert
    int

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/undo.gd:40
  • UndoStack._tile static func
    Link zu diesem Eintragstatic func _tile(m: WorldMap, t: Vector2i) -> Array
    Parameter
    • m: WorldMap
    • t: Vector2i
    Rückgabewert
    Array

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/undo.gd:46
  • UndoStack._put static func
    Link zu diesem Eintragstatic func _put(m: WorldMap, t: Vector2i, s: Array) -> void
    Parameter
    • m: WorldMap
    • t: Vector2i
    • s: Array
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/undo.gd:52
  • UndoStack._station static func
    Link zu diesem Eintragstatic func _station(m: WorldMap, st: Station) -> Array
    Parameter
    • m: WorldMap
    • st: Station
    Rückgabewert
    Array

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/undo.gd:83
  • UndoStack._orders_to static func
    Link zu diesem Eintragstatic func _orders_to(sim: Sim, st: Station) -> int
    Parameter
    • sim: Sim
    • st: Station
    Rückgabewert
    int

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/undo.gd:89
  • UndoStack.bulldoze_tiles static funcEvery tile a bulldoze of rect may change: the area and its edge (a depot lets go of the road in front of it), the whole of each bridge or tunnel it reaches and of each airfield.
    Link zu diesem Eintragstatic func bulldoze_tiles(m: WorldMap, rect: Rect2i) -> Array
    Parameter
    • m: WorldMap
    • rect: Rect2i
    Rückgabewert
    Array
    Ruft auf
    WorldMap.crossing_tiles, Town.footprint, Town.anchor_of
    Deklariert in scripts/sim/undo.gd:100
  • UndoStack.terraform_tiles static funcEvery tile raising or lowering corners may change (see BuildOps.apply_terraform).
    Link zu diesem Eintragstatic func terraform_tiles(m: WorldMap, corners: Array) -> Array
    Parameter
    • m: WorldMap
    • corners: Array
    Rückgabewert
    Array
    Deklariert in scripts/sim/undo.gd:124
  • UndoStack.begin funcCall before an action changes anything.
    Link zu diesem Eintragfunc begin(sim: Sim, who: Company, tiles: Array, opt: Dictionary = {}) -> Dictionary

    tiles: every tile it may touch (more is fine: tiles that end up unchanged are dropped). opt: "corners" (corner heights it may change), "stations" (stations it may change that don't stand on tiles), "ratings" (it may move council ratings). Returns what commit needs; {} when the action isn't the player's (nothing is recorded then).

    Parameter
    • sim: Sim
    • who: Company
    • tiles: Array
    • opt: Dictionary = {}
    Rückgabewert
    Dictionary
    Deklariert in scripts/sim/undo.gd:142
  • UndoStack._log_of static func
    Link zu diesem Eintragstatic func _log_of(t: Town, cid: int) -> Variant
    Parameter
    • t: Town
    • cid: int
    Rückgabewert
    Variant

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/undo.gd:171
  • UndoStack.commit funcCall when the action is done and paid for.
    Link zu diesem Eintragfunc commit(sim: Sim, u: Dictionary, kind: String, info: Dictionary = {}) -> void

    kind and info ("n": how many tiles, "name": a station's or town's name, "category": the ledger line it was paid from) only describe it.

    Parameter
    • sim: Sim
    • u: Dictionary
    • kind: String
    • info: Dictionary = {}
    Rückgabewert
    void
    Deklariert in scripts/sim/undo.gd:177
  • UndoStack._month static func
    Link zu diesem Eintragstatic func _month(sim: Sim) -> Vector2i
    Parameter
    • sim: Sim
    Rückgabewert
    Vector2i
    Ruft auf
    Calendar.from_day

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/undo.gd:237
  • UndoStack.describe static funcA step in words: "12 tiles of rail", "Ashford North", "demolition of 3 tiles".
    Link zu diesem Eintragstatic func describe(step: Dictionary) -> String
    Parameter
    • step: Dictionary
    Rückgabewert
    String
    Ruft auf
    L.n, L.t
    Deklariert in scripts/sim/undo.gd:245
  • UndoStack._problem funcWhy the newest step can't be undone now: [reason, given up for good].
    Link zu diesem Eintragfunc _problem(sim: Sim, step: Dictionary) -> Array

    ["", false] when it can.

    Parameter
    • sim: Sim
    • step: Dictionary
    Rückgabewert
    Array
    Ruft auf
    L.t
    Deklariert in scripts/sim/undo.gd:266
  • UndoStack._vehicle_on func
    Link zu diesem Eintragfunc _vehicle_on(sim: Sim, step: Dictionary) -> bool
    Parameter
    • sim: Sim
    • step: Dictionary
    Rückgabewert
    bool

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/undo.gd:299
  • UndoStack._block_held funcWith realistic blocking: whether a train holds (stands in, or has been let into) a block of track that undoing the step would take away.
    Link zu diesem Eintragfunc _block_held(sim: Sim, step: Dictionary) -> bool
    Parameter
    • sim: Sim
    • step: Dictionary
    Rückgabewert
    bool
    Deklariert in scripts/sim/undo.gd:320
  • UndoStack.status funcFor the Undo button: {"can", "what", "money" (what undoing pays back), "tip"}.
    Link zu diesem Eintragfunc status(sim: Sim) -> Dictionary

    A step that can never be undone again is dropped here, with everything older.

    Parameter
    • sim: Sim
    Rückgabewert
    Dictionary
    Ruft auf
    L.t, Fmt.money
    Deklariert in scripts/sim/undo.gd:340
  • UndoStack.undo funcUndo the newest step.
    Link zu diesem Eintragfunc undo(sim: Sim) -> Dictionary

    Returns {"ok", "text" (what to tell the player), "what", "money"}.

    Parameter
    • sim: Sim
    Rückgabewert
    Dictionary
    Ruft auf
    L.t, Fmt.money
    Deklariert in scripts/sim/undo.gd:362
  • UndoStack._revert func
    Link zu diesem Eintragfunc _revert(sim: Sim, step: Dictionary) -> void
    Parameter
    • sim: Sim
    • step: Dictionary
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/undo.gd:376

WorldGen

  • WorldGen.DENSITY constOptions: "water" 0..3 (sea level), "rough" 0..3 (terrain), "towns" / "industries" 0..3 (density), "heightmap" (path to a greyscale image, OpenTTD-style).
    Link zu diesem Eintragconst DENSITY := [0.55, 1.0, 1.5, 2.2]Deklariert in scripts/sim/world_gen.gd:8
  • WorldGen.INDUSTRY_AREA constTiles of land (or sea) that hold one full set of Data.INDUSTRY counts at normal density: 24 industries here is about one per 600 tiles.
    Link zu diesem Eintragconst INDUSTRY_AREA := 120.0 * 120.0Deklariert in scripts/sim/world_gen.gd:11
  • WorldGen.FEED_MIN constHow far (in tiles) a processing industry is sited from the producers that feed it: far enough for a route to pay, near enough for an early train or lorry.
    Link zu diesem Eintragconst FEED_MIN := 18.0Deklariert in scripts/sim/world_gen.gd:14
  • WorldGen.FEED_MAX const
    Link zu diesem Eintragconst FEED_MAX := 50.0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_gen.gd:15
  • WorldGen.SAME_APART_MAX constUpper bound on how far apart two industries of one type are kept (see _place_industries).
    Link zu diesem Eintragconst SAME_APART_MAX := 32.0Deklariert in scripts/sim/world_gen.gd:17
  • WorldGen.SPREAD_TRIES constUsable sites weighed for each industry placed at random; the one farthest from its own kind wins.
    Link zu diesem Eintragconst SPREAD_TRIES := 8Deklariert in scripts/sim/world_gen.gd:19
  • WorldGen.TOWN_SITE_TOWNS constAn industry that stands by a town (a printing works) looks around the biggest few towns, up to TOWN_SITE_MAX tiles from the centre.
    Link zu diesem Eintragconst TOWN_SITE_TOWNS := 4Deklariert in scripts/sim/world_gen.gd:22
  • WorldGen.TOWN_SITE_MAX const
    Link zu diesem Eintragconst TOWN_SITE_MAX := 16.0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_gen.gd:23
  • WorldGen.TOWN_INDUSTRY_MIN constHow far (in tiles) a town centre is founded from an industry's centre, so the town starts with room to grow before it meets the ground kept clear around the industry (BuildOps.INDUSTRY_GAP).
    Link zu diesem Eintragconst TOWN_INDUSTRY_MIN := 14.0Deklariert in scripts/sim/world_gen.gd:26
  • WorldGen.TOWN_INDUSTRY_FALLBACK const
    Link zu diesem Eintragconst TOWN_INDUSTRY_FALLBACK := 10.0

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_gen.gd:27
  • WorldGen.TOWN_EXTRA const
    Link zu diesem Eintragconst TOWN_EXTRA

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_gen.gd:28
  • WorldGen.generate static func
    Link zu diesem Eintragstatic func generate(m: WorldMap, seed_value: int, opts: Dictionary = {}) -> void
    Parameter
    • m: WorldMap
    • seed_value: int
    • opts: Dictionary = {}
    Rückgabewert
    void
    Ruft auf
    Data.era_index, L.t, TerrainGen.heights_from_image, TerrainGen.generate_heights, TerrainGen.classify

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_gen.gd:31
  • WorldGen.add_rig_docks static funcEvery industry out at sea gets its own open dock (see BuildOps.add_rig_dock).
    Link zu diesem Eintragstatic func add_rig_docks(m: WorldMap) -> void
    Parameter
    • m: WorldMap
    Rückgabewert
    void
    Ruft auf
    BuildOps.add_rig_dock
    Deklariert in scripts/sim/world_gen.gd:57
  • WorldGen._place_industries static func
    Link zu diesem Eintragstatic func _place_industries(m: WorldMap, rng: RandomNumberGenerator, density: float = 1.0) -> void
    Parameter
    • m: WorldMap
    • rng: RandomNumberGenerator
    • density: float = 1.0
    Rückgabewert
    void
    Ruft auf
    Data.opens, Data.accepts

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_gen.gd:65
  • WorldGen._place_town_industries static funcThe kinds that stand by a town (a printing works, RAIL-31), once the towns are founded: on ground the towns have left clear, levelled like an industry opening during the game.
    Link zu diesem Eintragstatic func _place_town_industries(m: WorldMap, rng: RandomNumberGenerator, density: float) -> void
    Parameter
    • m: WorldMap
    • rng: RandomNumberGenerator
    • density: float
    Rückgabewert
    void
    Ruft auf
    Data.opens
    Deklariert in scripts/sim/world_gen.gd:84
  • WorldGen._place_kind static funcPut down a new map's industries of type (see type_count) and return them.
    Link zu diesem Eintragstatic func _place_kind(m: WorldMap, rng: RandomNumberGenerator, room: Vector2i, type: String, density: float) -> Array
    Parameter
    • m: WorldMap
    • rng: RandomNumberGenerator
    • room: Vector2i
    • type: String
    • density: float
    Rückgabewert
    Array
    Deklariert in scripts/sim/world_gen.gd:93
  • WorldGen.industry_room static funcThe room there is to build industries in: x land tiles (for industries ashore), y open water (for those at sea).
    Link zu diesem Eintragstatic func industry_room(m: WorldMap) -> Vector2i

    Sampled every other tile, which is plenty for a head count.

    Parameter
    • m: WorldMap
    Rückgabewert
    Vector2i
    Deklariert in scripts/sim/world_gen.gd:110
  • WorldGen.type_count static funcHow many industries of type a map with room (see industry_room) gets at density: counts follow the room there is to build in, and every type gets at least one.
    Link zu diesem Eintragstatic func type_count(room: Vector2i, type: String, density: float) -> int
    Parameter
    • room: Vector2i
    • type: String
    • density: float
    Rückgabewert
    int
    Deklariert in scripts/sim/world_gen.gd:124
  • WorldGen.spacing static funcHow far apart count industries of type are kept.
    Link zu diesem Eintragstatic func spacing(room: Vector2i, type: String, count: int) -> float

    Two of a kind side by side look like a mistake and split one area's trade between them: keep each a fair share of its own type's room apart (half the even spacing, capped so a rare processor can still sit near its feeders).

    Parameter
    • room: Vector2i
    • type: String
    • count: int
    Rückgabewert
    float
    Deklariert in scripts/sim/world_gen.gd:132
  • WorldGen.find_site static funcWhere a new industry of type goes: near producers in unserved (see unserved_feeders) that have nobody to take their cargo, if any; else near producers none of its own kind is near yet (a paper mill by forests that already have a sawmill); else anywhere, as far from its own kind as it can.
    Link zu diesem Eintragstatic func find_site(m: WorldMap, rng: RandomNumberGenerator, type: String, apart: float, unserved: Array) -> Vector3i

    A plant that needs every input (Data.INDUSTRY "needs_all") goes where it reaches makers of as many of its inputs as it can. A kind that stands by a town (a printing works) goes at the edge of one of the biggest. (x, y) is the north-west tile and z the level it stands at; z is -1 when no usable site turned up.

    Parameter
    • m: WorldMap
    • rng: RandomNumberGenerator
    • type: String
    • apart: float
    • unserved: Array
    Rückgabewert
    Vector3i
    Deklariert in scripts/sim/world_gen.gd:144
  • WorldGen.put_industry static funcPut an industry of type with id id on spot (from find_site): the ground under it flattened to its level (the corners only: the caller works out the rest), added to the map's list and its tiles.
    Link zu diesem Eintragstatic func put_industry(m: WorldMap, id: int, type: String, spot: Vector3i) -> Industry

    Returns it.

    Parameter
    • m: WorldMap
    • id: int
    • type: String
    • spot: Vector3i
    Rückgabewert
    Industry
    Deklariert in scripts/sim/world_gen.gd:162
  • WorldGen._site_level static funcThe level a site kind of industry would stand at with its north-west tile on (x, y): 0 at sea, the flattened ground level ashore, -1 where it can't go.
    Link zu diesem Eintragstatic func _site_level(m: WorldMap, site: String, x: int, y: int) -> int
    Parameter
    • m: WorldMap
    • site: String
    • x: int
    • y: int
    Rückgabewert
    int
    Deklariert in scripts/sim/world_gen.gd:178
  • WorldGen.unserved_feeders static funcIndustries making something type accepts that have no taker within FEED_MAX tiles yet.
    Link zu diesem Eintragstatic func unserved_feeders(m: WorldMap, type: String) -> Array

    For a plant that needs every input, all of them, taken or not: it can't work on one alone.

    Parameter
    • m: WorldMap
    • type: String
    Rückgabewert
    Array
    Ruft auf
    Data.accepts
    Deklariert in scripts/sim/world_gen.gd:189
  • WorldGen._feeders_of_own static funcIndustries making something type accepts that have no industry of type within FEED_MAX tiles: for a second customer of a cargo (a paper mill, where the forests already have a sawmill).
    Link zu diesem Eintragstatic func _feeders_of_own(m: WorldMap, type: String) -> Array
    Parameter
    • m: WorldMap
    • type: String
    Rückgabewert
    Array
    Ruft auf
    Data.accepts
    Deklariert in scripts/sim/world_gen.gd:225
  • WorldGen._site_near_feeders static funcA site FEED_MIN..FEED_MAX tiles from a producer in unserved and at least apart tiles from any other type: the best of several usable ones, counting how many such producers each would serve (for a plant that needs every input, how many of its inputs they make), then how far it keeps from its own kind.
    Link zu diesem Eintragstatic func _site_near_feeders(m: WorldMap, rng: RandomNumberGenerator, site: String, type: String, apart: float, unserved: Array) -> Vector3i

    z is -1 when none turned up.

    Parameter
    • m: WorldMap
    • rng: RandomNumberGenerator
    • site: String
    • type: String
    • apart: float
    • unserved: Array
    Rückgabewert
    Vector3i
    Ruft auf
    Data.accepts
    Deklariert in scripts/sim/world_gen.gd:239
  • WorldGen._site_spread static funcA usable site anywhere on the map: of SPREAD_TRIES random ones, the farthest from other industries of type (best-candidate sampling, which spreads them out without a hard rule that could leave one unplaced).
    Link zu diesem Eintragstatic func _site_spread(m: WorldMap, rng: RandomNumberGenerator, site: String, type: String) -> Vector3i

    z is -1 when no usable site turned up.

    Parameter
    • m: WorldMap
    • rng: RandomNumberGenerator
    • site: String
    • type: String
    Rückgabewert
    Vector3i
    Deklariert in scripts/sim/world_gen.gd:286
  • WorldGen._site_by_town static funcA site by one of the TOWN_SITE_TOWNS biggest towns, at least apart tiles from any other type: the usable one nearest the centre of the biggest town that has any within TOWN_SITE_MAX tiles, so it stands at the edge of town or in a gap inside it.
    Link zu diesem Eintragstatic func _site_by_town(m: WorldMap, rng: RandomNumberGenerator, type: String, apart: float) -> Vector3i

    z is -1 when none turned up.

    Parameter
    • m: WorldMap
    • rng: RandomNumberGenerator
    • type: String
    • apart: float
    Rückgabewert
    Vector3i
    Deklariert in scripts/sim/world_gen.gd:309
  • WorldGen.level_ground static funcThe ground of an industry put down where the land is already shaped (one opening during the game, or one by a town once the towns are founded): no trees on it or around it, its corners at the level put_industry flattened them to, and its tiles looked at again.
    Link zu diesem Eintragstatic func level_ground(m: WorldMap, ind: Industry) -> Rect2i

    Returns the tiles that changed.

    Parameter
    • m: WorldMap
    • ind: Industry
    Rückgabewert
    Rect2i
    Ruft auf
    TerrainGen.classify_tile
    Deklariert in scripts/sim/world_gen.gd:334
  • WorldGen._gap_to_kind static funcDistance from c to the nearest industry of type, INF when there is none yet.
    Link zu diesem Eintragstatic func _gap_to_kind(m: WorldMap, type: String, c: Vector2) -> float
    Parameter
    • m: WorldMap
    • type: String
    • c: Vector2
    Rückgabewert
    float
    Deklariert in scripts/sim/world_gen.gd:348
  • WorldGen._sea_site_ok static funcOffshore: open water all over the footprint and a margin, with a shore close enough for a dock.
    Link zu diesem Eintragstatic func _sea_site_ok(m: WorldMap, x: int, y: int) -> bool
    Parameter
    • m: WorldMap
    • x: int
    • y: int
    Rückgabewert
    bool
    Deklariert in scripts/sim/world_gen.gd:357
  • WorldGen._near_coast static funcA harbour sits on the shore: open water within a couple of tiles of its footprint.
    Link zu diesem Eintragstatic func _near_coast(m: WorldMap, x: int, y: int) -> bool
    Parameter
    • m: WorldMap
    • x: int
    • y: int
    Rückgabewert
    bool
    Deklariert in scripts/sim/world_gen.gd:380
  • WorldGen._industry_site_level static funcReturns the level the footprint can be flattened to, or -1 if the site is unusable.
    Link zu diesem Eintragstatic func _industry_site_level(m: WorldMap, x: int, y: int) -> int

    Flattening only lowers corners by one, and only where that keeps neighbours within one level.

    Parameter
    • m: WorldMap
    • x: int
    • y: int
    Rückgabewert
    int
    Deklariert in scripts/sim/world_gen.gd:391
  • WorldGen._site_clear static funcNothing built on the footprint of an industry with its north-west tile on (x, y), or by it: no road, track, bridge or tunnel within a tile (flattening reshapes the ground there), and no building, station or depot within BuildOps.INDUSTRY_GAP (the ground towns keep clear around industries).
    Link zu diesem Eintragstatic func _site_clear(m: WorldMap, x: int, y: int) -> bool

    This is for industries opening during the game (RAIL-23): when the world is made, nothing is built yet but other industries, and those keep further apart than this anyway.

    Parameter
    • m: WorldMap
    • x: int
    • y: int
    Rückgabewert
    bool
    Deklariert in scripts/sim/world_gen.gd:419
  • WorldGen._name_industries static func
    Link zu diesem Eintragstatic func _name_industries(m: WorldMap) -> void
    Parameter
    • m: WorldMap
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_gen.gd:433
  • WorldGen.industry_name static funcAn industry is named after the nearest town: "Ashford Coal Mine".
    Link zu diesem Eintragstatic func industry_name(m: WorldMap, ind: Industry) -> String
    Parameter
    • m: WorldMap
    • ind: Industry
    Rückgabewert
    String
    Ruft auf
    L.t, L.tidy
    Deklariert in scripts/sim/world_gen.gd:439
  • WorldGen._place_towns static func
    Link zu diesem Eintragstatic func _place_towns(m: WorldMap, rng: RandomNumberGenerator, density: float = 1.0, opts: Dictionary = {}) -> void
    Parameter
    • m: WorldMap
    • rng: RandomNumberGenerator
    • density: float = 1.0
    • opts: Dictionary = {}
    Rückgabewert
    void
    Ruft auf
    L.t, Town.pick_style

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_gen.gd:453
  • WorldGen._town_site_ok static func
    Link zu diesem Eintragstatic func _town_site_ok(m: WorldMap, x: int, y: int, spacing: float = 22.0, industry_clear: float = TOWN_INDUSTRY_MIN) -> bool
    Parameter
    • m: WorldMap
    • x: int
    • y: int
    • spacing: float = 22.0
    • industry_clear: float = TOWN_INDUSTRY_MIN
    Rückgabewert
    bool
    Ruft auf
    BuildOps.can_build_house

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_gen.gd:481
  • WorldGen._town_name static func
    Link zu diesem Eintragstatic func _town_name(rng: RandomNumberGenerator, used: Dictionary) -> String
    Parameter
    • rng: RandomNumberGenerator
    • used: Dictionary
    Rückgabewert
    String
    Ruft auf
    Data.town_prefixes, Data.town_suffixes, L.t

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_gen.gd:502
  • WorldGen._clear_trees static func
    Link zu diesem Eintragstatic func _clear_trees(m: WorldMap) -> void
    Parameter
    • m: WorldMap
    Rückgabewert
    void

    Für diesen Eintrag fehlt noch eine Beschreibung des Verhaltens.

    Deklariert in scripts/sim/world_gen.gd:517

Dateioptionen

Bei Feldnamen zählt die Groß- und Kleinschreibung. Die verlinkten Abschnitte erklären die Dateien mit Beispielen.

Datei oder AbschnittPflichtfelderOptionale Felder
mod.jsonidname, version, author, description
data.json → vehicles.<id>name, kind, cargos, speed, cost und run. Verwende look oder model sowie max_wagons für Loks oder cap für andere Fahrzeuge.desc, year, rel, electric, steam, length
data.json → cargo.<id>Vorhandene Fracht-IDrate, days
data.json → town_namesKeineprefixes, suffixes, replace
data.json → company_namesNamenslisteKeine
maps/<name>.jsonKeinename, description, settings

In settings sind w und h (64, 128, 256, 512, 1024), year (1950, 1960, 1970, 1980, 1990, 2000) sowie towns, industries, rough und water (Indizes 0–3) möglich. rough reicht von flach bis bergig. Bei water folgen auf niedrig die Stufen normal, hoch und Inseln.

Der Wahrheitswert steam aktiviert Dampfeffekte und das Fahrverhalten für Dampfloks. length gibt die Länge eines eigenen Modells in Feldern an.

Das Dictionary Sim.options enthält die Simulationsoptionen cost, blocking, ai_level, max_loan, depots, breakdowns und goal. Karten-Mods verwenden die oben aufgeführten Felder unter settings.

Fracht-IDs

IDName
paxPassengers
coalCoal
woodWood
grainGrain
oilOil
goodsGoods
foodFood
iron_oreIron ore
steelSteel
fishFish
mailMail
plasticsPlastics
wasteWaste
electronicsElectronics
carsCars
paperPaper
newsNewspapers

Modelle des Grundspiels

IDNameTyp
cargoplanePelican Freighterair
cargopropStork Cargo Propair
eplaneBreeze Electric Commuterair
h2linerAurora H2 Airlinerair
jetAlbatross Jetair
jumboCondor Jumboair
mailplanePetrel Mailplaneair
narrowbodyFalcon Narrowbodyair
propSkylark Propair
regionalSwift Regional Jetair
superjumboLeviathan Double-Deckair
supersonicArrow Supersonicair
turbopropKittiwake Turbopropair
widebodyOsprey Widebodyair
dieselMeridian Dieselrail
efreightTempest Electric Freightrail
electricAurora Electricrail
expressVanguard Expressrail
heavydieselIronclad Freight Dieselrail
hstSwift High-Speedrail
hydrogenZephyr Hydrogenrail
mogulHighland Mogulrail
railcarSparrow Railcarrail
steamKestrel Steamrail
tankBrigand Tank Enginerail
tiltingSwallow Tilting Expressrail
artbusComet Articulatedroad
busComet City Busroad
bus2Comet Coachroad
cartruckAtlas Car Transporterroad
ddbusComet Double-Deckerroad
ebusVolt Electric Busroad
etruckVolt Electric Truckroad
roadtrainTitan Road Trainroad
truckAtlas Haulerroad
truck2Atlas Hauler Mk IIroad
truck3Atlas Hauler Mk IIIroad
bulkerGranite Bulk Carrierwater
containerAtlas Box Carrierwater
eferryRipple Electric Ferrywater
ferryGull Ferrywater
freighterTern Freighterwater
hydrofoilSkimmer Hydrofoilwater
linerMajestic Linerwater
tankerPetrel Tankerwater