Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MESS doesn't recognize @include directive in .ted files #16

Open
mfaizsyahmi opened this issue Oct 12, 2024 · 3 comments
Open

MESS doesn't recognize @include directive in .ted files #16

mfaizsyahmi opened this issue Oct 12, 2024 · 3 comments

Comments

@mfaizsyahmi
Copy link

mfaizsyahmi commented Oct 12, 2024

I want to add base classes to a .ted file. For DRY and reusability reasons, I decided to place it in a separate file called HLBase.fgd which is placed beside mess.fgd. I added @include "HLBase.fgd" into one of the .ted files but mess' ted compiler throws up with an error.

MESS should at least pass through @include directives in .ted files into the fgd with a warning, until proper support is added.

@mfaizsyahmi
Copy link
Author

mfaizsyahmi commented Oct 12, 2024

As interim solution, I would have to disable mess' .ted-to-fgd compilation and compile those files myself. Fortunately I have not yet employed MScript expressions to my entity declarations (e.g. ted_dir() in studio() attribute so that wouldn't be a problem.

edit: just noticed the stock .ted files make use of that so I had adapted my script to implement the most basic string replacement: {ted_dir()} with the file's path.

@pwitvoet
Copy link
Owner

pwitvoet commented Oct 12, 2024

Good point, @include directives should be allowed in .ted files.

As a workaround, perhaps you can include both HLBase.fgd and mess.fgd in another fgd, and use that fgd in the editor?

EDIT: What about making HLBase.fgd a .ted file?

@mfaizsyahmi
Copy link
Author

What about making HLBase.fgd a .ted file?

You are a genius. 🤓

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

No branches or pull requests

2 participants