Skip to content

Commit ff12fbf

Browse files
committed
Add return to README.md
1 parent 533a42f commit ff12fbf

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ These are limited to not let you do things like adding extra control capabilitie
4040
| `ifneq` | `s[a] s[b] r[command]` | Comapre 2 values, if not equal run the command |
4141
| `ifreq` | `s[a] s[b] r[command]` | Comapre 2 values, if a matches the regex b run the command |
4242
| `ifrneq` | `s[a] s[b] r[command]` | Comapre 2 values, if a doesnt match the regex b run the command |
43+
4344
(Note the regex engine is [Remimu](https://github.com/wareya/Remimu))
4445

4546
With the commands listed above and the substitutions you can create simple comparisons, here is an examples I use to login
@@ -62,6 +63,17 @@ ifreq $(map) "^.*?Copy Love Box.*?$" exec scripts/sewerslide_on.cfg
6263
ifeq $(game_mode) 0XF exec scripts/sewerslide_on.cfg
6364
```
6465

66+
There is also a `return` which lets you early return from scripts.
67+
* Have "elses" without spamming `ifeq`
68+
* Have early returns while still remaining compatible with DDNet
69+
70+
Here is an example which I use for dummy connecting
71+
```
72+
ifneq $(dummy_connected) 0 return
73+
dummy_connect
74+
exec "scripts/dummy/reset.cfg"
75+
```
76+
6577
### Settings Page
6678

6779
![image](https://github.com/user-attachments/assets/a6ccb206-9fed-48be-a2d2-8fc50a6be882)

0 commit comments

Comments
 (0)