-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a5bf40a
commit 141eebc
Showing
9 changed files
with
43 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,32 @@ | ||
# mlogjswatcher | ||
# MlogWatcher | ||
|
||
the Mindustry mod for Logic JavaScript Compiler watch mode. | ||
|
||
## Principle | ||
This mode watches for changes to a specific mlog file (any file compiled by [mlogjs](https://mlogjs.github.io/mlogjs). | ||
This mod watches for changes to a specific `.mlog` file (the custom file extension which contains mlog). | ||
When a new compilation is made, the file being watched changes, and the mode detects this and injects the file contents into the selected logic processor. | ||
|
||
## MlogJSWatchTemplate | ||
|
||
I recommend using [mlogJSTemplate](https://github.com/Sharlottes/mlogJsWatchTemplate) as the development environment. | ||
This template repository is also ready for watch mode: if you edit and save `script.ts`, it will automatically compile. | ||
so if you use it with this mod, you have a complete continuous development flow! | ||
|
||
## Config | ||
|
||
Because of the principle described above, you must first select the path to the file to be watched before using it. | ||
|
||
![image](https://github.com/Sharlottes/mlogJsWatcher/assets/60801210/7a061cde-f4be-476f-909d-8de18c87f3b2) | ||
![image](https://github.com/Sharlottes/MlogWatcher/assets/60801210/7a061cde-f4be-476f-909d-8de18c87f3b2) | ||
|
||
## How to use it | ||
|
||
just select the processor. that's all! | ||
The processor injector compresses and injects code remotely into the selected processor, so you don't need to enter the canvas or anything like that. | ||
|
||
![java_jcWgh8Mx2d](https://github.com/Sharlottes/mlogJsWatcher/assets/60801210/023853dd-ae84-491a-8460-acfbac18716a) | ||
![java_jcWgh8Mx2d](https://github.com/Sharlottes/MlogWatcher/assets/60801210/023853dd-ae84-491a-8460-acfbac18716a) | ||
|
||
if you click the block which isn't the processor, the processor will be unselected. | ||
|
||
## Demo | ||
|
||
https://github.com/Sharlottes/mlogJsWatcher/assets/60801210/09305ce7-0775-45a1-9072-dd4728e5d442 | ||
https://github.com/Sharlottes/MlogWatcher/assets/60801210/09305ce7-0775-45a1-9072-dd4728e5d442 | ||
|
||
## MlogJSWatchTemplate | ||
|
||
If you are using [mlogjs](https://mlogjs.github.io/mlogjs), I recommend using [mlogJSTemplate](https://github.com/Sharlottes/mlogJsWatchTemplate) as the development environment. | ||
This template repository is also ready for watch mode: if you edit and save `script.ts`, it will automatically compile. | ||
so if you use it with this mod, you have a complete continuous development flow! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
@rem put this project path into PATH_FROM | ||
setlocal | ||
set PATH_FROM=C:\Users\user\Documents\GitHub\mlogJsWatcher | ||
set PATH_FROM=C:\Users\user\Documents\GitHub\MlogWatcher | ||
@rem put your mindustry local path into PATH_TO | ||
setlocal | ||
set PATH_TO=C:\Users\user\AppData\Roaming\Mindustry | ||
|
||
if exist %PATH_TO%\mods\MLogJsWatcherDesktop.jar del %PATH_TO%\mods\MLogJsWatcherDesktop.jar | ||
xcopy %PATH_FROM%\build\libs\MLogJsWatcherDesktop.jar %PATH_TO%\mods\ /k /y | ||
if exist %PATH_TO%\mods\MlogWatcherDesktop.jar del %PATH_TO%\mods\MlogWatcherDesktop.jar | ||
xcopy %PATH_FROM%\build\libs\MlogWatcherDesktop.jar %PATH_TO%\mods\ /k /y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/mlogjswatcher/MlogJsWatcher.java → src/mlogwatcher/MlogWatcher.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters