diff --git a/.github/DOWNLOADING.md b/.github/DOWNLOADING.md index 27731066cae..39e671cff78 100644 --- a/.github/DOWNLOADING.md +++ b/.github/DOWNLOADING.md @@ -42,24 +42,28 @@ or a code issue on the main repo. Feel free to ask on Discord. Once that's done, open up the config folder. Firstly, you will want to copy `config.toml` from the example folder into the regular config folder. -You'll want to edit the url configuration section of `config.toml` to set your server location, +You'll want to edit the `url_configuration` section of `config.toml` to set `reboot_url` to your server location, so that all your players don't get disconnected at the end of each round. It's recommended you don't turn on the gamemodes with probability 0, as they have various issues and aren't currently being tested, so they may have unknown and bizarre bugs. -You'll also want to edit the admin configuration of `config.toml` to remove the default admins and add your own. +You'll also want to edit the `admin_configuration` section of `config.toml` to remove the default admins and add your own. If you are connecting from localhost to your own test server, you should automatically be admin. -"Host" is the highest level of access, and the other recommended admin levels for now are -"Game Admin" and "Moderator". The format is: +"Head of Staff" is the highest level of access, and the other recommended admin levels for now are +"Game Admin". The format is: -```cfg - byondkey - Rank +```toml +# Note that your ranks must be cased properly, usernames can be normal keys or ckey +admin_assignments = [ + {ckey = "Admin1", rank = "Hosting Provider"}, + {ckey = "Admin2", rank = "Game Admin"}, +] ``` -where the BYOND key must be in lowercase and the admin rank must be properly capitalised. -There are a bunch more admin ranks, but these two should be enough for most servers, -assuming you have trustworthy admins. You can define your own ranks in the admin section of `config.toml` +You can define your own ranks in the admin section of `config.toml`. + +If you want to run a production scale server, we highly recommend using database administrators. Finally, to start the server, run Dream Daemon and enter the path to your compiled paradise.dmb file. @@ -93,7 +97,7 @@ When you have done this, you'll need to recompile the code, but then it should w The SQL backend is required for storing character saves, preferences, administrative data, and many other things. We recommend running a database if your server is going to be used as more than just a local test server. -Your SQL server details go in `config/dbconfig.txt`, +Your SQL server details go in the `database_configuration` section of `config.toml`, and the SQL schema is in `SQL/paradise_schema.sql` or `SQL/paradise_schema_prefix.sql`, depending on if you want table prefixes. More detailed setup instructions are located on our wiki: diff --git a/SQL/paradise_schema.sql b/SQL/paradise_schema.sql index e966c4c447c..f365e8ce671 100644 --- a/SQL/paradise_schema.sql +++ b/SQL/paradise_schema.sql @@ -1,5 +1,5 @@ -CREATE DATABASE IF NOT EXISTS `feedback` /*!40100 DEFAULT CHARACTER SET utf8 */; -USE `feedback`; +CREATE DATABASE IF NOT EXISTS `paradise_gamedb` /*!40100 DEFAULT CHARACTER SET utf8 */; +USE `paradise_gamedb`; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; diff --git a/SQL/paradise_schema_prefixed.sql b/SQL/paradise_schema_prefixed.sql deleted file mode 100644 index bd4997ad81a..00000000000 --- a/SQL/paradise_schema_prefixed.sql +++ /dev/null @@ -1,601 +0,0 @@ -CREATE DATABASE IF NOT EXISTS `feedback` /*!40100 DEFAULT CHARACTER SET utf8 */; -USE `feedback`; - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; - --- --- Table structure for table `SS13_characters` --- - -DROP TABLE IF EXISTS `SS13_characters`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `SS13_characters` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `ckey` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL, - `slot` int(2) NOT NULL, - `OOC_Notes` longtext COLLATE utf8mb4_unicode_ci NOT NULL, - `real_name` varchar(55) COLLATE utf8mb4_unicode_ci NOT NULL, - `name_is_always_random` tinyint(1) NOT NULL, - `gender` varchar(11) COLLATE utf8mb4_unicode_ci NOT NULL, - `age` smallint(4) NOT NULL, - `species` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL, - `language` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL, - `hair_colour` varchar(7) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '#000000', - `secondary_hair_colour` varchar(7) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '#000000', - `facial_hair_colour` varchar(7) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '#000000', - `secondary_facial_hair_colour` varchar(7) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '#000000', - `skin_tone` smallint(4) NOT NULL, - `skin_colour` varchar(7) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '#000000', - `marking_colours` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'head=%23000000&body=%23000000&tail=%23000000', - `head_accessory_colour` varchar(7) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '#000000', - `hair_style_name` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL, - `facial_style_name` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL, - `marking_styles` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'head=None&body=None&tail=None', - `head_accessory_style_name` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL, - `alt_head_name` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL, - `eye_colour` varchar(7) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '#000000', - `underwear` longtext COLLATE utf8mb4_unicode_ci NOT NULL, - `undershirt` longtext COLLATE utf8mb4_unicode_ci NOT NULL, - `backbag` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `b_type` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL, - `alternate_option` smallint(4) NOT NULL, - `job_support_high` mediumint(8) NOT NULL, - `job_support_med` mediumint(8) NOT NULL, - `job_support_low` mediumint(8) NOT NULL, - `job_medsci_high` mediumint(8) NOT NULL, - `job_medsci_med` mediumint(8) NOT NULL, - `job_medsci_low` mediumint(8) NOT NULL, - `job_engsec_high` mediumint(8) NOT NULL, - `job_engsec_med` mediumint(8) NOT NULL, - `job_engsec_low` mediumint(8) NOT NULL, - `job_karma_high` mediumint(8) NOT NULL, - `job_karma_med` mediumint(8) NOT NULL, - `job_karma_low` mediumint(8) NOT NULL, - `flavor_text` longtext COLLATE utf8mb4_unicode_ci NOT NULL, - `med_record` longtext COLLATE utf8mb4_unicode_ci NOT NULL, - `sec_record` longtext COLLATE utf8mb4_unicode_ci NOT NULL, - `gen_record` longtext COLLATE utf8mb4_unicode_ci NOT NULL, - `disabilities` mediumint(8) NOT NULL, - `player_alt_titles` longtext COLLATE utf8mb4_unicode_ci NOT NULL, - `organ_data` longtext COLLATE utf8mb4_unicode_ci NOT NULL, - `rlimb_data` longtext COLLATE utf8mb4_unicode_ci NOT NULL, - `nanotrasen_relation` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL, - `speciesprefs` int(1) NOT NULL, - `socks` longtext COLLATE utf8mb4_unicode_ci NOT NULL, - `body_accessory` longtext COLLATE utf8mb4_unicode_ci NOT NULL, - `gear` longtext COLLATE utf8mb4_unicode_ci NOT NULL, - `autohiss` tinyint(1) NOT NULL, - `hair_gradient` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL, - `hair_gradient_offset` varchar(7) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0,0', - `hair_gradient_colour` varchar(7) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '#000000', - `hair_gradient_alpha` tinyint(3) UNSIGNED NOT NULL DEFAULT '255', - PRIMARY KEY (`id`), - KEY `ckey` (`ckey`) -) ENGINE=InnoDB AUTO_INCREMENT=125467 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `SS13_customuseritems` --- - -DROP TABLE IF EXISTS `SS13_customuseritems`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `SS13_customuseritems` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `cuiCKey` varchar(36) NOT NULL, - `cuiRealName` varchar(60) NOT NULL, - `cuiPath` varchar(255) NOT NULL, - `cuiItemName` text, - `cuiDescription` text, - `cuiReason` text, - `cuiPropAdjust` text, - `cuiJobMask` text NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8mb4; -ALTER TABLE `SS13_customuseritems` ADD INDEX(`cuiCKey`); -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `SS13_death` --- - -DROP TABLE IF EXISTS `SS13_death`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `SS13_death` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `pod` text NOT NULL COMMENT 'Place of death', - `coord` text NOT NULL COMMENT 'X, Y, Z POD', - `tod` datetime NOT NULL COMMENT 'Time of death', - `job` text NOT NULL, - `special` text NOT NULL, - `name` text NOT NULL, - `byondkey` text NOT NULL, - `laname` text NOT NULL COMMENT 'Last attacker name', - `lakey` text NOT NULL COMMENT 'Last attacker key', - `gender` text NOT NULL, - `bruteloss` int(11) NOT NULL, - `brainloss` int(11) NOT NULL, - `fireloss` int(11) NOT NULL, - `oxyloss` int(11) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=166546 DEFAULT CHARSET=utf8mb4; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `donators` --- - -DROP TABLE IF EXISTS `SS13_donators`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `SS13_donators` ( - `patreon_name` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL, - `tier` int(2), - `ckey` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Manual Field', - `start_date` datetime, - `end_date` datetime, - `active` boolean, - PRIMARY KEY (`patreon_name`), - KEY `ckey` (`ckey`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `SS13_admin` --- - -DROP TABLE IF EXISTS `SS13_admin`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `SS13_admin` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `ckey` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL, - `admin_rank` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Administrator', - `level` int(2) NOT NULL DEFAULT '0', - `flags` int(16) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `ckey` (`ckey`) -) ENGINE=InnoDB AUTO_INCREMENT=99 DEFAULT CHARSET=utf8mb4; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `SS13_admin_log` --- - -DROP TABLE IF EXISTS `SS13_admin_log`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `SS13_admin_log` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `datetime` datetime NOT NULL, - `adminckey` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL, - `adminip` varchar(18) COLLATE utf8mb4_unicode_ci NOT NULL, - `log` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL, - PRIMARY KEY (`id`), - KEY `adminckey` (`adminckey`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `SS13_ban` --- - -DROP TABLE IF EXISTS `SS13_ban`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `SS13_ban` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `bantime` datetime NOT NULL, - `ban_round_id` INT(11) NULL DEFAULT NULL, - `serverip` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL, - `bantype` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL, - `reason` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL, - `job` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `duration` int(11) NOT NULL, - `rounds` int(11) DEFAULT NULL, - `expiration_time` datetime NOT NULL, - `ckey` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL, - `computerid` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL, - `ip` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL, - `a_ckey` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL, - `a_computerid` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL, - `a_ip` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL, - `who` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL, - `adminwho` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL, - `edits` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `unbanned` tinyint(1) DEFAULT NULL, - `unbanned_datetime` datetime DEFAULT NULL, - `unbanned_round_id` INT(11) NULL DEFAULT NULL, - `unbanned_ckey` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `unbanned_computerid` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `unbanned_ip` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `ckey` (`ckey`), - KEY `computerid` (`computerid`), - KEY `ip` (`ip`) -) ENGINE=InnoDB AUTO_INCREMENT=58903 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `SS13_feedback` --- - -DROP TABLE IF EXISTS `SS13_feedback`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `SS13_feedback` ( - `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, - `datetime` datetime NOT NULL, - `round_id` int(8) NOT NULL, - `key_name` varchar(32) NOT NULL, - `key_type` enum('text', 'amount', 'tally', 'nested tally', 'associative') NOT NULL, - `version` tinyint(3) UNSIGNED NOT NULL, - `json` LONGTEXT NOT NULL COLLATE 'utf8mb4_general_ci', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=257638 DEFAULT CHARSET=utf8mb4; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `SS13_player` --- - -DROP TABLE IF EXISTS `SS13_player`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `SS13_player` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `ckey` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL, - `firstseen` datetime NOT NULL, - `lastseen` datetime NOT NULL, - `ip` varchar(18) COLLATE utf8mb4_unicode_ci NOT NULL, - `computerid` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL, - `lastadminrank` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Player', - `ooccolor` varchar(7) COLLATE utf8mb4_unicode_ci DEFAULT '#b82e00', - `UI_style` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT 'Midnight', - `UI_style_color` varchar(7) COLLATE utf8mb4_unicode_ci DEFAULT '#ffffff', - `UI_style_alpha` smallint(4) DEFAULT '255', - `be_role` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `default_slot` smallint(4) DEFAULT '1', - `toggles` int(11) DEFAULT NULL, - `toggles_2` int(11) DEFAULT '0', - `sound` mediumint(8) DEFAULT '31', - `volume_mixer` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `lastchangelog` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0', - `exp` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `clientfps` smallint(4) DEFAULT '0', - `atklog` smallint(4) DEFAULT '0', - `fuid` bigint(20) DEFAULT NULL, - `fupdate` smallint(4) DEFAULT '0', - `parallax` tinyint(1) DEFAULT '8', - `byond_date` DATE DEFAULT NULL, - `2fa_status` ENUM('DISABLED','ENABLED_IP','ENABLED_ALWAYS') NOT NULL DEFAULT 'DISABLED' COLLATE 'utf8mb4_general_ci', - PRIMARY KEY (`id`), - UNIQUE KEY `ckey` (`ckey`), - KEY `lastseen` (`lastseen`), - KEY `computerid` (`computerid`), - KEY `ip` (`ip`), - KEY `fuid` (`fuid`), - KEY `fupdate` (`fupdate`) -) ENGINE=InnoDB AUTO_INCREMENT=135298 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `SS13_privacy` --- - -DROP TABLE IF EXISTS `SS13_privacy`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `ss13_privacy` ( - `ckey` varchar(32) NOT NULL, - `datetime` datetime NOT NULL, - `consent` bit(1) NOT NULL, - PRIMARY KEY (`ckey`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `SS13_karma` --- - -DROP TABLE IF EXISTS `SS13_karma`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `SS13_karma` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `spendername` text NOT NULL, - `spenderkey` text NOT NULL, - `receivername` text NOT NULL, - `receiverkey` text NOT NULL, - `receiverrole` text, - `receiverspecial` text, - `isnegative` tinyint(1) DEFAULT NULL, - `spenderip` text NOT NULL, - `time` datetime NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=73614 DEFAULT CHARSET=utf8mb4; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `SS13_karmatotals` --- - -DROP TABLE IF EXISTS `SS13_karmatotals`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `SS13_karmatotals` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `byondkey` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL, - `karma` int(11) NOT NULL, - `karmaspent` int(11) NOT NULL DEFAULT 0, - PRIMARY KEY (`id`), - KEY `byondkey` (`byondkey`) -) ENGINE=InnoDB AUTO_INCREMENT=25715 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `SS13_library` --- - -DROP TABLE IF EXISTS `SS13_library`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `SS13_library` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `author` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL, - `title` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL, - `content` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL, - `category` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL, - `ckey` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL, - `flagged` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `ckey` (`ckey`), - KEY `flagged` (`flagged`) -) ENGINE=InnoDB AUTO_INCREMENT=4537 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `SS13_legacy_population` --- - -DROP TABLE IF EXISTS `SS13_legacy_population`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `SS13_legacy_population` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `playercount` int(11) DEFAULT NULL, - `admincount` int(11) DEFAULT NULL, - `time` datetime NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=2550 DEFAULT CHARSET=utf8mb4; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `SS13_whitelist` --- - -DROP TABLE IF EXISTS `SS13_whitelist`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `SS13_whitelist` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `ckey` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL, - `job` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `species` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `ckey` (`ckey`) -) ENGINE=InnoDB AUTO_INCREMENT=4080 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; - --- --- Table structure for table `SS13_watch` --- - -DROP TABLE IF EXISTS `SS13_watch`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `SS13_watch` ( - `ckey` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL, - `reason` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL, - `timestamp` datetime NOT NULL, - `adminckey` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL, - `last_editor` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `edits` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - PRIMARY KEY (`ckey`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - - --- --- Table structure for table `SS13_notes` --- - -DROP TABLE IF EXISTS `SS13_notes`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `SS13_notes` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `ckey` varchar(32) NOT NULL, - `notetext` text NOT NULL, - `timestamp` datetime NOT NULL, - `round_id` INT(11) NULL DEFAULT NULL, - `adminckey` varchar(32) NOT NULL, - `last_editor` varchar(32), - `edits` text, - `server` varchar(50) NOT NULL, - `crew_playtime` mediumint(8) UNSIGNED DEFAULT '0', - `automated` TINYINT(3) UNSIGNED NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `ckey` (`ckey`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `SS13_memo` --- - -DROP TABLE IF EXISTS `SS13_memo`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `SS13_memo` ( - `ckey` varchar(32) NOT NULL, - `memotext` text NOT NULL, - `timestamp` datetime NOT NULL, - `last_editor` varchar(32), - `edits` text, - PRIMARY KEY (`ckey`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `SS13_ipintel` --- -DROP TABLE IF EXISTS `SS13_ipintel`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `SS13_ipintel` ( - `ip` int UNSIGNED NOT NULL, - `date` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL, - `intel` real NOT NULL DEFAULT '0', - PRIMARY key (`ip`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `SS13_vpn_whitelist` --- -DROP TABLE IF EXISTS `SS13_vpn_whitelist`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `SS13_vpn_whitelist` ( - `ckey` varchar(32) NOT NULL, - `reason` text, - PRIMARY KEY (`ckey`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `SS13_oauth_tokens` --- -DROP TABLE IF EXISTS `SS13_oauth_tokens`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `SS13_oauth_tokens` ( - `ckey` varchar(32) NOT NULL, - `token` varchar(32) NOT NULL, - PRIMARY KEY (`token`), - KEY `ckey` (`ckey`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `SS13_playtime_history` --- -DROP TABLE IF EXISTS `SS13_playtime_history`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `SS13_playtime_history` ( - `ckey` varchar(32) NOT NULL, - `date` DATE NOT NULL, - `time_living` SMALLINT NOT NULL, - `time_ghost` SMALLINT NOT NULL, - PRIMARY KEY (`ckey`, `date`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - --- --- Table structure for table `SS13_connection_log` --- -DROP TABLE IF EXISTS `SS13_connection_log`; -CREATE TABLE `SS13_connection_log` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `datetime` datetime NOT NULL, - `ckey` varchar(32) NOT NULL, - `ip` varchar(32) NOT NULL, - `computerid` varchar(32) NOT NULL, - `result` ENUM('ESTABLISHED','DROPPED - IPINTEL','DROPPED - BANNED','DROPPED - INVALID') NOT NULL DEFAULT 'ESTABLISHED' COLLATE 'utf8mb4_general_ci', - PRIMARY KEY (`id`), - KEY `ckey` (`ckey`), - KEY `ip` (`ip`), - KEY `computerid` (`computerid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - --- --- Table structure for table `SS13_changelog` --- -DROP TABLE IF EXISTS `SS13_changelog`; -CREATE TABLE `SS13_changelog` ( - `id` INT(11) NOT NULL AUTO_INCREMENT, - `pr_number` INT(11) NOT NULL, - `date_merged` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - `author` VARCHAR(32) NOT NULL, - `cl_type` ENUM('FIX','WIP','TWEAK','SOUNDADD','SOUNDDEL','CODEADD','CODEDEL','IMAGEADD','IMAGEDEL','SPELLCHECK','EXPERIMENT') NOT NULL, - `cl_entry` TEXT NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - --- --- Table structure for table `ip2group` --- -DROP TABLE IF EXISTS `SS13_ip2group`; -CREATE TABLE `SS13_ip2group` ( - `ip` varchar (18) COLLATE utf8mb4_unicode_ci NOT NULL, - `date` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL, - `groupstr` varchar (32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', - PRIMARY KEY (`ip`), - KEY `groupstr` (`groupstr`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - --- --- Table structure for table `round` --- -DROP TABLE IF EXISTS `SS13_round`; -CREATE TABLE `SS13_round` ( - `id` INT(11) NOT NULL AUTO_INCREMENT, - `initialize_datetime` DATETIME NOT NULL, - `start_datetime` DATETIME NULL, - `shutdown_datetime` DATETIME NULL, - `end_datetime` DATETIME NULL, - `server_ip` INT(10) UNSIGNED NOT NULL, - `server_port` SMALLINT(5) UNSIGNED NOT NULL, - `commit_hash` CHAR(40) NULL, - `game_mode` VARCHAR(32) NULL, - `game_mode_result` VARCHAR(64) NULL, - `end_state` VARCHAR(64) NULL, - `shuttle_name` VARCHAR(64) NULL, - `map_name` VARCHAR(32) NULL, - `station_name` VARCHAR(80) NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - --- --- Table structure for table `2fa_secrets` --- -CREATE TABLE `SS13_2fa_secrets` ( - `ckey` VARCHAR(50) NOT NULL COLLATE 'utf8mb4_general_ci', - `secret` VARCHAR(64) NOT NULL COLLATE 'utf8mb4_general_ci', - `date_setup` DATETIME NOT NULL DEFAULT current_timestamp(), - `last_time` DATETIME NULL DEFAULT NULL, - PRIMARY KEY (`ckey`) USING BTREE -) -COLLATE='utf8mb4_general_ci' ENGINE=InnoDB; diff --git a/SQL/updates/10-11.sql b/SQL/updates/10-11.sql index 843eb9d9982..7102170a9ff 100644 --- a/SQL/updates/10-11.sql +++ b/SQL/updates/10-11.sql @@ -6,35 +6,35 @@ # Generation (not necessary to run unless your DB has extra tables) SELECT CONCAT("ALTER TABLE ", TABLE_SCHEMA, '.', TABLE_NAME," CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;") AS ExecuteTheString FROM INFORMATION_SCHEMA.TABLES -WHERE TABLE_SCHEMA="feedback" +WHERE TABLE_SCHEMA="paradise_gamedb" AND TABLE_TYPE="BASE TABLE"; # Actual table conversion stuff -ALTER TABLE feedback.admin CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE feedback.admin_log CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE feedback.ban CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE feedback.characters CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE feedback.connection_log CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE feedback.customuseritems CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE feedback.death CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE feedback.donators CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE feedback.privacy CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE feedback.feedback CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE feedback.ipintel CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE feedback.karma CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE feedback.karmatotals CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE feedback.legacy_population CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE feedback.library CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE feedback.memo CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE feedback.notes CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE feedback.oauth_tokens CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE feedback.player CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE feedback.playtime_history CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE feedback.poll_option CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE feedback.poll_question CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE feedback.poll_textreply CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE feedback.poll_vote CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE feedback.privacy CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE feedback.vpn_whitelist CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE feedback.watch CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE feedback.whitelist CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE admin CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE admin_log CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE ban CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE characters CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE connection_log CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE customuseritems CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE death CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE donators CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE privacy CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE feedback CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE ipintel CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE karma CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE karmatotals CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE legacy_population CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE library CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE memo CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE notes CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE oauth_tokens CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE player CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE playtime_history CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE poll_option CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE poll_question CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE poll_textreply CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE poll_vote CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE privacy CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE vpn_whitelist CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE watch CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE whitelist CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; diff --git a/SQL/updates/17-18.py b/SQL/updates/17-18.py index 61d4fe39674..389722fa7d9 100644 --- a/SQL/updates/17-18.py +++ b/SQL/updates/17-18.py @@ -8,7 +8,7 @@ #To view the parameters for this script, execute it with the argument --help #All the positional arguments are required, remember to include prefixes in your table names if you use them #An example of the command used to execute this script from powershell: -#python feedback_conversion_2017-11-12.py "localhost" "root" "password" "feedback" "feedback" "feedback_2" +#python feedback_conversion_2017-11-12.py "localhost" "root" "password" "paradise_gamedb" "feedback" "feedback_2" #I found that this script would complete conversion of 10000 rows approximately every 2-3 seconds #Depending on the size of your feedback table and the computer used it may take several minutes for the script to finish # diff --git a/code/__DEFINES/layers.dm b/code/__DEFINES/layers.dm index 9286ea2726d..a633ddab5eb 100644 --- a/code/__DEFINES/layers.dm +++ b/code/__DEFINES/layers.dm @@ -117,3 +117,6 @@ #define SPLASHSCREEN_LAYER 23 #define SPLASHSCREEN_PLANE 23 + +///Plane master controller keys +#define PLANE_MASTERS_GAME "plane_masters_game" diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index c994d0dc12a..c20626b63f4 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -432,9 +432,6 @@ /// Prepares a text to be used for maptext. Use this so it doesn't look hideous. #define MAPTEXT(text) {"[##text]"} -// Filters -#define FILTER_AMBIENT_OCCLUSION filter(type="drop_shadow", x=0, y=-2, size=4, color="#04080FAA") - //Fullscreen overlay resolution in tiles. #define FULLSCREEN_OVERLAY_RESOLUTION_X 15 #define FULLSCREEN_OVERLAY_RESOLUTION_Y 15 diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index b714a79a4c5..561c8720750 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -287,3 +287,6 @@ #define FLASH_PROTECTION_NONE 0 #define FLASH_PROTECTION_FLASH 1 #define FLASH_PROTECTION_WELDER 2 + +#define MAX_EYE_BLURRY_FILTER_SIZE 2 +#define EYE_BLUR_TO_FILTER_SIZE_MULTIPLIER 0.1 diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm index 437765a0a6f..fa357006723 100644 --- a/code/__HELPERS/text.dm +++ b/code/__HELPERS/text.dm @@ -8,10 +8,6 @@ * Misc */ - -/proc/format_table_name(table as text) - return GLOB.configuration.database.table_prefix + table - /* * Text sanitization */ diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 8478d8c0c91..4bbc7d03d07 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -539,10 +539,6 @@ Returns 1 if the chain up to the area contains the given typepath var/y = min(world.maxy, max(1, A.y + dy)) return locate(x,y,A.z) -//Makes sure MIDDLE is between LOW and HIGH. If not, it adjusts it. Returns the adjusted value. -/proc/between(low, middle, high) - return max(min(middle, high), low) - //returns random gauss number /proc/GaussRand(sigma) var/x,y,rsq @@ -2082,7 +2078,7 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new) /proc/log_connection(ckey, ip, cid, connection_type) ASSERT(connection_type in list(CONNECTION_TYPE_ESTABLISHED, CONNECTION_TYPE_DROPPED_IPINTEL, CONNECTION_TYPE_DROPPED_BANNED, CONNECTION_TYPE_DROPPED_INVALID)) - var/datum/db_query/query_accesslog = SSdbcore.NewQuery("INSERT INTO `[format_table_name("connection_log")]`(`datetime`, `ckey`, `ip`, `computerid`, `result`) VALUES(Now(), :ckey, :ip, :cid, :result)", list( + var/datum/db_query/query_accesslog = SSdbcore.NewQuery("INSERT INTO connection_log (`datetime`, `ckey`, `ip`, `computerid`, `result`) VALUES(Now(), :ckey, :ip, :cid, :result)", list( "ckey" = ckey, "ip" = "[ip ? ip : ""]", // This is important. NULL is not the same as "", and if you directly open the `.dmb` file, you get a NULL IP. "cid" = cid, diff --git a/code/_onclick/hud/fullscreen.dm b/code/_onclick/hud/fullscreen.dm index 9d00f216eac..f6c8880a485 100644 --- a/code/_onclick/hud/fullscreen.dm +++ b/code/_onclick/hud/fullscreen.dm @@ -99,11 +99,6 @@ /obj/screen/fullscreen/impaired icon_state = "impairedoverlay" -/obj/screen/fullscreen/blurry - icon = 'icons/mob/screen_gen.dmi' - screen_loc = "WEST,SOUTH to EAST,NORTH" - icon_state = "blurry" - /obj/screen/fullscreen/flash icon = 'icons/mob/screen_gen.dmi' screen_loc = "WEST,SOUTH to EAST,NORTH" diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index 0cfb6985b8e..9779e306939 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -37,6 +37,8 @@ var/action_buttons_hidden = FALSE var/list/obj/screen/plane_master/plane_masters = list() // see "appearance_flags" in the ref, assoc list of "[plane]" = object + ///Assoc list of controller groups, associated with key string group name with value of the plane master controller ref + var/list/atom/movable/plane_master_controller/plane_master_controllers = list() /mob/proc/create_mob_hud() if(client && !hud_used) @@ -53,6 +55,10 @@ plane_masters["[instance.plane]"] = instance instance.backdrop(mymob) + for(var/mytype in subtypesof(/atom/movable/plane_master_controller)) + var/atom/movable/plane_master_controller/controller_instance = new mytype(src) + plane_master_controllers[controller_instance.name] = controller_instance + /datum/hud/Destroy() if(mymob.hud_used == src) mymob.hud_used = null @@ -89,6 +95,7 @@ nightvisionicon = null QDEL_LIST_ASSOC_VAL(plane_masters) + QDEL_LIST_ASSOC_VAL(plane_master_controllers) mymob = null return ..() diff --git a/code/_onclick/hud/plane_master_controller.dm b/code/_onclick/hud/plane_master_controller.dm new file mode 100644 index 00000000000..b525dfc0ef3 --- /dev/null +++ b/code/_onclick/hud/plane_master_controller.dm @@ -0,0 +1,77 @@ +///Atom that manages and controls multiple planes. It's an atom so we can hook into add_filter etc. Multiple controllers can control one plane. +/atom/movable/plane_master_controller + ///List of planes in this controllers control. Initially this is a normal list, but becomes an assoc list of plane numbers as strings | plane instance + var/list/controlled_planes = list() + ///hud that owns this controller + var/datum/hud/owner_hud + +///Ensures that all the planes are correctly in the controlled_planes list. +/atom/movable/plane_master_controller/New(hud) + . = ..() + owner_hud = hud + var/assoc_controlled_planes = list() + for(var/i in controlled_planes) + var/obj/screen/plane_master/instance = owner_hud.plane_masters["[i]"] + assoc_controlled_planes["[i]"] = instance + controlled_planes = assoc_controlled_planes + +///Full override so we can just use filterrific +/atom/movable/plane_master_controller/add_filter(name, priority, list/params) + . = ..() + for(var/i in controlled_planes) + var/obj/screen/plane_master/pm_iterator = controlled_planes[i] + pm_iterator.add_filter(name, priority, params) + +///Full override so we can just use filterrific +/atom/movable/plane_master_controller/remove_filter(name_or_names) + . = ..() + for(var/i in controlled_planes) + var/obj/screen/plane_master/pm_iterator = controlled_planes[i] + pm_iterator.remove_filter(name_or_names) + +/atom/movable/plane_master_controller/update_filters() + . = ..() + for(var/i in controlled_planes) + var/obj/screen/plane_master/pm_iterator = controlled_planes[i] + pm_iterator.update_filters() + +///Gets all filters for this controllers plane masters +/atom/movable/plane_master_controller/proc/get_filters(name) + . = list() + for(var/i in controlled_planes) + var/obj/screen/plane_master/pm_iterator = controlled_planes[i] + . += pm_iterator.get_filter(name) + +///Transitions all filters owned by this plane master controller +/atom/movable/plane_master_controller/transition_filter(name, time, list/new_params, easing, loop) + . = ..() + for(var/i in controlled_planes) + var/obj/screen/plane_master/pm_iterator = controlled_planes[i] + pm_iterator.transition_filter(name, time, new_params, easing, loop) + +///Full override so we can just use filterrific +/atom/movable/plane_master_controller/add_atom_colour(coloration, colour_priority) + . = ..() + for(var/i in controlled_planes) + var/obj/screen/plane_master/pm_iterator = controlled_planes[i] + pm_iterator.add_atom_colour(coloration, colour_priority) + + +///Removes an instance of colour_type from the atom's atom_colours list +/atom/movable/plane_master_controller/remove_atom_colour(colour_priority, coloration) + . = ..() + for(var/i in controlled_planes) + var/obj/screen/plane_master/pm_iterator = controlled_planes[i] + pm_iterator.remove_atom_colour(colour_priority, coloration) + + +///Resets the atom's color to null, and then sets it to the highest priority colour available +/atom/movable/plane_master_controller/update_atom_colour() + for(var/i in controlled_planes) + var/obj/screen/plane_master/pm_iterator = controlled_planes[i] + pm_iterator.update_atom_colour() + + +/atom/movable/plane_master_controller/game + name = PLANE_MASTERS_GAME + controlled_planes = list(FLOOR_PLANE, GAME_PLANE, LIGHTING_PLANE) diff --git a/code/controllers/configuration/sections/database_configuration.dm b/code/controllers/configuration/sections/database_configuration.dm index d95aedcf193..e7ed707f573 100644 --- a/code/controllers/configuration/sections/database_configuration.dm +++ b/code/controllers/configuration/sections/database_configuration.dm @@ -14,9 +14,7 @@ /// SQL password var/password = "root" // Dont do this in prod. Please...... /// Database name - var/db = "feedback" // AA TODO: Rename to paradise_gamedb - /// Table prefix - var/table_prefix = "erro_" // AA TODO: Remove table prefixes + var/db = "paradise_gamedb" /// Time in seconds for async queries to time out var/async_query_timeout = 10 /// Thread limit for async queries @@ -27,7 +25,6 @@ #ifdef UNIT_TESTS enabled = TRUE - table_prefix = "" // This needs to happen in the CI environment to ensure the example SQL version gets updated. CONFIG_LOAD_NUM(version, data["sql_version"]) @@ -41,7 +38,6 @@ CONFIG_LOAD_STR(username, data["sql_username"]) CONFIG_LOAD_STR(password, data["sql_password"]) CONFIG_LOAD_STR(db, data["sql_database"]) - CONFIG_LOAD_STR(table_prefix, data["sql_table_prefix"]) CONFIG_LOAD_NUM(async_query_timeout, data["async_query_timeout"]) CONFIG_LOAD_NUM(async_thread_limit, data["async_thread_limit"]) #endif diff --git a/code/controllers/subsystem/blackbox.dm b/code/controllers/subsystem/blackbox.dm index acfb7444323..37e4299b06d 100644 --- a/code/controllers/subsystem/blackbox.dm +++ b/code/controllers/subsystem/blackbox.dm @@ -65,7 +65,7 @@ SUBSYSTEM_DEF(blackbox) sqlversion = versions[FV.key] var/datum/db_query/query_feedback_save = SSdbcore.NewQuery({" - INSERT IGNORE INTO [format_table_name("feedback")] (datetime, round_id, key_name, key_type, version, json) + INSERT IGNORE INTO feedback (datetime, round_id, key_name, key_type, version, json) VALUES (NOW(), :rid, :keyname, :keytype, :version, :json)"}, list( "rid" = text2num(GLOB.round_id), "keyname" = FV.key, @@ -287,7 +287,7 @@ SUBSYSTEM_DEF(blackbox) lakey = L.lastattackerckey var/datum/db_query/deathquery = SSdbcore.NewQuery({" - INSERT INTO [format_table_name("death")] (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss, coord) + INSERT INTO death (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss, coord) VALUES (:name, :key, :job, :special, :pod, NOW(), :laname, :lakey, :gender, :bruteloss, :fireloss, :brainloss, :oxyloss, :coord)"}, list( "name" = L.real_name, diff --git a/code/controllers/subsystem/changelog.dm b/code/controllers/subsystem/changelog.dm index 3a35488e562..55221263033 100644 --- a/code/controllers/subsystem/changelog.dm +++ b/code/controllers/subsystem/changelog.dm @@ -24,7 +24,7 @@ SUBSYSTEM_DEF(changelog) if(!SSdbcore.IsConnected()) return ..() - var/datum/db_query/latest_cl_date = SSdbcore.NewQuery("SELECT CAST(UNIX_TIMESTAMP(date_merged) AS CHAR) AS ut FROM [format_table_name("changelog")] ORDER BY date_merged DESC LIMIT 1") + var/datum/db_query/latest_cl_date = SSdbcore.NewQuery("SELECT CAST(UNIX_TIMESTAMP(date_merged) AS CHAR) AS ut FROM changelog ORDER BY date_merged DESC LIMIT 1") if(!latest_cl_date.warn_execute()) qdel(latest_cl_date) // Abort if we cant do this @@ -63,7 +63,7 @@ SUBSYSTEM_DEF(changelog) C.prefs.lastchangelog = current_cl_timestamp var/datum/db_query/updatePlayerCLTime = SSdbcore.NewQuery( - "UPDATE [format_table_name("player")] SET lastchangelog=:lastchangelog WHERE ckey=:ckey", + "UPDATE player SET lastchangelog=:lastchangelog WHERE ckey=:ckey", list( "lastchangelog" = current_cl_timestamp, "ckey" = C.ckey diff --git a/code/controllers/subsystem/dbcore.dm b/code/controllers/subsystem/dbcore.dm index 4a845c375ea..f6974a2fb17 100644 --- a/code/controllers/subsystem/dbcore.dm +++ b/code/controllers/subsystem/dbcore.dm @@ -142,7 +142,7 @@ SUBSYSTEM_DEF(dbcore) //This is as close as we can get to the true round end before Disconnect() without changing where it's called, defeating the reason this is a subsystem if(SSdbcore.Connect()) var/datum/db_query/query_round_shutdown = SSdbcore.NewQuery( - "UPDATE [format_table_name("round")] SET shutdown_datetime = Now(), end_state = :end_state WHERE id = :round_id", + "UPDATE round SET shutdown_datetime = Now(), end_state = :end_state WHERE id = :round_id", list("end_state" = SSticker.end_state, "round_id" = GLOB.round_id) ) query_round_shutdown.Execute() @@ -160,7 +160,7 @@ SUBSYSTEM_DEF(dbcore) if(!IsConnected()) return var/datum/db_query/query_round_initialize = SSdbcore.NewQuery( - "INSERT INTO [format_table_name("round")] (initialize_datetime, server_ip, server_port) VALUES (Now(), INET_ATON(:internet_address), :port)", + "INSERT INTO round (initialize_datetime, server_ip, server_port) VALUES (Now(), INET_ATON(:internet_address), :port)", list("internet_address" = world.internet_address || "0", "port" = "[world.port]") ) query_round_initialize.Execute(async = FALSE) @@ -177,7 +177,7 @@ SUBSYSTEM_DEF(dbcore) if(!IsConnected()) return var/datum/db_query/query_round_start = SSdbcore.NewQuery( - "UPDATE [format_table_name("round")] SET start_datetime=NOW(), commit_hash=:hash WHERE id=:round_id", + "UPDATE round SET start_datetime=NOW(), commit_hash=:hash WHERE id=:round_id", list("hash" = GLOB.revision_info.commit_hash, "round_id" = GLOB.round_id) ) query_round_start.Execute(async = FALSE) // This happens during a time of intense server lag, so should be non-async @@ -193,7 +193,7 @@ SUBSYSTEM_DEF(dbcore) if(!IsConnected()) return var/datum/db_query/query_round_end = SSdbcore.NewQuery( - "UPDATE [format_table_name("round")] SET end_datetime = Now(), game_mode_result = :game_mode_result WHERE id = :round_id", + "UPDATE round SET end_datetime = Now(), game_mode_result = :game_mode_result WHERE id = :round_id", list("game_mode_result" = SSticker.mode_result, "station_name" = station_name(), "round_id" = GLOB.round_id) ) query_round_end.Execute() diff --git a/code/controllers/subsystem/jobs.dm b/code/controllers/subsystem/jobs.dm index 415e04e8611..f7660f4d75a 100644 --- a/code/controllers/subsystem/jobs.dm +++ b/code/controllers/subsystem/jobs.dm @@ -740,7 +740,7 @@ SUBSYSTEM_DEF(jobs) continue // If a client logs out in the middle of this var/datum/db_query/exp_read = SSdbcore.NewQuery( - "SELECT exp FROM [format_table_name("player")] WHERE ckey=:ckey", + "SELECT exp FROM player WHERE ckey=:ckey", list("ckey" = C.ckey) ) @@ -824,7 +824,7 @@ SUBSYSTEM_DEF(jobs) C.prefs.exp = new_exp var/datum/db_query/update_query = SSdbcore.NewQuery( - "UPDATE [format_table_name("player")] SET exp =:newexp, lastseen=NOW() WHERE ckey=:ckey", + "UPDATE player SET exp =:newexp, lastseen=NOW() WHERE ckey=:ckey", list( "newexp" = new_exp, "ckey" = C.ckey @@ -834,7 +834,7 @@ SUBSYSTEM_DEF(jobs) player_update_queries += update_query var/datum/db_query/update_query_history = SSdbcore.NewQuery({" - INSERT INTO [format_table_name("playtime_history")] (ckey, date, time_living, time_ghost) + INSERT INTO playtime_history (ckey, date, time_living, time_ghost) VALUES (:ckey, CURDATE(), :addedliving, :addedghost) ON DUPLICATE KEY UPDATE time_living=time_living + VALUES(time_living), time_ghost=time_ghost + VALUES(time_ghost)"}, list( diff --git a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm index a816c18d0c5..044913acb89 100644 --- a/code/controllers/subsystem/mapping.dm +++ b/code/controllers/subsystem/mapping.dm @@ -128,7 +128,7 @@ SUBSYSTEM_DEF(mapping) if(!SSdbcore.IsConnected()) return var/datum/db_query/query_set_map = SSdbcore.NewQuery( - "UPDATE [format_table_name("round")] SET start_datetime=NOW(), map_name=:mapname, station_name=:stationname WHERE id=:round_id", + "UPDATE round SET start_datetime=NOW(), map_name=:mapname, station_name=:stationname WHERE id=:round_id", list("mapname" = map_datum.technical_name, "stationname" = map_datum.fluff_name, "round_id" = GLOB.round_id) ) query_set_map.Execute(async = FALSE) // This happens during a time of intense server lag, so should be non-async diff --git a/code/controllers/subsystem/statistics.dm b/code/controllers/subsystem/statistics.dm index 375bb47486f..63c20742904 100644 --- a/code/controllers/subsystem/statistics.dm +++ b/code/controllers/subsystem/statistics.dm @@ -18,7 +18,7 @@ SUBSYSTEM_DEF(statistics) return else var/datum/db_query/statquery = SSdbcore.NewQuery( - "INSERT INTO [format_table_name("legacy_population")] (playercount, admincount, time) VALUES (:playercount, :admincount, NOW())", + "INSERT INTO legacy_population (playercount, admincount, time) VALUES (:playercount, :admincount, NOW())", list( "playercount" = length(GLOB.clients), "admincount" = length(GLOB.admins) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index fc5e1d8eb5f..d7223c1209d 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -460,7 +460,7 @@ filters += filter(arglist(arguments)) UNSETEMPTY(filter_data) -/atom/proc/transition_filter(name, time, list/new_params, easing, loop) +/atom/proc/transition_filter(name, time, list/new_params, easing = LINEAR_EASING, loop = 1) var/filter = get_filter(name) if(!filter) return diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 583daa7ade3..7232239d6f5 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -3,7 +3,7 @@ appearance_flags = TILE_BOUND glide_size = 8 // Default, adjusted when mobs move based on their movement delays var/last_move = null - var/anchored = 0 + var/anchored = FALSE var/move_resist = MOVE_RESIST_DEFAULT var/move_force = MOVE_FORCE_DEFAULT var/pull_force = PULL_FORCE_DEFAULT @@ -13,13 +13,15 @@ var/datum/thrownthing/throwing = null var/throw_speed = 2 //How many tiles to move per ds when being thrown. Float values are fully supported var/throw_range = 7 - var/no_spin = 0 - var/no_spin_thrown = 0 - var/moved_recently = 0 + var/no_spin = FALSE + var/no_spin_thrown = FALSE + var/moved_recently = FALSE var/mob/pulledby = null var/atom/movable/pulling + /// Face towards the atom while pulling it + var/face_while_pulling = FALSE var/throwforce = 0 - var/canmove = 1 + var/canmove = TRUE var/inertia_dir = 0 var/atom/inertia_last_loc diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 2b0000d9c38..88a287efc02 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -92,7 +92,7 @@ // I wonder what this could do guessing by the name /datum/game_mode/proc/set_mode_in_db() if(SSticker?.mode && SSdbcore.IsConnected()) - var/datum/db_query/query_round_game_mode = SSdbcore.NewQuery("UPDATE [format_table_name("round")] SET game_mode=:gm WHERE id=:rid", list( + var/datum/db_query/query_round_game_mode = SSdbcore.NewQuery("UPDATE round SET game_mode=:gm WHERE id=:rid", list( "gm" = SSticker.mode.name, "rid" = GLOB.round_id )) diff --git a/code/game/jobs/whitelist.dm b/code/game/jobs/whitelist.dm index b327da6390f..b459576d960 100644 --- a/code/game/jobs/whitelist.dm +++ b/code/game/jobs/whitelist.dm @@ -8,7 +8,7 @@ return FALSE else var/datum/db_query/job_read = SSdbcore.NewQuery( - "SELECT job FROM [format_table_name("whitelist")] WHERE ckey=:ckey", + "SELECT job FROM whitelist WHERE ckey=:ckey", list("ckey" = M.ckey) ) @@ -43,7 +43,7 @@ return FALSE else var/datum/db_query/species_read = SSdbcore.NewQuery( - "SELECT species FROM [format_table_name("whitelist")] WHERE ckey=:ckey", + "SELECT species FROM whitelist WHERE ckey=:ckey", list("ckey" = M.ckey) ) diff --git a/code/game/machinery/computer/atmos_control.dm b/code/game/machinery/computer/atmos_control.dm index 287cca55b41..05dc8103351 100644 --- a/code/game/machinery/computer/atmos_control.dm +++ b/code/game/machinery/computer/atmos_control.dm @@ -546,7 +546,7 @@ if(href_list["out_set_pressure"]) var/response=input(usr,"Set new pressure, in kPa. \[0-[50*ONE_ATMOSPHERE]\]") as num pressure_setting = text2num(response) - pressure_setting = between(0, pressure_setting, 50*ONE_ATMOSPHERE) + pressure_setting = clamp(pressure_setting, 0, 50*ONE_ATMOSPHERE) if(!radio_connection) return 0 diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 901844c0c14..154f094d941 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -650,3 +650,19 @@ Class Procs: . = . % 9 AM.pixel_x = -8 + ((.%3)*8) AM.pixel_y = -8 + (round( . / 3)*8) + +/** + * Makes sure the user is allowed to interact with the machine when they use a shortcut, like Control or Alt-clicking. + * + * Arguments: + * * user - the mob who is trying to interact with the machine. + */ +/obj/machinery/proc/can_use_shortcut(mob/living/user) + if(user.incapacitated()) + to_chat(user, "You can't do that right now!") + return FALSE + if(ishuman(user) && in_range(src, user)) + return TRUE + if(issilicon(user)) + return TRUE + return FALSE diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index 375cb4b8628..babae081e9d 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -1177,7 +1177,7 @@ /obj/item/stack/medical/splint = 4, /obj/item/reagent_containers/glass/beaker = 4, /obj/item/reagent_containers/dropper = 4, /obj/item/healthanalyzer = 4, /obj/item/healthupgrade = 4, /obj/item/reagent_containers/hypospray/safety = 2, /obj/item/sensor_device = 2, /obj/item/pinpointer/crew = 2) contraband = list(/obj/item/reagent_containers/glass/bottle/sulfonal = 1, /obj/item/reagent_containers/glass/bottle/pancuronium = 1) - armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + armor = list(melee = 50, bullet = 20, laser = 20, energy = 20, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 70) resistance_flags = FIRE_PROOF refill_canister = /obj/item/vending_refill/medical @@ -1203,7 +1203,7 @@ density = FALSE //It is wall-mounted, and thus, not dense. --Superxpdude products = list(/obj/item/stack/medical/bruise_pack = 2, /obj/item/stack/medical/ointment = 2, /obj/item/reagent_containers/hypospray/autoinjector = 4, /obj/item/healthanalyzer = 1) contraband = list(/obj/item/reagent_containers/syringe/charcoal = 4, /obj/item/reagent_containers/syringe/antiviral = 4, /obj/item/reagent_containers/food/pill/tox = 1) - armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + armor = list(melee = 50, bullet = 20, laser = 20, energy = 20, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 70) resistance_flags = FIRE_PROOF refill_canister = /obj/item/vending_refill/wallmed @@ -1522,7 +1522,7 @@ contraband = list(/obj/item/weldingtool/hugetank = 2,/obj/item/clothing/gloves/color/fyellow = 2) premium = list(/obj/item/clothing/gloves/color/yellow = 1) refill_canister = /obj/item/vending_refill/youtool - armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 70) + armor = list(melee = 50, bullet = 20, laser = 20, energy = 20, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 70) resistance_flags = FIRE_PROOF diff --git a/code/game/objects/effects/gibs.dm b/code/game/objects/effects/gibs.dm index 5503ac91dd1..f97b15c1112 100644 --- a/code/game/objects/effects/gibs.dm +++ b/code/game/objects/effects/gibs.dm @@ -1,8 +1,8 @@ -/proc/gibs(atom/location, datum/dna/MobDNA) //CARN MARKER - new /obj/effect/gibspawner/generic(get_turf(location), MobDNA) +/proc/gibs(atom/location, datum/dna/mob_dna) //CARN MARKER + new /obj/effect/gibspawner/generic(get_turf(location), mob_dna) -/proc/hgibs(atom/location, datum/dna/MobDNA) - new /obj/effect/gibspawner/human(get_turf(location), MobDNA) +/proc/hgibs(atom/location, datum/dna/mob_dna) + new /obj/effect/gibspawner/human(get_turf(location), mob_dna) /proc/xgibs(atom/location) new /obj/effect/gibspawner/xeno(get_turf(location)) @@ -16,38 +16,55 @@ var/list/gibamounts = list() var/list/gibdirections = list() //of lists -/obj/effect/gibspawner/New(location, datum/dna/MobDNA) +/obj/effect/gibspawner/Initialize(mapload, datum/dna/mob_dna) ..() + ASSERT(length(gibtypes) == length(gibamounts)) + ASSERT(length(gibamounts) == length(gibdirections)) - if(istype(loc,/turf)) //basically if a badmin spawns it - Gib(loc, MobDNA) + if(isturf(loc)) + spawn_gibs(loc, mob_dna) -/obj/effect/gibspawner/proc/Gib(atom/location, datum/dna/MobDNA = null) - if(gibtypes.len != gibamounts.len || gibamounts.len != gibdirections.len) - to_chat(world, "Gib list length mismatch!") - return + return INITIALIZE_HINT_QDEL // qdel once done +/** + * Spawns the gibs (and sparks if applicable) from the gib spawner. + * + * Arguments: + * * location - The position to spawn the gibs on. + * * mob_dna - The [/datum/dna] controlling the blood DNA and colour of the gibs. + */ +/obj/effect/gibspawner/proc/spawn_gibs(atom/location, datum/dna/mob_dna) var/obj/effect/decal/cleanable/blood/gibs/gib = null if(sparks) do_sparks(2, 1, location) - for(var/i = 1, i<= gibtypes.len, i++) - if(gibamounts[i]) - for(var/j = 1, j<= gibamounts[i], j++) - var/gibType = gibtypes[i] - gib = new gibType(location) + for(var/gibtype in 1 to length(gibtypes)) + if(!gibamounts[gibtype]) + continue + for(var/I in 1 to gibamounts[gibtype]) + var/gib_type = gibtypes[gibtype] + gib = new gib_type(location) + gib_dna(gib, mob_dna) - gib.blood_DNA = list() - if(MobDNA) - gib.blood_DNA[MobDNA.unique_enzymes] = MobDNA.blood_type - else if(istype(src, /obj/effect/gibspawner/xeno)) - gib.blood_DNA["UNKNOWN DNA"] = "X*" - else if(istype(src, /obj/effect/gibspawner/human)) // Probably a monkey - gib.blood_DNA["Non-human DNA"] = "A+" - var/list/directions = gibdirections[i] - if(directions.len) - gib.streak(directions) + var/list/directions = gibdirections[gibtype] + if(length(directions)) + gib.streak(directions) - qdel(src) +/** + * Assigns DNA and blood colour to mob gibs. + * + * Returns FALSE if there was no DNA data to transfer to the gibs, and TRUE if there was. + * Arguments: + * * gib - The [/obj/effect/decal/cleanable/blood/gibs] that is being edited. + * * mob_dna - The [/datum/dna] which is being transferred onto the gib. + */ +/obj/effect/gibspawner/proc/gib_dna(obj/effect/decal/cleanable/blood/gibs/gib, datum/dna/mob_dna) + if(!mob_dna) + return FALSE + + gib.basecolor = mob_dna.species.blood_color + gib.update_icon() + gib.blood_DNA[mob_dna.unique_enzymes] = mob_dna.blood_type + return TRUE diff --git a/code/game/objects/effects/spawners/gibspawner.dm b/code/game/objects/effects/spawners/gibspawner.dm index 998fb4a2868..3ca1b7d5ae5 100644 --- a/code/game/objects/effects/spawners/gibspawner.dm +++ b/code/game/objects/effects/spawners/gibspawner.dm @@ -15,6 +15,10 @@ gibamounts[6] = pick(0,1,2) ..() +/obj/effect/gibspawner/human/gib_dna(obj/effect/decal/cleanable/blood/gibs/gib, datum/dna/mob_dna) + if(!..()) // Probably admin spawned + gib.blood_DNA["Non-human DNA"] = "A+" + /obj/effect/gibspawner/xeno gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/xeno/up,/obj/effect/decal/cleanable/blood/gibs/xeno/down,/obj/effect/decal/cleanable/blood/gibs/xeno,/obj/effect/decal/cleanable/blood/gibs/xeno,/obj/effect/decal/cleanable/blood/gibs/xeno/body,/obj/effect/decal/cleanable/blood/gibs/xeno/limb,/obj/effect/decal/cleanable/blood/gibs/xeno/core) gibamounts = list(1,1,1,1,1,1,1) @@ -24,6 +28,10 @@ gibamounts[6] = pick(0,1,2) ..() +/obj/effect/gibspawner/xeno/gib_dna(obj/effect/decal/cleanable/blood/gibs/gib, datum/dna/mob_dna) + if(!..()) + gib.blood_DNA["UNKNOWN DNA"] = "X*" + /obj/effect/gibspawner/robot sparks = 1 gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/robot/up,/obj/effect/decal/cleanable/blood/gibs/robot/down,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot/limb) diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index 870ebe470cd..9fb4684f3ff 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -409,7 +409,6 @@ new /obj/item/soap(src) new /obj/item/grenade/chem_grenade/cleaner(src) new /obj/item/grenade/chem_grenade/cleaner(src) - new /obj/item/melee/flyswatter(src) update_icon() /obj/item/storage/belt/lazarus diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index e508b09fc8e..4d58c90a095 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -2,6 +2,7 @@ icon = 'icons/obj/structures.dmi' pressure_resistance = 8 max_integrity = 300 + face_while_pulling = TRUE var/climbable var/mob/climber var/broken = FALSE diff --git a/code/game/objects/structures/curtains.dm b/code/game/objects/structures/curtains.dm index 029b0a761ad..da8b0f48476 100644 --- a/code/game/objects/structures/curtains.dm +++ b/code/game/objects/structures/curtains.dm @@ -5,6 +5,7 @@ icon = 'icons/obj/curtain.dmi' name = "curtain" icon_state = "closed" + face_while_pulling = FALSE layer = SHOWER_CLOSED_LAYER opacity = 1 density = 0 diff --git a/code/game/objects/structures/engicart.dm b/code/game/objects/structures/engicart.dm index a77dc35b909..52e1d0ca8e1 100644 --- a/code/game/objects/structures/engicart.dm +++ b/code/game/objects/structures/engicart.dm @@ -3,6 +3,7 @@ desc = "A cart for storing engineering items." icon = 'icons/obj/engicart.dmi' icon_state = "cart" + face_while_pulling = FALSE anchored = 0 density = 1 var/obj/item/stack/sheet/glass/myglass = null diff --git a/code/game/objects/structures/foodcart.dm b/code/game/objects/structures/foodcart.dm index 3a9a3414986..0253ad66952 100644 --- a/code/game/objects/structures/foodcart.dm +++ b/code/game/objects/structures/foodcart.dm @@ -3,6 +3,7 @@ desc = "A cart for transporting food and drinks." icon = 'icons/obj/foodcart.dmi' icon_state = "cart" + face_while_pulling = FALSE anchored = 0 density = 1 //Food slots diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm index e4bd6b26140..5c9b3393808 100644 --- a/code/game/objects/structures/janicart.dm +++ b/code/game/objects/structures/janicart.dm @@ -7,6 +7,7 @@ icon_state = "cart" anchored = 0 density = 1 + face_while_pulling = FALSE container_type = OPENCONTAINER //copypaste sorry var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm index 53b0ce8f1eb..4c5c8136182 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm @@ -70,6 +70,7 @@ name = "roller bed" icon = 'icons/obj/rollerbed.dmi' icon_state = "down" + face_while_pulling = FALSE resistance_flags = NONE anchored = FALSE comfort = 1 diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm index 9b8eb06e216..1318be1d310 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -11,6 +11,7 @@ max_integrity = 250 integrity_failure = 25 buckle_offset = 0 + face_while_pulling = FALSE var/buildstacktype = /obj/item/stack/sheet/metal var/buildstackamount = 1 var/item_chair = /obj/item/chair // if null it can't be picked up diff --git a/code/modules/admin/IsBanned.dm b/code/modules/admin/IsBanned.dm index 5e5f8c07343..8e1ee44ac21 100644 --- a/code/modules/admin/IsBanned.dm +++ b/code/modules/admin/IsBanned.dm @@ -47,7 +47,7 @@ // If 2FA is enabled, makes sure they were authed within the last minute if(check_2fa && GLOB.configuration.system._2fa_auth_host) // First see if they exist at all - var/datum/db_query/check_query = SSdbcore.NewQuery("SELECT 2fa_status, ip FROM [format_table_name("player")] WHERE ckey=:ckey", list("ckey" = ckey(key))) + var/datum/db_query/check_query = SSdbcore.NewQuery("SELECT 2fa_status, ip FROM player WHERE ckey=:ckey", list("ckey" = ckey(key))) if(!check_query.warn_execute()) message_admins("Failed to do a DB 2FA check for [key]. You have been warned.") @@ -71,7 +71,7 @@ // Have it set to always check, or their IP is different if(_2fa_enabled && (always_check || (address != last_ip))) // They have 2FA enabled, lets make sure they have authed within the last minute - var/datum/db_query/verify_query = SSdbcore.NewQuery("SELECT ckey FROM [format_table_name("2fa_secrets")] WHERE (last_time BETWEEN NOW() - INTERVAL 1 MINUTE AND NOW()) AND ckey=:ckey LIMIT 1", list( + var/datum/db_query/verify_query = SSdbcore.NewQuery("SELECT ckey FROM 2fa_secrets WHERE (last_time BETWEEN NOW() - INTERVAL 1 MINUTE AND NOW()) AND ckey=:ckey LIMIT 1", list( "ckey" = ckey(key) )) @@ -120,7 +120,7 @@ sql_query_params["cid"] = computer_id var/datum/db_query/query = SSdbcore.NewQuery({" - SELECT ckey, ip, computerid, a_ckey, reason, expiration_time, duration, bantime, bantype, ban_round_id FROM [format_table_name("ban")] + SELECT ckey, ip, computerid, a_ckey, reason, expiration_time, duration, bantime, bantype, ban_round_id FROM ban WHERE (ckey=:ckeytext [ipquery] [cidquery]) AND (bantype = 'PERMABAN' OR bantype = 'ADMIN_PERMABAN' OR ((bantype = 'TEMPBAN' OR bantype = 'ADMIN_TEMPBAN') AND expiration_time > Now())) AND isnull(unbanned)"}, sql_query_params) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 61e5570148e..ba676aa5daf 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -788,9 +788,15 @@ GLOBAL_VAR_INIT(gamma_ship_location, 1) // 0 = station , 1 = space if(GLOB.gamma_ship_location == 1) fromArea = locate(/area/shuttle/gamma/space) toArea = locate(/area/shuttle/gamma/station) + for(var/obj/machinery/door/airlock/hatch/gamma/H in GLOB.airlocks) + H.unlock(TRUE) + GLOB.event_announcement.Announce("Central Command has deployed the Gamma Armory shuttle.", new_sound = 'sound/AI/commandreport.ogg') else fromArea = locate(/area/shuttle/gamma/station) toArea = locate(/area/shuttle/gamma/space) + for(var/obj/machinery/door/airlock/hatch/gamma/H in GLOB.airlocks) + H.lock(TRUE) + GLOB.event_announcement.Announce("Central Command has recalled the Gamma Armory shuttle.", new_sound = 'sound/AI/commandreport.ogg') fromArea.move_contents_to(toArea) for(var/obj/machinery/mech_bay_recharge_port/P in toArea) diff --git a/code/modules/admin/admin_memo.dm b/code/modules/admin/admin_memo.dm index 71d96715a09..cda97437097 100644 --- a/code/modules/admin/admin_memo.dm +++ b/code/modules/admin/admin_memo.dm @@ -22,7 +22,7 @@ switch(task) if("Write") var/datum/db_query/query_memocheck = SSdbcore.NewQuery( - "SELECT ckey FROM [format_table_name("memo")] WHERE ckey=:ckey", + "SELECT ckey FROM memo WHERE ckey=:ckey", list("ckey" = ckey) ) @@ -41,7 +41,7 @@ return var/datum/db_query/query_memoadd = SSdbcore.NewQuery( - "INSERT INTO [format_table_name("memo")] (ckey, memotext, timestamp) VALUES (:ckey, :memotext, NOW())", + "INSERT INTO memo (ckey, memotext, timestamp) VALUES (:ckey, :memotext, NOW())", list( "ckey" = ckey, "memotext" = memotext @@ -57,7 +57,7 @@ qdel(query_memoadd) if("Edit") - var/datum/db_query/query_memolist = SSdbcore.NewQuery("SELECT ckey FROM [format_table_name("memo")]") + var/datum/db_query/query_memolist = SSdbcore.NewQuery("SELECT ckey FROM memo") if(!query_memolist.warn_execute()) qdel(query_memolist) @@ -78,7 +78,7 @@ return var/datum/db_query/query_memofind = SSdbcore.NewQuery( - "SELECT memotext FROM [format_table_name("memo")] WHERE ckey=:ckey", + "SELECT memotext FROM memo WHERE ckey=:ckey", list("ckey" = target_ckey) ) @@ -96,7 +96,7 @@ var/edit_text = "Edited by [target_ckey] on [SQLtime()] from
[old_memo]
to
[new_memo]
" var/datum/db_query/update_query = SSdbcore.NewQuery( - "UPDATE [format_table_name("memo")] SET memotext=:newmemo, last_editor=:lasteditor, edits=CONCAT(IFNULL(edits,''),:edittext) WHERE ckey=:targetckey", + "UPDATE memo SET memotext=:newmemo, last_editor=:lasteditor, edits=CONCAT(IFNULL(edits,''),:edittext) WHERE ckey=:targetckey", list( "newmemo" = new_memo, "lasteditor" = ckey, @@ -120,7 +120,7 @@ qdel(query_memofind) if("Show") - var/datum/db_query/query_memoshow = SSdbcore.NewQuery("SELECT ckey, memotext, timestamp, last_editor FROM [format_table_name("memo")]") + var/datum/db_query/query_memoshow = SSdbcore.NewQuery("SELECT ckey, memotext, timestamp, last_editor FROM memo") if(!query_memoshow.warn_execute()) qdel(query_memoshow) return @@ -141,7 +141,7 @@ qdel(query_memoshow) if("Remove") - var/datum/db_query/query_memodellist = SSdbcore.NewQuery("SELECT ckey FROM [format_table_name("memo")]") + var/datum/db_query/query_memodellist = SSdbcore.NewQuery("SELECT ckey FROM memo") if(!query_memodellist.warn_execute()) qdel(query_memodellist) return @@ -161,7 +161,7 @@ return var/datum/db_query/query_memodel = SSdbcore.NewQuery( - "DELETE FROM [format_table_name("memo")] WHERE ckey=:ckey", + "DELETE FROM memo WHERE ckey=:ckey", list("ckey" = target_ckey) ) diff --git a/code/modules/admin/admin_ranks.dm b/code/modules/admin/admin_ranks.dm index 9f0f37df719..3fd0df9c4d7 100644 --- a/code/modules/admin/admin_ranks.dm +++ b/code/modules/admin/admin_ranks.dm @@ -91,7 +91,7 @@ GLOBAL_PROTECT(admin_ranks) // this shit is being protected for obvious reasons load_admins() return - var/datum/db_query/query = SSdbcore.NewQuery("SELECT ckey, admin_rank, level, flags FROM [format_table_name("admin")]") + var/datum/db_query/query = SSdbcore.NewQuery("SELECT ckey, admin_rank, level, flags FROM admin") if(!query.warn_execute(async=run_async)) qdel(query) return diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 62b2a01e3eb..598705668ae 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -691,7 +691,7 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list( return var/datum/db_query/rank_read = SSdbcore.NewQuery( - "SELECT admin_rank FROM [format_table_name("admin")] WHERE ckey=:ckey", + "SELECT admin_rank FROM admin WHERE ckey=:ckey", list("ckey" = ckey) ) @@ -717,7 +717,7 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list( return var/datum/db_query/admin_read = SSdbcore.NewQuery( - "SELECT ckey, admin_rank, flags FROM [format_table_name("admin")] WHERE ckey=:ckey", + "SELECT ckey, admin_rank, flags FROM admin WHERE ckey=:ckey", list("ckey" = ckey) ) diff --git a/code/modules/admin/banappearance.dm b/code/modules/admin/banappearance.dm index 75816c22c43..4544edba3f8 100644 --- a/code/modules/admin/banappearance.dm +++ b/code/modules/admin/banappearance.dm @@ -59,7 +59,7 @@ DEBUG return //appearance bans - var/datum/db_query/appearanceban_query = SSdbcore.NewQuery("SELECT ckey FROM [format_table_name("ban")] WHERE bantype = 'APPEARANCE_BAN' AND NOT unbanned = 1") + var/datum/db_query/appearanceban_query = SSdbcore.NewQuery("SELECT ckey FROM ban WHERE bantype = 'APPEARANCE_BAN' AND NOT unbanned = 1") if(!appearanceban_query.warn_execute()) qdel(appearanceban_query) diff --git a/code/modules/admin/banjob.dm b/code/modules/admin/banjob.dm index 024b264fbb1..29e615c8932 100644 --- a/code/modules/admin/banjob.dm +++ b/code/modules/admin/banjob.dm @@ -79,7 +79,7 @@ GLOBAL_DATUM_INIT(jobban_regex, /regex, regex("(\[\\S]+) - (\[^#]+\[^# ])(?: ## return //Job permabans - var/datum/db_query/permabans = SSdbcore.NewQuery("SELECT ckey, job FROM [format_table_name("ban")] WHERE bantype = 'JOB_PERMABAN' AND isnull(unbanned)") + var/datum/db_query/permabans = SSdbcore.NewQuery("SELECT ckey, job FROM ban WHERE bantype = 'JOB_PERMABAN' AND isnull(unbanned)") if(!permabans.warn_execute(async=FALSE)) qdel(permabans) @@ -94,7 +94,7 @@ GLOBAL_DATUM_INIT(jobban_regex, /regex, regex("(\[\\S]+) - (\[^#]+\[^# ])(?: ## qdel(permabans) // Job tempbans - var/datum/db_query/tempbans = SSdbcore.NewQuery("SELECT ckey, job FROM [format_table_name("ban")] WHERE bantype = 'JOB_TEMPBAN' AND isnull(unbanned) AND expiration_time > Now()") + var/datum/db_query/tempbans = SSdbcore.NewQuery("SELECT ckey, job FROM ban WHERE bantype = 'JOB_TEMPBAN' AND isnull(unbanned) AND expiration_time > Now()") if(!tempbans.warn_execute(async=FALSE)) qdel(tempbans) @@ -152,7 +152,7 @@ GLOBAL_DATUM_INIT(jobban_regex, /regex, regex("(\[\\S]+) - (\[^#]+\[^# ])(?: ## //using the SQL ban system var/is_actually_banned = FALSE var/datum/db_query/select_query = SSdbcore.NewQuery({" - SELECT bantime, bantype, reason, job, duration, expiration_time, a_ckey FROM [format_table_name("ban")] + SELECT bantime, bantype, reason, job, duration, expiration_time, a_ckey FROM ban WHERE ckey LIKE :ckey AND ((bantype like 'JOB_TEMPBAN' AND expiration_time > Now()) OR (bantype like 'JOB_PERMABAN')) AND isnull(unbanned) ORDER BY bantime DESC LIMIT 100"}, list("ckey" = ckey) diff --git a/code/modules/admin/cookielog.dm b/code/modules/admin/cookielog.dm index a2de0c126fe..3f00fb40b36 100644 --- a/code/modules/admin/cookielog.dm +++ b/code/modules/admin/cookielog.dm @@ -35,7 +35,7 @@ var/has_note = FALSE var/raw_text = "" // Now lets see if we have a note logging the infraction in the past - var/datum/db_query/check_existing_note = SSdbcore.NewQuery("SELECT notetext FROM [format_table_name("notes")] WHERE ckey=:ckey AND adminckey=:ackey", list( + var/datum/db_query/check_existing_note = SSdbcore.NewQuery("SELECT notetext FROM notes WHERE ckey=:ckey AND adminckey=:ackey", list( "ckey" = cookie_holder_ckey, "ackey" = COOKIERECORD_PSUEDO_CKEY )) @@ -99,7 +99,7 @@ serialized_text = serialized_list.Join("
") if(has_note) // They have a note. Update. - var/datum/db_query/update_existing_note = SSdbcore.NewQuery("UPDATE [format_table_name("notes")] SET notetext=:nt, timestamp=NOW(), round_id=:rid WHERE ckey=:ckey AND adminckey=:ackey", list( + var/datum/db_query/update_existing_note = SSdbcore.NewQuery("UPDATE notes SET notetext=:nt, timestamp=NOW(), round_id=:rid WHERE ckey=:ckey AND adminckey=:ackey", list( "nt" = serialized_text, "rid" = GLOB.round_id, "ckey" = cookie_holder_ckey, diff --git a/code/modules/admin/db_ban/functions.dm b/code/modules/admin/db_ban/functions.dm index 9d0be1f83b5..d16b61ae690 100644 --- a/code/modules/admin/db_ban/functions.dm +++ b/code/modules/admin/db_ban/functions.dm @@ -86,7 +86,7 @@ message_admins("[key_name_admin(usr)] attempted to add a ban based on a non-existent mob, with no ckey provided. Report this bug.",1) return - var/datum/db_query/query = SSdbcore.NewQuery("SELECT id FROM [format_table_name("player")] WHERE ckey=:ckey", list( + var/datum/db_query/query = SSdbcore.NewQuery("SELECT id FROM player WHERE ckey=:ckey", list( "ckey" = ckey )) if(!query.warn_execute()) @@ -131,7 +131,7 @@ adminwho += ", [C]" if(maxadminbancheck) - var/datum/db_query/adm_query = SSdbcore.NewQuery("SELECT count(id) AS num FROM [format_table_name("ban")] WHERE (a_ckey=:a_ckey) AND (bantype = 'ADMIN_PERMABAN' OR (bantype = 'ADMIN_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)", list( + var/datum/db_query/adm_query = SSdbcore.NewQuery("SELECT count(id) AS num FROM ban WHERE (a_ckey=:a_ckey) AND (bantype = 'ADMIN_PERMABAN' OR (bantype = 'ADMIN_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)", list( "a_ckey" = a_ckey )) if(!adm_query.warn_execute()) @@ -146,7 +146,7 @@ qdel(adm_query) var/datum/db_query/query_insert = SSdbcore.NewQuery({" - INSERT INTO [format_table_name("ban")] (`id`,`bantime`,`serverip`,`bantype`,`reason`,`job`,`duration`,`rounds`,`expiration_time`,`ckey`,`computerid`,`ip`,`a_ckey`,`a_computerid`,`a_ip`,`who`,`adminwho`,`edits`,`unbanned`,`unbanned_datetime`,`unbanned_ckey`,`unbanned_computerid`,`unbanned_ip`,`ban_round_id`,`unbanned_round_id`) + INSERT INTO ban (`id`,`bantime`,`serverip`,`bantype`,`reason`,`job`,`duration`,`rounds`,`expiration_time`,`ckey`,`computerid`,`ip`,`a_ckey`,`a_computerid`,`a_ip`,`who`,`adminwho`,`edits`,`unbanned`,`unbanned_datetime`,`unbanned_ckey`,`unbanned_computerid`,`unbanned_ip`,`ban_round_id`,`unbanned_round_id`) VALUES (null, Now(), :serverip, :bantype_str, :reason, :job, :duration, :rounds, Now() + INTERVAL :duration MINUTE, :ckey, :computerid, :ip, :a_ckey, :a_computerid, :a_ip, :who, :adminwho, '', null, null, null, null, null, :roundid, null) "}, list( // Get ready for parameters @@ -233,7 +233,7 @@ else bantype_sql = "bantype = '[bantype_str]'" - var/sql = "SELECT id FROM [format_table_name("ban")] WHERE ckey=:ckey AND [bantype_sql] AND (unbanned is null OR unbanned = false)" + var/sql = "SELECT id FROM ban WHERE ckey=:ckey AND [bantype_sql] AND (unbanned is null OR unbanned = false)" var/list/sql_params = list( "ckey" = ckey ) @@ -283,7 +283,7 @@ to_chat(usr, "Cancelled") return - var/datum/db_query/query = SSdbcore.NewQuery("SELECT ckey, duration, reason, job FROM [format_table_name("ban")] WHERE id=:banid", list( + var/datum/db_query/query = SSdbcore.NewQuery("SELECT ckey, duration, reason, job FROM ban WHERE id=:banid", list( "banid" = banid )) if(!query.warn_execute()) @@ -318,7 +318,7 @@ return var/edit_reason = "- [eckey] changed ban reason from \\\"[reason]\\\" to \\\"[value]\\\"
" - var/datum/db_query/update_query = SSdbcore.NewQuery("UPDATE [format_table_name("ban")] SET reason=:value, edits = CONCAT(IFNULL(edits,''), :edittext) WHERE id=:banid", list( + var/datum/db_query/update_query = SSdbcore.NewQuery("UPDATE ban SET reason=:value, edits = CONCAT(IFNULL(edits,''), :edittext) WHERE id=:banid", list( "edittext" = edit_reason, "banid" = banid, "value" = value @@ -337,7 +337,7 @@ return var/edittext = "- [eckey] changed ban duration from [duration] to [value]
" - var/datum/db_query/update_query = SSdbcore.NewQuery("UPDATE [format_table_name("ban")] SET duration=:value, edits = CONCAT(IFNULL(edits, ''), :edittext), expiration_time = DATE_ADD(bantime, INTERVAL :value MINUTE) WHERE id=:banid", list( + var/datum/db_query/update_query = SSdbcore.NewQuery("UPDATE ban SET duration=:value, edits = CONCAT(IFNULL(edits, ''), :edittext), expiration_time = DATE_ADD(bantime, INTERVAL :value MINUTE) WHERE id=:banid", list( "edittext" = edittext, "banid" = banid, "value" = value @@ -373,7 +373,7 @@ var/ban_number = 0 //failsafe var/pckey - var/datum/db_query/query = SSdbcore.NewQuery("SELECT ckey FROM [format_table_name("ban")] WHERE id=:banid", list( + var/datum/db_query/query = SSdbcore.NewQuery("SELECT ckey FROM ban WHERE id=:banid", list( "banid" = id )) if(!query.warn_execute()) @@ -400,7 +400,7 @@ var/unban_computerid = src.owner:computer_id var/unban_ip = src.owner:address - var/datum/db_query/query_update = SSdbcore.NewQuery("UPDATE [format_table_name("ban")] SET unbanned = 1, unbanned_datetime = Now(), unbanned_ckey=:unban_ckey, unbanned_computerid=:unban_computerid, unbanned_ip=:unban_ip, unbanned_round_id=:roundid WHERE id=:id", list( + var/datum/db_query/query_update = SSdbcore.NewQuery("UPDATE ban SET unbanned = 1, unbanned_datetime = Now(), unbanned_ckey=:unban_ckey, unbanned_computerid=:unban_computerid, unbanned_ip=:unban_ip, unbanned_round_id=:roundid WHERE id=:id", list( "unban_ckey" = unban_ckey, "unban_computerid" = unban_computerid, "unban_ip" = unban_ip, @@ -587,7 +587,7 @@ var/datum/db_query/select_query = SSdbcore.NewQuery({" SELECT id, bantime, bantype, reason, job, duration, expiration_time, ckey, a_ckey, unbanned, unbanned_ckey, unbanned_datetime, edits, ip, computerid, ban_round_id, unbanned_round_id - FROM [format_table_name("ban")] WHERE 1 [playersearch] [adminsearch] [ipsearch] [cidsearch] [bantypesearch] ORDER BY bantime DESC LIMIT 100"}, sql_params) + FROM ban WHERE 1 [playersearch] [adminsearch] [ipsearch] [cidsearch] [bantypesearch] ORDER BY bantime DESC LIMIT 100"}, sql_params) if(!select_query.warn_execute()) qdel(select_query) @@ -673,7 +673,7 @@ /proc/flag_account_for_forum_sync(ckey) if(!SSdbcore.IsConnected()) return - var/datum/db_query/adm_query = SSdbcore.NewQuery("UPDATE [format_table_name("player")] SET fupdate = 1 WHERE ckey=:ckey", list( + var/datum/db_query/adm_query = SSdbcore.NewQuery("UPDATE player SET fupdate = 1 WHERE ckey=:ckey", list( "ckey" = ckey )) // We do nothing with output here so we dont need to wrap the warn_execute() inside an if statement diff --git a/code/modules/admin/ipintel.dm b/code/modules/admin/ipintel.dm index e9079d1d289..e85b8a6787a 100644 --- a/code/modules/admin/ipintel.dm +++ b/code/modules/admin/ipintel.dm @@ -37,7 +37,7 @@ if(SSdbcore.IsConnected()) var/datum/db_query/query_get_ip_intel = SSdbcore.NewQuery({" SELECT date, intel, TIMESTAMPDIFF(MINUTE,date,NOW()) - FROM [format_table_name("ipintel")] + FROM ipintel WHERE ip = INET_ATON(:ip) AND (( @@ -73,7 +73,7 @@ SSipintel.cache[ip] = res if(SSdbcore.IsConnected()) var/datum/db_query/query_add_ip_intel = SSdbcore.NewQuery({" - INSERT INTO [format_table_name("ipintel")] (ip, intel) VALUES (INET_ATON(:ip), :intel) + INSERT INTO ipintel (ip, intel) VALUES (INET_ATON(:ip), :intel) ON DUPLICATE KEY UPDATE intel = VALUES(intel), date = NOW()"}, list( "ip" = ip, @@ -171,7 +171,7 @@ log_debug("ipintel_badip_check reports misconfigured ipintel_save_bad directive") return FALSE var/datum/db_query/query_get_ip_intel = SSdbcore.NewQuery({" - SELECT * FROM [format_table_name("ipintel")] WHERE ip = INET_ATON(:target_ip) + SELECT * FROM ipintel WHERE ip = INET_ATON(:target_ip) AND intel >= :rating_bad AND (date + INTERVAL :valid_hours HOUR) > NOW()"}, list( "target_ip" = target_ip, @@ -192,7 +192,7 @@ /proc/vpn_whitelist_check(target_ckey) if(!GLOB.configuration.ipintel.whitelist_mode) return FALSE - var/datum/db_query/query_whitelist_check = SSdbcore.NewQuery("SELECT * FROM [format_table_name("vpn_whitelist")] WHERE ckey=:ckey", list( + var/datum/db_query/query_whitelist_check = SSdbcore.NewQuery("SELECT * FROM vpn_whitelist WHERE ckey=:ckey", list( "ckey" = target_ckey )) if(!query_whitelist_check.warn_execute()) @@ -208,7 +208,7 @@ var/reason_string = input(usr, "Enter link to the URL of their whitelist request on the forum.","Reason required") as message|null if(!reason_string) return FALSE - var/datum/db_query/query_whitelist_add = SSdbcore.NewQuery("INSERT INTO [format_table_name("vpn_whitelist")] (ckey,reason) VALUES (:targetckey, :reason)", list( + var/datum/db_query/query_whitelist_add = SSdbcore.NewQuery("INSERT INTO vpn_whitelist (ckey,reason) VALUES (:targetckey, :reason)", list( "targetckey" = target_ckey, "reason" = reason_string )) @@ -219,7 +219,7 @@ return TRUE /proc/vpn_whitelist_remove(target_ckey) - var/datum/db_query/query_whitelist_remove = SSdbcore.NewQuery("DELETE FROM [format_table_name("vpn_whitelist")] WHERE ckey=:targetckey", list( + var/datum/db_query/query_whitelist_remove = SSdbcore.NewQuery("DELETE FROM vpn_whitelist WHERE ckey=:targetckey", list( "targetckey" = target_ckey )) if(!query_whitelist_remove.warn_execute()) diff --git a/code/modules/admin/permissionverbs/permissionedit.dm b/code/modules/admin/permissionverbs/permissionedit.dm index 86491bce349..a9cf399a259 100644 --- a/code/modules/admin/permissionverbs/permissionedit.dm +++ b/code/modules/admin/permissionverbs/permissionedit.dm @@ -76,7 +76,7 @@ if(!istext(adm_ckey) || !istext(new_rank)) return - var/datum/db_query/select_query = SSdbcore.NewQuery("SELECT id FROM [format_table_name("admin")] WHERE ckey=:adm_ckey", list( + var/datum/db_query/select_query = SSdbcore.NewQuery("SELECT id FROM admin WHERE ckey=:adm_ckey", list( "adm_ckey" = adm_ckey )) if(!select_query.warn_execute()) @@ -91,7 +91,7 @@ qdel(select_query) flag_account_for_forum_sync(adm_ckey) if(new_admin) - var/datum/db_query/insert_query = SSdbcore.NewQuery("INSERT INTO [format_table_name("admin")] (`id`, `ckey`, `admin_rank`, `level`, `flags`) VALUES (null, :adm_ckey, :new_rank, -1, 0)", list( + var/datum/db_query/insert_query = SSdbcore.NewQuery("INSERT INTO admin (`id`, `ckey`, `admin_rank`, `level`, `flags`) VALUES (null, :adm_ckey, :new_rank, -1, 0)", list( "adm_ckey" = adm_ckey, "new_rank" = new_rank )) @@ -101,7 +101,7 @@ qdel(insert_query) var/logtxt = "Added new admin [adm_ckey] to rank [new_rank]" - var/datum/db_query/log_query = SSdbcore.NewQuery("INSERT INTO [format_table_name("admin_log")] (`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (Now() , :uckey, :uip, :logtxt)", list( + var/datum/db_query/log_query = SSdbcore.NewQuery("INSERT INTO admin_log (`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (Now() , :uckey, :uip, :logtxt)", list( "uckey" = usr.ckey, "uip" = usr.client.address, "logtxt" = logtxt @@ -114,7 +114,7 @@ to_chat(usr, "New admin added.") else if(!isnull(admin_id) && isnum(admin_id)) - var/datum/db_query/insert_query = SSdbcore.NewQuery("UPDATE [format_table_name("admin")] SET admin_rank=:new_rank WHERE id=:admin_id", list( + var/datum/db_query/insert_query = SSdbcore.NewQuery("UPDATE admin SET admin_rank=:new_rank WHERE id=:admin_id", list( "new_rank" = new_rank, "admin_id" = admin_id, )) @@ -124,7 +124,7 @@ qdel(insert_query) var/logtxt = "Edited the rank of [adm_ckey] to [new_rank]" - var/datum/db_query/log_query = SSdbcore.NewQuery("INSERT INTO [format_table_name("admin_log")] (`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (Now() , :uckey, :uip, :logtxt)", list( + var/datum/db_query/log_query = SSdbcore.NewQuery("INSERT INTO admin_log (`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (Now() , :uckey, :uip, :logtxt)", list( "uckey" = usr.ckey, "uip" = usr.client.address, "logtxt" = logtxt, @@ -168,7 +168,7 @@ if(!istext(adm_ckey) || !isnum(new_permission)) return - var/datum/db_query/select_query = SSdbcore.NewQuery("SELECT id, flags FROM [format_table_name("admin")] WHERE ckey=:adm_ckey", list( + var/datum/db_query/select_query = SSdbcore.NewQuery("SELECT id, flags FROM admin WHERE ckey=:adm_ckey", list( "adm_ckey" = adm_ckey )) if(!select_query.warn_execute()) @@ -187,7 +187,7 @@ flag_account_for_forum_sync(adm_ckey) if(admin_rights & new_permission) //This admin already has this permission, so we are removing it. - var/datum/db_query/insert_query = SSdbcore.NewQuery("UPDATE [format_table_name("admin")] SET flags=:newflags WHERE id=:admin_id", list( + var/datum/db_query/insert_query = SSdbcore.NewQuery("UPDATE admin SET flags=:newflags WHERE id=:admin_id", list( "newflags" = (admin_rights & ~new_permission), "admin_id" = admin_id )) @@ -198,7 +198,7 @@ var/logtxt = "Removed permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]" var/datum/db_query/log_query = SSdbcore.NewQuery({" - INSERT INTO [format_table_name("admin_log")] (`datetime` ,`adminckey` ,`adminip` ,`log`) + INSERT INTO admin_log (`datetime` ,`adminckey` ,`adminip` ,`log`) VALUES (Now() , :uckey, :uip, :logtxt)"}, list( "uckey" = usr.ckey, "uip" = usr.client.address, @@ -210,7 +210,7 @@ qdel(log_query) to_chat(usr, "Permission removed.") else //This admin doesn't have this permission, so we are adding it. - var/datum/db_query/insert_query = SSdbcore.NewQuery("UPDATE [format_table_name("admin")] SET flags=:newflags WHERE id=:admin_id", list( + var/datum/db_query/insert_query = SSdbcore.NewQuery("UPDATE admin SET flags=:newflags WHERE id=:admin_id", list( "newflags" = (admin_rights | new_permission), "admin_id" = admin_id )) @@ -221,7 +221,7 @@ var/logtxt = "Added permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]" var/datum/db_query/log_query = SSdbcore.NewQuery({" - INSERT INTO [format_table_name("admin_log")] (`datetime` ,`adminckey` ,`adminip` ,`log`) + INSERT INTO admin_log (`datetime` ,`adminckey` ,`adminip` ,`log`) VALUES (Now() , :uckey, :uip, :logtxt)"}, list( "uckey" = usr.ckey, "uip" = usr.client.address, @@ -240,7 +240,7 @@ if(!check_rights(R_PERMISSIONS)) return - var/datum/db_query/query_update = SSdbcore.NewQuery("UPDATE [format_table_name("player")] SET lastadminrank=:admin_rank WHERE ckey=:ckey", list( + var/datum/db_query/query_update = SSdbcore.NewQuery("UPDATE player SET lastadminrank=:admin_rank WHERE ckey=:ckey", list( "admin_rank" = newrank, "ckey" = ckey )) diff --git a/code/modules/admin/secrets.dm b/code/modules/admin/secrets.dm index 16cd1084805..c423868c748 100644 --- a/code/modules/admin/secrets.dm +++ b/code/modules/admin/secrets.dm @@ -81,6 +81,9 @@ Create Weather
Weather - Ash Storm  
+ Reinforce Station
+ Move the Gamma Armory   +
"} if(2) diff --git a/code/modules/admin/sql_notes.dm b/code/modules/admin/sql_notes.dm index 4bbef9829ec..af7a7150d92 100644 --- a/code/modules/admin/sql_notes.dm +++ b/code/modules/admin/sql_notes.dm @@ -15,7 +15,7 @@ else target_ckey = ckey(target_ckey) - var/datum/db_query/query_find_ckey = SSdbcore.NewQuery("SELECT ckey, exp FROM [format_table_name("player")] WHERE ckey=:ckey", list( + var/datum/db_query/query_find_ckey = SSdbcore.NewQuery("SELECT ckey, exp FROM player WHERE ckey=:ckey", list( "ckey" = target_ckey )) @@ -61,7 +61,7 @@ automated = !!automated var/datum/db_query/query_noteadd = SSdbcore.NewQuery({" - INSERT INTO [format_table_name("notes")] (ckey, timestamp, notetext, adminckey, server, crew_playtime, round_id, automated) + INSERT INTO notes (ckey, timestamp, notetext, adminckey, server, crew_playtime, round_id, automated) VALUES (:targetckey, NOW(), :notetext, :adminkey, :server, :crewnum, :roundid, :automated) "}, list( "targetckey" = target_ckey, @@ -95,7 +95,7 @@ if(!note_id) return note_id = text2num(note_id) - var/datum/db_query/query_find_note_del = SSdbcore.NewQuery("SELECT ckey, notetext, adminckey FROM [format_table_name("notes")] WHERE id=:note_id", list( + var/datum/db_query/query_find_note_del = SSdbcore.NewQuery("SELECT ckey, notetext, adminckey FROM notes WHERE id=:note_id", list( "note_id" = note_id )) if(!query_find_note_del.warn_execute()) @@ -107,7 +107,7 @@ adminckey = query_find_note_del.item[3] qdel(query_find_note_del) - var/datum/db_query/query_del_note = SSdbcore.NewQuery("DELETE FROM [format_table_name("notes")] WHERE id=:note_id", list( + var/datum/db_query/query_del_note = SSdbcore.NewQuery("DELETE FROM notes WHERE id=:note_id", list( "note_id" = note_id )) if(!query_del_note.warn_execute()) @@ -130,7 +130,7 @@ return note_id = text2num(note_id) var/target_ckey - var/datum/db_query/query_find_note_edit = SSdbcore.NewQuery("SELECT ckey, notetext, adminckey, automated FROM [format_table_name("notes")] WHERE id=:note_id", list( + var/datum/db_query/query_find_note_edit = SSdbcore.NewQuery("SELECT ckey, notetext, adminckey, automated FROM notes WHERE id=:note_id", list( "note_id" = note_id )) if(!query_find_note_edit.warn_execute()) @@ -148,7 +148,7 @@ if(!new_note) return var/edit_text = "Edited by [usr.ckey] on [SQLtime()] from \"[old_note]\" to \"[new_note]\"
" - var/datum/db_query/query_update_note = SSdbcore.NewQuery("UPDATE [format_table_name("notes")] SET notetext=:new_note, last_editor=:akey, edits = CONCAT(IFNULL(edits,''),:edit_text) WHERE id=:note_id", list( + var/datum/db_query/query_update_note = SSdbcore.NewQuery("UPDATE notes SET notetext=:new_note, last_editor=:akey, edits = CONCAT(IFNULL(edits,''),:edit_text) WHERE id=:note_id", list( "new_note" = new_note, "akey" = usr.ckey, "edit_text" = edit_text, @@ -182,7 +182,7 @@ var/target_sql_ckey = ckey(target_ckey) var/datum/db_query/query_get_notes = SSdbcore.NewQuery({" SELECT id, timestamp, notetext, adminckey, last_editor, server, crew_playtime, round_id, automated - FROM [format_table_name("notes")] WHERE ckey=:targetkey ORDER BY timestamp"}, list( + FROM notes WHERE ckey=:targetkey ORDER BY timestamp"}, list( "targetkey" = target_sql_ckey )) if(!query_get_notes.warn_execute()) @@ -226,7 +226,7 @@ search = "^\[^\[:alpha:\]\]" else search = "^[index]" - var/datum/db_query/query_list_notes = SSdbcore.NewQuery("SELECT DISTINCT ckey FROM [format_table_name("notes")] WHERE ckey REGEXP :search ORDER BY ckey", list( + var/datum/db_query/query_list_notes = SSdbcore.NewQuery("SELECT DISTINCT ckey FROM notes WHERE ckey REGEXP :search ORDER BY ckey", list( "search" = search )) if(!query_list_notes.warn_execute()) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 8ca57e828c6..4364795429f 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1017,7 +1017,7 @@ else if(href_list["noteedits"]) var/note_id = text2num(href_list["noteedits"]) - var/datum/db_query/query_noteedits = SSdbcore.NewQuery("SELECT edits FROM [format_table_name("notes")] WHERE id=:note_id", list( + var/datum/db_query/query_noteedits = SSdbcore.NewQuery("SELECT edits FROM notes WHERE id=:note_id", list( "note_id" = note_id )) if(!query_noteedits.warn_execute()) @@ -1132,7 +1132,7 @@ else if(href_list["watcheditlog"]) var/target_ckey = href_list["watcheditlog"] - var/datum/db_query/query_watchedits = SSdbcore.NewQuery("SELECT edits FROM [format_table_name("watch")] WHERE ckey=:targetkey", list( + var/datum/db_query/query_watchedits = SSdbcore.NewQuery("SELECT edits FROM watch WHERE ckey=:targetkey", list( "targetkey" = target_ckey )) if(!query_watchedits.warn_execute()) @@ -2839,7 +2839,7 @@ else if(href_list["memoeditlist"]) if(!check_rights(R_SERVER)) return var/sql_key = href_list["memoeditlist"] - var/datum/db_query/query_memoedits = SSdbcore.NewQuery("SELECT edits FROM [format_table_name("memo")] WHERE (ckey=:sql_key)", list( + var/datum/db_query/query_memoedits = SSdbcore.NewQuery("SELECT edits FROM memo WHERE (ckey=:sql_key)", list( "sql_key" = sql_key )) if(!query_memoedits.warn_execute()) @@ -3213,6 +3213,12 @@ if(!SSshuttle.toggleShuttle("ferry","ferry_home","ferry_away")) message_admins("[key_name_admin(usr)] moved the centcom ferry") log_admin("[key_name(usr)] moved the centcom ferry") + + if("gammashuttle") + SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Send Gamma Armory") + message_admins("[key_name_admin(usr)] moved the gamma armory") + log_admin("[key_name(usr)] moved the gamma armory") + move_gamma_ship() if(usr) log_admin("[key_name(usr)] used secret [href_list["secretsfun"]]") @@ -3392,7 +3398,7 @@ var/isbn = text2num(href_list["library_book_id"]) if(href_list["view_library_book"]) - var/datum/db_query/query_view_book = SSdbcore.NewQuery("SELECT content, title FROM [format_table_name("library")] WHERE id=:isbn", list( + var/datum/db_query/query_view_book = SSdbcore.NewQuery("SELECT content, title FROM library WHERE id=:isbn", list( "isbn" = isbn )) if(!query_view_book.warn_execute()) @@ -3419,7 +3425,7 @@ return else if(href_list["unflag_library_book"]) - var/datum/db_query/query_unflag_book = SSdbcore.NewQuery("UPDATE [format_table_name("library")] SET flagged = 0 WHERE id=:isbn", list( + var/datum/db_query/query_unflag_book = SSdbcore.NewQuery("UPDATE library SET flagged = 0 WHERE id=:isbn", list( "isbn" = isbn )) if(!query_unflag_book.warn_execute()) @@ -3431,7 +3437,7 @@ message_admins("[key_name_admin(usr)] has unflagged the book [isbn].") else if(href_list["delete_library_book"]) - var/datum/db_query/query_delbook = SSdbcore.NewQuery("DELETE FROM [format_table_name("library")] WHERE id=:isbn", list( + var/datum/db_query/query_delbook = SSdbcore.NewQuery("DELETE FROM library WHERE id=:isbn", list( "isbn" = isbn )) if(!query_delbook.warn_execute()) @@ -3499,7 +3505,7 @@ var/unlocked_jobs = "" var/unlocked_species = "" // Get their totals - var/datum/db_query/query_get_totals = SSdbcore.NewQuery("SELECT karma, karmaspent FROM [format_table_name("karmatotals")] WHERE byondkey=:ckey", list( + var/datum/db_query/query_get_totals = SSdbcore.NewQuery("SELECT karma, karmaspent FROM karmatotals WHERE byondkey=:ckey", list( "ckey" = target_ckey )) if(!query_get_totals.warn_execute()) @@ -3513,7 +3519,7 @@ qdel(query_get_totals) // Now get their unlocks - var/datum/db_query/query_get_unlocks = SSdbcore.NewQuery("SELECT job, species FROM [format_table_name("whitelist")] WHERE ckey=:ckey", list( + var/datum/db_query/query_get_unlocks = SSdbcore.NewQuery("SELECT job, species FROM whitelist WHERE ckey=:ckey", list( "ckey" = target_ckey )) if(!query_get_unlocks.warn_execute()) diff --git a/code/modules/admin/verbs/infiltratorteam_syndicate.dm b/code/modules/admin/verbs/infiltratorteam_syndicate.dm index 1ed13ac8ed0..1199a8e5ea5 100644 --- a/code/modules/admin/verbs/infiltratorteam_syndicate.dm +++ b/code/modules/admin/verbs/infiltratorteam_syndicate.dm @@ -34,7 +34,7 @@ GLOBAL_VAR_INIT(sent_syndicate_infiltration_team, 0) return var/tctext = input(src, "How much TC do you want to give each team member? Suggested: 20-30. They cannot trade TC.") as num var/tcamount = text2num(tctext) - tcamount = between(0, tcamount, 1000) + tcamount = clamp(tcamount, 0, 1000) if(GLOB.sent_syndicate_infiltration_team == 1) if(alert("A Syndicate Infiltration Team has already been sent. Sure you want to send another?",,"Yes","No")=="No") return diff --git a/code/modules/admin/watchlist.dm b/code/modules/admin/watchlist.dm index df6a56933f4..89288bd13ab 100644 --- a/code/modules/admin/watchlist.dm +++ b/code/modules/admin/watchlist.dm @@ -5,7 +5,7 @@ var/new_ckey = ckey(clean_input("Who would you like to add to the watchlist?","Enter a ckey",null)) if(!new_ckey) return - var/datum/db_query/query_watchfind = SSdbcore.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE ckey=:new_ckey", list( + var/datum/db_query/query_watchfind = SSdbcore.NewQuery("SELECT ckey FROM player WHERE ckey=:new_ckey", list( "new_ckey" = new_ckey )) if(!query_watchfind.warn_execute()) @@ -27,7 +27,7 @@ if(!adminckey) return var/datum/db_query/query_watchadd = SSdbcore.NewQuery({" - INSERT INTO [format_table_name("watch")] (ckey, reason, adminckey, timestamp) + INSERT INTO watch (ckey, reason, adminckey, timestamp) VALUES (:targetkey, :reason, :adminkey, NOW())"}, list( "targetkey" = target_ckey, @@ -50,7 +50,7 @@ /client/proc/watchlist_remove(target_ckey, browse = 0) if(!check_rights(R_ADMIN)) return - var/datum/db_query/query_watchdel = SSdbcore.NewQuery("DELETE FROM [format_table_name("watch")] WHERE ckey=:target_ckey", list( + var/datum/db_query/query_watchdel = SSdbcore.NewQuery("DELETE FROM watch WHERE ckey=:target_ckey", list( "target_ckey" = target_ckey )) if(!query_watchdel.warn_execute()) @@ -68,7 +68,7 @@ /client/proc/watchlist_edit(target_ckey, browse = 0) if(!check_rights(R_ADMIN)) return - var/datum/db_query/query_watchreason = SSdbcore.NewQuery("SELECT reason FROM [format_table_name("watch")] WHERE ckey=:target_ckey", list( + var/datum/db_query/query_watchreason = SSdbcore.NewQuery("SELECT reason FROM watch WHERE ckey=:target_ckey", list( "target_ckey" = target_ckey )) if(!query_watchreason.warn_execute()) @@ -82,7 +82,7 @@ var/sql_ckey = usr.ckey var/edit_text = "Edited by [sql_ckey] on [SQLtime()] from \"[watch_reason]\" to \"[new_reason]\"" - var/datum/db_query/query_watchupdate = SSdbcore.NewQuery("UPDATE [format_table_name("watch")] SET reason=:new_reason, last_editor=:sql_ckey, edits = CONCAT(IFNULL(edits,''), :edit_text) WHERE ckey=:target_ckey", list( + var/datum/db_query/query_watchupdate = SSdbcore.NewQuery("UPDATE watch SET reason=:new_reason, last_editor=:sql_ckey, edits = CONCAT(IFNULL(edits,''), :edit_text) WHERE ckey=:target_ckey", list( "new_reason" = new_reason, "sql_ckey" = sql_ckey, "edit_text" = edit_text, @@ -114,7 +114,7 @@ else search = "^." - var/datum/db_query/query_watchlist = SSdbcore.NewQuery("SELECT ckey, reason, adminckey, timestamp, last_editor FROM [format_table_name("watch")] WHERE ckey REGEXP :search ORDER BY ckey", list( + var/datum/db_query/query_watchlist = SSdbcore.NewQuery("SELECT ckey, reason, adminckey, timestamp, last_editor FROM watch WHERE ckey REGEXP :search ORDER BY ckey", list( "search" = search )) if(!query_watchlist.warn_execute()) @@ -134,7 +134,7 @@ qdel(query_watchlist) /proc/check_watchlist(target_ckey) - var/datum/db_query/query_watch = SSdbcore.NewQuery("SELECT reason FROM [format_table_name("watch")] WHERE ckey=:target_ckey", list( + var/datum/db_query/query_watch = SSdbcore.NewQuery("SELECT reason FROM watch WHERE ckey=:target_ckey", list( "target_ckey" = target_ckey )) if(!query_watch.warn_execute()) diff --git a/code/modules/atmospherics/environmental/LINDA_fire.dm b/code/modules/atmospherics/environmental/LINDA_fire.dm index 9c91d72b65c..ab690676308 100644 --- a/code/modules/atmospherics/environmental/LINDA_fire.dm +++ b/code/modules/atmospherics/environmental/LINDA_fire.dm @@ -228,7 +228,12 @@ for(var/mob/living/L in T) L.adjust_fire_stacks(3) L.IgniteMob() - L.bodytemperature = max(temp / 3, L.bodytemperature) + if(ishuman(L)) + var/mob/living/carbon/human/M = L + var/heatBlockPercent = 1 - M.get_heat_protection(temp) + M.bodytemperature += (temp - M.bodytemperature) * heatBlockPercent / 3 + else + L.bodytemperature = (2 * L.bodytemperature + temp) / 3 /proc/fireflash_s(atom/center, radius, temp, falloff) if(temp < T0C + 60) @@ -291,7 +296,12 @@ for(var/mob/living/L in T) L.adjust_fire_stacks(3) L.IgniteMob() - L.bodytemperature = (2 * L.bodytemperature + temp) / 3 + if(ishuman(L)) + var/mob/living/carbon/human/M = L + var/heatBlockPercent = 1 - M.get_heat_protection(temp) + M.bodytemperature += (temp - M.bodytemperature) * heatBlockPercent / 3 + else + L.bodytemperature = (2 * L.bodytemperature + temp) / 3 if(T.density) continue diff --git a/code/modules/atmospherics/machinery/atmospherics.dm b/code/modules/atmospherics/machinery/atmospherics.dm index 8a77e3908f1..bb255692633 100644 --- a/code/modules/atmospherics/machinery/atmospherics.dm +++ b/code/modules/atmospherics/machinery/atmospherics.dm @@ -20,7 +20,10 @@ Pipelines + Other Objects -> Pipe network on_blueprints = TRUE var/nodealert = 0 var/can_unwrench = 0 - + /// If the machine is currently operating or not. + var/on = FALSE + /// The amount of pressure the machine wants to operate at. + var/target_pressure = 0 var/connect_types[] = list(1) //1=regular, 2=supply, 3=scrubber var/connected_to = 1 //same as above, currently not used for anything var/icon_connect_type = "" //"-supply" or "-scrubbers" @@ -353,3 +356,35 @@ Pipelines + Other Objects -> Pipe network //Used for certain children of obj/machinery/atmospherics to not show pipe vision when mob is inside it. /obj/machinery/atmospherics/proc/can_see_pipes() return TRUE + +/** + * Turns the machine either on, or off. If this is done by a user, display a message to them. + * + * NOTE: Only applies to atmospherics machines which can be toggled on or off, such as pumps, or other devices. + * + * Arguments: + * * user - the mob who is toggling the machine. + */ +/obj/machinery/atmospherics/proc/toggle(mob/living/user) + if(!powered()) + return + on = !on + update_icon() + if(user) + to_chat(user, "You toggle [src] [on ? "on" : "off"].") + +/** + * Maxes the output pressure of the machine. If this is done by a user, display a message to them. + * + * NOTE: Only applies to atmospherics machines which allow a `target_pressure` to be set, such as pumps, or other devices. + * + * Arguments: + * * user - the mob who is setting the output pressure to maximum. + */ +/obj/machinery/atmospherics/proc/set_max(mob/living/user) + if(!powered()) + return + target_pressure = MAX_OUTPUT_PRESSURE + update_icon() + if(user) + to_chat(user, "You set the target pressure of [src] to maximum.") diff --git a/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm index 0ff312806e9..b81fb88ee67 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm @@ -16,7 +16,6 @@ connect_types = list(1,2,3) //connects to regular, supply and scrubbers pipes - var/on = 0 var/pump_direction = 1 //0 = siphoning, 1 = releasing var/external_pressure_bound = ONE_ATMOSPHERE @@ -206,23 +205,23 @@ pump_direction = 1 if(signal.data["set_input_pressure"] != null) - input_pressure_min = between( - 0, + input_pressure_min = clamp( text2num(signal.data["set_input_pressure"]), + 0, ONE_ATMOSPHERE*50 ) if(signal.data["set_output_pressure"] != null) - output_pressure_max = between( - 0, + output_pressure_max = clamp( text2num(signal.data["set_output_pressure"]), + 0, ONE_ATMOSPHERE*50 ) if(signal.data["set_external_pressure"] != null) - external_pressure_bound = between( - 0, + external_pressure_bound = clamp( text2num(signal.data["set_external_pressure"]), + 0, ONE_ATMOSPHERE*50 ) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm b/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm index 292a47386f2..1b1443f7853 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm @@ -9,8 +9,7 @@ can_unwrench = 1 - var/on = 0 - var/target_pressure = ONE_ATMOSPHERE + target_pressure = ONE_ATMOSPHERE var/id = null @@ -103,9 +102,9 @@ on = !on if("set_output_pressure" in signal.data) - target_pressure = between( - 0, + target_pressure = clamp( text2num(signal.data["set_output_pressure"]), + 0, ONE_ATMOSPHERE*50 ) @@ -174,11 +173,6 @@ if(.) investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", "atmos") -/obj/machinery/atmospherics/binary/passive_gate/proc/toggle() - if(powered()) - on = !on - update_icon() - /obj/machinery/atmospherics/binary/passive_gate/attackby(obj/item/W, mob/user, params) if(!istype(W, /obj/item/wrench)) return ..() diff --git a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm index 9ec7207fb59..e6fb4f66f8c 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm @@ -21,53 +21,31 @@ Thus, the two variables affect pump operation are set in New(): can_unwrench = 1 - var/on = 0 - var/target_pressure = ONE_ATMOSPHERE + target_pressure = ONE_ATMOSPHERE var/id = null /obj/machinery/atmospherics/binary/pump/detailed_examine() return "This moves gas from one pipe to another. A higher target pressure demands more energy. The side with the red end is the output." +// So we can CtrlClick without triggering the anchored message. +/obj/machinery/atmospherics/binary/pump/can_be_pulled(user, grab_state, force, show_message) + return FALSE + /obj/machinery/atmospherics/binary/pump/CtrlClick(mob/living/user) - if(!istype(user) || user.incapacitated()) - to_chat(user, "You can't do that right now!") - return - if(!in_range(src, user) && !issilicon(usr)) - return - if(!ishuman(usr) && !issilicon(usr)) - return - toggle() + if(can_use_shortcut(user)) + toggle(user) return ..() -/obj/machinery/atmospherics/binary/pump/AICtrlClick() - toggle() - return ..() +/obj/machinery/atmospherics/binary/pump/AICtrlClick(mob/living/silicon/user) + toggle(user) /obj/machinery/atmospherics/binary/pump/AltClick(mob/living/user) - if(!istype(user) || user.incapacitated()) - to_chat(user, "You can't do that right now!") - return - if(!in_range(src, user) && !issilicon(usr)) - return - if(!ishuman(usr) && !issilicon(usr)) - return - set_max() - return + if(can_use_shortcut(user)) + set_max(user) -/obj/machinery/atmospherics/binary/pump/AIAltClick() - set_max() - return ..() - -/obj/machinery/atmospherics/binary/pump/proc/toggle() - if(powered()) - on = !on - update_icon() - -/obj/machinery/atmospherics/binary/pump/proc/set_max() - if(powered()) - target_pressure = MAX_OUTPUT_PRESSURE - update_icon() +/obj/machinery/atmospherics/binary/pump/AIAltClick(mob/living/silicon/user) + set_max(user) /obj/machinery/atmospherics/binary/pump/Destroy() if(SSradio) @@ -158,9 +136,9 @@ Thus, the two variables affect pump operation are set in New(): on = !on if(signal.data["set_output_pressure"]) - target_pressure = between( - 0, + target_pressure = clamp( text2num(signal.data["set_output_pressure"]), + 0, ONE_ATMOSPHERE*50 ) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm index 83d01cb20aa..f7e50707cdb 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm @@ -21,50 +21,28 @@ Thus, the two variables affect pump operation are set in New(): can_unwrench = 1 - var/on = 0 var/transfer_rate = 200 var/id = null +// So we can CtrlClick without triggering the anchored message. +/obj/machinery/atmospherics/binary/volume_pump/can_be_pulled(user, grab_state, force, show_message) + return FALSE + /obj/machinery/atmospherics/binary/volume_pump/CtrlClick(mob/living/user) - if(!istype(user) || user.incapacitated()) - to_chat(user, "You can't do that right now!") - return - if(!in_range(src, user) && !issilicon(usr)) - return - if(!ishuman(usr) && !issilicon(usr)) - return - toggle() + if(can_use_shortcut(user)) + toggle(user) return ..() -/obj/machinery/atmospherics/binary/volume_pump/AICtrlClick() - toggle() - return ..() +/obj/machinery/atmospherics/binary/volume_pump/AICtrlClick(mob/living/silicon/user) + toggle(user) /obj/machinery/atmospherics/binary/volume_pump/AltClick(mob/living/user) - if(!istype(user) || user.incapacitated()) - to_chat(user, "You can't do that right now!") - return - if(!in_range(src, user) && !issilicon(usr)) - return - if(!ishuman(usr) && !issilicon(usr)) - return - set_max() - return + if(can_use_shortcut(user)) + set_max(user) -/obj/machinery/atmospherics/binary/volume_pump/AIAltClick() - set_max() - return ..() - -/obj/machinery/atmospherics/binary/volume_pump/proc/toggle() - if(powered()) - on = !on - update_icon() - -/obj/machinery/atmospherics/binary/volume_pump/proc/set_max() - if(powered()) - transfer_rate = MAX_TRANSFER_RATE - update_icon() +/obj/machinery/atmospherics/binary/volume_pump/AIAltClick(mob/living/silicon/user) + set_max(user) /obj/machinery/atmospherics/binary/volume_pump/Destroy() if(SSradio) @@ -153,9 +131,9 @@ Thus, the two variables affect pump operation are set in New(): on = !on if(signal.data["set_transfer_rate"]) - transfer_rate = between( - 0, + transfer_rate = clamp( text2num(signal.data["set_transfer_rate"]), + 0, air1.volume ) diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm index ff2b3a485a4..f40ecda9147 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm @@ -17,8 +17,8 @@ icon = 'icons/atmos/filter.dmi' icon_state = "map" can_unwrench = TRUE - /// The amount of pressure the filter wants to operate at. - var/target_pressure = ONE_ATMOSPHERE + + target_pressure = ONE_ATMOSPHERE /// The type of gas we want to filter. Valid values that go here are from the `FILTER` defines at the top of the file. var/filter_type = FILTER_TOXINS /// A list of available filter options. Used with `ui_data`. @@ -31,45 +31,24 @@ "N2O" = FILTER_N2O ) +// So we can CtrlClick without triggering the anchored message. +/obj/machinery/atmospherics/trinary/filter/can_be_pulled(user, grab_state, force, show_message) + return FALSE + /obj/machinery/atmospherics/trinary/filter/CtrlClick(mob/living/user) - if(!istype(user) || user.incapacitated()) - to_chat(user, "You can't do that right now!") - return - if(!in_range(src, user) && !issilicon(usr)) - return - if(!ishuman(usr) && !issilicon(usr)) - return - toggle() + if(can_use_shortcut(user)) + toggle(user) return ..() -/obj/machinery/atmospherics/trinary/filter/AICtrlClick() - toggle() - return ..() +/obj/machinery/atmospherics/trinary/filter/AICtrlClick(mob/living/silicon/user) + toggle(user) /obj/machinery/atmospherics/trinary/filter/AltClick(mob/living/user) - if(!istype(user) || user.incapacitated()) - to_chat(user, "You can't do that right now!") - return - if(!in_range(src, user) && !issilicon(usr)) - return - if(!ishuman(usr) && !issilicon(usr)) - return - set_max() - return + if(can_use_shortcut(user)) + set_max(user) -/obj/machinery/atmospherics/trinary/filter/AIAltClick() - set_max() - return ..() - -/obj/machinery/atmospherics/trinary/filter/proc/toggle() - if(powered()) - on = !on - update_icon() - -/obj/machinery/atmospherics/trinary/filter/proc/set_max() - if(powered()) - target_pressure = MAX_OUTPUT_PRESSURE - update_icon() +/obj/machinery/atmospherics/trinary/filter/AIAltClick(mob/living/silicon/user) + set_max(user) /obj/machinery/atmospherics/trinary/filter/Destroy() if(SSradio) diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm index 5db62c29b7f..3b34a95c1ba 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm @@ -6,56 +6,35 @@ name = "gas mixer" - var/target_pressure = ONE_ATMOSPHERE + target_pressure = ONE_ATMOSPHERE var/node1_concentration = 0.5 var/node2_concentration = 0.5 //node 3 is the outlet, nodes 1 & 2 are intakes +// So we can CtrlClick without triggering the anchored message. +/obj/machinery/atmospherics/trinary/mixer/can_be_pulled(user, grab_state, force, show_message) + return FALSE + /obj/machinery/atmospherics/trinary/mixer/CtrlClick(mob/living/user) - if(!istype(user) || user.incapacitated()) - to_chat(user, "You can't do that right now!") - return - if(!in_range(src, user) && !issilicon(usr)) - return - if(!ishuman(usr) && !issilicon(usr)) - return - toggle() + if(can_use_shortcut(user)) + toggle(user) return ..() -/obj/machinery/atmospherics/trinary/mixer/AICtrlClick() - toggle() - return ..() +/obj/machinery/atmospherics/trinary/mixer/AICtrlClick(mob/living/silicon/user) + toggle(user) /obj/machinery/atmospherics/trinary/mixer/AltClick(mob/living/user) - if(!istype(user) || user.incapacitated()) - to_chat(user, "You can't do that right now!") - return - if(!in_range(src, user) && !issilicon(usr)) - return - if(!ishuman(usr) && !issilicon(usr)) - return - set_max() - return + if(can_use_shortcut(user)) + set_max(user) -/obj/machinery/atmospherics/trinary/mixer/AIAltClick() - set_max() - return ..() +/obj/machinery/atmospherics/trinary/mixer/AIAltClick(mob/living/silicon/user) + set_max(user) /obj/machinery/atmospherics/trinary/mixer/flipped icon_state = "mmap" flipped = 1 -/obj/machinery/atmospherics/trinary/mixer/proc/toggle() - if(powered()) - on = !on - update_icon() - -/obj/machinery/atmospherics/trinary/mixer/proc/set_max() - if(powered()) - target_pressure = MAX_OUTPUT_PRESSURE - update_icon() - /obj/machinery/atmospherics/trinary/mixer/update_icon(safety = 0) ..() diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/trinary_base.dm b/code/modules/atmospherics/machinery/components/trinary_devices/trinary_base.dm index 5b54f0ff91c..86b1aa74699 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/trinary_base.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/trinary_base.dm @@ -3,7 +3,6 @@ initialize_directions = SOUTH|NORTH|WEST use_power = IDLE_POWER_USE - var/on = 0 layer = GAS_FILTER_LAYER var/datum/gas_mixture/air1 diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index 1452ab48b2f..3943bde9a1d 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -13,12 +13,11 @@ interact_offline = 1 max_integrity = 350 armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 30, "acid" = 30) - var/on = FALSE var/temperature_archived var/mob/living/carbon/occupant = null var/obj/item/reagent_containers/glass/beaker = null - /// Holds two bitflags, AUTO_EJECT_DEAD and AUTO_EJECT_HEALTHY. Used to determine if the cryo cell will auto-eject dead and/or completely health patients. - var/auto_eject_prefs = NONE + /// Holds two bitflags, AUTO_EJECT_DEAD and AUTO_EJECT_HEALTHY. Used to determine if the cryo cell will auto-eject dead and/or completely healthy patients. + var/auto_eject_prefs = AUTO_EJECT_HEALTHY | AUTO_EJECT_DEAD var/next_trans = 0 var/current_heat_capacity = 50 diff --git a/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm b/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm index b7fe5ab85ae..f1bf25957d8 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm @@ -13,7 +13,6 @@ req_one_access_txt = "24;10" - var/on = 0 var/injecting = 0 var/volume_rate = 50 @@ -139,7 +138,7 @@ if(signal.data["set_volume_rate"] != null) var/number = text2num(signal.data["set_volume_rate"]) - volume_rate = between(0, number, air_contents.volume) + volume_rate = clamp(number, 0, air_contents.volume) if(signal.data["status"]) broadcast_status() diff --git a/code/modules/atmospherics/machinery/components/unary_devices/oxygen_generator.dm b/code/modules/atmospherics/machinery/components/unary_devices/oxygen_generator.dm index 9b06019e49e..fdeb02b7b83 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/oxygen_generator.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/oxygen_generator.dm @@ -9,8 +9,6 @@ dir = SOUTH initialize_directions = SOUTH - var/on = 0 - var/oxygen_content = 10 /obj/machinery/atmospherics/unary/oxygen_generator/update_icon() diff --git a/code/modules/atmospherics/machinery/components/unary_devices/portables_connector.dm b/code/modules/atmospherics/machinery/components/unary_devices/portables_connector.dm index eadd1bac280..64aaa045c8f 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/portables_connector.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/portables_connector.dm @@ -10,8 +10,6 @@ var/obj/machinery/portable_atmospherics/connected_device - var/on = 0 - /obj/machinery/atmospherics/unary/portables_connector/Destroy() if(connected_device) connected_device.disconnect() diff --git a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm index 7a3bedf9271..aca2e02aff0 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm @@ -10,9 +10,6 @@ armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 30) layer = OBJ_LAYER - ///Check if the device should be on or off - var/on = FALSE - var/icon_state_off = "freezer" var/icon_state_on = "freezer_1" var/icon_state_open = "freezer-o" diff --git a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm index 74c8be45b1b..35e9a84e932 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm @@ -20,7 +20,6 @@ req_one_access_txt = "24;10" - var/on = 0 var/pump_direction = 1 //0 = siphoning, 1 = releasing var/external_pressure_bound = EXTERNAL_PRESSURE_BOUND diff --git a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm index 618dd1bc355..d006ae874f3 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm @@ -20,7 +20,6 @@ var/list/turf/simulated/adjacent_turfs = list() - var/on = 0 var/scrubbing = 1 //0 = siphoning, 1 = scrubbing var/scrub_O2 = 0 var/scrub_N2 = 0 diff --git a/code/modules/client/2fa.dm b/code/modules/client/2fa.dm index d51d41e13d6..930670d1867 100644 --- a/code/modules/client/2fa.dm +++ b/code/modules/client/2fa.dm @@ -27,7 +27,7 @@ var/entered_code = input(usr, "Please enter a code from your auth app. Failure to enter the code correctly will abort 2FA setup.", "2FA Validation") if(!entered_code) // Cleanup so they can start again - var/datum/db_query/dbq = SSdbcore.NewQuery("DELETE FROM [format_table_name("2fa_secrets")] WHERE ckey=:ckey", list("ckey" = ckey)) + var/datum/db_query/dbq = SSdbcore.NewQuery("DELETE FROM 2fa_secrets WHERE ckey=:ckey", list("ckey" = ckey)) dbq.warn_execute() alert(usr, "2FA Setup aborted!") B.close() @@ -42,7 +42,7 @@ if(vr.status_code != 200) // Cleanup so they can start again - var/datum/db_query/dbq = SSdbcore.NewQuery("DELETE FROM [format_table_name("2fa_secrets")] WHERE ckey=:ckey", list("ckey" = ckey)) + var/datum/db_query/dbq = SSdbcore.NewQuery("DELETE FROM 2fa_secrets WHERE ckey=:ckey", list("ckey" = ckey)) dbq.warn_execute() // See if its unauthorised. I used 400 for that dont at me @@ -101,7 +101,7 @@ return // If we are here, they authed properly - var/datum/db_query/dbq = SSdbcore.NewQuery("DELETE FROM [format_table_name("2fa_secrets")] WHERE ckey=:ckey", list("ckey" = ckey)) + var/datum/db_query/dbq = SSdbcore.NewQuery("DELETE FROM 2fa_secrets WHERE ckey=:ckey", list("ckey" = ckey)) dbq.warn_execute() prefs._2fa_status = _2FA_DISABLED prefs.save_preferences(src) diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 5622cbc5b95..1415f0b1c01 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -442,7 +442,7 @@ return //Donator stuff. - var/datum/db_query/query_donor_select = SSdbcore.NewQuery("SELECT ckey, tier, active FROM `[format_table_name("donators")]` WHERE ckey=:ckey", list( + var/datum/db_query/query_donor_select = SSdbcore.NewQuery("SELECT ckey, tier, active FROM donators WHERE ckey=:ckey", list( "ckey" = ckey )) @@ -473,7 +473,7 @@ if(!SSdbcore.IsConnected()) return - var/datum/db_query/query = SSdbcore.NewQuery("SELECT id, datediff(Now(),firstseen) as age FROM [format_table_name("player")] WHERE ckey=:ckey", list( + var/datum/db_query/query = SSdbcore.NewQuery("SELECT id, datediff(Now(),firstseen) as age FROM player WHERE ckey=:ckey", list( "ckey" = ckey )) if(!query.warn_execute()) @@ -488,7 +488,7 @@ break qdel(query) - var/datum/db_query/query_ip = SSdbcore.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE ip=:address", list( + var/datum/db_query/query_ip = SSdbcore.NewQuery("SELECT ckey FROM player WHERE ip=:address", list( "address" = address )) if(!query_ip.warn_execute()) @@ -501,7 +501,7 @@ qdel(query_ip) - var/datum/db_query/query_cid = SSdbcore.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE computerid=:cid", list( + var/datum/db_query/query_cid = SSdbcore.NewQuery("SELECT ckey FROM player WHERE computerid=:cid", list( "cid" = computer_id )) if(!query_cid.warn_execute()) @@ -548,7 +548,7 @@ if(!client_address) // Localhost can sometimes have no address set client_address = "127.0.0.1" //Player already identified previously, we need to just update the 'lastseen', 'ip' and 'computer_id' variables - var/datum/db_query/query_update = SSdbcore.NewQuery("UPDATE [format_table_name("player")] SET lastseen = Now(), ip=:sql_ip, computerid=:sql_cid, lastadminrank=:sql_ar WHERE id=:sql_id", list( + var/datum/db_query/query_update = SSdbcore.NewQuery("UPDATE player SET lastseen = Now(), ip=:sql_ip, computerid=:sql_cid, lastadminrank=:sql_ar WHERE id=:sql_id", list( "sql_ip" = client_address, "sql_cid" = computer_id, "sql_ar" = admin_rank, @@ -572,7 +572,7 @@ qdel(src) return // Dont insert or they can just go in again - var/datum/db_query/query_insert = SSdbcore.NewQuery("INSERT INTO [format_table_name("player")] (id, ckey, firstseen, lastseen, ip, computerid, lastadminrank) VALUES (null, :ckey, Now(), Now(), :ip, :cid, :rank)", list( + var/datum/db_query/query_insert = SSdbcore.NewQuery("INSERT INTO player (id, ckey, firstseen, lastseen, ip, computerid, lastadminrank) VALUES (null, :ckey, Now(), Now(), :ip, :cid, :rank)", list( "ckey" = ckey, "ip" = address, "cid" = computer_id, @@ -635,7 +635,7 @@ to_chat(src, "You have no verified forum account. VERIFY FORUM ACCOUNT") /client/proc/create_oauth_token() - var/datum/db_query/query_find_token = SSdbcore.NewQuery("SELECT token FROM [format_table_name("oauth_tokens")] WHERE ckey=:ckey limit 1", list( + var/datum/db_query/query_find_token = SSdbcore.NewQuery("SELECT token FROM oauth_tokens WHERE ckey=:ckey limit 1", list( "ckey" = ckey )) // These queries have log_error=FALSE to avoid auth tokens being in plaintext logs @@ -650,7 +650,7 @@ var/tokenstr = md5("[rand(0,9999)][world.time][rand(0,9999)][ckey][rand(0,9999)][address][rand(0,9999)][computer_id][rand(0,9999)]") - var/datum/db_query/query_insert_token = SSdbcore.NewQuery("INSERT INTO [format_table_name("oauth_tokens")] (ckey, token) VALUES(:ckey, :tokenstr)", list( + var/datum/db_query/query_insert_token = SSdbcore.NewQuery("INSERT INTO oauth_tokens (ckey, token) VALUES(:ckey, :tokenstr)", list( "ckey" = ckey, "tokenstr" = tokenstr, )) @@ -671,7 +671,7 @@ if(!fromban) to_chat(src, "Your forum account is already set.") return - var/datum/db_query/query_find_link = SSdbcore.NewQuery("SELECT fuid FROM [format_table_name("player")] WHERE ckey=:ckey LIMIT 1", list( + var/datum/db_query/query_find_link = SSdbcore.NewQuery("SELECT fuid FROM player WHERE ckey=:ckey LIMIT 1", list( "ckey" = ckey )) if(!query_find_link.warn_execute()) @@ -720,7 +720,7 @@ var/oldcid = cidcheck[ckey] if(!oldcid) - var/datum/db_query/query_cidcheck = SSdbcore.NewQuery("SELECT computerid FROM [format_table_name("player")] WHERE ckey=:ckey", list( + var/datum/db_query/query_cidcheck = SSdbcore.NewQuery("SELECT computerid FROM player WHERE ckey=:ckey", list( "ckey" = ckey )) if(!query_cidcheck.warn_execute()) @@ -790,7 +790,7 @@ var/const/adminckey = "CID-Error" // Check for notes in the last day - only 1 note per 24 hours - var/datum/db_query/query_get_notes = SSdbcore.NewQuery("SELECT id from [format_table_name("notes")] WHERE ckey=:ckey AND adminckey=:adminckey AND timestamp + INTERVAL 1 DAY < NOW()", list( + var/datum/db_query/query_get_notes = SSdbcore.NewQuery("SELECT id from notes WHERE ckey=:ckey AND adminckey=:adminckey AND timestamp + INTERVAL 1 DAY < NOW()", list( "ckey" = ckey, "adminckey" = adminckey )) @@ -803,7 +803,7 @@ qdel(query_get_notes) // Only add a note if their most recent note isn't from the randomizer blocker, either - var/datum/db_query/query_get_note = SSdbcore.NewQuery("SELECT adminckey FROM [format_table_name("notes")] WHERE ckey=:ckey ORDER BY timestamp DESC LIMIT 1", list( + var/datum/db_query/query_get_note = SSdbcore.NewQuery("SELECT adminckey FROM notes WHERE ckey=:ckey ORDER BY timestamp DESC LIMIT 1", list( "ckey" = ckey )) if(!query_get_note.warn_execute()) @@ -1053,7 +1053,7 @@ */ /client/proc/get_byond_account_date(notify = FALSE) // First we see if the client has a saved date in the DB - var/datum/db_query/query_date = SSdbcore.NewQuery("SELECT byond_date, DATEDIFF(Now(), byond_date) FROM [format_table_name("player")] WHERE ckey=:ckey", list( + var/datum/db_query/query_date = SSdbcore.NewQuery("SELECT byond_date, DATEDIFF(Now(), byond_date) FROM player WHERE ckey=:ckey", list( "ckey" = ckey )) if(!query_date.warn_execute()) @@ -1079,7 +1079,7 @@ byondacc_date = byond_data["general"]["joined"] // Now save it - var/datum/db_query/query_update = SSdbcore.NewQuery("UPDATE [format_table_name("player")] SET byond_date=:date WHERE ckey=:ckey", list( + var/datum/db_query/query_update = SSdbcore.NewQuery("UPDATE player SET byond_date=:date WHERE ckey=:ckey", list( "date" = byondacc_date, "ckey" = ckey )) @@ -1089,7 +1089,7 @@ qdel(query_update) // Now retrieve the age again because BYOND doesnt have native methods for this - var/datum/db_query/query_age = SSdbcore.NewQuery("SELECT DATEDIFF(Now(), byond_date) FROM [format_table_name("player")] WHERE ckey=:ckey", list( + var/datum/db_query/query_age = SSdbcore.NewQuery("SELECT DATEDIFF(Now(), byond_date) FROM player WHERE ckey=:ckey", list( "ckey" = ckey )) if(!query_age.warn_execute()) @@ -1124,7 +1124,7 @@ tos_consent = TRUE return TRUE - var/datum/db_query/query = SSdbcore.NewQuery("SELECT ckey FROM [format_table_name("privacy")] WHERE ckey=:ckey AND consent=1", list( + var/datum/db_query/query = SSdbcore.NewQuery("SELECT ckey FROM privacy WHERE ckey=:ckey AND consent=1", list( "ckey" = ckey )) if(!query.warn_execute()) @@ -1172,7 +1172,7 @@ // Check their notes for CID tracking in the past var/has_note = FALSE var/note_text = "" - var/datum/db_query/query_find_track_note = SSdbcore.NewQuery("SELECT notetext FROM [format_table_name("notes")] WHERE ckey=:ckey AND adminckey=:ackey", list( + var/datum/db_query/query_find_track_note = SSdbcore.NewQuery("SELECT notetext FROM notes WHERE ckey=:ckey AND adminckey=:ackey", list( "ckey" = ckey, "ackey" = CIDTRACKING_PSUEDO_CKEY )) @@ -1189,7 +1189,7 @@ var/new_text = "Connected on the date of this note with unique CID #[cidcount]" // Only update the note if the text is different. Otherwise it bumps the timestamp when it shouldnt if(note_text != new_text) - var/datum/db_query/query_update_track_note = SSdbcore.NewQuery("UPDATE [format_table_name("notes")] SET notetext=:notetext, timestamp=NOW(), round_id=:rid WHERE ckey=:ckey AND adminckey=:ackey", list( + var/datum/db_query/query_update_track_note = SSdbcore.NewQuery("UPDATE notes SET notetext=:notetext, timestamp=NOW(), round_id=:rid WHERE ckey=:ckey AND adminckey=:ackey", list( "notetext" = new_text, "ckey" = ckey, "ackey" = CIDTRACKING_PSUEDO_CKEY, @@ -1207,7 +1207,7 @@ var/show_warning = TRUE // Check if they have a note that matches the warning suppressor - var/datum/db_query/query_find_note = SSdbcore.NewQuery("SELECT id FROM [format_table_name("notes")] WHERE ckey=:ckey AND notetext=:notetext", list( + var/datum/db_query/query_find_note = SSdbcore.NewQuery("SELECT id FROM notes WHERE ckey=:ckey AND notetext=:notetext", list( "ckey" = ckey, "notetext" = CIDWARNING_SUPPRESSED_NOTETEXT )) diff --git a/code/modules/client/preference/loadout/loadout_racial.dm b/code/modules/client/preference/loadout/loadout_racial.dm index 0d7b945bb78..78d38cf87b5 100644 --- a/code/modules/client/preference/loadout/loadout_racial.dm +++ b/code/modules/client/preference/loadout/loadout_racial.dm @@ -34,13 +34,13 @@ description = "A common traditional nano-fiber veil worn by many Tajaran, It is rare and offensive to see it on other races." path = /obj/item/clothing/glasses/tajblind/eng cost = 2 - + /datum/gear/racial/taj/cargo display_name = "khaki veil" description = "A common traditional nano-fiber veil worn by many Tajaran, It is rare and offensive to see it on other races. It is light and comfy!" path = /obj/item/clothing/glasses/tajblind/cargo cost = 2 - + /datum/gear/racial/footwraps display_name = "cloth footwraps" path = /obj/item/clothing/shoes/footwraps diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm index 23795dba091..5930bb9ebd7 100644 --- a/code/modules/client/preference/preferences.dm +++ b/code/modules/client/preference/preferences.dm @@ -2344,7 +2344,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts /datum/preferences/proc/open_load_dialog(mob/user) - var/datum/db_query/query = SSdbcore.NewQuery("SELECT slot, real_name FROM [format_table_name("characters")] WHERE ckey=:ckey ORDER BY slot", list( + var/datum/db_query/query = SSdbcore.NewQuery("SELECT slot, real_name FROM characters WHERE ckey=:ckey ORDER BY slot", list( "ckey" = user.ckey )) var/list/slotnames[max_save_slots] diff --git a/code/modules/client/preference/preferences_mysql.dm b/code/modules/client/preference/preferences_mysql.dm index 72ad26ed70b..82d93561924 100644 --- a/code/modules/client/preference/preferences_mysql.dm +++ b/code/modules/client/preference/preferences_mysql.dm @@ -18,7 +18,7 @@ fuid, parallax, 2fa_status - FROM [format_table_name("player")] + FROM player WHERE ckey=:ckey"}, list( "ckey" = C.ckey )) @@ -80,7 +80,7 @@ deltimer(volume_mixer_saving) volume_mixer_saving = null - var/datum/db_query/query = SSdbcore.NewQuery({"UPDATE [format_table_name("player")] + var/datum/db_query/query = SSdbcore.NewQuery({"UPDATE player SET ooccolor=:ooccolour, UI_style=:ui_style, @@ -133,7 +133,7 @@ slot = sanitize_integer(slot, 1, max_save_slots, initial(default_slot)) if(slot != default_slot) default_slot = slot - var/datum/db_query/firstquery = SSdbcore.NewQuery("UPDATE [format_table_name("player")] SET default_slot=:slot WHERE ckey=:ckey", list( + var/datum/db_query/firstquery = SSdbcore.NewQuery("UPDATE player SET default_slot=:slot WHERE ckey=:ckey", list( "slot" = slot, "ckey" = C.ckey )) @@ -200,7 +200,7 @@ hair_gradient_offset, hair_gradient_colour, hair_gradient_alpha - FROM [format_table_name("characters")] WHERE ckey=:ckey AND slot=:slot"}, list( + FROM characters WHERE ckey=:ckey AND slot=:slot"}, list( "ckey" = C.ckey, "slot" = slot )) @@ -377,7 +377,7 @@ if(!isemptylist(loadout_gear)) gearlist = list2params(loadout_gear) - var/datum/db_query/firstquery = SSdbcore.NewQuery("SELECT slot FROM [format_table_name("characters")] WHERE ckey=:ckey ORDER BY slot", list( + var/datum/db_query/firstquery = SSdbcore.NewQuery("SELECT slot FROM characters WHERE ckey=:ckey ORDER BY slot", list( "ckey" = C.ckey )) if(!firstquery.warn_execute()) @@ -385,7 +385,7 @@ return while(firstquery.NextRow()) if(text2num(firstquery.item[1]) == default_slot) - var/datum/db_query/query = SSdbcore.NewQuery({"UPDATE [format_table_name("characters")] + var/datum/db_query/query = SSdbcore.NewQuery({"UPDATE characters SET OOC_Notes=:metadata, real_name=:real_name, @@ -518,7 +518,7 @@ qdel(firstquery) var/datum/db_query/query = SSdbcore.NewQuery({" - INSERT INTO [format_table_name("characters")] (ckey, slot, OOC_Notes, real_name, name_is_always_random, gender, + INSERT INTO characters (ckey, slot, OOC_Notes, real_name, name_is_always_random, gender, age, species, language, hair_colour, secondary_hair_colour, facial_hair_colour, secondary_facial_hair_colour, @@ -640,7 +640,7 @@ return 1 /datum/preferences/proc/load_random_character_slot(client/C) - var/datum/db_query/query = SSdbcore.NewQuery("SELECT slot FROM [format_table_name("characters")] WHERE ckey=:ckey ORDER BY slot", list( + var/datum/db_query/query = SSdbcore.NewQuery("SELECT slot FROM characters WHERE ckey=:ckey ORDER BY slot", list( "ckey" = C.ckey )) var/list/saves = list() @@ -662,7 +662,7 @@ /datum/preferences/proc/clear_character_slot(client/C) . = FALSE // Is there a character in that slot? - var/datum/db_query/query = SSdbcore.NewQuery("SELECT slot FROM [format_table_name("characters")] WHERE ckey=:ckey AND slot=:slot", list( + var/datum/db_query/query = SSdbcore.NewQuery("SELECT slot FROM characters WHERE ckey=:ckey AND slot=:slot", list( "ckey" = C.ckey, "slot" = default_slot )) @@ -677,7 +677,7 @@ qdel(query) - var/datum/db_query/delete_query = SSdbcore.NewQuery("DELETE FROM [format_table_name("characters")] WHERE ckey=:ckey AND slot=:slot", list( + var/datum/db_query/delete_query = SSdbcore.NewQuery("DELETE FROM characters WHERE ckey=:ckey AND slot=:slot", list( "ckey" = C.ckey, "slot" = default_slot )) @@ -698,7 +698,7 @@ volume_mixer_saving = null var/datum/db_query/update_query = SSdbcore.NewQuery( - "UPDATE [format_table_name("player")] SET volume_mixer=:volume_mixer WHERE ckey=:ckey", + "UPDATE player SET volume_mixer=:volume_mixer WHERE ckey=:ckey", list( "volume_mixer" = serialize_volume_mixer(volume_mixer), "ckey" = parent.ckey diff --git a/code/modules/clothing/glasses/hud.dm b/code/modules/clothing/glasses/hud.dm index f0dce270fb6..9f4b4f4c834 100644 --- a/code/modules/clothing/glasses/hud.dm +++ b/code/modules/clothing/glasses/hud.dm @@ -171,6 +171,7 @@ desc = "An Ahdominian made veil that allows the user to see while obscuring their eyes. This one has an in-built security HUD." icon_state = "tajblind_sec" item_state = "tajblind_sec" + flash_protect = FLASH_PROTECTION_FLASH flags_cover = GLASSESCOVERSEYES actions_types = list(/datum/action/item_action/toggle) up = 0 diff --git a/code/modules/customitems/item_spawning.dm b/code/modules/customitems/item_spawning.dm index 33566ddfef8..5f998861cf6 100644 --- a/code/modules/customitems/item_spawning.dm +++ b/code/modules/customitems/item_spawning.dm @@ -4,7 +4,7 @@ // Grab the info we want. var/datum/db_query/query = SSdbcore.NewQuery({" - SELECT cuiPath, cuiPropAdjust, cuiJobMask, cuiDescription, cuiItemName FROM [format_table_name("customuseritems")] + SELECT cuiPath, cuiPropAdjust, cuiJobMask, cuiDescription, cuiItemName FROM customuseritems WHERE cuiCKey=:ckey AND (cuiRealName=:realname OR cuiRealName='*')"}, list( "ckey" = M.ckey, "realname" = M.real_name diff --git a/code/modules/karma/karma.dm b/code/modules/karma/karma.dm index 6c011da5b2f..02d0f4edb0f 100644 --- a/code/modules/karma/karma.dm +++ b/code/modules/karma/karma.dm @@ -16,7 +16,7 @@ return var/datum/db_query/log_query = SSdbcore.NewQuery({" - INSERT INTO [format_table_name("karma")] (spendername, spenderkey, receivername, receiverkey, receiverrole, receiverspecial, spenderip, time) + INSERT INTO karma (spendername, spenderkey, receivername, receiverkey, receiverrole, receiverspecial, spenderip, time) VALUES (:sname, :skey, :rname, :rkey, :rrole, :rspecial, :sip, Now())"}, list( "sname" = spender.name, "skey" = spender.ckey, @@ -33,7 +33,7 @@ qdel(log_query) - var/datum/db_query/select_spender = SSdbcore.NewQuery("SELECT id, karma FROM [format_table_name("karmatotals")] WHERE byondkey=:rkey", list( + var/datum/db_query/select_spender = SSdbcore.NewQuery("SELECT id, karma FROM karmatotals WHERE byondkey=:rkey", list( "rkey" = receiver.ckey )) @@ -52,7 +52,7 @@ if(karma == null) karma = 1 - var/datum/db_query/insert_query = SSdbcore.NewQuery("INSERT INTO [format_table_name("karmatotals")] (byondkey, karma) VALUES (:rkey, :karma)", list( + var/datum/db_query/insert_query = SSdbcore.NewQuery("INSERT INTO karmatotals (byondkey, karma) VALUES (:rkey, :karma)", list( "rkey" = receiver.ckey, "karma" = karma )) @@ -62,7 +62,7 @@ qdel(insert_query) else karma++ - var/datum/db_query/update_query = SSdbcore.NewQuery("UPDATE [format_table_name("karmatotals")] SET karma=:karma WHERE id=:id", list( + var/datum/db_query/update_query = SSdbcore.NewQuery("UPDATE karmatotals SET karma=:karma WHERE id=:id", list( "karma" = karma, "id" = id )) @@ -197,7 +197,7 @@ GLOBAL_LIST_EMPTY(karma_spenders) to_chat(usr, "Unable to connect to karma database. Please try again later.
") return - var/datum/db_query/query = SSdbcore.NewQuery("SELECT karma, karmaspent FROM [format_table_name("karmatotals")] WHERE byondkey=:ckey", list( + var/datum/db_query/query = SSdbcore.NewQuery("SELECT karma, karmaspent FROM karmatotals WHERE byondkey=:ckey", list( "ckey" = ckey )) if(!query.warn_execute()) @@ -225,7 +225,7 @@ GLOBAL_LIST_EMPTY(karma_spenders) karmashopmenu() /client/proc/karmashopmenu() - var/datum/db_query/query = SSdbcore.NewQuery("SELECT ckey, job, species FROM [format_table_name("whitelist")] WHERE ckey=:ckey", list( + var/datum/db_query/query = SSdbcore.NewQuery("SELECT ckey, job, species FROM whitelist WHERE ckey=:ckey", list( "ckey" = ckey )) if(!query.warn_execute()) @@ -383,7 +383,7 @@ GLOBAL_LIST_EMPTY(karma_spenders) karmashopmenu() /client/proc/DB_job_unlock(job, cost) - var/datum/db_query/select_query = SSdbcore.NewQuery("SELECT ckey, job FROM [format_table_name("whitelist")] WHERE ckey=:ckey", list( + var/datum/db_query/select_query = SSdbcore.NewQuery("SELECT ckey, job FROM whitelist WHERE ckey=:ckey", list( "ckey" = ckey )) if(!select_query.warn_execute()) @@ -398,7 +398,7 @@ GLOBAL_LIST_EMPTY(karma_spenders) qdel(select_query) if(!dbckey) - var/datum/db_query/insert_query = SSdbcore.NewQuery("INSERT INTO [format_table_name("whitelist")] (ckey, job) VALUES (:ckey, :job)", list( + var/datum/db_query/insert_query = SSdbcore.NewQuery("INSERT INTO whitelist (ckey, job) VALUES (:ckey, :job)", list( "ckey" = ckey, "job" = job )) @@ -417,7 +417,7 @@ GLOBAL_LIST_EMPTY(karma_spenders) if(!(job in joblist)) joblist += job var/newjoblist = jointext(joblist,",") - var/datum/db_query/update_query = SSdbcore.NewQuery("UPDATE [format_table_name("whitelist")] SET job=:newjoblist WHERE ckey=:ckey", list( + var/datum/db_query/update_query = SSdbcore.NewQuery("UPDATE whitelist SET job=:newjoblist WHERE ckey=:ckey", list( "newjoblist" = newjoblist, "ckey" = ckey )) @@ -434,7 +434,7 @@ GLOBAL_LIST_EMPTY(karma_spenders) return /client/proc/DB_species_unlock(species, cost) - var/datum/db_query/select_query = SSdbcore.NewQuery("SELECT ckey, species FROM [format_table_name("whitelist")] WHERE ckey=:ckey", list( + var/datum/db_query/select_query = SSdbcore.NewQuery("SELECT ckey, species FROM whitelist WHERE ckey=:ckey", list( "ckey" = ckey )) if(!select_query.warn_execute()) @@ -448,7 +448,7 @@ GLOBAL_LIST_EMPTY(karma_spenders) dbspecies = select_query.item[2] qdel(select_query) if(!dbckey) - var/datum/db_query/insert_query = SSdbcore.NewQuery("INSERT INTO [format_table_name("whitelist")] (ckey, species) VALUES (:ckey, :species)", list( + var/datum/db_query/insert_query = SSdbcore.NewQuery("INSERT INTO whitelist (ckey, species) VALUES (:ckey, :species)", list( "ckey" = ckey, "species" = species )) @@ -466,7 +466,7 @@ GLOBAL_LIST_EMPTY(karma_spenders) if(!(species in specieslist)) specieslist += species var/newspecieslist = jointext(specieslist,",") - var/datum/db_query/update_query = SSdbcore.NewQuery("UPDATE [format_table_name("whitelist")] SET species=:newspecieslist WHERE ckey=:ckey", list( + var/datum/db_query/update_query = SSdbcore.NewQuery("UPDATE whitelist SET species=:newspecieslist WHERE ckey=:ckey", list( "newspecieslist" = newspecieslist, "ckey" = ckey )) @@ -483,7 +483,7 @@ GLOBAL_LIST_EMPTY(karma_spenders) return /client/proc/karmacharge(cost, refund = FALSE) - var/datum/db_query/select_query = SSdbcore.NewQuery("SELECT karmaspent FROM [format_table_name("karmatotals")] WHERE byondkey=:ckey", list( + var/datum/db_query/select_query = SSdbcore.NewQuery("SELECT karmaspent FROM karmatotals WHERE byondkey=:ckey", list( "ckey" = ckey )) if(!select_query.warn_execute()) @@ -496,7 +496,7 @@ GLOBAL_LIST_EMPTY(karma_spenders) spent -= cost else spent += cost - var/datum/db_query/update_query = SSdbcore.NewQuery("UPDATE [format_table_name("karmatotals")] SET karmaspent=:spent WHERE byondkey=:ckey", list( + var/datum/db_query/update_query = SSdbcore.NewQuery("UPDATE karmatotals SET karmaspent=:spent WHERE byondkey=:ckey", list( "spent" = spent, "ckey" = ckey )) @@ -522,7 +522,7 @@ GLOBAL_LIST_EMPTY(karma_spenders) to_chat(usr, "That job is not refundable.") return - var/datum/db_query/query = SSdbcore.NewQuery("SELECT ckey, job, species FROM [format_table_name("whitelist")] WHERE ckey=:ckey", list( + var/datum/db_query/query = SSdbcore.NewQuery("SELECT ckey, job, species FROM whitelist WHERE ckey=:ckey", list( "ckey" = ckey )) if(!query.warn_execute()) @@ -545,10 +545,10 @@ GLOBAL_LIST_EMPTY(karma_spenders) switch(type) if("job") typelist = splittext(dbjob,",") - statement = "UPDATE [format_table_name("whitelist")] SET job=:newtypelist WHERE ckey=:ckey" + statement = "UPDATE whitelist SET job=:newtypelist WHERE ckey=:ckey" if("species") typelist = splittext(dbspecies,",") - statement = "UPDATE [format_table_name("whitelist")] SET species=:newtypelist WHERE ckey=:ckey" + statement = "UPDATE whitelist SET species=:newtypelist WHERE ckey=:ckey" else to_chat(usr, "Type [type] is not a valid column.") @@ -574,7 +574,7 @@ GLOBAL_LIST_EMPTY(karma_spenders) to_chat(usr, "Your ckey ([dbckey]) was not found.") /client/proc/checkpurchased(name = null) // If the first parameter is null, return a full list of purchases - var/datum/db_query/query = SSdbcore.NewQuery("SELECT ckey, job, species FROM [format_table_name("whitelist")] WHERE ckey=:ckey", list( + var/datum/db_query/query = SSdbcore.NewQuery("SELECT ckey, job, species FROM whitelist WHERE ckey=:ckey", list( "ckey" = ckey )) if(!query.warn_execute()) diff --git a/code/modules/library/admin.dm b/code/modules/library/admin.dm index 4d45a724ad5..2f1c1e101fc 100644 --- a/code/modules/library/admin.dm +++ b/code/modules/library/admin.dm @@ -10,7 +10,7 @@ if(!isbn) return - var/datum/db_query/query_delbook = SSdbcore.NewQuery("DELETE FROM [format_table_name("library")] WHERE id=:isbn", list( + var/datum/db_query/query_delbook = SSdbcore.NewQuery("DELETE FROM library WHERE id=:isbn", list( "isbn" = text2num(isbn) // just to be sure )) if(!query_delbook.warn_execute()) @@ -37,7 +37,7 @@ var/dat = "" - var/datum/db_query/query = SSdbcore.NewQuery("SELECT id, title, flagged FROM [format_table_name("library")] WHERE flagged > 0 ORDER BY flagged DESC") + var/datum/db_query/query = SSdbcore.NewQuery("SELECT id, title, flagged FROM library WHERE flagged > 0 ORDER BY flagged DESC") if(!query.warn_execute()) qdel(query) return diff --git a/code/modules/library/computers/base.dm b/code/modules/library/computers/base.dm index 660ada20c31..c0f2d473afa 100644 --- a/code/modules/library/computers/base.dm +++ b/code/modules/library/computers/base.dm @@ -51,7 +51,7 @@ // This one doesnt take player input directly, so it doesnt require params searchquery += " [!where ? "WHERE" : "AND"] flagged < [MAX_BOOK_FLAGS]" // This does though - var/sql = "SELECT id, author, title, category, ckey, flagged FROM [format_table_name("library")] [searchquery] LIMIT :lowerlimit, :upperlimit" + var/sql = "SELECT id, author, title, category, ckey, flagged FROM library [searchquery] LIMIT :lowerlimit, :upperlimit" sql_params["lowerlimit"] = text2num((page_num - 1) * LIBRARY_BOOKS_PER_PAGE) sql_params["upperlimit"] = LIBRARY_BOOKS_PER_PAGE @@ -78,7 +78,7 @@ return results /obj/machinery/computer/library/proc/get_num_results() - var/sql = "SELECT COUNT(id) FROM [format_table_name("library")]" + var/sql = "SELECT COUNT(id) FROM library" var/datum/db_query/count_query = SSdbcore.NewQuery(sql) if(!count_query.warn_execute()) diff --git a/code/modules/library/computers/checkout.dm b/code/modules/library/computers/checkout.dm index 065608b7b3d..67fe4a2315e 100644 --- a/code/modules/library/computers/checkout.dm +++ b/code/modules/library/computers/checkout.dm @@ -262,7 +262,7 @@ var/datum/cachedbook/target = getBookByID(href_list["del"]) // Sanitized in getBookByID var/ans = alert(usr, "Are you sure you wish to delete \"[target.title]\", by [target.author]? This cannot be undone.", "Library System", "Yes", "No") if(ans=="Yes") - var/datum/db_query/query = SSdbcore.NewQuery("DELETE FROM [format_table_name("library")] WHERE id=:id", list( + var/datum/db_query/query = SSdbcore.NewQuery("DELETE FROM library WHERE id=:id", list( "id" = text2num(target.id) )) if(!query.warn_execute()) @@ -280,7 +280,7 @@ var/tckey = ckey(href_list["delbyckey"]) var/ans = alert(usr,"Are you sure you wish to delete all books by [tckey]? This cannot be undone.", "Library System", "Yes", "No") if(ans=="Yes") - var/datum/db_query/query = SSdbcore.NewQuery("DELETE FROM [format_table_name("library")] WHERE ckey=:ckey", list( + var/datum/db_query/query = SSdbcore.NewQuery("DELETE FROM library WHERE ckey=:ckey", list( "ckey" = tckey )) if(!query.warn_execute()) @@ -387,7 +387,7 @@ alert("Connection to Archive has been severed. Aborting.") else var/datum/db_query/query = SSdbcore.NewQuery({" - INSERT INTO [format_table_name("library")] (author, title, content, category, ckey, flagged) + INSERT INTO library (author, title, content, category, ckey, flagged) VALUES (:author, :title, :content, :category, :ckey, 0)"}, list( "author" = scanner.cache.author, "title" = scanner.cache.name, diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index ad3e7008396..d76c1f3ef1f 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -78,7 +78,7 @@ GLOBAL_LIST_INIT(library_section_names, list("Any", "Fiction", "Non-Fiction", "A books_flagged_this_round["[id]"] = 1 message_admins("[key_name_admin(user)] has flagged book #[id] as inappropriate.") - var/datum/db_query/query = SSdbcore.NewQuery("UPDATE [format_table_name("library")] SET flagged = flagged + 1 WHERE id=:id", list( + var/datum/db_query/query = SSdbcore.NewQuery("UPDATE library SET flagged = flagged + 1 WHERE id=:id", list( "id" = text2num(id) )) if(!query.warn_execute()) @@ -93,7 +93,7 @@ GLOBAL_LIST_INIT(library_section_names, list("Any", "Fiction", "Non-Fiction", "A to_chat(user, "That book cannot be removed from the system, as it does not actually exist in the database.") return - var/datum/db_query/query = SSdbcore.NewQuery("DELETE FROM [format_table_name("library")] WHERE id=:id", list( + var/datum/db_query/query = SSdbcore.NewQuery("DELETE FROM library WHERE id=:id", list( "id" = text2num(id) )) if(!query.warn_execute()) @@ -105,7 +105,7 @@ GLOBAL_LIST_INIT(library_section_names, list("Any", "Fiction", "Non-Fiction", "A if("[id]" in cached_books) return cached_books["[id]"] - var/datum/db_query/query = SSdbcore.NewQuery("SELECT id, author, title, category, content, ckey, flagged FROM [format_table_name("library")] WHERE id=:id", list( + var/datum/db_query/query = SSdbcore.NewQuery("SELECT id, author, title, category, content, ckey, flagged FROM library WHERE id=:id", list( "id" = text2num(id) )) if(!query.warn_execute()) diff --git a/code/modules/library/random_books.dm b/code/modules/library/random_books.dm index 062b531a261..a43f0cc4b18 100644 --- a/code/modules/library/random_books.dm +++ b/code/modules/library/random_books.dm @@ -56,7 +56,7 @@ sql_params["category"] = category sql_params["amount"] = amount - var/datum/db_query/query_get_random_books = SSdbcore.NewQuery("SELECT author, title, content FROM [format_table_name("library")] WHERE (isnull(flagged) OR flagged = 0)[c] GROUP BY title ORDER BY rand() LIMIT :amount", sql_params) + var/datum/db_query/query_get_random_books = SSdbcore.NewQuery("SELECT author, title, content FROM library WHERE (isnull(flagged) OR flagged = 0)[c] GROUP BY title ORDER BY rand() LIMIT :amount", sql_params) if(!query_get_random_books.warn_execute()) qdel(query_get_random_books) return diff --git a/code/modules/mining/minebot.dm b/code/modules/mining/minebot.dm index 889f2012d1e..0f11bd0e665 100644 --- a/code/modules/mining/minebot.dm +++ b/code/modules/mining/minebot.dm @@ -59,6 +59,10 @@ SetCollectBehavior() +/mob/living/simple_animal/hostile/mining_drone/Destroy() + QDEL_NULL(stored_gun) + return ..() + /mob/living/simple_animal/hostile/mining_drone/emp_act(severity) adjustHealth(100 / severity) to_chat(src, "NOTICE: EMP detected, systems damaged!") diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 1e82747b986..a8a4133310d 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -134,6 +134,8 @@ on_CD = handle_emote_CD() if("deathgasp", "deathgasps") on_CD = handle_emote_CD(50) + if("spin", "spins") + on_CD = handle_emote_CD(50) if("sneeze", "sneezes") on_CD = handle_emote_CD() if("clap", "claps") @@ -443,6 +445,17 @@ message = "[src] does a flip!" SpinAnimation(5,1) + if("spin", "spins") + if(!restrained() && !lying) + if(prob(5)) + spin(30, 1) + message = "[src] spins too much!" + Dizzy(12) + Confused(12) + else + spin(20, 1) + message = "[src] spins!" + if("aflap", "aflaps") if(!restrained()) message = "[src] flaps [p_their()] wings ANGRILY!" @@ -950,7 +963,7 @@ var/emotelist = "aflap(s), airguitar, blink(s), blink(s)_r, blush(es), bow(s)-none/mob, burp(s), choke(s), chuckle(s), clap(s), collapse(s), cough(s), cry, cries, custom, dance, dap(s)-none/mob," \ + " deathgasp(s), drool(s), eyebrow, fart(s), faint(s), flap(s), flip(s), frown(s), gasp(s), giggle(s), glare(s)-none/mob, grin(s), groan(s), grumble(s), grin(s)," \ + " handshake-mob, hug(s)-none/mob, hem, highfive, johnny, jump, kiss(es), laugh(s), look(s)-none/mob, moan(s), mumble(s), nod(s), pale(s), point(s)-atom, quiver(s), raise(s), salute(s)-none/mob, scream(s), shake(s)," \ - + " shiver(s), shrug(s), sigh(s), signal(s)-#1-10, slap(s), smile(s),snap(s), sneeze(s), sniff(s), snore(s), stare(s)-none/mob, tremble(s), twitch(es), twitch(es)_s," \ + + " shiver(s), shrug(s), sigh(s), signal(s)-#1-10, slap(s), smile(s),snap(s), sneeze(s), sniff(s), snore(s), spin(s) stare(s)-none/mob, tremble(s), twitch(es), twitch(es)_s," \ + " wave(s), whimper(s), wink(s), yawn(s)" switch(dna.species.name) diff --git a/code/modules/mob/living/silicon/robot/emote.dm b/code/modules/mob/living/silicon/robot/emote.dm index bec1e1ae668..36dea666cc5 100644 --- a/code/modules/mob/living/silicon/robot/emote.dm +++ b/code/modules/mob/living/silicon/robot/emote.dm @@ -13,6 +13,8 @@ //Cooldown-inducing emotes if("law","flip","flips","halt") //halt is exempt because it's used to stop criminal scum //WHOEVER THOUGHT THAT WAS A GOOD IDEA IS GOING TO GET SHOT. on_CD = handle_emote_CD() //proc located in code\modules\mob\emote.dm + if("spin","spins") + on_CD = handle_emote_CD(5 SECONDS) //Everything else, including typos of the above emotes else on_CD = 0 //If it doesn't induce the cooldown, we won't check for the cooldown @@ -157,8 +159,12 @@ message = "[src] does a flip!" src.SpinAnimation(5,1) + if("spin","spins") + spin(20, 1) + message = "[src] spins!" + if("help") - to_chat(src, "salute, bow-(none)/mob, clap, flap, aflap, twitch, twitches, nod, deathgasp, glare-(none)/mob, stare-(none)/mob, look,\n law, halt") + to_chat(src, "salute, bow-(none)/mob, clap, flap, aflap, twitch, twitches, nod, deathgasp, glare-(none)/mob, stare-(none)/mob, look,\n law, halt, flip, spin") ..() diff --git a/code/modules/mob/living/simple_animal/friendly/dog.dm b/code/modules/mob/living/simple_animal/friendly/dog.dm index 666942b8042..3eb0a2f5d6a 100644 --- a/code/modules/mob/living/simple_animal/friendly/dog.dm +++ b/code/modules/mob/living/simple_animal/friendly/dog.dm @@ -21,13 +21,16 @@ var/yelp_sound = 'sound/creatures/dog_yelp.ogg' //Used on death. var/last_eaten = 0 footstep_type = FOOTSTEP_MOB_CLAW + var/next_spin_message = 0 /mob/living/simple_animal/pet/dog/verb/chasetail() set name = "Chase your tail" set desc = "d'awwww." set category = "Dog" - visible_message("[src] [pick("dances around", "chases [p_their()] tail")].", "[pick("You dance around", "You chase your tail")].") + if(next_spin_message <= world.time) + visible_message("[src] [pick("dances around", "chases [p_their()] tail")].", "[pick("You dance around", "You chase your tail")].") + next_spin_message = world.time + 5 SECONDS spin(20, 1) /mob/living/simple_animal/pet/dog/death(gibbed) diff --git a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm index 245dcf26f70..c99545e7ed6 100644 --- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm +++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm @@ -29,6 +29,7 @@ can_collar = 1 blood_volume = BLOOD_VOLUME_NORMAL var/obj/item/udder/udder = null + gender = FEMALE footstep_type = FOOTSTEP_MOB_SHOE /mob/living/simple_animal/hostile/retaliate/goat/New() diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm index eed323d9ebe..d910903c009 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm @@ -312,6 +312,8 @@ GLOBAL_LIST_EMPTY(ts_spiderling_list) /mob/living/simple_animal/hostile/poison/terror_spider/Destroy() GLOB.ts_spiderlist -= src + var/datum/atom_hud/U = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED] + U.remove_hud_from(src) handle_dying() return ..() diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm index fceffecbffc..fab75c91507 100644 --- a/code/modules/mob/living/status_procs.dm +++ b/code/modules/mob/living/status_procs.dm @@ -211,11 +211,12 @@ /mob/living/SetEyeBlurry(amount, updating = TRUE) . = STATUS_UPDATE_BLURRY - if((!!amount) == (!!eye_blurry)) // We're not changing from + to 0 or vice versa + //if they're both above max or equal that means we won't change the blur filter + if(amount > MAX_EYE_BLURRY_FILTER_SIZE / EYE_BLUR_TO_FILTER_SIZE_MULTIPLIER && eye_blurry > MAX_EYE_BLURRY_FILTER_SIZE / EYE_BLUR_TO_FILTER_SIZE_MULTIPLIER || eye_blurry == amount) updating = FALSE . = STATUS_UPDATE_NONE + eye_blurry = max(amount, 0) - // We transitioned to/from 0, so update the eye blur overlays if(updating) update_blurry_effects() diff --git a/code/modules/mob/living/update_status.dm b/code/modules/mob/living/update_status.dm index b942b0cabe7..73231403d9a 100644 --- a/code/modules/mob/living/update_status.dm +++ b/code/modules/mob/living/update_status.dm @@ -9,12 +9,11 @@ return 0 /mob/living/update_blurry_effects() - if(eyes_blurred()) - overlay_fullscreen("blurry", /obj/screen/fullscreen/blurry) - return 1 + var/atom/movable/plane_master_controller/game_plane_master_controller = hud_used.plane_master_controllers[PLANE_MASTERS_GAME] + if(eye_blurry) + game_plane_master_controller.add_filter("eye_blur", 1, gauss_blur_filter(clamp(eye_blurry * EYE_BLUR_TO_FILTER_SIZE_MULTIPLIER, 0.6, MAX_EYE_BLURRY_FILTER_SIZE))) else - clear_fullscreen("blurry") - return 0 + game_plane_master_controller.remove_filter("eye_blur") /mob/living/update_druggy_effects() if(druggy) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 24d95fa1534..b251c3a1168 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -8,6 +8,7 @@ spellremove(src) mobspellremove(src) QDEL_LIST(viruses) + QDEL_LIST(actions) ghostize() QDEL_LIST_ASSOC_VAL(tkgrabbed_objects) for(var/I in tkgrabbed_objects) @@ -20,6 +21,7 @@ AA.viewers -= src viewing_alternate_appearances = null LAssailant = null + runechat_msg_location = null return ..() /mob/Initialize(mapload) @@ -1352,20 +1354,14 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ set waitfor = 0 if(!spintime || !speed || spintime > 100) CRASH("Aborted attempted call of /mob/proc/spin with invalid args ([spintime],[speed]) which could have frozen the server.") - var/D = dir - while(spintime >= speed) + var/end_time = world.time + spintime + var/spin_dir = prob(50) + while(world.time <= end_time) sleep(speed) - switch(D) - if(NORTH) - D = EAST - if(SOUTH) - D = WEST - if(EAST) - D = SOUTH - if(WEST) - D = NORTH - setDir(D) - spintime -= speed + if(spin_dir) + dir = turn(dir, 90) + else + dir = turn(dir, -90) /mob/proc/is_literate() return FALSE diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index e0f88a53b2b..ed75caa8f39 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -169,7 +169,10 @@ n = get_step(mob, direct) . = mob.SelfMove(n, direct, delay) - mob.setDir(direct) + if(mob.pulling?.face_while_pulling) + mob.setDir(get_dir(mob, mob.pulling)) // Face welding tanks and stuff when pulling + else + mob.setDir(direct) if((direct & (direct - 1)) && mob.loc == n) //moved diagonally successfully delay = mob.movement_delay() * 2 //Will prevent mob diagonal moves from smoothing accurately, sadly diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 5d7d5caa919..30a26a7af6e 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -115,7 +115,7 @@ return FALSE if(href_list["consent_signed"]) - var/datum/db_query/query = SSdbcore.NewQuery("REPLACE INTO [format_table_name("privacy")] (ckey, datetime, consent) VALUES (:ckey, Now(), 1)", list( + var/datum/db_query/query = SSdbcore.NewQuery("REPLACE INTO privacy (ckey, datetime, consent) VALUES (:ckey, Now(), 1)", list( "ckey" = ckey )) // If the query fails we dont want them permenantly stuck on being unable to accept TOS @@ -129,7 +129,7 @@ if(href_list["consent_rejected"]) client.tos_consent = FALSE to_chat(usr, "You must consent to the terms of service before you can join!") - var/datum/db_query/query = SSdbcore.NewQuery("REPLACE INTO [format_table_name("privacy")] (ckey, datetime, consent) VALUES (:ckey, Now(), 0)", list( + var/datum/db_query/query = SSdbcore.NewQuery("REPLACE INTO privacy (ckey, datetime, consent) VALUES (:ckey, Now(), 0)", list( "ckey" = ckey )) // If the query fails we dont want them permenantly stuck on being unable to accept TOS diff --git a/code/modules/mob/new_player/sprite_accessories/sprite_accessories.dm b/code/modules/mob/new_player/sprite_accessories/sprite_accessories.dm index 96151e62274..50f91025230 100644 --- a/code/modules/mob/new_player/sprite_accessories/sprite_accessories.dm +++ b/code/modules/mob/new_player/sprite_accessories/sprite_accessories.dm @@ -616,6 +616,37 @@ /datum/sprite_accessory/socks/black_fishnet name = "Black Fishnet" icon_state = "black_fishnet" +/datum/sprite_accessory/socks/stockings_lpink + name = "Stockings (Programmer)" + icon_state = "stockings_lpink" + +/datum/sprite_accessory/socks/stockings_purple + name = "Stockings (Purple)" + icon_state = "stockings_purple" + +/datum/sprite_accessory/socks/stockings_green + name = "Stockings (Green)" + icon_state = "stockings_green" + +/datum/sprite_accessory/socks/stockings_cyan + name = "Stockings (Cyan)" + icon_state = "stockings_cyan" + +/datum/sprite_accessory/socks/stockings_orange + name = "Stockings (Orange)" + icon_state = "stockings_orange" + +/datum/sprite_accessory/socks/stockings_yellow + name = "Stockings (Yellow)" + icon_state = "stockings_yellow" + +/datum/sprite_accessory/socks/stockings_dpink + name = "Stockings (Dark Pink)" + icon_state = "stockings_dpink" + +/datum/sprite_accessory/socks/stockings_blue + name = "Stockings (Blue)" + icon_state = "stockings_blue" /* HAIR GRADIENT */ diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index 90acc6dd253..c758c937966 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -222,7 +222,7 @@ //or if it is already above upper_limit, limit the increase to 0. var/inc_limit = max(upper_limit - temperature, 0) var/dec_limit = min(temperature - lower_limit, 0) - temperature += between(dec_limit, rand(-7 + bias, 7 + bias), inc_limit) + temperature += clamp(rand(-7 + bias, 7 + bias), dec_limit, inc_limit) if(temperature > max_temperature) overheat() @@ -239,7 +239,7 @@ if(temperature > cooling_temperature) var/temp_loss = (temperature - cooling_temperature)/TEMPERATURE_DIVISOR - temp_loss = between(2, round(temp_loss, 1), TEMPERATURE_CHANGE_MAX) + temp_loss = clamp(round(temp_loss, 1), 2, TEMPERATURE_CHANGE_MAX) temperature = max(temperature - temp_loss, cooling_temperature) SStgui.update_uis(src) diff --git a/code/modules/reagents/chemistry/reagents/drugs.dm b/code/modules/reagents/chemistry/reagents/drugs.dm index 201071745a8..89362dc9166 100644 --- a/code/modules/reagents/chemistry/reagents/drugs.dm +++ b/code/modules/reagents/chemistry/reagents/drugs.dm @@ -640,18 +640,18 @@ /datum/reagent/rotatium/on_mob_life(mob/living/carbon/M) if(M.hud_used) if(current_cycle >= 20 && current_cycle % 20 == 0) - var/list/screens = list(M.hud_used.plane_masters["[FLOOR_PLANE]"], M.hud_used.plane_masters["[GAME_PLANE]"], M.hud_used.plane_masters["[LIGHTING_PLANE]"]) + var/atom/movable/plane_master_controller/pm_controller = M.hud_used.plane_master_controllers[PLANE_MASTERS_GAME] var/rotation = min(round(current_cycle / 20), 89) // By this point the player is probably puking and quitting anyway - for(var/whole_screen in screens) - animate(whole_screen, transform = matrix(rotation, MATRIX_ROTATE), time = 5, easing = QUAD_EASING, loop = -1) + for(var/key in pm_controller.controlled_planes) + animate(pm_controller.controlled_planes[key], transform = matrix(rotation, MATRIX_ROTATE), time = 5, easing = QUAD_EASING, loop = -1) animate(transform = matrix(-rotation, MATRIX_ROTATE), time = 5, easing = QUAD_EASING) return ..() /datum/reagent/rotatium/on_mob_delete(mob/living/M) - if(M && M.hud_used) - var/list/screens = list(M.hud_used.plane_masters["[FLOOR_PLANE]"], M.hud_used.plane_masters["[GAME_PLANE]"], M.hud_used.plane_masters["[LIGHTING_PLANE]"]) - for(var/whole_screen in screens) - animate(whole_screen, transform = matrix(), time = 5, easing = QUAD_EASING) + if(M?.hud_used) + var/atom/movable/plane_master_controller/pm_controller = M.hud_used.plane_master_controllers[PLANE_MASTERS_GAME] + for(var/key in pm_controller.controlled_planes) + animate(pm_controller.controlled_planes[key], transform = matrix(), time = 5, easing = QUAD_EASING) ..() ////////////////////////////// diff --git a/code/modules/response_team/ert_outfits.dm b/code/modules/response_team/ert_outfits.dm index 8c3fbda5e57..b597af644f9 100644 --- a/code/modules/response_team/ert_outfits.dm +++ b/code/modules/response_team/ert_outfits.dm @@ -321,12 +321,11 @@ /obj/item/clothing/head/helmet/ert/medical = 1, /obj/item/clothing/mask/surgical = 1, /obj/item/storage/firstaid/adv = 1, - /obj/item/storage/firstaid/regular = 1, + /obj/item/storage/firstaid/doctor = 1, /obj/item/storage/box/autoinjectors = 1, /obj/item/roller = 1, /obj/item/storage/pill_bottle/ert = 1, /obj/item/flashlight = 1, - /obj/item/healthupgrade = 1, /obj/item/handheld_defibrillator = 1 ) @@ -349,13 +348,12 @@ backpack_contents = list( /obj/item/clothing/mask/surgical = 1, /obj/item/storage/firstaid/toxin = 1, - /obj/item/storage/firstaid/brute = 1, - /obj/item/storage/firstaid/fire = 1, + /obj/item/storage/firstaid/doctor = 1, + /obj/item/storage/firstaid/adv = 1, /obj/item/storage/box/autoinjectors = 1, /obj/item/roller = 1, /obj/item/clothing/shoes/magboots = 1, /obj/item/bodyanalyzer = 1, - /obj/item/healthupgrade = 1, /obj/item/handheld_defibrillator = 1 ) @@ -378,9 +376,10 @@ backpack_contents = list( /obj/item/bodyanalyzer/advanced = 1, + /obj/item/storage/firstaid/doctor = 1, + /obj/item/storage/firstaid/adv = 1, /obj/item/extinguisher/mini = 1, /obj/item/roller = 1, - /obj/item/healthanalyzer/advanced = 1, /obj/item/handheld_defibrillator = 1 ) @@ -483,16 +482,15 @@ /obj/item/reagent_containers/spray/cleaner = 1, /obj/item/storage/bag/trash = 1, /obj/item/storage/box/lights/mixed = 1, - /obj/item/holosign_creator = 1, - /obj/item/flashlight = 1) + /obj/item/melee/flyswatter = 1) /datum/outfit/job/centcom/response_team/janitorial/amber name = "RT Janitor (Amber)" suit = /obj/item/clothing/suit/armor/vest/ert/janitor head = /obj/item/clothing/head/helmet/ert/janitor glasses = /obj/item/clothing/glasses/sunglasses - - r_hand = /obj/item/gun/energy/disabler + r_pocket = /obj/item/flashlight + suit_store = /obj/item/gun/energy/disabler cybernetic_implants = list( /obj/item/organ/internal/cyberimp/arm/advmop) @@ -503,7 +501,7 @@ glasses = /obj/item/clothing/glasses/hud/security/sunglasses r_pocket = /obj/item/scythe/tele - l_pocket = /obj/item/gun/energy/gun/mini + suit_store = /obj/item/gun/energy/gun/mini cybernetic_implants = list( /obj/item/organ/internal/cyberimp/arm/janitorial, @@ -513,20 +511,22 @@ /datum/outfit/job/centcom/response_team/janitorial/gamma name = "RT Janitor (Gamma)" suit = /obj/item/clothing/suit/space/hardsuit/ert/janitor/gamma - glasses = /obj/item/clothing/glasses/hud/security/sunglasses + glasses = /obj/item/clothing/glasses/night suit_store = /obj/item/gun/energy/gun - l_pocket = /obj/item/grenade/clusterbuster/cleaner r_pocket = /obj/item/scythe/tele shoes = /obj/item/clothing/shoes/magboots/advance backpack_contents = list( /obj/item/grenade/chem_grenade/antiweed = 2, + /obj/item/grenade/clusterbuster/cleaner = 1, /obj/item/storage/box/lights/mixed = 1, /obj/item/storage/bag/trash/bluespace = 1, - /obj/item/reagent_containers/spray/cleaner = 1 + /obj/item/reagent_containers/spray/cleaner = 1, + /obj/item/melee/flyswatter = 1 ) cybernetic_implants = list( + /obj/item/organ/internal/cyberimp/chest/nutriment/plus, /obj/item/organ/internal/cyberimp/arm/advmop, /obj/item/organ/internal/cyberimp/brain/anti_stun/hardened ) diff --git a/code/modules/security_levels/security_levels.dm b/code/modules/security_levels/security_levels.dm index af22e0061e4..d3d4be7dff9 100644 --- a/code/modules/security_levels/security_levels.dm +++ b/code/modules/security_levels/security_levels.dm @@ -77,22 +77,15 @@ GLOBAL_DATUM_INIT(security_announcement_down, /datum/announcement/priority/secur FA.overlays += image('icons/obj/monitors.dmi', "overlay_red") if(SEC_LEVEL_GAMMA) - GLOB.security_announcement_up.Announce("Central Command has ordered the Gamma security level on the station. Security is to have weapons equipped at all times, and all civilians are to immediately seek their nearest head for transportation to a secure location. The station's Gamma armory has been unlocked and is ready for use.","Attention! Gamma security level activated!", new_sound = sound('sound/effects/new_siren.ogg')) + GLOB.security_announcement_up.Announce("Central Command has ordered the Gamma security level on the station. Security is to have weapons equipped at all times, and all civilians are to immediately seek their nearest head for transportation to a secure location.", "Attention! Gamma security level activated!", sound('sound/effects/new_siren.ogg')) GLOB.security_level = SEC_LEVEL_GAMMA - move_gamma_ship() - if(GLOB.security_level < SEC_LEVEL_RED) for(var/obj/machinery/door/airlock/highsecurity/red/R in GLOB.airlocks) if(is_station_level(R.z)) R.locked = 0 R.update_icon() - for(var/obj/machinery/door/airlock/hatch/gamma/H in GLOB.airlocks) - if(is_station_level(H.z)) - H.locked = 0 - H.update_icon() - post_status("alert", "gammaalert") for(var/obj/machinery/firealarm/FA in GLOB.machines) diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm index 319f044f449..00abe28ff71 100644 --- a/code/modules/surgery/organs/augments_internal.dm +++ b/code/modules/surgery/organs/augments_internal.dm @@ -336,7 +336,7 @@ /obj/item/organ/internal/cyberimp/chest/reviver name = "Reviver implant" - desc = "This implant will attempt to revive you if you lose consciousness. For the faint of heart!" + desc = "This implant will attempt to heal you out of critical condition. For the faint of heart!" icon_state = "chest_implant" implant_color = "#AD0000" origin_tech = "materials=5;programming=4;biotech=4" @@ -361,6 +361,11 @@ addtimer(CALLBACK(src, .proc/heal), 30) else reviving = FALSE + if(owner.HasDisease(new /datum/disease/critical/shock(0)) && prob(15)) //If they are no longer in crit, but have shock, and pass a 15% chance: + for(var/datum/disease/critical/shock/S in owner.viruses) + S.cure() + revive_cost += 150 + to_chat(owner, "You feel better.") return cooldown = revive_cost + world.time revive_cost = 0 diff --git a/code/modules/surgery/organs/organ.dm b/code/modules/surgery/organs/organ.dm index f4916716efb..4d6979de069 100644 --- a/code/modules/surgery/organs/organ.dm +++ b/code/modules/surgery/organs/organ.dm @@ -164,7 +164,7 @@ if(germ_level >= INFECTION_LEVEL_ONE) var/fever_temperature = (owner.dna.species.heat_level_1 - owner.dna.species.body_temperature - 5) * min(germ_level / INFECTION_LEVEL_TWO, 1) + owner.dna.species.body_temperature - owner.bodytemperature += between(0, (fever_temperature - T20C) / BODYTEMP_COLD_DIVISOR + 1, fever_temperature - owner.bodytemperature) + owner.bodytemperature += clamp((fever_temperature - T20C) / BODYTEMP_COLD_DIVISOR + 1, 0, fever_temperature - owner.bodytemperature) if(germ_level >= INFECTION_LEVEL_TWO) var/obj/item/organ/external/parent = owner.get_organ(parent_organ) @@ -208,7 +208,7 @@ /obj/item/organ/proc/receive_damage(amount, silent = 0) if(tough) return - damage = between(0, damage + amount, max_damage) + damage = clamp(damage + amount, 0, max_damage) //only show this if the organ is not robotic if(owner && parent_organ && amount > 0) diff --git a/config/example/config.toml b/config/example/config.toml index 70899f25063..ac9106734f2 100644 --- a/config/example/config.toml +++ b/config/example/config.toml @@ -146,13 +146,11 @@ sql_address = "127.0.0.1" # SQL server port sql_port = 3306 # SQL server database name -sql_database = "feedback" # TODO: Convert into `paradise_db` -# SQL server table prefix, if applicable. SET TO EMPTY STRING IF NOT. -sql_table_prefix = "" # TODO: Deprecate table prefixes +sql_database = "paradise_gamedb" # SQL server username sql_username = "root" # SQL server password -sql_password = "please use something secure in a prod environment" +sql_password = "please use something secure in a production environment" # Time in seconds for async queries to time out async_query_timeout = 10 # How many threads is the async SQL engine allowed to open. 50 is normal. Trust me. diff --git a/icons/mob/underwear.dmi b/icons/mob/underwear.dmi index ab1879132de..a7027e86232 100644 Binary files a/icons/mob/underwear.dmi and b/icons/mob/underwear.dmi differ diff --git a/paradise.dme b/paradise.dme index 40cd6ebed27..3ccb2456af2 100644 --- a/paradise.dme +++ b/paradise.dme @@ -173,6 +173,7 @@ #include "code\_onclick\hud\parallax.dm" #include "code\_onclick\hud\picture_in_picture.dm" #include "code\_onclick\hud\plane_master.dm" +#include "code\_onclick\hud\plane_master_controller.dm" #include "code\_onclick\hud\radial.dm" #include "code\_onclick\hud\robot.dm" #include "code\_onclick\hud\screen_objects.dm" diff --git a/tools/ci/generate_sql_scripts.py b/tools/ci/generate_sql_scripts.py index 5c7cf97230b..3b2687a733a 100644 --- a/tools/ci/generate_sql_scripts.py +++ b/tools/ci/generate_sql_scripts.py @@ -54,9 +54,9 @@ for file in orderedSqlFiles: if file.endswith(".py"): # Begin snowflakery if file == "16-17.py": - scriptLines.append("python3 SQL/updates/" + str(file) + " 127.0.0.1 root root feedback feedback round\n") + scriptLines.append("python3 SQL/updates/" + str(file) + " 127.0.0.1 root root paradise_gamedb feedback round\n") elif file == "17-18.py": - scriptLines.append("python3 SQL/updates/" + str(file) + " 127.0.0.1 root root feedback feedback feedback_2\n") + scriptLines.append("python3 SQL/updates/" + str(file) + " 127.0.0.1 root root paradise_gamedb feedback feedback_2\n") else: print("ERROR: CI failed due to invalid python file in SQL/updates") exit(1) @@ -64,8 +64,8 @@ for file in orderedSqlFiles: inFile = open("SQL/updates/" + file, "r") fileLines = inFile.readlines() inFile.close() - # Add in a line which tells it to use the feedback DB - fileLines.insert(0, "USE `feedback`;\n") + # Add in a line which tells it to use the paradise DB + fileLines.insert(0, "USE `paradise_gamedb`;\n") # Write new files to be used by the testing script outFile = open("tools/ci/sql_tmp/" + file, "w+") @@ -75,9 +75,7 @@ for file in orderedSqlFiles: # Add a line to the script being made that tells it to use this SQL file scriptLines.append("mysql -u root -proot < tools/ci/sql_tmp/" + str(file) + "\n") -scriptLines.append("mysql -u root -proot -e 'DROP DATABASE feedback;'\n") -scriptLines.append("mysql -u root -proot < SQL/paradise_schema_prefixed.sql\n") -scriptLines.append("mysql -u root -proot -e 'DROP DATABASE feedback;'\n") +scriptLines.append("mysql -u root -proot -e 'DROP DATABASE paradise_gamedb;'\n") scriptLines.append("mysql -u root -proot < SQL/paradise_schema.sql\n") outputScript = open("tools/ci/validate_sql.sh", "w+") diff --git a/tools/ci/sql_v0.sql b/tools/ci/sql_v0.sql index 201347a2f1e..d9c5d235fc2 100644 --- a/tools/ci/sql_v0.sql +++ b/tools/ci/sql_v0.sql @@ -16,12 +16,12 @@ /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; --- Dumping database structure for feedback -DROP DATABASE IF EXISTS `feedback`; -CREATE DATABASE IF NOT EXISTS `feedback` /*!40100 DEFAULT CHARACTER SET utf8 */; -USE `feedback`; +-- Dumping database structure for paradise_gamedb +DROP DATABASE IF EXISTS `paradise_gamedb`; +CREATE DATABASE IF NOT EXISTS `paradise_gamedb` /*!40100 DEFAULT CHARACTER SET utf8 */; +USE `paradise_gamedb`; --- Dumping structure for table feedback.admin +-- Dumping structure for table paradise_gamedb.admin DROP TABLE IF EXISTS `admin`; CREATE TABLE IF NOT EXISTS `admin` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -32,13 +32,13 @@ CREATE TABLE IF NOT EXISTS `admin` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; --- Dumping data for table feedback.admin: ~0 rows (approximately) +-- Dumping data for table paradise_gamedb.admin: ~0 rows (approximately) /*!40000 ALTER TABLE `admin` DISABLE KEYS */; INSERT INTO `admin` (`id`, `ckey`, `rank`, `level`, `flags`) VALUES (1, 'AffectedArc07', 'Administrator', 0, 131071); /*!40000 ALTER TABLE `admin` ENABLE KEYS */; --- Dumping structure for table feedback.admin_log +-- Dumping structure for table paradise_gamedb.admin_log DROP TABLE IF EXISTS `admin_log`; CREATE TABLE IF NOT EXISTS `admin_log` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -49,13 +49,13 @@ CREATE TABLE IF NOT EXISTS `admin_log` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; --- Dumping data for table feedback.admin_log: ~0 rows (approximately) +-- Dumping data for table paradise_gamedb.admin_log: ~0 rows (approximately) /*!40000 ALTER TABLE `admin_log` DISABLE KEYS */; INSERT INTO `admin_log` (`id`, `datetime`, `adminckey`, `adminip`, `log`) VALUES (1, '2020-04-24 17:36:49', 'AffectedArc07', '127.0.0.1', 'Created this row'); /*!40000 ALTER TABLE `admin_log` ENABLE KEYS */; --- Dumping structure for table feedback.ban +-- Dumping structure for table paradise_gamedb.ban DROP TABLE IF EXISTS `ban`; CREATE TABLE IF NOT EXISTS `ban` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -84,13 +84,13 @@ CREATE TABLE IF NOT EXISTS `ban` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; --- Dumping data for table feedback.ban: ~0 rows (approximately) +-- Dumping data for table paradise_gamedb.ban: ~0 rows (approximately) /*!40000 ALTER TABLE `ban` DISABLE KEYS */; INSERT INTO `ban` (`id`, `bantime`, `serverip`, `bantype`, `reason`, `job`, `duration`, `rounds`, `expiration_time`, `ckey`, `computerid`, `ip`, `a_ckey`, `a_computerid`, `a_ip`, `who`, `adminwho`, `edits`, `unbanned`, `unbanned_datetime`, `unbanned_ckey`, `unbanned_computerid`, `unbanned_ip`) VALUES (1, '2020-04-24 17:40:05', '127.0.0.1', 'PERMABAN', 'Breaking it all', NULL, -1, NULL, '2020-04-24 17:40:20', 'AffectedArc07', '1111111111', '127.0.0.1', 'AffectedArc07', '1111111111', '127.0.0.1', 'Player1, Player2, Whoever', 'SomeAdmin', NULL, NULL, NULL, NULL, NULL, NULL); /*!40000 ALTER TABLE `ban` ENABLE KEYS */; --- Dumping structure for table feedback.characters +-- Dumping structure for table paradise_gamedb.characters DROP TABLE IF EXISTS `characters`; CREATE TABLE IF NOT EXISTS `characters` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -165,13 +165,13 @@ CREATE TABLE IF NOT EXISTS `characters` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; --- Dumping data for table feedback.characters: ~0 rows (approximately) +-- Dumping data for table paradise_gamedb.characters: ~0 rows (approximately) /*!40000 ALTER TABLE `characters` DISABLE KEYS */; INSERT INTO `characters` (`id`, `ckey`, `slot`, `OOC_Notes`, `real_name`, `name_is_always_random`, `gender`, `age`, `species`, `language`, `hair_red`, `hair_green`, `hair_blue`, `secondary_hair_red`, `secondary_hair_green`, `secondary_hair_blue`, `facial_red`, `facial_green`, `facial_blue`, `secondary_facial_red`, `secondary_facial_green`, `secondary_facial_blue`, `skin_tone`, `skin_red`, `skin_green`, `skin_blue`, `marking_colours`, `head_accessory_red`, `head_accessory_green`, `head_accessory_blue`, `hair_style_name`, `facial_style_name`, `marking_styles`, `head_accessory_style_name`, `alt_head_name`, `eyes_red`, `eyes_green`, `eyes_blue`, `underwear`, `undershirt`, `backbag`, `b_type`, `alternate_option`, `job_support_high`, `job_support_med`, `job_support_low`, `job_medsci_high`, `job_medsci_med`, `job_medsci_low`, `job_engsec_high`, `job_engsec_med`, `job_engsec_low`, `job_karma_high`, `job_karma_med`, `job_karma_low`, `flavor_text`, `med_record`, `sec_record`, `gen_record`, `disabilities`, `player_alt_titles`, `organ_data`, `rlimb_data`, `nanotrasen_relation`, `speciesprefs`, `socks`, `body_accessory`, `gear`, `autohiss`) VALUES (1, 'AffectedArc07', 1, 'Some notes', 'John Smith', 0, 'male', 25, 'Human', 'None', 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 25, 10, 10, 10, 'head=%23000000&body=%23000000&tail=%23000000', 10, 10, 10, 'Bald', 'Shaved', 'head=None&body=None&tail=None', 'None', 'None', 10, 10, 10, 'Nude', 'Nude', 'Grey Backpack', 'A+', 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'He is short', 'Yes', 'Yes', 'Yes', 0, ' ', ' ', ' ', 'Neutral', 0, 'Nude', ' ', ' ', 0); /*!40000 ALTER TABLE `characters` ENABLE KEYS */; --- Dumping structure for table feedback.customuseritems +-- Dumping structure for table paradise_gamedb.customuseritems DROP TABLE IF EXISTS `customuseritems`; CREATE TABLE IF NOT EXISTS `customuseritems` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -186,13 +186,13 @@ CREATE TABLE IF NOT EXISTS `customuseritems` ( PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; --- Dumping data for table feedback.customuseritems: 0 rows +-- Dumping data for table paradise_gamedb.customuseritems: 0 rows /*!40000 ALTER TABLE `customuseritems` DISABLE KEYS */; INSERT INTO `customuseritems` (`id`, `cuiCKey`, `cuiRealName`, `cuiPath`, `cuiItemName`, `cuiDescription`, `cuiReason`, `cuiPropAdjust`, `cuiJobMask`) VALUES (1, 'AffectedArc07', 'Character Name', '/obj/item/multitool', NULL, NULL, NULL, NULL, '*'); /*!40000 ALTER TABLE `customuseritems` ENABLE KEYS */; --- Dumping structure for table feedback.death +-- Dumping structure for table paradise_gamedb.death DROP TABLE IF EXISTS `death`; CREATE TABLE IF NOT EXISTS `death` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -213,13 +213,13 @@ CREATE TABLE IF NOT EXISTS `death` ( PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; --- Dumping data for table feedback.death: 0 rows +-- Dumping data for table paradise_gamedb.death: 0 rows /*!40000 ALTER TABLE `death` DISABLE KEYS */; INSERT INTO `death` (`id`, `pod`, `coord`, `tod`, `job`, `special`, `name`, `byondkey`, `laname`, `lakey`, `gender`, `bruteloss`, `brainloss`, `fireloss`, `oxyloss`) VALUES (1, 'Central Primary Hallway', '1,1,1', '2020-04-24 17:58:41', 'Captain', 'Traitor', 'John Smith', 'AffectedArc07', 'Bad Man', 'BadGuyCkey', 'Male', 12, 12, 12, 12); /*!40000 ALTER TABLE `death` ENABLE KEYS */; --- Dumping structure for table feedback.donators +-- Dumping structure for table paradise_gamedb.donators DROP TABLE IF EXISTS `donators`; CREATE TABLE IF NOT EXISTS `donators` ( `patreon_name` varchar(32) NOT NULL, @@ -231,13 +231,13 @@ CREATE TABLE IF NOT EXISTS `donators` ( PRIMARY KEY (`patreon_name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; --- Dumping data for table feedback.donators: ~0 rows (approximately) +-- Dumping data for table paradise_gamedb.donators: ~0 rows (approximately) /*!40000 ALTER TABLE `donators` DISABLE KEYS */; INSERT INTO `donators` (`patreon_name`, `tier`, `ckey`, `start_date`, `end_date`, `active`) VALUES ('AffectedArc07', 3, 'AffectedArc07', '2020-04-24 18:00:47', '2020-04-24 18:00:48', 1); /*!40000 ALTER TABLE `donators` ENABLE KEYS */; --- Dumping structure for table feedback.feedback +-- Dumping structure for table paradise_gamedb.feedback DROP TABLE IF EXISTS `feedback`; CREATE TABLE IF NOT EXISTS `feedback` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -249,13 +249,13 @@ CREATE TABLE IF NOT EXISTS `feedback` ( PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; --- Dumping data for table feedback.feedback: 0 rows +-- Dumping data for table paradise_gamedb.feedback: 0 rows /*!40000 ALTER TABLE `feedback` DISABLE KEYS */; INSERT INTO `feedback` (`id`, `time`, `round_id`, `var_name`, `var_value`, `details`) VALUES (1, '2020-04-24 18:01:08', 1, 'yes', 1, 'feedback scares me'); /*!40000 ALTER TABLE `feedback` ENABLE KEYS */; --- Dumping structure for table feedback.karma +-- Dumping structure for table paradise_gamedb.karma DROP TABLE IF EXISTS `karma`; CREATE TABLE IF NOT EXISTS `karma` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -271,13 +271,13 @@ CREATE TABLE IF NOT EXISTS `karma` ( PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; --- Dumping data for table feedback.karma: 0 rows +-- Dumping data for table paradise_gamedb.karma: 0 rows /*!40000 ALTER TABLE `karma` DISABLE KEYS */; INSERT INTO `karma` (`id`, `spendername`, `spenderkey`, `receivername`, `receiverkey`, `receiverrole`, `receiverspecial`, `isnegative`, `spenderip`, `time`) VALUES (1, 'John Smith', 'AffectedArc07', 'Other Man', 'OtherCkey', 'Captain', 'Special', 0, '127.0.0.1', '2020-04-24 18:02:00'); /*!40000 ALTER TABLE `karma` ENABLE KEYS */; --- Dumping structure for table feedback.karmatotals +-- Dumping structure for table paradise_gamedb.karmatotals DROP TABLE IF EXISTS `karmatotals`; CREATE TABLE IF NOT EXISTS `karmatotals` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -287,13 +287,13 @@ CREATE TABLE IF NOT EXISTS `karmatotals` ( PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; --- Dumping data for table feedback.karmatotals: 0 rows +-- Dumping data for table paradise_gamedb.karmatotals: 0 rows /*!40000 ALTER TABLE `karmatotals` DISABLE KEYS */; INSERT INTO `karmatotals` (`id`, `byondkey`, `karma`, `karmaspent`) VALUES (1, 'AffectedArc07', 1000, 100); /*!40000 ALTER TABLE `karmatotals` ENABLE KEYS */; --- Dumping structure for table feedback.legacy_population +-- Dumping structure for table paradise_gamedb.legacy_population DROP TABLE IF EXISTS `legacy_population`; CREATE TABLE IF NOT EXISTS `legacy_population` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -303,13 +303,13 @@ CREATE TABLE IF NOT EXISTS `legacy_population` ( PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; --- Dumping data for table feedback.legacy_population: 0 rows +-- Dumping data for table paradise_gamedb.legacy_population: 0 rows /*!40000 ALTER TABLE `legacy_population` DISABLE KEYS */; INSERT INTO `legacy_population` (`id`, `playercount`, `admincount`, `time`) VALUES (1, 233, 23, '2020-04-24 18:02:19'); /*!40000 ALTER TABLE `legacy_population` ENABLE KEYS */; --- Dumping structure for table feedback.library +-- Dumping structure for table paradise_gamedb.library DROP TABLE IF EXISTS `library`; CREATE TABLE IF NOT EXISTS `library` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -322,13 +322,13 @@ CREATE TABLE IF NOT EXISTS `library` ( PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; --- Dumping data for table feedback.library: 0 rows +-- Dumping data for table paradise_gamedb.library: 0 rows /*!40000 ALTER TABLE `library` DISABLE KEYS */; INSERT INTO `library` (`id`, `author`, `title`, `content`, `category`, `ckey`, `flagged`) VALUES (1, 'John Smith', 'A book', 'WOW WHAT A BOOK', 'Fiction', 'AffectedArc07', 0); /*!40000 ALTER TABLE `library` ENABLE KEYS */; --- Dumping structure for table feedback.memo +-- Dumping structure for table paradise_gamedb.memo DROP TABLE IF EXISTS `memo`; CREATE TABLE IF NOT EXISTS `memo` ( `ckey` varchar(32) NOT NULL, @@ -339,13 +339,13 @@ CREATE TABLE IF NOT EXISTS `memo` ( PRIMARY KEY (`ckey`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; --- Dumping data for table feedback.memo: ~0 rows (approximately) +-- Dumping data for table paradise_gamedb.memo: ~0 rows (approximately) /*!40000 ALTER TABLE `memo` DISABLE KEYS */; INSERT INTO `memo` (`ckey`, `memotext`, `timestamp`, `last_editor`, `edits`) VALUES ('AffectedArc07', 'Remember to test your PRs', '2020-04-24 18:04:00', NULL, NULL); /*!40000 ALTER TABLE `memo` ENABLE KEYS */; --- Dumping structure for table feedback.notes +-- Dumping structure for table paradise_gamedb.notes DROP TABLE IF EXISTS `notes`; CREATE TABLE IF NOT EXISTS `notes` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -359,13 +359,13 @@ CREATE TABLE IF NOT EXISTS `notes` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; --- Dumping data for table feedback.notes: ~0 rows (approximately) +-- Dumping data for table paradise_gamedb.notes: ~0 rows (approximately) /*!40000 ALTER TABLE `notes` DISABLE KEYS */; INSERT INTO `notes` (`id`, `ckey`, `notetext`, `timestamp`, `adminckey`, `last_editor`, `edits`, `server`) VALUES (1, 'AffectedArc07', 'Cant behave', '2020-04-24 18:04:14', 'AffectedArc07', NULL, NULL, 'SS13'); /*!40000 ALTER TABLE `notes` ENABLE KEYS */; --- Dumping structure for table feedback.player +-- Dumping structure for table paradise_gamedb.player DROP TABLE IF EXISTS `player`; CREATE TABLE IF NOT EXISTS `player` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -395,13 +395,13 @@ CREATE TABLE IF NOT EXISTS `player` ( UNIQUE KEY `ckey` (`ckey`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; --- Dumping data for table feedback.player: ~0 rows (approximately) +-- Dumping data for table paradise_gamedb.player: ~0 rows (approximately) /*!40000 ALTER TABLE `player` DISABLE KEYS */; INSERT INTO `player` (`id`, `ckey`, `firstseen`, `lastseen`, `ip`, `computerid`, `lastadminrank`, `ooccolor`, `UI_style`, `UI_style_color`, `UI_style_alpha`, `be_role`, `default_slot`, `toggles`, `sound`, `randomslot`, `volume`, `nanoui_fancy`, `show_ghostitem_attack`, `lastchangelog`, `windowflashing`, `ghost_anonsay`, `exp`) VALUES (1, 'AffectedArc07', '2020-04-24 18:04:44', '2020-04-24 18:04:45', '127.0.0.1', '1111111111', 'Player', '#b82e00', 'Midnight', '#ffffff', 10, NULL, 1, 1024, 16, 0, 100, 1, 1, '0', 1, 1, NULL); /*!40000 ALTER TABLE `player` ENABLE KEYS */; --- Dumping structure for table feedback.poll_option +-- Dumping structure for table paradise_gamedb.poll_option DROP TABLE IF EXISTS `poll_option`; CREATE TABLE IF NOT EXISTS `poll_option` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -416,13 +416,13 @@ CREATE TABLE IF NOT EXISTS `poll_option` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; --- Dumping data for table feedback.poll_option: ~0 rows (approximately) +-- Dumping data for table paradise_gamedb.poll_option: ~0 rows (approximately) /*!40000 ALTER TABLE `poll_option` DISABLE KEYS */; INSERT INTO `poll_option` (`id`, `pollid`, `text`, `percentagecalc`, `minval`, `maxval`, `descmin`, `descmid`, `descmax`) VALUES (1, 1, 'What is this', 12, NULL, NULL, NULL, NULL, NULL); /*!40000 ALTER TABLE `poll_option` ENABLE KEYS */; --- Dumping structure for table feedback.poll_question +-- Dumping structure for table paradise_gamedb.poll_question DROP TABLE IF EXISTS `poll_question`; CREATE TABLE IF NOT EXISTS `poll_question` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -437,13 +437,13 @@ CREATE TABLE IF NOT EXISTS `poll_question` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; --- Dumping data for table feedback.poll_question: ~0 rows (approximately) +-- Dumping data for table paradise_gamedb.poll_question: ~0 rows (approximately) /*!40000 ALTER TABLE `poll_question` DISABLE KEYS */; INSERT INTO `poll_question` (`id`, `polltype`, `starttime`, `endtime`, `question`, `adminonly`, `multiplechoiceoptions`, `createdby_ckey`, `createdby_ip`) VALUES (1, 'OPTION', '2020-04-24 18:05:31', '2020-04-24 18:05:33', 'Is this a good idea', 0, NULL, NULL, NULL); /*!40000 ALTER TABLE `poll_question` ENABLE KEYS */; --- Dumping structure for table feedback.poll_textreply +-- Dumping structure for table paradise_gamedb.poll_textreply DROP TABLE IF EXISTS `poll_textreply`; CREATE TABLE IF NOT EXISTS `poll_textreply` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -456,13 +456,13 @@ CREATE TABLE IF NOT EXISTS `poll_textreply` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; --- Dumping data for table feedback.poll_textreply: ~0 rows (approximately) +-- Dumping data for table paradise_gamedb.poll_textreply: ~0 rows (approximately) /*!40000 ALTER TABLE `poll_textreply` DISABLE KEYS */; INSERT INTO `poll_textreply` (`id`, `datetime`, `pollid`, `ckey`, `ip`, `replytext`, `adminrank`) VALUES (1, '2020-04-24 18:05:42', 1, 'AffectedArc07', '127.0.0.1', 'This is far too much work for a CI rework', 'Player'); /*!40000 ALTER TABLE `poll_textreply` ENABLE KEYS */; --- Dumping structure for table feedback.poll_vote +-- Dumping structure for table paradise_gamedb.poll_vote DROP TABLE IF EXISTS `poll_vote`; CREATE TABLE IF NOT EXISTS `poll_vote` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -476,13 +476,13 @@ CREATE TABLE IF NOT EXISTS `poll_vote` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; --- Dumping data for table feedback.poll_vote: ~0 rows (approximately) +-- Dumping data for table paradise_gamedb.poll_vote: ~0 rows (approximately) /*!40000 ALTER TABLE `poll_vote` DISABLE KEYS */; INSERT INTO `poll_vote` (`id`, `datetime`, `pollid`, `optionid`, `ckey`, `ip`, `adminrank`, `rating`) VALUES (1, '2020-04-24 18:06:02', 1, 1, 'AffectedArc07', '127.0.0.1', 'Administrator', NULL); /*!40000 ALTER TABLE `poll_vote` ENABLE KEYS */; --- Dumping structure for table feedback.privacy +-- Dumping structure for table paradise_gamedb.privacy DROP TABLE IF EXISTS `privacy`; CREATE TABLE IF NOT EXISTS `privacy` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -492,13 +492,13 @@ CREATE TABLE IF NOT EXISTS `privacy` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; --- Dumping data for table feedback.privacy: ~0 rows (approximately) +-- Dumping data for table paradise_gamedb.privacy: ~0 rows (approximately) /*!40000 ALTER TABLE `privacy` DISABLE KEYS */; INSERT INTO `privacy` (`id`, `datetime`, `ckey`, `option`) VALUES (1, '2020-04-24 18:06:20', 'AffectedArc07', '1'); /*!40000 ALTER TABLE `privacy` ENABLE KEYS */; --- Dumping structure for table feedback.watch +-- Dumping structure for table paradise_gamedb.watch DROP TABLE IF EXISTS `watch`; CREATE TABLE IF NOT EXISTS `watch` ( `ckey` varchar(32) NOT NULL, @@ -510,13 +510,13 @@ CREATE TABLE IF NOT EXISTS `watch` ( PRIMARY KEY (`ckey`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; --- Dumping data for table feedback.watch: ~0 rows (approximately) +-- Dumping data for table paradise_gamedb.watch: ~0 rows (approximately) /*!40000 ALTER TABLE `watch` DISABLE KEYS */; INSERT INTO `watch` (`ckey`, `reason`, `timestamp`, `adminckey`, `last_editor`, `edits`) VALUES ('AffectedArc07', 'Cant behave', '2020-04-24 18:06:33', 'AffectedArc07', NULL, NULL); /*!40000 ALTER TABLE `watch` ENABLE KEYS */; --- Dumping structure for table feedback.whitelist +-- Dumping structure for table paradise_gamedb.whitelist DROP TABLE IF EXISTS `whitelist`; CREATE TABLE IF NOT EXISTS `whitelist` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -526,7 +526,7 @@ CREATE TABLE IF NOT EXISTS `whitelist` ( PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; --- Dumping data for table feedback.whitelist: 0 rows +-- Dumping data for table paradise_gamedb.whitelist: 0 rows /*!40000 ALTER TABLE `whitelist` DISABLE KEYS */; INSERT INTO `whitelist` (`id`, `ckey`, `job`, `species`) VALUES (1, 'AffectedArc07', 'Captain', 'Machine'); @@ -535,4 +535,4 @@ INSERT INTO `whitelist` (`id`, `ckey`, `job`, `species`) VALUES /*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */; /*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY','')); \ No newline at end of file +SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY','')); diff --git a/tools/githubChangelogProcessor.php b/tools/githubChangelogProcessor.php index 6e8c4094699..a88cd99580c 100644 --- a/tools/githubChangelogProcessor.php +++ b/tools/githubChangelogProcessor.php @@ -32,7 +32,7 @@ $dbServer = "localhost"; // Hostname of the database server (default localhost) $dbPort = "3306"; // Port of the database server (default 3306) | MUST BE A STRING $dbUser = "root"; // Database username (default root) $dbPassword = ""; // Database password (default blank) -$dbDatabase = "feedback"; // Database name (default feedback) +$dbDatabase = "paradise_gamedb"; // Database name (default paradise_gamedb) //servers to announce PRs to. $servers = array();
ISBNTitleTotal FlagsOptions