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

Feature Request: inject STRONGDMM define #298

Open
ZeWaka opened this issue Jul 15, 2024 · 3 comments
Open

Feature Request: inject STRONGDMM define #298

ZeWaka opened this issue Jul 15, 2024 · 3 comments
Labels
feat New feature or request

Comments

@ZeWaka
Copy link
Contributor

ZeWaka commented Jul 15, 2024

Problem to be solved

This would make life infinitely easier.

Sugest a solution

No response

@ZeWaka ZeWaka added the feat New feature or request label Jul 15, 2024
@SpaiR
Copy link
Owner

SpaiR commented Jul 15, 2024

As I understand it, the define is needed to set up the environment specifically for the editor's operation? I'm a bit out of the loop, so for general understanding, it would be great if you could show an example of how such a define might be used. Actually, for similar purposes, the editor relies on the fork of SpacemanDMM - you can make a PR there, and at the same time, check that everything works as it should. I'll merge it and release the editor version on it: SpacemanDMM builtins.rs.

@ZeWaka
Copy link
Contributor Author

ZeWaka commented Jul 15, 2024

One way Goonstation uses defines like those is to display different icons for map editors vs ingame.
Currently, we do the following:

#if (defined(SPACEMAN_DMM) || defined(FASTDMM))
#define IN_MAP_EDITOR
#endif

/turf/simulated/wall
#ifndef IN_MAP_EDITOR // display disposal pipes etc. above walls in map editors
	plane = PLANE_WALL
#else
	plane = PLANE_FLOOR
#endif

The issue is that then DreamChecker and such will skip over the code that runs in the actual game, which could present a vector for errors. For example, some of our objects don't have any icon_state at all, but have an icon_state in-editor. It would be ideal to eventually enforce this programmatically via DreamChecker, but we can't currently outside of some weird regexes.

@SpaiR
Copy link
Owner

SpaiR commented Jul 16, 2024

Okay. I think I got it, but I still recommend making a PR to the fork of the parser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants