Skip to content

Commit

Permalink
Rename Aciton0 ship properties to match nml
Browse files Browse the repository at this point in the history
  • Loading branch information
ldpl committed Jul 11, 2023
1 parent 845e4f7 commit c513a53
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
11 changes: 11 additions & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
- Fix `var(...)` call in `Switch` code not accepting `param` value without parentheses.
- Fix default purchase sprite for auto-articulated trains.

- Rename `speed` Action 0 property for ships to `max_speed` for consinstency with other vehile types.
- Rename Action 0 ship properties to match nml:
- `cargo_type` to `default_cargo_type`
- `sound` to `sound_effect`
- `ocean_speed` to `ocean_speed_fraction`
- `canal_speed` to `canal_speed_fraction`
- `flags` to `misc_flags`
- `refit_classes` to `refittable_cargo_classes`
- `non_refit_classes` to `non_refittable_cargo_classes`
- Add `id_map_file` parameter to `BaseNewGRF` constructor and `reserve_ids` and `resolve_id` methods to manage auto-assigned (string) IDs.
- Use `AlternativeSprites` instead of sprite tuples.
- Add Action0 properties for road types.
Expand All @@ -31,9 +40,11 @@
- Allow to use objects with id as a variant_group value in Aciton0.
- Use IDProperty for `sort_purchase_list` in Action 0 for vehicles.

- lib: Add `Ship` sprite generator.
- lib: Rename `kmhishph` method to `kmhish` in `Train` and `RoadVehicle`.
- lib: Make `_set_callbacks` return list of sprites to allow adding graphics.
- lib: Make auto-articulated parts use auto-assigned(string) IDs.
- lib: Support road vehicle property callbacks in `CallbackMananger`.
- lib: Fix RoadVehicle name.
- lib: Fix `CallbackManager` exceptions.
- lib: Fix incorect livery for `Train` wagons.
Expand Down
18 changes: 9 additions & 9 deletions grf/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,20 +389,20 @@ def py(self, context):
0x08: ('sprite_id', 'B'), # Sprite (FF for new graphics)
0x09: ('is_refittable', 'B'), # Refittable (0 no, 1 yes)
0x0A: ('cost_factor', 'B'), # Cost factor
0x0B: ('speed', 'B'), # Speed in mph*3.2
0x0C: ('cargo_type', 'B'), # Cargo type, see CargoTypes
0x0D: ('capacity', 'W'), # Capacity
0x0B: ('max_speed', 'B'), # Speed in mph*3.2
0x0C: ('default_cargo_type', 'B'), # Cargo type, see CargoTypes
0x0D: ('cargo_capacity', 'W'), # Capacity
0x0F: ('running_cost_factor', 'B'), # Running cost factor
0x10: ('sound', 'B'), # Sound effect type (4=cargo ship, 5=passenger ship)
0x10: ('sound_effect', 'B'), # Sound effect type (4=cargo ship, 5=passenger ship)
0x11: ('refittable_cargo_types', 'D'), # v≥1 Bit mask of cargo types available for refitting, see column 2 (bit values) in CargoTypes
0x12: ('cb_flags', 'B'), # Callback flags bit mask, see below
0x13: ('refit_cost', 'B'), # Refit cost, using 1/32 of the default refit cost base
0x14: ('ocean_speed', 'B'), # Ocean speed fraction, sets fraction of top speed available in the ocean; e.g. 00=100%, 80=50%, FF=0.4%
0x15: ('canal_speed', 'B'), # Canal speed fraction, same as above but for canals and rivers
0x14: ('ocean_speed_fraction', 'B'), # Ocean speed fraction, sets fraction of top speed available in the ocean; e.g. 00=100%, 80=50%, FF=0.4%
0x15: ('canal_speed_fraction', 'B'), # Canal speed fraction, same as above but for canals and rivers
0x16: ('retire_early', 'b'), # Retire vehicle early, this many years before the end of phase 2 (see Action0General)
0x17: ('flags', 'B'), # Miscellaneous vehicle flags
0x18: ('refit_classes', 'W'), # Refittable cargo classes, see train prop. 28
0x19: ('non_refit_classes', 'W'), # Non-refittable cargo classes, see train prop. 29
0x17: ('misc_flags', 'B'), # Miscellaneous vehicle flags
0x18: ('refittable_cargo_classes', 'W'), # Refittable cargo classes, see train prop. 28
0x19: ('non_refittable_cargo_classes', 'W'), # Non-refittable cargo classes, see train prop. 29
0x1A: ('introduction_date', DateProperty()), # Long format introduction date
0x1B: ('sort_purchase_list', IDProperty(extended=True)), # Sort the purchase list
0x1C: ('visual_effect', 'B'), # Visual effect
Expand Down

0 comments on commit c513a53

Please sign in to comment.