Feature #3828

Make unit conversions work with non-constant values

Added by planetmaker over 5 years ago. Updated over 5 years ago.

Status:ConfirmedStart date:2012-03-15
Priority:NormalDue date:
Assignee:-% Done:

50%

Category:-
Target version:-

Description

calling nmlc test.nml on the attached NewGRF gives a
nmlc: "test.nml", line 53: Unit conversion specified for property, but no constant value found
while it should just use the parameter value (without conversion probably) as the property value.
Mind, if that is solved, the grf won't build due to missing graphics.

test.nml (2.4 KB) planetmaker, 2012-03-15 12:20

english.lng (240 Bytes) planetmaker, 2012-03-15 12:20

Associated revisions

Revision 1902:36c82e452300
Added by Hirundo over 5 years ago

Change #3828: Allow the 'nfo' unit to be used with non-constant values.

Revision 2017:52f6c62df5e5
Added by Hirundo over 5 years ago

Change #3828: Allow the 'nfo' unit to be used with non-constant values.

Revision 1902:36c82e452300
Added by Hirundo over 5 years ago

Change #3828: Allow the 'nfo' unit to be used with non-constant values.

Revision 2017:52f6c62df5e5
Added by Hirundo over 5 years ago

Change #3828: Allow the 'nfo' unit to be used with non-constant values.

Revision 1918:1b2f8aa72839
Added by Hirundo over 5 years ago

Feature #3828: Unit conversions for non-constant values.

Revision 1918:1b2f8aa72839
Added by Hirundo over 5 years ago

Feature #3828: Unit conversions for non-constant values.

Revision 1924:fb4d11bda091
Added by Hirundo over 5 years ago

Change #3828: Rework the RV speed prperty, so it works with non-constant values.

Revision 1924:fb4d11bda091
Added by Hirundo over 5 years ago

Change #3828: Rework the RV speed prperty, so it works with non-constant values.

History

#1 Updated by Hirundo over 5 years ago

  • Tracker changed from Bug to Feature
  • Subject changed from named parameter not accepted as property value to Make unit conversions work with non-constant values

Changed to a feature request.
To make this work the floating-point arithmetic should be replaced by fixed-point arithmetic (i.e. multiply, then divide).
This fixed-point arithmetic can then be done at runtime.

#2 Updated by Hirundo over 5 years ago

  • % Done changed from 0 to 50

Basics are done in r1918, but there are two caveats:
r1716 is not applied to non-constant values, so the may be less accurate
Road vehicle speed still requires a constant value

Also available in: Atom PDF