The International Simutrans Forum

PakSets and Customization => Pak128 => Pak128 Bug Reports => Topic started by: Yona-TYT on October 18, 2022, 12:43:35 PM

Title: [Tutorial] Pakset name should start with "Pak128" not "pak128"
Post by: Yona-TYT on October 18, 2022, 12:43:35 PM
There is a small but annoying difference in the name of the Pak128, and that is that it no longer starts with a capital letter. This is a problem when checking if the pakset is compatible with the tutorial.

Is the name change to lowercase planned? Or was it an error or carelessness?.
Title: Re: [Tutorial] Pakset name should start with "Pak128" not "pak128"
Post by: Andarix on October 18, 2022, 08:36:29 PM
It is generally better for such tests to convert everything to uppercase or lowercase.

Here is the function I use in the script AI.

/**
 * returns pakset name (lower case)
 *
 *
 */
function get_set_name()
{
local pakset = get_pakset_name()  // full string from ground.outside.pak
local s = pakset.find(" ")
pakset = pakset.slice(0, s)
pakset = pakset.tolower()

return pakset
}
Title: Re: [Tutorial] Pakset name should start with "Pak128" not "pak128"
Post by: Yona-TYT on October 19, 2022, 03:08:03 PM
Thank you very much, I will integrate this to the tutorials.   8)

Edit.
Is commit :)
https://github.com/simutrans/tutorial_pak64/commit/72093ae23a3ad9f7460415316311dfd597edcf6e