The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: z9999 on August 20, 2009, 11:34:03 AM

Title: [patch] New convoi status FAHRPLANEINGABE_LOADING
Post by: z9999 on August 20, 2009, 11:34:03 AM
This patch adds a new convoi status FAHRPLANEINGABE_LOADING.
When schedule/line is changed, status of convoi which is loading will be FAHRPLANEINGABE_LOADING instead of FAHRPLANEINGABE. Which means that convoi knows last status was LOADING, thus convoi can continue to loading after changing its schedule/line if possible.

This will solve 3 problems below which will be happen after changing schedule/line.

- At airports or station with choose sign/signal, convoi will stop loading and move to scheduled position. This might cause deadlock with train.
- if convoi is moving on scheduled position, convoi stop at that position and start loading. So, convoi can't load 100%.
- If convoi is loading but is not on scheduled position, convoi move to scheduled position. This is ugly.
Title: Re: [patch] New convoi status FAHRPLANEINGABE_LOADING
Post by: gerw on August 20, 2009, 12:13:55 PM
Very nice idea. Maybe you can introduce functions like is_fahrplaneingabe() to avoid long statements as
state==convoi_t::FAHRPLANEINGABE  ||  state==convoi_t::FAHRPLANEINGABE_LOADING
Title: Re: [patch] New convoi status FAHRPLANEINGABE_LOADING
Post by: Fabio on August 20, 2009, 01:22:17 PM
any chanche to have also dedicated images for loading vehicles?
Title: Re: [patch] New convoi status FAHRPLANEINGABE_LOADING
Post by: prissi on September 26, 2009, 06:21:45 PM
I think the patch by z9999 for getting the next position right, will also solve this issue.
Title: Re: [patch] New convoi status FAHRPLANEINGABE_LOADING
Post by: z9999 on September 27, 2009, 05:43:38 AM
Your patch is completely wrong.
Think why we need to think last state is loading or not.
I explained on the first post.

Quote from: z9999 on August 20, 2009, 11:34:03 AM
- if convoi is moving on scheduled position, convoi stop at that position and start loading. So, convoi can't load 100%.


[EDIT]
Bad news.
This patch completely doesn't work because of your another patch (http://forum.simutrans.com/index.php?topic=2828.msg33340#msg33340).
Title: Re: [patch] New convoi status FAHRPLANEINGABE_LOADING
Post by: prissi on September 27, 2009, 08:22:29 AM
The state is loading can be checked in sync_step during FAHRPLANEINGABE as you did in your other patch correctly. Thus there is no need for the new state.
Title: Re: [patch] New convoi status FAHRPLANEINGABE_LOADING
Post by: z9999 on September 27, 2009, 11:43:53 AM
Quote from: prissi on September 27, 2009, 08:22:29 AM
The state is loading can be checked in sync_step during FAHRPLANEINGABE as you did in your other patch correctly. Thus there is no need for the new state.

No, it doesn't. It doesn't work like my patch.