mirror of
https://github.com/fedddddd/iw5-gsc-utils.git
synced 2025-07-06 03:02:02 +00:00
35 lines
671 B
C++
35 lines
671 B
C++
#pragma once
|
|
#include "entity.hpp"
|
|
#include "script_value.hpp"
|
|
|
|
namespace scripting
|
|
{
|
|
class function
|
|
{
|
|
public:
|
|
function(const char*);
|
|
|
|
script_value get_raw() const;
|
|
const char* get_pos() const;
|
|
|
|
script_value call(entity self, std::vector<script_value> arguments) const;
|
|
|
|
script_value operator()(entity self, std::vector<script_value> arguments) const
|
|
{
|
|
return this->call(self, arguments);
|
|
}
|
|
|
|
script_value operator()(std::vector<script_value> arguments) const
|
|
{
|
|
return this->call(*game::levelEntityId, arguments);
|
|
}
|
|
|
|
script_value operator()() const
|
|
{
|
|
return this->call(*game::levelEntityId, {});
|
|
}
|
|
private:
|
|
const char* pos_;
|
|
};
|
|
}
|