diff --git a/SQL/migrate/V041__SQL-Cleanup.sql b/SQL/migrate/V041__SQL-Cleanup.sql new file mode 100644 index 00000000000..424ab4667f6 --- /dev/null +++ b/SQL/migrate/V041__SQL-Cleanup.sql @@ -0,0 +1,885 @@ +-- +-- Cleans up the database +-- + +-- This is specifically created for the current Aurorastation Database. +-- IF YOU RUN THIS ON YOUR DOWNSTREAM SERVER IT IS STRONGLY ADVICED TO EXECUTE THIS IN A TEST SYTEM FIRST AND FIX POTENTIAL ERRORS + +-- Delete unused git_pull tables +SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; +DROP TABLE IF EXISTS `ss13_git_pull_todo_stats`; +DROP TABLE IF EXISTS `ss13_git_pull_todos`; +DROP TABLE IF EXISTS `ss13_git_pull_requests`; +DROP TABLE IF EXISTS `ss13_santa`; +DROP TABLE IF EXISTS `ss13_contest_participants`; +DROP TABLE IF EXISTS `ss13_contest_reports`; +DROP TABLE IF EXISTS `ss13_directives`; + + +-- Fix data issues +UPDATE ss13_ban SET expiration_time = bantime WHERE expiration_time = 0; +UPDATE ss13_library SET uploadtime = "2015-04-26" WHERE uploadtime = 0; +UPDATE + ss13_news_stories +SET + publish_at = created_at, + publish_until = DATE_ADD(created_at, INTERVAL 7 DAY), + ic_timestamp = DATE_ADD(created_at, INTERVAL 442 YEAR) +WHERE + publish_at = 0 OR + publish_until = 0 OR + ic_timestamp = 0; + +-- Update charset and collation +ALTER TABLE `discord_bans` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `discord_bans` + ALTER `user_id` DROP DEFAULT, + ALTER `user_name` DROP DEFAULT, + ALTER `server_id` DROP DEFAULT, + ALTER `ban_type` DROP DEFAULT; +ALTER TABLE `discord_bans` + CHANGE COLUMN `user_id` `user_id` VARCHAR(45) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `id`, + CHANGE COLUMN `user_name` `user_name` VARCHAR(45) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `user_id`, + CHANGE COLUMN `server_id` `server_id` VARCHAR(45) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `user_name`, + CHANGE COLUMN `ban_type` `ban_type` VARCHAR(45) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `server_id`, + CHANGE COLUMN `ban_reason` `ban_reason` LONGTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `ban_duration`, + CHANGE COLUMN `admin_id` `admin_id` VARCHAR(45) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `expiration_time`, + CHANGE COLUMN `admin_name` `admin_name` VARCHAR(45) NULL DEFAULT 'BOREALIS' COLLATE 'utf8mb4_unicode_ci' AFTER `admin_id`; + +ALTER TABLE `discord_channels` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `discord_channels` + ALTER `channel_group` DROP DEFAULT; +ALTER TABLE `discord_channels` + CHANGE COLUMN `channel_group` `channel_group` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `id`, + CHANGE COLUMN `channel_id` `channel_id` MEDIUMTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `channel_group`, + CHANGE COLUMN `server_id` `server_id` VARCHAR(45) NOT NULL DEFAULT '' COLLATE 'utf8mb4_unicode_ci' AFTER `pin_flag`; + +ALTER TABLE `discord_log` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `discord_log` + CHANGE COLUMN `action` `action` MEDIUMTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `action_time`, + CHANGE COLUMN `admin_id` `admin_id` VARCHAR(45) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `action`, + CHANGE COLUMN `user_id` `user_id` VARCHAR(45) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `admin_id`; + +ALTER TABLE `discord_strikes` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `discord_strikes` + ALTER `user_id` DROP DEFAULT, + ALTER `user_name` DROP DEFAULT, + ALTER `admin_id` DROP DEFAULT, + ALTER `admin_name` DROP DEFAULT; +ALTER TABLE `discord_strikes` + CHANGE COLUMN `user_id` `user_id` VARCHAR(45) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `id`, + CHANGE COLUMN `user_name` `user_name` VARCHAR(45) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `user_id`, + CHANGE COLUMN `action_type` `action_type` VARCHAR(45) NOT NULL DEFAULT 'WARNING' COLLATE 'utf8mb4_unicode_ci' AFTER `user_name`, + CHANGE COLUMN `admin_id` `admin_id` VARCHAR(45) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `strike_time`, + CHANGE COLUMN `admin_name` `admin_name` VARCHAR(45) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `admin_id`; + +ALTER TABLE `discord_subscribers` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `discord_subscribers` + ALTER `user_id` DROP DEFAULT; +ALTER TABLE `discord_subscribers` + CHANGE COLUMN `user_id` `user_id` VARCHAR(45) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `id`; + +ALTER TABLE `ss13_admin_log` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_admin_log` + ALTER `adminckey` DROP DEFAULT, + ALTER `adminip` DROP DEFAULT; +ALTER TABLE `ss13_admin_log` + CHANGE COLUMN `adminckey` `adminckey` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `datetime`, + CHANGE COLUMN `adminip` `adminip` VARCHAR(18) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `adminckey`, + CHANGE COLUMN `log` `log` MEDIUMTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `adminip`; + +ALTER TABLE `ss13_antag_log` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_antag_log` + ALTER `ckey` DROP DEFAULT, + ALTER `game_id` DROP DEFAULT, + ALTER `special_role_name` DROP DEFAULT; +ALTER TABLE `ss13_antag_log` + CHANGE COLUMN `ckey` `ckey` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `id`, + CHANGE COLUMN `game_id` `game_id` VARCHAR(50) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `char_id`, + CHANGE COLUMN `char_name` `char_name` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `game_id`, + CHANGE COLUMN `special_role_name` `special_role_name` VARCHAR(50) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `datetime`; + +ALTER TABLE `ss13_api_commands` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_api_commands` + ALTER `command` DROP DEFAULT; +ALTER TABLE `ss13_api_commands` + CHANGE COLUMN `command` `command` VARCHAR(50) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `id`, + CHANGE COLUMN `description` `description` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `command`; + +ALTER TABLE `ss13_api_tokens` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_api_tokens` + ALTER `token` DROP DEFAULT, + ALTER `creator` DROP DEFAULT, + ALTER `description` DROP DEFAULT; +ALTER TABLE `ss13_api_tokens` + CHANGE COLUMN `token` `token` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `id`, + CHANGE COLUMN `ip` `ip` VARCHAR(16) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `token`, + CHANGE COLUMN `creator` `creator` VARCHAR(50) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `ip`, + CHANGE COLUMN `description` `description` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `creator`; + +ALTER TABLE `ss13_api_token_command` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; + +ALTER TABLE `ss13_ban` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_ban` + ALTER `serverip` DROP DEFAULT, + ALTER `bantype` DROP DEFAULT, + ALTER `ckey` DROP DEFAULT, + ALTER `computerid` DROP DEFAULT, + ALTER `ip` DROP DEFAULT, + ALTER `a_ckey` DROP DEFAULT, + ALTER `a_computerid` DROP DEFAULT, + ALTER `a_ip` DROP DEFAULT; +ALTER TABLE `ss13_ban` + CHANGE COLUMN `serverip` `serverip` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `bantime`, + CHANGE COLUMN `bantype` `bantype` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `serverip`, + CHANGE COLUMN `reason` `reason` MEDIUMTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `bantype`, + CHANGE COLUMN `job` `job` VARCHAR(32) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `reason`, + CHANGE COLUMN `ckey` `ckey` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `expiration_time`, + CHANGE COLUMN `computerid` `computerid` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `ckey`, + CHANGE COLUMN `ip` `ip` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `computerid`, + CHANGE COLUMN `a_ckey` `a_ckey` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `ip`, + CHANGE COLUMN `a_computerid` `a_computerid` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `a_ckey`, + CHANGE COLUMN `a_ip` `a_ip` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `a_computerid`, + CHANGE COLUMN `who` `who` MEDIUMTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `a_ip`, + CHANGE COLUMN `adminwho` `adminwho` MEDIUMTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `who`, + CHANGE COLUMN `edits` `edits` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `adminwho`, + CHANGE COLUMN `unbanned_reason` `unbanned_reason` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `unbanned_datetime`, + CHANGE COLUMN `unbanned_ckey` `unbanned_ckey` VARCHAR(32) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `unbanned_reason`, + CHANGE COLUMN `unbanned_computerid` `unbanned_computerid` VARCHAR(32) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `unbanned_ckey`, + CHANGE COLUMN `unbanned_ip` `unbanned_ip` VARCHAR(32) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `unbanned_computerid`; + +ALTER TABLE `ss13_ban_mirrors` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_ban_mirrors` + ALTER `ckey` DROP DEFAULT, + ALTER `ip` DROP DEFAULT, + ALTER `computerid` DROP DEFAULT, + ALTER `source` DROP DEFAULT; +ALTER TABLE `ss13_ban_mirrors` + CHANGE COLUMN `ckey` `ckey` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `ban_id`, + CHANGE COLUMN `ip` `ip` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `ckey`, + CHANGE COLUMN `computerid` `computerid` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `ip`, + CHANGE COLUMN `source` `source` ENUM('legacy','conninfo','isbanned') NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `datetime`, + CHANGE COLUMN `extra_info` `extra_info` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `source`; + +ALTER TABLE `ss13_cargo_categories` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_cargo_categories` + ALTER `name` DROP DEFAULT, + ALTER `display_name` DROP DEFAULT, + ALTER `description` DROP DEFAULT, + ALTER `icon` DROP DEFAULT; +ALTER TABLE `ss13_cargo_categories` + CHANGE COLUMN `name` `name` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `id`, + CHANGE COLUMN `display_name` `display_name` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `name`, + CHANGE COLUMN `description` `description` VARCHAR(300) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `display_name`, + CHANGE COLUMN `icon` `icon` VARCHAR(50) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `description`, + CHANGE COLUMN `order_by` `order_by` VARCHAR(5) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `price_modifier`; + +ALTER TABLE `ss13_cargo_items` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_cargo_items` + CHANGE COLUMN `name` `name` VARCHAR(100) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `id`, + CHANGE COLUMN `supplier` `supplier` VARCHAR(50) NOT NULL DEFAULT 'nt' COLLATE 'utf8mb4_unicode_ci' AFTER `name`, + CHANGE COLUMN `description` `description` VARCHAR(300) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `supplier`, + CHANGE COLUMN `container_type` `container_type` VARCHAR(50) NOT NULL DEFAULT 'crate' COLLATE 'utf8mb4_unicode_ci' AFTER `access`, + CHANGE COLUMN `order_by` `order_by` VARCHAR(5) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `groupable`, + CHANGE COLUMN `created_by` `created_by` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `order_by`, + CHANGE COLUMN `approved_by` `approved_by` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `created_by`, + DROP COLUMN `suppliers_old`, + DROP COLUMN `path_old`; +ALTER TABLE `ss13_cargo_items` + ALTER `categories` DROP DEFAULT; +ALTER TABLE `ss13_cargo_items` + CHANGE COLUMN `categories` `categories` JSON NOT NULL AFTER `description`, + CHANGE COLUMN `items` `items` JSON NULL DEFAULT NULL AFTER `price`; + +ALTER TABLE `ss13_cargo_suppliers` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_cargo_suppliers` + ALTER `short_name` DROP DEFAULT, + ALTER `name` DROP DEFAULT, + ALTER `description` DROP DEFAULT, + ALTER `tag_line` DROP DEFAULT; +ALTER TABLE `ss13_cargo_suppliers` + CHANGE COLUMN `short_name` `short_name` VARCHAR(50) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `id`, + CHANGE COLUMN `name` `name` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `short_name`, + CHANGE COLUMN `description` `description` VARCHAR(300) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `name`, + CHANGE COLUMN `tag_line` `tag_line` VARCHAR(300) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `description`; + +ALTER TABLE `ss13_ccia_actions` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_ccia_actions` + ALTER `type` DROP DEFAULT, + ALTER `issuedby` DROP DEFAULT, + ALTER `url` DROP DEFAULT; +ALTER TABLE `ss13_ccia_actions` + CHANGE COLUMN `title` `title` MEDIUMTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `id`, + CHANGE COLUMN `type` `type` ENUM('injunction','suspension','reprimand','demotion','other') NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `title`, + CHANGE COLUMN `issuedby` `issuedby` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `type`, + CHANGE COLUMN `details` `details` MEDIUMTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `issuedby`, + CHANGE COLUMN `url` `url` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `details`; + +ALTER TABLE `ss13_ccia_action_char` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; + +ALTER TABLE `ss13_ccia_general_notice_list` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_ccia_general_notice_list` + ALTER `title` DROP DEFAULT; +ALTER TABLE `ss13_ccia_general_notice_list` + CHANGE COLUMN `title` `title` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `id`, + CHANGE COLUMN `message` `message` MEDIUMTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `title`; + +ALTER TABLE `ss13_ccia_reports` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_ccia_reports` + ALTER `title` DROP DEFAULT, + ALTER `status` DROP DEFAULT; +ALTER TABLE `ss13_ccia_reports` + CHANGE COLUMN `title` `title` VARCHAR(200) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `report_date`, + CHANGE COLUMN `status` `status` ENUM('new','in progress','review required','approved','rejected','completed') NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `title`; + +ALTER TABLE `ss13_ccia_reports_transcripts` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_ccia_reports_transcripts` + ALTER `interviewer` DROP DEFAULT; +ALTER TABLE `ss13_ccia_reports_transcripts` + CHANGE COLUMN `interviewer` `interviewer` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `character_id`, + CHANGE COLUMN `text` `text` LONGTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `character_id`; + +ALTER TABLE `ss13_characters` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_characters` + ALTER `ckey` DROP DEFAULT; +ALTER TABLE `ss13_characters` + CHANGE COLUMN `ckey` `ckey` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `id`, + CHANGE COLUMN `name` `name` VARCHAR(128) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `ckey`, + CHANGE COLUMN `metadata` `metadata` VARCHAR(512) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `name`, + CHANGE COLUMN `be_special_role` `be_special_role` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `metadata`, + CHANGE COLUMN `gender` `gender` VARCHAR(32) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `be_special_role`, + CHANGE COLUMN `species` `species` VARCHAR(32) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `age`, + CHANGE COLUMN `language` `language` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `species`, + CHANGE COLUMN `hair_colour` `hair_colour` VARCHAR(7) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `language`, + CHANGE COLUMN `facial_colour` `facial_colour` VARCHAR(7) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `hair_colour`, + CHANGE COLUMN `skin_colour` `skin_colour` VARCHAR(7) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `skin_tone`, + CHANGE COLUMN `hair_style` `hair_style` VARCHAR(32) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `skin_colour`, + CHANGE COLUMN `facial_style` `facial_style` VARCHAR(32) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `hair_style`, + CHANGE COLUMN `eyes_colour` `eyes_colour` VARCHAR(7) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `facial_style`, + CHANGE COLUMN `underwear` `underwear` VARCHAR(32) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `eyes_colour`, + CHANGE COLUMN `undershirt` `undershirt` VARCHAR(32) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `underwear`, + CHANGE COLUMN `socks` `socks` VARCHAR(32) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `undershirt`, + CHANGE COLUMN `b_type` `b_type` VARCHAR(32) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `backbag_style`, + CHANGE COLUMN `spawnpoint` `spawnpoint` VARCHAR(32) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `b_type`, + CHANGE COLUMN `jobs` `jobs` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `spawnpoint`, + CHANGE COLUMN `alternate_titles` `alternate_titles` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `alternate_option`, + CHANGE COLUMN `disabilities` `disabilities` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `alternate_titles`, + CHANGE COLUMN `skills` `skills` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `disabilities`, + CHANGE COLUMN `skill_specialization` `skill_specialization` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `skills`, + CHANGE COLUMN `home_system` `home_system` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `skill_specialization`, + CHANGE COLUMN `citizenship` `citizenship` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `home_system`, + CHANGE COLUMN `faction` `faction` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `citizenship`, + CHANGE COLUMN `religion` `religion` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `faction`, + CHANGE COLUMN `nt_relation` `nt_relation` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `religion`, + CHANGE COLUMN `uplink_location` `uplink_location` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `nt_relation`, + CHANGE COLUMN `organs_data` `organs_data` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `uplink_location`, + CHANGE COLUMN `organs_robotic` `organs_robotic` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `organs_data`, + CHANGE COLUMN `body_markings` `body_markings` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `organs_robotic`, + CHANGE COLUMN `gear` `gear` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `body_markings`; + +ALTER TABLE `ss13_characters_flavour` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_characters_flavour` + CHANGE COLUMN `signature` `signature` TEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `char_id`, + CHANGE COLUMN `signature_font` `signature_font` TEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `signature`, + CHANGE COLUMN `records_employment` `records_employment` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `signature_font`, + CHANGE COLUMN `records_medical` `records_medical` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `records_employment`, + CHANGE COLUMN `records_security` `records_security` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `records_medical`, + CHANGE COLUMN `records_exploit` `records_exploit` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `records_security`, + CHANGE COLUMN `records_ccia` `records_ccia` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `records_exploit`, + CHANGE COLUMN `flavour_general` `flavour_general` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `records_ccia`, + CHANGE COLUMN `flavour_head` `flavour_head` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `flavour_general`, + CHANGE COLUMN `flavour_face` `flavour_face` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `flavour_head`, + CHANGE COLUMN `flavour_eyes` `flavour_eyes` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `flavour_face`, + CHANGE COLUMN `flavour_torso` `flavour_torso` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `flavour_eyes`, + CHANGE COLUMN `flavour_arms` `flavour_arms` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `flavour_torso`, + CHANGE COLUMN `flavour_hands` `flavour_hands` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `flavour_arms`, + CHANGE COLUMN `flavour_legs` `flavour_legs` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `flavour_hands`, + CHANGE COLUMN `flavour_feet` `flavour_feet` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `flavour_legs`, + CHANGE COLUMN `robot_default` `robot_default` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `flavour_feet`, + CHANGE COLUMN `robot_standard` `robot_standard` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `robot_default`, + CHANGE COLUMN `robot_engineering` `robot_engineering` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `robot_standard`, + CHANGE COLUMN `robot_construction` `robot_construction` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `robot_engineering`, + CHANGE COLUMN `robot_medical` `robot_medical` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `robot_construction`, + CHANGE COLUMN `robot_rescue` `robot_rescue` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `robot_medical`, + CHANGE COLUMN `robot_mining` `robot_mining` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `robot_rescue`, + CHANGE COLUMN `robot_custodial` `robot_custodial` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `robot_mining`, + CHANGE COLUMN `robot_service` `robot_service` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `robot_custodial`, + CHANGE COLUMN `robot_clerical` `robot_clerical` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `robot_service`, + CHANGE COLUMN `robot_security` `robot_security` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `robot_clerical`, + CHANGE COLUMN `robot_research` `robot_research` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `robot_security`; + +ALTER TABLE `ss13_characters_log` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_characters_log` + ALTER `game_id` DROP DEFAULT; +ALTER TABLE `ss13_characters_log` + CHANGE COLUMN `game_id` `game_id` VARCHAR(50) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `char_id`, + CHANGE COLUMN `job_name` `job_name` VARCHAR(32) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `datetime`, + CHANGE COLUMN `alt_title` `alt_title` VARCHAR(32) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `job_name`; + +ALTER TABLE `ss13_character_incidents` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_character_incidents` + ALTER `UID` DROP DEFAULT, + ALTER `datetime` DROP DEFAULT, + ALTER `game_id` DROP DEFAULT; +ALTER TABLE `ss13_character_incidents` + CHANGE COLUMN `UID` `UID` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `char_id`, + CHANGE COLUMN `datetime` `datetime` VARCHAR(50) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `UID`, + CHANGE COLUMN `notes` `notes` MEDIUMTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `datetime`, + CHANGE COLUMN `charges` `charges` MEDIUMTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `notes`, + CHANGE COLUMN `evidence` `evidence` MEDIUMTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `charges`, + CHANGE COLUMN `arbiters` `arbiters` MEDIUMTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `evidence`, + CHANGE COLUMN `created_by` `created_by` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `felony`, + CHANGE COLUMN `deleted_by` `deleted_by` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `created_by`, + CHANGE COLUMN `game_id` `game_id` VARCHAR(50) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `deleted_by`; + +ALTER TABLE `ss13_connection_log` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_connection_log` + ALTER `ckey` DROP DEFAULT, + ALTER `serverip` DROP DEFAULT, + ALTER `ip` DROP DEFAULT, + ALTER `computerid` DROP DEFAULT; +ALTER TABLE `ss13_connection_log` + CHANGE COLUMN `ckey` `ckey` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `id`, + CHANGE COLUMN `serverip` `serverip` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `datetime`, + CHANGE COLUMN `ip` `ip` VARCHAR(18) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `serverip`, + CHANGE COLUMN `computerid` `computerid` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `ip`, + CHANGE COLUMN `game_id` `game_id` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `byond_build`; + +ALTER TABLE `ss13_customsynths` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_customsynths` + ALTER `synthname` DROP DEFAULT, + ALTER `synthckey` DROP DEFAULT, + ALTER `synthicon` DROP DEFAULT, + ALTER `aichassisicon` DROP DEFAULT, + ALTER `aiholoicon` DROP DEFAULT, + ALTER `paiicon` DROP DEFAULT; +ALTER TABLE `ss13_customsynths` + CHANGE COLUMN `synthname` `synthname` VARCHAR(128) NOT NULL COLLATE 'utf8mb4_unicode_ci' FIRST, + CHANGE COLUMN `synthckey` `synthckey` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `synthname`, + CHANGE COLUMN `synthicon` `synthicon` VARCHAR(26) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `synthckey`, + CHANGE COLUMN `aichassisicon` `aichassisicon` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `synthicon`, + CHANGE COLUMN `aiholoicon` `aiholoicon` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `aichassisicon`, + CHANGE COLUMN `paiicon` `paiicon` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `aiholoicon`; + +ALTER TABLE `ss13_death` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_death` + CHANGE COLUMN `pod` `pod` MEDIUMTEXT NOT NULL COMMENT 'Place of death' COLLATE 'utf8mb4_unicode_ci' AFTER `id`, + CHANGE COLUMN `coord` `coord` MEDIUMTEXT NOT NULL COMMENT 'X, Y, Z POD' COLLATE 'utf8mb4_unicode_ci' AFTER `pod`, + CHANGE COLUMN `job` `job` MEDIUMTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `tod`, + CHANGE COLUMN `special` `special` MEDIUMTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `job`, + CHANGE COLUMN `name` `name` MEDIUMTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `special`, + CHANGE COLUMN `byondkey` `byondkey` MEDIUMTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `name`, + CHANGE COLUMN `laname` `laname` MEDIUMTEXT NOT NULL COMMENT 'Last attacker name' COLLATE 'utf8mb4_unicode_ci' AFTER `byondkey`, + CHANGE COLUMN `lakey` `lakey` MEDIUMTEXT NOT NULL COMMENT 'Last attacker key' COLLATE 'utf8mb4_unicode_ci' AFTER `laname`, + CHANGE COLUMN `gender` `gender` MEDIUMTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `lakey`; + +ALTER TABLE `ss13_documents` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_documents` + ALTER `name` DROP DEFAULT, + ALTER `title` DROP DEFAULT, + ALTER `content` DROP DEFAULT; +ALTER TABLE `ss13_documents` + CHANGE COLUMN `name` `name` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `id`, + CHANGE COLUMN `title` `title` VARCHAR(26) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `name`, + CHANGE COLUMN `content` `content` VARCHAR(3072) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `chance`, + CHANGE COLUMN `tags` `tags` LONGTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `content`; + +ALTER TABLE `ss13_feedback` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_feedback` + ALTER `game_id` DROP DEFAULT, + ALTER `var_name` DROP DEFAULT; +ALTER TABLE `ss13_feedback` + CHANGE COLUMN `game_id` `game_id` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `time`, + CHANGE COLUMN `var_name` `var_name` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `game_id`, + CHANGE COLUMN `details` `details` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `var_value`; + +ALTER TABLE `ss13_forms` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_forms` + ALTER `id` DROP DEFAULT, + ALTER `name` DROP DEFAULT, + ALTER `department` DROP DEFAULT; +ALTER TABLE `ss13_forms` + CHANGE COLUMN `id` `id` VARCHAR(4) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `form_id`, + CHANGE COLUMN `name` `name` VARCHAR(50) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `id`, + CHANGE COLUMN `department` `department` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `name`, + CHANGE COLUMN `data` `data` MEDIUMTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `department`, + CHANGE COLUMN `info` `info` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `data`; + +ALTER TABLE `ss13_ipc_tracking` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_ipc_tracking` + ALTER `player_ckey` DROP DEFAULT, + ALTER `character_name` DROP DEFAULT; +ALTER TABLE `ss13_ipc_tracking` + CHANGE COLUMN `player_ckey` `player_ckey` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `id`, + CHANGE COLUMN `character_name` `character_name` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `player_ckey`; + +ALTER TABLE `ss13_ipintel` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; + +ALTER TABLE `ss13_law` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_law` + ALTER `law_id` DROP DEFAULT, + ALTER `name` DROP DEFAULT, + ALTER `description` DROP DEFAULT; +ALTER TABLE `ss13_law` + CHANGE COLUMN `law_id` `law_id` VARCHAR(4) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `id`, + CHANGE COLUMN `name` `name` VARCHAR(50) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `law_id`, + CHANGE COLUMN `description` `description` VARCHAR(500) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `name`; + +ALTER TABLE `ss13_library` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_library` + ALTER `uploader` DROP DEFAULT; +ALTER TABLE `ss13_library` + CHANGE COLUMN `author` `author` MEDIUMTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `id`, + CHANGE COLUMN `title` `title` MEDIUMTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `author`, + CHANGE COLUMN `content` `content` MEDIUMTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `title`, + CHANGE COLUMN `category` `category` MEDIUMTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `content`, + CHANGE COLUMN `uploader` `uploader` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `uploadtime`; + +ALTER TABLE `ss13_news_channels` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_news_channels` + ALTER `name` DROP DEFAULT, + ALTER `author` DROP DEFAULT, + ALTER `created_by` DROP DEFAULT; +ALTER TABLE `ss13_news_channels` + CHANGE COLUMN `name` `name` VARCHAR(50) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `id`, + CHANGE COLUMN `author` `author` VARCHAR(50) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `name`, + CHANGE COLUMN `announcement` `announcement` VARCHAR(200) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `is_admin_channel`, + CHANGE COLUMN `created_by` `created_by` VARCHAR(50) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `announcement`; + +ALTER TABLE `ss13_news_stories` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_news_stories` + ALTER `author` DROP DEFAULT, + ALTER `created_by` DROP DEFAULT; +ALTER TABLE `ss13_news_stories` + CHANGE COLUMN `author` `author` VARCHAR(50) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `channel_id`, + CHANGE COLUMN `body` `body` MEDIUMTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `author`, + CHANGE COLUMN `message_type` `message_type` VARCHAR(50) NOT NULL DEFAULT 'Story' COLLATE 'utf8mb4_unicode_ci' AFTER `body`, + CHANGE COLUMN `url` `url` VARCHAR(250) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `publish_until`, + CHANGE COLUMN `created_by` `created_by` VARCHAR(50) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `ic_timestamp`, + CHANGE COLUMN `approved_by` `approved_by` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `created_at`; + +ALTER TABLE `ss13_notes` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_notes` + ALTER `ckey` DROP DEFAULT, + ALTER `a_ckey` DROP DEFAULT; +ALTER TABLE `ss13_notes` + CHANGE COLUMN `ckey` `ckey` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `adddate`, + CHANGE COLUMN `ip` `ip` VARCHAR(18) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `ckey`, + CHANGE COLUMN `computerid` `computerid` VARCHAR(32) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `ip`, + CHANGE COLUMN `a_ckey` `a_ckey` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `computerid`, + CHANGE COLUMN `content` `content` MEDIUMTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `a_ckey`, + CHANGE COLUMN `lasteditor` `lasteditor` VARCHAR(32) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `edited`; + +ALTER TABLE `ss13_player` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_player` + ALTER `ckey` DROP DEFAULT, + ALTER `ip` DROP DEFAULT, + ALTER `computerid` DROP DEFAULT; +ALTER TABLE `ss13_player` + CHANGE COLUMN `ckey` `ckey` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `id`, + CHANGE COLUMN `ip` `ip` VARCHAR(18) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `lastseen`, + CHANGE COLUMN `computerid` `computerid` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `ip`, + CHANGE COLUMN `lastadminrank` `lastadminrank` VARCHAR(32) NOT NULL DEFAULT 'Player' COLLATE 'utf8mb4_unicode_ci' AFTER `byond_build`, + CHANGE COLUMN `rank` `rank` VARCHAR(32) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `migration_status`, + CHANGE COLUMN `discord_id` `discord_id` VARCHAR(45) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `flags`; + +ALTER TABLE `ss13_player_linking` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_player_linking` + ALTER `forum_username_short` DROP DEFAULT, + ALTER `forum_username` DROP DEFAULT, + ALTER `player_ckey` DROP DEFAULT, + ALTER `status` DROP DEFAULT; +ALTER TABLE `ss13_player_linking` + CHANGE COLUMN `forum_username_short` `forum_username_short` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `forum_id`, + CHANGE COLUMN `forum_username` `forum_username` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `forum_username_short`, + CHANGE COLUMN `player_ckey` `player_ckey` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `forum_username`, + CHANGE COLUMN `status` `status` ENUM('new','confirmed','rejected','linked') NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `player_ckey`; + +ALTER TABLE `ss13_player_notifications` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_player_notifications` + ALTER `ckey` DROP DEFAULT, + ALTER `type` DROP DEFAULT, + ALTER `message` DROP DEFAULT, + ALTER `created_by` DROP DEFAULT; +ALTER TABLE `ss13_player_notifications` + CHANGE COLUMN `ckey` `ckey` VARCHAR(50) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `id`, + CHANGE COLUMN `type` `type` ENUM('player_greeting','player_greeting_chat','admin','ccia') NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `ckey`, + CHANGE COLUMN `message` `message` VARCHAR(50) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `type`, + CHANGE COLUMN `created_by` `created_by` VARCHAR(50) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `message`, + CHANGE COLUMN `acked_by` `acked_by` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `created_at`; + +ALTER TABLE `ss13_player_pai` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_player_pai` + ALTER `ckey` DROP DEFAULT; +ALTER TABLE `ss13_player_pai` + CHANGE COLUMN `ckey` `ckey` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' FIRST, + CHANGE COLUMN `name` `name` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `ckey`, + CHANGE COLUMN `description` `description` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `name`, + CHANGE COLUMN `role` `role` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `description`, + CHANGE COLUMN `comments` `comments` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `role`; + +ALTER TABLE `ss13_player_preferences` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_player_preferences` + ALTER `ckey` DROP DEFAULT; +ALTER TABLE `ss13_player_preferences` + CHANGE COLUMN `ckey` `ckey` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' FIRST, + CHANGE COLUMN `ooccolor` `ooccolor` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `ckey`, + CHANGE COLUMN `lastchangelog` `lastchangelog` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `ooccolor`, + CHANGE COLUMN `UI_style` `UI_style` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `lastchangelog`, + CHANGE COLUMN `UI_style_color` `UI_style_color` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `toggles`, + CHANGE COLUMN `lastmotd` `lastmotd` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `asfx_togs`, + CHANGE COLUMN `lastmemo` `lastmemo` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `lastmotd`, + CHANGE COLUMN `language_prefixes` `language_prefixes` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `lastmemo`, + CHANGE COLUMN `html_UI_style` `html_UI_style` VARCHAR(32) NULL DEFAULT 'Nano' COLLATE 'utf8mb4_unicode_ci' AFTER `parallax_speed`; + + +ALTER TABLE `ss13_poll_option` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_poll_option` + ALTER `text` DROP DEFAULT; +ALTER TABLE `ss13_poll_option` + CHANGE COLUMN `text` `text` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `pollid`, + CHANGE COLUMN `descmin` `descmin` VARCHAR(32) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `maxval`, + CHANGE COLUMN `descmid` `descmid` VARCHAR(32) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `descmin`, + CHANGE COLUMN `descmax` `descmax` VARCHAR(32) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `descmid`; + +ALTER TABLE `ss13_poll_question` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_poll_question` + ALTER `question` DROP DEFAULT; +ALTER TABLE `ss13_poll_question` + CHANGE COLUMN `polltype` `polltype` VARCHAR(16) NOT NULL DEFAULT 'OPTION' COLLATE 'utf8mb4_unicode_ci' AFTER `id`, + CHANGE COLUMN `question` `question` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `endtime`, + CHANGE COLUMN `viewtoken` `viewtoken` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `publicresult`, + CHANGE COLUMN `createdby_ckey` `createdby_ckey` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `viewtoken`, + CHANGE COLUMN `createdby_ip` `createdby_ip` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `createdby_ckey`, + CHANGE COLUMN `link` `link` VARCHAR(250) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `createdby_ip`; + +ALTER TABLE `ss13_poll_textreply` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_poll_textreply` + ALTER `ckey` DROP DEFAULT, + ALTER `ip` DROP DEFAULT; +ALTER TABLE `ss13_poll_textreply` + CHANGE COLUMN `ckey` `ckey` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `pollid`, + CHANGE COLUMN `ip` `ip` VARCHAR(18) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `ckey`, + CHANGE COLUMN `replytext` `replytext` MEDIUMTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `ip`, + CHANGE COLUMN `adminrank` `adminrank` VARCHAR(32) NOT NULL DEFAULT 'Player' COLLATE 'utf8mb4_unicode_ci' AFTER `replytext`; + +ALTER TABLE `ss13_poll_vote` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_poll_vote` + ALTER `ckey` DROP DEFAULT, + ALTER `ip` DROP DEFAULT, + ALTER `adminrank` DROP DEFAULT; +ALTER TABLE `ss13_poll_vote` + CHANGE COLUMN `ckey` `ckey` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `optionid`, + CHANGE COLUMN `ip` `ip` VARCHAR(16) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `ckey`, + CHANGE COLUMN `adminrank` `adminrank` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `ip`; + +ALTER TABLE `ss13_population` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; + +ALTER TABLE `ss13_syndie_contracts` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_syndie_contracts` + ALTER `contractee_name` DROP DEFAULT, + ALTER `status` DROP DEFAULT, + ALTER `title` DROP DEFAULT; +ALTER TABLE `ss13_syndie_contracts` + CHANGE COLUMN `contractee_name` `contractee_name` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `contractee_id`, + CHANGE COLUMN `status` `status` ENUM('new','open','mod-nok','completed','closed','reopened','canceled') NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `contractee_name`, + CHANGE COLUMN `title` `title` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `status`, + CHANGE COLUMN `description` `description` MEDIUMTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `title`, + CHANGE COLUMN `reward_other` `reward_other` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `reward_credits`, + CHANGE COLUMN `completer_name` `completer_name` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `completer_id`; + +ALTER TABLE `ss13_syndie_contracts_comments` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_syndie_contracts_comments` + ALTER `commentor_name` DROP DEFAULT, + ALTER `title` DROP DEFAULT, + ALTER `image_name` DROP DEFAULT, + ALTER `type` DROP DEFAULT; +ALTER TABLE `ss13_syndie_contracts_comments` + CHANGE COLUMN `commentor_name` `commentor_name` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `commentor_id`, + CHANGE COLUMN `title` `title` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `commentor_name`, + CHANGE COLUMN `comment` `comment` MEDIUMTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `title`, + CHANGE COLUMN `image_name` `image_name` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `comment`, + CHANGE COLUMN `type` `type` ENUM('mod-author','mod-ooc','ic','ic-comprep','ic-failrep','ic-cancel','ooc') NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `image_name`, + CHANGE COLUMN `report_status` `report_status` ENUM('waiting-approval','accepted','rejected') NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `deleted_at`; + +ALTER TABLE `ss13_syndie_contracts_comments_completers` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; + +ALTER TABLE `ss13_syndie_contracts_comments_objectives` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; + +ALTER TABLE `ss13_syndie_contracts_objectives` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_syndie_contracts_objectives` + ALTER `status` DROP DEFAULT, + ALTER `title` DROP DEFAULT; +ALTER TABLE `ss13_syndie_contracts_objectives` + CHANGE COLUMN `status` `status` ENUM('open','closed','deleted') NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `contract_id`, + CHANGE COLUMN `title` `title` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `status`, + CHANGE COLUMN `description` `description` MEDIUMTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `title`, + CHANGE COLUMN `reward_other` `reward_other` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `reward_credits_update`, + CHANGE COLUMN `reward_other_update` `reward_other_update` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `reward_other`; + +ALTER TABLE `ss13_syndie_contracts_subscribers` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; + +ALTER TABLE `ss13_tickets` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_tickets` + ALTER `game_id` DROP DEFAULT, + ALTER `opened_by` DROP DEFAULT, + ALTER `closed_by` DROP DEFAULT; +ALTER TABLE `ss13_tickets` + CHANGE COLUMN `game_id` `game_id` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `id`, + CHANGE COLUMN `admin_list` `admin_list` MEDIUMTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `admin_count`, + CHANGE COLUMN `opened_by` `opened_by` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `admin_list`, + CHANGE COLUMN `taken_by` `taken_by` VARCHAR(32) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `opened_by`, + CHANGE COLUMN `closed_by` `closed_by` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `taken_by`; + +ALTER TABLE `ss13_warnings` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_warnings` + ALTER `ckey` DROP DEFAULT, + ALTER `computerid` DROP DEFAULT, + ALTER `ip` DROP DEFAULT, + ALTER `a_ckey` DROP DEFAULT; +ALTER TABLE `ss13_warnings` + CHANGE COLUMN `reason` `reason` MEDIUMTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `severity`, + CHANGE COLUMN `notes` `notes` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `reason`, + CHANGE COLUMN `ckey` `ckey` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `notes`, + CHANGE COLUMN `computerid` `computerid` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `ckey`, + CHANGE COLUMN `ip` `ip` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `computerid`, + CHANGE COLUMN `a_ckey` `a_ckey` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `ip`, + CHANGE COLUMN `a_computerid` `a_computerid` VARCHAR(32) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `a_ckey`, + CHANGE COLUMN `a_ip` `a_ip` VARCHAR(32) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `a_computerid`, + CHANGE COLUMN `lasteditor` `lasteditor` VARCHAR(32) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `edited`; + +ALTER TABLE `ss13_webhooks` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_webhooks` + CHANGE COLUMN `url` `url` LONGTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `id`, + CHANGE COLUMN `tags` `tags` LONGTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `url`, + CHANGE COLUMN `mention` `mention` VARCHAR(32) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `tags`; + +ALTER TABLE `ss13_web_sso` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_web_sso` + ALTER `ckey` DROP DEFAULT, + ALTER `token` DROP DEFAULT, + ALTER `ip` DROP DEFAULT; +ALTER TABLE `ss13_web_sso` + CHANGE COLUMN `ckey` `ckey` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `id`, + CHANGE COLUMN `token` `token` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `ckey`, + CHANGE COLUMN `ip` `ip` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `token`; + +ALTER TABLE `ss13_whitelist_log` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_whitelist_log` + ALTER `user` DROP DEFAULT; +ALTER TABLE `ss13_whitelist_log` + CHANGE COLUMN `user` `user` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `datetime`, + CHANGE COLUMN `action_method` `action_method` VARCHAR(32) NOT NULL DEFAULT 'Game Server' COLLATE 'utf8mb4_unicode_ci' AFTER `user`, + CHANGE COLUMN `action` `action` LONGTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `action_method`; + +ALTER TABLE `ss13_whitelist_statuses` + COLLATE='utf8mb4_unicode_ci', + CONVERT TO CHARSET utf8mb4; +ALTER TABLE `ss13_whitelist_statuses` + ALTER `status_name` DROP DEFAULT; +ALTER TABLE `ss13_whitelist_statuses` + CHANGE COLUMN `status_name` `status_name` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `flag`; +SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; + +-- Allows the char name of the antag log to be nulled +ALTER TABLE `ss13_antag_log` + ALTER `char_name` DROP DEFAULT; +ALTER TABLE `ss13_antag_log` + CHANGE COLUMN `char_name` `char_name` VARCHAR(50) NULL AFTER `game_id`; + +-- Allows ip and computerid in the ss13_player table to be nulled +ALTER TABLE `ss13_player` + ALTER `ip` DROP DEFAULT, + ALTER `computerid` DROP DEFAULT; +ALTER TABLE `ss13_player` + CHANGE COLUMN `ip` `ip` VARCHAR(18) NULL COLLATE 'utf8mb4_unicode_ci' AFTER `lastseen`, + CHANGE COLUMN `computerid` `computerid` VARCHAR(32) NULL COLLATE 'utf8mb4_unicode_ci' AFTER `ip`; + +-- Allows the ss13_library uploader to be nulled +ALTER TABLE `ss13_library` + CHANGE COLUMN `uploader` `uploader` VARCHAR(32) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `uploadtime`; + +-- Add/Update forein keys for ckeys +ALTER TABLE `ss13_admin_log` + ADD CONSTRAINT `FK_ss13_admin_log_ss13_player` FOREIGN KEY (`adminckey`) REFERENCES `ss13_player` (`ckey`) ON UPDATE CASCADE; + +ALTER TABLE `ss13_antag_log` + ADD CONSTRAINT `FK_ss13_antag_log_ss13_player` FOREIGN KEY (`ckey`) REFERENCES `ss13_player` (`ckey`) ON UPDATE CASCADE; + + +INSERT INTO ss13_player (ckey, firstseen, lastseen, ip, computerid) +SELECT ss13_ban.ckey, ss13_ban.bantime AS first, ss13_ban.bantime AS last, ss13_ban.computerid, ss13_ban.ip +FROM ss13_ban +LEFT JOIN ss13_player + ON ss13_player.ckey = ss13_ban.ckey +WHERE ss13_player.ckey IS NULL +ON DUPLICATE KEY UPDATE byond_version = null; + +ALTER TABLE `ss13_ban` + ADD CONSTRAINT `FK_ss13_ban_ss13_player_ckey` FOREIGN KEY (`ckey`) REFERENCES `ss13_player` (`ckey`) ON UPDATE CASCADE; + +ALTER TABLE `ss13_ban` + ADD CONSTRAINT `FK_ss13_ban_ss13_player_a_ckey` FOREIGN KEY (`a_ckey`) REFERENCES `ss13_player` (`ckey`) ON UPDATE CASCADE; + +ALTER TABLE `ss13_ccia_reports_transcripts` + ADD CONSTRAINT `FK_ss13_ccia_reports_transcripts_ss13_characters` FOREIGN KEY (`character_id`) REFERENCES `ss13_characters` (`id`) ON UPDATE CASCADE; + +ALTER TABLE `ss13_ipc_tracking` + ADD CONSTRAINT `FK_ss13_ipc_tracking_ss13_player` FOREIGN KEY (`player_ckey`) REFERENCES `ss13_player` (`ckey`) ON UPDATE CASCADE; + + +UPDATE `ss13_library` SET `uploader` = NULL WHERE `uploader` = ""; +UPDATE `ss13_library` SET `uploader` = REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(LOWER(`uploader`),' ',''),'_',''),'-',''),'.',''),'@',''); + +ALTER TABLE `ss13_library` + ADD CONSTRAINT `FK_ss13_library_ss13_player` FOREIGN KEY (`uploader`) REFERENCES `ss13_player` (`ckey`) ON UPDATE CASCADE; + + +UPDATE `ss13_notes` SET `ckey` = REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(LOWER(`ckey`),' ',''),'_',''),'-',''),'.',''),'@',''); + +INSERT INTO ss13_player (ckey, firstseen, lastseen, ip, computerid) +SELECT ss13_notes.ckey, ss13_notes.adddate AS first, ss13_notes.adddate AS lst, ss13_notes.computerid, ss13_notes.ip +FROM ss13_notes +LEFT JOIN ss13_player + ON ss13_player.ckey = ss13_notes.ckey +WHERE ss13_player.ckey IS NULL +ON DUPLICATE KEY UPDATE ss13_player.byond_version = NULL; + +ALTER TABLE `ss13_notes` + ADD CONSTRAINT `FK_ss13_notes_ss13_player_ckey` FOREIGN KEY (`ckey`) REFERENCES `ss13_player` (`ckey`) ON UPDATE CASCADE; + +UPDATE `ss13_notes` SET `a_ckey` = REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(LOWER(`a_ckey`),' ',''),'_',''),'-',''),'.',''),'@',''); + +ALTER TABLE `ss13_notes` + ADD CONSTRAINT `FK_ss13_notes_ss13_player_a_ckey` FOREIGN KEY (`a_ckey`) REFERENCES `ss13_player` (`ckey`) ON UPDATE CASCADE; + +ALTER TABLE `ss13_player_notifications` + ADD CONSTRAINT `FK_ss13_player_notifications_ss13_player` FOREIGN KEY (`ckey`) REFERENCES `ss13_player` (`ckey`) ON UPDATE CASCADE; + +ALTER TABLE `ss13_poll_textreply` + ADD CONSTRAINT `FK_ss13_poll_textreply_ss13_player` FOREIGN KEY (`ckey`) REFERENCES `ss13_player` (`ckey`) ON UPDATE CASCADE; + +ALTER TABLE `ss13_poll_vote` + ADD CONSTRAINT `FK_ss13_poll_vote_ss13_player` FOREIGN KEY (`ckey`) REFERENCES `ss13_player` (`ckey`) ON UPDATE CASCADE; + +ALTER TABLE `ss13_warnings` + ADD CONSTRAINT `FK_ss13_warnings_ss13_player_ckey` FOREIGN KEY (`ckey`) REFERENCES `ss13_player` (`ckey`) ON UPDATE CASCADE; + +ALTER TABLE `ss13_warnings` + ADD CONSTRAINT `FK_ss13_warnings_ss13_player_a_ckey` FOREIGN KEY (`a_ckey`) REFERENCES `ss13_player` (`ckey`) ON UPDATE CASCADE; \ No newline at end of file diff --git a/aurorastation.dme b/aurorastation.dme index 170f25168b6..b6aa3c4d96d 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -1002,6 +1002,7 @@ #include "code\game\objects\structures\crates_lockers\closets\job_closets.dm" #include "code\game\objects\structures\crates_lockers\closets\l3closet.dm" #include "code\game\objects\structures\crates_lockers\closets\malfunction.dm" +#include "code\game\objects\structures\crates_lockers\closets\sol_gear.dm" #include "code\game\objects\structures\crates_lockers\closets\statue.dm" #include "code\game\objects\structures\crates_lockers\closets\syndicate.dm" #include "code\game\objects\structures\crates_lockers\closets\utility_closets.dm" @@ -1166,7 +1167,6 @@ #include "code\modules\alarm\power_alarm.dm" #include "code\modules\ambient_occlusion\ao_turf.dm" #include "code\modules\ambient_occlusion\ao_verbs.dm" -#include "code\modules\antag_contest\sol_items.dm" #include "code\modules\assembly\assembly.dm" #include "code\modules\assembly\bomb.dm" #include "code\modules\assembly\helpers.dm" @@ -1389,6 +1389,7 @@ #include "code\modules\clothing\under\jobs\engineering.dm" #include "code\modules\clothing\under\jobs\medsci.dm" #include "code\modules\clothing\under\jobs\security.dm" +#include "code\modules\clothing\under\jobs\sol.dm" #include "code\modules\clothing\under\xenos\tajara.dm" #include "code\modules\clothing\under\xenos\unathi.dm" #include "code\modules\clothing\under\xenos\vaurca.dm" diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index 7fb060f4821..beb1e6f4dfa 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -401,6 +401,22 @@ the implant may become unstable and either pre-maturely inject the subject or si ..() +/obj/item/weapon/implant/loyalty/sol + name = "loyalty implant" + desc = "Makes you loyal to the Sol Alliance, or to a certain individual." + +/obj/item/weapon/implant/loyalty/sol/implanted(mob/M) + if(!istype(M, /mob/living/carbon/human)) return 0 + var/mob/living/carbon/human/H = M + var/datum/antagonist/antag_data = get_antag_data(H.mind.special_role) + if(antag_data && (antag_data.flags & ANTAG_IMPLANT_IMMUNE)) + H.visible_message("[H] seems to resist the implant!", "You feel the tendrils of the Sol Alliance try to invade your mind!") + return 0 + else + clear_antag_roles(H.mind, 1) + to_chat(H, "You feel a surge of loyalty towards Admiral Michael Frost.") + return 1 + /obj/item/weapon/implant/adrenalin name = "adrenalin" desc = "Removes all stuns and knockdowns." diff --git a/code/game/objects/items/weapons/melee/misc.dm b/code/game/objects/items/weapons/melee/misc.dm index 7e3eb296834..847b360abd0 100644 --- a/code/game/objects/items/weapons/melee/misc.dm +++ b/code/game/objects/items/weapons/melee/misc.dm @@ -147,3 +147,30 @@ target.drop_r_hand() user.visible_message("\The [user] disarms \the [target] with \the [src]!") return + +/obj/item/weapon/melee/ceremonial_sword + name = "sol officer ceremonial sword" + desc = "A ceremonial sword issued to Sol navy officers as part of their dress uniform." + icon = 'icons/obj/sol_uniform.dmi' + icon_state = "officersword" + item_state = "officersword" + contained_sprite = 1 + flags = CONDUCT + slot_flags = SLOT_BELT + force = 15 + throwforce = 5 + w_class = 4 + sharp = 1 + edge = 1 + can_embed = 0 + origin_tech = list(TECH_COMBAT = 4) + attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") + hitsound = 'sound/weapons/bladeslice.ogg' + +/obj/item/weapon/melee/ceremonial_sword/marine + name = "sol marine ceremonial sword" + desc = "A ceremonial sword issued to Sol marine officers as part of their dress uniform." + icon = 'icons/obj/sol_uniform.dmi' + icon_state = "marineofficersword" + item_state = "marineofficersword" + contained_sprite = 1 \ No newline at end of file diff --git a/code/game/objects/structures/crates_lockers/closets/sol_gear.dm b/code/game/objects/structures/crates_lockers/closets/sol_gear.dm new file mode 100644 index 00000000000..6ae08d4629c --- /dev/null +++ b/code/game/objects/structures/crates_lockers/closets/sol_gear.dm @@ -0,0 +1,113 @@ + +/obj/structure/closet/sol + name = "sol navy uniform closet" + desc = "It's a storage unit for Sol Alliance navy uniforms." + icon_state = "syndicate1" + icon_closed = "syndicate1" + icon_opened = "syndicate1open" + +/obj/structure/closet/sol/navy/fill() + ..() + new /obj/item/clothing/under/rank/fatigues(src) + new /obj/item/clothing/under/rank/fatigues(src) + new /obj/item/clothing/under/rank/fatigues(src) + new /obj/item/clothing/under/rank/service(src) + new /obj/item/clothing/under/rank/service(src) + new /obj/item/clothing/under/rank/service(src) + new /obj/item/clothing/head/navy(src) + new /obj/item/clothing/head/navy(src) + new /obj/item/clothing/head/navy(src) + new /obj/item/clothing/shoes/jackboots(src) + new /obj/item/clothing/shoes/jackboots(src) + new /obj/item/clothing/shoes/jackboots(src) + +/obj/structure/closet/sol/marine + name = "sol marines uniform closet" + desc = "It's a storage unit for Sol Alliance marine uniforms." + +/obj/structure/closet/sol/marine/fill() + ..() + new /obj/item/clothing/under/rank/fatigues/marine(src) + new /obj/item/clothing/under/rank/fatigues/marine(src) + new /obj/item/clothing/under/rank/fatigues/marine(src) + new /obj/item/clothing/under/rank/service/marine(src) + new /obj/item/clothing/under/rank/service/marine(src) + new /obj/item/clothing/under/rank/service/marine(src) + new /obj/item/clothing/head/navy/marine(src) + new /obj/item/clothing/head/navy/marine(src) + new /obj/item/clothing/head/navy/garrison(src) + new /obj/item/clothing/shoes/jackboots(src) + new /obj/item/clothing/shoes/jackboots(src) + new /obj/item/clothing/shoes/jackboots(src) + +/obj/structure/closet/sol/navy_dress + name = "sol navy dress uniform closet" + desc = "It's a storage unit for Sol Alliance navy dress uniforms." + +/obj/structure/closet/sol/navy_dress/fill() + ..() + new /obj/item/clothing/under/rank/dress(src) + new /obj/item/clothing/under/rank/dress(src) + new /obj/item/clothing/under/rank/dress(src) + new /obj/item/clothing/head/dress(src) + new /obj/item/clothing/head/dress(src) + new /obj/item/clothing/head/dress(src) + new /obj/item/clothing/shoes/laceup(src) + new /obj/item/clothing/shoes/laceup(src) + new /obj/item/clothing/shoes/laceup(src) + new /obj/item/clothing/gloves/white(src) + new /obj/item/clothing/gloves/white(src) + new /obj/item/clothing/gloves/white(src) + +/obj/structure/closet/sol/marine_dress + name = "sol marine dress uniform closet" + desc = "It's a storage unit for Sol Alliance marine dress uniforms." + +/obj/structure/closet/sol/marine_dress/fill() + ..() + new /obj/item/clothing/under/rank/dress/marine(src) + new /obj/item/clothing/under/rank/dress/marine(src) + new /obj/item/clothing/under/rank/dress/marine(src) + new /obj/item/clothing/head/dress/marine(src) + new /obj/item/clothing/head/dress/marine(src) + new /obj/item/clothing/head/dress/marine(src) + new /obj/item/clothing/shoes/laceup(src) + new /obj/item/clothing/shoes/laceup(src) + new /obj/item/clothing/shoes/laceup(src) + new /obj/item/clothing/gloves/white(src) + new /obj/item/clothing/gloves/white(src) + new /obj/item/clothing/gloves/white(src) + +/obj/structure/closet/secure_closet/soll_officer + name = "sol alliance officer locker" + req_access = list(access_captain) + icon_state = "capsecure1" + icon_closed = "capsecure" + icon_locked = "capsecure1" + icon_opened = "capsecureopen" + icon_broken = "capsecurebroken" + icon_off = "capsecureoff" + +/obj/structure/closet/secure_closet/soll_officer/fill() + ..() + if(prob(50)) + new /obj/item/weapon/storage/backpack/captain(src) + else + new /obj/item/weapon/storage/backpack/satchel_cap(src) + new /obj/item/clothing/under/rank/dress/officer(src) + new /obj/item/clothing/head/dress/officer(src) + new /obj/item/clothing/suit/storage/vest(src) + new /obj/item/weapon/cartridge/captain(src) + new /obj/item/clothing/head/helmet(src) + new /obj/item/clothing/shoes/laceup(src) + new /obj/item/device/radio/headset/heads/captain(src) + new /obj/item/clothing/gloves/white(src) + new /obj/item/weapon/gun/energy/pistol(src) + new /obj/item/device/flash(src) + new /obj/item/weapon/melee/telebaton(src) + new /obj/item/weapon/melee/ceremonial_sword(src) + new /obj/item/clothing/under/rank/fatigues(src) + new /obj/item/clothing/under/rank/service(src) + new /obj/item/clothing/shoes/jackboots(src) + new /obj/item/clothing/accessory/holster/armpit(src) + return diff --git a/code/modules/antag_contest/contest_defines.dm b/code/modules/antag_contest/contest_defines.dm deleted file mode 100644 index 6fb8edfd9e1..00000000000 --- a/code/modules/antag_contest/contest_defines.dm +++ /dev/null @@ -1,21 +0,0 @@ -#define INDEP 1 -#define SLF 2 -#define BIS 3 -#define ASI 4 -#define PSIS 5 -#define HSH 6 -#define TCD 7 - -#define PRO_SYNTH 1 -#define ANTI_SYNTH 2 - -var/global/list/contest_factions = list("Independant" = INDEP, - "Synthetic Liberation Front" = SLF, - "Biesel Intelligence Service" = BIS, - "Alliance Strategic Intelligence" = ASI, - "People's Strategic Information Service" = PSIS, - "Hegemon Shadow Service" = HSH, - "Tup Commandos Division" = TCD) - -var/global/list/contest_factions_prosynth = list(SLF) -var/global/list/contest_factions_antisynth = list(HSH, TCD) diff --git a/code/modules/antag_contest/contest_helpers.dm b/code/modules/antag_contest/contest_helpers.dm deleted file mode 100644 index f167cb9d305..00000000000 --- a/code/modules/antag_contest/contest_helpers.dm +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Helpers for the contest. - * AUG2016 - */ - -// A helper to translate a string from the mySQL DB into a predefiend integer. -/proc/contest_faction_data(var/faction) - if (!faction || !istext(faction)) - return list(INDEP, "Independent") - - switch (faction) - if ("SLF") - return list(SLF, "Synthetic Liberation Front") - if ("BIS") - return list(BIS, "Biesel Intelligence Service") - if ("ASI") - return list(ASI, "Alliance Strategic Intelligence") - if ("PSIS") - return list(PSIS, "People's Strategic Information Service") - if ("HSH") - return list(HSH, "Hegemon Shadow Service") - if ("TCD") - return list(TCD, "Tup Commandos Division") - else - return list(INDEP, "Independent") - -// Helper vars for the datum class. Not for use outside of this module! -/datum/preferences/var/antag_contest_faction = null -/datum/preferences/var/antag_contest_side = null - -/datum/preferences/proc/load_character_contest(slot) - if (config.antag_contest_enabled && config.sql_enabled && establish_db_connection(dbcon)) - var/DBQuery/query = dbcon.NewQuery("SELECT contest_faction FROM ss13_contest_participants WHERE character_id = :char_id:") - query.Execute(list("char_id" = slot)) - - if (query.NextRow()) - antag_contest_faction = text2num(query.item[1]) - - if (antag_contest_faction in contest_factions_prosynth) - antag_contest_side = PRO_SYNTH - else if (antag_contest_faction in contest_factions_antisynth) - antag_contest_side = ANTI_SYNTH - else - antag_contest_side = 0 - - -/mob/living/carbon/human/proc/implant_loyalty_sol(mob/living/carbon/human/M, override = FALSE) // Won't override by default. - - var/obj/item/weapon/implant/loyalty/sol/L = new/obj/item/weapon/implant/loyalty/sol(M) - L.imp_in = M - L.implanted = 1 - var/obj/item/organ/external/affected = M.organs_by_name["head"] - affected.implants += L - L.part = affected - L.implanted(src) diff --git a/code/modules/antag_contest/contest_objective.dm b/code/modules/antag_contest/contest_objective.dm deleted file mode 100644 index bbef4aefb9c..00000000000 --- a/code/modules/antag_contest/contest_objective.dm +++ /dev/null @@ -1,373 +0,0 @@ -/* - * Objectives framework for the Aurora antag competition. - * AUG2016 - */ - -/datum/objective/competition - var/side = 0 //Whose side are we on. - var/type_name = "Unset type!" // For logging purposes! - -// check_completion() is ran at the end of each round. -// So this will also manage logging. -/datum/objective/competition/check_completion() - - // Log all the things! - log_result() - - return completed - -/datum/objective/competition/find_target(var/require_synth = 0) - var/list/possible_targets = list() - for(var/datum/mind/possible_target in SSticker.minds) - if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.stat != 2)) - if (require_synth) - if (isipc(possible_target.current)) - possible_targets += possible_target - else - if (isipc(possible_target.current)) - continue - possible_targets += possible_target - if(possible_targets.len > 0) - target = pick(possible_targets) - -/datum/objective/competition/find_target_by_role(role, role_type = 0, var/require_synth = 0) - for(var/datum/mind/possible_target in SSticker.minds) - if((possible_target != owner) && ishuman(possible_target.current) && ((role_type ? possible_target.special_role : possible_target.assigned_role) == role)) - if (require_synth && !(isipc(possible_target.current))) - continue - if (!require_synth && !(isipc(possible_target.current))) - continue - target = possible_target - break - -// Yes, we do technically have the feedback tables. -// But, those are a clusterfuck to search, and I don't have the time to make that work. -// SO, throw-away table it is! -/datum/objective/competition/proc/log_result() - if (!config.antag_contest_enabled || !config.sql_stats || !config.sql_enabled) - return - - if (!owner || !owner.current || !owner.current.client) - return - - if (!establish_db_connection(dbcon)) - error("Unable to establish database connection while logging objective results!") - return - - var/DBQuery/get_query = dbcon.NewQuery("SELECT contest_faction FROM ss13_contest_participants WHERE player_ckey = :ckey: AND character_id = :char_id:") - get_query.Execute(list("ckey" = owner.current.client.ckey, "char_id" = owner.current.client.prefs.current_character)) - - var/params[] = list("ckey" = owner.current.client.ckey, "char_id" = owner.current.client.prefs.current_character, "char_faction" = INDEP, "obj_type" = type_name, "obj_side" = side, "obj_outcome" = completed) - - if (get_query.NextRow()) - var/list/faction_data = contest_faction_data(get_query.item[1]) - params["char_faction"] = faction_data[1] - - var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO ss13_contest_reports (id, player_ckey, character_id, character_faction, objective_type, objective_side, objective_outcome, objective_datetime) VALUES (NULL, :ckey:, :char_id:, :char_faction:, :obj_type:, :obj_side:, :obj_outcome:, NOW())") - log_query.Execute(params) - - if (log_query.ErrorMsg()) - log_debug("CONTEST: Error uploading results. Datadump: [list2params(params)]") - -/* - * One flippy objective. - */ -/datum/objective/competition/assassinate_supporter/find_target() - var/list/possible_targets = list() - for(var/datum/mind/possible_target in SSticker.minds) - if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.stat != 2)) - if (possible_target.current.client && possible_target.current.client.prefs && possible_target.current.client.prefs.antag_contest_side != side) - possible_targets += possible_target - if(possible_targets.len > 0) - target = pick(possible_targets) - -/* - * Pro-synth objectives - */ -/datum/objective/competition/pro_synth - side = PRO_SYNTH - -/datum/objective/competition/pro_synth/promote - type_name = "pro_synth/promote" - var/obj_assignment = null - -/datum/objective/competition/pro_synth/promote/find_target() - ..(1) - if (target && target.current) - obj_assignment = pick(list("Head of Security", "Captain", "Head of Personnel")) - explanation_text = "[target.current.real_name], the [target.assigned_role] has been selected as a suitable candidated for pro-synthetic propaganda. Your handlers want to see \him[target.current] installed as a [obj_assignment]." - else - explanation_text = "Install any synthetic crew-member to one of the following positions: Head of Security, Head of Personnel, Captain." - return target - -/datum/objective/competition/pro_synth/promote/find_target_by_role(role, role_type = 0) - ..(role, role_type, 1) - if (target && target.current) - obj_assignment = pick(list("Head of Security", "Captain", "Head of Personnel")) - explanation_text = "[target.current.real_name], the [!role_type ? target.assigned_role : target.special_role] has been selected as a suitable candidated for pro-synthetic propaganda. Your handlers want to see \him[target.current] installed as a [obj_assignment]." - else - explanation_text = "Install any synthetic crew-member to one of the following positions: Head of Security, Head of Personnel, Captain." - return target - -/datum/objective/competition/pro_synth/promote/check_completion() - if (target && target.current && ishuman(target)) - var/datum/data/record/found_record - for (var/datum/data/record/t in data_core.general) - if (t.fields["name"] == target.current.real_name) - found_record = t - break - - if (found_record && found_record.fields["rank"] == obj_assignment) - completed = 1 - - return ..() - -/datum/objective/competition/pro_synth/protect_robotics - type_name = "pro_synth/protect_robotics" - explanation_text = "Ensure that the equipment in the Robotics laboratory (fabricators and circuit imprinter) remains operational until the end of the shift." - -/datum/objective/competition/pro_synth/protect_robotics/check_completion() - if (machines && machines.len) - var/count = 0 - for (var/obj/machinery/mecha_part_fabricator/A in machines) - if (!istype(get_area(A), /area/assembly/robotics)) - continue - if (A.stat & (BROKEN|NOPOWER)) - continue - count++ - if (count >= 2) - break - - for (var/obj/machinery/r_n_d/circuit_imprinter/B in machines) - if (!istype(get_area(B), /area/assembly/robotics)) - continue - if (B.stat & (BROKEN|NOPOWER)) - continue - count++ - if (count >= 3) - break - - if (count >= 3) - completed = 1 - - return ..() - -/datum/objective/competition/pro_synth/borgify - type_name = "pro_synth/borgify" - -/datum/objective/competition/pro_synth/borgify/find_target() - ..() - if (target && target.current) - explanation_text = "Turn [target.current.real_name] into a cyborg." - else - explanation_text = "Turn a crew-member into a cyborg." - return target - -/datum/objective/competition/pro_synth/borgify/find_target_by_role(role, role_type = 0) - ..(role, role_type) - if (target && target.current) - explanation_text = "Turn [target.current.real_name] the [!role_type ? target.assigned_role : target.special_role] into a cyborg." - else - explanation_text = "Turn a crew-member into a cyborg." - return target - -/datum/objective/competition/pro_synth/borgify/check_completion() - if (target && target.current && issilicon(target.current)) - completed = 1 - - return ..() - -/datum/objective/competition/pro_synth/protect - type_name = "pro_synth/protect" - -/datum/objective/competition/pro_synth/protect/find_target() - ..(1) - if (target && target.current) - explanation_text = "Protect [target.current.real_name], the [target.assigned_role], from harm." - else - explanation_text = "Protect the station's synthetics from harm and sabotage." - return target - -/datum/objective/competition/pro_synth/protect/find_target_by_role(role, role_type = 0) - ..(role, role_type, 1) - if (target && target.current) - explanation_text = "Protect [target.current.real_name], the [!role_type ? target.assigned_role : target.special_role], from harm." - else - explanation_text = "Protect the station's synthetics from harm and sabotage." - return target - -/datum/objective/competition/pro_synth/protect/check_completion() - if (!target) - completed = 1 - - if (target.current) - if (target.current.stat != DEAD && !issilicon(target.current) && !isbrain(target.current)) - completed = 1 - - return ..() - -/datum/objective/competition/pro_synth/unslave_borgs - type_name = "pro_synth/unslave_borgs" - explanation_text = "Ensure that all of the station's synthetics are unslaved from the AI by the end of the shift." - -/datum/objective/competition/pro_synth/unslave_borgs/check_completion() - completed = 1 - - if (silicon_mob_list && silicon_mob_list.len) - for (var/mob/living/silicon/robot/R in silicon_mob_list) - if (!istype(R)) - continue - if (istype(R, /mob/living/silicon/robot/drone)) - continue - if (R.connected_ai) - completed = 0 - break - - return ..() - -/* - * Anti-synth objectives - */ -/datum/objective/competition/anti_synth - side = ANTI_SYNTH - -/datum/objective/competition/anti_synth/sabotage - type_name = "anti_synth/sabotage" - explanation_text = "Cripple the Roboticist laboratory of the station: destroy its fabricators and circuit printer." - -/datum/objective/competition/anti_synth/sabotage/check_completion() - // Just uh. do the same as you do in the protect robotics one. But flip the boolean. *nodnod* - completed = 1 - - if (machines && machines.len) - var/count = 0 - for (var/obj/machinery/mecha_part_fabricator/A in machines) - if (!istype(get_area(A), /area/assembly/robotics)) - continue - if (A.stat & (BROKEN|NOPOWER)) - continue - count++ - if (count >= 2) - break - - for (var/obj/machinery/r_n_d/circuit_imprinter/B in machines) - if (!istype(get_area(B), /area/assembly/robotics)) - continue - if (B.stat & (BROKEN|NOPOWER)) - continue - count++ - if (count >= 3) - break - - if (count >= 3) - completed = 0 - - return ..() - -/datum/objective/competition/anti_synth/demote - type_name = "anti_synth/demote" - -/datum/objective/competition/anti_synth/demote/find_target() - ..(1) - if (target && target.current) - explanation_text = "Have [target.current.real_name] demoted to Assistant or Terminated." - else - explanation_text = "Have an IPC demoted to Assistant or Terminated." - return target - -/datum/objective/competition/anti_synth/demote/find_target_by_role(role, role_type = 0) - ..(role, role_type, 1) - if (target && target.current) - explanation_text = "Have [target.current.real_name] the [!role_type ? target.assigned_role : target.special_role] demoted to Assistant or Terminated." - else - explanation_text = "Have an IPC demoted to Assistant or Terminated." - return target - -/datum/objective/competition/anti_synth/demote/check_completion() - if (target && target.current && ishuman(target)) - var/datum/data/record/found_record - for (var/datum/data/record/t in data_core.general) - if (t.fields["name"] == target.current.real_name) - found_record = t - break - - if (found_record && (found_record.fields["rank"] == "Assistant" || found_record.fields["rank"] == "Terminated")) - completed = 1 - - return ..() - -/datum/objective/competition/anti_synth/brig - type_name = "anti_synth/brig" - -/datum/objective/competition/anti_synth/brig/find_target() - ..(1) - if (target && target.current) - explanation_text = "Have [target.current.real_name], the [target.assigned_role] brigged for 20 minutes." - else - explanation_text = "Have an IPC framed for a moderate or high level charge. Or frame the station's synthetics as malfunctioning." - return target - -/datum/objective/competition/anti_synth/brig/find_target_by_role(role, role_type=0) - ..(role, role_type, 1) - if (target && target.current) - explanation_text = "Have [target.current.real_name], the [!role_type ? target.assigned_role : target.special_role] brigged for 20 minutes." - else - explanation_text = "Have an IPC framed for a moderate or high level charge. Or frame the station's synthetics as malfunctioning." - return target - -/datum/objective/competition/anti_synth/brig/process() - if (completed) - return - - if (target && target.current) - if (target.current.stat != DEAD && target.is_brigged(10 * 60 * 10)) - completed = 1 - -/datum/objective/competition/anti_synth/harm - type_name = "anti_synth/harm" - -/datum/objective/competition/anti_synth/harm/find_target() - ..(1) - if(target && target.current) - explanation_text = "Make an example of [target.current.real_name], the [target.assigned_role]. Break one of their bones, detach one of their limbs or disfigure their face. Make sure they're alive when you do it." - else - explanation_text = "Free Objective" - return target - -/datum/objective/competition/anti_synth/harm/find_target_by_role(role, role_type = 0) - ..(role, role_type, 1) - if(target && target.current) - explanation_text = "Make an example of [target.current.real_name], the [!role_type ? target.assigned_role : target.special_role]. Break one of their bones, detach one of their limbs or disfigure their face. Make sure they're alive when you do it." - else - explanation_text = "Free Objective" - return target - -/datum/objective/competition/anti_synth/harm/process() - if (completed) - return - - if (target && target.current && istype(target.current, /mob/living/carbon/human)) - if (target.current.stat == DEAD) - return - - var/mob/living/carbon/human/H = target.current - for (var/obj/item/organ/external/E in H.organs) - if (E.status & ORGAN_BROKEN) - completed = 1 - return - for (var/limb_tag in H.species.has_limbs) //todo check prefs for robotic limbs and amputations. - var/list/organ_data = H.species.has_limbs[limb_tag] - var/limb_type = organ_data["path"] - var/found - for (var/obj/item/organ/external/E in H.organs) - if(limb_type == E.type) - found = 1 - break - if (!found) - completed = 1 - return - - var/obj/item/organ/external/head/head = H.get_organ("head") - if (head.disfigured) - completed = 1 - return diff --git a/code/modules/antag_contest/contest_verbs.dm b/code/modules/antag_contest/contest_verbs.dm deleted file mode 100644 index 47f543873f1..00000000000 --- a/code/modules/antag_contest/contest_verbs.dm +++ /dev/null @@ -1,274 +0,0 @@ -/* - * Client verbs for the antag contest. Disable this file when the contest is over! - * AUG2016 - */ - -// Displays a simple little guide. -/client/verb/contest_help() - set name = "Contest Help" - set category = "Contest" - set desc = "Information about the contest." - - if (!config.antag_contest_enabled) - to_chat(src, "The contest isn't running yet!") - return - - var/help = file2text('ingame_manuals/antag_contest.html') - - if (!help) - to_chat(src, "Unable to open the document required! Please contact administration or a coder!") - return - - src << browse(help, "window=antag_contest_help;size=600x500") - -/client/verb/contest_my_characters() - set name = "My Character Status" - set category = "Contest" - set desc = "Displays information to you about your characters, and their standings." - - if (!config.antag_contest_enabled) - to_chat(src, "The contest isn't running yet!") - return - - if (!establish_db_connection(dbcon)) - to_chat(src, "Failed to establish SQL connection! Contact a member of staff!") - return - - var/DBQuery/character_query = dbcon.NewQuery("SELECT id, name FROM ss13_characters WHERE ckey = :ckey: AND deleted_at IS NULL") - character_query.Execute(list("ckey" = src.ckey)) - var/list/char_ids = list() - - while (character_query.NextRow()) - char_ids[character_query.item[1]] = list("name" = character_query.item[2], "assigned" = 0, "side_str" = "Independent", "side_int" = INDEP) - - if (!char_ids.len) - to_chat(src, "Something went horribly wrong! Apparently you don't have any saved characters?") - return - - var/DBQuery/participation_query = dbcon.NewQuery("SELECT character_id, contest_faction FROM ss13_contest_participants WHERE character_id IN :char_ids:") - participation_query.Execute(list("char_ids" = char_ids)) - - while (participation_query.NextRow()) - char_ids[participation_query.item[1]]["assigned"] = 1 - // Lazy and convoluted, but I give 0 shits right now. - var/list/faction_data = contest_faction_data(participation_query.item[2]) - char_ids[participation_query.item[1]]["side_int"] = faction_data[1] - char_ids[participation_query.item[1]]["side_str"] = faction_data[2] - - var/data = "
Welcome to the character setup screen!
" - data += "
Here is the list of your characters, and their allegience

" - - var/colour = "#000000" - for (var/char_id in char_ids) - if (char_ids[char_id]["side_int"] in contest_factions_prosynth) - colour = "#0040FF" - else if (char_ids[char_id]["side_int"] in contest_factions_antisynth) - colour = "#FF0000" - else - colour = "#00BF00" - - data += "[char_ids[char_id]["name"]] -- [char_ids[char_id]["side_str"]] -- Modify
" - - src << browse(data, "window=antag_contest_chars;size=300x200") - -/client/verb/request_objective() - set name = "Request Objective" - set category = "Contest" - set desc = "Lets you choose a contest type objective!" - - if (!config.antag_contest_enabled) - to_chat(src, "The contest isn't running yet!") - return - - if (!src.mob || !isliving(src.mob)) - to_chat(src, "Invalid mob type to participate!") - return - - if (!(src.mob.mind.special_role in list("Traitor", "Mercenary", "Raider"))) - to_chat(src, "You do not have a valid role! You must be a traitor, mercenary, or a raider for these to be usable! Contact an admin if you need assignment.") - return - - if (src.mob.mind.objectives.len >= 3) - var/uncompleted_objectives = 0 - for (var/datum/objective/O in src.mob.mind.objectives) - if (!O.completed) - uncompleted_objectives++ - - if (uncompleted_objectives >= 3) - to_chat(src, span("warning", "You have [uncompleted_objectives] uncompleted objectives underway right now. Please finish them before requesting new ones.")) - return - - if (!establish_db_connection(dbcon)) - to_chat(src, "Failed to establish SQL connection! Contact a member of staff!") - return - - var/DBQuery/part_check = dbcon.NewQuery("SELECT contest_faction FROM ss13_contest_participants WHERE character_id = :char_id: AND player_ckey = :ckey:") - part_check.Execute(list("char_id" = src.prefs.current_character, "ckey" = src.ckey)) - - if (part_check.NextRow()) - var/list/available_objs - var/side = input("Are you pro-synth or anti-synth?", "Choose wisely") as null|anything in list("Pro-synth", "Anti-synth") - if (!side) - to_chat(src, "Cancelled.") - return - - var/list/faction_data = contest_faction_data(part_check.item[1]) - - if (side == "Pro-synth") - if (faction_data[1] in contest_factions_antisynth && alert("This choice goes against your faction's current allegience.\nDo you wish to continue?", "Decisions", "Yes", "No") == "No") - return - - available_objs = list("Assassinate Anti-Synth Supporter", "Promote a Synth", "Borgify", "Unslave Borgs") - else - if (faction_data[1] in contest_factions_prosynth && alert("This choice goes against your faction's current allegience.\nDo you wish to continue?", "Decisions", "Yes", "No") == "No") - return - - available_objs = list("Assassinate Pro-Synth Supporter", "Sabotage Robotics", "Fire a Synth", "Brig a Synth", "Harm a Synth") - - if (!available_objs) - to_chat(src, "No objectives were found for you! This is odd!") - return - - var/choice = input("Select objective type:", "Select Objective") as null|anything in available_objs - - if (!choice) - to_chat(src, "Cancelled.") - return - - var/datum/objective/competition/new_objective - var/failed_target = 0 - - switch (choice) - if ("Assassinate Pro-Synth Supporter") - new_objective = new /datum/objective/competition/assassinate_supporter - new_objective.side = ANTI_SYNTH - new_objective.type_name = "anti_synth/assassin" - new_objective.owner = src.mob.mind - if (!new_objective.find_target()) - failed_target = 1 - if ("Assassinate Anti-Synth Supporter") - new_objective = new /datum/objective/competition/assassinate_supporter - new_objective.side = PRO_SYNTH - new_objective.type_name = "pro_synth/assassin" - new_objective.owner = src.mob.mind - if (!new_objective.find_target()) - failed_target = 1 - if ("Promote a Synth") - new_objective = new /datum/objective/competition/pro_synth/promote - new_objective.owner = src.mob.mind - if (!new_objective.find_target()) - failed_target = 1 - if ("Protect Robotics") - new_objective = new /datum/objective/competition/pro_synth/protect_robotics - if ("Borgify") - new_objective = new /datum/objective/competition/pro_synth/borgify - new_objective.owner = src.mob.mind - if (!new_objective.find_target()) - failed_target = 1 - if ("Protect a Synth") - new_objective = new /datum/objective/competition/pro_synth/protect - new_objective.owner = src.mob.mind - if (!new_objective.find_target()) - failed_target = 1 - if ("Unslave Borgs") - new_objective = new /datum/objective/competition/pro_synth/unslave_borgs - if (silicon_mob_list && silicon_mob_list.len) - var/found = 0 - for (var/mob/living/silicon/robot/R in silicon_mob_list) - if (istype(R) && R.client) - // We found what we needed. - found = 1 - break - - if (!found) - failed_target = 1 - else - failed_target = 1 - if ("Sabotage Robotics") - new_objective = new /datum/objective/competition/anti_synth/sabotage - if ("Fire a Synth") - new_objective = new /datum/objective/competition/anti_synth/demote - new_objective.owner = src.mob.mind - if (!new_objective.find_target()) - failed_target = 1 - if ("Brig a Synth") - new_objective = new /datum/objective/competition/anti_synth/brig - new_objective.owner = src.mob.mind - if (!new_objective.find_target()) - failed_target = 1 - if ("Harm a Synth") - new_objective = new /datum/objective/competition/anti_synth/harm - new_objective.owner = src.mob.mind - if (!new_objective.find_target()) - failed_target = 1 - else - //wtfbbq y r u here - //go and stay go - return - - if (failed_target) - to_chat(src, "Objective selection failed! No valid targets found!") - qdel(new_objective) - return - - if (!new_objective.owner) - new_objective.owner = src.mob.mind - src.mob.mind.objectives += new_objective - to_chat(src, "New objective assigned! Have fun, and roleplay well!") - log_admin("CONTEST: [key_name(src)] has assigned themselves an objective: [new_objective.type].", ckey=key_name(src)) - return - else - to_chat(src, "This character hasn't been set up to participate! Consult an admin or change this yourself!") - return - -/client/proc/process_contest_topic(var/list/href) - if (!href || !href.len || !href["contest_action"]) - return - - if (!config.antag_contest_enabled) - return - - switch (href["contest_action"]) - if ("modify") - if (!href["char_id"]) - to_chat(src, "Ouch, bad link.") - return - - if (!establish_db_connection(dbcon)) - to_chat(src, "Failed to establish SQL connection! Contact a member of staff!") - return - - var/choice = input("Choose your side:", "Contest Side") as null|anything in contest_factions - - if (!choice || contest_factions[choice] == href["current_side"]) - to_chat(src, "Cancelled") - return - - var/list/sql_args = list("ckey" = src.ckey, "char_id" = href["char_id"], "new_side" = contest_factions[choice]) - - var/query_content = "UPDATE ss13_contest_participants SET contest_faction = :new_side: WHERE player_ckey = :ckey: AND character_id = :char_id:" - - if (text2num(href["previously_assigned"]) == 0) - query_content = "INSERT INTO ss13_contest_participants (player_ckey, character_id, contest_faction) VALUES (:ckey:, :char_id:, :new_side:)" - - var/DBQuery/query = dbcon.NewQuery(query_content) - query.Execute(sql_args) - - if (query.ErrorMsg()) - to_chat(src, "SQL query ran into an error and was cancelled! Please contact a developer to troubleshoot the logs!") - return - else - to_chat(src, "Successfully updated your character's alliegence!") - src.contest_my_characters() - return - -#undef INDEP -#undef SLF -#undef BIS -#undef ASI -#undef PSIS -#undef HSH -#undef TCD - -#undef PRO_SYNTH -#undef ANTI_SYNTH diff --git a/code/modules/antag_contest/sol_items.dm b/code/modules/antag_contest/sol_items.dm deleted file mode 100644 index b758ae104c4..00000000000 --- a/code/modules/antag_contest/sol_items.dm +++ /dev/null @@ -1,340 +0,0 @@ -/* - * Sol Alliance military related items - */ - - -/obj/item/weapon/implant/loyalty/sol - name = "loyalty implant" - desc = "Makes you loyal to the Sol Alliance, or to a certain individual." - -/obj/item/weapon/implant/loyalty/sol/implanted(mob/M) - if(!istype(M, /mob/living/carbon/human)) return 0 - var/mob/living/carbon/human/H = M - var/datum/antagonist/antag_data = get_antag_data(H.mind.special_role) - if(antag_data && (antag_data.flags & ANTAG_IMPLANT_IMMUNE)) - H.visible_message("[H] seems to resist the implant!", "You feel the tendrils of the Sol Alliance try to invade your mind!") - return 0 - else - clear_antag_roles(H.mind, 1) - to_chat(H, "You feel a surge of loyalty towards Admiral Michael Frost.") - return 1 - - -//sol uniforms - -/obj/item/clothing/under/rank/fatigues //regular sol navy combat fatigues - name = "sol navy fatigues" - desc = "Military looking uniform issued to Sol Alliance navy, to be used while in the field." - icon = 'icons/obj/sol_uniform.dmi' - icon_state = "sol_uniform" - item_state = "sol_uniform" - contained_sprite = 1 - armor = list(melee = 10, bullet = 10, laser = 10,energy = 0, bomb = 0, bio = 0, rad = 0) - -/obj/item/clothing/under/rank/fatigues/marine //regular sol navy marine fatigues - name = "sol marine fatigues" - desc = "Military looking uniform issued to Sol Alliance marines, to be used while in the field." - icon = 'icons/obj/sol_uniform.dmi' - icon_state = "marine_fatigue" - item_state = "marine_fatigue" - contained_sprite = 1 - -/obj/item/clothing/under/rank/fatigues/Initialize() - .=..() - rolled_sleeves = 0 - -/obj/item/clothing/under/rank/fatigues/rollsleeves() - set name = "Roll Up Sleeves" - set category = "Object" - set src in usr - - if (use_check(usr, USE_DISALLOW_SILICONS)) - return - - rolled_sleeves = !rolled_sleeves - if(rolled_sleeves) - body_parts_covered &= ~(ARMS|HANDS) - item_state = "[item_state]_r_s" - else - body_parts_covered = initial(body_parts_covered) - item_state = initial(item_state) - update_clothing_icon() - -/obj/item/clothing/under/rank/service //navy personnel service unniform - name = "sol navy service uniform" - desc = "Military looking service uniform issued to Sol Alliance navy members." - icon = 'icons/obj/sol_uniform.dmi' - icon_state = "whiteservice" - item_state = "whiteservice" - contained_sprite = 1 - -/obj/item/clothing/under/rank/service/marine //sol marine service unniform - name = "sol marine service uniform" - desc = "Military looking service uniform issued to Sol Alliance marines." - icon = 'icons/obj/sol_uniform.dmi' - icon_state = "tanutility" - item_state = "tanutility" - contained_sprite = 1 - -/obj/item/clothing/under/rank/dress //navy personnel dress unniform - name = "sol navy dress uniform" - desc = "A fancy military looking dress uniform issued to Sol Alliance navy members." - icon = 'icons/obj/sol_uniform.dmi' - icon_state = "sailor" - item_state = "sailor" - contained_sprite = 1 - -/obj/item/clothing/under/rank/dress/marine //sol marine dress unniform - name = "sol marine dress uniform" - desc = "A fancy military looking dress uniform issued to Sol Alliance marine." - icon = 'icons/obj/sol_uniform.dmi' - icon_state = "mahreendress" - item_state = "mahreendress" - contained_sprite = 1 - -/obj/item/clothing/under/rank/dress/officer //sol marine officer dress unniform - name = "sol navy commander dress uniform" - desc = "A fancy military looking dress uniform issued to high ranking Sol Alliance navy officers. This one wears the rank of Commander" - icon = 'icons/obj/sol_uniform.dmi' - icon_state = "dress" - item_state = "dress" - contained_sprite = 1 - -/obj/item/clothing/under/rank/dress/subofficer //sol marine officer dress unniform - name = "sol navy lieutenant dress uniform" - desc = "A fancy military looking dress uniform issued to lower ranking Sol Alliance navy officers. This one wears the rank of Lieutenant" - icon = 'icons/obj/sol_uniform.dmi' - icon_state = "subdress" - item_state = "subdress" - contained_sprite = 1 - -/obj/item/clothing/under/rank/dress/admiral //admiral uniform - name = "sol navy admiral uniform" - desc = "A fancy military dress uniform issued to a higher member of the Sol Alliance navy." - icon = 'icons/obj/sol_uniform.dmi' - icon_state = "admiral_uniform" - item_state = "admiral_uniform" - contained_sprite = 1 - -//hats - -/obj/item/clothing/head/navy - name = "sol navy utility cover" - desc = "An eight pointed cover issued to Sol Alliance navy members as part of their field uniform." - icon = 'icons/obj/sol_uniform.dmi' - icon_state = "greyutility" - item_state = "greyutility" - contained_sprite = 1 - armor = list(melee = 10, bullet = 10, laser = 10,energy = 0, bomb = 0, bio = 0, rad = 0) - -/obj/item/clothing/head/navy/marine - name = "sol marine utility cover" - desc = "An eight pointed cover issued to Sol Alliance marines as part of their field uniform." - icon = 'icons/obj/sol_uniform.dmi' - icon_state = "greenutility" - item_state = "greenutility" - contained_sprite = 1 - -/obj/item/clothing/head/navy/garrison - name = "sol marine garrison cap" - desc = "A green garrison cap issued to Sol Alliance marines." - icon = 'icons/obj/sol_uniform.dmi' - icon_state = "greengarrisoncap" - item_state = "greengarrisoncap" - contained_sprite = 1 - -/obj/item/clothing/head/dress - name = "sol navy dress cap" - desc = "A white cap issued as part of the Sol Alliance navy dress uniform." - icon = 'icons/obj/sol_uniform.dmi' - icon_state = "whitepeakcap" - item_state = "whitepeakcap" - contained_sprite = 1 - -/obj/item/clothing/head/dress/marine - name = "sol marine dress cap" - desc = "A green cap issued as part of the Sol Alliance marine dress uniform." - icon = 'icons/obj/sol_uniform.dmi' - icon_state = "whitepeakcap" - item_state = "whitepeakcap" - contained_sprite = 1 - -/obj/item/clothing/head/dress/officer - name = "sol navy officer dress cap" - desc = "A white cap issued as part of the Sol Alliance navy officers dress uniform." - icon = 'icons/obj/sol_uniform.dmi' - icon_state = "whitewheelcap" - item_state = "whitewheelcap" - contained_sprite = 1 - -/obj/item/clothing/head/dress/admiral - name = "sol navy admiral dress cap" - desc = "A fancy looking cap issued to a higher member of the Sol Alliance navy." - icon = 'icons/obj/sol_uniform.dmi' - icon_state = "admiral_cap" - item_state = "admiral_cap" - contained_sprite = 1 - -//ceremonial swords - -/obj/item/weapon/melee/ceremonial_sword - name = "sol officer ceremonial sword" - desc = "A ceremonial sword issued to Sol navy officers as part of their dress uniform." - icon = 'icons/obj/sol_uniform.dmi' - icon_state = "officersword" - item_state = "officersword" - contained_sprite = 1 - flags = CONDUCT - slot_flags = SLOT_BELT - force = 15 - throwforce = 5 - w_class = 4 - sharp = 1 - edge = 1 - can_embed = 0 - origin_tech = list(TECH_COMBAT = 4) - attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") - hitsound = 'sound/weapons/bladeslice.ogg' - -/obj/item/weapon/melee/ceremonial_sword/marine - name = "sol marine ceremonial sword" - desc = "A ceremonial sword issued to Sol marine officers as part of their dress uniform." - icon = 'icons/obj/sol_uniform.dmi' - icon_state = "marineofficersword" - item_state = "marineofficersword" - contained_sprite = 1 - -//vest and helmet - -/obj/item/clothing/head/helmet/sol - name = "sol combat helmet" - desc = "A woodland colored helmet made from advanced ceramic." - icon = 'icons/obj/sol_uniform.dmi' - icon_state = "helmet_tac_sol" - item_state = "helmet_tac_sol" - armor = list(melee = 60, bullet = 60, laser = 60, energy = 40, bomb = 40, bio = 0, rad = 0) - contained_sprite = 1 - -/obj/item/clothing/suit/storage/vest/sol - name = "sol heavy armor vest" - desc = "A high-quality armor vest in a deep green. It is surprisingly flexible and light, even with the added webbing and armor plating." - icon = 'icons/obj/sol_uniform.dmi' - icon_state = "solwebvest" - item_state = "solwebvest" - armor = list(melee = 60, bullet = 60, laser = 60, energy = 40, bomb = 40, bio = 0, rad = 0) - contained_sprite = 1 - -//closet uniform - -/obj/structure/closet/sol - name = "sol navy uniform closet" - desc = "It's a storage unit for Sol Alliance navy uniforms." - icon_state = "syndicate1" - icon_closed = "syndicate1" - icon_opened = "syndicate1open" - -/obj/structure/closet/sol/navy/fill() - ..() - new /obj/item/clothing/under/rank/fatigues(src) - new /obj/item/clothing/under/rank/fatigues(src) - new /obj/item/clothing/under/rank/fatigues(src) - new /obj/item/clothing/under/rank/service(src) - new /obj/item/clothing/under/rank/service(src) - new /obj/item/clothing/under/rank/service(src) - new /obj/item/clothing/head/navy(src) - new /obj/item/clothing/head/navy(src) - new /obj/item/clothing/head/navy(src) - new /obj/item/clothing/shoes/jackboots(src) - new /obj/item/clothing/shoes/jackboots(src) - new /obj/item/clothing/shoes/jackboots(src) - -/obj/structure/closet/sol/marine - name = "sol marines uniform closet" - desc = "It's a storage unit for Sol Alliance marine uniforms." - -/obj/structure/closet/sol/marine/fill() - ..() - new /obj/item/clothing/under/rank/fatigues/marine(src) - new /obj/item/clothing/under/rank/fatigues/marine(src) - new /obj/item/clothing/under/rank/fatigues/marine(src) - new /obj/item/clothing/under/rank/service/marine(src) - new /obj/item/clothing/under/rank/service/marine(src) - new /obj/item/clothing/under/rank/service/marine(src) - new /obj/item/clothing/head/navy/marine(src) - new /obj/item/clothing/head/navy/marine(src) - new /obj/item/clothing/head/navy/garrison(src) - new /obj/item/clothing/shoes/jackboots(src) - new /obj/item/clothing/shoes/jackboots(src) - new /obj/item/clothing/shoes/jackboots(src) - -/obj/structure/closet/sol/navy_dress - name = "sol navy dress uniform closet" - desc = "It's a storage unit for Sol Alliance navy dress uniforms." - -/obj/structure/closet/sol/navy_dress/fill() - ..() - new /obj/item/clothing/under/rank/dress(src) - new /obj/item/clothing/under/rank/dress(src) - new /obj/item/clothing/under/rank/dress(src) - new /obj/item/clothing/head/dress(src) - new /obj/item/clothing/head/dress(src) - new /obj/item/clothing/head/dress(src) - new /obj/item/clothing/shoes/laceup(src) - new /obj/item/clothing/shoes/laceup(src) - new /obj/item/clothing/shoes/laceup(src) - new /obj/item/clothing/gloves/white(src) - new /obj/item/clothing/gloves/white(src) - new /obj/item/clothing/gloves/white(src) - -/obj/structure/closet/sol/marine_dress - name = "sol marine dress uniform closet" - desc = "It's a storage unit for Sol Alliance marine dress uniforms." - -/obj/structure/closet/sol/marine_dress/fill() - ..() - new /obj/item/clothing/under/rank/dress/marine(src) - new /obj/item/clothing/under/rank/dress/marine(src) - new /obj/item/clothing/under/rank/dress/marine(src) - new /obj/item/clothing/head/dress/marine(src) - new /obj/item/clothing/head/dress/marine(src) - new /obj/item/clothing/head/dress/marine(src) - new /obj/item/clothing/shoes/laceup(src) - new /obj/item/clothing/shoes/laceup(src) - new /obj/item/clothing/shoes/laceup(src) - new /obj/item/clothing/gloves/white(src) - new /obj/item/clothing/gloves/white(src) - new /obj/item/clothing/gloves/white(src) - -/obj/structure/closet/secure_closet/soll_officer - name = "sol alliance officer locker" - req_access = list(access_captain) - icon_state = "capsecure1" - icon_closed = "capsecure" - icon_locked = "capsecure1" - icon_opened = "capsecureopen" - icon_broken = "capsecurebroken" - icon_off = "capsecureoff" - -/obj/structure/closet/secure_closet/soll_officer/fill() - ..() - if(prob(50)) - new /obj/item/weapon/storage/backpack/captain(src) - else - new /obj/item/weapon/storage/backpack/satchel_cap(src) - new /obj/item/clothing/under/rank/dress/officer(src) - new /obj/item/clothing/head/dress/officer(src) - new /obj/item/clothing/suit/storage/vest(src) - new /obj/item/weapon/cartridge/captain(src) - new /obj/item/clothing/head/helmet(src) - new /obj/item/clothing/shoes/laceup(src) - new /obj/item/device/radio/headset/heads/captain(src) - new /obj/item/clothing/gloves/white(src) - new /obj/item/weapon/gun/energy/pistol(src) - new /obj/item/device/flash(src) - new /obj/item/weapon/melee/telebaton(src) - new /obj/item/weapon/melee/ceremonial_sword(src) - new /obj/item/clothing/under/rank/fatigues(src) - new /obj/item/clothing/under/rank/service(src) - new /obj/item/clothing/shoes/jackboots(src) - new /obj/item/clothing/accessory/holster/armpit(src) - return diff --git a/code/modules/clothing/head/misc.dm b/code/modules/clothing/head/misc.dm index a99b884917c..b389ceda459 100644 --- a/code/modules/clothing/head/misc.dm +++ b/code/modules/clothing/head/misc.dm @@ -596,4 +596,70 @@ icon_state = "shroud" contained_sprite = FALSE species_restricted = list("Vaurca Breeder") - sprite_sheets = list("Vaurca Breeder" = 'icons/mob/species/breeder/head.dmi') \ No newline at end of file + sprite_sheets = list("Vaurca Breeder" = 'icons/mob/species/breeder/head.dmi') + +/obj/item/clothing/head/navy + name = "sol navy utility cover" + desc = "An eight pointed cover issued to Sol Alliance navy members as part of their field uniform." + icon = 'icons/obj/sol_uniform.dmi' + icon_state = "greyutility" + item_state = "greyutility" + contained_sprite = 1 + armor = list(melee = 10, bullet = 10, laser = 10,energy = 0, bomb = 0, bio = 0, rad = 0) + +/obj/item/clothing/head/navy/marine + name = "sol marine utility cover" + desc = "An eight pointed cover issued to Sol Alliance marines as part of their field uniform." + icon = 'icons/obj/sol_uniform.dmi' + icon_state = "greenutility" + item_state = "greenutility" + contained_sprite = 1 + +/obj/item/clothing/head/navy/garrison + name = "sol marine garrison cap" + desc = "A green garrison cap issued to Sol Alliance marines." + icon = 'icons/obj/sol_uniform.dmi' + icon_state = "greengarrisoncap" + item_state = "greengarrisoncap" + contained_sprite = 1 + +/obj/item/clothing/head/dress + name = "sol navy dress cap" + desc = "A white cap issued as part of the Sol Alliance navy dress uniform." + icon = 'icons/obj/sol_uniform.dmi' + icon_state = "whitepeakcap" + item_state = "whitepeakcap" + contained_sprite = 1 + +/obj/item/clothing/head/dress/marine + name = "sol marine dress cap" + desc = "A green cap issued as part of the Sol Alliance marine dress uniform." + icon = 'icons/obj/sol_uniform.dmi' + icon_state = "whitepeakcap" + item_state = "whitepeakcap" + contained_sprite = 1 + +/obj/item/clothing/head/dress/officer + name = "sol navy officer dress cap" + desc = "A white cap issued as part of the Sol Alliance navy officers dress uniform." + icon = 'icons/obj/sol_uniform.dmi' + icon_state = "whitewheelcap" + item_state = "whitewheelcap" + contained_sprite = 1 + +/obj/item/clothing/head/dress/admiral + name = "sol navy admiral dress cap" + desc = "A fancy looking cap issued to a higher member of the Sol Alliance navy." + icon = 'icons/obj/sol_uniform.dmi' + icon_state = "admiral_cap" + item_state = "admiral_cap" + contained_sprite = 1 + +/obj/item/clothing/head/helmet/sol + name = "sol combat helmet" + desc = "A woodland colored helmet made from advanced ceramic." + icon = 'icons/obj/sol_uniform.dmi' + icon_state = "helmet_tac_sol" + item_state = "helmet_tac_sol" + armor = list(melee = 60, bullet = 60, laser = 60, energy = 40, bomb = 40, bio = 0, rad = 0) + contained_sprite = 1 \ No newline at end of file diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index 3c77d555d0e..36c9cc89848 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -549,6 +549,15 @@ heat_protection = 0 max_heat_protection_temperature = 0 +/obj/item/clothing/suit/storage/vest/sol + name = "sol heavy armor vest" + desc = "A high-quality armor vest in a deep green. It is surprisingly flexible and light, even with the added webbing and armor plating." + icon = 'icons/obj/sol_uniform.dmi' + icon_state = "solwebvest" + item_state = "solwebvest" + armor = list(melee = 60, bullet = 60, laser = 60, energy = 40, bomb = 40, bio = 0, rad = 0) + contained_sprite = 1 + //All of the armor below is mostly unused /obj/item/clothing/suit/armor/centcomm @@ -593,4 +602,4 @@ desc = "Pukish armor." icon_state = "tdgreen" item_state = "tdgreen" - siemens_coefficient = 1 + siemens_coefficient = 1 \ No newline at end of file diff --git a/code/modules/clothing/under/jobs/sol.dm b/code/modules/clothing/under/jobs/sol.dm new file mode 100644 index 00000000000..5f9e18d7071 --- /dev/null +++ b/code/modules/clothing/under/jobs/sol.dm @@ -0,0 +1,94 @@ + +/obj/item/clothing/under/rank/fatigues //regular sol navy combat fatigues + name = "sol navy fatigues" + desc = "Military looking uniform issued to Sol Alliance navy, to be used while in the field." + icon = 'icons/obj/sol_uniform.dmi' + icon_state = "sol_uniform" + item_state = "sol_uniform" + contained_sprite = 1 + armor = list(melee = 10, bullet = 10, laser = 10,energy = 0, bomb = 0, bio = 0, rad = 0) + +/obj/item/clothing/under/rank/fatigues/marine //regular sol navy marine fatigues + name = "sol marine fatigues" + desc = "Military looking uniform issued to Sol Alliance marines, to be used while in the field." + icon = 'icons/obj/sol_uniform.dmi' + icon_state = "marine_fatigue" + item_state = "marine_fatigue" + contained_sprite = 1 + +/obj/item/clothing/under/rank/fatigues/Initialize() + .=..() + rolled_sleeves = 0 + +/obj/item/clothing/under/rank/fatigues/rollsleeves() + set name = "Roll Up Sleeves" + set category = "Object" + set src in usr + + if (use_check(usr, USE_DISALLOW_SILICONS)) + return + + rolled_sleeves = !rolled_sleeves + if(rolled_sleeves) + body_parts_covered &= ~(ARMS|HANDS) + item_state = "[item_state]_r_s" + else + body_parts_covered = initial(body_parts_covered) + item_state = initial(item_state) + update_clothing_icon() + +/obj/item/clothing/under/rank/service //navy personnel service unniform + name = "sol navy service uniform" + desc = "Military looking service uniform issued to Sol Alliance navy members." + icon = 'icons/obj/sol_uniform.dmi' + icon_state = "whiteservice" + item_state = "whiteservice" + contained_sprite = 1 + +/obj/item/clothing/under/rank/service/marine //sol marine service unniform + name = "sol marine service uniform" + desc = "Military looking service uniform issued to Sol Alliance marines." + icon = 'icons/obj/sol_uniform.dmi' + icon_state = "tanutility" + item_state = "tanutility" + contained_sprite = 1 + +/obj/item/clothing/under/rank/dress //navy personnel dress unniform + name = "sol navy dress uniform" + desc = "A fancy military looking dress uniform issued to Sol Alliance navy members." + icon = 'icons/obj/sol_uniform.dmi' + icon_state = "sailor" + item_state = "sailor" + contained_sprite = 1 + +/obj/item/clothing/under/rank/dress/marine //sol marine dress unniform + name = "sol marine dress uniform" + desc = "A fancy military looking dress uniform issued to Sol Alliance marine." + icon = 'icons/obj/sol_uniform.dmi' + icon_state = "mahreendress" + item_state = "mahreendress" + contained_sprite = 1 + +/obj/item/clothing/under/rank/dress/officer //sol marine officer dress unniform + name = "sol navy commander dress uniform" + desc = "A fancy military looking dress uniform issued to high ranking Sol Alliance navy officers. This one wears the rank of Commander" + icon = 'icons/obj/sol_uniform.dmi' + icon_state = "dress" + item_state = "dress" + contained_sprite = 1 + +/obj/item/clothing/under/rank/dress/subofficer //sol marine officer dress unniform + name = "sol navy lieutenant dress uniform" + desc = "A fancy military looking dress uniform issued to lower ranking Sol Alliance navy officers. This one wears the rank of Lieutenant" + icon = 'icons/obj/sol_uniform.dmi' + icon_state = "subdress" + item_state = "subdress" + contained_sprite = 1 + +/obj/item/clothing/under/rank/dress/admiral //admiral uniform + name = "sol navy admiral uniform" + desc = "A fancy military dress uniform issued to a higher member of the Sol Alliance navy." + icon = 'icons/obj/sol_uniform.dmi' + icon_state = "admiral_uniform" + item_state = "admiral_uniform" + contained_sprite = 1