refactor: Refactorized whole project structure

This commit is contained in:
AURUMVORXX
2025-01-24 22:36:25 +03:00
parent d50f55086b
commit a479b5f85d
321 changed files with 288 additions and 219 deletions

View File

@@ -0,0 +1,32 @@
#ifndef _PY_ITEMGROUND_H_
#define _PY_ITEMGROUND_H_
#include <pybind11/embed.h>
#include "squirrel/ItemGround.h"
namespace py = pybind11;
class PyItemGround
{
private:
nonut::ItemGround *sqobj;
public:
PyItemGround(SQObject obj) { if (obj._type == OT_NULL) throw py::type_error("Presented Squirrel Object doesn't exist (type: null)"); sqobj = new nonut::ItemGround(obj); }
PyItemGround(nonut::ItemGround obj) { if (obj.isNull()) throw py::type_error("Presented ItemGround doesn't exist (type: null)"); sqobj = &obj; }
py::tuple getPosition() { return py::make_tuple(sqobj->getPosition().toTuple()); }
py::tuple getRotation() { return py::make_tuple(sqobj->getRotation().toTuple()); }
nonut::Int getId() { return sqobj->id; }
nonut::String getInstance() { return sqobj->instance; }
nonut::Int getAmount() { return sqobj->amount; }
nonut::String getWorld() { return sqobj->world; }
nonut::Int getVirtualWorld() { return sqobj->virtualWorld; }
void setVirtualWorld(nonut::Int value) { sqobj->virtualWorld = value; }
void del() { delete sqobj; }
};
#endif