NewGRF Aircraft Cargo Capacities Patch (GRF callback 15)

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
User avatar
mart3p
Tycoon
Tycoon
Posts: 1030
Joined: 31 Oct 2005 21:00
Location: UK

NewGRF Aircraft Cargo Capacities Patch (GRF callback 15)

Post by mart3p »

This patch implements newGRF callback 15 for aircraft. It is intended to be used with my Planeset patch (link in sig.). It enables the correct cargo capacities for Planeset freight aircraft. The Ruslan in particular is now much more usable :). It also ensures that the Ruslan is built carrying coal instead of passengers.

There is one known problem, the Ruslan shows the incorrect cargo capacity in the purchase window (37 tonnes of coal should be 150 tonnes). The problem is due to a workaround in Planeset of a TTDPatch bug,. For more info see here. DaleStan has said he will correct this in the next release of Planeset.

Thanks to peter1138 for his improvements to GRF support over to last few days, making this patch possible.

If you want to try this patch you will also need to add the Planeset patch - it won't do much otherwise! I have posted a win32 exe compiled with both patches, but I think we need to persuade Richk67 to add this to the next miniIN.

Edit: Patch removed as it's now in the trunk :D 09/06/06
Edit: win32 exe removed as it was well out-of-date 23/06/06. An exe with the latest Planeset 1.5 patch (and others) is here
Attachments
Planeset Test, 18th Jan 2011.png
Planeset Test, 18th Jan 2011.png (60.43 KiB) Viewed 11195 times
Last edited by mart3p on 25 Jun 2006 23:41, edited 3 times in total.
Image
User avatar
mart3p
Tycoon
Tycoon
Posts: 1030
Joined: 31 Oct 2005 21:00
Location: UK

Post by mart3p »

Still no replies to this topic? :( Oh well, at least no one has found any bugs. ;)

This patch is now included in the Mini IN.

Patch updated against r5135. Removed some code that was a work-around for a bug that was fixed by peter1138 at r5087.
Image
User avatar
Born Acorn
Tycoon
Tycoon
Posts: 7595
Joined: 10 Dec 2002 20:36
Skype: bornacorn
Location: Wrexham, Wales
Contact:

Post by Born Acorn »

No fears. Hopefully it all goes in in the end, and makes newgrf users everywhere more happy. :P
Image
User avatar
Grigory1
Traffic Manager
Traffic Manager
Posts: 204
Joined: 07 Jun 2005 09:36
Location: Tallinn, Estonia
Contact:

Post by Grigory1 »

mart3p wrote:Still no replies to this topic? :( Oh well, at least no one has found any bugs. ;)

This patch is now included in the Mini IN.

Patch updated against r5135. Removed some code that was a work-around for a bug that was fixed by peter1138 at r5087.
mart3p, I have absolutely got confused in versions of game :) , where it is possible to take EXE a file of what version to check up teamwork callback 15 and callback 19 in Planeset and in my planes?
User avatar
mart3p
Tycoon
Tycoon
Posts: 1030
Joined: 31 Oct 2005 21:00
Location: UK

Post by mart3p »

Hi Grigory

Use either the exe in the zip file OTTD_for_Planeset_r4906PS+.zip (in the first post) or use the Mini IN. Both of these include my code for callbacks 15 and 19.

As both exes are now a little out of date I will post a new win32 exe in the next few days.
Image
richk67
Tycoon
Tycoon
Posts: 2363
Joined: 05 Jun 2003 16:21
Location: Up North
Contact:

Post by richk67 »

mart3p wrote:Hi Grigory

Use either the exe in the zip file OTTD_for_Planeset_r4906PS+.zip (in the first post) or use the Mini IN. Both of these include my code for callbacks 15 and 19.

As both exes are now a little out of date I will post a new win32 exe in the next few days.
Hi all. Just added Callback15 patch to the branch/MiniIN. Many thanks to mart3p for sending a MiniIN version.
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1732
Joined: 30 Mar 2005 09:43

Post by peter1138 »

Hmm, TTDPatch doesn't actually use Callback 15 when building a new aircraft...
He's like, some kind of OpenTTD developer.
User avatar
mart3p
Tycoon
Tycoon
Posts: 1030
Joined: 31 Oct 2005 21:00
Location: UK

Post by mart3p »

peter1138 wrote:Hmm, TTDPatch doesn't actually use Callback 15 when building a new aircraft...
Maybe not, but I think it should. :) That's probably why TTDPatch has the bug discussed here. I used callback 15 when building a new aircraft after discussing this with DaleStan.
Image
User avatar
mart3p
Tycoon
Tycoon
Posts: 1030
Joined: 31 Oct 2005 21:00
Location: UK

Post by mart3p »

The last of this patch was added to the trunk this morning. :D Thank you peter1138! and also thanks for fixing my errors and tidying things up.

In addition peter1138 has added support for road vehicle cargo refitting. I think it’s time to test George’s long vehicles. :)
Image
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1732
Joined: 30 Mar 2005 09:43

Post by peter1138 »

And thank you for your contributions. I will sort out the rotor patch, and you can probably tell the cargo subtype code is near...

Just, keep them coming? :)
He's like, some kind of OpenTTD developer.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 41 guests