Jonathan G Rennison
5acf18fb37
NewGRF: Allow mapping a feature ID to the town scope
2023-03-11 22:23:40 +00:00
Jonathan G Rennison
57c5cc32d0
VarAction2: Improve handling of feature changes with parent scopes
2023-03-11 16:08:36 +00:00
Jonathan G Rennison
25ed7c2b53
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/music.cpp
# src/script/api/script_company.cpp
# src/script/api/script_event_types.cpp
# src/script/api/script_group.cpp
# src/script/api/script_object.cpp
# src/script/api/script_road.cpp
2023-03-11 00:06:13 +00:00
Joan Josep
d80f193e74
Fix: Improve grfmessage for ShipVehicleChangeInfo. ( #10558 )
2023-03-08 20:59:01 +00:00
Jonathan G Rennison
0fc9223724
VarAction2: Support extended bytes for var 0x7E proc with more_action2_ids
2023-03-07 22:27:24 +00:00
Jonathan G Rennison
de17e0aa4d
NewGRF: Add extension for more Action2 set IDs
2023-03-05 14:40:06 +00:00
Jonathan G Rennison
5d0ad5625b
Fix : [NewGRF] Object and road stop ignore property handlers ( #10525 )
...
* Fix: IgnoreObjectProperty did not handle object property 0x18
* Fix: IgnoreRoadStopProperty did not handle properties 0x0E - 0x12, 0x15
2023-03-01 01:19:39 +01:00
Jonathan G Rennison
412eab22c0
Fix: IgnoreRoadStopProperty did not handle properties 0x0E - 0x12, 0x15
2023-02-28 22:25:09 +00:00
Jonathan G Rennison
8e900c7a87
Fix: IgnoreObjectProperty did not handle object property 0x18
2023-02-28 22:25:07 +00:00
Jonathan G Rennison
4c1406a4b5
Add: NewGRF road stops
2023-02-26 21:28:30 +01:00
Jonathan G Rennison
2ffb245b33
GRF: Add property mapping ID extension mechanism
...
Bump property_mapping feature version to 3
2023-02-19 23:13:23 +00:00
Jonathan G Rennison
3497d0dcdb
Add road/tram type properties to set road vehicle collision mode
2023-02-19 14:30:21 +00:00
Jonathan G Rennison
3b9015ef7a
Fix successfully mapped properties in HandleAction0PropertyDefault
2023-02-13 23:49:53 +00:00
Jonathan G Rennison
c756b8de8e
GRF: Add second success indicator mechanism for feature tests and ID mappings
2023-02-13 20:05:30 +00:00
Jonathan G Rennison
64699d94c9
GRF: Only use extended bytes for object IDs if feature is tested for
2023-02-12 22:18:23 +00:00
Jonathan G Rennison
a85b3d7de7
GRF: Add generic mechanism to observe which features have been tested
2023-02-12 22:18:23 +00:00
Jonathan G Rennison
dceafaf2db
GRF: Initial support for > 255 road stop specs per GRF
...
Add new variable for road stop info of nearby tiles
Bump roadstops version
2023-02-12 20:35:18 +00:00
Jonathan G Rennison
b539799c0a
GRF: Fix c0c9c66f
: ObjectMapSpriteGroup with missing object specs
2023-02-12 13:05:51 +00:00
Jonathan G Rennison
c0c9c66f7b
GRF: Initial support for > 255 objects per GRF
2023-02-11 16:22:25 +00:00
Peter Nelson
74e4556a85
Codechange: Store objectspecs in std::vector instead of flat array.
...
(cherry picked from commit 1ae263c5467105820e4d770b3d57d25ba01e22b1)
2023-02-11 00:30:40 +00:00
Peter Nelson
d34e1bbbc1
Codechange: Bind objectspecs to classes once all finalised.
...
(cherry picked from commit 5f4a8f730b8982cbec7eec5e2331f0bc9217e69e)
2023-02-11 00:30:40 +00:00
Jonathan G Rennison
483e3172af
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/core/strong_typedef_type.hpp
# src/gfx.cpp
# src/group_cmd.cpp
# src/industry_cmd.cpp
# src/map_func.h
# src/newgrf_debug_gui.cpp
# src/order_cmd.cpp
# src/pathfinder/follow_track.hpp
# src/rail_cmd.cpp
# src/road_cmd.cpp
# src/road_gui.cpp
# src/saveload/saveload.cpp
# src/screenshot.cpp
# src/smallmap_gui.cpp
# src/station_cmd.cpp
# src/strings.cpp
# src/tile_type.h
# src/timetable_gui.cpp
# src/town_cmd.cpp
# src/train_cmd.cpp
# src/viewport.cpp
2023-02-10 17:19:35 +00:00
Michael Lutz
5daaa45e4a
Add: [NewGRF] Second vehicle property for additional callback flags.
...
(cherry picked from commit 2d73076056
)
2023-02-05 22:40:03 +00:00
Michael Lutz
3fdf57cbd6
Change: [NewGRF] Extend the D8xx (DCxx) string area up to FFFF.
...
This adds the Exxx and Fxxx blocks to the usable range for NewGRF
local strings. TTDPatch uses these ranges for internal strings, but as
we don't support any of them anyway, it is "free" real estate for us.
(cherry picked from commit f5394ed2ef
)
2023-02-05 22:40:03 +00:00
Jonathan G Rennison
1272bec13b
Road stops: Add height property for build window preview
2023-02-05 17:40:14 +00:00
Jonathan G Rennison
91d736ace5
GRF: Fix ignorable unknown mapped road type and road stop properties
2023-02-05 16:07:23 +00:00
Michael Lutz
2d73076056
Add: [NewGRF] Second vehicle property for additional callback flags.
2023-01-30 22:00:56 +01:00
Michael Lutz
f5394ed2ef
Change: [NewGRF] Extend the D8xx (DCxx) string area up to FFFF.
...
This adds the Exxx and Fxxx blocks to the usable range for NewGRF
local strings. TTDPatch uses these ranges for internal strings, but as
we don't support any of them anyway, it is "free" real estate for us.
2023-01-30 22:00:56 +01:00
rubidium42
6ba55e663e
Codechange: do not hide variables with other variables
2023-01-29 07:21:34 +01:00
Jonathan G Rennison
a9100e93cb
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/group_cmd.cpp
# src/lang/korean.txt
# src/lang/simplified_chinese.txt
# src/script/api/script_rail.cpp
# src/tunnelbridge_cmd.cpp
2023-01-23 19:10:07 +00:00
Rubidium
fe2bcd2a58
Codechange: migrate size related functions to Map structure
2023-01-21 17:11:40 +01:00
Francis Herne
01be423237
Fix #10362 : NewGRF bridges without speed limits.
...
For bridges, a max speed of 0xFFFF (i.e. no effective limit)
is no longer displayed as a limit in the UI.
A max speed of 0 is also considered unlimited, for similarity to the
roadtype and railtype interface.
2023-01-19 22:24:33 +01:00
Jonathan G Rennison
1bfd96c7f2
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/3rdparty/fmt/core.h
# src/command_type.h
# src/console_cmds.cpp
# src/core/overflowsafe_type.hpp
# src/landscape.cpp
# src/network/network.cpp
# src/newgrf_object.h
# src/object_cmd.cpp
# src/order_gui.cpp
# src/saveload/vehicle_sl.cpp
# src/script/api/script_industrytype.cpp
# src/script/api/script_object.hpp
# src/script/api/script_town.cpp
# src/table/object_land.h
# src/timetable_cmd.cpp
# src/tree_cmd.cpp
# src/vehicle_gui.cpp
# src/window.cpp
2023-01-15 19:28:37 +00:00
PeterN
2355882ec1
Codechange: Remove object enabled
flag and shuffle members. ( #10358 )
...
`enabled` flag is replaced with IsEnabled() which checks if views is
non-zero.
ObjectSpec is shuffled to reduce its memory footprint.
2023-01-15 10:58:03 +00:00
Jonathan G Rennison
5b490b243d
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/industry_cmd.cpp
# src/landscape.cpp
# src/object_cmd.cpp
# src/rail_cmd.cpp
# src/script/api/script_tile.cpp
# src/table/settings/difficulty_settings.ini
# src/table/settings/world_settings.ini
# src/terraform_cmd.cpp
# src/tilearea_type.h
# src/tree_cmd.cpp
# src/tree_cmd.h
# src/tree_gui.cpp
# src/water_cmd.cpp
2023-01-14 16:49:17 +00:00
PeterN
6a0d1c7c19
Fix: Link variants to parents when finalising engines. ( #10346 )
...
This ensures that definition-order of engines within the NewGRF does not matter.
2023-01-13 19:22:31 +00:00
Jonathan G Rennison
62d524eaef
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/saveload/station_sl.cpp
# src/saveload/town_sl.cpp
# src/spritecache.cpp
# src/timetable_gui.cpp
2023-01-06 20:02:04 +00:00
PeterN
1b1aa682a6
Fix: Don't assume engclass 2 should be elrail. ( #10315 )
...
When disabling/enabling elrail, there is an assumption that `engclass` of 2
means the engine will run on elrail. While this holds for default engines,
NewGRFs can do other things.
To resolve this we store the intended railtype so that toggling elrail will
restore to the correct type.
2023-01-06 00:44:57 +00:00
Jonathan G Rennison
b9dad1818b
Add setting to disable NewGRF inflation flag
2022-12-28 01:58:03 +00:00
Jonathan G Rennison
64c210f770
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/build_vehicle_gui.cpp
# src/engine.cpp
# src/engine_func.h
# src/group_gui.cpp
# src/lang/english.txt
# src/newgrf.cpp
# src/saveload/oldloader_sl.cpp
# src/timetable_cmd.cpp
# src/timetable_cmd.h
# src/timetable_gui.cpp
2022-12-28 01:46:29 +00:00
Jonathan G Rennison
58d841486e
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/os/windows/font_win32.cpp
# src/script/api/script_object.hpp
# src/town_cmd.cpp
# src/train_cmd.cpp
# src/viewport.cpp
# src/viewport_func.h
2022-12-27 01:00:40 +00:00
Francis Herne
6caed5f15e
Add: Slope-aware and roadtype-specific one-way sprites. ( #10282 )
2022-12-26 15:06:21 -05:00
PeterN
4f26f6b8aa
Cleanup: Simplify GRFLabel linked-list with std::vector. ( #10284 )
2022-12-25 22:32:22 +00:00
Peter Nelson
3485709f53
Add: Additional vehicle flags to control variants.
2022-12-25 16:41:58 +00:00
Peter Nelson
85814b29d4
Feature: Vehicle add-ons can now group engines in purchase list.
...
Grouped engines are collapsed by default but can be expanded. This allows
similar engines to be grouped together to avoid cluttering the list.
Suggested uses for this are e.g.:
* Liveries; same stats but different paint job.
* Re-gearing; engine design is mostly the same but different stats.
... but avoiding complex hidden cargo subtype refit systems.
Grouped engines are otherwise separate, so can be independently
autoreplaced, even between variants.
2022-12-25 16:41:58 +00:00
peter1138
d7f561a400
Change: Add variant property to engines.
2022-12-25 16:41:58 +00:00
PeterN
7b5edba76c
Change: Support flipping shorter engines without NewGRF support. ( #10262 )
...
* Change: Support flipping shorter engines without NewGRF support.
* Cleanup: Remove write-only prop27_set temporary flag.
2022-12-23 21:02:14 +00:00
Jonathan G Rennison
3877bb31ef
Changing day length or date no longer changes time in minutes
...
Add offset variables for scaled date ticks.
Adjust offset when changing day length or date, such that scaled
date ticks remain the same.
Store _scaled_tick_counter and scaled date ticks offset in the savagame.
2022-12-16 19:15:46 +00:00
Jonathan G Rennison
9038c849ab
VarAction2: Use scaled tick counter for NewGRF variable 0x0A
2022-12-15 18:39:47 +00:00
Jonathan G Rennison
12b20376b3
Add new landscape flag to enable drawing rocks covered by snow
2022-12-12 23:06:07 +00:00