equal
deleted
inserted
replaced
15 #include "screenshot.h" |
15 #include "screenshot.h" |
16 #include "waypoint.h" |
16 #include "waypoint.h" |
17 #include "industry.h" |
17 #include "industry.h" |
18 #include "variables.h" |
18 #include "variables.h" |
19 #include "newgrf_text.h" |
19 #include "newgrf_text.h" |
20 #include "table/landscape_const.h" |
|
21 #include "table/control_codes.h" |
20 #include "table/control_codes.h" |
22 #include "music.h" |
21 #include "music.h" |
23 #include "date.h" |
22 #include "date.h" |
24 #include "industry.h" |
23 #include "industry.h" |
25 #include "helpers.hpp" |
24 #include "helpers.hpp" |
|
25 #include "cargotype.h" |
26 |
26 |
27 /* for opendir/readdir/closedir */ |
27 /* for opendir/readdir/closedir */ |
28 # include "fios.h" |
28 # include "fios.h" |
29 |
29 |
30 char _userstring[128]; |
30 char _userstring[128]; |
559 |
559 |
560 case SCC_CARGO_SHORT: { /* {SHORTCARGO} */ |
560 case SCC_CARGO_SHORT: { /* {SHORTCARGO} */ |
561 // Short description of cargotypes. Layout: |
561 // Short description of cargotypes. Layout: |
562 // 8-bit = cargo type |
562 // 8-bit = cargo type |
563 // 16-bit = cargo count |
563 // 16-bit = cargo count |
564 StringID cargo_str = _cargo_types_base_values[_opt_ptr->landscape].units_volume[GetInt32(&argv)]; |
564 StringID cargo_str = GetCargo(GetInt32(&argv))->units_volume; |
565 switch (cargo_str) { |
565 switch (cargo_str) { |
566 case STR_TONS: { |
566 case STR_TONS: { |
567 int32 args[1]; |
567 int32 args[1]; |
568 assert(_opt_ptr->units < lengthof(units)); |
568 assert(_opt_ptr->units < lengthof(units)); |
569 args[0] = GetInt32(&argv) * units[_opt_ptr->units].w_m >> units[_opt_ptr->units].w_s; |
569 args[0] = GetInt32(&argv) * units[_opt_ptr->units].w_m >> units[_opt_ptr->units].w_s; |
683 case SCC_CARGO: { // {CARGO} |
683 case SCC_CARGO: { // {CARGO} |
684 // Layout now is: |
684 // Layout now is: |
685 // 8bit - cargo type |
685 // 8bit - cargo type |
686 // 16-bit - cargo count |
686 // 16-bit - cargo count |
687 CargoID cargo = GetInt32(&argv); |
687 CargoID cargo = GetInt32(&argv); |
688 StringID cargo_str = (cargo == CT_INVALID) ? (StringID)STR_8838_N_A : _cargoc.names_long[cargo]; |
688 StringID cargo_str = (cargo == CT_INVALID) ? (StringID)STR_8838_N_A : GetCargo(cargo)->quantifier; |
689 buff = GetStringWithArgs(buff, cargo_str, argv++, last); |
689 buff = GetStringWithArgs(buff, cargo_str, argv++, last); |
690 break; |
690 break; |
691 } |
691 } |
692 |
692 |
693 case SCC_POWER: { // {POWER} |
693 case SCC_POWER: { // {POWER} |