Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ https://github.com/nwnxee/unified/compare/build8193.37.13...HEAD
- Player: GetOpenStore()
- Creature: GetNumberOfBonusSpells(), ModifyNumberBonusSpells()
- Store: GetBlackMarket(), SetBlackMarket(), GetGold(), SetGold(), GetIdentifyCost(), SetIdentifyCost(), GetMaxBuyPrice(), SetMaxBuyPrice()
- Utils: RawPrint()

### Changed
- Damage: Added bRangedAttack to the NWNX_Damage_AttackEventData struct.
Expand Down
10 changes: 10 additions & 0 deletions Plugins/Util/NWScript/nwnx_util.nss
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,10 @@ string NWNX_Util_GetModuleTlkFile();
/// @return TRUE if successful, FALSE on error.
int NWNX_Util_UpdateResourceDirectory(string sAlias);

/// @brief Print a string with no log decorations.
/// @param sString String to print
void NWNX_Util_RawPrint(string sString);

/// @}

string NWNX_Util_GetCurrentScriptName(int depth = 0)
Expand Down Expand Up @@ -588,3 +592,9 @@ int NWNX_Util_UpdateResourceDirectory(string sAlias)
NWNXCall(NWNX_Util, "UpdateResourceDirectory");
return NWNXPopInt();
}

void NWNX_Util_RawPrint(string sString)
{
NWNXPushString(sString);
NWNXCall(NWNX_Util, "RawPrint");
}
7 changes: 7 additions & 0 deletions Plugins/Util/Util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,13 @@ NWNX_EXPORT ArgumentStack UnregisterServerConsoleCommand(ArgumentStack&& args)
return {};
}

NWNX_EXPORT ArgumentStack RawPrint(ArgumentStack&& args)
{
std::string sLogMessage = args.extract<std::string>();
std::cout << sLogMessage << std::endl;
return {};
}

NWNX_EXPORT ArgumentStack PluginExists(ArgumentStack&& args)
{
return Plugin::Find(args.extract<std::string>()) ? 1 : 0;
Expand Down