Skip to content

Base class collapsing to work around hammer limitations #316

@vrad-exe

Description

@vrad-exe

Hammer has some annoying limitations on keyvalues inherited from base classes:

  • Keyvalues from the base class can be overridden, but only with another of the same type - 90% of the cases where this would be useful are to expose it as a different type (e.g. turning a generic type into choices), but this is impossible
  • It's not possible to remove a keyvalue defined in a base class, which is sometimes necessary (e.g. to work around the func_breakable_surf origin bug), or it'd just be nice to be able to hide things that don't affect a specific entity

It would be really useful to have these restrictions removed, and since we have the unifying FGD system, I can see a relatively straightforward way to do that - collapse/"inline" base classes directly into entities which make use of these abilities, so that they bypass Hammer's restrictions on base classes. For removing/hiding keys there would also need to be a new syntax added for that, which could likely look similar to the existing @resources blocks (e.g. @hidekey origin).

To keep file sizes down, this should only be applied to entities that actually need it.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions