diff --git a/SQL/database_changelog.txt b/SQL/database_changelog.txt index 7063273378..e2a172e107 100644 --- a/SQL/database_changelog.txt +++ b/SQL/database_changelog.txt @@ -1,15 +1,34 @@ Any time you make a change to the schema files, remember to increment the database schema version. Generally increment the minor number, major should be reserved for significant changes to the schema. Both values go up to 255. -The latest database version is 3.4; The query to update the schema revision table is: +The latest database version is 4.0; The query to update the schema revision table is: -INSERT INTO `schema_revision` (`major`, `minor`) VALUES (3, 4); +INSERT INTO `schema_revision` (`major`, `minor`) VALUES (4, 0); or -INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (3, 4); +INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (4, 0); In any query remember to add a prefix to the table names if you use one. ---------------------------------------------------- +12 November 2017, by Jordie0608 +Modified feedback table to use json, a python script is used to migrate data to this new format. + +See the file 'feedback_conversion_2017-11-12.py' for instructions on how to use the script. + +A new json feedback table can be created with: +CREATE TABLE `feedback` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `datetime` datetime NOT NULL, + `round_id` int(11) unsigned NOT NULL, + `key_name` varchar(32) NOT NULL, + `key_type` enum('text', 'amount', 'tally', 'nested tally', 'associative') NOT NULL, + `version` tinyint(3) unsigned NOT NULL, + `json` json NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM + +---------------------------------------------------- + 28 August 2017, by MrStonedOne Modified table 'messages', adding a deleted column and editing all indexes to include it diff --git a/SQL/feedback_conversion_2017-11-12.py b/SQL/feedback_conversion_2017-11-12.py new file mode 100644 index 0000000000..b8577460b3 --- /dev/null +++ b/SQL/feedback_conversion_2017-11-12.py @@ -0,0 +1,532 @@ +#Python 3+ Script for jsonifying feedback table data as of 2017-11-12 made by Jordie0608 +#Apologies for the boilerplated and squirrely code in parts, this has been my first foray into python +# +#Before starting ensure you have installed the mysqlclient package https://github.com/PyMySQL/mysqlclient-python +#It can be downloaded from command line with pip: +#pip install mysqlclient +# +#You will also have to create a new feedback table for inserting converted data to per the schema: +#CREATE TABLE `feedback_new` ( +# `id` int(11) unsigned NOT NULL AUTO_INCREMENT, +# `datetime` datetime NOT NULL, +# `round_id` int(11) unsigned NOT NULL, +# `key_name` varchar(32) NOT NULL, +# `key_type` enum('text', 'amount', 'tally', 'nested tally', 'associative') NOT NULL, +# `version` tinyint(3) unsigned NOT NULL, +# `json` json NOT NULL, +# PRIMARY KEY (`id`) +#) ENGINE=MyISAM +#This is to prevent the destruction of legacy data and allow rollbacks to be performed in the event of an error during conversion +#Once conversion is complete remember to rename the old and new feedback tables; it's up to you if you want to keep the old table +# +#To view the parameters for this script, execute it with the argument --help +#All the positional arguments are required, remember to include prefixes in your table names if you use them +#An example of the command used to execute this script from powershell: +#python feedback_conversion_2017-11-12.py "localhost" "root" "password" "feedback" "SS13_feedback" "SS13_feedback_new" +#I found that this script would complete conversion of 10000 rows approximately every 2-3 seconds +#Depending on the size of your feedback table and the computer used it may take several minutes for the script to finish +# +#The script has been tested to complete with tgstation's feedback table as of 2017-10-23 01:34:06 +#Due to the complexity of data that has potentially changed formats multiple times and suffered errors when recording I cannot guarantee it'll always execute successfully +#In the event of an error the new feedback table is automatically truncated +#The source table is never modified so you don't have to worry about losing any data due to errors +#Note that some feedback keys are renamed or coalesced into one, additionnaly some have been entirely removed +# +#While this script can be run with your game server(s) active, it may interfere with other database operations and any feedback created after the script has started won't be converted + +import MySQLdb +import argparse +import json +import re +import sys +from datetime import datetime + +def parse_text(details): + if not details: + return + if details.startswith('"') and details.endswith('"'): + details = details[1:-1] #the first and last " aren't removed by splitting the dictionary + details = details.split('" | "') + else: + if "_" in details: + details = details.split(' ') + return details + +def parse_tally(details): + if not details: + return + overflowed = None + if len(details) >= 65535: #a string this long means the data hit the 64KB character limit of TEXT columns + overflowed = True + if details.startswith('"') and details.endswith('"'): + details = details[details.find('"')+1:details.rfind('"')] #unlike others some of the tally data has extra characters to remove + split_details = details.split('" | "') + else: + split_details = details.split(' ') + if overflowed: + split_details = split_details[:-1] #since the string overflowed the last element will be incomplete and needs to be ignored + details = {} + for i in split_details: + increment = 1 + if '|' in i and i[i.find('|')+1:]: + increment = float(i[i.find('|')+1:]) + i = i[:i.find('|')] + if i in details: + details[i] += increment + else: + details[i] = increment + for i in details: + details[i] = '{0:g}'.format(details[i]) #remove .0 from floats that have it to conform with DM + return details + +def parse_nested(var_name, details): + if not details: + return + #group by data before pipe + if var_name in ("admin_toggle", "preferences_verb", "changeling_objective", "cult_objective", "traitor_objective", "wizard_objective", "mining_equipment_bought", "vending_machine_usage", "changeling_powers", "wizard_spell_improved", "testmerged_prs"): + if details.startswith('"') and details.endswith('"'): + details = details[1:-1] + split_details = details.split('" | "') + else: + split_details = details.split(' ') + details = {} + for i in split_details: + if "|" in i and i[:i.find('|')] not in details: + details[i[:i.find('|')]] = {} + elif "|" not in i and i[i.find('|')+1:] not in details: + details[i[i.find('|')+1:]] = 0 + for i in split_details: + if "|" in i: + if details[i[:i.find('|')]] is not dict: + continue + if i[i.find('|')+1:] in details[i[:i.find('|')]]: + details[i[:i.find('|')]][i[i.find('|')+1:]] += 1 + else: + details[i[:i.find('|')]][i[i.find('|')+1:]] = 1 + else: + if i in details and type(details[i]) is not dict: #sometimes keys that should have a value after a pipe just don't and would otherwise error here + details[i] += 1 + return details + #group by data after pipe + elif var_name in ("cargo_imports", "traitor_uplink_items_bought", "export_sold_cost", "item_used_for_combat", "played_url"): + if details.startswith('"') and details.endswith('"'): + details = details[1:-1] + split_details = details.split('" | "') + else: + split_details = details.split(' ') + details = {} + for i in split_details: + if i == i[i.rfind('|')+1:]: #there's no pipe and data to group by, so we fill it in + i = "{0}|missing data".format(i) + details[i[i.rfind('|')+1:]] = {} + for i in split_details: + if i == i[i.rfind('|')+1:]: + i = "{0}|missing data".format(i) + if i[:i.find('|')] in details[i[i.rfind('|')+1:]]: + details[i[i.rfind('|')+1:]][i[:i.find('|')]] += 1 + else: + details[i[i.rfind('|')+1:]][i[:i.find('|')]] = 1 + return details + elif var_name == "hivelord_core": + if details.startswith('"') and details.endswith('"'): + details = details[1:-1] + split_details = details.split('" | "') + else: + split_details = details.split(' ') + details = {} + for i in split_details: + if i[:i.find('|')] not in details: + details[i[:i.find('|')]] = {} + if "used" in i: + if "used" not in details: + details[i[:i.find('|')]]["used"] = {} + for i in split_details: + if "used" in i: + if "used" not in details[i[:i.find('|')]]: + details[i[:i.find('|')]]["used"] = {} + details[i[:i.find('|')]]["used"][i[i.rfind('|')+1:]] = 1 + else: + if i[i.rfind('|')+1:] in details[i[:i.find('|')]]["used"]: + details[i[:i.find('|')]]["used"][i[i.rfind('|')+1:]] += 1 + else: + details[i[:i.find('|')]]["used"][i[i.rfind('|')+1:]] = 1 + elif "|" in i: + if i[i.find('|')+1:] in details[i[:i.find('|')]]: + details[i[:i.find('|')]][i[i.find('|')+1:]] += 1 + else: + details[i[:i.find('|')]][i[i.find('|')+1:]] = 1 + return details + elif var_name == "job_preferences": + if details.startswith('"') and details.endswith('"'): + details = details[1:-1] + split_details = details.split('|-" | "|') + else: + split_details = details.split('|- |') + details = {} + for i in split_details: + if i.startswith('|'): + i = i[1:] + if i[:i.find('|')] not in details: + details[i[:i.find('|')]] = {} + for i in split_details: + if i.startswith('|'): + i = i[1:] + if i.endswith('-'): + i = i[:-2] + sub_split = i.split('|') + job = sub_split[0] + sub_split = sub_split[1:] + for o in sub_split: + details[job][o[:o.find('=')].lower()] = o[o.find('=')+1:] + return details + +def parse_associative(var_name, details): + if not details: + return + if var_name == "colonies_dropped": + if details.startswith('"') and details.endswith('"'): + details = details[1:-1] + split_details = details.split('|') + details = {} + details["1"] = {"x" : split_details[0], "y" : split_details[1], "z" : split_details[2]} + return details + elif var_name == "commendation": + if details.startswith('"') and details.endswith('"'): + details = details[1:-1] + if '}" | "{' in details: + split_details = details.split('}" | "{') + else: + split_details = details.split('} {') + details = {} + for i in split_details: + params = [] + sub_split = i.split(',') + for o in sub_split: + o = re.sub('[^A-Za-z0-9 ]', '', o[o.find(':')+1:]) #remove all the formatting and escaped characters from being pre-encoded as json + params.append(o) + details[len(details)+1] = {"commender" : params[0], "commendee" : params[1], "medal" : params[2], "reason" : params[3]} + return details + elif var_name == "high_research_level": + if details.startswith('"') and details.endswith('"'): + details = details[1:-1] + split_details = details.split('" | "') + else: + split_details = details.split(' ') + details = {} + levels = {} + for i in split_details: + x = {i[:-1] : i[-1:]} + levels.update(x) + details["1"] = levels + return details + +def parse_special(var_name, var_value, details): + #old data is essentially a tally in text form + if var_name == "immortality_talisman": + if details.startswith('"') and details.endswith('"'): + split_details = details.split('" | "') + else: + split_details = details.split(' ') + return len(split_details) + #now records channel names, so we have to fill in whats missing + elif var_name == "newscaster_channels": + details = ["missing data"] + details *= var_value + return details + #all the channels got renamed, plus we ignore any with an amount of zero + elif var_name == "radio_usage": + if details.startswith('"') and details.endswith('"'): + details = details[details.find('C'):-1] + split_details = details.split('" | "') + else: + split_details = details.split(' ') + details = {} + new_keys = {"COM":"common", "SCI":"science", "HEA":"command", "MED":"medical", "ENG":"engineering", "SEC":"security", "DTH":"centcom", "SYN":"syndicate", "SRV":"service", "CAR":"supply", "OTH":"other", "PDA":"PDA", "RC":"request console"} + for i in split_details: + if i.endswith('0'): + continue + if i[:i.find('-')] not in new_keys: + continue + details[new_keys[i[:i.find('-')]]] = i[i.find('-')+1:] + return details + #all of the data tracked by this is invalid due to recording the incorrect type + elif var_name == "shuttle_gib": + return {"missing data":1} + #all records have a prefix of 'slimebirth_' that needs to be removed + elif var_name == "slime_babies_born": + if details.startswith('"') and details.endswith('"'): + details = details[1:-1] + split_details = details.split('" | "') + else: + split_details = details.split(' ') + details = {} + for i in split_details: + if i[i.find('_')+1:].replace('_', ' ') in details: + details[i[i.find('_')+1:].replace('_', ' ')] += 1 + else: + details[i[i.find('_')+1:].replace('_', ' ')] = 1 + return details + #spaces were replaced by underscores, we need to undo this + elif var_name == "slime_core_harvested": + if details.startswith('"') and details.endswith('"'): + details = details[1:-1] + split_details = details.split('" | "') + else: + split_details = details.split(' ') + details = {} + for i in split_details: + if i.replace('_', ' ') in details: + details[i.replace('_', ' ')] += 1 + else: + details[i.replace('_', ' ')] = 1 + return details + +def parse_multirow(var_name, var_value, details, multirows_completed): + if var_name in ("ahelp_close", "ahelp_icissue", "ahelp_reject", "ahelp_reopen", "ahelp_resolve", "ahelp_unresolved"): + ahelp_vars = {"ahelp_close":"closed", "ahelp_icissue":"IC", "ahelp_reject":"rejected", "ahelp_reopen":"reopened", "ahelp_resolve":"resolved", "ahelp_unresolved":"unresolved"} + details = {ahelp_vars[var_name]:var_value} + del ahelp_vars[var_name] + query_where = "round_id = {0} AND (".format(query_row[2]) + for c, i in enumerate(ahelp_vars): + if c: + query_where += " OR " + query_where += "var_name = \"{0}\"".format(i) + query_where += ")" + cursor.execute("SELECT var_name, var_value FROM {0} WHERE {1}".format(current_table, query_where)) + rows = cursor.fetchall() + if rows: + for r in rows: + details[ahelp_vars[r[0]]] = r[1] + keys = list(ahelp_vars.keys()) + keys.append(var_name) + multirows_completed += keys + return details + elif var_name in ("alert_comms_blue", "alert_comms_green"): + level_vars = {"alert_comms_blue":"1", "alert_comms_green":"0"} + details = {level_vars[var_name]:var_value} + del level_vars[var_name] + i = list(level_vars)[0] + cursor.execute("SELECT var_value FROM {0} WHERE round_id = {1} AND var_name = \"{2}\"".format(current_table, query_row[2], i)) + row = cursor.fetchone() + if row: + details[level_vars[i]] = row[0] + keys = list(level_vars.keys()) + keys.append(var_name) + multirows_completed += keys + return details + elif var_name in ("alert_keycard_auth_bsa", "alert_keycard_auth_maint"): + auth_vars = {"alert_keycard_auth_maint":("emergency maintenance access", "enabled"), "alert_keycard_auth_bsa":("bluespace artillery", "unlocked")} + i = list(auth_vars[var_name]) + details = {i[0]:{i[1]:var_value}} + del auth_vars[var_name] + i = list(auth_vars)[0] + cursor.execute("SELECT var_value FROM {0} WHERE round_id = {1} AND var_name = \"{2}\"".format(current_table, query_row[2], i)) + row = cursor.fetchone() + if row: + o = list(auth_vars[i]) + details[o[0]] = {o[1]:row[0]} + keys = list(auth_vars.keys()) + keys.append(var_name) + multirows_completed += keys + return details + elif var_name in ("arcade_loss_hp_emagged", "arcade_loss_hp_normal", "arcade_loss_mana_emagged", "arcade_loss_mana_normal", "arcade_win_emagged", "arcade_win_normal"): + result_vars = {"arcade_loss_hp_emagged":("loss", "hp", "emagged"), "arcade_loss_hp_normal":("loss", "hp", "normal"), "arcade_loss_mana_emagged":("loss", "mana", "emagged"), "arcade_loss_mana_normal":("loss", "mana", "normal"), "arcade_win_emagged":("win", "emagged"), "arcade_win_normal":("win", "normal")} + i = list(result_vars[var_name]) + del result_vars[var_name] + if i[0] == "loss": + details = {i[0]:{i[1]:{i[2]:var_value}}} + else: + details = {i[0]:{i[1]:var_value}} + query_where = "round_id = {0} AND (".format(query_row[2]) + for c, i in enumerate(result_vars): + if c: + query_where += " OR " + query_where += "var_name = \"{0}\"".format(i) + query_where += ")" + cursor.execute("SELECT var_name, var_value FROM {0} WHERE {1}".format(current_table, query_where)) + rows = cursor.fetchall() + if rows: + for r in rows: + i = list(result_vars[r[0]]) + if i[0] not in details: + details[i[0]] = {} + if i[0] == "loss": + if i[1] not in details[i[0]]: + details[i[0]][i[1]] = {} + details[i[0]][i[1]][i[2]] = r[1] + else: + details[i[0]][i[1]] = r[1] + keys = list(result_vars.keys()) + keys.append(var_name) + multirows_completed += keys + return details + elif var_name in ("cyborg_engineering", "cyborg_janitor", "cyborg_medical", "cyborg_miner", "cyborg_peacekeeper", "cyborg_security", "cyborg_service", "cyborg_standard"): + module_vars = {"cyborg_engineering":"Engineering", "cyborg_janitor":"Janitor", "cyborg_medical":"Medical", "cyborg_miner":"Miner", "cyborg_peacekeeper":"Peacekeeper", "cyborg_security":"Security", "cyborg_service":"Service", "cyborg_standard":"Standard"} + details = {module_vars[var_name]:var_value} + del module_vars[var_name] + query_where = "round_id = {0} AND (".format(query_row[2]) + for c, i in enumerate(module_vars): + if c: + query_where += " OR " + query_where += "var_name = \"{0}\"".format(i) + query_where += ")" + cursor.execute("SELECT var_name, var_value FROM {0} WHERE {1}".format(current_table, query_where)) + rows = cursor.fetchall() + if rows: + for r in rows: + details[module_vars[r[0]]] = r[1] + keys = list(module_vars.keys()) + keys.append(var_name) + multirows_completed += keys + return details + elif var_name in ("escaped_human", "escaped_total", "round_end_clients", "round_end_ghosts", "survived_human", "survived_total"): + round_vars = {"escaped_human":("escapees", "human"), "escaped_total":("escapees", "total"), "round_end_clients":("clients"), "round_end_ghosts":("ghosts"), "survived_human":("survivors", "human"), "survived_total":("survivors", "total")} + if var_name in ("round_end_clients", "round_end_ghosts"): + i = round_vars[var_name] + details = {i:var_value} + else: + i = list(round_vars[var_name]) + details = {i[0]:{i[1]:var_value}} + del round_vars[var_name] + query_where = "round_id = {0} AND (".format(query_row[2]) + for c, i in enumerate(round_vars): + if c: + query_where += " OR " + query_where += "var_name = \"{0}\"".format(i) + query_where += ")" + cursor.execute("SELECT var_name, var_value FROM {0} WHERE {1}".format(current_table, query_where)) + rows = cursor.fetchall() + if rows: + for r in rows: + if r[0] in ("round_end_clients", "round_end_ghosts"): + i = round_vars[r[0]] + details[i] = r[1] + else: + i = list(round_vars[r[0]]) + if i[0] not in details: + details[i[0]] = {} + details[i[0]][i[1]] = r[1] + keys = list(round_vars.keys()) + keys.append(var_name) + multirows_completed += keys + return details + elif var_name in ("mecha_durand_created", "mecha_firefighter_created", "mecha_gygax_created", "mecha_honker_created", "mecha_odysseus_created", "mecha_phazon_created", "mecha_ripley_created"): + mecha_vars ={"mecha_durand_created":"Durand", "mecha_firefighter_created":"APLU \"Firefighter\"", "mecha_gygax_created":"Gygax", "mecha_honker_created":"H.O.N.K", "mecha_odysseus_created":"Odysseus", "mecha_phazon_created":"Phazon", "mecha_ripley_created":"APLU \"Ripley\""} + details = {mecha_vars[var_name]:var_value} + del mecha_vars[var_name] + query_where = "round_id = {0} AND (".format(query_row[2]) + for c, i in enumerate(mecha_vars): + if c: + query_where += " OR " + query_where += "var_name = \"{0}\"".format(i) + query_where += ")" + cursor.execute("SELECT var_name, var_value FROM {0} WHERE {1}".format(current_table, query_where)) + rows = cursor.fetchall() + if rows: + for r in rows: + details[mecha_vars[r[0]]] = r[1] + keys = list(mecha_vars.keys()) + keys.append(var_name) + multirows_completed += keys + return details + +def pick_parsing(var_name, var_value, details, multirows_completed): + if var_name in text_keys: + return parse_text(details) + elif var_name in amount_keys: + return var_value + elif var_name in simple_tallies: + return parse_tally(details) + elif var_name in nested_tallies: + return parse_nested(var_name, details) + elif var_name in associatives: + return parse_associative(var_name, details) + elif var_name in special_cases: + return parse_special(var_name, var_value, details) + elif var_name in multirow: + return parse_multirow(var_name, var_value, details, multirows_completed) + else: + return False + +if sys.version_info[0] < 3: + raise Exception("Python must be at least version 3 for this script.") +text_keys = ["religion_book", "religion_deity", "religion_name", "shuttle_fasttravel", "shuttle_manipulator", "shuttle_purchase", "shuttle_reason", "station_renames"] +amount_keys = ["admin_cookies_spawned", "cyborg_ais_created", "cyborg_frames_built", "cyborg_mmis_filled", "newscaster_newspapers_printed", "newscaster_stories", "nuclear_challenge_mode"] +simple_tallies = ["admin_secrets_fun_used", "admin_verb", "assembly_made", "brother_success", "cell_used", "changeling_power_purchase", "changeling_success", "chaplain_weapon", "chemical_reaction", "circuit_printed", "clockcult_scripture_recited", "contamination", "cult_runes_scribed", "engine_started", "event_admin_cancelled", "event_ran", "food_harvested", "food_made", "gun_fired", "handcuffs", "item_deconstructed", "item_printed", "jaunter", "lazarus_injector", "megafauna_kills", "mining_voucher_redeemed", "mobs_killed_mining", "object_crafted", "ore_mined", "pick_used_mining", "slime_cores_used", "surgeries_completed", "time_dilation_current", "traitor_random_uplink_items_gotten", "traitor_success", "voice_of_god", "warp_cube", "wisp_lantern", "wizard_spell_learned", "wizard_success", "zone_targeted"] +nested_tallies = ["admin_toggle", "cargo_imports", "changeling_objective", "changeling_powers", "cult_objective", "export_sold_cost", "hivelord_core", "item_used_for_combat", "job_preferences", "mining_equipment_bought", "played_url", "preferences_verb", "testmerged_prs", "traitor_objective", "traitor_uplink_items_bought", "vending_machine_usage", "wizard_objective", "wizard_spell_improved"] +associatives = ["colonies_dropped", "commendation", "high_research_level"] +special_cases = ["immortality_talisman", "newscaster_channels", "radio_usage", "shuttle_gib", "slime_babies_born", "slime_core_harvested"] +multirow = ["ahelp_close", "ahelp_icissue", "ahelp_reject", "ahelp_reopen", "ahelp_resolve", "ahelp_unresolved", "alert_comms_blue", "alert_comms_green", "alert_keycard_auth_bsa", "alert_keycard_auth_maint", "arcade_loss_hp_emagged", "arcade_loss_hp_normal", "arcade_loss_mana_emagged", "arcade_loss_mana_normal", "arcade_win_emagged", "arcade_win_normal", "cyborg_engineering", "cyborg_janitor", "cyborg_medical", "cyborg_miner", "cyborg_peacekeeper", "cyborg_security", "cyborg_service", "cyborg_standard", "escaped_human", "escaped_total", "mecha_durand_created", "mecha_firefighter_created", "mecha_gygax_created", "mecha_honker_created", "mecha_odysseus_created", "mecha_phazon_created", "mecha_ripley_created", "round_end_clients", "round_end_ghosts", "survived_human", "survived_total"] +renames = {"ahelp_stats":["ahelp_close", "ahelp_icissue", "ahelp_reject", "ahelp_reopen", "ahelp_resolve", "ahelp_unresolved"], "ais_created":["cyborg_ais_created"], "arcade_results":["arcade_loss_hp_emagged", "arcade_loss_hp_normal", "arcade_loss_mana_emagged", "arcade_loss_mana_normal", "arcade_win_emagged", "arcade_win_normal"], "cyborg_modules":["cyborg_engineering", "cyborg_janitor", "cyborg_medical", "cyborg_miner", "cyborg_peacekeeper", "cyborg_security", "cyborg_service", "cyborg_standard"], "immortality_talisman_uses":["immortality_talisman"], "keycard_auths":["alert_keycard_auth_bsa", "alert_keycard_auth_maint"], "mechas_created":["mecha_durand_created", "mecha_firefighter_created", "mecha_gygax_created", "mecha_honker_created", "mecha_odysseus_created", "mecha_phazon_created", "mecha_ripley_created"], "mmis_filled":["cyborg_mmis_filled"], "newspapers_printed":["newscaster_newspapers_printed"], "round_end_stats":["escaped_human", "escaped_total", "round_end_clients", "round_end_ghosts", "survived_human", "survived_total"], "security_level_changes":["alert_comms_blue", "alert_comms_green"]} +key_types = {"amount":["ais_created", "immortality_talisman_uses", "mmis_filled", "newspapers_printed", "admin_cookies_spawned", "cyborg_frames_built", "newscaster_stories", "nuclear_challenge_mode"], +"associative":["colonies_dropped", "commendation", "high_research_level"], +"nested tally":["admin_toggle", "arcade_results", "cargo_imports", "changeling_objective", "changeling_powers", "cult_objective", "export_sold_cost", "hivelord_core", "item_used_for_combat", "job_preferences", "keycard_auths", "mining_equipment_bought", "played_url", "preferences_verb", "round_end_stats", "testmerged_prs", "traitor_objective", "traitor_uplink_items_bought", "vending_machine_usage", "wizard_objective", "wizard_spell_improved"], +"tally":[ "admin_secrets_fun_used", "admin_verb", "ahelp_stats", "assembly_made", "brother_success", "cell_used", "changeling_power_purchase", "changeling_success", "chaplain_weapon", "chemical_reaction", "circuit_printed", "clockcult_scripture_recited", "contamination", "cult_runes_scribed", "cyborg_modules", "engine_started", "event_admin_cancelled", "event_ran", "food_harvested", "food_made", "gun_fired", "handcuffs", "item_deconstructed", "item_printed", "jaunter", "lazarus_injector", "mechas_created", "megafauna_kills", "mining_voucher_redeemed", "mobs_killed_mining", "object_crafted", "ore_mined", "pick_used_mining", "radio_usage", "security_level_changes", "shuttle_gib", "slime_babies_born", "slime_cores_used", "slime_core_harvested", "surgeries_completed", "time_dilation_current", "traitor_random_uplink_items_gotten", "traitor_success", "voice_of_god", "warp_cube", "wisp_lantern", "wizard_spell_learned", "wizard_success", "zone_targeted"], +"text":["shuttle_fasttravel", "shuttle_manipulator", "shuttle_purchase", "shuttle_reason", "newscaster_channels", "religion_book", "religion_deity", "religion_name", "station_renames"]} +multirows_completed = [] +query_values = "" +current_round = 0 +parser = argparse.ArgumentParser() +parser.add_argument("address", help="MySQL server address (use localhost for the current computer)") +parser.add_argument("username", help="MySQL login username") +parser.add_argument("password", help="MySQL login username") +parser.add_argument("database", help="Database name") +parser.add_argument("curtable", help="Name of the current feedback table (remember prefixes if you use them)") +parser.add_argument("newtable", help="Name of the new table to insert to, can't be same as the source table (remember prefixes)") +args = parser.parse_args() +db=MySQLdb.connect(host=args.address, user=args.username, passwd=args.password, db=args.database) +cursor=db.cursor() +current_table = args.curtable +new_table = args.newtable +cursor.execute("SELECT max(id) FROM {0}".format(current_table)) +query_id = cursor.fetchone() +max_id = query_id[0] +start_time = datetime.now() +print("Beginning conversion at {0}".format(start_time.strftime("%Y-%m-%d %H:%M:%S"))) +try: + for current_id in range(max_id): + if current_id % 10000 == 0: + cur_time = datetime.now() + print("Reached row ID {0} Duration: {1}".format(current_id, cur_time - start_time)) + cursor.execute("SELECT * FROM {0} WHERE id = {1}".format(current_table, current_id)) + query_row = cursor.fetchone() + if not query_row: + continue + else: + if current_round != query_row[2]: + multirows_completed.clear() + if query_values: + query_values = query_values[:-1] + query_values += ';' + cursor.execute("INSERT INTO {0} (datetime, round_id, key_name, key_type, version, json) VALUES {1}".format(new_table, query_values)) + query_values = "" + current_round = query_row[2] + if query_row[3] in multirows_completed: + continue + parsed_data = pick_parsing(query_row[3], query_row[4], query_row[5], multirows_completed) + if not parsed_data: + continue + json_data = {} + json_data["data"] = parsed_data + new_key = query_row[3] + for r in renames: + if new_key in renames[r]: + new_key = r + break + new_key_type = None + for t in key_types: + if new_key in key_types[t]: + new_key_type = t + break + dequoted_json = re.sub("\'", "\\'", json.dumps(json_data)) + query_values += "('{0}',{1},'{2}','{3}',{4},'{5}'),".format(query_row[1], query_row[2], new_key, new_key_type, 1, dequoted_json) + end_time = datetime.now() + print("Conversion completed at {0}".format(datetime.now().strftime("%Y-%m-%d %H:%M:%S"))) + print("Script duration: {0}".format(end_time - start_time)) +except Exception as e: + end_time = datetime.now() + print("Error encountered on row ID {0} at {1}".format(current_id, datetime.now().strftime("%Y-%m-%d %H:%M:%S"))) + print("Script duration: {0}".format(end_time - start_time)) + cursor.execute("TRUNCATE {0} ".format(new_table)) + raise e +cursor.close() diff --git a/SQL/tgstation_schema.sql b/SQL/tgstation_schema.sql index 1edd5ad12b..2d914161d3 100644 --- a/SQL/tgstation_schema.sql +++ b/SQL/tgstation_schema.sql @@ -163,12 +163,13 @@ DROP TABLE IF EXISTS `feedback`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `feedback` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `time` datetime NOT NULL, - `round_id` int(8) NOT NULL, - `var_name` varchar(32) NOT NULL, - `var_value` int(16) DEFAULT NULL, - `details` text, + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `datetime` datetime NOT NULL, + `round_id` int(11) unsigned NOT NULL, + `key_name` varchar(32) NOT NULL, + `key_type` enum('text', 'amount', 'tally', 'nested tally', 'associative') NOT NULL, + `version` tinyint(3) unsigned NOT NULL, + `json` json NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; diff --git a/SQL/tgstation_schema_prefixed.sql b/SQL/tgstation_schema_prefixed.sql index 72045e50fb..2d44c8eac0 100644 --- a/SQL/tgstation_schema_prefixed.sql +++ b/SQL/tgstation_schema_prefixed.sql @@ -163,12 +163,13 @@ DROP TABLE IF EXISTS `SS13_feedback`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `SS13_feedback` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `time` datetime NOT NULL, - `round_id` int(8) NOT NULL, - `var_name` varchar(32) NOT NULL, - `var_value` int(16) DEFAULT NULL, - `details` text, + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `datetime` datetime NOT NULL, + `round_id` int(11) unsigned NOT NULL, + `key_name` varchar(32) NOT NULL, + `version` tinyint(3) unsigned NOT NULL, + `key_type` enum('text', 'amount', 'tally', 'nested tally', 'associative') NOT NULL, + `json` json NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; diff --git a/code/_compile_options.dm b/code/_compile_options.dm index 1f20614c17..a0b13211f6 100644 --- a/code/_compile_options.dm +++ b/code/_compile_options.dm @@ -79,5 +79,5 @@ //Update this whenever the db schema changes //make sure you add an update to the schema_version stable in the db changelog -#define DB_MAJOR_VERSION 3 -#define DB_MINOR_VERSION 4 +#define DB_MAJOR_VERSION 4 +#define DB_MINOR_VERSION 0 diff --git a/code/controllers/admin.dm b/code/controllers/admin.dm index fa10d398dd..19fef28597 100644 --- a/code/controllers/admin.dm +++ b/code/controllers/admin.dm @@ -45,9 +45,9 @@ INITIALIZE_IMMEDIATE(/obj/effect/statclick) switch(controller) if("Master") Recreate_MC() - SSblackbox.add_details("admin_verb","Restart Master Controller") + SSblackbox.record_feedback("tally", "admin_verb", 1, "Restart Master Controller") if("Failsafe") new /datum/controller/failsafe() - SSblackbox.add_details("admin_verb","Restart Failsafe Controller") + SSblackbox.record_feedback("tally", "admin_verb", 1, "Restart Failsafe Controller") message_admins("Admin [key_name_admin(usr)] has restarted the [controller] controller.") diff --git a/code/controllers/subsystem/blackbox.dm b/code/controllers/subsystem/blackbox.dm index fe7cf33070..f7abc72cbd 100644 --- a/code/controllers/subsystem/blackbox.dm +++ b/code/controllers/subsystem/blackbox.dm @@ -5,21 +5,11 @@ SUBSYSTEM_DEF(blackbox) runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME init_order = INIT_ORDER_BLACKBOX - var/list/msg_common = list() - var/list/msg_science = list() - var/list/msg_command = list() - var/list/msg_medical = list() - var/list/msg_engineering = list() - var/list/msg_security = list() - var/list/msg_deathsquad = list() - var/list/msg_syndicate = list() - var/list/msg_service = list() - var/list/msg_cargo = list() - var/list/msg_other = list() - var/list/feedback = list() //list of datum/feedback_variable var/triggertime = 0 var/sealed = FALSE //time to stop tracking stats? + var/list/research_levels = list() //list of highest tech levels attained that isn't lost lost by destruction of RD computers + var/list/versions = list() //associative list of any feedback variables that have had their format changed since creation and their current version, remember to update this /datum/controller/subsystem/blackbox/Initialize() @@ -44,20 +34,7 @@ SUBSYSTEM_DEF(blackbox) /datum/controller/subsystem/blackbox/Recover() - msg_common = SSblackbox.msg_common - msg_science = SSblackbox.msg_science - msg_command = SSblackbox.msg_command - msg_medical = SSblackbox.msg_medical - msg_engineering = SSblackbox.msg_engineering - msg_security = SSblackbox.msg_security - msg_deathsquad = SSblackbox.msg_deathsquad - msg_syndicate = SSblackbox.msg_syndicate - msg_service = SSblackbox.msg_service - msg_cargo = SSblackbox.msg_cargo - msg_other = SSblackbox.msg_other - feedback = SSblackbox.feedback - sealed = SSblackbox.sealed //no touchie @@ -71,32 +48,14 @@ SUBSYSTEM_DEF(blackbox) /datum/controller/subsystem/blackbox/Shutdown() sealed = FALSE - set_val("ahelp_unresolved", GLOB.ahelp_tickets.active_tickets.len) - - var/pda_msg_amt = 0 - var/rc_msg_amt = 0 - + record_feedback("tally", "ahelp_stats", GLOB.ahelp_tickets.active_tickets.len, "unresolved") for (var/obj/machinery/message_server/MS in GLOB.message_servers) - if (MS.pda_msgs.len > pda_msg_amt) - pda_msg_amt = MS.pda_msgs.len - if (MS.rc_msgs.len > rc_msg_amt) - rc_msg_amt = MS.rc_msgs.len - - set_details("radio_usage","") - - add_details("radio_usage","COM-[msg_common.len]") - add_details("radio_usage","SCI-[msg_science.len]") - add_details("radio_usage","HEA-[msg_command.len]") - add_details("radio_usage","MED-[msg_medical.len]") - add_details("radio_usage","ENG-[msg_engineering.len]") - add_details("radio_usage","SEC-[msg_security.len]") - add_details("radio_usage","DTH-[msg_deathsquad.len]") - add_details("radio_usage","SYN-[msg_syndicate.len]") - add_details("radio_usage","SRV-[msg_service.len]") - add_details("radio_usage","CAR-[msg_cargo.len]") - add_details("radio_usage","OTH-[msg_other.len]") - add_details("radio_usage","PDA-[pda_msg_amt]") - add_details("radio_usage","RC-[rc_msg_amt]") + if (MS.pda_msgs.len) + record_feedback("tally", "radio_usage", MS.pda_msgs.len, "PDA") + if (MS.rc_msgs.len) + record_feedback("tally", "radio_usage", MS.rc_msgs.len, "request console") + if(research_levels.len) + SSblackbox.record_feedback("associative", "high_research_level", 1, research_levels) if (!SSdbcore.Connect()) return @@ -104,79 +63,182 @@ SUBSYSTEM_DEF(blackbox) var/list/sqlrowlist = list() for (var/datum/feedback_variable/FV in feedback) - sqlrowlist += list(list("time" = "Now()", "round_id" = GLOB.round_id, "var_name" = "'[sanitizeSQL(FV.get_variable())]'", "var_value" = FV.get_value(), "details" = "'[sanitizeSQL(FV.get_details())]'")) + var/sqlversion = 1 + if(FV.key in versions) + sqlversion = versions[FV.key] + sqlrowlist += list(list("datetime" = "Now()", "round_id" = GLOB.round_id, "key_name" = "'[sanitizeSQL(FV.key)]'", "key_type" = "'[FV.key_type]'", "version" = "[sqlversion]", "json" = "'[sanitizeSQL(json_encode(FV.json))]'")) if (!length(sqlrowlist)) return SSdbcore.MassInsert(format_table_name("feedback"), sqlrowlist, ignore_errors = TRUE, delayed = TRUE) +/datum/controller/subsystem/blackbox/proc/Seal() + if(sealed) + return + if(IsAdminAdvancedProcCall()) + message_admins("[key_name_admin(usr)] sealed the blackbox!") + log_game("Blackbox sealed[IsAdminAdvancedProcCall() ? " by [key_name(usr)]" : ""].") + sealed = TRUE -/datum/controller/subsystem/blackbox/proc/LogBroadcast(blackbox_msg, freq) +/datum/controller/subsystem/blackbox/proc/log_research(tech, level) + if(!(tech in research_levels) || research_levels[tech] < level) + research_levels[tech] = level + +/datum/controller/subsystem/blackbox/proc/LogBroadcast(freq) if(sealed) return switch(freq) if(1459) - msg_common += blackbox_msg - if(1351) - msg_science += blackbox_msg - if(1353) - msg_command += blackbox_msg - if(1355) - msg_medical += blackbox_msg - if(1357) - msg_engineering += blackbox_msg - if(1359) - msg_security += blackbox_msg - if(1441) - msg_deathsquad += blackbox_msg - if(1213) - msg_syndicate += blackbox_msg - if(1349) - msg_service += blackbox_msg - if(1347) - msg_cargo += blackbox_msg + record_feedback("tally", "radio_usage", 1, "common") + if(GLOB.SCI_FREQ) + record_feedback("tally", "radio_usage", 1, "science") + if(GLOB.COMM_FREQ) + record_feedback("tally", "radio_usage", 1, "command") + if(GLOB.MED_FREQ) + record_feedback("tally", "radio_usage", 1, "medical") + if(GLOB.ENG_FREQ) + record_feedback("tally", "radio_usage", 1, "engineering") + if(GLOB.SEC_FREQ) + record_feedback("tally", "radio_usage", 1, "security") + if(GLOB.SYND_FREQ) + record_feedback("tally", "radio_usage", 1, "syndicate") + if(GLOB.SERV_FREQ) + record_feedback("tally", "radio_usage", 1, "service") + if(GLOB.SUPP_FREQ) + record_feedback("tally", "radio_usage", 1, "supply") + if(GLOB.CENTCOM_FREQ) + record_feedback("tally", "radio_usage", 1, "centcom") + if(GLOB.AIPRIV_FREQ) + record_feedback("tally", "radio_usage", 1, "ai private") + if(GLOB.REDTEAM_FREQ) + record_feedback("tally", "radio_usage", 1, "CTF red team") + if(GLOB.BLUETEAM_FREQ) + record_feedback("tally", "radio_usage", 1, "CTF blue team") else - msg_other += blackbox_msg + record_feedback("tally", "radio_usage", 1, "other") -/datum/controller/subsystem/blackbox/proc/find_feedback_datum(variable) +/datum/controller/subsystem/blackbox/proc/find_feedback_datum(key, key_type) for(var/datum/feedback_variable/FV in feedback) - if(FV.get_variable() == variable) + if(FV.key == key) return FV - var/datum/feedback_variable/FV = new(variable) + var/datum/feedback_variable/FV = new(key, key_type) feedback += FV return FV +/* +feedback data can be recorded in 5 formats: +"text" + used for simple single-string records i.e. the current map + further calls to the same key will append saved data unless the overwrite argument is true or it already exists + when encoded calls made with overwrite will lack square brackets + calls: SSblackbox.record_feedback("text", "example", 1, "sample text") + SSblackbox.record_feedback("text", "example", 1, "other text") + json: {"data":["sample text","other text"]} +"amount" + used to record simple counts of data i.e. the number of ahelps recieved + further calls to the same key will add or subtract (if increment argument is a negative) from the saved amount + calls: SSblackbox.record_feedback("amount", "example", 8) + SSblackbox.record_feedback("amount", "example", 2) + json: {"data":10} +"tally" + used to track the number of occurances of multiple related values i.e. how many times each type of gun is fired + further calls to the same key will: + add or subtract from the saved value of the data key if it already exists + append the key and it's value if it doesn't exist + calls: SSblackbox.record_feedback("tally", "example", 1, "sample data") + SSblackbox.record_feedback("tally", "example", 4, "sample data") + SSblackbox.record_feedback("tally", "example", 2, "other data") + json: {"data":{"sample data":5,"other data":2}} +"nested tally" + used to track the number of occurances of structured semi-relational values i.e. the results of arcade machines + similar to running total, but related values are nested in a multi-dimensional array built + the final element in the data list is used as the tracking key, all prior elements are used for nesting + further calls to the same key will: + add or subtract from the saved value of the data key if it already exists in the same multi-dimensional position + append the key and it's value if it doesn't exist + calls: SSblackbox.record_feedback("nested tally", "example", 1, list("fruit", "orange", "apricot")) + SSblackbox.record_feedback("nested tally", "example", 2, list("fruit", "orange", "orange")) + SSblackbox.record_feedback("nested tally", "example", 3, list("fruit", "orange", "apricot")) + SSblackbox.record_feedback("nested tally", "example", 10, list("fruit", "red", "apple")) + SSblackbox.record_feedback("nested tally", "example", 1, list("vegetable", "orange", "carrot")) + json: {"data":{"fruit":{"orange":{"apricot":4,"orange":2},"red":{"apple":10}},"vegetable":{"orange":{"carrot":1}}}} + tracking values associated with a number can't merge with a nesting value, trying to do so will append the list + call: SSblackbox.record_feedback("nested tally", "example", 3, list("fruit", "orange")) + json: {"data":{"fruit":{"orange":{"apricot":4,"orange":2},"red":{"apple":10},"orange":3},"vegetable":{"orange":{"carrot":1}}}} +"associative" + used to record text that's associated with a value i.e. coordinates + further calls to the same key will append a new list to existing data + calls: SSblackbox.record_feedback("associative", "example", 1, list("text" = "example", "path" = /obj/item, "number" = 4)) + SSblackbox.record_feedback("associative", "example", 1, list("number" = 7, "text" = "example", "other text" = "sample")) + json: {"data":{"1":{"text":"example","path":"/obj/item","number":"4"},"2":{"number":"7","text":"example","other text":"sample"}}} -/datum/controller/subsystem/blackbox/proc/set_val(variable, value) - if(sealed) +Versioning + If the format of a feedback variable is ever changed, i.e. how many levels of nesting are used or a new type of data is added to it, add it to the versions list + When feedback is being saved if a key is in the versions list the value specified there will be used, otherwise all keys are assumed to be version = 1 + versions is an associative list, remember to use the same string in it as defined on a feedback variable, example: + list/versions = list("round_end_stats" = 4, + "admin_toggle" = 2, + "gun_fired" = 2) +*/ +/datum/controller/subsystem/blackbox/proc/record_feedback(key_type, key, increment, data, overwrite) + if(sealed || !key_type || !istext(key) || !isnum(increment || !data)) return - var/datum/feedback_variable/FV = find_feedback_datum(variable) - FV.set_value(value) + var/datum/feedback_variable/FV = find_feedback_datum(key, key_type) + switch(key_type) + if("text") + if(!istext(data)) + return + if(!islist(FV.json["data"])) + FV.json["data"] = list() + if(overwrite) + FV.json["data"] = data + else + FV.json["data"] |= data + if("amount") + FV.json["data"] += increment + if("tally") + if(!islist(FV.json["data"])) + FV.json["data"] = list() + FV.json["data"]["[data]"] += increment + if("nested tally") + if(!islist(data)) + return + if(!islist(FV.json["data"])) + FV.json["data"] = list() + FV.json["data"] = record_feedback_recurse_list(FV.json["data"], data, increment) + if("associative") + if(!islist(data)) + return + if(!islist(FV.json["data"])) + FV.json["data"] = list() + var/pos = length(FV.json["data"]) + 1 + FV.json["data"]["[pos]"] = list() //in 512 "pos" can be replaced with "[FV.json["data"].len+1]" + for(var/i in data) + FV.json["data"]["[pos]"]["[i]"] = "[data[i]]" //and here with "[FV.json["data"].len]" -/datum/controller/subsystem/blackbox/proc/inc(variable, value) - if(sealed) - return - var/datum/feedback_variable/FV = find_feedback_datum(variable) - FV.inc(value) +/datum/controller/subsystem/blackbox/proc/record_feedback_recurse_list(list/L, list/key_list, increment, depth = 1) + if(depth == key_list.len) + if(L.Find(key_list[depth])) + L["[key_list[depth]]"] += increment + else + var/list/LFI = list(key_list[depth] = increment) + L += LFI + else + if(!L.Find(key_list[depth])) + var/list/LGD = list(key_list[depth] = list()) + L += LGD + L["[key_list[depth-1]]"] = .(L["[key_list[depth]]"], key_list, increment, ++depth) + return L -/datum/controller/subsystem/blackbox/proc/dec(variable,value) - if(sealed) - return - var/datum/feedback_variable/FV = find_feedback_datum(variable) - FV.dec(value) +/datum/feedback_variable + var/key + var/key_type + var/list/json = list() -/datum/controller/subsystem/blackbox/proc/set_details(variable,details) - if(sealed) - return - var/datum/feedback_variable/FV = find_feedback_datum(variable) - FV.set_details(details) - -/datum/controller/subsystem/blackbox/proc/add_details(variable,details) - if(sealed) - return - var/datum/feedback_variable/FV = find_feedback_datum(variable) - FV.add_details(details) +/datum/feedback_variable/New(new_key, new_key_type) + key = new_key + key_type = new_key_type /datum/controller/subsystem/blackbox/proc/ReportDeath(mob/living/L) if(sealed) @@ -208,69 +270,3 @@ SUBSYSTEM_DEF(blackbox) var/map = sanitizeSQL(SSmapping.config.map_name) var/datum/DBQuery/query_report_death = SSdbcore.NewQuery("INSERT INTO [format_table_name("death")] (pod, x_coord, y_coord, z_coord, mapname, server_ip, server_port, round_id, tod, job, special, name, byondkey, laname, lakey, bruteloss, fireloss, brainloss, oxyloss, toxloss, cloneloss, staminaloss, last_words, suicide) VALUES ('[sqlpod]', '[x_coord]', '[y_coord]', '[z_coord]', '[map]', INET_ATON(IF('[world.internet_address]' LIKE '', '0', '[world.internet_address]')), '[world.port]', [GLOB.round_id], '[SQLtime()]', '[sqljob]', '[sqlspecial]', '[sqlname]', '[sqlkey]', '[laname]', '[lakey]', [sqlbrute], [sqlfire], [sqlbrain], [sqloxy], [sqltox], [sqlclone], [sqlstamina], '[last_words]', [suicide])") query_report_death.Execute() - -/datum/controller/subsystem/blackbox/proc/Seal() - if(sealed) - return - if(IsAdminAdvancedProcCall()) - var/msg = "[key_name_admin(usr)] sealed the blackbox!" - message_admins(msg) - log_game("Blackbox sealed[IsAdminAdvancedProcCall() ? " by [key_name(usr)]" : ""].") - sealed = TRUE - -//feedback variable datum, for storing all kinds of data -/datum/feedback_variable - var/variable - var/value - var/list/details - -/datum/feedback_variable/New(param_variable, param_value = 0) - variable = param_variable - value = param_value - -/datum/feedback_variable/proc/inc(num = 1) - if (isnum(value)) - value += num - else - value = text2num(value) - if (isnum(value)) - value += num - else - value = num - -/datum/feedback_variable/proc/dec(num = 1) - if (isnum(value)) - value -= num - else - value = text2num(value) - if (isnum(value)) - value -= num - else - value = -num - -/datum/feedback_variable/proc/set_value(num) - if (isnum(num)) - value = num - -/datum/feedback_variable/proc/get_value() - if (!isnum(value)) - return 0 - return value - -/datum/feedback_variable/proc/get_variable() - return variable - -/datum/feedback_variable/proc/set_details(deets) - details = list("\"[deets]\"") - -/datum/feedback_variable/proc/add_details(deets) - if (!details) - set_details(deets) - else - details += "\"[deets]\"" - -/datum/feedback_variable/proc/get_details() - return details ? details.Join(" | ") : null - -/datum/feedback_variable/proc/get_parsed() - return list(variable,value,details.Join(" | ")) diff --git a/code/controllers/subsystem/job.dm b/code/controllers/subsystem/job.dm index 5645f0527f..f87b672ae0 100644 --- a/code/controllers/subsystem/job.dm +++ b/code/controllers/subsystem/job.dm @@ -462,36 +462,37 @@ SUBSYSTEM_DEF(job) /datum/controller/subsystem/job/proc/HandleFeedbackGathering() for(var/datum/job/job in occupations) - var/tmp_str = "|[job.title]|" - - var/level1 = 0 //high - var/level2 = 0 //medium - var/level3 = 0 //low - var/level4 = 0 //never - var/level5 = 0 //banned - var/level6 = 0 //account too young + var/high = 0 //high + var/medium = 0 //medium + var/low = 0 //low + var/never = 0 //never + var/banned = 0 //banned + var/young = 0 //account too young for(var/mob/dead/new_player/player in GLOB.player_list) if(!(player.ready == PLAYER_READY_TO_PLAY && player.mind && !player.mind.assigned_role)) continue //This player is not ready if(jobban_isbanned(player, job.title)) - level5++ + banned++ continue if(!job.player_old_enough(player.client)) - level6++ + young++ continue if(job.required_playtime_remaining(player.client)) - level6++ + young++ continue if(player.client.prefs.GetJobDepartment(job, 1) & job.flag) - level1++ + high++ else if(player.client.prefs.GetJobDepartment(job, 2) & job.flag) - level2++ + medium++ else if(player.client.prefs.GetJobDepartment(job, 3) & job.flag) - level3++ - else level4++ //not selected - - tmp_str += "HIGH=[level1]|MEDIUM=[level2]|LOW=[level3]|NEVER=[level4]|BANNED=[level5]|YOUNG=[level6]|-" - SSblackbox.add_details("job_preferences",tmp_str) + low++ + else never++ //not selected + SSblackbox.record_feedback("nested tally", "job_preferences", high, list("[job.title]", "high")) + SSblackbox.record_feedback("nested tally", "job_preferences", medium, list("[job.title]", "medium")) + SSblackbox.record_feedback("nested tally", "job_preferences", low, list("[job.title]", "low")) + SSblackbox.record_feedback("nested tally", "job_preferences", never, list("[job.title]", "never")) + SSblackbox.record_feedback("nested tally", "job_preferences", banned, list("[job.title]", "banned")) + SSblackbox.record_feedback("nested tally", "job_preferences", young, list("[job.title]", "young")) /datum/controller/subsystem/job/proc/PopcapReached() var/hpc = CONFIG_GET(number/hard_popcap) diff --git a/code/controllers/subsystem/radiation.dm b/code/controllers/subsystem/radiation.dm index 7883bf1d68..0b69e003fc 100644 --- a/code/controllers/subsystem/radiation.dm +++ b/code/controllers/subsystem/radiation.dm @@ -13,6 +13,6 @@ PROCESSING_SUBSYSTEM_DEF(radiation) return warned_atoms[ref] = TRUE var/atom/master = contamination.parent - SSblackbox.add_details("contaminated", "[master.type]") + SSblackbox.record_feedback("tally", "contaminated", 1, master.type) var/msg = "has become contamintaed with enough radiation to contaminate other objects. || Source: [contamination.source] || Strength: [contamination.strength]" master.investigate_log(msg, INVESTIGATE_RADIATION) \ No newline at end of file diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm index 5fa770179e..352492f835 100644 --- a/code/controllers/subsystem/shuttle.dm +++ b/code/controllers/subsystem/shuttle.dm @@ -167,7 +167,7 @@ SUBSYSTEM_DEF(shuttle) var/mob/M = I if(M.stat != DEAD) ++alive - + var/total = GLOB.joined_player_list.len if(alive / total <= threshold) @@ -247,7 +247,7 @@ SUBSYSTEM_DEF(shuttle) log_game("[key_name(user)] has called the shuttle.") if(call_reason) - SSblackbox.add_details("shuttle_reason", call_reason) + SSblackbox.record_feedback("text", "shuttle_reason", 1, "[call_reason]") log_game("Shuttle call reason: [call_reason]") message_admins("[key_name_admin(user)] has called the shuttle. (TRIGGER CENTCOM RECALL)") diff --git a/code/controllers/subsystem/time_track.dm b/code/controllers/subsystem/time_track.dm index fecba4769c..5ccfb8af19 100644 --- a/code/controllers/subsystem/time_track.dm +++ b/code/controllers/subsystem/time_track.dm @@ -35,4 +35,4 @@ SUBSYSTEM_DEF(time_track) last_tick_realtime = current_realtime last_tick_byond_time = current_byondtime last_tick_tickcount = current_tickcount - SSblackbox.add_details("time_dilation_current", time_dilation_current) \ No newline at end of file + SSblackbox.record_feedback("tally", "time_dilation_current", 1, time_dilation_current) diff --git a/code/datums/antagonists/changeling.dm b/code/datums/antagonists/changeling.dm index d72cb64b81..5ba398af5e 100644 --- a/code/datums/antagonists/changeling.dm +++ b/code/datums/antagonists/changeling.dm @@ -179,7 +179,7 @@ to_chat(owner.current, "We have removed our evolutions from this form, and are now ready to readapt.") reset_powers() canrespec = 0 - SSblackbox.add_details("changeling_power_purchase","Readapt") + SSblackbox.record_feedback("tally", "changeling_power_purchase", 1, "Readapt") return 1 else to_chat(owner.current, "You lack the power to readapt your evolutions!") @@ -279,7 +279,7 @@ if(stored_profiles.len > dna_max) if(!push_out_profile()) return - + if(!first_prof) first_prof = prof diff --git a/code/datums/components/archaeology.dm b/code/datums/components/archaeology.dm index 7c61613c41..d079950345 100644 --- a/code/datums/components/archaeology.dm +++ b/code/datums/components/archaeology.dm @@ -38,7 +38,7 @@ to_chat(user, "You dig a hole.") gets_dug() dug = TRUE - SSblackbox.add_details("pick_used_mining",W.type) + SSblackbox.record_feedback("tally", "pick_used_mining", 1, W.type) return TRUE return FALSE diff --git a/code/datums/helper_datums/construction_datum.dm b/code/datums/helper_datums/construction_datum.dm index 7768a929da..313a93943c 100644 --- a/code/datums/helper_datums/construction_datum.dm +++ b/code/datums/helper_datums/construction_datum.dm @@ -68,6 +68,7 @@ var/obj/item/oldcell = locate (/obj/item/stock_parts/cell) in m QDEL_NULL(oldcell) m.CheckParts(holder.contents) + SSblackbox.record_feedback("tally", "mechas_created", 1, m.name) QDEL_NULL(holder) /datum/construction/proc/set_desc(index as num) diff --git a/code/datums/helper_datums/getrev.dm b/code/datums/helper_datums/getrev.dm index df22be910a..ec39bcec67 100644 --- a/code/datums/helper_datums/getrev.dm +++ b/code/datums/helper_datums/getrev.dm @@ -23,7 +23,7 @@ if(line) var/tmcommit = testmerge[line]["commit"] log_world("Test merge active of PR #[line] commit [tmcommit]") - SSblackbox.add_details("testmerged_prs","[line]|[tmcommit]") + SSblackbox.record_feedback("nested tally", "testmerged_prs", 1, list("[line]", "[tmcommit]")) log_world("Based off origin/master commit [originmastercommit]") else log_world(originmastercommit) diff --git a/code/game/gamemodes/brother/traitor_bro.dm b/code/game/gamemodes/brother/traitor_bro.dm index ff83a3764c..be662ed35e 100644 --- a/code/game/gamemodes/brother/traitor_bro.dm +++ b/code/game/gamemodes/brother/traitor_bro.dm @@ -1,6 +1,6 @@ /datum/objective_team/brother_team - name = "brotherhood" - member_name = "blood brother" + name = "brotherhood" + member_name = "blood brother" var/list/objectives = list() var/meeting_area @@ -71,7 +71,7 @@ num_teams = max(1, round(num_players() / bsc)) for(var/j = 1 to num_teams) - if(possible_brothers.len < min_team_size || antag_candidates.len <= required_enemies) + if(possible_brothers.len < min_team_size || antag_candidates.len <= required_enemies) break var/datum/objective_team/brother_team/team = new var/team_size = prob(10) ? min(3, possible_brothers.len) : 2 @@ -114,18 +114,19 @@ for(var/datum/objective/objective in team.objectives) if(objective.check_completion()) text += "
Objective #[objective_count]: [objective.explanation_text] Success!" - SSblackbox.add_details("traitor_objective","[objective.type]|SUCCESS") + SSblackbox.record_feedback("nested tally", "traitor_objective", 1, list("[objective.type]", "SUCCESS")) else text += "
Objective #[objective_count]: [objective.explanation_text] Fail." - SSblackbox.add_details("traitor_objective","[objective.type]|FAIL") + SSblackbox.record_feedback("nested tally", "traitor_objective", 1, list("[objective.type]", "FAIL")) win = FALSE objective_count++ if(win) text += "
The blood brothers were successful!" - SSblackbox.add_details("brother_success","SUCCESS") + SSblackbox.record_feedback("tally", "brother_success", 1, "SUCCESS") else text += "
The blood brothers have failed!" - SSblackbox.add_details("brother_success","FAIL") + SSblackbox.record_feedback("tally", "brother_success", 1, "FAIL") + text += "
" to_chat(world, text) diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm index e84477b2cb..914937e9e3 100644 --- a/code/game/gamemodes/changeling/changeling.dm +++ b/code/game/gamemodes/changeling/changeling.dm @@ -113,6 +113,7 @@ GLOBAL_VAR(changeling_team_objective_type) //If this is not null, we hand our th if(changeling.objectives.len) var/count = 1 for(var/datum/objective/objective in changeling.objectives) +<<<<<<< HEAD if(istype(objective, /datum/objective/crew)) if(objective.check_completion()) text += "
Objective #[count]: [objective.explanation_text] Success! (Optional)" @@ -128,14 +129,23 @@ GLOBAL_VAR(changeling_team_objective_type) //If this is not null, we hand our th text += "
Objective #[count]: [objective.explanation_text] Fail." SSblackbox.add_details("changeling_objective","[objective.type]|FAIL") changelingwin = 0 +======= + if(objective.check_completion()) + text += "
Objective #[count]: [objective.explanation_text] Success!" + SSblackbox.record_feedback("nested tally", "changeling_objective", 1, list("[objective.type]", "SUCCESS")) + else + text += "
Objective #[count]: [objective.explanation_text] Fail." + SSblackbox.record_feedback("nested tally", "changeling_objective", 1, list("[objective.type]", "FAIL")) + changelingwin = 0 +>>>>>>> 8b19b49... JSON feedback (#32188) count++ if(changelingwin) text += "
The changeling was successful!" - SSblackbox.add_details("changeling_success","SUCCESS") + SSblackbox.record_feedback("tally", "changeling_success", 1, "SUCCESS") else text += "
The changeling has failed." - SSblackbox.add_details("changeling_success","FAIL") + SSblackbox.record_feedback("tally", "changeling_success", 1, "FAIL") text += "
" to_chat(world, text) diff --git a/code/game/gamemodes/changeling/changeling_power.dm b/code/game/gamemodes/changeling/changeling_power.dm index ee6a0bee8c..5b07e0e369 100644 --- a/code/game/gamemodes/changeling/changeling_power.dm +++ b/code/game/gamemodes/changeling/changeling_power.dm @@ -19,7 +19,7 @@ /obj/effect/proc_holder/changeling/proc/on_purchase(mob/user, is_respec) if(!is_respec) - SSblackbox.add_details("changeling_power_purchase",name) + SSblackbox.record_feedback("tally", "changeling_power_purchase", 1, name) /obj/effect/proc_holder/changeling/proc/on_refund(mob/user) return @@ -35,7 +35,7 @@ return var/datum/antagonist/changeling/c = user.mind.has_antag_datum(/datum/antagonist/changeling) if(sting_action(user, target)) - SSblackbox.add_details("changeling_powers",name) + SSblackbox.record_feedback("nested tally", "changeling_powers", 1, list("[name]")) sting_feedback(user, target) c.chem_charges -= chemical_cost diff --git a/code/game/gamemodes/changeling/powers/absorb.dm b/code/game/gamemodes/changeling/powers/absorb.dm index d7ef971406..4584dc5a67 100644 --- a/code/game/gamemodes/changeling/powers/absorb.dm +++ b/code/game/gamemodes/changeling/powers/absorb.dm @@ -41,13 +41,13 @@ to_chat(target, "You feel a sharp stabbing pain!") target.take_overall_damage(40) - SSblackbox.add_details("changeling_powers","Absorb DNA|[i]") + SSblackbox.record_feedback("nested tally", "changeling_powers", 1, list("Absorb DNA", "[i]")) if(!do_mob(user, target, 150)) to_chat(user, "Our absorption of [target] has been interrupted!") changeling.isabsorbing = 0 return - SSblackbox.add_details("changeling_powers","Absorb DNA|4") + SSblackbox.record_feedback("nested tally", "changeling_powers", 1, list("Absorb DNA", "4")) user.visible_message("[user] sucks the fluids from [target]!", "We have absorbed [target].") to_chat(target, "You are absorbed by the changeling!") diff --git a/code/game/gamemodes/changeling/powers/linglink.dm b/code/game/gamemodes/changeling/powers/linglink.dm index 7a93306785..f5143f1d04 100644 --- a/code/game/gamemodes/changeling/powers/linglink.dm +++ b/code/game/gamemodes/changeling/powers/linglink.dm @@ -56,7 +56,7 @@ to_chat(target, "You can now communicate in the changeling hivemind, say \":g message\" to communicate!") target.reagents.add_reagent("salbutamol", 40) // So they don't choke to death while you interrogate them sleep(1800) - SSblackbox.add_details("changeling_powers","Hivemind Link|[i]") + SSblackbox.record_feedback("nested tally", "changeling_powers", 1, list("[name]", "[i]")) if(!do_mob(user, target, 20)) to_chat(user, "Our link with [target] has ended!") changeling.islinking = 0 diff --git a/code/game/gamemodes/clock_cult/clock_scripture.dm b/code/game/gamemodes/clock_cult/clock_scripture.dm index 8a019ed74b..94983923f9 100644 --- a/code/game/gamemodes/clock_cult/clock_scripture.dm +++ b/code/game/gamemodes/clock_cult/clock_scripture.dm @@ -66,7 +66,7 @@ Applications: 8 servants, 3 caches, and 100 CV else successful = TRUE if(slab && !slab.no_cost && !GLOB.ratvar_awakens) //if the slab exists and isn't debug and ratvar isn't up, log the scripture as being used - SSblackbox.add_details("clockcult_scripture_recited", name) + SSblackbox.record_feedback("tally", "clockcult_scripture_recited", 1, name) if(slab) slab.busy = null post_recital() diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index 1391f1dbb5..f20dd25802 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -237,27 +237,27 @@ if("survive") if(!check_survive()) explanation = "Make sure at least [acolytes_needed] acolytes escape on the shuttle. ([acolytes_survived] escaped) Success!" - SSblackbox.add_details("cult_objective","cult_survive|SUCCESS|[acolytes_needed]") + SSblackbox.record_feedback("nested tally", "cult_objective", 1, list("cult_survive", "SUCCESS")) SSticker.news_report = CULT_ESCAPE else explanation = "Make sure at least [acolytes_needed] acolytes escape on the shuttle. ([acolytes_survived] escaped) Fail." - SSblackbox.add_details("cult_objective","cult_survive|FAIL|[acolytes_needed]") + SSblackbox.record_feedback("nested tally", "cult_objective", 1, list("cult_survive", "FAIL")) SSticker.news_report = CULT_FAILURE if("sacrifice") if(GLOB.sac_complete) explanation = "Sacrifice [GLOB.sac_mind], the [GLOB.sac_mind.assigned_role]. Success!" - SSblackbox.add_details("cult_objective","cult_sacrifice|SUCCESS") + SSblackbox.record_feedback("nested tally", "cult_objective", 1, list("cult_sacrifice", "SUCCESS")) else explanation = "Sacrifice [GLOB.sac_mind], the [GLOB.sac_mind.assigned_role]. Fail." - SSblackbox.add_details("cult_objective","cult_sacrifice|FAIL") + SSblackbox.record_feedback("nested tally", "cult_objective", 1, list("cult_sacrifice", "FAIL")) if("eldergod") if(!eldergod) explanation = "Summon Nar-Sie. The summoning can only be accomplished in [english_list(GLOB.summon_spots)].Success!" - SSblackbox.add_details("cult_objective","cult_narsie|SUCCESS") + SSblackbox.record_feedback("nested tally", "cult_objective", 1, list("cult_narsie", "SUCCESS")) SSticker.news_report = CULT_SUMMON else explanation = "Summon Nar-Sie. The summoning can only be accomplished in [english_list(GLOB.summon_spots)]Fail." - SSblackbox.add_details("cult_objective","cult_narsie|FAIL") + SSblackbox.record_feedback("nested tally", "cult_objective", 1, list("cult_narsie", "FAIL")) SSticker.news_report = CULT_FAILURE text += "
Objective #[obj_count]: [explanation]" @@ -297,18 +297,18 @@ if(GLOB.sac_mind) if(GLOB.sac_complete) explanation = "Sacrifice [GLOB.sac_mind], the [GLOB.sac_mind.assigned_role]. Success!" - SSblackbox.add_details("cult_objective","cult_sacrifice|SUCCESS") + SSblackbox.record_feedback("nested tally", "cult_objective", 1, list("cult_sacrifice", "SUCCESS")) else explanation = "Sacrifice [GLOB.sac_mind], the [GLOB.sac_mind.assigned_role]. Fail." - SSblackbox.add_details("cult_objective","cult_sacrifice|FAIL") + SSblackbox.record_feedback("nested tally", "cult_objective", 1, list("cult_sacrifice", "FAIL")) if("eldergod") if(!eldergod) explanation = "Summon Nar-Sie. Success!" - SSblackbox.add_details("cult_objective","cult_narsie|SUCCESS") + SSblackbox.record_feedback("nested tally", "cult_objective", 1, list("cult_narsie", "SUCCESS")) SSticker.news_report = CULT_SUMMON else explanation = "Summon Nar-Sie. Fail." - SSblackbox.add_details("cult_objective","cult_narsie|FAIL") + SSblackbox.record_feedback("nested tally", "cult_objective", 1, list("cult_narsie", "FAIL")) SSticker.news_report = CULT_FAILURE text += "
Objective #[obj_count]: [explanation]" to_chat(world, text) diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index 4dd5f70731..2adaa57a2f 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -246,7 +246,7 @@ This file contains the arcane tome files. var/obj/effect/rune/R = new rune_to_scribe(Turf, chosen_keyword) R.add_mob_blood(user) to_chat(user, "The [lowertext(R.cultist_name)] rune [R.cultist_desc]") - SSblackbox.add_details("cult_runes_scribed", R.cultist_name) + SSblackbox.record_feedback("tally", "cult_runes_scribed", 1, R.cultist_name) /obj/item/tome/proc/check_rune_turf(turf/T, mob/user) if(isspaceturf(T)) diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 7909b0677f..50bde92f9e 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -266,18 +266,19 @@ if(isobserver(M)) ghosts++ - if(clients > 0) - SSblackbox.set_val("round_end_clients",clients) - if(ghosts > 0) - SSblackbox.set_val("round_end_ghosts",ghosts) - if(surviving_humans > 0) - SSblackbox.set_val("survived_human",surviving_humans) - if(surviving_total > 0) - SSblackbox.set_val("survived_total",surviving_total) - if(escaped_humans > 0) - SSblackbox.set_val("escaped_human",escaped_humans) - if(escaped_total > 0) - SSblackbox.set_val("escaped_total",escaped_total) + if(clients) + SSblackbox.record_feedback("nested tally", "round_end_stats", clients, list("clients")) + if(ghosts) + SSblackbox.record_feedback("nested tally", "round_end_stats", ghosts, list("ghosts")) + if(surviving_humans) + SSblackbox.record_feedback("nested tally", "round_end_stats", surviving_humans, list("survivors", "human")) + if(surviving_total) + SSblackbox.record_feedback("nested tally", "round_end_stats", surviving_total, list("survivors", "total")) + if(escaped_humans) + SSblackbox.record_feedback("nested tally", "round_end_stats", escaped_humans, list("escapees", "human")) + if(escaped_total) + SSblackbox.record_feedback("nested tally", "round_end_stats", escaped_total, list("escapees", "total")) + send2irc("Server", "Round just ended.") if(cult.len && !istype(SSticker.mode, /datum/game_mode/cult)) datum_cult_completion() diff --git a/code/game/gamemodes/nuclear/nuclear_challenge.dm b/code/game/gamemodes/nuclear/nuclear_challenge.dm index 6e7a567324..c9314ece1a 100644 --- a/code/game/gamemodes/nuclear/nuclear_challenge.dm +++ b/code/game/gamemodes/nuclear/nuclear_challenge.dm @@ -59,7 +59,8 @@ U.hidden_uplink.telecrystals = CHALLENGE_TELECRYSTALS U.hidden_uplink.set_gamemode(/datum/game_mode/nuclear) CONFIG_SET(number/shuttle_refuel_delay, max(CONFIG_GET(number/shuttle_refuel_delay), CHALLENGE_SHUTTLE_DELAY)) - SSblackbox.set_val("nuclear_challenge_mode",1) + SSblackbox.record_feedback("amount", "nuclear_challenge_mode", 1) + qdel(src) /obj/item/device/nuclear_challenge/proc/check_allowed(mob/living/user) diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm index a97e5a924b..9bb2013947 100644 --- a/code/game/gamemodes/traitor/traitor.dm +++ b/code/game/gamemodes/traitor/traitor.dm @@ -113,6 +113,7 @@ if(traitor.objectives.len)//If the traitor had no objectives, don't need to process this. var/count = 1 for(var/datum/objective/objective in traitor.objectives) +<<<<<<< HEAD if(istype(objective, /datum/objective/crew)) if(objective.check_completion()) objectives += "
Objective #[count]: [objective.explanation_text] Success! (Optional)" @@ -120,9 +121,14 @@ else objectives += "
Objective #[count]: [objective.explanation_text] Fail. (Optional)" SSblackbox.add_details("traitor_objective","[objective.type]|FAIL") +======= + if(objective.check_completion()) + objectives += "
Objective #[count]: [objective.explanation_text] Success!" + SSblackbox.record_feedback("nested tally", "traitor_objective", 1, list("[objective.type]", "SUCCESS")) +>>>>>>> 8b19b49... JSON feedback (#32188) else objectives += "
Objective #[count]: [objective.explanation_text] Fail." - SSblackbox.add_details("traitor_objective","[objective.type]|FAIL") + SSblackbox.record_feedback("nested tally", "traitor_objective", 1, list("[objective.type]", "FAIL")) traitorwin = FALSE count++ @@ -143,10 +149,10 @@ if(traitorwin) text += "
The [special_role_text] was successful!" - SSblackbox.add_details("traitor_success","SUCCESS") + SSblackbox.record_feedback("tally", "traitor_success", 1, "SUCCESS") else text += "
The [special_role_text] has failed!" - SSblackbox.add_details("traitor_success","FAIL") + SSblackbox.record_feedback("tally", "traitor_success", 1, "FAIL") SEND_SOUND(traitor.current, 'sound/ambience/ambifailure.ogg') text += "
" diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index 5b87255d37..4a407a4ef6 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -57,10 +57,10 @@ aspell.name = "Instant [aspell.name]" if(aspell.spell_level >= aspell.level_max) to_chat(user, "This spell cannot be strengthened any further.") - SSblackbox.add_details("wizard_spell_improved", "[name]|[aspell.level]") + SSblackbox.record_feedback("nested tally", "wizard_spell_improved", 1, list("[name]", "[aspell.level]")) return 1 //No same spell found - just learn it - SSblackbox.add_details("wizard_spell_learned", name) + SSblackbox.record_feedback("tally", "wizard_spell_learned", 1, name) user.mind.AddSpell(S) to_chat(user, "You have learned [S.name].") return 1 @@ -265,7 +265,7 @@ /datum/spellbook_entry/item/Buy(mob/living/carbon/human/user,obj/item/spellbook/book) new item_path(get_turf(user)) - SSblackbox.add_details("wizard_spell_learned", name) + SSblackbox.record_feedback("tally", "wizard_spell_learned", 1, name) return 1 /datum/spellbook_entry/item/GetInfo() @@ -464,7 +464,7 @@ return TRUE /datum/spellbook_entry/summon/ghosts/Buy(mob/living/carbon/human/user, obj/item/spellbook/book) - SSblackbox.add_details("wizard_spell_learned", name) + SSblackbox.record_feedback("tally", "wizard_spell_learned", 1, name) new /datum/round_event/wizard/ghost() active = TRUE to_chat(user, "You have cast summon ghosts!") @@ -481,7 +481,7 @@ return !CONFIG_GET(flag/no_summon_guns) /datum/spellbook_entry/summon/guns/Buy(mob/living/carbon/human/user,obj/item/spellbook/book) - SSblackbox.add_details("wizard_spell_learned", name) + SSblackbox.record_feedback("tally", "wizard_spell_learned", 1, name) rightandwrong(0, user, 25) active = 1 playsound(get_turf(user), 'sound/magic/castsummon.ogg', 50, 1) @@ -498,7 +498,7 @@ return !CONFIG_GET(flag/no_summon_magic) /datum/spellbook_entry/summon/magic/Buy(mob/living/carbon/human/user,obj/item/spellbook/book) - SSblackbox.add_details("wizard_spell_learned", name) + SSblackbox.record_feedback("tally", "wizard_spell_learned", 1, name) rightandwrong(1, user, 25) active = 1 playsound(get_turf(user), 'sound/magic/castsummon.ogg', 50, 1) @@ -516,7 +516,7 @@ return !CONFIG_GET(flag/no_summon_events) /datum/spellbook_entry/summon/events/Buy(mob/living/carbon/human/user,obj/item/spellbook/book) - SSblackbox.add_details("wizard_spell_learned", name) + SSblackbox.record_feedback("tally", "wizard_spell_learned", 1, name) summonevents() times++ playsound(get_turf(user), 'sound/magic/castsummon.ogg', 50, 1) diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm index 304f80b470..dc392946da 100644 --- a/code/game/gamemodes/wizard/wizard.dm +++ b/code/game/gamemodes/wizard/wizard.dm @@ -89,6 +89,7 @@ var/count = 1 var/wizardwin = 1 for(var/datum/objective/objective in wizard.objectives) +<<<<<<< HEAD if(istype(objective, /datum/objective/crew)) if(objective.check_completion()) text += "
Objective #[count]: [objective.explanation_text] Success! (Optional)" @@ -104,14 +105,23 @@ text += "
Objective #[count]: [objective.explanation_text] Fail." SSblackbox.add_details("wizard_objective","[objective.type]|FAIL") wizardwin = 0 +======= + if(objective.check_completion()) + text += "
Objective #[count]: [objective.explanation_text] Success!" + SSblackbox.record_feedback("nested tally", "wizard_objective", 1, list("[objective.type]", "SUCCESS")) + else + text += "
Objective #[count]: [objective.explanation_text] Fail." + SSblackbox.record_feedback("nested tally", "wizard_objective", 1, list("[objective.type]", "FAIL")) + wizardwin = 0 +>>>>>>> 8b19b49... JSON feedback (#32188) count++ if(wizard.current && wizard.current.stat!=2 && wizardwin) text += "
The wizard was successful!" - SSblackbox.add_details("wizard_success","SUCCESS") + SSblackbox.record_feedback("tally", "wizard_success", 1, "SUCCESS") else text += "
The wizard has failed!" - SSblackbox.add_details("wizard_success","FAIL") + SSblackbox.record_feedback("tally", "wizard_success", 1, "FAIL") if(wizard.spell_list.len>0) text += "
[wizard.name] used the following spells: " var/i = 1 diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 4203971522..89a4e8b130 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -229,7 +229,6 @@ playsound(loc, 'sound/arcade/win.ogg', 50, 1, extrarange = -3, falloff = 10) if(emagged) - SSblackbox.inc("arcade_win_emagged") new /obj/effect/spawner/newbomb/timer/syndicate(loc) new /obj/item/clothing/head/collectable/petehat(loc) message_admins("[key_name_admin(usr)] has outbombed Cuban Pete and been awarded a bomb.") @@ -237,8 +236,9 @@ Reset() emagged = FALSE else - SSblackbox.inc("arcade_win_normal") prizevend() + SSblackbox.record_feedback("nested tally", "arcade_results", 1, list("win", (emagged ? "emagged":"normal"))) + else if (emagged && (turtle >= 4)) var/boomamt = rand(5,10) @@ -259,10 +259,8 @@ temp = "You have been drained! GAME OVER" playsound(loc, 'sound/arcade/lose.ogg', 50, 1, extrarange = -3, falloff = 10) if(emagged) - SSblackbox.inc("arcade_loss_mana_emagged") usr.gib() - else - SSblackbox.inc("arcade_loss_mana_normal") + SSblackbox.record_feedback("nested tally", "arcade_results", 1, list("loss", "mana", (emagged ? "emagged":"normal"))) else if ((enemy_hp <= 10) && (enemy_mp > 4)) temp = "[enemy_name] heals for 4 health!" @@ -281,10 +279,8 @@ temp = "You have been crushed! GAME OVER" playsound(loc, 'sound/arcade/lose.ogg', 50, 1, extrarange = -3, falloff = 10) if(emagged) - SSblackbox.inc("arcade_loss_hp_emagged") usr.gib() - else - SSblackbox.inc("arcade_loss_hp_normal") + SSblackbox.record_feedback("nested tally", "arcade_results", 1, list("loss", "hp", (emagged ? "emagged":"normal"))) blocked = FALSE return diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index ed8a2f3aec..6223011736 100755 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -115,11 +115,6 @@ //Only notify the admins if an actual change happened log_game("[key_name(usr)] has changed the security level to [get_security_level()].") message_admins("[key_name_admin(usr)] has changed the security level to [get_security_level()].") - switch(GLOB.security_level) - if(SEC_LEVEL_GREEN) - SSblackbox.inc("alert_comms_green",1) - if(SEC_LEVEL_BLUE) - SSblackbox.inc("alert_comms_blue",1) tmp_alertlevel = 0 else to_chat(usr, "You are not authorized to do this!") @@ -178,7 +173,7 @@ SSshuttle.points -= S.credit_cost minor_announce("[usr.name] has purchased [S.name] for [S.credit_cost] credits." , "Shuttle Purchase") message_admins("[key_name_admin(usr)] purchased [S.name].") - SSblackbox.add_details("shuttle_purchase", S.name) + SSblackbox.record_feedback("text", "shuttle_purchase", 1, "[S.name]") else to_chat(usr, "Something went wrong! The shuttle exchange system seems to be down.") else @@ -387,11 +382,6 @@ //Only notify the admins if an actual change happened log_game("[key_name(usr)] has changed the security level to [get_security_level()].") message_admins("[key_name_admin(usr)] has changed the security level to [get_security_level()].") - switch(GLOB.security_level) - if(SEC_LEVEL_GREEN) - SSblackbox.inc("alert_comms_green",1) - if(SEC_LEVEL_BLUE) - SSblackbox.inc("alert_comms_blue",1) tmp_alertlevel = 0 aistate = STATE_DEFAULT if("ai-changeseclevel") diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index 577e7d23eb..18acd9ece7 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -533,7 +533,7 @@ GLOBAL_LIST_EMPTY(allCasters) if(choice=="Confirm") scan_user(usr) GLOB.news_network.CreateFeedChannel(channel_name, scanned_user, c_locked) - SSblackbox.inc("newscaster_channels",1) + SSblackbox.record_feedback("text", "newscaster_channels", 1, "[channel_name]") screen=5 updateUsrDialog() else if(href_list["set_channel_receiving"]) @@ -556,7 +556,7 @@ GLOBAL_LIST_EMPTY(allCasters) screen=6 else GLOB.news_network.SubmitArticle("[parsemarkdown(msg, usr)]", scanned_user, channel_name, photo, 0, allow_comments) - SSblackbox.inc("newscaster_stories",1) + SSblackbox.record_feedback("amount", "newscaster_stories", 1) screen=4 msg = "" updateUsrDialog() @@ -846,7 +846,7 @@ GLOBAL_LIST_EMPTY(allCasters) return /obj/machinery/newscaster/proc/print_paper() - SSblackbox.inc("newscaster_newspapers_printed",1) + SSblackbox.record_feedback("amount", "newspapers_printed", 1) var/obj/item/newspaper/NEWSPAPER = new /obj/item/newspaper for(var/datum/newscaster/feed_channel/FC in GLOB.news_network.network_channels) NEWSPAPER.news_content += FC diff --git a/code/game/machinery/telecomms/broadcasting.dm b/code/game/machinery/telecomms/broadcasting.dm index 8ede0a7852..aebccdddd2 100644 --- a/code/game/machinery/telecomms/broadcasting.dm +++ b/code/game/machinery/telecomms/broadcasting.dm @@ -142,9 +142,7 @@ if(length(receive)) // --- This following recording is intended for research and feedback in the use of department radio channels --- - - var/blackbox_msg = "[AM] [AM.say_quote(message, spans)]" - SSblackbox.LogBroadcast(blackbox_msg, freq) + SSblackbox.LogBroadcast(freq) sleep(50) if(!QDELETED(virt)) //It could happen to YOU diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index 89fc1260f8..45bf5ab1c8 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -510,7 +510,7 @@ if(icon_vend) //Show the vending animation if needed flick(icon_vend,src) new R.product_path(get_turf(src)) - SSblackbox.add_details("vending_machine_usage","[type]|[R.product_path]") + SSblackbox.record_feedback("nested tally", "vending_machine_usage", 1, list("[type]", "[R.product_path]")) vend_ready = 1 return diff --git a/code/game/mecha/mecha_construction_paths.dm b/code/game/mecha/mecha_construction_paths.dm index d8f435190f..c8de01badc 100644 --- a/code/game/mecha/mecha_construction_paths.dm +++ b/code/game/mecha/mecha_construction_paths.dm @@ -304,13 +304,6 @@ holder.icon_state = "ripley14" return TRUE -/datum/construction/reversible/mecha/ripley/spawn_mecha_result() - ..() - SSblackbox.inc("mecha_ripley_created",1) - return - - - /datum/construction/mecha/gygax_chassis steps = list(list("key"=/obj/item/mecha_parts/part/gygax_torso), //1 list("key"=/obj/item/mecha_parts/part/gygax_left_arm), //2 @@ -617,11 +610,6 @@ holder.icon_state = "gygax20" return TRUE -/datum/construction/reversible/mecha/gygax/spawn_mecha_result() - ..() - SSblackbox.inc("mecha_gygax_created",1) - return - /datum/construction/mecha/firefighter_chassis steps = list(list("key"=/obj/item/mecha_parts/part/ripley_torso), //1 list("key"=/obj/item/mecha_parts/part/ripley_left_arm), //2 @@ -866,13 +854,6 @@ holder.icon_state = "fireripley15" return TRUE -/datum/construction/reversible/mecha/firefighter/spawn_mecha_result() - ..() - SSblackbox.inc("mecha_firefighter_created",1) - return - - - /datum/construction/mecha/honker_chassis steps = list(list("key"=/obj/item/mecha_parts/part/honker_torso), //1 list("key"=/obj/item/mecha_parts/part/honker_left_arm), //2 @@ -953,10 +934,6 @@ qdel(used_atom) return TRUE -/datum/construction/mecha/honker/spawn_mecha_result() - ..() - SSblackbox.inc("mecha_honker_created",1) - /datum/construction/mecha/durand_chassis steps = list(list("key"=/obj/item/mecha_parts/part/durand_torso), //1 list("key"=/obj/item/mecha_parts/part/durand_left_arm), //2 @@ -1264,10 +1241,6 @@ holder.icon_state = "durand20" return TRUE -/datum/construction/reversible/mecha/durand/spawn_mecha_result() - ..() - SSblackbox.inc("mecha_durand_created",1) - //PHAZON /datum/construction/mecha/phazon_chassis @@ -1620,10 +1593,6 @@ spawn_mecha_result() return TRUE -/datum/construction/reversible/mecha/phazon/spawn_mecha_result() - ..() - SSblackbox.inc("mecha_phazon_created",1) - //ODYSSEUS /datum/construction/mecha/odysseus_chassis @@ -1857,7 +1826,3 @@ user.visible_message("[user] unfastens the external armor layer.", "You unfasten the external armor layer.") holder.icon_state = "odysseus14" return TRUE - -/datum/construction/reversible/mecha/odysseus/spawn_mecha_result() - ..() - SSblackbox.inc("mecha_odysseus_created",1) diff --git a/code/game/objects/items/charter.dm b/code/game/objects/items/charter.dm index 2527b573d3..c550a0c872 100644 --- a/code/game/objects/items/charter.dm +++ b/code/game/objects/items/charter.dm @@ -45,7 +45,7 @@ if(response_timer_id) to_chat(user, "You're still waiting for approval from your employers about your proposed name change, it'd be best to wait for now.") return - + if(!new_name) return log_game("[key_name(user)] has proposed to name the station as \ @@ -85,7 +85,7 @@ name = "station charter for [station_name()]" desc = "An official document entrusting the governance of \ [station_name()] and surrounding space to Captain [uname]." - SSblackbox.set_details("station_renames","[station_name()]") + SSblackbox.record_feedback("text", "station_renames", 1, "[station_name()]") if(!unlimited_uses) used = TRUE @@ -112,7 +112,7 @@ log_game("[ukey] has renamed the planet as [station_name()].") name = "banner of [station_name()]" desc = "The banner bears the official coat of arms of Nanotrasen, signifying that [station_name()] has been claimed by Captain [uname] in the name of the company." - SSblackbox.set_details("station_renames","[station_name()]") + SSblackbox.record_feedback("text", "station_renames", 1, "[station_name()]") if(!unlimited_uses) used = TRUE diff --git a/code/game/objects/items/handcuffs.dm b/code/game/objects/items/handcuffs.dm index 8ebb7b6061..3085019b51 100644 --- a/code/game/objects/items/handcuffs.dm +++ b/code/game/objects/items/handcuffs.dm @@ -47,7 +47,7 @@ if(do_mob(user, C, 30) && (C.get_num_arms() >= 2 || C.get_arm_ignore())) apply_cuffs(C,user) to_chat(user, "You handcuff [C].") - SSblackbox.add_details("handcuffs","[type]") + SSblackbox.record_feedback("tally", "handcuffs", 1, type) add_logs(user, C, "handcuffed") else @@ -298,7 +298,7 @@ C.legcuffed = src src.loc = C C.update_inv_legcuffed() - SSblackbox.add_details("handcuffs","[type]") + SSblackbox.record_feedback("tally", "handcuffs", 1, type) else if(isanimal(L)) var/mob/living/simple_animal/SA = L if(SA.mob_size > MOB_SIZE_TINY) @@ -359,7 +359,7 @@ C.legcuffed = src src.loc = C C.update_inv_legcuffed() - SSblackbox.add_details("handcuffs","[type]") + SSblackbox.record_feedback("tally", "handcuffs", 1, type) to_chat(C, "\The [src] ensnares you!") C.Knockdown(knockdown) diff --git a/code/game/objects/items/holy_weapons.dm b/code/game/objects/items/holy_weapons.dm index a59f655b46..cde3f127ed 100644 --- a/code/game/objects/items/holy_weapons.dm +++ b/code/game/objects/items/holy_weapons.dm @@ -42,7 +42,7 @@ SSreligion.holy_weapon_type = holy_weapon.type - SSblackbox.set_details("chaplain_weapon","[choice]") + SSblackbox.record_feedback("tally", "chaplain_weapon", 1, "[choice]") if(holy_weapon) holy_weapon.reskinned = TRUE diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm index 9c0199e70f..09e3ccdeb0 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/robot/robot_parts.dm @@ -58,7 +58,7 @@ if(src.l_arm && src.r_arm) if(src.l_leg && src.r_leg) if(src.chest && src.head) - SSblackbox.inc("cyborg_frames_built",1) + SSblackbox.record_feedback("amount", "cyborg_frames_built", 1) return 1 return 0 @@ -234,9 +234,7 @@ qdel(O.mmi) O.mmi = W //and give the real mmi to the borg. O.updatename() - - SSblackbox.inc("cyborg_birth",1) - + SSblackbox.record_feedback("amount", "cyborg_birth", 1) forceMove(O) O.robot_suit = src @@ -335,4 +333,3 @@ add_fingerprint(usr) Interact(usr) - diff --git a/code/game/objects/items/storage/book.dm b/code/game/objects/items/storage/book.dm index 0712fec228..a00e97b8fe 100644 --- a/code/game/objects/items/storage/book.dm +++ b/code/game/objects/items/storage/book.dm @@ -65,7 +65,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible", SSreligion.bible_icon_state = B.icon_state SSreligion.bible_item_state = B.item_state - SSblackbox.set_details("religion_book","[biblename]") + SSblackbox.record_feedback("text", "religion_book", 1, "[biblename]") usr << browse(null, "window=editicon") /obj/item/storage/book/bible/proc/bless(mob/living/carbon/human/H, mob/living/user) diff --git a/code/game/objects/structures/ai_core.dm b/code/game/objects/structures/ai_core.dm index d01cd5a191..4a529571a4 100644 --- a/code/game/objects/structures/ai_core.dm +++ b/code/game/objects/structures/ai_core.dm @@ -185,7 +185,7 @@ if(brain.force_replace_ai_name) A.fully_replace_character_name(A.name, brain.replacement_ai_name()) - SSblackbox.inc("cyborg_ais_created",1) + SSblackbox.record_feedback("amount", "ais_created", 1) qdel(src) else state = AI_READY_CORE diff --git a/code/game/turfs/simulated/minerals.dm b/code/game/turfs/simulated/minerals.dm index 1a5d0b78ec..cbd5b23bf3 100644 --- a/code/game/turfs/simulated/minerals.dm +++ b/code/game/turfs/simulated/minerals.dm @@ -66,7 +66,7 @@ if(ismineralturf(src)) to_chat(user, "You finish cutting into the rock.") gets_drilled(user) - SSblackbox.add_details("pick_used_mining","[P.type]") + SSblackbox.record_feedback("tally", "pick_used_mining", 1, P.type) else return attack_hand(user) @@ -75,7 +75,7 @@ var/i for(i in 1 to mineralAmt) new mineralType(src) - SSblackbox.add_details("ore_mined",mineralType) + SSblackbox.record_feedback("tally", "ore_mined", 1, mineralType) for(var/obj/effect/temp_visual/mining_overlay/M in src) qdel(M) ChangeTurf(turf_type, FALSE, defer_change) diff --git a/code/modules/admin/NewBan.dm b/code/modules/admin/NewBan.dm index bd32533a7f..ef222f683d 100644 --- a/code/modules/admin/NewBan.dm +++ b/code/modules/admin/NewBan.dm @@ -146,7 +146,6 @@ GLOBAL_PROTECT(Banlist) ban_unban_log_save("[key_name(usr)] unbanned [key]") log_admin_private("[key_name(usr)] unbanned [key]") message_admins("[key_name_admin(usr)] unbanned: [key]") - SSblackbox.inc("ban_unban",1) usr.client.holder.DB_ban_unban( ckey(key), BANTYPE_ANY_FULLBAN) for (var/A in GLOB.Banlist.dir) GLOB.Banlist.cd = "/base/[A]" @@ -235,4 +234,3 @@ GLOBAL_PROTECT(Banlist) GLOB.Banlist.cd = "/base" for (var/A in GLOB.Banlist.dir) RemoveBan(A) - diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 3edd7e810c..3ee99900de 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -173,7 +173,7 @@ body += "" usr << browse(body, "window=adminplayeropts-[REF(M)];size=550x515") - SSblackbox.add_details("admin_verb","Player Panel") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Player Panel") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /datum/admins/proc/access_news_network() //MARKER @@ -433,7 +433,7 @@ if(rebootconfirm) var/result = input(usr, "Select reboot method", "World Reboot", options[1]) as null|anything in options if(result) - SSblackbox.add_details("admin_verb","Reboot World") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Reboot World") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! var/init_by = "Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key]." switch(result) if("Regular Restart") @@ -460,7 +460,7 @@ return if(confirm == "Yes") SSticker.force_ending = 1 - SSblackbox.add_details("admin_verb","End Round") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "End Round") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /datum/admins/proc/announce() @@ -476,7 +476,7 @@ message = adminscrub(message,500) to_chat(world, "[usr.client.holder.fakekey ? "Administrator" : usr.key] Announces:\n \t [message]") log_admin("Announce: [key_name(usr)] : [message]") - SSblackbox.add_details("admin_verb","Announce") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Announce") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /datum/admins/proc/set_admin_notice() set category = "Special Verbs" @@ -497,7 +497,7 @@ message_admins("[key_name(usr)] set the admin notice.") log_admin("[key_name(usr)] set the admin notice:\n[new_admin_notice]") to_chat(world, "Admin Notice:\n \t [new_admin_notice]") - SSblackbox.add_details("admin_verb","Set Admin Notice") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Set Admin Notice") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! GLOB.admin_notice = new_admin_notice return @@ -508,7 +508,8 @@ toggle_ooc() log_admin("[key_name(usr)] toggled OOC.") message_admins("[key_name_admin(usr)] toggled OOC.") - SSblackbox.add_details("admin_toggle","Toggle OOC|[GLOB.ooc_allowed]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle OOC", "[GLOB.ooc_allowed]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle OOC", "[GLOB.ooc_allowed]")) /datum/admins/proc/toggleoocdead() set category = "Server" @@ -518,7 +519,7 @@ log_admin("[key_name(usr)] toggled OOC.") message_admins("[key_name_admin(usr)] toggled Dead OOC.") - SSblackbox.add_details("admin_toggle","Toggle Dead OOC|[GLOB.dooc_allowed]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Dead OOC", "[GLOB.dooc_allowed]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /datum/admins/proc/startnow() set category = "Server" @@ -533,7 +534,7 @@ started as soon as possible.)" message_admins("\ [usr.key] has started the game.[msg]") - SSblackbox.add_details("admin_verb","Start Now") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Start Now") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return 1 else to_chat(usr, "Error: Start Now: Game has already started.") @@ -552,7 +553,7 @@ log_admin("[key_name(usr)] toggled new player game entering.") message_admins("[key_name_admin(usr)] toggled new player game entering.") world.update_status() - SSblackbox.add_details("admin_toggle","Toggle Entering|[GLOB.enter_allowed]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Entering", "[GLOB.enter_allowed]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /datum/admins/proc/toggleAI() set category = "Server" @@ -566,7 +567,7 @@ to_chat(world, "The AI job is chooseable now.") log_admin("[key_name(usr)] toggled AI allowed.") world.update_status() - SSblackbox.add_details("admin_toggle","Toggle AI|[!alai]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle AI", "[!alai]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /datum/admins/proc/toggleaban() set category = "Server" @@ -581,7 +582,7 @@ message_admins("[key_name_admin(usr)] toggled respawn to [!new_nores ? "On" : "Off"].") log_admin("[key_name(usr)] toggled respawn to [!new_nores ? "On" : "Off"].") world.update_status() - SSblackbox.add_details("admin_toggle","Toggle Respawn|[!new_nores]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Respawn", "[!new_nores]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /datum/admins/proc/delay() set category = "Server" @@ -600,7 +601,7 @@ to_chat(world, "The game will start in [newtime] seconds.") SEND_SOUND(world, sound('sound/ai/attention.ogg')) log_admin("[key_name(usr)] set the pre-game delay to [newtime] seconds.") - SSblackbox.add_details("admin_verb","Delay Game Start") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Delay Game Start") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /datum/admins/proc/unprison(mob/M in GLOB.mob_list) set category = "Admin" @@ -611,7 +612,7 @@ log_admin("[key_name(usr)] has unprisoned [key_name(M)]") else alert("[M.name] is not prisoned.") - SSblackbox.add_details("admin_verb","Unprison") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Unprison") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! ////////////////////////////////////////////////////////////////////////////////////////////////ADMIN HELPER PROCS @@ -652,7 +653,7 @@ A.admin_spawned = TRUE log_admin("[key_name(usr)] spawned [chosen] at ([usr.x],[usr.y],[usr.z])") - SSblackbox.add_details("admin_verb","Spawn Atom") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Spawn Atom") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /datum/admins/proc/show_traitor_panel(mob/M in GLOB.mob_list) @@ -668,7 +669,7 @@ return M.mind.edit_memory() - SSblackbox.add_details("admin_verb","Traitor Panel") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Traitor Panel") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /datum/admins/proc/toggletintedweldhelmets() @@ -682,7 +683,7 @@ to_chat(world, "The tinted_weldhelh has been disabled!") log_admin("[key_name(usr)] toggled tinted_weldhelh.") message_admins("[key_name_admin(usr)] toggled tinted_weldhelh.") - SSblackbox.add_details("admin_toggle","Toggle Tinted Welding Helmets|[GLOB.tinted_weldhelh]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Tinted Welding Helmets", "[GLOB.tinted_weldhelh]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /datum/admins/proc/toggleguests() set category = "Server" @@ -696,7 +697,7 @@ to_chat(world, "Guests may now enter the game.") log_admin("[key_name(usr)] toggled guests game entering [!new_guest_ban ? "" : "dis"]allowed.") message_admins("[key_name_admin(usr)] toggled guests game entering [!new_guest_ban ? "" : "dis"]allowed.") - SSblackbox.add_details("admin_toggle","Toggle Guests|[!new_guest_ban]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Guests", "[!new_guest_ban]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /datum/admins/proc/output_ai_laws() var/ai_number = 0 @@ -829,7 +830,7 @@ message_admins("[key_name_admin(usr)] has put [frommob.ckey] in control of [tomob.name].") log_admin("[key_name(usr)] stuffed [frommob.ckey] into [tomob.name].") - SSblackbox.add_details("admin_verb","Ghost Drag Control") + SSblackbox.record_feedback("tally", "admin_verb", 1, "Ghost Drag Control") tomob.ckey = frommob.ckey qdel(frommob) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 594e6ba7fb..c0bc15eacc 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -319,7 +319,7 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list( verbs += /client/proc/show_verbs to_chat(src, "Most of your adminverbs have been hidden.") - SSblackbox.add_details("admin_verb","Hide Most Adminverbs") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Hide Most Adminverbs") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return /client/proc/hide_verbs() @@ -330,7 +330,7 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list( verbs += /client/proc/show_verbs to_chat(src, "Almost all of your adminverbs have been hidden.") - SSblackbox.add_details("admin_verb","Hide All Adminverbs") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Hide All Adminverbs") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return /client/proc/show_verbs() @@ -341,7 +341,7 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list( add_admin_verbs() to_chat(src, "All of your adminverbs are now visible.") - SSblackbox.add_details("admin_verb","Show Adminverbs") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Show Adminverbs") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -361,7 +361,7 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list( message_admins("[key_name_admin(usr)] re-entered corpse") ghost.can_reenter_corpse = 1 //force re-entering even when otherwise not possible ghost.reenter_corpse() - SSblackbox.add_details("admin_verb","Admin Reenter") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Admin Reenter") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! else if(isnewplayer(mob)) to_chat(src, "Error: Aghost: Can't admin-ghost whilst in the lobby. Join or Observe first.") else @@ -372,7 +372,7 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list( body.ghostize(1) if(body && !body.key) body.key = "@[key]" //Haaaaaaaack. But the people have spoken. If it breaks; blame adminbus - SSblackbox.add_details("admin_verb","Admin Ghost") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Admin Ghost") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/invisimin() @@ -395,7 +395,7 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list( log_admin("[key_name(usr)] checked antagonists.") //for tsar~ if(!isobserver(usr) && SSticker.HasRoundStarted()) message_admins("[key_name_admin(usr)] checked antagonists.") - SSblackbox.add_details("admin_verb","Check Antagonists") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Check Antagonists") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/unban_panel() set name = "Unban Panel" @@ -405,21 +405,21 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list( holder.unbanpanel() else holder.DB_ban_panel() - SSblackbox.add_details("admin_verb","Unban Panel") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Unban Panel") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/game_panel() set name = "Game Panel" set category = "Admin" if(holder) holder.Game() - SSblackbox.add_details("admin_verb","Game Panel") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Game Panel") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/secrets() set name = "Secrets" set category = "Admin" if (holder) holder.Secrets() - SSblackbox.add_details("admin_verb","Secrets Panel") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Secrets Panel") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/findStealthKey(txt) @@ -467,7 +467,7 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list( mob.mouse_opacity = MOUSE_OPACITY_TRANSPARENT log_admin("[key_name(usr)] has turned stealth mode [holder.fakekey ? "ON" : "OFF"]") message_admins("[key_name_admin(usr)] has turned stealth mode [holder.fakekey ? "ON" : "OFF"]") - SSblackbox.add_details("admin_verb","Stealth Mode") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Stealth Mode") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/drop_bomb() set category = "Special Verbs" @@ -509,7 +509,7 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list( explosion(epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, TRUE, TRUE) message_admins("[ADMIN_LOOKUPFLW(usr)] creating an admin explosion at [epicenter.loc].") log_admin("[key_name(usr)] created an admin explosion at [epicenter.loc].") - SSblackbox.add_details("admin_verb","Drop Bomb") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Drop Bomb") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/drop_dynex_bomb() set category = "Special Verbs" @@ -522,7 +522,7 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list( dyn_explosion(epicenter, ex_power) message_admins("[ADMIN_LOOKUPFLW(usr)] creating an admin explosion at [epicenter.loc].") log_admin("[key_name(usr)] created an admin explosion at [epicenter.loc].") - SSblackbox.add_details("admin_verb","Drop Dynamic Bomb") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Drop Dynamic Bomb") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/get_dynex_range() set category = "Debug" @@ -567,7 +567,7 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list( if(!S) return - SSblackbox.add_details("admin_verb","Give Spell") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Give Spell") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! log_admin("[key_name(usr)] gave [key_name(T)] the spell [S].") message_admins("[key_name_admin(usr)] gave [key_name(T)] the spell [S].") @@ -589,7 +589,7 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list( T.mind.RemoveSpell(S) log_admin("[key_name(usr)] removed the spell [S] from [key_name(T)].") message_admins("[key_name_admin(usr)] removed the spell [S] from [key_name(T)].") - SSblackbox.add_details("admin_verb","Remove Spell") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Remove Spell") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/give_disease(mob/T in GLOB.mob_list) set category = "Fun" @@ -599,7 +599,7 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list( if(!D) return T.ForceContractDisease(new D) - SSblackbox.add_details("admin_verb","Give Disease") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Give Disease") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! log_admin("[key_name(usr)] gave [key_name(T)] the disease [D].") message_admins("[key_name_admin(usr)] gave [key_name(T)] the disease [D].") @@ -613,13 +613,13 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list( O.say(message) log_admin("[key_name(usr)] made [O] at [O.x], [O.y], [O.z] say \"[message]\"") message_admins("[key_name_admin(usr)] made [O] at [O.x], [O.y], [O.z]. say \"[message]\"") - SSblackbox.add_details("admin_verb","Object Say") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Object Say") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/togglebuildmodeself() set name = "Toggle Build Mode Self" set category = "Special Verbs" if(src.mob) togglebuildmode(src.mob) - SSblackbox.add_details("admin_verb","Toggle Build Mode") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle Build Mode") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/check_ai_laws() set name = "Check AI Laws" @@ -648,7 +648,7 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list( to_chat(src, "You are now a normal player.") log_admin("[src] deadmined themself.") message_admins("[src] deadmined themself.") - SSblackbox.add_details("admin_verb","Deadmin") + SSblackbox.record_feedback("tally", "admin_verb", 1, "Deadmin") /client/proc/readmin() set name = "Readmin" @@ -666,7 +666,7 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list( to_chat(src, "You are now an admin.") message_admins("[src] re-adminned themselves.") log_admin("[src] re-adminned themselves.") - SSblackbox.add_details("admin_verb","Readmin") + SSblackbox.record_feedback("tally", "admin_verb", 1, "Readmin") /client/proc/populate_world(amount = 50 as num) set name = "Populate World" diff --git a/code/modules/admin/adminmenu.dm b/code/modules/admin/adminmenu.dm index aa654ab252..64ce5987cf 100644 --- a/code/modules/admin/adminmenu.dm +++ b/code/modules/admin/adminmenu.dm @@ -8,4 +8,4 @@ set category = "Admin" if(usr.client.holder) usr.client.holder.player_panel_new() - SSblackbox.add_details("admin_verb","Player Panel New") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Player Panel New") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/admin/secrets.dm b/code/modules/admin/secrets.dm index 4e759eb06c..b19c80d362 100644 --- a/code/modules/admin/secrets.dm +++ b/code/modules/admin/secrets.dm @@ -194,7 +194,7 @@ if("moveminingshuttle") if(!check_rights(R_ADMIN)) return - SSblackbox.add_details("admin_secrets_fun_used","Send Mining Shuttle") + SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Send Mining Shuttle") if(!SSshuttle.toggleShuttle("mining","mining_home","mining_away")) message_admins("[key_name_admin(usr)] moved mining shuttle") log_admin("[key_name(usr)] moved the mining shuttle") @@ -202,7 +202,7 @@ if("movelaborshuttle") if(!check_rights(R_ADMIN)) return - SSblackbox.add_details("admin_secrets_fun_used","Send Labor Shuttle") + SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Send Labor Shuttle") if(!SSshuttle.toggleShuttle("laborcamp","laborcamp_home","laborcamp_away")) message_admins("[key_name_admin(usr)] moved labor shuttle") log_admin("[key_name(usr)] moved the labor shuttle") @@ -210,7 +210,7 @@ if("moveferry") if(!check_rights(R_ADMIN)) return - SSblackbox.add_details("admin_secrets_fun_used","Send CentCom Ferry") + SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Send CentCom Ferry") if(!SSshuttle.toggleShuttle("ferry","ferry_home","ferry_away")) message_admins("[key_name_admin(usr)] moved the CentCom ferry") log_admin("[key_name(usr)] moved the CentCom ferry") @@ -222,7 +222,7 @@ if(A) var/new_perma = !A.perma_docked A.perma_docked = new_perma - SSblackbox.add_details("admin_toggle","Permadock Arrivals Shuttle|[new_perma]") + SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Permadock Arrivals Shuttle", "[new_perma]")) message_admins("[key_name_admin(usr)] [new_perma ? "stopped" : "started"] the arrivals shuttle") log_admin("[key_name(usr)] [new_perma ? "stopped" : "started"] the arrivals shuttle") else @@ -272,8 +272,13 @@ if("monkey") if(!check_rights(R_FUN)) return +<<<<<<< HEAD SSblackbox.add_details("admin_secrets_fun_used","Monkeyize All Humans") for(var/mob/living/carbon/human/H in GLOB.mob_list) +======= + SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Monkeyize All Humans") + for(var/mob/living/carbon/human/H in GLOB.carbon_list) +>>>>>>> 8b19b49... JSON feedback (#32188) spawn(0) H.monkeyize() ok = 1 @@ -283,7 +288,7 @@ return var/result = input(usr, "Please choose a new species","Species") as null|anything in GLOB.species_list if(result) - SSblackbox.add_details("admin_secrets_fun_used","Mass Species Change([result])") + SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Mass Species Change([result])") log_admin("[key_name(usr)] turned all humans into [result]", 1) message_admins("\blue [key_name_admin(usr)] turned all humans into [result]") var/newtype = GLOB.species_list[result] @@ -294,12 +299,12 @@ if(!check_rights(R_FUN)) return usr.client.triple_ai() - SSblackbox.add_details("admin_secrets_fun_used","Triple AI") + SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Triple AI") if("power") if(!check_rights(R_FUN)) return - SSblackbox.add_details("admin_secrets_fun_used","Power All APCs") + SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Power All APCs") log_admin("[key_name(usr)] made all areas powered", 1) message_admins("[key_name_admin(usr)] made all areas powered") power_restore() @@ -307,7 +312,7 @@ if("unpower") if(!check_rights(R_FUN)) return - SSblackbox.add_details("admin_secrets_fun_used","Depower All APCs") + SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Depower All APCs") log_admin("[key_name(usr)] made all areas unpowered", 1) message_admins("[key_name_admin(usr)] made all areas unpowered") power_failure() @@ -315,7 +320,7 @@ if("quickpower") if(!check_rights(R_FUN)) return - SSblackbox.add_details("admin_secrets_fun_used","Power All SMESs") + SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Power All SMESs") log_admin("[key_name(usr)] made all SMESs powered", 1) message_admins("[key_name_admin(usr)] made all SMESs powered") power_restore_quick() @@ -329,7 +334,7 @@ var/objective = copytext(sanitize(input("Enter an objective")),1,MAX_MESSAGE_LEN) if(!objective) return - SSblackbox.add_details("admin_secrets_fun_used","Traitor All ([objective])") + SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Traitor All ([objective])") for(var/mob/living/H in GLOB.player_list) if(!(ishuman(H)||istype(H, /mob/living/silicon/))) continue @@ -350,7 +355,7 @@ if("changebombcap") if(!check_rights(R_FUN)) return - SSblackbox.add_details("admin_secrets_fun_used","Bomb Cap") + SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Bomb Cap") var/newBombCap = input(usr,"What would you like the new bomb cap to be. (entered as the light damage range (the 3rd number in common (1,2,3) notation)) Must be above 4)", "New Bomb Cap", GLOB.MAX_EX_LIGHT_RANGE) as num|null if (!CONFIG_SET(number/bombcap, newBombCap)) @@ -362,7 +367,7 @@ if("blackout") if(!check_rights(R_FUN)) return - SSblackbox.add_details("admin_secrets_fun_used","Break All Lights") + SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Break All Lights") message_admins("[key_name_admin(usr)] broke all lights") for(var/obj/machinery/light/L in GLOB.machines) L.break_light_tube() @@ -378,7 +383,7 @@ if(animetype == "Cancel" || droptype == "Cancel") return - SSblackbox.add_details("admin_secrets_fun_used","Chinese Cartoons") + SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Chinese Cartoons") message_admins("[key_name_admin(usr)] made everything kawaii.") for(var/mob/living/carbon/human/H in GLOB.mob_list) SEND_SOUND(H, sound('sound/ai/animes.ogg')) @@ -408,7 +413,7 @@ if("whiteout") if(!check_rights(R_FUN)) return - SSblackbox.add_details("admin_secrets_fun_used","Fix All Lights") + SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Fix All Lights") message_admins("[key_name_admin(usr)] fixed all lights") for(var/obj/machinery/light/L in GLOB.machines) L.fix() @@ -419,7 +424,7 @@ if("virus") if(!check_rights(R_FUN)) return - SSblackbox.add_details("admin_secrets_fun_used","Virus Outbreak") + SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Virus Outbreak") switch(alert("Do you want this to be a random disease or do you have something in mind?",,"Make Your Own","Random","Choose")) if("Make Your Own") AdminCreateVirus(usr.client) @@ -434,7 +439,7 @@ if("retardify") if(!check_rights(R_FUN)) return - SSblackbox.add_details("admin_secrets_fun_used","Mass Braindamage") + SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Mass Braindamage") for(var/mob/living/carbon/human/H in GLOB.player_list) to_chat(H, "You suddenly feel stupid.") H.setBrainLoss(60) @@ -443,7 +448,7 @@ if("eagles")//SCRAW if(!check_rights(R_FUN)) return - SSblackbox.add_details("admin_secrets_fun_used","Egalitarian Station") + SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Egalitarian Station") for(var/obj/machinery/door/airlock/W in GLOB.machines) if((W.z in GLOB.station_z_levels) && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison)) W.req_access = list() @@ -460,7 +465,7 @@ if("guns") if(!check_rights(R_FUN)) return - SSblackbox.add_details("admin_secrets_fun_used","Summon Guns") + SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Summon Guns") var/survivor_probability = 0 switch(alert("Do you want this to create survivors antagonists?",,"No Antags","Some Antags","All Antags!")) if("Some Antags") @@ -473,7 +478,7 @@ if("magic") if(!check_rights(R_FUN)) return - SSblackbox.add_details("admin_secrets_fun_used","Summon Magic") + SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Summon Magic") var/survivor_probability = 0 switch(alert("Do you want this to create survivors antagonists?",,"No Antags","Some Antags","All Antags!")) if("Some Antags") @@ -489,23 +494,28 @@ if(!SSevents.wizardmode) if(alert("Do you want to toggle summon events on?",,"Yes","No") == "Yes") summonevents() - SSblackbox.add_details("admin_secrets_fun_used","Activate Summon Events") + SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Activate Summon Events") else switch(alert("What would you like to do?",,"Intensify Summon Events","Turn Off Summon Events","Nothing")) if("Intensify Summon Events") summonevents() - SSblackbox.add_details("admin_secrets_fun_used","Intensify Summon Events") + SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Intensify Summon Events") if("Turn Off Summon Events") SSevents.toggleWizardmode() SSevents.resetFrequency() - SSblackbox.add_details("admin_secrets_fun_used","Disable Summon Events") + SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Disable Summon Events") if("dorf") if(!check_rights(R_FUN)) return +<<<<<<< HEAD SSblackbox.add_details("admin_secrets_fun_used","Dwarf Beards") for(var/mob/living/carbon/human/B in GLOB.mob_list) +======= + SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Dwarf Beards") + for(var/mob/living/carbon/human/B in GLOB.carbon_list) +>>>>>>> 8b19b49... JSON feedback (#32188) B.facial_hair_style = "Dward Beard" B.update_hair() message_admins("[key_name_admin(usr)] activated dorf mode") @@ -513,14 +523,14 @@ if("onlyone") if(!check_rights(R_FUN)) return - SSblackbox.add_details("admin_secrets_fun_used","There Can Be Only One") + SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "There Can Be Only One") usr.client.only_one() sound_to_playing_players('sound/misc/highlander.ogg') if("delayed_onlyone") if(!check_rights(R_FUN)) return - SSblackbox.add_details("admin_secrets_fun_used","There Can Be Only One") + SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "There Can Be Only One") usr.client.only_one_delayed() sound_to_playing_players('sound/misc/highlander_delayed.ogg') diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 5139f0bb47..e1ea166cb5 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -18,7 +18,7 @@ message_admins("[usr.key] has attempted to override the admin panel!") log_admin("[key_name(usr)] tried to use the admin panel without authorization.") return - + if(!CheckAdminHref(href, href_list)) return @@ -542,7 +542,6 @@ WRITE_FILE(GLOB.Banlist["minutes"], minutes) WRITE_FILE(GLOB.Banlist["bannedby"], usr.ckey) GLOB.Banlist.cd = "/base" - SSblackbox.inc("ban_edit",1) unbanpanel() /////////////////////////////////////new ban stuff @@ -564,7 +563,6 @@ if("Yes") ban_unban_log_save("[key_name(usr)] removed [key_name(M)]'s appearance ban.") log_admin_private("[key_name(usr)] removed [key_name(M)]'s appearance ban.") - SSblackbox.inc("ban_appearance_unban", 1) DB_ban_unban(M.ckey, BANTYPE_ANY_JOB, "appearance") if(M.client) jobban_buildcache(M.client) @@ -583,7 +581,6 @@ jobban_buildcache(M.client) ban_unban_log_save("[key_name(usr)] appearance banned [key_name(M)]. reason: [reason]") log_admin_private("[key_name(usr)] appearance banned [key_name(M)]. \nReason: [reason]") - SSblackbox.inc("ban_appearance",1) create_message("note", M.ckey, null, "Appearance banned - [reason]", null, null, 0, 0) message_admins("[key_name_admin(usr)] appearance banned [key_name_admin(M)].") to_chat(M, "You have been appearance banned by [usr.client.ckey].") @@ -962,8 +959,6 @@ jobban_buildcache(M.client) ban_unban_log_save("[key_name(usr)] temp-jobbanned [key_name(M)] from [job] for [mins] minutes. reason: [reason]") log_admin_private("[key_name(usr)] temp-jobbanned [key_name(M)] from [job] for [mins] minutes.") - SSblackbox.inc("ban_job_tmp",1) - SSblackbox.add_details("ban_job_tmp","- [job]") if(!msg) msg = job else @@ -987,8 +982,6 @@ jobban_buildcache(M.client) ban_unban_log_save("[key_name(usr)] perma-jobbanned [key_name(M)] from [job]. reason: [reason]") log_admin_private("[key_name(usr)] perma-banned [key_name(M)] from [job]") - SSblackbox.inc("ban_job",1) - SSblackbox.add_details("ban_job","- [job]") if(!msg) msg = job else @@ -1018,8 +1011,6 @@ DB_ban_unban(M.ckey, BANTYPE_ANY_JOB, job) if(M.client) jobban_buildcache(M.client) - SSblackbox.inc("ban_job_unban",1) - SSblackbox.add_details("ban_job_unban","- [job]") if(!msg) msg = job else @@ -1158,8 +1149,6 @@ ban_unban_log_save("[key_name(usr)] has banned [key_name(M)]. - Reason: [reason] - This will be removed in [mins] minutes.") to_chat(M, "You have been banned by [usr.client.ckey].\nReason: [reason]") to_chat(M, "This is a temporary ban, it will be removed in [mins] minutes.") - SSblackbox.inc("ban_tmp",1) - SSblackbox.inc("ban_tmp_mins",mins) var/bran = CONFIG_GET(string/banappeals) if(bran) to_chat(M, "To try to resolve this matter head to [bran]") @@ -1200,7 +1189,6 @@ var/datum/admin_help/AH = M.client ? M.client.current_ticket : null if(AH) AH.Resolve() - SSblackbox.inc("ban_perma",1) qdel(M.client) if("Cancel") return @@ -1703,7 +1691,7 @@ log_admin("[key_name(H)] got their cookie, spawned by [key_name(src.owner)].") message_admins("[key_name(H)] got their cookie, spawned by [key_name(src.owner)].") - SSblackbox.inc("admin_cookies_spawned",1) + SSblackbox.record_feedback("amount", "admin_cookies_spawned", 1) to_chat(H, "Your prayers have been answered!! You received the best cookie!") SEND_SOUND(H, sound('sound/effects/pray_chaplain.ogg')) @@ -2003,7 +1991,7 @@ var/choice = alert("Please confirm Feed channel creation.","Network Channel Handler","Confirm","Cancel") if(choice=="Confirm") GLOB.news_network.CreateFeedChannel(src.admincaster_feed_channel.channel_name, src.admin_signature, src.admincaster_feed_channel.locked, 1) - SSblackbox.inc("newscaster_channels",1) + SSblackbox.record_feedback("tally", "newscaster_channels", 1, src.admincaster_feed_channel.channel_name) log_admin("[key_name(usr)] created command feed channel: [src.admincaster_feed_channel.channel_name]!") src.admincaster_screen=5 src.access_news_network() @@ -2026,7 +2014,7 @@ src.admincaster_screen = 6 else GLOB.news_network.SubmitArticle(src.admincaster_feed_message.returnBody(-1), src.admin_signature, src.admincaster_feed_channel.channel_name, null, 1) - SSblackbox.inc("newscaster_stories",1) + SSblackbox.record_feedback("amount", "newscaster_stories", 1) src.admincaster_screen=4 for(var/obj/machinery/newscaster/NEWSCASTER in GLOB.allCasters) diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index f178eb08bd..460e162d0b 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -286,9 +286,9 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) GLOB.ahelp_tickets.resolved_tickets -= src switch(state) if(AHELP_CLOSED) - SSblackbox.dec("ahelp_close") + SSblackbox.record_feedback("tally", "ahelp_stats", -1, "closed") if(AHELP_RESOLVED) - SSblackbox.dec("ahelp_resolve") + SSblackbox.record_feedback("tally", "ahelp_stats", -1, "resolved") state = AHELP_ACTIVE closed_at = null if(initiator) @@ -298,7 +298,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) var/msg = "Ticket [TicketHref("#[id]")] reopened by [key_name_admin(usr)]." message_admins(msg) log_admin_private(msg) - SSblackbox.inc("ahelp_reopen") + SSblackbox.record_feedback("tally", "ahelp_stats", 1, "reopened") TicketPanel() //can only be done from here, so refresh it //private @@ -320,7 +320,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) GLOB.ahelp_tickets.ListInsert(src) AddInteraction("Closed by [key_name].") if(!silent) - SSblackbox.inc("ahelp_close") + SSblackbox.record_feedback("tally", "ahelp_stats", 1, "closed") var/msg = "Ticket [TicketHref("#[id]")] closed by [key_name]." message_admins(msg) log_admin_private(msg) @@ -338,7 +338,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) AddInteraction("Resolved by [key_name].") to_chat(initiator, "Your ticket has been resolved by an admin. The Adminhelp verb will be returned to you shortly.") if(!silent) - SSblackbox.inc("ahelp_resolve") + SSblackbox.record_feedback("tally", "ahelp_stats", 1, "resolved") var/msg = "Ticket [TicketHref("#[id]")] resolved by [key_name]" message_admins(msg) log_admin_private(msg) @@ -357,7 +357,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) to_chat(initiator, "Your admin help was rejected. The adminhelp verb has been returned to you so that you may try again.") to_chat(initiator, "Please try to be calm, clear, and descriptive in admin helps, do not assume the admin has seen any related events, and clearly state the names of anybody you are reporting.") - SSblackbox.inc("ahelp_reject") + SSblackbox.record_feedback("tally", "ahelp_stats", 1, "rejected") var/msg = "Ticket [TicketHref("#[id]")] rejected by [key_name]" message_admins(msg) log_admin_private(msg) @@ -376,7 +376,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) if(initiator) to_chat(initiator, msg) - SSblackbox.inc("ahelp_icissue") + SSblackbox.record_feedback("tally", "ahelp_stats", 1, "IC") msg = "Ticket [TicketHref("#[id]")] marked as IC by [key_name]" message_admins(msg) log_admin_private(msg) @@ -514,7 +514,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) if(!msg) return - SSblackbox.add_details("admin_verb","Adminhelp") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Adminhelp") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! if(current_ticket) if(alert(usr, "You already have a ticket open. Is this for the same issue?",,"Yes","No") != "No") if(current_ticket) diff --git a/code/modules/admin/verbs/adminjump.dm b/code/modules/admin/verbs/adminjump.dm index ec1091bb3c..26fb42fe04 100644 --- a/code/modules/admin/verbs/adminjump.dm +++ b/code/modules/admin/verbs/adminjump.dm @@ -1,3 +1,4 @@ +<<<<<<< HEAD /client/proc/jumptoarea(area/A in GLOB.sortedAreas) set name = "Jump to Area" set desc = "Area to jump to" @@ -84,11 +85,100 @@ var/list/keys = list() for(var/mob/M in GLOB.player_list) keys += M.client +======= +/client/proc/jumptoarea(area/A in GLOB.sortedAreas) + set name = "Jump to Area" + set desc = "Area to jump to" + set category = "Admin" + if(!src.holder) + to_chat(src, "Only administrators may use this command.") + return + + if(!A) + return + + var/list/turfs = list() + for(var/area/Ar in A.related) + for(var/turf/T in Ar) + if(T.density) + continue + turfs.Add(T) + + var/turf/T = safepick(turfs) + if(!T) + to_chat(src, "Nowhere to jump to!") + return + usr.forceMove(T) + log_admin("[key_name(usr)] jumped to [A]") + message_admins("[key_name_admin(usr)] jumped to [A]") + SSblackbox.record_feedback("tally", "admin_verb", 1, "Jump To Area") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + +/client/proc/jumptoturf(turf/T in world) + set name = "Jump to Turf" + set category = "Admin" + if(!src.holder) + to_chat(src, "Only administrators may use this command.") + return + + log_admin("[key_name(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]") + message_admins("[key_name_admin(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]") + usr.loc = T + SSblackbox.record_feedback("tally", "admin_verb", 1, "Jump To Turf") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + return + +/client/proc/jumptomob(mob/M in GLOB.mob_list) + set category = "Admin" + set name = "Jump to Mob" + + if(!src.holder) + to_chat(src, "Only administrators may use this command.") + return + + log_admin("[key_name(usr)] jumped to [key_name(M)]") + message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]") + if(src.mob) + var/mob/A = src.mob + var/turf/T = get_turf(M) + if(T && isturf(T)) + SSblackbox.record_feedback("tally", "admin_verb", 1, "Jump To Mob") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + A.forceMove(M.loc) + else + to_chat(A, "This mob is not located in the game world.") + +/client/proc/jumptocoord(tx as num, ty as num, tz as num) + set category = "Admin" + set name = "Jump to Coordinate" + + if (!holder) + to_chat(src, "Only administrators may use this command.") + return + + if(src.mob) + var/mob/A = src.mob + A.x = tx + A.y = ty + A.z = tz + SSblackbox.record_feedback("tally", "admin_verb", 1, "Jump To Coordiate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + message_admins("[key_name_admin(usr)] jumped to coordinates [tx], [ty], [tz]") + +/client/proc/jumptokey() + set category = "Admin" + set name = "Jump to Key" + + if(!src.holder) + to_chat(src, "Only administrators may use this command.") + return + + var/list/keys = list() + for(var/mob/M in GLOB.player_list) + keys += M.client +>>>>>>> 8b19b49... JSON feedback (#32188) var/client/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys) if(!selection) to_chat(src, "No keys found.") return var/mob/M = selection.mob +<<<<<<< HEAD log_admin("[key_name(usr)] jumped to [key_name(M)]") message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]") @@ -157,3 +247,73 @@ else to_chat(src, "Failed to move mob to a valid location.") SSblackbox.add_details("admin_verb","Send Mob") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! +======= + log_admin("[key_name(usr)] jumped to [key_name(M)]") + message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]") + + usr.forceMove(M.loc) + + SSblackbox.record_feedback("tally", "admin_verb", 1, "Jump To Key") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + +/client/proc/Getmob(mob/M in GLOB.mob_list) + set category = "Admin" + set name = "Get Mob" + set desc = "Mob to teleport" + if(!src.holder) + to_chat(src, "Only administrators may use this command.") + return + + var/atom/loc = get_turf(usr) + log_admin("[key_name(usr)] teleported [key_name(M)] to [COORD(loc)]") + var/msg = "[key_name_admin(usr)] teleported [key_name_admin(M)] to [ADMIN_COORDJMP(loc)]" + message_admins(msg) + admin_ticket_log(M, msg) + M.forceMove(loc) + SSblackbox.record_feedback("tally", "admin_verb", 1, "Get Mob") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + +/client/proc/Getkey() + set category = "Admin" + set name = "Get Key" + set desc = "Key to teleport" + + if(!src.holder) + to_chat(src, "Only administrators may use this command.") + return + + var/list/keys = list() + for(var/mob/M in GLOB.player_list) + keys += M.client + var/client/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys) + if(!selection) + return + var/mob/M = selection.mob + + if(!M) + return + log_admin("[key_name(usr)] teleported [key_name(M)]") + var/msg = "[key_name_admin(usr)] teleported [key_name_admin(M)]" + message_admins(msg) + admin_ticket_log(M, msg) + if(M) + M.forceMove(get_turf(usr)) + usr.loc = M.loc + SSblackbox.record_feedback("tally", "admin_verb", 1, "Get Key") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + +/client/proc/sendmob(mob/M in sortmobs()) + set category = "Admin" + set name = "Send Mob" + if(!src.holder) + to_chat(src, "Only administrators may use this command.") + return + var/area/A = input(usr, "Pick an area.", "Pick an area") in GLOB.sortedAreas|null + if(A && istype(A)) + if(M.forceMove(safepick(get_area_turfs(A)))) + + log_admin("[key_name(usr)] teleported [key_name(M)] to [A]") + var/msg = "[key_name_admin(usr)] teleported [key_name_admin(M)] to [A]" + message_admins(msg) + admin_ticket_log(M, msg) + else + to_chat(src, "Failed to move mob to a valid location.") + SSblackbox.record_feedback("tally", "admin_verb", 1, "Send Mob") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! +>>>>>>> 8b19b49... JSON feedback (#32188) diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index 706c6e03bb..01ae5d4dc3 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -11,7 +11,7 @@ if( !ismob(M) || !M.client ) return cmd_admin_pm(M.client,null) - SSblackbox.add_details("admin_verb","Admin PM Mob") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Admin PM Mob") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! //shows a list of clients we could send PMs to, then forwards our choice to cmd_admin_pm /client/proc/cmd_admin_pm_panel() @@ -33,7 +33,7 @@ targets["(No Mob) - [T]"] = T var/target = input(src,"To whom shall we send a message?","Admin PM",null) as null|anything in sortList(targets) cmd_admin_pm(targets[target],null) - SSblackbox.add_details("admin_verb","Admin PM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Admin PM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_ahelp_reply(whom) if(prefs.muted & MUTE_ADMINHELP) diff --git a/code/modules/admin/verbs/adminsay.dm b/code/modules/admin/verbs/adminsay.dm index 8e543c8a73..a24d4165a4 100644 --- a/code/modules/admin/verbs/adminsay.dm +++ b/code/modules/admin/verbs/adminsay.dm @@ -18,5 +18,5 @@ msg = "ADMIN: [key_name(usr, 1)]: [msg]" to_chat(GLOB.admins, msg) - SSblackbox.add_details("admin_verb","Asay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Asay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/admin/verbs/atmosdebug.dm b/code/modules/admin/verbs/atmosdebug.dm index 730cd68987..05c839d3fd 100644 --- a/code/modules/admin/verbs/atmosdebug.dm +++ b/code/modules/admin/verbs/atmosdebug.dm @@ -4,7 +4,7 @@ if(!src.holder) to_chat(src, "Only administrators may use this command.") return - SSblackbox.add_details("admin_verb","Check Plumbing") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Check Plumbing") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! //all plumbing - yes, some things might get stated twice, doesn't matter. for (var/obj/machinery/atmospherics/plumbing in GLOB.machines) @@ -27,7 +27,7 @@ if(!src.holder) to_chat(src, "Only administrators may use this command.") return - SSblackbox.add_details("admin_verb","Check Power") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Check Power") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! for (var/datum/powernet/PN in GLOB.powernets) if (!PN.nodes || !PN.nodes.len) diff --git a/code/modules/admin/verbs/deadsay.dm b/code/modules/admin/verbs/deadsay.dm index ea57fcc790..491d058fea 100644 --- a/code/modules/admin/verbs/deadsay.dm +++ b/code/modules/admin/verbs/deadsay.dm @@ -29,4 +29,4 @@ if (M.stat == DEAD || (M.client && M.client.holder && (M.client.prefs.chat_toggles & CHAT_DEAD))) //admins can toggle deadchat on and off. This is a proc in admin.dm and is only give to Administrators and above M.show_message(rendered, 2) - SSblackbox.add_details("admin_verb","Dsay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Dsay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 73965d52ad..9abefefc3f 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -13,7 +13,7 @@ message_admins("[key_name(src)] toggled debugging on.") log_admin("[key_name(src)] toggled debugging on.") - SSblackbox.add_details("admin_verb","Toggle Debug Two") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle Debug Two") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -95,7 +95,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that . = get_callproc_returnval(returnval, procname) if(.) to_chat(usr, .) - SSblackbox.add_details("admin_verb","Advanced ProcCall") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Advanced ProcCall") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! GLOBAL_VAR(AdminProcCaller) GLOBAL_PROTECT(AdminProcCaller) @@ -165,7 +165,7 @@ GLOBAL_PROTECT(LastAdminCalledProc) var/msg = "[key_name(src)] called [A]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"]." message_admins(msg) admin_ticket_log(A, msg) - SSblackbox.add_details("admin_verb","Atom ProcCall") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Atom ProcCall") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! var/returnval = WrapAdminProcCall(A, procname, lst) // Pass the lst as an argument list to the proc . = get_callproc_returnval(returnval,procname) @@ -236,7 +236,7 @@ GLOBAL_PROTECT(LastAdminCalledProc) t+= "[env_gases[id][GAS_META][META_GAS_NAME]] : [env_gases[id][MOLES]]\n" to_chat(usr, t) - SSblackbox.add_details("admin_verb","Air Status In Location") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Air Status In Location") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_admin_robotize(mob/M in GLOB.mob_list) set category = "Fun" @@ -315,7 +315,7 @@ GLOBAL_PROTECT(LastAdminCalledProc) for(var/datum/paiCandidate/candidate in SSpai.candidates) if(candidate.key == choice.key) SSpai.candidates.Remove(candidate) - SSblackbox.add_details("admin_verb","Make pAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Make pAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_admin_alienize(mob/M in GLOB.mob_list) set category = "Fun" @@ -326,7 +326,7 @@ GLOBAL_PROTECT(LastAdminCalledProc) return if(ishuman(M)) INVOKE_ASYNC(M, /mob/living/carbon/human/proc/Alienize) - SSblackbox.add_details("admin_verb","Make Alien") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Make Alien") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! log_admin("[key_name(usr)] made [key_name(M)] into an alien.") message_admins("[key_name_admin(usr)] made [key_name(M)] into an alien.") else @@ -341,7 +341,7 @@ GLOBAL_PROTECT(LastAdminCalledProc) return if(ishuman(M)) INVOKE_ASYNC(M, /mob/living/carbon/human/proc/slimeize) - SSblackbox.add_details("admin_verb","Make Slime") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Make Slime") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! log_admin("[key_name(usr)] made [key_name(M)] into a slime.") message_admins("[key_name_admin(usr)] made [key_name(M)] into a slime.") else @@ -429,7 +429,7 @@ GLOBAL_PROTECT(LastAdminCalledProc) CHECK_TICK log_admin("[key_name(src)] has deleted all ([counter]) instances of [hsbitem].") message_admins("[key_name_admin(src)] has deleted all ([counter]) instances of [hsbitem].", 0) - SSblackbox.add_details("admin_verb","Delete All") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Delete All") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_debug_make_powernets() @@ -438,7 +438,7 @@ GLOBAL_PROTECT(LastAdminCalledProc) SSmachines.makepowernets() log_admin("[key_name(src)] has remade the powernet. makepowernets() called.") message_admins("[key_name_admin(src)] has remade the powernets. makepowernets() called.", 0) - SSblackbox.add_details("admin_verb","Make Powernets") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Make Powernets") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_admin_grantfullaccess(mob/M in GLOB.mob_list) set category = "Admin" @@ -478,7 +478,7 @@ GLOBAL_PROTECT(LastAdminCalledProc) else alert("Invalid mob") - SSblackbox.add_details("admin_verb","Grant Full Access") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Grant Full Access") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! log_admin("[key_name(src)] has granted [M.key] full access.") message_admins("[key_name_admin(usr)] has granted [M.key] full access.") @@ -499,7 +499,7 @@ GLOBAL_PROTECT(LastAdminCalledProc) M.ckey = src.ckey if( isobserver(adminmob) ) qdel(adminmob) - SSblackbox.add_details("admin_verb","Assume Direct Control") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Assume Direct Control") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_admin_areatest(on_station) set category = "Mapping" @@ -652,7 +652,7 @@ GLOBAL_PROTECT(LastAdminCalledProc) if(isnull(custom)) return - SSblackbox.add_details("admin_verb","Select Equipment") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Select Equipment") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! for (var/obj/item/I in M.get_equipped_items()) qdel(I) switch(dresscode) @@ -841,7 +841,7 @@ GLOBAL_PROTECT(LastAdminCalledProc) return SSshuttle.clear_transit = TRUE message_admins("[key_name_admin(src)] cleared dynamic transit space.") - SSblackbox.add_details("admin_verb","Clear Dynamic Transit") // If... + SSblackbox.record_feedback("tally", "admin_verb", 1, "Clear Dynamic Transit") // If... log_admin("[key_name(src)] cleared dynamic transit space.") @@ -855,7 +855,7 @@ GLOBAL_PROTECT(LastAdminCalledProc) GLOB.medals_enabled = !GLOB.medals_enabled message_admins("[key_name_admin(src)] [GLOB.medals_enabled ? "disabled" : "enabled"] the medal hub lockout.") - SSblackbox.add_details("admin_verb","Toggle Medal Disable") // If... + SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle Medal Disable") // If... log_admin("[key_name(src)] [GLOB.medals_enabled ? "disabled" : "enabled"] the medal hub lockout.") /client/proc/view_runtimes() @@ -878,7 +878,7 @@ GLOBAL_PROTECT(LastAdminCalledProc) SSevents.scheduled = world.time message_admins("[key_name_admin(src)] pumped a random event.") - SSblackbox.add_details("admin_verb","Pump Random Event") + SSblackbox.record_feedback("tally", "admin_verb", 1, "Pump Random Event") log_admin("[key_name(src)] pumped a random event.") /client/proc/start_line_profiling() @@ -889,7 +889,7 @@ GLOBAL_PROTECT(LastAdminCalledProc) PROFILE_START message_admins("[key_name_admin(src)] started line by line profiling.") - SSblackbox.add_details("admin_verb","Start Line Profiling") + SSblackbox.record_feedback("tally", "admin_verb", 1, "Start Line Profiling") log_admin("[key_name(src)] started line by line profiling.") /client/proc/stop_line_profiling() @@ -900,7 +900,7 @@ GLOBAL_PROTECT(LastAdminCalledProc) PROFILE_STOP message_admins("[key_name_admin(src)] stopped line by line profiling.") - SSblackbox.add_details("admin_verb","stop Line Profiling") + SSblackbox.record_feedback("tally", "admin_verb", 1, "Stop Line Profiling") log_admin("[key_name(src)] stopped line by line profiling.") /client/proc/show_line_profiling() diff --git a/code/modules/admin/verbs/diagnostics.dm b/code/modules/admin/verbs/diagnostics.dm index 68df8a6666..bcf58b1a4c 100644 --- a/code/modules/admin/verbs/diagnostics.dm +++ b/code/modules/admin/verbs/diagnostics.dm @@ -16,7 +16,7 @@ to_chat(usr, "@[target.x],[target.y]: [GM.temperature] Kelvin, [GM.return_pressure()] kPa [(burning)?("\red BURNING"):(null)]") for(var/id in GM_gases) to_chat(usr, "[GM_gases[id][GAS_META][META_GAS_NAME]]: [GM_gases[id][MOLES]]") - SSblackbox.add_details("admin_verb","Show Air Status") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Show Air Status") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/fix_next_move() set category = "Debug" @@ -46,7 +46,7 @@ message_admins("[key_name_admin(largest_move_mob)] had the largest move delay with [largest_move_time] frames / [DisplayTimeText(largest_move_time)]!") message_admins("[key_name_admin(largest_click_mob)] had the largest click delay with [largest_click_time] frames / [DisplayTimeText(largest_click_time)]!") message_admins("world.time = [world.time]") - SSblackbox.add_details("admin_verb","Unfreeze Everyone") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Unfreeze Everyone") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return /client/proc/radio_report() @@ -85,7 +85,7 @@ output += "    [device]
" usr << browse(output,"window=radioreport") - SSblackbox.add_details("admin_verb","Show Radio Report") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Show Radio Report") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/reload_admins() set name = "Reload Admins" @@ -99,5 +99,5 @@ return load_admins() - SSblackbox.add_details("admin_verb","Reload All Admins") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Reload All Admins") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! message_admins("[key_name_admin(usr)] manually reloaded admins") diff --git a/code/modules/admin/verbs/fps.dm b/code/modules/admin/verbs/fps.dm index f893c43e08..ce72889a20 100644 --- a/code/modules/admin/verbs/fps.dm +++ b/code/modules/admin/verbs/fps.dm @@ -20,7 +20,7 @@ var/msg = "[key_name(src)] has modified world.fps to [new_fps]" log_admin(msg, 0) message_admins(msg, 0) - SSblackbox.add_details("admin_toggle","Set Server FPS|[new_fps]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Set Server FPS", "[new_fps]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! CONFIG_SET(number/fps, new_fps) world.fps = new_fps diff --git a/code/modules/admin/verbs/getlogs.dm b/code/modules/admin/verbs/getlogs.dm index 9f08eb5e0e..95f6d1166b 100644 --- a/code/modules/admin/verbs/getlogs.dm +++ b/code/modules/admin/verbs/getlogs.dm @@ -49,7 +49,7 @@ else to_chat(src, "Server log not found, try using .getserverlog.") return - SSblackbox.add_details("admin_verb","Show Server Log") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Show Server Log") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return //Shows today's attack log @@ -71,5 +71,5 @@ else to_chat(src, "Server attack log not found, try using .getserverlog.") return - SSblackbox.add_details("admin_verb","Show Server Attack log") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Show Server Attack log") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return diff --git a/code/modules/admin/verbs/machine_upgrade.dm b/code/modules/admin/verbs/machine_upgrade.dm index e3c7b1519d..463ee70ac8 100644 --- a/code/modules/admin/verbs/machine_upgrade.dm +++ b/code/modules/admin/verbs/machine_upgrade.dm @@ -7,4 +7,4 @@ P.rating = new_rating M.RefreshParts() - SSblackbox.add_details("admin_toggle","Machine Upgrade|[new_rating]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Machine Upgrade", "[new_rating]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm index d560099563..059a8c43b9 100644 --- a/code/modules/admin/verbs/mapping.dm +++ b/code/modules/admin/verbs/mapping.dm @@ -78,7 +78,8 @@ GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list( seen[T]++ for(var/turf/T in seen) T.maptext = "[seen[T]]" - SSblackbox.add_details("admin_verb","Show Camera Range") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Show Camera Range") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Show Camera Range") @@ -120,7 +121,7 @@ GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list( output += "" usr << browse(output,"window=airreport;size=1000x500") - SSblackbox.add_details("admin_verb","Show Camera Report") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Show Camera Report") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/intercom_view() set category = "Mapping" @@ -138,7 +139,7 @@ GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list( var/obj/effect/debugging/marker/F = new/obj/effect/debugging/marker(T) if (!(F in view(7,I.loc))) qdel(F) - SSblackbox.add_details("admin_verb","Show Intercom Range") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Show Intercom Range") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_show_at_list() set category = "Mapping" @@ -155,7 +156,7 @@ GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list( usr << browse(dat, "window=at_list") - SSblackbox.add_details("admin_verb","Show Roundstart Active Turfs") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Show Roundstart Active Turfs") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_show_at_markers() set category = "Mapping" @@ -175,7 +176,7 @@ GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list( count++ to_chat(usr, "[count] AT markers placed.") - SSblackbox.add_details("admin_verb","Show Roundstart Active Turf Markers") + SSblackbox.record_feedback("tally", "admin_verb", 1, "Show Roundstart Active Turf Markers") /client/proc/enable_debug_verbs() set category = "Debug" @@ -184,14 +185,14 @@ GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list( return verbs -= /client/proc/enable_debug_verbs verbs.Add(/client/proc/disable_debug_verbs, GLOB.admin_verbs_debug_mapping) - SSblackbox.add_details("admin_verb","Enable Debug Verbs") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Enable Debug Verbs") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/disable_debug_verbs() set category = "Debug" set name = "Debug verbs - Disable" verbs.Remove(/client/proc/disable_debug_verbs, GLOB.admin_verbs_debug_mapping) verbs += /client/proc/enable_debug_verbs - SSblackbox.add_details("admin_verb", "Disable Debug Verbs") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Disable Debug Verbs") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/count_objects_on_z_level() set category = "Mapping" @@ -239,7 +240,7 @@ GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list( to_chat(world, line)*/ to_chat(world, "There are [count] objects of type [type_path] on z-level [num_level]") - SSblackbox.add_details("admin_verb","Count Objects Zlevel") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Count Objects Zlevel") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/count_objects_all() set category = "Mapping" @@ -268,7 +269,7 @@ GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list( to_chat(world, line)*/ to_chat(world, "There are [count] objects of type [type_path] in the game world") - SSblackbox.add_details("admin_verb","Count Objects All") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Count Objects All") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! //This proc is intended to detect lag problems relating to communication procs diff --git a/code/modules/admin/verbs/massmodvar.dm b/code/modules/admin/verbs/massmodvar.dm index e17cbbbf86..6043d23d62 100644 --- a/code/modules/admin/verbs/massmodvar.dm +++ b/code/modules/admin/verbs/massmodvar.dm @@ -12,7 +12,7 @@ method = vv_subtype_prompt(A.type) src.massmodify_variables(A, var_name, method) - SSblackbox.add_details("admin_verb","Mass Edit Variables") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Mass Edit Variables") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/massmodify_variables(datum/O, var_name = "", method = 0) if(!check_rights(R_VAREDIT)) diff --git a/code/modules/admin/verbs/panicbunker.dm b/code/modules/admin/verbs/panicbunker.dm index b159445963..f7d1d60aab 100644 --- a/code/modules/admin/verbs/panicbunker.dm +++ b/code/modules/admin/verbs/panicbunker.dm @@ -12,5 +12,5 @@ message_admins("[key_name_admin(usr)] has toggled the Panic Bunker, it is now [new_pb ? "enabled" : "disabled"].") if (new_pb && !SSdbcore.Connect()) message_admins("The Database is not connected! Panic bunker will not work until the connection is reestablished.") - SSblackbox.add_details("admin_toggle","Toggle Panic Bunker|[new_pb]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Panic Bunker", "[new_pb]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm index 0cc1f72256..9fad82f87d 100644 --- a/code/modules/admin/verbs/playsound.dm +++ b/code/modules/admin/verbs/playsound.dm @@ -42,7 +42,7 @@ SEND_SOUND(M, admin_sound) admin_sound.volume = vol - SSblackbox.add_details("admin_verb","Play Global Sound") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Play Global Sound") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/play_local_sound(S as sound) @@ -54,7 +54,7 @@ log_admin("[key_name(src)] played a local sound [S]") message_admins("[key_name_admin(src)] played a local sound [S]") playsound(get_turf(src.mob), S, 50, 0, 0) - SSblackbox.add_details("admin_verb","Play Local Sound") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Play Local Sound") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/play_web_sound() set category = "Fun" @@ -92,7 +92,12 @@ if(SSevents.holidays && SSevents.holidays[APRIL_FOOLS]) pitch = pick(0.5, 0.7, 0.8, 0.85, 0.9, 0.95, 1.1, 1.2, 1.4, 1.6, 2.0, 2.5) to_chat(src, "You feel the Honkmother messing with your song...") +<<<<<<< HEAD SSblackbox.add_details("played_url", "[web_sound_input]|[ckey]") +======= + + SSblackbox.record_feedback("nested tally", "played_url", 1, list("[ckey]", "[web_sound_input]")) +>>>>>>> 8b19b49... JSON feedback (#32188) log_admin("[key_name(src)] played web sound: [web_sound_input]") message_admins("[key_name(src)] played web sound: [web_sound_input]") else @@ -111,7 +116,7 @@ if((C.prefs.toggles & SOUND_MIDI) && C.chatOutput && !C.chatOutput.broken && C.chatOutput.loaded) C.chatOutput.sendMusic(web_sound_url, pitch) - SSblackbox.add_details("admin_verb","Play Internet Sound") + SSblackbox.record_feedback("tally", "admin_verb", 1, "Play Internet Sound") /client/proc/set_round_end_sound(S as sound) set category = "Fun" @@ -123,7 +128,7 @@ log_admin("[key_name(src)] set the round end sound to [S]") message_admins("[key_name_admin(src)] set the round end sound to [S]") - SSblackbox.add_details("admin_verb","Set Round End Sound") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Set Round End Sound") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/stop_sounds() set category = "Debug" @@ -139,4 +144,4 @@ var/client/C = M.client if(C && C.chatOutput && !C.chatOutput.broken && C.chatOutput.loaded) C.chatOutput.sendMusic(" ") - SSblackbox.add_details("admin_verb","Stop All Playing Sounds") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Stop All Playing Sounds") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/admin/verbs/possess.dm b/code/modules/admin/verbs/possess.dm index 483c9470a2..fc81ca3a02 100644 --- a/code/modules/admin/verbs/possess.dm +++ b/code/modules/admin/verbs/possess.dm @@ -23,7 +23,7 @@ usr.name = O.name usr.client.eye = O usr.control_object = O - SSblackbox.add_details("admin_verb","Possess Object") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Possess Object") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /proc/release(obj/O in world) set name = "Release Obj" @@ -41,7 +41,7 @@ usr.loc = O.loc usr.client.eye = usr usr.control_object = null - SSblackbox.add_details("admin_verb","Release Object") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Release Object") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /proc/givetestverbs(mob/M in GLOB.mob_list) set desc = "Give this guy possess/release verbs" @@ -49,4 +49,4 @@ set name = "Give Possessing Verbs" M.verbs += /proc/possess M.verbs += /proc/release - SSblackbox.add_details("admin_verb","Give Possessing Verbs") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Give Possessing Verbs") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/admin/verbs/pray.dm b/code/modules/admin/verbs/pray.dm index bbe1c48b6a..58dd8f2952 100644 --- a/code/modules/admin/verbs/pray.dm +++ b/code/modules/admin/verbs/pray.dm @@ -41,11 +41,19 @@ if(C.prefs.toggles & SOUND_PRAYERS) if(usr.job == "Chaplain") SEND_SOUND(C, sound('sound/effects/pray.ogg')) +<<<<<<< HEAD to_chat(usr, "Your prayers have been received by the gods.") SSblackbox.add_details("admin_verb","Prayer") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! //log_admin("HELP: [key_name(src)]: [msg]") +======= + to_chat(usr, "Your prayers have been received by the gods.") + + SSblackbox.record_feedback("tally", "admin_verb", 1, "Prayer") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + //log_admin("HELP: [key_name(src)]: [msg]") + +>>>>>>> 8b19b49... JSON feedback (#32188) /proc/CentCom_announce(text , mob/Sender) var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN) msg = "CENTCOM:[ADMIN_FULLMONTY(Sender)] [ADMIN_CENTCOM_REPLY(Sender)]: [msg]" diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 16484cce52..96f49ab8c6 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -18,7 +18,7 @@ var/msg = "[key_name_admin(usr)] made [key_name_admin(M)] drop everything!" message_admins(msg) admin_ticket_log(M, msg) - SSblackbox.add_details("admin_verb","Drop Everything") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Drop Everything") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_admin_subtle_message(mob/M in GLOB.mob_list) set category = "Special Verbs" @@ -45,7 +45,7 @@ msg = " SubtleMessage: [key_name_admin(usr)] -> [key_name_admin(M)] : [msg]" message_admins(msg) admin_ticket_log(M, msg) - SSblackbox.add_details("admin_verb","Subtle Message") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Subtle Message") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_admin_world_narrate() set category = "Special Verbs" @@ -62,7 +62,7 @@ to_chat(world, "[msg]") log_admin("GlobalNarrate: [key_name(usr)] : [msg]") message_admins("[key_name_admin(usr)] Sent a global narrate") - SSblackbox.add_details("admin_verb","Global Narrate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Global Narrate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_admin_direct_narrate(mob/M) set category = "Special Verbs" @@ -88,7 +88,7 @@ msg = " DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]
" message_admins(msg) admin_ticket_log(M, msg) - SSblackbox.add_details("admin_verb","Direct Narrate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Direct Narrate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_admin_local_narrate(atom/A) set category = "Special Verbs" @@ -110,7 +110,7 @@ log_admin("LocalNarrate: [key_name(usr)] at [get_area(A)][COORD(A)]: [msg]") message_admins(" LocalNarrate: [key_name_admin(usr)] at [get_area(A)][ADMIN_JMP(A)]: [msg]
") - SSblackbox.add_details("admin_verb","Local Narrate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Local Narrate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_admin_godmode(mob/M in GLOB.mob_list) set category = "Special Verbs" @@ -125,7 +125,7 @@ var/msg = "[key_name_admin(usr)] has toggled [key_name_admin(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]" message_admins(msg) admin_ticket_log(M, msg) - SSblackbox.add_details("admin_toggle","Godmode|[M.status_flags & GODMODE]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Godmode", "[M.status_flags & GODMODE]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /proc/cmd_admin_mute(whom, mute_type, automute = 0) @@ -187,7 +187,7 @@ message_admins("SPAM AUTOMUTE: [muteunmute] [key_name_admin(whom)] from [mute_string].") if(C) to_chat(C, "You have been [muteunmute] from [mute_string] by the SPAM AUTOMUTE system. Contact an admin.") - SSblackbox.add_details("admin_toggle","Auto Mute [feedback_string]|1") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Auto Mute [feedback_string]", "1")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return if(P.muted & mute_type) @@ -201,7 +201,7 @@ message_admins("[key_name_admin(usr)] has [muteunmute] [key_name_admin(whom)] from [mute_string].") if(C) to_chat(C, "You have been [muteunmute] from [mute_string] by [key_name(usr, include_name = FALSE)].") - SSblackbox.add_details("admin_toggle","Mute [feedback_string]|[P.muted & mute_type]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Mute [feedback_string]", "[P.muted & mute_type]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! //I use this proc for respawn character too. /N @@ -421,7 +421,7 @@ Traitors and the like can also be revived with the previous role mostly intact. to_chat(new_character, "You have been fully respawned. Enjoy the game.") - SSblackbox.add_details("admin_verb","Respawn Character") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Respawn Character") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return new_character /client/proc/cmd_admin_add_freeform_ai_law() @@ -444,7 +444,7 @@ Traitors and the like can also be revived with the previous role mostly intact. ion.announceEvent = announce_ion_laws ion.ionMessage = input - SSblackbox.add_details("admin_verb","Add Custom AI Law") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Add Custom AI Law") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_admin_rejuvenate(mob/living/M in GLOB.mob_list) set category = "Special Verbs" @@ -463,7 +463,7 @@ Traitors and the like can also be revived with the previous role mostly intact. var/msg = "Admin [key_name_admin(usr)] healed / revived [key_name_admin(M)]!" message_admins(msg) admin_ticket_log(M, msg) - SSblackbox.add_details("admin_verb","Rejuvinate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Rejuvinate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_admin_create_centcom_report() set category = "Special Verbs" @@ -488,7 +488,7 @@ Traitors and the like can also be revived with the previous role mostly intact. log_admin("[key_name(src)] has created a command report: [input]") message_admins("[key_name_admin(src)] has created a command report") - SSblackbox.add_details("admin_verb","Create Command Report") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Create Command Report") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_change_command_name() set category = "Special Verbs" @@ -519,7 +519,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if (alert(src, "Are you sure you want to delete:\n[D]\nat[coords]?", "Confirmation", "Yes", "No") == "Yes") log_admin("[key_name(usr)] deleted [D][coords]") message_admins("[key_name_admin(usr)] deleted [D][coords]") - SSblackbox.add_details("admin_verb","Delete") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Delete") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! if(isturf(D)) var/turf/T = D T.ChangeTurf(T.baseturf) @@ -534,7 +534,7 @@ Traitors and the like can also be revived with the previous role mostly intact. to_chat(src, "Only administrators may use this command.") return holder.manage_free_slots() - SSblackbox.add_details("admin_verb","Manage Job Slots") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Manage Job Slots") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_admin_explosion(atom/O as obj|mob|turf in world) set category = "Special Verbs" @@ -568,7 +568,7 @@ Traitors and the like can also be revived with the previous role mostly intact. explosion(O, devastation, heavy, light, flash, null, null,flames) log_admin("[key_name(usr)] created an explosion ([devastation],[heavy],[light],[flames]) at ([O.x],[O.y],[O.z])") message_admins("[key_name_admin(usr)] created an explosion ([devastation],[heavy],[light],[flames]) at ([O.x],[O.y],[O.z])") - SSblackbox.add_details("admin_verb","Explosion") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Explosion") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return else return @@ -593,7 +593,7 @@ Traitors and the like can also be revived with the previous role mostly intact. empulse(O, heavy, light) log_admin("[key_name(usr)] created an EM Pulse ([heavy],[light]) at ([O.x],[O.y],[O.z])") message_admins("[key_name_admin(usr)] created an EM Pulse ([heavy],[light]) at ([O.x],[O.y],[O.z])") - SSblackbox.add_details("admin_verb","EM Pulse") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "EM Pulse") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return else @@ -624,7 +624,7 @@ Traitors and the like can also be revived with the previous role mostly intact. M.gib() else M.gib(1) - SSblackbox.add_details("admin_verb","Gib") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Gib") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_admin_gib_self() set name = "Gibself" @@ -634,7 +634,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(confirm == "Yes") log_admin("[key_name(usr)] used gibself.") message_admins("[key_name_admin(usr)] used gibself.") - SSblackbox.add_details("admin_verb","Gib Self") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Gib Self") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! mob.gib(1, 1, 1) /client/proc/cmd_admin_check_contents(mob/living/M in GLOB.mob_list) @@ -644,7 +644,7 @@ Traitors and the like can also be revived with the previous role mostly intact. var/list/L = M.get_contents() for(var/t in L) to_chat(usr, "[t]") - SSblackbox.add_details("admin_verb","Check Contents") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Check Contents") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/toggle_view_range() set category = "Special Verbs" @@ -659,7 +659,7 @@ Traitors and the like can also be revived with the previous role mostly intact. log_admin("[key_name(usr)] changed their view range to [view].") //message_admins("\blue [key_name_admin(usr)] changed their view range to [view].") //why? removed by order of XSI - SSblackbox.add_details("admin_toggle","Change View Range|[view]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Change View Range", "[view]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/admin_call_shuttle() @@ -678,7 +678,7 @@ Traitors and the like can also be revived with the previous role mostly intact. return SSshuttle.emergency.request() - SSblackbox.add_details("admin_verb","Call Shuttle") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Call Shuttle") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! log_admin("[key_name(usr)] admin-called the emergency shuttle.") message_admins("[key_name_admin(usr)] admin-called the emergency shuttle.") return @@ -695,7 +695,7 @@ Traitors and the like can also be revived with the previous role mostly intact. return SSshuttle.emergency.cancel() - SSblackbox.add_details("admin_verb","Cancel Shuttle") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Cancel Shuttle") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! log_admin("[key_name(usr)] admin-recalled the emergency shuttle.") message_admins("[key_name_admin(usr)] admin-recalled the emergency shuttle.") @@ -731,7 +731,7 @@ Traitors and the like can also be revived with the previous role mostly intact. to_chat(usr, "Remember: you can always disable the randomness by using the verb again, assuming the round hasn't started yet.") CONFIG_SET(flag/force_random_names, TRUE) - SSblackbox.add_details("admin_verb","Make Everyone Random") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Make Everyone Random") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/toggle_random_events() @@ -746,7 +746,7 @@ Traitors and the like can also be revived with the previous role mostly intact. else to_chat(usr, "Random events disabled") message_admins("Admin [key_name_admin(usr)] has disabled random events.") - SSblackbox.add_details("admin_toggle","Toggle Random Events|[new_are]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Random Events", "[new_are]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/admin_change_sec_level() @@ -764,7 +764,7 @@ Traitors and the like can also be revived with the previous role mostly intact. log_admin("[key_name(usr)] changed the security level to [level]") message_admins("[key_name_admin(usr)] changed the security level to [level]") - SSblackbox.add_details("admin_verb","Set Security Level [capitalize(level)]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Set Security Level [capitalize(level)]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/toggle_nuke(obj/machinery/nuclearbomb/N in GLOB.nuke_list) set name = "Toggle Nuke" @@ -783,7 +783,7 @@ Traitors and the like can also be revived with the previous role mostly intact. log_admin("[key_name(usr)] [N.timing ? "activated" : "deactivated"] a nuke at ([N.x],[N.y],[N.z]).") message_admins("[ADMIN_LOOKUPFLW(usr)] [N.timing ? "activated" : "deactivated"] a nuke at [ADMIN_COORDJMP(N)].") - SSblackbox.add_details("admin_toggle","Toggle Nuke|[N.timing]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Nuke", "[N.timing]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits @@ -979,7 +979,7 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits to_chat(usr, "You toggled your admin antag HUD [adding_hud ? "ON" : "OFF"].") message_admins("[key_name_admin(usr)] toggled their admin antag HUD [adding_hud ? "ON" : "OFF"].") log_admin("[key_name(usr)] toggled their admin antag HUD [adding_hud ? "ON" : "OFF"].") - SSblackbox.add_details("admin_toggle","Toggle Antag HUD|[adding_hud]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Antag HUD", "[adding_hud]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/has_antag_hud() var/datum/atom_hud/A = GLOB.huds[ANTAG_HUD_TRAITOR] @@ -1011,7 +1011,7 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits message_admins("[key_name_admin(usr)] added a latent zombie infection to all humans.") log_admin("[key_name(usr)] added a latent zombie infection to all humans.") - SSblackbox.add_details("admin_verb","Mass Zombie Infection") + SSblackbox.record_feedback("tally", "admin_verb", 1, "Mass Zombie Infection") /client/proc/mass_zombie_cure() set category = "Fun" @@ -1029,7 +1029,7 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits message_admins("[key_name_admin(usr)] cured all zombies.") log_admin("[key_name(usr)] cured all zombies.") - SSblackbox.add_details("admin_verb","Mass Zombie Cure") + SSblackbox.record_feedback("tally", "admin_verb", 1, "Mass Zombie Cure") /client/proc/polymorph_all() set category = "Fun" @@ -1048,7 +1048,7 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits message_admins("[key_name_admin(usr)] started polymorphed all living mobs.") log_admin("[key_name(usr)] polymorphed all living mobs.") - SSblackbox.add_details("admin_verb","Polymorph All") + SSblackbox.record_feedback("tally", "admin_verb", 1, "Polymorph All") for(var/mob/living/M in mobs) CHECK_TICK @@ -1089,7 +1089,7 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits message_admins("[key_name_admin(usr)] sent a tip of the round.") log_admin("[key_name(usr)] sent \"[input]\" as the Tip of the Round.") - SSblackbox.add_details("admin_verb","Show Tip") + SSblackbox.record_feedback("tally", "admin_verb", 1, "Show Tip") #define ON_PURRBATION(H) (!(H.dna.features["tail_human"] == "None" && H.dna.features["ears"] == "None")) @@ -1166,7 +1166,7 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits if (GLOB.hub_visibility && !world.reachable) message_admins("WARNING: The server will not show up on the hub because byond is detecting that a filewall is blocking incoming connections.") - SSblackbox.add_details("admin_toggle","Toggled Hub Visibility|[GLOB.hub_visibility]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggled Hub Visibility", "[GLOB.hub_visibility]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/smite(mob/living/carbon/human/target as mob) set name = "Smite" diff --git a/code/modules/admin/verbs/reestablish_db_connection.dm b/code/modules/admin/verbs/reestablish_db_connection.dm index 5c5edf6d17..b00f0e2ccb 100644 --- a/code/modules/admin/verbs/reestablish_db_connection.dm +++ b/code/modules/admin/verbs/reestablish_db_connection.dm @@ -17,11 +17,11 @@ SSdbcore.Disconnect() log_admin("[key_name(usr)] has forced the database to disconnect") message_admins("[key_name_admin(usr)] has forced the database to disconnect!") - SSblackbox.add_details("admin_verb","Force Reestablished Database Connection") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Force Reestablished Database Connection") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! log_admin("[key_name(usr)] is attempting to re-established the DB Connection") message_admins("[key_name_admin(usr)] is attempting to re-established the DB Connection") - SSblackbox.add_details("admin_verb","Reestablished Database Connection") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Reestablished Database Connection") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! SSdbcore.failed_connections = 0 if(!SSdbcore.Connect()) diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm index 34c25dcea6..b929e83ada 100644 --- a/code/modules/assembly/holder.dm +++ b/code/modules/assembly/holder.dm @@ -23,7 +23,7 @@ attach(A2,user) name = "[A.name]-[A2.name] assembly" update_icon() - SSblackbox.add_details("assembly_made","[initial(A.name)]-[initial(A2.name)]") + SSblackbox.record_feedback("tally", "assembly_made", 1, "[initial(A.name)]-[initial(A2.name)]") /obj/item/device/assembly_holder/proc/attach(obj/item/device/assembly/A, mob/user) if(!A.remove_item_from_storage(src)) diff --git a/code/modules/cargo/exports.dm b/code/modules/cargo/exports.dm index 27552e1582..92b953e7b2 100644 --- a/code/modules/cargo/exports.dm +++ b/code/modules/cargo/exports.dm @@ -132,8 +132,7 @@ Credit dupes that require a lot of manual work shouldn't be removed, unless they total_amount += amount cost *= GLOB.E**(-1*k_elasticity*amount) //marginal cost modifier - SSblackbox.add_details("export_sold_amount","[O.type]|[amount]") - SSblackbox.add_details("export_sold_cost","[O.type]|[the_cost]") + SSblackbox.record_feedback("nested tally", "export_sold_cost", 1, list("[O.type]", "[the_cost]")) // Total printout for the cargo console. // Called before the end of current export cycle. diff --git a/code/modules/client/preferences_toggles.dm b/code/modules/client/preferences_toggles.dm index 96cadfa392..fba2c486ab 100644 --- a/code/modules/client/preferences_toggles.dm +++ b/code/modules/client/preferences_toggles.dm @@ -30,7 +30,7 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Ghost/chatterbox, toggle_ghost_ears)( usr.client.prefs.chat_toggles ^= CHAT_GHOSTEARS to_chat(usr, "As a ghost, you will now [(usr.client.prefs.chat_toggles & CHAT_GHOSTEARS) ? "see all speech in the world" : "only see speech from nearby mobs"].") usr.client.prefs.save_preferences() - SSblackbox.add_details("preferences_verb","Toggle Ghost Ears|[usr.client.prefs.chat_toggles & CHAT_GHOSTEARS]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Ghost Ears", "[usr.client.prefs.chat_toggles & CHAT_GHOSTEARS]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /datum/verbs/menu/Settings/Ghost/chatterbox/toggle_ghost_ears/Get_checked(client/C) return C.prefs.chat_toggles & CHAT_GHOSTEARS @@ -41,7 +41,7 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Ghost/chatterbox, toggle_ghost_sight) usr.client.prefs.chat_toggles ^= CHAT_GHOSTSIGHT to_chat(usr, "As a ghost, you will now [(usr.client.prefs.chat_toggles & CHAT_GHOSTSIGHT) ? "see all emotes in the world" : "only see emotes from nearby mobs"].") usr.client.prefs.save_preferences() - SSblackbox.add_details("preferences_verb","Toggle Ghost Sight|[usr.client.prefs.chat_toggles & CHAT_GHOSTSIGHT]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Ghost Sight", "[usr.client.prefs.chat_toggles & CHAT_GHOSTSIGHT]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /datum/verbs/menu/Settings/Ghost/chatterbox/toggle_ghost_sight/Get_checked(client/C) return C.prefs.chat_toggles & CHAT_GHOSTSIGHT @@ -52,7 +52,7 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Ghost/chatterbox, toggle_ghost_whispe usr.client.prefs.chat_toggles ^= CHAT_GHOSTWHISPER to_chat(usr, "As a ghost, you will now [(usr.client.prefs.chat_toggles & CHAT_GHOSTWHISPER) ? "see all whispers in the world" : "only see whispers from nearby mobs"].") usr.client.prefs.save_preferences() - SSblackbox.add_details("preferences_verb","Toggle Ghost Whispers|[usr.client.prefs.chat_toggles & CHAT_GHOSTWHISPER]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Ghost Whispers", "[usr.client.prefs.chat_toggles & CHAT_GHOSTWHISPER]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /datum/verbs/menu/Settings/Ghost/chatterbox/toggle_ghost_whispers/Get_checked(client/C) return C.prefs.chat_toggles & CHAT_GHOSTWHISPER @@ -63,7 +63,7 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Ghost/chatterbox, toggle_ghost_radio) usr.client.prefs.chat_toggles ^= CHAT_GHOSTRADIO to_chat(usr, "As a ghost, you will now [(usr.client.prefs.chat_toggles & CHAT_GHOSTRADIO) ? "see radio chatter" : "not see radio chatter"].") usr.client.prefs.save_preferences() - SSblackbox.add_details("preferences_verb","Toggle Ghost Radio|[usr.client.prefs.chat_toggles & CHAT_GHOSTRADIO]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! //social experiment, increase the generation whenever you copypaste this shamelessly GENERATION 1 + SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Ghost Radio", "[usr.client.prefs.chat_toggles & CHAT_GHOSTRADIO]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! //social experiment, increase the generation whenever you copypaste this shamelessly GENERATION 1 /datum/verbs/menu/Settings/Ghost/chatterbox/toggle_ghost_radio/Get_checked(client/C) return C.prefs.chat_toggles & CHAT_GHOSTRADIO @@ -74,7 +74,7 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Ghost/chatterbox, toggle_ghost_pda)() usr.client.prefs.chat_toggles ^= CHAT_GHOSTPDA to_chat(usr, "As a ghost, you will now [(usr.client.prefs.chat_toggles & CHAT_GHOSTPDA) ? "see all pda messages in the world" : "only see pda messages from nearby mobs"].") usr.client.prefs.save_preferences() - SSblackbox.add_details("preferences_verb","Toggle Ghost PDA|[usr.client.prefs.chat_toggles & CHAT_GHOSTPDA]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Ghost PDA", "[usr.client.prefs.chat_toggles & CHAT_GHOSTPDA]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /datum/verbs/menu/Settings/Ghost/chatterbox/toggle_ghost_pda/Get_checked(client/C) return C.prefs.chat_toggles & CHAT_GHOSTPDA @@ -89,7 +89,7 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Ghost/chatterbox/Events, toggle_death usr.client.prefs.toggles ^= DISABLE_DEATHRATTLE usr.client.prefs.save_preferences() to_chat(usr, "You will [(usr.client.prefs.toggles & DISABLE_DEATHRATTLE) ? "no longer" : "now"] get messages when a sentient mob dies.") - SSblackbox.add_details("preferences_verb", "Toggle Deathrattle|[!(usr.client.prefs.toggles & DISABLE_DEATHRATTLE)]") //If you are copy-pasting this, maybe you should spend some time reading the comments. + SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Deathrattle", "[!(usr.client.prefs.toggles & DISABLE_DEATHRATTLE)]")) //If you are copy-pasting this, maybe you should spend some time reading the comments. /datum/verbs/menu/Settings/Ghost/chatterbox/Events/toggle_deathrattle/Get_checked(client/C) return !(C.prefs.toggles & DISABLE_DEATHRATTLE) @@ -100,7 +100,7 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Ghost/chatterbox/Events, toggle_arriv usr.client.prefs.toggles ^= DISABLE_ARRIVALRATTLE to_chat(usr, "You will [(usr.client.prefs.toggles & DISABLE_ARRIVALRATTLE) ? "no longer" : "now"] get messages when someone joins the station.") usr.client.prefs.save_preferences() - SSblackbox.add_details("preferences_verb", "Toggle Arrivalrattle|[!(usr.client.prefs.toggles & DISABLE_ARRIVALRATTLE)]") //If you are copy-pasting this, maybe you should rethink where your life went so wrong. + SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Arrivalrattle", "[!(usr.client.prefs.toggles & DISABLE_ARRIVALRATTLE)]")) //If you are copy-pasting this, maybe you should rethink where your life went so wrong. /datum/verbs/menu/Settings/Ghost/chatterbox/Events/toggle_arrivalrattle/Get_checked(client/C) return !(C.prefs.toggles & DISABLE_ARRIVALRATTLE) @@ -111,7 +111,7 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Ghost, togglemidroundantag)() usr.client.prefs.toggles ^= MIDROUND_ANTAG usr.client.prefs.save_preferences() to_chat(usr, "You will [(usr.client.prefs.toggles & MIDROUND_ANTAG) ? "now" : "no longer"] be considered for midround antagonist positions.") - SSblackbox.add_details("preferences_verb","Toggle Midround Antag|[usr.client.prefs.toggles & MIDROUND_ANTAG]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Midround Antag", "[usr.client.prefs.toggles & MIDROUND_ANTAG]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /datum/verbs/menu/Settings/Ghost/togglemidroundantag/Get_checked(client/C) return C.prefs.toggles & MIDROUND_ANTAG @@ -128,7 +128,7 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Sound, toggletitlemusic)() else to_chat(usr, "You will no longer hear music in the game lobby.") usr.stop_sound_channel(CHANNEL_LOBBYMUSIC) - SSblackbox.add_details("preferences_verb","Toggle Lobby Music|[usr.client.prefs.toggles & SOUND_LOBBY]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Lobby Music", "[usr.client.prefs.toggles & SOUND_LOBBY]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /datum/verbs/menu/Settings/Sound/toggletitlemusic/Get_checked(client/C) return C.prefs.toggles & SOUND_LOBBY @@ -147,7 +147,7 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Sound, togglemidis)() var/client/C = usr.client if(C && C.chatOutput && !C.chatOutput.broken && C.chatOutput.loaded) C.chatOutput.sendMusic(" ") - SSblackbox.add_details("preferences_verb","Toggle Hearing Midis|[usr.client.prefs.toggles & SOUND_MIDI]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Hearing Midis", "[usr.client.prefs.toggles & SOUND_MIDI]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /datum/verbs/menu/Settings/Sound/togglemidis/Get_checked(client/C) return C.prefs.toggles & SOUND_MIDI @@ -162,7 +162,7 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Sound, toggle_instruments)() to_chat(usr, "You will now hear people playing musical instruments.") else to_chat(usr, "You will no longer hear musical instruments.") - SSblackbox.add_details("preferences_verb","Toggle Instruments|[usr.client.prefs.toggles & SOUND_INSTRUMENTS]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Instruments", "[usr.client.prefs.toggles & SOUND_INSTRUMENTS]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /datum/verbs/menu/Settings/Sound/toggle_instruments/Get_checked(client/C) return C.prefs.toggles & SOUND_INSTRUMENTS @@ -179,7 +179,7 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Sound, Toggle_Soundscape)() to_chat(usr, "You will no longer hear ambient sounds.") usr.stop_sound_channel(CHANNEL_AMBIENCE) usr.stop_sound_channel(CHANNEL_BUZZ) - SSblackbox.add_details("preferences_verb","Toggle Ambience|[usr.client.prefs.toggles & SOUND_AMBIENCE]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Ambience", "[usr.client.prefs.toggles & SOUND_AMBIENCE]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /datum/verbs/menu/Settings/Sound/Toggle_Soundscape/Get_checked(client/C) return C.prefs.toggles & SOUND_AMBIENCE @@ -196,7 +196,7 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Sound, toggle_ship_ambience)() to_chat(usr, "You will no longer hear ship ambience.") usr.stop_sound_channel(CHANNEL_BUZZ) usr.client.ambience_playing = 0 - SSblackbox.add_details("preferences_verb", "Toggle Ship Ambience|[usr.client.prefs.toggles & SOUND_SHIP_AMBIENCE]") //If you are copy-pasting this, I bet you read this comment expecting to see the same thing :^) + SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Ship Ambience", "[usr.client.prefs.toggles & SOUND_SHIP_AMBIENCE]")) //If you are copy-pasting this, I bet you read this comment expecting to see the same thing :^) /datum/verbs/menu/Settings/Sound/toggle_ship_ambience/Get_checked(client/C) return C.prefs.toggles & SOUND_SHIP_AMBIENCE @@ -208,7 +208,7 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Sound, toggle_announcement_sound)() usr.client.prefs.toggles ^= SOUND_ANNOUNCEMENTS to_chat(usr, "You will now [(usr.client.prefs.toggles & SOUND_ANNOUNCEMENTS) ? "hear announcement sounds" : "no longer hear announcements"].") usr.client.prefs.save_preferences() - SSblackbox.add_details("preferences_verb","Toggle Announcement Sound|[usr.client.prefs.toggles & SOUND_ANNOUNCEMENTS]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Announcement Sound", "[usr.client.prefs.toggles & SOUND_ANNOUNCEMENTS]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /datum/verbs/menu/Settings/Sound/toggle_announcement_sound/Get_checked(client/C) return C.prefs.toggles & SOUND_ANNOUNCEMENTS @@ -223,7 +223,7 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Sound, toggleprayersounds)() to_chat(usr, "You will now hear prayer sounds.") else to_chat(usr, "You will no longer prayer sounds.") - SSblackbox.add_details("admin_toggle", "Toggle Prayer Sounds|[usr.client.prefs.toggles & SOUND_PRAYERS]") + SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Prayer Sounds", "[usr.client.prefs.toggles & SOUND_PRAYERS]")) /datum/verbs/menu/Settings/Sound/toggleprayersounds/Get_checked(client/C) return C.prefs.toggles & SOUND_PRAYERS @@ -236,7 +236,7 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Sound, toggleprayersounds)() var/client/C = usr.client if(C && C.chatOutput && !C.chatOutput.broken && C.chatOutput.loaded) C.chatOutput.sendMusic(" ") - SSblackbox.add_details("preferences_verb","Stop Self Sounds") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Stop Self Sounds")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! TOGGLE_CHECKBOX(/datum/verbs/menu/Settings, listen_ooc)() @@ -246,7 +246,7 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings, listen_ooc)() usr.client.prefs.chat_toggles ^= CHAT_OOC usr.client.prefs.save_preferences() to_chat(usr, "You will [(usr.client.prefs.chat_toggles & CHAT_OOC) ? "now" : "no longer"] see messages on the OOC channel.") - SSblackbox.add_details("preferences_verb","Toggle Seeing OOC|[usr.client.prefs.chat_toggles & CHAT_OOC]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Seeing OOC", "[usr.client.prefs.chat_toggles & CHAT_OOC]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /datum/verbs/menu/Settings/listen_ooc/Get_checked(client/C) return C.prefs.chat_toggles & CHAT_OOC @@ -337,7 +337,7 @@ GLOBAL_LIST_INIT(ghost_orbits, list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS prefs.toggles ^= INTENT_STYLE to_chat(src, "[(prefs.toggles & INTENT_STYLE) ? "Clicking directly on intents selects them." : "Clicking on intents rotates selection clockwise."]") prefs.save_preferences() - SSblackbox.add_details("preferences_verb","Toggle Intent Selection|[prefs.toggles & INTENT_STYLE]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Intent Selection", "[prefs.toggles & INTENT_STYLE]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/verb/toggle_ghost_hud_pref() set name = "Toggle Ghost HUD" @@ -349,7 +349,7 @@ GLOBAL_LIST_INIT(ghost_orbits, list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS prefs.save_preferences() if(isobserver(mob)) mob.hud_used.show_hud() - SSblackbox.add_details("preferences_verb","Toggle Ghost HUD|[prefs.ghost_hud]") + SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Ghost HUD", "[prefs.ghost_hud]")) /client/verb/toggle_inquisition() // warning: unexpected inquisition set name = "Toggle Inquisitiveness" @@ -362,7 +362,7 @@ GLOBAL_LIST_INIT(ghost_orbits, list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS to_chat(src, "You will now examine everything you click on.") else to_chat(src, "You will no longer examine things you click on.") - SSblackbox.add_details("preferences_verb","Toggle Ghost Inquisitiveness|[prefs.inquisitive_ghost]") + SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Ghost Inquisitiveness", "[prefs.inquisitive_ghost]")) //Admin Preferences /client/proc/toggleadminhelpsound() @@ -374,7 +374,7 @@ GLOBAL_LIST_INIT(ghost_orbits, list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS prefs.toggles ^= SOUND_ADMINHELP prefs.save_preferences() to_chat(usr, "You will [(prefs.toggles & SOUND_ADMINHELP) ? "now" : "no longer"] hear a sound when adminhelps arrive.") - SSblackbox.add_details("admin_toggle","Toggle Adminhelp Sound|[prefs.toggles & SOUND_ADMINHELP]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Adminhelp Sound", "[prefs.toggles & SOUND_ADMINHELP]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/toggleannouncelogin() set name = "Do/Don't Announce Login" @@ -385,7 +385,7 @@ GLOBAL_LIST_INIT(ghost_orbits, list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS prefs.toggles ^= ANNOUNCE_LOGIN prefs.save_preferences() to_chat(usr, "You will [(prefs.toggles & ANNOUNCE_LOGIN) ? "now" : "no longer"] have an announcement to other admins when you login.") - SSblackbox.add_details("admin_toggle","Toggle Login Announcement|[prefs.toggles & ANNOUNCE_LOGIN]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Login Announcement", "[prefs.toggles & ANNOUNCE_LOGIN]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/toggle_hear_radio() set name = "Show/Hide Radio Chatter" @@ -396,7 +396,7 @@ GLOBAL_LIST_INIT(ghost_orbits, list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS prefs.chat_toggles ^= CHAT_RADIO prefs.save_preferences() to_chat(usr, "You will [(prefs.chat_toggles & CHAT_RADIO) ? "now" : "no longer"] see radio chatter from nearby radios or speakers") - SSblackbox.add_details("admin_toggle","Toggle Radio Chatter|[prefs.chat_toggles & CHAT_RADIO]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Radio Chatter", "[prefs.chat_toggles & CHAT_RADIO]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/deadchat() set name = "Show/Hide Deadchat" @@ -405,7 +405,7 @@ GLOBAL_LIST_INIT(ghost_orbits, list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS prefs.chat_toggles ^= CHAT_DEAD prefs.save_preferences() to_chat(src, "You will [(prefs.chat_toggles & CHAT_DEAD) ? "now" : "no longer"] see deadchat.") - SSblackbox.add_details("admin_toggle","Toggle Deadchat Visibility|[prefs.chat_toggles & CHAT_DEAD]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Deadchat Visibility", "[prefs.chat_toggles & CHAT_DEAD]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/toggleprayers() set name = "Show/Hide Prayers" @@ -414,5 +414,4 @@ GLOBAL_LIST_INIT(ghost_orbits, list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS prefs.chat_toggles ^= CHAT_PRAYER prefs.save_preferences() to_chat(src, "You will [(prefs.chat_toggles & CHAT_PRAYER) ? "now" : "no longer"] see prayerchat.") - SSblackbox.add_details("admin_toggle","Toggle Prayer Visibility|[prefs.chat_toggles & CHAT_PRAYER]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - + SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Prayer Visibility", "[prefs.chat_toggles & CHAT_PRAYER]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/client/verbs/ooc.dm b/code/modules/client/verbs/ooc.dm index a0c1e2135a..3287e27f6d 100644 --- a/code/modules/client/verbs/ooc.dm +++ b/code/modules/client/verbs/ooc.dm @@ -115,7 +115,7 @@ GLOBAL_VAR_INIT(normal_ooc_colour, OOC_COLOR) if(new_ooccolor) prefs.ooccolor = sanitize_ooccolor(new_ooccolor) prefs.save_preferences() - SSblackbox.add_details("admin_verb","Set OOC Color") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + SSblackbox.record_feedback("tally", "admin_verb", 1, "Set OOC Color") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return /client/verb/resetcolorooc() diff --git a/code/modules/clothing/under/accessories.dm b/code/modules/clothing/under/accessories.dm index 13aed37142..f983ca2563 100644 --- a/code/modules/clothing/under/accessories.dm +++ b/code/modules/clothing/under/accessories.dm @@ -134,7 +134,7 @@ user.visible_message("[user] pins \the [src] on [M]'s chest.", \ "You pin \the [src] on [M]'s chest.") if(input) - SSblackbox.add_details("commendation", json_encode(list("commender" = "[user.real_name]", "commendee" = "[M.real_name]", "medal" = "[src]", "reason" = input))) + SSblackbox.record_feedback("associative", "commendation", 1, list("commender" = "[user.real_name]", "commendee" = "[M.real_name]", "medal" = "[src]", "reason" = input)) GLOB.commendations += "[user.real_name] awarded [M.real_name] the [name]! \n- [input]" commended = TRUE log_game("[key_name(M)] was given the following commendation by [key_name(user)]: [input]") @@ -323,4 +323,4 @@ icon_state = "skull" item_color = "skull" above_suit = TRUE - armor = list(melee = 5, bullet = 5, laser = 5, energy = 5, bomb = 20, bio = 20, rad = 5, fire = 0, acid = 25) \ No newline at end of file + armor = list(melee = 5, bullet = 5, laser = 5, energy = 5, bomb = 20, bio = 20, rad = 5, fire = 0, acid = 25) diff --git a/code/modules/crafting/craft.dm b/code/modules/crafting/craft.dm index 7ff0bf78be..3e4e93ca4c 100644 --- a/code/modules/crafting/craft.dm +++ b/code/modules/crafting/craft.dm @@ -137,7 +137,7 @@ var/atom/movable/I = new R.result (get_turf(user.loc)) I.CheckParts(parts, R) if(send_feedback) - SSblackbox.add_details("object_crafted","[I.type]") + SSblackbox.record_feedback("tally", "object_crafted", 1, I.type) return 0 return "." return ", missing tool." diff --git a/code/modules/events/_event.dm b/code/modules/events/_event.dm index a7957ede48..266c2d4720 100644 --- a/code/modules/events/_event.dm +++ b/code/modules/events/_event.dm @@ -82,13 +82,13 @@ triggering = FALSE message_admins("[key_name_admin(usr)] cancelled event [name].") log_admin_private("[key_name(usr)] cancelled event [name].") - SSblackbox.add_details("event_admin_cancelled","[typepath]") + SSblackbox.record_feedback("tally", "event_admin_cancelled", 1, typepath) /datum/round_event_control/proc/runEvent(random) var/datum/round_event/E = new typepath() E.current_players = get_active_player_count(alive_check = 1, afk_check = 1, human_check = 1) E.control = src - SSblackbox.add_details("event_ran","[E]") + SSblackbox.record_feedback("tally", "event_ran", 1, "E") occurrences++ testing("[time2text(world.time, "hh:mm:ss")] [E.type]") diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index 8d8c261f59..a8ea51a99c 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -172,7 +172,7 @@ if(istype(A, B)) continue contents_loop qdel(A) - SSblackbox.add_details("food_made","[type]") + SSblackbox.record_feedback("tally", "food_made", 1, type) if(bonus_reagents && bonus_reagents.len) for(var/r_id in bonus_reagents) @@ -266,7 +266,7 @@ initialize_cooked_food(S, M.efficiency) else initialize_cooked_food(S, 1) - SSblackbox.add_details("food_made","[type]") + SSblackbox.record_feedback("tally", "food_made", 1, type) else new /obj/item/reagent_containers/food/snacks/badrecipe(src) if(M && M.dirty < 100) diff --git a/code/modules/food_and_drinks/kitchen_machinery/processor.dm b/code/modules/food_and_drinks/kitchen_machinery/processor.dm index 7c2bacb6bf..8b10bdf2a6 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/processor.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/processor.dm @@ -65,7 +65,7 @@ for(var/i in 1 to (C+rating_amount-1)) var/atom/movable/item = new S.coretype(drop_location()) adjust_item_drop_location(item) - SSblackbox.add_details("slime_core_harvested","[replacetext(S.colour," ","_")]") + SSblackbox.record_feedback("tally", "slime_core_harvested", 1, S.colour) ..() diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm index 621bfdf05e..aa35b4ae07 100644 --- a/code/modules/hydroponics/seeds.dm +++ b/code/modules/hydroponics/seeds.dm @@ -150,7 +150,7 @@ t_amount++ product_name = t_prod.name if(getYield() >= 1) - SSblackbox.add_details("food_harvested","[product_name]|[getYield()]") + SSblackbox.record_feedback("tally", "food_harvested", getYield(), product_name) parent.update_tray() return result diff --git a/code/modules/jobs/job_types/civilian_chaplain.dm b/code/modules/jobs/job_types/civilian_chaplain.dm index a1a2193026..aefb6f48ae 100644 --- a/code/modules/jobs/job_types/civilian_chaplain.dm +++ b/code/modules/jobs/job_types/civilian_chaplain.dm @@ -80,8 +80,8 @@ Chaplain H.equip_to_slot_or_del(B, slot_in_backpack) - SSblackbox.set_details("religion_name","[new_religion]") - SSblackbox.set_details("religion_deity","[new_deity]") + SSblackbox.record_feedback("text", "religion_name", 1, "[new_religion]", 1) + SSblackbox.record_feedback("text", "religion_deity", 1, "[new_deity]", 1) /datum/outfit/job/chaplain name = "Chaplain" diff --git a/code/modules/mining/equipment/lazarus_injector.dm b/code/modules/mining/equipment/lazarus_injector.dm index e56e8060bf..c7aa2a1859 100644 --- a/code/modules/mining/equipment/lazarus_injector.dm +++ b/code/modules/mining/equipment/lazarus_injector.dm @@ -40,7 +40,7 @@ H.attack_same = 0 loaded = 0 user.visible_message("[user] injects [M] with [src], reviving it.") - SSblackbox.add_details("lazarus_injector", "[M.type]") + SSblackbox.record_feedback("tally", "lazarus_injector", 1, M.type) playsound(src,'sound/effects/refill.ogg',50,1) icon_state = "lazarus_empty" return diff --git a/code/modules/mining/equipment/regenerative_core.dm b/code/modules/mining/equipment/regenerative_core.dm index 7bb7132bc1..d72dda9657 100644 --- a/code/modules/mining/equipment/regenerative_core.dm +++ b/code/modules/mining/equipment/regenerative_core.dm @@ -43,15 +43,15 @@ update_icon() desc = "All that remains of a hivelord. It is preserved, allowing you to use it to heal completely without danger of decay." if(implanted) - SSblackbox.add_details("hivelord_core", "[type]|implanted") + SSblackbox.record_feedback("nested tally", "hivelord_core", 1, list("[type]", "implanted")) else - SSblackbox.add_details("hivelord_core", "[type]|stabilizer") + SSblackbox.record_feedback("nested tally", "hivelord_core", 1, list("[type]", "stabilizer")) /obj/item/organ/regenerative_core/proc/go_inert() inert = TRUE name = "decayed regenerative core" desc = "All that remains of a hivelord. It has decayed, and is completely useless." - SSblackbox.add_details("hivelord_core", "[type]|inert") + SSblackbox.record_feedback("nested tally", "hivelord_core", 1, list("[type]", "inert")) update_icon() /obj/item/organ/regenerative_core/ui_action_click() @@ -78,10 +78,10 @@ return if(H != user) H.visible_message("[user] forces [H] to apply [src]... [H.p_they()] quickly regenerate all injuries!") - SSblackbox.add_details("hivelord_core","[src.type]|used|other") + SSblackbox.record_feedback("nested tally", "hivelord_core", 1, list("[type]", "used", "other")) else to_chat(user, "You start to smear [src] on yourself. It feels and smells disgusting, but you feel amazingly refreshed in mere moments.") - SSblackbox.add_details("hivelord_core","[src.type]|used|self") + SSblackbox.record_feedback("nested tally", "hivelord_core", 1, list("[type]", "used", "self")) H.revive(full_heal = 1) qdel(src) ..() diff --git a/code/modules/mining/equipment/wormhole_jaunter.dm b/code/modules/mining/equipment/wormhole_jaunter.dm index b9e7cf544f..2e6459e6c4 100644 --- a/code/modules/mining/equipment/wormhole_jaunter.dm +++ b/code/modules/mining/equipment/wormhole_jaunter.dm @@ -16,7 +16,7 @@ /obj/item/device/wormhole_jaunter/attack_self(mob/user) user.visible_message("[user.name] activates the [src.name]!") - SSblackbox.add_details("jaunter", "User") // user activated + SSblackbox.record_feedback("tally", "jaunter", 1, "User") // user activated activate(user, TRUE) /obj/item/device/wormhole_jaunter/proc/turf_check(mob/user) @@ -72,13 +72,13 @@ if(triggered) usr.visible_message("[src] overloads and activates!") - SSblackbox.add_details("jaunter","EMP") // EMP accidental activation + SSblackbox.record_feedback("tally", "jaunter", 1, "EMP") // EMP accidental activation activate(usr) /obj/item/device/wormhole_jaunter/proc/chasm_react(mob/user) if(user.get_item_by_slot(slot_belt) == src) to_chat(user, "Your [src] activates, saving you from the chasm!") - SSblackbox.add_details("jaunter","Chasm") // chasm automatic activation + SSblackbox.record_feedback("tally", "jaunter", 1, "Chasm") // chasm automatic activation activate(user, FALSE) else to_chat(user, "[src] is not attached to your belt, preventing it from saving you from the chasm. RIP.") diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index afdcc1339c..70de30dc5e 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -160,7 +160,7 @@ user.sight |= SEE_MOBS icon_state = "lantern" wisp.orbit(user, 20) - SSblackbox.add_details("wisp_lantern","Freed") + SSblackbox.record_feedback("tally", "wisp_lantern", 1, "Freed") else to_chat(user, "You return the wisp to the lantern.") @@ -175,7 +175,7 @@ wisp.stop_orbit() wisp.loc = src icon_state = "lantern-blue" - SSblackbox.add_details("wisp_lantern","Returned") + SSblackbox.record_feedback("tally", "wisp_lantern", 1, "Returned") /obj/item/device/wisp_lantern/Initialize() . = ..() @@ -217,7 +217,7 @@ linked.teleporting = TRUE var/turf/T = get_turf(src) new /obj/effect/temp_visual/warp_cube(T, user, teleport_color, TRUE) - SSblackbox.add_details("warp_cube","[src.type]") + SSblackbox.record_feedback("tally", "warp_cube", 1, type) new /obj/effect/temp_visual/warp_cube(get_turf(linked), user, linked.teleport_color, FALSE) var/obj/effect/warp_cube/link_holder = new /obj/effect/warp_cube(T) user.forceMove(link_holder) //mess around with loc so the user can't wander around @@ -334,7 +334,7 @@ /obj/item/device/immortality_talisman/attack_self(mob/user) if(cooldown < world.time) - SSblackbox.add_details("immortality_talisman","Activated") // usage + SSblackbox.record_feedback("amount", "immortality_talisman_uses", 1) cooldown = world.time + 600 user.visible_message("[user] vanishes from reality, leaving a hole in [user.p_their()] place!") var/obj/effect/immortality_talisman/Z = new(get_turf(src.loc)) @@ -1287,5 +1287,3 @@ for(var/t in RANGE_TURFS(1, T)) var/obj/effect/temp_visual/hierophant/blast/B = new(t, user, friendly_fire_check) B.damage = 15 //keeps monster damage boost due to lower damage - - diff --git a/code/modules/mining/machine_vending.dm b/code/modules/mining/machine_vending.dm index cbf7dfd826..339a6efb33 100644 --- a/code/modules/mining/machine_vending.dm +++ b/code/modules/mining/machine_vending.dm @@ -120,7 +120,7 @@ return inserted_id = I to_chat(usr, "You insert the ID into [src]'s card slot.") - else + else to_chat(usr, "Error: No valid ID!") flick(icon_deny, src) if(href_list["purchase"]) @@ -137,10 +137,7 @@ inserted_id.mining_points -= prize.cost to_chat(usr, "[src] clanks to life briefly before vending [prize.equipment_name]!") new prize.equipment_path(src.loc) - SSblackbox.add_details("mining_equipment_bought", - "[src.type]|[prize.equipment_path]") - // Add src.type to keep track of free golem purchases - // separately. + SSblackbox.record_feedback("nested tally", "mining_equipment_bought", 1, list("[type]", "[prize.equipment_path]")) else to_chat(usr, "Error: Please insert a valid ID!") flick(icon_deny, src) @@ -194,7 +191,7 @@ if("Mining Conscription Kit") new /obj/item/storage/backpack/duffelbag/mining_conscript(loc) - SSblackbox.add_details("mining_voucher_redeemed", selection) + SSblackbox.record_feedback("tally", "mining_voucher_redeemed", 1, selection) qdel(voucher) /obj/machinery/mineral/equipment_vendor/ex_act(severity, target) diff --git a/code/modules/mob/living/brain/MMI.dm b/code/modules/mob/living/brain/MMI.dm index 83dd63cc74..5be7b507f1 100644 --- a/code/modules/mob/living/brain/MMI.dm +++ b/code/modules/mob/living/brain/MMI.dm @@ -71,7 +71,7 @@ name = "Man-Machine Interface: [brainmob.real_name]" update_icon() - SSblackbox.inc("cyborg_mmis_filled",1) + SSblackbox.record_feedback("amount", "mmis_filled", 1) else if(brainmob) O.attack(brainmob, user) //Oh noooeeeee diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index b37ebabb45..e339ac1ea1 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -162,8 +162,8 @@ affecting = get_bodypart(ran_zone(user.zone_selected)) var/target_area = parse_zone(check_zone(user.zone_selected)) //our intended target - SSblackbox.add_details("item_used_for_combat","[I.type]|[I.force]") - SSblackbox.add_details("zone_targeted","[target_area]") + SSblackbox.record_feedback("nested tally", "item_used_for_combat", 1, list(I.force, I.type)) + SSblackbox.record_feedback("tally", "zone_targeted", 1, target_area) // the attacked_by code varies among species return dna.species.spec_attacked_by(I, user, affecting, a_intent, src) diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 293f4892e4..831f83e3bc 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -25,7 +25,6 @@ var/clean_on_move = FALSE var/did_feedback = FALSE - var/feedback_key var/hat_offset = -3 @@ -227,8 +226,7 @@ R.notify_ai(NEW_MODULE) if(R.hud_used) R.hud_used.update_robot_modules_display() - if(feedback_key && !did_feedback) - SSblackbox.inc(feedback_key, 1) + SSblackbox.record_feedback("tally", "cyborg_modules", 1, R.module) /obj/item/robot_module/standard name = "Standard" @@ -254,7 +252,6 @@ /obj/item/clockwork/weapon/ratvarian_spear, /obj/item/clockwork/replica_fabricator/cyborg) moduleselect_icon = "standard" - feedback_key = "cyborg_standard" hat_offset = -3 /obj/item/robot_module/medical @@ -285,7 +282,6 @@ /obj/item/clockwork/weapon/ratvarian_spear) cyborg_base_icon = "medical" moduleselect_icon = "medical" - feedback_key = "cyborg_medical" can_be_pushed = FALSE hat_offset = 3 @@ -321,7 +317,6 @@ /obj/item/clockwork/replica_fabricator/cyborg) cyborg_base_icon = "engineer" moduleselect_icon = "engineer" - feedback_key = "cyborg_engineering" magpulsing = TRUE hat_offset = INFINITY // No hats @@ -338,7 +333,6 @@ /obj/item/clockwork/weapon/ratvarian_spear) cyborg_base_icon = "sec" moduleselect_icon = "security" - feedback_key = "cyborg_security" can_be_pushed = FALSE hat_offset = 3 @@ -467,7 +461,6 @@ /obj/item/clockwork/weapon/ratvarian_spear) cyborg_base_icon = "peace" moduleselect_icon = "standard" - feedback_key = "cyborg_peacekeeper" can_be_pushed = FALSE hat_offset = -2 @@ -496,7 +489,6 @@ /obj/item/clockwork/replica_fabricator/cyborg) cyborg_base_icon = "janitor" moduleselect_icon = "janitor" - feedback_key = "cyborg_janitor" hat_offset = -5 clean_on_move = TRUE @@ -548,7 +540,6 @@ /obj/item/borg/sight/xray/truesight_lens) moduleselect_icon = "service" special_light_key = "service" - feedback_key = "cyborg_service" hat_offset = 0 /obj/item/robot_module/butler/respawn_consumable(mob/living/silicon/robot/R, coeff = 1) @@ -601,7 +592,6 @@ /obj/item/borg/sight/xray/truesight_lens) cyborg_base_icon = "miner" moduleselect_icon = "miner" - feedback_key = "cyborg_miner" hat_offset = 0 /obj/item/robot_module/syndicate diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm index 3d2f7cf28e..5c95c2ec26 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm @@ -63,7 +63,7 @@ if(C.total_damage >= maxHealth * 0.6) //if you do at least 60% of its health with the crusher, you'll get the item spawn_crusher_loot() if(!admin_spawned) - SSblackbox.set_details("megafauna_kills","[initial(name)]") + SSblackbox.record_feedback("tally", "megafauna_kills", 1, "[initial(name)]") if(!elimination) //used so the achievment only occurs for the last legion to die. grant_achievement(medal_type,score_type) ..() diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/mining_mobs.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/mining_mobs.dm index 0ea88aedcf..05dec578bd 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/mining_mobs.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/mining_mobs.dm @@ -56,7 +56,7 @@ ..() /mob/living/simple_animal/hostile/asteroid/death(gibbed) - SSblackbox.add_details("mobs_killed_mining","[src.type]") + SSblackbox.record_feedback("tally", "mobs_killed_mining", 1, type) var/datum/status_effect/crusher_damage/C = has_status_effect(STATUS_EFFECT_CRUSHERDAMAGETRACKING) if(C && crusher_loot && prob((C.total_damage/maxHealth) * crusher_drop_mod)) //on average, you'll need to kill 20 creatures before getting the item spawn_crusher_loot() diff --git a/code/modules/mob/living/simple_animal/slime/powers.dm b/code/modules/mob/living/simple_animal/slime/powers.dm index 2b817a7f96..e7e71bf091 100644 --- a/code/modules/mob/living/simple_animal/slime/powers.dm +++ b/code/modules/mob/living/simple_animal/slime/powers.dm @@ -167,7 +167,7 @@ M.Friends = Friends.Copy() babies += M M.mutation_chance = Clamp(mutation_chance+(rand(5,-5)),0,100) - SSblackbox.add_details("slime_babies_born","slimebirth_[replacetext(M.colour," ","_")]") + SSblackbox.record_feedback("tally", "slime_babies_born", 1, M.colour) var/mob/living/simple_animal/slime/new_slime = pick(babies) new_slime.a_intent = INTENT_HARM diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index 5d1e2fa6d9..a94bd9fcdb 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -1,3 +1,4 @@ +<<<<<<< HEAD /obj/item/stock_parts/cell name = "power cell" desc = "A rechargeable electrochemical power cell." @@ -349,3 +350,356 @@ /obj/item/stock_parts/cell/beam_rifle/emp_act(severity) charge = Clamp((charge-(10000/severity)),0,maxcharge) +======= +/obj/item/stock_parts/cell + name = "power cell" + desc = "A rechargeable electrochemical power cell." + icon = 'icons/obj/power.dmi' + icon_state = "cell" + item_state = "cell" + lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' + righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' + origin_tech = "powerstorage=1" + force = 5 + throwforce = 5 + throw_speed = 2 + throw_range = 5 + w_class = WEIGHT_CLASS_SMALL + var/charge = 0 // note %age conveted to actual charge in New + var/maxcharge = 1000 + materials = list(MAT_METAL=700, MAT_GLASS=50) + var/rigged = 0 // true if rigged to explode + var/chargerate = 100 //how much power is given every tick in a recharger + var/self_recharge = 0 //does it self recharge, over time, or not? + var/ratingdesc = TRUE + var/grown_battery = FALSE // If it's a grown that acts as a battery, add a wire overlay to it. + +/obj/item/stock_parts/cell/get_cell() + return src + +/obj/item/stock_parts/cell/Initialize() + . = ..() + START_PROCESSING(SSobj, src) + charge = maxcharge + if(ratingdesc) + desc += " This one has a power rating of [maxcharge], and you should not swallow it." + update_icon() + +/obj/item/stock_parts/cell/Destroy() + STOP_PROCESSING(SSobj, src) + return ..() + +/obj/item/stock_parts/cell/vv_edit_var(var_name, var_value) + switch(var_name) + if("self_recharge") + if(var_value) + START_PROCESSING(SSobj, src) + else + STOP_PROCESSING(SSobj, src) + . = ..() + +/obj/item/stock_parts/cell/process() + if(self_recharge) + give(chargerate * 0.25) + else + return PROCESS_KILL + +/obj/item/stock_parts/cell/update_icon() + cut_overlays() + if(grown_battery) + add_overlay("grown_wires") + if(charge < 0.01) + return + else if(charge/maxcharge >=0.995) + add_overlay("cell-o2") + else + add_overlay("cell-o1") + +/obj/item/stock_parts/cell/proc/percent() // return % charge of cell + return 100*charge/maxcharge + +// use power from a cell +/obj/item/stock_parts/cell/proc/use(amount) + if(rigged && amount > 0) + explode() + return 0 + if(charge < amount) + return 0 + charge = (charge - amount) + if(!istype(loc, /obj/machinery/power/apc)) + SSblackbox.record_feedback("tally", "cell_used", 1, type) + return 1 + +// recharge the cell +/obj/item/stock_parts/cell/proc/give(amount) + if(rigged && amount > 0) + explode() + return 0 + if(maxcharge < amount) + amount = maxcharge + var/power_used = min(maxcharge-charge,amount) + charge += power_used + return power_used + +/obj/item/stock_parts/cell/examine(mob/user) + ..() + if(rigged) + to_chat(user, "This power cell seems to be faulty!") + else + to_chat(user, "The charge meter reads [round(src.percent() )]%.") + +/obj/item/stock_parts/cell/suicide_act(mob/user) + user.visible_message("[user] is licking the electrodes of [src]! It looks like [user.p_theyre()] trying to commit suicide!") + return (FIRELOSS) + +/obj/item/stock_parts/cell/attackby(obj/item/W, mob/user, params) + ..() + if(istype(W, /obj/item/reagent_containers/syringe)) + var/obj/item/reagent_containers/syringe/S = W + to_chat(user, "You inject the solution into the power cell.") + if(S.reagents.has_reagent("plasma", 5)) + rigged = 1 + S.reagents.clear_reagents() + + +/obj/item/stock_parts/cell/proc/explode() + var/turf/T = get_turf(src.loc) +/* + * 1000-cell explosion(T, -1, 0, 1, 1) + * 2500-cell explosion(T, -1, 0, 1, 1) + * 10000-cell explosion(T, -1, 1, 3, 3) + * 15000-cell explosion(T, -1, 2, 4, 4) + * */ + if (charge==0) + return + var/devastation_range = -1 //round(charge/11000) + var/heavy_impact_range = round(sqrt(charge)/60) + var/light_impact_range = round(sqrt(charge)/30) + var/flash_range = light_impact_range + if (light_impact_range==0) + rigged = 0 + corrupt() + return + //explosion(T, 0, 1, 2, 2) + explosion(T, devastation_range, heavy_impact_range, light_impact_range, flash_range) + qdel(src) + +/obj/item/stock_parts/cell/proc/corrupt() + charge /= 2 + maxcharge = max(maxcharge/2, chargerate) + if (prob(10)) + rigged = 1 //broken batterys are dangerous + +/obj/item/stock_parts/cell/emp_act(severity) + charge -= 1000 / severity + if (charge < 0) + charge = 0 + ..() + +/obj/item/stock_parts/cell/ex_act(severity, target) + ..() + if(!QDELETED(src)) + switch(severity) + if(2) + if(prob(50)) + corrupt() + if(3) + if(prob(25)) + corrupt() + + +/obj/item/stock_parts/cell/blob_act(obj/structure/blob/B) + ex_act(EXPLODE_DEVASTATE) + +/obj/item/stock_parts/cell/proc/get_electrocute_damage() + if(charge >= 1000) + return Clamp(round(charge/10000), 10, 90) + rand(-5,5) + else + return 0 + +/* Cell variants*/ +/obj/item/stock_parts/cell/crap + name = "\improper Nanotrasen brand rechargeable AA battery" + desc = "You can't top the plasma top." //TOTALLY TRADEMARK INFRINGEMENT + maxcharge = 500 + materials = list(MAT_GLASS=40) + rating = 2 + +/obj/item/stock_parts/cell/crap/empty/Initialize() + . = ..() + charge = 0 + +/obj/item/stock_parts/cell/upgraded + name = "high-capacity power cell" + desc = "A power cell with a slightly higher capacity than normal!" + maxcharge = 2500 + materials = list(MAT_GLASS=50) + rating = 2 + chargerate = 1000 + +/obj/item/stock_parts/cell/upgraded/plus + name = "upgraded power cell+" + desc = "A power cell with an even higher capacity than the base model!" + maxcharge = 5000 + +/obj/item/stock_parts/cell/secborg + name = "security borg rechargeable D battery" + origin_tech = null + maxcharge = 600 //600 max charge / 100 charge per shot = six shots + materials = list(MAT_GLASS=40) + rating = 2.5 + +/obj/item/stock_parts/cell/secborg/empty/Initialize() + . = ..() + charge = 0 + +/obj/item/stock_parts/cell/pulse //200 pulse shots + name = "pulse rifle power cell" + maxcharge = 40000 + rating = 3 + chargerate = 1500 + +/obj/item/stock_parts/cell/pulse/carbine //25 pulse shots + name = "pulse carbine power cell" + maxcharge = 5000 + +/obj/item/stock_parts/cell/pulse/pistol //10 pulse shots + name = "pulse pistol power cell" + maxcharge = 2000 + +/obj/item/stock_parts/cell/high + name = "high-capacity power cell" + origin_tech = "powerstorage=2" + icon_state = "hcell" + maxcharge = 10000 + materials = list(MAT_GLASS=60) + rating = 3 + chargerate = 1500 + +/obj/item/stock_parts/cell/high/plus + name = "high-capacity power cell+" + desc = "Where did these come from?" + icon_state = "h+cell" + maxcharge = 15000 + chargerate = 2250 + +/obj/item/stock_parts/cell/high/empty/Initialize() + . = ..() + charge = 0 + +/obj/item/stock_parts/cell/super + name = "super-capacity power cell" + origin_tech = "powerstorage=3;materials=3" + icon_state = "scell" + maxcharge = 20000 + materials = list(MAT_GLASS=300) + rating = 4 + chargerate = 2000 + +/obj/item/stock_parts/cell/super/empty/Initialize() + . = ..() + charge = 0 + +/obj/item/stock_parts/cell/hyper + name = "hyper-capacity power cell" + origin_tech = "powerstorage=4;engineering=4;materials=4" + icon_state = "hpcell" + maxcharge = 30000 + materials = list(MAT_GLASS=400) + rating = 5 + chargerate = 3000 + +/obj/item/stock_parts/cell/hyper/empty/Initialize() + . = ..() + charge = 0 + +/obj/item/stock_parts/cell/bluespace + name = "bluespace power cell" + desc = "A rechargeable transdimensional power cell." + origin_tech = "powerstorage=5;bluespace=4;materials=4;engineering=4" + icon_state = "bscell" + maxcharge = 40000 + materials = list(MAT_GLASS=600) + rating = 6 + chargerate = 4000 + +/obj/item/stock_parts/cell/bluespace/empty/Initialize() + . = ..() + charge = 0 + +/obj/item/stock_parts/cell/infinite + name = "infinite-capacity power cell!" + icon_state = "icell" + origin_tech = "powerstorage=7" + maxcharge = 30000 + materials = list(MAT_GLASS=1000) + rating = 6 + chargerate = 30000 + +/obj/item/stock_parts/cell/infinite/use() + return 1 + +/obj/item/stock_parts/cell/infinite/abductor + name = "void core" + desc = "An alien power cell that produces energy seemingly out of nowhere." + icon = 'icons/obj/abductor.dmi' + icon_state = "cell" + origin_tech = "abductor=5;powerstorage=8;engineering=6" + maxcharge = 50000 + rating = 12 + ratingdesc = FALSE + +/obj/item/stock_parts/cell/infinite/abductor/update_icon() + return + + +/obj/item/stock_parts/cell/potato + name = "potato battery" + desc = "A rechargeable starch based power cell." + icon = 'icons/obj/hydroponics/harvest.dmi' + icon_state = "potato" + origin_tech = "powerstorage=1;biotech=1" + charge = 100 + maxcharge = 300 + materials = list() + rating = 1 + grown_battery = TRUE //it has the overlays for wires + +/obj/item/stock_parts/cell/high/slime + name = "charged slime core" + desc = "A yellow slime core infused with plasma, it crackles with power." + origin_tech = "powerstorage=5;biotech=4" + icon = 'icons/mob/slimes.dmi' + icon_state = "yellow slime extract" + materials = list() + self_recharge = 1 // Infused slime cores self-recharge, over time + +/obj/item/stock_parts/cell/emproof + name = "\improper EMP-proof cell" + desc = "An EMP-proof cell." + maxcharge = 500 + rating = 2 + +/obj/item/stock_parts/cell/emproof/empty/Initialize() + . = ..() + charge = 0 + +/obj/item/stock_parts/cell/emproof/emp_act(severity) + return + +/obj/item/stock_parts/cell/emproof/corrupt() + return + +/obj/item/stock_parts/cell/beam_rifle + name = "beam rifle capacitor" + desc = "A high powered capacitor that can provide huge amounts of energy in an instant." + maxcharge = 50000 + chargerate = 5000 //Extremely energy intensive + rating = 4 + +/obj/item/stock_parts/cell/beam_rifle/corrupt() + return + +/obj/item/stock_parts/cell/beam_rifle/emp_act(severity) + charge = Clamp((charge-(10000/severity)),0,maxcharge) +>>>>>>> 8b19b49... JSON feedback (#32188) diff --git a/code/modules/power/singularity/generator.dm b/code/modules/power/singularity/generator.dm index fdda2e607a..4b4ec71eb6 100644 --- a/code/modules/power/singularity/generator.dm +++ b/code/modules/power/singularity/generator.dm @@ -32,7 +32,7 @@ if(energy > 0) if(energy >= 200) var/turf/T = get_turf(src) - SSblackbox.add_details("engine_started","[src.type]") + SSblackbox.record_feedback("tally", "engine_started", 1, type) var/obj/singularity/S = new creation_type(T, 50) transfer_fingerprints_to(S) qdel(src) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index e694eea11f..085c618c42 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -278,7 +278,7 @@ if(user) user.update_inv_hands() - SSblackbox.add_details("gun_fired","[src.type]") + SSblackbox.record_feedback("tally", "gun_fired", 1, type) return TRUE /obj/item/gun/proc/reset_semicd() diff --git a/code/modules/projectiles/guns/medbeam.dm b/code/modules/projectiles/guns/medbeam.dm index c94deefd08..d2d7437577 100644 --- a/code/modules/projectiles/guns/medbeam.dm +++ b/code/modules/projectiles/guns/medbeam.dm @@ -55,7 +55,7 @@ current_beam = new(user,current_target,time=6000,beam_icon_state="medbeam",btype=/obj/effect/ebeam/medical) INVOKE_ASYNC(current_beam, /datum/beam.proc/Start) - SSblackbox.add_details("gun_fired","[src.type]") + SSblackbox.record_feedback("tally", "gun_fired", 1, type) /obj/item/gun/medbeam/process() diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index b16d0bc2e7..5997d1d1c3 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -377,8 +377,8 @@ remove_reagent(B, (multiplier * cached_required_reagents[B]), safety = 1) for(var/P in C.results) - SSblackbox.add_details("chemical_reaction", "[P]|[cached_results[P]*multiplier]") multiplier = max(multiplier, 1) //this shouldnt happen ... + SSblackbox.record_feedback("tally", "chemical_reaction", cached_results[P]*multiplier, P) add_reagent(P, cached_results[P]*multiplier, null, chem_temp) var/list/seen = viewers(4, get_turf(my_atom)) diff --git a/code/modules/reagents/chemistry/recipes/slime_extracts.dm b/code/modules/reagents/chemistry/recipes/slime_extracts.dm index 27bf596df0..f3143e1193 100644 --- a/code/modules/reagents/chemistry/recipes/slime_extracts.dm +++ b/code/modules/reagents/chemistry/recipes/slime_extracts.dm @@ -3,7 +3,7 @@ var/deletes_extract = TRUE /datum/chemical_reaction/slime/on_reaction(datum/reagents/holder) - SSblackbox.add_details("slime_cores_used","[type]") + SSblackbox.record_feedback("tally", "slime_cores_used", 1, "type") if(deletes_extract) delete_extract(holder) @@ -641,4 +641,3 @@ /datum/chemical_reaction/slime/flight_potion/on_reaction(datum/reagents/holder) new /obj/item/reagent_containers/glass/bottle/potion/flight(get_turf(holder.my_atom)) ..() - diff --git a/code/modules/recycling/disposal/bin.dm b/code/modules/recycling/disposal/bin.dm index 67aada1c2a..817b8b9c10 100644 --- a/code/modules/recycling/disposal/bin.dm +++ b/code/modules/recycling/disposal/bin.dm @@ -374,7 +374,6 @@ /obj/machinery/disposal/bin/proc/do_flush() set waitfor = FALSE - SSblackbox.inc("disposal_auto_flush") flush() //timed process diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index d67e899cdd..b98a75e6fd 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -316,15 +316,12 @@ won't update every console in existence) but it's more of a hassle to do. Also, return for(var/T in temp_tech) - var/datum/tech/KT = files.known_tech[T] //For stat logging of high levels - if(files.IsTechHigher(T, temp_tech[T]) && KT.level >= 5) //For stat logging of high levels - SSblackbox.add_details("high_research_level","[KT][KT.level + 1]") //+1 to show the level which we're about to get files.UpdateTech(T, temp_tech[T]) if(linked_lathe) //Also sends salvaged materials to a linked protolathe, if any. for(var/material in linked_destroy.loaded_item.materials) linked_materials.insert_amount(min((linked_materials.max_amount - linked_materials.total_amount), (min(linked_destroy.loaded_item.materials[material]*(linked_destroy.decon_mod/10), linked_destroy.loaded_item.materials[material]))), material) - SSblackbox.add_details("item_deconstructed","[linked_destroy.loaded_item.type]") + SSblackbox.record_feedback("tally", "item_deconstructed", 1, linked_destroy.loaded_item.type) linked_destroy.loaded_item = null for(var/obj/I in linked_destroy.contents) for(var/mob/M in I.contents) @@ -461,7 +458,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, new_item.materials = efficient_mats.Copy() new_item.loc = linked_lathe.loc if(!already_logged) - SSblackbox.add_details("item_printed","[new_item.type]|[amount]") + SSblackbox.record_feedback("tally", "item_printed", amount, new_item.type) already_logged = 1 screen = old_screen linked_lathe.busy = FALSE @@ -528,7 +525,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, var/obj/item/new_item = new P(src) new_item.loc = linked_imprinter.loc new_item.materials = efficient_mats.Copy() - SSblackbox.add_details("circuit_printed","[new_item.type]") + SSblackbox.record_feedback("tally", "circuit_printed", 1, new_item.type) screen = old_screen linked_imprinter.busy = FALSE else diff --git a/code/modules/research/research.dm b/code/modules/research/research.dm index 12024c4265..284e9d42e7 100644 --- a/code/modules/research/research.dm +++ b/code/modules/research/research.dm @@ -120,6 +120,7 @@ research holder datum. var/datum/tech/KT = known_tech[ID] if(KT && KT.level <= level) KT.level = max(KT.level + 1, level) + SSblackbox.log_research(KT.name, level) //Checks if the origin level can raise current tech levels //Input: Tech's ID and Level; Output: TRUE for yes, FALSE for no diff --git a/code/modules/security_levels/keycard_authentication.dm b/code/modules/security_levels/keycard_authentication.dm index 8563c36ea4..a00becab2e 100644 --- a/code/modules/security_levels/keycard_authentication.dm +++ b/code/modules/security_levels/keycard_authentication.dm @@ -100,13 +100,10 @@ GLOBAL_DATUM_INIT(keycard_events, /datum/events, new) switch(event) if("Red Alert") set_security_level(SEC_LEVEL_RED) - SSblackbox.inc("alert_keycard_auth_red",) if("Emergency Maintenance Access") make_maint_all_access() - SSblackbox.inc("alert_keycard_auth_maint") if("Bluespace Artillery Unlock") toggle_bluespace_artillery() - SSblackbox.inc("alert_keycard_auth_bsa") GLOBAL_VAR_INIT(emergency_access, FALSE) /proc/make_maint_all_access() @@ -116,6 +113,7 @@ GLOBAL_VAR_INIT(emergency_access, FALSE) D.update_icon(0) minor_announce("Access restrictions on maintenance and external airlocks have been lifted.", "Attention! Station-wide emergency declared!",1) GLOB.emergency_access = TRUE + SSblackbox.record_feedback("nested tally", "keycard_auths", 1, list("emergency maintenance access", "enabled")) /proc/revoke_maint_all_access() for(var/area/maintenance/A in world) @@ -124,7 +122,9 @@ GLOBAL_VAR_INIT(emergency_access, FALSE) D.update_icon(0) minor_announce("Access restrictions in maintenance areas have been restored.", "Attention! Station-wide emergency rescinded:") GLOB.emergency_access = FALSE + SSblackbox.record_feedback("nested tally", "keycard_auths", 1, list("emergency maintenance access", "disabled")) /proc/toggle_bluespace_artillery() GLOB.bsa_unlock = !GLOB.bsa_unlock minor_announce("Bluespace Artillery firing protocols have been [GLOB.bsa_unlock? "unlocked" : "locked"]", "Weapons Systems Update:") + SSblackbox.record_feedback("nested tally", "keycard_auths", 1, list("bluespace artillery", GLOB.bsa_unlock? "unlocked" : "locked")) diff --git a/code/modules/security_levels/security_levels.dm b/code/modules/security_levels/security_levels.dm index a145028ad3..177d9a3bb4 100644 --- a/code/modules/security_levels/security_levels.dm +++ b/code/modules/security_levels/security_levels.dm @@ -81,6 +81,7 @@ GLOBAL_VAR_INIT(security_level, 0) FA.update_icon() for(var/obj/machinery/computer/shuttle/pod/pod in GLOB.machines) pod.admin_controlled = 0 + SSblackbox.record_feedback("tally", "security_level_changes", 1, level) else return diff --git a/code/modules/shuttle/arrivals.dm b/code/modules/shuttle/arrivals.dm index b42ee4e0e4..e88f6b204d 100644 --- a/code/modules/shuttle/arrivals.dm +++ b/code/modules/shuttle/arrivals.dm @@ -200,5 +200,5 @@ /obj/docking_port/mobile/arrivals/vv_edit_var(var_name, var_value) switch(var_name) if("perma_docked") - SSblackbox.add_details("admin_secrets_fun_used","ShA[var_value ? "s" : "g"]") + SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "ShA[var_value ? "s" : "g"]") return ..() diff --git a/code/modules/shuttle/manipulator.dm b/code/modules/shuttle/manipulator.dm index 3da4bcc03e..5cbd8de9c7 100644 --- a/code/modules/shuttle/manipulator.dm +++ b/code/modules/shuttle/manipulator.dm @@ -151,7 +151,7 @@ message_admins("[key_name_admin(usr)] fast travelled \ [M]") log_admin("[key_name(usr)] fast travelled [M]") - SSblackbox.add_details("shuttle_fasttravel", M.name) + SSblackbox.record_feedback("text", "shuttle_manipulator", 1, "[M.name]") break if("preview") @@ -178,7 +178,7 @@ with the shuttle manipulator.") log_admin("[key_name(usr)] loaded [mdp] with the \ shuttle manipulator.") - SSblackbox.add_details("shuttle_manipulator", mdp.name) + SSblackbox.record_feedback("text", "shuttle_manipulator", 1, "[mdp.name]") update_icon() diff --git a/code/modules/shuttle/on_move.dm b/code/modules/shuttle/on_move.dm index a67434ea5f..2fc795568b 100644 --- a/code/modules/shuttle/on_move.dm +++ b/code/modules/shuttle/on_move.dm @@ -26,11 +26,16 @@ All ShuttleMove procs go here if(M.pulledby) M.pulledby.stop_pulling() M.stop_pulling() +<<<<<<< HEAD M.visible_message("[src] slams into [M]!") if(M.key || M.get_ghost(TRUE)) SSblackbox.add_details("shuttle_gib", "[type]") else SSblackbox.add_details("shuttle_gib_unintelligent", "[type]") +======= + M.visible_message("[shuttle] slams into [M]!") + SSblackbox.record_feedback("tally", "shuttle_gib", 1, M.type) +>>>>>>> 8b19b49... JSON feedback (#32188) M.gib() else //non-living mobs shouldn't be affected by shuttles, which is why this is an else @@ -183,7 +188,7 @@ All ShuttleMove procs go here /obj/machinery/computer/auxillary_base/afterShuttleMove(list/movement_force, shuttle_dir, shuttle_preferred_direction, move_dir, rotation) . = ..() if(z == ZLEVEL_MINING) //Avoids double logging and landing on other Z-levels due to badminnery - SSblackbox.add_details("colonies_dropped", "[x]|[y]|[z]") //Number of times a base has been dropped! + SSblackbox.record_feedback("associative", "colonies_dropped", 1, list("x" = x, "y" = y, "z" = z)) /obj/machinery/gravity_generator/main/beforeShuttleMove(turf/newT, rotation, move_mode) . = ..() diff --git a/code/modules/shuttle/supply.dm b/code/modules/shuttle/supply.dm index 7e1dee155d..b73cfb05e2 100644 --- a/code/modules/shuttle/supply.dm +++ b/code/modules/shuttle/supply.dm @@ -99,8 +99,7 @@ GLOBAL_LIST_INIT(blacklisted_cargo_types, typecacheof(list( SSshuttle.orderhistory += SO SO.generate(pick_n_take(empty_turfs)) - SSblackbox.add_details("cargo_imports", - "[SO.pack.type]|[SO.pack.name]|[SO.pack.cost]") + SSblackbox.record_feedback("nested tally", "cargo_imports", 1, list("[SO.pack.cost]", "[SO.pack.name]")) investigate_log("Order #[SO.id] ([SO.pack.name], placed by [key_name(SO.orderer_ckey)]) has shipped.", INVESTIGATE_CARGO) if(SO.pack.dangerous) message_admins("\A [SO.pack.name] ordered by [key_name_admin(SO.orderer_ckey)] has shipped.") diff --git a/code/modules/surgery/organs/vocal_cords.dm b/code/modules/surgery/organs/vocal_cords.dm index 85dc2ae1c3..755d35435d 100644 --- a/code/modules/surgery/organs/vocal_cords.dm +++ b/code/modules/surgery/organs/vocal_cords.dm @@ -567,7 +567,7 @@ message_admins("[key_name_admin(user)] has said '[log_message]' with a Voice of God, affecting [english_list(listeners)], with a power multiplier of [power_multiplier].") log_game("[key_name(user)] has said '[log_message]' with a Voice of God, affecting [english_list(listeners)], with a power multiplier of [power_multiplier].") - SSblackbox.add_details("voice_of_god", log_message) + SSblackbox.record_feedback("tally", "voice_of_god", 1, log_message) return cooldown diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm index e5c046fac1..b10f6acdd0 100644 --- a/code/modules/surgery/surgery.dm +++ b/code/modules/surgery/surgery.dm @@ -61,7 +61,7 @@ return null /datum/surgery/proc/complete() - SSblackbox.add_details("surgeries_completed", "[type]") + SSblackbox.record_feedback("tally", "surgeries_completed", 1, type) qdel(src) diff --git a/code/modules/uplink/uplink_item.dm b/code/modules/uplink/uplink_item.dm index 6aad347e2a..6d40ab9219 100644 --- a/code/modules/uplink/uplink_item.dm +++ b/code/modules/uplink/uplink_item.dm @@ -91,7 +91,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once. /datum/uplink_item/proc/spawn_item(turf/loc, obj/item/device/uplink/U) if(item) - SSblackbox.add_details("traitor_uplink_items_bought", "[name]|[cost]") + SSblackbox.record_feedback("nested tally", "traitor_uplink_items_bought", 1, list("[initial(name)]", "[cost]")) return new item(loc) /datum/uplink_item/proc/buy(mob/user, obj/item/device/uplink/U) @@ -1201,7 +1201,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once. /datum/uplink_item/cyber_implants/spawn_item(turf/loc, obj/item/device/uplink/U) if(item) if(istype(item, /obj/item/organ)) - SSblackbox.add_details("traitor_uplink_items_bought", "[item]|[cost]") + SSblackbox.record_feedback("nested tally", "traitor_uplink_items_bought", 1, list("[initial(name)]", "[cost]")) return new /obj/item/storage/box/cyber_implants(loc, item) else return ..() @@ -1399,7 +1399,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once. var/obj/goods = new I.item(C) U.purchase_log += "[icon2base64html(goods)]" - SSblackbox.add_details("traitor_uplink_items_bought", "[name]|[cost]") + SSblackbox.record_feedback("nested tally", "traitor_uplink_items_bought", 1, list("[initial(name)]", "[cost]")) return C /datum/uplink_item/badass/random @@ -1425,6 +1425,6 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once. var/datum/uplink_item/I = pick(possible_items) U.telecrystals -= I.cost U.spent_telecrystals += I.cost - SSblackbox.add_details("traitor_uplink_items_bought","[name]|[I.cost]") - SSblackbox.add_details("traitor_random_uplink_items_gotten","[I.name]") + SSblackbox.record_feedback("nested tally", "traitor_uplink_items_bought", 1, list("[initial(I.name)]", "[cost]")) + SSblackbox.record_feedback("tally", "traitor_random_uplink_items_gotten", 1, initial(I.name)) return new I.item(loc)