mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-26 06:22:17 -08:00
let scripts require from the same mod (#1698)
it seems fine to have
`require("mymod/script")`
e.g. if mods require a lot of scripts and want to organise it
This commit is contained in:
parent
935b22bf4a
commit
b077cd7fb0
1 changed files with 1 additions and 1 deletions
|
|
@ -122,7 +122,7 @@ public class Scripts implements Disposable{
|
|||
if(matched.find()){
|
||||
LoadedMod required = Vars.mods.locateMod(matched.group(1));
|
||||
String script = matched.group(2);
|
||||
if(required == null || root.equals(required.root.child("scripts"))){ // Mod not found, or already using a mod
|
||||
if(required == null){ // Mod not found, treat it as a folder
|
||||
Fi dir = root.child(matched.group(1));
|
||||
if(!dir.exists()) return null; // Mod and folder not found
|
||||
return loadSource(script, dir, validator);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue