News:

Use the "Forum Search"
It may help you to find anything in the forum ;).

I need convoy get_tile_length()

Started by Yona-TYT, June 05, 2020, 12:08:21 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Yona-TYT

I need to know the number of stations that a convoy covers.

This easy to add.  ;)

api_convoy.ccregister_method(vm, &convoi_t::get_tile_length, "get_tile_length");
squirrel_types_scenario.awkexport_types["convoy_x::get_tile_length"] = "integer()"


Yona-TYT

Currently I count the number of wagons / cars to determine if the size of the train is suitable for the station, the problem is that there are wagons that have a larger size, so using the same number of wagons (large ones) covers more spaces than stations compared to small wagons.

So I need "get_tile_length".

prissi

Do a patch and then I can incorporate it, if it is straight forward.

Yona-TYT

Quote from: prissi on June 09, 2020, 02:39:22 AMexport_types["convoy_x::get_tile_length"] = "integer()"
Ok, this works fine for me, I also added it to the AI.  :P

Dwachs

Parsley, sage, rosemary, and maggikraut.


prissi

I did just now for r 9124
Thank you.