From a2fd708de4ede7427589125e680f3fb339926f4e Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Sun, 17 Feb 2019 21:24:52 +0500 Subject: Refactored lua-api --- src/Plugin.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/Plugin.hpp (limited to 'src/Plugin.hpp') diff --git a/src/Plugin.hpp b/src/Plugin.hpp new file mode 100644 index 0000000..a5f75e1 --- /dev/null +++ b/src/Plugin.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include + +namespace PluginSystem { + void Init(); + + void Execute(const std::string &luaCode); + + void CallOnChangeState(std::string newState); +} \ No newline at end of file -- cgit v1.2.3 From 8c5320a94b4c91f2801c05766f6a1747de42a2e5 Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Sat, 18 May 2019 18:12:56 +0500 Subject: Implemented more scripting APIs --- src/Plugin.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Plugin.hpp') diff --git a/src/Plugin.hpp b/src/Plugin.hpp index a5f75e1..3b61011 100644 --- a/src/Plugin.hpp +++ b/src/Plugin.hpp @@ -5,7 +5,9 @@ namespace PluginSystem { void Init(); - void Execute(const std::string &luaCode); + void Execute(const std::string &luaCode, bool except = false); void CallOnChangeState(std::string newState); + + void CallOnTick(double deltaTime); } \ No newline at end of file -- cgit v1.2.3 From 646f77ec6bc27af231b6ff8974e631b86188beb6 Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Sun, 19 May 2019 23:03:48 +0500 Subject: Implemented block-api --- src/Plugin.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/Plugin.hpp') diff --git a/src/Plugin.hpp b/src/Plugin.hpp index 3b61011..a849f5c 100644 --- a/src/Plugin.hpp +++ b/src/Plugin.hpp @@ -2,6 +2,10 @@ #include +#include "Vector.hpp" + +class BlockInfo; + namespace PluginSystem { void Init(); @@ -10,4 +14,6 @@ namespace PluginSystem { void CallOnChangeState(std::string newState); void CallOnTick(double deltaTime); + + BlockInfo RequestBlockInfo(Vector blockPos); } \ No newline at end of file -- cgit v1.2.3