Skip to content

Commit

Permalink
Add to changelog and test
Browse files Browse the repository at this point in the history
  • Loading branch information
TeamSpen210 committed Nov 12, 2024
1 parent f2ac357 commit fea5e5a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Version (dev)
-------------
* #35: Only use character escapes in FGD custom syntax mode. The original parser only allows `\\n`.
* Avoid escaping `/` and `?`, these are unambiguous.
* Add :py:attr:`ValueTypes.EXT_SOUNDSCAPE <srctools.fgd.ValueTypes.EXT_SOUNDSCAPE>`.
* Support exporting FGDs with unevaulated string bases.

-------------
Version 2.4.1
Expand Down
12 changes: 6 additions & 6 deletions src/srctools/fgd.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ class ValueTypes(Enum):
TARG_DEST = 'target_destination'
ENT_HANDLE = EHANDLE = TARG_DEST

TARG_DEST_CLASS = 'target_name_or_class' # Above + classnames.
TARG_DEST_CLASS = 'target_name_or_class' # A targetname for another ent, or a classname.
TARG_SOURCE = 'target_source' # The 'targetname' keyvalue.
TARG_NPC_CLASS = 'npcclass' # targetnames filtered to NPC ents
TARG_POINT_CLASS = 'pointentityclass' # targetnames filtered to point entities.
TARG_FILTER_NAME = 'filterclass' # targetnames of filters.
TARG_NODE_DEST = 'node_dest' # name of a node
TARG_NODE_SOURCE = 'node_id' # name of us
TARG_NPC_CLASS = 'npcclass' # Targetnames filtered to NPC entities.
TARG_POINT_CLASS = 'pointentityclass' # Targetnames filtered to point entities.
TARG_FILTER_NAME = 'filterclass' # Targetnames filtered to filter entities.
TARG_NODE_DEST = 'node_dest' # Name of a node
TARG_NODE_SOURCE = 'node_id' # name of us.

# Strings, don't need fixups
STR_SCENE = 'scene' # VCD files
Expand Down
2 changes: 1 addition & 1 deletion tests/test_fgd.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ def test_export_regressions(file_regression: FileRegressionFixture, custom_synta
base_angles = EntityDef(EntityTypes.BASE, 'Angles')

ent = EntityDef(EntityTypes.NPC, 'npc_test')
ent.bases = [base_origin, base_angles]
ent.bases = [base_origin, base_angles, 'MissingBase']

fgd.entities = {
# 'origin': base_origin,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_fgd/test_export_regressions_custom_.fgd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
origin(origin) : "Origin" : "0 0 0"
]

@NpcClass base(Origin, Angles)
@NpcClass base(Origin, Angles, MissingBase)
sphere(radius, 255 128 64)
studio(models/editor/a_prop.mdl)
appliesto(-episodic)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_fgd/test_export_regressions_vanilla_.fgd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
origin(origin) : "Origin" : "0 0 0"
]

@NpcClass base(Origin, Angles)
@NpcClass base(Origin, Angles, MissingBase)
sphere(radius, 255 128 64)
studio(models/editor/a_prop.mdl)
extrahelper(1, 15, thirtytwo)
Expand Down

0 comments on commit fea5e5a

Please sign in to comment.