Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply CB 3D to vehicles #2673

Closed
DorpsGek opened this issue Feb 23, 2009 · 10 comments
Closed

Apply CB 3D to vehicles #2673

DorpsGek opened this issue Feb 23, 2009 · 10 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

George opened the ticket and wrote:

R15515

Vehicle property "Bit mask of cargo types available for refitting" (D) (16 for RVs, 1D for trains, ...) is very inconvenient in use. While coding ARVs, The following idea came to my mind.
To have CB 3D for vehicles too. While running CB 3D, var 18 (low byte for example) will store cargo ID (Translated). Result 0 or 1 will define, is this vehicle refitable to the cargo, or not.
This way it would be easy to build any refit list. The high byte may store cargo class for example.

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/2673
@DorpsGek
Copy link
Member Author

frosch wrote:

IMO that is: No way.

I explicitly excluded the ability to refuse refitting in r15541.
If this would be added, it would only be a matter of time until some grf restricts refitting to certain cargo types to certain dates or other circumstances. That would break cloning, autoreplace, autorenew, ... I.e. every gameplay feature related to vehicles.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2673#comment5634

@DorpsGek
Copy link
Member Author

George wrote:

frosch:
I was planning that GRF NOW :)
Well, let us look from the other side. I have over 50 entries in my translation table. How can I specify refit list for vehicle when cargo classes are not acceptable?
Solutions

  1. expand property 16 from D to 8D
  2. have a callback 3D
  3. ???

This comment was imported from FlySpray: https://bugs.openttd.org/task/2673#comment5641

@DorpsGek
Copy link
Member Author

frosch wrote:

That is a completely different issue :)

Extending the refit mask is possible, though I doubt it will enter a high rank on anyone's todo list. Especially as cargo classes would become somewhat useless.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2673#comment5644

@DorpsGek
Copy link
Member Author

George wrote:

Unfortunately classes are already useless, because I can't predict a cargo class for any cargo. For example, would fertiliser be liquid or not in my next run of LV5 ;)
The issue is rather simple - to have a control on refit list. Currently I have no control. Only assumptions and no guaranties.

A big question - what would happen with http://bugs.openttd.org/task/1941?
Without it and a list of supported cargoes (removed in r15541 I suppose?) selecting RV in LV5 is a REALLY a pain.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2673#comment5645

@DorpsGek
Copy link
Member Author

frosch wrote:

Are you referring to the "xor" logic of the refit mask property, and that you cannot know whether it adds or removes a cargo, because you cannot know which cargo classes an other grf defined? Well, so two properties would be needed, a positive and a negative list. Maybe not as bitmask, but as 0xFF terminated list.

However, I do not get the relation of this to r15541.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2673#comment5647

@DorpsGek
Copy link
Member Author

George wrote:

Yes, I do refer to XOR.

As for r15541.
Now it does not display a list of cargoes to refit (at list in r15557) in the purchase window and I do not know what vehicle to build to transport a cargo.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2673#comment5650

@DorpsGek
Copy link
Member Author

frosch wrote:

eGRTS seems to work. Your test grf from 7th february has problems, but also with capacity. Unless I broke something, maybe you made a similiar mistake as HEQS in #2595.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2673#comment5652

@DorpsGek
Copy link
Member Author

George wrote:

I'm not sure that I understood your comment in #2595 right
So, here goes the grf.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/2673#comment5654

@DorpsGek
Copy link
Member Author

frosch wrote:

fixed in r15592.
thanks for testgrf


This comment was imported from FlySpray: https://bugs.openttd.org/task/2673#comment5686

@DorpsGek
Copy link
Member Author

peter1138 closed the ticket.

Reason for closing: Fixed

fixed in r15592


This comment was imported from FlySpray: https://bugs.openttd.org/task/2673

@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) Vehicles labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant