Fixing dialogues and cutscenes, minor bug fixing
This commit is contained in:
1 parent
2b32fce5e0
commit
fff5a9d4aa
18 files changed
+4010
-2208
No files matched your search
@@ -376,6 +376,22 @@ namespace ZL {
|
||||
loc->requestReturnToMainMenu();
|
||||
});
|
||||
|
||||
// set_chat_unread(chat_index, unread [, preview_msg])
|
||||
// chat_index: 0=first contact, 1=second, 2=third
|
||||
// unread: true to mark as unread, false to mark as read
|
||||
// preview_msg: optional string to show in the chat list preview (trimmed to 22 chars)
|
||||
// When unread=false and preview_msg is omitted, preview auto-updates from chat history.
|
||||
api.set_function("set_chat_unread",
|
||||
[loc](int chatIndex, bool unread, sol::object previewMsg) {
|
||||
if (!loc->requestSetChatUnread) {
|
||||
std::cerr << "[script] set_chat_unread: callback not wired\n";
|
||||
return;
|
||||
}
|
||||
const std::string msg = previewMsg.is<std::string>()
|
||||
? previewMsg.as<std::string>() : "";
|
||||
loc->requestSetChatUnread(chatIndex, unread, msg);
|
||||
});
|
||||
|
||||
api.set_function("set_chat_callbacks",
|
||||
[this_impl = impl.get()](sol::object cb0, sol::object cb1, sol::object cb2) {
|
||||
if (cb0.is<sol::protected_function>()) this_impl->chatOpenCallbacks[0] = cb0.as<sol::protected_function>();
|
||||
|
||||
Reference in new issue
Block a user