diff --git a/gradle.properties b/gradle.properties index 19cd3b7b..98626c88 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ org.gradle.jvmargs=-Xmx1G loader_version=0.6.3+build.167 # Mod Properties - mod_version = 1.1.3+v191016 + mod_version = 1.2.0+v191020 maven_group = carpet archives_base_name = fabric-carpet diff --git a/src/main/java/carpet/script/CarpetExpression.java b/src/main/java/carpet/script/CarpetExpression.java index 7510c43f..e5e55cb9 100644 --- a/src/main/java/carpet/script/CarpetExpression.java +++ b/src/main/java/carpet/script/CarpetExpression.java @@ -2969,7 +2969,7 @@ public class CarpetExpression this.expr.addLazyFunction("store_app_data", -1, (c, t, lv) -> { if (lv.size() == 0) - throw new InternalExpressionException("'store_app_data' needs nbt tag and optional file"); + throw new InternalExpressionException("'store_app_data' needs NBT tag and an optional file"); Value val = lv.get(0).evalValue(c); String file = null; if (lv.size()>1) @@ -3176,7 +3176,7 @@ public class CarpetExpression } /** - *

/script load / unload <module> (shared?), /script in <module> commands

+ *

/script load / unload <app> (global?), /script in <app> commands

*
*

load / unload commands allow for very conventient way of writing your code, providing it to the game * and distribute with your worlds without the need of use of commandblocks. Just place your scarpet code in the /scripts @@ -3192,13 +3192,15 @@ public class CarpetExpression * // baz = foo() * *

- *

/script load/unload <module> (?shared)

+ *

/script load/unload <app> (?global)

*

Loading operation will load that script code from disk and execute it right away. You would probably use it to * load some stored procedures to be used for later. To reload the module, just type /script load again. * Reloading removes all the current global state (globals and functions) that were added later by the module.

*

Loading a module, if it contains a __command() method, will attempt to registed a command with that - * module name, and register all public (no underscore) functions available in the module as subcommands. It will also + * app name, and register all public (no underscore) functions available in the module as subcommands. It will also * bind specific events to the event system (check Events section for details).

+ *

Loaded apps have the ability to store and load external files, especially their persistent tag state. + * For that check load_app_data and store_app_data functions.

*

If an app defines __config method, and that method returns a map, it will be used to apply custom * settings for this app. Currently the following options are supported:

* - *

Unloading a module removes all of its state from the game, disables commands, and removes bounded events

- *

Scripts can be loaded in shared and player mode. Default is player, so all globals and stored functions are + *

Unloading an app removes all of its state from the game, disables commands, and removes bounded events

+ *

Scripts can be loaded in shared(global) and player mode. Default is player, so all globals and stored functions are * individual for each player, meaning scripts don't need to worry about making sure they store some intermittent data - * for each player independently. In shared mode - all global values and stored functions are shared among all players. - * To access specific player data with commandblocks, use /execute as (player) run script in (module) run ... + * for each player independently. In global mode - all global values and stored functions are shared among all players. + * To access specific player data with commandblocks, use /execute as (player) run script in (app) run ... * To access global/server state, you need to disown the command from any player, so use a commandblock, or any arbitrary * entity: /execute as @e[type=bat,limit=1] run script in (module) globals for instance. *

- *

/script in <module> ...

- *

Allows to run normal /script commands in a specific module, like run, invoke,..., globals etc...

+ *

/script in <app> ...

+ *

Allows to run normal /script commands in a specific app, like run, invoke,..., globals etc...

*
*/ public void loadScriptsFromFilesCommand() diff --git a/src/main/java/carpet/script/Expression.java b/src/main/java/carpet/script/Expression.java index 0cab3df3..89994ce3 100644 --- a/src/main/java/carpet/script/Expression.java +++ b/src/main/java/carpet/script/Expression.java @@ -51,7 +51,7 @@ import static java.lang.Math.min; /** - *

Fundamental components of scarpet programming language (towards upcoming version 1.5).

+ *

Fundamental components of scarpet programming language (version 1.5).

* *

Scarpet (a.k.a. Carpet Script, or Script for Carpet) is a programming language designed to provide * the ability to write custom programs to run within Minecraft and @@ -205,10 +205,10 @@ import static java.lang.Math.min; * *

Code delivery, line indicators

*

Note that this should only apply to pasting your code to execute with commandblock. Scarpet recommends placing your - * code in packages (files with .sc extension that can be placed inside "/scripts" folder in the world files - * and loaded as a module with command /script load [package_name]. Scarpet modules loaded from disk should only + * code in apps (files with .sc extension that can be placed inside "/scripts" folder in the world files + * and loaded as a scarpet app with command /script load [app_name]. Scarpet apps loaded from disk should only * contain code, no need to start with "/script run" prefix

- *

The following is the code that could be provided in a foo.sc file located in world /scripts folder

+ *

The following is the code that could be provided in a foo.sc app file located in world /scripts folder

* *
  * run_program() -> (
diff --git a/src/main/java/carpet/settings/CarpetSettings.java b/src/main/java/carpet/settings/CarpetSettings.java
index 19663a27..2f0d0b7a 100644
--- a/src/main/java/carpet/settings/CarpetSettings.java
+++ b/src/main/java/carpet/settings/CarpetSettings.java
@@ -27,7 +27,7 @@ import static carpet.settings.RuleCategory.SURVIVAL;
 
 public class CarpetSettings
 {
-    public static final String carpetVersion = "1.1.3+v191016";
+    public static final String carpetVersion = "1.2.0+v191020";
     public static final Logger LOG = LogManager.getLogger();
     public static boolean skipGenerationChecks = false;
     public static boolean impendingFillSkipUpdates = false;
diff --git a/src/main/resources/assets/carpet/icon.png b/src/main/resources/assets/carpet/icon.png
index 047b91f2..9178b961 100644
Binary files a/src/main/resources/assets/carpet/icon.png and b/src/main/resources/assets/carpet/icon.png differ
diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json
index 255ad3cc..ffa9a8cd 100644
--- a/src/main/resources/fabric.mod.json
+++ b/src/main/resources/fabric.mod.json
@@ -1,7 +1,7 @@
 {
   "schemaVersion": 1,
   "id": "carpet",
-  "version": "1.1.3",
+  "version": "1.2.0",
 
   "name": "Carpet Mod in Fabric",
   "description": "Carpet made out of fabric",