Loading
#openttdcoop - Paste
Archives
Trending
Docs
Login
ABAP
ActionScript
ActionScript 3
Ada
AIMMS3
ALGOL 68
Apache configuration
AppleScript
Apt sources
ARM ASSEMBLER
ASM
ASP
asymptote
Autoconf
Autohotkey
AutoIt
AviSynth
awk
BASCOM AVR
Bash
Basic4GL
BibTeX
BlitzBasic
bnf
Boo
Brainfuck
C
C#
C (LoadRunner)
C (Mac)
C (WinAPI)
C++
C++ (Qt)
C++ (WinAPI)
CAD DCL
CAD Lisp
CFDG
ChaiScript
Chapel
CIL
Clojure
CMake
COBOL
CoffeeScript
ColdFusion
CSS
Cuesheet
D
Dart
DCL
DCPU-16 Assembly
DCS
Delphi
Diff
DIV
DOS
dot
E
ECMAScript
Eiffel
eMail (mbox)
EPC
Erlang
Euphoria
EZT
F#
Falcon
FO (abas-ERP)
Formula One
Fortran
FreeBasic
FreeSWITCH
GADV 4CS
GAMBAS
GDB
genero
Genie
glSlang
GML
GNU/Octave
GNU Gettext
GNU make
Gnuplot
Go
Groovy
GwBasic
Haskell
Haxe
HicEst
HQ9+
HTML
HTML5
Icon
INI
Inno
INTERCAL
Io
ISPF Panel
J
Java
Java(TM) 2 Platform Standard Edition 5.0
Javascript
JCL
jQuery
KiXtart
KLone C
KLone C++
LaTeX
LDIF
Liberty BASIC
Lisp
LLVM Intermediate Representation
Locomotive Basic
Logtalk
LOLcode
Lotus Notes @Formulas
LotusScript
LScript
LSL2
Lua
MagikSF
MapBasic
Matlab M
Microchip Assembler
Microsoft Registry
mIRC Scripting
MMIX
Modula-2
Modula-3
MOS 6502 (6510) ACME Cross Assembler format
MOS 6502 (6510) Kick Assembler format
MOS 6502 (6510) TASM/64TASS 1.46 Assembler format
Motorola 68000 - HiSoft Devpac ST 2 Assembler format
Motorola 68000 Assembler
MXML
MySQL
Nagios
NetRexx
newlisp
nginx
Nimrod
NML NewGRF Meta Language
NSIS
Oberon-2
Objeck Programming Language
Objective-C
OCaml
OCaml (brief)
ooRexx
OpenBSD Packet Filter
OpenOffice.org Basic
Oracle 8 SQL
Oracle 11 SQL
Oxygene
OZ
ParaSail
PARI/GP
Pascal
PCRE
per
Perl
Perl 6
PHP
PHP (brief)
PIC16
Pike
Pixel Bender 1.0
PL/I
PL/SQL
PostgreSQL
PostScript
POVRAY
PowerBuilder
PowerShell
ProFTPd configuration
Progress
Prolog
PROPERTIES
ProvideX
Puppet
PureBasic
Python
Python for S60
q/kdb+
QBasic/QuickBASIC
QML
R / S+
Racket
Rails
RBScript
REBOL
rexx
robots.txt
RPM Specification File
Ruby
Rust
SAS
Scala
Scheme
SciLab
SCL
sdlBasic
Smalltalk
Smarty
SPARK
SPARQL
SQL
Squirrel Script
Squirrel Script with OpenTTD AI/GS
StandardML
StoneScript
SystemVerilog
T-SQL
TCL
Tera Term Macro
Text
thinBasic
TypoScript
Unicon (Unified Extended Dialect of Icon)
Uno Idl
Unreal Script
UPC
Urbi
Vala
vb.net
VBScript
Vedit macro language
Verilog
VHDL
Vim Script
Visual Basic
Visual Fox Pro
Visual Prolog
Whitespace
Whois (RPSL format)
Winbatch
X++
XBasic
XML
Xorg configuration
YAML
ZiLOG Z80 Assembler
ZXBasic
// xussr /// header grf { grfid: "AKA\08"; name: string(STR_GRF_NAME); desc: string(STR_GRF_DESC); url: string(STR_GRF_URL); version: 1281; min_compatible_version: 496; param 0 { enable_our_own_tracks { name: string(STR_PARAM_NAME_ENABLE_OUR_OWN_TRACKS); desc: string(STR_PARAM_DESC_ENABLE_OUR_OWN_TRACKS); type: bool; bit: 4; def_value: 1; } enable_icons { name: string(STR_PARAM_NAME_ENABLE_ICONS); desc: string(STR_PARAM_DESC_ENABLE_ICONS); type: bool; bit: 6; def_value: 1; } enable_long_names { name: string(STR_PARAM_NAME_ENABLE_LONG_NAMES); desc: string(STR_PARAM_DESC_ENABLE_LONG_NAMES); type: bool; bit: 7; def_value: 1; } enable_override_cargo { name: string(STR_PARAM_NAME_ENABLE_OVERRIDE_CARGO); desc: string(STR_PARAM_DESC_ENABLE_OVERRIDE_CARGO); type: bool; bit: 3; def_value: 1; } enable_standard_engine { name: string(STR_PARAM_NAME_ENABLE_STANDARD_ENGINE); desc: string(STR_PARAM_DESC_ENABLE_STANDARD_ENGINE); type: bool; bit: 0; def_value: 0; } enable_standard_car { name: string(STR_PARAM_NAME_ENABLE_STANDARD_CAR); desc: string(STR_PARAM_DESC_ENABLE_STANDARD_CAR); type: bool; bit: 1; def_value: 0; } enable_debug_car { name: string(STR_PARAM_NAME_ENABLE_DEBUG_CAR); desc: string(STR_PARAM_DESC_ENABLE_DEBUG_CAR); type: bool; bit: 2; def_value: 0; } enable_debug_cost { name: string(STR_PARAM_NAME_ENABLE_DEBUG_COST); desc: string(STR_PARAM_DESC_ENABLE_DEBUG_COST); type: bool; bit: 5; def_value: 0; } } param 1 { speed_penalty_percent { type: int; name: string(STR_PARAM_NAME_SPEED_PENALTY_PERCENT); desc: string(STR_PARAM_DESC_SPEED_PENALTY_PERCENT); min_value: 10; max_value: 50; def_value: 15; } } /* param 2 { start_year_for_cost { type: int; name: string(STR_PARAM_NAME_START_YEAR); desc: string(STR_PARAM_DESC_START_YEAR); min_value: 0; max_value: 2050; def_value: 0; } } param 3 { inflation_for_cost { type: int; name: string(STR_PARAM_NAME_INFLATION); desc: string(STR_PARAM_DESC_INFLATION); min_value: 0; max_value: 4; def_value: 2; } } */ } /// check // version check // only for OpenTTD >= r23744 // (возможно совместное использование транспорта GRF7 и GRF8 без исключения) if (ttd_platform != PLATFORM_OPENTTD || openttd_version < version_openttd(1, 2, 0, 23744)) { error(ERROR, REQUIRES_OPENTTD, string(STR_MIN_OPENTTD_VERSION)); } // Check for engine pool if (!dynamic_engines) { error(ERROR, USED_WITH, string(STR_USE_ENGINE_POOL)); } // cargotable // Список меток грузов, включая стандартные, тойлэнд, ECS, FIRS // по алфавиту cargotable { AORE, BATT, BDMT, BEER, BRCK, BUBL, CERA, CERE, CLAY, CMNT, COAL, COLA, COPR, CORE, CTCD, DIAM, DYES, ENSP, FERT, FICR, FISH, FMSP, FOOD, FRUT, FRVG, FZDR, GEAR, GLAS, GOLD, GOOD, GRAI, GRVL, IORE, LIME, LVST, MAIL, MAIZ, MILK, MNSP, OIL_, OLSD, PAPR, PASS, PETR, PLST, PLAS, POTA, RCYC, RFPR, RUBR, SAND, SCMT, SGBT, SGCN, STEL, SUGR, SULP, SWET, TOFF, TOUR, TOYS, VALU, VEHI, WATR, WDPR, WHEA, WOOD, WOOL } /// railtypetable // Список меток типов рельсов /* railtypetable { // автономная RLA1: [BAEN, SAEN, RAIL], RLA2: [BBEN, SBEN, RAIL], RLA3: [BCEN, SCEN, RAIL], // переменного тока ERA1: [BAEA, SAEA, ELRL], ERA2: [BBEA, SBEA, ELRL], ERA3: [BCEA, SCEA, ELRL], // постоянного тока ERD1: [BAED, SAED, ELRL], ERD2: [BBED, SBED, ELRL], ERD3: [BCED, SCED, ELRL], // двусистемная ER2S: [BBEE, SBEE, ELRL], RAIL, ELRL, BAEN, SAEN, BBEN, SBEN, BCEN, SCEN, BAEA, SAEA, BBEA, SBEA, BCEA, SCEA, BAED, SAED, BBED, SBED, BCED, SCED, BBEE, SBEE } */ /* railtypetable { // автономная RLA1: [BAEN, SAEN, RAIL], // переменного тока ERA1: [BAEA, BAEE, SAEA, SAEE, ELRL], // постоянного тока ERD1: [BAED, BAEE, SAED, DAEE, ELRL], // двусистемная ER2S: [BAEE, SAEE, ELRL] } */ railtypetable { RAIL, ELRL, // автономная RLA1, RLA2, RLA3, // переменного тока ERA1, ERA2, ERA3, // постоянного тока ERD1, ERD2, ERD3, // двусистемная ER2S } /// definition // Используем полноразмерные поезда в депо train_width_32_px = 1; // Вертикаль поезда в депо traininfo_y_offset = 3; // Период, в который поезд считается новым (гарантийным) и не допускает депошного творчества new_train_age = 5; // Истечение срока retire_early_default = -8; delta_age = 1; // RE // модель // вычитаем 2 года из года ввода ТС, для прицепных и немоторных вагонов // вычитаем 2 года из года ввода ТС, для головных вагонов и локомотивов // максимальная скорость // рисуем [не] на карте? // рисуем в депо // Не построен // Построен // ТС по [-]смещению в цепочке [не] скрыто? // Для получения характеристик предыдущего ПС в цепочке // для записи смещения в регистр (работа с переменной 0x61) // Для краткой записи списка климатов ПС // Для выбора правильного набора спрайтов в случае флага TRAIN_FLAG_FLIP // или CB_RESULT_REVERSED_VEHICLE // Порог скорости электровозов // x км/ч * 0.2778 == value // 50 км/ч --> 13 (13.89) // 62 км/ч --> 17 (17.2236) //threshold of speed // обобщение свойств для категорий ПС // сокращение для отключения визуальных эффектов тяги и тяги вагонов // визуальные эффекты для электротяги // визуальные эффекты для дизельной тяги // визуальные эффекты для паровой тяги // поправка для функции мощности (power cb) // задаваемое в свойстве отличается от возвращаемого функцией // Получаем оштрафованную величину скорости, 15% // Флаг штрафа поезда по скорости // обычные рельсы в зависимости от настроек // рельсы для постоянного и переменного тока в зависимости от настроек // для двусистемных // Штрафуем ли по скорости // Вычисляем ТУ по формуле (табличное_значение/масса/9.8) // ТУ для cb tractive_effort_coefficient /// graphics definition // Определение спрайта меню покупки // 1-осекционный электровоз с 2 пантографами // 2-хсекционный электровоз с 2 пантографами // 2-хсекционный электровоз с 1 пантографом // 2-хсекционный электровоз без пантографа // Для всех ЭМВПС если голова неверная, то тяги нет по определению - проверка неверной головы не предполагается // МВПС 2 головных без отдельного реверса (промежуточные головные) // МВПС 2 головных с отдельным реверсом (промежуточные головные) // МВПС 3 головных без отдельного реверса // МВПС 4 головных без отдельного реверса (Промежуточные головы) // МВПС 2 мотоных без отдельного реверса (двусистемные МВПС) (погрузка не производится) // МВПС 2 мотоных с отдельным реверсом (двусистемные МВПС) (погрузка не производится) // МВПС 3 мотоных без отдельного реверса // МВПС 3 мотоных с отдельным реверсом // МВПС 4 мотоных без отдельного реверса (двусистемные МВПС) // МВПС 4 мотоных с отдельным реверсом (двусистемные МВПС) // МВПС 1 немоторных без отдельного реверса (погрузка не производится) // МВПС 2 немоторных с отдельным реверсом // Вагоны пассажирские. 2 вида (погрузка/в пути) и отдельный вид последнего вагона // Полувагоны, платформы. // шаблон пустого вагона // шаблон груза, 2 ливреи, 3 вида загруженности // 25-49%, 50-74%, полный // шаблон груза, 2 ливреи, 3 вида загруженности // 25-49%, 50-74%, полный // шаблон груза, 3 вида загруженности // шаблон груза, 3 вида загруженности. Модифицированный // шаблон груза, 2 вида загруженности // шаблон груза, 2 вида загруженности 2 // шаблон груза, 1 вид загруженности // шаблон пустого крытого вагона // шаблон: движение/100%, 30%, 60%, 90% // шаблон вагона рефсекции. Рефсекция обращается только целиком, bitmask(TRIGGER_VEHICLE_SERVICE) не является частью шаблона // шаблон цистерны /// code definition // Выбор ориентации кабины секции для СМЕ (схема без альтернатив в СМЕ) // Выбор ориентации кабины секции для СМЕ (схема с 1 альтернативой) // Выбор ориентации кабины секции для СМЕ (схема без альтернатив и средней секцией) // Выбор ориентации кабины секции для СМЕ (схема с 1 альтернативой и средней секцией) // Выбор ориентации кабины секции для СМЕ (схема без альтернатив и 2-я средними секциями) // Выбор ориентации кабины секции для СМЕ (схема с 1 альтернативой и 2-я средними секциями) // Определение пенальти на скорость (схема без СМЕ) // Определение пенальти на скорость (схема без альтернатив в СМЕ) // Определение пенальти на скорость (схема c 1 альтернативой в СМЕ) // Определение пенальти на скорость (схема c 2 альтернативами в СМЕ) // Определение пенальти на скорость (схема c 3 альтернативами в СМЕ) // Определение пенальти на скорость (схема c 4 альтернативами в СМЕ) // Определение пенальти на скорость (схема c 5 альтернативами в СМЕ) // Определение пенальти на скорость (схема c 6 альтернативами в СМЕ) // Определение скорости без вариантов // Определение скорости с изменением в заданный год // Определение скорости с изменением по году постройки // Определение скорости с изменением по году постройки и в заданном году // Определение скорости с изменением в 2 заданных года // Определение скорости со снижением для старых // Определение скорости со снижением для старых и изменением скорости по году постройки // Определение скорости со снижением для старых и с предсерийной моделью // определение расхода топлива // расход определяется граничным на разгоне, торможении, подъёме, спуске. // в оставшемся случае расходуется часть, пропорциональная доли массы от общей доли в массе // (общая масса на долю мощности в общей мощности) // return (rc_max * (((LOAD_TEMP(6) + 500) * power / LOAD_TEMP(5)) / weight)); } // передеать так, что если в гору скорость свыше 90%, то значит мощи хватает и считать обычным образом. // не выпускать новые тройники без средней секции // не выпускать новые двойки с средней секцией // Если рисуем на карте и следующий в цепочке вагон скрыт, то отдаём пустышку // пляски с 0x9C и 0x9A для паровозов, чтобы клёса крутились в зависимости от положения, а не от времени. // Регистр 5 и 6 занимаем под ЭМВПС // long vehicle template // short vehicle template // special vehicle template // /// code definition - mu // Шаблон расчёта конфигурации ЭМВПС // Шаблон расчёта ориентации ЭМВПС // шаблон ориентации // /// template // покупка template new_purchase_template(x, y) { [x, y, 100, 18, -40, -11] } template new_purchase_template_noico(x, y) { [x+18, y, 82, 18, -40, -11] } // невидимка template dummy_template(x, y) { [x, y, 1, 1, 0, 0] } // Шаблон 3 (size 3) ** // обычный template s3_template(x, y, shift) { [x, y, 7, 30, -2, -30-2*shift] [x+16, y, 11, 27, -4+2*shift, -22-shift] [x+32, y, 12, 20, 4+4*shift, -16] //dy-1 [x+64, y, 11, 27, 5+2*shift, -18+shift] [x+80, y, 7, 30, -2, -22+2*shift] [x+96, y, 11, 27, -14-2*shift, -17+shift] [x+112, y, 12, 20, -16-4*shift, -16] //dy-1 [x+144, y, 11, 27, -5-2*shift, -23-shift] } template s3_r_template(x, y, shift) { [x+80, y, 7, 30, -2, -30-2*shift] [x+96, y, 11, 27, -4+2*shift, -22-shift] [x+112, y, 12, 20, 4+4*shift, -16] //dy-1 [x+144, y, 11, 27, 5+2*shift, -18+shift] [x, y, 7, 30, -2, -22+2*shift] [x+16, y, 11, 27, -14-2*shift, -17+shift] [x+32, y, 12, 20, -16-4*shift, -16] //dy-1 [x+64, y, 11, 27, -5-2*shift, -23-shift] } // покупка (вид 7) template s3_purchase_template(x, y, shift) { [x+112, y, 12, 20, -16+shift, -16] } // Шаблон 4 (size 4) ** // обычный template s4_template(x, y, shift) { [x, y, 7, 32, -2, -30-2*shift] [x+16, y, 13, 28, -6+2*shift, -22-shift] [x+48, y, 16, 20, 0+4*shift, -16] //dy-1 [x+80, y, 13, 28, 3+2*shift, -19+shift] [x+112, y, 7, 32, -2, -24+2*shift] [x+128, y, 13, 28, -14-2*shift, -18+shift] [x+160, y, 16, 20, -16-4*shift, -16] //dy-1 [x+192, y, 13, 28, -5-2*shift, -23-shift] } template s4_r_template(x, y, shift) { [x+112, y, 7, 32, -2, -30-2*shift] [x+128, y, 13, 28, -6+2*shift, -22-shift] [x+160, y, 16, 20, 0+4*shift, -16] //dy-1 [x+192, y, 13, 28, 3+2*shift, -19+shift] [x, y, 7, 32, -2, -24+2*shift] [x+16, y, 13, 28, -14-2*shift, -18+shift] [x+48, y, 16, 20, -16-4*shift, -16] //dy-1 [x+80, y, 13, 28, -5-2*shift, -23-shift] } // покупка (вид 7) template s4_purchase_template(x, y, shift) { [x+160, y, 16, 20, -16+shift, -16] } // Шаблон 5 (size 5) ** // обычный template s5_template(x, y, shift) { [x, y, 7, 34, -2, -30-2*shift] [x+16, y, 15, 29, -8+2*shift, -22-shift] [x+48, y, 20, 20, -4+4*shift, -16] //dy-1 14-->15 [x+80, y, 15, 29, 1+2*shift, -20+shift] [x+112, y, 7, 34, -2, -24+2*shift] [x+128, y, 15, 29, -14-2*shift, -19+shift] [x+160, y, 20, 20, -16-4*shift, -16] //dy-1 14-->15 [x+192, y, 15, 29, -5-2*shift, -23-shift] } template s5_r_template(x, y, shift) { [x+112, y, 7, 34, -2, -30-2*shift] [x+128, y, 15, 29, -8+2*shift, -22-shift] [x+160, y, 20, 20, -4+4*shift, -16] //dy-1 14-->15 [x+192, y, 15, 29, 1+2*shift, -20+shift] [x, y, 7, 34, -2, -24+2*shift] [x+16, y, 15, 29, -14-2*shift, -19+shift] [x+48, y, 20, 20, -16-4*shift, -16] //dy-1 14-->15 [x+80, y, 15, 29, -5-2*shift, -23-shift] } // покупка (вид 7) template s5_purchase_template(x, y, shift) { [x+160, y, 20, 20, -16+shift, -16] } // Шаблон 6 (size 6) ** // обычный template s6_template(x, y, shift) { [x, y, 7, 38, -2, -32-2*shift] [x+16, y, 17, 30, -10+2*shift, -22-shift] [x+48, y, 24, 20, -8+4*shift, -16] //dy-1 14-->15 [x+80, y, 17, 30, -1+2*shift, -21+shift] [x+112, y, 7, 38, -2, -28+2*shift] [x+128, y, 17, 30, -14-2*shift, -20+shift] [x+160, y, 24, 20, -16-4*shift, -16] //dy-1 14-->15 [x+192, y, 17, 30, -5-2*shift, -23-shift] } template s6_r_template(x, y, shift) { [x+112, y, 7, 38, -2, -32-2*shift] [x+128, y, 17, 30, -10+2*shift, -22-shift] [x+160, y, 24, 20, -8+4*shift, -16] //dy-1 14-->15 [x+192, y, 17, 30, -1+2*shift, -21+shift] [x, y, 7, 38, -2, -28+2*shift] [x+16, y, 17, 30, -14-2*shift, -20+shift] [x+48, y, 24, 20, -16-4*shift, -16] //dy-1 14-->15 [x+80, y, 17, 30, -5-2*shift, -23-shift] } // покупка (вид 7) template s6_purchase_template(x, y, shift) { [x+160, y, 24, 20, -16+shift, -16] } // Шаблон 7 (size 7) ** // обычный template s7_template(x, y, shift) { [x, y, 7, 39, -2, -31-2*shift] [x+16, y, 19, 31, -12+2*shift, -22-shift] [x+48, y, 28, 20, -12+4*shift, -16] //dy-1 14-->15 [x+96, y, 19, 31, -3+2*shift, -22+shift] [x+128, y, 7, 39, -2, -29+2*shift] [x+144, y, 19, 31, -14-2*shift, -21+shift] [x+176, y, 28, 20, -16-4*shift, -16] //dy-1 14-->15 [x+224, y, 19, 31, -5-2*shift, -23-shift] } template s7_r_template(x, y, shift) { [x+128, y, 7, 39, -2, -31-2*shift] [x+144, y, 19, 31, -12+2*shift, -22-shift] [x+176, y, 28, 20, -12+4*shift, -16] //dy-1 14-->15 [x+224, y, 19, 31, -3+2*shift, -22+shift] [x, y, 7, 39, -2, -29+2*shift] [x+16, y, 19, 31, -14-2*shift, -21+shift] [x+48, y, 28, 20, -16-4*shift, -16] //dy-1 14-->15 [x+96, y, 19, 31, -5-2*shift, -23-shift] } // покупка (вид 7) template s7_purchase_template(x, y, shift) { [x+176, y, 28, 20, -16+shift, -16] } // Шаблон 8 (size 8) ** // обычный template s8_template(x, y, shift) { [x, y, 12, 31, -5, -18] [x+32, y, 22, 23, -14, -13] [x+64, y, 32, 17, -16, -13] [x+112, y, 22, 23, -6, -14] [x+144, y, 12, 31, -5, -18] [x+176, y, 22, 23, -14, -13] [x+208, y, 32, 17, -16, -13] [x+256, y, 22, 23, -6, -14] } template s8_r_template(x, y, shift) { [x+144, y, 12, 31, -5, -18] [x+176, y, 22, 23, -14, -13] [x+208, y, 32, 17, -16, -13] [x+256, y, 22, 23, -6, -14] [x, y, 12, 31, -5, -18] [x+32, y, 22, 23, -14, -13] [x+64, y, 32, 17, -16, -13] [x+112, y, 22, 23, -6, -14] } // покупка (вид 7) template s8_purchase_template(x, y, shift) { [x+208, y, 32, 17, -16+shift, -13] } // Шаблон 9 (size 9) ** // обычный template s9_template(x, y, shift) { [x, y, 12, 62, -5, -18] [x+32, y, 42, 42, -34, -13] [x+80, y, 64, 17, -48, -13] [x+160, y, 42, 43, -26, -34] [x+208, y, 12, 62, -5, -49] [x+240, y, 42, 43, -14, -33] [x+288, y, 64, 17, -16, -13] [x+368, y, 42, 42, -6, -14] } // специальный template s9vl11_template(x, y, shift) { [x, y, 12, 62, -5, -18] [x+32, y, 42, 42, -34, -13] [x+80, y, 64, 17, -48, -13] [x+160, y, 43, 43, -26, -34] [x+208, y, 12, 62, -5, -49] [x+239, y, 43, 43, -14, -33] [x+288, y, 64, 17, -16, -13] [x+368, y, 42, 42, -6, -14] } // покупка (вид 7) template s9_purchase_template(x, y, shift) { [x+288, y, 64, 17, -16+shift, -13] } template s9_r_template(x, y, shift) { [x+208, y, 12, 62, -5 , -49+2] [x+240, y, 42, 43, -14-2, -33+1] [x+288, y, 64, 17, -16-4, -13 ] [x+368, y, 42, 42, -6-2, -14-1] [x, y, 12, 62, -5 , -18-2] [x+32, y, 42, 42, -34+2, -13-1] [x+80, y, 64, 17, -48+4, -13 ] [x+160, y, 42, 43, -26+2, -34+1] } // Шаблон 10 (size 10) ** // обычный template s10_template(x, y, shift) { [x, y, 12, 62, -5, -18] [x+32, y, 42, 42, -34, -13] [x+80, y, 64, 17, -48, -13] [x+160, y, 42, 43, -26, -34] [x+208, y, 12, 62, -5, -49] [x+240, y, 42, 43, -14, -33] [x+288, y, 64, 17, -16, -13] [x+368, y, 42, 42, -6, -14] } template s10_r_template(x, y, shift) { [x+208, y, 12, 62, -5 , -49+4] [x+240, y, 42, 43, -14-4, -33+2] [x+288, y, 64, 17, -16-8, -13 ] [x+368, y, 42, 42, -6-4, -14-2] [x, y, 12, 62, -5 , -18-4] [x+32, y, 42, 42, -34+4, -13-2] [x+80, y, 64, 17, -48+8, -13 ] [x+160, y, 42, 43, -26+4, -34+2] } // покупка (вид 7) template s10_purchase_template(x, y, shift) { [x+288, y, 64, 17, -16+shift, -13] } // Шаблон 11 (size 11) ** // обычный template s11_template(x, y, shift) { [x, y, 12, 62, -5, -18] [x+32, y, 42, 42, -34, -13] [x+80, y, 64, 17, -48, -13] [x+160, y, 42, 43, -26, -34] [x+208, y, 12, 62, -5, -49] [x+240, y, 42, 43, -14, -33] [x+288, y, 64, 17, -16, -13] [x+368, y, 42, 42, -6, -14] } template s11_r_template(x, y, shift) { [x+208, y, 12, 62, -5 , -49+6] [x+240, y, 42, 43, -14 -6, -33+3] [x+288, y, 64, 17, -16-12, -13 ] [x+368, y, 42, 42, -6 -6, -14-3] [x, y, 12, 62, -5 , -18-6] [x+32, y, 42, 42, -34 +6, -13-3] [x+80, y, 64, 17, -48+12, -13 ] [x+160, y, 42, 43, -26 +6, -34+3] } // покупка (вид 7) template s11_purchase_template(x, y, shift) { [x+288, y, 64, 17, -16+shift, -13] } // для ЧС2т template s11ch_template(x, y, shift) { [x, y, 12, 62, -5, -18] [x+32, y, 42, 42, -34, -13] [x+80, y, 64, 17, -48, -13] [x+160, y, 43, 43, -26, -34] [x+208, y, 12, 62, -5, -49] [x+239, y, 43, 43, -16, -33] [x+288, y, 64, 17, -16, -13] [x+368, y, 42, 42, -6, -14] } // Шаблон 12 (size 12) ** // обычный template s12_template(x, y, shift) { [x, y, 12, 62, -5, -18] [x+32, y, 42, 42, -34, -13] [x+80, y, 64, 17, -48, -13] [x+160, y, 42, 43, -26, -34] [x+208, y, 12, 62, -5, -49] [x+240, y, 42, 43, -14, -33] [x+288, y, 64, 17, -16, -13] [x+368, y, 42, 42, -6, -14] } template s12_r_template(x, y, shift) { [x+208, y, 12, 62, -5 , -49+8] [x+240, y, 42, 43, -14 -8, -33+4] [x+288, y, 64, 17, -16-16, -13 ] [x+368, y, 42, 42, -6 -8, -14-4] [x, y, 12, 62, -5 , -18-8] [x+32, y, 42, 42, -34 +8, -13-4] [x+80, y, 64, 17, -48+16, -13 ] [x+160, y, 42, 43, -26 +8, -34+4] } // версия для UI в депо (только вид 7) template s12ui1_template(x, y, shift) { [x, y, 64, 17, -16-4*shift, -13] } // покупка (вид 7) template s12_purchase_template(x, y, shift) { [x+288, y, 64, 17, -16+shift, -13] } // для ЧС4т template s12ch_template(x, y, shift) { [x, y, 12, 62, -5, -18] [x+32, y, 42, 42, -34, -13] [x+80, y, 64, 17, -48, -13] [x+160, y, 43, 43, -26, -34] [x+208, y, 12, 62, -5, -49] [x+239, y, 43, 43, -16, -33] [x+288, y, 64, 17, -16, -13] [x+368, y, 42, 42, -6, -14] } // Шаблон 13 (size 13) ** // обычный template s13_template(x, y, shift) { [x, y, 12, 62, -5, -18] [x+32, y, 42, 42, -34, -13] [x+80, y, 64, 17, -48, -13] [x+160, y, 42, 43, -26, -34] [x+208, y, 12, 62, -5, -49] [x+240, y, 42, 43, -14, -33] [x+288, y, 64, 17, -16, -13] [x+368, y, 42, 42, -6, -14] } template s13_r_template(x, y, shift) { [x+208, y, 12, 62, -5 , -49+10] [x+240, y, 42, 43, -14-10, -33 +5] [x+288, y, 64, 17, -16-20, -13 ] [x+368, y, 42, 42, -6-10, -14 -5] [x, y, 12, 62, -5 , -18-10] [x+32, y, 42, 42, -34+10, -13 -5] [x+80, y, 64, 17, -48+20, -13 ] [x+160, y, 42, 43, -26+10, -34 +5] } // покупка (вид 7) template s13_purchase_template(x, y, shift) { [x+288, y, 64, 17, -16+shift, -13] } // версия для UI в депо (только вид 7) template s13ui1_template(x, y, shift) { [x, y, 64, 17, -16-4*shift, -13] } // Шаблон 14 (size 14) ** // обычный template s14_template(x, y, shift) { [x, y, 12, 62, -5, -18] [x+32, y, 42, 42, -34, -13] [x+80, y, 64, 17, -48, -13] [x+160, y, 42, 43, -26, -34] [x+208, y, 12, 62, -5, -49] [x+240, y, 42, 43, -14, -33] [x+288, y, 64, 17, -16, -13] [x+368, y, 42, 42, -6, -14] } template s14_r_template(x, y, shift) { [x+208, y, 12, 62, -5 , -49+12] [x+240, y, 42, 43, -14-12, -33 +6] [x+288, y, 64, 17, -16-24, -13 ] [x+368, y, 42, 42, -6-12, -14 -6] [x, y, 12, 62, -5 , -18-12] [x+32, y, 42, 42, -34+12, -13 -6] [x+80, y, 64, 17, -48+24, -13 ] [x+160, y, 42, 43, -26+12, -34 +6] } // покупка (вид 7) template s14_purchase_template(x, y, shift) { [x+288, y, 64, 17, -16+shift, -13] } // Шаблон 15 (size 15) ** // обычный template s15_template(x, y, shift) { [x, y, 12, 62, -5, -18] [x+32, y, 42, 42, -34, -13] [x+80, y, 64, 17, -48, -13] [x+160, y, 42, 43, -26, -34] [x+208, y, 12, 62, -5, -49] [x+240, y, 42, 43, -14, -33] [x+288, y, 64, 17, -16, -13] [x+368, y, 42, 42, -6, -14] } template s15_r_template(x, y, shift) { [x+208, y, 12, 62, -5 , -49+14] [x+240, y, 42, 43, -14-14, -33 +7] [x+288, y, 64, 17, -16-28, -13 ] [x+368, y, 42, 42, -6-14, -14 -7] [x, y, 12, 62, -5 , -18-14] [x+32, y, 42, 42, -34+14, -13 -7] [x+80, y, 64, 17, -48+28, -13 ] [x+160, y, 42, 43, -26+14, -34 +7] } // покупка (вид 7) template s15_purchase_template(x, y, shift) { [x+288, y, 64, 17, -16+shift, -13] } // версия для UI в депо (только вид 7) template s15ui1_template(x, y, shift) { [x, y, 64, 17, -16-4*shift, -13] } // Шаблон 16 (size 16) ** // обычный template s16_template(x, y, shift) { [x, y, 12, 62, -5, -18] [x+32, y, 42, 42, -34, -13] [x+80, y, 64, 17, -48, -13] [x+160, y, 42, 43, -26, -34] [x+208, y, 12, 62, -5, -49] [x+240, y, 42, 43, -14, -33] [x+288, y, 64, 17, -16, -13] [x+368, y, 42, 42, -6, -14] } template s16_r_template(x, y, shift) { [x+208, y, 12, 62, -5 , -49+16] [x+240, y, 42, 43, -14-16, -33 +8] [x+288, y, 64, 17, -16-32, -13 ] [x+368, y, 42, 42, -6-16, -14 -8] [x, y, 12, 62, -5 , -18-16] [x+32, y, 42, 42, -34+16, -13 -8] [x+80, y, 64, 17, -48+32, -13 ] [x+160, y, 42, 43, -26+16, -34 +8] } // покупка (вид 7) template s16_purchase_template(x, y, shift) { [x+288, y, 64, 17, -16+shift, -13] } // Шаблон 17 (size 17) ** // обычный template s17_template(x, y, shift) { [x, y, 12, 62, -5, -18] [x+32, y, 42, 42, -34, -13] [x+80, y, 68, 17, -52, -13] [x+160, y, 42, 43, -26, -34] [x+208, y, 12, 62, -5, -49] [x+240, y, 42, 43, -14, -33] [x+288, y, 68, 17, -16, -13] [x+368, y, 42, 42, -6, -14] } template s17_r_template(x, y, shift) { [x+208, y, 12, 62, -5 , -49+18] [x+240, y, 42, 43, -14-18, -33 +9] [x+288, y, 68, 17, -16-36, -13 ] [x+368, y, 42, 42, -6-18, -14 -9] [x, y, 12, 62, -5 , -18-18] [x+32, y, 42, 42, -34+18, -13 -9] [x+80, y, 68, 17, -52+36, -13 ] [x+160, y, 42, 43, -26+18, -34 +9] } // покупка (вид 7) template s17_purchase_template(x, y, shift) { [x+288, y, 68, 17, -16+shift, -13] } /// action // --- ограничение скорости по окончанию установленного срока службы --- // ограничиваем скорость через 20 лет работы 120 --> 110 switch (FEAT_TRAINS, SELF, speed_after20_120to110, age_in_days >= (20*365+5)) { 1: return 110; return 120; } // ограничиваем скорость через 20 лет работы 120 --> 100 switch (FEAT_TRAINS, SELF, speed_after20_120to100, age_in_days >= (20*365+5)) { 1: return 100; return 120; } // ограничиваем скорость через 25 лет работы 120 --> 110 switch (FEAT_TRAINS, SELF, speed_after25_120to110, age_in_days >= (25*365+5)) { 1: return 110; return 120; } // ограничиваем скорость через 25 лет работы 120 --> 100 switch (FEAT_TRAINS, SELF, speed_after25_120to100, age_in_days >= (25*365+5)) { 1: return 100; return 120; } // ограничиваем скорость через 30 лет работы 130 --> 110 switch (FEAT_TRAINS, SELF, speed_after30_130to110, age_in_days >= (30*365+8)) { 1: return 110; return 130; } // ограничиваем скорость через 30 лет работы 130 --> 100 switch (FEAT_TRAINS, SELF, speed_after30_130to100, age_in_days >= (30*365+8)) { 1: return 100; return 130; } // невидимый вагон размером 1 switch (FEAT_TRAINS, SELF, articulated_part_dummy1, extra_callback_info1) { 1: return dummy1; return CB_RESULT_NO_MORE_ARTICULATED_PARTS; } // невидимый вагон размером 2 switch (FEAT_TRAINS, SELF, articulated_part_dummy2, extra_callback_info1) { 1: return dummy2; return CB_RESULT_NO_MORE_ARTICULATED_PARTS; } // невидимый вагон размером 3 switch (FEAT_TRAINS, SELF, articulated_part_dummy3, extra_callback_info1) { 1: return dummy3; return CB_RESULT_NO_MORE_ARTICULATED_PARTS; } // невидимый вагон размером 4 switch (FEAT_TRAINS, SELF, articulated_part_dummy4, extra_callback_info1) { 1: return dummy4; return CB_RESULT_NO_MORE_ARTICULATED_PARTS; } // невидимый вагон размером 5 switch (FEAT_TRAINS, SELF, articulated_part_dummy5, extra_callback_info1) { 1: return dummy5; return CB_RESULT_NO_MORE_ARTICULATED_PARTS; } // невидимый вагон размером 6 switch (FEAT_TRAINS, SELF, articulated_part_dummy6, extra_callback_info1) { 1: return dummy6; return CB_RESULT_NO_MORE_ARTICULATED_PARTS; } // невидимый вагон размером 7 switch (FEAT_TRAINS, SELF, articulated_part_dummy7, extra_callback_info1) { 1: return dummy7; return CB_RESULT_NO_MORE_ARTICULATED_PARTS; } // невидимый вагон размером 8 switch (FEAT_TRAINS, SELF, articulated_part_dummy8, extra_callback_info1) { 1: return dummy8; return CB_RESULT_NO_MORE_ARTICULATED_PARTS; } // тендер switch (FEAT_TRAINS, SELF, articulated_part_tender, extra_callback_info1) { 1: return unitb; return CB_RESULT_NO_MORE_ARTICULATED_PARTS; } // модельки /// dummy // Спрайт из одного прозрачного пикселя spriteset (dummy_sprites, "src/dummy/empty.png") { dummy_template(0, 0) } // Шаблон для dummy, задаём разный length // Определение dummy item (FEAT_TRAINS, dummy1) { property { climates_available: NO_CLIMATE; sprite_id: SPRITE_ID_NEW_TRAIN; misc_flags: bitmask(TRAIN_FLAG_TILT); model_life: VEHICLE_NEVER_EXPIRES; visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER); track_type: enable_our_own_tracks ? RLA1 : RAIL; length: 1; } graphics { default: dummy_sprites; } } item (FEAT_TRAINS, dummy2) { property { climates_available: NO_CLIMATE; sprite_id: SPRITE_ID_NEW_TRAIN; misc_flags: bitmask(TRAIN_FLAG_TILT); model_life: VEHICLE_NEVER_EXPIRES; visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER); track_type: enable_our_own_tracks ? RLA1 : RAIL; length: 2; } graphics { default: dummy_sprites; } } item (FEAT_TRAINS, dummy3) { property { climates_available: NO_CLIMATE; sprite_id: SPRITE_ID_NEW_TRAIN; misc_flags: bitmask(TRAIN_FLAG_TILT); model_life: VEHICLE_NEVER_EXPIRES; visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER); track_type: enable_our_own_tracks ? RLA1 : RAIL; length: 3; } graphics { default: dummy_sprites; } } item (FEAT_TRAINS, dummy4) { property { climates_available: NO_CLIMATE; sprite_id: SPRITE_ID_NEW_TRAIN; misc_flags: bitmask(TRAIN_FLAG_TILT); model_life: VEHICLE_NEVER_EXPIRES; visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER); track_type: enable_our_own_tracks ? RLA1 : RAIL; length: 4; } graphics { default: dummy_sprites; } } item (FEAT_TRAINS, dummy5) { property { climates_available: NO_CLIMATE; sprite_id: SPRITE_ID_NEW_TRAIN; misc_flags: bitmask(TRAIN_FLAG_TILT); model_life: VEHICLE_NEVER_EXPIRES; visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER); track_type: enable_our_own_tracks ? RLA1 : RAIL; length: 5; } graphics { default: dummy_sprites; } } item (FEAT_TRAINS, dummy6) { property { climates_available: NO_CLIMATE; sprite_id: SPRITE_ID_NEW_TRAIN; misc_flags: bitmask(TRAIN_FLAG_TILT); model_life: VEHICLE_NEVER_EXPIRES; visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER); track_type: enable_our_own_tracks ? RLA1 : RAIL; length: 6; } graphics { default: dummy_sprites; } } item (FEAT_TRAINS, dummy7) { property { climates_available: NO_CLIMATE; sprite_id: SPRITE_ID_NEW_TRAIN; misc_flags: bitmask(TRAIN_FLAG_TILT); model_life: VEHICLE_NEVER_EXPIRES; visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER); track_type: enable_our_own_tracks ? RLA1 : RAIL; length: 7; } graphics { default: dummy_sprites; } } item (FEAT_TRAINS, dummy8) { property { climates_available: NO_CLIMATE; sprite_id: SPRITE_ID_NEW_TRAIN; misc_flags: bitmask(TRAIN_FLAG_TILT); model_life: VEHICLE_NEVER_EXPIRES; visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER); track_type: enable_our_own_tracks ? RLA1 : RAIL; length: 8; } graphics { default: dummy_sprites; } } /// unit // Шаблон для индивидуализации элементов многоэлементных локомотивов: // тендеров паровозов, вагонов в составе секций emu/dmu, // там, где можно использовать livery_override. // Буква в имени определяет положение элемента по порядку от локомотива (a). /// Определение элементов // Первая позиция: паровозы, emu, dmu item (FEAT_TRAINS, unitb) { property { climates_available: NO_CLIMATE; sprite_id: SPRITE_ID_NEW_TRAIN; misc_flags: bitmask(TRAIN_FLAG_TILT); model_life: VEHICLE_NEVER_EXPIRES; visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER); track_type: enable_our_own_tracks ? RLA1 : RAIL; length: 8; } graphics { default: dummy_sprites; } } // Вторая позиция: emu, dmu item (FEAT_TRAINS, unitc) { property { climates_available: NO_CLIMATE; sprite_id: SPRITE_ID_NEW_TRAIN; misc_flags: bitmask(TRAIN_FLAG_TILT); model_life: VEHICLE_NEVER_EXPIRES; visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER); track_type: enable_our_own_tracks ? RLA1 : RAIL; length: 8; } graphics { default: dummy_sprites; } } // Третья позиция: emu, dmu item (FEAT_TRAINS, unitd) { property { climates_available: NO_CLIMATE; sprite_id: SPRITE_ID_NEW_TRAIN; misc_flags: bitmask(TRAIN_FLAG_TILT); model_life: VEHICLE_NEVER_EXPIRES; visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER); track_type: enable_our_own_tracks ? RLA1 : RAIL; length: 8; } graphics { default: dummy_sprites; } } /// align spriteset (align_3_purchase_sprites, "src/align/s3.png") { s3_purchase_template(0, 0, 10) } spriteset (align_3_sprites, "src/align/s3.png") { s3_template(0, 0, 0) } spriteset (align_3_flipped_sprites, "src/align/s3.png") { s3_template(0, 0, -5) } spriteset (align_4_purchase_sprites, "src/align/s4.png") { s4_purchase_template(0, 0, 8) } spriteset (align_4_sprites, "src/align/s4.png") { s4_template(0, 0, 0) } spriteset (align_4_flipped_sprites, "src/align/s4.png") { s4_template(0, 0, -4) } spriteset (align_5_purchase_sprites, "src/align/s5.png") { s5_purchase_template(0, 0, 6) } spriteset (align_5_sprites, "src/align/s5.png") { s5_template(0, 0, 0) } spriteset (align_5_flipped_sprites, "src/align/s5.png") { s5_template(0, 0, -3) } spriteset (align_6_purchase_sprites, "src/align/s6.png") { s6_purchase_template(0, 0, 4) } spriteset (align_6_sprites, "src/align/s6.png") { s6_template(0, 0, 0) } spriteset (align_6_flipped_sprites, "src/align/s6.png") { s6_template(0, 0, -2) } spriteset (align_7_purchase_sprites, "src/align/s7.png") { s7_purchase_template(0, 0, 2) } spriteset (align_7_sprites, "src/align/s7.png") { s7_template(0, 0, 0) } spriteset (align_7_flipped_sprites, "src/align/s7.png") { s7_template(0, 0, -1) } spriteset (align_8_purchase_sprites, "src/align/s8.png") { s8_purchase_template(0, 0, 0) } spriteset (align_8_sprites, "src/align/s8.png") { s8_template(0, 0, 0) } // no flip spriteset, use the same spriteset (align_8_flipped_sprites, "src/align/s8.png") { s8_template(0, 0, 0) } spriteset (align_9_purchase_sprites, "src/align/s9.png") { s9_purchase_template(0, 0, -2) } spriteset (align_9_sprites, "src/align/s9.png") { s9_template(0, 0, 0) } spriteset (align_9_flipped_sprites, "src/align/s9.png") { s9_template(0, 0, 1) } spriteset (align_10_purchase_sprites, "src/align/s10.png") { s10_purchase_template(0, 0, -4) } spriteset (align_10_sprites, "src/align/s10.png") { s10_template(0, 0, 0) } spriteset (align_10_flipped_sprites, "src/align/s10.png") { s10_template(0, 0, 2) } spriteset (align_11_purchase_sprites, "src/align/s11.png") { s11_purchase_template(0, 0, -6) } spriteset (align_11_sprites, "src/align/s11.png") { s11_template(0, 0, 0) } spriteset (align_11_flipped_sprites, "src/align/s11.png") { s11_template(0, 0, 3) } spriteset (align_12_purchase_sprites, "src/align/s12.png") { s12_purchase_template(0, 0, -8) } spriteset (align_12_sprites, "src/align/s12.png") { s12_template(0, 0, 0) } spriteset (align_12_flipped_sprites, "src/align/s12.png") { s12_template(0, 0, 4) } spriteset (align_13_purchase_sprites, "src/align/s13.png") { s13_purchase_template(0, 0, -10) } spriteset (align_13_sprites, "src/align/s13.png") { s13_template(0, 0, 0) } spriteset (align_13_flipped_sprites, "src/align/s13.png") { s13_template(0, 0, 5) } spriteset (align_14_purchase_sprites, "src/align/s14.png") { s14_purchase_template(0, 0, -12) } spriteset (align_14_sprites, "src/align/s14.png") { s14_template(0, 0, 0) } spriteset (align_14_flipped_sprites, "src/align/s14.png") { s14_template(0, 0, 6) } spriteset (align_15_purchase_sprites, "src/align/s15.png") { s15_purchase_template(0, 0, -14) } spriteset (align_15_sprites, "src/align/s15.png") { s15_template(0, 0, 0) } spriteset (align_15_flipped_sprites, "src/align/s15.png") { s15_template(0, 0, 7) } spriteset (align_16_purchase_sprites, "src/align/s16.png") { s16_purchase_template(0, 0, -16) } spriteset (align_16_sprites, "src/align/s16.png") { s16_template(0, 0, 0) } spriteset (align_16_flipped_sprites, "src/align/s16.png") { s16_template(0, 0, 8) } spriteset (align_17_purchase_sprites, "src/align/s17.png") { s17_purchase_template(0, 0, -18) } spriteset (align_17_sprites, "src/align/s17.png") { s17_template(0, 0, 0) } spriteset (align_17_flipped_sprites, "src/align/s17.png") { s17_template(0, 0, 9) } // Одинаковые свойства для всех размеров // Для размера 3-8 switch (FEAT_TRAINS, SELF, align3_sprites, (var[0xC8, 0, 0xFF] != 0xFD)) { 1: align_3_flipped_sprites; align_3_sprites; } item (FEAT_TRAINS, align3) { property { name: string(STR_ALIGN3_NAME); misc_flags: bitmask(TRAIN_FLAG_TILT, TRAIN_FLAG_FLIP); length: 3; climates_available: enable_debug_car ? bitmask(CLIMATE_TEMPERATE, CLIMATE_ARCTIC, CLIMATE_TROPICAL, CLIMATE_TOYLAND) : NO_CLIMATE; introduction_date: date(0, 1, 1); vehicle_life: 255; sprite_id: SPRITE_ID_NEW_TRAIN; misc_flags: bitmask(TRAIN_FLAG_TILT); model_life: VEHICLE_NEVER_EXPIRES; loading_speed: 10; cost_factor: 1; running_cost_factor: 1; speed: 1 km/h; track_type: enable_our_own_tracks ? RLA1 : RAIL; power: 500 hpM; running_cost_base: RUNNING_COST_DIESEL; cargo_capacity: 10; weight: 25 ton; engine_class: ENGINE_CLASS_DIESEL; tractive_effort_coefficient: 0.11; visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER); } graphics { default: align3_sprites; purchase: align_3_purchase_sprites; additional_text: return string(STR_ALIGN_PURCHASE_HINT); } } switch (FEAT_TRAINS, SELF, align4_sprites, (var[0xC8, 0, 0xFF] != 0xFD)) { 1: align_4_flipped_sprites; align_4_sprites; } item (FEAT_TRAINS, align4) { property { name: string(STR_ALIGN4_NAME); misc_flags: bitmask(TRAIN_FLAG_TILT, TRAIN_FLAG_FLIP); length: 4; climates_available: enable_debug_car ? bitmask(CLIMATE_TEMPERATE, CLIMATE_ARCTIC, CLIMATE_TROPICAL, CLIMATE_TOYLAND) : NO_CLIMATE; introduction_date: date(0, 1, 1); vehicle_life: 255; sprite_id: SPRITE_ID_NEW_TRAIN; misc_flags: bitmask(TRAIN_FLAG_TILT); model_life: VEHICLE_NEVER_EXPIRES; loading_speed: 10; cost_factor: 1; running_cost_factor: 1; speed: 1 km/h; track_type: enable_our_own_tracks ? RLA1 : RAIL; power: 500 hpM; running_cost_base: RUNNING_COST_DIESEL; cargo_capacity: 10; weight: 25 ton; engine_class: ENGINE_CLASS_DIESEL; tractive_effort_coefficient: 0.11; visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER); } graphics { default: align4_sprites; purchase: align_4_purchase_sprites; additional_text: return string(STR_ALIGN_PURCHASE_HINT); } } switch (FEAT_TRAINS, SELF, align5_sprites, (var[0xC8, 0, 0xFF] != 0xFD)) { 1: align_5_flipped_sprites; align_5_sprites; } item (FEAT_TRAINS, align5) { property { name: string(STR_ALIGN5_NAME); misc_flags: bitmask(TRAIN_FLAG_TILT, TRAIN_FLAG_FLIP); length: 5; climates_available: enable_debug_car ? bitmask(CLIMATE_TEMPERATE, CLIMATE_ARCTIC, CLIMATE_TROPICAL, CLIMATE_TOYLAND) : NO_CLIMATE; introduction_date: date(0, 1, 1); vehicle_life: 255; sprite_id: SPRITE_ID_NEW_TRAIN; misc_flags: bitmask(TRAIN_FLAG_TILT); model_life: VEHICLE_NEVER_EXPIRES; loading_speed: 10; cost_factor: 1; running_cost_factor: 1; speed: 1 km/h; track_type: enable_our_own_tracks ? RLA1 : RAIL; power: 500 hpM; running_cost_base: RUNNING_COST_DIESEL; cargo_capacity: 10; weight: 25 ton; engine_class: ENGINE_CLASS_DIESEL; tractive_effort_coefficient: 0.11; visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER); } graphics { default: align5_sprites; purchase: align_5_purchase_sprites; additional_text: return string(STR_ALIGN_PURCHASE_HINT); } } switch (FEAT_TRAINS, SELF, align6_sprites, (var[0xC8, 0, 0xFF] != 0xFD)) { 1: align_6_flipped_sprites; align_6_sprites; } item (FEAT_TRAINS, align6) { property { name: string(STR_ALIGN6_NAME); misc_flags: bitmask(TRAIN_FLAG_TILT, TRAIN_FLAG_FLIP); length: 6; climates_available: enable_debug_car ? bitmask(CLIMATE_TEMPERATE, CLIMATE_ARCTIC, CLIMATE_TROPICAL, CLIMATE_TOYLAND) : NO_CLIMATE; introduction_date: date(0, 1, 1); vehicle_life: 255; sprite_id: SPRITE_ID_NEW_TRAIN; misc_flags: bitmask(TRAIN_FLAG_TILT); model_life: VEHICLE_NEVER_EXPIRES; loading_speed: 10; cost_factor: 1; running_cost_factor: 1; speed: 1 km/h; track_type: enable_our_own_tracks ? RLA1 : RAIL; power: 500 hpM; running_cost_base: RUNNING_COST_DIESEL; cargo_capacity: 10; weight: 25 ton; engine_class: ENGINE_CLASS_DIESEL; tractive_effort_coefficient: 0.11; visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER); } graphics { default: align6_sprites; purchase: align_6_purchase_sprites; additional_text: return string(STR_ALIGN_PURCHASE_HINT); } } switch (FEAT_TRAINS, SELF, align7_sprites, (var[0xC8, 0, 0xFF] != 0xFD)) { 1: align_7_flipped_sprites; align_7_sprites; } item (FEAT_TRAINS, align7) { property { name: string(STR_ALIGN7_NAME); misc_flags: bitmask(TRAIN_FLAG_TILT, TRAIN_FLAG_FLIP); length: 7; climates_available: enable_debug_car ? bitmask(CLIMATE_TEMPERATE, CLIMATE_ARCTIC, CLIMATE_TROPICAL, CLIMATE_TOYLAND) : NO_CLIMATE; introduction_date: date(0, 1, 1); vehicle_life: 255; sprite_id: SPRITE_ID_NEW_TRAIN; misc_flags: bitmask(TRAIN_FLAG_TILT); model_life: VEHICLE_NEVER_EXPIRES; loading_speed: 10; cost_factor: 1; running_cost_factor: 1; speed: 1 km/h; track_type: enable_our_own_tracks ? RLA1 : RAIL; power: 500 hpM; running_cost_base: RUNNING_COST_DIESEL; cargo_capacity: 10; weight: 25 ton; engine_class: ENGINE_CLASS_DIESEL; tractive_effort_coefficient: 0.11; visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER); } graphics { default: align7_sprites; purchase: align_7_purchase_sprites; additional_text: return string(STR_ALIGN_PURCHASE_HINT); } } switch (FEAT_TRAINS, SELF, align8_sprites, (var[0xC8, 0, 0xFF] != 0xFD)) { 1: align_8_flipped_sprites; align_8_sprites; } item (FEAT_TRAINS, align8) { property { name: string(STR_ALIGN8_NAME); misc_flags: bitmask(TRAIN_FLAG_TILT, TRAIN_FLAG_FLIP); length: 8; climates_available: enable_debug_car ? bitmask(CLIMATE_TEMPERATE, CLIMATE_ARCTIC, CLIMATE_TROPICAL, CLIMATE_TOYLAND) : NO_CLIMATE; introduction_date: date(0, 1, 1); vehicle_life: 255; sprite_id: SPRITE_ID_NEW_TRAIN; misc_flags: bitmask(TRAIN_FLAG_TILT); model_life: VEHICLE_NEVER_EXPIRES; loading_speed: 10; cost_factor: 1; running_cost_factor: 1; speed: 1 km/h; track_type: enable_our_own_tracks ? RLA1 : RAIL; power: 500 hpM; running_cost_base: RUNNING_COST_DIESEL; cargo_capacity: 10; weight: 25 ton; engine_class: ENGINE_CLASS_DIESEL; tractive_effort_coefficient: 0.11; visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER); } graphics { default: align8_sprites; purchase: align_8_purchase_sprites; additional_text: return string(STR_ALIGN_PURCHASE_HINT); } } // Для размера 9-16 switch (FEAT_TRAINS, SELF, align9_sprites, ((extra_callback_info1 & 0xFF) == 0) && (var[0x62, 7, 1, 1] != 0)) { 1: dummy_sprites; align_9_sprites; } item (FEAT_TRAINS, align9) { property { name: string(STR_ALIGN9_NAME); misc_flags: bitmask(TRAIN_FLAG_TILT, TRAIN_FLAG_MU); length: 1; climates_available: enable_debug_car ? bitmask(CLIMATE_TEMPERATE, CLIMATE_ARCTIC, CLIMATE_TROPICAL, CLIMATE_TOYLAND) : NO_CLIMATE; introduction_date: date(0, 1, 1); vehicle_life: 255; sprite_id: SPRITE_ID_NEW_TRAIN; misc_flags: bitmask(TRAIN_FLAG_TILT); model_life: VEHICLE_NEVER_EXPIRES; loading_speed: 10; cost_factor: 1; running_cost_factor: 1; speed: 1 km/h; track_type: enable_our_own_tracks ? RLA1 : RAIL; power: 500 hpM; running_cost_base: RUNNING_COST_DIESEL; cargo_capacity: 10; weight: 25 ton; engine_class: ENGINE_CLASS_DIESEL; tractive_effort_coefficient: 0.11; visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER); } graphics { default: align9_sprites; purchase: align_9_purchase_sprites; additional_text: return string(STR_ALIGN_PURCHASE_HINT); articulated_part: articulated_part_tender; } } switch (FEAT_TRAINS, SELF, align10_sprites, ((extra_callback_info1 & 0xFF) == 0) && (var[0x62, 7, 1, 1] != 0)) { 1: dummy_sprites; align_10_sprites; } item (FEAT_TRAINS, align10) { property { name: string(STR_ALIGN10_NAME); misc_flags: bitmask(TRAIN_FLAG_TILT, TRAIN_FLAG_MU); length: 2; climates_available: enable_debug_car ? bitmask(CLIMATE_TEMPERATE, CLIMATE_ARCTIC, CLIMATE_TROPICAL, CLIMATE_TOYLAND) : NO_CLIMATE; introduction_date: date(0, 1, 1); vehicle_life: 255; sprite_id: SPRITE_ID_NEW_TRAIN; misc_flags: bitmask(TRAIN_FLAG_TILT); model_life: VEHICLE_NEVER_EXPIRES; loading_speed: 10; cost_factor: 1; running_cost_factor: 1; speed: 1 km/h; track_type: enable_our_own_tracks ? RLA1 : RAIL; power: 500 hpM; running_cost_base: RUNNING_COST_DIESEL; cargo_capacity: 10; weight: 25 ton; engine_class: ENGINE_CLASS_DIESEL; tractive_effort_coefficient: 0.11; visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER); } graphics { default: align10_sprites; purchase: align_10_purchase_sprites; additional_text: return string(STR_ALIGN_PURCHASE_HINT); articulated_part: articulated_part_tender; } } switch (FEAT_TRAINS, SELF, align11_sprites, ((extra_callback_info1 & 0xFF) == 0) && (var[0x62, 7, 1, 1] != 0)) { 1: dummy_sprites; align_11_sprites; } item (FEAT_TRAINS, align11) { property { name: string(STR_ALIGN11_NAME); misc_flags: bitmask(TRAIN_FLAG_TILT, TRAIN_FLAG_MU); length: 3; climates_available: enable_debug_car ? bitmask(CLIMATE_TEMPERATE, CLIMATE_ARCTIC, CLIMATE_TROPICAL, CLIMATE_TOYLAND) : NO_CLIMATE; introduction_date: date(0, 1, 1); vehicle_life: 255; sprite_id: SPRITE_ID_NEW_TRAIN; misc_flags: bitmask(TRAIN_FLAG_TILT); model_life: VEHICLE_NEVER_EXPIRES; loading_speed: 10; cost_factor: 1; running_cost_factor: 1; speed: 1 km/h; track_type: enable_our_own_tracks ? RLA1 : RAIL; power: 500 hpM; running_cost_base: RUNNING_COST_DIESEL; cargo_capacity: 10; weight: 25 ton; engine_class: ENGINE_CLASS_DIESEL; tractive_effort_coefficient: 0.11; visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER); } graphics { default: align11_sprites; purchase: align_11_purchase_sprites; additional_text: return string(STR_ALIGN_PURCHASE_HINT); articulated_part: articulated_part_tender; } } switch (FEAT_TRAINS, SELF, align12_sprites, ((extra_callback_info1 & 0xFF) == 0) && (var[0x62, 7, 1, 1] != 0)) { 1: dummy_sprites; align_12_sprites; } item (FEAT_TRAINS, align12) { property { name: string(STR_ALIGN12_NAME); misc_flags: bitmask(TRAIN_FLAG_TILT, TRAIN_FLAG_MU); length: 4; climates_available: enable_debug_car ? bitmask(CLIMATE_TEMPERATE, CLIMATE_ARCTIC, CLIMATE_TROPICAL, CLIMATE_TOYLAND) : NO_CLIMATE; introduction_date: date(0, 1, 1); vehicle_life: 255; sprite_id: SPRITE_ID_NEW_TRAIN; misc_flags: bitmask(TRAIN_FLAG_TILT); model_life: VEHICLE_NEVER_EXPIRES; loading_speed: 10; cost_factor: 1; running_cost_factor: 1; speed: 1 km/h; track_type: enable_our_own_tracks ? RLA1 : RAIL; power: 500 hpM; running_cost_base: RUNNING_COST_DIESEL; cargo_capacity: 10; weight: 25 ton; engine_class: ENGINE_CLASS_DIESEL; tractive_effort_coefficient: 0.11; visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER); } graphics { default: align12_sprites; purchase: align_12_purchase_sprites; additional_text: return string(STR_ALIGN_PURCHASE_HINT); articulated_part: articulated_part_tender; } } switch (FEAT_TRAINS, SELF, align13_sprites, ((extra_callback_info1 & 0xFF) == 0) && (var[0x62, 7, 1, 1] != 0)) { 1: dummy_sprites; align_13_sprites; } item (FEAT_TRAINS, align13) { property { name: string(STR_ALIGN13_NAME); misc_flags: bitmask(TRAIN_FLAG_TILT, TRAIN_FLAG_MU); length: 5; climates_available: enable_debug_car ? bitmask(CLIMATE_TEMPERATE, CLIMATE_ARCTIC, CLIMATE_TROPICAL, CLIMATE_TOYLAND) : NO_CLIMATE; introduction_date: date(0, 1, 1); vehicle_life: 255; sprite_id: SPRITE_ID_NEW_TRAIN; misc_flags: bitmask(TRAIN_FLAG_TILT); model_life: VEHICLE_NEVER_EXPIRES; loading_speed: 10; cost_factor: 1; running_cost_factor: 1; speed: 1 km/h; track_type: enable_our_own_tracks ? RLA1 : RAIL; power: 500 hpM; running_cost_base: RUNNING_COST_DIESEL; cargo_capacity: 10; weight: 25 ton; engine_class: ENGINE_CLASS_DIESEL; tractive_effort_coefficient: 0.11; visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER); } graphics { default: align13_sprites; purchase: align_13_purchase_sprites; additional_text: return string(STR_ALIGN_PURCHASE_HINT); articulated_part: articulated_part_tender; } } switch (FEAT_TRAINS, SELF, align14_sprites, ((extra_callback_info1 & 0xFF) == 0) && (var[0x62, 7, 1, 1] != 0)) { 1: dummy_sprites; align_14_sprites; } item (FEAT_TRAINS, align14) { property { name: string(STR_ALIGN14_NAME); misc_flags: bitmask(TRAIN_FLAG_TILT, TRAIN_FLAG_MU); length: 6; climates_available: enable_debug_car ? bitmask(CLIMATE_TEMPERATE, CLIMATE_ARCTIC, CLIMATE_TROPICAL, CLIMATE_TOYLAND) : NO_CLIMATE; introduction_date: date(0, 1, 1); vehicle_life: 255; sprite_id: SPRITE_ID_NEW_TRAIN; misc_flags: bitmask(TRAIN_FLAG_TILT); model_life: VEHICLE_NEVER_EXPIRES; loading_speed: 10; cost_factor: 1; running_cost_factor: 1; speed: 1 km/h; track_type: enable_our_own_tracks ? RLA1 : RAIL; power: 500 hpM; running_cost_base: RUNNING_COST_DIESEL; cargo_capacity: 10; weight: 25 ton; engine_class: ENGINE_CLASS_DIESEL; tractive_effort_coefficient: 0.11; visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER); } graphics { default: align14_sprites; purchase: align_14_purchase_sprites; additional_text: return string(STR_ALIGN_PURCHASE_HINT); articulated_part: articulated_part_tender; } } switch (FEAT_TRAINS, SELF, align15_sprites, ((extra_callback_info1 & 0xFF) == 0) && (var[0x62, 7, 1, 1] != 0)) { 1: dummy_sprites; align_15_sprites; } item (FEAT_TRAINS, align15) { property { name: string(STR_ALIGN15_NAME); misc_flags: bitmask(TRAIN_FLAG_TILT, TRAIN_FLAG_MU); length: 7; climates_available: enable_debug_car ? bitmask(CLIMATE_TEMPERATE, CLIMATE_ARCTIC, CLIMATE_TROPICAL, CLIMATE_TOYLAND) : NO_CLIMATE; introduction_date: date(0, 1, 1); vehicle_life: 255; sprite_id: SPRITE_ID_NEW_TRAIN; misc_flags: bitmask(TRAIN_FLAG_TILT); model_life: VEHICLE_NEVER_EXPIRES; loading_speed: 10; cost_factor: 1; running_cost_factor: 1; speed: 1 km/h; track_type: enable_our_own_tracks ? RLA1 : RAIL; power: 500 hpM; running_cost_base: RUNNING_COST_DIESEL; cargo_capacity: 10; weight: 25 ton; engine_class: ENGINE_CLASS_DIESEL; tractive_effort_coefficient: 0.11; visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER); } graphics { default: align15_sprites; purchase: align_15_purchase_sprites; additional_text: return string(STR_ALIGN_PURCHASE_HINT); articulated_part: articulated_part_tender; } } switch (FEAT_TRAINS, SELF, align16_sprites, ((extra_callback_info1 & 0xFF) == 0) && (var[0x62, 7, 1, 1] != 0)) { 1: dummy_sprites; align_16_sprites; } item (FEAT_TRAINS, align16) { property { name: string(STR_ALIGN16_NAME); misc_flags: bitmask(TRAIN_FLAG_TILT, TRAIN_FLAG_MU); length: 8; climates_available: enable_debug_car ? bitmask(CLIMATE_TEMPERATE, CLIMATE_ARCTIC, CLIMATE_TROPICAL, CLIMATE_TOYLAND) : NO_CLIMATE; introduction_date: date(0, 1, 1); vehicle_life: 255; sprite_id: SPRITE_ID_NEW_TRAIN; misc_flags: bitmask(TRAIN_FLAG_TILT); model_life: VEHICLE_NEVER_EXPIRES; loading_speed: 10; cost_factor: 1; running_cost_factor: 1; speed: 1 km/h; track_type: enable_our_own_tracks ? RLA1 : RAIL; power: 500 hpM; running_cost_base: RUNNING_COST_DIESEL; cargo_capacity: 10; weight: 25 ton; engine_class: ENGINE_CLASS_DIESEL; tractive_effort_coefficient: 0.11; visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER); } graphics { default: align16_sprites; purchase: align_16_purchase_sprites; additional_text: return string(STR_ALIGN_PURCHASE_HINT); articulated_part: articulated_part_tender; } } // ПС // #include "src/emu/sn.pnml" // er1 // Спрайты // 2 окраски, только головной с 1972 имеет замену на // др. 2 окраски spriteset (er1_h_purchase_graphics_ico, "src/emu/er1.png") { [0, 0, 100, 18, -40, -13] } spriteset (er1_h_purchase_graphics_noico, "src/emu/er1.png") { [0 +18, 0, 82, 18, -40, -13] } switch (FEAT_TRAINS, SELF, er1_h_purchase_sprites, enable_icons) { 1: er1_h_purchase_graphics_ico; er1_h_purchase_graphics_noico;} spriteset (er1_m_purchase_graphics_ico, "src/emu/er1.png") { [120, 0, 100, 18, -40, -13] } spriteset (er1_m_purchase_graphics_noico, "src/emu/er1.png") { [120 +18, 0, 82, 18, -40, -13] } switch (FEAT_TRAINS, SELF, er1_m_purchase_sprites, enable_icons) { 1: er1_m_purchase_graphics_ico; er1_m_purchase_graphics_noico;} spriteset (er1_c_purchase_graphics_ico, "src/emu/er1.png") { [240, 0, 100, 18, -40, -13] } spriteset (er1_c_purchase_graphics_noico, "src/emu/er1.png") { [240 +18, 0, 82, 18, -40, -13] } switch (FEAT_TRAINS, SELF, er1_c_purchase_sprites, enable_icons) { 1: er1_c_purchase_graphics_ico; er1_c_purchase_graphics_noico;} spriteset (er1_v1_h_notpowered_sprites_left, "src/emu/er1.png") { s12_template(32, 40, 0) } spriteset (er1_v1_h_loading_sprites, "src/emu/er1.png") { s12_template(32, 40 +134, 0) } spriteset (er1_v1_h_traveling_sprites, "src/emu/er1.png") { s12_template(32, 40 +268, 0) } spritegroup er1_v1_h_normal_sprites { loading: er1_v1_h_loading_sprites; loaded: er1_v1_h_traveling_sprites; } spriteset (er1_v1_h_notpowered_sprites_right, "src/emu/er1.png") { s12_r_template(32 +32, 40 +67, 0) } spriteset (er1_v1_h_r_loading_sprites, "src/emu/er1.png") { s12_r_template(32 +32, 40 +201, 0) } spriteset (er1_v1_h_r_traveling_sprites, "src/emu/er1.png") { s12_r_template(32 +32, 40 +335, 0) } spritegroup er1_v1_h_r_normal_sprites { loading: er1_v1_h_r_loading_sprites; loaded: er1_v1_h_r_traveling_sprites; } switch (FEAT_TRAINS, SELF, er1_v1_h_sprites_left, vehicle_is_not_powered || vehicle_is_in_depot) { 0: er1_v1_h_normal_sprites; er1_v1_h_notpowered_sprites_left; } switch (FEAT_TRAINS, SELF, er1_v1_h_sprites_right, vehicle_is_not_powered || vehicle_is_in_depot) { 0: er1_v1_h_r_normal_sprites; er1_v1_h_notpowered_sprites_right; } spriteset (er1_v1_m_notpowered_sprites_left, "src/emu/er1.png") { s12_template(32 +447, 40, 0) } spriteset (er1_v1_m_loading_sprites, "src/emu/er1.png") { s12_template(32 +447, 40 +134, 0) } spriteset (er1_v1_m_traveling_sprites, "src/emu/er1.png") { s12_template(32 +447, 40 +268, 0) } spritegroup er1_v1_m_normal_sprites { loading: er1_v1_m_loading_sprites; loaded: er1_v1_m_traveling_sprites; } spriteset (er1_v1_m_notpowered_sprites_right, "src/emu/er1.png") { s12_r_template(32 +447, 40, 0) } spriteset (er1_v1_m_r_loading_sprites, "src/emu/er1.png") { s12_r_template(32 +447, 40 +134, 0) } spriteset (er1_v1_m_r_traveling_sprites, "src/emu/er1.png") { s12_r_template(32 +447, 40 +268, 0) } spritegroup er1_v1_m_r_normal_sprites { loading: er1_v1_m_r_loading_sprites; loaded: er1_v1_m_r_traveling_sprites; } switch (FEAT_TRAINS, SELF, er1_v1_m_sprites_left, vehicle_is_not_powered || vehicle_is_in_depot) { 0: er1_v1_m_normal_sprites; er1_v1_m_notpowered_sprites_left; } switch (FEAT_TRAINS, SELF, er1_v1_m_sprites_right, vehicle_is_not_powered || vehicle_is_in_depot) { 0: er1_v1_m_r_normal_sprites; er1_v1_m_notpowered_sprites_right; } spriteset (er1_v1_c_notpowered_sprites_left, "src/emu/er1.png") { s12_template(32 +894, 40, 0) } spriteset (er1_v1_c_loading_sprites, "src/emu/er1.png") { s12_template(32 +894, 40 +134, 0) } spritegroup er1_v1_c_sprites_left { loading: er1_v1_c_loading_sprites; loaded: er1_v1_c_notpowered_sprites_left; } spriteset (er1_v1_c_notpowered_sprites_right, "src/emu/er1.png") { s12_r_template(32 +894, 40, 0) } spriteset (er1_v1_c_r_loading_sprites, "src/emu/er1.png") { s12_r_template(32 +894, 40 +134, 0) } spritegroup er1_v1_c_sprites_right { loading: er1_v1_c_r_loading_sprites; loaded: er1_v1_c_notpowered_sprites_right; } spriteset (er1_v1u_h_notpowered_sprites_left, "src/emu/er1.png") { s12_template(32, 442, 0) } spriteset (er1_v1u_h_loading_sprites, "src/emu/er1.png") { s12_template(32, 442 +134, 0) } spriteset (er1_v1u_h_traveling_sprites, "src/emu/er1.png") { s12_template(32, 442 +268, 0) } spritegroup er1_v1u_h_normal_sprites { loading: er1_v1u_h_loading_sprites; loaded: er1_v1u_h_traveling_sprites; } spriteset (er1_v1u_h_notpowered_sprites_right, "src/emu/er1.png") { s12_r_template(32 +32, 442 +67, 0) } spriteset (er1_v1u_h_r_loading_sprites, "src/emu/er1.png") { s12_r_template(32 +32, 442 +201, 0) } spriteset (er1_v1u_h_r_traveling_sprites, "src/emu/er1.png") { s12_r_template(32 +32, 442 +335, 0) } spritegroup er1_v1u_h_r_normal_sprites { loading: er1_v1u_h_r_loading_sprites; loaded: er1_v1u_h_r_traveling_sprites; } switch (FEAT_TRAINS, SELF, er1_v1u_h_sprites_left, vehicle_is_not_powered || vehicle_is_in_depot) { 0: er1_v1u_h_normal_sprites; er1_v1u_h_notpowered_sprites_left; } switch (FEAT_TRAINS, SELF, er1_v1u_h_sprites_right, vehicle_is_not_powered || vehicle_is_in_depot) { 0: er1_v1u_h_r_normal_sprites; er1_v1u_h_notpowered_sprites_right; } spriteset (er1_v2_h_notpowered_sprites_left, "src/emu/er1-gr.png") { s12_template(32, 40, 0) } spriteset (er1_v2_h_loading_sprites, "src/emu/er1-gr.png") { s12_template(32, 40 +134, 0) } spriteset (er1_v2_h_traveling_sprites, "src/emu/er1-gr.png") { s12_template(32, 40 +268, 0) } spritegroup er1_v2_h_normal_sprites { loading: er1_v2_h_loading_sprites; loaded: er1_v2_h_traveling_sprites; } spriteset (er1_v2_h_notpowered_sprites_right, "src/emu/er1-gr.png") { s12_r_template(32 +32, 40 +67, 0) } spriteset (er1_v2_h_r_loading_sprites, "src/emu/er1-gr.png") { s12_r_template(32 +32, 40 +201, 0) } spriteset (er1_v2_h_r_traveling_sprites, "src/emu/er1-gr.png") { s12_r_template(32 +32, 40 +335, 0) } spritegroup er1_v2_h_r_normal_sprites { loading: er1_v2_h_r_loading_sprites; loaded: er1_v2_h_r_traveling_sprites; } switch (FEAT_TRAINS, SELF, er1_v2_h_sprites_left, vehicle_is_not_powered || vehicle_is_in_depot) { 0: er1_v2_h_normal_sprites; er1_v2_h_notpowered_sprites_left; } switch (FEAT_TRAINS, SELF, er1_v2_h_sprites_right, vehicle_is_not_powered || vehicle_is_in_depot) { 0: er1_v2_h_r_normal_sprites; er1_v2_h_notpowered_sprites_right; } spriteset (er1_v2_m_notpowered_sprites_left, "src/emu/er1-gr.png") { s12_template(32 +447, 40, 0) } spriteset (er1_v2_m_loading_sprites, "src/emu/er1-gr.png") { s12_template(32 +447, 40 +134, 0) } spriteset (er1_v2_m_traveling_sprites, "src/emu/er1-gr.png") { s12_template(32 +447, 40 +268, 0) } spritegroup er1_v2_m_normal_sprites { loading: er1_v2_m_loading_sprites; loaded: er1_v2_m_traveling_sprites; } spriteset (er1_v2_m_notpowered_sprites_right, "src/emu/er1-gr.png") { s12_r_template(32 +447, 40, 0) } spriteset (er1_v2_m_r_loading_sprites, "src/emu/er1-gr.png") { s12_r_template(32 +447, 40 +134, 0) } spriteset (er1_v2_m_r_traveling_sprites, "src/emu/er1-gr.png") { s12_r_template(32 +447, 40 +268, 0) } spritegroup er1_v2_m_r_normal_sprites { loading: er1_v2_m_r_loading_sprites; loaded: er1_v2_m_r_traveling_sprites; } switch (FEAT_TRAINS, SELF, er1_v2_m_sprites_left, vehicle_is_not_powered || vehicle_is_in_depot) { 0: er1_v2_m_normal_sprites; er1_v2_m_notpowered_sprites_left; } switch (FEAT_TRAINS, SELF, er1_v2_m_sprites_right, vehicle_is_not_powered || vehicle_is_in_depot) { 0: er1_v2_m_r_normal_sprites; er1_v2_m_notpowered_sprites_right; } spriteset (er1_v2_c_notpowered_sprites_left, "src/emu/er1-gr.png") { s12_template(32 +894, 40, 0) } spriteset (er1_v2_c_loading_sprites, "src/emu/er1-gr.png") { s12_template(32 +894, 40 +134, 0) } spritegroup er1_v2_c_sprites_left { loading: er1_v2_c_loading_sprites; loaded: er1_v2_c_notpowered_sprites_left; } spriteset (er1_v2_c_notpowered_sprites_right, "src/emu/er1-gr.png") { s12_r_template(32 +894, 40, 0) } spriteset (er1_v2_c_r_loading_sprites, "src/emu/er1-gr.png") { s12_r_template(32 +894, 40 +134, 0) } spritegroup er1_v2_c_sprites_right { loading: er1_v2_c_r_loading_sprites; loaded: er1_v2_c_notpowered_sprites_right; } spriteset (er1_v2u_h_notpowered_sprites_left, "src/emu/er1-gr.png") { s12_template(32, 442, 0) } spriteset (er1_v2u_h_loading_sprites, "src/emu/er1-gr.png") { s12_template(32, 442 +134, 0) } spriteset (er1_v2u_h_traveling_sprites, "src/emu/er1-gr.png") { s12_template(32, 442 +268, 0) } spritegroup er1_v2u_h_normal_sprites { loading: er1_v2u_h_loading_sprites; loaded: er1_v2u_h_traveling_sprites; } spriteset (er1_v2u_h_notpowered_sprites_right, "src/emu/er1-gr.png") { s12_r_template(32 +32, 442 +67, 0) } spriteset (er1_v2u_h_r_loading_sprites, "src/emu/er1-gr.png") { s12_r_template(32 +32, 442 +201, 0) } spriteset (er1_v2u_h_r_traveling_sprites, "src/emu/er1-gr.png") { s12_r_template(32 +32, 442 +335, 0) } spritegroup er1_v2u_h_r_normal_sprites { loading: er1_v2u_h_r_loading_sprites; loaded: er1_v2u_h_r_traveling_sprites; } switch (FEAT_TRAINS, SELF, er1_v2u_h_sprites_left, vehicle_is_not_powered || vehicle_is_in_depot) { 0: er1_v2u_h_normal_sprites; er1_v2u_h_notpowered_sprites_left; } switch (FEAT_TRAINS, SELF, er1_v2u_h_sprites_right, vehicle_is_not_powered || vehicle_is_in_depot) { 0: er1_v2u_h_r_normal_sprites; er1_v2u_h_notpowered_sprites_right; } switch (FEAT_TRAINS, SELF, er1_h_sprites_l, ((LOAD_TEMP(2) >= date(1972,1,1)) * 200) + ((LOAD_TEMP(4) != er1_h) * 100) + cargo_subtype) { 0: er1_v1_h_sprites_left; 1: er1_v2_h_sprites_left; 100: er1_v1_h_notpowered_sprites_left; 101: er1_v2_h_notpowered_sprites_left; 200: er1_v1u_h_sprites_left; 201: er1_v2u_h_sprites_left; 300: er1_v1u_h_notpowered_sprites_left; 301: er1_v2u_h_notpowered_sprites_left; align_12_sprites; } switch (FEAT_TRAINS, SELF, er1_h_sprites_r, ((LOAD_TEMP(2) >= date(1972,1,1)) * 200) + ((LOAD_TEMP(4) != er1_h) * 100) + cargo_subtype) { 0: er1_v1_h_sprites_right; 1: er1_v2_h_sprites_right; 100: er1_v1_h_notpowered_sprites_right; 101: er1_v2_h_notpowered_sprites_right; 200: er1_v1u_h_sprites_right; 201: er1_v2u_h_sprites_right; 300: er1_v1u_h_notpowered_sprites_right; 301: er1_v2u_h_notpowered_sprites_right; align_12_sprites; } switch (FEAT_TRAINS, SELF, er1_h_sprites_2l, [ STORE_TEMP(2, 0x10F), (var[0x61, 0, 0xFFFF, 0xC6] == er1_h) || (position_in_consist == 0) ]) { 1: er1_h_sprites_l; er1_h_sprites_r;} switch (FEAT_TRAINS, SELF, er1_h_sprites_old, ((LOAD_TEMP(0) - count_veh_id(er1_h) - count_veh_id(er1_m) - count_veh_id(er1_c) + 1) % 2) ) { 1: er1_h_sprites_2l; er1_h_sprites_r;} switch (FEAT_TRAINS, SELF, er1_h_sprites_16, [ STORE_TEMP(-16, 0x10F), (var[0x61, 0, 0xFFFF, 0xC6] == er1_h) + (((var[0x61, 0, 0xFFFF, 0xC6] == er1_m) || (var[0x61, 0, 0xFFFF, 0xC6] == er1_c)) * 2) ]) { 1: er1_h_sprites_old; 2: er1_h_sprites_2l; er1_h_sprites_r;} switch (FEAT_TRAINS, SELF, er1_h_sprites_14, [ STORE_TEMP(-14, 0x10F), (var[0x61, 0, 0xFFFF, 0xC6] == er1_h) + (((var[0x61, 0, 0xFFFF, 0xC6] == er1_m) || (var[0x61, 0, 0xFFFF, 0xC6] == er1_c)) * 2) ]) { 1: er1_h_sprites_16; 2: er1_h_sprites_r; er1_h_sprites_2l;} switch (FEAT_TRAINS, SELF, er1_h_sprites_12, [ STORE_TEMP(-12, 0x10F), (var[0x61, 0, 0xFFFF, 0xC6] == er1_h) + (((var[0x61, 0, 0xFFFF, 0xC6] == er1_m) || (var[0x61, 0, 0xFFFF, 0xC6] == er1_c)) * 2) ]) { 1: er1_h_sprites_14; 2: er1_h_sprites_2l; er1_h_sprites_r;} switch (FEAT_TRAINS, SELF, er1_h_sprites_10, [ STORE_TEMP(-10, 0x10F), (var[0x61, 0, 0xFFFF, 0xC6] == er1_h) + (((var[0x61, 0, 0xFFFF, 0xC6] == er1_m) || (var[0x61, 0, 0xFFFF, 0xC6] == er1_c)) * 2) ]) { 1: er1_h_sprites_12; 2: er1_h_sprites_r; er1_h_sprites_2l;} switch (FEAT_TRAINS, SELF, er1_h_sprites_8, [ STORE_TEMP(-8, 0x10F), (var[0x61, 0, 0xFFFF, 0xC6] == er1_h) + (((var[0x61, 0, 0xFFFF, 0xC6] == er1_m) || (var[0x61, 0, 0xFFFF, 0xC6] == er1_c)) * 2) ]) { 1: er1_h_sprites_10; 2: er1_h_sprites_2l; er1_h_sprites_r;} switch (FEAT_TRAINS, SELF, er1_h_sprites_6, [ STORE_TEMP(-6, 0x10F), (var[0x61, 0, 0xFFFF, 0xC6] == er1_h) + (((var[0x61, 0, 0xFFFF, 0xC6] == er1_m) || (var[0x61, 0, 0xFFFF, 0xC6] == er1_c)) * 2) ]) { 1: er1_h_sprites_8; 2: er1_h_sprites_r; er1_h_sprites_2l;} switch (FEAT_TRAINS, SELF, er1_h_sprites_4, [ STORE_TEMP(-4, 0x10F), (var[0x61, 0, 0xFFFF, 0xC6] == er1_h) + (((var[0x61, 0, 0xFFFF, 0xC6] == er1_m) || (var[0x61, 0, 0xFFFF, 0xC6] == er1_c)) * 2) ]) { 1: er1_h_sprites_6; 2: er1_h_sprites_2l; er1_h_sprites_r;} switch (FEAT_TRAINS, SELF, er1_h_sprites_2, [ STORE_TEMP(-2, 0x10F), ((var[0x61, 0, 0xFFFF, 0xC6] == er1_h) ) + (((var[0x61, 0, 0xFFFF, 0xC6] == er1_m) || (var[0x61, 0, 0xFFFF, 0xC6] == er1_c)) * 2) ]) { 1: er1_h_sprites_4; 2: er1_h_sprites_r; er1_h_sprites_2l; } switch (FEAT_TRAINS, SELF, er1_h_sprites_ml, [ STORE_TEMP(2, 0x10F), ((var[0x61, 0, 0xFFFF, 0xC6] == er1_m) || (var[0x61, 0, 0xFFFF, 0xC6] == er1_c)) ]) { 1: er1_h_sprites_l; er1_h_sprites_2; } switch (FEAT_TRAINS, SELF, er1_h_sprites_start , [ STORE_TEMP(-2, 0x10F), ((var[0x61, 0, 0xFFFF, 0xC6] == er1_m) || (var[0x61, 0, 0xFFFF, 0xC6] == er1_c)) ]) { 1: er1_h_sprites_r; er1_h_sprites_ml; } switch (FEAT_TRAINS, SELF, er1_h_sprites_selfpos, [ STORE_TEMP( (var[0x9F, 0, 0x07] == 3) ? var[0x9C, 0, 0x0F] & 3 : (var[0x9F, 0, 0x07] == 7) ? (3 - var[0x9C, 0, 0x0F] & 3) : (var[0x9F, 0, 0x07] > 3) ? var[0x9A, 0, 0x0F] & 3 : (3 - var[0x9A, 0, 0x0F] & 3), 3) ]) { er1_h_sprites_start; } switch (FEAT_TRAINS, PARENT, er1_h_sprites_parent, [ STORE_TEMP(count_veh_id(er1_h), 0), STORE_TEMP(current_speed, 1), STORE_TEMP(date_of_last_service, 2), STORE_TEMP(vehicle_type_id, 4) ]) { er1_h_sprites_selfpos; } switch (FEAT_TRAINS, SELF, er1_h_sprites, ((extra_callback_info1 & 0xFF) >= 0x20) || (((extra_callback_info1 & 0xFF) == 0) && (var[0x62, 7, 1, 1] != 0)) ) { 1: dummy_sprites; er1_h_sprites_parent; } switch (FEAT_TRAINS, SELF, er1_m_direction_left, cargo_subtype + ((LOAD_TEMP(4) != er1_h) * 100) ) { 0: er1_v1_m_sprites_left; 1: er1_v2_m_sprites_left; 100: er1_v1_m_notpowered_sprites_left; 101: er1_v2_m_notpowered_sprites_left; align_12_sprites; } switch (FEAT_TRAINS, SELF, er1_m_direction_right, cargo_subtype + ((LOAD_TEMP(4) != er1_h) * 100) ) { 0: er1_v1_m_sprites_right; 1: er1_v2_m_sprites_right; 100: er1_v1_m_notpowered_sprites_right; 101: er1_v2_m_notpowered_sprites_right; align_12_sprites; } switch (FEAT_TRAINS, SELF, er1_m_direction_max, LOAD_TEMP(5)) { 0x1003: er1_m_direction_left; 0x2003: er1_m_direction_right; 0x100B: er1_m_direction_left; 0x300B: er1_m_direction_left; 0x400B: er1_m_direction_right; 0x100D: er1_m_direction_left; 0x200D: er1_m_direction_right; 0x400D: er1_m_direction_right; 0x1013: er1_m_direction_left; 0x4013: er1_m_direction_left; 0x5013: er1_m_direction_right; 0x1019: er1_m_direction_left; 0x2019: er1_m_direction_right; 0x5019: er1_m_direction_right; 0x102D: er1_m_direction_left; 0x302D: er1_m_direction_left; 0x402D: er1_m_direction_right; 0x602D: er1_m_direction_right; 0x104D: er1_m_direction_left; 0x404D: er1_m_direction_left; 0x504D: er1_m_direction_right; 0x704D: er1_m_direction_right; 0x1059: er1_m_direction_left; 0x3059: er1_m_direction_left; 0x4059: er1_m_direction_right; 0x7059: er1_m_direction_right; 0x10AD: er1_m_direction_left; 0x30AD: er1_m_direction_left; 0x50AD: er1_m_direction_left; 0x60AD: er1_m_direction_right; 0x80AD: er1_m_direction_right; 0x10B5: er1_m_direction_left; 0x30B5: er1_m_direction_left; 0x40B5: er1_m_direction_right; 0x60B5: er1_m_direction_right; 0x80B5: er1_m_direction_right; 0x1135: er1_m_direction_left; 0x4135: er1_m_direction_left; 0x5135: er1_m_direction_right; 0x7135: er1_m_direction_right; 0x9135: er1_m_direction_right; 0x1159: er1_m_direction_left; 0x3159: er1_m_direction_left; 0x5159: er1_m_direction_left; 0x6159: er1_m_direction_right; 0x9159: er1_m_direction_right; 0x12B5: er1_m_direction_left; 0x32B5: er1_m_direction_left; 0x52B5: er1_m_direction_left; 0x62B5: er1_m_direction_right; 0x82B5: er1_m_direction_right; 0xA2B5: er1_m_direction_right; er1_m_direction_left; } switch (FEAT_TRAINS, SELF, er1_m_direction_template1, STORE_TEMP(LOAD_TEMP(5) + LOAD_TEMP(6), 5)) { er1_m_direction_max; } switch (FEAT_TRAINS, SELF, er1_m_direction_template_back12, [ STORE_TEMP(24, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { er1_m_direction_template1; } switch (FEAT_TRAINS, SELF, er1_m_direction_template_back11, [ STORE_TEMP(22, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_m_direction_template1; er1_m_direction_template_back12; } switch (FEAT_TRAINS, SELF, er1_m_direction_template_back10, [ STORE_TEMP(20, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_m_direction_template1; er1_m_direction_template_back11; } switch (FEAT_TRAINS, SELF, er1_m_direction_template_back9, [ STORE_TEMP(18, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_m_direction_template1; er1_m_direction_template_back10; } switch (FEAT_TRAINS, SELF, er1_m_direction_template_back8, [ STORE_TEMP(16, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_m_direction_template1; er1_m_direction_template_back9; } switch (FEAT_TRAINS, SELF, er1_m_direction_template_back7, [ STORE_TEMP(14, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_m_direction_template1; er1_m_direction_template_back8; } switch (FEAT_TRAINS, SELF, er1_m_direction_template_back6, [ STORE_TEMP(12, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_m_direction_template1; er1_m_direction_template_back7; } switch (FEAT_TRAINS, SELF, er1_m_direction_template_back5, [ STORE_TEMP(10, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_m_direction_template1; er1_m_direction_template_back6; } switch (FEAT_TRAINS, SELF, er1_m_direction_template_back4, [ STORE_TEMP(8, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_m_direction_template1; er1_m_direction_template_back5; } switch (FEAT_TRAINS, SELF, er1_m_direction_template_back3, [ STORE_TEMP(6, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_m_direction_template1; er1_m_direction_template_back4; } switch (FEAT_TRAINS, SELF, er1_m_direction_template_back2, [ STORE_TEMP(4, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_m_direction_template1; er1_m_direction_template_back3; } switch (FEAT_TRAINS, SELF, er1_m_direction_template_back1, [ STORE_TEMP(2, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_m_direction_template1; er1_m_direction_template_back2; } switch (FEAT_TRAINS, SELF, er1_m_direction_template_back0, [ STORE_TEMP(0, 0x10F), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_m_direction_template1; er1_m_direction_template_back1; } switch (FEAT_TRAINS, SELF, er1_m_direction_template12, [ STORE_TEMP(-24, 0x10F), STORE_TEMP(2048 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(12 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) ]) { er1_m_direction_template_back0; } switch (FEAT_TRAINS, SELF, er1_m_direction_template11, [ STORE_TEMP(-22, 0x10F), STORE_TEMP(1024 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(11 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_m_direction_template_back0; er1_m_direction_template12; } switch (FEAT_TRAINS, SELF, er1_m_direction_template10, [ STORE_TEMP(-20, 0x10F), STORE_TEMP(512 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(10 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_m_direction_template_back0; er1_m_direction_template11; } switch (FEAT_TRAINS, SELF, er1_m_direction_template9, [ STORE_TEMP(-18, 0x10F), STORE_TEMP(256 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(9 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_m_direction_template_back0; er1_m_direction_template10; } switch (FEAT_TRAINS, SELF, er1_m_direction_template8, [ STORE_TEMP(-16, 0x10F), STORE_TEMP(128 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(8 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_m_direction_template_back0; er1_m_direction_template9; } switch (FEAT_TRAINS, SELF, er1_m_direction_template7, [ STORE_TEMP(-14, 0x10F), STORE_TEMP(64 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(7 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_m_direction_template_back0; er1_m_direction_template8; } switch (FEAT_TRAINS, SELF, er1_m_direction_template6, [ STORE_TEMP(-12, 0x10F), STORE_TEMP(32 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(6 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_m_direction_template_back0; er1_m_direction_template7; } switch (FEAT_TRAINS, SELF, er1_m_direction_template5, [ STORE_TEMP(-10, 0x10F), STORE_TEMP(16 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(5 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_m_direction_template_back0; er1_m_direction_template6; } switch (FEAT_TRAINS, SELF, er1_m_direction_template4, [ STORE_TEMP(-8, 0x10F), STORE_TEMP(8 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(4 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_m_direction_template_back0; er1_m_direction_template5; } switch (FEAT_TRAINS, SELF, er1_m_direction_template3, [ STORE_TEMP(-6, 0x10F), STORE_TEMP(4 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(3 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_m_direction_template_back0; er1_m_direction_template4; } switch (FEAT_TRAINS, SELF, er1_m_direction_template2, [ STORE_TEMP(-4, 0x10F), STORE_TEMP(2 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(2 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_m_direction_template_back0; er1_m_direction_template3; } switch (FEAT_TRAINS, SELF, er1_m_direction_template, [ STORE_TEMP(-2, 0x10F), STORE_TEMP(1 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m), 5), STORE_TEMP(1 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_m_direction_template_back0; er1_m_direction_template2; } switch (FEAT_TRAINS, SELF, er1_m_sprites_start, 0) { er1_m_direction_template; } switch (FEAT_TRAINS, SELF, er1_m_sprites_selfpos, [ STORE_TEMP( (var[0x9F, 0, 0x07] == 3) ? var[0x9C, 0, 0x0F] & 3 : (var[0x9F, 0, 0x07] == 7) ? (3 - var[0x9C, 0, 0x0F] & 3) : (var[0x9F, 0, 0x07] > 3) ? var[0x9A, 0, 0x0F] & 3 : (3 - var[0x9A, 0, 0x0F] & 3), 3) ]) { er1_m_sprites_start; } switch (FEAT_TRAINS, PARENT, er1_m_sprites_parent, [ STORE_TEMP(count_veh_id(er1_m), 0), STORE_TEMP(current_speed, 1), STORE_TEMP(date_of_last_service, 2), STORE_TEMP(vehicle_type_id, 4) ]) { er1_m_sprites_selfpos; } switch (FEAT_TRAINS, SELF, er1_m_sprites, ((extra_callback_info1 & 0xFF) >= 0x20) || (((extra_callback_info1 & 0xFF) == 0) && (var[0x62, 7, 1, 1] != 0)) ) { 1: dummy_sprites; er1_m_sprites_parent; } switch (FEAT_TRAINS, SELF, er1_c_direction_left, cargo_subtype + ((LOAD_TEMP(4) != er1_h) * 100) ) { 0: er1_v1_c_sprites_left; 1: er1_v2_c_sprites_left; 100: er1_v1_c_notpowered_sprites_left; 101: er1_v2_c_notpowered_sprites_left; align_12_sprites; } switch (FEAT_TRAINS, SELF, er1_c_direction_right, cargo_subtype + ((LOAD_TEMP(4) != er1_h) * 100) ) { 0: er1_v1_c_sprites_right; 1: er1_v2_c_sprites_right; 100: er1_v1_c_notpowered_sprites_right; 101: er1_v2_c_notpowered_sprites_right; align_12_sprites; } switch (FEAT_TRAINS, SELF, er1_c_direction_max, LOAD_TEMP(5)) { 0x200B: er1_c_direction_left; 0x300D: er1_c_direction_right; 0x2013: er1_c_direction_left; 0x3013: er1_c_direction_left; 0x3019: er1_c_direction_right; 0x4019: er1_c_direction_right; 0x202D: er1_c_direction_left; 0x502D: er1_c_direction_right; 0x204D: er1_c_direction_left; 0x304D: er1_c_direction_left; 0x604D: er1_c_direction_right; 0x2059: er1_c_direction_left; 0x5059: er1_c_direction_right; 0x6059: er1_c_direction_right; 0x20AD: er1_c_direction_left; 0x40AD: er1_c_direction_left; 0x70AD: er1_c_direction_right; 0x20B5: er1_c_direction_left; 0x50B5: er1_c_direction_right; 0x70B5: er1_c_direction_right; 0x2135: er1_c_direction_left; 0x3135: er1_c_direction_left; 0x6135: er1_c_direction_right; 0x8135: er1_c_direction_right; 0x2159: er1_c_direction_left; 0x4159: er1_c_direction_left; 0x7159: er1_c_direction_right; 0x8159: er1_c_direction_right; 0x22B5: er1_c_direction_left; 0x42B5: er1_c_direction_left; 0x72B5: er1_c_direction_right; 0x92B5: er1_c_direction_right; er1_c_direction_left; } switch (FEAT_TRAINS, SELF, er1_c_direction_template1, STORE_TEMP(LOAD_TEMP(5) + LOAD_TEMP(6), 5)) { er1_c_direction_max; } switch (FEAT_TRAINS, SELF, er1_c_direction_template_back12, [ STORE_TEMP(24, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { er1_c_direction_template1; } switch (FEAT_TRAINS, SELF, er1_c_direction_template_back11, [ STORE_TEMP(22, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_c_direction_template1; er1_c_direction_template_back12; } switch (FEAT_TRAINS, SELF, er1_c_direction_template_back10, [ STORE_TEMP(20, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_c_direction_template1; er1_c_direction_template_back11; } switch (FEAT_TRAINS, SELF, er1_c_direction_template_back9, [ STORE_TEMP(18, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_c_direction_template1; er1_c_direction_template_back10; } switch (FEAT_TRAINS, SELF, er1_c_direction_template_back8, [ STORE_TEMP(16, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_c_direction_template1; er1_c_direction_template_back9; } switch (FEAT_TRAINS, SELF, er1_c_direction_template_back7, [ STORE_TEMP(14, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_c_direction_template1; er1_c_direction_template_back8; } switch (FEAT_TRAINS, SELF, er1_c_direction_template_back6, [ STORE_TEMP(12, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_c_direction_template1; er1_c_direction_template_back7; } switch (FEAT_TRAINS, SELF, er1_c_direction_template_back5, [ STORE_TEMP(10, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_c_direction_template1; er1_c_direction_template_back6; } switch (FEAT_TRAINS, SELF, er1_c_direction_template_back4, [ STORE_TEMP(8, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_c_direction_template1; er1_c_direction_template_back5; } switch (FEAT_TRAINS, SELF, er1_c_direction_template_back3, [ STORE_TEMP(6, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_c_direction_template1; er1_c_direction_template_back4; } switch (FEAT_TRAINS, SELF, er1_c_direction_template_back2, [ STORE_TEMP(4, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_c_direction_template1; er1_c_direction_template_back3; } switch (FEAT_TRAINS, SELF, er1_c_direction_template_back1, [ STORE_TEMP(2, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_c_direction_template1; er1_c_direction_template_back2; } switch (FEAT_TRAINS, SELF, er1_c_direction_template_back0, [ STORE_TEMP(0, 0x10F), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_c_direction_template1; er1_c_direction_template_back1; } switch (FEAT_TRAINS, SELF, er1_c_direction_template12, [ STORE_TEMP(-24, 0x10F), STORE_TEMP(2048 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(12 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) ]) { er1_c_direction_template_back0; } switch (FEAT_TRAINS, SELF, er1_c_direction_template11, [ STORE_TEMP(-22, 0x10F), STORE_TEMP(1024 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(11 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_c_direction_template_back0; er1_c_direction_template12; } switch (FEAT_TRAINS, SELF, er1_c_direction_template10, [ STORE_TEMP(-20, 0x10F), STORE_TEMP(512 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(10 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_c_direction_template_back0; er1_c_direction_template11; } switch (FEAT_TRAINS, SELF, er1_c_direction_template9, [ STORE_TEMP(-18, 0x10F), STORE_TEMP(256 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(9 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_c_direction_template_back0; er1_c_direction_template10; } switch (FEAT_TRAINS, SELF, er1_c_direction_template8, [ STORE_TEMP(-16, 0x10F), STORE_TEMP(128 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(8 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_c_direction_template_back0; er1_c_direction_template9; } switch (FEAT_TRAINS, SELF, er1_c_direction_template7, [ STORE_TEMP(-14, 0x10F), STORE_TEMP(64 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(7 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_c_direction_template_back0; er1_c_direction_template8; } switch (FEAT_TRAINS, SELF, er1_c_direction_template6, [ STORE_TEMP(-12, 0x10F), STORE_TEMP(32 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(6 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_c_direction_template_back0; er1_c_direction_template7; } switch (FEAT_TRAINS, SELF, er1_c_direction_template5, [ STORE_TEMP(-10, 0x10F), STORE_TEMP(16 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(5 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_c_direction_template_back0; er1_c_direction_template6; } switch (FEAT_TRAINS, SELF, er1_c_direction_template4, [ STORE_TEMP(-8, 0x10F), STORE_TEMP(8 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(4 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_c_direction_template_back0; er1_c_direction_template5; } switch (FEAT_TRAINS, SELF, er1_c_direction_template3, [ STORE_TEMP(-6, 0x10F), STORE_TEMP(4 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(3 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_c_direction_template_back0; er1_c_direction_template4; } switch (FEAT_TRAINS, SELF, er1_c_direction_template2, [ STORE_TEMP(-4, 0x10F), STORE_TEMP(2 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(2 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_c_direction_template_back0; er1_c_direction_template3; } switch (FEAT_TRAINS, SELF, er1_c_direction_template, [ STORE_TEMP(-2, 0x10F), STORE_TEMP(1 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m), 5), STORE_TEMP(1 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_c_direction_template_back0; er1_c_direction_template2; } switch (FEAT_TRAINS, SELF, er1_c_sprites_start, 0) { er1_c_direction_template; } switch (FEAT_TRAINS, SELF, er1_c_sprites_selfpos, [ STORE_TEMP( (var[0x9F, 0, 0x07] == 3) ? var[0x9C, 0, 0x0F] & 3 : (var[0x9F, 0, 0x07] == 7) ? (3 - var[0x9C, 0, 0x0F] & 3) : (var[0x9F, 0, 0x07] > 3) ? var[0x9A, 0, 0x0F] & 3 : (3 - var[0x9A, 0, 0x0F] & 3), 3) ]) { er1_c_sprites_start; } switch (FEAT_TRAINS, PARENT, er1_c_sprites_parent, [ STORE_TEMP(count_veh_id(er1_c), 0), STORE_TEMP(current_speed, 1), STORE_TEMP(date_of_last_service, 2), STORE_TEMP(vehicle_type_id, 4) ]) { er1_c_sprites_selfpos; } switch (FEAT_TRAINS, SELF, er1_c_sprites, ((extra_callback_info1 & 0xFF) >= 0x20) || (((extra_callback_info1 & 0xFF) == 0) && (var[0x62, 7, 1, 1] != 0)) ) { 1: dummy_sprites; er1_c_sprites_parent; } switch (FEAT_TRAINS, SELF, er1_can_attach_wagon_head, vehicle_type_id) { er1_h: return CB_RESULT_ATTACH_ALLOW; return string(STR_CAN_ATTACH_HEAD_ONLY); } switch (FEAT_TRAINS, SELF, er1_can_attach_wagon_car, vehicle_type_id) { er1_c: return CB_RESULT_ATTACH_ALLOW; return string(STR_CAN_ATTACH_OTHERCAR_ONLY); } switch (FEAT_TRAINS, SELF, er1_can_attach_wagon_motor, vehicle_type_id) { er1_m: return CB_RESULT_ATTACH_ALLOW; return string(STR_CAN_ATTACH_OTHERCAR_ONLY); } switch (FEAT_TRAINS, SELF, er1_can_attach_wagon_not_head, vehicle_type_id) { er1_m: return CB_RESULT_ATTACH_ALLOW; er1_c: return CB_RESULT_ATTACH_ALLOW; return string(STR_CAN_ATTACH_CAR_ONLY); } switch (FEAT_TRAINS, SELF, er1_can_attach_wagon_not_motor, vehicle_type_id) { er1_h: return CB_RESULT_ATTACH_ALLOW; er1_c: return CB_RESULT_ATTACH_ALLOW; return string(STR_CAN_ATTACH_OTHERCAR_ONLY); } switch (FEAT_TRAINS, PARENT, er1_can_attach_wagon_max, LOAD_TEMP(5)) { 0x1000: er1_can_attach_wagon_motor; 0x2001: er1_can_attach_wagon_not_head; 0x3002: er1_can_attach_wagon_motor; 0x3003: er1_can_attach_wagon_not_motor; 0x4005: er1_can_attach_wagon_not_head; 0x4006: er1_can_attach_wagon_motor; 0x500A: er1_can_attach_wagon_motor; 0x500B: er1_can_attach_wagon_not_motor; 0x500D: er1_can_attach_wagon_head; 0x6015: er1_can_attach_wagon_motor; 0x6016: er1_can_attach_wagon_motor; 0x702B: er1_can_attach_wagon_car; 0x702D: er1_can_attach_wagon_not_motor; 0x8056: er1_can_attach_wagon_motor; 0x805A: er1_can_attach_wagon_motor; 0x90AD: er1_can_attach_wagon_head; 0x90B5: er1_can_attach_wagon_head; return string(STR_CAN_ATTACH_OTHERCAR_ONLY); } switch (FEAT_TRAINS, PARENT, er1_can_attach_wagon_template12, [ STORE_TEMP(num_vehs_in_consist-24, 0x10F), STORE_TEMP(2048 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(12 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h) + LOAD_TEMP(5), 5) ]) { er1_can_attach_wagon_max; } switch (FEAT_TRAINS, PARENT, er1_can_attach_wagon_template11, [ STORE_TEMP(num_vehs_in_consist-22, 0x10F), STORE_TEMP(1024 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(11 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h) + LOAD_TEMP(5), 5) >= 4096 ]) { 1: er1_can_attach_wagon_max; er1_can_attach_wagon_template12; } switch (FEAT_TRAINS, PARENT, er1_can_attach_wagon_template10, [ STORE_TEMP(num_vehs_in_consist-20, 0x10F), STORE_TEMP(512 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(10 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h) + LOAD_TEMP(5), 5) >= 4096 ]) { 1: er1_can_attach_wagon_max; er1_can_attach_wagon_template11; } switch (FEAT_TRAINS, PARENT, er1_can_attach_wagon_template9, [ STORE_TEMP(num_vehs_in_consist-18, 0x10F), STORE_TEMP(256 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(9 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h) + LOAD_TEMP(5), 5) >= 4096 ]) { 1: er1_can_attach_wagon_max; er1_can_attach_wagon_template10; } switch (FEAT_TRAINS, PARENT, er1_can_attach_wagon_template8, [ STORE_TEMP(num_vehs_in_consist-16, 0x10F), STORE_TEMP(128 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(8 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h) + LOAD_TEMP(5), 5) >= 4096 ]) { 1: er1_can_attach_wagon_max; er1_can_attach_wagon_template9; } switch (FEAT_TRAINS, PARENT, er1_can_attach_wagon_template7, [ STORE_TEMP(num_vehs_in_consist-14, 0x10F), STORE_TEMP(64 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(7 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h) + LOAD_TEMP(5), 5) >= 4096 ]) { 1: er1_can_attach_wagon_max; er1_can_attach_wagon_template8; } switch (FEAT_TRAINS, PARENT, er1_can_attach_wagon_template6, [ STORE_TEMP(num_vehs_in_consist-12, 0x10F), STORE_TEMP(32 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(6 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h) + LOAD_TEMP(5), 5) >= 4096 ]) { 1: er1_can_attach_wagon_max; er1_can_attach_wagon_template7; } switch (FEAT_TRAINS, PARENT, er1_can_attach_wagon_template5, [ STORE_TEMP(num_vehs_in_consist-10, 0x10F), STORE_TEMP(16 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(5 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h) + LOAD_TEMP(5), 5) >= 4096 ]) { 1: er1_can_attach_wagon_max; er1_can_attach_wagon_template6; } switch (FEAT_TRAINS, PARENT, er1_can_attach_wagon_template4, [ STORE_TEMP(num_vehs_in_consist-8, 0x10F), STORE_TEMP(8 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(4 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h) + LOAD_TEMP(5), 5) >= 4096 ]) { 1: er1_can_attach_wagon_max; er1_can_attach_wagon_template5; } switch (FEAT_TRAINS, PARENT, er1_can_attach_wagon_template3, [ STORE_TEMP(num_vehs_in_consist-6, 0x10F), STORE_TEMP(4 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(3 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h) + LOAD_TEMP(5), 5) >= 4096 ]) { 1: er1_can_attach_wagon_max; er1_can_attach_wagon_template4; } switch (FEAT_TRAINS, PARENT, er1_can_attach_wagon_template2, [ STORE_TEMP(num_vehs_in_consist-4, 0x10F), STORE_TEMP(2 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(2 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h) + LOAD_TEMP(5), 5) >= 4096 ]) { 1: er1_can_attach_wagon_max; er1_can_attach_wagon_template3; } switch (FEAT_TRAINS, PARENT, er1_can_attach_wagon_template, [ STORE_TEMP(num_vehs_in_consist-2, 0x10F), STORE_TEMP(1 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m), 5), STORE_TEMP(1 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h) + LOAD_TEMP(5), 5) >= 4096 ]) { 1: er1_can_attach_wagon_max; er1_can_attach_wagon_template2; } switch (FEAT_TRAINS, SELF, er1_can_attach_wagon1, vehicle_type_id) { er1_h: er1_can_attach_wagon_template; er1_m: er1_can_attach_wagon_template; er1_c: er1_can_attach_wagon_template; return string(STR_CAN_ATTACH_SAME_MU_ONLY); } switch (FEAT_TRAINS, PARENT, er1_can_attach_wagon, count_veh_id(er1_h)) { 0: return string(STR_CAN_ATTACH_HEAD_ONLY); 1: er1_can_attach_wagon1; return string(STR_CAN_ATTACH_NO_AFTER_REAR_HEAD); } switch (FEAT_TRAINS, PARENT, er1_h_start_stop, count_veh_id(er1_h)) { 2: return CB_RESULT_NO_TEXT; return string(STR_START_STOP_NUMBER_OF_HEAD_CAR_MUST_BE_EVEN); } // Моторный самостоятельно выпускать из депо нельзя switch (FEAT_TRAINS, SELF, er1_m_start_stop, 0) { return string(STR_START_STOP_MOTORIZED_CAR_CANNOT_LEAVE_DEPOT); } // Визуализируем эффекты тяги у er1_m, только если локомотив - er1_h switch (FEAT_TRAINS, SELF, er1_m_create_effect_left, STORE_TEMP(create_effect(EFFECT_SPRITE_ELECTRIC, -1, 0, 0), 0x100)) { return 1; } switch (FEAT_TRAINS, SELF, er1_m_create_effect_right, STORE_TEMP(create_effect(EFFECT_SPRITE_ELECTRIC, 5, 0, 0), 0x100)) { return 1; } switch (FEAT_TRAINS, SELF, er1_m_create_effect_direction_max, LOAD_TEMP(5)) { 0x1003: er1_m_create_effect_left; 0x2003: er1_m_create_effect_right; 0x100B: er1_m_create_effect_left; 0x300B: er1_m_create_effect_left; 0x400B: er1_m_create_effect_right; 0x100D: er1_m_create_effect_left; 0x200D: er1_m_create_effect_right; 0x400D: er1_m_create_effect_right; 0x1013: er1_m_create_effect_left; 0x4013: er1_m_create_effect_left; 0x5013: er1_m_create_effect_right; 0x1019: er1_m_create_effect_left; 0x2019: er1_m_create_effect_right; 0x5019: er1_m_create_effect_right; 0x102D: er1_m_create_effect_left; 0x302D: er1_m_create_effect_left; 0x402D: er1_m_create_effect_right; 0x602D: er1_m_create_effect_right; 0x104D: er1_m_create_effect_left; 0x404D: er1_m_create_effect_left; 0x504D: er1_m_create_effect_right; 0x704D: er1_m_create_effect_right; 0x1059: er1_m_create_effect_left; 0x3059: er1_m_create_effect_left; 0x4059: er1_m_create_effect_right; 0x7059: er1_m_create_effect_right; 0x10AD: er1_m_create_effect_left; 0x30AD: er1_m_create_effect_left; 0x50AD: er1_m_create_effect_left; 0x60AD: er1_m_create_effect_right; 0x80AD: er1_m_create_effect_right; 0x10B5: er1_m_create_effect_left; 0x30B5: er1_m_create_effect_left; 0x40B5: er1_m_create_effect_right; 0x60B5: er1_m_create_effect_right; 0x80B5: er1_m_create_effect_right; 0x1135: er1_m_create_effect_left; 0x4135: er1_m_create_effect_left; 0x5135: er1_m_create_effect_right; 0x7135: er1_m_create_effect_right; 0x9135: er1_m_create_effect_right; 0x1159: er1_m_create_effect_left; 0x3159: er1_m_create_effect_left; 0x5159: er1_m_create_effect_left; 0x6159: er1_m_create_effect_right; 0x9159: er1_m_create_effect_right; 0x12B5: er1_m_create_effect_left; 0x32B5: er1_m_create_effect_left; 0x52B5: er1_m_create_effect_left; 0x62B5: er1_m_create_effect_right; 0x82B5: er1_m_create_effect_right; 0xA2B5: er1_m_create_effect_right; return visual_effect_and_powered(VISUAL_EFFECT_ELECTRIC, -1 +5, DISABLE_WAGON_POWER); } switch (FEAT_TRAINS, SELF, er1_m_create_effect_direction_template1, STORE_TEMP(LOAD_TEMP(5) + LOAD_TEMP(6), 5)) { er1_m_create_effect_direction_max; } switch (FEAT_TRAINS, SELF, er1_m_create_effect_direction_template_back12, [ STORE_TEMP(24, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { er1_m_create_effect_direction_template1; } switch (FEAT_TRAINS, SELF, er1_m_create_effect_direction_template_back11, [ STORE_TEMP(22, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_m_create_effect_direction_template1; er1_m_create_effect_direction_template_back12; } switch (FEAT_TRAINS, SELF, er1_m_create_effect_direction_template_back10, [ STORE_TEMP(20, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_m_create_effect_direction_template1; er1_m_create_effect_direction_template_back11; } switch (FEAT_TRAINS, SELF, er1_m_create_effect_direction_template_back9, [ STORE_TEMP(18, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_m_create_effect_direction_template1; er1_m_create_effect_direction_template_back10; } switch (FEAT_TRAINS, SELF, er1_m_create_effect_direction_template_back8, [ STORE_TEMP(16, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_m_create_effect_direction_template1; er1_m_create_effect_direction_template_back9; } switch (FEAT_TRAINS, SELF, er1_m_create_effect_direction_template_back7, [ STORE_TEMP(14, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_m_create_effect_direction_template1; er1_m_create_effect_direction_template_back8; } switch (FEAT_TRAINS, SELF, er1_m_create_effect_direction_template_back6, [ STORE_TEMP(12, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_m_create_effect_direction_template1; er1_m_create_effect_direction_template_back7; } switch (FEAT_TRAINS, SELF, er1_m_create_effect_direction_template_back5, [ STORE_TEMP(10, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_m_create_effect_direction_template1; er1_m_create_effect_direction_template_back6; } switch (FEAT_TRAINS, SELF, er1_m_create_effect_direction_template_back4, [ STORE_TEMP(8, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_m_create_effect_direction_template1; er1_m_create_effect_direction_template_back5; } switch (FEAT_TRAINS, SELF, er1_m_create_effect_direction_template_back3, [ STORE_TEMP(6, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_m_create_effect_direction_template1; er1_m_create_effect_direction_template_back4; } switch (FEAT_TRAINS, SELF, er1_m_create_effect_direction_template_back2, [ STORE_TEMP(4, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_m_create_effect_direction_template1; er1_m_create_effect_direction_template_back3; } switch (FEAT_TRAINS, SELF, er1_m_create_effect_direction_template_back1, [ STORE_TEMP(2, 0x10F), STORE_TEMP((LOAD_TEMP(7) == er1_m) + (2 * LOAD_TEMP(5)), 5), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_m_create_effect_direction_template1; er1_m_create_effect_direction_template_back2; } switch (FEAT_TRAINS, SELF, er1_m_create_effect_direction_template_back0, [ STORE_TEMP(0, 0x10F), STORE_TEMP(var[0x61, 0, 0xFFFF, 0xC6], 7) == er1_h ]) { 1: er1_m_create_effect_direction_template1; er1_m_create_effect_direction_template_back1; } switch (FEAT_TRAINS, SELF, er1_m_create_effect_direction_template12, [ STORE_TEMP(-24, 0x10F), STORE_TEMP(2048 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(12 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) ]) { er1_m_create_effect_direction_template_back0; } switch (FEAT_TRAINS, SELF, er1_m_create_effect_direction_template11, [ STORE_TEMP(-22, 0x10F), STORE_TEMP(1024 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(11 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_m_create_effect_direction_template_back0; er1_m_create_effect_direction_template12; } switch (FEAT_TRAINS, SELF, er1_m_create_effect_direction_template10, [ STORE_TEMP(-20, 0x10F), STORE_TEMP(512 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(10 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_m_create_effect_direction_template_back0; er1_m_create_effect_direction_template11; } switch (FEAT_TRAINS, SELF, er1_m_create_effect_direction_template9, [ STORE_TEMP(-18, 0x10F), STORE_TEMP(256 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(9 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_m_create_effect_direction_template_back0; er1_m_create_effect_direction_template10; } switch (FEAT_TRAINS, SELF, er1_m_create_effect_direction_template8, [ STORE_TEMP(-16, 0x10F), STORE_TEMP(128 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(8 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_m_create_effect_direction_template_back0; er1_m_create_effect_direction_template9; } switch (FEAT_TRAINS, SELF, er1_m_create_effect_direction_template7, [ STORE_TEMP(-14, 0x10F), STORE_TEMP(64 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(7 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_m_create_effect_direction_template_back0; er1_m_create_effect_direction_template8; } switch (FEAT_TRAINS, SELF, er1_m_create_effect_direction_template6, [ STORE_TEMP(-12, 0x10F), STORE_TEMP(32 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(6 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_m_create_effect_direction_template_back0; er1_m_create_effect_direction_template7; } switch (FEAT_TRAINS, SELF, er1_m_create_effect_direction_template5, [ STORE_TEMP(-10, 0x10F), STORE_TEMP(16 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(5 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_m_create_effect_direction_template_back0; er1_m_create_effect_direction_template6; } switch (FEAT_TRAINS, SELF, er1_m_create_effect_direction_template4, [ STORE_TEMP(-8, 0x10F), STORE_TEMP(8 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(4 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_m_create_effect_direction_template_back0; er1_m_create_effect_direction_template5; } switch (FEAT_TRAINS, SELF, er1_m_create_effect_direction_template3, [ STORE_TEMP(-6, 0x10F), STORE_TEMP(4 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(3 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_m_create_effect_direction_template_back0; er1_m_create_effect_direction_template4; } switch (FEAT_TRAINS, SELF, er1_m_create_effect_direction_template2, [ STORE_TEMP(-4, 0x10F), STORE_TEMP(2 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m) + LOAD_TEMP(5), 5), STORE_TEMP(2 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_m_create_effect_direction_template_back0; er1_m_create_effect_direction_template3; } switch (FEAT_TRAINS, SELF, er1_m_create_effect_direction_template, [ STORE_TEMP(-2, 0x10F), STORE_TEMP(1 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_m), 5), STORE_TEMP(1 * 4096 * (var[0x61, 0, 0xFFFF, 0xC6] == er1_h), 6) >= 4096 ]) { 1: er1_m_create_effect_direction_template_back0; er1_m_create_effect_direction_template2; } switch (FEAT_TRAINS, PARENT, er1_m_create_effect, vehicle_type_id == er1_h) { 1: er1_m_create_effect_direction_template; return 0; } // Даём тягу, только если локомотив - er1_h switch (FEAT_TRAINS, PARENT, er1_m_power, vehicle_type_id == er1_h) { 1: return int (853 * 0.9865); return 0; } // Допускается эксплуатация с пассажирами только если голова - er1_h switch (FEAT_TRAINS, PARENT, er1_h_cargo_capacity, (vehicle_type_id == er1_h)) { 1: return 88; return 0; } switch (FEAT_TRAINS, PARENT, er1_m_cargo_capacity, (vehicle_type_id == er1_h) ) { 1: return 110; return 0; } switch (FEAT_TRAINS, PARENT, er1_c_cargo_capacity, (vehicle_type_id == er1_h) ) { 1: return 110; return 0; } switch (FEAT_TRAINS, SELF, er1_cargo_subtype_text, cargo_subtype) { 0: return string(STR_REFIT_FACTORY_6211, string(STR_REFIT_TTD_53)); 1: return string(STR_REFIT_FACTORY_6211, string(STR_REFIT_TTD_59)); return CB_RESULT_NO_TEXT; } item (FEAT_TRAINS, er1_h) { property { name: string(STR_ER1_H_NAME); climates_available: bitmask(CLIMATE_TEMPERATE, CLIMATE_ARCTIC, CLIMATE_TROPICAL, CLIMATE_TOYLAND); introduction_date: date(1957 - delta_age, 1, 1); model_life: 1962 >= 2050 ? VEHICLE_NEVER_EXPIRES : (1957 -1962 -delta_age < retire_early_default ? 1962 -1957 +delta_age : -retire_early_default); retire_early: 1957 -1962 -delta_age < retire_early_default ? retire_early_default+delta_age : 1957 -1962 -delta_age; vehicle_life: 30; reliability_decay: 20; cargo_allow_refit: [PASS]; default_cargo_type: PASS; loading_speed: 12; cost_factor: 2; running_cost_factor: 4; sprite_id: SPRITE_ID_NEW_TRAIN; speed: 130 km/h; misc_flags: bitmask(TRAIN_FLAG_TILT, TRAIN_FLAG_MU); refit_cost: 0; track_type: enable_our_own_tracks ? ERD1 : ELRL; ai_special_flag: AI_FLAG_PASSENGER; power: 1 hpM; running_cost_base: RUNNING_COST_ELECTRIC; cargo_capacity: 88; weight: 38.5 ton; engine_class: ENGINE_CLASS_ELECTRIC; length: 8; effect_spawn_model_and_powered: EFFECT_SPAWN_MODEL_NONE; } graphics { default: er1_h_sprites; purchase: er1_h_purchase_sprites; articulated_part: articulated_part_dummy4; can_attach_wagon: er1_can_attach_wagon; start_stop: er1_h_start_stop; speed: speed_after30_130to100; purchase_speed: return 130; additional_text: return string(STR_ER1_H_PURCHASE_HINT, string(STR_SECTIONS_EMU_4_6_8_10)); cargo_subtype_text: er1_cargo_subtype_text; power: return 0; cargo_capacity: er1_h_cargo_capacity; } } item (FEAT_TRAINS, er1_m) { property { name: string(STR_ER1_M_NAME); climates_available: bitmask(CLIMATE_TEMPERATE, CLIMATE_ARCTIC, CLIMATE_TROPICAL, CLIMATE_TOYLAND); introduction_date: date(1957 - delta_age, 1, 1); model_life: 1962 >= 2050 ? VEHICLE_NEVER_EXPIRES : (1957 -1962 -delta_age < retire_early_default ? 1962 -1957 +delta_age : -retire_early_default); retire_early: 1957 -1962 -delta_age < retire_early_default ? retire_early_default+delta_age : 1957 -1962 -delta_age; vehicle_life: 30; reliability_decay: 20; cargo_allow_refit: [PASS]; default_cargo_type: PASS; loading_speed: 12; cost_factor: 2; running_cost_factor: 4; sprite_id: SPRITE_ID_NEW_TRAIN; misc_flags: bitmask(TRAIN_FLAG_TILT, TRAIN_FLAG_MU); refit_cost: 0; track_type: enable_our_own_tracks ? ERD1 : ELRL; ai_special_flag: AI_FLAG_PASSENGER; power: 853 hpM; running_cost_base: RUNNING_COST_ELECTRIC; cargo_capacity: 110; weight: 52.5 ton; engine_class: ENGINE_CLASS_ELECTRIC; tractive_effort_coefficient: (35.0/(52.5)/9.8); length: 8; effect_spawn_model_and_powered: EFFECT_SPAWN_MODEL_ELECTRIC; } graphics { default: er1_m_sprites; purchase: er1_m_purchase_sprites; articulated_part: articulated_part_dummy4; can_attach_wagon: er1_can_attach_wagon; start_stop: er1_m_start_stop; speed: speed_after30_130to100; purchase_speed: return 130; additional_text: return string(STR_ER1_M_PURCHASE_HINT, string(STR_SECTIONS_EMU_4_6_8_10)); cargo_subtype_text: er1_cargo_subtype_text; power: er1_m_power; cargo_capacity: er1_m_cargo_capacity; // visual_effect_and_powered: electric_visual_effect_and_powered(0); create_effect: er1_m_create_effect; } } item (FEAT_TRAINS, er1_c) { property { name: string(STR_ER1_C_NAME); climates_available: bitmask(CLIMATE_TEMPERATE, CLIMATE_ARCTIC, CLIMATE_TROPICAL, CLIMATE_TOYLAND); introduction_date: date(1957 - delta_age, 1, 1); model_life: 1962 >= 2050 ? VEHICLE_NEVER_EXPIRES : (1957 -1962 -delta_age < retire_early_default ? 1962 -1957 +delta_age : -retire_early_default); retire_early: 1957 -1962 -delta_age < retire_early_default ? retire_early_default+delta_age : 1957 -1962 -delta_age; vehicle_life: 30; reliability_decay: 20; cargo_allow_refit: [PASS]; default_cargo_type: PASS; loading_speed: 12; cost_factor: 2; running_cost_factor: 4; sprite_id: SPRITE_ID_NEW_TRAIN; misc_flags: bitmask(TRAIN_FLAG_TILT, TRAIN_FLAG_MU); refit_cost: 0; track_type: enable_our_own_tracks ? ERD1 : ELRL; ai_special_flag: AI_FLAG_PASSENGER; power: 1 hpM; running_cost_base: RUNNING_COST_ELECTRIC; cargo_capacity: 110; weight: 36.9 ton; engine_class: ENGINE_CLASS_ELECTRIC; length: 8; effect_spawn_model_and_powered: EFFECT_SPAWN_MODEL_NONE; } graphics { default: er1_c_sprites; purchase: er1_c_purchase_sprites; articulated_part: articulated_part_dummy4; additional_text: return string(STR_ER1_C_PURCHASE_HINT, string(STR_SECTIONS_EMU_4_6_8_10)); cargo_subtype_text: er1_cargo_subtype_text; speed: speed_after30_130to100; purchase_speed: return 130; power: return 0; can_attach_wagon: er1_can_attach_wagon; start_stop: return string(STR_START_STOP_HEAD_REQUIRED); cargo_capacity: er1_c_cargo_capacity; } } if (enable_long_names) { item (FEAT_TRAINS, er1_h) { property { name: string(STR_ER1_H_NAME_LONG); } } item (FEAT_TRAINS, er1_m) { property { name: string(STR_ER1_M_NAME_LONG); } } item (FEAT_TRAINS, er1_c) { property { name: string(STR_ER1_C_NAME_LONG); } } } /* #include "src/emu/er2.pnml" #include "src/emu/epg.pnml" #include "src/emu/epr.pnml" #include "src/emu/ed2t.pnml" #include "src/emu/ed9t.pnml" #include "src/emu/er200.pnml" #include "src/emu/er9p.pnml" #include "src/emu/er9m.pnml" #include "src/emu/er9e.pnml" #include "src/emu/evs1.pnml" #include "src/emu/evs2.pnml" #include "src/emu/ed4m.pnml" #include "src/emu/sm6.pnml" #include "src/emu/es1.pnml" #include "src/emu/sr3.pnml" */
Mark as private
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
forever