Skip to content

Commit 5e0d97a

Browse files
committed
Add user stories to gml extension
1 parent 74d2c25 commit 5e0d97a

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

crash-handler/extensions/gml/TigerCrashReporter.gml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,17 @@ return true;
4141
#define tiger_send_report
4242
/// @description Send a crash report to the server
4343
/// @param {string} crash_data The crash data (will be base64 encoded automatically)
44+
/// @param {string} user_story [Optional] User story describing what the user was doing when the crash occurred (will be base64 encoded automatically)
4445
var crash_data = argument0;
46+
var user_story = "";
47+
48+
if (argument_count >= 2) {
49+
user_story = argument1;
50+
51+
if (argument1 == 0) {
52+
user_story = "";
53+
}
54+
}
4555

4656
if (global.tiger_server_url == "") {
4757
show_debug_message("TigerCrashReporter Error: Server URL not set. Call tiger_set_server() first.");
@@ -74,6 +84,11 @@ if (global.tiger_version != "") {
7484
ds_map_add(payload_map, "version", global.tiger_version);
7585
}
7686

87+
if (user_story != "") {
88+
var encoded_user_story = base64_encode(user_story);
89+
ds_map_add(payload_map, "user_story", encoded_user_story);
90+
}
91+
7792
var os_info = "";
7893
switch (os_type) {
7994
case os_windows:

crash-handler/extensions/gml/TigerCrashReporter.yy

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)