Let us start here, from square one. No, from Zero!

This commit is contained in:
smpn2
2022-09-30 22:45:51 +09:00
parent 14215af0d1
commit b7a60638a4
1005 changed files with 303069 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
#include "coin.h"
#include "external/LuaBridge.h"
#include "misc/eamuse.h"
using namespace luabridge;
namespace script::api::coin {
int get() {
return eamuse_coin_get_stock();
}
void set(int amount) {
eamuse_coin_set_stock(amount);
}
void insert(int amount) {
if (amount == 1) {
eamuse_coin_add();
} else if (amount > 1) {
eamuse_coin_set_stock(eamuse_coin_get_stock() + amount);
}
}
bool blocker_get() {
return eamuse_coin_get_block();
}
void init(lua_State *L) {
getGlobalNamespace(L)
.beginNamespace("coin")
.addFunction("get", get)
.addFunction("set", set)
.addFunction("insert", insert)
.addFunction("blocker_get", blocker_get)
.endNamespace();
}
}