The International Simutrans Forum

Development => Scripting Scenarios and AI => Topic started by: Yona-TYT on February 26, 2018, 06:51:56 PM

Title: get cost of the signals
Post by: Yona-TYT on February 26, 2018, 06:51:56 PM
I need to use "get_cost ()" in the list of available signals.

    local sign_list = sign_desc_x.get_available_signs(wt_road)
    local sign_cost = 0
    foreach(sign in sign_list) {
        if(sign.is_private_way()){
          sign_cost = sign.get_cost()
            }
    }
Title: Re: get cost of the signals
Post by: Yona-TYT on February 26, 2018, 07:19:36 PM
Excuse the double post.

I also need to get the cost of text label, since these may vary depending on the pakset;). ;)
Title: Re: get cost of the signals
Post by: Dwachs on February 27, 2018, 07:07:48 AM
Apparently I got the base class of sign_desc_x wrong
Title: Re: get cost of the signals
Post by: Dwachs on March 02, 2018, 02:15:37 PM
should be fixed in r8391