Extensibility for vehicle parts to have new tool features(flags)

Currently, the features which vehicle parts might have are limited. A vehicle part could have one or more flags in

but not ones added in mods. I designed a new tool with a new flag “CHEMLAB_ADVANCED” and realized I couldn’t design a new vehicle part having the same tool feature.
So I thought allowing defining new vehicle parts’ FLAG in mods might be a cool idea.
For example, a large keg installed allows you to make wine while you are driving around. :slight_smile:

Check out data/json/vehicleparts/engineering.json
It has tool qualities on vehicle parts.

[quote=“Coolthulhu, post:2, topic:12127”]Check out data/json/vehicleparts/engineering.json
It has tool qualities on vehicle parts.[/quote]
I mean, what about new tools that consume power?
For example, I designed a tool named Advanced Chemistry Set(has lv3 “CHEM” quality), which is used to make Methanol and other chemicals added in my mod. And I want to implement a similar vehicle part which consumes vehicle’s power. However, when deciding tools on a vehicle, only these flags are checked: KITCHEN, FAUCET, WELDRIG, CRAFTRIG, CHEMLAB and CARGO.
Here’s the codes in inventory.cpp, line 468:

        const int kpart = veh->part_with_feature(vpart, "KITCHEN");
        const int faupart = veh->part_with_feature(vpart, "FAUCET");
        const int weldpart = veh->part_with_feature(vpart, "WELDRIG");
        const int craftpart = veh->part_with_feature(vpart, "CRAFTRIG");
        const int forgepart = veh->part_with_feature(vpart, "FORGE");
        const int chempart = veh->part_with_feature(vpart, "CHEMLAB");
        const int cargo = veh->part_with_feature(vpart, "CARGO");
        if (cargo >= 0) {
            // ...
        if(faupart >= 0 ) {
            // ...

Earlier today, I saw your idea about separating “engine” and “game” and making the core game into a “core mod”. It is really a great idea!
And it will definitely solve my problem, right? :slight_smile:

Nope, those are hardcoded.

You can still have a CHEMLAB and chem 3 quality on the same part.