Replacing draw and distance with apps (#553)

* added draw.sc app

Now working on distance app

* Adding apps as carpet rules

* adding distance app

Co-authored-by: altrisi <altrisi.trillosierra@gmail.com>
This commit is contained in:
Ghoulboyandaltrisi authored and GitHub committed 2020-11-24 19:40:55 -04:00
1 parent 7d727d9717
commit aeb3e382a6
5 files changed
+257 -1

No files matched your search

+22
View File
@@ -73,6 +73,7 @@ public class CarpetSettings
/*
These will be turned when events can be added / removed in code
Then also gotta remember to remove relevant rules
@Rule(
desc = "Turns on internal camera path tracing app",
@@ -97,9 +98,29 @@ public class CarpetSettings
appSource = "ai_tracker"
)
public static boolean commandAITracker = true;
@Rule(
desc = "Enables /draw commands",
extra = {
"... allows for drawing simple shapes or",
"other shapes which are sorta difficult to do normally"
},
appSource = "draw",
category = {FEATURE, SCARPET, COMMAND}
)
public static String commandDraw = "true";
@Rule(
desc = "Enables /distance command to measure in game distance between points",
extra = "Also enables brown carpet placement action if 'carpets' rule is turned on as well",
appSource = "distance",
category = {FEATURE, SCARPET, COMMAND}
)
public static String commandDistance = "true";
*/
@Rule(desc = "Gbhs sgnf sadsgras fhskdpri!", category = EXPERIMENTAL)
public static boolean superSecretSetting = false;
@@ -374,6 +395,7 @@ public class CarpetSettings
@Rule(desc = "Enables /draw commands", extra = {"... allows for drawing simple shapes or","other shapes which are sorta difficult to do normally"}, category = COMMAND)
public static String commandDraw = "true";
@Rule(
desc = "Enables /script command",
extra = "An in-game scripting API for Scarpet programming language",
@@ -84,6 +84,8 @@ public class CarpetScriptServer
registerBuiltInScript(BundledModule.carpetNative("math", true));
registerBuiltInScript(BundledModule.carpetNative("chunk_display", false));
registerBuiltInScript(BundledModule.carpetNative("ai_tracker", false));
registerSettingsApp(BundledModule.carpetNative("draw_rc_1", false));
registerSettingsApp(BundledModule.carpetNative("distance_rc_1", false));
}
public CarpetScriptServer(MinecraftServer server)