8000 First "NewRun" command implicit · Issue #32 · HiPulsar/rpp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

First "NewRun" command implicit #32

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

Closed
k2d222 opened this issue Sep 15, 2023 · 1 comment
Closed

First "NewRun" command implicit #32

k2d222 opened this issue Sep 15, 2023 · 1 comment

Comments

@k2d222
Copy link
k2d222 commented Sep 15, 2023

In ddnet, the first NewRun instruction is implicit: after the config name, a run is started. On the contrary in rules++, the first NewRun(); is mandatory. (which is fine, although I'd prefer implicit runs as well) but the code generated contains a NewRun, which is actually a 2nd run (the first, implicit run does nothing).

TLDR It would be better to remove the first NewRun in generated .rules files, or to make the first NewRun(); instruction implicit.

Example:

#include "base.r"
#tileset "generic_unhookable"

AutoMapper("Sweeper");
NewRun();

Insert(0);

generates

[Sweeper]

NewRun

Index 0 

but should have generated

[Sweeper]

Index 0
HiPulsar added a commit that referenced this issue Sep 15, 2023
HiPulsar added a commit that referenced this issue Sep 29, 2023
@HiPulsar
Copy link
Owner

I reverted this change. There's really no reason to have it and only bloats the generating code with formatting.

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

No branches or pull requests

2 participants
0