StrataSource / FGD

The FGD + Hammer resource files for games built on Strata Source.
20 stars 15 forks source link

USE_VEHICLES feature switch #42

Closed braem closed 3 years ago

braem commented 3 years ago

Closes https://github.com/ChaosInitiative/Chaos-FGD/issues/36

This PR puts vehicle entities, spawnflags, and keyvalues behind USE_VEHICLES. +USE_VEHICLES to be exact. I also added the + for HL2_ENTITIES.

The reasoning behind it is that it makes match_tags operate more like a feature switch. Without the +, an entity/spawnflag/kv is included if it has that tag.

For example, an entity with appliesto(HL2_ENTITIES, USE_VEHICLES) is included for P2CE because they have HL2_ENTITIES. Using appliesto(+HL2_ENTITES, +USE_VEHICLES) makes such an entity not be included for P2CE, because they don't have USE_VEHICLES.

braem commented 3 years ago

CI? i can build this fine..

image

The error is in srctools? Maybe the default python version was changed on github runners but can't find anything about it.

Looks like this commit introduced whatever it's complaining about: https://github.com/TeamSpen210/srctools/commit/26df7164f1413ed96ce823c016bb8a5c03bb36b3#diff-cf23731e0c791146df0c7ebe61675bf53c80a06c152783874ea0970f2277ed3e Though I don't see why it would be. Maybe we need to clearly specify the python version to use. Works fine for me locally even on 3.9.5 though.

braem commented 3 years ago

Workflow fixed in https://github.com/ChaosInitiative/Chaos-FGD/pull/43

TeamSpen210 commented 3 years ago

Ooh whoops, that's 3.8+ syntax, I need to add the __future__ import. The tag rule by the way is that all +/- must match, and at least one prefixed name must be present. So you'd normally always use + for features.