The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: Andarix on December 29, 2024, 06:53:30 PM

Title: good_desc_x.get_metric ?
Post by: Andarix on December 29, 2024, 06:53:30 PM
For the tutorial texts it would be nice if the parameter metric of goods could be queried.
Title: Re: good_desc_x.get_metric ?
Post by: Yona-TYT on December 29, 2024, 06:59:16 PM
Quote from: Andarix on December 29, 2024, 06:53:30 PMFor the tutorial texts it would be nice if the parameter metric of goods could be queried.
I don't understand, do you mean to get the name of the metric unit?.
Title: Re: good_desc_x.get_metric ?
Post by: Andarix on December 29, 2024, 07:37:00 PM
pak64.german good Holz fm

pak64 good Holz m³

pak128 good Holz t

Instead of writing separate text files for each Pakset or storing them in parameters, reading them out is easier. Everything that can be read from the objects should also be used. This avoids errors and maintenance work in the texts.

Especially when the tutorial is ported to other Paksets and the goods/industry chain is composed differently.

Currently the texts are geared towards pak64.
Title: Re: good_desc_x.get_metric ?
Post by: Yona-TYT on December 29, 2024, 08:35:40 PM
Ok, that was easy :)  0001-ADD-good_desc_x.get_metric.patch

Title: Re: good_desc_x.get_metric ?
Post by: prissi on December 30, 2024, 03:56:29 AM
Incorporated in r11556
Title: Re: good_desc_x.get_metric ?
Post by: Andarix on December 30, 2024, 02:33:35 PM
thanks