Proposal: Additional condition types for action7/9

Discussions about the technical aspects of graphics development, including NewGRF tools and utilities.

Moderator: Graphics Moderators

Post Reply
michael blunck
Tycoon
Tycoon
Posts: 5954
Joined: 27 Apr 2005 07:09
Contact:

Proposal: Additional condition types for action7/9

Post by michael blunck »

I´d like to propose to add two new condition types for use with action7/9, namely

0F - Cargo classes defined are not available (variable is ignored)
10 - Cargo classes defined are available (variable is ignored)

Reason for this is that although it´s possible to "switch off" vehicles for which no appropriate freight is available by using condition types 0B/0C, the same is not possible for vehicles whose cargoes are unknown but only their cargo classes being known.

regards
Michael
Image
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: Proposal: Additional condition types for action7/9

Post by Yexo »

If a vehicle has no available cargo refits at all it's not available anyway, so there is no need to disable it in the newgrf code.
michael blunck
Tycoon
Tycoon
Posts: 5954
Joined: 27 Apr 2005 07:09
Contact:

Re: Proposal: Additional condition types for action7/9

Post by michael blunck »

Yexo wrote:If a vehicle has no available cargo refits at all it's not available anyway, so there is no need to disable it in the newgrf code.
Makes sense. I was under the impression having seen an oil tanker carrying passengers when no oil available in an ECS game, hehe. I´ll take another look, could have been by a different reason.

regards
Michael
Image
frosch
OpenTTD Developer
OpenTTD Developer
Posts: 991
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

Re: Proposal: Additional condition types for action7/9

Post by frosch »

Note that the rule "if vehicle is not refittable to anything, it is not available" only applies if the default cargo is "first refittable".
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: Proposal: Additional condition types for action7/9

Post by Yexo »

frosch wrote:Note that the rule "if vehicle is not refittable to anything, it is not available" only applies if the default cargo is "first refittable".
Which incidentally is the only sane value when the vehicle is only refittable by cargo class.
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 5 guests