mirror of
https://github.com/fedddddd/iw5-gsc-utils.git
synced 2025-04-22 05:35:43 +00:00
Small change
This commit is contained in:
parent
bdfd37de35
commit
44886c8f9f
@ -150,7 +150,7 @@ namespace io
|
|||||||
array.push(file);
|
array.push(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
return array.get_raw();
|
return array;
|
||||||
});
|
});
|
||||||
|
|
||||||
gsc::function::add("copyfolder", [](const gsc::function_args& args)
|
gsc::function::add("copyfolder", [](const gsc::function_args& args)
|
||||||
|
@ -168,7 +168,7 @@ namespace json
|
|||||||
array[key] = args[i + 1];
|
array[key] = args[i + 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
return array.get_raw();
|
return array;
|
||||||
});
|
});
|
||||||
|
|
||||||
gsc::function::add("jsonparse", [](const gsc::function_args& args)
|
gsc::function::add("jsonparse", [](const gsc::function_args& args)
|
||||||
|
@ -103,6 +103,24 @@ namespace scripting
|
|||||||
this->value_ = variable;
|
this->value_ = variable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
script_value::script_value(const array& value)
|
||||||
|
{
|
||||||
|
game::VariableValue variable{};
|
||||||
|
variable.type = game::SCRIPT_OBJECT;
|
||||||
|
variable.u.pointerValue = value.get_entity_id();
|
||||||
|
|
||||||
|
this->value_ = variable;
|
||||||
|
}
|
||||||
|
|
||||||
|
script_value::script_value(const function& value)
|
||||||
|
{
|
||||||
|
game::VariableValue variable{};
|
||||||
|
variable.type = game::SCRIPT_OBJECT;
|
||||||
|
variable.u.codePosValue = value.get_pos();
|
||||||
|
|
||||||
|
this->value_ = variable;
|
||||||
|
}
|
||||||
|
|
||||||
/***************************************************************
|
/***************************************************************
|
||||||
* Integer
|
* Integer
|
||||||
**************************************************************/
|
**************************************************************/
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
namespace scripting
|
namespace scripting
|
||||||
{
|
{
|
||||||
class entity;
|
class entity;
|
||||||
|
class array;
|
||||||
|
class function;
|
||||||
|
|
||||||
class script_value
|
class script_value
|
||||||
{
|
{
|
||||||
@ -29,6 +31,10 @@ namespace scripting
|
|||||||
|
|
||||||
script_value(const vector& value);
|
script_value(const vector& value);
|
||||||
|
|
||||||
|
script_value(const array& value);
|
||||||
|
|
||||||
|
script_value(const function& value);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
bool is() const;
|
bool is() const;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user