From 25f827da0d936854f767d386daa9a5ed178782ac Mon Sep 17 00:00:00 2001 From: ineed bots Date: Sat, 20 Sep 2025 20:53:00 -0600 Subject: [PATCH] add sample --- src/component/test.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/component/test.cpp b/src/component/test.cpp index f660850..389814f 100644 --- a/src/component/test.cpp +++ b/src/component/test.cpp @@ -2,6 +2,7 @@ #include "loader/component_loader.hpp" #include +#include "gsc.hpp" namespace test { @@ -14,6 +15,15 @@ namespace test public: void post_unpack() override { + gsc::function::add("testfunc", []() + { + game::Com_Printf(game::CON_CHANNEL_DONT_FILTER, "this is a test builtin\n"); + }); + + gsc::method::add("testmeth", [](game::scr_entref_t ref) + { + game::Com_Printf(game::CON_CHANNEL_DONT_FILTER, "this is a test builtin on ent %d\n", ref.entnum); + }); } private: