diff --git a/SQL/paradise_schema.sql b/SQL/paradise_schema.sql index 267581ccfcb..1feed866ade 100644 --- a/SQL/paradise_schema.sql +++ b/SQL/paradise_schema.sql @@ -314,56 +314,6 @@ CREATE TABLE `privacy` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Table structure for table `karma_log` --- - -DROP TABLE IF EXISTS `karma_log`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `karma_log` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `spendername` text NOT NULL, - `spenderkey` text NOT NULL, - `receivername` text NOT NULL, - `receiverkey` text NOT NULL, - `receiverrole` text, - `receiverspecial` text, - `isnegative` tinyint(1) DEFAULT NULL, - `spenderip` text NOT NULL, - `server_id` TEXT NULL DEFAULT NULL, - `time` datetime NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=73614 DEFAULT CHARSET=utf8mb4; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `karma_totals` --- - -DROP TABLE IF EXISTS `karma_totals`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `karma_totals` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `byondkey` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL, - `karma` int(11) NOT NULL, - `karmaspent` int(11) NOT NULL DEFAULT 0, - PRIMARY KEY (`id`), - KEY `byondkey` (`byondkey`) -) ENGINE=InnoDB AUTO_INCREMENT=25715 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - -DROP TABLE IF EXISTS `karma_purchases`; -CREATE TABLE `karma_purchases` ( - `id` INT(11) NOT NULL AUTO_INCREMENT, - `ckey` VARCHAR(32) NOT NULL COLLATE 'utf8_general_ci', - `purchase` VARCHAR(64) NOT NULL COLLATE 'utf8_general_ci', - `purchase_time` DATETIME NOT NULL DEFAULT current_timestamp(), - PRIMARY KEY (`id`) USING BTREE, - UNIQUE INDEX `ckey` (`ckey`, `purchase`) USING BTREE -) COLLATE='utf8_general_ci' ENGINE=InnoDB; - -- -- Table structure for table `library` -- diff --git a/SQL/updates/46-47.sql b/SQL/updates/46-47.sql new file mode 100644 index 00000000000..499e3d8e6d0 --- /dev/null +++ b/SQL/updates/46-47.sql @@ -0,0 +1,5 @@ +# Updating SQL from 46 to 47 -AffectedArc07 +# Guts Karma +DROP TABLE `karma_log`; +DROP TABLE `karma_purchases`; +DROP TABLE `karma_totals`; diff --git a/code/__DEFINES/genetics.dm b/code/__DEFINES/genetics.dm index 55701ed9166..1b03279fb9c 100644 --- a/code/__DEFINES/genetics.dm +++ b/code/__DEFINES/genetics.dm @@ -74,10 +74,10 @@ //Species traits. #define NO_BLOOD "no_blood" -#define IS_WHITELISTED "whitelisted" #define LIPS "lips" #define EXOTIC_COLOR "exotic_blood_color" #define NO_INTORGANS "no_internal_organs" #define CAN_WINGDINGS "can_wingdings" #define NO_CLONESCAN "no_clone_scan" #define NO_HAIR "no_hair" +#define NOT_SELECTABLE "not_selectable" diff --git a/code/__DEFINES/karma.dm b/code/__DEFINES/karma.dm deleted file mode 100644 index 96451e6dd80..00000000000 --- a/code/__DEFINES/karma.dm +++ /dev/null @@ -1,17 +0,0 @@ -// Jobs -#define KARMAPACKAGE_JOB_BLUESHIELD "JOB_Blueshield" -#define KARMAPACKAGE_JOB_BARBER "JOB_Barber" -#define KARMAPACKAGE_JOB_BRIGPHYSICIAN "JOB_BrigPhysician" -#define KARMAPACKAGE_JOB_NANOTRASENREPRESENTATIVE "JOB_NanotrasenRepresentative" -#define KARMAPACKAGE_JOB_SECURITYPODPILOT "JOB_SecurityPodPilot" -#define KARMAPACKAGE_JOB_MECHANIC "JOB_Mechanic" -#define KARMAPACKAGE_JOB_MAGISTRATE "JOB_Magistrate" - -// Races -#define KARMAPACKAGE_SPECIES_GREY "SPECIES_Grey" -#define KARMAPACKAGE_SPECIES_KIDAN "SPECIES_Kidan" -#define KARMAPACKAGE_SPECIES_SLIMEPEOPLE "SPECIES_SlimePeople" -#define KARMAPACKAGE_SPECIES_VOX "SPECIES_Vox" -#define KARMAPACKAGE_SPECIES_DRASK "SPECIES_Drask" -#define KARMAPACKAGE_SPECIES_MACHINE "SPECIES_Machine" -#define KARMAPACKAGE_SPECIES_PLASMAMAN "SPECIES_Plasmaman" diff --git a/code/__DEFINES/misc_defines.dm b/code/__DEFINES/misc_defines.dm index 374754e7f3d..b4b25a50d58 100644 --- a/code/__DEFINES/misc_defines.dm +++ b/code/__DEFINES/misc_defines.dm @@ -380,7 +380,7 @@ #define INVESTIGATE_BOMB "bombs" // The SQL version required by this version of the code -#define SQL_VERSION 46 +#define SQL_VERSION 47 // Vending machine stuff #define CAT_NORMAL 1 diff --git a/code/__DEFINES/preferences.dm b/code/__DEFINES/preferences.dm index 022c5e90acf..49f5f7c7cd2 100644 --- a/code/__DEFINES/preferences.dm +++ b/code/__DEFINES/preferences.dm @@ -25,13 +25,13 @@ #define PREFTOGGLE_CHAT_GHOSTRADIO 512 #define PREFTOGGLE_SHOW_TYPING 1024 #define PREFTOGGLE_DISABLE_SCOREBOARD 2048 -#define PREFTOGGLE_DISABLE_KARMA_REMINDER 4096 +// #define PREFTOGGLE_DISABLE_KARMA_REMINDER 4096 // Defunct as of 2023-03-12 #define PREFTOGGLE_MEMBER_PUBLIC 8192 #define PREFTOGGLE_CHAT_NO_ADMINLOGS 16384 #define PREFTOGGLE_DONATOR_PUBLIC 32768 #define PREFTOGGLE_CHAT_NO_TICKETLOGS 65536 #define PREFTOGGLE_UI_DARKMODE 131072 -#define PREFTOGGLE_DISABLE_KARMA 262144 +// #define PREFTOGGLE_DISABLE_KARMA 262144 // Defunct as of 2023-03-12 #define PREFTOGGLE_CHAT_NO_MENTORTICKETLOGS 524288 #define PREFTOGGLE_TYPING_ONCE 1048576 #define PREFTOGGLE_AMBIENT_OCCLUSION 2097152 diff --git a/code/__HELPERS/_logging.dm b/code/__HELPERS/_logging.dm index b502547b825..3d031d8f8df 100644 --- a/code/__HELPERS/_logging.dm +++ b/code/__HELPERS/_logging.dm @@ -152,9 +152,6 @@ GLOBAL_PROTECT(log_end) /proc/log_tgui(text) rustg_log_write(GLOB.tgui_log, "[text][GLOB.log_end]") -/proc/log_karma(text) - rustg_log_write(GLOB.karma_log, "[text][GLOB.log_end]") - #ifdef REFERENCE_TRACKING /proc/log_gc(text) rustg_log_write(GLOB.gc_log, "[text][GLOB.log_end]") diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm index ba215f55130..9e6a0052c96 100644 --- a/code/__HELPERS/global_lists.dm +++ b/code/__HELPERS/global_lists.dm @@ -56,9 +56,6 @@ S.race_key = ++rkey //Used in mob icon caching. GLOB.all_species[S.name] = S - if(IS_WHITELISTED in S.species_traits) - GLOB.whitelisted_species += S.name - init_subtypes(/datum/crafting_recipe, GLOB.crafting_recipes) //Pipe list building @@ -138,32 +135,6 @@ // Sort them by priority, lowest first sortTim(GLOB.client_login_processors, /proc/cmp_login_processor_priority) - // Setup karma packages - // Package base type to do comparison stuff - var/datum/karma_package/basetype = new() - for(var/package_type in subtypesof(/datum/karma_package)) - var/datum/karma_package/KP = new package_type() - if(KP.type in basetype.meta_packages) - // Skip this one - continue - - if(KP.database_id == basetype.database_id) - stack_trace("[KP.type] has no DB ID set!") - continue - if(KP.category == basetype.category) - stack_trace("[KP.type] has no category set!") - continue - if(KP.friendly_name == basetype.friendly_name) - stack_trace("[KP.type] has no name set!") - continue - - // Make sure its not already in there - if(KP.database_id in GLOB.karma_packages) - stack_trace("[KP.database_id] has already been registered! Skipping for [KP.type]") - continue - - GLOB.karma_packages[KP.database_id] = KP - GLOB.emote_list = init_emote_list() // Keybindings diff --git a/code/_globalvars/lists/misc_lists.dm b/code/_globalvars/lists/misc_lists.dm index a84b3102d11..a19f14f4826 100644 --- a/code/_globalvars/lists/misc_lists.dm +++ b/code/_globalvars/lists/misc_lists.dm @@ -58,8 +58,6 @@ GLOBAL_LIST_INIT(cooking_reagents, list(RECIPE_MICROWAVE = list(), RECIPE_OVEN = #define EGG_LAYING_MESSAGES list("lays an egg.", "squats down and croons.", "begins making a huge racket.", "begins clucking raucously.") GLOBAL_LIST_EMPTY(client_login_processors) -// Assoc-List of all karma packages -GLOBAL_LIST_EMPTY(karma_packages) /// List of ckeys that have seen a blurb of a given key. GLOBAL_LIST_EMPTY(blurb_witnesses) diff --git a/code/_globalvars/lists/mob_lists.dm b/code/_globalvars/lists/mob_lists.dm index 138304f0177..26c14069393 100644 --- a/code/_globalvars/lists/mob_lists.dm +++ b/code/_globalvars/lists/mob_lists.dm @@ -3,7 +3,6 @@ GLOBAL_LIST_EMPTY(all_species) GLOBAL_LIST_EMPTY(all_languages) GLOBAL_LIST_EMPTY(language_keys) // Table of say codes for all languages GLOBAL_LIST_EMPTY(all_superheroes) -GLOBAL_LIST_EMPTY(whitelisted_species) GLOBAL_LIST_EMPTY(clients) //list of all clients GLOBAL_LIST_EMPTY(admins) //list of all clients whom are admins diff --git a/code/_globalvars/logging.dm b/code/_globalvars/logging.dm index 0d12d09e0ae..0f968923ffc 100644 --- a/code/_globalvars/logging.dm +++ b/code/_globalvars/logging.dm @@ -23,8 +23,6 @@ GLOBAL_VAR(chat_debug_log) GLOBAL_PROTECT(chat_debug_log) GLOBAL_VAR(round_id) GLOBAL_PROTECT(round_id) -GLOBAL_VAR(karma_log) -GLOBAL_PROTECT(karma_log) #ifdef REFERENCE_TRACKING GLOBAL_VAR(gc_log) diff --git a/code/controllers/configuration/sections/general_configuration.dm b/code/controllers/configuration/sections/general_configuration.dm index 0dc1680da5a..79e1135deef 100644 --- a/code/controllers/configuration/sections/general_configuration.dm +++ b/code/controllers/configuration/sections/general_configuration.dm @@ -18,8 +18,6 @@ var/restrict_antag_hud_rejoin = TRUE /// Enable respanws by default? var/respawn_enabled = FALSE - /// Enable karma? Disable to lockout awarding and unlock everything - var/enable_karma = TRUE /// Enable CID randomiser buster? var/enabled_cid_randomiser_buster = FALSE /// Forbid admins from posessing and flying the singulo round @@ -90,7 +88,6 @@ CONFIG_LOAD_BOOL(allow_antag_hud, data["allow_antag_hud"]) CONFIG_LOAD_BOOL(restrict_antag_hud_rejoin, data["restrict_antag_hud_rejoin"]) CONFIG_LOAD_BOOL(respawn_enabled, data["respawn_enabled"]) - CONFIG_LOAD_BOOL(enable_karma, data["enable_karma"]) CONFIG_LOAD_BOOL(enabled_cid_randomiser_buster, data["enable_cid_randomiser_buster"]) CONFIG_LOAD_BOOL(forbid_singulo_possession, data["prevent_admin_singlo_possession"]) CONFIG_LOAD_BOOL(popup_admin_pm, data["popup_admin_pm"]) diff --git a/code/datums/diseases/kingstons.dm b/code/datums/diseases/kingstons.dm index e0d3271a453..d9b767945a4 100644 --- a/code/datums/diseases/kingstons.dm +++ b/code/datums/diseases/kingstons.dm @@ -60,7 +60,8 @@ permeability_mod = 0.75 desc = "If left untreated the subject will mutate to a different species." severity = BIOHAZARD - var/list/virspecies = list(/datum/species/human, /datum/species/tajaran, /datum/species/unathi,/datum/species/skrell, /datum/species/vulpkanin, /datum/species/diona) //no karma races sorrys. + var/list/virspecies = list(/datum/species/human, /datum/species/tajaran, /datum/species/unathi,/datum/species/skrell, /datum/species/vulpkanin, /datum/species/diona, + /datum/species/slime, /datum/species/kidan, /datum/species/drask, /datum/species/grey, /datum/species/moth) // No IPCs (not organic), or vox+plasmemes because of air requirements var/list/virsuffix = list("pox", "rot", "flu", "cough", "-gitis", "cold", "rash", "itch", "decay") var/datum/species/chosentype var/chosensuff diff --git a/code/game/jobs/whitelist.dm b/code/game/jobs/whitelist.dm index f85f1b77040..23b2d842bc7 100644 --- a/code/game/jobs/whitelist.dm +++ b/code/game/jobs/whitelist.dm @@ -1,37 +1,25 @@ +// This needs moving somewhere more sensible +// Code reviewers I choose you to help me +// If this PR gets merged with this comment in you're all fired +// -aa07 /proc/can_use_species(mob/M, species) - if(!GLOB.configuration.general.enable_karma) - return TRUE + // Always if human if(species == "human" || species == "Human") return TRUE + + var/datum/species/S = GLOB.all_species[species] + // Part of me feels like the below checks could be merged but ehh + + // No if species is not selectable + if(NOT_SELECTABLE in S.species_traits) + return FALSE + + // Yes if admin if(check_rights(R_ADMIN, FALSE)) return TRUE - // Cant be using this if youre not an admin - var/datum/species/S = GLOB.all_species[species] + // No if species is blacklisted if(S.blacklisted) return FALSE - var/package_id = species2package(species) - if(!package_id) - return TRUE // Not a valid karma package - if(M.client.karmaholder.hasPackage(package_id)) // They have it - return TRUE - - return FALSE - -/proc/species2package(species_id) - switch(species_id) - if("Grey") - return KARMAPACKAGE_SPECIES_GREY - if("Kidan") - return KARMAPACKAGE_SPECIES_KIDAN - if("Slime People") - return KARMAPACKAGE_SPECIES_SLIMEPEOPLE - if("Vox") - return KARMAPACKAGE_SPECIES_VOX - if("Drask") - return KARMAPACKAGE_SPECIES_DRASK - if("Machine") - return KARMAPACKAGE_SPECIES_MACHINE - if("Plasmaman") - return KARMAPACKAGE_SPECIES_PLASMAMAN + return TRUE diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index 9d7bc124e87..8b16b416ea0 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -96,7 +96,6 @@ name = "magic mirror" icon_state = "magic_mirror" var/options = list("Name", "Body", "Voice") - var/use_whitelist = TRUE var/organ_warn = FALSE /obj/structure/mirror/magic/attack_hand(mob/user) @@ -125,11 +124,7 @@ if("Body") if(organ_warn) to_chat(user, "Using the mirror will destroy any non biochip implants in you!") - var/list/race_list = list("Human", "Tajaran", "Skrell", "Unathi", "Diona", "Vulpkanin", "Nian") - if(use_whitelist) - for(var/species in GLOB.whitelisted_species) - if(can_use_species(H, species)) - race_list += species + var/list/race_list = list("Human", "Tajaran", "Skrell", "Unathi", "Diona", "Vulpkanin", "Nian", "Slime People", "Grey", "Drask", "Kidan") var/datum/ui_module/appearance_changer/AC = ui_users[user] if(!AC) @@ -178,6 +173,5 @@ name = "M.A.G.I.C mirror" desc = "The M.A.G.I.C mirror will let you change your species in a flash! Be careful, any implants (not biochips) in you will be destroyed on use." options = list("Body") - use_whitelist = FALSE organ_warn = TRUE diff --git a/code/game/world.dm b/code/game/world.dm index d84c7d548e8..1bd4c6ec672 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -261,7 +261,6 @@ GLOBAL_LIST_EMPTY(world_topic_handlers) GLOB.http_log = "[GLOB.log_directory]/http.log" GLOB.sql_log = "[GLOB.log_directory]/sql.log" GLOB.chat_debug_log = "[GLOB.log_directory]/chat_debug.log" - GLOB.karma_log = "[GLOB.log_directory]/karma.log" start_log(GLOB.world_game_log) start_log(GLOB.world_href_log) start_log(GLOB.world_runtime_log) @@ -270,7 +269,6 @@ GLOBAL_LIST_EMPTY(world_topic_handlers) start_log(GLOB.http_log) start_log(GLOB.sql_log) start_log(GLOB.chat_debug_log) - start_log(GLOB.karma_log) #ifdef REFERENCE_TRACKING GLOB.gc_log = "[GLOB.log_directory]/gc_debug.log" diff --git a/code/modules/admin/misc_admin_procs.dm b/code/modules/admin/misc_admin_procs.dm index 4f2cc6ac333..7aebd90e4db 100644 --- a/code/modules/admin/misc_admin_procs.dm +++ b/code/modules/admin/misc_admin_procs.dm @@ -122,7 +122,6 @@ GLOBAL_VAR_INIT(nologevent, 0) body += "Ban | " body += "Jobban | " body += "Notes | " - body += "View Karma | " if(GLOB.configuration.url.forum_playerinfo_url) body += "WebInfo | " if(M.client) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 7e8421bf977..d5726436786 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -3350,27 +3350,7 @@ if(!check_rights(R_ADMIN)) return add_note(href_list["suppresscidwarning"], CIDWARNING_SUPPRESSED_NOTETEXT, show_after = FALSE) - else if(href_list["viewkarma"]) - if(!check_rights(R_ADMIN)) - return - var/client/C = GLOB.directory[href_list["viewkarma"]] - if(!C) - return - - // Pack it into a dat - var/dat = {" - - "} - - var/datum/browser/popup = new(usr, "view_karma", "Karma stats for [C.ckey]", 600, 300) - popup.set_content(dat) - popup.open(FALSE) else if(href_list["who_advanced"]) usr.client.who_advanced() diff --git a/code/modules/client/client_defines.dm b/code/modules/client/client_defines.dm index c03f6649edd..6f59c8656cf 100644 --- a/code/modules/client/client_defines.dm +++ b/code/modules/client/client_defines.dm @@ -21,6 +21,8 @@ var/move_delay = 1 var/moving = null var/area = null + + // why the hell do we track this when you can just file > reconnect to bypass it var/time_died_as_mouse = null //when the client last died as a mouse var/typing = FALSE // Prevents typing window stacking @@ -113,9 +115,6 @@ /// List of the clients CUIs var/list/datum/custom_user_item/cui_entries = list() - /// The client's karma holder - var/datum/karma_holder/karmaholder - /// The client's job ban holder var/datum/job_ban_holder/jbh = new() @@ -136,9 +135,6 @@ if("cui_entries") return FALSE // or this - if("karmaholder") - return FALSE - // or this if("jbh") return FALSE return ..() diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 2fb3ffa2408..e465d8ae24f 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -392,12 +392,6 @@ // activate_darkmode() calls the CL update button proc, so we dont want it double called SSchangelog.UpdatePlayerChangelogButton(src) - - if(prefs.toggles & PREFTOGGLE_DISABLE_KARMA) // activates if karma is disabled - to_chat(src,"You have disabled karma gains.") // reminds those who have it disabled - else - to_chat(src,"You have enabled karma gains.") - generate_clickcatcher() apply_clickcatcher() @@ -433,10 +427,6 @@ if(_2fa_alert) to_chat(src,"You do not have 2FA enabled. Admin verbs will be unavailable until you have enabled 2FA.") // Very fucking obvious - // This happens "asyncronously" - if(karmaholder) - karmaholder.processRefunds(mob) - // Tell client about their connection to_chat(src, "You are currently connected [prefs.server_region ? "via the [prefs.server_region] relay" : "directly"] to Paradise.") to_chat(src, "You can change this using the Change Region verb in the OOC tab, as selecting a region closer to you may reduce latency.") diff --git a/code/modules/client/login_processing/42-karma_numbers.dm b/code/modules/client/login_processing/42-karma_numbers.dm deleted file mode 100644 index d7fd740bd64..00000000000 --- a/code/modules/client/login_processing/42-karma_numbers.dm +++ /dev/null @@ -1,14 +0,0 @@ -/datum/client_login_processor/karma_numbers - priority = 42 - -/datum/client_login_processor/karma_numbers/get_query(client/C) - var/datum/db_query/query = SSdbcore.NewQuery("SELECT karma, karmaspent FROM karma_totals WHERE byondkey=:ckey", list( - "ckey" = C.ckey - )) - return query - -/datum/client_login_processor/karma_numbers/process_result(datum/db_query/Q, client/C) - C.karmaholder = new() - while(Q.NextRow()) - C.karmaholder.karma_earned = Q.item[1] - C.karmaholder.karma_spent = Q.item[2] diff --git a/code/modules/client/login_processing/43-karma_unlocks.dm b/code/modules/client/login_processing/43-karma_unlocks.dm deleted file mode 100644 index ee75b9f723a..00000000000 --- a/code/modules/client/login_processing/43-karma_unlocks.dm +++ /dev/null @@ -1,12 +0,0 @@ -/datum/client_login_processor/karma_unlocks - priority = 43 - -/datum/client_login_processor/karma_unlocks/get_query(client/C) - var/datum/db_query/query = SSdbcore.NewQuery("SELECT purchase FROM karma_purchases WHERE ckey=:ckey", list( - "ckey" = C.ckey - )) - return query - -/datum/client_login_processor/karma_unlocks/process_result(datum/db_query/Q, client/C) - while(Q.NextRow()) - C.karmaholder.addUnlock(Q.item[1]) diff --git a/code/modules/client/preference/link_processing.dm b/code/modules/client/preference/link_processing.dm index da6da26da4b..163a96021a8 100644 --- a/code/modules/client/preference/link_processing.dm +++ b/code/modules/client/preference/link_processing.dm @@ -216,10 +216,10 @@ if(new_age) active_character.age = max(min(round(text2num(new_age)), AGE_MAX),AGE_MIN) if("species") - var/list/new_species = list("Human", "Tajaran", "Skrell", "Unathi", "Diona", "Vulpkanin", "Nian") + var/list/new_species = list() var/prev_species = active_character.species - for(var/_species in GLOB.whitelisted_species) + for(var/_species in GLOB.all_species) if(can_use_species(user, _species)) new_species += _species diff --git a/code/modules/client/preference/preferences_toggles.dm b/code/modules/client/preference/preferences_toggles.dm index 2320b4edb4d..35ce022639b 100644 --- a/code/modules/client/preference/preferences_toggles.dm +++ b/code/modules/client/preference/preferences_toggles.dm @@ -109,15 +109,6 @@ to_chat(src, "You will [(prefs.toggles & PREFTOGGLE_DISABLE_SCOREBOARD) ? "no longer" : "now"] see the end of round scoreboard.") SSblackbox.record_feedback("tally", "toggle_verbs", 1, "Toggle Scoreboard") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -/client/verb/togglekarmareminder() - set name = "Hide/Display End Round Karma Reminder" - set category = "Preferences" - set desc = "Toggles displaying end of round karma reminder" - prefs.toggles ^= PREFTOGGLE_DISABLE_KARMA_REMINDER - prefs.save_preferences(src) - to_chat(src, "You will [(prefs.toggles & PREFTOGGLE_DISABLE_KARMA_REMINDER) ? "no longer" : "now"] see the end of round karma reminder.") - SSblackbox.record_feedback("tally", "toggle_verbs", 1, "Toggle Karma Reminder") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - /client/verb/toggletitlemusic() set name = "Hear/Silence LobbyMusic" set category = "Preferences" @@ -254,17 +245,6 @@ deactivate_darkmode() SSblackbox.record_feedback("tally", "toggle_verbs", 1, "Toggle Darkmode") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -/client/verb/toggle_karma() - set name = "Toggle Karma Gains" - set category = "Special Verbs" - set desc = "This button will allow you to stop other people giving you karma." - prefs.toggles ^= PREFTOGGLE_DISABLE_KARMA - prefs.save_preferences(src) - if(prefs.toggles & PREFTOGGLE_DISABLE_KARMA) - to_chat(usr, "You have disabled karma gains.") - else - to_chat(usr, "You have enabled karma gains.") - /client/verb/toggle_popup_limiter() set name = "Toggle Text Popup Limiter" set category = "Preferences" diff --git a/code/modules/karma/karma.dm b/code/modules/karma/karma.dm deleted file mode 100644 index d2ba73d7df9..00000000000 --- a/code/modules/karma/karma.dm +++ /dev/null @@ -1,204 +0,0 @@ -// All karma procs that arent confined to the [/datum/karma_holder] are in here -/proc/sql_report_karma(mob/spender, mob/receiver) - var/receiverrole = "None" - var/receiverspecial = "None" - - if(receiver.mind) - if(receiver.mind.special_role) - receiverspecial = receiver.mind.special_role - if(receiver.mind.assigned_role) - receiverrole = receiver.mind.assigned_role - - if(!SSdbcore.IsConnected()) - return - - var/datum/db_query/log_query = SSdbcore.NewQuery({" - INSERT INTO karma_log (spendername, spenderkey, receivername, receiverkey, receiverrole, receiverspecial, spenderip, time, server_id) - VALUES (:sname, :skey, :rname, :rkey, :rrole, :rspecial, :sip, Now(), :server_id)"}, list( - "sname" = spender.name, - "skey" = spender.ckey, - "rname" = receiver.name, - "rkey" = receiver.ckey, - "rrole" = receiverrole, - "rspecial" = receiverspecial, - "sip" = spender.client.address, - "server_id" = GLOB.configuration.system.instance_id - )) - - if(!log_query.warn_execute()) - qdel(log_query) - return - - qdel(log_query) - - var/datum/db_query/select_recv = SSdbcore.NewQuery("SELECT id, karma FROM karma_totals WHERE byondkey=:rkey", list( - "rkey" = receiver.ckey - )) - - if(!select_recv.warn_execute()) - qdel(select_recv) - return - - var/karma - var/id - while(select_recv.NextRow()) - id = select_recv.item[1] - karma = text2num(select_recv.item[2]) - - qdel(select_recv) - - // They dont exist, lets make them exist - if(karma == null) - karma = 1 - var/datum/db_query/insert_query = SSdbcore.NewQuery("INSERT INTO karma_totals (byondkey, karma) VALUES (:rkey, :karma)", list( - "rkey" = receiver.ckey, - "karma" = karma - )) - if(!insert_query.warn_execute()) - qdel(insert_query) - return - - qdel(insert_query) - - // They do exist. Update it. - else - karma++ - var/datum/db_query/update_query = SSdbcore.NewQuery("UPDATE karma_totals SET karma=:karma WHERE id=:id", list( - "karma" = karma, - "id" = id - )) - if(!update_query.warn_execute()) - qdel(update_query) - return - - qdel(update_query) - - receiver?.client.karmaholder.sync_karma(receiver) // Refresh their end - -GLOBAL_LIST_EMPTY(karma_spenders) - -// Returns TRUE if mob can give karma at all; if not, tells them why -/mob/proc/can_give_karma() - if(!client) - to_chat(src, "You can't award karma without being connected.") - return FALSE - if(!GLOB.configuration.general.enable_karma) - to_chat(src, "Karma is disabled.") - return FALSE - if(!SSticker || !GLOB.player_list.len || (SSticker.current_state == GAME_STATE_PREGAME)) - to_chat(src, "You can't award karma until the game has started.") - return FALSE - if(ckey in GLOB.karma_spenders) - to_chat(src, "You've already spent your karma for the round.") - return FALSE - return TRUE - -// Returns TRUE if mob can give karma to M; if not, tells them why -/mob/proc/can_give_karma_to_mob(mob/M) - if(!can_give_karma()) - return FALSE - if(!istype(M)) - to_chat(src, "That's not a mob.") - return FALSE - if(!M.client) - to_chat(src, "That mob has no client connected at the moment.") - return FALSE - if(M.ckey == ckey) - to_chat(src, "You can't spend karma on yourself!") - return FALSE - if(client.address == M.client.address) - message_admins("Illegal karma spending attempt detected from [key] to [M.key]. Using the same IP!") - log_game("Illegal karma spending attempt detected from [key] to [M.key]. Using the same IP!") - to_chat(src, "You can't spend karma on someone connected from the same IP.") - return FALSE - if(M.get_preference(PREFTOGGLE_DISABLE_KARMA)) - to_chat(src, "That player has turned off incoming karma.") - return FALSE - return TRUE - - -/mob/verb/spend_karma_list() - set name = "Award Karma" - set desc = "Let the gods know whether someone's been nice. Can only be used once per round." - set category = "Special Verbs" - - if(!can_give_karma()) - return - - var/list/karma_list = list() - for(var/mob/M in GLOB.player_list) - if(!(M.client && M.mind)) - continue - if(M == src) - continue - if(M.get_preference(PREFTOGGLE_DISABLE_KARMA)) - continue - if(!isobserver(src) && isNonCrewAntag(M)) - continue // Don't include special roles for non-observers, because players use it to meta - karma_list += M - - if(!length(karma_list)) - to_chat(usr, "There's no-one to spend your karma on.") - return - - var/pickedmob = input("Who would you like to award Karma to?", "Award Karma", "Cancel") as null|mob in karma_list - - if(isnull(pickedmob)) - return - - spend_karma(pickedmob) - -/mob/verb/spend_karma(mob/M) - set name = "Award Karma to Player" - set desc = "Let the gods know whether someone's been nice. Can only be used once per round." - set category = "Special Verbs" - - if(!M) - to_chat(usr, "Please right click a mob to award karma directly, or use the 'Award Karma' verb to select a player from the player listing.") - return - if(!GLOB.configuration.general.enable_karma) // this is here because someone thought it was a good idea to add an alert box before checking if they can even give a mob karma - to_chat(usr, "Karma is disabled.") - return - if(alert("Give [M.name] good karma?", "Karma", "Yes", "No") != "Yes") - return - if(!can_give_karma_to_mob(M)) - return // Check again, just in case things changed while the alert box was up - - to_chat(usr, "Good karma spent on [M.name].") - GLOB.karma_spenders += ckey - - var/special_role = "None" - var/assigned_role = "None" - if(M.mind) - if(M.mind.special_role) - special_role = M.mind.special_role - if(M.mind.assigned_role) - assigned_role = M.mind.assigned_role - - log_karma("Karma awarded to [M.name] ([M.key]) (Role: [assigned_role] | Special: [special_role]) - Awarded by [ckey]") - - sql_report_karma(src, M) // This proc doesnt just report the purchase. It actually updates their balances. - -/client/verb/check_karma() - set name = "Check Karma" - set desc = "Reports how much karma you have accrued." - set category = "Special Verbs" - - if(!GLOB.configuration.general.enable_karma) - to_chat(src, "Karma is disabled.") - return - - var/available_karma = karmaholder.karma_earned - karmaholder.karma_spent - to_chat(usr, "You have ["[available_karma]" || "a database error. Contact the host if they are"] available.") - -/client/verb/karmashop() - set name = "karmashop" - set desc = "Spend your karma here" - set hidden = TRUE - - if(!GLOB.configuration.general.enable_karma) - to_chat(src, "Karma is disabled.") - return - - karmaholder.ui_interact(usr) - diff --git a/code/modules/karma/karma_holder.dm b/code/modules/karma/karma_holder.dm deleted file mode 100644 index 5a1d030504d..00000000000 --- a/code/modules/karma/karma_holder.dm +++ /dev/null @@ -1,226 +0,0 @@ -// This file contains stuff regarding the karma holder datum -// This is attached to a client and holds their info -/datum/karma_holder - /// List of karma packages this user has purchased - var/list/purchased_packages = list() - /// List of packages where a refund is due - var/list/refundable_packages = list() - /// Amount of karma earned total - var/karma_earned = 0 - /// Amount of karma spent total - var/karma_spent = 0 - -// Safety stuff -/datum/karma_holder/vv_edit_var(var_name, var_value) - return FALSE // no - -/datum/karma_holder/CanProcCall(procname) - return FALSE // no - -/datum/karma_holder/proc/addUnlock(package) - if(!(package in GLOB.karma_packages)) - stack_trace("Someone removed a karma package [package] from the game entirely. This should never happen. Please beat the person who did this.") - return - - purchased_packages += package - var/datum/karma_package/KP = GLOB.karma_packages[package] - if(KP.refundable) - refundable_packages += package // Put it in the pool of stuff to be refunded - -/datum/karma_holder/proc/hasPackage(package) - return (package in purchased_packages) - - -/datum/karma_holder/proc/processRefunds(mob/user) - set waitfor = FALSE - if(!length(refundable_packages)) - return - - for(var/package_id in refundable_packages) - var/datum/karma_package/KP = GLOB.karma_packages[package_id] - make_refund(KP, user) - to_chat(user, "You had the Karma package [KP.friendly_name], which is no longer a store item. You have been automatically refunded [KP.karma_cost] karma.") - -// Reloads the values from the DB to ensure they havnt been gamed -/datum/karma_holder/proc/sync_karma(mob/M = usr) - var/datum/db_query/select_query = SSdbcore.NewQuery("SELECT karma, karmaspent FROM karma_totals WHERE byondkey=:ckey", list( - "ckey" = M.ckey - )) - - if(!select_query.warn_execute()) - qdel(select_query) - return - - while(select_query.NextRow()) - karma_earned = select_query.item[1] - karma_spent = select_query.item[2] - - qdel(select_query) - -/datum/karma_holder/proc/make_purchase(datum/karma_package/package) - sync_karma() // Ensure its up to date - - // INITIAL CHECKS - var/karma_available = karma_earned - karma_spent - - if(karma_available < package.karma_cost) - to_chat(usr, "You do not have enough karma!") - return - - if(alert("Are you sure you want to unlock [package.friendly_name]?", "Confirmation", "No", "Yes") != "Yes") - return - - if(karma_available < package.karma_cost) // This is repeated for a reason. Someone could queue up 10 windows to buy things. - to_chat(usr, "You do not have enough karma!") - return - - var/datum/db_query/select_query = SSdbcore.NewQuery("SELECT ckey FROM karma_purchases WHERE purchase=:package_id AND ckey=:ckey", list( - "package_id" = package.database_id, - "ckey" = usr.ckey - )) - - if(!select_query.warn_execute()) - qdel(select_query) - return - - if(select_query.NextRow()) - to_chat(usr, "You have already purchased [package.friendly_name]. If you believe this is an error, please contact the server host.") - qdel(select_query) - return - - qdel(select_query) - - - // Update for this round - purchased_packages += package.database_id - - // Make the insert - var/datum/db_query/insert_query = SSdbcore.NewQuery("INSERT INTO karma_purchases (ckey, purchase) VALUES (:ckey, :purchase)", list( - "ckey" = usr.ckey, - "purchase" = package.database_id - )) - - if(!insert_query.warn_execute()) - to_chat(usr, "Failed to purchase [package.friendly_name]. Please contact the server host.") - qdel(insert_query) - return - - // Tell them - to_chat(usr, "You have purchased [package.friendly_name].") - log_karma("[key_name(usr)] has purchased [package.friendly_name].") - qdel(insert_query) - - // Charge them - karma_spent += package.karma_cost - - var/datum/db_query/update_query = SSdbcore.NewQuery("UPDATE karma_totals SET karmaspent=:spent WHERE byondkey=:ckey", list( - "spent" = karma_spent, - "ckey" = usr.ckey - )) - - if(!update_query.warn_execute()) - qdel(update_query) - message_admins("[key_name_admin(usr)] just bought something with karma but didnt get a balance deduction. Inform the host please.") - return - - // Inform them - to_chat(usr, "You have been charged [package.karma_cost] karma.") - qdel(update_query) - -// This is automatically invoked when a user logs in. -/datum/karma_holder/proc/make_refund(datum/karma_package/package, mob/user) - sync_karma(user) // Ensure its up to date - - if(!(package.database_id in purchased_packages)) - to_chat(user, "You do not own [package.friendly_name]!") - message_admins("[key_name_admin(user)] attempted to refund a karma package they do not have. Potential href exploit.") - return - - // Do the delete - var/datum/db_query/insert_query = SSdbcore.NewQuery("DELETE FROM karma_purchases WHERE ckey=:ckey AND purchase=:purchase", list( - "ckey" = user.ckey, - "purchase" = package.database_id - )) - - if(!insert_query.warn_execute()) - to_chat(user, "Failed to refund [package.friendly_name]. Please contact the server host.") - qdel(insert_query) - return - - qdel(insert_query) - - // Update for this round - purchased_packages -= package.database_id - - // Refund them - karma_spent -= package.karma_cost - - var/datum/db_query/update_query = SSdbcore.NewQuery("UPDATE karma_totals SET karmaspent=:spent WHERE byondkey=:ckey", list( - "spent" = karma_spent, - "ckey" = user.ckey - )) - - if(!update_query.warn_execute()) - qdel(update_query) - message_admins("[key_name_admin(user)] just tried to refund a karma purchase but didnt get a balance deduction. Inform the host please.") - return - - qdel(update_query) - -/datum/karma_holder/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.always_state) - ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) - if(!ui) - ui = new(user, src, ui_key, "KarmaShop", "Karma Shop", 400, 700, master_ui, state) - ui.open() - -// Packages they have + Balance -/datum/karma_holder/ui_data(mob/user) - var/list/data = list() - - data["purchased_packages"] = purchased_packages.Copy() // Do I need to copy here? Probably - data["karma_balance"] = (karma_earned - karma_spent) - - return data - -// All the packages -/datum/karma_holder/ui_static_data(mob/user) - var/list/data = list() - - var/list/packages = list() - - for(var/kp_id in GLOB.karma_packages) - var/datum/karma_package/KP = GLOB.karma_packages[kp_id] - if(KP.refundable) - continue - var/list/package_data = list() - package_data["id"] = KP.database_id - package_data["name"] = KP.friendly_name - package_data["cat"] = KP.category - package_data["cost"] = KP.karma_cost - - // Remember, TGUI lists need to be 2 layers deep because BYOND JSON memes - packages += list(package_data) - - data["all_packages"] = packages - - return data - -// UI callback -/datum/karma_holder/ui_act(action, list/params) - if(..()) - return - - switch(action) - if("makepurchase") - var/purchase_id = params["id"] - if(!(purchase_id in GLOB.karma_packages)) - to_chat(usr, "That isnt a purchaseable package. What the heck? Please make an issue report.") - return FALSE - var/datum/karma_package/kp = GLOB.karma_packages[purchase_id] - if(kp.refundable) - to_chat(usr, "That isnt a purchaseable package. What the heck? Please make an issue report.") - return FALSE - - make_purchase(kp) - - return TRUE diff --git a/code/modules/karma/karma_packages.dm b/code/modules/karma/karma_packages.dm deleted file mode 100644 index 5b03e1a19f5..00000000000 --- a/code/modules/karma/karma_packages.dm +++ /dev/null @@ -1,109 +0,0 @@ -// This entire file makes me with DM had enums - -/// Base datum for karma packages -/datum/karma_package - /// DB ID. MUST BE UNIQUE. It should follow CATEGORY_ProductName casing. Should be a respective define in [code/__DEFINES/karma.dm] - var/database_id = "ERROR_Unset" - /// Friendly name to show to the user - var/friendly_name = "Some coder was lazy" - /// Cost of karma - var/karma_cost = 0 - /// Is this package refundable? - var/refundable = FALSE - /// Category to show in under the karma store - var/category = "UNSET" - /// List of "Meta" packages that arent entries, just organisers - var/list/meta_packages = list(/datum/karma_package/job, /datum/karma_package/species) - -/datum/karma_package/vv_edit_var(var_name, var_value) - return FALSE // fuck off - - -// If you are ever removing something from the karma store, **DO NOT** delete its definition datum. -// Just set redunable = TRUE on it so people can get their karma refund - -// Jobs - These no longer exist in the codebase -/datum/karma_package/job - category = "Karma Jobs" - -/datum/karma_package/job/blueshield - database_id = KARMAPACKAGE_JOB_BLUESHIELD - friendly_name = "Blueshield" - karma_cost = 30 - refundable = TRUE - -/datum/karma_package/job/barber - database_id = KARMAPACKAGE_JOB_BARBER - friendly_name = "Barber" - karma_cost = 5 - refundable = TRUE - -/datum/karma_package/job/brigphys - database_id = KARMAPACKAGE_JOB_BRIGPHYSICIAN - friendly_name = "Brig Physician" - karma_cost = 5 - refundable = TRUE - -/datum/karma_package/job/ntrep - database_id = KARMAPACKAGE_JOB_NANOTRASENREPRESENTATIVE - friendly_name = "Nanotrasen Representative" - karma_cost = 30 - refundable = TRUE - -/datum/karma_package/job/secpodpilot - database_id = KARMAPACKAGE_JOB_SECURITYPODPILOT - friendly_name = "Security Pod Pilot" - karma_cost = 30 - refundable = TRUE - -/datum/karma_package/job/mechanic - database_id = KARMAPACKAGE_JOB_MECHANIC - friendly_name = "Mechanic" - karma_cost = 30 - refundable = TRUE - -/datum/karma_package/job/magistrate - database_id = KARMAPACKAGE_JOB_MAGISTRATE - friendly_name = "Magistrate" - karma_cost = 45 - refundable = TRUE - - -// Species -/datum/karma_package/species - category = "Karma Species" - -/datum/karma_package/species/grey - database_id = KARMAPACKAGE_SPECIES_GREY - friendly_name = "Grey" - karma_cost = 30 - -/datum/karma_package/species/kidan - database_id = KARMAPACKAGE_SPECIES_KIDAN - friendly_name = "Kidan" - karma_cost = 30 - -/datum/karma_package/species/slimepeople - database_id = KARMAPACKAGE_SPECIES_SLIMEPEOPLE - friendly_name = "Slime People" - karma_cost = 45 - -/datum/karma_package/species/vox - database_id = KARMAPACKAGE_SPECIES_VOX - friendly_name = "Vox" // pox - karma_cost = 45 - -/datum/karma_package/species/drask - database_id = KARMAPACKAGE_SPECIES_DRASK - friendly_name = "Drask" - karma_cost = 30 - -/datum/karma_package/species/machine - database_id = KARMAPACKAGE_SPECIES_MACHINE - friendly_name = "Machine People (IPC)" - karma_cost = 15 - -/datum/karma_package/species/plasmaman - database_id = KARMAPACKAGE_SPECIES_PLASMAMAN - friendly_name = "Plasmaman" - karma_cost = 45 diff --git a/code/modules/mob/living/carbon/human/appearance.dm b/code/modules/mob/living/carbon/human/appearance.dm index c81ff5061a5..2130fed8a18 100644 --- a/code/modules/mob/living/carbon/human/appearance.dm +++ b/code/modules/mob/living/carbon/human/appearance.dm @@ -347,14 +347,12 @@ /mob/living/carbon/human/proc/generate_valid_species(check_whitelist = TRUE, list/whitelist = list(), list/blacklist = list()) var/list/valid_species = new() for(var/current_species_name in GLOB.all_species) - var/datum/species/current_species = GLOB.all_species[current_species_name] - if(check_whitelist && !check_rights(R_ADMIN, FALSE, src)) //If we're using the whitelist, make sure to check it! if(whitelist.len && !(current_species_name in whitelist)) continue if(blacklist.len && (current_species_name in blacklist)) continue - if((IS_WHITELISTED in current_species.species_traits) && !can_use_species(src, current_species_name)) + if(!can_use_species(src, current_species_name)) continue valid_species += current_species_name diff --git a/code/modules/mob/living/carbon/human/species/abductor_species.dm b/code/modules/mob/living/carbon/human/species/abductor_species.dm index 5461b11e314..37ccc57546a 100644 --- a/code/modules/mob/living/carbon/human/species/abductor_species.dm +++ b/code/modules/mob/living/carbon/human/species/abductor_species.dm @@ -13,7 +13,7 @@ "eyes" = /obj/item/organ/internal/eyes/abductor //3 darksight. ) - species_traits = list(NO_BLOOD, NO_HAIR) + species_traits = list(NO_BLOOD, NO_HAIR, NOT_SELECTABLE) inherent_traits = list(TRAIT_VIRUSIMMUNE, TRAIT_CHUNKYFINGERS, TRAIT_NOHUNGER, TRAIT_NOBREATH, TRAIT_NOEXAMINE, TRAIT_REPEATSURGERY) dies_at_threshold = TRUE diff --git a/code/modules/mob/living/carbon/human/species/drask.dm b/code/modules/mob/living/carbon/human/species/drask.dm index 3cd01d0be95..876d7766407 100644 --- a/code/modules/mob/living/carbon/human/species/drask.dm +++ b/code/modules/mob/living/carbon/human/species/drask.dm @@ -31,7 +31,7 @@ "is sucking in warm air!", "is holding their breath!") - species_traits = list(LIPS, IS_WHITELISTED, NO_HAIR) + species_traits = list(LIPS, NO_HAIR) clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT bodyflags = HAS_SKIN_TONE | HAS_BODY_MARKINGS | BALD | SHAVED has_gender = FALSE diff --git a/code/modules/mob/living/carbon/human/species/golem.dm b/code/modules/mob/living/carbon/human/species/golem.dm index 2ff59955e91..d13ce72de14 100644 --- a/code/modules/mob/living/carbon/human/species/golem.dm +++ b/code/modules/mob/living/carbon/human/species/golem.dm @@ -4,7 +4,7 @@ icobase = 'icons/mob/human_races/r_golem.dmi' - species_traits = list(NO_BLOOD, NO_HAIR) + species_traits = list(NO_BLOOD, NO_HAIR, NOT_SELECTABLE) inherent_traits = list(TRAIT_RESISTHEAT, TRAIT_NOBREATH, TRAIT_RESISTCOLD, TRAIT_RESISTHIGHPRESSURE, TRAIT_RESISTLOWPRESSURE, TRAIT_NOFIRE, TRAIT_CHUNKYFINGERS, TRAIT_RADIMMUNE, TRAIT_PIERCEIMMUNE, TRAIT_NOPAIN, TRAIT_NO_BONES, TRAIT_STURDY_LIMBS, TRAIT_XENO_IMMUNE) inherent_biotypes = MOB_HUMANOID | MOB_MINERAL dies_at_threshold = TRUE diff --git a/code/modules/mob/living/carbon/human/species/grey.dm b/code/modules/mob/living/carbon/human/species/grey.dm index 5457ccdf38b..9c38ee94acc 100644 --- a/code/modules/mob/living/carbon/human/species/grey.dm +++ b/code/modules/mob/living/carbon/human/species/grey.dm @@ -16,7 +16,7 @@ "eyes" = /obj/item/organ/internal/eyes/grey //5 darksight. ) - species_traits = list(LIPS, IS_WHITELISTED, CAN_WINGDINGS, NO_HAIR) + species_traits = list(LIPS, CAN_WINGDINGS, NO_HAIR) clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS bodyflags = HAS_BODY_MARKINGS | HAS_BODYACC_COLOR | SHAVED | BALD dietflags = DIET_HERB diff --git a/code/modules/mob/living/carbon/human/species/kidan.dm b/code/modules/mob/living/carbon/human/species/kidan.dm index 02ba4a71c00..faf246243ab 100644 --- a/code/modules/mob/living/carbon/human/species/kidan.dm +++ b/code/modules/mob/living/carbon/human/species/kidan.dm @@ -9,7 +9,7 @@ hunger_drain = 0.15 tox_mod = 1.7 - species_traits = list(IS_WHITELISTED, NO_HAIR) + species_traits = list(NO_HAIR) inherent_biotypes = MOB_ORGANIC | MOB_HUMANOID | MOB_BUG clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS bodyflags = HAS_HEAD_ACCESSORY | HAS_HEAD_MARKINGS | HAS_BODY_MARKINGS | HAS_BODYACC_COLOR | SHAVED diff --git a/code/modules/mob/living/carbon/human/species/machine.dm b/code/modules/mob/living/carbon/human/species/machine.dm index 49fba255d19..299e0d42876 100644 --- a/code/modules/mob/living/carbon/human/species/machine.dm +++ b/code/modules/mob/living/carbon/human/species/machine.dm @@ -22,7 +22,7 @@ death_message = "gives a short series of shrill beeps, their chassis shuddering before falling limp, nonfunctional." death_sounds = list('sound/voice/borg_deathsound.ogg') //I've made this a list in the event we add more sounds for dead robots. - species_traits = list(IS_WHITELISTED, NO_BLOOD, NO_CLONESCAN, NO_INTORGANS) + species_traits = list(NO_BLOOD, NO_CLONESCAN, NO_INTORGANS) inherent_traits = list(TRAIT_VIRUSIMMUNE, TRAIT_NOBREATH, TRAIT_NOGERMS, TRAIT_NODECAY, TRAIT_NOPAIN, TRAIT_GENELESS) //Computers that don't decay? What a lie! inherent_biotypes = MOB_ROBOTIC | MOB_HUMANOID clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS diff --git a/code/modules/mob/living/carbon/human/species/monkey.dm b/code/modules/mob/living/carbon/human/species/monkey.dm index a051e39cb4e..94fe1fb0ec5 100644 --- a/code/modules/mob/living/carbon/human/species/monkey.dm +++ b/code/modules/mob/living/carbon/human/species/monkey.dm @@ -10,6 +10,7 @@ language = null default_language = "Chimpanzee" inherent_traits = list(TRAIT_NOEXAMINE) + species_traits = list(NOT_SELECTABLE) skinned_type = /obj/item/stack/sheet/animalhide/monkey greater_form = /datum/species/human no_equip = list(slot_belt, slot_wear_id, slot_l_ear, slot_r_ear, slot_glasses, slot_gloves, slot_shoes, slot_wear_suit, slot_w_uniform, slot_l_store, slot_r_store, slot_s_store, slot_wear_pda) diff --git a/code/modules/mob/living/carbon/human/species/nucleation.dm b/code/modules/mob/living/carbon/human/species/nucleation.dm index 0329421ddff..a2d3a9fbf9c 100644 --- a/code/modules/mob/living/carbon/human/species/nucleation.dm +++ b/code/modules/mob/living/carbon/human/species/nucleation.dm @@ -13,7 +13,7 @@ language = "Sol Common" burn_mod = 4 // holy shite, poor guys wont survive half a second cooking smores brute_mod = 2 // damn, double wham, double dam - species_traits = list(LIPS, IS_WHITELISTED, NO_BLOOD, NO_CLONESCAN) + species_traits = list(LIPS, NO_BLOOD, NO_CLONESCAN) inherent_traits = list(TRAIT_NOBREATH, TRAIT_RADIMMUNE, TRAIT_NOPAIN) bodyflags = SHAVED dies_at_threshold = TRUE diff --git a/code/modules/mob/living/carbon/human/species/plasmaman.dm b/code/modules/mob/living/carbon/human/species/plasmaman.dm index 17e0069b7ce..1473ae1aca2 100644 --- a/code/modules/mob/living/carbon/human/species/plasmaman.dm +++ b/code/modules/mob/living/carbon/human/species/plasmaman.dm @@ -5,7 +5,7 @@ dangerous_existence = TRUE //So so much //language = "Clatter" - species_traits = list(IS_WHITELISTED, NO_BLOOD, NO_HAIR) + species_traits = list(NO_BLOOD, NO_HAIR) inherent_traits = list(TRAIT_RADIMMUNE, TRAIT_NOHUNGER) inherent_biotypes = MOB_HUMANOID | MOB_MINERAL forced_heartattack = TRUE // Plasmamen have no blood, but they should still get heart-attacks diff --git a/code/modules/mob/living/carbon/human/species/shadow.dm b/code/modules/mob/living/carbon/human/species/shadow.dm index e7f5450858d..660c0f4dafb 100644 --- a/code/modules/mob/living/carbon/human/species/shadow.dm +++ b/code/modules/mob/living/carbon/human/species/shadow.dm @@ -15,7 +15,7 @@ "eyes" = /obj/item/organ/internal/eyes/night_vision/nightmare //8 darksight. ) - species_traits = list(NO_BLOOD) + species_traits = list(NO_BLOOD, NOT_SELECTABLE) inherent_traits = list(TRAIT_VIRUSIMMUNE, TRAIT_NOBREATH, TRAIT_RADIMMUNE) dies_at_threshold = TRUE diff --git a/code/modules/mob/living/carbon/human/species/skeleton_species.dm b/code/modules/mob/living/carbon/human/species/skeleton_species.dm index 92207de211e..0bfdb8a575d 100644 --- a/code/modules/mob/living/carbon/human/species/skeleton_species.dm +++ b/code/modules/mob/living/carbon/human/species/skeleton_species.dm @@ -9,7 +9,7 @@ blood_color = "#FFFFFF" flesh_color = "#E6E6C6" - species_traits = list(NO_BLOOD, NO_HAIR) + species_traits = list(NO_BLOOD, NO_HAIR, NOT_SELECTABLE) inherent_traits = list(TRAIT_RESISTHEAT, TRAIT_NOBREATH, TRAIT_RESISTCOLD, TRAIT_RESISTHIGHPRESSURE, TRAIT_RESISTLOWPRESSURE, TRAIT_RADIMMUNE, TRAIT_PIERCEIMMUNE, TRAIT_NOHUNGER, TRAIT_XENO_IMMUNE) inherent_biotypes = MOB_UNDEAD | MOB_HUMANOID tox_mod = 0 diff --git a/code/modules/mob/living/carbon/human/species/slimepeople.dm b/code/modules/mob/living/carbon/human/species/slimepeople.dm index 97ace1e5fc3..e427354ca2d 100644 --- a/code/modules/mob/living/carbon/human/species/slimepeople.dm +++ b/code/modules/mob/living/carbon/human/species/slimepeople.dm @@ -25,7 +25,7 @@ male_cough_sounds = list('sound/effects/slime_squish.ogg') female_cough_sounds = list('sound/effects/slime_squish.ogg') - species_traits = list(LIPS, IS_WHITELISTED, NO_CLONESCAN, EXOTIC_COLOR) + species_traits = list(LIPS, NO_CLONESCAN, EXOTIC_COLOR) inherent_traits = list(TRAIT_WATERBREATH, TRAIT_NO_BONES) clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS bodyflags = HAS_SKIN_COLOR | NO_EYES diff --git a/code/modules/mob/living/carbon/human/species/unathi.dm b/code/modules/mob/living/carbon/human/species/unathi.dm index 1fef6d74447..d8741bc731a 100644 --- a/code/modules/mob/living/carbon/human/species/unathi.dm +++ b/code/modules/mob/living/carbon/human/species/unathi.dm @@ -114,6 +114,7 @@ default_language = "Sinta'unathi" speed_mod = -0.80 + species_traits = list(LIPS, NOT_SELECTABLE) inherent_traits = list(TRAIT_CHUNKYFINGERS) has_organ = list( // same as unathi's organs, aside for the lungs as they need to be able to breathe on lavaland. diff --git a/code/modules/mob/living/carbon/human/species/vox.dm b/code/modules/mob/living/carbon/human/species/vox.dm index 27be934c865..7c680bd4d60 100644 --- a/code/modules/mob/living/carbon/human/species/vox.dm +++ b/code/modules/mob/living/carbon/human/species/vox.dm @@ -20,7 +20,7 @@ eyes = "vox_eyes_s" - species_traits = list(NO_CLONESCAN, IS_WHITELISTED) + species_traits = list(NO_CLONESCAN) inherent_traits = list(TRAIT_NOGERMS, TRAIT_NODECAY) clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS //Species-fitted 'em all. dietflags = DIET_OMNI @@ -144,7 +144,7 @@ eyes = "blank_eyes" - species_traits = list(NO_CLONESCAN, NO_BLOOD, IS_WHITELISTED) + species_traits = list(NO_CLONESCAN, NO_BLOOD) inherent_traits = list(TRAIT_RESISTHEAT, TRAIT_RESISTCOLD, TRAIT_RESISTHIGHPRESSURE, TRAIT_RESISTLOWPRESSURE, TRAIT_NOFIRE, TRAIT_NOPAIN, TRAIT_NOGERMS, TRAIT_NODECAY) clothing_flags = 0 //IDK if you've ever seen underwear on an Armalis, but it ain't pretty. bodyflags = HAS_TAIL diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index ccf8c147d74..4c3cc4c2247 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -225,11 +225,9 @@ if(!SSticker || SSticker.current_state != GAME_STATE_PLAYING) to_chat(usr, "The round is either not ready, or has already finished...") return - if(client.prefs.active_character.species in GLOB.whitelisted_species) - - if(!can_use_species(src, client.prefs.active_character.species)) - to_chat(src, alert("You are currently not whitelisted to play [client.prefs.active_character.species].")) - return FALSE + if(!can_use_species(src, client.prefs.active_character.species)) + to_chat(src, alert("You are currently not whitelisted to play [client.prefs.active_character.species].")) + return FALSE LateChoices() @@ -245,10 +243,9 @@ if(client.prefs.toggles2 & PREFTOGGLE_2_RANDOMSLOT) client.prefs.load_random_character_slot(client) - if(client.prefs.active_character.species in GLOB.whitelisted_species) - if(!can_use_species(src, client.prefs.active_character.species)) - to_chat(src, alert("You are currently not whitelisted to play [client.prefs.active_character.species].")) - return FALSE + if(!can_use_species(src, client.prefs.active_character.species)) + to_chat(src, alert("You are currently not whitelisted to play [client.prefs.active_character.species].")) + return FALSE AttemptLateSpawn(href_list["SelectedJob"]) return @@ -601,8 +598,9 @@ return check_rights(R_ADMIN, 0, src) /mob/new_player/proc/is_species_whitelisted(datum/species/S) - if(!S) return 1 - return can_use_species(src, S.name) || !(IS_WHITELISTED in S.species_traits) + if(!S) + return TRUE // Allow null species? + return can_use_species(src, S.name) /mob/new_player/get_gender() if(!client || !client.prefs) ..() diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm index c9b7760b573..1b328d6f183 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -410,9 +410,6 @@ "The Emergency Shuttle has left the station. Estimate [timeLeft(600)] minutes until the shuttle docks at Central Command.", new_title = "Priority Announcement" ) - for(var/mob/M in GLOB.player_list) - if(!isnewplayer(M) && !(M.client.ckey in GLOB.karma_spenders) && !M.get_preference(PREFTOGGLE_DISABLE_KARMA_REMINDER)) - to_chat(M, "You have not yet spent your karma for the round; was there a player worthy of receiving your reward? Look under Special Verbs tab, Award Karma.") if(SHUTTLE_ESCAPE) if(time_left <= 0) diff --git a/config/example/config.toml b/config/example/config.toml index 59defb26eb2..0363c67defa 100644 --- a/config/example/config.toml +++ b/config/example/config.toml @@ -145,7 +145,7 @@ ipc_screens = [ # Enable/disable the database on a whole sql_enabled = false # SQL version. If this is a mismatch, round start will be delayed -sql_version = 46 +sql_version = 47 # SQL server address. Can be an IP or DNS name sql_address = "127.0.0.1" # SQL server port @@ -300,8 +300,6 @@ allow_antag_hud = true restrict_antag_hud_rejoin = true # Do we want to allow player respawns? respawn_enabled = false -# Enable karma awarding and karma lockouts for jobs and species? -enable_karma = false # Enable/disable the buster for the CID randomiser DLL enable_cid_randomiser_buster = false # Prevent admins from possessing the singularity diff --git a/interface/skin.dmf b/interface/skin.dmf index 761f14d95f0..031070886e6 100644 --- a/interface/skin.dmf +++ b/interface/skin.dmf @@ -2,13 +2,13 @@ macro "default" menu "menu" - elem + elem name = "&File" - elem + elem name = "&Quick screenshot" command = ".screenshot auto" category = "&File" - elem + elem name = "&Save screenshot as..." command = ".screenshot" category = "&File" @@ -16,16 +16,16 @@ menu "menu" name = "&Reconnect" command = ".reconnect" category = "&File" - elem + elem name = "" category = "&File" - elem + elem name = "&Quit" command = ".quit" category = "&File" - elem + elem name = "&Icons" - elem + elem name = "&Size" category = "&Icons" elem "stretch" @@ -77,7 +77,7 @@ menu "menu" category = "&Size" can-check = true group = "size" - elem + elem name = "&Scaling" category = "&Icons" elem "NN" @@ -104,9 +104,9 @@ menu "menu" command = ".winset \"menu.textmode.is-checked=true?mapwindow.map.text-mode=true:mapwindow.map.text-mode=false\"" category = "&Icons" can-check = true - elem + elem name = "&Options" - elem + elem name = "&Open Volume Mixer" command = "Open-Volume-Mixer" category = "&Options" @@ -117,9 +117,9 @@ menu "menu" is-checked = true saved-params = "is-checked" command = ".winset \"menu.statusbar.is-checked=true?mapwindow.status_bar.is-visible=true:mapwindow.status_bar.is-visible=false\"" - elem + elem name = "&Help" - elem + elem name = "&Admin help" command = "adminhelp" category = "&Help" @@ -312,18 +312,9 @@ window "rpane" background-color = #7289da text = "Discord" command = "discord" - elem "karma" - type = BUTTON - pos = 535,7 - size = 60x16 - font-style = "bold" - text-color = #ffffff - background-color = #ff4500 - text = "Karma" - command = "karmashop" elem "donate" type = BUTTON - pos = 597,7 + pos = 535,7 size = 60x16 font-style = "bold" text-color = #ffffff diff --git a/paradise.dme b/paradise.dme index cd7131c035c..fe577532827 100644 --- a/paradise.dme +++ b/paradise.dme @@ -61,7 +61,6 @@ #include "code\__DEFINES\is_helpers.dm" #include "code\__DEFINES\job.dm" #include "code\__DEFINES\js.dm" -#include "code\__DEFINES\karma.dm" #include "code\__DEFINES\keybindings_defines.dm" #include "code\__DEFINES\language.dm" #include "code\__DEFINES\layers.dm" @@ -1485,8 +1484,6 @@ #include "code\modules\client\login_processing\38-alts_cid.dm" #include "code\modules\client\login_processing\39-cid_count.dm" #include "code\modules\client\login_processing\40-pai_save.dm" -#include "code\modules\client\login_processing\42-karma_numbers.dm" -#include "code\modules\client\login_processing\43-karma_unlocks.dm" #include "code\modules\client\login_processing\45-cuis.dm" #include "code\modules\client\login_processing\__client_login_processor.dm" #include "code\modules\client\preference\character.dm" @@ -1793,9 +1790,6 @@ #include "code\modules\instruments\songs\_song_ui.dm" #include "code\modules\instruments\songs\play_legacy.dm" #include "code\modules\instruments\songs\play_synthesized.dm" -#include "code\modules\karma\karma.dm" -#include "code\modules\karma\karma_holder.dm" -#include "code\modules\karma\karma_packages.dm" #include "code\modules\library\book.dm" #include "code\modules\library\library_admin.dm" #include "code\modules\library\library_catalog.dm" diff --git a/tgui/packages/tgui/interfaces/KarmaShop.js b/tgui/packages/tgui/interfaces/KarmaShop.js deleted file mode 100644 index b4195146796..00000000000 --- a/tgui/packages/tgui/interfaces/KarmaShop.js +++ /dev/null @@ -1,86 +0,0 @@ -import { useBackend, useLocalState } from '../backend'; -import { Button, Section, Box, Tabs } from '../components'; -import { Window } from '../layouts'; - -export const KarmaShop = (props, context) => { - const { act, data } = useBackend(context); - - const { karma_balance, purchased_packages, all_packages } = data; - - let unique_cats = []; - - all_packages.map((p) => { - if (!unique_cats.includes(p.cat)) { - unique_cats.push(p.cat); - } - }); - - const [tabIndex, setTabIndex] = useLocalState( - context, - 'tabIndex', - unique_cats[0] - ); - - return ( - - -
- { - // Dynamically make tabs - } - - {unique_cats.map((c) => ( - setTabIndex(c)} - > - {c} - - ))} - - - {all_packages.map( - (p) => - p.cat === tabIndex && ( - -
-
-
- ); -}; diff --git a/tgui/packages/tgui/public/tgui.bundle.js b/tgui/packages/tgui/public/tgui.bundle.js index 2c8918e6d07..04834a9ea89 100644 --- a/tgui/packages/tgui/public/tgui.bundle.js +++ b/tgui/packages/tgui/public/tgui.bundle.js @@ -1,5 +1,5 @@ -!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=230)}([function(e,t,n){"use strict";t.__esModule=!0;var o=n(232);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||(t[e]=o[e]))}))},function(e,t,n){"use strict";t.__esModule=!0,t.useSharedState=t.useLocalState=t.useBackend=t.deleteLocalState=t.backendUpdate=t.backendSetSharedState=t.backendReducer=t.backendDeleteSharedState=void 0;var o=n(31),r=n(43);t.backendUpdate=function(e){return{type:"backend/update",payload:e}};var a=function(e,t){return{type:"backend/setSharedState",payload:{key:e,nextState:t}}};t.backendSetSharedState=a;var c=function(e){return{type:"backend/deleteSharedState",payload:e}};t.backendDeleteSharedState=c;t.backendReducer=function(e,t){var n=t.type,o=t.payload;if("backend/update"===n){var a=Object.assign({},e.config,o.config),c=Object.assign({},e.data,o.static_data,o.data),i=Object.assign({},e.shared);if(o.shared)for(var l=0,d=Object.keys(o.shared);l1?n-1:0),r=1;rn?n:e};t.clamp01=function(e){return e<0?0:e>1?1:e};t.scale=function(e,t,n){return(e-t)/(n-t)};t.round=function(e,t){return!e||isNaN(e)?e:(t|=0,a=(e*=n=Math.pow(10,t))>0|-(e<0),r=Math.abs(e%1)>=.4999999999854481,o=Math.floor(e),r&&(e=o+(a>0)),(r?e:Math.round(e))/n);var n,o,r,a};t.toFixed=function(e,t){return void 0===t&&(t=0),Number(e).toFixed(Math.max(t,0))};var o=function(e,t){return t&&e>=t[0]&&e<=t[1]};t.inRange=o;t.keyOfMatchingRange=function(e,t){for(var n=0,r=Object.keys(t);n0&&(t.style=l),t};t.computeBoxProps=N;var b=function(e){var t=e.textColor||e.color,n=e.backgroundColor;return(0,o.classes)([u(t)&&"color-"+t,u(n)&&"color-bg-"+n])};t.computeBoxClassName=b;var V=function(e){var t=e.as,n=void 0===t?"div":t,o=e.className,c=e.children,l=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,i);if("function"==typeof c)return c(N(e));var d="string"==typeof o?o+" "+b(l):b(l),u=N(l);return(0,r.createVNode)(a.VNodeFlags.HtmlElement,n,d,c,a.ChildFlags.UnknownChildren,u)};t.Box=V,V.defaultHooks=o.pureComponentHooks},function(e,t,n){"use strict";function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n",apos:"'"};return e.replace(/
/gi,"\n").replace(/<\/?[a-z0-9-_]+[^>]*>/gi,"").replace(/&(nbsp|amp|quot|lt|gt|apos);/g,(function(e,n){return t[n]})).replace(/&#?([0-9]+);/gi,(function(e,t){var n=parseInt(t,10);return String.fromCharCode(n)})).replace(/&#x?([0-9a-f]+);/gi,(function(e,t){var n=parseInt(t,16);return String.fromCharCode(n)}))};t.buildQueryString=function(e){return Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&")}},function(e,t,n){"use strict";var o=n(40);e.exports=function(e){return o(e.length)}},function(e,t,n){"use strict";var o=n(5),r=n(12),a=n(49),c=n(129),i=n(127);e.exports=function(e,t,n,l){var d=!!l&&!!l.unsafe,u=!!l&&!!l.enumerable,s=!!l&&!!l.noTargetGet,m=l&&l.name!==undefined?l.name:t;return r(n)&&c(n,m,l),e===o?(u?e[t]=n:i(t,n),e):(d?!s&&e[t]&&(u=!0):delete e[t],u?e[t]=n:a(e,t,n),e)}},function(e,t,n){"use strict";var o=n(60),r=n(7),a=n(85),c=n(19),i=n(23),l=n(91),d=r([].push),u=function(e){var t=1==e,n=2==e,r=3==e,u=4==e,s=6==e,m=7==e,p=5==e||s;return function(h,f,C,N){for(var b,V,g=c(h),v=a(g),y=o(f,C),_=i(v),x=0,k=N||l,L=t?k(h,_):n||m?k(h,0):undefined;_>x;x++)if((p||x in v)&&(V=y(b=v[x],x,g),e))if(t)L[x]=V;else if(V)switch(e){case 3:return!0;case 5:return b;case 6:return x;case 2:d(L,b)}else switch(e){case 4:return!1;case 7:d(L,b)}return s?-1:r||u?u:L}};e.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}},function(e,t,n){"use strict";var o=n(8),r=n(14),a=n(100),c=n(64),i=n(29),l=n(56),d=n(18),u=n(172),s=Object.getOwnPropertyDescriptor;t.f=o?s:function(e,t){if(e=i(e),t=l(t),u)try{return s(e,t)}catch(n){}if(d(e,t))return c(!r(a.f,e,t),e[t])}},function(e,t,n){"use strict";var o=n(5),r=n(12),a=n(70),c=o.TypeError;e.exports=function(e){if(r(e))return e;throw c(a(e)+" is not a function")}},function(e,t,n){"use strict";var o=n(5),r=n(12),a=function(e){return r(e)?e:undefined};e.exports=function(e,t){return arguments.length<2?a(o[e]):o[e]&&o[e][t]}},function(e,t,n){"use strict";var o=n(85),r=n(30);e.exports=function(e){return o(r(e))}},function(e,t,n){"use strict";var o=n(5).TypeError;e.exports=function(e){if(e==undefined)throw o("Can't call method on "+e);return e}},function(e,t,n){"use strict";function o(e,t,n,o,r,a,c){try{var i=e[a](c),l=i.value}catch(d){return void n(d)}i.done?t(l):Promise.resolve(l).then(o,r)}t.__esModule=!0,t.winset=t.winget=t.runCommand=t.callByondAsync=t.callByond=t.IS_IE8=void 0;var r=window.Byond,a=function(){var e=navigator.userAgent.match(/Trident\/(\d+).+?;/i);if(!e)return null;var t=e[1];return t?parseInt(t,10):null}(),c=null!==a&&a<=6;t.IS_IE8=c;var i=function(e,t){void 0===t&&(t={}),r.call(e,t)};t.callByond=i;var l=function(e,t){void 0===t&&(t={}),window.__callbacks__=window.__callbacks__||[];var n=window.__callbacks__.length,o=new Promise((function(e){window.__callbacks__.push(e)}));return r.call(e,Object.assign({},t,{callback:"__callbacks__["+n+"]"})),o};t.callByondAsync=l;t.runCommand=function(e){return i("winset",{command:e})};var d=function(){var e,t=(e=regeneratorRuntime.mark((function n(e,t){var o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,l("winget",{id:e,property:t});case 2:return o=n.sent,n.abrupt("return",o[t]);case 4:case"end":return n.stop()}}),n)})),function(){var t=this,n=arguments;return new Promise((function(r,a){var c=e.apply(t,n);function i(e){o(c,r,a,i,l,"next",e)}function l(e){o(c,r,a,i,l,"throw",e)}i(undefined)}))});return function(e,n){return t.apply(this,arguments)}}();t.winget=d;t.winset=function(e,t,n){var o;return i("winset",((o={})[e+"."+t]=n,o))}},function(e,t,n){"use strict";t.__esModule=!0,t.zipWith=t.zip=t.uniqBy=t.toKeyedArray=t.toArray=t.sortBy=t.reduce=t.map=t.filter=void 0;t.toArray=function(e){if(Array.isArray(e))return e;if("object"==typeof e){var t=Object.prototype.hasOwnProperty,n=[];for(var o in e)t.call(e,o)&&n.push(e[o]);return n}return[]};t.toKeyedArray=function(e,t){return void 0===t&&(t="key"),o((function(e,n){var o;return Object.assign(((o={})[t]=n,o),e)}))(e)};t.filter=function(e){return function(t){if(null===t&&t===undefined)return t;if(Array.isArray(t)){for(var n=[],o=0;oi)return 1}return 0};t.sortBy=function(){for(var e=arguments.length,t=new Array(e),n=0;n"+l+""}},function(e,t,n){"use strict";var o=n(6);e.exports=function(e){return o((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))}},function(e,t,n){"use strict";var o,r,a,c=n(174),i=n(5),l=n(7),d=n(11),u=n(49),s=n(18),m=n(126),p=n(102),h=n(87),f=i.TypeError,C=i.WeakMap;if(c||m.state){var N=m.state||(m.state=new C),b=l(N.get),V=l(N.has),g=l(N.set);o=function(e,t){if(V(N,e))throw new f("Object already initialized");return t.facade=e,g(N,e,t),t},r=function(e){return b(N,e)||{}},a=function(e){return V(N,e)}}else{var v=p("state");h[v]=!0,o=function(e,t){if(s(e,v))throw new f("Object already initialized");return t.facade=e,u(e,v,t),t},r=function(e){return s(e,v)?e[v]:{}},a=function(e){return s(e,v)}}e.exports={set:o,get:r,has:a,enforce:function(e){return a(e)?r(e):o(e,{})},getterFor:function(e){return function(t){var n;if(!d(t)||(n=r(t)).type!==e)throw f("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){"use strict";var o=Math.ceil,r=Math.floor;e.exports=function(e){var t=+e;return t!=t||0===t?0:(t>0?r:o)(t)}},function(e,t,n){"use strict";var o=n(39),r=Math.min;e.exports=function(e){return e>0?r(o(e),9007199254740991):0}},function(e,t,n){"use strict";t.__esModule=!0,t.computeFlexProps=t.computeFlexItemProps=t.FlexItem=t.Flex=void 0;var o=n(0),r=n(10),a=n(31),c=n(21),i=["className","direction","wrap","align","alignContent","justify","inline","spacing","spacingPrecise"],l=["className","grow","order","shrink","basis","align"];function d(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var u=function(e){var t=e.className,n=e.direction,o=e.wrap,c=e.align,l=e.alignContent,u=e.justify,s=e.inline,m=e.spacing,p=void 0===m?0:m,h=e.spacingPrecise,f=void 0===h?0:h,C=d(e,i);return Object.assign({className:(0,r.classes)(["Flex",a.IS_IE8&&("column"===n?"Flex--ie8--column":"Flex--ie8"),s&&"Flex--inline",p>0&&"Flex--spacing--"+p,f>0&&"Flex--spacingPrecise--"+f,t]),style:Object.assign({},C.style,{"flex-direction":n,"flex-wrap":o,"align-items":c,"align-content":l,"justify-content":u})},C)};t.computeFlexProps=u;var s=function(e){return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Box,Object.assign({},u(e))))};t.Flex=s,s.defaultHooks=r.pureComponentHooks;var m=function(e){var t=e.className,n=e.grow,o=e.order,i=e.shrink,u=e.basis,s=void 0===u?e.width:u,m=e.align,p=d(e,l);return Object.assign({className:(0,r.classes)(["Flex__item",a.IS_IE8&&"Flex__item--ie8",t]),style:Object.assign({},p.style,{"flex-grow":n,"flex-shrink":i,"flex-basis":(0,c.unit)(s),order:o,"align-self":m})},p)};t.computeFlexItemProps=m;var p=function(e){return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Box,Object.assign({},m(e))))};t.FlexItem=p,p.defaultHooks=r.pureComponentHooks,s.Item=p},function(e,t,n){"use strict";var o=n(5),r=n(18),a=n(12),c=n(19),i=n(102),l=n(139),d=i("IE_PROTO"),u=o.Object,s=u.prototype;e.exports=l?u.getPrototypeOf:function(e){var t=c(e);if(r(t,d))return t[d];var n=t.constructor;return a(n)&&t instanceof n?n.prototype:t instanceof u?s:null}},function(e,t,n){"use strict";t.__esModule=!0,t.timeAgo=t.getGasLabel=t.getGasColor=t.UI_UPDATE=t.UI_INTERACTIVE=t.UI_DISABLED=t.UI_CLOSE=t.RADIO_CHANNELS=t.CSS_COLORS=t.COLORS=void 0;t.UI_INTERACTIVE=2;t.UI_UPDATE=1;t.UI_DISABLED=0;t.UI_CLOSE=-1;t.COLORS={department:{command:"#526aff",security:"#CF0000",medical:"#009190",science:"#993399",engineering:"#A66300",supply:"#9F8545",service:"#80A000",centcom:"#78789B",other:"#C38312"},damageType:{oxy:"#3498db",toxin:"#2ecc71",burn:"#e67e22",brute:"#e74c3c"}};t.CSS_COLORS=["black","white","red","orange","yellow","olive","green","teal","blue","violet","purple","pink","brown","grey","good","average","bad","label"];t.RADIO_CHANNELS=[{name:"Syndicate",freq:1213,color:"#a52a2a"},{name:"SyndTeam",freq:1244,color:"#a52a2a"},{name:"Red Team",freq:1215,color:"#ff4444"},{name:"Blue Team",freq:1217,color:"#3434fd"},{name:"Response Team",freq:1345,color:"#2681a5"},{name:"Special Ops",freq:1341,color:"#2681a5"},{name:"Supply",freq:1347,color:"#b88646"},{name:"Service",freq:1349,color:"#6ca729"},{name:"Science",freq:1351,color:"#c68cfa"},{name:"Command",freq:1353,color:"#5177ff"},{name:"Procedure",freq:1339,color:"#F70285"},{name:"Medical",freq:1355,color:"#57b8f0"},{name:"Medical(I)",freq:1485,color:"#57b8f0"},{name:"Engineering",freq:1357,color:"#f37746"},{name:"Security",freq:1359,color:"#dd3535"},{name:"Security(I)",freq:1475,color:"#dd3535"},{name:"AI Private",freq:1343,color:"#d65d95"},{name:"Common",freq:1459,color:"#1ecc43"}];var o=[{id:"o2",name:"Oxygen",label:"O\u2082",color:"blue"},{id:"n2",name:"Nitrogen",label:"N\u2082",color:"red"},{id:"co2",name:"Carbon Dioxide",label:"CO\u2082",color:"grey"},{id:"plasma",name:"Plasma",label:"Plasma",color:"pink"},{id:"water_vapor",name:"Water Vapor",label:"H\u2082O",color:"grey"},{id:"nob",name:"Hyper-noblium",label:"Hyper-nob",color:"teal"},{id:"n2o",name:"Nitrous Oxide",label:"N\u2082O",color:"red"},{id:"no2",name:"Nitryl",label:"NO\u2082",color:"brown"},{id:"tritium",name:"Tritium",label:"Tritium",color:"green"},{id:"bz",name:"BZ",label:"BZ",color:"purple"},{id:"stim",name:"Stimulum",label:"Stimulum",color:"purple"},{id:"pluox",name:"Pluoxium",label:"Pluoxium",color:"blue"},{id:"miasma",name:"Miasma",label:"Miasma",color:"olive"},{id:"hydrogen",name:"Hydrogen",label:"H\u2082",color:"white"},{id:"ab",name:"Agent B",label:"Agent B",color:"purple"}];t.getGasLabel=function(e,t){var n=String(e).toLowerCase(),r=o.find((function(e){return e.id===n||e.name.toLowerCase()===n}));return r&&r.label||t||e};t.getGasColor=function(e){var t=String(e).toLowerCase(),n=o.find((function(e){return e.id===t||e.name.toLowerCase()===t}));return n&&n.color};t.timeAgo=function(e,t){if(e>t)return"in the future";var n=(t/=10)-(e/=10);if(n>3600){var o=Math.round(n/3600);return o+" hour"+(1===o?"":"s")+" ago"}if(n>60){var r=Math.round(n/60);return r+" minute"+(1===r?"":"s")+" ago"}var a=Math.round(n);return a+" second"+(1===a?"":"s")+" ago"}},function(e,t,n){"use strict";var o=n(7),r=o({}.toString),a=o("".slice);e.exports=function(e){return a(r(e),8,-1)}},function(e,t,n){"use strict";var o=n(7);e.exports=o({}.isPrototypeOf)},function(e,t,n){"use strict";var o=n(84),r=Function.prototype,a=r.apply,c=r.call;e.exports="object"==typeof Reflect&&Reflect.apply||(o?c.bind(a):function(){return c.apply(a,arguments)})},function(e,t,n){"use strict";t.__esModule=!0,t.LabeledListItem=t.LabeledListDivider=t.LabeledList=void 0;var o=n(0),r=n(10),a=n(21),c=n(220),i=function(e){var t=e.children;return(0,o.createVNode)(1,"table","LabeledList",t,0)};t.LabeledList=i,i.defaultHooks=r.pureComponentHooks;var l=function(e){var t=e.className,n=e.label,c=e.labelColor,i=void 0===c?"label":c,l=e.color,d=e.textAlign,u=e.verticalAlign,s=e.buttons,m=e.content,p=e.children,h=e.noColon,f=void 0!==h&&h?"":":";return(0,o.createVNode)(1,"tr",(0,r.classes)(["LabeledList__row",t]),[(0,o.createComponentVNode)(2,a.Box,{as:"td",color:i,verticalAlign:u,className:(0,r.classes)(["LabeledList__cell","LabeledList__label"]),children:n?n+f:null}),(0,o.createComponentVNode)(2,a.Box,{as:"td",color:l,textAlign:d,verticalAlign:u,className:(0,r.classes)(["LabeledList__cell","LabeledList__content"]),colSpan:s?undefined:2,children:[m,p]}),s&&(0,o.createVNode)(1,"td","LabeledList__cell LabeledList__buttons",s,0)],0)};t.LabeledListItem=l,l.defaultHooks=r.pureComponentHooks;var d=function(e){var t=e.size?(0,a.unit)(Math.max(0,e.size-1)):0;return(0,o.createVNode)(1,"tr","LabeledList__row",(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,c.Divider),2,{colSpan:3,style:{"padding-top":t,"padding-bottom":t}}),2)};t.LabeledListDivider=d,d.defaultHooks=r.pureComponentHooks,i.Item=l,i.Divider=d},function(e,t,n){"use strict";var o=n(28);e.exports=o("navigator","userAgent")||""},function(e,t,n){"use strict";var o=n(8),r=n(17),a=n(64);e.exports=o?function(e,t,n){return r.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){"use strict";var o=n(39),r=Math.max,a=Math.min;e.exports=function(e,t){var n=o(e);return n<0?r(n+t,0):a(n,t)}},function(e,t,n){"use strict";var o,r=n(9),a=n(133),c=n(131),i=n(87),l=n(177),d=n(128),u=n(102),s=u("IE_PROTO"),m=function(){},p=function(e){return"