Skip to content

Add "gamemodes" key value to all entities#328

Open
Panzerhandschuh wants to merge 1 commit into
masterfrom
feat/gamemode-flags
Open

Add "gamemodes" key value to all entities#328
Panzerhandschuh wants to merge 1 commit into
masterfrom
feat/gamemode-flags

Conversation

@Panzerhandschuh
Copy link
Copy Markdown

No description provided.

@TeamSpen210
Copy link
Copy Markdown
Member

You’ll want to add the KV to fgd/base_entity.fgd as well, just as an integer - that way the engine dump used for packing knows it’s common for all entities.

Comment thread fgd/bases/Gamemodes.fgd
[
gamemode[engine](integer) : "Gamemode" : 0
gamemode(choices) : "Gamemode" : 0 =
gamemodes(flags) : 0 : "Gamemodes" : "Which gamemodes this entity is active in. If no flags are set, the entity is active in all gamemodes." =
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Srctools needs to have handling of flag names/help text fixed (is it even broken?). There shouldn't be a default value here. I tested this in hammer earlier today and it worked as expected with var(flags) : "Fancy name" : "Desc goes here" =

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not quite broken, more I don't have them implemented - spawnflags are special-cased, I didn't handle descriptions.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I tried mentally to go over the logic in srctools it seemed like it would be able to just handle it as-is, just that stuff would get stored in wrong fields.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I did implement this but forgot, so we just need the latest srctools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants