From 35e786c2b4632f92518c8881db650ba63beecd5c Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Sun, 19 May 2019 15:25:03 +0500 Subject: Implemented lua's "require" for AM --- cwd/assets/altcraft/scripts/blocks.lua | 2 ++ cwd/assets/altcraft/scripts/init.lua | 3 +++ 2 files changed, 5 insertions(+) create mode 100644 cwd/assets/altcraft/scripts/blocks.lua (limited to 'cwd') diff --git a/cwd/assets/altcraft/scripts/blocks.lua b/cwd/assets/altcraft/scripts/blocks.lua new file mode 100644 index 0000000..ad00742 --- /dev/null +++ b/cwd/assets/altcraft/scripts/blocks.lua @@ -0,0 +1,2 @@ +print("Hello from altcraft/blocks!") +return "CONTENT OF ac/blocks" \ No newline at end of file diff --git a/cwd/assets/altcraft/scripts/init.lua b/cwd/assets/altcraft/scripts/init.lua index de58b90..f001017 100644 --- a/cwd/assets/altcraft/scripts/init.lua +++ b/cwd/assets/altcraft/scripts/init.lua @@ -32,5 +32,8 @@ function plugin.onTick (deltaTime) end end +blocks = require("altcraft/blocks") +print("From init: "..blocks) + AC.RegisterPlugin(plugin) plugin = nil \ No newline at end of file -- cgit v1.2.3