2021-08-30 20:48:48 -04:00
|
|
|
/// @addtogroup ruby Ruby
|
|
|
|
/// @brief Allows users to execute arbitrary Ruby from the game.
|
|
|
|
/// @{
|
|
|
|
/// @file nwnx_ruby.nss
|
|
|
|
|
|
|
|
const string NWNX_Ruby = "NWNX_Ruby"; ///< @private
|
|
|
|
|
2024-08-31 20:38:17 -04:00
|
|
|
string NWNX_Ruby_Evaluate(string sCode);
|
2021-08-30 20:48:48 -04:00
|
|
|
|
|
|
|
/// @brief Evaluates some ruby code.
|
|
|
|
/// @param sCode The code to evaluate.
|
|
|
|
/// @return The output of the call.
|
|
|
|
string NWNX_Ruby_Evaluate(string sCode)
|
|
|
|
{
|
2025-01-09 12:55:50 -05:00
|
|
|
NWNXPushString(sCode);
|
|
|
|
NWNXCall(NWNX_Ruby, "Evaluate");
|
|
|
|
return NWNXPopString();
|
2021-08-30 20:48:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
/// @}
|