Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions fgd/base_entity.fgd
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
// target(target_destination) : "Target"
spawnflags(flags) : "spawnflags" : "Flags that can be set on spawn (i.e. in Hammer Editor)" = []

gamemodes(integer) : "Gamemodes" : 0

vscripts[VSCRIPT](scriptlist) : "Entity Scripts" : : "Name(s) of script files that are executed after all entities have spawned."
thinkfunction[VSCRIPT](string) : "Script think function" : : "Name of a function in this entity's script scope which will be called automatically."
Expand Down
2 changes: 1 addition & 1 deletion fgd/bases/BaseEntityBrush.fgd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@BaseClass
base(BaseEntityIO)
base(BaseEntityIO, Gamemodes)
= BaseEntityBrush: "Internal entity. Contains a template for all entity brushes."
[
targetname(target_source) : "Name" : : "The name that other entities refer to this entity by."
Expand Down
2 changes: 1 addition & 1 deletion fgd/bases/BaseEntityPoint.fgd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@BaseClass
base(BaseEntityIO)
base(BaseEntityIO, Gamemodes)
= BaseEntityPoint
[
targetname(target_source) : "Name" : : "The name that other entities refer to this entity by."
Expand Down
30 changes: 14 additions & 16 deletions fgd/bases/Gamemodes.fgd
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,20 @@
appliesto(MOMENTUM)
= Gamemodes
[
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.

[
0 : "Unknown"
1 : "Surf"
2 : "Bhop"
3 : "Bhop (HL1)"
4 : "Climb (Mom)"
5 : "Climb (KZT)"
6 : "Climb (1.6)"
7 : "RJ"
8 : "SJ"
9 : "Ahop"
10 : "Conc"
11 : "Defrag (CPM)"
12 : "Defrag (VQ3)"
13 : "Defrag (VTG)"
1 : "Surf" : 0
2 : "Bhop" : 0
4 : "Bhop (HL1)" : 0
8 : "Climb (Mom)" : 0
16 : "Climb (KZT)" : 0
32 : "Climb (1.6)" : 0
64 : "RJ" : 0
128 : "SJ" : 0
256 : "Ahop" : 0
512 : "Conc" : 0
1024 : "Defrag (CPM)" : 0
2048 : "Defrag (VQ3)" : 0
4096 : "Defrag (VTG)" : 0
]
]
Loading