diff --git a/SQL/database_changelog.txt b/SQL/database_changelog.txt index 5d3c3ccec2..c2625e2663 100644 --- a/SQL/database_changelog.txt +++ b/SQL/database_changelog.txt @@ -1,17 +1,124 @@ +Any time you make a change to the schema files, remember to increment the database schema version. Generally increment the minor number, major should be reserved for significant changes to the schema. Both values go up to 255. + +The latest database version is 3.1; The query to update the schema revision table is: + +INSERT INTO `schema_revision` (`major`, `minor`) VALUES (3, 1); +or +INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (3, 1); + +---------------------------------------------------- + + +20th July 2017, by Shadowlight213 +Added role_time table to track time spent playing departments. +Also, added flags column to the player table. + +CREATE TABLE `role_time` ( `ckey` VARCHAR(32) NOT NULL , `job` VARCHAR(128) NOT NULL , `minutes` INT UNSIGNED NOT NULL, PRIMARY KEY (`ckey`, `job`) ) ENGINE = InnoDB; + +ALTER TABLE `player` ADD `flags` INT NOT NULL default '0' AFTER `accountjoindate`; + + +UPDATE `schema_revision` SET minor = 1; +Remember to add a prefix to the table name if you use them. + +---------------------------------------------------- + +Any time you make a change to the schema files, remember to increment the database schema version. Generally increment the minor number, major should be reserved for significant changes to the schema. Both values go up to 255. + +The latest database version is 3.0; The query to update the schema revision table is: + +INSERT INTO `schema_revision` (`major`, `minor`) VALUES (3, 0); +or +INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (3, 0); + +---------------------------------------------------- +28 June 2017, by oranges +Added schema_revision to store the current db revision, why start at 3.0? + +because: +15:09 <+MrStonedOne> 1.0 was erro, 2.0 was when i removed erro_, 3.0 was when jordie made all the strings that hold numbers numbers + +CREATE TABLE `schema_revision` ( +`major` TINYINT(3) UNSIGNED NOT NULL , +`minor` TINYINT(3) UNSIGNED NOT NULL , +`date` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL, +PRIMARY KEY ( `major`,`minor` ) +) ENGINE = INNODB; + +INSERT INTO `schema_revision` (`major`, `minor`) VALUES (3, 0); + +Remember to add a prefix to the table name if you use them. + +---------------------------------------------------- + +26 June 2017, by Jordie0608 + +Modified table 'poll_option', adding the column 'default_percentage_calc'. + +ALTER TABLE `poll_option` ADD COLUMN `default_percentage_calc` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1' AFTER `descmax` + +Remember to add a prefix to the table name if you use them. + +---------------------------------------------------- + +22 June 2017, by Jordie0608 + +Modified table 'poll_option', removing the column 'percentagecalc'. + +ALTER TABLE `poll_option` DROP COLUMN `percentagecalc` + +Remember to add a prefix to the table name if you use them. + +---------------------------------------------------- + +8 June 2017, by Jordie0608 + +Modified table 'death', adding column 'round_id', removing column 'gender' and replacing column 'coord' with the columns 'x_coord', 'y_coord' and 'z_coord'. + +START TRANSACTION; +ALTER TABLE `death` DROP COLUMN `gender`, ADD COLUMN `x_coord` SMALLINT(5) UNSIGNED NOT NULL AFTER `coord`, ADD COLUMN `y_coord` SMALLINT(5) UNSIGNED NOT NULL AFTER `x_coord`, ADD COLUMN `z_coord` SMALLINT(5) UNSIGNED NOT NULL AFTER `y_coord`, ADD COLUMN `round_id` INT(11) NOT NULL AFTER `server_port`; +SET SQL_SAFE_UPDATES = 0; +UPDATE `death` SET `x_coord` = SUBSTRING_INDEX(`coord`, ',', 1), `y_coord` = SUBSTRING_INDEX(SUBSTRING_INDEX(`coord`, ',', 2), ',', -1), `z_coord` = SUBSTRING_INDEX(`coord`, ',', -1); +SET SQL_SAFE_UPDATES = 1; +ALTER TABLE `death` DROP COLUMN `coord`; +COMMIT; + +Remember to add a prefix to the table name if you use them. + +--------------------------------------------------- + +30 May 2017, by MrStonedOne + +Z levels changed, this query allows you to convert old ss13 death records: + +UPDATE death SET coord = CONCAT(SUBSTRING_INDEX(coord, ',', 2), ', ', CASE TRIM(SUBSTRING_INDEX(coord, ',', -1)) WHEN 1 THEN 2 WHEN 2 THEN 1 ELSE TRIMSUBSTRING_INDEX(coord, ',', -1) END) + +--------------------------------------------------- + +26 May 2017, by Jordie0608 + +Modified table 'ban', adding the column 'round_id'. + +ALTER TABLE `ban` ADD COLUMN `round_id` INT(11) NOT NULL AFTER `server_port` + +Remember to add a prefix to the table name if you use them. + +---------------------------------------------------- + 20 May 2017, by Jordie0608 Created table `round` to replace tracking of the datapoints 'round_start', 'round_end', 'server_ip', 'game_mode', 'round_end_results', 'end_error', 'end_proper', 'emergency_shuttle', 'map_name' and 'station_renames' in the `feedback` table. Once created this table is populated with rows from the `feedback` table. START TRANSACTION; -CREATE TABLE `feedback`.`round` (`id` INT(11) NOT NULL AUTO_INCREMENT, `start_datetime` DATETIME NOT 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`)); -ALTER TABLE `feedback`.`feedback` ADD INDEX `tmp` (`round_id` ASC, `var_name` ASC); -INSERT INTO `feedback`.`round` +CREATE TABLE `round` (`id` INT(11) NOT NULL AUTO_INCREMENT, `start_datetime` DATETIME NOT 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`)); +ALTER TABLE `feedback` ADD INDEX `tmp` (`round_id` ASC, `var_name` ASC); +INSERT INTO `round` (`id`, `start_datetime`, `end_datetime`, `server_ip`, `server_port`, `commit_hash`, `game_mode`, `game_mode_result`, `end_state`, `shuttle_name`, `map_name`, `station_name`) SELECT DISTINCT ri.round_id, IFNULL(STR_TO_DATE(st.details,'%a %b %e %H:%i:%s %Y'), TIMESTAMP(0)), STR_TO_DATE(et.details,'%a %b %e %H:%i:%s %Y'), IFNULL(INET_ATON(SUBSTRING_INDEX(IF(si.details = '', '0', IF(SUBSTRING_INDEX(si.details, ':', 1) LIKE '%_._%', si.details, '0')), ':', 1)), INET_ATON(0)), IFNULL(IF(si.details LIKE '%:_%', CAST(SUBSTRING_INDEX(si.details, ':', -1) AS UNSIGNED), '0'), '0'), ch.details, gm.details, mr.details, IFNULL(es.details, ep.details), ss.details, mn.details, sn.details -FROM `feedback`.`feedback`AS ri -LEFT JOIN `feedback`.`feedback` AS st ON ri.round_id = st.round_id AND st.var_name = "round_start" LEFT JOIN `feedback`.`feedback` AS et ON ri.round_id = et.round_id AND et.var_name = "round_end" LEFT JOIN `feedback`.`feedback` AS si ON ri.round_id = si.round_id AND si.var_name = "server_ip" LEFT JOIN `feedback`.`feedback` AS ch ON ri.round_id = ch.round_id AND ch.var_name = "revision" LEFT JOIN `feedback`.`feedback` AS gm ON ri.round_id = gm.round_id AND gm.var_name = "game_mode" LEFT JOIN `feedback`.`feedback` AS mr ON ri.round_id = mr.round_id AND mr.var_name = "round_end_result" LEFT JOIN `feedback`.`feedback` AS es ON ri.round_id = es.round_id AND es.var_name = "end_state" LEFT JOIN `feedback`.`feedback` AS ep ON ri.round_id = ep.round_id AND ep.var_name = "end_proper" LEFT JOIN `feedback`.`feedback` AS ss ON ri.round_id = ss.round_id AND ss.var_name = "emergency_shuttle" LEFT JOIN `feedback`.`feedback` AS mn ON ri.round_id = mn.round_id AND mn.var_name = "map_name" LEFT JOIN `feedback`.`feedback` AS sn ON ri.round_id = sn.round_id AND sn.var_name = "station_renames"; -ALTER TABLE `feedback`.`feedback` DROP INDEX `tmp`; +FROM `feedback`AS ri +LEFT JOIN `feedback` AS st ON ri.round_id = st.round_id AND st.var_name = "round_start" LEFT JOIN `feedback` AS et ON ri.round_id = et.round_id AND et.var_name = "round_end" LEFT JOIN `feedback` AS si ON ri.round_id = si.round_id AND si.var_name = "server_ip" LEFT JOIN `feedback` AS ch ON ri.round_id = ch.round_id AND ch.var_name = "revision" LEFT JOIN `feedback` AS gm ON ri.round_id = gm.round_id AND gm.var_name = "game_mode" LEFT JOIN `feedback` AS mr ON ri.round_id = mr.round_id AND mr.var_name = "round_end_result" LEFT JOIN `feedback` AS es ON ri.round_id = es.round_id AND es.var_name = "end_state" LEFT JOIN `feedback` AS ep ON ri.round_id = ep.round_id AND ep.var_name = "end_proper" LEFT JOIN `feedback` AS ss ON ri.round_id = ss.round_id AND ss.var_name = "emergency_shuttle" LEFT JOIN `feedback` AS mn ON ri.round_id = mn.round_id AND mn.var_name = "map_name" LEFT JOIN `feedback` AS sn ON ri.round_id = sn.round_id AND sn.var_name = "station_renames"; +ALTER TABLE `feedback` DROP INDEX `tmp`; COMMIT; It's not necessary to delete the rows from the `feedback` table but henceforth these datapoints will be in the `round` table. @@ -24,19 +131,18 @@ Remember to add a prefix to the table names if you use them Modified table 'player', adding the column 'accountjoindate', removing the column 'id' and making the column 'ckey' the primary key. -ALTER TABLE `feedback`.`player` DROP COLUMN `id`, ADD COLUMN `accountjoindate` DATE NULL AFTER `lastadminrank`, DROP PRIMARY KEY, ADD PRIMARY KEY (`ckey`), DROP INDEX `ckey`; +ALTER TABLE `player` DROP COLUMN `id`, ADD COLUMN `accountjoindate` DATE NULL AFTER `lastadminrank`, DROP PRIMARY KEY, ADD PRIMARY KEY (`ckey`), DROP INDEX `ckey`; Remember to add a prefix to the table name if you use them. ---------------------------------------------------- - 10 March 2017, by Jordie0608 Modified table 'death', adding the columns 'toxloss', 'cloneloss', and 'staminaloss' and table 'legacy_population', adding the columns 'server_ip' and 'server_port'. -ALTER TABLE `feedback`.`death` ADD COLUMN `toxloss` SMALLINT(5) UNSIGNED NOT NULL AFTER `oxyloss`, ADD COLUMN `cloneloss` SMALLINT(5) UNSIGNED NOT NULL AFTER `toxloss`, ADD COLUMN `staminaloss` SMALLINT(5) UNSIGNED NOT NULL AFTER `cloneloss`; +ALTER TABLE `death` ADD COLUMN `toxloss` SMALLINT(5) UNSIGNED NOT NULL AFTER `oxyloss`, ADD COLUMN `cloneloss` SMALLINT(5) UNSIGNED NOT NULL AFTER `toxloss`, ADD COLUMN `staminaloss` SMALLINT(5) UNSIGNED NOT NULL AFTER `cloneloss`; -ALTER TABLE `feedback`.`legacy_population` ADD COLUMN `server_ip` INT(10) UNSIGNED NOT NULL AFTER `time`, ADD COLUMN `server_port` SMALLINT(5) UNSIGNED NOT NULL AFTER `server_ip`; +ALTER TABLE `legacy_population` ADD COLUMN `server_ip` INT(10) UNSIGNED NOT NULL AFTER `time`, ADD COLUMN `server_port` SMALLINT(5) UNSIGNED NOT NULL AFTER `server_ip`; Remember to add a prefix to the table name if you use them. @@ -68,18 +174,18 @@ Created table 'messages' to supersede the 'notes', 'memos', and 'watchlist' tabl To create this new table run the following command: -CREATE TABLE `feedback`.`messages` (`id` INT(11) NOT NULL AUTO_INCREMENT , `type` VARCHAR(32) NOT NULL , `targetckey` VARCHAR(32) NOT NULL , `adminckey` VARCHAR(32) NOT NULL , `text` TEXT NOT NULL , `timestamp` DATETIME NOT NULL , `server` VARCHAR(32) NULL , `secret` TINYINT(1) NULL DEFAULT 1 , `lasteditor` VARCHAR(32) NULL , `edits` TEXT NULL , PRIMARY KEY (`id`) ) +CREATE TABLE `messages` (`id` INT(11) NOT NULL AUTO_INCREMENT , `type` VARCHAR(32) NOT NULL , `targetckey` VARCHAR(32) NOT NULL , `adminckey` VARCHAR(32) NOT NULL , `text` TEXT NOT NULL , `timestamp` DATETIME NOT NULL , `server` VARCHAR(32) NULL , `secret` TINYINT(1) NULL DEFAULT 1 , `lasteditor` VARCHAR(32) NULL , `edits` TEXT NULL , PRIMARY KEY (`id`) ) To copy the contents of the 'notes', 'memos', and 'watchlist' tables to this new table run the following commands: -INSERT INTO `feedback`.`messages` -(`id`,`type`,`targetckey`,`adminckey`,`text`,`timestamp`,`server`,`secret`,`lasteditor`,`edits`) SELECT `id`, "note", `ckey`, `adminckey`, `notetext`, `timestamp`, `server`, `secret`, `last_editor`, `edits` FROM `feedback`.`notes` +INSERT INTO `messages` +(`id`,`type`,`targetckey`,`adminckey`,`text`,`timestamp`,`server`,`secret`,`lasteditor`,`edits`) SELECT `id`, "note", `ckey`, `adminckey`, `notetext`, `timestamp`, `server`, `secret`, `last_editor`, `edits` FROM `notes` -INSERT INTO `feedback`.`messages` -(`type`,`targetckey`,`adminckey`,`text`,`timestamp`,`lasteditor`,`edits`) SELECT "memo", `ckey`, `ckey`, `memotext`, `timestamp`, `last_editor`, `edits` FROM `feedback`.`memo` +INSERT INTO `messages` +(`type`,`targetckey`,`adminckey`,`text`,`timestamp`,`lasteditor`,`edits`) SELECT "memo", `ckey`, `ckey`, `memotext`, `timestamp`, `last_editor`, `edits` FROM `memo` -INSERT INTO `feedback`.`messages` -(`type`,`targetckey`,`adminckey`,`text`,`timestamp`,`lasteditor`,`edits`) SELECT "watchlist entry", `ckey`, `adminckey`, `reason`, `timestamp`, `last_editor`, `edits` FROM `feedback`.`watch` +INSERT INTO `messages` +(`type`,`targetckey`,`adminckey`,`text`,`timestamp`,`lasteditor`,`edits`) SELECT "watchlist entry", `ckey`, `adminckey`, `reason`, `timestamp`, `last_editor`, `edits` FROM `watch` It's not necessary to delete the 'notes', 'memos', and 'watchlist' tables but they will no longer be used. @@ -91,7 +197,7 @@ Remember to add a prefix to the table names if you use them Modified table 'notes', adding column 'secret'. -ALTER TABLE `feedback`.`notes` ADD COLUMN `secret` TINYINT(1) NOT NULL DEFAULT '1' AFTER `server` +ALTER TABLE `notes` ADD COLUMN `secret` TINYINT(1) NOT NULL DEFAULT '1' AFTER `server` Remember to add a prefix to the table name if you use them @@ -101,7 +207,7 @@ Remember to add a prefix to the table name if you use them Changed appearance bans to be jobbans. -UPDATE 'feedback'.`ban` SET `job` = "appearance", `bantype` = "JOB_PERMABAN" WHERE `bantype` = "APPEARANCE_PERMABAN" +UPDATE `ban` SET `job` = "appearance", `bantype` = "JOB_PERMABAN" WHERE `bantype` = "APPEARANCE_PERMABAN" Remember to add a prefix to the table name if you use them @@ -111,7 +217,7 @@ Remember to add a prefix to the table name if you use them Modified table 'poll_question', adding column 'dontshow' which was recently added to the server schema. -ALTER TABLE `feedback`.`poll_question` ADD COLUMN `dontshow` TINYINT(1) NOT NULL DEFAULT '0' AFTER `for_trialmin` +ALTER TABLE `poll_question` ADD COLUMN `dontshow` TINYINT(1) NOT NULL DEFAULT '0' AFTER `for_trialmin` Remember to add a prefix to the table name if you use them @@ -121,7 +227,7 @@ Remember to add a prefix to the table name if you use them Added ipintel table, only required if ip intel is enabled in the config -CREATE TABLE `ipintel` ( +CREATE TABLE `ipintel` ( `ip` INT UNSIGNED NOT NULL , `date` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL , `intel` REAL NOT NULL DEFAULT '0', @@ -134,7 +240,7 @@ PRIMARY KEY ( `ip` ) Modified table 'poll_question', adding columns 'createdby_ckey', 'createdby_ip' and 'for_trialmin' to bring it inline with the schema used by the tg servers. -ALTER TABLE `feedback`.`poll_question` ADD COLUMN `createdby_ckey` VARCHAR(45) NULL DEFAULT NULL AFTER `multiplechoiceoptions`, ADD COLUMN `createdby_ip` VARCHAR(45) NULL DEFAULT NULL AFTER `createdby_ckey`, ADD COLUMN `for_trialmin` VARCHAR(45) NULL DEFAULT NULL AFTER `createdby_ip` +ALTER TABLE `poll_question` ADD COLUMN `createdby_ckey` VARCHAR(45) NULL DEFAULT NULL AFTER `multiplechoiceoptions`, ADD COLUMN `createdby_ip` VARCHAR(45) NULL DEFAULT NULL AFTER `createdby_ckey`, ADD COLUMN `for_trialmin` VARCHAR(45) NULL DEFAULT NULL AFTER `createdby_ip` Remember to add a prefix to the table name if you use them @@ -144,7 +250,7 @@ Remember to add a prefix to the table name if you use them Modified table 'watch', removing 'id' column, making 'ckey' primary and adding the columns 'timestamp', 'adminckey', 'last_editor' and 'edits'. -ALTER TABLE `feedback`.`watch` DROP COLUMN `id`, ADD COLUMN `timestamp` datetime NOT NULL AFTER `reason`, ADD COLUMN `adminckey` varchar(32) NOT NULL AFTER `timestamp`, ADD COLUMN `last_editor` varchar(32) NULL AFTER `adminckey`, ADD COLUMN `edits` text NULL AFTER `last_editor`, DROP PRIMARY KEY, ADD PRIMARY KEY (`ckey`) +ALTER TABLE `watch` DROP COLUMN `id`, ADD COLUMN `timestamp` datetime NOT NULL AFTER `reason`, ADD COLUMN `adminckey` varchar(32) NOT NULL AFTER `timestamp`, ADD COLUMN `last_editor` varchar(32) NULL AFTER `adminckey`, ADD COLUMN `edits` text NULL AFTER `last_editor`, DROP PRIMARY KEY, ADD PRIMARY KEY (`ckey`) Remember to add a prefix to the table name if you use them. @@ -166,7 +272,7 @@ Remember to add prefix to the table name if you use them. Modified table 'memo', removing 'id' column and making 'ckey' primary. -ALTER TABLE `feedback`.`memo` DROP COLUMN `id`, DROP PRIMARY KEY, ADD PRIMARY KEY (`ckey`) +ALTER TABLE `memo` DROP COLUMN `id`, DROP PRIMARY KEY, ADD PRIMARY KEY (`ckey`) Remember to add prefix to the table name if you use them. diff --git a/SQL/tgstation_schema.sql b/SQL/tgstation_schema.sql index 4c76e1f275..12b0b93c6a 100644 --- a/SQL/tgstation_schema.sql +++ b/SQL/tgstation_schema.sql @@ -1,6 +1,3 @@ -CREATE DATABASE IF NOT EXISTS `feedback` /*!40100 DEFAULT CHARACTER SET latin1 */; -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 */; @@ -74,6 +71,7 @@ CREATE TABLE `ban` ( `bantime` datetime NOT NULL, `server_ip` int(10) unsigned NOT NULL, `server_port` smallint(5) unsigned NOT NULL, + `round_id` int(11) NOT NULL, `bantype` enum('PERMABAN','TEMPBAN','JOB_PERMABAN','JOB_TEMPBAN','ADMIN_PERMABAN','ADMIN_TEMPBAN') NOT NULL, `reason` varchar(2048) NOT NULL, `job` varchar(32) DEFAULT NULL, @@ -112,6 +110,7 @@ CREATE TABLE `connection_log` ( `datetime` datetime DEFAULT NULL, `server_ip` int(10) unsigned NOT NULL, `server_port` smallint(5) unsigned NOT NULL, + `round_id` int(11) unsigned NOT NULL, `ckey` varchar(45) DEFAULT NULL, `ip` int(10) unsigned NOT NULL, `computerid` varchar(45) DEFAULT NULL, @@ -119,7 +118,6 @@ CREATE TABLE `connection_log` ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; - -- -- Table structure for table `death` -- @@ -136,7 +134,7 @@ CREATE TABLE `death` ( `mapname` varchar(32) NOT NULL, `server_ip` int(10) unsigned NOT NULL, `server_port` smallint(5) unsigned NOT NULL, - `round_id` int(11) NOT NULL + `round_id` int(11) NOT NULL, `tod` datetime NOT NULL COMMENT 'Time of death', `job` varchar(32) NOT NULL, `special` varchar(32) DEFAULT NULL, @@ -151,11 +149,12 @@ CREATE TABLE `death` ( `toxloss` smallint(5) unsigned NOT NULL, `cloneloss` smallint(5) unsigned NOT NULL, `staminaloss` smallint(5) unsigned NOT NULL, + `last_words` varchar(255) DEFAULT NULL, + `suicide` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; - -- -- Table structure for table `feedback` -- @@ -204,6 +203,7 @@ CREATE TABLE `legacy_population` ( `time` datetime NOT NULL, `server_ip` int(10) unsigned NOT NULL, `server_port` smallint(5) unsigned NOT NULL, + `round_id` int(11) unsigned NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; @@ -224,6 +224,7 @@ CREATE TABLE `library` ( `ckey` varchar(32) NOT NULL DEFAULT 'LEGACY', `datetime` datetime NOT NULL, `deleted` tinyint(1) unsigned DEFAULT NULL, + `round_id_created` int(11) unsigned NOT NULL, PRIMARY KEY (`id`), KEY `deleted_idx` (`deleted`), KEY `idx_lib_id_del` (`id`,`deleted`), @@ -247,6 +248,9 @@ CREATE TABLE `messages` ( `text` varchar(2048) NOT NULL, `timestamp` datetime NOT NULL, `server` varchar(32) DEFAULT NULL, + `server_ip` int(10) unsigned NOT NULL, + `server_port` smallint(5) unsigned NOT NULL, + `round_id` int(11) unsigned NOT NULL, `secret` tinyint(1) unsigned NOT NULL, `lasteditor` varchar(32) DEFAULT NULL, `edits` text, @@ -257,6 +261,21 @@ CREATE TABLE `messages` ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `role_time` +-- + +DROP TABLE IF EXISTS `role_time`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; + +CREATE TABLE `role_time` +( `ckey` VARCHAR(32) NOT NULL , + `job` VARCHAR(32) NOT NULL , + `minutes` INT UNSIGNED NOT NULL, + PRIMARY KEY (`ckey`, `job`) + ) ENGINE = InnoDB; + -- -- Table structure for table `player` -- @@ -267,11 +286,14 @@ DROP TABLE IF EXISTS `player`; CREATE TABLE `player` ( `ckey` varchar(32) NOT NULL, `firstseen` datetime NOT NULL, + `firstseen_round_id` int(11) unsigned NOT NULL, `lastseen` datetime NOT NULL, + `lastseen_round_id` int(11) unsigned NOT NULL, `ip` int(10) unsigned NOT NULL, `computerid` varchar(32) NOT NULL, `lastadminrank` varchar(32) NOT NULL DEFAULT 'Player', `accountjoindate` DATE DEFAULT NULL, + `flags` smallint(5) unsigned DEFAULT '0' NOT NULL, PRIMARY KEY (`ckey`), KEY `idx_player_cid_ckey` (`computerid`,`ckey`), KEY `idx_player_ip_ckey` (`ip`,`ckey`) @@ -289,12 +311,12 @@ CREATE TABLE `poll_option` ( `id` int(11) NOT NULL AUTO_INCREMENT, `pollid` int(11) NOT NULL, `text` varchar(255) NOT NULL, - `percentagecalc` tinyint(1) NOT NULL DEFAULT '1', `minval` int(3) DEFAULT NULL, `maxval` int(3) DEFAULT NULL, `descmin` varchar(32) DEFAULT NULL, `descmid` varchar(32) DEFAULT NULL, `descmax` varchar(32) DEFAULT NULL, + `default_percentage_calc` tinyint(1) unsigned NOT NULL DEFAULT '1', PRIMARY KEY (`id`), KEY `idx_pop_pollid` (`pollid`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; @@ -391,6 +413,17 @@ CREATE TABLE `round` ( /*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; +-- +-- Table structure for table `schema_revision` +-- +DROP TABLE IF EXISTS `schema_revision`; +CREATE TABLE `schema_revision` ( + `major` TINYINT(3) unsigned NOT NULL, + `minor` TINYINT(3) unsigned NOT NULL, + `date` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`major`, `minor`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; diff --git a/SQL/tgstation_schema.sql.rej b/SQL/tgstation_schema.sql.rej new file mode 100644 index 0000000000..51068bed4e --- /dev/null +++ b/SQL/tgstation_schema.sql.rej @@ -0,0 +1,9 @@ +diff a/SQL/tgstation_schema.sql b/SQL/tgstation_schema.sql (rejected hunks) +@@ -268,7 +283,6 @@ CREATE TABLE `player` ( + `ip` int(10) unsigned NOT NULL, + `computerid` varchar(32) NOT NULL, + `lastadminrank` varchar(32) NOT NULL DEFAULT 'Player', +- `exp` mediumtext, + PRIMARY KEY (`id`), + UNIQUE KEY `ckey` (`ckey`), + KEY `idx_player_cid_ckey` (`computerid`,`ckey`), diff --git a/SQL/tgstation_schema_prefixed.sql b/SQL/tgstation_schema_prefixed.sql index f717bf96ad..6c8ea19b0f 100644 --- a/SQL/tgstation_schema_prefixed.sql +++ b/SQL/tgstation_schema_prefixed.sql @@ -1,6 +1,3 @@ -CREATE DATABASE IF NOT EXISTS `feedback` /*!40100 DEFAULT CHARACTER SET latin1 */; -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 */; @@ -74,6 +71,7 @@ CREATE TABLE `SS13_ban` ( `bantime` datetime NOT NULL, `server_ip` int(10) unsigned NOT NULL, `server_port` smallint(5) unsigned NOT NULL, + `round_id` int(11) NOT NULL, `bantype` enum('PERMABAN','TEMPBAN','JOB_PERMABAN','JOB_TEMPBAN','ADMIN_PERMABAN','ADMIN_TEMPBAN') NOT NULL, `reason` varchar(2048) NOT NULL, `job` varchar(32) DEFAULT NULL, @@ -112,6 +110,7 @@ CREATE TABLE `SS13_connection_log` ( `datetime` datetime DEFAULT NULL, `server_ip` int(10) unsigned NOT NULL, `server_port` smallint(5) unsigned NOT NULL, + `round_id` int(11) unsigned NOT NULL, `ckey` varchar(45) DEFAULT NULL, `ip` int(10) unsigned NOT NULL, `computerid` varchar(45) DEFAULT NULL, @@ -129,10 +128,13 @@ DROP TABLE IF EXISTS `SS13_death`; CREATE TABLE `SS13_death` ( `id` int(11) NOT NULL AUTO_INCREMENT, `pod` varchar(50) NOT NULL, - `coord` varchar(32) NOT NULL, + `x_coord` smallint(5) unsigned NOT NULL, + `y_coord` smallint(5) unsigned NOT NULL, + `z_coord` smallint(5) unsigned NOT NULL, `mapname` varchar(32) NOT NULL, `server_ip` int(10) unsigned NOT NULL, `server_port` smallint(5) unsigned NOT NULL, + `round_id` int(11) NOT NULL, `tod` datetime NOT NULL COMMENT 'Time of death', `job` varchar(32) NOT NULL, `special` varchar(32) DEFAULT NULL, @@ -140,7 +142,6 @@ CREATE TABLE `SS13_death` ( `byondkey` varchar(32) NOT NULL, `laname` varchar(96) DEFAULT NULL, `lakey` varchar(32) DEFAULT NULL, - `gender` enum('neuter','male','female','plural') NOT NULL, `bruteloss` smallint(5) unsigned NOT NULL, `brainloss` smallint(5) unsigned NOT NULL, `fireloss` smallint(5) unsigned NOT NULL, @@ -148,6 +149,8 @@ CREATE TABLE `SS13_death` ( `toxloss` smallint(5) unsigned NOT NULL, `cloneloss` smallint(5) unsigned NOT NULL, `staminaloss` smallint(5) unsigned NOT NULL, + `last_words` varchar(255) DEFAULT NULL, + `suicide` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; @@ -200,6 +203,7 @@ CREATE TABLE `SS13_legacy_population` ( `time` datetime NOT NULL, `server_ip` int(10) unsigned NOT NULL, `server_port` smallint(5) unsigned NOT NULL, + `round_id` int(11) unsigned NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; @@ -220,6 +224,7 @@ CREATE TABLE `SS13_library` ( `ckey` varchar(32) NOT NULL DEFAULT 'LEGACY', `datetime` datetime NOT NULL, `deleted` tinyint(1) unsigned DEFAULT NULL, + `round_id_created` int(11) unsigned NOT NULL, PRIMARY KEY (`id`), KEY `deleted_idx` (`deleted`), KEY `idx_lib_id_del` (`id`,`deleted`), @@ -243,6 +248,9 @@ CREATE TABLE `SS13_messages` ( `text` varchar(2048) NOT NULL, `timestamp` datetime NOT NULL, `server` varchar(32) DEFAULT NULL, + `server_ip` int(10) unsigned NOT NULL, + `server_port` smallint(5) unsigned NOT NULL, + `round_id` int(11) unsigned NOT NULL, `secret` tinyint(1) unsigned NOT NULL, `lasteditor` varchar(32) DEFAULT NULL, `edits` text, @@ -253,6 +261,21 @@ CREATE TABLE `SS13_messages` ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `SS13_role_time` +-- + +DROP TABLE IF EXISTS `SS13_role_time`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; + +CREATE TABLE `SS13_role_time` +( `ckey` VARCHAR(32) NOT NULL , + `job` VARCHAR(32) NOT NULL , + `minutes` INT UNSIGNED NOT NULL, + PRIMARY KEY (`ckey`, `job`) + ) ENGINE = InnoDB; + -- -- Table structure for table `SS13_player` -- @@ -263,11 +286,14 @@ DROP TABLE IF EXISTS `SS13_player`; CREATE TABLE `SS13_player` ( `ckey` varchar(32) NOT NULL, `firstseen` datetime NOT NULL, + `firstseen_round_id` int(11) unsigned NOT NULL, `lastseen` datetime NOT NULL, + `lastseen_round_id` int(11) unsigned NOT NULL, `ip` int(10) unsigned NOT NULL, `computerid` varchar(32) NOT NULL, `lastadminrank` varchar(32) NOT NULL DEFAULT 'Player', `accountjoindate` DATE DEFAULT NULL, + `flags` smallint(5) unsigned DEFAULT '0' NOT NULL, PRIMARY KEY (`ckey`), KEY `idx_player_cid_ckey` (`computerid`,`ckey`), KEY `idx_player_ip_ckey` (`ip`,`ckey`) @@ -285,12 +311,12 @@ CREATE TABLE `SS13_poll_option` ( `id` int(11) NOT NULL AUTO_INCREMENT, `pollid` int(11) NOT NULL, `text` varchar(255) NOT NULL, - `percentagecalc` tinyint(1) NOT NULL DEFAULT '1', `minval` int(3) DEFAULT NULL, `maxval` int(3) DEFAULT NULL, `descmin` varchar(32) DEFAULT NULL, `descmid` varchar(32) DEFAULT NULL, `descmax` varchar(32) DEFAULT NULL, + `default_percentage_calc` tinyint(1) unsigned NOT NULL DEFAULT '1', PRIMARY KEY (`id`), KEY `idx_pop_pollid` (`pollid`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; @@ -387,6 +413,17 @@ CREATE TABLE `SS13_round` ( /*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; +-- +-- Table structure for table `SS13_schema_revision` +-- +DROP TABLE IF EXISTS `SS13_schema_revision`; +CREATE TABLE `SS13_schema_revision` ( + `major` TINYINT(3) unsigned NOT NULL, + `minor` TINYINT(3) unsigned NOT NULL, + `date` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`major`,`minor`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; diff --git a/SQL/tgstation_schema_prefixed.sql.rej b/SQL/tgstation_schema_prefixed.sql.rej new file mode 100644 index 0000000000..dd4bc6a7f5 --- /dev/null +++ b/SQL/tgstation_schema_prefixed.sql.rej @@ -0,0 +1,9 @@ +diff a/SQL/tgstation_schema_prefixed.sql b/SQL/tgstation_schema_prefixed.sql (rejected hunks) +@@ -268,7 +297,6 @@ CREATE TABLE `SS13_player` ( + `ip` int(10) unsigned NOT NULL, + `computerid` varchar(32) NOT NULL, + `lastadminrank` varchar(32) NOT NULL DEFAULT 'Player', +- `exp` mediumtext, + PRIMARY KEY (`id`), + UNIQUE KEY `ckey` (`ckey`), + KEY `idx_player_cid_ckey` (`computerid`,`ckey`), diff --git a/_maps/RandomRuins/LavaRuins/lavaland_biodome_clown_planet.dmm b/_maps/RandomRuins/LavaRuins/lavaland_biodome_clown_planet.dmm index 1008d51d11..0324d65554 100644 --- a/_maps/RandomRuins/LavaRuins/lavaland_biodome_clown_planet.dmm +++ b/_maps/RandomRuins/LavaRuins/lavaland_biodome_clown_planet.dmm @@ -378,9 +378,7 @@ invisibility = 101 }, /obj/structure/table, -/obj/item/paper/crumpled/bloody{ - info = "If you dare not continue down this path of madness, escape can be found through the chute in this room. " - }, +/obj/item/paper/crumpled/bloody/ruins/lavaland/clown_planet/escape, /obj/item/pen/fourcolor, /turf/open/indestructible{ icon_state = "white" @@ -925,9 +923,7 @@ /turf/open/lava/smooth, /area/ruin/powered/clownplanet) "CB" = ( -/obj/item/paper/crumpled/bloody{ - info = "Abandon hope, all ye who enter here." - }, +/obj/item/paper/crumpled/bloody/ruins/lavaland/clown_planet/hope, /obj/effect/decal/cleanable/blood/old, /turf/open/floor/noslip{ initial_gas_mix = "o2=14;n2=23;TEMP=300" diff --git a/_maps/RandomRuins/SpaceRuins/TheDerelict.dmm b/_maps/RandomRuins/SpaceRuins/TheDerelict.dmm index 49da58eace..f9144cd3ef 100644 --- a/_maps/RandomRuins/SpaceRuins/TheDerelict.dmm +++ b/_maps/RandomRuins/SpaceRuins/TheDerelict.dmm @@ -3717,11 +3717,7 @@ /obj/item/reagent_containers/glass/beaker{ list_reagents = list("sacid" = 50) }, -/obj/item/paper/crumpled/bloody{ - desc = "Looks like someone started shakily writing a will in space common, but were interrupted by something bloody..."; - info = "I, Victor Belyakov, do hereby leave my _- "; - name = "unfinished paper scrap" - }, +/obj/item/paper/crumpled/bloody/ruins/thederelict/unfinished, /obj/item/pen, /turf/open/floor/plasteel/airless, /area/ruin/space/derelict/hallway/primary) diff --git a/_maps/RandomRuins/SpaceRuins/bigderelict1.dmm b/_maps/RandomRuins/SpaceRuins/bigderelict1.dmm index 21755f1e2f..e44e4a9d2d 100644 --- a/_maps/RandomRuins/SpaceRuins/bigderelict1.dmm +++ b/_maps/RandomRuins/SpaceRuins/bigderelict1.dmm @@ -258,9 +258,7 @@ name = "critter crate - mr.tiggles"; opened = 1 }, -/obj/item/paper/crumpled/ruins/snowdin{ - info = "A crumpled piece of manifest paper, out of the barely legible pen writing, you can see something about a warning involving whatever was originally in the crate." - }, +/obj/item/paper/crumpled/ruins/bigderelict1/manifest, /obj/structure/alien/weeds{ color = "#4BAE56"; desc = "A thick gelatinous surface covers the floor. Someone get the golashes."; @@ -454,10 +452,7 @@ name = "Tradeport Officer"; random = 1 }, -/obj/item/paper/crumpled/ruins/snowdin{ - icon_state = "scrap_bloodied"; - info = "If anyone finds this, please, don't let my kids know I died a coward.." - }, +/obj/item/paper/crumpled/ruins/bigderelict1/coward, /obj/effect/decal/cleanable/blood/old{ name = "dried blood splatter"; pixel_x = -29 diff --git a/_maps/RandomRuins/SpaceRuins/originalcontent.dmm b/_maps/RandomRuins/SpaceRuins/originalcontent.dmm index 73bf43342e..e55cee1581 100644 --- a/_maps/RandomRuins/SpaceRuins/originalcontent.dmm +++ b/_maps/RandomRuins/SpaceRuins/originalcontent.dmm @@ -541,12 +541,7 @@ /area/ruin/powered) "bB" = ( /obj/structure/easel, -/obj/item/paper/pamphlet{ - icon = 'icons/obj/fluff.dmi'; - icon_state = "painting4"; - info = "This picture depicts a crudely-drawn stickman firing a crudely-drawn gun."; - name = "Painting - 'BANG' " - }, +/obj/item/paper/pamphlet/ruin/originalcontent/stickman, /turf/open/indestructible/paper, /area/ruin/powered) "bC" = ( @@ -609,12 +604,7 @@ dir = 1 }, /obj/structure/easel, -/obj/item/paper/pamphlet{ - icon = 'icons/obj/fluff.dmi'; - icon_state = "painting1"; - info = "This picture depicts a sunny day on a lush hillside, set under a shaded tree."; - name = "Painting - 'Treeside' " - }, +/obj/item/paper/pamphlet/ruin/originalcontent/treeside, /turf/open/indestructible/paper, /area/ruin/powered) "bK" = ( @@ -716,12 +706,7 @@ dir = 8 }, /obj/structure/easel, -/obj/item/paper/pamphlet{ - icon = 'icons/obj/fluff.dmi'; - icon_state = "painting3"; - info = "This picture depicts a smiling clown. Something doesn't feel right about this.."; - name = "Painting - 'Pennywise' " - }, +/obj/item/paper/pamphlet/ruin/originalcontent/pennywise, /turf/open/indestructible/paper, /area/ruin/powered) "bX" = ( @@ -869,12 +854,7 @@ "cr" = ( /obj/structure/fluff/paper, /obj/structure/easel, -/obj/item/paper/pamphlet{ - icon = 'icons/obj/fluff.dmi'; - icon_state = "painting2"; - info = "This picture depicts a man yelling on a bridge for no apparent reason."; - name = "Painting - 'Hands-On-Face' " - }, +/obj/item/paper/pamphlet/ruin/originalcontent/yelling, /turf/open/indestructible/paper, /area/ruin/powered) "cs" = ( diff --git a/_maps/RandomZLevels/moonoutpost19.dmm b/_maps/RandomZLevels/moonoutpost19.dmm index 22f0169437..2edb5dcc12 100644 --- a/_maps/RandomZLevels/moonoutpost19.dmm +++ b/_maps/RandomZLevels/moonoutpost19.dmm @@ -5156,22 +5156,10 @@ }) "gW" = ( /obj/structure/filingcabinet/filingcabinet, -/obj/item/paper/fluff/awaymissions/moonoutpost19/research/xeno_hivemind{ - info = "Researcher: Dr. Mark Douglas
Date: 17/06/2554

Report:
Earlier today we have observed a new phenomenon with our subjects. While feeding them our last monkey subject and throwing out the box, the aliens merely looked at us instead of infecting the monkey right away. They looked to be collectively distressed as they would no longer be given hosts, where instead we would move to the next phase of the experiment. When I glanced at the gas tanks and piping leading to their cell, I looked back to see all of them were up against the glass, even the queen! It was as if they all understood what was going to happen, even though we knew only the queen had the cognitive capability to do so.

The only explanation for this is a form of communication between the aliens, but we have seen no such action take place anywhere in the cell until now. We also know that regular drone and hunter xenomorphs have no personality or instinct to survive by themselves. Perhaps the queen has a direct link to them? A form of a commander or overseer that controls their every move? A hivemind?"; - name = "The Hivemind Hypothesis" - }, -/obj/item/paper/fluff/awaymissions/moonoutpost19/research/xeno_behavior{ - info = "Researcher: Dr. Sakuma Sano
Date: 08/06/2554

Report:
The xenomorphs we have come to study here are a remarkable species. They are almost universally aggressive across all castes, showing no remorse or guilt or pause before or after acts of violence. They appear to be a species entirely designed to kill. Oddly enough, even their method of reproduction is a brutal two-for-one method of birthing a new xenomorph and killing its host.

The lone xenomorph we studied only five days ago showed little sign of intelligence. Only a simple drone that flung itself at the safety glass and shields repeatedly and thankfully without success. Once the drone molted into a queen, it became much more calm and calculating, merely looking at us and waiting while building its nest. As the hive grew in size and in numbers, so too did the intelligence of the common hunter and drone. We are still researching how they can communicate with one another and the relationship between the different castes and the queen. We will continue to update our research as we learn more about the species."; - name = "A Preliminary Study of Alien Behavior" - }, -/obj/item/paper/fluff/awaymissions/moonoutpost19/research/xeno_castes{ - info = "Researcher: Dr. Mark Douglas
Date: 06/06/2554

Report:
While observing the growing number of aliens in the containment cell, we began to notice subtle differences that were consistently repeating. Like ants, these creatures clearly have different specialized variations that determine their roles in the hive. We have dubbed the three currently observed castes as Hunters, Drones, and Sentinels.

Hunters have been observed to be by far the most aggressive and agile of the three, constantly running on every surface and frequently swiping at the windows. They are also remarkably good at camouflaging themselves in darkness and on their resin structures, appearing almost invisible to the unwary observer. They are always the first to reach the monkeys we send in leading us to believe that this caste is primarily used for finding and retrieving hosts.

Drones on the other hand are much more docile and seem more shy by comparison, though not any less aggressive than the other castes. They have been observed to have a much wider head and lack dorsal tubes. They have shown to be less agile and visibly more fragile than any other caste. The drone however has never been observed to interact with the monkeys directly and instead preferring maintenance of the hive by building walls of resin and moving eggs around the nest. As far as we know, we have only ever observed a drone become a queen, and we have no way of knowing if the other castes have that capability.

Lastly, we have the Sentinels, which appear at first glance to be the guards of the hive. They have so far been only observed to remain near the queen and the eggs, frequently curled up against the walls. We have only observed one instance where they have interacted with a monkey who strayed too closely to the queen, and was pounced and held down immediately until it was applied with a facehugger. Their lack of movement makes it difficult to determine their exact purpose as guards, sentries, or other role."; - name = "The Xenomorph 'Castes'" - }, -/obj/item/paper/fluff/awaymissions/moonoutpost19/research/larva_autopsy{ - info = "Researcher: Dr. Mark Douglas
Date: 04/06/2554

Report:
After an extremely dangerous, time consuming and costly dissection, we have managed to record and identify several of the organs inside of the first stage of the xenomorph cycle: the larva. This procedure took an extensive amount of time because these creatures have incredibly, almost-comically acidic blood that can melt through almost anything in a few moments. We had to use over a dozen scalpels and retractors to complete the autopsy.

The larva seems to possess far fewer and quite different organs than that of a human. There is a stomach, with no digestive tract, a heart, which seems to lack any blood-oxygen circulation purpose, and an elongated brain, even though its as dumb as any large cat. It also lacks any liver, kidneys, or other basic organs.

We can't determine the exact nature of how these creatures grow, nor if they gain organs as they become adults. The larger breeds of xenomorph are too dangerous to kill and capture to give us an accurate answer to these questions. All that we can conclude is that being able to function with so little and yet be so deadly means that these creatures are highly evolved and likely to be extremely durable to various hazards that would otherwise be lethal to humans."; - name = "Larva Xenomorph Autopsy Report" - }, +/obj/item/paper/fluff/awaymissions/moonoutpost19/research/xeno_hivemind, +/obj/item/paper/fluff/awaymissions/moonoutpost19/research/xeno_behavior, +/obj/item/paper/fluff/awaymissions/moonoutpost19/research/xeno_castes, +/obj/item/paper/fluff/awaymissions/moonoutpost19/research/larva_autopsy, /obj/structure/alien/weeds, /turf/open/floor/plasteel/white, /area/awaycontent/a2{ diff --git a/_maps/RandomZLevels/wildwest.dmm b/_maps/RandomZLevels/wildwest.dmm index 61d5c4ee49..237fa11a45 100644 --- a/_maps/RandomZLevels/wildwest.dmm +++ b/_maps/RandomZLevels/wildwest.dmm @@ -171,9 +171,7 @@ /turf/open/floor/engine/cult, /area/awaymission/wwvault) "aL" = ( -/obj/item/paper/fluff/awaymissions/wildwest/grinder{ - info = "meat grinder requires sacri" - }, +/obj/item/paper/fluff/awaymissions/wildwest/grinder, /turf/open/floor/plasteel/cult{ name = "engraved floor" }, diff --git a/_maps/basemap.dm b/_maps/basemap.dm index d11b527aa3..8a838879b8 100644 --- a/_maps/basemap.dm +++ b/_maps/basemap.dm @@ -9,10 +9,10 @@ #include "map_files\Deltastation\DeltaStation2.dmm" #include "map_files\MetaStation\MetaStation.dmm" #include "map_files\OmegaStation\OmegaStation.dmm" -#include "map_files\PubbyStation\PubbyStation.dmm" +// #include "map_files\PubbyStation\PubbyStation.dmm" #include "map_files\BoxStation\BoxStation.dmm" #ifdef TRAVISBUILDING #include "templates.dm" #endif -#endif \ No newline at end of file +#endif diff --git a/_maps/map_files/OmegaStation/OmegaStation.dmm b/_maps/map_files/OmegaStation/OmegaStation.dmm index 6b4f65c67e..419737682f 100644 --- a/_maps/map_files/OmegaStation/OmegaStation.dmm +++ b/_maps/map_files/OmegaStation/OmegaStation.dmm @@ -18893,7 +18893,6 @@ }, /obj/structure/cable{ icon_state = "0-2"; - pixel_y = 1; d2 = 2 }, /obj/effect/decal/cleanable/dirt, @@ -21313,14 +21312,14 @@ /obj/machinery/power/smes{ charge = 5e+006 }, -/obj/structure/cable{ - icon_state = "0-2"; - d2 = 2 - }, /obj/structure/sign/electricshock{ pixel_y = 32 }, /obj/effect/turf_decal/bot, +/obj/structure/cable{ + icon_state = "0-2"; + d2 = 2 + }, /turf/open/floor/plasteel, /area/engine/gravity_generator) "aJo" = ( @@ -21935,35 +21934,25 @@ /turf/open/floor/plasteel, /area/engine/gravity_generator) "aKu" = ( -/obj/structure/cable{ - d1 = 1; - d2 = 4; - icon_state = "1-4" - }, /obj/machinery/holopad, /obj/effect/decal/cleanable/dirt, -/obj/structure/cable{ - d1 = 2; - d2 = 4; - icon_state = "2-4" - }, /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{ dir = 9 }, /obj/structure/cable{ - d1 = 4; + d1 = 2; d2 = 8; - icon_state = "4-8" + icon_state = "2-8" + }, +/obj/structure/cable{ + d1 = 1; + d2 = 2; + icon_state = "1-2" }, /turf/open/floor/plasteel/neutral, /area/engine/gravity_generator) "aKv" = ( /obj/effect/decal/cleanable/dirt, -/obj/structure/cable{ - d1 = 4; - d2 = 8; - icon_state = "4-8" - }, /obj/machinery/atmospherics/components/unary/vent_pump/on, /obj/structure/cable/white{ d1 = 1; @@ -21977,17 +21966,17 @@ /area/engine/gravity_generator) "aKw" = ( /obj/effect/decal/cleanable/dirt, -/obj/structure/cable{ - d1 = 1; - d2 = 8; - icon_state = "1-8" - }, /obj/structure/cable/white{ d1 = 4; d2 = 8; icon_state = "4-8" }, /obj/effect/turf_decal/delivery, +/obj/structure/cable{ + d1 = 1; + d2 = 2; + icon_state = "1-2" + }, /turf/open/floor/plasteel, /area/engine/gravity_generator) "aKx" = ( @@ -22671,6 +22660,11 @@ icon_state = "1-2" }, /obj/effect/turf_decal/stripes/line, +/obj/structure/cable{ + d1 = 2; + d2 = 4; + icon_state = "2-4" + }, /turf/open/floor/plasteel, /area/engine/gravity_generator) "aLJ" = ( @@ -22678,6 +22672,11 @@ /obj/effect/turf_decal/stripes/line{ dir = 6 }, +/obj/structure/cable{ + d1 = 4; + d2 = 8; + icon_state = "4-8" + }, /turf/open/floor/plasteel, /area/engine/gravity_generator) "aLK" = ( @@ -22693,6 +22692,11 @@ dir = 4 }, /obj/effect/turf_decal/bot, +/obj/structure/cable{ + d1 = 1; + d2 = 8; + icon_state = "1-8" + }, /turf/open/floor/plasteel, /area/engine/gravity_generator) "aLL" = ( diff --git a/_maps/map_files/PubbyStation/PubbyStation.dmm b/_maps/map_files/PubbyStation/PubbyStation.dmm index 497bf0a4ce..66a9216882 100644 --- a/_maps/map_files/PubbyStation/PubbyStation.dmm +++ b/_maps/map_files/PubbyStation/PubbyStation.dmm @@ -3595,8 +3595,8 @@ /area/security/armory) "aij" = ( /obj/structure/closet/secure_closet/contraband/armory, -/obj/item/book/codex_gigas, /obj/item/poster/random_contraband, +/obj/item/clothing/suit/security/officer/russian, /obj/item/grenade/smokebomb, /turf/open/floor/plasteel/black, /area/security/armory) @@ -4110,7 +4110,11 @@ /area/crew_quarters/heads/hos) "ajt" = ( /obj/structure/table, -/obj/machinery/chem_dispenser/drinks/beer, +/obj/item/reagent_containers/food/drinks/drinkingglass/shotglass{ + pixel_x = 4; + pixel_y = 7 + }, +/obj/item/reagent_containers/food/drinks/drinkingglass/shotglass, /turf/open/floor/plating, /area/maintenance/department/crew_quarters/dorms) "aju" = ( @@ -4445,10 +4449,7 @@ /turf/open/floor/plasteel/black, /area/crew_quarters/heads/hos) "akf" = ( -/obj/structure/extinguisher_cabinet{ - pixel_x = -24 - }, -/turf/open/floor/plating, +/turf/open/floor/carpet, /area/maintenance/department/crew_quarters/dorms) "akg" = ( /obj/structure/mineral_door/wood, @@ -4512,12 +4513,6 @@ /obj/machinery/door/airlock/glass{ name = "space-bridge access" }, -/obj/machinery/button/door{ - id = "supplybridge"; - name = "Space Bridge Control"; - pixel_y = 27; - req_access_txt = "0" - }, /obj/effect/turf_decal/stripes/line{ dir = 4 }, @@ -4564,12 +4559,6 @@ /obj/machinery/door/airlock/glass{ name = "space-bridge access" }, -/obj/machinery/button/door{ - id = "supplybridge"; - name = "Space Bridge Control"; - pixel_y = 27; - req_access_txt = "0" - }, /obj/structure/cable{ d1 = 4; d2 = 8; @@ -4923,12 +4912,7 @@ /turf/open/space/basic, /area/space) "alb" = ( -/obj/structure/table, -/obj/item/lighter, -/obj/machinery/light/small{ - dir = 8 - }, -/turf/open/floor/plating, +/turf/open/floor/wood, /area/maintenance/department/crew_quarters/dorms) "alc" = ( /obj/structure/table, @@ -7456,9 +7440,7 @@ /area/security/brig) "aqB" = ( /obj/machinery/atmospherics/components/unary/vent_scrubber/on, -/turf/open/floor/plasteel/darkred/side{ - dir = 1 - }, +/turf/open/floor/plasteel/black, /area/security/brig) "aqC" = ( /turf/open/floor/plasteel/black, @@ -7467,9 +7449,7 @@ /obj/machinery/ai_status_display{ pixel_y = 32 }, -/turf/open/floor/plasteel/darkred/side{ - dir = 1 - }, +/turf/open/floor/plasteel/black, /area/security/brig) "aqE" = ( /obj/structure/cable{ @@ -8976,13 +8956,13 @@ /area/security/brig) "atI" = ( /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden, -/turf/open/floor/plasteel/darkred/side, +/turf/open/floor/plasteel/black, /area/security/brig) "atJ" = ( /obj/machinery/atmospherics/components/unary/vent_pump/on{ dir = 1 }, -/turf/open/floor/plasteel/darkred/side, +/turf/open/floor/plasteel/black, /area/security/brig) "atK" = ( /obj/structure/cable{ @@ -20047,6 +20027,7 @@ /obj/structure/chair/wood/normal{ dir = 8 }, +/obj/item/clothing/under/janimaid, /turf/open/floor/wood{ icon_state = "wood-broken" }, @@ -20402,9 +20383,9 @@ /obj/structure/table, /obj/item/book/manual/hydroponics_pod_people, /obj/item/paper/guides/jobs/hydroponics, -/obj/item/reagent_containers/dropper, /obj/item/reagent_containers/glass/bottle/mutagen, /obj/item/reagent_containers/dropper, +/obj/item/reagent_containers/dropper, /turf/open/floor/plasteel/hydrofloor, /area/hydroponics) "aSH" = ( @@ -22960,6 +22941,10 @@ /obj/structure/sign/botany{ pixel_y = 32 }, +/obj/machinery/light{ + dir = 1; + light_color = "#e8eaff" + }, /turf/open/floor/plasteel/green/side{ dir = 1 }, @@ -23326,8 +23311,9 @@ }, /area/hydroponics) "aYQ" = ( -/obj/machinery/light{ - dir = 4 +/obj/structure/sink{ + dir = 4; + pixel_x = 11 }, /turf/open/floor/plasteel, /area/hydroponics) @@ -29196,14 +29182,16 @@ /turf/open/floor/plating, /area/maintenance/department/engine) "bmg" = ( -/obj/machinery/door/airlock/maintenance{ - req_access_txt = "12" - }, /obj/structure/cable{ d1 = 4; d2 = 8; icon_state = "4-8" }, +/obj/machinery/door/airlock/maintenance{ + name = "Genetics Maintenance"; + req_access_txt = "0"; + req_one_access_txt = "12;45;5;9" + }, /turf/open/floor/plating, /area/maintenance/department/engine) "bmh" = ( @@ -39848,8 +39836,8 @@ }, /area/medical/virology) "bHZ" = ( -/obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden{ - dir = 1 +/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{ + dir = 4 }, /turf/open/floor/plasteel/whitegreen/corner{ dir = 1 @@ -40425,10 +40413,12 @@ /turf/open/floor/plasteel/white, /area/medical/virology) "bJn" = ( -/obj/machinery/atmospherics/pipe/simple/cyan/hidden, /obj/machinery/light{ dir = 4 }, +/obj/machinery/atmospherics/pipe/manifold/cyan/hidden{ + dir = 4 + }, /turf/open/floor/plasteel/white, /area/medical/virology) "bJo" = ( @@ -40927,15 +40917,10 @@ /turf/open/floor/plasteel/white, /area/medical/virology) "bKs" = ( -/obj/machinery/atmospherics/pipe/manifold/cyan/hidden{ - dir = 8 - }, +/obj/machinery/atmospherics/pipe/simple/cyan/hidden, /turf/open/floor/plasteel/white, /area/medical/virology) "bKt" = ( -/obj/machinery/atmospherics/components/unary/vent_pump/on{ - dir = 8 - }, /obj/machinery/computer/pandemic, /turf/open/floor/plasteel/white, /area/medical/virology) @@ -41475,7 +41460,7 @@ layer = 3.1 }, /obj/item/stack/sheet/mineral/plasma{ - amount = 1; + amount = 2; layer = 3 }, /turf/open/floor/plasteel/whitegreen/side{ @@ -41950,7 +41935,10 @@ }, /area/medical/virology) "bMK" = ( -/obj/machinery/vending/cigarette, +/obj/item/soap/nanotrasen, +/obj/item/clothing/neck/stethoscope, +/obj/item/gun/syringe, +/obj/structure/table/glass, /turf/open/floor/plasteel/whiteblue/side{ dir = 10 }, @@ -50077,7 +50065,9 @@ /area/chapel/office) "ceF" = ( /obj/structure/filingcabinet, -/turf/open/floor/plasteel/black, +/turf/open/floor/plasteel/vault{ + dir = 8 + }, /area/chapel/office) "ceG" = ( /obj/machinery/suit_storage_unit/standard_unit, @@ -53368,7 +53358,7 @@ /obj/machinery/light{ dir = 8 }, -/turf/open/floor/plasteel/darkred/side/telecomms, +/turf/open/floor/plasteel/black/telecomms, /area/tcommsat/server) "cmS" = ( /turf/open/floor/plasteel/whitepurple/side/telecomms, @@ -53380,7 +53370,7 @@ /obj/machinery/light{ dir = 4 }, -/turf/open/floor/plasteel/whitepurple/side/telecomms, +/turf/open/floor/plasteel/black/telecomms, /area/tcommsat/server) "cmV" = ( /obj/machinery/telecomms/server/presets/security, @@ -54317,6 +54307,7 @@ /area/crew_quarters/kitchen) "cpA" = ( /obj/structure/rack, +/obj/item/reagent_containers/food/snacks/mint, /obj/item/storage/box/drinkingglasses, /turf/open/floor/plasteel/cafeteria, /area/crew_quarters/kitchen) @@ -55197,17 +55188,6 @@ /turf/open/floor/plating/airless, /area/maintenance/department/engine) "csn" = ( -/obj/structure/closet{ - name = "chaplain closet" - }, -/obj/item/clothing/under/rank/chaplain, -/obj/item/clothing/shoes/sneakers/black, -/obj/item/storage/backpack/cultpack, -/obj/item/storage/fancy/candle_box, -/obj/item/storage/fancy/candle_box, -/obj/item/clothing/suit/nun, -/obj/item/clothing/head/nun_hood, -/obj/item/clothing/suit/holidaypriest, /obj/item/device/radio/intercom{ dir = 0; name = "Station Intercom (General)"; @@ -55218,7 +55198,10 @@ departmentType = 2; pixel_x = -32 }, -/turf/open/floor/plasteel/black, +/obj/structure/closet/wardrobe/chaplain_black, +/turf/open/floor/plasteel/vault{ + dir = 8 + }, /area/chapel/office) "cso" = ( /obj/structure/table/wood, @@ -55513,7 +55496,9 @@ /obj/machinery/newscaster{ pixel_x = -32 }, -/turf/open/floor/plasteel/black, +/turf/open/floor/plasteel/vault{ + dir = 8 + }, /area/chapel/office) "csZ" = ( /obj/structure/chair/wood/normal{ @@ -56007,7 +55992,8 @@ /obj/structure/extinguisher_cabinet{ pixel_x = 24 }, -/obj/item/storage/bag/plants, +/obj/item/storage/bag/plants/portaseeder, +/obj/item/storage/bag/plants/portaseeder, /turf/open/floor/plasteel/hydrofloor, /area/chapel/main/monastery) "cuv" = ( @@ -58192,6 +58178,206 @@ /obj/structure/ore_box, /turf/open/floor/plating, /area/maintenance/department/engine) +"cBk" = ( +/obj/machinery/vending/boozeomat{ + products = list(/obj/item/reagent_containers/food/drinks/bottle/whiskey = 1, /obj/item/reagent_containers/food/drinks/bottle/absinthe = 1, /obj/item/reagent_containers/food/drinks/bottle/limejuice = 1, /obj/item/reagent_containers/food/drinks/bottle/cream = 1, /obj/item/reagent_containers/food/drinks/soda_cans/tonic = 1, /obj/item/reagent_containers/food/drinks/drinkingglass = 10, /obj/item/reagent_containers/food/drinks/ice = 3, /obj/item/reagent_containers/food/drinks/drinkingglass/shotglass = 6, /obj/item/reagent_containers/food/drinks/flask = 1); + req_access_txt = "0" + }, +/turf/closed/wall, +/area/maintenance/department/crew_quarters/dorms) +"cBl" = ( +/obj/structure/table, +/obj/machinery/chem_dispenser/drinks/beer, +/obj/structure/sign/poster/contraband/random{ + pixel_x = 32 + }, +/turf/open/floor/plating, +/area/maintenance/department/crew_quarters/dorms) +"cBm" = ( +/obj/item/cigbutt/cigarbutt, +/turf/open/floor/plating{ + burnt = 1; + icon_state = "panelscorched" + }, +/area/maintenance/department/crew_quarters/dorms) +"cBn" = ( +/obj/structure/extinguisher_cabinet{ + pixel_x = 24 + }, +/turf/open/floor/plating{ + icon_state = "platingdmg1" + }, +/area/maintenance/department/crew_quarters/dorms) +"cBo" = ( +/obj/structure/table, +/obj/item/lighter, +/obj/structure/light_construct/small{ + tag = "icon-bulb-construct-stage1 (WEST)"; + icon_state = "bulb-construct-stage1"; + dir = 8 + }, +/turf/open/floor/plating, +/area/maintenance/department/crew_quarters/dorms) +"cBp" = ( +/obj/structure/table, +/obj/item/reagent_containers/food/drinks/bottle/gin{ + pixel_y = 8 + }, +/obj/machinery/light/small{ + dir = 4 + }, +/turf/open/floor/plating, +/area/maintenance/department/crew_quarters/dorms) +"cBq" = ( +/obj/effect/landmark/xeno_spawn, +/turf/open/floor/plating, +/area/maintenance/department/crew_quarters/dorms) +"cBr" = ( +/obj/structure/chair/comfy, +/turf/open/floor/carpet, +/area/maintenance/department/crew_quarters/dorms) +"cBs" = ( +/obj/structure/table/wood/poker, +/obj/item/toy/cards/deck, +/obj/machinery/light/small{ + dir = 8 + }, +/turf/open/floor/carpet, +/area/maintenance/department/crew_quarters/dorms) +"cBt" = ( +/turf/open/floor/wood, +/area/maintenance/department/crew_quarters/dorms) +"cBu" = ( +/obj/structure/chair/comfy{ + dir = 1 + }, +/turf/open/floor/carpet, +/area/maintenance/department/crew_quarters/dorms) +"cBv" = ( +/obj/item/cigbutt/roach, +/turf/open/floor/carpet, +/area/maintenance/department/crew_quarters/dorms) +"cBw" = ( +/turf/open/floor/wood{ + icon_state = "wood-broken7" + }, +/area/maintenance/department/crew_quarters/dorms) +"cBx" = ( +/obj/structure/cable{ + d1 = 4; + d2 = 8; + icon_state = "4-8" + }, +/obj/machinery/atmospherics/pipe/simple/supply/hidden{ + dir = 4 + }, +/obj/effect/turf_decal/stripes/line{ + dir = 4 + }, +/obj/machinery/button/door{ + id = "supplybridge"; + name = "Space Bridge Control"; + pixel_y = 27; + req_access_txt = "0" + }, +/turf/open/floor/plating, +/area/maintenance/department/crew_quarters/dorms) +"cBy" = ( +/obj/structure/cable{ + d1 = 4; + d2 = 8; + icon_state = "4-8" + }, +/obj/machinery/atmospherics/pipe/simple/supply/hidden{ + dir = 4 + }, +/obj/effect/turf_decal/stripes/line{ + dir = 8 + }, +/obj/machinery/button/door{ + id = "supplybridge"; + name = "Space Bridge Control"; + pixel_y = 27; + req_access_txt = "0" + }, +/turf/open/floor/plating, +/area/maintenance/department/crew_quarters/dorms) +"cBz" = ( +/turf/open/floor/plating{ + broken = 1; + icon_state = "platingdmg1" + }, +/area/maintenance/department/crew_quarters/dorms) +"cBA" = ( +/obj/structure/grille/broken, +/turf/open/floor/plating{ + burnt = 1; + icon_state = "panelscorched" + }, +/area/maintenance/department/crew_quarters/dorms) +"cBB" = ( +/obj/machinery/light/small{ + brightness = 3; + dir = 8 + }, +/turf/open/floor/plating{ + broken = 1; + icon_state = "platingdmg3" + }, +/area/maintenance/department/crew_quarters/dorms) +"cBC" = ( +/obj/effect/spawner/structure/window/reinforced, +/turf/open/floor/plating, +/area/shuttle/escape) +"cBD" = ( +/obj/effect/spawner/structure/window/reinforced, +/turf/open/floor/plating, +/area/shuttle/escape) +"cBE" = ( +/turf/closed/wall, +/area/shuttle/escape) +"cBF" = ( +/obj/effect/spawner/structure/window/reinforced, +/turf/open/floor/plating, +/area/space) +"cBG" = ( +/obj/effect/spawner/structure/window/reinforced, +/turf/open/floor/plating, +/area/space) +"cBH" = ( +/obj/effect/spawner/structure/window/reinforced, +/turf/open/floor/plating, +/area/shuttle/escape) +"cBI" = ( +/obj/effect/spawner/structure/window/reinforced, +/turf/open/floor/plating, +/area/shuttle/escape) +"cBJ" = ( +/turf/closed/wall, +/area/shuttle/escape) +"cBK" = ( +/obj/machinery/atmospherics/components/unary/vent_pump/on{ + dir = 4 + }, +/turf/open/floor/plasteel/white, +/area/medical/virology) +"cBL" = ( +/obj/machinery/door/airlock/maintenance{ + name = "Medbay Maintenance"; + req_access_txt = "0"; + req_one_access_txt = "12;45;5;9" + }, +/turf/open/floor/plating, +/area/maintenance/department/engine) +"cBM" = ( +/obj/structure/sign/securearea{ + desc = "Under the painting a plaque reads: 'While the meat grinder may not have spared you, fear not. Not one part of you has gone to waste... You were delicious.'"; + icon_state = "monkey_painting"; + name = "Mr. Deempisi portrait"; + pixel_y = 28 + }, +/turf/open/floor/plasteel/black, +/area/chapel/office) (1,1,1) = {" aaa @@ -69669,7 +69855,7 @@ bZY bZY bZY bZY -crv +cBM csd cdo csB @@ -71922,11 +72108,11 @@ aaa aaa aaa aaa -aaa -aaa -aaa -aaa -aaa +bVq +cBF +bVq +cBG +bVq aaa aaa aaa @@ -72179,11 +72365,11 @@ aFT aFT aFS aKs -aFS -aKs -aFS -aFS -aFS +cBC +aOc +aPj +aOc +cBH aaa aaa aaa @@ -72436,11 +72622,11 @@ aNZ aNZ aNZ aMI -aNZ -aMI -aNZ -aVJ -aWD +cBD +aOd +aPk +aQq +cBI aaa aaa aaa @@ -72693,11 +72879,11 @@ aIx aIx aIx aIx -aIx -aIx -aIx -aVJ -aWD +cBE +aOc +aPl +aOc +cBJ aaa aaa aaa @@ -83010,8 +83196,8 @@ bDm bvc bFK bGQ -bHW -bGW +bHX +bJm bKn bKn bKn @@ -83782,7 +83968,7 @@ bEs bEr bGS bHZ -bJm +bGW bKq bKn bKn @@ -84039,7 +84225,7 @@ bEt bFM bGT bIa -bGW +cBK bKr bLC bMH @@ -84231,10 +84417,10 @@ anQ aiR aph ajM -coa +aqC arw asI -cof +aqC auH avI auH @@ -84491,7 +84677,7 @@ ajM aqD arx asJ -cof +aqC auH avJ awS @@ -84745,10 +84931,10 @@ anS aiR api ajM -coa +aqC ary asK -cof +aqC auH avK auH @@ -85002,7 +85188,7 @@ anT aiR aph ajM -coa +aqC arz asL atJ @@ -85383,22 +85569,22 @@ aaa aaa adR adR -clO adR adR adR adR -clO adR adR adR adR -clO adR adR adR adR -clO +adR +adR +adR +adR adR adR aaa @@ -85916,7 +86102,7 @@ cmB cmB cmB cny -clO +adR abI aaa aaa @@ -86167,7 +86353,7 @@ cmL cmR cmV cna -cnf +cmR cnj cmK cnr @@ -86421,10 +86607,10 @@ clG cmD cmJ cmM -cmS +cmK cmW cnb -cng +cmK cnk cmK cns @@ -86612,8 +86798,8 @@ bIh bkh bKz bnH -bML -bjc +boN +cBL bOG bPB bQq @@ -86944,7 +87130,7 @@ cmK cnu cmB abI -clO +adR abI aaa aaa @@ -87449,10 +87635,10 @@ clG cmG cmK cmP -cmS +cmK cmY cnd -cnh +cmK cnn cmK cnw @@ -87709,7 +87895,7 @@ cmQ cmU cmZ cne -cni +cmU cno cmK cnx @@ -87972,7 +88158,7 @@ cmB cmB cmB cnz -clO +adR abI aaa aaa @@ -88467,22 +88653,22 @@ aaa aaa adR adR -clO adR adR adR adR -clO adR adR adR adR -clO adR adR adR adR -clO +adR +adR +adR +adR adR adR aaa @@ -94498,11 +94684,11 @@ aaa aaa aaa aaa -aaa -aaa -aaa -aaa -aaa +aiS +aiT +aiS +aiT +aiS aaa aaa aaa @@ -94755,12 +94941,12 @@ aaa aaa aaa aaa -aiS -aiS aiT +cBr +cBs +cBu aiT -aiS -aiS +aaa aaa aaa aaa @@ -94774,13 +94960,13 @@ anX anX anX awd -awd +axi +aaa +aaa aaa aaa -aht aaa aaa -aht aaa aaa aaa @@ -95009,23 +95195,23 @@ aaa aaa aaa aaa -aaa -aaa -abI +aiS +aiS +aiS aiS akf -aju -alP -alP -aiS -aiS -aiT -aiS +akf +cBv aiS aaa aaa aaa aaa +aaa +aaa +aaa +aaa +aaa aht aaa aht @@ -95034,10 +95220,10 @@ aaa aht aaa aaa -aht aaa aaa -aht +aaa +aaa aaa aaa aaa @@ -95266,18 +95452,18 @@ aaa aaa aaa aaa -aaa -aaa +aiT +cBk +aju +cBo +alQ +cBt +cBw aiS aiS -akg +aiT aiS aiS -akg -aiS -anY -apt -aiS aiS aiS aiS @@ -95523,20 +95709,20 @@ aaa aaa aaa aaa -aaa -aaa -aiT -ajt +aiU +ajv aju -alb +ajt alQ -amE +alb +alb aiS -anZ -ajv +anY +apt aiS -ajv -ajv +cBz +alP +cBB apu ale ale @@ -95780,19 +95966,19 @@ aaa aaa aaa aaa -aaa -aaa -aiU +aiT aju akh alc alR amF +alb anm -aoa -ajv ajv ajv +aju +cBA +aiS aiS akn apX @@ -96037,14 +96223,14 @@ aaa aaa aaa aaa -aaa -aaa aiT -ajv -aki -ald +cBl +cBm +cBp alS amG +alb +aiS aiS aiS aiS @@ -96294,16 +96480,16 @@ aaa aaa aaa aaa -aaa -aaa -aiS -ajw aiS aiS +akg aiS aiS +akg +aiS aiS aob +ajv aoD ajv cnX @@ -96551,13 +96737,13 @@ aaa aaa aaa aaa -aaa -aaa -aiS -aiS +aht aiS +cBn +cBq ajv ajv +aiS akj ale ale @@ -96809,13 +96995,13 @@ aaa aaa aaa aaa -aaa -aaa -aaa +aiS aiS aiT +aiT aiS -akk +aiS +cBx aiS aiS aiS @@ -97071,9 +97257,9 @@ aaa aaa aaa aaa -aiS +aiT akl -aiS +aiT aaa aaa aaa @@ -98613,9 +98799,9 @@ aaa aaa aaa aaa -aiS +aiT akp -aiS +aiT aaa aaa aaa @@ -98870,8 +99056,8 @@ aaa aaa aaa aaa -aiT -akm +aiS +cBy aiS aiS aiS diff --git a/citadel/tools/merge-upstream-pull-request.sh b/citadel/tools/merge-upstream-pull-request.sh new file mode 100755 index 0000000000..a034b5c450 --- /dev/null +++ b/citadel/tools/merge-upstream-pull-request.sh @@ -0,0 +1,110 @@ +#!/usr/bin/env bash +source ~/.discordauth + +# ~/.discordauth contains: +# CHANNELID=x +# TOKEN=x +# CHANNELID being the Discord Channel ID +# TOKEN being the bot token + +set -u # don't expand unbound variable +set -f # disable pathname expansion +set -C # noclobber + +readonly BASE_BRANCH_NAME="upstream-merge-" +readonly BASE_PULL_URL="https://api.github.com/repos/tgstation/tgstation/pulls" + +# Ensure the current directory is a git directory +if [ ! -d .git ]; then + echo "Error: must run this script from the root of a git repository" + exit 1 +fi + +# Ensure all given parameters exist +if [ $# -eq 0 ]; then + echo "Error: No arguments have been given, the first argument needs to be a pull ID, the second argument needs to be the commit message" + exit 1 +fi + +# Ensure curl exists and is available in the current context +type curl >/dev/null 2>&1 || { echo >&2 "Error: This script requires curl, please ensure curl is installed and exists in the current PATH"; exit 1; } + +# Ensure jq exists and is available in the current context +type jq >/dev/null 2>&1 || { echo >&2 "Error: This script requires jq, please ensure jq is installed and exists in the current PATH"; exit 1; } + +containsElement () { + local e match="$1" + shift + for e; do [[ "$e" == "$match" ]] && return 0; done + return 1 +} + +# Make sure we have our upstream remote +if ! git remote | grep tgstation > /dev/null; then + git remote add tgstation https://github.com/tgstation/tgstation.git +fi + +curl -v \ +-H "Authorization: Bot $TOKEN" \ +-H "User-Agent: myBotThing (http://some.url, v0.1)" \ +-H "Content-Type: application/json" \ +-X POST \ +-d "{\"content\":\"Mirroring [$1] from /tg/ to Citadel\"}" \ +https://discordapp.com/api/channels/$CHANNELID/messages + +# We need to make sure we are always on a clean master when creating the new branch. +# So we forcefully reset, clean and then checkout the master branch +git fetch --all +git checkout master +git reset --hard origin/master +git clean -f + +# Remove the other branches +git branch | grep -v "master" | xargs git branch -D + +# Create a new branch +git checkout -b "$BASE_BRANCH_NAME$1" + +# Grab the SHA of the merge commit +readonly MERGE_SHA=$(curl --silent "$BASE_PULL_URL/$1" | jq '.merge_commit_sha' -r) + +# Get the commits +readonly COMMITS=$(curl --silent "$BASE_PULL_URL/$1/commits" | jq '.[].sha' -r) + +# Cherry pick onto the new branch +echo "Cherry picking onto branch" +CHERRY_PICK_OUTPUT=$(git cherry-pick -m 1 "$MERGE_SHA" 2>&1) +echo "$CHERRY_PICK_OUTPUT" + +# If it's a squash commit, you can't use -m 1, you need to remove it +# You also can't use -m 1 if it's a rebase and merge... +if echo "$CHERRY_PICK_OUTPUT" | grep -i 'error: mainline was specified but commit'; then + echo "Commit was a squash, retrying" + if containsElement "$MERGE_SHA" "${COMMITS[@]}"; then + for commit in $COMMITS; do + echo "Cherry-picking: $commit" + git cherry-pick "$commit" + # Add all files onto this branch + git add -A . + git cherry-pick --continue + done + else + echo "Cherry-picking: $MERGE_SHA" + git cherry-pick "$MERGE_SHA" + # Add all files onto this branch + git add -A . + git cherry-pick --continue + fi +else + # Add all files onto this branch + echo "Adding files to branch:" + git add -A . +fi + +# Commit these changes +echo "Commiting changes" +git commit --allow-empty -m "$2" + +# Push them onto the branch +echo "Pushing changes" +git push -u origin "$BASE_BRANCH_NAME$1" diff --git a/code/__DEFINES/combat.dm b/code/__DEFINES/combat.dm index c088e81c4a..3f45fb170b 100644 --- a/code/__DEFINES/combat.dm +++ b/code/__DEFINES/combat.dm @@ -49,6 +49,7 @@ //Health Defines #define HEALTH_THRESHOLD_CRIT 0 +#define HEALTH_THRESHOLD_FULLCRIT -30 #define HEALTH_THRESHOLD_DEAD -100 //Actual combat defines @@ -73,6 +74,10 @@ #define GRAB_NECK 2 #define GRAB_KILL 3 +//slowdown when in softcrit +#define SOFTCRIT_MIN_SLOWDOWN 8 +#define SOFTCRIT_ADD_SLOWDOWN 6 + //Attack types for checking shields/hit reactions #define MELEE_ATTACK 1 #define UNARMED_ATTACK 2 diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm index 0225dad669..1943ba15cd 100644 --- a/code/__DEFINES/components.dm +++ b/code/__DEFINES/components.dm @@ -5,7 +5,7 @@ // How multiple components of the exact same type are handled in the same datum #define COMPONENT_DUPE_HIGHLANDER 0 //old component is deleted (default) -#define COMPONENT_DUPE_ALLOWED 1 //duplicates allowed +#define COMPONENT_DUPE_ALLOWED 1 //duplicates allowed #define COMPONENT_DUPE_UNIQUE 2 //new component is deleted // All signals. Format: @@ -16,3 +16,9 @@ #define COMSIG_PARENT_QDELETED "parent_qdeleted" //before a datum's Destroy() is called: () #define COMSIG_ATOM_ENTERED "atom_entered" //from base of atom/Entered(): (atom/movable, atom) #define COMSIG_MOVABLE_CROSSED "movable_crossed" //from base of atom/movable/Crossed(): (atom/movable) +#define COMSIG_PARENT_ATTACKBY "atom_attackby" //from the base of atom/attackby: (obj/item, mob/living, params) +#define COMSIG_PARENT_EXAMINE "atom_examine" //from the base of atom/examine: (mob) +#define COMSIG_ATOM_ENTERED "atom_entered" //from base of atom/Entered(): (atom/movable, atom) +#define COMSIG_ATOM_EX_ACT "atom_ex_act" //from base of atom/ex_act(): (severity, target) +#define COMSIG_ATOM_SING_PULL "atom_sing_pull" //from base of atom/singularity_pull(): (S, current_size) +#define COMSIG_MOVABLE_CROSSED "movable_crossed" //from base of atom/movable/Crossed(): (atom/movable) diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index 16b2a8f4fb..2c18e51f01 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -25,6 +25,8 @@ #define islava(A) (istype(A, /turf/open/lava)) +#define isplatingturf(A) (istype(A, /turf/open/floor/plating)) + //Mobs #define isliving(A) (istype(A, /mob/living)) diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index cca88750b5..1c79dde65f 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -315,9 +315,16 @@ GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE #define APPEARANCE_CONSIDER_ALPHA ~RESET_ALPHA #define APPEARANCE_LONG_GLIDE LONG_GLIDE -// Consider these images/atoms as part of the UI/HUD -#define APPEARANCE_UI_IGNORE_ALPHA RESET_COLOR|RESET_TRANSFORM|NO_CLIENT_COLOR|RESET_ALPHA -#define APPEARANCE_UI RESET_COLOR|RESET_TRANSFORM|NO_CLIENT_COLOR +#ifndef PIXEL_SCALE +#define PIXEL_SCALE 0 +#if DM_VERSION >= 512 +#error HEY, PIXEL_SCALE probably exists now, remove this gross ass shim. +#endif +#endif + + // Consider these images/atoms as part of the UI/HUD +#define APPEARANCE_UI_IGNORE_ALPHA RESET_COLOR|RESET_TRANSFORM|NO_CLIENT_COLOR|RESET_ALPHA|PIXEL_SCALE +#define APPEARANCE_UI RESET_COLOR|RESET_TRANSFORM|NO_CLIENT_COLOR //Just space #define SPACE_ICON_STATE "[((x + y) ^ ~(x * y) + z) % 25]" @@ -446,3 +453,13 @@ GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE #define MOUSE_OPACITY_TRANSPARENT 0 #define MOUSE_OPACITY_ICON 1 #define MOUSE_OPACITY_OPAQUE 2 + +//world/proc/shelleo +#define SHELLEO_ERRORLEVEL 1 +#define SHELLEO_STDOUT 2 +#define SHELLEO_STDERR 3 + +//server security mode +#define SECURITY_SAFE 1 +#define SECURITY_ULTRASAFE 2 +#define SECURITY_TRUSTED 3 diff --git a/code/__DEFINES/preferences.dm b/code/__DEFINES/preferences.dm index f26b750492..b6133df287 100644 --- a/code/__DEFINES/preferences.dm +++ b/code/__DEFINES/preferences.dm @@ -47,4 +47,22 @@ #define SEC_DEPT_ENGINEERING "Engineering" #define SEC_DEPT_MEDICAL "Medical" #define SEC_DEPT_SCIENCE "Science" -#define SEC_DEPT_SUPPLY "Supply" \ No newline at end of file +#define SEC_DEPT_SUPPLY "Supply" + +// Playtime tracking system, see jobs_exp.dm +#define EXP_TYPE_LIVING "Living" +#define EXP_TYPE_CREW "Crew" +#define EXP_TYPE_COMMAND "Command" +#define EXP_TYPE_ENGINEERING "Engineering" +#define EXP_TYPE_MEDICAL "Medical" +#define EXP_TYPE_SCIENCE "Science" +#define EXP_TYPE_SUPPLY "Supply" +#define EXP_TYPE_SECURITY "Security" +#define EXP_TYPE_SILICON "Silicon" +#define EXP_TYPE_SERVICE "Service" +#define EXP_TYPE_ANTAG "Antag" +#define EXP_TYPE_SPECIAL "Special" +#define EXP_TYPE_GHOST "Ghost" + +//Flags in the players table in the db +#define DB_FLAG_EXEMPT 1 \ No newline at end of file diff --git a/code/__DEFINES/server_tools.dm b/code/__DEFINES/server_tools.dm index a4afa58a87..d2be3e578e 100644 --- a/code/__DEFINES/server_tools.dm +++ b/code/__DEFINES/server_tools.dm @@ -9,7 +9,9 @@ //keep these in sync with TGS3 #define SERVICE_WORLD_PARAM "server_service" -#define SERVICE_PR_TEST_JSON "..\\..\\prtestjob.json" +#define SERVICE_VERSION_PARAM "server_service_version" +#define SERVICE_PR_TEST_JSON "prtestjob.json" +#define SERVICE_PR_TEST_JSON_OLD "..\\..\\[SERVICE_PR_TEST_JSON]" #define SERVICE_CMD_HARD_REBOOT "hard_reboot" #define SERVICE_CMD_GRACEFUL_SHUTDOWN "graceful_shutdown" diff --git a/code/__DEFINES/shuttles.dm b/code/__DEFINES/shuttles.dm index bee6508609..b4fd6719b2 100644 --- a/code/__DEFINES/shuttles.dm +++ b/code/__DEFINES/shuttles.dm @@ -53,9 +53,14 @@ #define ENGINE_COEFF_MAX 2 #define ENGINE_DEFAULT_MAXSPEED_ENGINES 5 -//Docking error flags_1 +//Docking error flags #define DOCKING_SUCCESS 0 -#define DOCKING_COMPLETE 1 -#define DOCKING_BLOCKED 2 -#define DOCKING_IMMOBILIZED 4 -#define DOCKING_AREA_EMPTY 8 \ No newline at end of file +#define DOCKING_BLOCKED 1 +#define DOCKING_IMMOBILIZED 2 +#define DOCKING_AREA_EMPTY 4 + + +//Docking turf movements +#define MOVE_TURF 1 +#define MOVE_AREA 2 +#define MOVE_CONTENTS 4 \ No newline at end of file diff --git a/code/__DEFINES/sound.dm b/code/__DEFINES/sound.dm index 620d8bed10..d3867e5257 100644 --- a/code/__DEFINES/sound.dm +++ b/code/__DEFINES/sound.dm @@ -10,12 +10,13 @@ #define CHANNEL_BICYCLE 1016 //Citadel code -#define CHANNEL_PRED 1018 +#define CHANNEL_PRED 1015 +#define CHANNEL_PREYLOOP 1014 //THIS SHOULD ALWAYS BE THE LOWEST ONE! //KEEP IT UPDATED -#define CHANNEL_HIGHEST_AVAILABLE 1015 +#define CHANNEL_HIGHEST_AVAILABLE 1013 #define CHANNEL_HIGHEST_AVAILABLE 1017 #define SOUND_MINIMUM_PRESSURE 10 diff --git a/code/__DEFINES/stat.dm b/code/__DEFINES/stat.dm index e2cf5d5dd7..5dbe99a9c5 100644 --- a/code/__DEFINES/stat.dm +++ b/code/__DEFINES/stat.dm @@ -4,8 +4,9 @@ //mob/var/stat things #define CONSCIOUS 0 -#define UNCONSCIOUS 1 -#define DEAD 2 +#define SOFT_CRIT 1 +#define UNCONSCIOUS 2 +#define DEAD 3 //mob disabilities stat @@ -21,9 +22,8 @@ // bitflags for machine stat variable #define BROKEN 1 #define NOPOWER 2 -#define POWEROFF 4 // tbd -#define MAINT 8 // under maintaince -#define EMPED 16 // temporary broken by EMP pulse +#define MAINT 4 // under maintaince +#define EMPED 8 // temporary broken by EMP pulse //ai power requirement defines #define POWER_REQ_NONE 0 diff --git a/code/__DEFINES/voreconstants.dm b/code/__DEFINES/voreconstants.dm index bf6cf2e257..ea4c26d79e 100644 --- a/code/__DEFINES/voreconstants.dm +++ b/code/__DEFINES/voreconstants.dm @@ -2,6 +2,7 @@ #define DM_HOLD "Hold" #define DM_DIGEST "Digest" #define DM_HEAL "Heal" +#define DM_NOISY "Noisy" #define VORE_STRUGGLE_EMOTE_CHANCE 40 diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index d1d330fb01..265db91339 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -9,10 +9,8 @@ #define CULT_POLL_WAIT 2400 /proc/get_area(atom/A) - if (!istype(A)) - return - for(A, A && !isarea(A), A=A.loc); //semicolon is for the empty statement - return A + var/turf/T = get_turf(A) + return T ? T.loc : null /proc/get_area_name(atom/X) var/area/Y = get_area(X) diff --git a/code/__HELPERS/shell.dm b/code/__HELPERS/shell.dm new file mode 100644 index 0000000000..8b615eac0a --- /dev/null +++ b/code/__HELPERS/shell.dm @@ -0,0 +1,57 @@ +//Runs the command in the system's shell, returns a list of (error code, stdout, stderr) + +#define SHELLEO_NAME "data/shelleo." +#define SHELLEO_ERR ".err" +#define SHELLEO_OUT ".out" +/world/proc/shelleo(command) + var/static/list/shelleo_ids = list() + var/stdout = "" + var/stderr = "" + var/errorcode = 1 + var/shelleo_id + var/out_file = "" + var/err_file = "" + var/static/list/interpreters = list("[MS_WINDOWS]" = "cmd /c", "[UNIX]" = "sh -c") + var/interpreter = interpreters["[world.system_type]"] + if(interpreter) + for(var/seo_id in shelleo_ids) + if(!shelleo_ids[seo_id]) + shelleo_ids[seo_id] = TRUE + shelleo_id = "[seo_id]" + break + if(!shelleo_id) + shelleo_id = "[shelleo_ids.len + 1]" + shelleo_ids += shelleo_id + shelleo_ids[shelleo_id] = TRUE + out_file = "[SHELLEO_NAME][shelleo_id][SHELLEO_OUT]" + err_file = "[SHELLEO_NAME][shelleo_id][SHELLEO_ERR]" + errorcode = shell("[interpreter] \"[command]\" > [out_file] 2> [err_file]") + if(fexists(out_file)) + stdout = file2text(out_file) + fdel(out_file) + if(fexists(err_file)) + stderr = file2text(err_file) + fdel(err_file) + shelleo_ids[shelleo_id] = FALSE + else + CRASH("Operating System: [world.system_type] not supported") // If you encounter this error, you are encouraged to update this proc with support for the new operating system + . = list(errorcode, stdout, stderr) +#undef SHELLEO_NAME +#undef SHELLEO_ERR +#undef SHELLEO_OUT + +/proc/shell_url_scrub(url) + var/static/regex/bad_chars_regex = regex("\[^#%&./:=?\\w]*", "g") + var/scrubbed_url = "" + var/bad_match = "" + var/last_good = 1 + var/bad_chars = 1 + do + bad_chars = bad_chars_regex.Find(url) + scrubbed_url += copytext(url, last_good, bad_chars) + if(bad_chars) + bad_match = url_encode(bad_chars_regex.match) + scrubbed_url += bad_match + last_good = bad_chars + length(bad_match) + while(bad_chars) + . = scrubbed_url diff --git a/code/__HELPERS/type2type_vr.dm b/code/__HELPERS/type2type_vr.dm index e6df531806..09ea0a158a 100644 --- a/code/__HELPERS/type2type_vr.dm +++ b/code/__HELPERS/type2type_vr.dm @@ -1,5 +1,5 @@ /* -// Contains VOREStation type2type functions +// Contains VOREStation based vore description type2type functions // list2text - takes delimiter and returns text // text2list - takes delimiter, and creates list // diff --git a/code/_compile_options.dm b/code/_compile_options.dm index c1f02856a7..ccab4a645b 100644 --- a/code/_compile_options.dm +++ b/code/_compile_options.dm @@ -72,4 +72,4 @@ //Update this whenever the db schema changes //make sure you add an update to the schema_version stable in the db changelog #define DB_MAJOR_VERSION 3 -#define DB_MINOR_VERSION 0 +#define DB_MINOR_VERSION 3 diff --git a/code/_compile_options.dm.rej b/code/_compile_options.dm.rej new file mode 100644 index 0000000000..842c24b746 --- /dev/null +++ b/code/_compile_options.dm.rej @@ -0,0 +1,11 @@ +diff a/code/_compile_options.dm b/code/_compile_options.dm (rejected hunks) +@@ -69,7 +69,7 @@ + #error You need version 511 or higher + #endif + +-//Update this whenever the db schema changes ++//Update this whenever the db schema changes + //make sure you add an update to the schema_version stable in the db changelog + #define DB_MAJOR_VERSION 3 +-#define DB_MINOR_VERSION 2 ++#define DB_MINOR_VERSION 3 diff --git a/code/_globalvars/lists/flavor_misc.dm b/code/_globalvars/lists/flavor_misc.dm index e477299308..7acb5bf729 100644 --- a/code/_globalvars/lists/flavor_misc.dm +++ b/code/_globalvars/lists/flavor_misc.dm @@ -105,53 +105,17 @@ GLOBAL_LIST_INIT(TAGGERLOCATIONS, list("Disposals", GLOBAL_LIST_INIT(guitar_notes, flist("sound/guitar/")) -GLOBAL_LIST_INIT(station_prefixes, list("", "Imperium", "Heretical", "Cuban", - "Psychic", "Elegant", "Common", "Uncommon", "Rare", "Unique", - "Houseruled", "Religious", "Atheist", "Traditional", "Houseruled", - "Mad", "Super", "Ultra", "Secret", "Top Secret", "Deep", "Death", - "Zybourne", "Central", "Main", "Government", "Uoi", "Fat", - "Automated", "Experimental", "Augmented")) +GLOBAL_LIST_INIT(station_prefixes, world.file2list("strings/station_prefixes.txt") + "") -GLOBAL_LIST_INIT(station_names, list("", "Stanford", "Dorf", "Alium", - "Prefix", "Clowning", "Aegis", "Ishimura", "Scaredy", "Death-World", - "Mime", "Honk", "Rogue", "MacRagge", "Ultrameens", "Safety", "Paranoia", - "Explosive", "Neckbear", "Donk", "Muppet", "North", "West", "East", - "South", "Slant-ways", "Widdershins", "Rimward", "Expensive", - "Procreatory", "Imperial", "Unidentified", "Immoral", "Carp", "Ork", - "Pete", "Control", "Nettle", "Aspie", "Class", "Crab", "Fist", - "Corrogated","Skeleton","Race", "Fatguy", "Gentleman", "Capitalist", - "Communist", "Bear", "Beard", "Derp", "Space", "Spess", "Star", "Moon", - "System", "Mining", "Neckbeard", "Research", "Supply", "Military", - "Orbital", "Battle", "Science", "Asteroid", "Home", "Production", - "Transport", "Delivery", "Extraplanetary", "Orbital", "Correctional", - "Robot", "Hats", "Pizza")) +GLOBAL_LIST_INIT(station_names, world.file2list("strings/station_names.txt" + "")) -GLOBAL_LIST_INIT(station_suffixes, list("Station", "Frontier", - "Suffix", "Death-trap", "Space-hulk", "Lab", "Hazard","Spess Junk", - "Fishery", "No-Moon", "Tomb", "Crypt", "Hut", "Monkey", "Bomb", - "Trade Post", "Fortress", "Village", "Town", "City", "Edition", "Hive", - "Complex", "Base", "Facility", "Depot", "Outpost", "Installation", - "Drydock", "Observatory", "Array", "Relay", "Monitor", "Platform", - "Construct", "Hangar", "Prison", "Center", "Port", "Waystation", - "Factory", "Waypoint", "Stopover", "Hub", "HQ", "Office", "Object", - "Fortification", "Colony", "Planet-Cracker", "Roost", "Fat Camp", - "Airstrip")) +GLOBAL_LIST_INIT(station_suffixes, world.file2list("strings/station_suffixes.txt")) -GLOBAL_LIST_INIT(greek_letters, list("Alpha", "Beta", "Gamma", "Delta", - "Epsilon", "Zeta", "Eta", "Theta", "Iota", "Kappa", "Lambda", "Mu", - "Nu", "Xi", "Omicron", "Pi", "Rho", "Sigma", "Tau", "Upsilon", "Phi", - "Chi", "Psi", "Omega")) +GLOBAL_LIST_INIT(greek_letters, world.file2list("strings/greek_letters.txt")) -GLOBAL_LIST_INIT(phonetic_alphabet, list("Alpha", "Bravo", "Charlie", - "Delta", "Echo", "Foxtrot", "Golf", "Hotel", "India", "Juliet", - "Kilo", "Lima", "Mike", "November", "Oscar", "Papa", "Quebec", - "Romeo", "Sierra", "Tango", "Uniform", "Victor", "Whiskey", "X-ray", - "Yankee", "Zulu")) +GLOBAL_LIST_INIT(phonetic_alphabet, world.file2list("strings/phonetic_alphabet.txt")) -GLOBAL_LIST_INIT(numbers_as_words, list("One", "Two", "Three", "Four", - "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Eleven", "Twelve", - "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", - "Eighteen", "Nineteen")) +GLOBAL_LIST_INIT(numbers_as_words, world.file2list("strings/numbers_as_words.txt")) /proc/generate_number_strings() var/list/L[198] diff --git a/code/_onclick/adjacent.dm b/code/_onclick/adjacent.dm index 765e659c32..11ab21d21f 100644 --- a/code/_onclick/adjacent.dm +++ b/code/_onclick/adjacent.dm @@ -25,7 +25,7 @@ * If you are diagonally adjacent, ensure you can pass through at least one of the mutually adjacent square. * Passing through in this case ignores anything with the LETPASSTHROW pass flag, such as tables, racks, and morgue trays. */ -/turf/Adjacent(atom/neighbor, atom/target = null, atom/movable/mover = null) +/turf/Adjacent(atom/neighbor, atom/target = null, atom/movable/mover = null) var/turf/T0 = get_turf(neighbor) if(T0 == src) //same turf @@ -37,7 +37,7 @@ // Non diagonal case if(T0.x == x || T0.y == y) // Check for border blockages - return T0.ClickCross(get_dir(T0,src), border_only = 1, target_atom = target, mover = mover) && src.ClickCross(get_dir(src,T0), border_only = 1, target_atom = target, mover = mover) + return T0.ClickCross(get_dir(T0,src), border_only = 1, target_atom = target, mover = mover) && src.ClickCross(get_dir(src,T0), border_only = 1, target_atom = target, mover = mover) // Diagonal case var/in_dir = get_dir(T0,src) // eg. northwest (1+8) = 9 (00001001) @@ -45,16 +45,16 @@ var/d2 = in_dir&12 // eg. west (1+8)&12 (0000 1100) = 8 (0000 1000) for(var/d in list(d1,d2)) - if(!T0.ClickCross(d, border_only = 1, target_atom = target, mover = mover)) + if(!T0.ClickCross(d, border_only = 1, target_atom = target, mover = mover)) continue // could not leave T0 in that direction var/turf/T1 = get_step(T0,d) - if(!T1 || T1.density) - continue - if(!T1.ClickCross(get_dir(T1,src), border_only = 0, target_atom = target, mover = mover) || !T1.ClickCross(get_dir(T1,T0), border_only = 0, target_atom = target, mover = mover)) + if(!T1 || T1.density) + continue + if(!T1.ClickCross(get_dir(T1,src), border_only = 0, target_atom = target, mover = mover) || !T1.ClickCross(get_dir(T1,T0), border_only = 0, target_atom = target, mover = mover)) continue // couldn't enter or couldn't leave T1 - if(!src.ClickCross(get_dir(src,T1), border_only = 1, target_atom = target, mover = mover)) + if(!src.ClickCross(get_dir(src,T1), border_only = 1, target_atom = target, mover = mover)) continue // could not enter src return 1 // we don't care about our own density @@ -70,7 +70,7 @@ return TRUE if(!isturf(loc)) return FALSE - if(loc.Adjacent(neighbor,target = neighbor, mover = src)) + if(loc.Adjacent(neighbor,target = neighbor, mover = src)) return TRUE return FALSE @@ -85,20 +85,19 @@ /* This checks if you there is uninterrupted airspace between that turf and this one. - This is defined as any dense ON_BORDER_1 object, or any dense object without LETPASSTHROW. + This is defined as any dense ON_BORDER_1 object, or any dense object without LETPASSTHROW. The border_only flag allows you to not objects (for source and destination squares) */ -/turf/proc/ClickCross(target_dir, border_only, target_atom = null, atom/movable/mover = null) +/turf/proc/ClickCross(target_dir, border_only, target_atom = null, atom/movable/mover = null) for(var/obj/O in src) - if((mover && O.CanPass(mover,get_step(src,target_dir))) || (!mover && !O.density)) - continue - if(O == target_atom || (O.pass_flags & LETPASSTHROW)) //check if there's a dense object present on the turf + if((mover && O.CanPass(mover,get_step(src,target_dir))) || (!mover && !O.density)) + continue + if(O == target_atom || O == mover || (O.pass_flags & LETPASSTHROW)) //check if there's a dense object present on the turf continue // LETPASSTHROW is used for anything you can click through (or the firedoor special case, see above) - if( O.flags_1&ON_BORDER_1) // windows are on border, check them first + if( O.flags_1&ON_BORDER_1) // windows are on border, check them first if( O.dir & target_dir || O.dir & (O.dir-1) ) // full tile windows are just diagonals mechanically return 0 //O.dir&(O.dir-1) is false for any cardinal direction, but true for diagonal ones - else if( !border_only ) // dense, not on border, cannot pass over return 0 return 1 diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm index 69deb2cb58..638b4a31cf 100644 --- a/code/_onclick/hud/alert.dm +++ b/code/_onclick/hud/alert.dm @@ -633,6 +633,7 @@ so as to remain in compliance with the most up-to-date laws." /obj/screen/alert/restrained/buckled name = "Buckled" desc = "You've been buckled to something. Click the alert to unbuckle unless you're handcuffed." + icon_state = "buckled" /obj/screen/alert/restrained/handcuffed name = "Handcuffed" @@ -698,4 +699,3 @@ so as to remain in compliance with the most up-to-date laws." severity = 0 master = null screen_loc = "" - diff --git a/code/_onclick/hud/fullscreen.dm b/code/_onclick/hud/fullscreen.dm index 6c18ad0e07..12253cc550 100644 --- a/code/_onclick/hud/fullscreen.dm +++ b/code/_onclick/hud/fullscreen.dm @@ -67,7 +67,7 @@ screen_loc = "CENTER-7,CENTER-7" layer = FULLSCREEN_LAYER plane = FULLSCREEN_PLANE - mouse_opacity = MOUSE_OPACITY_TRANSPARENT + mouse_opacity = MOUSE_OPACITY_TRANSPARENT var/severity = 0 var/show_when_dead = FALSE @@ -95,16 +95,20 @@ layer = CRIT_LAYER plane = FULLSCREEN_PLANE +/obj/screen/fullscreen/crit/vision + icon_state = "oxydamageoverlay" + layer = BLIND_LAYER + /obj/screen/fullscreen/blind icon_state = "blackimageoverlay" layer = BLIND_LAYER plane = FULLSCREEN_PLANE -/obj/screen/fullscreen/curse - icon_state = "curse" - layer = CURSE_LAYER - plane = FULLSCREEN_PLANE - +/obj/screen/fullscreen/curse + icon_state = "curse" + layer = CURSE_LAYER + plane = FULLSCREEN_PLANE + /obj/screen/fullscreen/impaired icon_state = "impairedoverlay" @@ -168,4 +172,4 @@ plane = LIGHTING_PLANE layer = LIGHTING_LAYER blend_mode = BLEND_ADD - show_when_dead = TRUE + show_when_dead = TRUE diff --git a/code/citadel/cit_reagents.dm b/code/citadel/cit_reagents.dm index 4a0e91479b..30b4da7ccf 100644 --- a/code/citadel/cit_reagents.dm +++ b/code/citadel/cit_reagents.dm @@ -46,7 +46,7 @@ name = "Female Ejaculate" id = "femcum" description = "Vaginal lubricant found in most mammals and other animals of similar nature. Where you found this is your own business." - taste_description = "female arousal" + taste_description = "something with a tang" // wew coders who haven't eaten out a girl. taste_mult = 2 data = list("donor"=null,"viruses"=null,"donor_DNA"=null,"blood_type"=null,"resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null) reagent_state = LIQUID @@ -90,7 +90,7 @@ //aphrodisiac & anaphrodisiac -/datum/reagent/aphrodisiac +/datum/reagent/drug/aphrodisiac name = "Crocin" id = "aphro" description = "Naturally found in the crocus and gardenia flowers, this drug acts as a natural and safe aphrodisiac." @@ -98,7 +98,7 @@ taste_mult = 2 //Hide the roofies in stronger flavors color = "#FFADFF"//PINK, rgb(255, 173, 255) -/datum/reagent/aphrodisiac/on_mob_life(mob/living/M) +/datum/reagent/drug/aphrodisiac/on_mob_life(mob/living/M) if(prob(33)) M.adjustArousalLoss(2) if(prob(5)) @@ -108,7 +108,7 @@ to_chat(M, "[aroused_message]") ..() -/datum/reagent/aphrodisiacplus +/datum/reagent/drug/aphrodisiacplus name = "Hexacrocin" id = "aphro+" description = "Chemically condensed form of basic crocin. This aphrodisiac is extremely powerful and addictive in most animals.\ @@ -119,7 +119,7 @@ addiction_threshold = 20 overdose_threshold = 20 -/datum/reagent/aphrodisiacplus/on_mob_life(mob/living/M) +/datum/reagent/drug/aphrodisiacplus/on_mob_life(mob/living/M) if(prob(33)) M.adjustArousalLoss(6)//not quite six times as powerful, but still considerably more powerful. if(prob(5)) @@ -135,21 +135,21 @@ aroused_message = pick("You feel a bit hot.", "You feel strong sexual urges.", "You feel in the mood.", "You're ready to go down on someone.") to_chat(M, "[aroused_message]") -/datum/reagent/aphrodisiacplus/addiction_act_stage2(mob/living/M) +/datum/reagent/drug/aphrodisiacplus/addiction_act_stage2(mob/living/M) if(prob(30)) M.adjustBrainLoss(2) ..() -/datum/reagent/aphrodisiacplus/addiction_act_stage3(mob/living/M) +/datum/reagent/drug/aphrodisiacplus/addiction_act_stage3(mob/living/M) if(prob(30)) M.adjustBrainLoss(3) ..() -/datum/reagent/aphrodisiacplus/addiction_act_stage4(mob/living/M) +/datum/reagent/drug/aphrodisiacplus/addiction_act_stage4(mob/living/M) if(prob(30)) M.adjustBrainLoss(4) ..() -/datum/reagent/aphrodisiacplus/overdose_process(mob/living/M) +/datum/reagent/drug/aphrodisiacplus/overdose_process(mob/living/M) if(prob(33)) if(M.getArousalLoss() >= 100 && ishuman(M) && M.has_dna()) var/mob/living/carbon/human/H = M @@ -163,7 +163,7 @@ M.adjustArousalLoss(2) ..() -/datum/reagent/anaphrodisiac +/datum/reagent/drug/anaphrodisiac name = "Camphor" id = "anaphro" description = "Naturally found in some species of evergreen trees, camphor is a waxy substance. When injested by most animals, it acts as an anaphrodisiac\ @@ -173,12 +173,12 @@ color = "#D9D9D9"//rgb(217, 217, 217) reagent_state = SOLID -/datum/reagent/anaphrodisiac/on_mob_life(mob/living/M) +/datum/reagent/drug/anaphrodisiac/on_mob_life(mob/living/M) if(prob(33)) M.adjustArousalLoss(-2) ..() -/datum/reagent/anaphrodisiacplus +/datum/reagent/drug/anaphrodisiacplus name = "Hexacamphor" id = "anaphro+" description = "Chemically condensed camphor. Causes an extreme reduction in libido and a permanent one if overdosed. Non-addictive." @@ -187,12 +187,12 @@ reagent_state = SOLID overdose_threshold = 20 -/datum/reagent/anaphrodisiacplus/on_mob_life(mob/living/M) +/datum/reagent/drug/anaphrodisiacplus/on_mob_life(mob/living/M) if(prob(33)) M.adjustArousalLoss(-4) ..() -/datum/reagent/anaphrodisiacplus/overdose_process(mob/living/M) +/datum/reagent/drug/anaphrodisiacplus/overdose_process(mob/living/M) if(prob(33)) if(M.min_arousal > 0) M.min_arousal -= 1 diff --git a/code/citadel/custom_loadout/custom_items.dm b/code/citadel/custom_loadout/custom_items.dm new file mode 100644 index 0000000000..6495d38a0f --- /dev/null +++ b/code/citadel/custom_loadout/custom_items.dm @@ -0,0 +1,33 @@ + +//For custom items. + +/obj/item/custom/ceb_soap + name = "Cebutris' Soap" + desc = "A generic bar of soap that doesn't really seem to work right." + gender = PLURAL + icon = 'icons/obj/custom.dmi' + icon_state = "cebu" + w_class = WEIGHT_CLASS_TINY + flags_1 = NOBLUDGEON_1 + +/obj/item/clothing/neck/cloak/inferno + name = "Kiara's Cloak" + desc = "The design on this seems a little too familiar." + icon = 'icons/obj/clothing/cloaks.dmi' + icon_state = "infcloak" + item_state = "infcloak" + w_class = WEIGHT_CLASS_SMALL + body_parts_covered = CHEST|GROIN|LEGS|ARMS + +/obj/item/lighter/gold + name = "\improper Engraved Zippo" + desc = "A shiny and relatively expensive zippo lighter. There's a small etched in verse on the bottom that reads, 'No Gods, No Masters, Only Man.'" + icon = 'icons/obj/cigarettes.dmi' + icon_state = "gold_zippo" + item_state = "gold_zippo" + w_class = WEIGHT_CLASS_TINY + flags_1 = CONDUCT_1 + slot_flags = SLOT_BELT + heat = 1500 + resistance_flags = FIRE_PROOF + light_color = LIGHT_COLOR_FIRE \ No newline at end of file diff --git a/code/citadel/custom_loadout/load_to_mob.dm b/code/citadel/custom_loadout/load_to_mob.dm new file mode 100644 index 0000000000..64eec2ba06 --- /dev/null +++ b/code/citadel/custom_loadout/load_to_mob.dm @@ -0,0 +1,61 @@ + +//Proc that does the actual loading of items to mob +/*Itemlists are formatted as +"[typepath]" = number_of_it_to_spawn +*/ + +#define DROP_TO_FLOOR 0 +#define LOADING_TO_HUMAN 1 + +/proc/handle_roundstart_items(mob/living/M, ckey_override, job_override, special_override) + if(!istype(M) || (!M.ckey && !ckey_override) || (!M.mind && (!job_override || !special_override))) + return FALSE + return load_itemlist_to_mob(M, parse_custom_roundstart_items(ckey_override? ckey_override : M.ckey, M.name, job_override? job_override : M.mind.assigned_role, special_override? special_override : M.mind.special_role), TRUE, TRUE, FALSE) + +//Just incase there's extra mob selections in the future..... +/proc/load_itemlist_to_mob(mob/living/L, list/itemlist, drop_on_floor_if_full = TRUE, load_to_all_slots = TRUE, replace_slots = FALSE) + if(!istype(L) || !islist(itemlist)) + return FALSE + var/loading_mode = DROP_TO_FLOOR + var/turf/current_turf = get_turf(L) + if(ishuman(L)) + loading_mode = LOADING_TO_HUMAN + switch(loading_mode) + if(DROP_TO_FLOOR) + for(var/I in itemlist) + var/typepath = text2path(I) + if(!typepath) + continue + for(var/i = 0, i < itemlist[I], i++) + new typepath(current_turf) + return TRUE + if(LOADING_TO_HUMAN) + return load_itemlist_to_human(L, itemlist, drop_on_floor_if_full, load_to_all_slots, replace_slots) + +/proc/load_itemlist_to_human(mob/living/carbon/human/H, list/itemlist, drop_on_floor_if_full = TRUE, load_to_all_slots = TRUE, replace_slots = FALSE) + if(!istype(H) || !islist(itemlist)) + return FALSE + var/turf/T = get_turf(H) + for(var/item in itemlist) + var/path = item + if(!ispath(path)) + path = text2path(path) + if(!path) + continue + var/amount = itemlist[item] + for(var/i in 1 to amount) + var/atom/movable/loaded_atom = new path + if(!istype(loaded_atom)) + QDEL_NULL(loaded_atom) + continue + if(!istype(loaded_atom, /obj/item)) + loaded_atom.forceMove(T) + continue + var/obj/item/loaded = loaded_atom + var/obj/item/storage/S = H.get_item_by_slot(slot_back) + if(istype(S)) + S.handle_item_insertion(loaded, TRUE, H) //Force it into their backpack + continue + if(!H.put_in_hands(loaded)) //They don't have one/somehow that failed, put it in their hands + loaded.forceMove(T) //Guess we're just dumping it on the floor! + return TRUE diff --git a/code/citadel/custom_loadout/read_from_file.dm b/code/citadel/custom_loadout/read_from_file.dm new file mode 100644 index 0000000000..0ed38e8d41 --- /dev/null +++ b/code/citadel/custom_loadout/read_from_file.dm @@ -0,0 +1,71 @@ + +GLOBAL_LIST(custom_item_list) +//Layered list in form of custom_item_list[ckey][job][items][amounts] +//ckey is key, job is specific jobs, or "ALL" for all jobs, items for items, amounts for amount of item. + +//File should be in the format of ckey|exact job name/exact job name/or put ALL instead of any job names|/path/to/item=amount;/path/to/item=amount +//Each ckey should be in a different line +//if there's multiple entries of a single ckey the later ones will add to the earlier definitions. + +/proc/reload_custom_roundstart_items_list(custom_filelist) + if(!custom_filelist) + custom_filelist = "config/custom_roundstart_items.txt" + GLOB.custom_item_list = list() + var/list/file_lines = world.file2list(custom_filelist) + for(var/line in file_lines) + if(length(line) == 0) //Emptyline, no one cares. + continue + if(copytext(line,1,3) == "//") //Commented line, ignore. + continue + var/ckey_str_sep = findtext(line, "|") //Process our stuff.. + var/char_str_sep = findtext(line, "|", ckey_str_sep+1) + var/job_str_sep = findtext(line, "|", char_str_sep+1) + var/item_str_sep = findtext(line, "|", job_str_sep+1) + var/ckey_str = ckey(copytext(line, 1, ckey_str_sep)) + var/char_str = copytext(line, ckey_str_sep+1, char_str_sep) + var/job_str = copytext(line, char_str_sep+1, job_str_sep) + var/item_str = copytext(line, job_str_sep+1, item_str_sep) + if(!ckey_str || !char_str || !job_str || !item_str || !length(ckey_str) || !length(char_str) || !length(job_str) || !length(item_str)) + log_admin("Errored custom_items_whitelist line: [line] - Component/separator missing!") + if(!islist(GLOB.custom_item_list[ckey_str])) + GLOB.custom_item_list[ckey_str] = list() //Initialize list for this ckey if it isn't initialized.. + var/list/characters = splittext(char_str, "/") + for(var/character in characters) + if(!islist(GLOB.custom_item_list[ckey_str][character])) + GLOB.custom_item_list[ckey_str][character] = list() + var/list/jobs = splittext(job_str, "/") + for(var/job in jobs) + for(var/character in characters) + if(!islist(GLOB.custom_item_list[ckey_str][character][job])) + GLOB.custom_item_list[ckey_str][character][job] = list() //Initialize item list for this job of this ckey if not already initialized. + var/list/item_strings = splittext(item_str, ";") //Get item strings in format of /path/to/item=amount + for(var/item_string in item_strings) + var/path_str_sep = findtext(item_string, "=") + var/path = copytext(item_string, 1, path_str_sep) //Path to spawn + var/amount = copytext(item_string, path_str_sep+1) //Amount to spawn + //world << "DEBUG: Item string [item_string] processed" + amount = text2num(amount) + path = text2path(path) + if(!ispath(path) || !isnum(amount)) + log_admin("Errored custom_items_whitelist line: [line] - Path/number for item missing or invalid.") + for(var/character in characters) + for(var/job in jobs) + if(!GLOB.custom_item_list[ckey_str][character][job][path]) //Doesn't exist, make it exist! + GLOB.custom_item_list[ckey_str][character][job][path] = amount + else + GLOB.custom_item_list[ckey_str][character][job][path] += amount //Exists, we want more~ + return GLOB.custom_item_list + +/proc/parse_custom_roundstart_items(ckey, char_name = "ALL", job_name = "ALL", special_role) + var/list/ret = list() + if(GLOB.custom_item_list[ckey]) + for(var/char in GLOB.custom_item_list[ckey]) + if((char_name == char) || (char_name == "ALL") || (char == "ALL")) + for(var/job in GLOB.custom_item_list[ckey][char]) + if((job_name == job) || (job == "ALL") || (job_name == "ALL") || (special_role && (job == special_role))) + for(var/item_path in GLOB.custom_item_list[ckey][char][job]) + if(ret[item_path]) + ret[item_path] += GLOB.custom_item_list[ckey][char][job][item_path] + else + ret[item_path] = GLOB.custom_item_list[ckey][char][job][item_path] + return ret diff --git a/code/citadel/dogborgstuff.dm b/code/citadel/dogborgstuff.dm index 4f3eae0fb7..20f6cfd8c3 100644 --- a/code/citadel/dogborgstuff.dm +++ b/code/citadel/dogborgstuff.dm @@ -23,7 +23,6 @@ attack_verb = list("nibbled", "bit", "gnawed", "chomped", "nommed") w_class = 3 sharpness = IS_SHARP - var/emagged = 0 /obj/item/dogborg/jaws/attack(atom/A, mob/living/silicon/robot/user) ..() @@ -173,7 +172,6 @@ icon_state = "synthtongue" hitsound = 'sound/effects/attackblob.ogg' cleanspeed = 80 - var/emagged = 0 /obj/item/soap/tongue/New() ..() diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index c4d8335890..bba82e6c8a 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -5,6 +5,10 @@ #define SECURITY_HAS_MAINT_ACCESS 2 #define EVERYONE_HAS_MAINT_ACCESS 4 +GLOBAL_VAR_INIT(config_dir, "config/") +GLOBAL_PROTECT(config_dir) + + /datum/configuration/can_vv_get(var_name) var/static/list/banned_gets = list("autoadmin", "autoadmin_rank") if (var_name in banned_gets) @@ -12,7 +16,7 @@ return ..() /datum/configuration/vv_edit_var(var_name, var_value) - var/static/list/banned_edits = list("cross_address", "cross_allowed", "autoadmin", "autoadmin_rank") + var/static/list/banned_edits = list("cross_address", "cross_allowed", "autoadmin", "autoadmin_rank", "invoke_youtubedl") if(var_name in banned_edits) return FALSE return ..() @@ -90,6 +94,8 @@ var/panic_server_name var/panic_address //Reconnect a player this linked server if this server isn't accepting new players + var/invoke_youtubedl + //IP Intel vars var/ipintel_email var/ipintel_rating_bad = 1 @@ -103,6 +109,13 @@ var/use_account_age_for_jobs = 0 //Uses the time they made the account for the job restriction stuff. New player joining alerts should be unaffected. var/see_own_notes = 0 //Can players see their own admin notes (read-only)? Config option in config.txt + var/use_exp_tracking = FALSE + var/use_exp_restrictions_heads = FALSE + var/use_exp_restrictions_heads_hours = 0 + var/use_exp_restrictions_heads_department = FALSE + var/use_exp_restrictions_other = FALSE + var/use_exp_restrictions_admin_bypass = FALSE + //Population cap vars var/soft_popcap = 0 var/hard_popcap = 0 @@ -168,6 +181,7 @@ var/rename_cyborg = 0 var/ooc_during_round = 0 var/emojis = 0 + var/no_credits_round_end = FALSE //Used for modifying movement speed for mobs. //Unversal modifiers @@ -287,18 +301,20 @@ Reload() /datum/configuration/proc/Reload() - load("config/config.txt") - load("config/comms.txt", "comms") - load("config/game_options.txt","game_options") - load("config/policies.txt", "policies") - loadsql("config/dbconfig.txt") + load("config.txt") + load("comms.txt", "comms") + load("game_options.txt","game_options") + load("policies.txt", "policies") + loadsql("dbconfig.txt") + reload_custom_roundstart_items_list() if (maprotation) - loadmaplist("config/maps.txt") + loadmaplist("maps.txt") // apply some settings from config.. GLOB.abandon_allowed = respawn /datum/configuration/proc/load(filename, type = "config") //the type can also be game_options, in which case it uses a different switch. not making it separate to not copypaste code - Urist + filename = "[GLOB.config_dir][filename]" var/list/Lines = world.file2list(filename) for(var/t in Lines) @@ -336,6 +352,18 @@ use_age_restriction_for_jobs = 1 if("use_account_age_for_jobs") use_account_age_for_jobs = 1 + if("use_exp_tracking") + use_exp_tracking = TRUE + if("use_exp_restrictions_heads") + use_exp_restrictions_heads = TRUE + if("use_exp_restrictions_heads_hours") + use_exp_restrictions_heads_hours = text2num(value) + if("use_exp_restrictions_heads_department") + use_exp_restrictions_heads_department = TRUE + if("use_exp_restrictions_other") + use_exp_restrictions_other = TRUE + if("use_exp_restrictions_admin_bypass") + use_exp_restrictions_admin_bypass = TRUE if("lobby_countdown") lobby_countdown = text2num(value) if("round_end_countdown") @@ -450,6 +478,8 @@ if("panic_server_address") if(value != "byond://address:port") panic_address = value + if("invoke_youtubedl") + invoke_youtubedl = value if("show_irc_name") showircname = 1 if("see_own_notes") @@ -556,6 +586,8 @@ ooc_during_round = 1 if("emojis") emojis = 1 + if("no_credits_round_end") + no_credits_round_end = TRUE if("run_delay") run_speed = text2num(value) if("walk_delay") @@ -799,6 +831,7 @@ WRITE_FILE(GLOB.config_error_log, "Unknown setting in configuration: '[name]'") /datum/configuration/proc/loadmaplist(filename) + filename = "[GLOB.config_dir][filename]" var/list/Lines = world.file2list(filename) var/datum/map_config/currentmap = null @@ -851,6 +884,7 @@ /datum/configuration/proc/loadsql(filename) + filename = "[GLOB.config_dir][filename]" var/list/Lines = world.file2list(filename) for(var/t in Lines) if(!t) diff --git a/code/controllers/configuration.dm.rej b/code/controllers/configuration.dm.rej new file mode 100644 index 0000000000..5d5c2c5055 --- /dev/null +++ b/code/controllers/configuration.dm.rej @@ -0,0 +1,24 @@ +diff a/code/controllers/configuration.dm b/code/controllers/configuration.dm (rejected hunks) +@@ -337,17 +337,17 @@ + if("use_account_age_for_jobs") + use_account_age_for_jobs = 1 + if("use_exp_tracking") +- use_exp_tracking = 1 ++ use_exp_tracking = TRUE + if("use_exp_restrictions_heads") +- use_exp_restrictions_heads = 1 ++ use_exp_restrictions_heads = TRUE + if("use_exp_restrictions_heads_hours") + use_exp_restrictions_heads_hours = text2num(value) + if("use_exp_restrictions_heads_department") +- use_exp_restrictions_heads_department = 1 ++ use_exp_restrictions_heads_department = TRUE + if("use_exp_restrictions_other") +- use_exp_restrictions_other = 1 ++ use_exp_restrictions_other = TRUE + if("use_exp_restrictions_admin_bypass") +- use_exp_restrictions_admin_bypass = 1 ++ use_exp_restrictions_admin_bypass = TRUE + if("lobby_countdown") + lobby_countdown = text2num(value) + if("round_end_countdown") diff --git a/code/controllers/subsystem/blackbox.dm b/code/controllers/subsystem/blackbox.dm index 74536c7f0f..301ceeac21 100644 --- a/code/controllers/subsystem/blackbox.dm +++ b/code/controllers/subsystem/blackbox.dm @@ -1,269 +1,281 @@ -SUBSYSTEM_DEF(blackbox) - name = "Blackbox" - wait = 6000 - flags = SS_NO_TICK_CHECK | SS_NO_INIT - runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME - init_order = INIT_ORDER_BLACKBOX - - var/list/msg_common = list() - var/list/msg_science = list() - var/list/msg_command = list() - var/list/msg_medical = list() - var/list/msg_engineering = list() - var/list/msg_security = list() - var/list/msg_deathsquad = list() - var/list/msg_syndicate = list() - var/list/msg_service = list() - var/list/msg_cargo = list() - var/list/msg_other = list() - - var/list/feedback = list() //list of datum/feedback_variable - - var/sealed = FALSE //time to stop tracking stats? - -//poll population -/datum/controller/subsystem/blackbox/fire() - if(!SSdbcore.Connect()) - return - var/playercount = 0 - for(var/mob/M in GLOB.player_list) - if(M.client) - playercount += 1 - var/admincount = GLOB.admins.len - var/datum/DBQuery/query_record_playercount = SSdbcore.NewQuery("INSERT INTO [format_table_name("legacy_population")] (playercount, admincount, time, server_ip, server_port) VALUES ([playercount], [admincount], '[SQLtime()]', INET_ATON(IF('[world.internet_address]' LIKE '', '0', '[world.internet_address]')), '[world.port]')") - query_record_playercount.Execute() - -/datum/controller/subsystem/blackbox/Recover() - msg_common = SSblackbox.msg_common - msg_science = SSblackbox.msg_science - msg_command = SSblackbox.msg_command - msg_medical = SSblackbox.msg_medical - msg_engineering = SSblackbox.msg_engineering - msg_security = SSblackbox.msg_security - msg_deathsquad = SSblackbox.msg_deathsquad - msg_syndicate = SSblackbox.msg_syndicate - msg_service = SSblackbox.msg_service - msg_cargo = SSblackbox.msg_cargo - msg_other = SSblackbox.msg_other - - feedback = SSblackbox.feedback - - sealed = SSblackbox.sealed - -//no touchie -/datum/controller/subsystem/blackbox/can_vv_get(var_name) - if(var_name == "feedback") - return FALSE - return ..() - -/datum/controller/subsystem/blackbox/vv_edit_var(var_name, var_value) - return FALSE - -/datum/controller/subsystem/blackbox/Shutdown() - sealed = FALSE - set_val("ahelp_unresolved", GLOB.ahelp_tickets.active_tickets.len) - - var/pda_msg_amt = 0 - var/rc_msg_amt = 0 - - for (var/obj/machinery/message_server/MS in GLOB.message_servers) - if (MS.pda_msgs.len > pda_msg_amt) - pda_msg_amt = MS.pda_msgs.len - if (MS.rc_msgs.len > rc_msg_amt) - rc_msg_amt = MS.rc_msgs.len - - set_details("radio_usage","") - - add_details("radio_usage","COM-[msg_common.len]") - add_details("radio_usage","SCI-[msg_science.len]") - add_details("radio_usage","HEA-[msg_command.len]") - add_details("radio_usage","MED-[msg_medical.len]") - add_details("radio_usage","ENG-[msg_engineering.len]") - add_details("radio_usage","SEC-[msg_security.len]") - add_details("radio_usage","DTH-[msg_deathsquad.len]") - add_details("radio_usage","SYN-[msg_syndicate.len]") - add_details("radio_usage","SRV-[msg_service.len]") - add_details("radio_usage","CAR-[msg_cargo.len]") - add_details("radio_usage","OTH-[msg_other.len]") - add_details("radio_usage","PDA-[pda_msg_amt]") - add_details("radio_usage","RC-[rc_msg_amt]") - - if (!SSdbcore.Connect()) - return - - var/list/sqlrowlist = list() - - for (var/datum/feedback_variable/FV in feedback) - sqlrowlist += list(list("time" = "Now()", "round_id" = GLOB.round_id, "var_name" = "'[sanitizeSQL(FV.get_variable())]'", "var_value" = FV.get_value(), "details" = "'[sanitizeSQL(FV.get_details())]'")) - - if (!length(sqlrowlist)) - return - - SSdbcore.MassInsert(format_table_name("feedback"), sqlrowlist, ignore_errors = TRUE, delayed = TRUE) - - -/datum/controller/subsystem/blackbox/proc/LogBroadcast(blackbox_msg, freq) - if(sealed) - return - switch(freq) - if(1459) - msg_common += blackbox_msg - if(1351) - msg_science += blackbox_msg - if(1353) - msg_command += blackbox_msg - if(1355) - msg_medical += blackbox_msg - if(1357) - msg_engineering += blackbox_msg - if(1359) - msg_security += blackbox_msg - if(1441) - msg_deathsquad += blackbox_msg - if(1213) - msg_syndicate += blackbox_msg - if(1349) - msg_service += blackbox_msg - if(1347) - msg_cargo += blackbox_msg - else - msg_other += blackbox_msg - -/datum/controller/subsystem/blackbox/proc/find_feedback_datum(variable) - for(var/datum/feedback_variable/FV in feedback) - if(FV.get_variable() == variable) - return FV - - var/datum/feedback_variable/FV = new(variable) - feedback += FV - return FV - -/datum/controller/subsystem/blackbox/proc/set_val(variable, value) - if(sealed) - return - var/datum/feedback_variable/FV = find_feedback_datum(variable) - FV.set_value(value) - -/datum/controller/subsystem/blackbox/proc/inc(variable, value) - if(sealed) - return - var/datum/feedback_variable/FV = find_feedback_datum(variable) - FV.inc(value) - -/datum/controller/subsystem/blackbox/proc/dec(variable,value) - if(sealed) - return - var/datum/feedback_variable/FV = find_feedback_datum(variable) - FV.dec(value) - -/datum/controller/subsystem/blackbox/proc/set_details(variable,details) - if(sealed) - return - var/datum/feedback_variable/FV = find_feedback_datum(variable) - FV.set_details(details) - -/datum/controller/subsystem/blackbox/proc/add_details(variable,details) - if(sealed) - return - var/datum/feedback_variable/FV = find_feedback_datum(variable) - FV.add_details(details) - -/datum/controller/subsystem/blackbox/proc/ReportDeath(mob/living/L) - if(sealed) - return - if(!SSdbcore.Connect()) - return - if(!L || !L.key || !L.mind) - return - var/turf/T = get_turf(L) - var/area/placeofdeath = get_area(T.loc) - var/sqlname = sanitizeSQL(L.real_name) - var/sqlkey = sanitizeSQL(L.ckey) - var/sqljob = sanitizeSQL(L.mind.assigned_role) - var/sqlspecial = sanitizeSQL(L.mind.special_role) - var/sqlpod = sanitizeSQL(placeofdeath.name) - var/laname - var/lakey - if(L.lastattacker && ismob(L.lastattacker)) - var/mob/LA = L.lastattacker - laname = sanitizeSQL(LA.real_name) - lakey = sanitizeSQL(LA.key) - var/sqlbrute = sanitizeSQL(L.getBruteLoss()) - var/sqlfire = sanitizeSQL(L.getFireLoss()) - var/sqlbrain = sanitizeSQL(L.getBrainLoss()) - var/sqloxy = sanitizeSQL(L.getOxyLoss()) - var/sqltox = sanitizeSQL(L.getToxLoss()) - var/sqlclone = sanitizeSQL(L.getCloneLoss()) - var/sqlstamina = sanitizeSQL(L.getStaminaLoss()) - var/x_coord = sanitizeSQL(L.x) - var/y_coord = sanitizeSQL(L.y) - var/z_coord = sanitizeSQL(L.z) - var/map = sanitizeSQL(SSmapping.config.map_name) - var/datum/DBQuery/query_report_death = SSdbcore.NewQuery("INSERT INTO [format_table_name("death")] (pod, x_coord, y_coord, z_coord, mapname, server_ip, server_port, round_id, tod, job, special, name, byondkey, laname, lakey, bruteloss, fireloss, brainloss, oxyloss, toxloss, cloneloss, staminaloss) VALUES ('[sqlpod]', '[x_coord]', '[y_coord]', '[z_coord]', '[map]', INET_ATON(IF('[world.internet_address]' LIKE '', '0', '[world.internet_address]')), '[world.port]', [GLOB.round_id], '[SQLtime()]', '[sqljob]', '[sqlspecial]', '[sqlname]', '[sqlkey]', '[laname]', '[lakey]', [sqlbrute], [sqlfire], [sqlbrain], [sqloxy], [sqltox], [sqlclone], [sqlstamina])") - query_report_death.Execute() - -/datum/controller/subsystem/blackbox/proc/Seal() - if(sealed) - return - if(IsAdminAdvancedProcCall()) - var/msg = "[key_name_admin(usr)] sealed the blackbox!" - message_admins(msg) - log_game("Blackbox sealed[IsAdminAdvancedProcCall() ? " by [key_name(usr)]" : ""].") - sealed = TRUE - -//feedback variable datum, for storing all kinds of data -/datum/feedback_variable - var/variable - var/value - var/details - -/datum/feedback_variable/New(param_variable, param_value = 0) - variable = param_variable - value = param_value - -/datum/feedback_variable/proc/inc(num = 1) - if (isnum(value)) - value += num - else - value = text2num(value) - if (isnum(value)) - value += num - else - value = num - -/datum/feedback_variable/proc/dec(num = 1) - if (isnum(value)) - value -= num - else - value = text2num(value) - if (isnum(value)) - value -= num - else - value = -num - -/datum/feedback_variable/proc/set_value(num) - if (isnum(num)) - value = num - -/datum/feedback_variable/proc/get_value() - if (!isnum(value)) - return 0 - return value - -/datum/feedback_variable/proc/get_variable() - return variable - +SUBSYSTEM_DEF(blackbox) + name = "Blackbox" + wait = 6000 + flags = SS_NO_TICK_CHECK + runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME + init_order = INIT_ORDER_BLACKBOX + + var/list/msg_common = list() + var/list/msg_science = list() + var/list/msg_command = list() + var/list/msg_medical = list() + var/list/msg_engineering = list() + var/list/msg_security = list() + var/list/msg_deathsquad = list() + var/list/msg_syndicate = list() + var/list/msg_service = list() + var/list/msg_cargo = list() + var/list/msg_other = list() + + var/list/feedback = list() //list of datum/feedback_variable + var/triggertime = 0 + var/sealed = FALSE //time to stop tracking stats? + + +/datum/controller/subsystem/blackbox/Initialize() + triggertime = world.time + . = ..() + +//poll population +/datum/controller/subsystem/blackbox/fire() + if(!SSdbcore.Connect()) + return + var/playercount = 0 + for(var/mob/M in GLOB.player_list) + if(M.client) + playercount += 1 + var/admincount = GLOB.admins.len + var/datum/DBQuery/query_record_playercount = SSdbcore.NewQuery("INSERT INTO [format_table_name("legacy_population")] (playercount, admincount, time, server_ip, server_port, round_id) VALUES ([playercount], [admincount], '[SQLtime()]', INET_ATON(IF('[world.internet_address]' LIKE '', '0', '[world.internet_address]')), '[world.port]', '[GLOB.round_id]')") + query_record_playercount.Execute() + + if(config.use_exp_tracking) + if((triggertime < 0) || (world.time > (triggertime +3000))) //subsystem fires once at roundstart then once every 10 minutes. a 5 min check skips the first fire. The <0 is midnight rollover check + update_exp(10,FALSE) + + +/datum/controller/subsystem/blackbox/Recover() + msg_common = SSblackbox.msg_common + msg_science = SSblackbox.msg_science + msg_command = SSblackbox.msg_command + msg_medical = SSblackbox.msg_medical + msg_engineering = SSblackbox.msg_engineering + msg_security = SSblackbox.msg_security + msg_deathsquad = SSblackbox.msg_deathsquad + msg_syndicate = SSblackbox.msg_syndicate + msg_service = SSblackbox.msg_service + msg_cargo = SSblackbox.msg_cargo + msg_other = SSblackbox.msg_other + + feedback = SSblackbox.feedback + + sealed = SSblackbox.sealed + +//no touchie +/datum/controller/subsystem/blackbox/can_vv_get(var_name) + if(var_name == "feedback") + return FALSE + return ..() + +/datum/controller/subsystem/blackbox/vv_edit_var(var_name, var_value) + return FALSE + +/datum/controller/subsystem/blackbox/Shutdown() + sealed = FALSE + set_val("ahelp_unresolved", GLOB.ahelp_tickets.active_tickets.len) + + var/pda_msg_amt = 0 + var/rc_msg_amt = 0 + + for (var/obj/machinery/message_server/MS in GLOB.message_servers) + if (MS.pda_msgs.len > pda_msg_amt) + pda_msg_amt = MS.pda_msgs.len + if (MS.rc_msgs.len > rc_msg_amt) + rc_msg_amt = MS.rc_msgs.len + + set_details("radio_usage","") + + add_details("radio_usage","COM-[msg_common.len]") + add_details("radio_usage","SCI-[msg_science.len]") + add_details("radio_usage","HEA-[msg_command.len]") + add_details("radio_usage","MED-[msg_medical.len]") + add_details("radio_usage","ENG-[msg_engineering.len]") + add_details("radio_usage","SEC-[msg_security.len]") + add_details("radio_usage","DTH-[msg_deathsquad.len]") + add_details("radio_usage","SYN-[msg_syndicate.len]") + add_details("radio_usage","SRV-[msg_service.len]") + add_details("radio_usage","CAR-[msg_cargo.len]") + add_details("radio_usage","OTH-[msg_other.len]") + add_details("radio_usage","PDA-[pda_msg_amt]") + add_details("radio_usage","RC-[rc_msg_amt]") + + if (!SSdbcore.Connect()) + return + + var/list/sqlrowlist = list() + + for (var/datum/feedback_variable/FV in feedback) + sqlrowlist += list(list("time" = "Now()", "round_id" = GLOB.round_id, "var_name" = "'[sanitizeSQL(FV.get_variable())]'", "var_value" = FV.get_value(), "details" = "'[sanitizeSQL(FV.get_details())]'")) + + if (!length(sqlrowlist)) + return + + SSdbcore.MassInsert(format_table_name("feedback"), sqlrowlist, ignore_errors = TRUE, delayed = TRUE) + + +/datum/controller/subsystem/blackbox/proc/LogBroadcast(blackbox_msg, freq) + if(sealed) + return + switch(freq) + if(1459) + msg_common += blackbox_msg + if(1351) + msg_science += blackbox_msg + if(1353) + msg_command += blackbox_msg + if(1355) + msg_medical += blackbox_msg + if(1357) + msg_engineering += blackbox_msg + if(1359) + msg_security += blackbox_msg + if(1441) + msg_deathsquad += blackbox_msg + if(1213) + msg_syndicate += blackbox_msg + if(1349) + msg_service += blackbox_msg + if(1347) + msg_cargo += blackbox_msg + else + msg_other += blackbox_msg + +/datum/controller/subsystem/blackbox/proc/find_feedback_datum(variable) + for(var/datum/feedback_variable/FV in feedback) + if(FV.get_variable() == variable) + return FV + + var/datum/feedback_variable/FV = new(variable) + feedback += FV + return FV + +/datum/controller/subsystem/blackbox/proc/set_val(variable, value) + if(sealed) + return + var/datum/feedback_variable/FV = find_feedback_datum(variable) + FV.set_value(value) + +/datum/controller/subsystem/blackbox/proc/inc(variable, value) + if(sealed) + return + var/datum/feedback_variable/FV = find_feedback_datum(variable) + FV.inc(value) + +/datum/controller/subsystem/blackbox/proc/dec(variable,value) + if(sealed) + return + var/datum/feedback_variable/FV = find_feedback_datum(variable) + FV.dec(value) + +/datum/controller/subsystem/blackbox/proc/set_details(variable,details) + if(sealed) + return + var/datum/feedback_variable/FV = find_feedback_datum(variable) + FV.set_details(details) + +/datum/controller/subsystem/blackbox/proc/add_details(variable,details) + if(sealed) + return + var/datum/feedback_variable/FV = find_feedback_datum(variable) + FV.add_details(details) + +/datum/controller/subsystem/blackbox/proc/ReportDeath(mob/living/L) + if(sealed) + return + if(!SSdbcore.Connect()) + return + if(!L || !L.key || !L.mind) + return + var/turf/T = get_turf(L) + var/area/placeofdeath = get_area(T.loc) + var/sqlname = sanitizeSQL(L.real_name) + var/sqlkey = sanitizeSQL(L.ckey) + var/sqljob = sanitizeSQL(L.mind.assigned_role) + var/sqlspecial = sanitizeSQL(L.mind.special_role) + var/sqlpod = sanitizeSQL(placeofdeath.name) + var/laname + var/lakey + if(L.lastattacker && ismob(L.lastattacker)) + var/mob/LA = L.lastattacker + laname = sanitizeSQL(LA.real_name) + lakey = sanitizeSQL(LA.key) + var/sqlbrute = sanitizeSQL(L.getBruteLoss()) + var/sqlfire = sanitizeSQL(L.getFireLoss()) + var/sqlbrain = sanitizeSQL(L.getBrainLoss()) + var/sqloxy = sanitizeSQL(L.getOxyLoss()) + var/sqltox = sanitizeSQL(L.getToxLoss()) + var/sqlclone = sanitizeSQL(L.getCloneLoss()) + var/sqlstamina = sanitizeSQL(L.getStaminaLoss()) + var/x_coord = sanitizeSQL(L.x) + var/y_coord = sanitizeSQL(L.y) + var/z_coord = sanitizeSQL(L.z) + var/last_words = sanitizeSQL(L.last_words) + var/suicide = sanitizeSQL(L.suiciding) + var/map = sanitizeSQL(SSmapping.config.map_name) + var/datum/DBQuery/query_report_death = SSdbcore.NewQuery("INSERT INTO [format_table_name("death")] (pod, x_coord, y_coord, z_coord, mapname, server_ip, server_port, round_id, tod, job, special, name, byondkey, laname, lakey, bruteloss, fireloss, brainloss, oxyloss, toxloss, cloneloss, staminaloss, last_words, suicide) VALUES ('[sqlpod]', '[x_coord]', '[y_coord]', '[z_coord]', '[map]', INET_ATON(IF('[world.internet_address]' LIKE '', '0', '[world.internet_address]')), '[world.port]', [GLOB.round_id], '[SQLtime()]', '[sqljob]', '[sqlspecial]', '[sqlname]', '[sqlkey]', '[laname]', '[lakey]', [sqlbrute], [sqlfire], [sqlbrain], [sqloxy], [sqltox], [sqlclone], [sqlstamina], '[last_words]', [suicide])") + query_report_death.Execute() + +/datum/controller/subsystem/blackbox/proc/Seal() + if(sealed) + return + if(IsAdminAdvancedProcCall()) + var/msg = "[key_name_admin(usr)] sealed the blackbox!" + message_admins(msg) + log_game("Blackbox sealed[IsAdminAdvancedProcCall() ? " by [key_name(usr)]" : ""].") + sealed = TRUE + +//feedback variable datum, for storing all kinds of data +/datum/feedback_variable + var/variable + var/value + var/list/details + +/datum/feedback_variable/New(param_variable, param_value = 0) + variable = param_variable + value = param_value + +/datum/feedback_variable/proc/inc(num = 1) + if (isnum(value)) + value += num + else + value = text2num(value) + if (isnum(value)) + value += num + else + value = num + +/datum/feedback_variable/proc/dec(num = 1) + if (isnum(value)) + value -= num + else + value = text2num(value) + if (isnum(value)) + value -= num + else + value = -num + +/datum/feedback_variable/proc/set_value(num) + if (isnum(num)) + value = num + +/datum/feedback_variable/proc/get_value() + if (!isnum(value)) + return 0 + return value + +/datum/feedback_variable/proc/get_variable() + return variable + /datum/feedback_variable/proc/set_details(deets) - details = "\"[deets]\"" + details = list("\"[deets]\"") /datum/feedback_variable/proc/add_details(deets) if (!details) set_details(deets) else - details += " | \"[deets]\"" - -/datum/feedback_variable/proc/get_details() - return details - -/datum/feedback_variable/proc/get_parsed() - return list(variable,value,details) \ No newline at end of file + details += "\"[deets]\"" + +/datum/feedback_variable/proc/get_details() + return details.Join(" | ") + +/datum/feedback_variable/proc/get_parsed() + return list(variable,value,details.Join(" | ")) diff --git a/code/controllers/subsystem/blackbox.dm.rej b/code/controllers/subsystem/blackbox.dm.rej new file mode 100644 index 0000000000..5bd713172b --- /dev/null +++ b/code/controllers/subsystem/blackbox.dm.rej @@ -0,0 +1,10 @@ +diff a/code/controllers/subsystem/blackbox.dm b/code/controllers/subsystem/blackbox.dm (rejected hunks) +@@ -40,7 +40,7 @@ SUBSYSTEM_DEF(blackbox) + + if(config.use_exp_tracking) + if((triggertime < 0) || (world.time > (triggertime +3000))) //subsystem fires once at roundstart then once every 10 minutes. a 5 min check skips the first fire. The <0 is midnight rollover check +- SSblackbox.update_exp(10,FALSE) ++ update_exp(10,FALSE) + + + /datum/controller/subsystem/blackbox/Recover() diff --git a/code/controllers/subsystem/disease.dm b/code/controllers/subsystem/disease.dm index c75063c256..327ba95196 100644 --- a/code/controllers/subsystem/disease.dm +++ b/code/controllers/subsystem/disease.dm @@ -14,3 +14,10 @@ SUBSYSTEM_DEF(disease) /datum/controller/subsystem/disease/stat_entry(msg) ..("P:[active_diseases.len]") + +/datum/controller/subsystem/disease/proc/get_disease_name(id) + var/datum/disease/advance/A = archive_diseases[id] + if(A.name) + return A.name + else + return "Unknown" diff --git a/code/controllers/subsystem/job.dm b/code/controllers/subsystem/job.dm index f28373ef22..d64739698a 100644 --- a/code/controllers/subsystem/job.dm +++ b/code/controllers/subsystem/job.dm @@ -73,6 +73,8 @@ SUBSYSTEM_DEF(job) return 0 if(!job.player_old_enough(player.client)) return 0 + if(job.required_playtime_remaining(player.client)) + return 0 var/position_limit = job.total_positions if(!latejoin) position_limit = job.spawn_positions @@ -95,6 +97,9 @@ SUBSYSTEM_DEF(job) if(!job.player_old_enough(player.client)) Debug("FOC player not old enough, Player: [player]") continue + if(job.required_playtime_remaining(player.client)) + Debug("FOC player not enough xp, Player: [player]") + continue if(flag && (!(flag in player.client.prefs.be_special))) Debug("FOC flag failed, Player: [player], Flag: [flag], ") continue @@ -130,6 +135,10 @@ SUBSYSTEM_DEF(job) Debug("GRJ player not old enough, Player: [player]") continue + if(job.required_playtime_remaining(player.client)) + Debug("GRJ player not enough xp, Player: [player]") + continue + if(player.mind && job.title in player.mind.restricted_roles) Debug("GRJ incompatible with antagonist role, Player: [player], Job: [job.title]") continue @@ -300,6 +309,10 @@ SUBSYSTEM_DEF(job) Debug("DO player not old enough, Player: [player], Job:[job.title]") continue + if(job.required_playtime_remaining(player.client)) + Debug("DO player not enough xp, Player: [player], Job:[job.title]") + continue + if(player.mind && job.title in player.mind.restricted_roles) Debug("DO incompatible with antagonist role, Player: [player], Job:[job.title]") continue @@ -407,7 +420,7 @@ SUBSYSTEM_DEF(job) if(job && H) job.after_spawn(H, M) - + handle_roundstart_items(H, M.ckey, H.mind.assigned_role, H.mind.special_role) return H @@ -463,6 +476,9 @@ SUBSYSTEM_DEF(job) if(!job.player_old_enough(player.client)) level6++ continue + if(job.required_playtime_remaining(player.client)) + level6++ + continue if(player.client.prefs.GetJobDepartment(job, 1) & job.flag) level1++ else if(player.client.prefs.GetJobDepartment(job, 2) & job.flag) diff --git a/code/controllers/subsystem/persistence.dm b/code/controllers/subsystem/persistence.dm index 05062a6314..8b8bc81ad2 100644 --- a/code/controllers/subsystem/persistence.dm +++ b/code/controllers/subsystem/persistence.dm @@ -2,15 +2,15 @@ SUBSYSTEM_DEF(persistence) name = "Persistence" init_order = INIT_ORDER_PERSISTENCE flags = SS_NO_FIRE - var/savefile/secret_satchels + var/secret_satchels var/list/satchel_blacklist = list() //this is a typecache var/list/new_secret_satchels = list() //these are objects - var/old_secret_satchels = "" + var/list/old_secret_satchels = "" var/list/obj/structure/chisel_message/chisel_messages = list() var/list/saved_messages = list() - var/savefile/trophy_sav + var/trophy_sav var/list/saved_trophies = list() /datum/controller/subsystem/persistence/Initialize() @@ -21,67 +21,53 @@ SUBSYSTEM_DEF(persistence) ..() /datum/controller/subsystem/persistence/proc/LoadSatchels() - secret_satchels = new /savefile("data/npc_saves/SecretSatchels.sav") + secret_satchels = file("data/npc_saves/SecretSatchels[SSmapping.config.map_name].json") + if(!fexists(secret_satchels)) + return satchel_blacklist = typecacheof(list(/obj/item/stack/tile/plasteel, /obj/item/crowbar)) - secret_satchels[SSmapping.config.map_name] >> old_secret_satchels - - var/list/expanded_old_satchels = list() - var/placed_satchels = 0 - - if(!isnull(old_secret_satchels)) - expanded_old_satchels = splittext(old_secret_satchels,"#") - if(PlaceSecretSatchel(expanded_old_satchels)) - placed_satchels++ - else - expanded_old_satchels.len = 0 + var/list/json = list() + json = json_decode(file2text(secret_satchels)) + old_secret_satchels = json["data"] + var/placed_satchel = 0 + if(old_secret_satchels.len) + if(old_secret_satchels.len >= 20) //guards against low drop pools assuring that one player cannot reliably find his own gear. + var/pos = rand(1, old_secret_satchels.len) + old_secret_satchels.Cut(pos, pos+1) + var/obj/item/storage/backpack/satchel/flat/F = new() + F.x = old_secret_satchels[pos]["x"] + F.y = old_secret_satchels[pos]["y"] + F.z = ZLEVEL_STATION + var/path = text2path(old_secret_satchels[pos]["saved_obj"]) + if(!ispath(path)) + return + if(isfloorturf(F.loc) && !istype(F.loc, /turf/open/floor/plating/)) + F.hide(1) + new path(F) + placed_satchel++ var/list/free_satchels = list() for(var/turf/T in shuffle(block(locate(TRANSITIONEDGE,TRANSITIONEDGE,ZLEVEL_STATION), locate(world.maxx-TRANSITIONEDGE,world.maxy-TRANSITIONEDGE,ZLEVEL_STATION)))) //Nontrivially expensive but it's roundstart only if(isfloorturf(T) && !istype(T, /turf/open/floor/plating/)) free_satchels += new /obj/item/storage/backpack/satchel/flat/secret(T) - if(!isemptylist(free_satchels) && ((free_satchels.len + placed_satchels) >= (50 - expanded_old_satchels.len) * 0.1)) //up to six tiles, more than enough to kill anything that moves + if(!isemptylist(free_satchels) && ((free_satchels.len + placed_satchel) >= (50 - old_secret_satchels.len) * 0.1)) //up to six tiles, more than enough to kill anything that moves break -/datum/controller/subsystem/persistence/proc/PlaceSecretSatchel(list/expanded_old_satchels) - var/satchel_string - - if(expanded_old_satchels.len >= 20) //guards against low drop pools assuring that one player cannot reliably find his own gear. - satchel_string = pick_n_take(expanded_old_satchels) - - old_secret_satchels = jointext(expanded_old_satchels,"#") - WRITE_FILE(secret_satchels[SSmapping.config.map_name], old_secret_satchels) - - var/list/chosen_satchel = splittext(satchel_string,"|") - if(!chosen_satchel || isemptylist(chosen_satchel) || chosen_satchel.len != 3) //Malformed - return 0 - - var/path = text2path(chosen_satchel[3]) //If the item no longer exist, this returns null - if(!path) - return 0 - - var/obj/item/storage/backpack/satchel/flat/F = new() - F.x = text2num(chosen_satchel[1]) - F.y = text2num(chosen_satchel[2]) - F.z = ZLEVEL_STATION - if(isfloorturf(F.loc) && !istype(F.loc, /turf/open/floor/plating/)) - F.hide(1) - new path(F) - return 1 - /datum/controller/subsystem/persistence/proc/LoadPoly() for(var/mob/living/simple_animal/parrot/Poly/P in GLOB.living_mob_list) twitterize(P.speech_buffer, "polytalk") break //Who's been duping the bird?! /datum/controller/subsystem/persistence/proc/LoadChiselMessages() - var/savefile/chisel_messages_sav = new /savefile("data/npc_saves/ChiselMessages.sav") - var/saved_json - chisel_messages_sav[SSmapping.config.map_name] >> saved_json + var/json_file = file("data/npc_saves/ChiselMessages[SSmapping.config.map_name].json") + if(!fexists(json_file)) + return + var/list/json + json = json_decode(file2text(json_file)) - if(!saved_json) + if(!json) return - var/list/saved_messages = json_decode(saved_json) + var/list/saved_messages = json["data"] for(var/item in saved_messages) if(!islist(item)) @@ -109,19 +95,16 @@ SUBSYSTEM_DEF(persistence) log_world("Loaded [saved_messages.len] engraved messages on map [SSmapping.config.map_name]") /datum/controller/subsystem/persistence/proc/LoadTrophies() - trophy_sav = new /savefile("data/npc_saves/TrophyItems.sav") - var/saved_json - trophy_sav >> saved_json + trophy_sav = file("data/npc_saves/TrophyItems.json") + if(!fexists(trophy_sav)) + return + var/list/json = list() + json = json_decode(file2text(trophy_sav)) - if(!saved_json) + if(!json) return - var/decoded_json = json_decode(saved_json) - - if(!islist(decoded_json)) - return - - saved_trophies = decoded_json + saved_trophies = json["data"] SetUpTrophies(saved_trophies.Copy()) @@ -156,6 +139,7 @@ SUBSYSTEM_DEF(persistence) CollectTrophies() /datum/controller/subsystem/persistence/proc/CollectSecretSatchels() + var/list/satchels = list() for(var/A in new_secret_satchels) var/obj/item/storage/backpack/satchel/flat/F = A if(QDELETED(F) || F.z != ZLEVEL_STATION || F.invisibility != INVISIBILITY_MAXIMUM) @@ -170,25 +154,37 @@ SUBSYSTEM_DEF(persistence) savable_obj += O.type if(isemptylist(savable_obj)) continue - old_secret_satchels += "[F.x]|[F.y]|[pick(savable_obj)]#" - WRITE_FILE(secret_satchels[SSmapping.config.map_name], old_secret_satchels) + var/list/data = list() + data["x"] = F.x + data["y"] = F.y + data["saved_obj"] = pick(savable_obj) + satchels += list(data) + var/list/file_data = list() + file_data["data"] = satchels + fdel(secret_satchels) + WRITE_FILE(secret_satchels, json_encode(file_data)) /datum/controller/subsystem/persistence/proc/CollectChiselMessages() - var/savefile/chisel_messages_sav = new /savefile("data/npc_saves/ChiselMessages.sav") + var/json_file = file("data/npc_saves/ChiselMessages[SSmapping.config.map_name].json") for(var/obj/structure/chisel_message/M in chisel_messages) saved_messages += list(M.pack()) log_world("Saved [saved_messages.len] engraved messages on map [SSmapping.config.map_name]") - - WRITE_FILE(chisel_messages_sav[SSmapping.config.map_name], json_encode(saved_messages)) + var/list/file_data = list() + file_data["data"] = saved_messages + fdel(json_file) + WRITE_FILE(json_file, json_encode(file_data)) /datum/controller/subsystem/persistence/proc/SaveChiselMessage(obj/structure/chisel_message/M) saved_messages += list(M.pack()) // dm eats one list /datum/controller/subsystem/persistence/proc/CollectTrophies() - WRITE_FILE(trophy_sav, json_encode(saved_trophies)) + var/list/file_data = list() + file_data["data"] = saved_trophies + fdel(trophy_sav) + WRITE_FILE(trophy_sav, json_encode(file_data)) /datum/controller/subsystem/persistence/proc/SaveTrophy(obj/structure/displaycase/trophy/T) if(!T.added_roundstart && T.showpiece) @@ -196,4 +192,4 @@ SUBSYSTEM_DEF(persistence) data["path"] = T.showpiece.type data["message"] = T.trophy_message data["placer_key"] = T.placer_key - saved_trophies += list(data) + saved_trophies += list(data) \ No newline at end of file diff --git a/code/controllers/subsystem/server_maint.dm.rej b/code/controllers/subsystem/server_maint.dm.rej new file mode 100644 index 0000000000..486375b505 --- /dev/null +++ b/code/controllers/subsystem/server_maint.dm.rej @@ -0,0 +1,30 @@ +diff a/code/controllers/subsystem/server_maint.dm b/code/controllers/subsystem/server_maint.dm (rejected hunks) +@@ -6,18 +6,16 @@ SUBSYSTEM_DEF(server_maint) + flags = SS_POST_FIRE_TIMING|SS_FIRE_IN_LOBBY + priority = 10 + var/list/currentrun +- var/triggertime = null + + /datum/controller/subsystem/server_maint/Initialize(timeofday) + if (config.hub) + world.visibility = 1 +- triggertime = REALTIMEOFDAY + ..() + + /datum/controller/subsystem/server_maint/fire(resumed = FALSE) + if(!resumed) + src.currentrun = GLOB.clients.Copy() +- ++ + var/list/currentrun = src.currentrun + var/round_started = SSticker.HasRoundStarted() + +@@ -39,8 +37,3 @@ SUBSYSTEM_DEF(server_maint) + return + + #undef PING_BUFFER_TIME +- if(config.sql_enabled) +- sql_poll_population() +- if(config.use_exp_tracking) +- if(REALTIMEOFDAY > (triggertime +3000)) //server maint fires once at roundstart then once every 10 minutes. a 5 min check skips the first fire +- update_exp(10,0) diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm index ea91e8a688..f9774f8cb5 100644 --- a/code/controllers/subsystem/shuttle.dm +++ b/code/controllers/subsystem/shuttle.dm @@ -341,7 +341,7 @@ SUBSYSTEM_DEF(shuttle) if(M.request(getDock(destination))) return 2 else - if(M.dock(getDock(destination))) + if(M.dock(getDock(destination)) != DOCKING_SUCCESS) return 2 return 0 //dock successful @@ -356,7 +356,7 @@ SUBSYSTEM_DEF(shuttle) if(M.request(D)) return 2 else - if(M.dock(D)) + if(M.dock(D) != DOCKING_SUCCESS) return 2 return 0 //dock successful diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index d196c9cb10..e51ef0c255 100755 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -470,6 +470,12 @@ SUBSYSTEM_DEF(ticker) to_chat(world, "


The round has ended.") +/* var/nocredits = config.no_credits_round_end + for(var/client/C in GLOB.clients) + if(!C.credits && !nocredits) + C.RollCredits() + C.playtitlemusic(40)*/ + //Player status report for(var/mob/Player in GLOB.mob_list) if(Player.mind && !isnewplayer(Player)) @@ -518,7 +524,7 @@ SUBSYSTEM_DEF(ticker) //Silicon laws report for (var/mob/living/silicon/ai/aiPlayer in GLOB.mob_list) - if (aiPlayer.stat != 2 && aiPlayer.mind) + if (aiPlayer.stat != DEAD && aiPlayer.mind) to_chat(world, "[aiPlayer.name] (Played by: [aiPlayer.mind.key])'s laws at the end of the round were:") aiPlayer.show_laws(1) else if (aiPlayer.mind) //if the dead ai has a mind, use its key instead @@ -538,7 +544,7 @@ SUBSYSTEM_DEF(ticker) for (var/mob/living/silicon/robot/robo in GLOB.mob_list) if (!robo.connected_ai && robo.mind) - if (robo.stat != 2) + if (robo.stat != DEAD) to_chat(world, "[robo.name] (Played by: [robo.mind.key]) survived as an AI-less borg! Its laws were:") else to_chat(world, "[robo.name] (Played by: [robo.mind.key]) was unable to survive the rigors of being a cyborg without an AI. Its laws were:") diff --git a/code/controllers/subsystem/timer.dm b/code/controllers/subsystem/timer.dm index c8d5b69e61..804e430ef9 100644 --- a/code/controllers/subsystem/timer.dm +++ b/code/controllers/subsystem/timer.dm @@ -69,7 +69,7 @@ SUBSYSTEM_DEF(timer) if (ctime_timer.timeToRun <= REALTIMEOFDAY) --clienttime_timers.len var/datum/callback/callBack = ctime_timer.callBack - ctime_timer.spent = TRUE + ctime_timer.spent = REALTIMEOFDAY callBack.InvokeAsync() qdel(ctime_timer) else @@ -105,11 +105,11 @@ SUBSYSTEM_DEF(timer) if (!callBack) qdel(timer) bucket_resolution = null //force bucket recreation - CRASH("Invalid timer: [timer] timer.timeToRun=[timer.timeToRun]||QDELETED(timer)=[QDELETED(timer)]||world.time=[world.time]||head_offset=[head_offset]||practical_offset=[practical_offset]||timer.spent=[timer.spent]") + CRASH("Invalid timer: [get_timer_debug_string(timer)] world.time: [world.time], head_offset: [head_offset], practical_offset: [practical_offset]") if (!timer.spent) spent += timer - timer.spent = TRUE + timer.spent = world.time callBack.InvokeAsync() last_invoke_tick = world.time @@ -135,9 +135,11 @@ SUBSYSTEM_DEF(timer) . = "Timer: [TE]" . += "Prev: [TE.prev ? TE.prev : "NULL"], Next: [TE.next ? TE.next : "NULL"]" if(TE.spent) - . += ", SPENT" + . += ", SPENT([TE.spent])" if(QDELETED(TE)) . += ", QDELETED" + if(!TE.callBack) + . += ", NO CALLBACK" /datum/controller/subsystem/timer/proc/shift_buckets() var/list/bucket_list = src.bucket_list @@ -216,7 +218,7 @@ SUBSYSTEM_DEF(timer) var/timeToRun var/hash var/list/flags - var/spent = FALSE //set to true right before running. + var/spent = 0 //time we ran the timer. var/name //for easy debugging. //cicular doublely linked list var/datum/timedevent/next @@ -243,6 +245,9 @@ SUBSYSTEM_DEF(timer) name = "Timer: " + num2text(id, 8) + ", TTR: [timeToRun], Flags: [jointext(bitfield2list(flags, list("TIMER_UNIQUE", "TIMER_OVERRIDE", "TIMER_CLIENT_TIME", "TIMER_STOPPABLE", "TIMER_NO_HASH_WAIT")), ", ")], callBack: \ref[callBack], callBack.object: [callBack.object]\ref[callBack.object]([getcallingtype()]), callBack.delegate:[callBack.delegate]([callBack.arguments ? callBack.arguments.Join(", ") : ""])" + if (spent) + CRASH("HOLY JESUS. WHAT IS THAT? WHAT THE FUCK IS THAT?") + if (callBack.object != GLOBAL_PROC) LAZYADD(callBack.object.active_timers, src) diff --git a/code/datums/action.dm b/code/datums/action.dm index 10cb2a239f..8e32e8968f 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -172,6 +172,7 @@ /datum/action/item_action/rcl name = "Change Cable Color" + icon_icon = 'icons/mob/actions/actions_items.dmi' button_icon_state = "rcl_rainbow" /datum/action/item_action/startchainsaw @@ -405,27 +406,24 @@ /datum/action/item_action/initialize_ninja_suit name = "Toggle ninja suit" -/datum/action/item_action/ninjajaunt - name = "Phase Jaunt (10E)" - desc = "Utilizes the internal VOID-shift device to rapidly transit in direction facing." - icon_icon = 'icons/mob/actions/actions_items.dmi' - button_icon_state = "ninja_phase" - /datum/action/item_action/ninjasmoke name = "Smoke Bomb" desc = "Blind your enemies momentarily with a well-placed smoke bomb." button_icon_state = "smoke" + icon_icon = 'icons/mob/actions/actions_spells.dmi' /datum/action/item_action/ninjaboost - check_flags = AB_CHECK_RESTRAINED|AB_CHECK_CONSCIOUS + check_flags = NONE name = "Adrenaline Boost" desc = "Inject a secret chemical that will counteract all movement-impairing effect." button_icon_state = "repulse" + icon_icon = 'icons/mob/actions/actions_spells.dmi' /datum/action/item_action/ninjapulse name = "EM Burst (25E)" desc = "Disable any nearby technology with a electro-magnetic pulse." button_icon_state = "emp" + icon_icon = 'icons/mob/actions/actions_spells.dmi' /datum/action/item_action/ninjastar name = "Create Throwing Stars (1E)" @@ -448,8 +446,8 @@ /datum/action/item_action/ninja_stealth name = "Toggle Stealth" desc = "Toggles stealth mode on and off." - icon_icon = 'icons/mob/actions/actions_items.dmi' button_icon_state = "ninja_cloak" + icon_icon = 'icons/mob/actions/actions_minor_antag.dmi' /datum/action/item_action/toggle_glove name = "Toggle interaction" @@ -491,7 +489,7 @@ S.action = src name = S.name desc = S.desc - button_icon = S.action_icon + icon_icon = S.action_icon button_icon_state = S.action_icon_state background_icon_state = S.action_background_icon_state button.name = name diff --git a/code/datums/antagonists/ninja.dm b/code/datums/antagonists/ninja.dm index bd7bb13a1d..230a4d64e4 100644 --- a/code/datums/antagonists/ninja.dm +++ b/code/datums/antagonists/ninja.dm @@ -41,7 +41,6 @@ H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/space_ninja(H), slot_wear_mask) H.equip_to_slot_or_del(new /obj/item/clothing/glasses/night(H), slot_glasses) H.equip_to_slot_or_del(EK, slot_belt) - H.equip_to_slot_or_del(new /obj/item/device/flashlight(H), slot_r_store) H.equip_to_slot_or_del(new /obj/item/grenade/plastic/x4(H), slot_l_store) H.equip_to_slot_or_del(new /obj/item/tank/internals/emergency_oxygen(H), slot_s_store) H.equip_to_slot_or_del(new /obj/item/tank/jetpack/carbondioxide(H), slot_back) diff --git a/code/datums/components/archaeology.dm b/code/datums/components/archaeology.dm new file mode 100644 index 0000000000..22a6b24bc4 --- /dev/null +++ b/code/datums/components/archaeology.dm @@ -0,0 +1,92 @@ +/datum/component/archaeology + dupe_type = COMPONENT_DUPE_UNIQUE + var/list/archdrops + var/prob2drop + var/dug + +/datum/component/archaeology/Initialize(_prob2drop, list/_archdrops = list()) + prob2drop = Clamp(_prob2drop, 0, 100) + archdrops = _archdrops + RegisterSignal(COMSIG_PARENT_ATTACKBY,.proc/Dig) + RegisterSignal(COMSIG_ATOM_EX_ACT, .proc/BombDig) + RegisterSignal(COMSIG_ATOM_SING_PULL, .proc/SingDig) + +/datum/component/archaeology/InheritComponent(datum/component/archaeology/A, i_am_original) + var/list/other_archdrops = A.archdrops + var/list/_archdrops = archdrops + for(var/I in other_archdrops) + _archdrops[I] += other_archdrops[I] + +/datum/component/archaeology/proc/Dig(mob/user, obj/item/W) + if(dug) + to_chat(user, "Looks like someone has dug here already.") + return FALSE + else + var/digging_speed + if (istype(W, /obj/item/shovel)) + var/obj/item/shovel/S = W + digging_speed = S.digspeed + else if (istype(W, /obj/item/pickaxe)) + var/obj/item/pickaxe/P = W + digging_speed = P.digspeed + + if (digging_speed && isturf(user.loc)) + to_chat(user, "You start digging...") + playsound(parent, 'sound/effects/shovel_dig.ogg', 50, 1) + + if(do_after(user, digging_speed, target = parent)) + to_chat(user, "You dig a hole.") + gets_dug() + dug = TRUE + SSblackbox.add_details("pick_used_mining",W.type) + return TRUE + return FALSE + +/datum/component/archaeology/proc/gets_dug() + if(dug) + return + else + var/turf/open/OT = get_turf(parent) + for(var/thing in archdrops) + var/maxtodrop = archdrops[thing] + for(var/i in 1 to maxtodrop) + if(prob(prob2drop)) // can't win them all! + new thing(OT) + + if(isopenturf(OT)) + if(OT.postdig_icon_change) + if(istype(OT, /turf/open/floor/plating/asteroid/) && !OT.postdig_icon) + var/turf/open/floor/plating/asteroid/AOT = parent + AOT.icon_plating = "[AOT.environment_type]_dug" + AOT.icon_state = "[AOT.environment_type]_dug" + else + if(isplatingturf(OT)) + var/turf/open/floor/plating/POT = parent + POT.icon_plating = "[POT.postdig_icon]" + OT.icon_state = "[OT.postdig_icon]" + + if(OT.slowdown) //Things like snow slow you down until you dig them. + OT.slowdown = 0 + dug = TRUE + +/datum/component/archaeology/proc/SingDig(S, current_size) + switch(current_size) + if(STAGE_THREE) + if(prob(30)) + gets_dug() + if(STAGE_FOUR) + if(prob(50)) + gets_dug() + else + if(current_size >= STAGE_FIVE && prob(70)) + gets_dug() + +/datum/component/archaeology/proc/BombDig(severity, target) + switch(severity) + if(3) + return + if(2) + if(prob(20)) + gets_dug() + if(1) + gets_dug() diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index 87c6ad7334..84cb42cf47 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -1,934 +1,955 @@ -/datum - var/var_edited = FALSE //Warrenty void if seal is broken - var/fingerprintslast = null - -/datum/proc/can_vv_get(var_name) - return TRUE - -/datum/proc/vv_edit_var(var_name, var_value) //called whenever a var is edited - switch(var_name) - if ("vars") - return FALSE - if ("var_edited") - return FALSE - var_edited = TRUE - vars[var_name] = var_value - -/datum/proc/vv_get_var(var_name) - switch(var_name) - if ("vars") - return debug_variable(var_name, list(), 0, src) - return debug_variable(var_name, vars[var_name], 0, src) - -//please call . = ..() first and append to the result, that way parent items are always at the top and child items are further down +/datum + var/var_edited = FALSE //Warrenty void if seal is broken + var/fingerprintslast = null + +/datum/proc/can_vv_get(var_name) + return TRUE + +/datum/proc/vv_edit_var(var_name, var_value) //called whenever a var is edited + switch(var_name) + if ("vars") + return FALSE + if ("var_edited") + return FALSE + var_edited = TRUE + vars[var_name] = var_value + +/datum/proc/vv_get_var(var_name) + switch(var_name) + if ("vars") + return debug_variable(var_name, list(), 0, src) + return debug_variable(var_name, vars[var_name], 0, src) + +//please call . = ..() first and append to the result, that way parent items are always at the top and child items are further down //add separaters by doing . += "---" -/datum/proc/vv_get_dropdown() - . = list() - . += "---" - .["Call Proc"] = "?_src_=vars;proc_call=\ref[src]" - .["Mark Object"] = "?_src_=vars;mark_object=\ref[src]" - .["Delete"] = "?_src_=vars;delete=\ref[src]" - - -/datum/proc/on_reagent_change() - return - - -/client/proc/debug_variables(datum/D in world) - set category = "Debug" - set name = "View Variables" - //set src in world - var/static/cookieoffset = rand(1, 9999) //to force cookies to reset after the round. - - if(!usr.client || !usr.client.holder) - to_chat(usr, "You need to be an administrator to access this.") - return - - if(!D) - return - - var/islist = islist(D) - if (!islist && !istype(D)) - return - - var/title = "" - var/refid = "\ref[D]" - var/icon/sprite - var/hash - - var/type = /list - if (!islist) - type = D.type - - - +/datum/proc/vv_get_dropdown() + . = list() + . += "---" + .["Call Proc"] = "?_src_=vars;proc_call=\ref[src]" + .["Mark Object"] = "?_src_=vars;mark_object=\ref[src]" + .["Delete"] = "?_src_=vars;delete=\ref[src]" + .["Show VV To Player"] = "?_src_=vars;expose=\ref[src]" + + +/datum/proc/on_reagent_change() + return + + +/client/proc/debug_variables(datum/D in world) + set category = "Debug" + set name = "View Variables" + //set src in world + var/static/cookieoffset = rand(1, 9999) //to force cookies to reset after the round. + + if(!usr.client || !usr.client.holder) //The usr vs src abuse in this proc is intentional and must not be changed + to_chat(usr, "You need to be an administrator to access this.") + return + + if(!D) + return + + var/islist = islist(D) + if (!islist && !istype(D)) + return + + var/title = "" + var/refid = "\ref[D]" + var/icon/sprite + var/hash + + var/type = /list + if (!islist) + type = D.type + + + if(istype(D, /atom)) - var/atom/AT = D - if(AT.icon && AT.icon_state) - sprite = new /icon(AT.icon, AT.icon_state) - hash = md5(AT.icon) - hash = md5(hash + AT.icon_state) - usr << browse_rsc(sprite, "vv[hash].png") - - title = "[D] (\ref[D]) = [type]" - - var/sprite_text - if(sprite) - sprite_text = "" - var/list/atomsnowflake = list() - + var/atom/AT = D + if(AT.icon && AT.icon_state) + sprite = new /icon(AT.icon, AT.icon_state) + hash = md5(AT.icon) + hash = md5(hash + AT.icon_state) + src << browse_rsc(sprite, "vv[hash].png") + + title = "[D] (\ref[D]) = [type]" + + var/sprite_text + if(sprite) + sprite_text = "" + var/list/atomsnowflake = list() + if(istype(D, /atom)) - var/atom/A = D - if(isliving(A)) - atomsnowflake += "[D]" - if(A.dir) - atomsnowflake += "
<< [dir2text(A.dir)] >>" - var/mob/living/M = A - atomsnowflake += {" -
[M.ckey ? M.ckey : "No ckey"] / [M.real_name ? M.real_name : "No real name"] -
- BRUTE:[M.getBruteLoss()] - FIRE:[M.getFireLoss()] - TOXIN:[M.getToxLoss()] - OXY:[M.getOxyLoss()] - CLONE:[M.getCloneLoss()] - BRAIN:[M.getBrainLoss()] - STAMINA:[M.getStaminaLoss()] - - "} - else - atomsnowflake += "[D]" - if(A.dir) - atomsnowflake += "
<< [dir2text(A.dir)] >>" - else - atomsnowflake += "[D]" - - var/formatted_type = "[type]" - if(length(formatted_type) > 25) - var/middle_point = length(formatted_type) / 2 - var/splitpoint = findtext(formatted_type,"/",middle_point) - if(splitpoint) - formatted_type = "[copytext(formatted_type,1,splitpoint)]
[copytext(formatted_type,splitpoint)]" - else - formatted_type = "Type too long" //No suitable splitpoint (/) found. - - var/marked - if(holder.marked_datum && holder.marked_datum == D) - marked = "
Marked Object" - var/varedited_line = "" - if(!islist && D.var_edited) - varedited_line = "
Var Edited" - - var/list/dropdownoptions = list() - if (islist) - dropdownoptions = list( - "---", - "Add Item" = "?_src_=vars;listadd=[refid]", - "Remove Nulls" = "?_src_=vars;listnulls=[refid]", - "Remove Dupes" = "?_src_=vars;listdupes=[refid]", - "Set len" = "?_src_=vars;listlen=[refid]", - "Shuffle" = "?_src_=vars;listshuffle=[refid]" - ) - else - dropdownoptions = D.vv_get_dropdown() - var/list/dropdownoptions_html = list() - - for (var/name in dropdownoptions) - var/link = dropdownoptions[name] - if (link) - dropdownoptions_html += "" - else - dropdownoptions_html += "" - - var/list/names = list() - if (!islist) - for (var/V in D.vars) - names += V - sleep(1)//For some reason, without this sleep, VVing will cause client to disconnect on certain objects. - - var/list/variable_html = list() - if (islist) - var/list/L = D - for (var/i in 1 to L.len) - var/key = L[i] - var/value - if (IS_NORMAL_LIST(L) && !isnum(key)) - value = L[key] - variable_html += debug_variable(i, value, 0, D) - else - - names = sortList(names) - for (var/V in names) - if(D.can_vv_get(V)) - variable_html += D.vv_get_var(V) - - var/html = {" - - - [title] - - - - -
- - - - - -
- - - - -
- [sprite_text] -
- [atomsnowflake.Join()] -
-
-
- [formatted_type] - [marked] - [varedited_line] -
-
-
- Refresh -
- -
-
-
-
-
- - E - Edit, tries to determine the variable type by itself.
- C - Change, asks you for the var type first.
- M - Mass modify: changes this variable for all objects of this type.
-
-
- - - - - -
-
- Search: -
-
- -
-
-
    - [variable_html.Join()] -
- - - -"} - - usr << browse(html, "window=variables[refid];size=475x650") - - -#define VV_HTML_ENCODE(thing) ( sanitize ? html_encode(thing) : thing ) -/proc/debug_variable(name, value, level, datum/DA = null, sanitize = TRUE) - var/header - if(DA) - if (islist(DA)) - var/index = name - if (value) - name = DA[name] //name is really the index until this line - else - value = DA[name] - header = "
  • (E) (C) (-) " - else - header = "
  • (E) (C) (M) " - else - header = "
  • " - - var/item - if (isnull(value)) - item = "[VV_HTML_ENCODE(name)] = null" - - else if (istext(value)) - item = "[VV_HTML_ENCODE(name)] = \"[VV_HTML_ENCODE(value)]\"" - - else if (isicon(value)) - #ifdef VARSICON - var/icon/I = new/icon(value) - var/rnd = rand(1,10000) - var/rname = "tmp\ref[I][rnd].png" - usr << browse_rsc(I, rname) - item = "[VV_HTML_ENCODE(name)] = ([value]) " - #else - item = "[VV_HTML_ENCODE(name)] = /icon ([value])" - #endif - -/* else if (istype(value, /image)) - #ifdef VARSICON - var/rnd = rand(1, 10000) - var/image/I = value - - src << browse_rsc(I.icon, "tmp\ref[value][rnd].png") - html += "[name] = " - #else - html += "[name] = /image ([value])" - #endif -*/ - else if (isfile(value)) - item = "[VV_HTML_ENCODE(name)] = '[value]'" - - //else if (istype(value, /client)) - // var/client/C = value - // item = "[VV_HTML_ENCODE(name)] \ref[value] = [C] [C.type]" - - else if (istype(value, /datum)) - var/datum/D = value - if ("[D]" != "[D.type]") //if the thing as a name var, lets use it. - item = "[VV_HTML_ENCODE(name)] \ref[value] = [D] [D.type]" - else - item = "[VV_HTML_ENCODE(name)] \ref[value] = [D.type]" - - else if (islist(value)) - var/list/L = value - var/list/items = list() - - if (L.len > 0 && !(name == "underlays" || name == "overlays" || L.len > (IS_NORMAL_LIST(L) ? 50 : 150))) - for (var/i in 1 to L.len) - var/key = L[i] - var/val - if (IS_NORMAL_LIST(L) && !isnum(key)) - val = L[key] - if (!val) - val = key - key = i - - items += debug_variable(key, val, level + 1, sanitize = sanitize) - - item = "[VV_HTML_ENCODE(name)] = /list ([L.len])
      [items.Join()]
    " - else - item = "[VV_HTML_ENCODE(name)] = /list ([L.len])" - - else - item = "[VV_HTML_ENCODE(name)] = [VV_HTML_ENCODE(value)]" - - return "[header][item]
  • " - -#undef VV_HTML_ENCODE - -/client/proc/view_var_Topic(href, href_list, hsrc) - if( (usr.client != src) || !src.holder ) - return - if(href_list["Vars"]) - debug_variables(locate(href_list["Vars"])) - - else if(href_list["datumrefresh"]) - var/datum/DAT = locate(href_list["datumrefresh"]) - if(!DAT) //can't be an istype() because /client etc aren't datums - return - src.debug_variables(DAT) - - else if(href_list["mob_player_panel"]) - if(!check_rights(0)) - return - + var/atom/A = D + if(isliving(A)) + atomsnowflake += "[D]" + if(A.dir) + atomsnowflake += "
    << [dir2text(A.dir)] >>" + var/mob/living/M = A + atomsnowflake += {" +
    [M.ckey ? M.ckey : "No ckey"] / [M.real_name ? M.real_name : "No real name"] +
    + BRUTE:[M.getBruteLoss()] + FIRE:[M.getFireLoss()] + TOXIN:[M.getToxLoss()] + OXY:[M.getOxyLoss()] + CLONE:[M.getCloneLoss()] + BRAIN:[M.getBrainLoss()] + STAMINA:[M.getStaminaLoss()] + + "} + else + atomsnowflake += "[D]" + if(A.dir) + atomsnowflake += "
    << [dir2text(A.dir)] >>" + else + atomsnowflake += "[D]" + + var/formatted_type = "[type]" + if(length(formatted_type) > 25) + var/middle_point = length(formatted_type) / 2 + var/splitpoint = findtext(formatted_type,"/",middle_point) + if(splitpoint) + formatted_type = "[copytext(formatted_type,1,splitpoint)]
    [copytext(formatted_type,splitpoint)]" + else + formatted_type = "Type too long" //No suitable splitpoint (/) found. + + var/marked + if(holder && holder.marked_datum && holder.marked_datum == D) + marked = "
    Marked Object" + var/varedited_line = "" + if(!islist && D.var_edited) + varedited_line = "
    Var Edited" + + var/list/dropdownoptions = list() + if (islist) + dropdownoptions = list( + "---", + "Add Item" = "?_src_=vars;listadd=[refid]", + "Remove Nulls" = "?_src_=vars;listnulls=[refid]", + "Remove Dupes" = "?_src_=vars;listdupes=[refid]", + "Set len" = "?_src_=vars;listlen=[refid]", + "Shuffle" = "?_src_=vars;listshuffle=[refid]", + "Show VV To Player" = "?_src_=vars;expose=[refid]" + ) + else + dropdownoptions = D.vv_get_dropdown() + var/list/dropdownoptions_html = list() + + for (var/name in dropdownoptions) + var/link = dropdownoptions[name] + if (link) + dropdownoptions_html += "" + else + dropdownoptions_html += "" + + var/list/names = list() + if (!islist) + for (var/V in D.vars) + names += V + sleep(1)//For some reason, without this sleep, VVing will cause client to disconnect on certain objects. + + var/list/variable_html = list() + if (islist) + var/list/L = D + for (var/i in 1 to L.len) + var/key = L[i] + var/value + if (IS_NORMAL_LIST(L) && !isnum(key)) + value = L[key] + variable_html += debug_variable(i, value, 0, D) + else + + names = sortList(names) + for (var/V in names) + if(D.can_vv_get(V)) + variable_html += D.vv_get_var(V) + + var/html = {" + + + [title] + + + + +
    + + + + + +
    + + + + +
    + [sprite_text] +
    + [atomsnowflake.Join()] +
    +
    +
    + [formatted_type] + [marked] + [varedited_line] +
    +
    +
    + Refresh +
    + +
    +
    +
    +
    +
    + + E - Edit, tries to determine the variable type by itself.
    + C - Change, asks you for the var type first.
    + M - Mass modify: changes this variable for all objects of this type.
    +
    +
    + + + + + +
    +
    + Search: +
    +
    + +
    +
    +
      + [variable_html.Join()] +
    + + + +"} + src << browse(html, "window=variables[refid];size=475x650") + + +#define VV_HTML_ENCODE(thing) ( sanitize ? html_encode(thing) : thing ) +/proc/debug_variable(name, value, level, datum/DA = null, sanitize = TRUE) + var/header + if(DA) + if (islist(DA)) + var/index = name + if (value) + name = DA[name] //name is really the index until this line + else + value = DA[name] + header = "
  • (E) (C) (-) " + else + header = "
  • (E) (C) (M) " + else + header = "
  • " + + var/item + if (isnull(value)) + item = "[VV_HTML_ENCODE(name)] = null" + + else if (istext(value)) + item = "[VV_HTML_ENCODE(name)] = \"[VV_HTML_ENCODE(value)]\"" + + else if (isicon(value)) + #ifdef VARSICON + var/icon/I = new/icon(value) + var/rnd = rand(1,10000) + var/rname = "tmp\ref[I][rnd].png" + usr << browse_rsc(I, rname) + item = "[VV_HTML_ENCODE(name)] = ([value]) " + #else + item = "[VV_HTML_ENCODE(name)] = /icon ([value])" + #endif + +/* else if (istype(value, /image)) + #ifdef VARSICON + var/rnd = rand(1, 10000) + var/image/I = value + + src << browse_rsc(I.icon, "tmp\ref[value][rnd].png") + html += "[name] = " + #else + html += "[name] = /image ([value])" + #endif +*/ + else if (isfile(value)) + item = "[VV_HTML_ENCODE(name)] = '[value]'" + + //else if (istype(value, /client)) + // var/client/C = value + // item = "[VV_HTML_ENCODE(name)] \ref[value] = [C] [C.type]" + + else if (istype(value, /datum)) + var/datum/D = value + if ("[D]" != "[D.type]") //if the thing as a name var, lets use it. + item = "[VV_HTML_ENCODE(name)] \ref[value] = [D] [D.type]" + else + item = "[VV_HTML_ENCODE(name)] \ref[value] = [D.type]" + + else if (islist(value)) + var/list/L = value + var/list/items = list() + + if (L.len > 0 && !(name == "underlays" || name == "overlays" || L.len > (IS_NORMAL_LIST(L) ? 50 : 150))) + for (var/i in 1 to L.len) + var/key = L[i] + var/val + if (IS_NORMAL_LIST(L) && !isnum(key)) + val = L[key] + if (!val) + val = key + key = i + + items += debug_variable(key, val, level + 1, sanitize = sanitize) + + item = "[VV_HTML_ENCODE(name)] = /list ([L.len])
      [items.Join()]
    " + else + item = "[VV_HTML_ENCODE(name)] = /list ([L.len])" + + else + item = "[VV_HTML_ENCODE(name)] = [VV_HTML_ENCODE(value)]" + + return "[header][item]
  • " + +#undef VV_HTML_ENCODE + +/client/proc/view_var_Topic(href, href_list, hsrc) + if( (usr.client != src) || !src.holder ) + return + if(href_list["Vars"]) + debug_variables(locate(href_list["Vars"])) + + else if(href_list["datumrefresh"]) + var/datum/DAT = locate(href_list["datumrefresh"]) + if(!DAT) //can't be an istype() because /client etc aren't datums + return + src.debug_variables(DAT) + + else if(href_list["mob_player_panel"]) + if(!check_rights(0)) + return + var/mob/M = locate(href_list["mob_player_panel"]) in GLOB.mob_list - if(!istype(M)) - to_chat(usr, "This can only be used on instances of type /mob") - return - - src.holder.show_player_panel(M) - href_list["datumrefresh"] = href_list["mob_player_panel"] - - else if(href_list["godmode"]) - if(!check_rights(R_ADMIN)) - return - + if(!istype(M)) + to_chat(usr, "This can only be used on instances of type /mob") + return + + src.holder.show_player_panel(M) + href_list["datumrefresh"] = href_list["mob_player_panel"] + + else if(href_list["godmode"]) + if(!check_rights(R_ADMIN)) + return + var/mob/M = locate(href_list["godmode"]) in GLOB.mob_list - if(!istype(M)) - to_chat(usr, "This can only be used on instances of type /mob") - return - - src.cmd_admin_godmode(M) - href_list["datumrefresh"] = href_list["godmode"] - - else if(href_list["mark_object"]) - if(!check_rights(0)) - return - - var/datum/D = locate(href_list["mark_object"]) - if(!istype(D)) - to_chat(usr, "This can only be done to instances of type /datum") - return - - src.holder.marked_datum = D - href_list["datumrefresh"] = href_list["mark_object"] - - else if(href_list["proc_call"]) - if(!check_rights(0)) - return - - var/T = locate(href_list["proc_call"]) - - if(T) - callproc_datum(T) - - else if(href_list["delete"]) - if(!check_rights(R_DEBUG, 0)) - return - - var/datum/D = locate(href_list["delete"]) - if(!D) - to_chat(usr, "Unable to locate item!") - admin_delete(D) - href_list["datumrefresh"] = href_list["delete"] - - else if(href_list["regenerateicons"]) - if(!check_rights(0)) - return - + if(!istype(M)) + to_chat(usr, "This can only be used on instances of type /mob") + return + + src.cmd_admin_godmode(M) + href_list["datumrefresh"] = href_list["godmode"] + + else if(href_list["mark_object"]) + if(!check_rights(0)) + return + + var/datum/D = locate(href_list["mark_object"]) + if(!istype(D)) + to_chat(usr, "This can only be done to instances of type /datum") + return + + src.holder.marked_datum = D + href_list["datumrefresh"] = href_list["mark_object"] + + else if(href_list["proc_call"]) + if(!check_rights(0)) + return + + var/T = locate(href_list["proc_call"]) + + if(T) + callproc_datum(T) + + else if(href_list["delete"]) + if(!check_rights(R_DEBUG, 0)) + return + + var/datum/D = locate(href_list["delete"]) + if(!D) + to_chat(usr, "Unable to locate item!") + admin_delete(D) + href_list["datumrefresh"] = href_list["delete"] + + else if(href_list["regenerateicons"]) + if(!check_rights(0)) + return + var/mob/M = locate(href_list["regenerateicons"]) in GLOB.mob_list - if(!ismob(M)) - to_chat(usr, "This can only be done to instances of type /mob") - return - M.regenerate_icons() - -//Needs +VAREDIT past this point - - else if(check_rights(R_VAREDIT)) - - - //~CARN: for renaming mobs (updates their name, real_name, mind.name, their ID/PDA and datacore records). - - if(href_list["rename"]) - if(!check_rights(0)) - return - + if(!ismob(M)) + to_chat(usr, "This can only be done to instances of type /mob") + return + M.regenerate_icons() + else if(href_list["expose"]) + if(!check_rights(R_ADMIN, FALSE)) + return + var/thing = locate(href_list["expose"]) + if (!thing) + return + var/value = vv_get_value(VV_CLIENT) + if (value["class"] != VV_CLIENT) + return + var/client/C = value["value"] + if (!C) + return + var/prompt = alert("Do you want to grant [C] access to view this VV window? (they will not be able to edit or change anything nor open nested vv windows unless they themselves are an admin)", "Confirm", "Yes", "No") + if (prompt != "Yes" || !usr.client) + return + message_admins("[key_name_admin(usr)] Showed [key_name_admin(C)] a VV window") + log_admin("Admin [key_name(usr)] Showed [key_name(C)] a VV window of a [thing]") + to_chat(C, "[usr.client.holder.fakekey ? "an Administrator" : "[usr.client.key]"] has granted you access to view a View Variables window") + C.debug_variables(thing) + + +//Needs +VAREDIT past this point + + else if(check_rights(R_VAREDIT)) + + + //~CARN: for renaming mobs (updates their name, real_name, mind.name, their ID/PDA and datacore records). + + if(href_list["rename"]) + if(!check_rights(0)) + return + var/mob/M = locate(href_list["rename"]) in GLOB.mob_list - if(!istype(M)) - to_chat(usr, "This can only be used on instances of type /mob") - return - - var/new_name = stripped_input(usr,"What would you like to name this mob?","Input a name",M.real_name,MAX_NAME_LEN) - if( !new_name || !M ) - return - - message_admins("Admin [key_name_admin(usr)] renamed [key_name_admin(M)] to [new_name].") - M.fully_replace_character_name(M.real_name,new_name) - href_list["datumrefresh"] = href_list["rename"] - - else if(href_list["varnameedit"] && href_list["datumedit"]) - if(!check_rights(0)) - return - - var/D = locate(href_list["datumedit"]) + if(!istype(M)) + to_chat(usr, "This can only be used on instances of type /mob") + return + + var/new_name = stripped_input(usr,"What would you like to name this mob?","Input a name",M.real_name,MAX_NAME_LEN) + if( !new_name || !M ) + return + + message_admins("Admin [key_name_admin(usr)] renamed [key_name_admin(M)] to [new_name].") + M.fully_replace_character_name(M.real_name,new_name) + href_list["datumrefresh"] = href_list["rename"] + + else if(href_list["varnameedit"] && href_list["datumedit"]) + if(!check_rights(0)) + return + + var/D = locate(href_list["datumedit"]) if(!istype(D, /datum)) - to_chat(usr, "This can only be used on datums") - return - - modify_variables(D, href_list["varnameedit"], 1) - - else if(href_list["varnamechange"] && href_list["datumchange"]) - if(!check_rights(0)) - return - - var/D = locate(href_list["datumchange"]) + to_chat(usr, "This can only be used on datums") + return + + modify_variables(D, href_list["varnameedit"], 1) + + else if(href_list["varnamechange"] && href_list["datumchange"]) + if(!check_rights(0)) + return + + var/D = locate(href_list["datumchange"]) if(!istype(D, /datum)) - to_chat(usr, "This can only be used on datums") - return - - modify_variables(D, href_list["varnamechange"], 0) - - else if(href_list["varnamemass"] && href_list["datummass"]) - if(!check_rights(0)) - return - - var/datum/D = locate(href_list["datummass"]) - if(!istype(D)) - to_chat(usr, "This can only be used on instances of type /datum") - return - - cmd_mass_modify_object_variables(D, href_list["varnamemass"]) - - else if(href_list["listedit"] && href_list["index"]) - var/index = text2num(href_list["index"]) - if (!index) - return - - var/list/L = locate(href_list["listedit"]) - if (!istype(L)) - to_chat(usr, "This can only be used on instances of type /list") - return - - mod_list(L, null, "list", "contents", index, autodetect_class = TRUE) - - else if(href_list["listchange"] && href_list["index"]) - var/index = text2num(href_list["index"]) - if (!index) - return - - var/list/L = locate(href_list["listchange"]) - if (!istype(L)) - to_chat(usr, "This can only be used on instances of type /list") - return - - mod_list(L, null, "list", "contents", index, autodetect_class = FALSE) - - else if(href_list["listremove"] && href_list["index"]) - var/index = text2num(href_list["index"]) - if (!index) - return - - var/list/L = locate(href_list["listremove"]) - if (!istype(L)) - to_chat(usr, "This can only be used on instances of type /list") - return - - var/variable = L[index] - var/prompt = alert("Do you want to remove item number [index] from list?", "Confirm", "Yes", "No") - if (prompt != "Yes") - return - L.Cut(index, index+1) - log_world("### ListVarEdit by [src]: /list's contents: REMOVED=[html_encode("[variable]")]") - log_admin("[key_name(src)] modified list's contents: REMOVED=[variable]") - message_admins("[key_name_admin(src)] modified list's contents: REMOVED=[variable]") - - else if(href_list["listadd"]) - var/list/L = locate(href_list["listadd"]) - if (!istype(L)) - to_chat(usr, "This can only be used on instances of type /list") - return - - mod_list_add(L, null, "list", "contents") - - else if(href_list["listdupes"]) - var/list/L = locate(href_list["listdupes"]) - if (!istype(L)) - to_chat(usr, "This can only be used on instances of type /list") - return - - uniqueList_inplace(L) - log_world("### ListVarEdit by [src]: /list contents: CLEAR DUPES") - log_admin("[key_name(src)] modified list's contents: CLEAR DUPES") - message_admins("[key_name_admin(src)] modified list's contents: CLEAR DUPES") - - else if(href_list["listnulls"]) - var/list/L = locate(href_list["listnulls"]) - if (!istype(L)) - to_chat(usr, "This can only be used on instances of type /list") - return - - listclearnulls(L) - log_world("### ListVarEdit by [src]: /list contents: CLEAR NULLS") - log_admin("[key_name(src)] modified list's contents: CLEAR NULLS") - message_admins("[key_name_admin(src)] modified list's contents: CLEAR NULLS") - - else if(href_list["listlen"]) - var/list/L = locate(href_list["listlen"]) - if (!istype(L)) - to_chat(usr, "This can only be used on instances of type /list") - return - var/value = vv_get_value(VV_NUM) - if (value["class"] != VV_NUM) - return - - L.len = value["value"] - log_world("### ListVarEdit by [src]: /list len: [L.len]") - log_admin("[key_name(src)] modified list's len: [L.len]") - message_admins("[key_name_admin(src)] modified list's len: [L.len]") - - else if(href_list["listshuffle"]) - var/list/L = locate(href_list["listshuffle"]) - if (!istype(L)) - to_chat(usr, "This can only be used on instances of type /list") - return - - shuffle_inplace(L) - log_world("### ListVarEdit by [src]: /list contents: SHUFFLE") - log_admin("[key_name(src)] modified list's contents: SHUFFLE") - message_admins("[key_name_admin(src)] modified list's contents: SHUFFLE") - - else if(href_list["give_spell"]) - if(!check_rights(0)) - return - + to_chat(usr, "This can only be used on datums") + return + + modify_variables(D, href_list["varnamechange"], 0) + + else if(href_list["varnamemass"] && href_list["datummass"]) + if(!check_rights(0)) + return + + var/datum/D = locate(href_list["datummass"]) + if(!istype(D)) + to_chat(usr, "This can only be used on instances of type /datum") + return + + cmd_mass_modify_object_variables(D, href_list["varnamemass"]) + + else if(href_list["listedit"] && href_list["index"]) + var/index = text2num(href_list["index"]) + if (!index) + return + + var/list/L = locate(href_list["listedit"]) + if (!istype(L)) + to_chat(usr, "This can only be used on instances of type /list") + return + + mod_list(L, null, "list", "contents", index, autodetect_class = TRUE) + + else if(href_list["listchange"] && href_list["index"]) + var/index = text2num(href_list["index"]) + if (!index) + return + + var/list/L = locate(href_list["listchange"]) + if (!istype(L)) + to_chat(usr, "This can only be used on instances of type /list") + return + + mod_list(L, null, "list", "contents", index, autodetect_class = FALSE) + + else if(href_list["listremove"] && href_list["index"]) + var/index = text2num(href_list["index"]) + if (!index) + return + + var/list/L = locate(href_list["listremove"]) + if (!istype(L)) + to_chat(usr, "This can only be used on instances of type /list") + return + + var/variable = L[index] + var/prompt = alert("Do you want to remove item number [index] from list?", "Confirm", "Yes", "No") + if (prompt != "Yes") + return + L.Cut(index, index+1) + log_world("### ListVarEdit by [src]: /list's contents: REMOVED=[html_encode("[variable]")]") + log_admin("[key_name(src)] modified list's contents: REMOVED=[variable]") + message_admins("[key_name_admin(src)] modified list's contents: REMOVED=[variable]") + + else if(href_list["listadd"]) + var/list/L = locate(href_list["listadd"]) + if (!istype(L)) + to_chat(usr, "This can only be used on instances of type /list") + return + + mod_list_add(L, null, "list", "contents") + + else if(href_list["listdupes"]) + var/list/L = locate(href_list["listdupes"]) + if (!istype(L)) + to_chat(usr, "This can only be used on instances of type /list") + return + + uniqueList_inplace(L) + log_world("### ListVarEdit by [src]: /list contents: CLEAR DUPES") + log_admin("[key_name(src)] modified list's contents: CLEAR DUPES") + message_admins("[key_name_admin(src)] modified list's contents: CLEAR DUPES") + + else if(href_list["listnulls"]) + var/list/L = locate(href_list["listnulls"]) + if (!istype(L)) + to_chat(usr, "This can only be used on instances of type /list") + return + + listclearnulls(L) + log_world("### ListVarEdit by [src]: /list contents: CLEAR NULLS") + log_admin("[key_name(src)] modified list's contents: CLEAR NULLS") + message_admins("[key_name_admin(src)] modified list's contents: CLEAR NULLS") + + else if(href_list["listlen"]) + var/list/L = locate(href_list["listlen"]) + if (!istype(L)) + to_chat(usr, "This can only be used on instances of type /list") + return + var/value = vv_get_value(VV_NUM) + if (value["class"] != VV_NUM) + return + + L.len = value["value"] + log_world("### ListVarEdit by [src]: /list len: [L.len]") + log_admin("[key_name(src)] modified list's len: [L.len]") + message_admins("[key_name_admin(src)] modified list's len: [L.len]") + + else if(href_list["listshuffle"]) + var/list/L = locate(href_list["listshuffle"]) + if (!istype(L)) + to_chat(usr, "This can only be used on instances of type /list") + return + + shuffle_inplace(L) + log_world("### ListVarEdit by [src]: /list contents: SHUFFLE") + log_admin("[key_name(src)] modified list's contents: SHUFFLE") + message_admins("[key_name_admin(src)] modified list's contents: SHUFFLE") + + else if(href_list["give_spell"]) + if(!check_rights(0)) + return + var/mob/M = locate(href_list["give_spell"]) in GLOB.mob_list - if(!istype(M)) - to_chat(usr, "This can only be used on instances of type /mob") - return - - src.give_spell(M) - href_list["datumrefresh"] = href_list["give_spell"] - - else if(href_list["remove_spell"]) - if(!check_rights(0)) - return - + if(!istype(M)) + to_chat(usr, "This can only be used on instances of type /mob") + return + + src.give_spell(M) + href_list["datumrefresh"] = href_list["give_spell"] + + else if(href_list["remove_spell"]) + if(!check_rights(0)) + return + var/mob/M = locate(href_list["remove_spell"]) in GLOB.mob_list - if(!istype(M)) - to_chat(usr, "This can only be used on instances of type /mob") - return - - remove_spell(M) - href_list["datumrefresh"] = href_list["remove_spell"] - - else if(href_list["give_disease"]) - if(!check_rights(0)) - return - + if(!istype(M)) + to_chat(usr, "This can only be used on instances of type /mob") + return + + remove_spell(M) + href_list["datumrefresh"] = href_list["remove_spell"] + + else if(href_list["give_disease"]) + if(!check_rights(0)) + return + var/mob/M = locate(href_list["give_disease"]) in GLOB.mob_list - if(!istype(M)) - to_chat(usr, "This can only be used on instances of type /mob") - return - - src.give_disease(M) - href_list["datumrefresh"] = href_list["give_spell"] - - else if(href_list["gib"]) - if(!check_rights(R_FUN)) - return - + if(!istype(M)) + to_chat(usr, "This can only be used on instances of type /mob") + return + + src.give_disease(M) + href_list["datumrefresh"] = href_list["give_spell"] + + else if(href_list["gib"]) + if(!check_rights(R_FUN)) + return + var/mob/M = locate(href_list["gib"]) in GLOB.mob_list - if(!istype(M)) - to_chat(usr, "This can only be used on instances of type /mob") - return - - src.cmd_admin_gib(M) - - else if(href_list["build_mode"]) - if(!check_rights(R_BUILDMODE)) - return - + if(!istype(M)) + to_chat(usr, "This can only be used on instances of type /mob") + return + + src.cmd_admin_gib(M) + + else if(href_list["build_mode"]) + if(!check_rights(R_BUILDMODE)) + return + var/mob/M = locate(href_list["build_mode"]) in GLOB.mob_list - if(!istype(M)) - to_chat(usr, "This can only be used on instances of type /mob") - return - - togglebuildmode(M) - href_list["datumrefresh"] = href_list["build_mode"] - - else if(href_list["drop_everything"]) - if(!check_rights(0)) - return - + if(!istype(M)) + to_chat(usr, "This can only be used on instances of type /mob") + return + + togglebuildmode(M) + href_list["datumrefresh"] = href_list["build_mode"] + + else if(href_list["drop_everything"]) + if(!check_rights(0)) + return + var/mob/M = locate(href_list["drop_everything"]) in GLOB.mob_list - if(!istype(M)) - to_chat(usr, "This can only be used on instances of type /mob") - return - - if(usr.client) - usr.client.cmd_admin_drop_everything(M) - - else if(href_list["direct_control"]) - if(!check_rights(0)) - return - + if(!istype(M)) + to_chat(usr, "This can only be used on instances of type /mob") + return + + if(usr.client) + usr.client.cmd_admin_drop_everything(M) + + else if(href_list["direct_control"]) + if(!check_rights(0)) + return + var/mob/M = locate(href_list["direct_control"]) in GLOB.mob_list - if(!istype(M)) - to_chat(usr, "This can only be used on instances of type /mob") - return - - if(usr.client) - usr.client.cmd_assume_direct_control(M) - - else if(href_list["offer_control"]) - if(!check_rights(0)) - return - + if(!istype(M)) + to_chat(usr, "This can only be used on instances of type /mob") + return + + if(usr.client) + usr.client.cmd_assume_direct_control(M) + + else if(href_list["offer_control"]) + if(!check_rights(0)) + return + var/mob/M = locate(href_list["offer_control"]) in GLOB.mob_list - if(!istype(M)) - to_chat(usr, "This can only be used on instances of type /mob") - return - offer_control(M) - - else if(href_list["delall"]) - if(!check_rights(R_DEBUG|R_SERVER)) - return - - var/obj/O = locate(href_list["delall"]) - if(!isobj(O)) - to_chat(usr, "This can only be used on instances of type /obj") - return - - var/action_type = alert("Strict type ([O.type]) or type and all subtypes?",,"Strict type","Type and subtypes","Cancel") - if(action_type == "Cancel" || !action_type) - return - - if(alert("Are you really sure you want to delete all objects of type [O.type]?",,"Yes","No") != "Yes") - return - - if(alert("Second confirmation required. Delete?",,"Yes","No") != "Yes") - return - - var/O_type = O.type - switch(action_type) - if("Strict type") - var/i = 0 - for(var/obj/Obj in world) - if(Obj.type == O_type) - i++ - qdel(Obj) - CHECK_TICK - if(!i) - to_chat(usr, "No objects of this type exist") - return - log_admin("[key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) ") - message_admins("[key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) ") - if("Type and subtypes") - var/i = 0 - for(var/obj/Obj in world) - if(istype(Obj,O_type)) - i++ - qdel(Obj) - CHECK_TICK - if(!i) - to_chat(usr, "No objects of this type exist") - return - log_admin("[key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ") - message_admins("[key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ") - - else if(href_list["addreagent"]) - if(!check_rights(0)) - return - - var/atom/A = locate(href_list["addreagent"]) - - if(!A.reagents) - var/amount = input(usr, "Specify the reagent size of [A]", "Set Reagent Size", 50) as num - if(amount) - A.create_reagents(amount) - - if(A.reagents) - var/chosen_id - var/list/reagent_options = sortList(GLOB.chemical_reagents_list) - switch(alert(usr, "Choose a method.", "Add Reagents", "Enter ID", "Choose ID")) - if("Enter ID") - var/valid_id - while(!valid_id) - chosen_id = stripped_input(usr, "Enter the ID of the reagent you want to add.") - if(!chosen_id) //Get me out of here! - break - for(var/ID in reagent_options) - if(ID == chosen_id) - valid_id = 1 - if(!valid_id) - to_chat(usr, "A reagent with that ID doesn't exist!") - if("Choose ID") - chosen_id = input(usr, "Choose a reagent to add.", "Choose a reagent.") as null|anything in reagent_options - if(chosen_id) - var/amount = input(usr, "Choose the amount to add.", "Choose the amount.", A.reagents.maximum_volume) as num - if(amount) - A.reagents.add_reagent(chosen_id, amount) - log_admin("[key_name(usr)] has added [amount] units of [chosen_id] to \the [A]") - message_admins("[key_name(usr)] has added [amount] units of [chosen_id] to \the [A]") - - href_list["datumrefresh"] = href_list["addreagent"] - - else if(href_list["explode"]) - if(!check_rights(R_FUN)) - return - - var/atom/A = locate(href_list["explode"]) - if(!isobj(A) && !ismob(A) && !isturf(A)) - to_chat(usr, "This can only be done to instances of type /obj, /mob and /turf") - return - - src.cmd_admin_explosion(A) - href_list["datumrefresh"] = href_list["explode"] - - else if(href_list["emp"]) - if(!check_rights(R_FUN)) - return - - var/atom/A = locate(href_list["emp"]) - if(!isobj(A) && !ismob(A) && !isturf(A)) - to_chat(usr, "This can only be done to instances of type /obj, /mob and /turf") - return - - src.cmd_admin_emp(A) - href_list["datumrefresh"] = href_list["emp"] - - else if(href_list["rotatedatum"]) - if(!check_rights(0)) - return - - var/atom/A = locate(href_list["rotatedatum"]) - if(!istype(A)) - to_chat(usr, "This can only be done to instances of type /atom") - return - - switch(href_list["rotatedir"]) - if("right") - A.setDir(turn(A.dir, -45)) - if("left") - A.setDir(turn(A.dir, 45)) - href_list["datumrefresh"] = href_list["rotatedatum"] - - else if(href_list["editorgans"]) - if(!check_rights(0)) - return - + if(!istype(M)) + to_chat(usr, "This can only be used on instances of type /mob") + return + offer_control(M) + + else if(href_list["delall"]) + if(!check_rights(R_DEBUG|R_SERVER)) + return + + var/obj/O = locate(href_list["delall"]) + if(!isobj(O)) + to_chat(usr, "This can only be used on instances of type /obj") + return + + var/action_type = alert("Strict type ([O.type]) or type and all subtypes?",,"Strict type","Type and subtypes","Cancel") + if(action_type == "Cancel" || !action_type) + return + + if(alert("Are you really sure you want to delete all objects of type [O.type]?",,"Yes","No") != "Yes") + return + + if(alert("Second confirmation required. Delete?",,"Yes","No") != "Yes") + return + + var/O_type = O.type + switch(action_type) + if("Strict type") + var/i = 0 + for(var/obj/Obj in world) + if(Obj.type == O_type) + i++ + qdel(Obj) + CHECK_TICK + if(!i) + to_chat(usr, "No objects of this type exist") + return + log_admin("[key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) ") + message_admins("[key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) ") + if("Type and subtypes") + var/i = 0 + for(var/obj/Obj in world) + if(istype(Obj,O_type)) + i++ + qdel(Obj) + CHECK_TICK + if(!i) + to_chat(usr, "No objects of this type exist") + return + log_admin("[key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ") + message_admins("[key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ") + + else if(href_list["addreagent"]) + if(!check_rights(0)) + return + + var/atom/A = locate(href_list["addreagent"]) + + if(!A.reagents) + var/amount = input(usr, "Specify the reagent size of [A]", "Set Reagent Size", 50) as num + if(amount) + A.create_reagents(amount) + + if(A.reagents) + var/chosen_id + var/list/reagent_options = sortList(GLOB.chemical_reagents_list) + switch(alert(usr, "Choose a method.", "Add Reagents", "Enter ID", "Choose ID")) + if("Enter ID") + var/valid_id + while(!valid_id) + chosen_id = stripped_input(usr, "Enter the ID of the reagent you want to add.") + if(!chosen_id) //Get me out of here! + break + for(var/ID in reagent_options) + if(ID == chosen_id) + valid_id = 1 + if(!valid_id) + to_chat(usr, "A reagent with that ID doesn't exist!") + if("Choose ID") + chosen_id = input(usr, "Choose a reagent to add.", "Choose a reagent.") as null|anything in reagent_options + if(chosen_id) + var/amount = input(usr, "Choose the amount to add.", "Choose the amount.", A.reagents.maximum_volume) as num + if(amount) + A.reagents.add_reagent(chosen_id, amount) + log_admin("[key_name(usr)] has added [amount] units of [chosen_id] to \the [A]") + message_admins("[key_name(usr)] has added [amount] units of [chosen_id] to \the [A]") + + href_list["datumrefresh"] = href_list["addreagent"] + + else if(href_list["explode"]) + if(!check_rights(R_FUN)) + return + + var/atom/A = locate(href_list["explode"]) + if(!isobj(A) && !ismob(A) && !isturf(A)) + to_chat(usr, "This can only be done to instances of type /obj, /mob and /turf") + return + + src.cmd_admin_explosion(A) + href_list["datumrefresh"] = href_list["explode"] + + else if(href_list["emp"]) + if(!check_rights(R_FUN)) + return + + var/atom/A = locate(href_list["emp"]) + if(!isobj(A) && !ismob(A) && !isturf(A)) + to_chat(usr, "This can only be done to instances of type /obj, /mob and /turf") + return + + src.cmd_admin_emp(A) + href_list["datumrefresh"] = href_list["emp"] + + else if(href_list["rotatedatum"]) + if(!check_rights(0)) + return + + var/atom/A = locate(href_list["rotatedatum"]) + if(!istype(A)) + to_chat(usr, "This can only be done to instances of type /atom") + return + + switch(href_list["rotatedir"]) + if("right") + A.setDir(turn(A.dir, -45)) + if("left") + A.setDir(turn(A.dir, 45)) + href_list["datumrefresh"] = href_list["rotatedatum"] + + else if(href_list["editorgans"]) + if(!check_rights(0)) + return + var/mob/living/carbon/C = locate(href_list["editorgans"]) in GLOB.mob_list - if(!istype(C)) - to_chat(usr, "This can only be done to instances of type /mob/living/carbon") - return - - manipulate_organs(C) - href_list["datumrefresh"] = href_list["editorgans"] - + if(!istype(C)) + to_chat(usr, "This can only be done to instances of type /mob/living/carbon") + return + + manipulate_organs(C) + href_list["datumrefresh"] = href_list["editorgans"] + else if(href_list["hallucinate"]) if(!check_rights(0)) return @@ -949,238 +970,238 @@ if(result) new result(C, TRUE) - else if(href_list["makehuman"]) - if(!check_rights(R_SPAWN)) - return - + else if(href_list["makehuman"]) + if(!check_rights(R_SPAWN)) + return + var/mob/living/carbon/monkey/Mo = locate(href_list["makehuman"]) in GLOB.mob_list - if(!istype(Mo)) - to_chat(usr, "This can only be done to instances of type /mob/living/carbon/monkey") - return - - if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") - return - if(!Mo) - to_chat(usr, "Mob doesn't exist anymore") - return - holder.Topic(href, list("humanone"=href_list["makehuman"])) - - else if(href_list["makemonkey"]) - if(!check_rights(R_SPAWN)) - return - + if(!istype(Mo)) + to_chat(usr, "This can only be done to instances of type /mob/living/carbon/monkey") + return + + if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") + return + if(!Mo) + to_chat(usr, "Mob doesn't exist anymore") + return + holder.Topic(href, list("humanone"=href_list["makehuman"])) + + else if(href_list["makemonkey"]) + if(!check_rights(R_SPAWN)) + return + var/mob/living/carbon/human/H = locate(href_list["makemonkey"]) in GLOB.mob_list - if(!istype(H)) - to_chat(usr, "This can only be done to instances of type /mob/living/carbon/human") - return - - if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") - return - if(!H) - to_chat(usr, "Mob doesn't exist anymore") - return - holder.Topic(href, list("monkeyone"=href_list["makemonkey"])) - - else if(href_list["makerobot"]) - if(!check_rights(R_SPAWN)) - return - + if(!istype(H)) + to_chat(usr, "This can only be done to instances of type /mob/living/carbon/human") + return + + if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") + return + if(!H) + to_chat(usr, "Mob doesn't exist anymore") + return + holder.Topic(href, list("monkeyone"=href_list["makemonkey"])) + + else if(href_list["makerobot"]) + if(!check_rights(R_SPAWN)) + return + var/mob/living/carbon/human/H = locate(href_list["makerobot"]) in GLOB.mob_list - if(!istype(H)) - to_chat(usr, "This can only be done to instances of type /mob/living/carbon/human") - return - - if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") - return - if(!H) - to_chat(usr, "Mob doesn't exist anymore") - return - holder.Topic(href, list("makerobot"=href_list["makerobot"])) - - else if(href_list["makealien"]) - if(!check_rights(R_SPAWN)) - return - + if(!istype(H)) + to_chat(usr, "This can only be done to instances of type /mob/living/carbon/human") + return + + if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") + return + if(!H) + to_chat(usr, "Mob doesn't exist anymore") + return + holder.Topic(href, list("makerobot"=href_list["makerobot"])) + + else if(href_list["makealien"]) + if(!check_rights(R_SPAWN)) + return + var/mob/living/carbon/human/H = locate(href_list["makealien"]) in GLOB.mob_list - if(!istype(H)) - to_chat(usr, "This can only be done to instances of type /mob/living/carbon/human") - return - - if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") - return - if(!H) - to_chat(usr, "Mob doesn't exist anymore") - return - holder.Topic(href, list("makealien"=href_list["makealien"])) - - else if(href_list["makeslime"]) - if(!check_rights(R_SPAWN)) - return - + if(!istype(H)) + to_chat(usr, "This can only be done to instances of type /mob/living/carbon/human") + return + + if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") + return + if(!H) + to_chat(usr, "Mob doesn't exist anymore") + return + holder.Topic(href, list("makealien"=href_list["makealien"])) + + else if(href_list["makeslime"]) + if(!check_rights(R_SPAWN)) + return + var/mob/living/carbon/human/H = locate(href_list["makeslime"]) in GLOB.mob_list - if(!istype(H)) - to_chat(usr, "This can only be done to instances of type /mob/living/carbon/human") - return - - if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") - return - if(!H) - to_chat(usr, "Mob doesn't exist anymore") - return - holder.Topic(href, list("makeslime"=href_list["makeslime"])) - - else if(href_list["makeai"]) - if(!check_rights(R_SPAWN)) - return - + if(!istype(H)) + to_chat(usr, "This can only be done to instances of type /mob/living/carbon/human") + return + + if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") + return + if(!H) + to_chat(usr, "Mob doesn't exist anymore") + return + holder.Topic(href, list("makeslime"=href_list["makeslime"])) + + else if(href_list["makeai"]) + if(!check_rights(R_SPAWN)) + return + var/mob/living/carbon/H = locate(href_list["makeai"]) in GLOB.mob_list - if(!istype(H)) - to_chat(usr, "This can only be done to instances of type /mob/living/carbon") - return - - if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") - return - if(!H) - to_chat(usr, "Mob doesn't exist anymore") - return - holder.Topic(href, list("makeai"=href_list["makeai"])) - - else if(href_list["setspecies"]) - if(!check_rights(R_SPAWN)) - return - + if(!istype(H)) + to_chat(usr, "This can only be done to instances of type /mob/living/carbon") + return + + if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") + return + if(!H) + to_chat(usr, "Mob doesn't exist anymore") + return + holder.Topic(href, list("makeai"=href_list["makeai"])) + + else if(href_list["setspecies"]) + if(!check_rights(R_SPAWN)) + return + var/mob/living/carbon/human/H = locate(href_list["setspecies"]) in GLOB.mob_list - if(!istype(H)) - to_chat(usr, "This can only be done to instances of type /mob/living/carbon/human") - return - - var/result = input(usr, "Please choose a new species","Species") as null|anything in GLOB.species_list - - if(!H) - to_chat(usr, "Mob doesn't exist anymore") - return - - if(result) - var/newtype = GLOB.species_list[result] - admin_ticket_log("[key_name_admin(usr)] has modified the bodyparts of [H] to [result]") - H.set_species(newtype) - - else if(href_list["editbodypart"]) - if(!check_rights(R_SPAWN)) - return - + if(!istype(H)) + to_chat(usr, "This can only be done to instances of type /mob/living/carbon/human") + return + + var/result = input(usr, "Please choose a new species","Species") as null|anything in GLOB.species_list + + if(!H) + to_chat(usr, "Mob doesn't exist anymore") + return + + if(result) + var/newtype = GLOB.species_list[result] + admin_ticket_log("[key_name_admin(usr)] has modified the bodyparts of [H] to [result]") + H.set_species(newtype) + + else if(href_list["editbodypart"]) + if(!check_rights(R_SPAWN)) + return + var/mob/living/carbon/C = locate(href_list["editbodypart"]) in GLOB.mob_list - if(!istype(C)) - to_chat(usr, "This can only be done to instances of type /mob/living/carbon") - return - - var/edit_action = input(usr, "What would you like to do?","Modify Body Part") as null|anything in list("add","remove", "augment") - if(!edit_action) - return - var/list/limb_list = list("head", "l_arm", "r_arm", "l_leg", "r_leg") - if(edit_action == "augment") - limb_list += "chest" - var/result = input(usr, "Please choose which body part to [edit_action]","[capitalize(edit_action)] Body Part") as null|anything in limb_list - - if(!C) - to_chat(usr, "Mob doesn't exist anymore") - return - - if(result) - var/obj/item/bodypart/BP = C.get_bodypart(result) - switch(edit_action) - if("remove") - if(BP) - BP.drop_limb() - else - to_chat(usr, "[C] doesn't have such bodypart.") - if("add") - if(BP) - to_chat(usr, "[C] already has such bodypart.") - else - if(!C.regenerate_limb(result)) - to_chat(usr, "[C] cannot have such bodypart.") - if("augment") - if(ishuman(C)) - if(BP) - BP.change_bodypart_status(BODYPART_ROBOTIC, TRUE, TRUE) - else - to_chat(usr, "[C] doesn't have such bodypart.") - else - to_chat(usr, "Only humans can be augmented.") - admin_ticket_log("[key_name_admin(usr)] has modified the bodyparts of [C]") - - - else if(href_list["purrbation"]) - if(!check_rights(R_SPAWN)) - return - + if(!istype(C)) + to_chat(usr, "This can only be done to instances of type /mob/living/carbon") + return + + var/edit_action = input(usr, "What would you like to do?","Modify Body Part") as null|anything in list("add","remove", "augment") + if(!edit_action) + return + var/list/limb_list = list("head", "l_arm", "r_arm", "l_leg", "r_leg") + if(edit_action == "augment") + limb_list += "chest" + var/result = input(usr, "Please choose which body part to [edit_action]","[capitalize(edit_action)] Body Part") as null|anything in limb_list + + if(!C) + to_chat(usr, "Mob doesn't exist anymore") + return + + if(result) + var/obj/item/bodypart/BP = C.get_bodypart(result) + switch(edit_action) + if("remove") + if(BP) + BP.drop_limb() + else + to_chat(usr, "[C] doesn't have such bodypart.") + if("add") + if(BP) + to_chat(usr, "[C] already has such bodypart.") + else + if(!C.regenerate_limb(result)) + to_chat(usr, "[C] cannot have such bodypart.") + if("augment") + if(ishuman(C)) + if(BP) + BP.change_bodypart_status(BODYPART_ROBOTIC, TRUE, TRUE) + else + to_chat(usr, "[C] doesn't have such bodypart.") + else + to_chat(usr, "Only humans can be augmented.") + admin_ticket_log("[key_name_admin(usr)] has modified the bodyparts of [C]") + + + else if(href_list["purrbation"]) + if(!check_rights(R_SPAWN)) + return + var/mob/living/carbon/human/H = locate(href_list["purrbation"]) in GLOB.mob_list - if(!istype(H)) - to_chat(usr, "This can only be done to instances of type /mob/living/carbon/human") - return - if(!ishumanbasic(H)) - to_chat(usr, "This can only be done to the basic human species at the moment.") - return - - if(!H) - to_chat(usr, "Mob doesn't exist anymore") - return - - var/success = purrbation_toggle(H) - if(success) - to_chat(usr, "Put [H] on purrbation.") - log_admin("[key_name(usr)] has put [key_name(H)] on purrbation.") - var/msg = "[key_name_admin(usr)] has put [key_name(H)] on purrbation." - message_admins(msg) - admin_ticket_log(H, msg) - - else - to_chat(usr, "Removed [H] from purrbation.") - log_admin("[key_name(usr)] has removed [key_name(H)] from purrbation.") - var/msg = "[key_name_admin(usr)] has removed [key_name(H)] from purrbation." - message_admins(msg) - admin_ticket_log(H, msg) - - else if(href_list["adjustDamage"] && href_list["mobToDamage"]) - if(!check_rights(0)) - return - + if(!istype(H)) + to_chat(usr, "This can only be done to instances of type /mob/living/carbon/human") + return + if(!ishumanbasic(H)) + to_chat(usr, "This can only be done to the basic human species at the moment.") + return + + if(!H) + to_chat(usr, "Mob doesn't exist anymore") + return + + var/success = purrbation_toggle(H) + if(success) + to_chat(usr, "Put [H] on purrbation.") + log_admin("[key_name(usr)] has put [key_name(H)] on purrbation.") + var/msg = "[key_name_admin(usr)] has put [key_name(H)] on purrbation." + message_admins(msg) + admin_ticket_log(H, msg) + + else + to_chat(usr, "Removed [H] from purrbation.") + log_admin("[key_name(usr)] has removed [key_name(H)] from purrbation.") + var/msg = "[key_name_admin(usr)] has removed [key_name(H)] from purrbation." + message_admins(msg) + admin_ticket_log(H, msg) + + else if(href_list["adjustDamage"] && href_list["mobToDamage"]) + if(!check_rights(0)) + return + var/mob/living/L = locate(href_list["mobToDamage"]) in GLOB.mob_list - if(!istype(L)) - return - - var/Text = href_list["adjustDamage"] - - var/amount = input("Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) as num - - if(!L) - to_chat(usr, "Mob doesn't exist anymore") - return - - switch(Text) - if("brute") - L.adjustBruteLoss(amount) - if("fire") - L.adjustFireLoss(amount) - if("toxin") - L.adjustToxLoss(amount) - if("oxygen") - L.adjustOxyLoss(amount) - if("brain") - L.adjustBrainLoss(amount) - if("clone") - L.adjustCloneLoss(amount) - if("stamina") - L.adjustStaminaLoss(amount) - else - to_chat(usr, "You caused an error. DEBUG: Text:[Text] Mob:[L]") - return - - if(amount != 0) - log_admin("[key_name(usr)] dealt [amount] amount of [Text] damage to [L] ") - var/msg = "[key_name(usr)] dealt [amount] amount of [Text] damage to [L] " - message_admins(msg) - admin_ticket_log(L, msg) - href_list["datumrefresh"] = href_list["mobToDamage"] - + if(!istype(L)) + return + + var/Text = href_list["adjustDamage"] + + var/amount = input("Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) as num + + if(!L) + to_chat(usr, "Mob doesn't exist anymore") + return + + switch(Text) + if("brute") + L.adjustBruteLoss(amount) + if("fire") + L.adjustFireLoss(amount) + if("toxin") + L.adjustToxLoss(amount) + if("oxygen") + L.adjustOxyLoss(amount) + if("brain") + L.adjustBrainLoss(amount) + if("clone") + L.adjustCloneLoss(amount) + if("stamina") + L.adjustStaminaLoss(amount) + else + to_chat(usr, "You caused an error. DEBUG: Text:[Text] Mob:[L]") + return + + if(amount != 0) + log_admin("[key_name(usr)] dealt [amount] amount of [Text] damage to [L] ") + var/msg = "[key_name(usr)] dealt [amount] amount of [Text] damage to [L] " + message_admins(msg) + admin_ticket_log(L, msg) + href_list["datumrefresh"] = href_list["mobToDamage"] + diff --git a/code/datums/diseases/advance/presets.dm b/code/datums/diseases/advance/presets.dm index 07809d3555..1a197f0f34 100644 --- a/code/datums/diseases/advance/presets.dm +++ b/code/datums/diseases/advance/presets.dm @@ -34,20 +34,20 @@ ..(process, D, copy) -// Hullucigen +// Hallucigen -/datum/disease/advance/hullucigen/New(var/process = TRUE, var/datum/disease/advance/D, var/copy = FALSE) +/datum/disease/advance/hallucigen/New(var/process = TRUE, var/datum/disease/advance/D, var/copy = FALSE) if(!D) - name = "Reality Impairment" + name = "Second Sight" symptoms = list(new/datum/symptom/hallucigen) ..(process, D, copy) // Sensory Restoration -/datum/disease/advance/sensory_restoration/New(var/process = TRUE, var/datum/disease/advance/D, var/copy = FALSE) +/datum/disease/advance/mind_restoration/New(var/process = TRUE, var/datum/disease/advance/D, var/copy = FALSE) if(!D) - name = "Reality Enhancer" - symptoms = list(new/datum/symptom/sensory_restoration) + name = "Intelligence Booster" + symptoms = list(new/datum/symptom/mind_restoration) ..(process, D, copy) // Sensory Destruction diff --git a/code/datums/diseases/advance/symptoms/beard.dm b/code/datums/diseases/advance/symptoms/beard.dm index 2f8635301e..aa3919f3cf 100644 --- a/code/datums/diseases/advance/symptoms/beard.dm +++ b/code/datums/diseases/advance/symptoms/beard.dm @@ -17,6 +17,7 @@ BONUS /datum/symptom/beard name = "Facial Hypertrichosis" + desc = "The virus increases hair production significantly, causing rapid beard growth." stealth = -3 resistance = -1 stage_speed = -3 diff --git a/code/datums/diseases/advance/symptoms/choking.dm b/code/datums/diseases/advance/symptoms/choking.dm index a46ef690ef..f7f998f2b1 100644 --- a/code/datums/diseases/advance/symptoms/choking.dm +++ b/code/datums/diseases/advance/symptoms/choking.dm @@ -18,6 +18,7 @@ Bonus /datum/symptom/choking name = "Choking" + desc = "The virus causes inflammation of the host's air conduits, leading to intermittent choking." stealth = -3 resistance = -2 stage_speed = -2 @@ -27,6 +28,8 @@ Bonus base_message_chance = 15 symptom_delay_min = 10 symptom_delay_max = 30 + threshold_desc = "Stage Speed 8: Causes choking more frequently.
    \ + Stealth 4: The symptom remains hidden until active." /datum/symptom/choking/Start(datum/disease/advance/A) ..() @@ -84,6 +87,7 @@ Bonus /datum/symptom/asphyxiation name = "Acute respiratory distress syndrome" + desc = "The virus causes shrinking of the host's lungs, causing severe asphyxiation. May also lead to heart attacks." stealth = -2 resistance = -0 stage_speed = -1 diff --git a/code/datums/diseases/advance/symptoms/confusion.dm b/code/datums/diseases/advance/symptoms/confusion.dm index 45bf5d6182..2e252267c4 100644 --- a/code/datums/diseases/advance/symptoms/confusion.dm +++ b/code/datums/diseases/advance/symptoms/confusion.dm @@ -18,6 +18,7 @@ Bonus /datum/symptom/confusion name = "Confusion" + desc = "The virus interferes with the proper function of the neural system, leading to bouts of confusion and erratic movement." stealth = 1 resistance = -1 stage_speed = -3 @@ -28,6 +29,9 @@ Bonus symptom_delay_min = 10 symptom_delay_max = 30 var/brain_damage = FALSE + threshold_desc = "Resistance 6: Causes brain damage over time.
    \ + Transmission 6: Increases confusion duration.
    \ + Stealth 4: The symptom remains hidden until active." /datum/symptom/confusion/Start(datum/disease/advance/A) ..() diff --git a/code/datums/diseases/advance/symptoms/cough.dm b/code/datums/diseases/advance/symptoms/cough.dm index a05d1d5e88..95577fe351 100644 --- a/code/datums/diseases/advance/symptoms/cough.dm +++ b/code/datums/diseases/advance/symptoms/cough.dm @@ -18,6 +18,7 @@ BONUS /datum/symptom/cough name = "Cough" + desc = "The virus irritates the throat of the host, causing occasional coughing." stealth = -1 resistance = 3 stage_speed = 1 @@ -28,6 +29,11 @@ BONUS symptom_delay_min = 2 symptom_delay_max = 15 var/infective = FALSE + threshold_desc = "Resistance 3: Host will drop small items when coughing.
    \ + Resistance 10: Occasionally causes coughing fits that stun the host.
    \ + Stage Speed 6: Increases cough frequency.
    \ + If Airborne: Coughing will infect bystanders.
    \ + Stealth 4: The symptom remains hidden until active." /datum/symptom/cough/Start(datum/disease/advance/A) ..() diff --git a/code/datums/diseases/advance/symptoms/deafness.dm b/code/datums/diseases/advance/symptoms/deafness.dm index b6163a72a1..c43970563d 100644 --- a/code/datums/diseases/advance/symptoms/deafness.dm +++ b/code/datums/diseases/advance/symptoms/deafness.dm @@ -18,6 +18,7 @@ Bonus /datum/symptom/deafness name = "Deafness" + desc = "The virus causes inflammation of the eardrums, causing intermittent deafness." stealth = -1 resistance = -2 stage_speed = -1 @@ -27,6 +28,8 @@ Bonus base_message_chance = 100 symptom_delay_min = 25 symptom_delay_max = 80 + threshold_desc = "Resistance 9: Causes permanent deafness, instead of intermittent.
    \ + Stealth 4: The symptom remains hidden until active." /datum/symptom/deafness/Start(datum/disease/advance/A) ..() diff --git a/code/datums/diseases/advance/symptoms/dizzy.dm b/code/datums/diseases/advance/symptoms/dizzy.dm index 60e9989d4a..cb1bf11e63 100644 --- a/code/datums/diseases/advance/symptoms/dizzy.dm +++ b/code/datums/diseases/advance/symptoms/dizzy.dm @@ -18,7 +18,7 @@ Bonus /datum/symptom/dizzy // Not the egg name = "Dizziness" - stealth = 2 + desc = "The virus causes inflammation of the vestibular system, leading to bouts of dizziness." resistance = -2 stage_speed = -3 transmittable = -1 @@ -27,6 +27,8 @@ Bonus base_message_chance = 50 symptom_delay_min = 15 symptom_delay_max = 40 + threshold_desc = "Transmission 6: Also causes druggy vision.
    \ + Stealth 4: The symptom remains hidden until active." /datum/symptom/dizzy/Start(datum/disease/advance/A) ..() diff --git a/code/datums/diseases/advance/symptoms/fever.dm b/code/datums/diseases/advance/symptoms/fever.dm index e69c3bf0a2..673835b0ed 100644 --- a/code/datums/diseases/advance/symptoms/fever.dm +++ b/code/datums/diseases/advance/symptoms/fever.dm @@ -16,8 +16,8 @@ Bonus */ /datum/symptom/fever - name = "Fever" + desc = "The virus causes a febrile response from the host, raising its body temperature." stealth = 0 resistance = 3 stage_speed = 3 @@ -28,6 +28,8 @@ Bonus symptom_delay_min = 10 symptom_delay_max = 30 var/unsafe = FALSE //over the heat threshold + threshold_desc = "Resistance 5: Increases fever intensity, fever can overheat and harm the host.
    \ + Resistance 10: Further increases fever intensity." /datum/symptom/fever/Start(datum/disease/advance/A) ..() diff --git a/code/datums/diseases/advance/symptoms/fire.dm b/code/datums/diseases/advance/symptoms/fire.dm index b8d80b8023..e12e705350 100644 --- a/code/datums/diseases/advance/symptoms/fire.dm +++ b/code/datums/diseases/advance/symptoms/fire.dm @@ -18,6 +18,7 @@ Bonus /datum/symptom/fire name = "Spontaneous Combustion" + desc = "The virus turns fat into an extremely flammable compound, and raises the body's temperature, making the host burst into flames spontaneously." stealth = 1 resistance = -4 stage_speed = -4 @@ -28,6 +29,10 @@ Bonus symptom_delay_min = 20 symptom_delay_max = 75 var/infective = FALSE + threshold_desc = "Stage Speed 4: Increases the intensity of the flames.
    \ + Stage Speed 8: Further increases flame intensity.
    \ + Transmission 8: Host will spread the virus through skin flakes when bursting into flame.
    \ + Stealth 4: The symptom remains hidden until active." /datum/symptom/fire/Start(datum/disease/advance/A) ..() @@ -94,6 +99,7 @@ Bonus /datum/symptom/alkali name = "Alkali perspiration" + desc = "The virus attaches to sudoriparous glands, synthesizing a chemical that bursts into flames when reacting with water, leading to self-immolation." stealth = 2 resistance = -2 stage_speed = -2 @@ -105,6 +111,9 @@ Bonus symptom_delay_max = 90 var/chems = FALSE var/explosion_power = 1 + threshold_desc = "Resistance 9: Doubles the intensity of the effect, but reduces its frequency.
    \ + Stage Speed 8: Increases explosion radius when the host is wet.
    \ + Transmission 8: Additionally synthesizes chlorine trifluoride and napalm inside the host." /datum/symptom/alkali/Start(datum/disease/advance/A) ..() diff --git a/code/datums/diseases/advance/symptoms/flesh_eating.dm b/code/datums/diseases/advance/symptoms/flesh_eating.dm index 838d4481b5..16e2b5c065 100644 --- a/code/datums/diseases/advance/symptoms/flesh_eating.dm +++ b/code/datums/diseases/advance/symptoms/flesh_eating.dm @@ -18,6 +18,7 @@ Bonus /datum/symptom/flesh_eating name = "Necrotizing Fasciitis" + desc = "The virus aggressively attacks body cells, necrotizing tissues and organs." stealth = -3 resistance = -4 stage_speed = 0 @@ -29,6 +30,8 @@ Bonus symptom_delay_max = 60 var/bleed = FALSE var/pain = FALSE + threshold_desc = "Resistance 7: Host will bleed profusely during necrosis.
    \ + Transmission 8: Causes extreme pain to the host, weakening it." /datum/symptom/flesh_eating/Start(datum/disease/advance/A) ..() @@ -80,6 +83,7 @@ Bonus /datum/symptom/flesh_death name = "Autophagocytosis Necrosis" + desc = "The virus rapidly consumes infected cells, leading to heavy and widespread damage." stealth = -2 resistance = -2 stage_speed = 1 @@ -91,6 +95,8 @@ Bonus symptom_delay_max = 6 var/chems = FALSE var/zombie = FALSE + threshold_desc = "Stage Speed 7: Synthesizes Heparin and Lipolicide inside the host, causing increased bleeding and hunger.
    \ + Stealth 5: The symptom remains hidden until active." /datum/symptom/flesh_death/Start(datum/disease/advance/A) ..() diff --git a/code/datums/diseases/advance/symptoms/genetics.dm b/code/datums/diseases/advance/symptoms/genetics.dm index 0b6ea5f808..1f654f2e97 100644 --- a/code/datums/diseases/advance/symptoms/genetics.dm +++ b/code/datums/diseases/advance/symptoms/genetics.dm @@ -16,8 +16,8 @@ Bonus */ /datum/symptom/genetic_mutation - name = "Deoxyribonucleic Acid Saboteur" + desc = "The virus bonds with the DNA of the host, causing damaging mutations until removed." stealth = -2 resistance = -3 stage_speed = 0 @@ -30,6 +30,9 @@ Bonus symptom_delay_min = 60 symptom_delay_max = 120 var/no_reset = FALSE + threshold_desc = "Resistance 8: Causes two harmful mutations at once.
    \ + Stage Speed 10: Increases mutation frequency.
    \ + Stealth 5: The mutations persist even if the virus is cured." /datum/symptom/genetic_mutation/Activate(datum/disease/advance/A) if(!..()) diff --git a/code/datums/diseases/advance/symptoms/hallucigen.dm b/code/datums/diseases/advance/symptoms/hallucigen.dm index 9bfd5b0baf..d4cda525ad 100644 --- a/code/datums/diseases/advance/symptoms/hallucigen.dm +++ b/code/datums/diseases/advance/symptoms/hallucigen.dm @@ -16,8 +16,8 @@ Bonus */ /datum/symptom/hallucigen - name = "Hallucigen" + desc = "The virus stimulates the brain, causing occasional hallucinations." stealth = -2 resistance = -3 stage_speed = -3 @@ -28,6 +28,8 @@ Bonus symptom_delay_min = 25 symptom_delay_max = 90 var/fake_healthy = FALSE + threshold_desc = "Stage Speed 7: Increases the amount of hallucinations.
    \ + Stealth 4: The virus mimics positive symptoms.." /datum/symptom/hallucigen/Start(datum/disease/advance/A) ..() diff --git a/code/datums/diseases/advance/symptoms/headache.dm b/code/datums/diseases/advance/symptoms/headache.dm index 3baeedea19..b0665e0870 100644 --- a/code/datums/diseases/advance/symptoms/headache.dm +++ b/code/datums/diseases/advance/symptoms/headache.dm @@ -19,6 +19,7 @@ BONUS /datum/symptom/headache name = "Headache" + desc = "The virus causes inflammation inside the brain, causing constant headaches." stealth = -1 resistance = 4 stage_speed = 2 @@ -28,6 +29,9 @@ BONUS base_message_chance = 100 symptom_delay_min = 15 symptom_delay_max = 30 + threshold_desc = "Stage Speed 6: Headaches will cause severe pain, that weakens the host.
    \ + Stage Speed 9: Headaches become less frequent but far more intense, preventing any action from the host.
    \ + Stealth 4: Reduces headache frequency until later stages." /datum/symptom/headache/Start(datum/disease/advance/A) ..() @@ -45,11 +49,11 @@ BONUS return var/mob/living/M = A.affected_mob if(power < 2) - if(prob(base_message_chance)) + if(prob(base_message_chance) || A.stage >=4) to_chat(M, "[pick("Your head hurts.", "Your head pounds.")]") - if(power >= 2) + if(power >= 2 && A.stage >= 4) to_chat(M, "[pick("Your head hurts a lot.", "Your head pounds incessantly.")]") M.adjustStaminaLoss(25) - if(power >= 3) + if(power >= 3 && A.stage >= 5) to_chat(M, "[pick("Your head hurts!", "You feel a burning knife inside your brain!", "A wave of pain fills your head!")]") M.Stun(35) \ No newline at end of file diff --git a/code/datums/diseases/advance/symptoms/heal.dm b/code/datums/diseases/advance/symptoms/heal.dm index 7b31588240..5167b17e0d 100644 --- a/code/datums/diseases/advance/symptoms/heal.dm +++ b/code/datums/diseases/advance/symptoms/heal.dm @@ -1,5 +1,6 @@ /datum/symptom/heal name = "Basic Healing (does nothing)" //warning for adminspawn viruses + desc = "You should not be seeing this." stealth = 1 resistance = -4 stage_speed = -4 @@ -9,6 +10,9 @@ symptom_delay_min = 1 symptom_delay_max = 1 var/hide_healing = FALSE + threshold_desc = "Stage Speed 6: Doubles healing speed.
    \ + Stage Speed 11: Triples healing speed.
    \ + Stealth 4: Healing will no longer be visible to onlookers." /datum/symptom/heal/Start(datum/disease/advance/A) ..() @@ -51,6 +55,7 @@ Bonus /datum/symptom/heal/toxin name = "Toxic Filter" + desc = "The virus synthesizes regenerative chemicals in the bloodstream, repairing damage caused by toxins." stealth = 1 resistance = -4 stage_speed = -4 @@ -87,6 +92,7 @@ Bonus stage_speed = -2 transmittable = -2 level = 8 + desc = "The virus stimulates production of special stem cells in the bloodstream, causing rapid reparation of any damage caused by toxins." /datum/symptom/heal/toxin/plus/Heal(mob/living/M, datum/disease/advance/A) var/heal_amt = 2 * power @@ -115,6 +121,7 @@ Bonus /datum/symptom/heal/brute name = "Regeneration" + desc = "The virus stimulates the regenerative process in the host, causing faster wound healing." stealth = 1 resistance = -4 stage_speed = -4 @@ -158,6 +165,7 @@ Bonus /datum/symptom/heal/brute/plus name = "Flesh Mending" + desc = "The virus rapidly mutates into body cells, effectively allowing it to quickly fix the host's wounds." stealth = 0 resistance = 0 stage_speed = -2 @@ -207,6 +215,7 @@ Bonus /datum/symptom/heal/burn name = "Tissue Regrowth" + desc = "The virus recycles dead and burnt tissues, speeding up the healing of damage caused by burns." stealth = 1 resistance = -4 stage_speed = -4 @@ -248,7 +257,8 @@ Bonus /datum/symptom/heal/burn/plus - name = "Heat Resistance" + name = "Temperature Adaptation" + desc = "The virus quickly balances body heat, while also replacing tissues damaged by external sources." stealth = 0 resistance = 0 stage_speed = -2 @@ -297,6 +307,7 @@ Bonus /datum/symptom/heal/dna name = "Deoxyribonucleic Acid Restoration" + desc = "The virus repairs the host's genome, purging negative mutations." stealth = -1 resistance = -1 stage_speed = 0 @@ -304,9 +315,11 @@ Bonus level = 5 symptom_delay_min = 3 symptom_delay_max = 8 + threshold_desc = "Stage Speed 6: Additionally heals brain damage.
    \ + Stage Speed 11: Increases brain damage healing." /datum/symptom/heal/dna/Heal(mob/living/carbon/M, datum/disease/advance/A) - var/amt_healed = 2 * power + var/amt_healed = 2 * (power - 1) M.adjustBrainLoss(-amt_healed) //Non-power mutations, excluding race, so the virus does not force monkey -> human transformations. var/list/unclean_mutations = (GLOB.not_good_mutations|GLOB.bad_mutations) - GLOB.mutations_list[RACEMUT] diff --git a/code/datums/diseases/advance/symptoms/itching.dm b/code/datums/diseases/advance/symptoms/itching.dm index 880ac1f3e6..119b04b48a 100644 --- a/code/datums/diseases/advance/symptoms/itching.dm +++ b/code/datums/diseases/advance/symptoms/itching.dm @@ -19,6 +19,7 @@ BONUS /datum/symptom/itching name = "Itching" + desc = "The virus irritates the skin, causing itching." stealth = 0 resistance = 3 stage_speed = 3 @@ -28,6 +29,8 @@ BONUS symptom_delay_min = 5 symptom_delay_max = 25 var/scratch = FALSE + threshold_desc = "Transmission 6: Increases frequency of itching.
    \ + Stage Speed 7: The host will scrath itself when itching, causing superficial damage." /datum/symptom/itching/Start(datum/disease/advance/A) ..() diff --git a/code/datums/diseases/advance/symptoms/narcolepsy.dm b/code/datums/diseases/advance/symptoms/narcolepsy.dm index a5a2bd7a4c..d850d257cb 100644 --- a/code/datums/diseases/advance/symptoms/narcolepsy.dm +++ b/code/datums/diseases/advance/symptoms/narcolepsy.dm @@ -14,6 +14,7 @@ Bonus */ /datum/symptom/narcolepsy name = "Narcolepsy" + desc = "The virus causes a hormone imbalance, making the host sleepy and narcoleptic." stealth = -1 resistance = -2 stage_speed = -3 @@ -25,6 +26,8 @@ Bonus var/sleep_level = 0 var/sleepy_ticks = 0 var/stamina = FALSE + threshold_desc = "Transmission 7: Also relaxes the muscles, weakening and slowing the host.
    \ + Resistance 10: Causes narcolepsy more often, increasing the chance of the host falling asleep." /datum/symptom/narcolepsy/Start(datum/disease/advance/A) ..() diff --git a/code/datums/diseases/advance/symptoms/oxygen.dm b/code/datums/diseases/advance/symptoms/oxygen.dm index 5949e84420..da085ab153 100644 --- a/code/datums/diseases/advance/symptoms/oxygen.dm +++ b/code/datums/diseases/advance/symptoms/oxygen.dm @@ -18,6 +18,7 @@ Bonus /datum/symptom/oxygen name = "Self-Respiration" + desc = "The virus rapidly synthesizes oxygen, effectively removing the need for breathing." stealth = 1 resistance = -3 stage_speed = -3 @@ -27,6 +28,7 @@ Bonus symptom_delay_min = 1 symptom_delay_max = 1 var/regenerate_blood = FALSE + threshold_desc = "Resistance 8:Additionally regenerates lost blood.
    " /datum/symptom/oxygen/Start(datum/disease/advance/A) ..() diff --git a/code/datums/diseases/advance/symptoms/sensory.dm b/code/datums/diseases/advance/symptoms/sensory.dm index 3063ee06f6..dd417e50ed 100644 --- a/code/datums/diseases/advance/symptoms/sensory.dm +++ b/code/datums/diseases/advance/symptoms/sensory.dm @@ -15,8 +15,9 @@ Bonus ////////////////////////////////////// */ -/datum/symptom/sensory_restoration - name = "Sensory Restoration" +/datum/symptom/mind_restoration + name = "Mind Restoration" + desc = "The virus strengthens the bonds between neurons, reducing the duration of any ailments of the mind." stealth = -1 resistance = -4 stage_speed = -4 @@ -27,15 +28,17 @@ Bonus symptom_delay_max = 10 var/purge_alcohol = FALSE var/brain_heal = FALSE + threshold_desc = "Resistance 6: Heals brain damage.
    \ + Transmission 8: Purges alcohol in the bloodstream." -/datum/symptom/sensory_restoration/Start(datum/disease/advance/A) +/datum/symptom/mind_restoration/Start(datum/disease/advance/A) ..() if(A.properties["resistance"] >= 6) //heal brain damage brain_heal = TRUE if(A.properties["transmittable"] >= 8) //purge alcohol purge_alcohol = TRUE -/datum/symptom/sensory_restoration/Activate(var/datum/disease/advance/A) +/datum/symptom/mind_restoration/Activate(var/datum/disease/advance/A) if(!..()) return var/mob/living/M = A.affected_mob diff --git a/code/datums/diseases/advance/symptoms/shedding.dm b/code/datums/diseases/advance/symptoms/shedding.dm index cf88fcf6db..a578289e17 100644 --- a/code/datums/diseases/advance/symptoms/shedding.dm +++ b/code/datums/diseases/advance/symptoms/shedding.dm @@ -15,8 +15,8 @@ BONUS */ /datum/symptom/shedding - name = "Alopecia" + desc = "The virus causes rapid shedding of head and body hair." stealth = 0 resistance = 1 stage_speed = -1 diff --git a/code/datums/diseases/advance/symptoms/shivering.dm b/code/datums/diseases/advance/symptoms/shivering.dm index 4c9ec94a2b..f40fd151d9 100644 --- a/code/datums/diseases/advance/symptoms/shivering.dm +++ b/code/datums/diseases/advance/symptoms/shivering.dm @@ -16,8 +16,8 @@ Bonus */ /datum/symptom/shivering - name = "Shivering" + desc = "The virus inhibits the body's thermoregulation, cooling the body down." stealth = 0 resistance = 2 stage_speed = 2 @@ -27,6 +27,8 @@ Bonus symptom_delay_min = 10 symptom_delay_max = 30 var/unsafe = FALSE //over the cold threshold + threshold_desc = "Stage Speed 5: Increases cooling speed; the host can fall below safe temperature levels.
    \ + Stage Speed 10: Further increases cooling speed." /datum/symptom/fever/Start(datum/disease/advance/A) ..() diff --git a/code/datums/diseases/advance/symptoms/skin.dm b/code/datums/diseases/advance/symptoms/skin.dm index 09eea77520..014607eb44 100644 --- a/code/datums/diseases/advance/symptoms/skin.dm +++ b/code/datums/diseases/advance/symptoms/skin.dm @@ -17,6 +17,7 @@ BONUS /datum/symptom/vitiligo name = "Vitiligo" + desc = "The virus destroys skin pigment cells, causing rapid loss of pigmentation in the host." stealth = -3 resistance = -1 stage_speed = -1 @@ -61,6 +62,7 @@ BONUS /datum/symptom/revitiligo name = "Revitiligo" + desc = "The virus causes increased production of skin pigment cells, making the host's skin grow darker over time." stealth = -3 resistance = -1 stage_speed = -1 diff --git a/code/datums/diseases/advance/symptoms/sneeze.dm b/code/datums/diseases/advance/symptoms/sneeze.dm index fda1fc765c..085b5ff592 100644 --- a/code/datums/diseases/advance/symptoms/sneeze.dm +++ b/code/datums/diseases/advance/symptoms/sneeze.dm @@ -18,6 +18,7 @@ Bonus /datum/symptom/sneeze name = "Sneezing" + desc = "The virus causes irritation of the nasal cavity, making the host sneeze occasionally." stealth = -2 resistance = 3 stage_speed = 0 @@ -26,6 +27,8 @@ Bonus severity = 1 symptom_delay_min = 5 symptom_delay_max = 35 + threshold_desc = "Transmission 9: Increases sneezing range, spreading the virus over a larger area.
    \ + Stealth 4: The symptom remains hidden until active." /datum/symptom/sneeze/Start(datum/disease/advance/A) ..() diff --git a/code/datums/diseases/advance/symptoms/symptoms.dm b/code/datums/diseases/advance/symptoms/symptoms.dm index 4bcb1b502f..8557375dbd 100644 --- a/code/datums/diseases/advance/symptoms/symptoms.dm +++ b/code/datums/diseases/advance/symptoms/symptoms.dm @@ -3,6 +3,8 @@ /datum/symptom // Buffs/Debuffs the symptom has to the overall engineered disease. var/name = "" + var/desc = "If you see this something went very wrong." //Basic symptom description + var/threshold_desc = "" //Description of threshold effects var/stealth = 0 var/resistance = 0 var/stage_speed = 0 @@ -25,6 +27,7 @@ var/power = 1 //A neutered symptom has no effect, and only affects statistics. var/neutered = FALSE + var/list/thresholds /datum/symptom/New() var/list/S = SSdisease.list_symptoms @@ -37,7 +40,6 @@ // Called when processing of the advance disease, which holds this symptom, starts. /datum/symptom/proc/Start(datum/disease/advance/A) next_activation = world.time + rand(symptom_delay_min * 10, symptom_delay_max * 10) //so it doesn't instantly activate on infection - return // Called when the advance disease is going to be deleted or when the advance disease stops processing. /datum/symptom/proc/End(datum/disease/advance/A) @@ -58,3 +60,6 @@ new_symp.id = id new_symp.neutered = neutered return new_symp + +/datum/symptom/proc/generate_threshold_desc() + return diff --git a/code/datums/diseases/advance/symptoms/viral.dm b/code/datums/diseases/advance/symptoms/viral.dm index 49bb2d674c..539c57c92e 100644 --- a/code/datums/diseases/advance/symptoms/viral.dm +++ b/code/datums/diseases/advance/symptoms/viral.dm @@ -15,6 +15,7 @@ BONUS */ /datum/symptom/viraladaptation name = "Viral self-adaptation" + desc = "The virus mimics the function of normal body cells, becoming harder to spot and to eradicate, but reducing its speed." stealth = 3 resistance = 5 stage_speed = -3 @@ -38,6 +39,8 @@ BONUS */ /datum/symptom/viralevolution name = "Viral evolutionary acceleration" + desc = "The virus quickly adapts to spread as fast as possible both outside and inside a host. \ + This, however, makes the virus easier to spot, and less able to fight off a cure." stealth = -2 resistance = -3 stage_speed = 5 @@ -65,6 +68,8 @@ Bonus /datum/symptom/viralreverse name = "Viral aggressive metabolism" + desc = "The virus sacrifices its long term survivability to gain a near-instant spread when inside a host. \ + The virus will start at the lastest stage, but will eventually decay and die off by itself." stealth = -2 resistance = 1 stage_speed = 3 @@ -73,6 +78,8 @@ Bonus symptom_delay_min = 1 symptom_delay_max = 1 var/time_to_cure + threshold_desc = "Resistance/Stage Speed: Highest between these determines the amount of time before self-curing.
    \ + Stealth 4: Doubles the time before the virus self-cures." /datum/symptom/viralreverse/Activate(datum/disease/advance/A) if(!..()) diff --git a/code/datums/diseases/advance/symptoms/vision.dm b/code/datums/diseases/advance/symptoms/vision.dm index 9148139e50..04f5d72ba6 100644 --- a/code/datums/diseases/advance/symptoms/vision.dm +++ b/code/datums/diseases/advance/symptoms/vision.dm @@ -18,6 +18,7 @@ Bonus /datum/symptom/visionloss name = "Hyphema" + desc = "The virus causes inflammation of the retina, leading to eye damage and eventually blindness." stealth = -1 resistance = -4 stage_speed = -4 @@ -28,6 +29,8 @@ Bonus symptom_delay_min = 25 symptom_delay_max = 80 var/remove_eyes = FALSE + threshold_desc = "Resistance 12: Weakens extraocular muscles, eventually leading to complete detachment of the eyes.
    \ + Stealth 4: The symptom remains hidden until active." /datum/symptom/visionloss/Start(datum/disease/advance/A) ..() @@ -88,6 +91,7 @@ Bonus /datum/symptom/visionaid name = "Ocular Restoration" + desc = "The virus stimulates the production and replacement of eye cells, causing the host to regenerate its eyes when damaged." stealth = -1 resistance = -3 stage_speed = -2 diff --git a/code/datums/diseases/advance/symptoms/voice_change.dm b/code/datums/diseases/advance/symptoms/voice_change.dm index 3abeb42f03..bdeb6321bc 100644 --- a/code/datums/diseases/advance/symptoms/voice_change.dm +++ b/code/datums/diseases/advance/symptoms/voice_change.dm @@ -18,6 +18,7 @@ Bonus /datum/symptom/voice_change name = "Voice Change" + desc = "The virus alters the pitch and tone of the host's vocal cords, changing how their voice sounds." stealth = -1 resistance = -2 stage_speed = -2 @@ -30,6 +31,9 @@ Bonus var/scramble_language = FALSE var/datum/language/current_language var/datum/language_holder/original_language + threshold_desc = "Transmission 14: The host's language center of the brain is damaged, leading to complete inability to speak or understand any language.
    \ + Stage Speed 7: Changes voice more often.
    \ + Stealth 3: The symptom remains hidden until active." /datum/symptom/voice_change/Start(datum/disease/advance/A) ..() diff --git a/code/datums/diseases/advance/symptoms/vomit.dm b/code/datums/diseases/advance/symptoms/vomit.dm index e2be924d6a..983d20a66d 100644 --- a/code/datums/diseases/advance/symptoms/vomit.dm +++ b/code/datums/diseases/advance/symptoms/vomit.dm @@ -22,6 +22,7 @@ Bonus /datum/symptom/vomit name = "Vomiting" + desc = "The virus causes nausea and irritates the stomach, causing occasional vomit." stealth = -2 resistance = -1 stage_speed = 0 @@ -33,6 +34,9 @@ Bonus symptom_delay_max = 80 var/vomit_blood = FALSE var/proj_vomit = 0 + threshold_desc = "Resistance 7: Host will vomit blood, causing internal damage.
    \ + Transmission 7: Host will projectile vomit, increasing vomiting range.
    \ + Stealth 4: The symptom remains hidden until active." /datum/symptom/vomit/Start(datum/disease/advance/A) ..() diff --git a/code/datums/diseases/advance/symptoms/weight.dm b/code/datums/diseases/advance/symptoms/weight.dm index ec371f1167..ea2577b800 100644 --- a/code/datums/diseases/advance/symptoms/weight.dm +++ b/code/datums/diseases/advance/symptoms/weight.dm @@ -18,6 +18,7 @@ Bonus /datum/symptom/weight_gain name = "Weight Gain" + desc = "The virus mutates the host's metabolism, making it gain weight much faster than normal." stealth = -3 resistance = -3 stage_speed = -2 @@ -27,6 +28,7 @@ Bonus base_message_chance = 100 symptom_delay_min = 15 symptom_delay_max = 45 + threshold_desc = "Stealth 4: The symptom is less noticeable." /datum/symptom/weight_gain/Start(datum/disease/advance/A) ..() @@ -66,6 +68,7 @@ Bonus /datum/symptom/weight_loss name = "Weight Loss" + desc = "The virus mutates the host's metabolism, making it almost unable to gain nutrition from food." stealth = -3 resistance = -2 stage_speed = -2 @@ -75,6 +78,7 @@ Bonus base_message_chance = 100 symptom_delay_min = 15 symptom_delay_max = 45 + threshold_desc = "Stealth 4: The symptom is less noticeable." /datum/symptom/weight_loss/Start(datum/disease/advance/A) ..() @@ -116,6 +120,7 @@ Bonus /datum/symptom/weight_even name = "Weight Even" + desc = "The virus alters the host's metabolism, making it far more efficient then normal, and synthesizing nutrients from normally unedible sources." stealth = -3 resistance = -2 stage_speed = -2 diff --git a/code/datums/diseases/advance/symptoms/youth.dm b/code/datums/diseases/advance/symptoms/youth.dm index 9793313354..6be34684e7 100644 --- a/code/datums/diseases/advance/symptoms/youth.dm +++ b/code/datums/diseases/advance/symptoms/youth.dm @@ -18,6 +18,8 @@ BONUS /datum/symptom/youth name = "Eternal Youth" + desc = "The virus becomes symbiotically connected to the cells in the host's body, preventing and reversing aging. \ + The virus, in turn, becomes more resistant, spreads faster, and is harder to spot, although it doesn't thrive as well without a host." stealth = 3 resistance = 4 stage_speed = 4 diff --git a/code/datums/helper_datums/getrev.dm b/code/datums/helper_datums/getrev.dm index 806f48a24f..c6958fa997 100644 --- a/code/datums/helper_datums/getrev.dm +++ b/code/datums/helper_datums/getrev.dm @@ -6,8 +6,14 @@ var/date /datum/getrev/New() - if(world.RunningService() && fexists(SERVICE_PR_TEST_JSON)) - testmerge = json_decode(file2text(SERVICE_PR_TEST_JSON)) + if(world.RunningService()) + var/file_name + if(ServiceVersion()) //will return null for versions < 3.0.91.0 + file_name = SERVICE_PR_TEST_JSON_OLD + else + file_name = SERVICE_PR_TEST_JSON + if(fexists(file_name)) + testmerge = json_decode(file2text(file_name)) #ifdef SERVERTOOLS else if(!world.RunningService() && fexists("../prtestjob.lk")) //tgs2 support var/list/tmp = world.file2list("..\\prtestjob.lk") diff --git a/code/datums/map_config.dm b/code/datums/map_config.dm index 4c0a5fb11e..1ff83aeac8 100644 --- a/code/datums/map_config.dm +++ b/code/datums/map_config.dm @@ -4,142 +4,142 @@ // -Cyberboss /datum/map_config - var/config_filename = "_maps/boxstation.json" - var/map_name = "Box Station" - var/map_path = "map_files/BoxStation" - var/map_file = "BoxStation.dmm" + var/config_filename = "_maps/boxstation.json" + var/map_name = "Box Station" + var/map_path = "map_files/BoxStation" + var/map_file = "BoxStation.dmm" - var/minetype = "lavaland" + var/minetype = "lavaland" - var/list/transition_config = list(CENTCOM = SELFLOOPING, + var/list/transition_config = list(CENTCOM = SELFLOOPING, MAIN_STATION = CROSSLINKED, - EMPTY_AREA_1 = CROSSLINKED, - EMPTY_AREA_2 = CROSSLINKED, - MINING = SELFLOOPING, - EMPTY_AREA_3 = CROSSLINKED, - EMPTY_AREA_4 = CROSSLINKED, - EMPTY_AREA_5 = CROSSLINKED, - EMPTY_AREA_6 = CROSSLINKED, - EMPTY_AREA_7 = CROSSLINKED, - EMPTY_AREA_8 = CROSSLINKED) - var/defaulted = TRUE //if New failed + EMPTY_AREA_1 = CROSSLINKED, + EMPTY_AREA_2 = CROSSLINKED, + MINING = SELFLOOPING, + EMPTY_AREA_3 = CROSSLINKED, + EMPTY_AREA_4 = CROSSLINKED, + EMPTY_AREA_5 = CROSSLINKED, + EMPTY_AREA_6 = CROSSLINKED, + EMPTY_AREA_7 = CROSSLINKED, + EMPTY_AREA_8 = CROSSLINKED) + var/defaulted = TRUE //if New failed - var/config_max_users = 0 - var/config_min_users = 0 - var/voteweight = 1 - var/allow_custom_shuttles = "yes" + var/config_max_users = 0 + var/config_min_users = 0 + var/voteweight = 1 + var/allow_custom_shuttles = "yes" /datum/map_config/New(filename = "data/next_map.json", default_to_box, delete_after) - if(default_to_box) - return - LoadConfig(filename) - if(delete_after) - fdel(filename) + if(default_to_box) + return + LoadConfig(filename) + if(delete_after) + fdel(filename) /datum/map_config/proc/LoadConfig(filename) - if(!fexists(filename)) - log_world("map_config not found: [filename]") - return + if(!fexists(filename)) + log_world("map_config not found: [filename]") + return - var/json = file(filename) - if(!json) - log_world("Could not open map_config: [filename]") - return + var/json = file(filename) + if(!json) + log_world("Could not open map_config: [filename]") + return - json = file2text(json) - if(!json) - log_world("map_config is not text: [filename]") - return + json = file2text(json) + if(!json) + log_world("map_config is not text: [filename]") + return - json = json_decode(json) - if(!json) - log_world("map_config is not json: [filename]") - return + json = json_decode(json) + if(!json) + log_world("map_config is not json: [filename]") + return - if(!ValidateJSON(json)) - log_world("map_config failed to validate for above reason: [filename]") - return + if(!ValidateJSON(json)) + log_world("map_config failed to validate for above reason: [filename]") + return - config_filename = filename + config_filename = filename - map_name = json["map_name"] - map_path = json["map_path"] - map_file = json["map_file"] + map_name = json["map_name"] + map_path = json["map_path"] + map_file = json["map_file"] - minetype = json["minetype"] - allow_custom_shuttles = json["allow_custom_shuttles"] + minetype = json["minetype"] + allow_custom_shuttles = json["allow_custom_shuttles"] - var/list/jtcl = json["transition_config"] + var/list/jtcl = json["transition_config"] - if(jtcl != "default") - transition_config.Cut() + if(jtcl != "default") + transition_config.Cut() - for(var/I in jtcl) - transition_config[TransitionStringToEnum(I)] = TransitionStringToEnum(jtcl[I]) + for(var/I in jtcl) + transition_config[TransitionStringToEnum(I)] = TransitionStringToEnum(jtcl[I]) - defaulted = FALSE + defaulted = FALSE #define CHECK_EXISTS(X) if(!istext(json[X])) { log_world(X + "missing from json!"); return; } /datum/map_config/proc/ValidateJSON(list/json) - CHECK_EXISTS("map_name") - CHECK_EXISTS("map_path") - CHECK_EXISTS("map_file") - CHECK_EXISTS("minetype") - CHECK_EXISTS("transition_config") - CHECK_EXISTS("allow_custom_shuttles") + CHECK_EXISTS("map_name") + CHECK_EXISTS("map_path") + CHECK_EXISTS("map_file") + CHECK_EXISTS("minetype") + CHECK_EXISTS("transition_config") + CHECK_EXISTS("allow_custom_shuttles") - var/path = GetFullMapPath(json["map_path"], json["map_file"]) - if(!fexists(path)) - log_world("Map file ([path]) does not exist!") - return + var/path = GetFullMapPath(json["map_path"], json["map_file"]) + if(!fexists(path)) + log_world("Map file ([path]) does not exist!") + return - if(json["transition_config"] != "default") - if(!islist(json["transition_config"])) - log_world("transition_config is not a list!") - return + if(json["transition_config"] != "default") + if(!islist(json["transition_config"])) + log_world("transition_config is not a list!") + return - var/list/jtcl = json["transition_config"] - for(var/I in jtcl) - if(isnull(TransitionStringToEnum(I))) - log_world("Invalid transition_config option: [I]!") - if(isnull(TransitionStringToEnum(jtcl[I]))) - log_world("Invalid transition_config option: [I]!") + var/list/jtcl = json["transition_config"] + for(var/I in jtcl) + if(isnull(TransitionStringToEnum(I))) + log_world("Invalid transition_config option: [I]!") + if(isnull(TransitionStringToEnum(jtcl[I]))) + log_world("Invalid transition_config option: [I]!") - return TRUE + return TRUE #undef CHECK_EXISTS /datum/map_config/proc/TransitionStringToEnum(string) - switch(string) - if("CROSSLINKED") - return CROSSLINKED - if("SELFLOOPING") - return SELFLOOPING - if("UNAFFECTED") - return UNAFFECTED - if("MAIN_STATION") - return MAIN_STATION - if("CENTCOM") - return CENTCOM - if("MINING") - return MINING - if("EMPTY_AREA_1") - return EMPTY_AREA_1 - if("EMPTY_AREA_2") - return EMPTY_AREA_2 - if("EMPTY_AREA_3") - return EMPTY_AREA_3 - if("EMPTY_AREA_4") - return EMPTY_AREA_4 - if("EMPTY_AREA_5") - return EMPTY_AREA_5 - if("EMPTY_AREA_6") - return EMPTY_AREA_6 - if("EMPTY_AREA_7") - return EMPTY_AREA_7 - if("EMPTY_AREA_8") - return EMPTY_AREA_8 + switch(string) + if("CROSSLINKED") + return CROSSLINKED + if("SELFLOOPING") + return SELFLOOPING + if("UNAFFECTED") + return UNAFFECTED + if("MAIN_STATION") + return MAIN_STATION + if("CENTCOM") + return CENTCOM + if("MINING") + return MINING + if("EMPTY_AREA_1") + return EMPTY_AREA_1 + if("EMPTY_AREA_2") + return EMPTY_AREA_2 + if("EMPTY_AREA_3") + return EMPTY_AREA_3 + if("EMPTY_AREA_4") + return EMPTY_AREA_4 + if("EMPTY_AREA_5") + return EMPTY_AREA_5 + if("EMPTY_AREA_6") + return EMPTY_AREA_6 + if("EMPTY_AREA_7") + return EMPTY_AREA_7 + if("EMPTY_AREA_8") + return EMPTY_AREA_8 /datum/map_config/proc/GetFullMapPath(mp = map_path, mf = map_file) - return "_maps/[mp]/[mf]" + return "_maps/[mp]/[mf]" /datum/map_config/proc/MakeNextMap() - return config_filename == "data/next_map.json" || fcopy(config_filename, "data/next_map.json") + return config_filename == "data/next_map.json" || fcopy(config_filename, "data/next_map.json") diff --git a/code/datums/mind.dm b/code/datums/mind.dm index af44f9c8ae..78a402a2dc 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -370,6 +370,9 @@ if(!SSticker.HasRoundStarted()) alert("Not before round-start!", "Alert") return + if(QDELETED(src) || QDELETED(current)) + alert("This mind doesn't have a mob, or is deleted! For some reason!", "Edit Memory") + return var/out = "[name][(current&&(current.real_name!=name))?" (as [current.real_name])":""]
    " out += "Mind currently owned by key: [key] [active?"(synced)":"(not synced)"]
    " @@ -377,28 +380,155 @@ out += "Faction and special role: [special_role]
    " var/list/sections = list( + "traitor", // "traitorchan", + "changeling", + "nuclear", + "wizard", "revolution", "gang", "cult", - "wizard", - "changeling", - "nuclear", - "traitor", // "traitorchan", - "monkey", "clockcult", + "abductor", "devil", - "ninja" + "ninja", + "monkey" ) var/text = "" + /** TRAITOR ***/ + text = "traitor" + if (SSticker.mode.config_tag=="traitor" || SSticker.mode.config_tag=="traitorchan") + text = uppertext(text) + text = "[text]: " + if (src in SSticker.mode.traitors) + text += "TRAITOR | loyal" + if (objectives.len==0) + text += "
    Objectives are empty! Randomize!" + else + text += "traitor | LOYAL" + + if(current && current.client && (ROLE_TRAITOR in current.client.prefs.be_special)) + text += " | Enabled in Prefs" + else + text += " | Disabled in Prefs" + + sections["traitor"] = text + + + if(ishuman(current) || ismonkey(current)) + + /** CHANGELING ***/ + text = "changeling" + if (SSticker.mode.config_tag=="changeling" || SSticker.mode.config_tag=="traitorchan") + text = uppertext(text) + text = "[text]: " + if ((src in SSticker.mode.changelings) && special_role) + text += "YES | no" + if (objectives.len==0) + text += "
    Objectives are empty! Randomize!" + if(changeling && changeling.stored_profiles.len && (current.real_name != changeling.first_prof.name) ) + text += "
    Transform to initial appearance." + else if(src in SSticker.mode.changelings) //Station Aligned Changeling + text += "YES (but not an antag) | no" + if (objectives.len==0) + text += "
    Objectives are empty! Randomize!" + if(changeling && changeling.stored_profiles.len && (current.real_name != changeling.first_prof.name) ) + text += "
    Transform to initial appearance." + else + text += "yes | NO" + + if(current && current.client && (ROLE_CHANGELING in current.client.prefs.be_special)) + text += " | Enabled in Prefs" + else + text += " | Disabled in Prefs" + + sections["changeling"] = text + + + /** MONKEY ***/ + text = "monkey" + if (SSticker.mode.config_tag=="monkey") + text = uppertext(text) + text = "[text]: " + if (ishuman(current)) + text += "healthy | infected | HUMAN | other" + else if(ismonkey(current)) + var/found = FALSE + for(var/datum/disease/transformation/jungle_fever/JF in current.viruses) + found = TRUE + break + + if(found) + text += "healthy | INFECTED | human | other" + else + text += "HEALTHY | infected | human | other" + + else + text += "healthy | infected | human | OTHER" + + if(current && current.client && (ROLE_MONKEY in current.client.prefs.be_special)) + text += " | Enabled in Prefs" + else + text += " | Disabled in Prefs" + + sections["monkey"] = text + if(ishuman(current)) + + /** NUCLEAR ***/ + text = "nuclear" + if (SSticker.mode.config_tag=="nuclear") + text = uppertext(text) + text = "[text]: " + if (src in SSticker.mode.syndicates) + text += "OPERATIVE | nanotrasen" + text += "
    To shuttle, undress, dress up." + var/code + for (var/obj/machinery/nuclearbomb/bombue in GLOB.machines) + if (length(bombue.r_code) <= 5 && bombue.r_code != "LOLNO" && bombue.r_code != "ADMIN") + code = bombue.r_code + break + if (code) + text += " Code is [code]. tell the code." + else + text += "operative | NANOTRASEN" + + if(current && current.client && (ROLE_OPERATIVE in current.client.prefs.be_special)) + text += " | Enabled in Prefs" + else + text += " | Disabled in Prefs" + + sections["nuclear"] = text + + + /** WIZARD ***/ + text = "wizard" + if (SSticker.mode.config_tag=="wizard") + text = uppertext(text) + text = "[text]: " + if ((src in SSticker.mode.wizards) || (src in SSticker.mode.apprentices)) + text += "YES | no" + text += "
    To lair, undress, dress up, let choose name." + if (objectives.len==0) + text += "
    Objectives are empty! Randomize!" + else + text += "yes | NO" + + if(current && current.client && (ROLE_WIZARD in current.client.prefs.be_special)) + text += " | Enabled in Prefs" + else + text += " | Disabled in Prefs" + + sections["wizard"] = text + + /** REVOLUTION ***/ text = "revolution" if (SSticker.mode.config_tag=="revolution") text = uppertext(text) text = "[text]: " if (assigned_role in GLOB.command_positions) - text += "HEAD|loyal|employee|headrev|rev" + text += "HEAD | not mindshielded | employee | headrev | rev" else if (src in SSticker.mode.head_revolutionaries) var/last_healthy_headrev = TRUE for(var/I in SSticker.mode.head_revolutionaries) @@ -408,16 +538,16 @@ if(M.z == ZLEVEL_STATION && !M.stat) last_healthy_headrev = FALSE break - text += "head|loyal|employee|[last_healthy_headrev ? "LAST " : ""]HEADREV|rev" + text += "head | not mindshielded | employee | [last_healthy_headrev ? "LAST " : ""]HEADREV | rev" text += "
    Flash: give" var/list/L = current.get_contents() var/obj/item/device/assembly/flash/flash = locate() in L if (flash) if(!flash.crit_fail) - text += "|take." + text += " | take." else - text += "|take|repair." + text += " | take | repair." else text += "." @@ -425,16 +555,16 @@ if (objectives.len==0) text += "
    Objectives are empty! Set to kill all heads." else if(current.isloyal()) - text += "head|LOYAL|employee|headrev|rev" + text += "head | MINDSHIELDED | employee | headrev | rev" else if (src in SSticker.mode.revolutionaries) - text += "head|loyal|employee|headrev|REV" + text += "head | not mindshielded | employee | headrev | REV" else - text += "head|loyal|EMPLOYEE|headrev|rev" + text += "head | not mindshielded | EMPLOYEE | headrev | rev" if(current && current.client && (ROLE_REV in current.client.prefs.be_special)) - text += "|Enabled in Prefs" + text += " | Enabled in Prefs" else - text += "|Disabled in Prefs" + text += " | Disabled in Prefs" sections["revolution"] = text @@ -443,16 +573,16 @@ if (SSticker.mode.config_tag=="gang") text = uppertext(text) text = "[text]: " - text += "[current.isloyal() ? "LOYAL" : "loyal"]|" + text += "[current.isloyal() ? "MINDSHIELDED" : "not mindshielded"] | " if(src in SSticker.mode.get_all_gangsters()) text += "none" else text += "NONE" if(current && current.client && (ROLE_GANG in current.client.prefs.be_special)) - text += "|Enabled in Prefs
    " + text += " | Enabled in Prefs
    " else - text += "|Disabled in Prefs
    " + text += " | Disabled in Prefs
    " for(var/datum/gang/G in SSticker.mode.gangs) text += "[G.name]: " @@ -460,14 +590,14 @@ text += "GANGSTER" else text += "gangster" - text += "|" + text += " | " if(src in (G.bosses)) text += "GANG LEADER" - text += "|Equipment: give" + text += " | Equipment: give" var/list/L = current.get_contents() var/obj/item/device/gangtool/gangtool = locate() in L if (gangtool) - text += "|take" + text += " | take" else text += "gang leader" @@ -478,233 +608,113 @@ sections["gang"] = text - /** Abductors **/ - text = "Abductor" + /** ABDUCTION **/ + text = "abductor" if(SSticker.mode.config_tag == "abductor") text = uppertext(text) text = "[text]: " if(src in SSticker.mode.abductors) - text += "Abductor|human" - text += "|undress|equip" + text += "Abductor | human" + text += " | undress | equip" else - text += "Abductor|human" + text += "abductor | human" if(current && current.client && (ROLE_ABDUCTOR in current.client.prefs.be_special)) - text += "|Enabled in Prefs" + text += " | Enabled in Prefs" else - text += "|Disabled in Prefs" + text += " | Disabled in Prefs" sections["abductor"] = text - /** NUCLEAR ***/ - text = "nuclear" - if (SSticker.mode.config_tag=="nuclear") + + /** DEVIL ***/ + text = "devil" + if(SSticker.mode.config_tag == "devil") text = uppertext(text) text = "[text]: " - if (src in SSticker.mode.syndicates) - text += "OPERATIVE|nanotrasen" - text += "
    To shuttle, undress, dress up." - var/code - for (var/obj/machinery/nuclearbomb/bombue in GLOB.machines) - if (length(bombue.r_code) <= 5 && bombue.r_code != "LOLNO" && bombue.r_code != "ADMIN") - code = bombue.r_code - break - if (code) - text += " Code is [code]. tell the code." + var/datum/antagonist/devil/devilinfo = has_antag_datum(ANTAG_DATUM_DEVIL) + if(devilinfo) + if(!devilinfo.ascendable) + text += "DEVIL | ascendable devil | sintouched | human" + else + text += "DEVIL | ASCENDABLE DEVIL | sintouched | human" + else if(src in SSticker.mode.sintouched) + text += "devil | ascendable devil | SINTOUCHED | human" else - text += "operative|NANOTRASEN" + text += "devil | ascendable devil | sintouched | HUMAN" - if(current && current.client && (ROLE_OPERATIVE in current.client.prefs.be_special)) - text += "|Enabled in Prefs" + if(current && current.client && (ROLE_DEVIL in current.client.prefs.be_special)) + text += " | Enabled in Prefs" else - text += "|Disabled in Prefs" + text += " | Disabled in Prefs" + sections["devil"] = text - sections["nuclear"] = text - /** WIZARD ***/ - text = "wizard" - if (SSticker.mode.config_tag=="wizard") + /** NINJA ***/ + text = "ninja" + if(SSticker.mode.config_tag == "ninja") text = uppertext(text) text = "[text]: " - if ((src in SSticker.mode.wizards) || (src in SSticker.mode.apprentices)) - text += "YES|no" - text += "
    To lair, undress, dress up, let choose name." - if (objectives.len==0) - text += "
    Objectives are empty! Randomize!" + var/datum/antagonist/ninja/ninjainfo = has_antag_datum(ANTAG_DATUM_NINJA) + if(ninjainfo) + if(ninjainfo.helping_station) + text += "employee | syndicate | NANOTRASEN | EQUIP" + else + text += "employee | SYNDICATE | nanotrasen | EQUIP" else - text += "yes|NO" - - if(current && current.client && (ROLE_WIZARD in current.client.prefs.be_special)) - text += "|Enabled in Prefs" + text += "EMPLOYEE | syndicate | nanotrasen | random allegiance" + if(current && current.client && (ROLE_NINJA in current.client.prefs.be_special)) + text += " | Enabled in Prefs" else - text += "|Disabled in Prefs" + text += " | Disabled in Prefs" + sections["ninja"] = text - sections["wizard"] = text - /** CULT ***/ - text = "cult" - if (SSticker.mode.config_tag=="cult") - text = uppertext(text) - text = "[text]: " - if(iscultist(current)) - text += "loyal|employee|CULTIST" - text += "
    Give tome|amulet." + if(!issilicon(current)) + /** CULT ***/ + text = "cult" + if (SSticker.mode.config_tag=="cult") + text = uppertext(text) + text = "[text]: " + if(iscultist(current)) + text += "not mindshielded | employee | CULTIST" + text += "
    Give tome | amulet." + else if(is_convertable_to_cult(current)) + text += "not mindshielded | EMPLOYEE | cultist" + else + text += "[!current.isloyal() ? "not mindshielded" : "MINDSHIELDED"] | EMPLOYEE | cannot serve Nar-Sie" - else if(current.isloyal()) - text += "LOYAL|employee|cultist" - else if(is_convertable_to_cult(current)) - text += "loyal|EMPLOYEE|cultist" - else - text += "loyal|EMPLOYEE|cannot serve Nar-Sie" + if(current && current.client && (ROLE_CULTIST in current.client.prefs.be_special)) + text += " | Enabled in Prefs" + else + text += " | Disabled in Prefs" - if(current && current.client && (ROLE_CULTIST in current.client.prefs.be_special)) - text += "|Enabled in Prefs" - else - text += "|Disabled in Prefs" + sections["cult"] = text - sections["cult"] = text - /** CLOCKWORK CULT **/ - text = "clockwork cult" - if(SSticker.mode.config_tag == "clockwork cult") - text = uppertext(text) - text = "[text]: " - if(is_servant_of_ratvar(current)) - text += "loyal|employee|SERVANT" - text += "
    Give slab" - else if(current.isloyal()) - text += "LOYAL|employee|servant" - else if(is_eligible_servant(current)) - text += "loyal|EMPLOYEE|servant" - else - text += "loyal|EMPLOYEE|cannot serve Ratvar" + if(ishuman(current) || issilicon(current)) + /** CLOCKWORK CULT **/ + text = "clockwork cult" + if(SSticker.mode.config_tag == "clockwork cult") + text = uppertext(text) + text = "[text]: " + if(is_servant_of_ratvar(current)) + text += "not mindshielded | employee | SERVANT" + text += "
    Give slab" + else if(is_eligible_servant(current)) + text += "not mindshielded | EMPLOYEE | servant" + else + text += "[!current.isloyal() ? "not mindshielded" : "MINDSHIELDED"] | EMPLOYEE | cannot serve Ratvar" - if(current && current.client && (ROLE_SERVANT_OF_RATVAR in current.client.prefs.be_special)) - text += "|Enabled in Prefs" - else - text += "|Disabled in Prefs" + if(current && current.client && (ROLE_SERVANT_OF_RATVAR in current.client.prefs.be_special)) + text += " | Enabled in Prefs" + else + text += " | Disabled in Prefs" sections["clockcult"] = text - /** TRAITOR ***/ - text = "traitor" - if (SSticker.mode.config_tag=="traitor" || SSticker.mode.config_tag=="traitorchan") - text = uppertext(text) - text = "[text]: " - if (src in SSticker.mode.traitors) - text += "TRAITOR|loyal" - if (objectives.len==0) - text += "
    Objectives are empty! Randomize!" - else - text += "traitor|LOYAL" - if(current && current.client && (ROLE_TRAITOR in current.client.prefs.be_special)) - text += "|Enabled in Prefs" - else - text += "|Disabled in Prefs" - - sections["traitor"] = text - - if(ishuman(current) || ismonkey(current)) - - /** CHANGELING ***/ - text = "changeling" - if (SSticker.mode.config_tag=="changeling" || SSticker.mode.config_tag=="traitorchan") - text = uppertext(text) - text = "[text]: " - if ((src in SSticker.mode.changelings) && special_role) - text += "YES|no" - if (objectives.len==0) - text += "
    Objectives are empty! Randomize!" - if(changeling && changeling.stored_profiles.len && (current.real_name != changeling.first_prof.name) ) - text += "
    Transform to initial appearance." - else if(src in SSticker.mode.changelings) //Station Aligned Changeling - text += "YES (but not an antag)|no" - if (objectives.len==0) - text += "
    Objectives are empty! Randomize!" - if(changeling && changeling.stored_profiles.len && (current.real_name != changeling.first_prof.name) ) - text += "
    Transform to initial appearance." - else - text += "yes|NO" - - if(current && current.client && (ROLE_CHANGELING in current.client.prefs.be_special)) - text += "|Enabled in Prefs" - else - text += "|Disabled in Prefs" - - sections["changeling"] = text - - /** MONKEY ***/ - text = "monkey" - if (SSticker.mode.config_tag=="monkey") - text = uppertext(text) - text = "[text]: " - if (ishuman(current)) - text += "healthy|infected|HUMAN|other" - else if(ismonkey(current)) - var/found = FALSE - for(var/datum/disease/transformation/jungle_fever/JF in current.viruses) - found = TRUE - break - - if(found) - text += "healthy|INFECTED|human|other" - else - text += "HEALTHY|infected|human|other" - - else - text += "healthy|infected|human|OTHER" - - if(current && current.client && (ROLE_MONKEY in current.client.prefs.be_special)) - text += "|Enabled in Prefs" - else - text += "|Disabled in Prefs" - - sections["monkey"] = text - - /** devil ***/ - text = "devil" - if(SSticker.mode.config_tag == "devil") - text = uppertext(text) - text = "[text]: " - var/datum/antagonist/devil/devilinfo = has_antag_datum(ANTAG_DATUM_DEVIL) - if(devilinfo) - if(!devilinfo.ascendable) - text += "DEVIL|Ascendable Devil|sintouched|human" - else - text += "DEVIL|ASCENDABLE DEVIL|sintouched|human" - else if(src in SSticker.mode.sintouched) - text += "devil|Ascendable Devil|SINTOUCHED|human" - else - text += "devil|Ascendable Devil|sintouched|HUMAN" - - if(current && current.client && (ROLE_DEVIL in current.client.prefs.be_special)) - text += "|Enabled in Prefs" - else - text += "|Disabled in Prefs" - sections["devil"] = text - -/** NINJA ***/ - text = "ninja" - if(SSticker.mode.config_tag == "ninja") - text = uppertext(text) - text = "[text]: " - var/datum/antagonist/ninja/ninjainfo = has_antag_datum(ANTAG_DATUM_NINJA) - if(ninjainfo) - if(ninjainfo.helping_station) - text += "employee | syndicate | NANOTRASEN | EQUIP" - else - text += "employee | SYNDICATE | nanotrasen | EQUIP" - else - text += "EMPLOYEE | syndicate | nanotrasen | random allegiance" - if(current && current.client && (ROLE_NINJA in current.client.prefs.be_special)) - text += " | Enabled in Prefs" - else - text += " | Disabled in Prefs" - sections["ninja"] = text - - -/** SILICON ***/ + /** SILICON ***/ if(issilicon(current)) text = "silicon" var/mob/living/silicon/robot/robot = current @@ -738,7 +748,7 @@ text = "Uplink: give" var/obj/item/device/uplink/U = find_syndicate_uplink() if(U) - text += "|take" + text += " | take" if (check_rights(R_FUN, 0)) text += ", [U.telecrystals] TC" else @@ -763,7 +773,10 @@ out += "Announce objectives

    " - usr << browse(out, "window=edit_memory[src];size=500x600") + var/datum/browser/popup = new(usr, "edit_memory", "", 600, 600) + popup.set_content(out) + popup.open() + //usr << browse(out, "window=edit_memory[src];size=575x600") /datum/mind/Topic(href, href_list) @@ -890,7 +903,7 @@ if(objective&&objective.type==text2path("/datum/objective/[new_obj_type]")) def_num = objective.target_amount - var/target_number = input("Input target number:", "Objective", def_num) as num|null + var/target_number = input("Input target number:", "Objective", def_num) as num | null if (isnull(target_number))//Ordinarily, you wouldn't need isnull. In this case, the value may already exist. return @@ -1387,7 +1400,7 @@ sleep(0) //because deleting of virus is doing throught spawn(0) //What log_admin("[key_name(usr)] attempting to humanize [key_name(current)]") message_admins("[key_name_admin(usr)] attempting to humanize [key_name_admin(current)]") - H = M.humanize(TR_KEEPITEMS | TR_KEEPIMPLANTS | TR_KEEPORGANS | TR_KEEPDAMAGE | TR_KEEPVIRUS | TR_DEFAULTMSG) + H = M.humanize(TR_KEEPITEMS | TR_KEEPIMPLANTS | TR_KEEPORGANS | TR_KEEPDAMAGE | TR_KEEPVIRUS | TR_DEFAULTMSG) if(H) src = H.mind @@ -1421,7 +1434,7 @@ if(check_rights(R_FUN, 0)) var/obj/item/device/uplink/U = find_syndicate_uplink() if(U) - var/crystals = input("Amount of telecrystals for [key]","Syndicate uplink", U.telecrystals) as null|num + var/crystals = input("Amount of telecrystals for [key]","Syndicate uplink", U.telecrystals) as null | num if(!isnull(crystals)) U.telecrystals = crystals message_admins("[key_name_admin(usr)] changed [current]'s telecrystal count to [crystals].") @@ -1468,6 +1481,7 @@ if(!(src in SSticker.mode.syndicates)) SSticker.mode.syndicates += src SSticker.mode.update_synd_icons_added(src) + assigned_role = "Syndicate" special_role = "Syndicate" SSticker.mode.forge_syndicate_objectives(src) SSticker.mode.greet_syndicate(src) @@ -1715,7 +1729,7 @@ /mob/living/carbon/human/mind_initialize() ..() if(!mind.assigned_role) - mind.assigned_role = "Assistant" //defualt + mind.assigned_role = "Unassigned" //default //XENO /mob/living/carbon/alien/mind_initialize() diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 272ec34d94..1e8ef4c5e2 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -29,6 +29,7 @@ var/list/priority_overlays //overlays that should remain on top and not normally removed when using cut_overlay functions, like c4. var/datum/proximity_monitor/proximity_monitor + var/buckle_message_cooldown = 0 /atom/New(loc, ...) //atom creation method that preloads variables at creation @@ -291,7 +292,10 @@ else to_chat(user, "Nothing.") -/atom/proc/relaymove() +/atom/proc/relaymove(mob/user) + if(buckle_message_cooldown <= world.time) + buckle_message_cooldown = world.time + 50 + to_chat(user, "You can't move while buckled to [src]!") return /atom/proc/contents_explosion(severity, target) @@ -300,6 +304,7 @@ /atom/proc/ex_act(severity, target) set waitfor = FALSE contents_explosion(severity, target) + SendSignal(COMSIG_ATOM_EX_ACT, severity, target) /atom/proc/blob_act(obj/structure/blob/B) return @@ -464,8 +469,8 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons) /atom/proc/singularity_act() return -/atom/proc/singularity_pull() - return +/atom/proc/singularity_pull(obj/singularity/S, current_size) + SendSignal(COMSIG_ATOM_SING_PULL, S, current_size) /atom/proc/acid_act(acidpwr, acid_volume) return diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index b4e6db1ebe..38c815ee43 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -1,11 +1,4 @@ -#ifndef PIXEL_SCALE -#define PIXEL_SCALE 0 -#if DM_VERSION >= 512 -#error HEY, PIXEL_SCALE probably exists now, remove this gross ass shim. -#endif -#endif - /atom/movable layer = OBJ_LAYER var/last_move = null @@ -222,7 +215,7 @@ //to differentiate it, naturally everyone forgot about this immediately and so some things //would bump twice, so now it's called Collide /atom/movable/proc/Collide(atom/A) - if((A)) + if(A) if(throwing) throwing.hit_atom(A) . = 1 diff --git a/code/game/gamemodes/antag_spawner.dm b/code/game/gamemodes/antag_spawner.dm index a485bc2d1a..ab9c041efe 100644 --- a/code/game/gamemodes/antag_spawner.dm +++ b/code/game/gamemodes/antag_spawner.dm @@ -108,6 +108,7 @@ new_objective.explanation_text = "Protect [usr.real_name], the wizard." M.mind.objectives += new_objective SSticker.mode.apprentices += M.mind + M.mind.assigned_role = "Apprentice" M.mind.special_role = "apprentice" SSticker.mode.update_wiz_icons_added(M.mind) SEND_SOUND(M, sound('sound/effects/magic.ogg')) diff --git a/code/game/gamemodes/antag_spawner.dm.rej b/code/game/gamemodes/antag_spawner.dm.rej new file mode 100644 index 0000000000..ea9a00132a --- /dev/null +++ b/code/game/gamemodes/antag_spawner.dm.rej @@ -0,0 +1,9 @@ +diff a/code/game/gamemodes/antag_spawner.dm b/code/game/gamemodes/antag_spawner.dm (rejected hunks) +@@ -108,6 +108,7 @@ + new_objective.explanation_text = "Protect [usr.real_name], the wizard." + M.mind.objectives += new_objective + SSticker.mode.apprentices += M.mind ++ M.mind.assigned_role = "Apprentice" + M.mind.special_role = "apprentice" + SSticker.mode.update_wiz_icons_added(M.mind) + M << sound('sound/effects/magic.ogg') diff --git a/code/game/gamemodes/blob/blobs/shield.dm b/code/game/gamemodes/blob/blobs/shield.dm index 173166ddf3..fedc2eb6ab 100644 --- a/code/game/gamemodes/blob/blobs/shield.dm +++ b/code/game/gamemodes/blob/blobs/shield.dm @@ -7,11 +7,9 @@ brute_resist = 0.25 explosion_block = 3 point_return = 4 - atmosblock = 1 + atmosblock = TRUE armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 90, acid = 90) - - /obj/structure/blob/shield/scannerreport() if(atmosblock) return "Will prevent the spread of atmospheric changes." @@ -26,10 +24,10 @@ icon_state = "blob_shield_damaged" name = "weakened strong blob" desc = "A wall of twitching tendrils." - atmosblock = 0 + atmosblock = FALSE else icon_state = initial(icon_state) name = initial(name) desc = initial(desc) - atmosblock = 1 - air_update_turf(1) + atmosblock = TRUE + air_update_turf(1) \ No newline at end of file diff --git a/code/game/gamemodes/blob/powers.dm b/code/game/gamemodes/blob/powers.dm index 389888ac28..6baf8b4dbe 100644 --- a/code/game/gamemodes/blob/powers.dm +++ b/code/game/gamemodes/blob/powers.dm @@ -363,7 +363,7 @@ to_chat(src, "Node Blobs are blobs which grow, like the core. Like the core it can activate resource and factory blobs.") to_chat(src, "In addition to the buttons on your HUD, there are a few click shortcuts to speed up expansion and defense.") to_chat(src, "Shortcuts: Click = Expand Blob | Middle Mouse Click = Rally Spores | Ctrl Click = Create Shield Blob | Alt Click = Remove Blob") - to_chat(src, "Attempting to talk will send a message to all other GLOB.overminds, allowing you to coordinate with them.") + to_chat(src, "Attempting to talk will send a message to all other overminds, allowing you to coordinate with them.") if(!placed && autoplace_max_time <= world.time) to_chat(src, "You will automatically place your blob core in [round((autoplace_max_time - world.time)/600, 0.5)] minutes.") to_chat(src, "You [manualplace_min_time ? "will be able to":"can"] manually place your blob core by pressing the Place Blob Core button in the bottom right corner of the screen.") diff --git a/code/game/gamemodes/blob/theblob.dm b/code/game/gamemodes/blob/theblob.dm index f6cdd64bb6..8443f3d6f1 100644 --- a/code/game/gamemodes/blob/theblob.dm +++ b/code/game/gamemodes/blob/theblob.dm @@ -8,6 +8,7 @@ opacity = 0 anchored = TRUE layer = BELOW_MOB_LAYER + CanAtmosPass = ATMOS_PASS_PROC var/point_return = 0 //How many points the blob gets back when it removes a blob of that type. If less than 0, blob cannot be removed. max_integrity = 30 armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 80, acid = 70) @@ -16,19 +17,9 @@ var/heal_timestamp = 0 //we got healed when? var/brute_resist = 0.5 //multiplies brute damage by this var/fire_resist = 1 //multiplies burn damage by this - var/atmosblock = 0 //if the blob blocks atmos and heat spread + var/atmosblock = FALSE //if the blob blocks atmos and heat spread var/mob/camera/blob/overmind -/obj/structure/blob/attack_hand(mob/M) - . = ..() - M.changeNext_move(CLICK_CD_MELEE) - var/a = pick("gently stroke", "nuzzle", "affectionatly pet", "cuddle") - M.visible_message("[M] [a]s [src]!", "You [a] [src]!") - to_chat(overmind, "[M] [a]s you!") - playsound(src, 'sound/effects/blobattack.ogg', 50, 1) //SQUISH SQUISH - - - /obj/structure/blob/Initialize() var/area/Ablob = get_area(loc) if(Ablob.blob_allowed) //Is this area allowed for winning as blob? @@ -37,17 +28,16 @@ setDir(pick(GLOB.cardinals)) update_icon() .= ..() - ConsumeTile() if(atmosblock) - CanAtmosPass = ATMOS_PASS_NO air_update_turf(1) + ConsumeTile() /obj/structure/blob/proc/creation_action() //When it's created by the overmind, do this. return /obj/structure/blob/Destroy() if(atmosblock) - atmosblock = 0 + atmosblock = FALSE air_update_turf(1) GLOB.blobs_legit -= src //if it was in the legit blobs list, it isn't now GLOB.blobs -= src //it's no longer in the all blobs list either @@ -79,6 +69,9 @@ return 1 return 0 +/obj/structure/blob/CanAtmosPass(turf/T) + return !atmosblock + /obj/structure/blob/CanAStarPass(ID, dir, caller) . = 0 if(ismovableatom(caller)) @@ -97,8 +90,10 @@ /obj/structure/blob/proc/Life() return -/obj/structure/blob/proc/Pulse_Area(pulsing_overmind = overmind, claim_range = 10, pulse_range = 3, expand_range = 2) - src.Be_Pulsed() +/obj/structure/blob/proc/Pulse_Area(mob/camera/blob/pulsing_overmind, claim_range = 10, pulse_range = 3, expand_range = 2) + if(QDELETED(pulsing_overmind)) + pulsing_overmind = overmind + Be_Pulsed() var/expanded = FALSE if(prob(70) && expand()) expanded = TRUE @@ -353,4 +348,4 @@ icon_state = "blob" name = "blob" desc = "A thick wall of writhing tendrils." - brute_resist = 0.25 + brute_resist = 0.25 \ No newline at end of file diff --git a/code/game/gamemodes/clock_cult/clock_structures/prolonging_prism.dm b/code/game/gamemodes/clock_cult/clock_structures/prolonging_prism.dm index cf730189e3..9ef7fa4ab7 100644 --- a/code/game/gamemodes/clock_cult/clock_structures/prolonging_prism.dm +++ b/code/game/gamemodes/clock_cult/clock_structures/prolonging_prism.dm @@ -26,8 +26,8 @@ to_chat(user, "An emergency shuttle has arrived and this prism is no longer useful; attempt to activate it to gain a partial refund of components used.") else var/efficiency = get_efficiency_mod(TRUE) - to_chat(user, "It requires at least [get_delay_cost()]W of power to attempt to delay the arrival of an emergency shuttle by [2 * efficiency] minutes.") - to_chat(user, "This cost increases by [delay_cost_increase]W for every previous activation.") + to_chat(user, "It requires at least [DisplayPower(get_delay_cost())] of power to attempt to delay the arrival of an emergency shuttle by [2 * efficiency] minutes.") + to_chat(user, "This cost increases by [DisplayPower(delay_cost_increase)] for every previous activation.") /obj/structure/destructible/clockwork/powered/prolonging_prism/forced_disable(bad_effects) if(active) @@ -126,7 +126,7 @@ if(!hex_combo) hex_combo = mutable_appearance('icons/effects/64x64.dmi', n, RIPPLE_LAYER) else - hex_combo.overlays += mutable_appearance('icons/effects/64x64.dmi', n, RIPPLE_LAYER) + hex_combo.add_overlay(mutable_appearance('icons/effects/64x64.dmi', n, RIPPLE_LAYER)) if(hex_combo) //YOU BUILT A HEXAGON hex_combo.pixel_x = -16 hex_combo.pixel_y = -16 diff --git a/code/game/gamemodes/gang/recaller.dm b/code/game/gamemodes/gang/recaller.dm index 86f68029d0..120e3a6345 100644 --- a/code/game/gamemodes/gang/recaller.dm +++ b/code/game/gamemodes/gang/recaller.dm @@ -3,7 +3,9 @@ name = "suspicious device" desc = "A strange device of sorts. Hard to really make out what it actually does if you don't know how to operate it." icon_state = "gangtool-white" - item_state = "walkietalkie" + item_state = "radio" + lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' + righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' throwforce = 0 w_class = WEIGHT_CLASS_TINY throw_speed = 3 diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm index 4f3b4c3ea2..8b16b2b0d5 100644 --- a/code/game/gamemodes/malfunction/Malf_Modules.dm +++ b/code/game/gamemodes/malfunction/Malf_Modules.dm @@ -671,7 +671,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list( var/obj/machinery/transformer/conveyor = new(T) conveyor.masterAI = owner playsound(T, 'sound/effects/phasein.ogg', 100, 1) - owner_AI.can_shunt = TRUE + owner_AI.can_shunt = FALSE to_chat(owner, "You are no longer able to shunt your core to APCs.") adjust_uses(-1) diff --git a/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm b/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm index 58ca8bbea9..182b7e2756 100644 --- a/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm +++ b/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm @@ -12,6 +12,8 @@ var/list/abductee_minds var/flash = " - || - " var/obj/machinery/abductor/console/console + var/message_cooldown = 0 + var/breakout_time = 0.75 /obj/machinery/abductor/experiment/MouseDrop_T(mob/target, mob/user) if(user.stat || user.lying || !Adjacent(user) || !target.Adjacent(user) || !ishuman(target)) @@ -40,25 +42,23 @@ /obj/machinery/abductor/experiment/relaymove(mob/user) if(user.stat != CONSCIOUS) return - container_resist(user) + if(message_cooldown <= world.time) + message_cooldown = world.time + 50 + to_chat(user, "[src]'s door won't budge!") /obj/machinery/abductor/experiment/container_resist(mob/living/user) - var/breakout_time = 600 user.changeNext_move(CLICK_CD_BREAKOUT) user.last_special = world.time + CLICK_CD_BREAKOUT - to_chat(user, "You lean on the back of [src] and start pushing the door open... (this will take about a minute.)") - user.visible_message("You hear a metallic creaking from [src]!") - - if(do_after(user,(breakout_time), target = src)) + user.visible_message("You see [user] kicking against the door of [src]!", \ + "You lean on the back of [src] and start pushing the door open... (this will take about [(breakout_time<1) ? "[breakout_time*60] seconds" : "[breakout_time] minute\s"].)", \ + "You hear a metallic creaking from [src].") + if(do_after(user,(breakout_time*60*10), target = src)) //minutes * 60seconds * 10deciseconds if(!user || user.stat != CONSCIOUS || user.loc != src || state_open) return - - visible_message("[user] successfully broke out of [src]!") - to_chat(user, "You successfully break out of [src]!") - + user.visible_message("[user] successfully broke out of [src]!", \ + "You successfully break out of [src]!") open_machine() - /obj/machinery/abductor/experiment/proc/dissection_icon(mob/living/carbon/human/H) var/icon/photo = null var/g = (H.gender == FEMALE) ? "f" : "m" diff --git a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm index bbd78ff76a..50b7c93509 100644 --- a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm +++ b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm @@ -257,10 +257,15 @@ /obj/machinery/door/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) var/isonshuttle = istype(get_area(src), /area/shuttle) for(var/turf/T in range(1, src)) - if(isspaceturf(T) || (!isonshuttle && (istype(T.loc, /area/shuttle) || istype(T.loc, /area/space))) || (isonshuttle && !istype(T.loc, /area/shuttle))) + var/area/A = get_area(T) + if(isspaceturf(T) || (!isonshuttle && (istype(A, /area/shuttle) || istype(A, /area/space))) || (isonshuttle && !istype(A, /area/shuttle))) to_chat(S, "Destroying this object has the potential to cause a hull breach. Aborting.") S.target = null return FALSE + else if(istype(A, /area/engine/supermatter)) + to_chat(S, "Disrupting the containment of a supermatter crystal would not be to our benefit. Aborting.") + S.target = null + return FALSE S.DisIntegrate(src) return TRUE @@ -344,19 +349,29 @@ /turf/closed/wall/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) var/isonshuttle = istype(loc, /area/shuttle) for(var/turf/T in range(1, src)) - if(isspaceturf(T) || (!isonshuttle && (istype(T.loc, /area/shuttle) || istype(T.loc, /area/space))) || (isonshuttle && !istype(T.loc, /area/shuttle))) + var/area/A = get_area(T) + if(isspaceturf(T) || (!isonshuttle && (istype(A, /area/shuttle) || istype(A, /area/space))) || (isonshuttle && !istype(A, /area/shuttle))) to_chat(S, "Destroying this object has the potential to cause a hull breach. Aborting.") S.target = null return TRUE + else if(istype(A, /area/engine/supermatter)) + to_chat(S, "Disrupting the containment of a supermatter crystal would not be to our benefit. Aborting.") + S.target = null + return TRUE return ..() /obj/structure/window/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) var/isonshuttle = istype(get_area(src), /area/shuttle) for(var/turf/T in range(1, src)) - if(isspaceturf(T) || (!isonshuttle && (istype(T.loc, /area/shuttle) || istype(T.loc, /area/space))) || (isonshuttle && !istype(T.loc, /area/shuttle))) + var/area/A = get_area(T) + if(isspaceturf(T) || (!isonshuttle && (istype(A, /area/shuttle) || istype(A, /area/space))) || (isonshuttle && !istype(A, /area/shuttle))) to_chat(S, "Destroying this object has the potential to cause a hull breach. Aborting.") S.target = null return TRUE + else if(istype(A, /area/engine/supermatter)) + to_chat(S, "Disrupting the containment of a supermatter crystal would not be to our benefit. Aborting.") + S.target = null + return TRUE return ..() /obj/item/stack/cable_coil/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)//Wiring would be too effective as a resource diff --git a/code/game/gamemodes/miniantags/bot_swarm/swarmer_event.dm b/code/game/gamemodes/miniantags/bot_swarm/swarmer_event.dm index acef4ec8ac..f422dcfcc5 100644 --- a/code/game/gamemodes/miniantags/bot_swarm/swarmer_event.dm +++ b/code/game/gamemodes/miniantags/bot_swarm/swarmer_event.dm @@ -1,8 +1,8 @@ /datum/round_event_control/spawn_swarmer name = "Spawn Swarmer Shell" typepath = /datum/round_event/spawn_swarmer - weight = 7 - max_occurrences = 1 //Only once okay fam + weight = 0 + max_occurrences = 0 //Only once okay fam earliest_start = 18000 //30 minutes min_players = 15 diff --git a/code/game/gamemodes/nuclear/nuclear_challenge.dm b/code/game/gamemodes/nuclear/nuclear_challenge.dm index f671d38395..7b2a20a297 100644 --- a/code/game/gamemodes/nuclear/nuclear_challenge.dm +++ b/code/game/gamemodes/nuclear/nuclear_challenge.dm @@ -6,7 +6,9 @@ /obj/item/device/nuclear_challenge name = "Declaration of War (Challenge Mode)" icon_state = "gangtool-red" - item_state = "walkietalkie" + item_state = "radio" + lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' + righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' desc = "Use to send a declaration of hostilities to the target, delaying your shuttle departure for 20 minutes while they prepare for your assault. \ Such a brazen move will attract the attention of powerful benefactors within the Syndicate, who will supply your team with a massive amount of bonus telecrystals. \ Must be used within five minutes, or your benefactors will lose interest." diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index b33500db22..4bc43a6acb 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -34,7 +34,7 @@ /datum/objective/proc/find_target() var/list/possible_targets = list() for(var/datum/mind/possible_target in get_crewmember_minds()) - if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.stat != 2) && is_unique_objective(possible_target)) + if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.stat != DEAD) && is_unique_objective(possible_target)) possible_targets += possible_target if(possible_targets.len > 0) target = pick(possible_targets) diff --git a/code/game/gamemodes/objective_items.dm b/code/game/gamemodes/objective_items.dm index c1af4de9f0..c0aee8bb76 100644 --- a/code/game/gamemodes/objective_items.dm +++ b/code/game/gamemodes/objective_items.dm @@ -132,7 +132,7 @@ /datum/objective_item/steal/functionalai/check_special_completion(obj/item/device/aicard/C) for(var/mob/living/silicon/ai/A in C) - if(isAI(A) && A.stat != 2) //See if any AI's are alive inside that card. + if(isAI(A) && A.stat != DEAD) //See if any AI's are alive inside that card. return 1 return 0 diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index 51a2c6c486..f393dc5338 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -335,7 +335,7 @@ /datum/game_mode/revolution/proc/check_heads_victory() for(var/datum/mind/rev_mind in head_revolutionaries) var/turf/T = get_turf(rev_mind.current) - if((rev_mind) && (rev_mind.current) && (rev_mind.current.stat != 2) && T && (T.z == ZLEVEL_STATION)) + if((rev_mind) && (rev_mind.current) && (rev_mind.current.stat != DEAD) && T && (T.z == ZLEVEL_STATION)) if(ishuman(rev_mind.current)) return 0 return 1 diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index 59e4db9893..03e5d70b7a 100644 --- a/code/game/gamemodes/wizard/artefact.dm +++ b/code/game/gamemodes/wizard/artefact.dm @@ -8,7 +8,9 @@ desc = "A wicked curved blade of alien origin, recovered from the ruins of a vast city." icon = 'icons/obj/wizard.dmi' icon_state = "render" - item_state = "render" + item_state = "knife" + lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/kitchen_righthand.dmi' force = 15 throwforce = 10 w_class = WEIGHT_CLASS_NORMAL diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 16485c1c7b..28beb990de 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -13,7 +13,7 @@ density = FALSE anchored = TRUE state_open = TRUE - circuit = /obj/item/circuitboard/machine/sleeper + circuit = /obj/item/circuitboard/machine/sleeper var/efficiency = 1 var/min_health = -25 var/list/available_chems @@ -27,8 +27,8 @@ var/list/chem_buttons //Used when emagged to scramble which chem is used, eg: antitoxin -> morphine var/scrambled_chems = FALSE //Are chem buttons scrambled? used as a warning -/obj/machinery/sleeper/Initialize() - . = ..() +/obj/machinery/sleeper/Initialize() + . = ..() update_icon() reset_chem_buttons() @@ -95,7 +95,7 @@ return return ..() -/obj/machinery/sleeper/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \ +/obj/machinery/sleeper/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \ datum/tgui/master_ui = null, datum/ui_state/state = GLOB.notcontained_state) if(controls_inside && state == GLOB.notcontained_state) @@ -120,7 +120,19 @@ var/mob/living/mob_occupant = occupant if(mob_occupant) data["occupant"]["name"] = mob_occupant.name - data["occupant"]["stat"] = mob_occupant.stat + switch(mob_occupant.stat) + if(CONSCIOUS) + data["occupant"]["stat"] = "Conscious" + data["occupant"]["statstate"] = "good" + if(SOFT_CRIT) + data["occupant"]["stat"] = "Conscious" + data["occupant"]["statstate"] = "average" + if(UNCONSCIOUS) + data["occupant"]["stat"] = "Unconscious" + data["occupant"]["statstate"] = "average" + if(DEAD) + data["occupant"]["stat"] = "Dead" + data["occupant"]["statstate"] = "bad" data["occupant"]["health"] = mob_occupant.health data["occupant"]["maxHealth"] = mob_occupant.maxHealth data["occupant"]["minHealth"] = HEALTH_THRESHOLD_DEAD diff --git a/code/game/machinery/_machinery.dm b/code/game/machinery/_machinery.dm index 1002b1f6dc..b070de1b1c 100644 --- a/code/game/machinery/_machinery.dm +++ b/code/game/machinery/_machinery.dm @@ -35,13 +35,12 @@ Class Variables: Next uid value in sequence stat (bitflag) - Machine status bit flags_1. - Possible bit flags_1: - BROKEN:1 -- Machine is broken - NOPOWER:2 -- No power is being supplied to machine. - POWEROFF:4 -- tbd - MAINT:8 -- machine is currently under going maintenance. - EMPED:16 -- temporary broken by EMP pulse + Machine status bit flags. + Possible bit flags: + BROKEN -- Machine is broken + NOPOWER -- No power is being supplied to machine. + MAINT -- machine is currently under going maintenance. + EMPED -- temporary broken by EMP pulse Class Procs: Initialize() 'game/machinery/machine.dm' diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm index 10e10e878a..7c1904d2fe 100644 --- a/code/game/machinery/buttons.dm +++ b/code/game/machinery/buttons.dm @@ -105,8 +105,8 @@ /obj/machinery/button/emag_act(mob/user) if(emagged) return - req_access = null - req_one_access = null + req_access = list() + req_one_access = list() playsound(src, "sparks", 100, 1) emagged = TRUE diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm index 1df8fc11e6..036b6f1f61 100644 --- a/code/game/machinery/camera/tracking.dm +++ b/code/game/machinery/camera/tracking.dm @@ -2,7 +2,7 @@ track.cameras.Cut() - if(src.stat == 2) + if(src.stat == DEAD) return var/list/L = list() @@ -45,7 +45,7 @@ track.humans.Cut() track.others.Cut() - if(usr.stat == 2) + if(usr.stat == DEAD) return list() for(var/mob/living/M in GLOB.mob_list) @@ -58,12 +58,12 @@ human = 1 var/name = M.name - while(name in track.names) + while(name in track.names) track.namecounts[name]++ name = text("[] ([])", name, track.namecounts[name]) - track.names.Add(name) - track.namecounts[name] = 1 - + track.names.Add(name) + track.namecounts[name] = 1 + if(human) track.humans[name] = M else @@ -136,9 +136,9 @@ /proc/near_camera(mob/living/M) if (!isturf(M.loc)) return 0 - if(issilicon(M)) - var/mob/living/silicon/S = M - if((!QDELETED(S.builtInCamera) || !S.builtInCamera.can_use()) && !GLOB.cameranet.checkCameraVis(M)) + if(issilicon(M)) + var/mob/living/silicon/S = M + if((!QDELETED(S.builtInCamera) || !S.builtInCamera.can_use()) && !GLOB.cameranet.checkCameraVis(M)) return 0 else if(!GLOB.cameranet.checkCameraVis(M)) return 0 diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 7ea954a671..2276b5154b 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -392,6 +392,9 @@ QDEL_IN(mob_occupant, 40) /obj/machinery/clonepod/relaymove(mob/user) + container_resist() + +/obj/machinery/clonepod/container_resist(mob/living/user) if(user.stat == CONSCIOUS) go_out() diff --git a/code/game/machinery/computer/_computer.dm b/code/game/machinery/computer/_computer.dm index 85d8f02970..0c4c6c4bbe 100644 --- a/code/game/machinery/computer/_computer.dm +++ b/code/game/machinery/computer/_computer.dm @@ -90,6 +90,7 @@ playsound(loc, 'sound/effects/glassbr3.ogg', 100, 1) stat |= BROKEN update_icon() + set_light(0) /obj/machinery/computer/emp_act(severity) switch(severity) diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm index 18a94a6a94..d9371d5678 100644 --- a/code/game/machinery/computer/aifixer.dm +++ b/code/game/machinery/computer/aifixer.dm @@ -1,7 +1,7 @@ /obj/machinery/computer/aifixer name = "\improper AI system integrity restorer" desc = "Used with intelliCards containing nonfunctioning AIs to restore them to working order." - req_access = list(ACCESS_CAPTAIN, ACCESS_ROBOTICS, ACCESS_HEADS) + req_access = list(ACCESS_CAPTAIN, ACCESS_ROBOTICS, ACCESS_HEADS) var/mob/living/silicon/ai/occupier = null var/active = 0 circuit = /obj/item/circuitboard/computer/aifixer @@ -56,7 +56,7 @@ dat += "Laws:
    [laws]
    " - if (src.occupier.stat == 2) + if (src.occupier.stat == DEAD) dat += "AI non-functional" else dat += "AI functional" diff --git a/code/game/machinery/dna_scanner.dm b/code/game/machinery/dna_scanner.dm index 65a6088721..4085b4edb4 100644 --- a/code/game/machinery/dna_scanner.dm +++ b/code/game/machinery/dna_scanner.dm @@ -14,6 +14,8 @@ var/damage_coeff var/scan_level var/precision_coeff + var/message_cooldown + var/breakout_time = 2 /obj/machinery/dna_scannernew/RefreshParts() scan_level = 0 @@ -65,23 +67,20 @@ open_machine() /obj/machinery/dna_scannernew/container_resist(mob/living/user) - var/breakout_time = 2 - if(state_open || !locked) //Open and unlocked, no need to escape - state_open = TRUE + if(!locked) + open_machine() return user.changeNext_move(CLICK_CD_BREAKOUT) user.last_special = world.time + CLICK_CD_BREAKOUT - to_chat(user, "You lean on the back of [src] and start pushing the door open... (this will take about [breakout_time] minutes.)") - user.visible_message("You hear a metallic creaking from [src]!") - + user.visible_message("You see [user] kicking against the door of [src]!", \ + "You lean on the back of [src] and start pushing the door open... (this will take about [(breakout_time<1) ? "[breakout_time*60] seconds" : "[breakout_time] minute\s"].)", \ + "You hear a metallic creaking from [src].") if(do_after(user,(breakout_time*60*10), target = src)) //minutes * 60seconds * 10deciseconds if(!user || user.stat != CONSCIOUS || user.loc != src || state_open || !locked) return - locked = FALSE - visible_message("[user] successfully broke out of [src]!") - to_chat(user, "You successfully break out of [src]!") - + user.visible_message("[user] successfully broke out of [src]!", \ + "You successfully break out of [src]!") open_machine() /obj/machinery/dna_scannernew/proc/locate_computer(type_) @@ -122,10 +121,11 @@ /obj/machinery/dna_scannernew/relaymove(mob/user as mob) if(user.stat || locked) + if(message_cooldown <= world.time) + message_cooldown = world.time + 50 + to_chat(user, "[src]'s door won't budge!") return - open_machine() - return /obj/machinery/dna_scannernew/attackby(obj/item/I, mob/user, params) diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 6a1bb1ec3a..f76412199c 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -213,7 +213,7 @@ sleep(6) operating = FALSE desc += "
    Its access panel is smoking slightly." - open() + open(2) /obj/machinery/door/window/attackby(obj/item/I, mob/living/user, params) diff --git a/code/game/machinery/gulag_teleporter.dm b/code/game/machinery/gulag_teleporter.dm index b37c5a10a7..d77e91af90 100644 --- a/code/game/machinery/gulag_teleporter.dm +++ b/code/game/machinery/gulag_teleporter.dm @@ -19,6 +19,8 @@ The console is located at computer/gulag_teleporter.dm active_power_usage = 5000 circuit = /obj/item/circuitboard/machine/gulag_teleporter var/locked = FALSE + var/message_cooldown + var/breakout_time = 1 var/jumpsuit_type = /obj/item/clothing/under/rank/prisoner var/shoes_type = /obj/item/clothing/shoes/sneakers/orange var/obj/machinery/gulag_item_reclaimer/linked_reclaimer @@ -46,7 +48,7 @@ The console is located at computer/gulag_teleporter.dm /obj/machinery/gulag_teleporter/interact(mob/user) if(locked) - to_chat(user, "[src] is locked.") + to_chat(user, "[src] is locked!") return toggle_open() @@ -89,28 +91,27 @@ The console is located at computer/gulag_teleporter.dm if(user.stat != CONSCIOUS) return if(locked) - to_chat(user, "[src] is locked!") + if(message_cooldown <= world.time) + message_cooldown = world.time + 50 + to_chat(user, "[src]'s door won't budge!") return open_machine() /obj/machinery/gulag_teleporter/container_resist(mob/living/user) - var/breakout_time = 600 if(!locked) open_machine() return user.changeNext_move(CLICK_CD_BREAKOUT) user.last_special = world.time + CLICK_CD_BREAKOUT - to_chat(user, "You lean on the back of [src] and start pushing the door open... (this will take about a minute.)") - user.visible_message("You hear a metallic creaking from [src]!") - - if(do_after(user,(breakout_time), target = src)) + user.visible_message("You see [user] kicking against the door of [src]!", \ + "You lean on the back of [src] and start pushing the door open... (this will take about [(breakout_time<1) ? "[breakout_time*60] seconds" : "[breakout_time] minute\s"].)", \ + "You hear a metallic creaking from [src].") + if(do_after(user,(breakout_time*60*10), target = src)) //minutes * 60seconds * 10deciseconds if(!user || user.stat != CONSCIOUS || user.loc != src || state_open || !locked) return - locked = FALSE - visible_message("[user] successfully broke out of [src]!") - to_chat(user, "You successfully break out of [src]!") - + user.visible_message("[user] successfully broke out of [src]!", \ + "You successfully break out of [src]!") open_machine() /obj/machinery/gulag_teleporter/proc/locate_reclaimer() diff --git a/code/game/machinery/quantum_pad.dm b/code/game/machinery/quantum_pad.dm index 4292f5b08a..e86f78722b 100644 --- a/code/game/machinery/quantum_pad.dm +++ b/code/game/machinery/quantum_pad.dm @@ -16,6 +16,20 @@ var/power_efficiency = 1 var/obj/machinery/quantumpad/linked_pad + //mapping + var/static/list/mapped_quantum_pads = list() + var/map_pad_id = "" as text //what's my name + var/map_pad_link_id = "" as text //who's my friend + +/obj/machinery/quantumpad/Initialize() + . = ..() + if(map_pad_id) + mapped_quantum_pads[map_pad_id] = src + +/obj/machinery/quantumpad/Destroy() + mapped_quantum_pads -= map_pad_id + return ..() + /obj/machinery/quantumpad/RefreshParts() var/E = 0 for(var/obj/item/stock_parts/capacitor/C in component_parts) @@ -60,8 +74,9 @@ return if(!linked_pad || QDELETED(linked_pad)) - to_chat(user, "There is no linked pad!") - return + if(!map_pad_link_id || !initMappedLink()) + to_chat(user, "There is no linked pad!") + return if(world.time < last_teleport + teleport_cooldown) to_chat(user, "[src] is recharging power. Please wait [round((last_teleport + teleport_cooldown - world.time) / 10)] seconds.") @@ -80,7 +95,6 @@ return src.add_fingerprint(user) doteleport(user) - return /obj/machinery/quantumpad/proc/sparks() var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread @@ -88,6 +102,8 @@ s.start() /obj/machinery/quantumpad/attack_ghost(mob/dead/observer/ghost) + if(!linked_pad && map_pad_link_id) + initMappedLink() if(linked_pad) ghost.forceMove(get_turf(linked_pad)) @@ -136,6 +152,12 @@ continue do_teleport(ROI, get_turf(linked_pad)) +/obj/machinery/quantumpad/proc/initMappedLink() + . = FALSE + var/obj/machinery/quantumpad/link = mapped_quantum_pads[map_pad_link_id] + if(link) + linked_pad = link + . = TRUE /obj/item/paper/guides/quantumpad name = "Quantum Pad For Dummies" diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index cd2a5bd3b5..a78fa50a6a 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -1,379 +1,406 @@ -// SUIT STORAGE UNIT ///////////////// -/obj/machinery/suit_storage_unit - name = "suit storage unit" - desc = "An industrial unit made to hold space suits. It comes with a built-in UV cauterization mechanism. A small warning label advises that organic matter should not be placed into the unit." - icon = 'icons/obj/suitstorage.dmi' - icon_state = "close" +// SUIT STORAGE UNIT ///////////////// +/obj/machinery/suit_storage_unit + name = "suit storage unit" + desc = "An industrial unit made to hold space suits. It comes with a built-in UV cauterization mechanism. A small warning label advises that organic matter should not be placed into the unit." + icon = 'icons/obj/suitstorage.dmi' + icon_state = "close" anchored = TRUE density = TRUE - max_integrity = 250 - - var/obj/item/clothing/suit/space/suit = null - var/obj/item/clothing/head/helmet/space/helmet = null - var/obj/item/clothing/mask/mask = null - var/obj/item/storage = null - - var/suit_type = null - var/helmet_type = null - var/mask_type = null - var/storage_type = null - - state_open = FALSE - var/locked = FALSE - panel_open = FALSE - var/safeties = TRUE - - var/uv = FALSE - var/uv_super = FALSE - var/uv_cycles = 6 - -/obj/machinery/suit_storage_unit/standard_unit - suit_type = /obj/item/clothing/suit/space/eva - helmet_type = /obj/item/clothing/head/helmet/space/eva - mask_type = /obj/item/clothing/mask/breath - -/obj/machinery/suit_storage_unit/captain - suit_type = /obj/item/clothing/suit/space/hardsuit/captain - mask_type = /obj/item/clothing/mask/gas/sechailer - storage_type = /obj/item/tank/jetpack/oxygen/captain - -/obj/machinery/suit_storage_unit/engine - suit_type = /obj/item/clothing/suit/space/hardsuit/engine - mask_type = /obj/item/clothing/mask/breath - -/obj/machinery/suit_storage_unit/ce - suit_type = /obj/item/clothing/suit/space/hardsuit/engine/elite - mask_type = /obj/item/clothing/mask/breath - storage_type= /obj/item/clothing/shoes/magboots/advance - -/obj/machinery/suit_storage_unit/security - suit_type = /obj/item/clothing/suit/space/hardsuit/security - mask_type = /obj/item/clothing/mask/gas/sechailer - -/obj/machinery/suit_storage_unit/hos - suit_type = /obj/item/clothing/suit/space/hardsuit/security/hos - mask_type = /obj/item/clothing/mask/gas/sechailer - storage_type = /obj/item/tank/internals/oxygen - -/obj/machinery/suit_storage_unit/atmos - suit_type = /obj/item/clothing/suit/space/hardsuit/engine/atmos - mask_type = /obj/item/clothing/mask/gas - storage_type = /obj/item/watertank/atmos - -/obj/machinery/suit_storage_unit/mining - suit_type = /obj/item/clothing/suit/hooded/explorer - mask_type = /obj/item/clothing/mask/gas/explorer - -/obj/machinery/suit_storage_unit/mining/eva - suit_type = /obj/item/clothing/suit/space/hardsuit/mining - mask_type = /obj/item/clothing/mask/breath - -/obj/machinery/suit_storage_unit/cmo - suit_type = /obj/item/clothing/suit/space/hardsuit/medical - mask_type = /obj/item/clothing/mask/breath - -/obj/machinery/suit_storage_unit/rd - suit_type = /obj/item/clothing/suit/space/hardsuit/rd - mask_type = /obj/item/clothing/mask/breath - -/obj/machinery/suit_storage_unit/syndicate - suit_type = /obj/item/clothing/suit/space/hardsuit/syndi - mask_type = /obj/item/clothing/mask/gas/syndicate - storage_type = /obj/item/tank/jetpack/oxygen/harness - -/obj/machinery/suit_storage_unit/ert/command - suit_type = /obj/item/clothing/suit/space/hardsuit/ert - mask_type = /obj/item/clothing/mask/breath - storage_type = /obj/item/tank/internals/emergency_oxygen/double - -/obj/machinery/suit_storage_unit/ert/security - suit_type = /obj/item/clothing/suit/space/hardsuit/ert/sec - mask_type = /obj/item/clothing/mask/breath - storage_type = /obj/item/tank/internals/emergency_oxygen/double - -/obj/machinery/suit_storage_unit/ert/engineer - suit_type = /obj/item/clothing/suit/space/hardsuit/ert/engi - mask_type = /obj/item/clothing/mask/breath - storage_type = /obj/item/tank/internals/emergency_oxygen/double - -/obj/machinery/suit_storage_unit/ert/medical - suit_type = /obj/item/clothing/suit/space/hardsuit/ert/med - mask_type = /obj/item/clothing/mask/breath - storage_type = /obj/item/tank/internals/emergency_oxygen/double - + max_integrity = 250 + + var/obj/item/clothing/suit/space/suit = null + var/obj/item/clothing/head/helmet/space/helmet = null + var/obj/item/clothing/mask/mask = null + var/obj/item/storage = null + + var/suit_type = null + var/helmet_type = null + var/mask_type = null + var/storage_type = null + + state_open = FALSE + var/locked = FALSE + panel_open = FALSE + var/safeties = TRUE + + var/uv = FALSE + var/uv_super = FALSE + var/uv_cycles = 6 + var/message_cooldown + var/breakout_time = 0.5 + +/obj/machinery/suit_storage_unit/standard_unit + suit_type = /obj/item/clothing/suit/space/eva + helmet_type = /obj/item/clothing/head/helmet/space/eva + mask_type = /obj/item/clothing/mask/breath + +/obj/machinery/suit_storage_unit/captain + suit_type = /obj/item/clothing/suit/space/hardsuit/captain + mask_type = /obj/item/clothing/mask/gas/sechailer + storage_type = /obj/item/tank/jetpack/oxygen/captain + +/obj/machinery/suit_storage_unit/engine + suit_type = /obj/item/clothing/suit/space/hardsuit/engine + mask_type = /obj/item/clothing/mask/breath + +/obj/machinery/suit_storage_unit/ce + suit_type = /obj/item/clothing/suit/space/hardsuit/engine/elite + mask_type = /obj/item/clothing/mask/breath + storage_type= /obj/item/clothing/shoes/magboots/advance + +/obj/machinery/suit_storage_unit/security + suit_type = /obj/item/clothing/suit/space/hardsuit/security + mask_type = /obj/item/clothing/mask/gas/sechailer + +/obj/machinery/suit_storage_unit/hos + suit_type = /obj/item/clothing/suit/space/hardsuit/security/hos + mask_type = /obj/item/clothing/mask/gas/sechailer + storage_type = /obj/item/tank/internals/oxygen + +/obj/machinery/suit_storage_unit/atmos + suit_type = /obj/item/clothing/suit/space/hardsuit/engine/atmos + mask_type = /obj/item/clothing/mask/gas + storage_type = /obj/item/watertank/atmos + +/obj/machinery/suit_storage_unit/mining + suit_type = /obj/item/clothing/suit/hooded/explorer + mask_type = /obj/item/clothing/mask/gas/explorer + +/obj/machinery/suit_storage_unit/mining/eva + suit_type = /obj/item/clothing/suit/space/hardsuit/mining + mask_type = /obj/item/clothing/mask/breath + +/obj/machinery/suit_storage_unit/cmo + suit_type = /obj/item/clothing/suit/space/hardsuit/medical + mask_type = /obj/item/clothing/mask/breath + +/obj/machinery/suit_storage_unit/rd + suit_type = /obj/item/clothing/suit/space/hardsuit/rd + mask_type = /obj/item/clothing/mask/breath + +/obj/machinery/suit_storage_unit/syndicate + suit_type = /obj/item/clothing/suit/space/hardsuit/syndi + mask_type = /obj/item/clothing/mask/gas/syndicate + storage_type = /obj/item/tank/jetpack/oxygen/harness + +/obj/machinery/suit_storage_unit/ert/command + suit_type = /obj/item/clothing/suit/space/hardsuit/ert + mask_type = /obj/item/clothing/mask/breath + storage_type = /obj/item/tank/internals/emergency_oxygen/double + +/obj/machinery/suit_storage_unit/ert/security + suit_type = /obj/item/clothing/suit/space/hardsuit/ert/sec + mask_type = /obj/item/clothing/mask/breath + storage_type = /obj/item/tank/internals/emergency_oxygen/double + +/obj/machinery/suit_storage_unit/ert/engineer + suit_type = /obj/item/clothing/suit/space/hardsuit/ert/engi + mask_type = /obj/item/clothing/mask/breath + storage_type = /obj/item/tank/internals/emergency_oxygen/double + +/obj/machinery/suit_storage_unit/ert/medical + suit_type = /obj/item/clothing/suit/space/hardsuit/ert/med + mask_type = /obj/item/clothing/mask/breath + storage_type = /obj/item/tank/internals/emergency_oxygen/double + /obj/machinery/suit_storage_unit/Initialize() . = ..() - wires = new /datum/wires/suit_storage_unit(src) - if(suit_type) - suit = new suit_type(src) - if(helmet_type) - helmet = new helmet_type(src) - if(mask_type) - mask = new mask_type(src) - if(storage_type) - storage = new storage_type(src) - update_icon() - -/obj/machinery/suit_storage_unit/Destroy() + wires = new /datum/wires/suit_storage_unit(src) + if(suit_type) + suit = new suit_type(src) + if(helmet_type) + helmet = new helmet_type(src) + if(mask_type) + mask = new mask_type(src) + if(storage_type) + storage = new storage_type(src) + update_icon() + +/obj/machinery/suit_storage_unit/Destroy() QDEL_NULL(suit) QDEL_NULL(helmet) QDEL_NULL(mask) QDEL_NULL(storage) - return ..() - -/obj/machinery/suit_storage_unit/update_icon() - cut_overlays() - - if(uv) - if(uv_super) - add_overlay("super") - else if(occupant) - add_overlay("uvhuman") - else - add_overlay("uv") - else if(state_open) - if(stat & BROKEN) - add_overlay("broken") - else - add_overlay("open") - if(suit) - add_overlay("suit") - if(helmet) - add_overlay("helm") - if(storage) - add_overlay("storage") - else if(occupant) - add_overlay("human") - -/obj/machinery/suit_storage_unit/power_change() - ..() - if(!is_operational() && state_open) - open_machine() - dump_contents() - update_icon() - -/obj/machinery/suit_storage_unit/proc/dump_contents() - dropContents() - helmet = null - suit = null - mask = null - storage = null - occupant = null - -/obj/machinery/suit_storage_unit/deconstruct(disassembled = TRUE) + return ..() + +/obj/machinery/suit_storage_unit/update_icon() + cut_overlays() + + if(uv) + if(uv_super) + add_overlay("super") + else if(occupant) + add_overlay("uvhuman") + else + add_overlay("uv") + else if(state_open) + if(stat & BROKEN) + add_overlay("broken") + else + add_overlay("open") + if(suit) + add_overlay("suit") + if(helmet) + add_overlay("helm") + if(storage) + add_overlay("storage") + else if(occupant) + add_overlay("human") + +/obj/machinery/suit_storage_unit/power_change() + ..() + if(!is_operational() && state_open) + open_machine() + dump_contents() + update_icon() + +/obj/machinery/suit_storage_unit/proc/dump_contents() + dropContents() + helmet = null + suit = null + mask = null + storage = null + occupant = null + +/obj/machinery/suit_storage_unit/deconstruct(disassembled = TRUE) if(!(flags_1 & NODECONSTRUCT_1)) - open_machine() - dump_contents() - new /obj/item/stack/sheet/metal (loc, 2) - qdel(src) - -/obj/machinery/suit_storage_unit/MouseDrop_T(atom/A, mob/user) - if(user.stat || user.lying || !Adjacent(user) || !Adjacent(A) || !isliving(A)) - return - var/mob/living/target = A - if(!state_open) - to_chat(user, "The unit's doors are shut!") - return - if(!is_operational()) - to_chat(user, "The unit is not operational!") - return - if(occupant || helmet || suit || storage) - to_chat(user, "It's too cluttered inside to fit in!") - return - - if(target == user) - user.visible_message("[user] starts squeezing into [src]!", "You start working your way into [src]...") - else - target.visible_message("[user] starts shoving [target] into [src]!", "[user] starts shoving you into [src]!") - - if(do_mob(user, target, 30)) - if(occupant || helmet || suit || storage) - return - if(target == user) - user.visible_message("[user] slips into [src] and closes the door behind them!", "You slip into [src]'s cramped space and shut its door.") - else - target.visible_message("[user] pushes [target] into [src] and shuts its door!", "[user] shoves you into [src] and shuts the door!") - close_machine(target) - add_fingerprint(user) - -/obj/machinery/suit_storage_unit/proc/cook() - if(uv_cycles) - uv_cycles-- - uv = TRUE - locked = TRUE - update_icon() - if(occupant) - var/mob/living/mob_occupant = occupant - if(uv_super) - mob_occupant.adjustFireLoss(rand(20, 36)) - else - mob_occupant.adjustFireLoss(rand(10, 16)) - mob_occupant.emote("scream") - addtimer(CALLBACK(src, .proc/cook), 50) - else - uv_cycles = initial(uv_cycles) - uv = FALSE - locked = FALSE - if(uv_super) - visible_message("[src]'s door creaks open with a loud whining noise. A cloud of foul black smoke escapes from its chamber.") - playsound(src, 'sound/machines/airlock_alien_prying.ogg', 50, 1) - helmet = null - qdel(helmet) - suit = null - qdel(suit) // Delete everything but the occupant. - mask = null - qdel(mask) - storage = null - qdel(storage) - // The wires get damaged too. - wires.cut_all() - else - if(!occupant) - visible_message("[src]'s door slides open. The glowing yellow lights dim to a gentle green.") - else - visible_message("[src]'s door slides open, barraging you with the nauseating smell of charred flesh.") - playsound(src, 'sound/machines/airlockclose.ogg', 25, 1) - for(var/obj/item/I in src) //Scorches away blood and forensic evidence, although the SSU itself is unaffected - I.clean_blood() - I.fingerprints = list() - open_machine(FALSE) - if(occupant) - dump_contents() - -/obj/machinery/suit_storage_unit/proc/shock(mob/user, prb) - if(!prob(prb)) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(5, 1, src) - s.start() - if(electrocute_mob(user, src, src, 1, TRUE)) - return 1 - -/obj/machinery/suit_storage_unit/relaymove(mob/user) - container_resist(user) - -/obj/machinery/suit_storage_unit/container_resist(mob/living/user) - add_fingerprint(user) - if(locked) - visible_message("You see [user] kicking against the doors of [src]!", "You start kicking against the doors...") - addtimer(CALLBACK(src, .proc/resist_open, user), 300) - else - open_machine() - dump_contents() - -/obj/machinery/suit_storage_unit/proc/resist_open(mob/user) - if(!state_open && occupant && (user in src) && user.stat == 0) // Check they're still here. - visible_message("You see [user] bursts out of [src]!", "You escape the cramped confines of [src]!") - open_machine() - -/obj/machinery/suit_storage_unit/attackby(obj/item/I, mob/user, params) - if(state_open && is_operational()) - if(istype(I, /obj/item/clothing/suit/space)) - if(suit) - to_chat(user, "The unit already contains a suit!.") - return - if(!user.drop_item()) - return - suit = I - else if(istype(I, /obj/item/clothing/head/helmet)) - if(helmet) - to_chat(user, "The unit already contains a helmet!") - return - if(!user.drop_item()) - return - helmet = I - else if(istype(I, /obj/item/clothing/mask)) - if(mask) - to_chat(user, "The unit already contains a mask!") - return - if(!user.drop_item()) - return - mask = I - else - if(storage) - to_chat(user, "The auxiliary storage compartment is full!") - return - if(!user.drop_item()) - return - storage = I - - I.loc = src - visible_message("[user] inserts [I] into [src]", "You load [I] into [src].") - update_icon() - return - - if(panel_open && is_wire_tool(I)) - wires.interact(user) - if(!state_open) - if(default_deconstruction_screwdriver(user, "panel", "close", I)) - return - if(default_pry_open(I)) - dump_contents() - return - - return ..() - + open_machine() + dump_contents() + new /obj/item/stack/sheet/metal (loc, 2) + qdel(src) + +/obj/machinery/suit_storage_unit/MouseDrop_T(atom/A, mob/user) + if(user.stat || user.lying || !Adjacent(user) || !Adjacent(A) || !isliving(A)) + return + var/mob/living/target = A + if(!state_open) + to_chat(user, "The unit's doors are shut!") + return + if(!is_operational()) + to_chat(user, "The unit is not operational!") + return + if(occupant || helmet || suit || storage) + to_chat(user, "It's too cluttered inside to fit in!") + return + + if(target == user) + user.visible_message("[user] starts squeezing into [src]!", "You start working your way into [src]...") + else + target.visible_message("[user] starts shoving [target] into [src]!", "[user] starts shoving you into [src]!") + + if(do_mob(user, target, 30)) + if(occupant || helmet || suit || storage) + return + if(target == user) + user.visible_message("[user] slips into [src] and closes the door behind them!", "You slip into [src]'s cramped space and shut its door.") + else + target.visible_message("[user] pushes [target] into [src] and shuts its door!", "[user] shoves you into [src] and shuts the door!") + close_machine(target) + add_fingerprint(user) + +/obj/machinery/suit_storage_unit/proc/cook() + if(uv_cycles) + uv_cycles-- + uv = TRUE + locked = TRUE + update_icon() + if(occupant) + var/mob/living/mob_occupant = occupant + if(uv_super) + mob_occupant.adjustFireLoss(rand(20, 36)) + else + mob_occupant.adjustFireLoss(rand(10, 16)) + mob_occupant.emote("scream") + addtimer(CALLBACK(src, .proc/cook), 50) + else + uv_cycles = initial(uv_cycles) + uv = FALSE + locked = FALSE + if(uv_super) + visible_message("[src]'s door creaks open with a loud whining noise. A cloud of foul black smoke escapes from its chamber.") + playsound(src, 'sound/machines/airlock_alien_prying.ogg', 50, 1) + helmet = null + qdel(helmet) + suit = null + qdel(suit) // Delete everything but the occupant. + mask = null + qdel(mask) + storage = null + qdel(storage) + // The wires get damaged too. + wires.cut_all() + else + if(!occupant) + visible_message("[src]'s door slides open. The glowing yellow lights dim to a gentle green.") + else + visible_message("[src]'s door slides open, barraging you with the nauseating smell of charred flesh.") + playsound(src, 'sound/machines/airlockclose.ogg', 25, 1) + for(var/obj/item/I in src) //Scorches away blood and forensic evidence, although the SSU itself is unaffected + I.clean_blood() + I.fingerprints = list() + open_machine(FALSE) + if(occupant) + dump_contents() + +/obj/machinery/suit_storage_unit/proc/shock(mob/user, prb) + if(!prob(prb)) + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread + s.set_up(5, 1, src) + s.start() + if(electrocute_mob(user, src, src, 1, TRUE)) + return 1 + +/obj/machinery/suit_storage_unit/relaymove(mob/user) + if(locked) + if(message_cooldown <= world.time) + message_cooldown = world.time + 50 + to_chat(user, "[src]'s door won't budge!") + return + open_machine() + dump_contents() + +/obj/machinery/suit_storage_unit/container_resist(mob/living/user) + if(!locked) + open_machine() + dump_contents() + return + user.changeNext_move(CLICK_CD_BREAKOUT) + user.last_special = world.time + CLICK_CD_BREAKOUT + user.visible_message("You see [user] kicking against the doors of [src]!", \ + "You start kicking against the doors... (this will take about [(breakout_time<1) ? "[breakout_time*60] seconds" : "[breakout_time] minute\s"].)", \ + "You hear a thump from [src].") + if(do_after(user,(breakout_time*60*10), target = src)) //minutes * 60seconds * 10deciseconds + if(!user || user.stat != CONSCIOUS || user.loc != src ) + return + user.visible_message("[user] successfully broke out of [src]!", \ + "You successfully break out of [src]!") + open_machine() + dump_contents() + + add_fingerprint(user) + if(locked) + visible_message("You see [user] kicking against the doors of [src]!", \ + "You start kicking against the doors...") + addtimer(CALLBACK(src, .proc/resist_open, user), 300) + else + open_machine() + dump_contents() + +/obj/machinery/suit_storage_unit/proc/resist_open(mob/user) + if(!state_open && occupant && (user in src) && user.stat == 0) // Check they're still here. + visible_message("You see [user] bursts out of [src]!", \ + "You escape the cramped confines of [src]!") + open_machine() + +/obj/machinery/suit_storage_unit/attackby(obj/item/I, mob/user, params) + if(state_open && is_operational()) + if(istype(I, /obj/item/clothing/suit/space)) + if(suit) + to_chat(user, "The unit already contains a suit!.") + return + if(!user.drop_item()) + return + suit = I + else if(istype(I, /obj/item/clothing/head/helmet)) + if(helmet) + to_chat(user, "The unit already contains a helmet!") + return + if(!user.drop_item()) + return + helmet = I + else if(istype(I, /obj/item/clothing/mask)) + if(mask) + to_chat(user, "The unit already contains a mask!") + return + if(!user.drop_item()) + return + mask = I + else + if(storage) + to_chat(user, "The auxiliary storage compartment is full!") + return + if(!user.drop_item()) + return + storage = I + + I.loc = src + visible_message("[user] inserts [I] into [src]", "You load [I] into [src].") + update_icon() + return + + if(panel_open && is_wire_tool(I)) + wires.interact(user) + if(!state_open) + if(default_deconstruction_screwdriver(user, "panel", "close", I)) + return + if(default_pry_open(I)) + dump_contents() + return + + return ..() + /obj/machinery/suit_storage_unit/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \ - datum/tgui/master_ui = null, datum/ui_state/state = GLOB.notcontained_state) - ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) - if(!ui) - ui = new(user, src, ui_key, "suit_storage_unit", name, 400, 305, master_ui, state) - ui.open() - -/obj/machinery/suit_storage_unit/ui_data() - var/list/data = list() - data["locked"] = locked - data["open"] = state_open - data["safeties"] = safeties - data["uv_active"] = uv - data["uv_super"] = uv_super - if(helmet) - data["helmet"] = helmet.name - if(suit) - data["suit"] = suit.name - if(mask) - data["mask"] = mask.name - if(storage) - data["storage"] = storage.name - if(occupant) - data["occupied"] = 1 - return data - -/obj/machinery/suit_storage_unit/ui_act(action, params) - if(..() || uv) - return - switch(action) - if("door") - if(state_open) - close_machine() - else - open_machine(0) - if(occupant) - dump_contents() // Dump out contents if someone is in there. - . = TRUE - if("lock") - locked = !locked - . = TRUE - if("uv") - if(occupant && safeties) - return - else if(!helmet && !mask && !suit && !storage && !occupant) - return - else - if(occupant) - var/mob/living/mob_occupant = occupant - to_chat(mob_occupant, "[src]'s confines grow warm, then hot, then scorching. You're being burned [!mob_occupant.stat ? "alive" : "away"]!") - cook() - . = TRUE - if("dispense") - if(!state_open) - return - - var/static/list/valid_items = list("helmet", "suit", "mask", "storage") - var/item_name = params["item"] - if(item_name in valid_items) - var/obj/item/I = vars[item_name] - vars[item_name] = null - if(I) - I.forceMove(loc) - . = TRUE - update_icon() + datum/tgui/master_ui = null, datum/ui_state/state = GLOB.notcontained_state) + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "suit_storage_unit", name, 400, 305, master_ui, state) + ui.open() + +/obj/machinery/suit_storage_unit/ui_data() + var/list/data = list() + data["locked"] = locked + data["open"] = state_open + data["safeties"] = safeties + data["uv_active"] = uv + data["uv_super"] = uv_super + if(helmet) + data["helmet"] = helmet.name + if(suit) + data["suit"] = suit.name + if(mask) + data["mask"] = mask.name + if(storage) + data["storage"] = storage.name + if(occupant) + data["occupied"] = 1 + return data + +/obj/machinery/suit_storage_unit/ui_act(action, params) + if(..() || uv) + return + switch(action) + if("door") + if(state_open) + close_machine() + else + open_machine(0) + if(occupant) + dump_contents() // Dump out contents if someone is in there. + . = TRUE + if("lock") + locked = !locked + . = TRUE + if("uv") + if(occupant && safeties) + return + else if(!helmet && !mask && !suit && !storage && !occupant) + return + else + if(occupant) + var/mob/living/mob_occupant = occupant + to_chat(mob_occupant, "[src]'s confines grow warm, then hot, then scorching. You're being burned [!mob_occupant.stat ? "alive" : "away"]!") + cook() + . = TRUE + if("dispense") + if(!state_open) + return + + var/static/list/valid_items = list("helmet", "suit", "mask", "storage") + var/item_name = params["item"] + if(item_name in valid_items) + var/obj/item/I = vars[item_name] + vars[item_name] = null + if(I) + I.forceMove(loc) + . = TRUE + update_icon() diff --git a/code/game/mecha/equipment/tools/mining_tools.dm b/code/game/mecha/equipment/tools/mining_tools.dm index 6d15716941..d0a1310e8e 100644 --- a/code/game/mecha/equipment/tools/mining_tools.dm +++ b/code/game/mecha/equipment/tools/mining_tools.dm @@ -58,7 +58,9 @@ /turf/open/floor/plating/asteroid/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill) for(var/turf/open/floor/plating/asteroid/M in range(1, drill.chassis)) if(get_dir(drill.chassis,M)&drill.chassis.dir) - M.gets_dug() + for(var/I in GetComponents(/datum/component/archaeology)) + var/datum/component/archaeology/archy = I + archy.gets_dug() drill.log_message("Drilled through [src]") drill.move_ores() diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index fe0865ca24..b6b4241402 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -127,6 +127,8 @@ desc = "A device that shoots resonant plasma bursts at extreme velocity. The blasts are capable of crushing rock and demolishing solid obstacles." icon_state = "mecha_plasmacutter" item_state = "plasmacutter" + lefthand_file = 'icons/mob/inhands/weapons/guns_lefthand.dmi' + righthand_file = 'icons/mob/inhands/weapons/guns_righthand.dmi' energy_drain = 30 origin_tech = "materials=3;plasmatech=4;engineering=3" projectile = /obj/item/projectile/plasma/adv/mech diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index 14efd0a610..79c4971665 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -76,7 +76,7 @@ if(emagged) return emagged = TRUE - req_access = null + req_access = list() say("DB error \[Code 0x00F1\]") sleep(10) say("Attempting auto-repair...") diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 9142549d0a..aa5788192e 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -421,7 +421,7 @@ target = safepick(view(3,target)) if(!target) return - if(!target.Adjacent(src)) + if(!Adjacent(target)) if(selected && selected.is_ranged()) if(selected.action(target,params)) selected.start_cooldown() diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm index 0648300147..ac54647468 100644 --- a/code/game/objects/buckling.dm +++ b/code/game/objects/buckling.dm @@ -62,7 +62,7 @@ M.setDir(dir) buckled_mobs |= M M.update_canmove() - M.throw_alert("buckled", /obj/screen/alert/restrained/buckled, new_master = src) + M.throw_alert("buckled", /obj/screen/alert/restrained/buckled) post_buckle_mob(M) return TRUE @@ -131,5 +131,3 @@ "You hear metal clanking.") add_fingerprint(user) return M - - diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index f1dde24690..f640e0f90b 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -35,10 +35,10 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) pressure_resistance = 4 var/obj/item/master = null - var/heat_protection = 0 //flags_1 which determine which body parts are protected from heat. Use the HEAD, CHEST, GROIN, etc. flags_1. See setup.dm - var/cold_protection = 0 //flags_1 which determine which body parts are protected from cold. Use the HEAD, CHEST, GROIN, etc. flags_1. See setup.dm - var/max_heat_protection_temperature //Set this variable to determine up to which temperature (IN KELVIN) the item protects against heat damage. Keep at null to disable protection. Only protects areas set by heat_protection flags_1 - var/min_cold_protection_temperature //Set this variable to determine down to which temperature (IN KELVIN) the item protects against cold damage. 0 is NOT an acceptable number due to if(varname) tests!! Keep at null to disable protection. Only protects areas set by cold_protection flags_1 + var/heat_protection = 0 //flags which determine which body parts are protected from heat. Use the HEAD, CHEST, GROIN, etc. flags. See setup.dm + var/cold_protection = 0 //flags which determine which body parts are protected from cold. Use the HEAD, CHEST, GROIN, etc. flags. See setup.dm + var/max_heat_protection_temperature //Set this variable to determine up to which temperature (IN KELVIN) the item protects against heat damage. Keep at null to disable protection. Only protects areas set by heat_protection flags + var/min_cold_protection_temperature //Set this variable to determine down to which temperature (IN KELVIN) the item protects against cold damage. 0 is NOT an acceptable number due to if(varname) tests!! Keep at null to disable protection. Only protects areas set by cold_protection flags var/list/actions //list of /datum/action's that this item has. var/list/actions_types //list of paths of action datums to give to the item on New(). @@ -48,7 +48,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) var/item_color = null //this needs deprecating, soonish - var/body_parts_covered = 0 //see setup.dm for appropriate bit flags_1 + var/body_parts_covered = 0 //see setup.dm for appropriate bit flags //var/heat_transfer_coefficient = 1 //0 prevents all transfers, 1 is invisible var/gas_transfer_coefficient = 1 // for leaking gas from turf to mask and vice-versa (for masks right now, but at some point, i'd like to include space helmets) var/permeability_coefficient = 1 // for chemicals/diseases @@ -64,6 +64,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) var/list/materials var/origin_tech = null //Used by R&D to determine what research bonuses it grants. var/needs_permit = 0 //Used by security bots to determine if this item is safe for public use. + var/emagged = FALSE var/list/attack_verb //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]" var/list/species_exception = null // list() of species types, if a species cannot put items in a certain slot, but species type is in list, it will be able to wear that item @@ -86,7 +87,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) var/embedded_unsafe_removal_pain_multiplier = EMBEDDED_UNSAFE_REMOVAL_PAIN_MULTIPLIER //The coefficient of multiplication for the damage removing this without surgery causes (this*w_class) var/embedded_unsafe_removal_time = EMBEDDED_UNSAFE_REMOVAL_TIME //A time in ticks, multiplied by the w_class. - var/flags_cover = 0 //for flags_1 such as GLASSESCOVERSEYES + var/flags_cover = 0 //for flags such as GLASSESCOVERSEYES var/heat = 0 var/sharpness = IS_BLUNT var/toolspeed = 1 @@ -128,6 +129,12 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) if(force_string) force_string_override = TRUE + if(!hitsound) + if(damtype == "fire") + hitsound = 'sound/items/welder.ogg' + if(damtype == "brute") + hitsound = "swing_hit" + /obj/item/Destroy() flags_1 &= ~DROPDEL_1 //prevent reqdels if(ismob(loc)) @@ -542,9 +549,10 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) transfer_blood = 0 /obj/item/singularity_pull(S, current_size) + ..() if(current_size >= STAGE_FOUR) throw_at(S,14,3, spin=0) - else ..() + else return /obj/item/throw_impact(atom/A) if(A && !QDELETED(A)) diff --git a/code/game/objects/items/RSF.dm b/code/game/objects/items/RSF.dm index 42ba5a8c2f..9b0251e8dc 100644 --- a/code/game/objects/items/RSF.dm +++ b/code/game/objects/items/RSF.dm @@ -123,7 +123,6 @@ RSF var/toxin = 0 var/cooldown = 0 var/cooldowndelay = 10 - var/emagged = FALSE w_class = WEIGHT_CLASS_NORMAL /obj/item/cookiesynth/examine(mob/user) diff --git a/code/game/objects/items/chrono_eraser.dm b/code/game/objects/items/chrono_eraser.dm index 673c113d31..dcf9100799 100644 --- a/code/game/objects/items/chrono_eraser.dm +++ b/code/game/objects/items/chrono_eraser.dm @@ -6,6 +6,8 @@ icon = 'icons/obj/chronos.dmi' icon_state = "chronobackpack" item_state = "backpack" + lefthand_file = 'icons/mob/inhands/equipment/backpack_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/backpack_righthand.dmi' w_class = WEIGHT_CLASS_BULKY slot_flags = SLOT_BACK slowdown = 1 diff --git a/code/game/objects/items/cigs_lighters.dm b/code/game/objects/items/cigs_lighters.dm index 9045159f24..5595500bb7 100644 --- a/code/game/objects/items/cigs_lighters.dm +++ b/code/game/objects/items/cigs_lighters.dm @@ -1,790 +1,789 @@ -//cleansed 9/15/2012 17:48 - -/* -CONTAINS: -MATCHES -CIGARETTES -CIGARS -SMOKING PIPES -CHEAP LIGHTERS -ZIPPO - -CIGARETTE PACKETS ARE IN FANCY.DM -*/ - -/////////// -//MATCHES// -/////////// -/obj/item/match - name = "match" - desc = "A simple match stick, used for lighting fine smokables." - icon = 'icons/obj/cigarettes.dmi' - icon_state = "match_unlit" - var/lit = FALSE - var/burnt = FALSE - var/smoketime = 5 - w_class = WEIGHT_CLASS_TINY - origin_tech = "materials=1" - heat = 1000 - -/obj/item/match/process() - smoketime-- - if(smoketime < 1) - matchburnout() - else - open_flame(heat) - -/obj/item/match/fire_act(exposed_temperature, exposed_volume) - matchignite() - -/obj/item/match/proc/matchignite() - if(!lit && !burnt) - lit = TRUE - icon_state = "match_lit" - damtype = "fire" - force = 3 - hitsound = 'sound/items/welder.ogg' - item_state = "cigon" - name = "lit match" - desc = "A match. This one is lit." - attack_verb = list("burnt","singed") - START_PROCESSING(SSobj, src) - update_icon() - -/obj/item/match/proc/matchburnout() - if(lit) - lit = FALSE - burnt = TRUE - damtype = "brute" - force = initial(force) - icon_state = "match_burnt" - item_state = "cigoff" - name = "burnt match" - desc = "A match. This one has seen better days." - attack_verb = list("flicked") - STOP_PROCESSING(SSobj, src) - -/obj/item/match/dropped(mob/user) - matchburnout() - . = ..() - -/obj/item/match/attack(mob/living/carbon/M, mob/living/carbon/user) - if(!isliving(M)) - return - if(lit && M.IgniteMob()) - message_admins("[key_name_admin(user)] set [key_name_admin(M)] on fire") - log_game("[key_name(user)] set [key_name(M)] on fire") - var/obj/item/clothing/mask/cigarette/cig = help_light_cig(M) - if(lit && cig && user.a_intent == INTENT_HELP) - if(cig.lit) - to_chat(user, "The [cig.name] is already lit.") - if(M == user) - cig.attackby(src, user) - else - cig.light("[user] holds the [name] out for [M], and lights the [cig.name].") - else - ..() - -/obj/item/proc/help_light_cig(mob/living/M) - var/mask_item = M.get_item_by_slot(slot_wear_mask) - if(istype(mask_item, /obj/item/clothing/mask/cigarette)) - return mask_item - -/obj/item/match/is_hot() - return lit * heat - -////////////////// -//FINE SMOKABLES// -////////////////// -/obj/item/clothing/mask/cigarette - name = "cigarette" - desc = "A roll of tobacco and nicotine." - icon_state = "cigoff" - throw_speed = 0.5 - item_state = "cigoff" - container_type = INJECTABLE_1 - w_class = WEIGHT_CLASS_TINY - body_parts_covered = null - var/lit = FALSE - var/starts_lit = FALSE - var/icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi - var/icon_off = "cigoff" - var/type_butt = /obj/item/cigbutt - var/lastHolder = null - var/smoketime = 300 - var/chem_volume = 30 - var/list/list_reagents = list("nicotine" = 15) - heat = 1000 - -/obj/item/clothing/mask/cigarette/suicide_act(mob/user) - user.visible_message("[user] is huffing [src] as quickly as [user.p_they()] can! It looks like [user.p_theyre()] trying to give [user.p_them()]self cancer.") - return (TOXLOSS|OXYLOSS) - -/obj/item/clothing/mask/cigarette/Initialize() - ..() - create_reagents(chem_volume) - reagents.set_reacting(FALSE) // so it doesn't react until you light it - if(list_reagents) - reagents.add_reagent_list(list_reagents) - if(starts_lit) - light() - -/obj/item/clothing/mask/cigarette/Destroy() - STOP_PROCESSING(SSobj, src) - . = ..() - -/obj/item/clothing/mask/cigarette/attackby(obj/item/W, mob/user, params) - if(!lit && smoketime > 0) - var/lighting_text = W.ignition_effect(src, user) - if(lighting_text) - light(lighting_text) - else - return ..() - -/obj/item/clothing/mask/cigarette/afterattack(obj/item/reagent_containers/glass/glass, mob/user, proximity) - if(!proximity || lit) //can't dip if cigarette is lit (it will heat the reagents in the glass instead) - return - if(istype(glass)) //you can dip cigarettes into beakers - if(glass.reagents.trans_to(src, chem_volume)) //if reagents were transfered, show the message - to_chat(user, "You dip \the [src] into \the [glass].") - else //if not, either the beaker was empty, or the cigarette was full - if(!glass.reagents.total_volume) - to_chat(user, "[glass] is empty.") - else - to_chat(user, "[src] is full.") - - -/obj/item/clothing/mask/cigarette/proc/light(flavor_text = null) - if(lit) - return - - lit = TRUE - name = "lit [name]" - attack_verb = list("burnt", "singed") - hitsound = 'sound/items/welder.ogg' - damtype = "fire" - force = 4 - if(reagents.get_reagent_amount("plasma")) // the plasma explodes when exposed to fire - var/datum/effect_system/reagents_explosion/e = new() - e.set_up(round(reagents.get_reagent_amount("plasma") / 2.5, 1), get_turf(src), 0, 0) - e.start() - qdel(src) - return - if(reagents.get_reagent_amount("welding_fuel")) // the fuel explodes, too, but much less violently - var/datum/effect_system/reagents_explosion/e = new() - e.set_up(round(reagents.get_reagent_amount("welding_fuel") / 5, 1), get_turf(src), 0, 0) - e.start() - qdel(src) - return - // allowing reagents to react after being lit - reagents.set_reacting(TRUE) - reagents.handle_reactions() - icon_state = icon_on - item_state = icon_on - if(flavor_text) - var/turf/T = get_turf(src) - T.visible_message(flavor_text) - START_PROCESSING(SSobj, src) - - //can't think of any other way to update the overlays :< - if(ismob(loc)) - var/mob/M = loc - M.update_inv_wear_mask() - M.update_inv_hands() - - -/obj/item/clothing/mask/cigarette/proc/handle_reagents() - if(reagents.total_volume) - if(iscarbon(loc)) - var/mob/living/carbon/C = loc - if (src == C.wear_mask) // if it's in the human/monkey mouth, transfer reagents to the mob - if(prob(15)) // so it's not an instarape in case of acid - var/fraction = min(REAGENTS_METABOLISM/reagents.total_volume, 1) - reagents.reaction(C, INGEST, fraction) - if(!reagents.trans_to(C, REAGENTS_METABOLISM)) - reagents.remove_any(REAGENTS_METABOLISM) - return - reagents.remove_any(REAGENTS_METABOLISM) - - -/obj/item/clothing/mask/cigarette/process() - var/turf/location = get_turf(src) - var/mob/living/M = loc - if(isliving(loc)) - M.IgniteMob() - smoketime-- - if(smoketime < 1) - new type_butt(location) - if(ismob(loc)) - to_chat(M, "Your [name] goes out.") - qdel(src) - return - open_flame() - if(reagents && reagents.total_volume) - handle_reagents() - -/obj/item/clothing/mask/cigarette/attack_self(mob/user) - if(lit) - user.visible_message("[user] calmly drops and treads on \the [src], putting it out instantly.") - new type_butt(user.loc) - new /obj/effect/decal/cleanable/ash(user.loc) - qdel(src) - . = ..() - -/obj/item/clothing/mask/cigarette/attack(mob/living/carbon/M, mob/living/carbon/user) - if(!istype(M)) - return ..() - var/obj/item/clothing/mask/cigarette/cig = help_light_cig(M) - if(lit && cig && user.a_intent == INTENT_HELP) - if(cig.lit) - to_chat(user, "The [cig.name] is already lit.") - if(M == user) - cig.attackby(src, user) - else - cig.light("[user] holds the [name] out for [M], and lights the [cig.name].") - else - return ..() - -/obj/item/clothing/mask/cigarette/fire_act(exposed_temperature, exposed_volume) - light() - -/obj/item/clothing/mask/cigarette/is_hot() - return lit * heat - -// Cigarette brands. - -/obj/item/clothing/mask/cigarette/space_cigarette - desc = "A Space Cigarette brand cigarette." - -/obj/item/clothing/mask/cigarette/dromedary - desc = "A DromedaryCo brand cigarette." - -/obj/item/clothing/mask/cigarette/uplift - desc = "An Uplift Smooth brand cigarette." - list_reagents = list("nicotine" = 7.5, "menthol" = 7.5) - -/obj/item/clothing/mask/cigarette/robust - desc = "A Robust brand cigarette." - -/obj/item/clothing/mask/cigarette/robustgold - desc = "A Robust Gold brand cigarette." - list_reagents = list("nicotine" = 15, "gold" = 1) - -/obj/item/clothing/mask/cigarette/carp - desc = "A Carp Classic brand cigarette." - -/obj/item/clothing/mask/cigarette/syndicate - desc = "An unknown brand cigarette." - list_reagents = list("nicotine" = 15, "omnizine" = 15) - -/obj/item/clothing/mask/cigarette/shadyjims - desc = "A Shady Jim's Super Slims cigarette." - list_reagents = list("nicotine" = 15, "lipolicide" = 4, "ammonia" = 2, "plantbgone" = 1, "toxin" = 1.5) - -// Rollies. - -/obj/item/clothing/mask/cigarette/rollie - name = "rollie" - desc = "A roll of dried plant matter wrapped in thin paper." - icon_state = "spliffoff" - icon_on = "spliffon" - icon_off = "spliffoff" - type_butt = /obj/item/cigbutt/roach - throw_speed = 0.5 - item_state = "spliffoff" - smoketime = 180 - chem_volume = 50 - -/obj/item/clothing/mask/cigarette/rollie/New() - ..() - src.pixel_x = rand(-5, 5) - src.pixel_y = rand(-5, 5) - -/obj/item/clothing/mask/cigarette/rollie/trippy - list_reagents = list("nicotine" = 15, "mushroomhallucinogen" = 35) - starts_lit = TRUE - -/obj/item/cigbutt/roach - name = "roach" - desc = "A manky old roach, or for non-stoners, a used rollup." - icon_state = "roach" - -/obj/item/cigbutt/roach/New() - ..() - src.pixel_x = rand(-5, 5) - src.pixel_y = rand(-5, 5) - - -//////////// -// CIGARS // -//////////// -/obj/item/clothing/mask/cigarette/cigar - name = "premium cigar" - desc = "A brown roll of tobacco and... well, you're not quite sure. This thing's huge!" - icon_state = "cigaroff" - icon_on = "cigaron" - icon_off = "cigaroff" - type_butt = /obj/item/cigbutt/cigarbutt - throw_speed = 0.5 - item_state = "cigaroff" - smoketime = 1500 - chem_volume = 40 - -/obj/item/clothing/mask/cigarette/cigar/cohiba - name = "\improper Cohiba Robusto cigar" - desc = "There's little more you could want from a cigar." - icon_state = "cigar2off" - icon_on = "cigar2on" - icon_off = "cigar2off" - smoketime = 2000 - chem_volume = 80 - - -/obj/item/clothing/mask/cigarette/cigar/havana - name = "premium Havanian cigar" - desc = "A cigar fit for only the best of the best." - icon_state = "cigar2off" - icon_on = "cigar2on" - icon_off = "cigar2off" - smoketime = 7200 - chem_volume = 50 - -/obj/item/cigbutt - name = "cigarette butt" - desc = "A manky old cigarette butt." - icon = 'icons/obj/clothing/masks.dmi' - icon_state = "cigbutt" - w_class = WEIGHT_CLASS_TINY - throwforce = 0 - -/obj/item/cigbutt/cigarbutt - name = "cigar butt" - desc = "A manky old cigar butt." - icon_state = "cigarbutt" - -///////////////// -//SMOKING PIPES// -///////////////// -/obj/item/clothing/mask/cigarette/pipe - name = "smoking pipe" - desc = "A pipe, for smoking. Probably made of meershaum or something." - icon_state = "pipeoff" - item_state = "pipeoff" - icon_on = "pipeon" //Note - these are in masks.dmi - icon_off = "pipeoff" - smoketime = 0 - chem_volume = 100 - list_reagents = null - var/packeditem = 0 - -/obj/item/clothing/mask/cigarette/pipe/Initialize() - ..() - name = "empty [initial(name)]" - -/obj/item/clothing/mask/cigarette/pipe/Destroy() - STOP_PROCESSING(SSobj, src) - . = ..() - -/obj/item/clothing/mask/cigarette/pipe/process() - var/turf/location = get_turf(src) - smoketime-- - if(smoketime < 1) - new /obj/effect/decal/cleanable/ash(location) - if(ismob(loc)) - var/mob/living/M = loc - to_chat(M, "Your [name] goes out.") - lit = 0 - icon_state = icon_off - item_state = icon_off - M.update_inv_wear_mask() - packeditem = 0 - name = "empty [initial(name)]" - STOP_PROCESSING(SSobj, src) - return - open_flame() - if(reagents && reagents.total_volume) // check if it has any reagents at all - handle_reagents() - - -/obj/item/clothing/mask/cigarette/pipe/attackby(obj/item/O, mob/user, params) - if(istype(O, /obj/item/reagent_containers/food/snacks/grown)) - var/obj/item/reagent_containers/food/snacks/grown/G = O - if(!packeditem) - if(G.dry == 1) - to_chat(user, "You stuff [O] into [src].") - smoketime = 400 - packeditem = 1 - name = "[O.name]-packed [initial(name)]" - if(O.reagents) - O.reagents.trans_to(src, O.reagents.total_volume) - qdel(O) - else - to_chat(user, "It has to be dried first!") - else - to_chat(user, "It is already packed!") - else - var/lighting_text = O.ignition_effect(src,user) - if(lighting_text) - if(smoketime > 0) - light(lighting_text) - else - to_chat(user, "There is nothing to smoke!") - else - return ..() - -/obj/item/clothing/mask/cigarette/pipe/attack_self(mob/user) - var/turf/location = get_turf(user) - if(lit) - user.visible_message("[user] puts out [src].", "You put out [src].") - lit = 0 - icon_state = icon_off - item_state = icon_off - STOP_PROCESSING(SSobj, src) - return - if(!lit && smoketime > 0) - to_chat(user, "You empty [src] onto [location].") - new /obj/effect/decal/cleanable/ash(location) - packeditem = 0 - smoketime = 0 - reagents.clear_reagents() - name = "empty [initial(name)]" - return - -/obj/item/clothing/mask/cigarette/pipe/cobpipe - name = "corn cob pipe" - desc = "A nicotine delivery system popularized by folksy backwoodsmen and kept popular in the modern age and beyond by space hipsters. Can be loaded with objects." - icon_state = "cobpipeoff" - item_state = "cobpipeoff" - icon_on = "cobpipeon" //Note - these are in masks.dmi - icon_off = "cobpipeoff" - smoketime = 0 - - -///////// -//ZIPPO// -///////// -/obj/item/lighter - name = "\improper Zippo lighter" - desc = "The zippo." - icon = 'icons/obj/cigarettes.dmi' - icon_state = "zippo" - item_state = "zippo" - w_class = WEIGHT_CLASS_TINY - flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT - var/lit = 0 - var/fancy = TRUE - heat = 1500 - resistance_flags = FIRE_PROOF - light_color = LIGHT_COLOR_FIRE - -/obj/item/lighter/update_icon() - if(lit) - icon_state = "[initial(icon_state)]_on" - else - icon_state = "[initial(icon_state)]" - -/obj/item/lighter/ignition_effect(atom/A, mob/user) - if(is_hot()) - . = "With a single flick of their wrist, [user] smoothly lights [A] with [src]. Damn [user.p_theyre()] cool." - -/obj/item/lighter/proc/set_lit(new_lit) - lit = new_lit - if(lit) - force = 5 - damtype = "fire" - hitsound = 'sound/items/welder.ogg' - attack_verb = list("burnt", "singed") - set_light(1) - START_PROCESSING(SSobj, src) - else - hitsound = "swing_hit" - force = 0 - attack_verb = null //human_defense.dm takes care of it - set_light(0) - STOP_PROCESSING(SSobj, src) - update_icon() - -/obj/item/lighter/attack_self(mob/living/user) - if(user.is_holding(src)) - if(!lit) - set_lit(TRUE) - if(fancy) - user.visible_message("Without even breaking stride, [user] flips open and lights [src] in one smooth movement.", "Without even breaking stride, you flip open and lights [src] in one smooth movement.") - else - var/prot = FALSE - var/mob/living/carbon/human/H = user - - if(istype(H) && H.gloves) - var/obj/item/clothing/gloves/G = H.gloves - if(G.max_heat_protection_temperature) - prot = (G.max_heat_protection_temperature > 360) - else - prot = TRUE - - if(prot || prob(75)) - user.visible_message("After a few attempts, [user] manages to light [src].", "After a few attempts, you manage to light [src].") - else - var/hitzone = user.held_index_to_dir(user.active_hand_index) == "r" ? "r_hand" : "l_hand" - user.apply_damage(5, BURN, hitzone) - user.visible_message("After a few attempts, [user] manages to light [src] - however, [user.p_they()] burn their finger in the process.", "You burn yourself while lighting the lighter!") - - else - set_lit(FALSE) - if(fancy) - user.visible_message("You hear a quiet click, as [user] shuts off [src] without even looking at what [user.p_theyre()] doing. Wow.", "You quietly shut off [src] without even looking at what you're doing. Wow.") - else - user.visible_message("[user] quietly shuts off [src].", "You quietly shut off [src].") - else - . = ..() - -/obj/item/lighter/attack(mob/living/carbon/M, mob/living/carbon/user) - if(lit && M.IgniteMob()) - message_admins("[key_name_admin(user)] set [key_name_admin(M)] on fire") - log_game("[key_name(user)] set [key_name(M)] on fire") - var/obj/item/clothing/mask/cigarette/cig = help_light_cig(M) - if(lit && cig && user.a_intent == INTENT_HELP) - if(cig.lit) - to_chat(user, "The [cig.name] is already lit.") - if(M == user) - cig.attackby(src, user) - else - if(fancy) - cig.light("[user] whips the [name] out and holds it for [M]. [user.p_their(TRUE)] arm is as steady as the unflickering flame they light \the [cig] with.") - else - cig.light("[user] holds the [name] out for [M], and lights the [cig.name].") - else - ..() - -/obj/item/lighter/process() - open_flame() - -/obj/item/lighter/is_hot() - return lit * heat - - -/obj/item/lighter/greyscale - name = "cheap lighter" - desc = "A cheap-as-free lighter." - icon_state = "lighter" - fancy = FALSE - -/obj/item/lighter/greyscale/Initialize() - . = ..() - add_atom_colour(color2hex(randomColor(1)), FIXED_COLOUR_PRIORITY) - update_icon() - -/obj/item/lighter/greyscale/update_icon() - cut_overlays() - var/mutable_appearance/base_overlay = mutable_appearance(icon,"[initial(icon_state)]_base") - base_overlay.appearance_flags = RESET_COLOR //the edging doesn't change color - if(lit) - base_overlay.icon_state = "[initial(icon_state)]_on" - add_overlay(base_overlay) - -/obj/item/lighter/greyscale/ignition_effect(atom/A, mob/user) - if(is_hot()) - . = "After some fiddling, [user] manages to light [A] with [src]." - - -/////////// -//ROLLING// -/////////// -/obj/item/rollingpaper - name = "rolling paper" - desc = "A thin piece of paper used to make fine smokeables." - icon = 'icons/obj/cigarettes.dmi' - icon_state = "cig_paper" - w_class = WEIGHT_CLASS_TINY - -/obj/item/rollingpaper/afterattack(atom/target, mob/user, proximity) - if(!proximity) - return - if(istype(target, /obj/item/reagent_containers/food/snacks/grown)) - var/obj/item/reagent_containers/food/snacks/grown/O = target - if(O.dry) - var/obj/item/clothing/mask/cigarette/rollie/R = new /obj/item/clothing/mask/cigarette/rollie(user.loc) - R.chem_volume = target.reagents.total_volume - target.reagents.trans_to(R, R.chem_volume) - qdel(target) - qdel(src) - user.put_in_active_hand(R) - to_chat(user, "You roll the [target.name] into a rolling paper.") - R.desc = "Dried [target.name] rolled up in a thin piece of paper." - else - to_chat(user, "You need to dry this first!") - else - ..() - -/////////////// -//VAPE NATION// -/////////////// -/obj/item/clothing/mask/vape - name = "E-Cigarette" - desc = "A classy and highly sophisticated electronic cigarette, for classy and dignified gentlemen. A warning label reads \"Warning: Do not fill with flammable materials.\""//<<< i'd vape to that. - icon = 'icons/obj/clothing/masks.dmi' - icon_state = null - item_state = null - w_class = WEIGHT_CLASS_TINY - var/chem_volume = 100 - var/vapetime = 0 //this so it won't puff out clouds every tick - var/screw = 0 // kinky - var/super = 0 //for the fattest vapes dude. - var/emagged = FALSE //LET THE GRIEF BEGIN - -/obj/item/clothing/mask/vape/suicide_act(mob/user) - user.visible_message("[user] is puffin hard on dat vape, [user.p_they()] trying to join the vape life on a whole notha plane!")//it doesn't give you cancer, it is cancer - return (TOXLOSS|OXYLOSS) - - -/obj/item/clothing/mask/vape/Initialize(mapload, param_color) - . = ..() - create_reagents(chem_volume) - reagents.set_reacting(FALSE) // so it doesn't react until you light it - reagents.add_reagent("nicotine", 50) - if(!icon_state) - if(!param_color) - param_color = pick("red","blue","black","white","green","purple","yellow","orange") - icon_state = "[param_color]_vape" - item_state = "[param_color]_vape" - -/obj/item/clothing/mask/vape/attackby(obj/item/O, mob/user, params) - if(istype(O, /obj/item/reagent_containers) && (O.container_type & OPENCONTAINER_1)) - if(reagents.total_volume < chem_volume) - if(O.reagents.total_volume > 0) - O.reagents.trans_to(src,25) - to_chat(user, "You add the contents of [O] to the [src]") - else - to_chat(user, "The [O] is empty!") - else - to_chat(user, "[src] can't hold anymore reagents!") - - if(istype(O, /obj/item/screwdriver)) - if(!screw) - screw = 1 - to_chat(user, "You open the cap on the [src]") - if(super) - add_overlay("vapeopen_med") - else - add_overlay("vapeopen_low") - else - screw = 0 - to_chat(user, "You close the cap on the [src]") - cut_overlays() - - if(istype(O, /obj/item/device/multitool)) - if(screw && !emagged)//also kinky - if(!super) - cut_overlays() - super = 1 - to_chat(user, "You increase the voltage in the [src]") - add_overlay("vapeopen_med") - else - cut_overlays() - super = 0 - to_chat(user, "You decrease the voltage in the [src]") - add_overlay("vapeopen_low") - - if(screw && emagged) - to_chat(user, "The [name] can't be modified!") - - -/obj/item/clothing/mask/vape/emag_act(mob/user)// I WON'T REGRET WRITTING THIS, SURLY. - if(screw) - if(!emagged) - cut_overlays() - emagged = TRUE - super = 0 - to_chat(user, "You maximize the voltage in the [src]") - add_overlay("vapeopen_high") - var/datum/effect_system/spark_spread/sp = new /datum/effect_system/spark_spread //for effect - sp.set_up(5, 1, src) - sp.start() - else - to_chat(user, "The [name] is already emagged!") - else - to_chat(user, "You need to open the cap to do that") - -/obj/item/clothing/mask/vape/attack_self(mob/user) - if(reagents.total_volume > 0) - to_chat(user, "you empty [src] of all reagents.") - reagents.clear_reagents() - return - -/obj/item/clothing/mask/vape/equipped(mob/user, slot) - if(slot == slot_wear_mask) - if(!screw) - to_chat(user, "You start puffing on the vape.") - reagents.set_reacting(TRUE) - START_PROCESSING(SSobj, src) - else //it will not start if the vape is opened. - to_chat(user, "You need to close the cap first!") - -/obj/item/clothing/mask/vape/dropped(mob/user) - var/mob/living/carbon/C = user - if(C.get_item_by_slot(slot_wear_mask) == src) - reagents.set_reacting(FALSE) - STOP_PROCESSING(SSobj, src) - -/obj/item/clothing/mask/vape/proc/hand_reagents()//had to rename to avoid duplicate error - if(reagents.total_volume) - if(iscarbon(loc)) - var/mob/living/carbon/C = loc - if (src == C.wear_mask) // if it's in the human/monkey mouth, transfer reagents to the mob - var/fraction = min(REAGENTS_METABOLISM/reagents.total_volume, 1) //this will react instantly, making them a little more dangerous than cigarettes - reagents.reaction(C, INGEST, fraction) - if(!reagents.trans_to(C, REAGENTS_METABOLISM)) - reagents.remove_any(REAGENTS_METABOLISM) - if(reagents.get_reagent_amount("welding_fuel")) - //HOT STUFF - C.fire_stacks = 2 - C.IgniteMob() - - if(reagents.get_reagent_amount("plasma")) // the plasma explodes when exposed to fire - var/datum/effect_system/reagents_explosion/e = new() - e.set_up(round(reagents.get_reagent_amount("plasma") / 2.5, 1), get_turf(src), 0, 0) - e.start() - qdel(src) - return - reagents.remove_any(REAGENTS_METABOLISM) - -/obj/item/clothing/mask/vape/process() - var/mob/living/M = loc - - if(isliving(loc)) - M.IgniteMob() - - vapetime++ - - if(!reagents.total_volume) - if(ismob(loc)) - to_chat(M, "The [name] is empty!") - STOP_PROCESSING(SSobj, src) - //it's reusable so it won't unequip when empty - return - //open flame removed because vapes are a closed system, they wont light anything on fire - - if(super && vapetime > 3)//Time to start puffing those fat vapes, yo. - var/datum/effect_system/smoke_spread/chem/s = new - s.set_up(reagents, 1, loc, silent=TRUE) - s.start() - vapetime = 0 - - if(emagged && vapetime > 3) - var/datum/effect_system/smoke_spread/chem/s = new - s.set_up(reagents, 4, loc, silent=TRUE) - s.start() - vapetime = 0 - if(prob(5))//small chance for the vape to break and deal damage if it's emagged - playsound(get_turf(src), 'sound/effects/pop_expl.ogg', 50, 0) - M.apply_damage(20, BURN, "head") - M.Knockdown(300, 1, 0) - var/datum/effect_system/spark_spread/sp = new /datum/effect_system/spark_spread - sp.set_up(5, 1, src) - sp.start() - to_chat(M, "The [name] suddenly explodes in your mouth!") - qdel(src) - return - - if(reagents && reagents.total_volume) - hand_reagents() +//cleansed 9/15/2012 17:48 + +/* +CONTAINS: +MATCHES +CIGARETTES +CIGARS +SMOKING PIPES +CHEAP LIGHTERS +ZIPPO + +CIGARETTE PACKETS ARE IN FANCY.DM +*/ + +/////////// +//MATCHES// +/////////// +/obj/item/match + name = "match" + desc = "A simple match stick, used for lighting fine smokables." + icon = 'icons/obj/cigarettes.dmi' + icon_state = "match_unlit" + var/lit = FALSE + var/burnt = FALSE + var/smoketime = 5 + w_class = WEIGHT_CLASS_TINY + origin_tech = "materials=1" + heat = 1000 + +/obj/item/match/process() + smoketime-- + if(smoketime < 1) + matchburnout() + else + open_flame(heat) + +/obj/item/match/fire_act(exposed_temperature, exposed_volume) + matchignite() + +/obj/item/match/proc/matchignite() + if(!lit && !burnt) + lit = TRUE + icon_state = "match_lit" + damtype = "fire" + force = 3 + hitsound = 'sound/items/welder.ogg' + item_state = "cigon" + name = "lit match" + desc = "A match. This one is lit." + attack_verb = list("burnt","singed") + START_PROCESSING(SSobj, src) + update_icon() + +/obj/item/match/proc/matchburnout() + if(lit) + lit = FALSE + burnt = TRUE + damtype = "brute" + force = initial(force) + icon_state = "match_burnt" + item_state = "cigoff" + name = "burnt match" + desc = "A match. This one has seen better days." + attack_verb = list("flicked") + STOP_PROCESSING(SSobj, src) + +/obj/item/match/dropped(mob/user) + matchburnout() + . = ..() + +/obj/item/match/attack(mob/living/carbon/M, mob/living/carbon/user) + if(!isliving(M)) + return + if(lit && M.IgniteMob()) + message_admins("[key_name_admin(user)] set [key_name_admin(M)] on fire") + log_game("[key_name(user)] set [key_name(M)] on fire") + var/obj/item/clothing/mask/cigarette/cig = help_light_cig(M) + if(lit && cig && user.a_intent == INTENT_HELP) + if(cig.lit) + to_chat(user, "The [cig.name] is already lit.") + if(M == user) + cig.attackby(src, user) + else + cig.light("[user] holds the [name] out for [M], and lights the [cig.name].") + else + ..() + +/obj/item/proc/help_light_cig(mob/living/M) + var/mask_item = M.get_item_by_slot(slot_wear_mask) + if(istype(mask_item, /obj/item/clothing/mask/cigarette)) + return mask_item + +/obj/item/match/is_hot() + return lit * heat + +////////////////// +//FINE SMOKABLES// +////////////////// +/obj/item/clothing/mask/cigarette + name = "cigarette" + desc = "A roll of tobacco and nicotine." + icon_state = "cigoff" + throw_speed = 0.5 + item_state = "cigoff" + container_type = INJECTABLE_1 + w_class = WEIGHT_CLASS_TINY + body_parts_covered = null + var/lit = FALSE + var/starts_lit = FALSE + var/icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi + var/icon_off = "cigoff" + var/type_butt = /obj/item/cigbutt + var/lastHolder = null + var/smoketime = 300 + var/chem_volume = 30 + var/list/list_reagents = list("nicotine" = 15) + heat = 1000 + +/obj/item/clothing/mask/cigarette/suicide_act(mob/user) + user.visible_message("[user] is huffing [src] as quickly as [user.p_they()] can! It looks like [user.p_theyre()] trying to give [user.p_them()]self cancer.") + return (TOXLOSS|OXYLOSS) + +/obj/item/clothing/mask/cigarette/Initialize() + ..() + create_reagents(chem_volume) + reagents.set_reacting(FALSE) // so it doesn't react until you light it + if(list_reagents) + reagents.add_reagent_list(list_reagents) + if(starts_lit) + light() + +/obj/item/clothing/mask/cigarette/Destroy() + STOP_PROCESSING(SSobj, src) + . = ..() + +/obj/item/clothing/mask/cigarette/attackby(obj/item/W, mob/user, params) + if(!lit && smoketime > 0) + var/lighting_text = W.ignition_effect(src, user) + if(lighting_text) + light(lighting_text) + else + return ..() + +/obj/item/clothing/mask/cigarette/afterattack(obj/item/reagent_containers/glass/glass, mob/user, proximity) + if(!proximity || lit) //can't dip if cigarette is lit (it will heat the reagents in the glass instead) + return + if(istype(glass)) //you can dip cigarettes into beakers + if(glass.reagents.trans_to(src, chem_volume)) //if reagents were transfered, show the message + to_chat(user, "You dip \the [src] into \the [glass].") + else //if not, either the beaker was empty, or the cigarette was full + if(!glass.reagents.total_volume) + to_chat(user, "[glass] is empty.") + else + to_chat(user, "[src] is full.") + + +/obj/item/clothing/mask/cigarette/proc/light(flavor_text = null) + if(lit) + return + + lit = TRUE + name = "lit [name]" + attack_verb = list("burnt", "singed") + hitsound = 'sound/items/welder.ogg' + damtype = "fire" + force = 4 + if(reagents.get_reagent_amount("plasma")) // the plasma explodes when exposed to fire + var/datum/effect_system/reagents_explosion/e = new() + e.set_up(round(reagents.get_reagent_amount("plasma") / 2.5, 1), get_turf(src), 0, 0) + e.start() + qdel(src) + return + if(reagents.get_reagent_amount("welding_fuel")) // the fuel explodes, too, but much less violently + var/datum/effect_system/reagents_explosion/e = new() + e.set_up(round(reagents.get_reagent_amount("welding_fuel") / 5, 1), get_turf(src), 0, 0) + e.start() + qdel(src) + return + // allowing reagents to react after being lit + reagents.set_reacting(TRUE) + reagents.handle_reactions() + icon_state = icon_on + item_state = icon_on + if(flavor_text) + var/turf/T = get_turf(src) + T.visible_message(flavor_text) + START_PROCESSING(SSobj, src) + + //can't think of any other way to update the overlays :< + if(ismob(loc)) + var/mob/M = loc + M.update_inv_wear_mask() + M.update_inv_hands() + + +/obj/item/clothing/mask/cigarette/proc/handle_reagents() + if(reagents.total_volume) + if(iscarbon(loc)) + var/mob/living/carbon/C = loc + if (src == C.wear_mask) // if it's in the human/monkey mouth, transfer reagents to the mob + if(prob(15)) // so it's not an instarape in case of acid + var/fraction = min(REAGENTS_METABOLISM/reagents.total_volume, 1) + reagents.reaction(C, INGEST, fraction) + if(!reagents.trans_to(C, REAGENTS_METABOLISM)) + reagents.remove_any(REAGENTS_METABOLISM) + return + reagents.remove_any(REAGENTS_METABOLISM) + + +/obj/item/clothing/mask/cigarette/process() + var/turf/location = get_turf(src) + var/mob/living/M = loc + if(isliving(loc)) + M.IgniteMob() + smoketime-- + if(smoketime < 1) + new type_butt(location) + if(ismob(loc)) + to_chat(M, "Your [name] goes out.") + qdel(src) + return + open_flame() + if(reagents && reagents.total_volume) + handle_reagents() + +/obj/item/clothing/mask/cigarette/attack_self(mob/user) + if(lit) + user.visible_message("[user] calmly drops and treads on \the [src], putting it out instantly.") + new type_butt(user.loc) + new /obj/effect/decal/cleanable/ash(user.loc) + qdel(src) + . = ..() + +/obj/item/clothing/mask/cigarette/attack(mob/living/carbon/M, mob/living/carbon/user) + if(!istype(M)) + return ..() + var/obj/item/clothing/mask/cigarette/cig = help_light_cig(M) + if(lit && cig && user.a_intent == INTENT_HELP) + if(cig.lit) + to_chat(user, "The [cig.name] is already lit.") + if(M == user) + cig.attackby(src, user) + else + cig.light("[user] holds the [name] out for [M], and lights the [cig.name].") + else + return ..() + +/obj/item/clothing/mask/cigarette/fire_act(exposed_temperature, exposed_volume) + light() + +/obj/item/clothing/mask/cigarette/is_hot() + return lit * heat + +// Cigarette brands. + +/obj/item/clothing/mask/cigarette/space_cigarette + desc = "A Space Cigarette brand cigarette." + +/obj/item/clothing/mask/cigarette/dromedary + desc = "A DromedaryCo brand cigarette." + +/obj/item/clothing/mask/cigarette/uplift + desc = "An Uplift Smooth brand cigarette." + list_reagents = list("nicotine" = 7.5, "menthol" = 7.5) + +/obj/item/clothing/mask/cigarette/robust + desc = "A Robust brand cigarette." + +/obj/item/clothing/mask/cigarette/robustgold + desc = "A Robust Gold brand cigarette." + list_reagents = list("nicotine" = 15, "gold" = 1) + +/obj/item/clothing/mask/cigarette/carp + desc = "A Carp Classic brand cigarette." + +/obj/item/clothing/mask/cigarette/syndicate + desc = "An unknown brand cigarette." + list_reagents = list("nicotine" = 15, "omnizine" = 15) + +/obj/item/clothing/mask/cigarette/shadyjims + desc = "A Shady Jim's Super Slims cigarette." + list_reagents = list("nicotine" = 15, "lipolicide" = 4, "ammonia" = 2, "plantbgone" = 1, "toxin" = 1.5) + +// Rollies. + +/obj/item/clothing/mask/cigarette/rollie + name = "rollie" + desc = "A roll of dried plant matter wrapped in thin paper." + icon_state = "spliffoff" + icon_on = "spliffon" + icon_off = "spliffoff" + type_butt = /obj/item/cigbutt/roach + throw_speed = 0.5 + item_state = "spliffoff" + smoketime = 180 + chem_volume = 50 + +/obj/item/clothing/mask/cigarette/rollie/New() + ..() + src.pixel_x = rand(-5, 5) + src.pixel_y = rand(-5, 5) + +/obj/item/clothing/mask/cigarette/rollie/trippy + list_reagents = list("nicotine" = 15, "mushroomhallucinogen" = 35) + starts_lit = TRUE + +/obj/item/cigbutt/roach + name = "roach" + desc = "A manky old roach, or for non-stoners, a used rollup." + icon_state = "roach" + +/obj/item/cigbutt/roach/New() + ..() + src.pixel_x = rand(-5, 5) + src.pixel_y = rand(-5, 5) + + +//////////// +// CIGARS // +//////////// +/obj/item/clothing/mask/cigarette/cigar + name = "premium cigar" + desc = "A brown roll of tobacco and... well, you're not quite sure. This thing's huge!" + icon_state = "cigaroff" + icon_on = "cigaron" + icon_off = "cigaroff" + type_butt = /obj/item/cigbutt/cigarbutt + throw_speed = 0.5 + item_state = "cigaroff" + smoketime = 1500 + chem_volume = 40 + +/obj/item/clothing/mask/cigarette/cigar/cohiba + name = "\improper Cohiba Robusto cigar" + desc = "There's little more you could want from a cigar." + icon_state = "cigar2off" + icon_on = "cigar2on" + icon_off = "cigar2off" + smoketime = 2000 + chem_volume = 80 + + +/obj/item/clothing/mask/cigarette/cigar/havana + name = "premium Havanian cigar" + desc = "A cigar fit for only the best of the best." + icon_state = "cigar2off" + icon_on = "cigar2on" + icon_off = "cigar2off" + smoketime = 7200 + chem_volume = 50 + +/obj/item/cigbutt + name = "cigarette butt" + desc = "A manky old cigarette butt." + icon = 'icons/obj/clothing/masks.dmi' + icon_state = "cigbutt" + w_class = WEIGHT_CLASS_TINY + throwforce = 0 + +/obj/item/cigbutt/cigarbutt + name = "cigar butt" + desc = "A manky old cigar butt." + icon_state = "cigarbutt" + +///////////////// +//SMOKING PIPES// +///////////////// +/obj/item/clothing/mask/cigarette/pipe + name = "smoking pipe" + desc = "A pipe, for smoking. Probably made of meershaum or something." + icon_state = "pipeoff" + item_state = "pipeoff" + icon_on = "pipeon" //Note - these are in masks.dmi + icon_off = "pipeoff" + smoketime = 0 + chem_volume = 100 + list_reagents = null + var/packeditem = 0 + +/obj/item/clothing/mask/cigarette/pipe/Initialize() + ..() + name = "empty [initial(name)]" + +/obj/item/clothing/mask/cigarette/pipe/Destroy() + STOP_PROCESSING(SSobj, src) + . = ..() + +/obj/item/clothing/mask/cigarette/pipe/process() + var/turf/location = get_turf(src) + smoketime-- + if(smoketime < 1) + new /obj/effect/decal/cleanable/ash(location) + if(ismob(loc)) + var/mob/living/M = loc + to_chat(M, "Your [name] goes out.") + lit = 0 + icon_state = icon_off + item_state = icon_off + M.update_inv_wear_mask() + packeditem = 0 + name = "empty [initial(name)]" + STOP_PROCESSING(SSobj, src) + return + open_flame() + if(reagents && reagents.total_volume) // check if it has any reagents at all + handle_reagents() + + +/obj/item/clothing/mask/cigarette/pipe/attackby(obj/item/O, mob/user, params) + if(istype(O, /obj/item/reagent_containers/food/snacks/grown)) + var/obj/item/reagent_containers/food/snacks/grown/G = O + if(!packeditem) + if(G.dry == 1) + to_chat(user, "You stuff [O] into [src].") + smoketime = 400 + packeditem = 1 + name = "[O.name]-packed [initial(name)]" + if(O.reagents) + O.reagents.trans_to(src, O.reagents.total_volume) + qdel(O) + else + to_chat(user, "It has to be dried first!") + else + to_chat(user, "It is already packed!") + else + var/lighting_text = O.ignition_effect(src,user) + if(lighting_text) + if(smoketime > 0) + light(lighting_text) + else + to_chat(user, "There is nothing to smoke!") + else + return ..() + +/obj/item/clothing/mask/cigarette/pipe/attack_self(mob/user) + var/turf/location = get_turf(user) + if(lit) + user.visible_message("[user] puts out [src].", "You put out [src].") + lit = 0 + icon_state = icon_off + item_state = icon_off + STOP_PROCESSING(SSobj, src) + return + if(!lit && smoketime > 0) + to_chat(user, "You empty [src] onto [location].") + new /obj/effect/decal/cleanable/ash(location) + packeditem = 0 + smoketime = 0 + reagents.clear_reagents() + name = "empty [initial(name)]" + return + +/obj/item/clothing/mask/cigarette/pipe/cobpipe + name = "corn cob pipe" + desc = "A nicotine delivery system popularized by folksy backwoodsmen and kept popular in the modern age and beyond by space hipsters. Can be loaded with objects." + icon_state = "cobpipeoff" + item_state = "cobpipeoff" + icon_on = "cobpipeon" //Note - these are in masks.dmi + icon_off = "cobpipeoff" + smoketime = 0 + + +///////// +//ZIPPO// +///////// +/obj/item/lighter + name = "\improper Zippo lighter" + desc = "The zippo." + icon = 'icons/obj/cigarettes.dmi' + icon_state = "zippo" + item_state = "zippo" + w_class = WEIGHT_CLASS_TINY + flags_1 = CONDUCT_1 + slot_flags = SLOT_BELT + var/lit = 0 + var/fancy = TRUE + heat = 1500 + resistance_flags = FIRE_PROOF + light_color = LIGHT_COLOR_FIRE + +/obj/item/lighter/update_icon() + if(lit) + icon_state = "[initial(icon_state)]_on" + else + icon_state = "[initial(icon_state)]" + +/obj/item/lighter/ignition_effect(atom/A, mob/user) + if(is_hot()) + . = "With a single flick of their wrist, [user] smoothly lights [A] with [src]. Damn [user.p_theyre()] cool." + +/obj/item/lighter/proc/set_lit(new_lit) + lit = new_lit + if(lit) + force = 5 + damtype = "fire" + hitsound = 'sound/items/welder.ogg' + attack_verb = list("burnt", "singed") + set_light(1) + START_PROCESSING(SSobj, src) + else + hitsound = "swing_hit" + force = 0 + attack_verb = null //human_defense.dm takes care of it + set_light(0) + STOP_PROCESSING(SSobj, src) + update_icon() + +/obj/item/lighter/attack_self(mob/living/user) + if(user.is_holding(src)) + if(!lit) + set_lit(TRUE) + if(fancy) + user.visible_message("Without even breaking stride, [user] flips open and lights [src] in one smooth movement.", "Without even breaking stride, you flip open and lights [src] in one smooth movement.") + else + var/prot = FALSE + var/mob/living/carbon/human/H = user + + if(istype(H) && H.gloves) + var/obj/item/clothing/gloves/G = H.gloves + if(G.max_heat_protection_temperature) + prot = (G.max_heat_protection_temperature > 360) + else + prot = TRUE + + if(prot || prob(75)) + user.visible_message("After a few attempts, [user] manages to light [src].", "After a few attempts, you manage to light [src].") + else + var/hitzone = user.held_index_to_dir(user.active_hand_index) == "r" ? "r_hand" : "l_hand" + user.apply_damage(5, BURN, hitzone) + user.visible_message("After a few attempts, [user] manages to light [src] - however, [user.p_they()] burn their finger in the process.", "You burn yourself while lighting the lighter!") + + else + set_lit(FALSE) + if(fancy) + user.visible_message("You hear a quiet click, as [user] shuts off [src] without even looking at what [user.p_theyre()] doing. Wow.", "You quietly shut off [src] without even looking at what you're doing. Wow.") + else + user.visible_message("[user] quietly shuts off [src].", "You quietly shut off [src].") + else + . = ..() + +/obj/item/lighter/attack(mob/living/carbon/M, mob/living/carbon/user) + if(lit && M.IgniteMob()) + message_admins("[key_name_admin(user)] set [key_name_admin(M)] on fire") + log_game("[key_name(user)] set [key_name(M)] on fire") + var/obj/item/clothing/mask/cigarette/cig = help_light_cig(M) + if(lit && cig && user.a_intent == INTENT_HELP) + if(cig.lit) + to_chat(user, "The [cig.name] is already lit.") + if(M == user) + cig.attackby(src, user) + else + if(fancy) + cig.light("[user] whips the [name] out and holds it for [M]. [user.p_their(TRUE)] arm is as steady as the unflickering flame they light \the [cig] with.") + else + cig.light("[user] holds the [name] out for [M], and lights the [cig.name].") + else + ..() + +/obj/item/lighter/process() + open_flame() + +/obj/item/lighter/is_hot() + return lit * heat + + +/obj/item/lighter/greyscale + name = "cheap lighter" + desc = "A cheap-as-free lighter." + icon_state = "lighter" + fancy = FALSE + +/obj/item/lighter/greyscale/Initialize() + . = ..() + add_atom_colour(color2hex(randomColor(1)), FIXED_COLOUR_PRIORITY) + update_icon() + +/obj/item/lighter/greyscale/update_icon() + cut_overlays() + var/mutable_appearance/base_overlay = mutable_appearance(icon,"[initial(icon_state)]_base") + base_overlay.appearance_flags = RESET_COLOR //the edging doesn't change color + if(lit) + base_overlay.icon_state = "[initial(icon_state)]_on" + add_overlay(base_overlay) + +/obj/item/lighter/greyscale/ignition_effect(atom/A, mob/user) + if(is_hot()) + . = "After some fiddling, [user] manages to light [A] with [src]." + + +/////////// +//ROLLING// +/////////// +/obj/item/rollingpaper + name = "rolling paper" + desc = "A thin piece of paper used to make fine smokeables." + icon = 'icons/obj/cigarettes.dmi' + icon_state = "cig_paper" + w_class = WEIGHT_CLASS_TINY + +/obj/item/rollingpaper/afterattack(atom/target, mob/user, proximity) + if(!proximity) + return + if(istype(target, /obj/item/reagent_containers/food/snacks/grown)) + var/obj/item/reagent_containers/food/snacks/grown/O = target + if(O.dry) + var/obj/item/clothing/mask/cigarette/rollie/R = new /obj/item/clothing/mask/cigarette/rollie(user.loc) + R.chem_volume = target.reagents.total_volume + target.reagents.trans_to(R, R.chem_volume) + qdel(target) + qdel(src) + user.put_in_active_hand(R) + to_chat(user, "You roll the [target.name] into a rolling paper.") + R.desc = "Dried [target.name] rolled up in a thin piece of paper." + else + to_chat(user, "You need to dry this first!") + else + ..() + +/////////////// +//VAPE NATION// +/////////////// +/obj/item/clothing/mask/vape + name = "E-Cigarette" + desc = "A classy and highly sophisticated electronic cigarette, for classy and dignified gentlemen. A warning label reads \"Warning: Do not fill with flammable materials.\""//<<< i'd vape to that. + icon = 'icons/obj/clothing/masks.dmi' + icon_state = null + item_state = null + w_class = WEIGHT_CLASS_TINY + var/chem_volume = 100 + var/vapetime = 0 //this so it won't puff out clouds every tick + var/screw = 0 // kinky + var/super = 0 //for the fattest vapes dude. + +/obj/item/clothing/mask/vape/suicide_act(mob/user) + user.visible_message("[user] is puffin hard on dat vape, [user.p_they()] trying to join the vape life on a whole notha plane!")//it doesn't give you cancer, it is cancer + return (TOXLOSS|OXYLOSS) + + +/obj/item/clothing/mask/vape/Initialize(mapload, param_color) + . = ..() + create_reagents(chem_volume) + reagents.set_reacting(FALSE) // so it doesn't react until you light it + reagents.add_reagent("nicotine", 50) + if(!icon_state) + if(!param_color) + param_color = pick("red","blue","black","white","green","purple","yellow","orange") + icon_state = "[param_color]_vape" + item_state = "[param_color]_vape" + +/obj/item/clothing/mask/vape/attackby(obj/item/O, mob/user, params) + if(istype(O, /obj/item/reagent_containers) && (O.container_type & OPENCONTAINER_1)) + if(reagents.total_volume < chem_volume) + if(O.reagents.total_volume > 0) + O.reagents.trans_to(src,25) + to_chat(user, "You add the contents of [O] to the [src]") + else + to_chat(user, "The [O] is empty!") + else + to_chat(user, "[src] can't hold anymore reagents!") + + if(istype(O, /obj/item/screwdriver)) + if(!screw) + screw = 1 + to_chat(user, "You open the cap on the [src]") + if(super) + add_overlay("vapeopen_med") + else + add_overlay("vapeopen_low") + else + screw = 0 + to_chat(user, "You close the cap on the [src]") + cut_overlays() + + if(istype(O, /obj/item/device/multitool)) + if(screw && !emagged)//also kinky + if(!super) + cut_overlays() + super = 1 + to_chat(user, "You increase the voltage in the [src]") + add_overlay("vapeopen_med") + else + cut_overlays() + super = 0 + to_chat(user, "You decrease the voltage in the [src]") + add_overlay("vapeopen_low") + + if(screw && emagged) + to_chat(user, "The [name] can't be modified!") + + +/obj/item/clothing/mask/vape/emag_act(mob/user)// I WON'T REGRET WRITTING THIS, SURLY. + if(screw) + if(!emagged) + cut_overlays() + emagged = TRUE + super = 0 + to_chat(user, "You maximize the voltage in the [src]") + add_overlay("vapeopen_high") + var/datum/effect_system/spark_spread/sp = new /datum/effect_system/spark_spread //for effect + sp.set_up(5, 1, src) + sp.start() + else + to_chat(user, "The [name] is already emagged!") + else + to_chat(user, "You need to open the cap to do that") + +/obj/item/clothing/mask/vape/attack_self(mob/user) + if(reagents.total_volume > 0) + to_chat(user, "you empty [src] of all reagents.") + reagents.clear_reagents() + return + +/obj/item/clothing/mask/vape/equipped(mob/user, slot) + if(slot == slot_wear_mask) + if(!screw) + to_chat(user, "You start puffing on the vape.") + reagents.set_reacting(TRUE) + START_PROCESSING(SSobj, src) + else //it will not start if the vape is opened. + to_chat(user, "You need to close the cap first!") + +/obj/item/clothing/mask/vape/dropped(mob/user) + var/mob/living/carbon/C = user + if(C.get_item_by_slot(slot_wear_mask) == src) + reagents.set_reacting(FALSE) + STOP_PROCESSING(SSobj, src) + +/obj/item/clothing/mask/vape/proc/hand_reagents()//had to rename to avoid duplicate error + if(reagents.total_volume) + if(iscarbon(loc)) + var/mob/living/carbon/C = loc + if (src == C.wear_mask) // if it's in the human/monkey mouth, transfer reagents to the mob + var/fraction = min(REAGENTS_METABOLISM/reagents.total_volume, 1) //this will react instantly, making them a little more dangerous than cigarettes + reagents.reaction(C, INGEST, fraction) + if(!reagents.trans_to(C, REAGENTS_METABOLISM)) + reagents.remove_any(REAGENTS_METABOLISM) + if(reagents.get_reagent_amount("welding_fuel")) + //HOT STUFF + C.fire_stacks = 2 + C.IgniteMob() + + if(reagents.get_reagent_amount("plasma")) // the plasma explodes when exposed to fire + var/datum/effect_system/reagents_explosion/e = new() + e.set_up(round(reagents.get_reagent_amount("plasma") / 2.5, 1), get_turf(src), 0, 0) + e.start() + qdel(src) + return + reagents.remove_any(REAGENTS_METABOLISM) + +/obj/item/clothing/mask/vape/process() + var/mob/living/M = loc + + if(isliving(loc)) + M.IgniteMob() + + vapetime++ + + if(!reagents.total_volume) + if(ismob(loc)) + to_chat(M, "The [name] is empty!") + STOP_PROCESSING(SSobj, src) + //it's reusable so it won't unequip when empty + return + //open flame removed because vapes are a closed system, they wont light anything on fire + + if(super && vapetime > 3)//Time to start puffing those fat vapes, yo. + var/datum/effect_system/smoke_spread/chem/s = new + s.set_up(reagents, 1, loc, silent=TRUE) + s.start() + vapetime = 0 + + if(emagged && vapetime > 3) + var/datum/effect_system/smoke_spread/chem/s = new + s.set_up(reagents, 4, loc, silent=TRUE) + s.start() + vapetime = 0 + if(prob(5))//small chance for the vape to break and deal damage if it's emagged + playsound(get_turf(src), 'sound/effects/pop_expl.ogg', 50, 0) + M.apply_damage(20, BURN, "head") + M.Knockdown(300, 1, 0) + var/datum/effect_system/spark_spread/sp = new /datum/effect_system/spark_spread + sp.set_up(5, 1, src) + sp.start() + to_chat(M, "The [name] suddenly explodes in your mouth!") + qdel(src) + return + + if(reagents && reagents.total_volume) + hand_reagents() diff --git a/code/game/objects/items/circuitboards/computer_circuitboards.dm b/code/game/objects/items/circuitboards/computer_circuitboards.dm index f9564018f8..c25e188529 100644 --- a/code/game/objects/items/circuitboards/computer_circuitboards.dm +++ b/code/game/objects/items/circuitboards/computer_circuitboards.dm @@ -212,7 +212,6 @@ build_path = /obj/machinery/computer/cargo origin_tech = "programming=3" var/contraband = FALSE - var/emagged = FALSE /obj/item/circuitboard/computer/cargo/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/device/multitool)) diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 5ceb26ee61..acae2764ae 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -856,7 +856,7 @@ GLOBAL_LIST_EMPTY(PDAs) var/list/plist = list() var/list/namecounts = list() - if(user.stat == 2) + if(user.stat == DEAD) return //won't work if dead if(src.aiPDA.toff) @@ -889,7 +889,7 @@ GLOBAL_LIST_EMPTY(PDAs) /mob/living/silicon/ai/verb/cmd_toggle_pda_receiver() set category = "AI Commands" set name = "PDA - Toggle Sender/Receiver" - if(usr.stat == 2) + if(usr.stat == DEAD) return //won't work if dead if(!isnull(aiPDA)) aiPDA.toff = !aiPDA.toff @@ -900,7 +900,7 @@ GLOBAL_LIST_EMPTY(PDAs) /mob/living/silicon/ai/verb/cmd_toggle_pda_silent() set category = "AI Commands" set name = "PDA - Toggle Ringer" - if(usr.stat == 2) + if(usr.stat == DEAD) return //won't work if dead if(!isnull(aiPDA)) //0 @@ -910,7 +910,7 @@ GLOBAL_LIST_EMPTY(PDAs) to_chat(usr, "You do not have a PDA. You should make an issue report about this.") /mob/living/silicon/ai/proc/cmd_show_message_log(mob/user) - if(user.stat == 2) + if(user.stat == DEAD) return //won't work if dead if(!isnull(aiPDA)) var/HTML = "AI PDA Message Log[aiPDA.tnote]" diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index eae0a4c9a2..9c19f37f3f 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -208,6 +208,8 @@ desc = "A desk lamp with an adjustable mount." icon_state = "lamp" item_state = "lamp" + lefthand_file = 'icons/mob/inhands/items_lefthand.dmi' + righthand_file = 'icons/mob/inhands/items_righthand.dmi' brightness_on = 5 w_class = WEIGHT_CLASS_BULKY flags_1 = CONDUCT_1 @@ -426,7 +428,7 @@ /obj/item/device/flashlight/glowstick/update_icon() item_state = "glowstick" - overlays.Cut() + cut_overlays() if(!fuel) icon_state = "glowstick-empty" cut_overlays() diff --git a/code/game/objects/items/devices/geiger_counter.dm b/code/game/objects/items/devices/geiger_counter.dm index 069f8375cc..c9755727e7 100644 --- a/code/game/objects/items/devices/geiger_counter.dm +++ b/code/game/objects/items/devices/geiger_counter.dm @@ -16,7 +16,6 @@ materials = list(MAT_METAL = 150, MAT_GLASS = 150) var/scanning = 0 var/radiation_count = 0 - var/emagged = FALSE /obj/item/device/geiger_counter/New() ..() diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm index 742a58a462..6bfbff9f3a 100644 --- a/code/game/objects/items/devices/lightreplacer.dm +++ b/code/game/objects/items/devices/lightreplacer.dm @@ -1,269 +1,268 @@ - -// Light Replacer (LR) -// -// ABOUT THE DEVICE -// -// This is a device supposedly to be used by Janitors and Janitor Cyborgs which will -// allow them to easily replace lights. This was mostly designed for Janitor Cyborgs since -// they don't have hands or a way to replace lightbulbs. -// -// HOW IT WORKS -// -// You attack a light fixture with it, if the light fixture is broken it will replace the -// light fixture with a working light; the broken light is then placed on the floor for the -// user to then pickup with a trash bag. If it's empty then it will just place a light in the fixture. -// -// HOW TO REFILL THE DEVICE -// -// It will need to be manually refilled with lights. -// If it's part of a robot module, it will charge when the Robot is inside a Recharge Station. -// -// EMAGGED FEATURES -// -// NOTICE: The Cyborg cannot use the emagged Light Replacer and the light's explosion was nerfed. It cannot create holes in the station anymore. -// -// I'm not sure everyone will react the emag's features so please say what your opinions are of it. -// -// When emagged it will rig every light it replaces, which will explode when the light is on. -// This is VERY noticable, even the device's name changes when you emag it so if anyone -// examines you when you're holding it in your hand, you will be discovered. -// It will also be very obvious who is setting all these lights off, since only Janitor Borgs and Janitors have easy -// access to them, and only one of them can emag their device. -// -// The explosion cannot insta-kill anyone with 30% or more health. - -#define LIGHT_OK 0 -#define LIGHT_EMPTY 1 -#define LIGHT_BROKEN 2 -#define LIGHT_BURNED 3 - - -/obj/item/device/lightreplacer - - name = "light replacer" - desc = "A device to automatically replace lights. Refill with broken or working lightbulbs, or sheets of glass." - - icon = 'icons/obj/janitor.dmi' - icon_state = "lightreplacer0" - item_state = "electronic" + +// Light Replacer (LR) +// +// ABOUT THE DEVICE +// +// This is a device supposedly to be used by Janitors and Janitor Cyborgs which will +// allow them to easily replace lights. This was mostly designed for Janitor Cyborgs since +// they don't have hands or a way to replace lightbulbs. +// +// HOW IT WORKS +// +// You attack a light fixture with it, if the light fixture is broken it will replace the +// light fixture with a working light; the broken light is then placed on the floor for the +// user to then pickup with a trash bag. If it's empty then it will just place a light in the fixture. +// +// HOW TO REFILL THE DEVICE +// +// It will need to be manually refilled with lights. +// If it's part of a robot module, it will charge when the Robot is inside a Recharge Station. +// +// EMAGGED FEATURES +// +// NOTICE: The Cyborg cannot use the emagged Light Replacer and the light's explosion was nerfed. It cannot create holes in the station anymore. +// +// I'm not sure everyone will react the emag's features so please say what your opinions are of it. +// +// When emagged it will rig every light it replaces, which will explode when the light is on. +// This is VERY noticable, even the device's name changes when you emag it so if anyone +// examines you when you're holding it in your hand, you will be discovered. +// It will also be very obvious who is setting all these lights off, since only Janitor Borgs and Janitors have easy +// access to them, and only one of them can emag their device. +// +// The explosion cannot insta-kill anyone with 30% or more health. + +#define LIGHT_OK 0 +#define LIGHT_EMPTY 1 +#define LIGHT_BROKEN 2 +#define LIGHT_BURNED 3 + + +/obj/item/device/lightreplacer + + name = "light replacer" + desc = "A device to automatically replace lights. Refill with broken or working lightbulbs, or sheets of glass." + + icon = 'icons/obj/janitor.dmi' + icon_state = "lightreplacer0" + item_state = "electronic" lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' - + flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT - origin_tech = "magnets=3;engineering=4" - - var/max_uses = 20 - var/uses = 0 - var/emagged = FALSE - var/failmsg = "" - // How much to increase per each glass? - var/increment = 5 - // How much to take from the glass? - var/decrement = 1 - var/charge = 1 - - // Eating used bulbs gives us bulb shards - var/bulb_shards = 0 - // when we get this many shards, we get a free bulb. - var/shards_required = 4 - -/obj/item/device/lightreplacer/New() - uses = max_uses / 2 - failmsg = "The [name]'s refill light blinks red." - ..() - -/obj/item/device/lightreplacer/examine(mob/user) - ..() - to_chat(user, status_string()) - -/obj/item/device/lightreplacer/attackby(obj/item/W, mob/user, params) - - if(istype(W, /obj/item/stack/sheet/glass)) - var/obj/item/stack/sheet/glass/G = W - if(uses >= max_uses) - to_chat(user, "[src.name] is full.") - return - else if(G.use(decrement)) - AddUses(increment) - to_chat(user, "You insert a piece of glass into the [src.name]. You have [uses] light\s remaining.") - return - else - to_chat(user, "You need one sheet of glass to replace lights!") - - if(istype(W, /obj/item/shard)) - if(uses >= max_uses) - to_chat(user, "[src.name] is full.") - return - if(!user.temporarilyRemoveItemFromInventory(W)) - return - AddUses(round(increment*0.75)) - to_chat(user, "You insert a shard of glass into the [src.name]. You have [uses] light\s remaining.") - qdel(W) - return - - if(istype(W, /obj/item/light)) - var/obj/item/light/L = W - if(L.status == 0) // LIGHT OKAY - if(uses < max_uses) - if(!user.temporarilyRemoveItemFromInventory(W)) - return - AddUses(1) - qdel(L) - else - if(!user.temporarilyRemoveItemFromInventory(W)) - return - to_chat(user, "You insert the [L.name] into the [src.name]") - AddShards(1, user) - qdel(L) - return - - if(istype(W, /obj/item/storage)) - var/obj/item/storage/S = W - var/found_lightbulbs = FALSE - var/replaced_something = TRUE - - for(var/obj/item/I in S.contents) + slot_flags = SLOT_BELT + origin_tech = "magnets=3;engineering=4" + + var/max_uses = 20 + var/uses = 0 + var/failmsg = "" + // How much to increase per each glass? + var/increment = 5 + // How much to take from the glass? + var/decrement = 1 + var/charge = 1 + + // Eating used bulbs gives us bulb shards + var/bulb_shards = 0 + // when we get this many shards, we get a free bulb. + var/shards_required = 4 + +/obj/item/device/lightreplacer/New() + uses = max_uses / 2 + failmsg = "The [name]'s refill light blinks red." + ..() + +/obj/item/device/lightreplacer/examine(mob/user) + ..() + to_chat(user, status_string()) + +/obj/item/device/lightreplacer/attackby(obj/item/W, mob/user, params) + + if(istype(W, /obj/item/stack/sheet/glass)) + var/obj/item/stack/sheet/glass/G = W + if(uses >= max_uses) + to_chat(user, "[src.name] is full.") + return + else if(G.use(decrement)) + AddUses(increment) + to_chat(user, "You insert a piece of glass into the [src.name]. You have [uses] light\s remaining.") + return + else + to_chat(user, "You need one sheet of glass to replace lights!") + + if(istype(W, /obj/item/shard)) + if(uses >= max_uses) + to_chat(user, "[src.name] is full.") + return + if(!user.temporarilyRemoveItemFromInventory(W)) + return + AddUses(round(increment*0.75)) + to_chat(user, "You insert a shard of glass into the [src.name]. You have [uses] light\s remaining.") + qdel(W) + return + + if(istype(W, /obj/item/light)) + var/obj/item/light/L = W + if(L.status == 0) // LIGHT OKAY + if(uses < max_uses) + if(!user.temporarilyRemoveItemFromInventory(W)) + return + AddUses(1) + qdel(L) + else + if(!user.temporarilyRemoveItemFromInventory(W)) + return + to_chat(user, "You insert the [L.name] into the [src.name]") + AddShards(1, user) + qdel(L) + return + + if(istype(W, /obj/item/storage)) + var/obj/item/storage/S = W + var/found_lightbulbs = FALSE + var/replaced_something = TRUE + + for(var/obj/item/I in S.contents) if(istype(I, /obj/item/light)) - var/obj/item/light/L = I - found_lightbulbs = TRUE - if(src.uses >= max_uses) - break - if(L.status == LIGHT_OK) - replaced_something = TRUE - AddUses(1) - qdel(L) - - else if(L.status == LIGHT_BROKEN || L.status == LIGHT_BURNED) - replaced_something = TRUE - AddShards(1, user) - qdel(L) - - if(!found_lightbulbs) - to_chat(user, "\The [S] contains no bulbs.") - return - - if(!replaced_something && src.uses == max_uses) - to_chat(user, "\The [src] is full!") - return - - to_chat(user, "You fill \the [src] with lights from \the [S]. " + status_string() + "") - -/obj/item/device/lightreplacer/emag_act() + var/obj/item/light/L = I + found_lightbulbs = TRUE + if(src.uses >= max_uses) + break + if(L.status == LIGHT_OK) + replaced_something = TRUE + AddUses(1) + qdel(L) + + else if(L.status == LIGHT_BROKEN || L.status == LIGHT_BURNED) + replaced_something = TRUE + AddShards(1, user) + qdel(L) + + if(!found_lightbulbs) + to_chat(user, "\The [S] contains no bulbs.") + return + + if(!replaced_something && src.uses == max_uses) + to_chat(user, "\The [src] is full!") + return + + to_chat(user, "You fill \the [src] with lights from \the [S]. " + status_string() + "") + +/obj/item/device/lightreplacer/emag_act() if(emagged) return Emag() - -/obj/item/device/lightreplacer/attack_self(mob/user) - to_chat(user, status_string()) - -/obj/item/device/lightreplacer/update_icon() - icon_state = "lightreplacer[emagged]" - -/obj/item/device/lightreplacer/proc/status_string() - return "It has [uses] light\s remaining (plus [bulb_shards] fragment\s)." - -/obj/item/device/lightreplacer/proc/Use(mob/user) - playsound(src.loc, 'sound/machines/click.ogg', 50, 1) - AddUses(-1) - return 1 - -// Negative numbers will subtract -/obj/item/device/lightreplacer/proc/AddUses(amount = 1) - uses = Clamp(uses + amount, 0, max_uses) - -/obj/item/device/lightreplacer/proc/AddShards(amount = 1, user) - bulb_shards += amount - var/new_bulbs = round(bulb_shards / shards_required) - if(new_bulbs > 0) - AddUses(new_bulbs) - bulb_shards = bulb_shards % shards_required - if(new_bulbs != 0) - to_chat(user, "\The [src] has fabricated a new bulb from the broken glass it has stored. It now has [uses] uses.") - playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) - return new_bulbs - -/obj/item/device/lightreplacer/proc/Charge(var/mob/user) - charge += 1 - if(charge > 3) - AddUses(1) - charge = 1 - -/obj/item/device/lightreplacer/proc/ReplaceLight(obj/machinery/light/target, mob/living/U) - - if(target.status != LIGHT_OK) - if(CanUse(U)) - if(!Use(U)) return - to_chat(U, "You replace the [target.fitting] with \the [src].") - - if(target.status != LIGHT_EMPTY) - AddShards(1, U) - target.status = LIGHT_EMPTY - target.update() - - var/obj/item/light/L2 = new target.light_type() - - target.status = L2.status - target.switchcount = L2.switchcount - target.rigged = emagged - target.brightness = L2.brightness - target.on = target.has_power() - target.update() - qdel(L2) - - if(target.on && target.rigged) - target.explode() - return - - else - to_chat(U, failmsg) - return - else - to_chat(U, "There is a working [target.fitting] already inserted!") - return - -/obj/item/device/lightreplacer/proc/Emag() - emagged = !emagged - playsound(src.loc, "sparks", 100, 1) - if(emagged) - name = "shortcircuited [initial(name)]" - else - name = initial(name) - update_icon() - -/obj/item/device/lightreplacer/proc/CanUse(mob/living/user) - src.add_fingerprint(user) - if(uses > 0) - return 1 - else - return 0 - -/obj/item/device/lightreplacer/afterattack(atom/T, mob/U, proximity) - if(!proximity) - return - if(!isturf(T)) - return - - var/used = FALSE - for(var/atom/A in T) - if(!CanUse(U)) - break - used = TRUE - if(istype(A, /obj/machinery/light)) - ReplaceLight(A, U) - - if(!used) - to_chat(U, failmsg) - -/obj/item/device/lightreplacer/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J) - J.put_in_cart(src, user) - J.myreplacer = src - J.update_icon() - -/obj/item/device/lightreplacer/cyborg/janicart_insert(mob/user, obj/structure/janitorialcart/J) - return - -#undef LIGHT_OK -#undef LIGHT_EMPTY -#undef LIGHT_BROKEN -#undef LIGHT_BURNED + +/obj/item/device/lightreplacer/attack_self(mob/user) + to_chat(user, status_string()) + +/obj/item/device/lightreplacer/update_icon() + icon_state = "lightreplacer[emagged]" + +/obj/item/device/lightreplacer/proc/status_string() + return "It has [uses] light\s remaining (plus [bulb_shards] fragment\s)." + +/obj/item/device/lightreplacer/proc/Use(mob/user) + playsound(src.loc, 'sound/machines/click.ogg', 50, 1) + AddUses(-1) + return 1 + +// Negative numbers will subtract +/obj/item/device/lightreplacer/proc/AddUses(amount = 1) + uses = Clamp(uses + amount, 0, max_uses) + +/obj/item/device/lightreplacer/proc/AddShards(amount = 1, user) + bulb_shards += amount + var/new_bulbs = round(bulb_shards / shards_required) + if(new_bulbs > 0) + AddUses(new_bulbs) + bulb_shards = bulb_shards % shards_required + if(new_bulbs != 0) + to_chat(user, "\The [src] has fabricated a new bulb from the broken glass it has stored. It now has [uses] uses.") + playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) + return new_bulbs + +/obj/item/device/lightreplacer/proc/Charge(var/mob/user) + charge += 1 + if(charge > 3) + AddUses(1) + charge = 1 + +/obj/item/device/lightreplacer/proc/ReplaceLight(obj/machinery/light/target, mob/living/U) + + if(target.status != LIGHT_OK) + if(CanUse(U)) + if(!Use(U)) return + to_chat(U, "You replace the [target.fitting] with \the [src].") + + if(target.status != LIGHT_EMPTY) + AddShards(1, U) + target.status = LIGHT_EMPTY + target.update() + + var/obj/item/light/L2 = new target.light_type() + + target.status = L2.status + target.switchcount = L2.switchcount + target.rigged = emagged + target.brightness = L2.brightness + target.on = target.has_power() + target.update() + qdel(L2) + + if(target.on && target.rigged) + target.explode() + return + + else + to_chat(U, failmsg) + return + else + to_chat(U, "There is a working [target.fitting] already inserted!") + return + +/obj/item/device/lightreplacer/proc/Emag() + emagged = !emagged + playsound(src.loc, "sparks", 100, 1) + if(emagged) + name = "shortcircuited [initial(name)]" + else + name = initial(name) + update_icon() + +/obj/item/device/lightreplacer/proc/CanUse(mob/living/user) + src.add_fingerprint(user) + if(uses > 0) + return 1 + else + return 0 + +/obj/item/device/lightreplacer/afterattack(atom/T, mob/U, proximity) + if(!proximity) + return + if(!isturf(T)) + return + + var/used = FALSE + for(var/atom/A in T) + if(!CanUse(U)) + break + used = TRUE + if(istype(A, /obj/machinery/light)) + ReplaceLight(A, U) + + if(!used) + to_chat(U, failmsg) + +/obj/item/device/lightreplacer/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J) + J.put_in_cart(src, user) + J.myreplacer = src + J.update_icon() + +/obj/item/device/lightreplacer/cyborg/janicart_insert(mob/user, obj/structure/janitorialcart/J) + return + +#undef LIGHT_OK +#undef LIGHT_EMPTY +#undef LIGHT_BROKEN +#undef LIGHT_BURNED diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm index 607238e2e9..30cec4c5a1 100644 --- a/code/game/objects/items/devices/megaphone.dm +++ b/code/game/objects/items/devices/megaphone.dm @@ -8,7 +8,6 @@ w_class = WEIGHT_CLASS_SMALL siemens_coefficient = 1 var/spamcheck = 0 - var/emagged = FALSE var/list/voicespan = list(SPAN_COMMAND) /obj/item/device/megaphone/get_held_item_speechspans(mob/living/carbon/user) diff --git a/code/game/objects/items/devices/pressureplates.dm b/code/game/objects/items/devices/pressureplates.dm index bab40edb29..b8b4884db7 100644 --- a/code/game/objects/items/devices/pressureplates.dm +++ b/code/game/objects/items/devices/pressureplates.dm @@ -86,7 +86,7 @@ icon_state = null active = TRUE if(tile_overlay) - loc.overlays += tile_overlay + loc.add_overlay(tile_overlay) else if(crossed) trigger() //no cheesing. diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index a0616a0075..c19e3eec92 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -426,7 +426,7 @@ signal.frequency = freqnum // Quick frequency set for(var/obj/machinery/telecomms/receiver/R in GLOB.telecomms_list) R.receive_signal(signal) - + // Allinone can act as receivers. (Unless of course whoever coded this last time forgot to put it in somewhere!) for(var/obj/machinery/telecomms/allinone/R in GLOB.telecomms_list) R.receive_signal(signal) @@ -449,6 +449,8 @@ return if(broadcasting) if(get_dist(src, speaker) <= canhear_range) + if(message_mode == MODE_WHISPER || message_mode == MODE_WHISPER_CRIT) + raw_message = stars(raw_message) talk_into(speaker, raw_message, , spans, language=message_language) /* /obj/item/device/radio/proc/accept_rad(obj/item/device/radio/R as obj, message) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 6879f1f2e2..31e5b70732 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -113,7 +113,7 @@ MASS SPECTROMETER var/tox_loss = M.getToxLoss() var/fire_loss = M.getFireLoss() var/brute_loss = M.getBruteLoss() - var/mob_status = (M.stat > 1 ? "Deceased" : "[round(M.health/M.maxHealth,0.01)*100] % healthy") + var/mob_status = (M.stat == DEAD ? "Deceased" : "[round(M.health/M.maxHealth,0.01)*100] % healthy") if(M.status_flags & FAKEDEATH) mob_status = "Deceased" diff --git a/code/game/objects/items/gift.dm b/code/game/objects/items/gift.dm index 32c88e38da..1e3e9ccd73 100644 --- a/code/game/objects/items/gift.dm +++ b/code/game/objects/items/gift.dm @@ -12,7 +12,7 @@ desc = "PRESENTS!!!! eek!" icon = 'icons/obj/storage.dmi' icon_state = "giftdeliverypackage3" - item_state = "gift1" + item_state = "gift" resistance_flags = FLAMMABLE /obj/item/a_gift/New() diff --git a/code/game/objects/items/grenades/plastic.dm b/code/game/objects/items/grenades/plastic.dm index 406f98d631..90fd6aa63d 100644 --- a/code/game/objects/items/grenades/plastic.dm +++ b/code/game/objects/items/grenades/plastic.dm @@ -2,7 +2,7 @@ name = "plastic explosive" desc = "Used to put holes in specific areas without too much extra hole." icon_state = "plastic-explosive0" - item_state = "plastic-explosive" + item_state = "plasticx" flags_1 = NOBLUDGEON_1 flags_2 = NO_EMP_WIRES_2 det_time = 10 diff --git a/code/game/objects/items/his_grace.dm b/code/game/objects/items/his_grace.dm index 3621a893e9..0a2e6d6350 100644 --- a/code/game/objects/items/his_grace.dm +++ b/code/game/objects/items/his_grace.dm @@ -9,6 +9,8 @@ desc = "A toolbox painted bright green. Looking at it makes you feel uneasy." icon_state = "his_grace" item_state = "artistic_toolbox" + lefthand_file = 'icons/mob/inhands/equipment/toolbox_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/toolbox_righthand.dmi' icon = 'icons/obj/items_and_weapons.dmi' w_class = WEIGHT_CLASS_GIGANTIC origin_tech = "combat=4;engineering=4;syndicate=2" diff --git a/code/game/objects/items/holy_weapons.dm b/code/game/objects/items/holy_weapons.dm index 5a5d9dd2e6..e82a40d10a 100644 --- a/code/game/objects/items/holy_weapons.dm +++ b/code/game/objects/items/holy_weapons.dm @@ -336,6 +336,8 @@ icon = 'icons/obj/toy.dmi' icon_state = "carpplushie" item_state = "carp_plushie" + lefthand_file = 'icons/mob/inhands/items_lefthand.dmi' + righthand_file = 'icons/mob/inhands/items_righthand.dmi' force = 15 attack_verb = list("bitten", "eaten", "fin slapped") hitsound = 'sound/weapons/bite.ogg' diff --git a/code/game/objects/items/implants/implantchair.dm b/code/game/objects/items/implants/implantchair.dm index 55a35960cf..2f59020cbe 100644 --- a/code/game/objects/items/implants/implantchair.dm +++ b/code/game/objects/items/implants/implantchair.dm @@ -1,187 +1,188 @@ -/obj/machinery/implantchair - name = "mindshield implanter" - desc = "Used to implant occupants with mindshield implants." - icon = 'icons/obj/machines/implantchair.dmi' - icon_state = "implantchair" - density = TRUE - opacity = 0 - anchored = TRUE - - var/ready = TRUE - var/replenishing = FALSE - - var/ready_implants = 5 - var/max_implants = 5 - var/injection_cooldown = 600 - var/replenish_cooldown = 6000 - var/implant_type = /obj/item/implant/mindshield - var/auto_inject = FALSE - var/auto_replenish = TRUE - var/special = FALSE - var/special_name = "special function" - -/obj/machinery/implantchair/Initialize() - . = ..() - open_machine() - update_icon() - - -/obj/machinery/implantchair/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.notcontained_state) - ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) - if(!ui) - ui = new(user, src, ui_key, "implantchair", name, 375, 280, master_ui, state) - ui.open() - - -/obj/machinery/implantchair/ui_data() - var/list/data = list() - data["occupied"] = occupant ? 1 : 0 - data["open"] = state_open - - data["occupant"] = list() - if(occupant) - var/mob/living/mob_occupant = occupant - data["occupant"]["name"] = mob_occupant.name - data["occupant"]["stat"] = mob_occupant.stat - - data["special_name"] = special ? special_name : null - data["ready_implants"] = ready_implants - data["ready"] = ready - data["replenishing"] = replenishing - - return data - -/obj/machinery/implantchair/ui_act(action, params) - if(..()) - return - switch(action) - if("door") - if(state_open) - close_machine() - else - open_machine() - . = TRUE - if("implant") - implant(occupant,usr) - . = TRUE - -/obj/machinery/implantchair/proc/implant(mob/living/M,mob/user) - if (!istype(M)) - return - if(!ready_implants || !ready) - return - if(implant_action(M,user)) - ready_implants-- - if(!replenishing && auto_replenish) - replenishing = TRUE - addtimer(CALLBACK(src,"replenish"),replenish_cooldown) - if(injection_cooldown > 0) - ready = FALSE - addtimer(CALLBACK(src,"set_ready"),injection_cooldown) - else - playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 25, 1) - update_icon() - -/obj/machinery/implantchair/proc/implant_action(mob/living/M) - var/obj/item/implant/I = new implant_type - if(I.implant(M)) - visible_message("[M] has been implanted by the [name].") - return 1 - -/obj/machinery/implantchair/update_icon() - icon_state = initial(icon_state) - if(state_open) - icon_state += "_open" - if(occupant) - icon_state += "_occupied" - if(ready) - add_overlay("ready") - else - cut_overlays() - -/obj/machinery/implantchair/proc/replenish() - if(ready_implants < max_implants) - ready_implants++ - if(ready_implants < max_implants) - addtimer(CALLBACK(src,"replenish"),replenish_cooldown) - else - replenishing = FALSE - -/obj/machinery/implantchair/proc/set_ready() - ready = TRUE - update_icon() - -/obj/machinery/implantchair/container_resist(mob/living/user) - if(state_open) - return - user.changeNext_move(CLICK_CD_BREAKOUT) - user.last_special = world.time + CLICK_CD_BREAKOUT - to_chat(user, "You lean on the back of [src] and start pushing the door open... (this will take about about a minute.)") - audible_message("You hear a metallic creaking from [src]!",hearing_distance = 2) - - if(do_after(user, 600, target = src)) - if(!user || user.stat != CONSCIOUS || user.loc != src || state_open) - return - visible_message("[user] successfully broke out of [src]!") - to_chat(user, "You successfully break out of [src]!") - open_machine() - -/obj/machinery/implantchair/relaymove(mob/user) - container_resist(user) - -/obj/machinery/implantchair/MouseDrop_T(mob/target, mob/user) - if(user.stat || user.lying || !Adjacent(user) || !user.Adjacent(target) || !isliving(target) || !user.IsAdvancedToolUser()) - return - close_machine(target) - -/obj/machinery/implantchair/close_machine(mob/living/user) - if((isnull(user) || istype(user)) && state_open) - ..(user) - if(auto_inject && ready && ready_implants > 0) - implant(user,null) - -/obj/machinery/implantchair/genepurge - name = "Genetic purifier" - desc = "Used to purge human genome of foreign influences" - special = TRUE - special_name = "Purge genome" - injection_cooldown = 0 - replenish_cooldown = 300 - -/obj/machinery/implantchair/genepurge/implant_action(mob/living/carbon/human/H,mob/user) - if(!istype(H)) - return 0 - H.set_species(/datum/species/human, 1)//lizards go home - purrbation_remove(H)//remove cats - H.dna.remove_all_mutations()//hulks out - return 1 - - -/obj/machinery/implantchair/brainwash - name = "Neural Imprinter" - desc = "Used to indoctrinate rehabilitate hardened recidivists." - special_name = "Imprint" - injection_cooldown = 3000 - auto_inject = FALSE - auto_replenish = FALSE - special = TRUE - var/objective = "Obey the law. Praise Nanotrasen." - var/custom = FALSE - -/obj/machinery/implantchair/brainwash/implant_action(mob/living/C,mob/user) - if(!istype(C) || !C.mind) // I don't know how this makes any sense for silicons but laws trump objectives anyway. - return 0 - if(custom) - if(!user || !user.Adjacent(src)) - return 0 - objective = stripped_input(usr,"What order do you want to imprint on [C]?","Enter the order","",120) - message_admins("[key_name_admin(user)] set brainwash machine objective to '[objective]'.") - log_game("[key_name_admin(user)] set brainwash machine objective to '[objective]'.") - var/datum/objective/custom_objective = new/datum/objective(objective) - custom_objective.owner = C.mind - C.mind.objectives += custom_objective - C.mind.announce_objectives() - message_admins("[key_name_admin(user)] brainwashed [key_name_admin(C)] with objective '[objective]'.") - log_game("[key_name_admin(user)] brainwashed [key_name_admin(C)] with objective '[objective]'.") - return 1 - +/obj/machinery/implantchair + name = "mindshield implanter" + desc = "Used to implant occupants with mindshield implants." + icon = 'icons/obj/machines/implantchair.dmi' + icon_state = "implantchair" + density = TRUE + opacity = 0 + anchored = TRUE + + var/ready = TRUE + var/replenishing = FALSE + + var/ready_implants = 5 + var/max_implants = 5 + var/injection_cooldown = 600 + var/replenish_cooldown = 6000 + var/implant_type = /obj/item/implant/mindshield + var/auto_inject = FALSE + var/auto_replenish = TRUE + var/special = FALSE + var/special_name = "special function" + var/message_cooldown + var/breakout_time = 1 + +/obj/machinery/implantchair/Initialize() + . = ..() + open_machine() + update_icon() + + +/obj/machinery/implantchair/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.notcontained_state) + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "implantchair", name, 375, 280, master_ui, state) + ui.open() + + +/obj/machinery/implantchair/ui_data() + var/list/data = list() + data["occupied"] = occupant ? 1 : 0 + data["open"] = state_open + + data["occupant"] = list() + if(occupant) + var/mob/living/mob_occupant = occupant + data["occupant"]["name"] = mob_occupant.name + data["occupant"]["stat"] = mob_occupant.stat + + data["special_name"] = special ? special_name : null + data["ready_implants"] = ready_implants + data["ready"] = ready + data["replenishing"] = replenishing + + return data + +/obj/machinery/implantchair/ui_act(action, params) + if(..()) + return + switch(action) + if("door") + if(state_open) + close_machine() + else + open_machine() + . = TRUE + if("implant") + implant(occupant,usr) + . = TRUE + +/obj/machinery/implantchair/proc/implant(mob/living/M,mob/user) + if (!istype(M)) + return + if(!ready_implants || !ready) + return + if(implant_action(M,user)) + ready_implants-- + if(!replenishing && auto_replenish) + replenishing = TRUE + addtimer(CALLBACK(src,"replenish"),replenish_cooldown) + if(injection_cooldown > 0) + ready = FALSE + addtimer(CALLBACK(src,"set_ready"),injection_cooldown) + else + playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 25, 1) + update_icon() + +/obj/machinery/implantchair/proc/implant_action(mob/living/M) + var/obj/item/implant/I = new implant_type + if(I.implant(M)) + visible_message("[M] has been implanted by the [name].") + return 1 + +/obj/machinery/implantchair/update_icon() + icon_state = initial(icon_state) + if(state_open) + icon_state += "_open" + if(occupant) + icon_state += "_occupied" + if(ready) + add_overlay("ready") + else + cut_overlays() + +/obj/machinery/implantchair/proc/replenish() + if(ready_implants < max_implants) + ready_implants++ + if(ready_implants < max_implants) + addtimer(CALLBACK(src,"replenish"),replenish_cooldown) + else + replenishing = FALSE + +/obj/machinery/implantchair/proc/set_ready() + ready = TRUE + update_icon() + +/obj/machinery/implantchair/container_resist(mob/living/user) + user.changeNext_move(CLICK_CD_BREAKOUT) + user.last_special = world.time + CLICK_CD_BREAKOUT + user.visible_message("You see [user] kicking against the door of [src]!", \ + "You lean on the back of [src] and start pushing the door open... (this will take about [(breakout_time<1) ? "[breakout_time*60] seconds" : "[breakout_time] minute\s"].)", \ + "You hear a metallic creaking from [src].") + if(do_after(user,(breakout_time*60*10), target = src)) //minutes * 60seconds * 10deciseconds + if(!user || user.stat != CONSCIOUS || user.loc != src || state_open) + return + user.visible_message("[user] successfully broke out of [src]!", \ + "You successfully break out of [src]!") + open_machine() + +/obj/machinery/implantchair/relaymove(mob/user) + if(message_cooldown <= world.time) + message_cooldown = world.time + 50 + to_chat(user, "[src]'s door won't budge!") + +/obj/machinery/implantchair/MouseDrop_T(mob/target, mob/user) + if(user.stat || user.lying || !Adjacent(user) || !user.Adjacent(target) || !isliving(target) || !user.IsAdvancedToolUser()) + return + close_machine(target) + +/obj/machinery/implantchair/close_machine(mob/living/user) + if((isnull(user) || istype(user)) && state_open) + ..(user) + if(auto_inject && ready && ready_implants > 0) + implant(user,null) + +/obj/machinery/implantchair/genepurge + name = "Genetic purifier" + desc = "Used to purge human genome of foreign influences" + special = TRUE + special_name = "Purge genome" + injection_cooldown = 0 + replenish_cooldown = 300 + +/obj/machinery/implantchair/genepurge/implant_action(mob/living/carbon/human/H,mob/user) + if(!istype(H)) + return 0 + H.set_species(/datum/species/human, 1)//lizards go home + purrbation_remove(H)//remove cats + H.dna.remove_all_mutations()//hulks out + return 1 + + +/obj/machinery/implantchair/brainwash + name = "Neural Imprinter" + desc = "Used to indoctrinate rehabilitate hardened recidivists." + special_name = "Imprint" + injection_cooldown = 3000 + auto_inject = FALSE + auto_replenish = FALSE + special = TRUE + var/objective = "Obey the law. Praise Nanotrasen." + var/custom = FALSE + +/obj/machinery/implantchair/brainwash/implant_action(mob/living/C,mob/user) + if(!istype(C) || !C.mind) // I don't know how this makes any sense for silicons but laws trump objectives anyway. + return 0 + if(custom) + if(!user || !user.Adjacent(src)) + return 0 + objective = stripped_input(usr,"What order do you want to imprint on [C]?","Enter the order","",120) + message_admins("[key_name_admin(user)] set brainwash machine objective to '[objective]'.") + log_game("[key_name_admin(user)] set brainwash machine objective to '[objective]'.") + var/datum/objective/custom_objective = new/datum/objective(objective) + custom_objective.owner = C.mind + C.mind.objectives += custom_objective + C.mind.announce_objectives() + message_admins("[key_name_admin(user)] brainwashed [key_name_admin(C)] with objective '[objective]'.") + log_game("[key_name_admin(user)] brainwashed [key_name_admin(C)] with objective '[objective]'.") + return 1 diff --git a/code/game/objects/items/kitchen.dm b/code/game/objects/items/kitchen.dm index ccf3f55e83..508e75d8cb 100644 --- a/code/game/objects/items/kitchen.dm +++ b/code/game/objects/items/kitchen.dm @@ -1,168 +1,170 @@ -/* Kitchen tools - * Contains: - * Fork - * Kitchen knives - * Ritual Knife - * Butcher's cleaver - * Combat Knife - * Rolling Pins - */ - -/obj/item/kitchen - icon = 'icons/obj/kitchen.dmi' - origin_tech = "materials=1" - lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi' - righthand_file = 'icons/mob/inhands/equipment/kitchen_righthand.dmi' - -/obj/item/kitchen/fork - name = "fork" - desc = "Pointy." - icon_state = "fork" - force = 5 - w_class = WEIGHT_CLASS_TINY - throwforce = 0 - throw_speed = 3 - throw_range = 5 - materials = list(MAT_METAL=80) - flags_1 = CONDUCT_1 - attack_verb = list("attacked", "stabbed", "poked") - hitsound = 'sound/weapons/bladeslice.ogg' - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30) - var/datum/reagent/forkload //used to eat omelette - -/obj/item/kitchen/fork/attack(mob/living/carbon/M, mob/living/carbon/user) - if(!istype(M)) - return ..() - - if(forkload) - if(M == user) - M.visible_message("[user] eats a delicious forkful of omelette!") - M.reagents.add_reagent(forkload.id, 1) - else - M.visible_message("[user] feeds [M] a delicious forkful of omelette!") - M.reagents.add_reagent(forkload.id, 1) - icon_state = "fork" - forkload = null - - else if(user.zone_selected == "eyes") - if(user.disabilities & CLUMSY && prob(50)) - M = user - return eyestab(M,user) - else - return ..() - - -/obj/item/kitchen/knife - name = "kitchen knife" - icon_state = "knife" - desc = "A general purpose Chef's Knife made by SpaceCook Incorporated. Guaranteed to stay sharp for years to come." - flags_1 = CONDUCT_1 - force = 10 - w_class = WEIGHT_CLASS_SMALL - throwforce = 10 - hitsound = 'sound/weapons/bladeslice.ogg' - throw_speed = 3 - throw_range = 6 - materials = list(MAT_METAL=12000) - attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") - sharpness = IS_SHARP_ACCURATE - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50) - var/bayonet = FALSE //Can this be attached to a gun? - -/obj/item/kitchen/knife/attack(mob/living/carbon/M, mob/living/carbon/user) - if(user.zone_selected == "eyes") - if(user.disabilities & CLUMSY && prob(50)) - M = user - return eyestab(M,user) - else - return ..() - -/obj/item/kitchen/knife/suicide_act(mob/user) - user.visible_message(pick("[user] is slitting [user.p_their()] wrists with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.", \ - "[user] is slitting [user.p_their()] throat with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.", \ - "[user] is slitting [user.p_their()] stomach open with the [src.name]! It looks like [user.p_theyre()] trying to commit seppuku.")) - return (BRUTELOSS) - -/obj/item/kitchen/knife/ritual - name = "ritual knife" - desc = "The unearthly energies that once powered this blade are now dormant." - icon = 'icons/obj/wizard.dmi' - icon_state = "render" - item_state = "knife" - w_class = WEIGHT_CLASS_NORMAL - -/obj/item/kitchen/knife/butcher - name = "butcher's cleaver" - icon_state = "butch" - desc = "A huge thing used for chopping and chopping up meat. This includes clowns and clown by-products." - flags_1 = CONDUCT_1 - force = 15 - throwforce = 10 - materials = list(MAT_METAL=18000) - attack_verb = list("cleaved", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") - w_class = WEIGHT_CLASS_NORMAL - -/obj/item/kitchen/knife/combat - name = "combat knife" - icon_state = "buckknife" - item_state = "knife" - desc = "A military combat utility survival knife." - force = 20 - throwforce = 20 - origin_tech = "materials=3;combat=4" - attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "cut") - bayonet = TRUE - -/obj/item/kitchen/knife/combat/survival - name = "survival knife" - icon_state = "survivalknife" - item_state = "knife" - desc = "A hunting grade survival knife." - force = 15 - throwforce = 15 - bayonet = TRUE - -/obj/item/kitchen/knife/combat/bone - name = "bone dagger" - item_state = "bone_dagger" - icon_state = "bone_dagger" - lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi' - righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi' - desc = "A sharpened bone. The bare mimimum in survival." - force = 15 - throwforce = 15 - materials = list() - -/obj/item/kitchen/knife/combat/cyborg - name = "cyborg knife" - icon = 'icons/obj/items_cyborg.dmi' - icon_state = "knife" - desc = "A cyborg-mounted plasteel knife. Extremely sharp and durable." - origin_tech = null - -/obj/item/kitchen/knife/carrotshiv - name = "carrot shiv" - icon_state = "carrotshiv" - item_state = "carrotshiv" - lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi' - righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi' - desc = "Unlike other carrots, you should probably keep this far away from your eyes." - force = 8 - throwforce = 12//fuck git - materials = list() - origin_tech = "biotech=3;combat=2" - attack_verb = list("shanked", "shivved") - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0) - -/obj/item/kitchen/rollingpin - name = "rolling pin" - desc = "Used to knock out the Bartender." - icon_state = "rolling_pin" - force = 8 - throwforce = 5 - throw_speed = 3 - throw_range = 7 - w_class = WEIGHT_CLASS_NORMAL - attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked") - -/* Trays moved to /obj/item/storage/bag */ +/* Kitchen tools + * Contains: + * Fork + * Kitchen knives + * Ritual Knife + * Butcher's cleaver + * Combat Knife + * Rolling Pins + */ + +/obj/item/kitchen + icon = 'icons/obj/kitchen.dmi' + origin_tech = "materials=1" + lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/kitchen_righthand.dmi' + +/obj/item/kitchen/fork + name = "fork" + desc = "Pointy." + icon_state = "fork" + force = 5 + w_class = WEIGHT_CLASS_TINY + throwforce = 0 + throw_speed = 3 + throw_range = 5 + materials = list(MAT_METAL=80) + flags_1 = CONDUCT_1 + attack_verb = list("attacked", "stabbed", "poked") + hitsound = 'sound/weapons/bladeslice.ogg' + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30) + var/datum/reagent/forkload //used to eat omelette + +/obj/item/kitchen/fork/attack(mob/living/carbon/M, mob/living/carbon/user) + if(!istype(M)) + return ..() + + if(forkload) + if(M == user) + M.visible_message("[user] eats a delicious forkful of omelette!") + M.reagents.add_reagent(forkload.id, 1) + else + M.visible_message("[user] feeds [M] a delicious forkful of omelette!") + M.reagents.add_reagent(forkload.id, 1) + icon_state = "fork" + forkload = null + + else if(user.zone_selected == "eyes") + if(user.disabilities & CLUMSY && prob(50)) + M = user + return eyestab(M,user) + else + return ..() + + +/obj/item/kitchen/knife + name = "kitchen knife" + icon_state = "knife" + desc = "A general purpose Chef's Knife made by SpaceCook Incorporated. Guaranteed to stay sharp for years to come." + flags_1 = CONDUCT_1 + force = 10 + w_class = WEIGHT_CLASS_SMALL + throwforce = 10 + hitsound = 'sound/weapons/bladeslice.ogg' + throw_speed = 3 + throw_range = 6 + materials = list(MAT_METAL=12000) + attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") + sharpness = IS_SHARP_ACCURATE + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50) + var/bayonet = FALSE //Can this be attached to a gun? + +/obj/item/kitchen/knife/attack(mob/living/carbon/M, mob/living/carbon/user) + if(user.zone_selected == "eyes") + if(user.disabilities & CLUMSY && prob(50)) + M = user + return eyestab(M,user) + else + return ..() + +/obj/item/kitchen/knife/suicide_act(mob/user) + user.visible_message(pick("[user] is slitting [user.p_their()] wrists with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.", \ + "[user] is slitting [user.p_their()] throat with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.", \ + "[user] is slitting [user.p_their()] stomach open with the [src.name]! It looks like [user.p_theyre()] trying to commit seppuku.")) + return (BRUTELOSS) + +/obj/item/kitchen/knife/ritual + name = "ritual knife" + desc = "The unearthly energies that once powered this blade are now dormant." + icon = 'icons/obj/wizard.dmi' + icon_state = "render" + item_state = "knife" + lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/kitchen_righthand.dmi' + w_class = WEIGHT_CLASS_NORMAL + +/obj/item/kitchen/knife/butcher + name = "butcher's cleaver" + icon_state = "butch" + desc = "A huge thing used for chopping and chopping up meat. This includes clowns and clown by-products." + flags_1 = CONDUCT_1 + force = 15 + throwforce = 10 + materials = list(MAT_METAL=18000) + attack_verb = list("cleaved", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") + w_class = WEIGHT_CLASS_NORMAL + +/obj/item/kitchen/knife/combat + name = "combat knife" + icon_state = "buckknife" + item_state = "knife" + desc = "A military combat utility survival knife." + force = 20 + throwforce = 20 + origin_tech = "materials=3;combat=4" + attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "cut") + bayonet = TRUE + +/obj/item/kitchen/knife/combat/survival + name = "survival knife" + icon_state = "survivalknife" + item_state = "knife" + desc = "A hunting grade survival knife." + force = 15 + throwforce = 15 + bayonet = TRUE + +/obj/item/kitchen/knife/combat/bone + name = "bone dagger" + item_state = "bone_dagger" + icon_state = "bone_dagger" + lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi' + righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi' + desc = "A sharpened bone. The bare mimimum in survival." + force = 15 + throwforce = 15 + materials = list() + +/obj/item/kitchen/knife/combat/cyborg + name = "cyborg knife" + icon = 'icons/obj/items_cyborg.dmi' + icon_state = "knife" + desc = "A cyborg-mounted plasteel knife. Extremely sharp and durable." + origin_tech = null + +/obj/item/kitchen/knife/carrotshiv + name = "carrot shiv" + icon_state = "carrotshiv" + item_state = "carrotshiv" + lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi' + righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi' + desc = "Unlike other carrots, you should probably keep this far away from your eyes." + force = 8 + throwforce = 12//fuck git + materials = list() + origin_tech = "biotech=3;combat=2" + attack_verb = list("shanked", "shivved") + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0) + +/obj/item/kitchen/rollingpin + name = "rolling pin" + desc = "Used to knock out the Bartender." + icon_state = "rolling_pin" + force = 8 + throwforce = 5 + throw_speed = 3 + throw_range = 7 + w_class = WEIGHT_CLASS_NORMAL + attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked") + +/* Trays moved to /obj/item/storage/bag */ diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm index d2e1491937..d727c517bd 100644 --- a/code/game/objects/items/melee/misc.dm +++ b/code/game/objects/items/melee/misc.dm @@ -36,6 +36,8 @@ icon = 'icons/obj/items_and_weapons.dmi' icon_state = "arm_blade" item_state = "arm_blade" + lefthand_file = 'icons/mob/inhands/antag/changeling_lefthand.dmi' + righthand_file = 'icons/mob/inhands/antag/changeling_righthand.dmi' origin_tech = "combat=5;biotech=5" w_class = WEIGHT_CLASS_HUGE force = 20 diff --git a/code/game/objects/items/religion.dm b/code/game/objects/items/religion.dm index 1edbba1f56..007c590cac 100644 --- a/code/game/objects/items/religion.dm +++ b/code/game/objects/items/religion.dm @@ -1,27 +1,201 @@ /obj/item/banner name = "banner" + desc = "A banner with Nanotrasen's logo on it." icon = 'icons/obj/items_and_weapons.dmi' icon_state = "banner" item_state = "banner" + force = 8 + attack_verb = list("forcefully inspired", "violently encouraged", "relentlessly galvanized") lefthand_file = 'icons/mob/inhands/equipment/banners_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/banners_righthand.dmi' - desc = "A banner with Nanotrasen's logo on it." - var/moralecooldown = 0 - var/moralewait = 600 + var/inspiration_available = TRUE //If this banner can be used to inspire crew + var/morale_time = 0 + var/morale_cooldown = 600 //How many deciseconds between uses + var/list/job_loyalties //Mobs with any of these assigned roles will be inspired + var/list/role_loyalties //Mobs with any of these special roles will be inspired + var/warcry + +/obj/item/banner/examine(mob/user) + ..() + if(inspiration_available) + to_chat(user, "Activate it in your hand to inspire nearby allies of this banner's allegiance!") /obj/item/banner/attack_self(mob/living/carbon/human/user) - if(moralecooldown + moralewait > world.time) + if(!inspiration_available) return - to_chat(user, "You increase the morale of your fellows!") - moralecooldown = world.time + if(morale_time > world.time) + to_chat(user, "You aren't feeling inspired enough to flourish [src] again yet.") + return + user.visible_message("[user] flourishes [src]!", \ + "You raise [src] skywards, inspiring your allies!") + playsound(src, "rustle", 100, FALSE) + if(warcry) + user.say("[warcry]") + var/old_transform = user.transform + user.transform *= 1.2 + animate(user, transform = old_transform, time = 10) + morale_time = world.time + morale_cooldown - for(var/mob/living/carbon/human/H in range(4,get_turf(src))) - to_chat(H, "Your morale is increased by [user]'s banner!") - H.adjustBruteLoss(-15) - H.adjustFireLoss(-15) - H.AdjustStun(-40) - H.AdjustKnockdown(-40) - H.AdjustUnconscious(-40) + var/list/inspired = list() + var/has_job_loyalties = LAZYLEN(job_loyalties) + var/has_role_loyalties = LAZYLEN(role_loyalties) + inspired += user //The user is always inspired, regardless of loyalties + for(var/mob/living/carbon/human/H in range(4, get_turf(src))) + if(H.stat == DEAD || H == user) + continue + if(H.mind && (has_job_loyalties || has_role_loyalties)) + if(has_job_loyalties && H.mind.assigned_role in job_loyalties) + inspired += H + else if(has_role_loyalties && H.mind.special_role in role_loyalties) + inspired += H + else if(check_inspiration(H)) + inspired += H + + for(var/V in inspired) + var/mob/living/carbon/human/H = V + if(H != user) + to_chat(H, "Your confidence surges as [user] flourishes [user.p_their()] [name]!") + inspiration(H) + special_inspiration(H) + +/obj/item/banner/proc/check_inspiration(mob/living/carbon/human/H) //Banner-specific conditions for being eligible + return + +/obj/item/banner/proc/inspiration(mob/living/carbon/human/H) + H.adjustBruteLoss(-15) + H.adjustFireLoss(-15) + H.AdjustStun(-40) + H.AdjustKnockdown(-40) + H.AdjustUnconscious(-40) + playsound(H, 'sound/magic/staff_healing.ogg', 25, FALSE) + +/obj/item/banner/proc/special_inspiration(mob/living/carbon/human/H) //Any banner-specific inspiration effects go here + return + +/obj/item/banner/security + name = "securistan banner" + desc = "The banner of Securistan, ruling the station with an iron fist." + icon_state = "banner_security" + job_loyalties = list("Security Officer", "Warden", "Detective", "Head of Security") + warcry = "EVERYONE DOWN ON THE GROUND!!" + +/obj/item/banner/security/mundane + inspiration_available = FALSE + +/datum/crafting_recipe/security_banner + name = "Securistan Banner" + result = /obj/item/banner/security/mundane + time = 40 + reqs = list(/obj/item/stack/rods = 2, + /obj/item/clothing/under/rank/security = 1) + category = CAT_MISC + +/obj/item/banner/medical + name = "meditopia banner" + desc = "The banner of Meditopia, generous benefactors that cure wounds and shelter the weak." + icon_state = "banner_medical" + job_loyalties = list("Medical Doctor", "Chemist", "Geneticist", "Virologist", "Chief Medical Officer") + warcry = "No wounds cannot be healed!" + +/obj/item/banner/medical/mundane + inspiration_available = FALSE + +/obj/item/banner/medical/check_inspiration(mob/living/carbon/human/H) + return H.stat //Meditopia is moved to help those in need + +/datum/crafting_recipe/medical_banner + name = "Meditopia Banner" + result = /obj/item/banner/medical/mundane + time = 40 + reqs = list(/obj/item/stack/rods = 2, + /obj/item/clothing/under/rank/medical = 1) + category = CAT_MISC + +/obj/item/banner/medical/special_inspiration(mob/living/carbon/human/H) + H.adjustToxLoss(-15) + H.setOxyLoss(0) + H.reagents.add_reagent("inaprovaline", 5) + +/obj/item/banner/science + name = "sciencia banner" + desc = "The banner of Sciencia, bold and daring thaumaturges and researchers that take the path less traveled." + icon_state = "banner_science" + job_loyalties = list("Scientist", "Roboticist", "Research Director") + warcry = "For Cuban Pete!" + +/obj/item/banner/science/mundane + inspiration_available = FALSE + +/obj/item/banner/science/check_inspiration(mob/living/carbon/human/H) + return H.on_fire //Sciencia is pleased by dedication to the art of Toxins + +/datum/crafting_recipe/science_banner + name = "Sciencia Banner" + result = /obj/item/banner/science/mundane + time = 40 + reqs = list(/obj/item/stack/rods = 2, + /obj/item/clothing/under/rank/scientist = 1) + category = CAT_MISC + +/obj/item/banner/cargo + name = "cargonia banner" + desc = "The banner of the eternal Cargonia, with the mystical power of conjuring any object into existence." + icon_state = "banner_cargo" + job_loyalties = list("Cargo Technician", "Shaft Miner", "Quartermaster") + warcry = "Hail Cargonia!" + +/obj/item/banner/cargo/mundane + inspiration_available = FALSE + +/datum/crafting_recipe/cargo_banner + name = "Cargonia Banner" + result = /obj/item/banner/cargo/mundane + time = 40 + reqs = list(/obj/item/stack/rods = 2, + /obj/item/clothing/under/rank/cargotech = 1) + category = CAT_MISC + +/obj/item/banner/engineering + name = "engitopia banner" + desc = "The banner of Engitopia, wielders of limitless power." + icon_state = "banner_engineering" + job_loyalties = list("Station Engineer", "Atmospheric Technician", "Chief Engineer") + warcry = "All hail lord Singuloth!!" + +/obj/item/banner/engineering/mundane + inspiration_available = FALSE + +/obj/item/banner/engineering/special_inspiration(mob/living/carbon/human/H) + H.radiation = 0 + +/datum/crafting_recipe/engineering_banner + name = "Engitopia Banner" + result = /obj/item/banner/engineering/mundane + time = 40 + reqs = list(/obj/item/stack/rods = 2, + /obj/item/clothing/under/rank/engineer = 1) + category = CAT_MISC + +/obj/item/banner/command + name = "command banner" + desc = "The banner of Command, a staunch and ancient line of bueraucratic kings and queens." + //No icon state here since the default one is the NT banner + job_loyalties = list("Captain", "Head of Personnel", "Chief Engineer", "Head of Security", "Research Director", "Chief Medical Officer") + warcry = "Hail Nanotrasen!" + +/obj/item/banner/command/mundane + inspiration_available = FALSE + +/obj/item/banner/command/check_inspiration(mob/living/carbon/human/H) + return H.isloyal() //Command is stalwart but rewards their allies. + +/datum/crafting_recipe/command_banner + name = "Command Banner" + result = /obj/item/banner/command/mundane + time = 40 + reqs = list(/obj/item/stack/rods = 2, + /obj/item/clothing/under/captainparade = 1) + category = CAT_MISC /obj/item/banner/red name = "red banner" diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index fa509ad65e..64fea6ef19 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -278,7 +278,6 @@ desc = "Releases a harmless blast that confuses most organics. For when the harm is JUST TOO MUCH" icon_state = "megaphone" var/cooldown = 0 - var/emagged = FALSE /obj/item/device/harmalarm/emag_act(mob/user) emagged = !emagged diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 92da7f52e7..02d835da16 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -18,7 +18,7 @@ /obj/item/stack/medical/attack(mob/living/M, mob/user) - if(M.stat == 2) + if(M.stat == DEAD) var/t_him = "it" if(M.gender == MALE) t_him = "him" diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index 5d87c4b38e..f1bb4c3772 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -21,6 +21,10 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \ new/datum/stack_recipe("swivel chair", /obj/structure/chair/office/dark, 5, one_per_turf = TRUE, on_floor = TRUE), \ new/datum/stack_recipe("comfy chair", /obj/structure/chair/comfy/beige, 2, one_per_turf = TRUE, on_floor = TRUE), \ new/datum/stack_recipe("bed", /obj/structure/bed, 2, one_per_turf = TRUE, on_floor = TRUE), \ + new /datum/stack_recipe("sofa (middle)", /obj/structure/chair/sofa, one_per_turf = TRUE, on_floor = TRUE), \ + new /datum/stack_recipe("sofa (left)", /obj/structure/chair/sofa/left, one_per_turf = TRUE, on_floor = TRUE), \ + new /datum/stack_recipe("sofa (right)", /obj/structure/chair/sofa/right, one_per_turf = TRUE, on_floor = TRUE), \ + new /datum/stack_recipe("sofa (corner)", /obj/structure/chair/sofa/corner, one_per_turf = TRUE, on_floor = TRUE), \ null, \ new/datum/stack_recipe("rack parts", /obj/item/rack_parts), \ new/datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = TRUE, on_floor = TRUE), \ @@ -421,4 +425,4 @@ new /datum/stack_recipe("paper frame door", /obj/structure/mineral_door/paperfra /obj/item/stack/sheet/paperframes/twenty amount = 20 /obj/item/stack/sheet/paperframes/fifty - amount = 50 \ No newline at end of file + amount = 50 diff --git a/code/game/objects/items/storage/boxes.dm.rej b/code/game/objects/items/storage/boxes.dm.rej deleted file mode 100644 index c7e13676db..0000000000 --- a/code/game/objects/items/storage/boxes.dm.rej +++ /dev/null @@ -1,9 +0,0 @@ -diff a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm (rejected hunks) -@@ -732,7 +732,6 @@ - /obj/item/storage/box/ingredients //This box is for the randomely chosen version the chef spawns with, it shouldn't actually exist. - name = "ingredients box" - illustration = "donk_kit" -- icon_state = null - - /obj/item/storage/box/ingredients/Initialize() - ..() diff --git a/code/game/objects/items/storage/firstaid.dm b/code/game/objects/items/storage/firstaid.dm index 8c7d0659bf..4b93fde13f 100644 --- a/code/game/objects/items/storage/firstaid.dm +++ b/code/game/objects/items/storage/firstaid.dm @@ -1,215 +1,217 @@ -/* First aid storage - * Contains: - * First Aid Kits - * Pill Bottles - * Dice Pack (in a pill bottle) - */ - -/* - * First Aid Kits - */ -/obj/item/storage/firstaid - name = "first-aid kit" - desc = "It's an emergency medical kit for those serious boo-boos." - icon_state = "firstaid" - lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' - righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' - throw_speed = 3 - throw_range = 7 - var/empty = 0 - -/obj/item/storage/firstaid/regular - icon_state = "firstaid" - desc = "A first aid kit with the ability to heal common types of injuries." - -/obj/item/storage/firstaid/regular/PopulateContents() - if(empty) - return - new /obj/item/stack/medical/gauze(src) - new /obj/item/stack/medical/bruise_pack(src) - new /obj/item/stack/medical/bruise_pack(src) - new /obj/item/stack/medical/ointment(src) - new /obj/item/stack/medical/ointment(src) - new /obj/item/reagent_containers/hypospray/medipen(src) - new /obj/item/device/healthanalyzer(src) - -/obj/item/storage/firstaid/ancient - icon_state = "firstaid" - desc = "A first aid kit with the ability to heal common types of injuries." - - -/obj/item/storage/firstaid/ancient/PopulateContents() - if(empty) - return - new /obj/item/stack/medical/gauze(src) - new /obj/item/stack/medical/bruise_pack(src) - new /obj/item/stack/medical/bruise_pack(src) - new /obj/item/stack/medical/bruise_pack(src) - new /obj/item/stack/medical/ointment(src) - new /obj/item/stack/medical/ointment(src) - new /obj/item/stack/medical/ointment(src) - -/obj/item/storage/firstaid/fire - name = "burn treatment kit" - desc = "A specialized medical kit for when the toxins lab -spontaneously- burns down." - icon_state = "ointment" - item_state = "firstaid-ointment" - -/obj/item/storage/firstaid/fire/Initialize(mapload) - ..() - icon_state = pick("ointment","firefirstaid") - -/obj/item/storage/firstaid/fire/PopulateContents() - if(empty) - return - for(var/i in 1 to 3) - new /obj/item/reagent_containers/pill/patch/silver_sulf(src) - new /obj/item/reagent_containers/pill/oxandrolone(src) - new /obj/item/reagent_containers/pill/oxandrolone(src) - new /obj/item/reagent_containers/hypospray/medipen(src) - new /obj/item/device/healthanalyzer(src) - -/obj/item/storage/firstaid/toxin - name = "toxin treatment kit" - desc = "Used to treat toxic blood content and radiation poisoning." - icon_state = "antitoxin" - item_state = "firstaid-toxin" - -/obj/item/storage/firstaid/toxin/Initialize(mapload) - . = ..() - icon_state = pick("antitoxin","antitoxfirstaid","antitoxfirstaid2","antitoxfirstaid3") - -/obj/item/storage/firstaid/toxin/PopulateContents() - if(empty) - return - for(var/i in 1 to 4) - new /obj/item/reagent_containers/syringe/charcoal(src) - for(var/i in 1 to 2) - new /obj/item/storage/pill_bottle/charcoal(src) - new /obj/item/device/healthanalyzer(src) - -/obj/item/storage/firstaid/o2 - name = "oxygen deprivation treatment kit" - desc = "A box full of oxygen goodies." - icon_state = "o2" - item_state = "firstaid-o2" - -/obj/item/storage/firstaid/o2/PopulateContents() - if(empty) - return - for(var/i in 1 to 4) - new /obj/item/reagent_containers/pill/salbutamol(src) - new /obj/item/reagent_containers/hypospray/medipen(src) - new /obj/item/reagent_containers/hypospray/medipen(src) - new /obj/item/device/healthanalyzer(src) - -/obj/item/storage/firstaid/brute - name = "brute trauma treatment kit" - desc = "A first aid kit for when you get toolboxed." - icon_state = "brute" - item_state = "firstaid-brute" - -/obj/item/storage/firstaid/brute/PopulateContents() - if(empty) - return - for(var/i in 1 to 4) - new /obj/item/reagent_containers/pill/patch/styptic(src) - new /obj/item/stack/medical/gauze(src) - new /obj/item/stack/medical/gauze(src) - new /obj/item/device/healthanalyzer(src) - -/obj/item/storage/firstaid/tactical - name = "combat medical kit" - desc = "I hope you've got insurance." - icon_state = "bezerk" - max_w_class = WEIGHT_CLASS_NORMAL - -/obj/item/storage/firstaid/tactical/PopulateContents() - if(empty) - return - new /obj/item/stack/medical/gauze(src) - new /obj/item/defibrillator/compact/combat/loaded(src) - new /obj/item/reagent_containers/hypospray/combat(src) - new /obj/item/reagent_containers/pill/patch/styptic(src) - new /obj/item/reagent_containers/pill/patch/silver_sulf(src) - new /obj/item/reagent_containers/syringe/lethal/choral(src) - new /obj/item/clothing/glasses/hud/health/night(src) - - -/* - * Pill Bottles - */ -/obj/item/storage/pill_bottle - name = "pill bottle" - desc = "It's an airtight container for storing medication." - icon_state = "pill_canister" - icon = 'icons/obj/chemical.dmi' - item_state = "contsolid" - w_class = WEIGHT_CLASS_SMALL - can_hold = list(/obj/item/reagent_containers/pill, /obj/item/dice) - allow_quick_gather = 1 - use_to_pickup = 1 - -/obj/item/storage/pill_bottle/MouseDrop(obj/over_object) //Quick pillbottle fix. -Agouri - - if(ishuman(usr) || ismonkey(usr)) //Can monkeys even place items in the pocket slots? Leaving this in just in case~ - var/mob/M = usr - if(!istype(over_object, /obj/screen) || !Adjacent(M)) - return ..() - if(!M.incapacitated() && istype(over_object, /obj/screen/inventory/hand)) - var/obj/screen/inventory/hand/H = over_object - if(M.putItemFromInventoryInHandIfPossible(src, H.held_index)) - add_fingerprint(usr) - if(over_object == usr && in_range(src, usr) || usr.contents.Find(src)) - if(usr.s_active) - usr.s_active.close(usr) - src.show_to(usr) - -/obj/item/storage/pill_bottle/charcoal - name = "bottle of charcoal pills" - desc = "Contains pills used to counter toxins." - -/obj/item/storage/pill_bottle/charcoal/PopulateContents() - for(var/i in 1 to 7) - new /obj/item/reagent_containers/pill/charcoal(src) - -/obj/item/storage/pill_bottle/epinephrine - name = "bottle of epinephrine pills" - desc = "Contains pills used to stabilize patients." - -/obj/item/storage/pill_bottle/epinephrine/PopulateContents() - for(var/i in 1 to 7) - new /obj/item/reagent_containers/pill/epinephrine(src) - -/obj/item/storage/pill_bottle/mutadone - name = "bottle of mutadone pills" - desc = "Contains pills used to treat genetic abnormalities." - -/obj/item/storage/pill_bottle/mutadone/PopulateContents() - for(var/i in 1 to 7) - new /obj/item/reagent_containers/pill/mutadone(src) - -/obj/item/storage/pill_bottle/mannitol - name = "bottle of mannitol pills" - desc = "Contains pills used to treat brain damage." - -/obj/item/storage/pill_bottle/mannitol/PopulateContents() - for(var/i in 1 to 7) - new /obj/item/reagent_containers/pill/mannitol(src) - -/obj/item/storage/pill_bottle/stimulant - name = "bottle of stimulant pills" - desc = "Guaranteed to give you that extra burst of energy during a long shift!" - -/obj/item/storage/pill_bottle/stimulant/PopulateContents() - for(var/i in 1 to 5) - new /obj/item/reagent_containers/pill/stimulant(src) - -/obj/item/storage/pill_bottle/mining - name = "bottle of patches" - desc = "Contains patches used to treat brute and burn damage." - -/obj/item/storage/pill_bottle/mining/PopulateContents() - new /obj/item/reagent_containers/pill/patch/silver_sulf(src) - for(var/i in 1 to 3) - new /obj/item/reagent_containers/pill/patch/styptic(src) +/* First aid storage + * Contains: + * First Aid Kits + * Pill Bottles + * Dice Pack (in a pill bottle) + */ + +/* + * First Aid Kits + */ +/obj/item/storage/firstaid + name = "first-aid kit" + desc = "It's an emergency medical kit for those serious boo-boos." + icon_state = "firstaid" + lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' + throw_speed = 3 + throw_range = 7 + var/empty = 0 + +/obj/item/storage/firstaid/regular + icon_state = "firstaid" + desc = "A first aid kit with the ability to heal common types of injuries." + +/obj/item/storage/firstaid/regular/PopulateContents() + if(empty) + return + new /obj/item/stack/medical/gauze(src) + new /obj/item/stack/medical/bruise_pack(src) + new /obj/item/stack/medical/bruise_pack(src) + new /obj/item/stack/medical/ointment(src) + new /obj/item/stack/medical/ointment(src) + new /obj/item/reagent_containers/hypospray/medipen(src) + new /obj/item/device/healthanalyzer(src) + +/obj/item/storage/firstaid/ancient + icon_state = "firstaid" + desc = "A first aid kit with the ability to heal common types of injuries." + + +/obj/item/storage/firstaid/ancient/PopulateContents() + if(empty) + return + new /obj/item/stack/medical/gauze(src) + new /obj/item/stack/medical/bruise_pack(src) + new /obj/item/stack/medical/bruise_pack(src) + new /obj/item/stack/medical/bruise_pack(src) + new /obj/item/stack/medical/ointment(src) + new /obj/item/stack/medical/ointment(src) + new /obj/item/stack/medical/ointment(src) + +/obj/item/storage/firstaid/fire + name = "burn treatment kit" + desc = "A specialized medical kit for when the toxins lab -spontaneously- burns down." + icon_state = "ointment" + item_state = "firstaid-ointment" + +/obj/item/storage/firstaid/fire/Initialize(mapload) + ..() + icon_state = pick("ointment","firefirstaid") + +/obj/item/storage/firstaid/fire/PopulateContents() + if(empty) + return + for(var/i in 1 to 3) + new /obj/item/reagent_containers/pill/patch/silver_sulf(src) + new /obj/item/reagent_containers/pill/oxandrolone(src) + new /obj/item/reagent_containers/pill/oxandrolone(src) + new /obj/item/reagent_containers/hypospray/medipen(src) + new /obj/item/device/healthanalyzer(src) + +/obj/item/storage/firstaid/toxin + name = "toxin treatment kit" + desc = "Used to treat toxic blood content and radiation poisoning." + icon_state = "antitoxin" + item_state = "firstaid-toxin" + +/obj/item/storage/firstaid/toxin/Initialize(mapload) + . = ..() + icon_state = pick("antitoxin","antitoxfirstaid","antitoxfirstaid2","antitoxfirstaid3") + +/obj/item/storage/firstaid/toxin/PopulateContents() + if(empty) + return + for(var/i in 1 to 4) + new /obj/item/reagent_containers/syringe/charcoal(src) + for(var/i in 1 to 2) + new /obj/item/storage/pill_bottle/charcoal(src) + new /obj/item/device/healthanalyzer(src) + +/obj/item/storage/firstaid/o2 + name = "oxygen deprivation treatment kit" + desc = "A box full of oxygen goodies." + icon_state = "o2" + item_state = "firstaid-o2" + +/obj/item/storage/firstaid/o2/PopulateContents() + if(empty) + return + for(var/i in 1 to 4) + new /obj/item/reagent_containers/pill/salbutamol(src) + new /obj/item/reagent_containers/hypospray/medipen(src) + new /obj/item/reagent_containers/hypospray/medipen(src) + new /obj/item/device/healthanalyzer(src) + +/obj/item/storage/firstaid/brute + name = "brute trauma treatment kit" + desc = "A first aid kit for when you get toolboxed." + icon_state = "brute" + item_state = "firstaid-brute" + +/obj/item/storage/firstaid/brute/PopulateContents() + if(empty) + return + for(var/i in 1 to 4) + new /obj/item/reagent_containers/pill/patch/styptic(src) + new /obj/item/stack/medical/gauze(src) + new /obj/item/stack/medical/gauze(src) + new /obj/item/device/healthanalyzer(src) + +/obj/item/storage/firstaid/tactical + name = "combat medical kit" + desc = "I hope you've got insurance." + icon_state = "bezerk" + max_w_class = WEIGHT_CLASS_NORMAL + +/obj/item/storage/firstaid/tactical/PopulateContents() + if(empty) + return + new /obj/item/stack/medical/gauze(src) + new /obj/item/defibrillator/compact/combat/loaded(src) + new /obj/item/reagent_containers/hypospray/combat(src) + new /obj/item/reagent_containers/pill/patch/styptic(src) + new /obj/item/reagent_containers/pill/patch/silver_sulf(src) + new /obj/item/reagent_containers/syringe/lethal/choral(src) + new /obj/item/clothing/glasses/hud/health/night(src) + + +/* + * Pill Bottles + */ +/obj/item/storage/pill_bottle + name = "pill bottle" + desc = "It's an airtight container for storing medication." + icon_state = "pill_canister" + icon = 'icons/obj/chemical.dmi' + item_state = "contsolid" + lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' + w_class = WEIGHT_CLASS_SMALL + can_hold = list(/obj/item/reagent_containers/pill, /obj/item/dice) + allow_quick_gather = 1 + use_to_pickup = 1 + +/obj/item/storage/pill_bottle/MouseDrop(obj/over_object) //Quick pillbottle fix. -Agouri + + if(ishuman(usr) || ismonkey(usr)) //Can monkeys even place items in the pocket slots? Leaving this in just in case~ + var/mob/M = usr + if(!istype(over_object, /obj/screen) || !Adjacent(M)) + return ..() + if(!M.incapacitated() && istype(over_object, /obj/screen/inventory/hand)) + var/obj/screen/inventory/hand/H = over_object + if(M.putItemFromInventoryInHandIfPossible(src, H.held_index)) + add_fingerprint(usr) + if(over_object == usr && in_range(src, usr) || usr.contents.Find(src)) + if(usr.s_active) + usr.s_active.close(usr) + src.show_to(usr) + +/obj/item/storage/pill_bottle/charcoal + name = "bottle of charcoal pills" + desc = "Contains pills used to counter toxins." + +/obj/item/storage/pill_bottle/charcoal/PopulateContents() + for(var/i in 1 to 7) + new /obj/item/reagent_containers/pill/charcoal(src) + +/obj/item/storage/pill_bottle/epinephrine + name = "bottle of epinephrine pills" + desc = "Contains pills used to stabilize patients." + +/obj/item/storage/pill_bottle/epinephrine/PopulateContents() + for(var/i in 1 to 7) + new /obj/item/reagent_containers/pill/epinephrine(src) + +/obj/item/storage/pill_bottle/mutadone + name = "bottle of mutadone pills" + desc = "Contains pills used to treat genetic abnormalities." + +/obj/item/storage/pill_bottle/mutadone/PopulateContents() + for(var/i in 1 to 7) + new /obj/item/reagent_containers/pill/mutadone(src) + +/obj/item/storage/pill_bottle/mannitol + name = "bottle of mannitol pills" + desc = "Contains pills used to treat brain damage." + +/obj/item/storage/pill_bottle/mannitol/PopulateContents() + for(var/i in 1 to 7) + new /obj/item/reagent_containers/pill/mannitol(src) + +/obj/item/storage/pill_bottle/stimulant + name = "bottle of stimulant pills" + desc = "Guaranteed to give you that extra burst of energy during a long shift!" + +/obj/item/storage/pill_bottle/stimulant/PopulateContents() + for(var/i in 1 to 5) + new /obj/item/reagent_containers/pill/stimulant(src) + +/obj/item/storage/pill_bottle/mining + name = "bottle of patches" + desc = "Contains patches used to treat brute and burn damage." + +/obj/item/storage/pill_bottle/mining/PopulateContents() + new /obj/item/reagent_containers/pill/patch/silver_sulf(src) + for(var/i in 1 to 3) + new /obj/item/reagent_containers/pill/patch/styptic(src) diff --git a/code/game/objects/items/teleportation.dm b/code/game/objects/items/teleportation.dm index 1b012468c8..bc1a4aa321 100644 --- a/code/game/objects/items/teleportation.dm +++ b/code/game/objects/items/teleportation.dm @@ -89,7 +89,7 @@ Frequency: continue else var/mob/M = W.loc - if (M.stat == 2) + if (M.stat == DEAD) if (M.timeofdeath + 6000 < world.time) continue diff --git a/code/game/objects/items/tools.dm b/code/game/objects/items/tools.dm index 23f68ca93c..8bfc90decb 100644 --- a/code/game/objects/items/tools.dm +++ b/code/game/objects/items/tools.dm @@ -1,790 +1,790 @@ -#define WELDER_FUEL_BURN_INTERVAL 13 - -/* Tools! - * Note: Multitools are /obj/item/device - * - * Contains: - * Wrench - * Screwdriver - * Wirecutters - * Welding Tool - * Crowbar - */ - -/* - * Wrench - */ -/obj/item/wrench - name = "wrench" - desc = "A wrench with common uses. Can be found in your hand." - icon = 'icons/obj/tools.dmi' - icon_state = "wrench" - lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' - righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' - flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT - force = 5 - throwforce = 7 - w_class = WEIGHT_CLASS_SMALL - usesound = 'sound/items/ratchet.ogg' - materials = list(MAT_METAL=150) - origin_tech = "materials=1;engineering=1" - attack_verb = list("bashed", "battered", "bludgeoned", "whacked") - toolspeed = 1 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30) - -/obj/item/wrench/suicide_act(mob/user) - user.visible_message("[user] is beating [user.p_them()]self to death with [src]! It looks like [user.p_theyre()] trying to commit suicide!") - playsound(loc, 'sound/weapons/genhit.ogg', 50, 1, -1) - return (BRUTELOSS) - -/obj/item/wrench/cyborg - name = "automatic wrench" - desc = "An advanced robotic wrench. Can be found in construction cyborgs." - toolspeed = 0.5 - -/obj/item/wrench/brass - name = "brass wrench" - desc = "A brass wrench. It's faintly warm to the touch." - resistance_flags = FIRE_PROOF | ACID_PROOF - icon_state = "wrench_brass" - toolspeed = 0.5 - -/obj/item/wrench/abductor - name = "alien wrench" - desc = "A polarized wrench. It causes anything placed between the jaws to turn." - icon = 'icons/obj/abductor.dmi' - icon_state = "wrench" - usesound = 'sound/effects/empulse.ogg' - toolspeed = 0.1 - origin_tech = "materials=5;engineering=5;abductor=3" - -/obj/item/wrench/power - name = "hand drill" - desc = "A simple powered hand drill. It's fitted with a bolt bit." - icon_state = "drill_bolt" - item_state = "drill" - lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' - righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' - usesound = 'sound/items/drill_use.ogg' - materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25) - origin_tech = "materials=2;engineering=2" //done for balance reasons, making them high value for research, but harder to get - force = 8 //might or might not be too high, subject to change - w_class = WEIGHT_CLASS_SMALL - throwforce = 8 - attack_verb = list("drilled", "screwed", "jabbed") - toolspeed = 0.25 - -/obj/item/wrench/power/attack_self(mob/user) - playsound(get_turf(user),'sound/items/change_drill.ogg',50,1) - var/obj/item/wirecutters/power/s_drill = new /obj/item/screwdriver/power - to_chat(user, "You attach the screw driver bit to [src].") - qdel(src) - user.put_in_active_hand(s_drill) - -/obj/item/wrench/power/suicide_act(mob/user) - user.visible_message("[user] is pressing [src] against [user.p_their()] head! It looks like [user.p_theyre()] trying to commit suicide!") - return (BRUTELOSS) - -/obj/item/wrench/medical - name = "medical wrench" - desc = "A medical wrench with common(medical?) uses. Can be found in your hand." - icon_state = "wrench_medical" - force = 2 //MEDICAL - throwforce = 4 - origin_tech = "materials=1;engineering=1;biotech=3" - attack_verb = list("wrenched", "medicaled", "tapped", "jabbed", "whacked") - -/obj/item/wrench/medical/suicide_act(mob/living/user) - user.visible_message("[user] is praying to the medical wrench to take [user.p_their()] soul. It looks like [user.p_theyre()] trying to commit suicide!") - // TODO Make them glow with the power of the M E D I C A L W R E N C H - // during their ascension - - // Stun stops them from wandering off - user.Stun(100, ignore_canstun = TRUE) - playsound(loc, 'sound/effects/pray.ogg', 50, 1, -1) - - // Let the sound effect finish playing - sleep(20) - - if(!user) - return - - for(var/obj/item/W in user) - user.dropItemToGround(W) - - var/obj/item/wrench/medical/W = new /obj/item/wrench/medical(loc) - W.add_fingerprint(user) - W.desc += " For some reason, it reminds you of [user.name]." - - if(!user) - return - - user.dust() - - return OXYLOSS - -/* - * Screwdriver - */ -/obj/item/screwdriver - name = "screwdriver" - desc = "You can be totally screwy with this." - icon = 'icons/obj/tools.dmi' - icon_state = "screwdriver" - item_state = "screwdriver" - lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' - righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' - flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT - force = 5 - w_class = WEIGHT_CLASS_TINY - throwforce = 5 - throw_speed = 3 - throw_range = 5 - materials = list(MAT_METAL=75) - attack_verb = list("stabbed") - hitsound = 'sound/weapons/bladeslice.ogg' - usesound = 'sound/items/screwdriver.ogg' - toolspeed = 1 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30) - var/random_color = TRUE //if the screwdriver uses random coloring - var/static/list/screwdriver_colors = list(\ - "blue" = rgb(24, 97, 213), \ - "red" = rgb(149, 23, 16), \ - "pink" = rgb(213, 24, 141), \ - "brown" = rgb(160, 82, 18), \ - "green" = rgb(14, 127, 27), \ - "cyan" = rgb(24, 162, 213), \ - "yellow" = rgb(213, 140, 24), \ - ) - -/obj/item/screwdriver/suicide_act(mob/user) - user.visible_message("[user] is stabbing [src] into [user.p_their()] [pick("temple", "heart")]! It looks like [user.p_theyre()] trying to commit suicide!") - return(BRUTELOSS) - -/obj/item/screwdriver/Initialize() - . = ..() - if(random_color) //random colors! - var/our_color = pick(screwdriver_colors) - add_atom_colour(screwdriver_colors[our_color], FIXED_COLOUR_PRIORITY) - update_icon() - if(prob(75)) - pixel_y = rand(0, 16) - -/obj/item/screwdriver/update_icon() - if(!random_color) //icon override - return - cut_overlays() - var/mutable_appearance/base_overlay = mutable_appearance(icon, "screwdriver_screwybits") - base_overlay.appearance_flags = RESET_COLOR - add_overlay(base_overlay) - -/obj/item/screwdriver/worn_overlays(isinhands = FALSE, icon_file) - . = list() - if(isinhands && random_color) - var/mutable_appearance/M = mutable_appearance(icon_file, "screwdriver_head") - M.appearance_flags = RESET_COLOR - . += M - -/obj/item/screwdriver/get_belt_overlay() - if(random_color) - var/mutable_appearance/body = mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "screwdriver") - var/mutable_appearance/head = mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "screwdriver_head") - body.color = color - head.overlays += body - return head - else - return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', icon_state) - -/obj/item/screwdriver/attack(mob/living/carbon/M, mob/living/carbon/user) - if(!istype(M)) - return ..() - if(user.zone_selected != "eyes" && user.zone_selected != "head") - return ..() - if(user.disabilities & CLUMSY && prob(50)) - M = user - return eyestab(M,user) - -/obj/item/screwdriver/brass - name = "brass screwdriver" - desc = "A screwdriver made of brass. The handle feels freezing cold." - resistance_flags = FIRE_PROOF | ACID_PROOF - icon_state = "screwdriver_brass" - item_state = "screwdriver_brass" - toolspeed = 0.5 - random_color = FALSE - -/obj/item/screwdriver/abductor - name = "alien screwdriver" - desc = "An ultrasonic screwdriver." - icon = 'icons/obj/abductor.dmi' - icon_state = "screwdriver_a" - item_state = "screwdriver_nuke" - usesound = 'sound/items/pshoom.ogg' - toolspeed = 0.1 - random_color = FALSE - -/obj/item/screwdriver/power - name = "hand drill" - desc = "A simple powered hand drill. It's fitted with a screw bit." - icon_state = "drill_screw" - item_state = "drill" - lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' - righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' - materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25) - origin_tech = "materials=2;engineering=2" //done for balance reasons, making them high value for research, but harder to get - force = 8 //might or might not be too high, subject to change - w_class = WEIGHT_CLASS_SMALL - throwforce = 8 - throw_speed = 2 - throw_range = 3//it's heavier than a screw driver/wrench, so it does more damage, but can't be thrown as far - attack_verb = list("drilled", "screwed", "jabbed","whacked") - hitsound = 'sound/items/drill_hit.ogg' - usesound = 'sound/items/drill_use.ogg' - toolspeed = 0.25 - random_color = FALSE - -/obj/item/screwdriver/power/suicide_act(mob/user) - user.visible_message("[user] is putting [src] to [user.p_their()] temple. It looks like [user.p_theyre()] trying to commit suicide!") - return(BRUTELOSS) - -/obj/item/screwdriver/power/attack_self(mob/user) - playsound(get_turf(user),'sound/items/change_drill.ogg',50,1) - var/obj/item/wrench/power/b_drill = new /obj/item/wrench/power - to_chat(user, "You attach the bolt driver bit to [src].") - qdel(src) - user.put_in_active_hand(b_drill) - -/obj/item/screwdriver/cyborg - name = "powered screwdriver" - desc = "An electrical screwdriver, designed to be both precise and quick." - usesound = 'sound/items/drill_use.ogg' - toolspeed = 0.5 - -/* - * Wirecutters - */ -/obj/item/wirecutters - name = "wirecutters" - desc = "This cuts wires." - icon = 'icons/obj/tools.dmi' - icon_state = null - lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' - righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' - flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT - force = 6 - throw_speed = 3 - throw_range = 7 - w_class = WEIGHT_CLASS_SMALL - materials = list(MAT_METAL=80) - attack_verb = list("pinched", "nipped") - hitsound = 'sound/items/wirecutter.ogg' - usesound = 'sound/items/wirecutter.ogg' - origin_tech = "materials=1;engineering=1" - toolspeed = 1 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30) - - -/obj/item/wirecutters/New(loc, var/param_color = null) - ..() - if(!icon_state) - if(!param_color) - param_color = pick("yellow","red") - icon_state = "cutters_[param_color]" - -/obj/item/wirecutters/attack(mob/living/carbon/C, mob/user) - if(istype(C) && C.handcuffed && istype(C.handcuffed, /obj/item/restraints/handcuffs/cable)) - user.visible_message("[user] cuts [C]'s restraints with [src]!") - qdel(C.handcuffed) - C.handcuffed = null - if(C.buckled && C.buckled.buckle_requires_restraints) - C.buckled.unbuckle_mob(C) - C.update_handcuffed() - return - else - ..() - -/obj/item/wirecutters/suicide_act(mob/user) - user.visible_message("[user] is cutting at [user.p_their()] arteries with [src]! It looks like [user.p_theyre()] trying to commit suicide!") - playsound(loc, usesound, 50, 1, -1) - return (BRUTELOSS) - -/obj/item/wirecutters/brass - name = "brass wirecutters" - desc = "A pair of wirecutters made of brass. The handle feels freezing cold to the touch." - resistance_flags = FIRE_PROOF | ACID_PROOF - icon_state = "cutters_brass" - toolspeed = 0.5 - -/obj/item/wirecutters/abductor - name = "alien wirecutters" - desc = "Extremely sharp wirecutters, made out of a silvery-green metal." - icon = 'icons/obj/abductor.dmi' - icon_state = "cutters" - toolspeed = 0.1 - origin_tech = "materials=5;engineering=4;abductor=3" - -/obj/item/wirecutters/cyborg - name = "wirecutters" - desc = "This cuts wires." - toolspeed = 0.5 - -/obj/item/wirecutters/power - name = "jaws of life" - desc = "A set of jaws of life, compressed through the magic of science. It's fitted with a cutting head." - icon_state = "jaws_cutter" - item_state = "jawsoflife" - origin_tech = "materials=2;engineering=2" - materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25) - usesound = 'sound/items/jaws_cut.ogg' - toolspeed = 0.25 - -/obj/item/wirecutters/power/suicide_act(mob/user) - user.visible_message("[user] is wrapping \the [src] around [user.p_their()] neck. It looks like [user.p_theyre()] trying to rip [user.p_their()] head off!") - playsound(loc, 'sound/items/jaws_cut.ogg', 50, 1, -1) - if(iscarbon(user)) - var/mob/living/carbon/C = user - var/obj/item/bodypart/BP = C.get_bodypart("head") - if(BP) - BP.drop_limb() - playsound(loc,pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg') ,50, 1, -1) - return (BRUTELOSS) - -/obj/item/wirecutters/power/attack_self(mob/user) - playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1) - var/obj/item/crowbar/power/pryjaws = new /obj/item/crowbar/power - to_chat(user, "You attach the pry jaws to [src].") - qdel(src) - user.put_in_active_hand(pryjaws) -/* - * Welding Tool - */ -/obj/item/weldingtool - name = "welding tool" - desc = "A standard edition welder provided by NanoTrasen." - icon = 'icons/obj/tools.dmi' - icon_state = "welder" - item_state = "welder" - lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' - righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' - flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT - force = 3 - throwforce = 5 - hitsound = "swing_hit" - usesound = 'sound/items/welder.ogg' - var/acti_sound = 'sound/items/welderactivate.ogg' - var/deac_sound = 'sound/items/welderdeactivate.ogg' - throw_speed = 3 - throw_range = 5 - w_class = WEIGHT_CLASS_SMALL - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 30) - resistance_flags = FIRE_PROOF - - materials = list(MAT_METAL=70, MAT_GLASS=30) - origin_tech = "engineering=1;plasmatech=1" - var/welding = 0 //Whether or not the welding tool is off(0), on(1) or currently welding(2) - var/status = TRUE //Whether the welder is secured or unsecured (able to attach rods to it to make a flamethrower) - var/max_fuel = 20 //The max amount of fuel the welder can hold - var/change_icons = 1 - var/can_off_process = 0 - var/light_intensity = 2 //how powerful the emitted light is when used. - var/burned_fuel_for = 0 //when fuel was last removed - heat = 3800 - toolspeed = 1 - -/obj/item/weldingtool/Initialize() - . = ..() - create_reagents(max_fuel) - reagents.add_reagent("welding_fuel", max_fuel) - update_icon() - - -/obj/item/weldingtool/proc/update_torch() - if(welding) - add_overlay("[initial(icon_state)]-on") - item_state = "[initial(item_state)]1" - else - item_state = "[initial(item_state)]" - - -/obj/item/weldingtool/update_icon() - cut_overlays() - if(change_icons) - var/ratio = get_fuel() / max_fuel - ratio = Ceiling(ratio*4) * 25 - add_overlay("[initial(icon_state)][ratio]") - update_torch() - return - - -/obj/item/weldingtool/process() - switch(welding) - if(0) - force = 3 - damtype = "brute" - update_icon() - if(!can_off_process) - STOP_PROCESSING(SSobj, src) - return - //Welders left on now use up fuel, but lets not have them run out quite that fast - if(1) - force = 15 - damtype = "fire" - ++burned_fuel_for - if(burned_fuel_for >= WELDER_FUEL_BURN_INTERVAL) - remove_fuel(1) - update_icon() - - //This is to start fires. process() is only called if the welder is on. - open_flame() - - -/obj/item/weldingtool/suicide_act(mob/user) - user.visible_message("[user] welds [user.p_their()] every orifice closed! It looks like [user.p_theyre()] trying to commit suicide!") - return (FIRELOSS) - - -/obj/item/weldingtool/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/screwdriver)) - flamethrower_screwdriver(I, user) - else if(istype(I, /obj/item/stack/rods)) - flamethrower_rods(I, user) - else - return ..() - - -/obj/item/weldingtool/attack(mob/living/carbon/human/H, mob/user) - if(!istype(H)) - return ..() - - var/obj/item/bodypart/affecting = H.get_bodypart(check_zone(user.zone_selected)) - - if(affecting && affecting.status == BODYPART_ROBOTIC && user.a_intent != INTENT_HARM) - if(src.remove_fuel(1)) - playsound(loc, usesound, 50, 1) - if(user == H) - user.visible_message("[user] starts to fix some of the dents on [H]'s [affecting.name].", "You start fixing some of the dents on [H]'s [affecting.name].") - if(!do_mob(user, H, 50)) - return - item_heal_robotic(H, user, 15, 0) - else - return ..() - - -/obj/item/weldingtool/afterattack(atom/O, mob/user, proximity) - if(!proximity) return - - if(welding) - remove_fuel(1) - var/turf/location = get_turf(user) - location.hotspot_expose(700, 50, 1) - if(get_fuel() <= 0) - set_light(0) - - if(isliving(O)) - var/mob/living/L = O - if(L.IgniteMob()) - message_admins("[key_name_admin(user)] set [key_name_admin(L)] on fire") - log_game("[key_name(user)] set [key_name(L)] on fire") - - -/obj/item/weldingtool/attack_self(mob/user) - switched_on(user) - if(welding) - set_light(light_intensity) - - update_icon() - - -//Returns the amount of fuel in the welder -/obj/item/weldingtool/proc/get_fuel() - return reagents.get_reagent_amount("welding_fuel") - - -//Removes fuel from the welding tool. If a mob is passed, it will try to flash the mob's eyes. This should probably be renamed to use() -/obj/item/weldingtool/proc/remove_fuel(amount = 1, mob/living/M = null) - if(!welding || !check_fuel()) - return 0 - if(amount) - burned_fuel_for = 0 - if(get_fuel() >= amount) - reagents.remove_reagent("welding_fuel", amount) - check_fuel() - if(M) - M.flash_act(light_intensity) - return TRUE - else - if(M) - to_chat(M, "You need more welding fuel to complete this task!") - return FALSE - - -//Turns off the welder if there is no more fuel (does this really need to be its own proc?) -/obj/item/weldingtool/proc/check_fuel(mob/user) - if(get_fuel() <= 0 && welding) - switched_on(user) - update_icon() - //mob icon update - if(ismob(loc)) - var/mob/M = loc - M.update_inv_hands(0) - - return 0 - return 1 - -//Switches the welder on -/obj/item/weldingtool/proc/switched_on(mob/user) - if(!status) - to_chat(user, "[src] can't be turned on while unsecured!") - return - welding = !welding - if(welding) - if(get_fuel() >= 1) - to_chat(user, "You switch [src] on.") - playsound(loc, acti_sound, 50, 1) - force = 15 - damtype = "fire" - hitsound = 'sound/items/welder.ogg' - update_icon() - START_PROCESSING(SSobj, src) - else - to_chat(user, "You need more fuel!") - switched_off(user) - else - to_chat(user, "You switch [src] off.") - playsound(loc, deac_sound, 50, 1) - switched_off(user) - -//Switches the welder off -/obj/item/weldingtool/proc/switched_off(mob/user) - welding = 0 - set_light(0) - - force = 3 - damtype = "brute" - hitsound = "swing_hit" - update_icon() - - -/obj/item/weldingtool/examine(mob/user) - ..() - to_chat(user, "It contains [get_fuel()] unit\s of fuel out of [max_fuel].") - -/obj/item/weldingtool/is_hot() - return welding * heat - -//Returns whether or not the welding tool is currently on. -/obj/item/weldingtool/proc/isOn() - return welding - - -/obj/item/weldingtool/proc/flamethrower_screwdriver(obj/item/I, mob/user) - if(welding) - to_chat(user, "Turn it off first!") - return - status = !status - if(status) - to_chat(user, "You resecure [src].") - else - to_chat(user, "[src] can now be attached and modified.") - add_fingerprint(user) - -/obj/item/weldingtool/proc/flamethrower_rods(obj/item/I, mob/user) - if(!status) - var/obj/item/stack/rods/R = I - if (R.use(1)) - var/obj/item/flamethrower/F = new /obj/item/flamethrower(user.loc) - if(!remove_item_from_storage(F)) - user.transferItemToLoc(src, F, TRUE) - F.weldtool = src - add_fingerprint(user) - to_chat(user, "You add a rod to a welder, starting to build a flamethrower.") - user.put_in_hands(F) - else - to_chat(user, "You need one rod to start building a flamethrower!") - -/obj/item/weldingtool/ignition_effect(atom/A, mob/user) - if(welding && remove_fuel(1, user)) - . = "[user] casually lights [A] with [src], what a badass." - else - . = "" - -/obj/item/weldingtool/largetank - name = "industrial welding tool" - desc = "A slightly larger welder with a larger tank." - icon_state = "indwelder" - max_fuel = 40 - materials = list(MAT_GLASS=60) - origin_tech = "engineering=2;plasmatech=2" - -/obj/item/weldingtool/largetank/cyborg - name = "integrated welding tool" - desc = "An advanced welder designed to be used in robotic systems." - toolspeed = 0.5 - -/obj/item/weldingtool/largetank/flamethrower_screwdriver() - return - - -/obj/item/weldingtool/mini - name = "emergency welding tool" - desc = "A miniature welder used during emergencies." - icon_state = "miniwelder" - max_fuel = 10 - w_class = WEIGHT_CLASS_TINY - materials = list(MAT_METAL=30, MAT_GLASS=10) - change_icons = 0 - -/obj/item/weldingtool/mini/flamethrower_screwdriver() - return - -/obj/item/weldingtool/abductor - name = "alien welding tool" - desc = "An alien welding tool. Whatever fuel it uses, it never runs out." - icon = 'icons/obj/abductor.dmi' - icon_state = "welder" - toolspeed = 0.1 - light_intensity = 0 - change_icons = 0 - origin_tech = "plasmatech=5;engineering=5;abductor=3" - -/obj/item/weldingtool/abductor/process() - if(get_fuel() <= max_fuel) - reagents.add_reagent("welding_fuel", 1) - ..() - -/obj/item/weldingtool/hugetank - name = "upgraded industrial welding tool" - desc = "An upgraded welder based of the industrial welder." - icon_state = "upindwelder" - item_state = "upindwelder" - max_fuel = 80 - materials = list(MAT_METAL=70, MAT_GLASS=120) - origin_tech = "engineering=3;plasmatech=2" - -/obj/item/weldingtool/experimental - name = "experimental welding tool" - desc = "An experimental welder capable of self-fuel generation and less harmful to the eyes." - icon_state = "exwelder" - item_state = "exwelder" - max_fuel = 40 - materials = list(MAT_METAL=70, MAT_GLASS=120) - origin_tech = "materials=4;engineering=4;bluespace=3;plasmatech=4" - var/last_gen = 0 - change_icons = 0 - can_off_process = 1 - light_intensity = 1 - toolspeed = 0.5 - var/nextrefueltick = 0 - -/obj/item/weldingtool/experimental/brass - name = "brass welding tool" - desc = "A brass welder that seems to constantly refuel itself. It is faintly warm to the touch." - resistance_flags = FIRE_PROOF | ACID_PROOF - icon_state = "brasswelder" - item_state = "brasswelder" - - -/obj/item/weldingtool/experimental/process() - ..() - if(get_fuel() < max_fuel && nextrefueltick < world.time) - nextrefueltick = world.time + 10 - reagents.add_reagent("welding_fuel", 1) - - -/* - * Crowbar - */ - -/obj/item/crowbar - name = "pocket crowbar" - desc = "A small crowbar. This handy tool is useful for lots of things, such as prying floor tiles or opening unpowered doors." - icon = 'icons/obj/tools.dmi' - icon_state = "crowbar" - lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' - righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' - usesound = 'sound/items/crowbar.ogg' - flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT - force = 5 - throwforce = 7 - w_class = WEIGHT_CLASS_SMALL - materials = list(MAT_METAL=50) - origin_tech = "engineering=1;combat=1" - attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked") - toolspeed = 1 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30) - -/obj/item/crowbar/suicide_act(mob/user) - user.visible_message("[user] is beating [user.p_them()]self to death with [src]! It looks like [user.p_theyre()] trying to commit suicide!") - playsound(loc, 'sound/weapons/genhit.ogg', 50, 1, -1) - return (BRUTELOSS) - -/obj/item/crowbar/red - icon_state = "crowbar_red" - force = 8 - -/obj/item/crowbar/brass - name = "brass crowbar" - desc = "A brass crowbar. It feels faintly warm to the touch." - resistance_flags = FIRE_PROOF | ACID_PROOF - icon_state = "crowbar_brass" - toolspeed = 0.5 - -/obj/item/crowbar/abductor - name = "alien crowbar" - desc = "A hard-light crowbar. It appears to pry by itself, without any effort required." - icon = 'icons/obj/abductor.dmi' - usesound = 'sound/weapons/sonic_jackhammer.ogg' - icon_state = "crowbar" - toolspeed = 0.1 - origin_tech = "combat=4;engineering=4;abductor=3" - -/obj/item/crowbar/large - name = "crowbar" - desc = "It's a big crowbar. It doesn't fit in your pockets, because it's big." - force = 12 - w_class = WEIGHT_CLASS_NORMAL - throw_speed = 3 - throw_range = 3 - materials = list(MAT_METAL=70) - icon_state = "crowbar_large" - item_state = "crowbar" - toolspeed = 0.5 - -/obj/item/crowbar/cyborg - name = "hydraulic crowbar" - desc = "A hydraulic prying tool, compact but powerful. Designed to replace crowbar in construction cyborgs." - usesound = 'sound/items/jaws_pry.ogg' - force = 10 - toolspeed = 0.5 - -/obj/item/crowbar/power - name = "jaws of life" - desc = "A set of jaws of life, compressed through the magic of science. It's fitted with a prying head." - icon_state = "jaws_pry" - item_state = "jawsoflife" - lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' - righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' - materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25) - origin_tech = "materials=2;engineering=2" - usesound = 'sound/items/jaws_pry.ogg' - force = 15 - toolspeed = 0.25 - -/obj/item/crowbar/power/suicide_act(mob/user) - user.visible_message("[user] is putting [user.p_their()] head in [src], it looks like [user.p_theyre()] trying to commit suicide!") - playsound(loc, 'sound/items/jaws_pry.ogg', 50, 1, -1) - return (BRUTELOSS) - -/obj/item/crowbar/power/attack_self(mob/user) - playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1) - var/obj/item/wirecutters/power/cutjaws = new /obj/item/wirecutters/power - to_chat(user, "You attach the cutting jaws to [src].") - qdel(src) - user.put_in_active_hand(cutjaws) - -#undef WELDER_FUEL_BURN_INTERVAL +#define WELDER_FUEL_BURN_INTERVAL 13 + +/* Tools! + * Note: Multitools are /obj/item/device + * + * Contains: + * Wrench + * Screwdriver + * Wirecutters + * Welding Tool + * Crowbar + */ + +/* + * Wrench + */ +/obj/item/wrench + name = "wrench" + desc = "A wrench with common uses. Can be found in your hand." + icon = 'icons/obj/tools.dmi' + icon_state = "wrench" + lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' + flags_1 = CONDUCT_1 + slot_flags = SLOT_BELT + force = 5 + throwforce = 7 + w_class = WEIGHT_CLASS_SMALL + usesound = 'sound/items/ratchet.ogg' + materials = list(MAT_METAL=150) + origin_tech = "materials=1;engineering=1" + attack_verb = list("bashed", "battered", "bludgeoned", "whacked") + toolspeed = 1 + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30) + +/obj/item/wrench/suicide_act(mob/user) + user.visible_message("[user] is beating [user.p_them()]self to death with [src]! It looks like [user.p_theyre()] trying to commit suicide!") + playsound(loc, 'sound/weapons/genhit.ogg', 50, 1, -1) + return (BRUTELOSS) + +/obj/item/wrench/cyborg + name = "automatic wrench" + desc = "An advanced robotic wrench. Can be found in construction cyborgs." + toolspeed = 0.5 + +/obj/item/wrench/brass + name = "brass wrench" + desc = "A brass wrench. It's faintly warm to the touch." + resistance_flags = FIRE_PROOF | ACID_PROOF + icon_state = "wrench_brass" + toolspeed = 0.5 + +/obj/item/wrench/abductor + name = "alien wrench" + desc = "A polarized wrench. It causes anything placed between the jaws to turn." + icon = 'icons/obj/abductor.dmi' + icon_state = "wrench" + usesound = 'sound/effects/empulse.ogg' + toolspeed = 0.1 + origin_tech = "materials=5;engineering=5;abductor=3" + +/obj/item/wrench/power + name = "hand drill" + desc = "A simple powered hand drill. It's fitted with a bolt bit." + icon_state = "drill_bolt" + item_state = "drill" + lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' + usesound = 'sound/items/drill_use.ogg' + materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25) + origin_tech = "materials=2;engineering=2" //done for balance reasons, making them high value for research, but harder to get + force = 8 //might or might not be too high, subject to change + w_class = WEIGHT_CLASS_SMALL + throwforce = 8 + attack_verb = list("drilled", "screwed", "jabbed") + toolspeed = 0.25 + +/obj/item/wrench/power/attack_self(mob/user) + playsound(get_turf(user),'sound/items/change_drill.ogg',50,1) + var/obj/item/wirecutters/power/s_drill = new /obj/item/screwdriver/power + to_chat(user, "You attach the screw driver bit to [src].") + qdel(src) + user.put_in_active_hand(s_drill) + +/obj/item/wrench/power/suicide_act(mob/user) + user.visible_message("[user] is pressing [src] against [user.p_their()] head! It looks like [user.p_theyre()] trying to commit suicide!") + return (BRUTELOSS) + +/obj/item/wrench/medical + name = "medical wrench" + desc = "A medical wrench with common(medical?) uses. Can be found in your hand." + icon_state = "wrench_medical" + force = 2 //MEDICAL + throwforce = 4 + origin_tech = "materials=1;engineering=1;biotech=3" + attack_verb = list("wrenched", "medicaled", "tapped", "jabbed", "whacked") + +/obj/item/wrench/medical/suicide_act(mob/living/user) + user.visible_message("[user] is praying to the medical wrench to take [user.p_their()] soul. It looks like [user.p_theyre()] trying to commit suicide!") + // TODO Make them glow with the power of the M E D I C A L W R E N C H + // during their ascension + + // Stun stops them from wandering off + user.Stun(100, ignore_canstun = TRUE) + playsound(loc, 'sound/effects/pray.ogg', 50, 1, -1) + + // Let the sound effect finish playing + sleep(20) + + if(!user) + return + + for(var/obj/item/W in user) + user.dropItemToGround(W) + + var/obj/item/wrench/medical/W = new /obj/item/wrench/medical(loc) + W.add_fingerprint(user) + W.desc += " For some reason, it reminds you of [user.name]." + + if(!user) + return + + user.dust() + + return OXYLOSS + +/* + * Screwdriver + */ +/obj/item/screwdriver + name = "screwdriver" + desc = "You can be totally screwy with this." + icon = 'icons/obj/tools.dmi' + icon_state = "screwdriver" + item_state = "screwdriver" + lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' + flags_1 = CONDUCT_1 + slot_flags = SLOT_BELT + force = 5 + w_class = WEIGHT_CLASS_TINY + throwforce = 5 + throw_speed = 3 + throw_range = 5 + materials = list(MAT_METAL=75) + attack_verb = list("stabbed") + hitsound = 'sound/weapons/bladeslice.ogg' + usesound = 'sound/items/screwdriver.ogg' + toolspeed = 1 + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30) + var/random_color = TRUE //if the screwdriver uses random coloring + var/static/list/screwdriver_colors = list(\ + "blue" = rgb(24, 97, 213), \ + "red" = rgb(149, 23, 16), \ + "pink" = rgb(213, 24, 141), \ + "brown" = rgb(160, 82, 18), \ + "green" = rgb(14, 127, 27), \ + "cyan" = rgb(24, 162, 213), \ + "yellow" = rgb(213, 140, 24), \ + ) + +/obj/item/screwdriver/suicide_act(mob/user) + user.visible_message("[user] is stabbing [src] into [user.p_their()] [pick("temple", "heart")]! It looks like [user.p_theyre()] trying to commit suicide!") + return(BRUTELOSS) + +/obj/item/screwdriver/Initialize() + . = ..() + if(random_color) //random colors! + var/our_color = pick(screwdriver_colors) + add_atom_colour(screwdriver_colors[our_color], FIXED_COLOUR_PRIORITY) + update_icon() + if(prob(75)) + pixel_y = rand(0, 16) + +/obj/item/screwdriver/update_icon() + if(!random_color) //icon override + return + cut_overlays() + var/mutable_appearance/base_overlay = mutable_appearance(icon, "screwdriver_screwybits") + base_overlay.appearance_flags = RESET_COLOR + add_overlay(base_overlay) + +/obj/item/screwdriver/worn_overlays(isinhands = FALSE, icon_file) + . = list() + if(isinhands && random_color) + var/mutable_appearance/M = mutable_appearance(icon_file, "screwdriver_head") + M.appearance_flags = RESET_COLOR + . += M + +/obj/item/screwdriver/get_belt_overlay() + if(random_color) + var/mutable_appearance/body = mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "screwdriver") + var/mutable_appearance/head = mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "screwdriver_head") + body.color = color + head.add_overlay(body) + return head + else + return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', icon_state) + +/obj/item/screwdriver/attack(mob/living/carbon/M, mob/living/carbon/user) + if(!istype(M)) + return ..() + if(user.zone_selected != "eyes" && user.zone_selected != "head") + return ..() + if(user.disabilities & CLUMSY && prob(50)) + M = user + return eyestab(M,user) + +/obj/item/screwdriver/brass + name = "brass screwdriver" + desc = "A screwdriver made of brass. The handle feels freezing cold." + resistance_flags = FIRE_PROOF | ACID_PROOF + icon_state = "screwdriver_brass" + item_state = "screwdriver_brass" + toolspeed = 0.5 + random_color = FALSE + +/obj/item/screwdriver/abductor + name = "alien screwdriver" + desc = "An ultrasonic screwdriver." + icon = 'icons/obj/abductor.dmi' + icon_state = "screwdriver_a" + item_state = "screwdriver_nuke" + usesound = 'sound/items/pshoom.ogg' + toolspeed = 0.1 + random_color = FALSE + +/obj/item/screwdriver/power + name = "hand drill" + desc = "A simple powered hand drill. It's fitted with a screw bit." + icon_state = "drill_screw" + item_state = "drill" + lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' + materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25) + origin_tech = "materials=2;engineering=2" //done for balance reasons, making them high value for research, but harder to get + force = 8 //might or might not be too high, subject to change + w_class = WEIGHT_CLASS_SMALL + throwforce = 8 + throw_speed = 2 + throw_range = 3//it's heavier than a screw driver/wrench, so it does more damage, but can't be thrown as far + attack_verb = list("drilled", "screwed", "jabbed","whacked") + hitsound = 'sound/items/drill_hit.ogg' + usesound = 'sound/items/drill_use.ogg' + toolspeed = 0.25 + random_color = FALSE + +/obj/item/screwdriver/power/suicide_act(mob/user) + user.visible_message("[user] is putting [src] to [user.p_their()] temple. It looks like [user.p_theyre()] trying to commit suicide!") + return(BRUTELOSS) + +/obj/item/screwdriver/power/attack_self(mob/user) + playsound(get_turf(user),'sound/items/change_drill.ogg',50,1) + var/obj/item/wrench/power/b_drill = new /obj/item/wrench/power + to_chat(user, "You attach the bolt driver bit to [src].") + qdel(src) + user.put_in_active_hand(b_drill) + +/obj/item/screwdriver/cyborg + name = "powered screwdriver" + desc = "An electrical screwdriver, designed to be both precise and quick." + usesound = 'sound/items/drill_use.ogg' + toolspeed = 0.5 + +/* + * Wirecutters + */ +/obj/item/wirecutters + name = "wirecutters" + desc = "This cuts wires." + icon = 'icons/obj/tools.dmi' + icon_state = null + lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' + flags_1 = CONDUCT_1 + slot_flags = SLOT_BELT + force = 6 + throw_speed = 3 + throw_range = 7 + w_class = WEIGHT_CLASS_SMALL + materials = list(MAT_METAL=80) + attack_verb = list("pinched", "nipped") + hitsound = 'sound/items/wirecutter.ogg' + usesound = 'sound/items/wirecutter.ogg' + origin_tech = "materials=1;engineering=1" + toolspeed = 1 + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30) + + +/obj/item/wirecutters/New(loc, var/param_color = null) + ..() + if(!icon_state) + if(!param_color) + param_color = pick("yellow","red") + icon_state = "cutters_[param_color]" + +/obj/item/wirecutters/attack(mob/living/carbon/C, mob/user) + if(istype(C) && C.handcuffed && istype(C.handcuffed, /obj/item/restraints/handcuffs/cable)) + user.visible_message("[user] cuts [C]'s restraints with [src]!") + qdel(C.handcuffed) + C.handcuffed = null + if(C.buckled && C.buckled.buckle_requires_restraints) + C.buckled.unbuckle_mob(C) + C.update_handcuffed() + return + else + ..() + +/obj/item/wirecutters/suicide_act(mob/user) + user.visible_message("[user] is cutting at [user.p_their()] arteries with [src]! It looks like [user.p_theyre()] trying to commit suicide!") + playsound(loc, usesound, 50, 1, -1) + return (BRUTELOSS) + +/obj/item/wirecutters/brass + name = "brass wirecutters" + desc = "A pair of wirecutters made of brass. The handle feels freezing cold to the touch." + resistance_flags = FIRE_PROOF | ACID_PROOF + icon_state = "cutters_brass" + toolspeed = 0.5 + +/obj/item/wirecutters/abductor + name = "alien wirecutters" + desc = "Extremely sharp wirecutters, made out of a silvery-green metal." + icon = 'icons/obj/abductor.dmi' + icon_state = "cutters" + toolspeed = 0.1 + origin_tech = "materials=5;engineering=4;abductor=3" + +/obj/item/wirecutters/cyborg + name = "wirecutters" + desc = "This cuts wires." + toolspeed = 0.5 + +/obj/item/wirecutters/power + name = "jaws of life" + desc = "A set of jaws of life, compressed through the magic of science. It's fitted with a cutting head." + icon_state = "jaws_cutter" + item_state = "jawsoflife" + origin_tech = "materials=2;engineering=2" + materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25) + usesound = 'sound/items/jaws_cut.ogg' + toolspeed = 0.25 + +/obj/item/wirecutters/power/suicide_act(mob/user) + user.visible_message("[user] is wrapping \the [src] around [user.p_their()] neck. It looks like [user.p_theyre()] trying to rip [user.p_their()] head off!") + playsound(loc, 'sound/items/jaws_cut.ogg', 50, 1, -1) + if(iscarbon(user)) + var/mob/living/carbon/C = user + var/obj/item/bodypart/BP = C.get_bodypart("head") + if(BP) + BP.drop_limb() + playsound(loc,pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg') ,50, 1, -1) + return (BRUTELOSS) + +/obj/item/wirecutters/power/attack_self(mob/user) + playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1) + var/obj/item/crowbar/power/pryjaws = new /obj/item/crowbar/power + to_chat(user, "You attach the pry jaws to [src].") + qdel(src) + user.put_in_active_hand(pryjaws) +/* + * Welding Tool + */ +/obj/item/weldingtool + name = "welding tool" + desc = "A standard edition welder provided by Nanotrasen." + icon = 'icons/obj/tools.dmi' + icon_state = "welder" + item_state = "welder" + lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' + flags_1 = CONDUCT_1 + slot_flags = SLOT_BELT + force = 3 + throwforce = 5 + hitsound = "swing_hit" + usesound = 'sound/items/welder.ogg' + var/acti_sound = 'sound/items/welderactivate.ogg' + var/deac_sound = 'sound/items/welderdeactivate.ogg' + throw_speed = 3 + throw_range = 5 + w_class = WEIGHT_CLASS_SMALL + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 30) + resistance_flags = FIRE_PROOF + + materials = list(MAT_METAL=70, MAT_GLASS=30) + origin_tech = "engineering=1;plasmatech=1" + var/welding = 0 //Whether or not the welding tool is off(0), on(1) or currently welding(2) + var/status = TRUE //Whether the welder is secured or unsecured (able to attach rods to it to make a flamethrower) + var/max_fuel = 20 //The max amount of fuel the welder can hold + var/change_icons = 1 + var/can_off_process = 0 + var/light_intensity = 2 //how powerful the emitted light is when used. + var/burned_fuel_for = 0 //when fuel was last removed + heat = 3800 + toolspeed = 1 + +/obj/item/weldingtool/Initialize() + . = ..() + create_reagents(max_fuel) + reagents.add_reagent("welding_fuel", max_fuel) + update_icon() + + +/obj/item/weldingtool/proc/update_torch() + if(welding) + add_overlay("[initial(icon_state)]-on") + item_state = "[initial(item_state)]1" + else + item_state = "[initial(item_state)]" + + +/obj/item/weldingtool/update_icon() + cut_overlays() + if(change_icons) + var/ratio = get_fuel() / max_fuel + ratio = Ceiling(ratio*4) * 25 + add_overlay("[initial(icon_state)][ratio]") + update_torch() + return + + +/obj/item/weldingtool/process() + switch(welding) + if(0) + force = 3 + damtype = "brute" + update_icon() + if(!can_off_process) + STOP_PROCESSING(SSobj, src) + return + //Welders left on now use up fuel, but lets not have them run out quite that fast + if(1) + force = 15 + damtype = "fire" + ++burned_fuel_for + if(burned_fuel_for >= WELDER_FUEL_BURN_INTERVAL) + remove_fuel(1) + update_icon() + + //This is to start fires. process() is only called if the welder is on. + open_flame() + + +/obj/item/weldingtool/suicide_act(mob/user) + user.visible_message("[user] welds [user.p_their()] every orifice closed! It looks like [user.p_theyre()] trying to commit suicide!") + return (FIRELOSS) + + +/obj/item/weldingtool/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/screwdriver)) + flamethrower_screwdriver(I, user) + else if(istype(I, /obj/item/stack/rods)) + flamethrower_rods(I, user) + else + return ..() + + +/obj/item/weldingtool/attack(mob/living/carbon/human/H, mob/user) + if(!istype(H)) + return ..() + + var/obj/item/bodypart/affecting = H.get_bodypart(check_zone(user.zone_selected)) + + if(affecting && affecting.status == BODYPART_ROBOTIC && user.a_intent != INTENT_HARM) + if(src.remove_fuel(1)) + playsound(loc, usesound, 50, 1) + if(user == H) + user.visible_message("[user] starts to fix some of the dents on [H]'s [affecting.name].", "You start fixing some of the dents on [H]'s [affecting.name].") + if(!do_mob(user, H, 50)) + return + item_heal_robotic(H, user, 15, 0) + else + return ..() + + +/obj/item/weldingtool/afterattack(atom/O, mob/user, proximity) + if(!proximity) return + + if(welding) + remove_fuel(1) + var/turf/location = get_turf(user) + location.hotspot_expose(700, 50, 1) + if(get_fuel() <= 0) + set_light(0) + + if(isliving(O)) + var/mob/living/L = O + if(L.IgniteMob()) + message_admins("[key_name_admin(user)] set [key_name_admin(L)] on fire") + log_game("[key_name(user)] set [key_name(L)] on fire") + + +/obj/item/weldingtool/attack_self(mob/user) + switched_on(user) + if(welding) + set_light(light_intensity) + + update_icon() + + +//Returns the amount of fuel in the welder +/obj/item/weldingtool/proc/get_fuel() + return reagents.get_reagent_amount("welding_fuel") + + +//Removes fuel from the welding tool. If a mob is passed, it will try to flash the mob's eyes. This should probably be renamed to use() +/obj/item/weldingtool/proc/remove_fuel(amount = 1, mob/living/M = null) + if(!welding || !check_fuel()) + return 0 + if(amount) + burned_fuel_for = 0 + if(get_fuel() >= amount) + reagents.remove_reagent("welding_fuel", amount) + check_fuel() + if(M) + M.flash_act(light_intensity) + return TRUE + else + if(M) + to_chat(M, "You need more welding fuel to complete this task!") + return FALSE + + +//Turns off the welder if there is no more fuel (does this really need to be its own proc?) +/obj/item/weldingtool/proc/check_fuel(mob/user) + if(get_fuel() <= 0 && welding) + switched_on(user) + update_icon() + //mob icon update + if(ismob(loc)) + var/mob/M = loc + M.update_inv_hands(0) + + return 0 + return 1 + +//Switches the welder on +/obj/item/weldingtool/proc/switched_on(mob/user) + if(!status) + to_chat(user, "[src] can't be turned on while unsecured!") + return + welding = !welding + if(welding) + if(get_fuel() >= 1) + to_chat(user, "You switch [src] on.") + playsound(loc, acti_sound, 50, 1) + force = 15 + damtype = "fire" + hitsound = 'sound/items/welder.ogg' + update_icon() + START_PROCESSING(SSobj, src) + else + to_chat(user, "You need more fuel!") + switched_off(user) + else + to_chat(user, "You switch [src] off.") + playsound(loc, deac_sound, 50, 1) + switched_off(user) + +//Switches the welder off +/obj/item/weldingtool/proc/switched_off(mob/user) + welding = 0 + set_light(0) + + force = 3 + damtype = "brute" + hitsound = "swing_hit" + update_icon() + + +/obj/item/weldingtool/examine(mob/user) + ..() + to_chat(user, "It contains [get_fuel()] unit\s of fuel out of [max_fuel].") + +/obj/item/weldingtool/is_hot() + return welding * heat + +//Returns whether or not the welding tool is currently on. +/obj/item/weldingtool/proc/isOn() + return welding + + +/obj/item/weldingtool/proc/flamethrower_screwdriver(obj/item/I, mob/user) + if(welding) + to_chat(user, "Turn it off first!") + return + status = !status + if(status) + to_chat(user, "You resecure [src].") + else + to_chat(user, "[src] can now be attached and modified.") + add_fingerprint(user) + +/obj/item/weldingtool/proc/flamethrower_rods(obj/item/I, mob/user) + if(!status) + var/obj/item/stack/rods/R = I + if (R.use(1)) + var/obj/item/flamethrower/F = new /obj/item/flamethrower(user.loc) + if(!remove_item_from_storage(F)) + user.transferItemToLoc(src, F, TRUE) + F.weldtool = src + add_fingerprint(user) + to_chat(user, "You add a rod to a welder, starting to build a flamethrower.") + user.put_in_hands(F) + else + to_chat(user, "You need one rod to start building a flamethrower!") + +/obj/item/weldingtool/ignition_effect(atom/A, mob/user) + if(welding && remove_fuel(1, user)) + . = "[user] casually lights [A] with [src], what a badass." + else + . = "" + +/obj/item/weldingtool/largetank + name = "industrial welding tool" + desc = "A slightly larger welder with a larger tank." + icon_state = "indwelder" + max_fuel = 40 + materials = list(MAT_GLASS=60) + origin_tech = "engineering=2;plasmatech=2" + +/obj/item/weldingtool/largetank/cyborg + name = "integrated welding tool" + desc = "An advanced welder designed to be used in robotic systems." + toolspeed = 0.5 + +/obj/item/weldingtool/largetank/flamethrower_screwdriver() + return + + +/obj/item/weldingtool/mini + name = "emergency welding tool" + desc = "A miniature welder used during emergencies." + icon_state = "miniwelder" + max_fuel = 10 + w_class = WEIGHT_CLASS_TINY + materials = list(MAT_METAL=30, MAT_GLASS=10) + change_icons = 0 + +/obj/item/weldingtool/mini/flamethrower_screwdriver() + return + +/obj/item/weldingtool/abductor + name = "alien welding tool" + desc = "An alien welding tool. Whatever fuel it uses, it never runs out." + icon = 'icons/obj/abductor.dmi' + icon_state = "welder" + toolspeed = 0.1 + light_intensity = 0 + change_icons = 0 + origin_tech = "plasmatech=5;engineering=5;abductor=3" + +/obj/item/weldingtool/abductor/process() + if(get_fuel() <= max_fuel) + reagents.add_reagent("welding_fuel", 1) + ..() + +/obj/item/weldingtool/hugetank + name = "upgraded industrial welding tool" + desc = "An upgraded welder based of the industrial welder." + icon_state = "upindwelder" + item_state = "upindwelder" + max_fuel = 80 + materials = list(MAT_METAL=70, MAT_GLASS=120) + origin_tech = "engineering=3;plasmatech=2" + +/obj/item/weldingtool/experimental + name = "experimental welding tool" + desc = "An experimental welder capable of self-fuel generation and less harmful to the eyes." + icon_state = "exwelder" + item_state = "exwelder" + max_fuel = 40 + materials = list(MAT_METAL=70, MAT_GLASS=120) + origin_tech = "materials=4;engineering=4;bluespace=3;plasmatech=4" + var/last_gen = 0 + change_icons = 0 + can_off_process = 1 + light_intensity = 1 + toolspeed = 0.5 + var/nextrefueltick = 0 + +/obj/item/weldingtool/experimental/brass + name = "brass welding tool" + desc = "A brass welder that seems to constantly refuel itself. It is faintly warm to the touch." + resistance_flags = FIRE_PROOF | ACID_PROOF + icon_state = "brasswelder" + item_state = "brasswelder" + + +/obj/item/weldingtool/experimental/process() + ..() + if(get_fuel() < max_fuel && nextrefueltick < world.time) + nextrefueltick = world.time + 10 + reagents.add_reagent("welding_fuel", 1) + + +/* + * Crowbar + */ + +/obj/item/crowbar + name = "pocket crowbar" + desc = "A small crowbar. This handy tool is useful for lots of things, such as prying floor tiles or opening unpowered doors." + icon = 'icons/obj/tools.dmi' + icon_state = "crowbar" + lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' + usesound = 'sound/items/crowbar.ogg' + flags_1 = CONDUCT_1 + slot_flags = SLOT_BELT + force = 5 + throwforce = 7 + w_class = WEIGHT_CLASS_SMALL + materials = list(MAT_METAL=50) + origin_tech = "engineering=1;combat=1" + attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked") + toolspeed = 1 + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30) + +/obj/item/crowbar/suicide_act(mob/user) + user.visible_message("[user] is beating [user.p_them()]self to death with [src]! It looks like [user.p_theyre()] trying to commit suicide!") + playsound(loc, 'sound/weapons/genhit.ogg', 50, 1, -1) + return (BRUTELOSS) + +/obj/item/crowbar/red + icon_state = "crowbar_red" + force = 8 + +/obj/item/crowbar/brass + name = "brass crowbar" + desc = "A brass crowbar. It feels faintly warm to the touch." + resistance_flags = FIRE_PROOF | ACID_PROOF + icon_state = "crowbar_brass" + toolspeed = 0.5 + +/obj/item/crowbar/abductor + name = "alien crowbar" + desc = "A hard-light crowbar. It appears to pry by itself, without any effort required." + icon = 'icons/obj/abductor.dmi' + usesound = 'sound/weapons/sonic_jackhammer.ogg' + icon_state = "crowbar" + toolspeed = 0.1 + origin_tech = "combat=4;engineering=4;abductor=3" + +/obj/item/crowbar/large + name = "crowbar" + desc = "It's a big crowbar. It doesn't fit in your pockets, because it's big." + force = 12 + w_class = WEIGHT_CLASS_NORMAL + throw_speed = 3 + throw_range = 3 + materials = list(MAT_METAL=70) + icon_state = "crowbar_large" + item_state = "crowbar" + toolspeed = 0.5 + +/obj/item/crowbar/cyborg + name = "hydraulic crowbar" + desc = "A hydraulic prying tool, compact but powerful. Designed to replace crowbar in construction cyborgs." + usesound = 'sound/items/jaws_pry.ogg' + force = 10 + toolspeed = 0.5 + +/obj/item/crowbar/power + name = "jaws of life" + desc = "A set of jaws of life, compressed through the magic of science. It's fitted with a prying head." + icon_state = "jaws_pry" + item_state = "jawsoflife" + lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' + materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25) + origin_tech = "materials=2;engineering=2" + usesound = 'sound/items/jaws_pry.ogg' + force = 15 + toolspeed = 0.25 + +/obj/item/crowbar/power/suicide_act(mob/user) + user.visible_message("[user] is putting [user.p_their()] head in [src], it looks like [user.p_theyre()] trying to commit suicide!") + playsound(loc, 'sound/items/jaws_pry.ogg', 50, 1, -1) + return (BRUTELOSS) + +/obj/item/crowbar/power/attack_self(mob/user) + playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1) + var/obj/item/wirecutters/power/cutjaws = new /obj/item/wirecutters/power + to_chat(user, "You attach the cutting jaws to [src].") + qdel(src) + user.put_in_active_hand(cutjaws) + +#undef WELDER_FUEL_BURN_INTERVAL diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 648047ab62..87ff199dfe 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -40,6 +40,7 @@ icon = 'icons/obj/toy.dmi' icon_state = "waterballoon-e" item_state = "balloon-empty" + /obj/item/toy/balloon/New() create_reagents(10) @@ -278,6 +279,8 @@ icon = 'icons/obj/toy.dmi' icon_state = "foamblade" item_state = "arm_blade" + lefthand_file = 'icons/mob/inhands/antag/changeling_lefthand.dmi' + righthand_file = 'icons/mob/inhands/antag/changeling_righthand.dmi' attack_verb = list("pricked", "absorbed", "gored") w_class = WEIGHT_CLASS_SMALL resistance_flags = FLAMMABLE @@ -288,6 +291,8 @@ desc = "A replica toolbox that rumbles when you turn the key" icon_state = "his_grace" item_state = "artistic_toolbox" + lefthand_file = 'icons/mob/inhands/equipment/toolbox_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/toolbox_righthand.dmi' var/active = FALSE icon = 'icons/obj/items_and_weapons.dmi' attack_verb = list("robusted") @@ -547,6 +552,8 @@ desc = "A tool to help you write fictional devils!" icon = 'icons/obj/library.dmi' icon_state = "demonomicon" + lefthand_file = 'icons/mob/inhands/misc/books_lefthand.dmi' + righthand_file = 'icons/mob/inhands/misc/books_righthand.dmi' w_class = WEIGHT_CLASS_SMALL recharge_time = 60 diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index 13acf7e990..17bbb0a12f 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -1,592 +1,592 @@ -/obj/item/banhammer - desc = "A banhammer" - name = "banhammer" - icon = 'icons/obj/items_and_weapons.dmi' - icon_state = "toyhammer" - slot_flags = SLOT_BELT - throwforce = 0 - w_class = WEIGHT_CLASS_TINY - throw_speed = 3 - throw_range = 7 - attack_verb = list("banned") - max_integrity = 200 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 70) - resistance_flags = FIRE_PROOF - -/obj/item/banhammer/suicide_act(mob/user) - user.visible_message("[user] is hitting [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to ban [user.p_them()]self from life.") - return (BRUTELOSS|FIRELOSS|TOXLOSS|OXYLOSS) - -/obj/item/banhammer/attack(mob/M, mob/user) +/obj/item/banhammer + desc = "A banhammer" + name = "banhammer" + icon = 'icons/obj/items_and_weapons.dmi' + icon_state = "toyhammer" + slot_flags = SLOT_BELT + throwforce = 0 + w_class = WEIGHT_CLASS_TINY + throw_speed = 3 + throw_range = 7 + attack_verb = list("banned") + max_integrity = 200 + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 70) + resistance_flags = FIRE_PROOF + +/obj/item/banhammer/suicide_act(mob/user) + user.visible_message("[user] is hitting [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to ban [user.p_them()]self from life.") + return (BRUTELOSS|FIRELOSS|TOXLOSS|OXYLOSS) + +/obj/item/banhammer/attack(mob/M, mob/user) if(user.zone_selected == "head") M.visible_message("[user] are stroking the head of [M] with a bangammer", "[user] are stroking the head with a bangammer", "you hear a bangammer stroking a head"); else M.visible_message("[M] has been banned FOR NO REISIN by [user]", "You have been banned FOR NO REISIN by [user]", "you hear a banhammer banning someone") - playsound(loc, 'sound/effects/adminhelp.ogg', 15) //keep it at 15% volume so people don't jump out of their skin too much - -/obj/item/sord - name = "\improper SORD" - desc = "This thing is so unspeakably shitty you are having a hard time even holding it." - icon_state = "sord" - item_state = "sord" - lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi' - righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi' - slot_flags = SLOT_BELT - force = 2 - throwforce = 1 - w_class = WEIGHT_CLASS_NORMAL - hitsound = 'sound/weapons/bladeslice.ogg' - attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") - -/obj/item/sord/suicide_act(mob/user) - user.visible_message("[user] is trying to impale [user.p_them()]self with [src]! It might be a suicide attempt if it weren't so shitty.", \ - "You try to impale yourself with [src], but it's USELESS...") - return SHAME - -/obj/item/claymore - name = "claymore" - desc = "What are you standing around staring at this for? Get to killing!" - icon_state = "claymore" - item_state = "claymore" - lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi' - righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi' - hitsound = 'sound/weapons/bladeslice.ogg' - flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT | SLOT_BACK - force = 40 - throwforce = 10 - w_class = WEIGHT_CLASS_NORMAL - attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") - block_chance = 50 - sharpness = IS_SHARP - max_integrity = 200 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) - resistance_flags = FIRE_PROOF - -/obj/item/claymore/suicide_act(mob/user) - user.visible_message("[user] is falling on [src]! It looks like [user.p_theyre()] trying to commit suicide!") - return(BRUTELOSS) - -/obj/item/claymore/highlander //ALL COMMENTS MADE REGARDING THIS SWORD MUST BE MADE IN ALL CAPS - desc = "THERE CAN BE ONLY ONE, AND IT WILL BE YOU!!!\nActivate it in your hand to point to the nearest victim." - flags_1 = CONDUCT_1 | NODROP_1 | DROPDEL_1 - slot_flags = null - block_chance = 0 //RNG WON'T HELP YOU NOW, PANSY - luminosity = 3 - attack_verb = list("brutalized", "eviscerated", "disemboweled", "hacked", "carved", "cleaved") //ONLY THE MOST VISCERAL ATTACK VERBS - var/notches = 0 //HOW MANY PEOPLE HAVE BEEN SLAIN WITH THIS BLADE - var/obj/item/disk/nuclear/nuke_disk //OUR STORED NUKE DISK - -/obj/item/claymore/highlander/Initialize() - . = ..() - START_PROCESSING(SSobj, src) - -/obj/item/claymore/highlander/Destroy() - if(nuke_disk) - nuke_disk.forceMove(get_turf(src)) - nuke_disk.visible_message("The nuke disk is vulnerable!") - nuke_disk = null - STOP_PROCESSING(SSobj, src) - return ..() - -/obj/item/claymore/highlander/process() - if(ishuman(loc)) - var/mob/living/carbon/human/H = loc - loc.layer = LARGE_MOB_LAYER //NO HIDING BEHIND PLANTS FOR YOU, DICKWEED (HA GET IT, BECAUSE WEEDS ARE PLANTS) - H.bleedsuppress = TRUE //AND WE WON'T BLEED OUT LIKE COWARDS - else - if(!admin_spawned) - qdel(src) - - -/obj/item/claymore/highlander/pickup(mob/living/user) - to_chat(user, "The power of Scotland protects you! You are shielded from all stuns and knockdowns.") - user.add_stun_absorption("highlander", INFINITY, 1, " is protected by the power of Scotland!", "The power of Scotland absorbs the stun!", " is protected by the power of Scotland!") - user.status_flags += IGNORESLOWDOWN - -/obj/item/claymore/highlander/dropped(mob/living/user) - user.status_flags -= IGNORESLOWDOWN - qdel(src) //If this ever happens, it's because you lost an arm - -/obj/item/claymore/highlander/examine(mob/user) - ..() - to_chat(user, "It has [!notches ? "nothing" : "[notches] notches"] scratched into the blade.") - if(nuke_disk) - to_chat(user, "It's holding the nuke disk!") - -/obj/item/claymore/highlander/attack(mob/living/target, mob/living/user) - . = ..() - if(target && target.stat == DEAD && target.mind && target.mind.special_role == "highlander") - user.fully_heal() //STEAL THE LIFE OF OUR FALLEN FOES - add_notch(user) - target.visible_message("[target] crumbles to dust beneath [user]'s blows!", "As you fall, your body crumbles to dust!") - target.dust() - -/obj/item/claymore/highlander/attack_self(mob/living/user) - var/closest_victim - var/closest_distance = 255 - for(var/mob/living/carbon/human/H in GLOB.player_list - user) - if(H.client && H.mind.special_role == "highlander" && (!closest_victim || get_dist(user, closest_victim) < closest_distance)) - closest_victim = H - if(!closest_victim) - to_chat(user, "[src] thrums for a moment and falls dark. Perhaps there's nobody nearby.") - return - to_chat(user, "[src] thrums and points to the [dir2text(get_dir(user, closest_victim))].") - -/obj/item/claymore/highlander/IsReflect() - return 1 //YOU THINK YOUR PUNY LASERS CAN STOP ME? - -/obj/item/claymore/highlander/proc/add_notch(mob/living/user) //DYNAMIC CLAYMORE PROGRESSION SYSTEM - THIS IS THE FUTURE - notches++ - force++ - var/new_name = name - switch(notches) - if(1) - to_chat(user, "Your first kill - hopefully one of many. You scratch a notch into [src]'s blade.") - to_chat(user, "You feel your fallen foe's soul entering your blade, restoring your wounds!") - new_name = "notched claymore" - if(2) - to_chat(user, "Another falls before you. Another soul fuses with your own. Another notch in the blade.") - new_name = "double-notched claymore" - add_atom_colour(rgb(255, 235, 235), ADMIN_COLOUR_PRIORITY) - if(3) - to_chat(user, "You're beginning to relish the thrill of battle.") - new_name = "triple-notched claymore" - add_atom_colour(rgb(255, 215, 215), ADMIN_COLOUR_PRIORITY) - if(4) - to_chat(user, "You've lost count of how many you've killed.") - new_name = "many-notched claymore" - add_atom_colour(rgb(255, 195, 195), ADMIN_COLOUR_PRIORITY) - if(5) - to_chat(user, "Five voices now echo in your mind, cheering the slaughter.") - new_name = "battle-tested claymore" - add_atom_colour(rgb(255, 175, 175), ADMIN_COLOUR_PRIORITY) - if(6) - to_chat(user, "Is this what the vikings felt like? Visions of glory fill your head as you slay your sixth foe.") - new_name = "battle-scarred claymore" - add_atom_colour(rgb(255, 155, 155), ADMIN_COLOUR_PRIORITY) - if(7) - to_chat(user, "Kill. Butcher. Conquer.") - new_name = "vicious claymore" - add_atom_colour(rgb(255, 135, 135), ADMIN_COLOUR_PRIORITY) - if(8) - to_chat(user, "IT NEVER GETS OLD. THE SCREAMING. THE BLOOD AS IT SPRAYS ACROSS YOUR FACE.") - new_name = "bloodthirsty claymore" - add_atom_colour(rgb(255, 115, 115), ADMIN_COLOUR_PRIORITY) - if(9) - to_chat(user, "ANOTHER ONE FALLS TO YOUR BLOWS. ANOTHER WEAKLING UNFIT TO LIVE.") - new_name = "gore-stained claymore" - add_atom_colour(rgb(255, 95, 95), ADMIN_COLOUR_PRIORITY) - if(10) - user.visible_message("[user]'s eyes light up with a vengeful fire!", \ - "YOU FEEL THE POWER OF VALHALLA FLOWING THROUGH YOU! THERE CAN BE ONLY ONE!!!") - user.update_icons() - new_name = "GORE-DRENCHED CLAYMORE OF [pick("THE WHIMSICAL SLAUGHTER", "A THOUSAND SLAUGHTERED CATTLE", "GLORY AND VALHALLA", "ANNIHILATION", "OBLITERATION")]" - icon_state = "claymore_valhalla" - item_state = "cultblade" - remove_atom_colour(ADMIN_COLOUR_PRIORITY) - - name = new_name - playsound(user, 'sound/items/screwdriver2.ogg', 50, 1) - -/obj/item/katana - name = "katana" - desc = "Woefully underpowered in D20" - icon_state = "katana" - item_state = "katana" - lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi' - righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi' - flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT | SLOT_BACK - force = 40 - throwforce = 10 - w_class = WEIGHT_CLASS_NORMAL - hitsound = 'sound/weapons/bladeslice.ogg' - attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") - block_chance = 50 - sharpness = IS_SHARP - max_integrity = 200 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) - resistance_flags = FIRE_PROOF - -/obj/item/katana/cursed - slot_flags = null - -/obj/item/katana/suicide_act(mob/user) - user.visible_message("[user] is slitting [user.p_their()] stomach open with [src]! It looks like [user.p_theyre()] trying to commit seppuku!") - return(BRUTELOSS) - -/obj/item/wirerod - name = "wired rod" - desc = "A rod with some wire wrapped around the top. It'd be easy to attach something to the top bit." - icon_state = "wiredrod" - item_state = "rods" - flags_1 = CONDUCT_1 - force = 9 - throwforce = 10 - w_class = WEIGHT_CLASS_NORMAL - materials = list(MAT_METAL=1150, MAT_GLASS=75) - attack_verb = list("hit", "bludgeoned", "whacked", "bonked") - -/obj/item/wirerod/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/shard)) - var/obj/item/twohanded/spear/S = new /obj/item/twohanded/spear - - remove_item_from_storage(user) - qdel(I) - qdel(src) - - user.put_in_hands(S) - to_chat(user, "You fasten the glass shard to the top of the rod with the cable.") - - else if(istype(I, /obj/item/device/assembly/igniter) && !(I.flags_1 & NODROP_1)) - var/obj/item/melee/baton/cattleprod/P = new /obj/item/melee/baton/cattleprod - - remove_item_from_storage(user) - - to_chat(user, "You fasten [I] to the top of the rod with the cable.") - - qdel(I) - qdel(src) - - user.put_in_hands(P) - else - return ..() - - -/obj/item/throwing_star - name = "throwing star" - desc = "An ancient weapon still used to this day due to it's ease of lodging itself into victim's body parts" - icon_state = "throwingstar" - item_state = "eshield0" - lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi' - righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi' - force = 2 - throwforce = 20 //This is never used on mobs since this has a 100% embed chance. - throw_speed = 4 - embedded_pain_multiplier = 4 - w_class = WEIGHT_CLASS_SMALL - embed_chance = 100 - embedded_fall_chance = 0 //Hahaha! - sharpness = IS_SHARP - materials = list(MAT_METAL=500, MAT_GLASS=500) - resistance_flags = FIRE_PROOF - - -/obj/item/switchblade - name = "switchblade" - icon_state = "switchblade" - lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi' - righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi' - desc = "A sharp, concealable, spring-loaded knife." - flags_1 = CONDUCT_1 - force = 3 - w_class = WEIGHT_CLASS_SMALL - throwforce = 5 - throw_speed = 3 - throw_range = 6 - materials = list(MAT_METAL=12000) - origin_tech = "engineering=3;combat=2" - hitsound = 'sound/weapons/genhit.ogg' - attack_verb = list("stubbed", "poked") - resistance_flags = FIRE_PROOF - var/extended = 0 - -/obj/item/switchblade/attack_self(mob/user) - extended = !extended - playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1) - if(extended) - force = 20 - w_class = WEIGHT_CLASS_NORMAL - throwforce = 23 - icon_state = "switchblade_ext" - attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") - hitsound = 'sound/weapons/bladeslice.ogg' - sharpness = IS_SHARP - else - force = 3 - w_class = WEIGHT_CLASS_SMALL - throwforce = 5 - icon_state = "switchblade" - attack_verb = list("stubbed", "poked") - hitsound = 'sound/weapons/genhit.ogg' - sharpness = IS_BLUNT - -/obj/item/switchblade/suicide_act(mob/user) - user.visible_message("[user] is slitting [user.p_their()] own throat with [src]! It looks like [user.p_theyre()] trying to commit suicide!") - return (BRUTELOSS) - -/obj/item/phone - name = "red phone" - desc = "Should anything ever go wrong..." - icon = 'icons/obj/items_and_weapons.dmi' - icon_state = "red_phone" - force = 3 - throwforce = 2 - throw_speed = 3 - throw_range = 4 - w_class = WEIGHT_CLASS_SMALL - attack_verb = list("called", "rang") - hitsound = 'sound/weapons/ring.ogg' - -/obj/item/phone/suicide_act(mob/user) - if(locate(/obj/structure/chair/stool) in user.loc) - user.visible_message("[user] begins to tie a noose with [src]'s cord! It looks like [user.p_theyre()] trying to commit suicide!") - else - user.visible_message("[user] is strangling [user.p_them()]self with [src]'s cord! It looks like [user.p_theyre()] trying to commit suicide!") - return(OXYLOSS) - -/obj/item/cane - name = "cane" - desc = "A cane used by a true gentleman. Or a clown." - icon = 'icons/obj/items_and_weapons.dmi' - icon_state = "cane" - item_state = "stick" - lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi' - righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi' - force = 5 - throwforce = 5 - w_class = WEIGHT_CLASS_SMALL - materials = list(MAT_METAL=50) - attack_verb = list("bludgeoned", "whacked", "disciplined", "thrashed") - -/obj/item/staff - name = "wizard staff" - desc = "Apparently a staff used by the wizard." - icon = 'icons/obj/wizard.dmi' - icon_state = "staff" - lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi' - righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi' - force = 3 - throwforce = 5 - throw_speed = 2 - throw_range = 5 - w_class = WEIGHT_CLASS_SMALL - armour_penetration = 100 - attack_verb = list("bludgeoned", "whacked", "disciplined") - resistance_flags = FLAMMABLE - -/obj/item/staff/broom - name = "broom" - desc = "Used for sweeping, and flying into the night while cackling. Black cat not included." - icon = 'icons/obj/wizard.dmi' - icon_state = "broom" - resistance_flags = FLAMMABLE - -/obj/item/staff/stick - name = "stick" - desc = "A great tool to drag someone else's drinks across the bar." - icon = 'icons/obj/items_and_weapons.dmi' - icon_state = "stick" - item_state = "stick" - lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi' - righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi' - force = 3 - throwforce = 5 - throw_speed = 2 - throw_range = 5 - w_class = WEIGHT_CLASS_SMALL - -/obj/item/ectoplasm - name = "ectoplasm" - desc = "spooky" - gender = PLURAL - icon = 'icons/obj/wizard.dmi' - icon_state = "ectoplasm" - -/obj/item/ectoplasm/suicide_act(mob/user) - user.visible_message("[user] is inhaling [src]! It looks like [user.p_theyre()] trying to visit the astral plane.") - return (OXYLOSS) - -/obj/item/mounted_chainsaw - name = "mounted chainsaw" - desc = "A chainsaw that has replaced your arm." - icon_state = "chainsaw_on" - item_state = "mounted_chainsaw" - lefthand_file = 'icons/mob/inhands/weapons/chainsaw_lefthand.dmi' - righthand_file = 'icons/mob/inhands/weapons/chainsaw_righthand.dmi' - flags_1 = NODROP_1 | ABSTRACT_1 | DROPDEL_1 - w_class = WEIGHT_CLASS_HUGE - force = 21 - throwforce = 0 - throw_range = 0 - throw_speed = 0 - sharpness = IS_SHARP - attack_verb = list("sawed", "torn", "cut", "chopped", "diced") - hitsound = 'sound/weapons/chainsawhit.ogg' - -/obj/item/mounted_chainsaw/Destroy() - var/obj/item/bodypart/part - new /obj/item/twohanded/required/chainsaw(get_turf(src)) - if(iscarbon(loc)) - var/mob/living/carbon/holder = loc - var/index = holder.get_held_index_of_item(src) - if(index) - part = holder.hand_bodyparts[index] - . = ..() - if(part) - part.drop_limb() - -/obj/item/statuebust - name = "bust" - desc = "A priceless ancient marble bust, the kind that belongs in a museum." //or you can hit people with it - icon = 'icons/obj/statue.dmi' - icon_state = "bust" - force = 15 - throwforce = 10 - throw_speed = 5 - throw_range = 2 - attack_verb = list("busted") - -/obj/item/tailclub - name = "tail club" - desc = "For the beating to death of lizards with their own tails." - icon_state = "tailclub" - force = 14 - throwforce = 1 // why are you throwing a club do you even weapon - throw_speed = 1 - throw_range = 1 - attack_verb = list("clubbed", "bludgeoned") - -/obj/item/melee/chainofcommand/tailwhip - name = "liz o' nine tails" - desc = "A whip fashioned from the severed tails of lizards." - icon_state = "tailwhip" - origin_tech = "engineering=3;combat=3;biotech=3" - needs_permit = 0 - -/obj/item/melee/chainofcommand/tailwhip/kitty - name = "cat o' nine tails" - desc = "A whip fashioned from the severed tails of cats." - icon_state = "catwhip" - -/obj/item/melee/skateboard - name = "skateboard" - desc = "A skateboard. It can be placed on its wheels and ridden, or used as a strong weapon." - icon_state = "skateboard" - item_state = "skateboard" - force = 12 - throwforce = 4 - w_class = WEIGHT_CLASS_HUGE - attack_verb = list("smacked", "whacked", "slammed", "smashed") - -/obj/item/melee/skateboard/attack_self(mob/user) - new /obj/vehicle/scooter/skateboard(get_turf(user)) - qdel(src) - -/obj/item/melee/baseball_bat - name = "baseball bat" - desc = "There ain't a skull in the league that can withstand a swatter." - icon = 'icons/obj/items_and_weapons.dmi' - icon_state = "baseball_bat" - item_state = "baseball_bat" - lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi' - righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi' - force = 10 - throwforce = 12 - attack_verb = list("beat", "smacked") - w_class = WEIGHT_CLASS_HUGE - var/homerun_ready = 0 - var/homerun_able = 0 - -/obj/item/melee/baseball_bat/homerun - name = "home run bat" - desc = "This thing looks dangerous... Dangerously good at baseball, that is." - homerun_able = 1 - -/obj/item/melee/baseball_bat/attack_self(mob/user) - if(!homerun_able) - ..() - return - if(homerun_ready) - to_chat(user, "You're already ready to do a home run!") - ..() - return - to_chat(user, "You begin gathering strength...") - playsound(get_turf(src), 'sound/magic/lightning_chargeup.ogg', 65, 1) - if(do_after(user, 90, target = src)) - to_chat(user, "You gather power! Time for a home run!") - homerun_ready = 1 - ..() - -/obj/item/melee/baseball_bat/attack(mob/living/target, mob/living/user) - . = ..() - var/atom/throw_target = get_edge_target_turf(target, user.dir) - if(homerun_ready) - user.visible_message("It's a home run!") - target.throw_at(throw_target, rand(8,10), 14, user) - target.ex_act(EXPLODE_HEAVY) - playsound(get_turf(src), 'sound/weapons/homerun.ogg', 100, 1) - homerun_ready = 0 - return - else if(!target.anchored) - target.throw_at(throw_target, rand(1,2), 7, user) - -/obj/item/melee/baseball_bat/ablative - name = "metal baseball bat" - desc = "This bat is made of highly reflective, highly armored material." - icon_state = "baseball_bat_metal" - item_state = "baseball_bat_metal" - force = 12 - throwforce = 15 - -/obj/item/melee/baseball_bat/ablative/IsReflect()//some day this will reflect thrown items instead of lasers - var/picksound = rand(1,2) - var/turf = get_turf(src) - if(picksound == 1) - playsound(turf, 'sound/weapons/effects/batreflect1.ogg', 50, 1) - if(picksound == 2) - playsound(turf, 'sound/weapons/effects/batreflect2.ogg', 50, 1) - return 1 - -/obj/item/melee/flyswatter - name = "flyswatter" - desc = "Useful for killing insects of all sizes." - icon = 'icons/obj/items_and_weapons.dmi' - icon_state = "flyswatter" - item_state = "flyswatter" - lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi' - righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi' - force = 1 - throwforce = 1 - attack_verb = list("swatted", "smacked") - hitsound = 'sound/effects/snap.ogg' - w_class = WEIGHT_CLASS_SMALL - //Things in this list will be instantly splatted. Flyman weakness is handled in the flyman species weakness proc. - var/list/strong_against - -/obj/item/melee/flyswatter/Initialize() - . = ..() - strong_against = typecacheof(list( - /mob/living/simple_animal/hostile/poison/bees/, - /mob/living/simple_animal/butterfly, - /mob/living/simple_animal/cockroach, - /obj/item/queen_bee - )) - - -/obj/item/melee/flyswatter/afterattack(atom/target, mob/user, proximity_flag) - if(proximity_flag) - if(is_type_in_typecache(target, strong_against)) - new /obj/effect/decal/cleanable/deadcockroach(get_turf(target)) - to_chat(user, "You easily splat the [target].") - if(istype(target, /mob/living/)) - var/mob/living/bug = target - bug.death(1) - else - qdel(target) - -/obj/item/circlegame - name = "circled hand" - desc = "If somebody looks at this while it's below your waist, you get to bop them." - icon_state = "madeyoulook" - force = 0 - throwforce = 0 - flags_1 = DROPDEL_1 | ABSTRACT_1 - attack_verb = list("bopped") - -/obj/item/proc/can_trigger_gun(mob/living/user) - if(!user.can_use_guns(src)) - return FALSE + playsound(loc, 'sound/effects/adminhelp.ogg', 15) //keep it at 15% volume so people don't jump out of their skin too much + +/obj/item/sord + name = "\improper SORD" + desc = "This thing is so unspeakably shitty you are having a hard time even holding it." + icon_state = "sord" + item_state = "sord" + lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi' + righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi' + slot_flags = SLOT_BELT + force = 2 + throwforce = 1 + w_class = WEIGHT_CLASS_NORMAL + hitsound = 'sound/weapons/bladeslice.ogg' + attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") + +/obj/item/sord/suicide_act(mob/user) + user.visible_message("[user] is trying to impale [user.p_them()]self with [src]! It might be a suicide attempt if it weren't so shitty.", \ + "You try to impale yourself with [src], but it's USELESS...") + return SHAME + +/obj/item/claymore + name = "claymore" + desc = "What are you standing around staring at this for? Get to killing!" + icon_state = "claymore" + item_state = "claymore" + lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi' + righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi' + hitsound = 'sound/weapons/bladeslice.ogg' + flags_1 = CONDUCT_1 + slot_flags = SLOT_BELT | SLOT_BACK + force = 40 + throwforce = 10 + w_class = WEIGHT_CLASS_NORMAL + attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") + block_chance = 50 + sharpness = IS_SHARP + max_integrity = 200 + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + resistance_flags = FIRE_PROOF + +/obj/item/claymore/suicide_act(mob/user) + user.visible_message("[user] is falling on [src]! It looks like [user.p_theyre()] trying to commit suicide!") + return(BRUTELOSS) + +/obj/item/claymore/highlander //ALL COMMENTS MADE REGARDING THIS SWORD MUST BE MADE IN ALL CAPS + desc = "THERE CAN BE ONLY ONE, AND IT WILL BE YOU!!!\nActivate it in your hand to point to the nearest victim." + flags_1 = CONDUCT_1 | NODROP_1 | DROPDEL_1 + slot_flags = null + block_chance = 0 //RNG WON'T HELP YOU NOW, PANSY + luminosity = 3 + attack_verb = list("brutalized", "eviscerated", "disemboweled", "hacked", "carved", "cleaved") //ONLY THE MOST VISCERAL ATTACK VERBS + var/notches = 0 //HOW MANY PEOPLE HAVE BEEN SLAIN WITH THIS BLADE + var/obj/item/disk/nuclear/nuke_disk //OUR STORED NUKE DISK + +/obj/item/claymore/highlander/Initialize() + . = ..() + START_PROCESSING(SSobj, src) + +/obj/item/claymore/highlander/Destroy() + if(nuke_disk) + nuke_disk.forceMove(get_turf(src)) + nuke_disk.visible_message("The nuke disk is vulnerable!") + nuke_disk = null + STOP_PROCESSING(SSobj, src) + return ..() + +/obj/item/claymore/highlander/process() + if(ishuman(loc)) + var/mob/living/carbon/human/H = loc + loc.layer = LARGE_MOB_LAYER //NO HIDING BEHIND PLANTS FOR YOU, DICKWEED (HA GET IT, BECAUSE WEEDS ARE PLANTS) + H.bleedsuppress = TRUE //AND WE WON'T BLEED OUT LIKE COWARDS + else + if(!admin_spawned) + qdel(src) + + +/obj/item/claymore/highlander/pickup(mob/living/user) + to_chat(user, "The power of Scotland protects you! You are shielded from all stuns and knockdowns.") + user.add_stun_absorption("highlander", INFINITY, 1, " is protected by the power of Scotland!", "The power of Scotland absorbs the stun!", " is protected by the power of Scotland!") + user.status_flags += IGNORESLOWDOWN + +/obj/item/claymore/highlander/dropped(mob/living/user) + user.status_flags -= IGNORESLOWDOWN + qdel(src) //If this ever happens, it's because you lost an arm + +/obj/item/claymore/highlander/examine(mob/user) + ..() + to_chat(user, "It has [!notches ? "nothing" : "[notches] notches"] scratched into the blade.") + if(nuke_disk) + to_chat(user, "It's holding the nuke disk!") + +/obj/item/claymore/highlander/attack(mob/living/target, mob/living/user) + . = ..() + if(!QDELETED(target) && iscarbon(target) && target.stat == DEAD && target.mind && target.mind.special_role == "highlander") + user.fully_heal() //STEAL THE LIFE OF OUR FALLEN FOES + add_notch(user) + target.visible_message("[target] crumbles to dust beneath [user]'s blows!", "As you fall, your body crumbles to dust!") + target.dust() + +/obj/item/claymore/highlander/attack_self(mob/living/user) + var/closest_victim + var/closest_distance = 255 + for(var/mob/living/carbon/human/H in GLOB.player_list - user) + if(H.client && H.mind.special_role == "highlander" && (!closest_victim || get_dist(user, closest_victim) < closest_distance)) + closest_victim = H + if(!closest_victim) + to_chat(user, "[src] thrums for a moment and falls dark. Perhaps there's nobody nearby.") + return + to_chat(user, "[src] thrums and points to the [dir2text(get_dir(user, closest_victim))].") + +/obj/item/claymore/highlander/IsReflect() + return 1 //YOU THINK YOUR PUNY LASERS CAN STOP ME? + +/obj/item/claymore/highlander/proc/add_notch(mob/living/user) //DYNAMIC CLAYMORE PROGRESSION SYSTEM - THIS IS THE FUTURE + notches++ + force++ + var/new_name = name + switch(notches) + if(1) + to_chat(user, "Your first kill - hopefully one of many. You scratch a notch into [src]'s blade.") + to_chat(user, "You feel your fallen foe's soul entering your blade, restoring your wounds!") + new_name = "notched claymore" + if(2) + to_chat(user, "Another falls before you. Another soul fuses with your own. Another notch in the blade.") + new_name = "double-notched claymore" + add_atom_colour(rgb(255, 235, 235), ADMIN_COLOUR_PRIORITY) + if(3) + to_chat(user, "You're beginning to relish the thrill of battle.") + new_name = "triple-notched claymore" + add_atom_colour(rgb(255, 215, 215), ADMIN_COLOUR_PRIORITY) + if(4) + to_chat(user, "You've lost count of how many you've killed.") + new_name = "many-notched claymore" + add_atom_colour(rgb(255, 195, 195), ADMIN_COLOUR_PRIORITY) + if(5) + to_chat(user, "Five voices now echo in your mind, cheering the slaughter.") + new_name = "battle-tested claymore" + add_atom_colour(rgb(255, 175, 175), ADMIN_COLOUR_PRIORITY) + if(6) + to_chat(user, "Is this what the vikings felt like? Visions of glory fill your head as you slay your sixth foe.") + new_name = "battle-scarred claymore" + add_atom_colour(rgb(255, 155, 155), ADMIN_COLOUR_PRIORITY) + if(7) + to_chat(user, "Kill. Butcher. Conquer.") + new_name = "vicious claymore" + add_atom_colour(rgb(255, 135, 135), ADMIN_COLOUR_PRIORITY) + if(8) + to_chat(user, "IT NEVER GETS OLD. THE SCREAMING. THE BLOOD AS IT SPRAYS ACROSS YOUR FACE.") + new_name = "bloodthirsty claymore" + add_atom_colour(rgb(255, 115, 115), ADMIN_COLOUR_PRIORITY) + if(9) + to_chat(user, "ANOTHER ONE FALLS TO YOUR BLOWS. ANOTHER WEAKLING UNFIT TO LIVE.") + new_name = "gore-stained claymore" + add_atom_colour(rgb(255, 95, 95), ADMIN_COLOUR_PRIORITY) + if(10) + user.visible_message("[user]'s eyes light up with a vengeful fire!", \ + "YOU FEEL THE POWER OF VALHALLA FLOWING THROUGH YOU! THERE CAN BE ONLY ONE!!!") + user.update_icons() + new_name = "GORE-DRENCHED CLAYMORE OF [pick("THE WHIMSICAL SLAUGHTER", "A THOUSAND SLAUGHTERED CATTLE", "GLORY AND VALHALLA", "ANNIHILATION", "OBLITERATION")]" + icon_state = "claymore_valhalla" + item_state = "cultblade" + remove_atom_colour(ADMIN_COLOUR_PRIORITY) + + name = new_name + playsound(user, 'sound/items/screwdriver2.ogg', 50, 1) + +/obj/item/katana + name = "katana" + desc = "Woefully underpowered in D20" + icon_state = "katana" + item_state = "katana" + lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi' + righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi' + flags_1 = CONDUCT_1 + slot_flags = SLOT_BELT | SLOT_BACK + force = 40 + throwforce = 10 + w_class = WEIGHT_CLASS_NORMAL + hitsound = 'sound/weapons/bladeslice.ogg' + attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") + block_chance = 50 + sharpness = IS_SHARP + max_integrity = 200 + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + resistance_flags = FIRE_PROOF + +/obj/item/katana/cursed + slot_flags = null + +/obj/item/katana/suicide_act(mob/user) + user.visible_message("[user] is slitting [user.p_their()] stomach open with [src]! It looks like [user.p_theyre()] trying to commit seppuku!") + return(BRUTELOSS) + +/obj/item/wirerod + name = "wired rod" + desc = "A rod with some wire wrapped around the top. It'd be easy to attach something to the top bit." + icon_state = "wiredrod" + item_state = "rods" + flags_1 = CONDUCT_1 + force = 9 + throwforce = 10 + w_class = WEIGHT_CLASS_NORMAL + materials = list(MAT_METAL=1150, MAT_GLASS=75) + attack_verb = list("hit", "bludgeoned", "whacked", "bonked") + +/obj/item/wirerod/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/shard)) + var/obj/item/twohanded/spear/S = new /obj/item/twohanded/spear + + remove_item_from_storage(user) + qdel(I) + qdel(src) + + user.put_in_hands(S) + to_chat(user, "You fasten the glass shard to the top of the rod with the cable.") + + else if(istype(I, /obj/item/device/assembly/igniter) && !(I.flags_1 & NODROP_1)) + var/obj/item/melee/baton/cattleprod/P = new /obj/item/melee/baton/cattleprod + + remove_item_from_storage(user) + + to_chat(user, "You fasten [I] to the top of the rod with the cable.") + + qdel(I) + qdel(src) + + user.put_in_hands(P) + else + return ..() + + +/obj/item/throwing_star + name = "throwing star" + desc = "An ancient weapon still used to this day due to it's ease of lodging itself into victim's body parts" + icon_state = "throwingstar" + item_state = "eshield0" + lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi' + force = 2 + throwforce = 20 //This is never used on mobs since this has a 100% embed chance. + throw_speed = 4 + embedded_pain_multiplier = 4 + w_class = WEIGHT_CLASS_SMALL + embed_chance = 100 + embedded_fall_chance = 0 //Hahaha! + sharpness = IS_SHARP + materials = list(MAT_METAL=500, MAT_GLASS=500) + resistance_flags = FIRE_PROOF + + +/obj/item/switchblade + name = "switchblade" + icon_state = "switchblade" + lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi' + righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi' + desc = "A sharp, concealable, spring-loaded knife." + flags_1 = CONDUCT_1 + force = 3 + w_class = WEIGHT_CLASS_SMALL + throwforce = 5 + throw_speed = 3 + throw_range = 6 + materials = list(MAT_METAL=12000) + origin_tech = "engineering=3;combat=2" + hitsound = 'sound/weapons/genhit.ogg' + attack_verb = list("stubbed", "poked") + resistance_flags = FIRE_PROOF + var/extended = 0 + +/obj/item/switchblade/attack_self(mob/user) + extended = !extended + playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1) + if(extended) + force = 20 + w_class = WEIGHT_CLASS_NORMAL + throwforce = 23 + icon_state = "switchblade_ext" + attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") + hitsound = 'sound/weapons/bladeslice.ogg' + sharpness = IS_SHARP + else + force = 3 + w_class = WEIGHT_CLASS_SMALL + throwforce = 5 + icon_state = "switchblade" + attack_verb = list("stubbed", "poked") + hitsound = 'sound/weapons/genhit.ogg' + sharpness = IS_BLUNT + +/obj/item/switchblade/suicide_act(mob/user) + user.visible_message("[user] is slitting [user.p_their()] own throat with [src]! It looks like [user.p_theyre()] trying to commit suicide!") + return (BRUTELOSS) + +/obj/item/phone + name = "red phone" + desc = "Should anything ever go wrong..." + icon = 'icons/obj/items_and_weapons.dmi' + icon_state = "red_phone" + force = 3 + throwforce = 2 + throw_speed = 3 + throw_range = 4 + w_class = WEIGHT_CLASS_SMALL + attack_verb = list("called", "rang") + hitsound = 'sound/weapons/ring.ogg' + +/obj/item/phone/suicide_act(mob/user) + if(locate(/obj/structure/chair/stool) in user.loc) + user.visible_message("[user] begins to tie a noose with [src]'s cord! It looks like [user.p_theyre()] trying to commit suicide!") + else + user.visible_message("[user] is strangling [user.p_them()]self with [src]'s cord! It looks like [user.p_theyre()] trying to commit suicide!") + return(OXYLOSS) + +/obj/item/cane + name = "cane" + desc = "A cane used by a true gentleman. Or a clown." + icon = 'icons/obj/items_and_weapons.dmi' + icon_state = "cane" + item_state = "stick" + lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi' + righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi' + force = 5 + throwforce = 5 + w_class = WEIGHT_CLASS_SMALL + materials = list(MAT_METAL=50) + attack_verb = list("bludgeoned", "whacked", "disciplined", "thrashed") + +/obj/item/staff + name = "wizard staff" + desc = "Apparently a staff used by the wizard." + icon = 'icons/obj/wizard.dmi' + icon_state = "staff" + lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi' + righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi' + force = 3 + throwforce = 5 + throw_speed = 2 + throw_range = 5 + w_class = WEIGHT_CLASS_SMALL + armour_penetration = 100 + attack_verb = list("bludgeoned", "whacked", "disciplined") + resistance_flags = FLAMMABLE + +/obj/item/staff/broom + name = "broom" + desc = "Used for sweeping, and flying into the night while cackling. Black cat not included." + icon = 'icons/obj/wizard.dmi' + icon_state = "broom" + resistance_flags = FLAMMABLE + +/obj/item/staff/stick + name = "stick" + desc = "A great tool to drag someone else's drinks across the bar." + icon = 'icons/obj/items_and_weapons.dmi' + icon_state = "stick" + item_state = "stick" + lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi' + righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi' + force = 3 + throwforce = 5 + throw_speed = 2 + throw_range = 5 + w_class = WEIGHT_CLASS_SMALL + +/obj/item/ectoplasm + name = "ectoplasm" + desc = "spooky" + gender = PLURAL + icon = 'icons/obj/wizard.dmi' + icon_state = "ectoplasm" + +/obj/item/ectoplasm/suicide_act(mob/user) + user.visible_message("[user] is inhaling [src]! It looks like [user.p_theyre()] trying to visit the astral plane.") + return (OXYLOSS) + +/obj/item/mounted_chainsaw + name = "mounted chainsaw" + desc = "A chainsaw that has replaced your arm." + icon_state = "chainsaw_on" + item_state = "mounted_chainsaw" + lefthand_file = 'icons/mob/inhands/weapons/chainsaw_lefthand.dmi' + righthand_file = 'icons/mob/inhands/weapons/chainsaw_righthand.dmi' + flags_1 = NODROP_1 | ABSTRACT_1 | DROPDEL_1 + w_class = WEIGHT_CLASS_HUGE + force = 21 + throwforce = 0 + throw_range = 0 + throw_speed = 0 + sharpness = IS_SHARP + attack_verb = list("sawed", "torn", "cut", "chopped", "diced") + hitsound = 'sound/weapons/chainsawhit.ogg' + +/obj/item/mounted_chainsaw/Destroy() + var/obj/item/bodypart/part + new /obj/item/twohanded/required/chainsaw(get_turf(src)) + if(iscarbon(loc)) + var/mob/living/carbon/holder = loc + var/index = holder.get_held_index_of_item(src) + if(index) + part = holder.hand_bodyparts[index] + . = ..() + if(part) + part.drop_limb() + +/obj/item/statuebust + name = "bust" + desc = "A priceless ancient marble bust, the kind that belongs in a museum." //or you can hit people with it + icon = 'icons/obj/statue.dmi' + icon_state = "bust" + force = 15 + throwforce = 10 + throw_speed = 5 + throw_range = 2 + attack_verb = list("busted") + +/obj/item/tailclub + name = "tail club" + desc = "For the beating to death of lizards with their own tails." + icon_state = "tailclub" + force = 14 + throwforce = 1 // why are you throwing a club do you even weapon + throw_speed = 1 + throw_range = 1 + attack_verb = list("clubbed", "bludgeoned") + +/obj/item/melee/chainofcommand/tailwhip + name = "liz o' nine tails" + desc = "A whip fashioned from the severed tails of lizards." + icon_state = "tailwhip" + origin_tech = "engineering=3;combat=3;biotech=3" + needs_permit = 0 + +/obj/item/melee/chainofcommand/tailwhip/kitty + name = "cat o' nine tails" + desc = "A whip fashioned from the severed tails of cats." + icon_state = "catwhip" + +/obj/item/melee/skateboard + name = "skateboard" + desc = "A skateboard. It can be placed on its wheels and ridden, or used as a strong weapon." + icon_state = "skateboard" + item_state = "skateboard" + force = 12 + throwforce = 4 + w_class = WEIGHT_CLASS_HUGE + attack_verb = list("smacked", "whacked", "slammed", "smashed") + +/obj/item/melee/skateboard/attack_self(mob/user) + new /obj/vehicle/scooter/skateboard(get_turf(user)) + qdel(src) + +/obj/item/melee/baseball_bat + name = "baseball bat" + desc = "There ain't a skull in the league that can withstand a swatter." + icon = 'icons/obj/items_and_weapons.dmi' + icon_state = "baseball_bat" + item_state = "baseball_bat" + lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi' + righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi' + force = 10 + throwforce = 12 + attack_verb = list("beat", "smacked") + w_class = WEIGHT_CLASS_HUGE + var/homerun_ready = 0 + var/homerun_able = 0 + +/obj/item/melee/baseball_bat/homerun + name = "home run bat" + desc = "This thing looks dangerous... Dangerously good at baseball, that is." + homerun_able = 1 + +/obj/item/melee/baseball_bat/attack_self(mob/user) + if(!homerun_able) + ..() + return + if(homerun_ready) + to_chat(user, "You're already ready to do a home run!") + ..() + return + to_chat(user, "You begin gathering strength...") + playsound(get_turf(src), 'sound/magic/lightning_chargeup.ogg', 65, 1) + if(do_after(user, 90, target = src)) + to_chat(user, "You gather power! Time for a home run!") + homerun_ready = 1 + ..() + +/obj/item/melee/baseball_bat/attack(mob/living/target, mob/living/user) + . = ..() + var/atom/throw_target = get_edge_target_turf(target, user.dir) + if(homerun_ready) + user.visible_message("It's a home run!") + target.throw_at(throw_target, rand(8,10), 14, user) + target.ex_act(EXPLODE_HEAVY) + playsound(get_turf(src), 'sound/weapons/homerun.ogg', 100, 1) + homerun_ready = 0 + return + else if(!target.anchored) + target.throw_at(throw_target, rand(1,2), 7, user) + +/obj/item/melee/baseball_bat/ablative + name = "metal baseball bat" + desc = "This bat is made of highly reflective, highly armored material." + icon_state = "baseball_bat_metal" + item_state = "baseball_bat_metal" + force = 12 + throwforce = 15 + +/obj/item/melee/baseball_bat/ablative/IsReflect()//some day this will reflect thrown items instead of lasers + var/picksound = rand(1,2) + var/turf = get_turf(src) + if(picksound == 1) + playsound(turf, 'sound/weapons/effects/batreflect1.ogg', 50, 1) + if(picksound == 2) + playsound(turf, 'sound/weapons/effects/batreflect2.ogg', 50, 1) + return 1 + +/obj/item/melee/flyswatter + name = "flyswatter" + desc = "Useful for killing insects of all sizes." + icon = 'icons/obj/items_and_weapons.dmi' + icon_state = "flyswatter" + item_state = "flyswatter" + lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi' + righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi' + force = 1 + throwforce = 1 + attack_verb = list("swatted", "smacked") + hitsound = 'sound/effects/snap.ogg' + w_class = WEIGHT_CLASS_SMALL + //Things in this list will be instantly splatted. Flyman weakness is handled in the flyman species weakness proc. + var/list/strong_against + +/obj/item/melee/flyswatter/Initialize() + . = ..() + strong_against = typecacheof(list( + /mob/living/simple_animal/hostile/poison/bees/, + /mob/living/simple_animal/butterfly, + /mob/living/simple_animal/cockroach, + /obj/item/queen_bee + )) + + +/obj/item/melee/flyswatter/afterattack(atom/target, mob/user, proximity_flag) + if(proximity_flag) + if(is_type_in_typecache(target, strong_against)) + new /obj/effect/decal/cleanable/deadcockroach(get_turf(target)) + to_chat(user, "You easily splat the [target].") + if(istype(target, /mob/living/)) + var/mob/living/bug = target + bug.death(1) + else + qdel(target) + +/obj/item/circlegame + name = "circled hand" + desc = "If somebody looks at this while it's below your waist, you get to bop them." + icon_state = "madeyoulook" + force = 0 + throwforce = 0 + flags_1 = DROPDEL_1 | ABSTRACT_1 + attack_verb = list("bopped") + +/obj/item/proc/can_trigger_gun(mob/living/user) + if(!user.can_use_guns(src)) + return FALSE return TRUE diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 1f3668f283..c8f105dfbe 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -169,6 +169,7 @@ return /obj/singularity_pull(S, current_size) + ..() if(!anchored || current_size >= STAGE_FIVE) step_towards(src,S) diff --git a/code/game/objects/structures/beds_chairs/sofa.dm b/code/game/objects/structures/beds_chairs/sofa.dm new file mode 100644 index 0000000000..69d0f4b8d8 --- /dev/null +++ b/code/game/objects/structures/beds_chairs/sofa.dm @@ -0,0 +1,12 @@ +/obj/structure/chair/sofa + name = "old ratty sofa" + icon_state = "sofamiddle" + icon = 'icons/obj/sofa.dmi' + buildstackamount = 1 + +/obj/structure/chair/sofa/left + icon_state = "sofaend_left" +/obj/structure/chair/sofa/right + icon_state = "sofaend_right" +/obj/structure/chair/sofa/corner + icon_state = "sofacorner" \ No newline at end of file diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 78e672e49d..4f8705aa71 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -16,7 +16,7 @@ integrity_failure = 50 armor = list(melee = 20, bullet = 10, laser = 10, energy = 0, bomb = 10, bio = 0, rad = 0, fire = 70, acid = 60) var/breakout_time = 2 - var/lastbang + var/message_cooldown var/can_weld_shut = TRUE var/horizontal = FALSE var/allow_objects = FALSE @@ -300,14 +300,12 @@ /obj/structure/closet/relaymove(mob/user) if(user.stat || !isturf(loc) || !isliving(user)) return - var/mob/living/L = user - if(!open()) - if(L.last_special <= world.time) - container_resist(L) - if(world.time > lastbang+5) - lastbang = world.time - for(var/mob/M in get_hearers_in_view(src, null)) - M.show_message("BANG, bang!", 2) + if(locked) + if(message_cooldown <= world.time) + message_cooldown = world.time + 50 + to_chat(user, "[src]'s door won't budge!") + return + container_resist() /obj/structure/closet/attack_hand(mob/user) ..() @@ -367,9 +365,10 @@ //okay, so the closet is either welded or locked... resist!!! user.changeNext_move(CLICK_CD_BREAKOUT) user.last_special = world.time + CLICK_CD_BREAKOUT - to_chat(user, "You lean on the back of [src] and start pushing the door open.") - visible_message("[src] begins to shake violently!") - if(do_after(user,(breakout_time * 60 * 10), target = src)) //minutes * 60seconds * 10deciseconds + user.visible_message("[src] begins to shake violently!", \ + "You lean on the back of [src] and start pushing the door open... (this will take about [(breakout_time<1) ? "[breakout_time*60] seconds" : "[breakout_time] minute\s"].)", \ + "You hear banging from [src].") + if(do_after(user,(breakout_time*60*10), target = src)) //minutes * 60seconds * 10deciseconds if(!user || user.stat != CONSCIOUS || user.loc != src || opened || (!locked && !welded) ) return //we check after a while whether there is a point of resisting anymore and whether the user is capable of resisting @@ -388,7 +387,7 @@ /obj/structure/closet/AltClick(mob/user) ..() - if(!user.canUseTopic(src, be_close=TRUE)) + if(!user.canUseTopic(src, be_close=TRUE) || isturf(loc)) to_chat(user, "You can't do that right now!") return if(opened || !secure) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm index f13eaf73c4..aeacf17598 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm @@ -185,6 +185,7 @@ new /obj/item/clothing/suit/armor/vest/det_suit(src) new /obj/item/storage/belt/holster/full(src) new /obj/item/pinpointer/crew(src) + new /obj/item/device/mass_spectrometer(src) /obj/structure/closet/secure_closet/injection name = "lethal injections" diff --git a/code/game/objects/structures/ladders.dm b/code/game/objects/structures/ladders.dm index 84d9481464..d0ad32113d 100644 --- a/code/game/objects/structures/ladders.dm +++ b/code/game/objects/structures/ladders.dm @@ -7,6 +7,7 @@ var/height = 0 //the 'height' of the ladder. higher numbers are considered physically higher var/obj/structure/ladder/down = null //the ladder below this one var/obj/structure/ladder/up = null //the ladder above this one + var/auto_connect = FALSE /obj/structure/ladder/unbreakable //mostly useful for awaymissions to prevent halting progress in a mission name = "sturdy ladder" @@ -19,12 +20,18 @@ return INITIALIZE_HINT_LATELOAD /obj/structure/ladder/Destroy() + if(up && up.down == src) + up.down = null + up.update_icon() + if(down && down.up == src) + down.up = null + down.update_icon() GLOB.ladders -= src . = ..() /obj/structure/ladder/LateInitialize() for(var/obj/structure/ladder/L in GLOB.ladders) - if(L.id == id) + if(L.id == id || (auto_connect && L.auto_connect && L.x == x && L.y == y)) if(L.height == (height - 1)) down = L continue @@ -50,31 +57,33 @@ else //wtf make your ladders properly assholes icon_state = "ladder00" -/obj/structure/ladder/proc/go_up(mob/user,is_ghost) +/obj/structure/ladder/proc/travel(going_up, mob/user, is_ghost, obj/structure/ladder/ladder) if(!is_ghost) - show_fluff_message(1,user) - up.add_fingerprint(user) - user.loc = get_turf(up) + show_fluff_message(going_up,user) + ladder.add_fingerprint(user) + + var/atom/movable/AM + if(user.pulling) + AM = user.pulling + user.pulling.forceMove(get_turf(ladder)) + user.forceMove(get_turf(ladder)) + if(AM) + user.start_pulling(AM) -/obj/structure/ladder/proc/go_down(mob/user,is_ghost) - if(!is_ghost) - show_fluff_message(0,user) - down.add_fingerprint(user) - user.loc = get_turf(down) /obj/structure/ladder/proc/use(mob/user,is_ghost=0) if(up && down) switch( alert("Go up or down the ladder?", "Ladder", "Up", "Down", "Cancel") ) if("Up") - go_up(user,is_ghost) + travel(TRUE, user, is_ghost, up) if("Down") - go_down(user,is_ghost) + travel(FALSE, user, is_ghost, down) if("Cancel") return else if(up) - go_up(user,is_ghost) + travel(TRUE, user, is_ghost, up) else if(down) - go_down(user,is_ghost) + travel(FALSE, user,is_ghost, down) else to_chat(user, "[src] doesn't seem to lead anywhere!") @@ -108,3 +117,14 @@ . = ..() else return QDEL_HINT_LETMELIVE + +/obj/structure/ladder/unbreakable/singularity_pull() + return + +/obj/structure/ladder/auto_connect //They will connect to ladders with the same X and Y without needing to share an ID + auto_connect = TRUE + + +/obj/structure/ladder/singularity_pull() + visible_message("[src] is torn to pieces by the gravitational pull!") + qdel(src) diff --git a/code/game/objects/structures/lattice.dm b/code/game/objects/structures/lattice.dm index 8a24b0271f..081cf186a3 100644 --- a/code/game/objects/structures/lattice.dm +++ b/code/game/objects/structures/lattice.dm @@ -45,6 +45,7 @@ qdel(src) /obj/structure/lattice/singularity_pull(S, current_size) + ..() if(current_size >= STAGE_FOUR) deconstruct() diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 600e15201d..f4a98811c0 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -23,6 +23,8 @@ var/obj/structure/tray/connected = null var/locked = FALSE var/opendir = SOUTH + var/message_cooldown + var/breakout_time = 1 /obj/structure/bodycontainer/Destroy() open() @@ -41,6 +43,11 @@ /obj/structure/bodycontainer/relaymove(mob/user) if(user.stat || !isturf(loc)) return + if(locked) + if(message_cooldown <= world.time) + message_cooldown = world.time + 50 + to_chat(user, "[src]'s door won't budge!") + return open() /obj/structure/bodycontainer/attack_paw(mob/user) @@ -84,11 +91,20 @@ qdel(src) /obj/structure/bodycontainer/container_resist(mob/living/user) - open() - -/obj/structure/bodycontainer/relay_container_resist(mob/living/user, obj/O) - to_chat(user, "You slam yourself into the side of [O].") - container_resist(user) + if(!locked) + open() + return + user.changeNext_move(CLICK_CD_BREAKOUT) + user.last_special = world.time + CLICK_CD_BREAKOUT + user.visible_message(null, \ + "You lean on the back of [src] and start pushing the tray open... (this will take about [(breakout_time<1) ? "[breakout_time*60] seconds" : "[breakout_time] minute\s"].)", \ + "You hear a metallic creaking from [src].") + if(do_after(user,(breakout_time*60*10), target = src)) //minutes * 60seconds * 10deciseconds + if(!user || user.stat != CONSCIOUS || user.loc != src ) + return + user.visible_message("[user] successfully broke out of [src]!", \ + "You successfully break out of [src]!") + open() /obj/structure/bodycontainer/proc/open() playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1) diff --git a/code/game/objects/structures/statues.dm b/code/game/objects/structures/statues.dm index d2e008f4f8..63333ba07b 100644 --- a/code/game/objects/structures/statues.dm +++ b/code/game/objects/structures/statues.dm @@ -155,12 +155,9 @@ /obj/structure/statue/plasma/bullet_act(obj/item/projectile/Proj) var/burn = FALSE - if(istype(Proj, /obj/item/projectile/beam)) + if(!(Proj.nodamage) && Proj.damage_type == BURN) PlasmaBurn(2500) burn = TRUE - else if(istype(Proj, /obj/item/projectile/ion)) - PlasmaBurn(500) - burn = TRUE if(burn) var/turf/T = get_turf(src) if(Proj.firer) diff --git a/code/game/objects/structures/transit_tubes/transit_tube.dm b/code/game/objects/structures/transit_tubes/transit_tube.dm index 7b86cdffcc..10d883d392 100644 --- a/code/game/objects/structures/transit_tubes/transit_tube.dm +++ b/code/game/objects/structures/transit_tubes/transit_tube.dm @@ -30,6 +30,7 @@ return ..() /obj/structure/transit_tube/singularity_pull(S, current_size) + ..() if(current_size >= STAGE_FIVE) deconstruct(FALSE) diff --git a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm index 89f02b13af..43394f01c9 100644 --- a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm +++ b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm @@ -62,10 +62,14 @@ AM.ex_act(severity, target) /obj/structure/transit_tube_pod/singularity_pull(S, current_size) + ..() if(current_size >= STAGE_FIVE) deconstruct(FALSE) /obj/structure/transit_tube_pod/container_resist(mob/living/user) + if(!user.incapacitated()) + empty_pod() + return if(!moving) user.changeNext_move(CLICK_CD_BREAKOUT) user.last_special = world.time + CLICK_CD_BREAKOUT diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index ea1f1f5214..5600fc16f3 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -535,6 +535,7 @@ name = "puddle" desc = "A puddle used for washing one's hands and face." icon_state = "puddle" + resistance_flags = UNACIDABLE /obj/structure/sink/puddle/attack_hand(mob/M) icon_state = "puddle-splash" @@ -546,6 +547,10 @@ . = ..() icon_state = "puddle" +/obj/structure/sink/puddle/deconstruct(disassembled = TRUE) + qdel(src) + + //Shower Curtains// //Defines used are pre-existing in layers.dm// diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index e70d5d3ddb..170a651315 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -105,6 +105,7 @@ qdel(src) /obj/structure/window/singularity_pull(S, current_size) + ..() if(current_size >= STAGE_FIVE) deconstruct(FALSE) diff --git a/code/game/say.dm b/code/game/say.dm index 1aaa3d6041..570974c0bc 100644 --- a/code/game/say.dm +++ b/code/game/say.dm @@ -44,7 +44,7 @@ GLOBAL_LIST_INIT(freqtospan, list( /atom/movable/proc/get_spans() return list() -/atom/movable/proc/compose_message(atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, message_mode) +/atom/movable/proc/compose_message(atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, message_mode, face_name = FALSE) //This proc uses text() because it is faster than appending strings. Thanks BYOND. //Basic span var/spanpart1 = "" @@ -54,6 +54,9 @@ GLOBAL_LIST_INIT(freqtospan, list( var/freqpart = radio_freq ? "\[[get_radio_name(radio_freq)]\] " : "" //Speaker name var/namepart = "[speaker.GetVoice()][speaker.get_alt_name()]" + if(face_name && ishuman(speaker)) + var/mob/living/carbon/human/H = speaker + namepart = "[H.get_face_name()]" //So "fake" speaking like in hallucinations does not give the speaker away if disguised //End name span. var/endspanpart = "" diff --git a/code/game/turfs/open.dm b/code/game/turfs/open.dm index 2622a4e74c..f97f79068d 100644 --- a/code/game/turfs/open.dm +++ b/code/game/turfs/open.dm @@ -4,6 +4,9 @@ var/wet = 0 var/wet_time = 0 // Time in seconds that this floor will be wet for. var/mutable_appearance/wet_overlay + var/postdig_icon_change = FALSE + var/postdig_icon + var/list/archdrops /turf/open/indestructible name = "floor" diff --git a/code/game/turfs/simulated/chasm.dm b/code/game/turfs/simulated/chasm.dm index a51240c969..a7acd8d6fa 100644 --- a/code/game/turfs/simulated/chasm.dm +++ b/code/game/turfs/simulated/chasm.dm @@ -133,6 +133,9 @@ drop_y = y if(z+1 <= world.maxz) drop_z = z+1 + var/turf/T = locate(drop_x, drop_y, drop_z) + T.visible_message("The ceiling gives way!") + playsound(T, 'sound/effects/break_stone.ogg', 50, 1) /turf/open/chasm/straight_down/lava_land_surface diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index c13def9897..df3d2aba86 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -117,10 +117,10 @@ /turf/open/floor/proc/make_plating() return ChangeTurf(/turf/open/floor/plating) -/turf/open/floor/ChangeTurf(new_path) +/turf/open/floor/ChangeTurf(path, new_baseturf, defer_change = FALSE, ignore_air = FALSE, forceop = FALSE) if(!isfloorturf(src)) return ..() //fucking turfs switch the fucking src of the fucking running procs - if(!ispath(new_path, /turf/open/floor)) + if(!ispath(path, /turf/open/floor)) return ..() var/old_icon = icon_regular_floor var/old_dir = dir @@ -170,6 +170,7 @@ return make_plating() /turf/open/floor/singularity_pull(S, current_size) + ..() if(current_size == STAGE_THREE) if(prob(30)) if(floor_tile) diff --git a/code/game/turfs/simulated/floor/light_floor.dm b/code/game/turfs/simulated/floor/light_floor.dm index 971701aa2b..542a0ed81d 100644 --- a/code/game/turfs/simulated/floor/light_floor.dm +++ b/code/game/turfs/simulated/floor/light_floor.dm @@ -43,7 +43,7 @@ icon_state = "light_off" -/turf/open/floor/light/ChangeTurf(turf/T) +/turf/open/floor/light/ChangeTurf(path, new_baseturf, defer_change = FALSE, ignore_air = FALSE, forceop = FALSE) set_light(0) return ..() diff --git a/code/game/turfs/simulated/floor/misc_floor.dm b/code/game/turfs/simulated/floor/misc_floor.dm index 6ffdcb3af5..f2475cf997 100644 --- a/code/game/turfs/simulated/floor/misc_floor.dm +++ b/code/game/turfs/simulated/floor/misc_floor.dm @@ -269,11 +269,12 @@ narsie_act(force, ignore_mobs, probability) /turf/open/floor/vines/singularity_pull(S, current_size) + ..() if(current_size >= STAGE_FIVE) if(prob(50)) ChangeTurf(src.baseturf) -/turf/open/floor/vines/ChangeTurf(turf/open/floor/T) +/turf/open/floor/vines/ChangeTurf(path, new_baseturf, defer_change = FALSE, ignore_air = FALSE, forceop = FALSE) . = ..() //Do this *after* the turf has changed as qdel in spacevines will call changeturf again if it hasn't for(var/obj/structure/spacevine/SV in src) diff --git a/code/game/turfs/simulated/floor/plating/asteroid.dm b/code/game/turfs/simulated/floor/plating/asteroid.dm index b24b758d73..c6dd8cb2eb 100644 --- a/code/game/turfs/simulated/floor/plating/asteroid.dm +++ b/code/game/turfs/simulated/floor/plating/asteroid.dm @@ -9,11 +9,11 @@ icon = 'icons/turf/floors.dmi' icon_state = "asteroid" icon_plating = "asteroid" + postdig_icon_change = TRUE var/environment_type = "asteroid" var/turf_type = /turf/open/floor/plating/asteroid //Because caves do whacky shit to revert to normal - var/dug = 0 //0 = has not yet been dug, 1 = has already been dug - var/sand_type = /obj/item/ore/glass var/floor_variance = 20 //probability floor has a different icon state + archdrops = list(/obj/item/ore/glass = 5) /turf/open/floor/plating/asteroid/Initialize() var/proper_name = name @@ -22,6 +22,9 @@ if(prob(floor_variance)) icon_state = "[environment_type][rand(0,12)]" + if(LAZYLEN(archdrops)) + AddComponent(/datum/component/archaeology, 100, archdrops) + /turf/open/floor/plating/asteroid/burn_tile() return @@ -31,46 +34,7 @@ /turf/open/floor/plating/asteroid/MakeDry(wet_setting = TURF_WET_WATER) return -/turf/open/floor/plating/asteroid/ex_act(severity, target) - contents_explosion(severity, target) - switch(severity) - if(3) - return - if(2) - if(prob(20)) - src.gets_dug() - if(1) - src.gets_dug() - /turf/open/floor/plating/asteroid/attackby(obj/item/W, mob/user, params) - //note that this proc does not call ..() - if(!W || !user) - return 0 - var/digging_speed = 0 - if (istype(W, /obj/item/shovel)) - var/obj/item/shovel/S = W - digging_speed = S.digspeed - else if (istype(W, /obj/item/pickaxe)) - var/obj/item/pickaxe/P = W - digging_speed = P.digspeed - if (digging_speed) - var/turf/T = user.loc - if(!isturf(T)) - return - - if (dug) - to_chat(user, "This area has already been dug!") - return - - to_chat(user, "You start digging...") - playsound(src, 'sound/effects/shovel_dig.ogg', 50, 1) - - if(do_after(user, digging_speed, target = src)) - if(istype(src, /turf/open/floor/plating/asteroid)) - to_chat(user, "You dig a hole.") - gets_dug() - SSblackbox.add_details("pick_used_mining","[W.type]") - if(istype(W, /obj/item/storage/bag/ore)) var/obj/item/storage/bag/ore/S = W if(S.collection_mode == 1) @@ -88,37 +52,16 @@ var/turf/open/floor/light/F = T F.state = L.state playsound(src, 'sound/weapons/genhit.ogg', 50, 1) - -/turf/open/floor/plating/asteroid/proc/gets_dug() - if(dug) return - for(var/i in 1 to 5) - new sand_type(src) - dug = 1 - icon_plating = "[environment_type]_dug" - icon_state = "[environment_type]_dug" - slowdown = 0 - return + + return ..() + /turf/open/floor/plating/asteroid/singularity_act() if(turf_z_is_planet(src)) return ..() ChangeTurf(/turf/open/space) -/turf/open/floor/plating/asteroid/singularity_pull(S, current_size) - if(dug) - return - switch(current_size) - if(STAGE_THREE) - if(!prob(30)) - gets_dug() - if(STAGE_FOUR) - if(prob(50)) - gets_dug() - else - if(current_size >= STAGE_FIVE && prob(70)) - gets_dug() - /turf/open/floor/plating/asteroid/basalt name = "volcanic floor" @@ -127,7 +70,7 @@ icon_state = "basalt" icon_plating = "basalt" environment_type = "basalt" - sand_type = /obj/item/ore/glass/basalt + archdrops = list(/obj/item/ore/glass/basalt = 5) floor_variance = 15 /turf/open/floor/plating/asteroid/basalt/lava //lava underneath @@ -147,10 +90,10 @@ if("basalt5", "basalt9") B.set_light(1.4, 0.6, LIGHT_COLOR_LAVA) //barely anything! -/turf/open/floor/plating/asteroid/basalt/gets_dug() - if(!dug) - set_light(0) +/turf/open/floor/plating/asteroid/basalt/ComponentActivated(datum/component/C) ..() + if(istype(C, /datum/component/archaeology)) + set_light(0) ///////Surface. The surface is warm, but survivable without a suit. Internals are required. The floors break to chasms, which drop you into the underground. @@ -340,8 +283,8 @@ initial_gas_mix = "TEMP=180" slowdown = 2 environment_type = "snow" - sand_type = /obj/item/stack/sheet/mineral/snow flags_1 = NONE + archdrops = list(/obj/item/stack/sheet/mineral/snow = 5) /turf/open/floor/plating/asteroid/snow/airless initial_gas_mix = "TEMP=2.7" diff --git a/code/game/turfs/simulated/floor/reinf_floor.dm b/code/game/turfs/simulated/floor/reinf_floor.dm index be8d949eba..eaf0e512f7 100644 --- a/code/game/turfs/simulated/floor/reinf_floor.dm +++ b/code/game/turfs/simulated/floor/reinf_floor.dm @@ -58,6 +58,7 @@ make_plating(1) /turf/open/floor/engine/singularity_pull(S, current_size) + ..() if(current_size >= STAGE_FIVE) if(floor_tile) if(prob(30)) @@ -116,7 +117,7 @@ be_removed() return ..() -/turf/open/floor/engine/cult/ChangeTurf(path, defer_change = FALSE) +/turf/open/floor/engine/cult/ChangeTurf(path, new_baseturf, defer_change = FALSE, ignore_air = FALSE, forceop = FALSE) if(path != type) be_removed() return ..() diff --git a/code/game/turfs/simulated/wall/reinf_walls.dm b/code/game/turfs/simulated/wall/reinf_walls.dm index 261e856629..5ebe1d632a 100644 --- a/code/game/turfs/simulated/wall/reinf_walls.dm +++ b/code/game/turfs/simulated/wall/reinf_walls.dm @@ -247,6 +247,7 @@ icon_state = "r_wall" /turf/closed/wall/r_wall/singularity_pull(S, current_size) + ..() if(current_size >= STAGE_FIVE) if(prob(30)) dismantle_wall() diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 57774a5754..9171c7f54c 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -245,6 +245,7 @@ QDEL_IN(O, 50) /turf/closed/wall/singularity_pull(S, current_size) + ..() if(current_size >= STAGE_FIVE) if(prob(50)) dismantle_wall() diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index e6314861b6..c8be2aa28a 100755 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -524,12 +524,12 @@ /turf/proc/photograph(limit=20) var/image/I = new() - I.overlays += src + I.add_overlay(src) for(var/V in contents) var/atom/A = V if(A.invisibility) continue - I.overlays += A + I.add_overlay(A) if(limit) limit-- else diff --git a/code/game/world.dm b/code/game/world.dm index 0eeb29fa50..991e6230e6 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -1,3 +1,6 @@ +GLOBAL_VAR(security_mode) +GLOBAL_PROTECT(security_mode) + /world/New() log_world("World loaded at [time_stamp()]") @@ -5,6 +8,8 @@ GLOB.config_error_log = GLOB.sql_error_log = GLOB.world_href_log = GLOB.world_runtime_log = GLOB.world_attack_log = GLOB.world_game_log = file("data/logs/config_error.log") //temporary file used to record errors with loading config, moved to log directory once logging is set bl + CheckSecurityMode() + make_datum_references_lists() //initialises global lists for referencing frequently used datums (so that we only ever do it once) config = new @@ -51,9 +56,12 @@ if(query_db_version.NextRow()) var/db_major = text2num(query_db_version.item[1]) var/db_minor = text2num(query_db_version.item[2]) - if(db_major < DB_MAJOR_VERSION || db_minor < DB_MINOR_VERSION) - message_admins("Database schema ([db_major].[db_minor]) is behind latest schema version ([DB_MAJOR_VERSION].[DB_MINOR_VERSION]), this may lead to undefined behaviour or errors") - log_sql("Database schema ([db_major].[db_minor]) is behind latest schema version ([DB_MAJOR_VERSION].[DB_MINOR_VERSION]), this may lead to undefined behaviour or errors") + if(db_major != DB_MAJOR_VERSION || db_minor != DB_MINOR_VERSION) + var/which = "behind" + if(db_major < DB_MAJOR_VERSION || db_minor < DB_MINOR_VERSION) + which = "ahead of" + message_admins("Database schema ([db_major].[db_minor]) is [which] the latest schema version ([DB_MAJOR_VERSION].[DB_MINOR_VERSION]), this may lead to undefined behaviour or errors") + log_sql("Database schema ([db_major].[db_minor]) is [which] the latest schema version ([DB_MAJOR_VERSION].[DB_MINOR_VERSION]), this may lead to undefined behaviour or errors") else message_admins("Could not get schema version from database") else @@ -91,6 +99,20 @@ if(GLOB.round_id) log_game("Round ID: [GLOB.round_id]") +/world/proc/CheckSecurityMode() + //try to write to data + if(!text2file("The world is running at least safe mode", "data/server_security_check.lock")) + GLOB.security_mode = SECURITY_ULTRASAFE + warning("/tg/station 13 is not supported in ultrasafe security mode. Everything will break!") + return + + //try to shell + if(shell("echo \"The world is running in trusted mode\"") != null) + GLOB.security_mode = SECURITY_TRUSTED + else + GLOB.security_mode = SECURITY_SAFE + warning("/tg/station 13 uses many file operations, a few shell()s, and some external call()s. Trusted mode is recommended. You can download our source code for your own browsing and compilation at https://github.com/tgstation/tgstation") + /world/Topic(T, addr, master, key) var/list/input = params2list(T) diff --git a/code/modules/VR/vr_sleeper.dm b/code/modules/VR/vr_sleeper.dm index a83ced850e..f447b2f3e9 100644 --- a/code/modules/VR/vr_sleeper.dm +++ b/code/modules/VR/vr_sleeper.dm @@ -49,6 +49,10 @@ open_machine() +/obj/machinery/vr_sleeper/container_resist(mob/living/user) + open_machine() + + /obj/machinery/vr_sleeper/Destroy() open_machine() cleanup_vr_human() diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 5943e753a0..b88451b724 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -31,6 +31,8 @@ if(M.client) body += " played by [M.client] " body += "\[[M.client.holder ? M.client.holder.rank : "Player"]\]" + if(config.use_exp_tracking) + body += "\[" + M.client.get_exp_living() + "\]" if(isnewplayer(M)) body += " Hasn't Entered Game " diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 5507d856f6..343e954a8d 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -61,6 +61,7 @@ GLOBAL_LIST_INIT(admin_verbs_admin, world.AVerbsAdmin()) /client/proc/cmd_admin_local_narrate, /*sends text to all mobs within view of atom*/ /client/proc/cmd_admin_create_centcom_report, /client/proc/cmd_change_command_name, + /client/proc/cmd_admin_check_player_exp, /* shows players by playtime */ /client/proc/toggle_antag_hud, /*toggle display of the admin antag hud*/ /client/proc/toggle_AI_interact, /*toggle admin ability to interact with machines as an AI*/ /client/proc/customiseSNPC, /* Customise any interactive crewmembers in the world */ @@ -260,6 +261,8 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list( verbs += GLOB.admin_verbs_poll if(rights & R_SOUNDS) verbs += GLOB.admin_verbs_sounds + if(config.invoke_youtubedl) + verbs += /client/proc/play_web_sound if(rights & R_SPAWN) verbs += GLOB.admin_verbs_spawn @@ -282,6 +285,7 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list( /client/proc/stealth, GLOB.admin_verbs_poll, GLOB.admin_verbs_sounds, + /client/proc/play_web_sound, GLOB.admin_verbs_spawn, /*Debug verbs added by "show debug verbs"*/ /client/proc/Cell, diff --git a/code/modules/admin/admin_verbs.dm.rej b/code/modules/admin/admin_verbs.dm.rej new file mode 100644 index 0000000000..c2f884d37c --- /dev/null +++ b/code/modules/admin/admin_verbs.dm.rej @@ -0,0 +1,10 @@ +diff a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm (rejected hunks) +@@ -663,7 +664,7 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, AVerbsHideable()) + + if(!holder) + return +- ++ + if(has_antag_hud()) + toggle_antag_hud() + diff --git a/code/modules/admin/banjob.dm b/code/modules/admin/banjob.dm index 0128b719d7..a260746e66 100644 --- a/code/modules/admin/banjob.dm +++ b/code/modules/admin/banjob.dm @@ -22,6 +22,8 @@ return 0 /proc/jobban_buildcache(client/C) + if(!SSdbcore.Connect()) + return if(C && istype(C)) C.jobbancache = list() var/datum/DBQuery/query_jobban_build_cache = SSdbcore.NewQuery("SELECT job, reason FROM [format_table_name("ban")] WHERE ckey = '[sanitizeSQL(C.ckey)]' AND (bantype = 'JOB_PERMABAN' OR (bantype = 'JOB_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)") diff --git a/code/modules/admin/create_poll.dm b/code/modules/admin/create_poll.dm index 15c57a8a89..d93b21d7f8 100644 --- a/code/modules/admin/create_poll.dm +++ b/code/modules/admin/create_poll.dm @@ -112,7 +112,7 @@ descmax = sanitizeSQL(descmax) else if(descmax == null) return - sql_option_list += list(list("text" = "'[option]'", "minval" = "'[minval]'", "maxval" = "'[maxval]'", "descmin" = "'[descmin]'", "descmid" = "'[descmid]'", "descmax" = "'[descmax]'", "default_display_in_results" = "'[default_percentage_calc]'")) + sql_option_list += list(list("text" = "'[option]'", "minval" = "'[minval]'", "maxval" = "'[maxval]'", "descmin" = "'[descmin]'", "descmid" = "'[descmid]'", "descmax" = "'[descmax]'", "default_percentage_calc" = "'[default_percentage_calc]'")) switch(alert(" ",,"Add option","Finish", "Cancel")) if("Add option") add_option = 1 diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 3ae72087c8..9237d1f1e2 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -389,7 +389,7 @@ for(var/datum/mind/N in SSticker.mode.syndicates) var/mob/M = N.current if(M) - dat += "[M.real_name][M.client ? "" : " (No Client)"][M.stat == 2 ? " (DEAD)" : ""]" + dat += "[M.real_name][M.client ? "" : " (No Client)"][M.stat == DEAD ? " (DEAD)" : ""]" dat += "PM" dat += "FLW" else @@ -418,20 +418,20 @@ dat += "[N.name]([N.key])Head Revolutionary body destroyed!" dat += "PM" else - dat += "[M.real_name] (Leader)[M.client ? "" : " (No Client)"][M.stat == 2 ? " (DEAD)" : ""]" + dat += "[M.real_name] (Leader)[M.client ? "" : " (No Client)"][M.stat == DEAD ? " (DEAD)" : ""]" dat += "PM" dat += "FLW" for(var/datum/mind/N in SSticker.mode.revolutionaries) var/mob/M = N.current if(M) - dat += "[M.real_name][M.client ? "" : " (No Client)"][M.stat == 2 ? " (DEAD)" : ""]" + dat += "[M.real_name][M.client ? "" : " (No Client)"][M.stat == DEAD ? " (DEAD)" : ""]" dat += "PM" dat += "FLW" dat += "" for(var/datum/mind/N in SSticker.mode.get_living_heads()) var/mob/M = N.current if(M) - dat += "" + dat += "" dat += "" dat += "" var/turf/mob_loc = get_turf(M) @@ -449,13 +449,13 @@ dat += "" dat += "" else - dat += "" + dat += "" dat += "" dat += "" for(var/datum/mind/N in G.gangsters) var/mob/M = N.current if(M) - dat += "" + dat += "" dat += "" dat += "
    Target(s)Location
    [M.real_name][M.client ? "" : " (No Client)"][M.stat == 2 ? " (DEAD)" : ""]
    [M.real_name][M.client ? "" : " (No Client)"][M.stat == DEAD ? " (DEAD)" : ""]PMFLW
    [N.name]([N.key])Gang Boss body destroyed!PM
    [M.real_name] (Boss)[M.client ? "" : " (No Client)"][M.stat == 2 ? " (DEAD)" : ""]
    [M.real_name] (Boss)[M.client ? "" : " (No Client)"][M.stat == DEAD ? " (DEAD)" : ""]PMFLW
    [M.real_name][M.client ? "" : " (No Client)"][M.stat == 2 ? " (DEAD)" : ""]
    [M.real_name][M.client ? "" : " (No Client)"][M.stat == DEAD ? " (DEAD)" : ""]PM
    " @@ -464,7 +464,7 @@ for(var/datum/mind/changeling in SSticker.mode.changelings) var/mob/M = changeling.current if(M) - dat += "[M.mind.changeling.changelingID] as [M.real_name][M.client ? "" : " (No Client)"][M.stat == 2 ? " (DEAD)" : ""]" + dat += "[M.mind.changeling.changelingID] as [M.real_name][M.client ? "" : " (No Client)"][M.stat == DEAD ? " (DEAD)" : ""]" dat += "PM" dat += "FLW" dat += "Show Objective" @@ -478,7 +478,7 @@ for(var/datum/mind/wizard in SSticker.mode.wizards) var/mob/M = wizard.current if(M) - dat += "[M.real_name][M.client ? "" : " (No Client)"][M.stat == 2 ? " (DEAD)" : ""]" + dat += "[M.real_name][M.client ? "" : " (No Client)"][M.stat == DEAD ? " (DEAD)" : ""]" dat += "PM" dat += "FLW" dat += "Show Objective" @@ -492,7 +492,7 @@ for(var/datum/mind/apprentice in SSticker.mode.apprentices) var/mob/M = apprentice.current if(M) - dat += "[M.real_name][M.client ? "" : " (No Client)"][M.stat == 2 ? " (DEAD)" : ""]" + dat += "[M.real_name][M.client ? "" : " (No Client)"][M.stat == DEAD ? " (DEAD)" : ""]" dat += "PM" dat += "FLW" dat += "Show Objective" @@ -506,7 +506,7 @@ for(var/datum/mind/N in SSticker.mode.cult) var/mob/M = N.current if(M) - dat += "[M.real_name][N.has_antag_datum(ANTAG_DATUM_CULT_MASTER) ? " \[Master\]" : ""][M.client ? "" : " (No Client)"][M.stat == 2 ? " (DEAD)" : ""]" + dat += "[M.real_name][N.has_antag_datum(ANTAG_DATUM_CULT_MASTER) ? " \[Master\]" : ""][M.client ? "" : " (No Client)"][M.stat == DEAD ? " (DEAD)" : ""]" dat += "PM" dat += "FLW" dat += "" @@ -516,7 +516,7 @@ for(var/datum/mind/N in SSticker.mode.servants_of_ratvar) var/mob/M = N.current if(M) - dat += "[M.real_name][M.client ? "" : " (ghost)"][M.stat == 2 ? " (DEAD)" : ""]" + dat += "[M.real_name][M.client ? "" : " (ghost)"][M.stat == DEAD ? " (DEAD)" : ""]" dat += "PM" dat += "FLW" dat += "" @@ -526,7 +526,7 @@ for(var/datum/mind/traitor in SSticker.mode.traitors) var/mob/M = traitor.current if(M) - dat += "[M.real_name][M.client ? "" : " (No Client)"][M.stat == 2 ? " (DEAD)" : ""]" + dat += "[M.real_name][M.client ? "" : " (No Client)"][M.stat == DEAD ? " (DEAD)" : ""]" dat += "PM" dat += "FLW" dat += "Show Objective" @@ -540,7 +540,7 @@ for(var/datum/mind/abductor in SSticker.mode.abductors) var/mob/M = abductor.current if(M) - dat += "[M.real_name][M.client ? "" : " (No Client)"][M.stat == 2 ? " (DEAD)" : ""]" + dat += "[M.real_name][M.client ? "" : " (No Client)"][M.stat == DEAD ? " (DEAD)" : ""]" dat += "PM" dat += "FLW" dat += "Show Objective" @@ -553,7 +553,7 @@ for(var/datum/mind/abductee in E.abductee_minds) var/mob/M = abductee.current if(M) - dat += "[M.real_name][M.client ? "" : " (No Client)"][M.stat == 2 ? " (DEAD)" : ""]" + dat += "[M.real_name][M.client ? "" : " (No Client)"][M.stat == DEAD ? " (DEAD)" : ""]" dat += "PM" dat += "FLW" dat += "Show Objective" @@ -569,7 +569,7 @@ var/mob/M = devil.current var/datum/antagonist/devil/devilinfo = devil.has_antag_datum(ANTAG_DATUM_DEVIL) if(M) - dat += "[M.real_name] : [devilinfo.truename][M.client ? "" : " (No Client)"][M.stat == 2 ? " (DEAD)" : ""]" + dat += "[M.real_name] : [devilinfo.truename][M.client ? "" : " (No Client)"][M.stat == DEAD ? " (DEAD)" : ""]" dat += "PM" dat += "Show Objective" dat += "Show all devil info" @@ -584,7 +584,7 @@ var/datum/mind/sintouched = X var/mob/M = sintouched.current if(M) - dat += "[M.real_name][M.client ? "" : " (No Client)"][M.stat == 2 ? " (DEAD)" : ""]" + dat += "[M.real_name][M.client ? "" : " (No Client)"][M.stat == DEAD ? " (DEAD)" : ""]" dat += "PM" dat += "Show Objective" else @@ -606,7 +606,7 @@ for(var/datum/mind/blob in blob_minds) var/mob/M = blob.current if(M) - dat += "[M.real_name][M.client ? "" : " (No Client)"][M.stat == 2 ? " (DEAD)" : ""]" + dat += "[M.real_name][M.client ? "" : " (No Client)"][M.stat == DEAD ? " (DEAD)" : ""]" dat += "PM" dat += "FLW" else @@ -622,7 +622,7 @@ for(var/datum/mind/eek in mode.ape_infectees) var/mob/M = eek.current if(M) - dat += "[M.real_name][M.client ? "" : " (No Client)"][M.stat == 2 ? " (DEAD)" : ""]" + dat += "[M.real_name][M.client ? "" : " (No Client)"][M.stat == DEAD ? " (DEAD)" : ""]" dat += "PM" dat += "FLW" else diff --git a/code/modules/admin/secrets.dm b/code/modules/admin/secrets.dm index 446806f6cd..70c7346369 100644 --- a/code/modules/admin/secrets.dm +++ b/code/modules/admin/secrets.dm @@ -336,7 +336,7 @@ SSblackbox.add_details("admin_secrets_fun_used","Traitor All ([objective])") for(var/mob/living/H in GLOB.player_list) if(!(ishuman(H)||istype(H, /mob/living/silicon/))) continue - if(H.stat == 2 || !H.client || !H.mind || ispAI(H)) continue + if(H.stat == DEAD || !H.client || !H.mind || ispAI(H)) continue if(is_special_character(H)) continue H.mind.add_antag_datum(ANTAG_DATUM_TRAITOR_CUSTOM) var/datum/antagonist/traitor/traitordatum = H.mind.has_antag_datum(ANTAG_DATUM_TRAITOR) //original datum self deletes diff --git a/code/modules/admin/sql_message_system.dm b/code/modules/admin/sql_message_system.dm index 532bb2d16d..b42fe93eef 100644 --- a/code/modules/admin/sql_message_system.dm +++ b/code/modules/admin/sql_message_system.dm @@ -44,7 +44,7 @@ secret = 0 else return - var/datum/DBQuery/query_create_message = SSdbcore.NewQuery("INSERT INTO [format_table_name("messages")] (type, targetckey, adminckey, text, timestamp, server, secret) VALUES ('[type]', '[target_ckey]', '[admin_ckey]', '[text]', '[timestamp]', '[server]', '[secret]')") + var/datum/DBQuery/query_create_message = SSdbcore.NewQuery("INSERT INTO [format_table_name("messages")] (type, targetckey, adminckey, text, timestamp, server, server_ip, server_port, round_id, secret) VALUES ('[type]', '[target_ckey]', '[admin_ckey]', '[text]', '[timestamp]', '[server]', INET_ATON(IF('[world.internet_address]' LIKE '', '0', '[world.internet_address]')), '[world.port]', '[GLOB.round_id]','[secret]')") if(!query_create_message.warn_execute()) return if(logged) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index f3de43b6c6..f7b0f8b6ff 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -22,6 +22,24 @@ else if(href_list["stickyban"]) stickyban(href_list["stickyban"],href_list) + else if(href_list["getplaytimewindow"]) + if(!check_rights(R_ADMIN)) + return + var/mob/M = locate(href_list["getplaytimewindow"]) in GLOB.mob_list + if(!M) + to_chat(usr, "ERROR: Mob not found.") + return + cmd_show_exp_panel(M.client) + + else if(href_list["toggleexempt"]) + if(!check_rights(R_ADMIN)) + return + var/client/C = locate(href_list["toggleexempt"]) in GLOB.clients + if(!C) + to_chat(usr, "ERROR: Client not found.") + return + toggle_exempt_status(C) + else if(href_list["makeAntag"]) if (!SSticker.mode) to_chat(usr, "Not until the round starts!") @@ -1597,11 +1615,13 @@ var/mob/living/L = M var/status switch (M.stat) - if (0) + if (CONSCIOUS) status = "Alive" - if (1) - status = "Unconscious" - if (2) + if(SOFT_CRIT) + status = "Dying" + if(UNCONSCIOUS) + status = "[L.InCritical() ? "Unconscious and Dying" : "Unconscious"]" + if(DEAD) status = "Dead" health_description = "Status = [status]" health_description += "
    Oxy: [L.getOxyLoss()] - Tox: [L.getToxLoss()] - Fire: [L.getFireLoss()] - Brute: [L.getBruteLoss()] - Clone: [L.getCloneLoss()] - Brain: [L.getBrainLoss()] - Stamina: [L.getStaminaLoss()]" diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm index 84a29d9c01..bfc4701012 100644 --- a/code/modules/admin/verbs/playsound.dm +++ b/code/modules/admin/verbs/playsound.dm @@ -36,7 +36,11 @@ for(var/mob/M in GLOB.player_list) if(M.client.prefs.toggles & SOUND_MIDI) + var/user_vol = M.client.chatOutput.adminMusicVolume + if(user_vol) + admin_sound.volume = vol * (user_vol / 100) SEND_SOUND(M, admin_sound) + admin_sound.volume = vol SSblackbox.add_details("admin_verb","Play Global Sound") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -52,6 +56,62 @@ playsound(get_turf(src.mob), S, 50, 0, 0) SSblackbox.add_details("admin_verb","Play Local Sound") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! +/client/proc/play_web_sound() + set category = "Fun" + set name = "Play Internet Sound" + if(!check_rights(R_SOUNDS)) + return + + if(!config.invoke_youtubedl) + to_chat(src, "Youtube-dl was not configured, action unavailable") //Check config.txt for the INVOKE_YOUTUBEDL value + return + + var/web_sound_input = input("Enter content URL (supported sites only, leave blank to stop playing)", "Play Internet Sound via youtube-dl") as text|null + if(istext(web_sound_input)) + var/web_sound_url = "" + var/pitch + if(length(web_sound_input)) + + web_sound_input = trim(web_sound_input) + var/static/regex/html_protocol_regex = regex("https?://") + if(findtext(web_sound_input, ":") && !findtext(web_sound_input, html_protocol_regex)) + to_chat(src, "Non-http(s) URIs are not allowed.") + to_chat(src, "For youtube-dl shortcuts like ytsearch: please use the appropriate full url from the website.") + return + var/shell_scrubbed_input = shell_url_scrub(web_sound_input) + var/list/output = world.shelleo("[config.invoke_youtubedl] --format \"bestaudio\[ext=aac]/bestaudio\[ext=mp3]/bestaudio\[ext=m4a]\" --get-url \"[shell_scrubbed_input]\"") + var/errorlevel = output[SHELLEO_ERRORLEVEL] + var/stdout = output[SHELLEO_STDOUT] + var/stderr = output[SHELLEO_STDERR] + if(!errorlevel) + var/static/regex/content_url_regex = regex("https?://\\S+") + if(content_url_regex.Find(stdout)) + web_sound_url = content_url_regex.match + + if(SSevents.holidays && SSevents.holidays[APRIL_FOOLS]) + pitch = pick(0.5, 0.7, 0.8, 0.85, 0.9, 0.95, 1.1, 1.2, 1.4, 1.6, 2.0, 2.5) + to_chat(src, "You feel the Honkmother messing with your song...") + + log_admin("[key_name(src)] played web sound: [web_sound_input]") + message_admins("[key_name(src)] played web sound: [web_sound_input]") + else + to_chat(src, "Youtube-dl URL retrieval FAILED:") + to_chat(src, "[stderr]") + + else //pressed ok with blank + log_admin("[key_name(src)] stopped web sound") + message_admins("[key_name(src)] stopped web sound") + web_sound_url = " " + + if(web_sound_url) + for(var/m in GLOB.player_list) + var/mob/M = m + var/client/C = M.client + if((C.prefs.toggles & SOUND_MIDI) && C.chatOutput && !C.chatOutput.broken && C.chatOutput.loaded) + C.chatOutput.sendMusic(web_sound_url, pitch) + + SSblackbox.add_details("admin_verb","Play Internet Sound") + /client/proc/set_round_end_sound(S as sound) set category = "Fun" set name = "Set Round End Sound" @@ -75,4 +135,7 @@ for(var/mob/M in GLOB.player_list) if(M.client) SEND_SOUND(M, sound(null)) + var/client/C = M.client + if(C && C.chatOutput && !C.chatOutput.broken && C.chatOutput.loaded) + C.chatOutput.sendMusic(" ") SSblackbox.add_details("admin_verb","Stop All Playing Sounds") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 3d89cd49f5..62f3cab1d1 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -1,1213 +1,1260 @@ -/client/proc/cmd_admin_drop_everything(mob/M in GLOB.mob_list) - set category = null - set name = "Drop Everything" - if(!holder) - to_chat(src, "Only administrators may use this command.") - return - - var/confirm = alert(src, "Make [M] drop everything?", "Message", "Yes", "No") - if(confirm != "Yes") - return - - for(var/obj/item/W in M) - if(!M.dropItemToGround(W)) - qdel(W) - M.regenerate_icons() - - log_admin("[key_name(usr)] made [key_name(M)] drop everything!") - var/msg = "[key_name_admin(usr)] made [key_name_admin(M)] drop everything!" - message_admins(msg) - admin_ticket_log(M, msg) - SSblackbox.add_details("admin_verb","Drop Everything") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - -/client/proc/cmd_admin_subtle_message(mob/M in GLOB.mob_list) - set category = "Special Verbs" - set name = "Subtle Message" - - if(!ismob(M)) - return - if (!holder) - to_chat(src, "Only administrators may use this command.") - return - - message_admins("[key_name_admin(src)] has started answering [key_name(M.key, 0, 0)]'s prayer.") - var/msg = input("Message:", text("Subtle PM to [M.key]")) as text - - if (!msg) - message_admins("[key_name_admin(src)] decided not to answer [key_name(M.key, 0, 0)]'s prayer") - return - if(usr) - if (usr.client) - if(usr.client.holder) - to_chat(M, "You hear a voice in your head... [msg]") - - log_admin("SubtlePM: [key_name(usr)] -> [key_name(M)] : [msg]") - msg = " SubtleMessage: [key_name_admin(usr)] -> [key_name_admin(M)] : [msg]" - message_admins(msg) - admin_ticket_log(M, msg) - SSblackbox.add_details("admin_verb","Subtle Message") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - -/client/proc/cmd_admin_world_narrate() - set category = "Special Verbs" - set name = "Global Narrate" - - if (!holder) - to_chat(src, "Only administrators may use this command.") - return - - var/msg = input("Message:", text("Enter the text you wish to appear to everyone:")) as text - - if (!msg) - return - to_chat(world, "[msg]") - log_admin("GlobalNarrate: [key_name(usr)] : [msg]") - message_admins("[key_name_admin(usr)] Sent a global narrate") - SSblackbox.add_details("admin_verb","Global Narrate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - -/client/proc/cmd_admin_direct_narrate(mob/M) - set category = "Special Verbs" - set name = "Direct Narrate" - - if(!holder) - to_chat(src, "Only administrators may use this command.") - return - - if(!M) - M = input("Direct narrate to whom?", "Active Players") as null|anything in GLOB.player_list - - if(!M) - return - - var/msg = input("Message:", text("Enter the text you wish to appear to your target:")) as text - - if( !msg ) - return - - to_chat(M, msg) - log_admin("DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]") - msg = " DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]
    " - message_admins(msg) - admin_ticket_log(M, msg) - SSblackbox.add_details("admin_verb","Direct Narrate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - -/client/proc/cmd_admin_local_narrate(atom/A) - set category = "Special Verbs" - set name = "Local Narrate" - - if (!holder) - to_chat(src, "Only administrators may use this command.") - return - if(!A) - return - var/range = input("Range:", "Narrate to mobs within how many tiles:", 7) as num - if(!range) - return - var/msg = input("Message:", text("Enter the text you wish to appear to everyone within view:")) as text - if (!msg) - return - for(var/mob/M in view(range,A)) - to_chat(M, msg) - - log_admin("LocalNarrate: [key_name(usr)] at [get_area(A)][COORD(A)]: [msg]") - message_admins(" LocalNarrate: [key_name_admin(usr)] at [get_area(A)][ADMIN_JMP(A)]: [msg]
    ") - SSblackbox.add_details("admin_verb","Local Narrate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - -/client/proc/cmd_admin_godmode(mob/M in GLOB.mob_list) - set category = "Special Verbs" - set name = "Godmode" - if(!holder) - to_chat(src, "Only administrators may use this command.") - return - M.status_flags ^= GODMODE - to_chat(usr, "Toggled [(M.status_flags & GODMODE) ? "ON" : "OFF"]") - - log_admin("[key_name(usr)] has toggled [key_name(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]") - var/msg = "[key_name_admin(usr)] has toggled [key_name_admin(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]" - message_admins(msg) - admin_ticket_log(M, msg) - SSblackbox.add_details("admin_toggle","Godmode|[M.status_flags & GODMODE]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - - -/proc/cmd_admin_mute(whom, mute_type, automute = 0) - if(!whom) - return - - var/muteunmute - var/mute_string - var/feedback_string - switch(mute_type) - if(MUTE_IC) - mute_string = "IC (say and emote)" - feedback_string = "IC" - if(MUTE_OOC) - mute_string = "OOC" - feedback_string = "OOC" - if(MUTE_PRAY) - mute_string = "pray" - feedback_string = "Pray" - if(MUTE_ADMINHELP) - mute_string = "adminhelp, admin PM and ASAY" - feedback_string = "Adminhelp" - if(MUTE_DEADCHAT) - mute_string = "deadchat and DSAY" - feedback_string = "Deadchat" - if(MUTE_ALL) - mute_string = "everything" - feedback_string = "Everything" - else - return - - var/client/C - if(istype(whom, /client)) - C = whom - else if(istext(whom)) - C = GLOB.directory[whom] - else - return - - var/datum/preferences/P - if(C) - P = C.prefs - else - P = GLOB.preferences_datums[whom] - if(!P) - return - - if(automute) - if(!config.automute_on) - return - else - if(!check_rights()) - return - - if(automute) - muteunmute = "auto-muted" - P.muted |= mute_type - log_admin("SPAM AUTOMUTE: [muteunmute] [key_name(whom)] from [mute_string]") - message_admins("SPAM AUTOMUTE: [muteunmute] [key_name_admin(whom)] from [mute_string].") - if(C) - to_chat(C, "You have been [muteunmute] from [mute_string] by the SPAM AUTOMUTE system. Contact an admin.") - SSblackbox.add_details("admin_toggle","Auto Mute [feedback_string]|1") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - return - - if(P.muted & mute_type) - muteunmute = "unmuted" - P.muted &= ~mute_type - else - muteunmute = "muted" - P.muted |= mute_type - - log_admin("[key_name(usr)] has [muteunmute] [key_name(whom)] from [mute_string]") - message_admins("[key_name_admin(usr)] has [muteunmute] [key_name_admin(whom)] from [mute_string].") - if(C) - to_chat(C, "You have been [muteunmute] from [mute_string] by [key_name(usr, include_name = FALSE)].") - SSblackbox.add_details("admin_toggle","Mute [feedback_string]|[P.muted & mute_type]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - - -//I use this proc for respawn character too. /N -/proc/create_xeno(ckey) - if(!ckey) - var/list/candidates = list() - for(var/mob/M in GLOB.player_list) - if(M.stat != DEAD) - continue //we are not dead! - if(!(ROLE_ALIEN in M.client.prefs.be_special)) - continue //we don't want to be an alium - if(M.client.is_afk()) - continue //we are afk - if(M.mind && M.mind.current && M.mind.current.stat != DEAD) - continue //we have a live body we are tied to - candidates += M.ckey - if(candidates.len) - ckey = input("Pick the player you want to respawn as a xeno.", "Suitable Candidates") as null|anything in candidates - else - to_chat(usr, "Error: create_xeno(): no suitable candidates.") - if(!istext(ckey)) - return 0 - - var/alien_caste = input(usr, "Please choose which caste to spawn.","Pick a caste",null) as null|anything in list("Queen","Praetorian","Hunter","Sentinel","Drone","Larva") - var/obj/effect/landmark/spawn_here = GLOB.xeno_spawn.len ? pick(GLOB.xeno_spawn) : null - var/mob/living/carbon/alien/new_xeno - switch(alien_caste) - if("Queen") - new_xeno = new /mob/living/carbon/alien/humanoid/royal/queen(spawn_here) - if("Praetorian") - new_xeno = new /mob/living/carbon/alien/humanoid/royal/praetorian(spawn_here) - if("Hunter") - new_xeno = new /mob/living/carbon/alien/humanoid/hunter(spawn_here) - if("Sentinel") - new_xeno = new /mob/living/carbon/alien/humanoid/sentinel(spawn_here) - if("Drone") - new_xeno = new /mob/living/carbon/alien/humanoid/drone(spawn_here) - if("Larva") - new_xeno = new /mob/living/carbon/alien/larva(spawn_here) - else - return 0 - if(!spawn_here) - SSjob.SendToLateJoin(new_xeno, FALSE) - - new_xeno.ckey = ckey - var/msg = "[key_name_admin(usr)] has spawned [ckey] as a filthy xeno [alien_caste]." - message_admins(msg) - admin_ticket_log(new_xeno, msg) - return 1 - -/* -If a guy was gibbed and you want to revive him, this is a good way to do so. -Works kind of like entering the game with a new character. Character receives a new mind if they didn't have one. -Traitors and the like can also be revived with the previous role mostly intact. -/N */ -/client/proc/respawn_character() - set category = "Special Verbs" - set name = "Respawn Character" - set desc = "Respawn a person that has been gibbed/dusted/killed. They must be a ghost for this to work and preferably should not have a body to go back into." - if(!holder) - to_chat(src, "Only administrators may use this command.") - return - var/input = ckey(input(src, "Please specify which key will be respawned.", "Key", "")) - if(!input) - return - - var/mob/dead/observer/G_found - for(var/mob/dead/observer/G in GLOB.player_list) - if(G.ckey == input) - G_found = G - break - - if(!G_found)//If a ghost was not found. - to_chat(usr, "There is no active key like that in the game or the person is not currently a ghost.") - return - - if(G_found.mind && !G_found.mind.active) //mind isn't currently in use by someone/something - //Check if they were an alien - if(G_found.mind.assigned_role=="Alien") - if(alert("This character appears to have been an alien. Would you like to respawn them as such?",,"Yes","No")=="Yes") - var/turf/T - if(GLOB.xeno_spawn.len) - T = pick(GLOB.xeno_spawn) - - var/mob/living/carbon/alien/new_xeno - switch(G_found.mind.special_role)//If they have a mind, we can determine which caste they were. - if("Hunter") - new_xeno = new /mob/living/carbon/alien/humanoid/hunter(T) - if("Sentinel") - new_xeno = new /mob/living/carbon/alien/humanoid/sentinel(T) - if("Drone") - new_xeno = new /mob/living/carbon/alien/humanoid/drone(T) - if("Praetorian") - new_xeno = new /mob/living/carbon/alien/humanoid/royal/praetorian(T) - if("Queen") - new_xeno = new /mob/living/carbon/alien/humanoid/royal/queen(T) - else//If we don't know what special role they have, for whatever reason, or they're a larva. - create_xeno(G_found.ckey) - return - - if(!T) - SSjob.SendToLateJoin(new_xeno, FALSE) - - //Now to give them their mind back. - G_found.mind.transfer_to(new_xeno) //be careful when doing stuff like this! I've already checked the mind isn't in use - new_xeno.key = G_found.key - to_chat(new_xeno, "You have been fully respawned. Enjoy the game.") - var/msg = "[key_name_admin(usr)] has respawned [new_xeno.key] as a filthy xeno." - message_admins(msg) - admin_ticket_log(new_xeno, msg) - return //all done. The ghost is auto-deleted - - //check if they were a monkey - else if(findtext(G_found.real_name,"monkey")) - if(alert("This character appears to have been a monkey. Would you like to respawn them as such?",,"Yes","No")=="Yes") - var/mob/living/carbon/monkey/new_monkey = new - SSjob.SendToLateJoin(new_monkey) - G_found.mind.transfer_to(new_monkey) //be careful when doing stuff like this! I've already checked the mind isn't in use - new_monkey.key = G_found.key - to_chat(new_monkey, "You have been fully respawned. Enjoy the game.") - var/msg = "[key_name_admin(usr)] has respawned [new_monkey.key] as a filthy xeno." - message_admins(msg) - admin_ticket_log(new_monkey, msg) - return //all done. The ghost is auto-deleted - - - //Ok, it's not a xeno or a monkey. So, spawn a human. - var/mob/living/carbon/human/new_character = new//The mob being spawned. - SSjob.SendToLateJoin(new_character) - - var/datum/data/record/record_found //Referenced to later to either randomize or not randomize the character. - if(G_found.mind && !G_found.mind.active) //mind isn't currently in use by someone/something - /*Try and locate a record for the person being respawned through GLOB.data_core. - This isn't an exact science but it does the trick more often than not.*/ - var/id = md5("[G_found.real_name][G_found.mind.assigned_role]") - - record_found = find_record("id", id, GLOB.data_core.locked) - - if(record_found)//If they have a record we can determine a few things. - new_character.real_name = record_found.fields["name"] - new_character.gender = record_found.fields["sex"] - new_character.age = record_found.fields["age"] - new_character.hardset_dna(record_found.fields["identity"], record_found.fields["enzymes"], record_found.fields["name"], record_found.fields["blood_type"], record_found.fields["species"], record_found.fields["features"]) - else - var/datum/preferences/A = new() - A.copy_to(new_character) - A.real_name = G_found.real_name - new_character.dna.update_dna_identity() - - new_character.name = new_character.real_name - - if(G_found.mind && !G_found.mind.active) - G_found.mind.transfer_to(new_character) //be careful when doing stuff like this! I've already checked the mind isn't in use - else - new_character.mind_initialize() - if(!new_character.mind.assigned_role) - new_character.mind.assigned_role = "Assistant"//If they somehow got a null assigned role. - - new_character.key = G_found.key - - /* - The code below functions with the assumption that the mob is already a traitor if they have a special role. - So all it does is re-equip the mob with powers and/or items. Or not, if they have no special role. - If they don't have a mind, they obviously don't have a special role. - */ - - //Two variables to properly announce later on. - var/admin = key_name_admin(src) - var/player_key = G_found.key - - //Now for special roles and equipment. - var/datum/antagonist/traitor/traitordatum = new_character.mind.has_antag_datum(ANTAG_DATUM_TRAITOR) - if(traitordatum) - SSjob.EquipRank(new_character, new_character.mind.assigned_role, 1) - traitordatum.equip() - - - switch(new_character.mind.special_role) - if("Wizard") - new_character.loc = pick(GLOB.wizardstart) - //SSticker.mode.learn_basic_spells(new_character) - SSticker.mode.equip_wizard(new_character) - if("Syndicate") - var/obj/effect/landmark/synd_spawn = locate("landmark*Syndicate-Spawn") - if(synd_spawn) - new_character.loc = get_turf(synd_spawn) - call(/datum/game_mode/proc/equip_syndicate)(new_character) - if("Space Ninja") - var/list/ninja_spawn = list() - for(var/obj/effect/landmark/L in GLOB.landmarks_list) - if(L.name=="carpspawn") - ninja_spawn += L - var/datum/antagonist/ninja/ninjadatum = new_character.mind.has_antag_datum(ANTAG_DATUM_NINJA) - ninjadatum.equip_space_ninja() - if(ninja_spawn.len) - var/obj/effect/landmark/ninja_spawn_here = pick(ninja_spawn) - new_character.loc = ninja_spawn_here.loc - - else//They may also be a cyborg or AI. - switch(new_character.mind.assigned_role) - if("Cyborg")//More rigging to make em' work and check if they're traitor. - new_character = new_character.Robotize() - if("AI") - new_character = new_character.AIize() - else - SSjob.EquipRank(new_character, new_character.mind.assigned_role, 1)//Or we simply equip them. - - //Announces the character on all the systems, based on the record. - if(!issilicon(new_character))//If they are not a cyborg/AI. - if(!record_found&&new_character.mind.assigned_role!=new_character.mind.special_role)//If there are no records for them. If they have a record, this info is already in there. MODE people are not announced anyway. - //Power to the user! - if(alert(new_character,"Warning: No data core entry detected. Would you like to announce the arrival of this character by adding them to various databases, such as medical records?",,"No","Yes")=="Yes") - GLOB.data_core.manifest_inject(new_character) - - if(alert(new_character,"Would you like an active AI to announce this character?",,"No","Yes")=="Yes") - AnnounceArrival(new_character, new_character.mind.assigned_role) - - var/msg = "[admin] has respawned [player_key] as [new_character.real_name]." - message_admins(msg) - admin_ticket_log(new_character, msg) - - to_chat(new_character, "You have been fully respawned. Enjoy the game.") - - SSblackbox.add_details("admin_verb","Respawn Character") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - return new_character - -/client/proc/cmd_admin_add_freeform_ai_law() - set category = "Fun" - set name = "Add Custom AI law" - if(!holder) - to_chat(src, "Only administrators may use this command.") - return - var/input = input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") as text|null - if(!input) - return - - log_admin("Admin [key_name(usr)] has added a new AI law - [input]") - message_admins("Admin [key_name_admin(usr)] has added a new AI law - [input]") - - var/show_log = alert(src, "Show ion message?", "Message", "Yes", "No") - var/announce_ion_laws = (show_log == "Yes" ? 1 : -1) - - var/datum/round_event/ion_storm/add_law_only/ion = new() - ion.announceEvent = announce_ion_laws - ion.ionMessage = input - - SSblackbox.add_details("admin_verb","Add Custom AI Law") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - -/client/proc/cmd_admin_rejuvenate(mob/living/M in GLOB.mob_list) - set category = "Special Verbs" - set name = "Rejuvenate" - if(!holder) - to_chat(src, "Only administrators may use this command.") - return - if(!mob) - return - if(!istype(M)) - alert("Cannot revive a ghost") - return - M.revive(full_heal = 1, admin_revive = 1) - - log_admin("[key_name(usr)] healed / revived [key_name(M)]") - var/msg = "Admin [key_name_admin(usr)] healed / revived [key_name_admin(M)]!" - message_admins(msg) - admin_ticket_log(M, msg) - SSblackbox.add_details("admin_verb","Rejuvinate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - -/client/proc/cmd_admin_create_centcom_report() - set category = "Special Verbs" - set name = "Create Command Report" - if(!holder) - to_chat(src, "Only administrators may use this command.") - return - var/input = input(usr, "Please enter anything you want. Anything. Serious.", "What?", "") as message|null - if(!input) - return - - var/confirm = alert(src, "Do you want to announce the contents of the report to the crew?", "Announce", "Yes", "No", "Cancel") - var/announce_command_report = TRUE - switch(confirm) - if("Yes") - priority_announce(input, null, 'sound/ai/commandreport.ogg') - announce_command_report = FALSE - if("Cancel") - return - - print_command_report(input, "[announce_command_report ? "Classified " : ""][command_name()] Update", announce_command_report) - - log_admin("[key_name(src)] has created a command report: [input]") - message_admins("[key_name_admin(src)] has created a command report") - SSblackbox.add_details("admin_verb","Create Command Report") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - -/client/proc/cmd_change_command_name() - set category = "Special Verbs" - set name = "Change Command Name" - if(!holder) - to_chat(src, "Only administrators may use this command.") - return - var/input = input(usr, "Please input a new name for Central Command.", "What?", "") as text|null - if(!input) - return - change_command_name(input) - message_admins("[key_name_admin(src)] has changed Central Command's name to [input]") - log_admin("[key_name(src)] has changed the Central Command name to: [input]") - -/client/proc/cmd_admin_delete(atom/A as obj|mob|turf in world) - set category = "Admin" - set name = "Delete" - - if (!holder) - to_chat(src, "Only administrators may use this command.") - return - - admin_delete(A) - -/client/proc/admin_delete(datum/D) - var/atom/A = D - var/coords = istype(A) ? " at ([A.x], [A.y], [A.z])" : "" - if (alert(src, "Are you sure you want to delete:\n[D]\nat[coords]?", "Confirmation", "Yes", "No") == "Yes") - log_admin("[key_name(usr)] deleted [D][coords]") - message_admins("[key_name_admin(usr)] deleted [D][coords]") - SSblackbox.add_details("admin_verb","Delete") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - if(isturf(D)) - var/turf/T = D - T.ChangeTurf(T.baseturf) - else - qdel(D) - -/client/proc/cmd_admin_list_open_jobs() - set category = "Admin" - set name = "Manage Job Slots" - - if (!holder) - to_chat(src, "Only administrators may use this command.") - return - holder.manage_free_slots() - SSblackbox.add_details("admin_verb","Manage Job Slots") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - -/client/proc/cmd_admin_explosion(atom/O as obj|mob|turf in world) - set category = "Special Verbs" - set name = "Explosion" - - if (!holder) - to_chat(src, "Only administrators may use this command.") - return - - var/devastation = input("Range of total devastation. -1 to none", text("Input")) as num|null - if(devastation == null) return - var/heavy = input("Range of heavy impact. -1 to none", text("Input")) as num|null - if(heavy == null) return - var/light = input("Range of light impact. -1 to none", text("Input")) as num|null - if(light == null) return - var/flash = input("Range of flash. -1 to none", text("Input")) as num|null - if(flash == null) return - var/flames = input("Range of flames. -1 to none", text("Input")) as num|null - if(flames == null) return - - if ((devastation != -1) || (heavy != -1) || (light != -1) || (flash != -1) || (flames != -1)) - if ((devastation > 20) || (heavy > 20) || (light > 20) || (flames > 20)) - if (alert(src, "Are you sure you want to do this? It will laaag.", "Confirmation", "Yes", "No") == "No") - return - - explosion(O, devastation, heavy, light, flash, null, null,flames) - log_admin("[key_name(usr)] created an explosion ([devastation],[heavy],[light],[flames]) at ([O.x],[O.y],[O.z])") - message_admins("[key_name_admin(usr)] created an explosion ([devastation],[heavy],[light],[flames]) at ([O.x],[O.y],[O.z])") - SSblackbox.add_details("admin_verb","Explosion") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - return - else - return - -/client/proc/cmd_admin_emp(atom/O as obj|mob|turf in world) - set category = "Special Verbs" - set name = "EM Pulse" - - if (!holder) - to_chat(src, "Only administrators may use this command.") - return - - var/heavy = input("Range of heavy pulse.", text("Input")) as num|null - if(heavy == null) return - var/light = input("Range of light pulse.", text("Input")) as num|null - if(light == null) return - - if (heavy || light) - - empulse(O, heavy, light) - log_admin("[key_name(usr)] created an EM Pulse ([heavy],[light]) at ([O.x],[O.y],[O.z])") - message_admins("[key_name_admin(usr)] created an EM Pulse ([heavy],[light]) at ([O.x],[O.y],[O.z])") - SSblackbox.add_details("admin_verb","EM Pulse") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - - return - else - return - -/client/proc/cmd_admin_gib(mob/M in GLOB.mob_list) - set category = "Special Verbs" - set name = "Gib" - - if (!holder) - to_chat(src, "Only administrators may use this command.") - return - - var/confirm = alert(src, "Drop a brain?", "Confirm", "Yes", "No","Cancel") - if(confirm == "Cancel") - return - //Due to the delay here its easy for something to have happened to the mob - if(!M) - return - - log_admin("[key_name(usr)] has gibbed [key_name(M)]") - message_admins("[key_name_admin(usr)] has gibbed [key_name_admin(M)]") - - if(isobserver(M)) +/client/proc/cmd_admin_drop_everything(mob/M in GLOB.mob_list) + set category = null + set name = "Drop Everything" + if(!holder) + to_chat(src, "Only administrators may use this command.") + return + + var/confirm = alert(src, "Make [M] drop everything?", "Message", "Yes", "No") + if(confirm != "Yes") + return + + for(var/obj/item/W in M) + if(!M.dropItemToGround(W)) + qdel(W) + M.regenerate_icons() + + log_admin("[key_name(usr)] made [key_name(M)] drop everything!") + var/msg = "[key_name_admin(usr)] made [key_name_admin(M)] drop everything!" + message_admins(msg) + admin_ticket_log(M, msg) + SSblackbox.add_details("admin_verb","Drop Everything") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + +/client/proc/cmd_admin_subtle_message(mob/M in GLOB.mob_list) + set category = "Special Verbs" + set name = "Subtle Message" + + if(!ismob(M)) + return + if (!holder) + to_chat(src, "Only administrators may use this command.") + return + + message_admins("[key_name_admin(src)] has started answering [key_name(M.key, 0, 0)]'s prayer.") + var/msg = input("Message:", text("Subtle PM to [M.key]")) as text + + if (!msg) + message_admins("[key_name_admin(src)] decided not to answer [key_name(M.key, 0, 0)]'s prayer") + return + if(usr) + if (usr.client) + if(usr.client.holder) + to_chat(M, "You hear a voice in your head... [msg]") + + log_admin("SubtlePM: [key_name(usr)] -> [key_name(M)] : [msg]") + msg = " SubtleMessage: [key_name_admin(usr)] -> [key_name_admin(M)] : [msg]" + message_admins(msg) + admin_ticket_log(M, msg) + SSblackbox.add_details("admin_verb","Subtle Message") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + +/client/proc/cmd_admin_world_narrate() + set category = "Special Verbs" + set name = "Global Narrate" + + if (!holder) + to_chat(src, "Only administrators may use this command.") + return + + var/msg = input("Message:", text("Enter the text you wish to appear to everyone:")) as text + + if (!msg) + return + to_chat(world, "[msg]") + log_admin("GlobalNarrate: [key_name(usr)] : [msg]") + message_admins("[key_name_admin(usr)] Sent a global narrate") + SSblackbox.add_details("admin_verb","Global Narrate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + +/client/proc/cmd_admin_direct_narrate(mob/M) + set category = "Special Verbs" + set name = "Direct Narrate" + + if(!holder) + to_chat(src, "Only administrators may use this command.") + return + + if(!M) + M = input("Direct narrate to whom?", "Active Players") as null|anything in GLOB.player_list + + if(!M) + return + + var/msg = input("Message:", text("Enter the text you wish to appear to your target:")) as text + + if( !msg ) + return + + to_chat(M, msg) + log_admin("DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]") + msg = " DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]
    " + message_admins(msg) + admin_ticket_log(M, msg) + SSblackbox.add_details("admin_verb","Direct Narrate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + +/client/proc/cmd_admin_local_narrate(atom/A) + set category = "Special Verbs" + set name = "Local Narrate" + + if (!holder) + to_chat(src, "Only administrators may use this command.") + return + if(!A) + return + var/range = input("Range:", "Narrate to mobs within how many tiles:", 7) as num + if(!range) + return + var/msg = input("Message:", text("Enter the text you wish to appear to everyone within view:")) as text + if (!msg) + return + for(var/mob/M in view(range,A)) + to_chat(M, msg) + + log_admin("LocalNarrate: [key_name(usr)] at [get_area(A)][COORD(A)]: [msg]") + message_admins(" LocalNarrate: [key_name_admin(usr)] at [get_area(A)][ADMIN_JMP(A)]: [msg]
    ") + SSblackbox.add_details("admin_verb","Local Narrate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + +/client/proc/cmd_admin_godmode(mob/M in GLOB.mob_list) + set category = "Special Verbs" + set name = "Godmode" + if(!holder) + to_chat(src, "Only administrators may use this command.") + return + M.status_flags ^= GODMODE + to_chat(usr, "Toggled [(M.status_flags & GODMODE) ? "ON" : "OFF"]") + + log_admin("[key_name(usr)] has toggled [key_name(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]") + var/msg = "[key_name_admin(usr)] has toggled [key_name_admin(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]" + message_admins(msg) + admin_ticket_log(M, msg) + SSblackbox.add_details("admin_toggle","Godmode|[M.status_flags & GODMODE]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + + +/proc/cmd_admin_mute(whom, mute_type, automute = 0) + if(!whom) + return + + var/muteunmute + var/mute_string + var/feedback_string + switch(mute_type) + if(MUTE_IC) + mute_string = "IC (say and emote)" + feedback_string = "IC" + if(MUTE_OOC) + mute_string = "OOC" + feedback_string = "OOC" + if(MUTE_PRAY) + mute_string = "pray" + feedback_string = "Pray" + if(MUTE_ADMINHELP) + mute_string = "adminhelp, admin PM and ASAY" + feedback_string = "Adminhelp" + if(MUTE_DEADCHAT) + mute_string = "deadchat and DSAY" + feedback_string = "Deadchat" + if(MUTE_ALL) + mute_string = "everything" + feedback_string = "Everything" + else + return + + var/client/C + if(istype(whom, /client)) + C = whom + else if(istext(whom)) + C = GLOB.directory[whom] + else + return + + var/datum/preferences/P + if(C) + P = C.prefs + else + P = GLOB.preferences_datums[whom] + if(!P) + return + + if(automute) + if(!config.automute_on) + return + else + if(!check_rights()) + return + + if(automute) + muteunmute = "auto-muted" + P.muted |= mute_type + log_admin("SPAM AUTOMUTE: [muteunmute] [key_name(whom)] from [mute_string]") + message_admins("SPAM AUTOMUTE: [muteunmute] [key_name_admin(whom)] from [mute_string].") + if(C) + to_chat(C, "You have been [muteunmute] from [mute_string] by the SPAM AUTOMUTE system. Contact an admin.") + SSblackbox.add_details("admin_toggle","Auto Mute [feedback_string]|1") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + return + + if(P.muted & mute_type) + muteunmute = "unmuted" + P.muted &= ~mute_type + else + muteunmute = "muted" + P.muted |= mute_type + + log_admin("[key_name(usr)] has [muteunmute] [key_name(whom)] from [mute_string]") + message_admins("[key_name_admin(usr)] has [muteunmute] [key_name_admin(whom)] from [mute_string].") + if(C) + to_chat(C, "You have been [muteunmute] from [mute_string] by [key_name(usr, include_name = FALSE)].") + SSblackbox.add_details("admin_toggle","Mute [feedback_string]|[P.muted & mute_type]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + + +//I use this proc for respawn character too. /N +/proc/create_xeno(ckey) + if(!ckey) + var/list/candidates = list() + for(var/mob/M in GLOB.player_list) + if(M.stat != DEAD) + continue //we are not dead! + if(!(ROLE_ALIEN in M.client.prefs.be_special)) + continue //we don't want to be an alium + if(M.client.is_afk()) + continue //we are afk + if(M.mind && M.mind.current && M.mind.current.stat != DEAD) + continue //we have a live body we are tied to + candidates += M.ckey + if(candidates.len) + ckey = input("Pick the player you want to respawn as a xeno.", "Suitable Candidates") as null|anything in candidates + else + to_chat(usr, "Error: create_xeno(): no suitable candidates.") + if(!istext(ckey)) + return 0 + + var/alien_caste = input(usr, "Please choose which caste to spawn.","Pick a caste",null) as null|anything in list("Queen","Praetorian","Hunter","Sentinel","Drone","Larva") + var/obj/effect/landmark/spawn_here = GLOB.xeno_spawn.len ? pick(GLOB.xeno_spawn) : null + var/mob/living/carbon/alien/new_xeno + switch(alien_caste) + if("Queen") + new_xeno = new /mob/living/carbon/alien/humanoid/royal/queen(spawn_here) + if("Praetorian") + new_xeno = new /mob/living/carbon/alien/humanoid/royal/praetorian(spawn_here) + if("Hunter") + new_xeno = new /mob/living/carbon/alien/humanoid/hunter(spawn_here) + if("Sentinel") + new_xeno = new /mob/living/carbon/alien/humanoid/sentinel(spawn_here) + if("Drone") + new_xeno = new /mob/living/carbon/alien/humanoid/drone(spawn_here) + if("Larva") + new_xeno = new /mob/living/carbon/alien/larva(spawn_here) + else + return 0 + if(!spawn_here) + SSjob.SendToLateJoin(new_xeno, FALSE) + + new_xeno.ckey = ckey + var/msg = "[key_name_admin(usr)] has spawned [ckey] as a filthy xeno [alien_caste]." + message_admins(msg) + admin_ticket_log(new_xeno, msg) + return 1 + +/* +If a guy was gibbed and you want to revive him, this is a good way to do so. +Works kind of like entering the game with a new character. Character receives a new mind if they didn't have one. +Traitors and the like can also be revived with the previous role mostly intact. +/N */ +/client/proc/respawn_character() + set category = "Special Verbs" + set name = "Respawn Character" + set desc = "Respawn a person that has been gibbed/dusted/killed. They must be a ghost for this to work and preferably should not have a body to go back into." + if(!holder) + to_chat(src, "Only administrators may use this command.") + return + var/input = ckey(input(src, "Please specify which key will be respawned.", "Key", "")) + if(!input) + return + + var/mob/dead/observer/G_found + for(var/mob/dead/observer/G in GLOB.player_list) + if(G.ckey == input) + G_found = G + break + + if(!G_found)//If a ghost was not found. + to_chat(usr, "There is no active key like that in the game or the person is not currently a ghost.") + return + + if(G_found.mind && !G_found.mind.active) //mind isn't currently in use by someone/something + //Check if they were an alien + if(G_found.mind.assigned_role=="Alien") + if(alert("This character appears to have been an alien. Would you like to respawn them as such?",,"Yes","No")=="Yes") + var/turf/T + if(GLOB.xeno_spawn.len) + T = pick(GLOB.xeno_spawn) + + var/mob/living/carbon/alien/new_xeno + switch(G_found.mind.special_role)//If they have a mind, we can determine which caste they were. + if("Hunter") + new_xeno = new /mob/living/carbon/alien/humanoid/hunter(T) + if("Sentinel") + new_xeno = new /mob/living/carbon/alien/humanoid/sentinel(T) + if("Drone") + new_xeno = new /mob/living/carbon/alien/humanoid/drone(T) + if("Praetorian") + new_xeno = new /mob/living/carbon/alien/humanoid/royal/praetorian(T) + if("Queen") + new_xeno = new /mob/living/carbon/alien/humanoid/royal/queen(T) + else//If we don't know what special role they have, for whatever reason, or they're a larva. + create_xeno(G_found.ckey) + return + + if(!T) + SSjob.SendToLateJoin(new_xeno, FALSE) + + //Now to give them their mind back. + G_found.mind.transfer_to(new_xeno) //be careful when doing stuff like this! I've already checked the mind isn't in use + new_xeno.key = G_found.key + to_chat(new_xeno, "You have been fully respawned. Enjoy the game.") + var/msg = "[key_name_admin(usr)] has respawned [new_xeno.key] as a filthy xeno." + message_admins(msg) + admin_ticket_log(new_xeno, msg) + return //all done. The ghost is auto-deleted + + //check if they were a monkey + else if(findtext(G_found.real_name,"monkey")) + if(alert("This character appears to have been a monkey. Would you like to respawn them as such?",,"Yes","No")=="Yes") + var/mob/living/carbon/monkey/new_monkey = new + SSjob.SendToLateJoin(new_monkey) + G_found.mind.transfer_to(new_monkey) //be careful when doing stuff like this! I've already checked the mind isn't in use + new_monkey.key = G_found.key + to_chat(new_monkey, "You have been fully respawned. Enjoy the game.") + var/msg = "[key_name_admin(usr)] has respawned [new_monkey.key] as a filthy xeno." + message_admins(msg) + admin_ticket_log(new_monkey, msg) + return //all done. The ghost is auto-deleted + + + //Ok, it's not a xeno or a monkey. So, spawn a human. + var/mob/living/carbon/human/new_character = new//The mob being spawned. + SSjob.SendToLateJoin(new_character) + + var/datum/data/record/record_found //Referenced to later to either randomize or not randomize the character. + if(G_found.mind && !G_found.mind.active) //mind isn't currently in use by someone/something + /*Try and locate a record for the person being respawned through GLOB.data_core. + This isn't an exact science but it does the trick more often than not.*/ + var/id = md5("[G_found.real_name][G_found.mind.assigned_role]") + + record_found = find_record("id", id, GLOB.data_core.locked) + + if(record_found)//If they have a record we can determine a few things. + new_character.real_name = record_found.fields["name"] + new_character.gender = record_found.fields["sex"] + new_character.age = record_found.fields["age"] + new_character.hardset_dna(record_found.fields["identity"], record_found.fields["enzymes"], record_found.fields["name"], record_found.fields["blood_type"], record_found.fields["species"], record_found.fields["features"]) + else + var/datum/preferences/A = new() + A.copy_to(new_character) + A.real_name = G_found.real_name + new_character.dna.update_dna_identity() + + new_character.name = new_character.real_name + + if(G_found.mind && !G_found.mind.active) + G_found.mind.transfer_to(new_character) //be careful when doing stuff like this! I've already checked the mind isn't in use + else + new_character.mind_initialize() + if(!new_character.mind.assigned_role) + new_character.mind.assigned_role = "Assistant"//If they somehow got a null assigned role. + + new_character.key = G_found.key + + /* + The code below functions with the assumption that the mob is already a traitor if they have a special role. + So all it does is re-equip the mob with powers and/or items. Or not, if they have no special role. + If they don't have a mind, they obviously don't have a special role. + */ + + //Two variables to properly announce later on. + var/admin = key_name_admin(src) + var/player_key = G_found.key + + //Now for special roles and equipment. + var/datum/antagonist/traitor/traitordatum = new_character.mind.has_antag_datum(ANTAG_DATUM_TRAITOR) + if(traitordatum) + SSjob.EquipRank(new_character, new_character.mind.assigned_role, 1) + traitordatum.equip() + + + switch(new_character.mind.special_role) + if("Wizard") + new_character.loc = pick(GLOB.wizardstart) + //SSticker.mode.learn_basic_spells(new_character) + SSticker.mode.equip_wizard(new_character) + if("Syndicate") + var/obj/effect/landmark/synd_spawn = locate("landmark*Syndicate-Spawn") + if(synd_spawn) + new_character.loc = get_turf(synd_spawn) + call(/datum/game_mode/proc/equip_syndicate)(new_character) + if("Space Ninja") + var/list/ninja_spawn = list() + for(var/obj/effect/landmark/L in GLOB.landmarks_list) + if(L.name=="carpspawn") + ninja_spawn += L + var/datum/antagonist/ninja/ninjadatum = new_character.mind.has_antag_datum(ANTAG_DATUM_NINJA) + ninjadatum.equip_space_ninja() + if(ninja_spawn.len) + var/obj/effect/landmark/ninja_spawn_here = pick(ninja_spawn) + new_character.loc = ninja_spawn_here.loc + + else//They may also be a cyborg or AI. + switch(new_character.mind.assigned_role) + if("Cyborg")//More rigging to make em' work and check if they're traitor. + new_character = new_character.Robotize() + if("AI") + new_character = new_character.AIize() + else + SSjob.EquipRank(new_character, new_character.mind.assigned_role, 1)//Or we simply equip them. + + //Announces the character on all the systems, based on the record. + if(!issilicon(new_character))//If they are not a cyborg/AI. + if(!record_found&&new_character.mind.assigned_role!=new_character.mind.special_role)//If there are no records for them. If they have a record, this info is already in there. MODE people are not announced anyway. + //Power to the user! + if(alert(new_character,"Warning: No data core entry detected. Would you like to announce the arrival of this character by adding them to various databases, such as medical records?",,"No","Yes")=="Yes") + GLOB.data_core.manifest_inject(new_character) + + if(alert(new_character,"Would you like an active AI to announce this character?",,"No","Yes")=="Yes") + AnnounceArrival(new_character, new_character.mind.assigned_role) + + var/msg = "[admin] has respawned [player_key] as [new_character.real_name]." + message_admins(msg) + admin_ticket_log(new_character, msg) + + to_chat(new_character, "You have been fully respawned. Enjoy the game.") + + SSblackbox.add_details("admin_verb","Respawn Character") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + return new_character + +/client/proc/cmd_admin_add_freeform_ai_law() + set category = "Fun" + set name = "Add Custom AI law" + if(!holder) + to_chat(src, "Only administrators may use this command.") + return + var/input = input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") as text|null + if(!input) + return + + log_admin("Admin [key_name(usr)] has added a new AI law - [input]") + message_admins("Admin [key_name_admin(usr)] has added a new AI law - [input]") + + var/show_log = alert(src, "Show ion message?", "Message", "Yes", "No") + var/announce_ion_laws = (show_log == "Yes" ? 1 : -1) + + var/datum/round_event/ion_storm/add_law_only/ion = new() + ion.announceEvent = announce_ion_laws + ion.ionMessage = input + + SSblackbox.add_details("admin_verb","Add Custom AI Law") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + +/client/proc/cmd_admin_rejuvenate(mob/living/M in GLOB.mob_list) + set category = "Special Verbs" + set name = "Rejuvenate" + if(!holder) + to_chat(src, "Only administrators may use this command.") + return + if(!mob) + return + if(!istype(M)) + alert("Cannot revive a ghost") + return + M.revive(full_heal = 1, admin_revive = 1) + + log_admin("[key_name(usr)] healed / revived [key_name(M)]") + var/msg = "Admin [key_name_admin(usr)] healed / revived [key_name_admin(M)]!" + message_admins(msg) + admin_ticket_log(M, msg) + SSblackbox.add_details("admin_verb","Rejuvinate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + +/client/proc/cmd_admin_create_centcom_report() + set category = "Special Verbs" + set name = "Create Command Report" + if(!holder) + to_chat(src, "Only administrators may use this command.") + return + var/input = input(usr, "Please enter anything you want. Anything. Serious.", "What?", "") as message|null + if(!input) + return + + var/confirm = alert(src, "Do you want to announce the contents of the report to the crew?", "Announce", "Yes", "No", "Cancel") + var/announce_command_report = TRUE + switch(confirm) + if("Yes") + priority_announce(input, null, 'sound/ai/commandreport.ogg') + announce_command_report = FALSE + if("Cancel") + return + + print_command_report(input, "[announce_command_report ? "Classified " : ""][command_name()] Update", announce_command_report) + + log_admin("[key_name(src)] has created a command report: [input]") + message_admins("[key_name_admin(src)] has created a command report") + SSblackbox.add_details("admin_verb","Create Command Report") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + +/client/proc/cmd_change_command_name() + set category = "Special Verbs" + set name = "Change Command Name" + if(!holder) + to_chat(src, "Only administrators may use this command.") + return + var/input = input(usr, "Please input a new name for Central Command.", "What?", "") as text|null + if(!input) + return + change_command_name(input) + message_admins("[key_name_admin(src)] has changed Central Command's name to [input]") + log_admin("[key_name(src)] has changed the Central Command name to: [input]") + +/client/proc/cmd_admin_delete(atom/A as obj|mob|turf in world) + set category = "Admin" + set name = "Delete" + + if (!holder) + to_chat(src, "Only administrators may use this command.") + return + + admin_delete(A) + +/client/proc/admin_delete(datum/D) + var/atom/A = D + var/coords = istype(A) ? " at ([A.x], [A.y], [A.z])" : "" + if (alert(src, "Are you sure you want to delete:\n[D]\nat[coords]?", "Confirmation", "Yes", "No") == "Yes") + log_admin("[key_name(usr)] deleted [D][coords]") + message_admins("[key_name_admin(usr)] deleted [D][coords]") + SSblackbox.add_details("admin_verb","Delete") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + if(isturf(D)) + var/turf/T = D + T.ChangeTurf(T.baseturf) + else + qdel(D) + +/client/proc/cmd_admin_list_open_jobs() + set category = "Admin" + set name = "Manage Job Slots" + + if (!holder) + to_chat(src, "Only administrators may use this command.") + return + holder.manage_free_slots() + SSblackbox.add_details("admin_verb","Manage Job Slots") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + +/client/proc/cmd_admin_explosion(atom/O as obj|mob|turf in world) + set category = "Special Verbs" + set name = "Explosion" + + if (!holder) + to_chat(src, "Only administrators may use this command.") + return + + var/devastation = input("Range of total devastation. -1 to none", text("Input")) as num|null + if(devastation == null) return + var/heavy = input("Range of heavy impact. -1 to none", text("Input")) as num|null + if(heavy == null) return + var/light = input("Range of light impact. -1 to none", text("Input")) as num|null + if(light == null) return + var/flash = input("Range of flash. -1 to none", text("Input")) as num|null + if(flash == null) return + var/flames = input("Range of flames. -1 to none", text("Input")) as num|null + if(flames == null) return + + if ((devastation != -1) || (heavy != -1) || (light != -1) || (flash != -1) || (flames != -1)) + if ((devastation > 20) || (heavy > 20) || (light > 20) || (flames > 20)) + if (alert(src, "Are you sure you want to do this? It will laaag.", "Confirmation", "Yes", "No") == "No") + return + + explosion(O, devastation, heavy, light, flash, null, null,flames) + log_admin("[key_name(usr)] created an explosion ([devastation],[heavy],[light],[flames]) at ([O.x],[O.y],[O.z])") + message_admins("[key_name_admin(usr)] created an explosion ([devastation],[heavy],[light],[flames]) at ([O.x],[O.y],[O.z])") + SSblackbox.add_details("admin_verb","Explosion") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + return + else + return + +/client/proc/cmd_admin_emp(atom/O as obj|mob|turf in world) + set category = "Special Verbs" + set name = "EM Pulse" + + if (!holder) + to_chat(src, "Only administrators may use this command.") + return + + var/heavy = input("Range of heavy pulse.", text("Input")) as num|null + if(heavy == null) return + var/light = input("Range of light pulse.", text("Input")) as num|null + if(light == null) return + + if (heavy || light) + + empulse(O, heavy, light) + log_admin("[key_name(usr)] created an EM Pulse ([heavy],[light]) at ([O.x],[O.y],[O.z])") + message_admins("[key_name_admin(usr)] created an EM Pulse ([heavy],[light]) at ([O.x],[O.y],[O.z])") + SSblackbox.add_details("admin_verb","EM Pulse") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + + return + else + return + +/client/proc/cmd_admin_gib(mob/M in GLOB.mob_list) + set category = "Special Verbs" + set name = "Gib" + + if (!holder) + to_chat(src, "Only administrators may use this command.") + return + + var/confirm = alert(src, "Drop a brain?", "Confirm", "Yes", "No","Cancel") + if(confirm == "Cancel") + return + //Due to the delay here its easy for something to have happened to the mob + if(!M) + return + + log_admin("[key_name(usr)] has gibbed [key_name(M)]") + message_admins("[key_name_admin(usr)] has gibbed [key_name_admin(M)]") + + if(isobserver(M)) new /obj/effect/gibspawner/generic(get_turf(M)) - return - if(confirm == "Yes") - M.gib() - else - M.gib(1) - SSblackbox.add_details("admin_verb","Gib") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - -/client/proc/cmd_admin_gib_self() - set name = "Gibself" - set category = "Fun" - - var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No") - if(confirm == "Yes") - log_admin("[key_name(usr)] used gibself.") - message_admins("[key_name_admin(usr)] used gibself.") - SSblackbox.add_details("admin_verb","Gib Self") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - mob.gib(1, 1, 1) - -/client/proc/cmd_admin_check_contents(mob/living/M in GLOB.mob_list) - set category = "Special Verbs" - set name = "Check Contents" - - var/list/L = M.get_contents() - for(var/t in L) - to_chat(usr, "[t]") - SSblackbox.add_details("admin_verb","Check Contents") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - -/client/proc/toggle_view_range() - set category = "Special Verbs" - set name = "Change View Range" - set desc = "switches between 1x and custom views" - - if(view == world.view) + return + if(confirm == "Yes") + M.gib() + else + M.gib(1) + SSblackbox.add_details("admin_verb","Gib") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + +/client/proc/cmd_admin_gib_self() + set name = "Gibself" + set category = "Fun" + + var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No") + if(confirm == "Yes") + log_admin("[key_name(usr)] used gibself.") + message_admins("[key_name_admin(usr)] used gibself.") + SSblackbox.add_details("admin_verb","Gib Self") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + mob.gib(1, 1, 1) + +/client/proc/cmd_admin_check_contents(mob/living/M in GLOB.mob_list) + set category = "Special Verbs" + set name = "Check Contents" + + var/list/L = M.get_contents() + for(var/t in L) + to_chat(usr, "[t]") + SSblackbox.add_details("admin_verb","Check Contents") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + +/client/proc/toggle_view_range() + set category = "Special Verbs" + set name = "Change View Range" + set desc = "switches between 1x and custom views" + + if(view == world.view) change_view(input("Select view range:", "FUCK YE", 7) in list(1,2,3,4,5,6,7,8,9,10,11,12,13,14,128)) - else + else change_view(world.view) - - log_admin("[key_name(usr)] changed their view range to [view].") - //message_admins("\blue [key_name_admin(usr)] changed their view range to [view].") //why? removed by order of XSI - - SSblackbox.add_details("admin_toggle","Change View Range|[view]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - -/client/proc/admin_call_shuttle() - - set category = "Admin" - set name = "Call Shuttle" - - if(EMERGENCY_AT_LEAST_DOCKED) - return - - if (!holder) - to_chat(src, "Only administrators may use this command.") - return - - var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No") - if(confirm != "Yes") - return - - SSshuttle.emergency.request() - SSblackbox.add_details("admin_verb","Call Shuttle") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - log_admin("[key_name(usr)] admin-called the emergency shuttle.") - message_admins("[key_name_admin(usr)] admin-called the emergency shuttle.") - return - -/client/proc/admin_cancel_shuttle() - set category = "Admin" - set name = "Cancel Shuttle" - if(!check_rights(0)) - return - if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes") - return - - if(EMERGENCY_AT_LEAST_DOCKED) - return - - SSshuttle.emergency.cancel() - SSblackbox.add_details("admin_verb","Cancel Shuttle") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - log_admin("[key_name(usr)] admin-recalled the emergency shuttle.") - message_admins("[key_name_admin(usr)] admin-recalled the emergency shuttle.") - - return - -/client/proc/everyone_random() - set category = "Fun" - set name = "Make Everyone Random" - set desc = "Make everyone have a random appearance. You can only use this before rounds!" - - if(SSticker.HasRoundStarted()) - to_chat(usr, "Nope you can't do this, the game's already started. This only works before rounds!") - return - - if(config.force_random_names) - config.force_random_names = 0 - message_admins("Admin [key_name_admin(usr)] has disabled \"Everyone is Special\" mode.") - to_chat(usr, "Disabled.") - return - - - var/notifyplayers = alert(src, "Do you want to notify the players?", "Options", "Yes", "No", "Cancel") - if(notifyplayers == "Cancel") - return - - log_admin("Admin [key_name(src)] has forced the players to have random appearances.") - message_admins("Admin [key_name_admin(usr)] has forced the players to have random appearances.") - - if(notifyplayers == "Yes") - to_chat(world, "Admin [usr.key] has forced the players to have completely random identities!") - - to_chat(usr, "Remember: you can always disable the randomness by using the verb again, assuming the round hasn't started yet.") - - config.force_random_names = 1 - SSblackbox.add_details("admin_verb","Make Everyone Random") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - - -/client/proc/toggle_random_events() - set category = "Server" - set name = "Toggle random events on/off" - set desc = "Toggles random events such as meteors, black holes, blob (but not space dust) on/off" - if(!config.allow_random_events) - config.allow_random_events = 1 - to_chat(usr, "Random events enabled") - message_admins("Admin [key_name_admin(usr)] has enabled random events.") - else - config.allow_random_events = 0 - to_chat(usr, "Random events disabled") - message_admins("Admin [key_name_admin(usr)] has disabled random events.") - SSblackbox.add_details("admin_toggle","Toggle Random Events|[config.allow_random_events]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - - -/client/proc/admin_change_sec_level() - set category = "Special Verbs" - set name = "Set Security Level" - set desc = "Changes the security level. Announcement only, i.e. setting to Delta won't activate nuke" - - if (!holder) - to_chat(src, "Only administrators may use this command.") - return - - var/level = input("Select security level to change to","Set Security Level") as null|anything in list("green","blue","red","delta") - if(level) - set_security_level(level) - - log_admin("[key_name(usr)] changed the security level to [level]") - message_admins("[key_name_admin(usr)] changed the security level to [level]") - SSblackbox.add_details("admin_verb","Set Security Level [capitalize(level)]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - -/client/proc/toggle_nuke(obj/machinery/nuclearbomb/N in GLOB.nuke_list) - set name = "Toggle Nuke" - set category = "Fun" - set popup_menu = 0 - if(!check_rights(R_DEBUG)) - return - - if(!N.timing) - var/newtime = input(usr, "Set activation timer.", "Activate Nuke", "[N.timer_set]") as num - if(!newtime) - return - N.timer_set = newtime - N.set_safety() - N.set_active() - - log_admin("[key_name(usr)] [N.timing ? "activated" : "deactivated"] a nuke at ([N.x],[N.y],[N.z]).") - message_admins("[ADMIN_LOOKUPFLW(usr)] [N.timing ? "activated" : "deactivated"] a nuke at [ADMIN_COORDJMP(N)].") - SSblackbox.add_details("admin_toggle","Toggle Nuke|[N.timing]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - -GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits - -/client/proc/create_outfits() - set category = "Debug" - set name = "Create Custom Outfit" - - if(!check_rights(R_DEBUG)) - return - - holder.create_outfit() - -/datum/admins/proc/create_outfit() - var/list/uniforms = typesof(/obj/item/clothing/under) - var/list/suits = typesof(/obj/item/clothing/suit) - var/list/gloves = typesof(/obj/item/clothing/gloves) - var/list/shoes = typesof(/obj/item/clothing/shoes) - var/list/headwear = typesof(/obj/item/clothing/head) - var/list/glasses = typesof(/obj/item/clothing/glasses) - var/list/masks = typesof(/obj/item/clothing/mask) - var/list/ids = typesof(/obj/item/card/id) - - var/uniform_select = "" - - var/suit_select = "" - - var/gloves_select = "" - - var/shoes_select = "" - - var/head_select = "" - - var/glasses_select = "" - - var/mask_select = "" - - var/id_select = "" - - var/dat = {" - Create Outfit -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Name: - -
    Uniform: - [uniform_select] -
    Suit: - [suit_select] -
    Back: - -
    Belt: - -
    Gloves: - [gloves_select] -
    Shoes: - [shoes_select] -
    Head: - [head_select] -
    Mask: - [mask_select] -
    Ears: - -
    Glasses: - [glasses_select] -
    ID: - [id_select] -
    Left Pocket: - -
    Right Pocket: - -
    Suit Store: - -
    Right Hand: - -
    Left Hand: - -
    -
    - -
    - "} - usr << browse(dat, "window=dressup;size=550x600") - -/client/proc/toggle_antag_hud() - set category = "Admin" - set name = "Toggle AntagHUD" - set desc = "Toggles the Admin AntagHUD" - - if(!holder) return - - var/adding_hud = !has_antag_hud() - - for(var/datum/atom_hud/H in GLOB.huds) - if(istype(H, /datum/atom_hud/antag)) - (adding_hud) ? H.add_hud_to(usr) : H.remove_hud_from(usr) - - for(var/datum/gang/G in SSticker.mode.gangs) - var/datum/atom_hud/antag/H = G.ganghud - (adding_hud) ? H.add_hud_to(usr) : H.remove_hud_from(usr) - - to_chat(usr, "You toggled your admin antag HUD [adding_hud ? "ON" : "OFF"].") - message_admins("[key_name_admin(usr)] toggled their admin antag HUD [adding_hud ? "ON" : "OFF"].") - log_admin("[key_name(usr)] toggled their admin antag HUD [adding_hud ? "ON" : "OFF"].") - SSblackbox.add_details("admin_toggle","Toggle Antag HUD|[adding_hud]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - -/client/proc/has_antag_hud() - var/datum/atom_hud/A = GLOB.huds[ANTAG_HUD_TRAITOR] - return A.hudusers[mob] - -/client/proc/open_shuttle_manipulator() - set category = "Admin" - set name = "Shuttle Manipulator" - set desc = "Opens the shuttle manipulator UI." - - for(var/obj/machinery/shuttle_manipulator/M in GLOB.machines) - M.ui_interact(usr) - -/client/proc/mass_zombie_infection() - set category = "Fun" - set name = "Mass Zombie Infection" - set desc = "Infects all humans with a latent organ that will zombify \ - them on death." - - if(!holder) - return - - var/confirm = alert(src, "Please confirm you want to add latent zombie organs in all humans?", "Confirm Zombies", "Yes", "No") - if(confirm != "Yes") - return - - for(var/mob/living/carbon/human/H in GLOB.mob_list) - new /obj/item/organ/zombie_infection(H) - - message_admins("[key_name_admin(usr)] added a latent zombie infection to all humans.") - log_admin("[key_name(usr)] added a latent zombie infection to all humans.") - SSblackbox.add_details("admin_verb","Mass Zombie Infection") - -/client/proc/mass_zombie_cure() - set category = "Fun" - set name = "Mass Zombie Cure" - set desc = "Removes the zombie infection from all humans, returning them to normal." - if(!holder) - return - - var/confirm = alert(src, "Please confirm you want to cure all zombies?", "Confirm Zombie Cure", "Yes", "No") - if(confirm != "Yes") - return - - for(var/obj/item/organ/zombie_infection/I in GLOB.zombie_infection_list) - qdel(I) - - message_admins("[key_name_admin(usr)] cured all zombies.") - log_admin("[key_name(usr)] cured all zombies.") - SSblackbox.add_details("admin_verb","Mass Zombie Cure") - -/client/proc/polymorph_all() - set category = "Fun" - set name = "Polymorph All" - set desc = "Applies the effects of the bolt of change to every single mob." - - if(!holder) - return - - var/confirm = alert(src, "Please confirm you want polymorph all mobs?", "Confirm Polymorph", "Yes", "No") - if(confirm != "Yes") - return - - var/list/mobs = shuffle(GLOB.living_mob_list.Copy()) // might change while iterating - var/who_did_it = key_name_admin(usr) - - message_admins("[key_name_admin(usr)] started polymorphed all living mobs.") - log_admin("[key_name(usr)] polymorphed all living mobs.") - SSblackbox.add_details("admin_verb","Polymorph All") - - for(var/mob/living/M in mobs) - CHECK_TICK - - if(!M) - continue - - M.audible_message("...wabbajack...wabbajack...") - playsound(M.loc, 'sound/magic/staff_change.ogg', 50, 1, -1) - - wabbajack(M) - - message_admins("Mass polymorph started by [who_did_it] is complete.") - - -/client/proc/show_tip() - set category = "Admin" - set name = "Show Tip" - set desc = "Sends a tip (that you specify) to all players. After all \ - you're the experienced player here." - - if(!holder) - return - - var/input = input(usr, "Please specify your tip that you want to send to the players.", "Tip", "") as message|null - if(!input) - return - - if(!SSticker) - return - - SSticker.selected_tip = input - - // If we've already tipped, then send it straight away. - if(SSticker.tipped) - SSticker.send_tip_of_the_round() - - - message_admins("[key_name_admin(usr)] sent a tip of the round.") - log_admin("[key_name(usr)] sent \"[input]\" as the Tip of the Round.") - SSblackbox.add_details("admin_verb","Show Tip") - -#define ON_PURRBATION(H) (!(H.dna.features["tail_human"] == "None" && H.dna.features["ears"] == "None")) - -/proc/mass_purrbation() - for(var/M in GLOB.mob_list) - if(ishumanbasic(M)) - purrbation_apply(M) - CHECK_TICK - -/proc/mass_remove_purrbation() - for(var/M in GLOB.mob_list) - if(ishumanbasic(M)) - purrbation_remove(M) - CHECK_TICK - -/proc/purrbation_toggle(mob/living/carbon/human/H) - if(!ishumanbasic(H)) - return - if(!ON_PURRBATION(H)) - purrbation_apply(H) - . = TRUE - else - purrbation_remove(H) - . = FALSE - -/proc/purrbation_apply(mob/living/carbon/human/H) - if(!ishuman(H)) - return - if(ON_PURRBATION(H)) - return - to_chat(H, "Something is nya~t right.") - H.dna.features["tail_human"] = "Cat" - H.dna.features["ears"] = "Cat" - H.regenerate_icons() - playsound(get_turf(H), 'sound/effects/meow1.ogg', 50, 1, -1) - -/proc/purrbation_remove(mob/living/carbon/human/H) - if(!ishuman(H)) - return - if(!ON_PURRBATION(H)) - return - to_chat(H, "You are no longer a cat.") - H.dna.features["tail_human"] = "None" - H.dna.features["ears"] = "None" - H.regenerate_icons() - -#undef ON_PURRBATION - -/client/proc/modify_goals() - set category = "Debug" - set name = "Modify goals" - - if(!check_rights(R_ADMIN)) - return - - holder.modify_goals() - -/datum/admins/proc/modify_goals() - var/dat = "" - for(var/datum/station_goal/S in SSticker.mode.station_goals) - dat += "[S.name] - Announce | Remove
    " - dat += "
    Add New Goal" - usr << browse(dat, "window=goals;size=400x400") - - -/client/proc/toggle_hub() - set category = "Server" - set name = "Toggle Hub" - + log_admin("[key_name(usr)] changed their view range to [view].") + //message_admins("\blue [key_name_admin(usr)] changed their view range to [view].") //why? removed by order of XSI + + SSblackbox.add_details("admin_toggle","Change View Range|[view]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + +/client/proc/admin_call_shuttle() + + set category = "Admin" + set name = "Call Shuttle" + + if(EMERGENCY_AT_LEAST_DOCKED) + return + + if (!holder) + to_chat(src, "Only administrators may use this command.") + return + + var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No") + if(confirm != "Yes") + return + + SSshuttle.emergency.request() + SSblackbox.add_details("admin_verb","Call Shuttle") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + log_admin("[key_name(usr)] admin-called the emergency shuttle.") + message_admins("[key_name_admin(usr)] admin-called the emergency shuttle.") + return + +/client/proc/admin_cancel_shuttle() + set category = "Admin" + set name = "Cancel Shuttle" + if(!check_rights(0)) + return + if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes") + return + + if(EMERGENCY_AT_LEAST_DOCKED) + return + + SSshuttle.emergency.cancel() + SSblackbox.add_details("admin_verb","Cancel Shuttle") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + log_admin("[key_name(usr)] admin-recalled the emergency shuttle.") + message_admins("[key_name_admin(usr)] admin-recalled the emergency shuttle.") + + return + +/client/proc/everyone_random() + set category = "Fun" + set name = "Make Everyone Random" + set desc = "Make everyone have a random appearance. You can only use this before rounds!" + + if(SSticker.HasRoundStarted()) + to_chat(usr, "Nope you can't do this, the game's already started. This only works before rounds!") + return + + if(config.force_random_names) + config.force_random_names = 0 + message_admins("Admin [key_name_admin(usr)] has disabled \"Everyone is Special\" mode.") + to_chat(usr, "Disabled.") + return + + + var/notifyplayers = alert(src, "Do you want to notify the players?", "Options", "Yes", "No", "Cancel") + if(notifyplayers == "Cancel") + return + + log_admin("Admin [key_name(src)] has forced the players to have random appearances.") + message_admins("Admin [key_name_admin(usr)] has forced the players to have random appearances.") + + if(notifyplayers == "Yes") + to_chat(world, "Admin [usr.key] has forced the players to have completely random identities!") + + to_chat(usr, "Remember: you can always disable the randomness by using the verb again, assuming the round hasn't started yet.") + + config.force_random_names = 1 + SSblackbox.add_details("admin_verb","Make Everyone Random") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + + +/client/proc/toggle_random_events() + set category = "Server" + set name = "Toggle random events on/off" + set desc = "Toggles random events such as meteors, black holes, blob (but not space dust) on/off" + if(!config.allow_random_events) + config.allow_random_events = 1 + to_chat(usr, "Random events enabled") + message_admins("Admin [key_name_admin(usr)] has enabled random events.") + else + config.allow_random_events = 0 + to_chat(usr, "Random events disabled") + message_admins("Admin [key_name_admin(usr)] has disabled random events.") + SSblackbox.add_details("admin_toggle","Toggle Random Events|[config.allow_random_events]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + + +/client/proc/admin_change_sec_level() + set category = "Special Verbs" + set name = "Set Security Level" + set desc = "Changes the security level. Announcement only, i.e. setting to Delta won't activate nuke" + + if (!holder) + to_chat(src, "Only administrators may use this command.") + return + + var/level = input("Select security level to change to","Set Security Level") as null|anything in list("green","blue","red","delta") + if(level) + set_security_level(level) + + log_admin("[key_name(usr)] changed the security level to [level]") + message_admins("[key_name_admin(usr)] changed the security level to [level]") + SSblackbox.add_details("admin_verb","Set Security Level [capitalize(level)]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + +/client/proc/toggle_nuke(obj/machinery/nuclearbomb/N in GLOB.nuke_list) + set name = "Toggle Nuke" + set category = "Fun" + set popup_menu = 0 + if(!check_rights(R_DEBUG)) + return + + if(!N.timing) + var/newtime = input(usr, "Set activation timer.", "Activate Nuke", "[N.timer_set]") as num + if(!newtime) + return + N.timer_set = newtime + N.set_safety() + N.set_active() + + log_admin("[key_name(usr)] [N.timing ? "activated" : "deactivated"] a nuke at ([N.x],[N.y],[N.z]).") + message_admins("[ADMIN_LOOKUPFLW(usr)] [N.timing ? "activated" : "deactivated"] a nuke at [ADMIN_COORDJMP(N)].") + SSblackbox.add_details("admin_toggle","Toggle Nuke|[N.timing]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + +GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits + +/client/proc/create_outfits() + set category = "Debug" + set name = "Create Custom Outfit" + + if(!check_rights(R_DEBUG)) + return + + holder.create_outfit() + +/datum/admins/proc/create_outfit() + var/list/uniforms = typesof(/obj/item/clothing/under) + var/list/suits = typesof(/obj/item/clothing/suit) + var/list/gloves = typesof(/obj/item/clothing/gloves) + var/list/shoes = typesof(/obj/item/clothing/shoes) + var/list/headwear = typesof(/obj/item/clothing/head) + var/list/glasses = typesof(/obj/item/clothing/glasses) + var/list/masks = typesof(/obj/item/clothing/mask) + var/list/ids = typesof(/obj/item/card/id) + + var/uniform_select = "" + + var/suit_select = "" + + var/gloves_select = "" + + var/shoes_select = "" + + var/head_select = "" + + var/glasses_select = "" + + var/mask_select = "" + + var/id_select = "" + + var/dat = {" + Create Outfit +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Name: + +
    Uniform: + [uniform_select] +
    Suit: + [suit_select] +
    Back: + +
    Belt: + +
    Gloves: + [gloves_select] +
    Shoes: + [shoes_select] +
    Head: + [head_select] +
    Mask: + [mask_select] +
    Ears: + +
    Glasses: + [glasses_select] +
    ID: + [id_select] +
    Left Pocket: + +
    Right Pocket: + +
    Suit Store: + +
    Right Hand: + +
    Left Hand: + +
    +
    + +
    + "} + usr << browse(dat, "window=dressup;size=550x600") + +/client/proc/toggle_antag_hud() + set category = "Admin" + set name = "Toggle AntagHUD" + set desc = "Toggles the Admin AntagHUD" + + if(!holder) return + + var/adding_hud = !has_antag_hud() + + for(var/datum/atom_hud/H in GLOB.huds) + if(istype(H, /datum/atom_hud/antag)) + (adding_hud) ? H.add_hud_to(usr) : H.remove_hud_from(usr) + + for(var/datum/gang/G in SSticker.mode.gangs) + var/datum/atom_hud/antag/H = G.ganghud + (adding_hud) ? H.add_hud_to(usr) : H.remove_hud_from(usr) + + to_chat(usr, "You toggled your admin antag HUD [adding_hud ? "ON" : "OFF"].") + message_admins("[key_name_admin(usr)] toggled their admin antag HUD [adding_hud ? "ON" : "OFF"].") + log_admin("[key_name(usr)] toggled their admin antag HUD [adding_hud ? "ON" : "OFF"].") + SSblackbox.add_details("admin_toggle","Toggle Antag HUD|[adding_hud]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + +/client/proc/has_antag_hud() + var/datum/atom_hud/A = GLOB.huds[ANTAG_HUD_TRAITOR] + return A.hudusers[mob] + +/client/proc/open_shuttle_manipulator() + set category = "Admin" + set name = "Shuttle Manipulator" + set desc = "Opens the shuttle manipulator UI." + + for(var/obj/machinery/shuttle_manipulator/M in GLOB.machines) + M.ui_interact(usr) + +/client/proc/mass_zombie_infection() + set category = "Fun" + set name = "Mass Zombie Infection" + set desc = "Infects all humans with a latent organ that will zombify \ + them on death." + + if(!holder) + return + + var/confirm = alert(src, "Please confirm you want to add latent zombie organs in all humans?", "Confirm Zombies", "Yes", "No") + if(confirm != "Yes") + return + + for(var/mob/living/carbon/human/H in GLOB.mob_list) + new /obj/item/organ/zombie_infection(H) + + message_admins("[key_name_admin(usr)] added a latent zombie infection to all humans.") + log_admin("[key_name(usr)] added a latent zombie infection to all humans.") + SSblackbox.add_details("admin_verb","Mass Zombie Infection") + +/client/proc/mass_zombie_cure() + set category = "Fun" + set name = "Mass Zombie Cure" + set desc = "Removes the zombie infection from all humans, returning them to normal." + if(!holder) + return + + var/confirm = alert(src, "Please confirm you want to cure all zombies?", "Confirm Zombie Cure", "Yes", "No") + if(confirm != "Yes") + return + + for(var/obj/item/organ/zombie_infection/I in GLOB.zombie_infection_list) + qdel(I) + + message_admins("[key_name_admin(usr)] cured all zombies.") + log_admin("[key_name(usr)] cured all zombies.") + SSblackbox.add_details("admin_verb","Mass Zombie Cure") + +/client/proc/polymorph_all() + set category = "Fun" + set name = "Polymorph All" + set desc = "Applies the effects of the bolt of change to every single mob." + + if(!holder) + return + + var/confirm = alert(src, "Please confirm you want polymorph all mobs?", "Confirm Polymorph", "Yes", "No") + if(confirm != "Yes") + return + + var/list/mobs = shuffle(GLOB.living_mob_list.Copy()) // might change while iterating + var/who_did_it = key_name_admin(usr) + + message_admins("[key_name_admin(usr)] started polymorphed all living mobs.") + log_admin("[key_name(usr)] polymorphed all living mobs.") + SSblackbox.add_details("admin_verb","Polymorph All") + + for(var/mob/living/M in mobs) + CHECK_TICK + + if(!M) + continue + + M.audible_message("...wabbajack...wabbajack...") + playsound(M.loc, 'sound/magic/staff_change.ogg', 50, 1, -1) + + wabbajack(M) + + message_admins("Mass polymorph started by [who_did_it] is complete.") + + +/client/proc/show_tip() + set category = "Admin" + set name = "Show Tip" + set desc = "Sends a tip (that you specify) to all players. After all \ + you're the experienced player here." + + if(!holder) + return + + var/input = input(usr, "Please specify your tip that you want to send to the players.", "Tip", "") as message|null + if(!input) + return + + if(!SSticker) + return + + SSticker.selected_tip = input + + // If we've already tipped, then send it straight away. + if(SSticker.tipped) + SSticker.send_tip_of_the_round() + + + message_admins("[key_name_admin(usr)] sent a tip of the round.") + log_admin("[key_name(usr)] sent \"[input]\" as the Tip of the Round.") + SSblackbox.add_details("admin_verb","Show Tip") + +#define ON_PURRBATION(H) (!(H.dna.features["tail_human"] == "None" && H.dna.features["ears"] == "None")) + +/proc/mass_purrbation() + for(var/M in GLOB.mob_list) + if(ishumanbasic(M)) + purrbation_apply(M) + CHECK_TICK + +/proc/mass_remove_purrbation() + for(var/M in GLOB.mob_list) + if(ishumanbasic(M)) + purrbation_remove(M) + CHECK_TICK + +/proc/purrbation_toggle(mob/living/carbon/human/H) + if(!ishumanbasic(H)) + return + if(!ON_PURRBATION(H)) + purrbation_apply(H) + . = TRUE + else + purrbation_remove(H) + . = FALSE + +/proc/purrbation_apply(mob/living/carbon/human/H) + if(!ishuman(H)) + return + if(ON_PURRBATION(H)) + return + to_chat(H, "Something is nya~t right.") + H.dna.features["tail_human"] = "Cat" + H.dna.features["ears"] = "Cat" + H.regenerate_icons() + playsound(get_turf(H), 'sound/effects/meow1.ogg', 50, 1, -1) + +/proc/purrbation_remove(mob/living/carbon/human/H) + if(!ishuman(H)) + return + if(!ON_PURRBATION(H)) + return + to_chat(H, "You are no longer a cat.") + H.dna.features["tail_human"] = "None" + H.dna.features["ears"] = "None" + H.regenerate_icons() + +#undef ON_PURRBATION + +/client/proc/modify_goals() + set category = "Debug" + set name = "Modify goals" + + if(!check_rights(R_ADMIN)) + return + + holder.modify_goals() + +/datum/admins/proc/modify_goals() + var/dat = "" + for(var/datum/station_goal/S in SSticker.mode.station_goals) + dat += "[S.name] - Announce | Remove
    " + dat += "
    Add New Goal" + usr << browse(dat, "window=goals;size=400x400") + + +/client/proc/toggle_hub() + set category = "Server" + set name = "Toggle Hub" world.update_hub_visibility(!GLOB.hub_visibility) - + log_admin("[key_name(usr)] has toggled the server's hub status for the round, it is now [(GLOB.hub_visibility?"on":"off")] the hub.") message_admins("[key_name_admin(usr)] has toggled the server's hub status for the round, it is now [(GLOB.hub_visibility?"on":"off")] the hub.") if (GLOB.hub_visibility && !world.reachable) - message_admins("WARNING: The server will not show up on the hub because byond is detecting that a filewall is blocking incoming connections.") - + message_admins("WARNING: The server will not show up on the hub because byond is detecting that a filewall is blocking incoming connections.") + SSblackbox.add_details("admin_toggle","Toggled Hub Visibility|[GLOB.hub_visibility]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - -/client/proc/smite(mob/living/carbon/human/target as mob) - set name = "Smite" - set category = "Fun" - if(!holder) - return - - var/list/punishment_list = list(ADMIN_PUNISHMENT_LIGHTNING, ADMIN_PUNISHMENT_BRAINDAMAGE, ADMIN_PUNISHMENT_GIB, ADMIN_PUNISHMENT_BSA) - - var/punishment = input("Choose a punishment", "DIVINE SMITING") as null|anything in punishment_list - - if(QDELETED(target) || !punishment) - return - - switch(punishment) - if(ADMIN_PUNISHMENT_LIGHTNING) - var/turf/T = get_step(get_step(target, NORTH), NORTH) - T.Beam(target, icon_state="lightning[rand(1,12)]", time = 5) - target.adjustFireLoss(75) - target.electrocution_animation(40) - to_chat(target, "The gods have punished you for your sins!") - if(ADMIN_PUNISHMENT_BRAINDAMAGE) - target.adjustBrainLoss(75) - if(ADMIN_PUNISHMENT_GIB) - target.gib(FALSE) - if(ADMIN_PUNISHMENT_BSA) - bluespace_artillery(target) - - var/msg = "[key_name_admin(usr)] punished [key_name_admin(target)] with [punishment]." - message_admins(msg) - admin_ticket_log(target, msg) - log_admin("[key_name(usr)] punished [key_name(target)] with [punishment].") - - -/client/proc/trigger_centcom_recall() - if(!holder) - return - var/message = pick(GLOB.admiral_messages) - message = input("Enter message from the on-call admiral to be put in the recall report.", "Admiral Message", message) as text|null - - if(!message) - return - + +/client/proc/smite(mob/living/carbon/human/target as mob) + set name = "Smite" + set category = "Fun" + if(!holder) + return + + var/list/punishment_list = list(ADMIN_PUNISHMENT_LIGHTNING, ADMIN_PUNISHMENT_BRAINDAMAGE, ADMIN_PUNISHMENT_GIB, ADMIN_PUNISHMENT_BSA) + + var/punishment = input("Choose a punishment", "DIVINE SMITING") as null|anything in punishment_list + + if(QDELETED(target) || !punishment) + return + + switch(punishment) + if(ADMIN_PUNISHMENT_LIGHTNING) + var/turf/T = get_step(get_step(target, NORTH), NORTH) + T.Beam(target, icon_state="lightning[rand(1,12)]", time = 5) + target.adjustFireLoss(75) + target.electrocution_animation(40) + to_chat(target, "The gods have punished you for your sins!") + if(ADMIN_PUNISHMENT_BRAINDAMAGE) + target.adjustBrainLoss(75) + if(ADMIN_PUNISHMENT_GIB) + target.gib(FALSE) + if(ADMIN_PUNISHMENT_BSA) + bluespace_artillery(target) + + var/msg = "[key_name_admin(usr)] punished [key_name_admin(target)] with [punishment]." + message_admins(msg) + admin_ticket_log(target, msg) + log_admin("[key_name(usr)] punished [key_name(target)] with [punishment].") + + +/client/proc/trigger_centcom_recall() + if(!holder) + return + var/message = pick(GLOB.admiral_messages) + message = input("Enter message from the on-call admiral to be put in the recall report.", "Admiral Message", message) as text|null + + if(!message) + return + message_admins("[key_name_admin(usr)] triggered a CentCom recall, with the admiral message of: [message]") log_game("[key_name(usr)] triggered a CentCom recall, with the message of: [message]") - SSshuttle.centcom_recall(SSshuttle.emergency.timer, message) + SSshuttle.centcom_recall(SSshuttle.emergency.timer, message) + +/client/proc/cmd_admin_check_player_exp() //Allows admins to determine who the newer players are. + set category = "Admin" + set name = "Player Playtime" + if(!check_rights(R_ADMIN)) + return + + var/list/msg = list() + msg += "Playtime ReportPlaytime:
    " + src << browse(msg.Join(), "window=Player_playtime_check") + +/datum/admins/proc/cmd_show_exp_panel(client/C) + if(!check_rights(R_ADMIN)) + return + if(!C) + to_chat(usr, "ERROR: Client not found.") + return + + var/list/body = list() + body += "Playtime for [C.key]
    Playtime:" + body += C.get_exp_report() + body += "Toggle Exempt status" + body += "" + usr << browse(body.Join(), "window=playerplaytime[C.ckey];size=550x615") + +/datum/admins/proc/toggle_exempt_status(client/C) + if(!check_rights(R_ADMIN)) + return + if(!C) + to_chat(usr, "ERROR: Client not found.") + return + + if(!C.set_db_player_flags()) + to_chat(usr, "ERROR: Unable read player flags from database. Please check logs.") + var/dbflags = C.prefs.db_flags + var/newstate = FALSE + if(dbflags & DB_FLAG_EXEMPT) + newstate = FALSE + else + newstate = TRUE + + if(C.update_flag_db(DB_FLAG_EXEMPT, newstate)) + to_chat(usr, "ERROR: Unable to update player flags. Please check logs.") + else + message_admins("[key_name_admin(usr)] has [newstate ? "activated" : "deactivated"] job exp exempt status on [key_name_admin(C)]") + log_admin("[key_name(usr)] has [newstate ? "activated" : "deactivated"] job exp exempt status on [key_name(C)]") diff --git a/code/modules/admin/verbs/randomverbs.dm.rej b/code/modules/admin/verbs/randomverbs.dm.rej index 24b4116032..9941251566 100644 --- a/code/modules/admin/verbs/randomverbs.dm.rej +++ b/code/modules/admin/verbs/randomverbs.dm.rej @@ -1,10 +1,25 @@ diff a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm (rejected hunks) -@@ -1214,7 +1214,7 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits - - /client/proc/cmd_admin_check_player_exp() //Allows admins to determine who the newer players are. - set category = "Admin" -- set name = "Check Player Playtime" -+ set name = "Player Playtime" - if(!check_rights(R_ADMIN)) +@@ -1246,7 +1246,8 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits + to_chat(usr, "ERROR: Client not found.") return +- C.set_db_player_flags() ++ if(!C.set_db_player_flags()) ++ to_chat(usr, "ERROR: Unable read player flags from database. Please check logs.") + var/dbflags = C.prefs.db_flags + var/newstate = FALSE + if(dbflags & DB_FLAG_EXEMPT) +@@ -1254,6 +1255,8 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits + else + newstate = TRUE + +- message_admins("[key_name_admin(usr)] has [newstate ? "activated" : "deactivated"] job exp exempt status on [key_name_admin(C)]") +- log_admin("[key_name(usr)] has [newstate ? "activated" : "deactivated"] job exp exempt status on [key_name(C)]") +- C.update_flag_db(DB_FLAG_EXEMPT, newstate) +\ No newline at end of file ++ if(C.update_flag_db(DB_FLAG_EXEMPT, newstate)) ++ to_chat(usr, "ERROR: Unable to update player flags. Please check logs.") ++ else ++ message_admins("[key_name_admin(usr)] has [newstate ? "activated" : "deactivated"] job exp exempt status on [key_name_admin(C)]") ++ log_admin("[key_name(usr)] has [newstate ? "activated" : "deactivated"] job exp exempt status on [key_name(C)]") +\ No newline at end of file diff --git a/code/modules/atmospherics/machinery/atmosmachinery.dm b/code/modules/atmospherics/machinery/atmosmachinery.dm index e22da2f1b1..977d48fbd7 100644 --- a/code/modules/atmospherics/machinery/atmosmachinery.dm +++ b/code/modules/atmospherics/machinery/atmosmachinery.dm @@ -222,6 +222,7 @@ Pipelines + Other Objects -> Pipe network build_network() /obj/machinery/atmospherics/singularity_pull(S, current_size) + ..() if(current_size >= STAGE_FIVE) deconstruct(FALSE) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index bb5c304074..89e6538b07 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -32,6 +32,8 @@ var/running_bob_anim = FALSE var/escape_in_progress = FALSE + var/message_cooldown + var/breakout_time = 0.5 /obj/machinery/atmospherics/components/unary/cryo_cell/Initialize() . = ..() @@ -219,7 +221,9 @@ update_icon() /obj/machinery/atmospherics/components/unary/cryo_cell/relaymove(mob/user) - container_resist(user) + if(message_cooldown <= world.time) + message_cooldown = world.time + 50 + to_chat(user, "[src]'s door won't budge!") /obj/machinery/atmospherics/components/unary/cryo_cell/open_machine(drop = 0) if(!state_open && !panel_open) @@ -239,16 +243,17 @@ return occupant /obj/machinery/atmospherics/components/unary/cryo_cell/container_resist(mob/living/user) - if(escape_in_progress) - to_chat(user, "You are already trying to exit (This will take around 30 seconds)") - return - escape_in_progress = TRUE - to_chat(user, "You struggle inside the cryotube, kicking the release with your foot... (This will take around 30 seconds.)") - audible_message("You hear a thump from [src].") - if(do_after(user, 300)) - if(occupant == user) // Check they're still here. - open_machine() - escape_in_progress = FALSE + user.changeNext_move(CLICK_CD_BREAKOUT) + user.last_special = world.time + CLICK_CD_BREAKOUT + user.visible_message("You see [user] kicking against the glass of [src]!", \ + "You struggle inside [src], kicking the release with your foot... (this will take about [(breakout_time<1) ? "[breakout_time*60] seconds" : "[breakout_time] minute\s"].)", \ + "You hear a thump from [src].") + if(do_after(user,(breakout_time*60*10), target = src)) //minutes * 60seconds * 10deciseconds + if(!user || user.stat != CONSCIOUS || user.loc != src ) + return + user.visible_message("[user] successfully broke out of [src]!", \ + "You successfully break out of [src]!") + open_machine() /obj/machinery/atmospherics/components/unary/cryo_cell/examine(mob/user) ..() @@ -303,30 +308,47 @@ /obj/machinery/atmospherics/components/unary/cryo_cell/ui_data() var/list/data = list() data["isOperating"] = on - data["hasOccupant"] = occupant ? 1 : 0 + data["hasOccupant"] = occupant ? TRUE : FALSE data["isOpen"] = state_open data["autoEject"] = autoeject - var/list/occupantData = list() + data["occupant"] = list() if(occupant) var/mob/living/mob_occupant = occupant - occupantData["name"] = mob_occupant.name - occupantData["stat"] = mob_occupant.stat - occupantData["health"] = mob_occupant.health - occupantData["maxHealth"] = mob_occupant.maxHealth - occupantData["minHealth"] = HEALTH_THRESHOLD_DEAD - occupantData["bruteLoss"] = mob_occupant.getBruteLoss() - occupantData["oxyLoss"] = mob_occupant.getOxyLoss() - occupantData["toxLoss"] = mob_occupant.getToxLoss() - occupantData["fireLoss"] = mob_occupant.getFireLoss() - occupantData["bodyTemperature"] = mob_occupant.bodytemperature - data["occupant"] = occupantData + data["occupant"]["name"] = mob_occupant.name + switch(mob_occupant.stat) + if(CONSCIOUS) + data["occupant"]["stat"] = "Conscious" + data["occupant"]["statstate"] = "good" + if(SOFT_CRIT) + data["occupant"]["stat"] = "Conscious" + data["occupant"]["statstate"] = "average" + if(UNCONSCIOUS) + data["occupant"]["stat"] = "Unconscious" + data["occupant"]["statstate"] = "average" + if(DEAD) + data["occupant"]["stat"] = "Dead" + data["occupant"]["statstate"] = "bad" + data["occupant"]["health"] = round(mob_occupant.health, 1) + data["occupant"]["maxHealth"] = mob_occupant.maxHealth + data["occupant"]["minHealth"] = HEALTH_THRESHOLD_DEAD + data["occupant"]["bruteLoss"] = round(mob_occupant.getBruteLoss(), 1) + data["occupant"]["oxyLoss"] = round(mob_occupant.getOxyLoss(), 1) + data["occupant"]["toxLoss"] = round(mob_occupant.getToxLoss(), 1) + data["occupant"]["fireLoss"] = round(mob_occupant.getFireLoss(), 1) + data["occupant"]["bodyTemperature"] = round(mob_occupant.bodytemperature, 1) + if(mob_occupant.bodytemperature < 225) + data["occupant"]["temperaturestatus"] = "good" + else if(mob_occupant.bodytemperature < 273.15) + data["occupant"]["temperaturestatus"] = "average" + else + data["occupant"]["temperaturestatus"] = "bad" var/datum/gas_mixture/air1 = AIR1 - data["cellTemperature"] = round(air1.temperature) + data["cellTemperature"] = round(air1.temperature, 1) - data["isBeakerLoaded"] = beaker ? 1 : 0 + data["isBeakerLoaded"] = beaker ? TRUE : FALSE var beakerContents = list() if(beaker && beaker.reagents && beaker.reagents.reagent_list.len) for(var/datum/reagent/R in beaker.reagents.reagent_list) diff --git a/code/modules/atmospherics/machinery/other/meter.dm b/code/modules/atmospherics/machinery/other/meter.dm index 89f8b8d2cb..b73fd986f8 100644 --- a/code/modules/atmospherics/machinery/other/meter.dm +++ b/code/modules/atmospherics/machinery/other/meter.dm @@ -120,6 +120,7 @@ return 1 /obj/machinery/meter/singularity_pull(S, current_size) + ..() if(current_size >= STAGE_FIVE) new /obj/item/pipe_meter(loc) qdel(src) diff --git a/code/modules/awaymissions/mission_code/snowdin.dm b/code/modules/awaymissions/mission_code/snowdin.dm index 3343aed902..b89883c286 100644 --- a/code/modules/awaymissions/mission_code/snowdin.dm +++ b/code/modules/awaymissions/mission_code/snowdin.dm @@ -31,7 +31,7 @@ during December to Feburary, so we should try to be frugal with the next shipment.

    November 20th
    Final shipment from central for the next few months. Going outside for more than 10-15 minutes without losing feeling in your fingers is difficult. We've finally gotten a signal on the radio, it's mostly some weird static though. One of the researchers is trying to decypher it.

    December 10th
    Signal has gotten much stronger, it almost seems like it's coming from under us according to what the researcher managed to decypher. We're waiting from the go from central before investigating.

    - The rest of the paper seems to be a mixture of scribbles and smudged ink. "} + The rest of the paper seems to be a mixture of scribbles and smudged ink."} /obj/item/paper/fluff/awaymissions/snowdin/log2 name = "Activity Log" @@ -41,7 +41,7 @@ September 20th
    Another shipment arrival, standard shit. Our radios have been picking up a weird signal during the nights recently, we've sent the transcripts over to the northern base to be decyphered. Probably some drunk russians or something equally stupid.

    November 24th
    We've lost communications with the northern base after recieving the last shipment of supplies. The snow has really kicked up recently, shits almost like a constant blizzard right now. Maybe it'll drop down soon so we can get a word in.

    - The rest of the paper seems to be a mixture of scribbles and smudged ink. "} + The rest of the paper seems to be a mixture of scribbles and smudged ink."} /obj/item/paper/fluff/awaymissions/snowdin/secnotice name = "Security Notice" diff --git a/code/modules/awaymissions/mission_code/stationCollision.dm b/code/modules/awaymissions/mission_code/stationCollision.dm index a5a5f8e904..e3af2a99d7 100644 --- a/code/modules/awaymissions/mission_code/stationCollision.dm +++ b/code/modules/awaymissions/mission_code/stationCollision.dm @@ -28,6 +28,8 @@ B.deity_name = "Narsie" B.icon_state = "melted" B.item_state = "melted" + B.lefthand_file = 'icons/mob/inhands/misc/books_lefthand.dmi' + B.righthand_file = 'icons/mob/inhands/misc/books_righthand.dmi' new /obj/item/paper/fluff/awaymissions/stationcollision/safehint_paper_bible(B) new /obj/item/pen(B) qdel(src) diff --git a/code/modules/cargo/packs.dm b/code/modules/cargo/packs.dm index fbf00bdeff..8bdbc328ad 100644 --- a/code/modules/cargo/packs.dm +++ b/code/modules/cargo/packs.dm @@ -811,7 +811,7 @@ /obj/item/reagent_containers/glass/bottle/magnitis, /obj/item/reagent_containers/glass/bottle/pierrot_throat, /obj/item/reagent_containers/glass/bottle/brainrot, - /obj/item/reagent_containers/glass/bottle/hullucigen_virion, + /obj/item/reagent_containers/glass/bottle/hallucigen_virion, /obj/item/reagent_containers/glass/bottle/anxiety, /obj/item/reagent_containers/glass/bottle/beesease, /obj/item/storage/box/syringes, diff --git a/code/modules/cargo/vg_clothing_packs.dm b/code/modules/cargo/vg_clothing_packs.dm index 315d8b9ba4..99812627e3 100644 --- a/code/modules/cargo/vg_clothing_packs.dm +++ b/code/modules/cargo/vg_clothing_packs.dm @@ -1,3 +1,4 @@ +/* // Can't be bothered to maintain this, mostly just memes anyway. /datum/supply_pack/misc/vidyacon name = "Vidya-Con Surplus Crate" cost = 3250 @@ -30,4 +31,4 @@ datum/supply_pack/misc/reenactor /obj/item/clothing/under/officeruniform,/obj/item/clothing/head/naziofficer,/obj/item/clothing/suit/officercoat, /obj/item/clothing/head/panzer, /obj/item/clothing/suit/russofurcoat,/obj/item/clothing/head/russofurhat,/obj/item/clothing/under/soviet) - crate_name = "historical reanactor crate" \ No newline at end of file + crate_name = "historical reanactor crate" */ diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 637c3e2bec..6135e6ac9d 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -361,35 +361,34 @@ GLOBAL_LIST(external_rsc_urls) holder.owner = null GLOB.admins -= src if (!GLOB.admins.len && SSticker.IsRoundInProgress()) //Only report this stuff if we are currently playing. - if(!GLOB.admins.len) //Apparently the admin logging out is no longer an admin at this point, so we have to check this towards 0 and not towards 1. Awell. - var/cheesy_message = pick( - "I have no admins online!",\ - "I'm all alone... :(",\ - "I'm feeling lonely. :(",\ - "I'm so lonely. :(",\ - "Why does nobody love me? :(",\ - "I want a man. :(",\ - "Where has everyone gone?",\ - "I need a hug. :(",\ - "Someone come hold me. :(",\ - "I need someone on me :(",\ - "What happened? Where has everyone gone?",\ - "My nipples are so stiff, but Zelda ain't here. :(",\ - "Leon senpai, play more Spessmans. :(",\ - "If only Serdy were here...",\ - "Panic bunker can't keep my love for you out.",\ - "Cebu needs to Awoo herself back into my heart.",\ - "I don't even have a Turry to snuggle viciously here.",\ - "MOM, WHERE ARE YOU??? D:",\ - "It's a beautiful day outside. Birds are singing, flowers are blooming. On days like this...kids like you...SHOULD BE BURNING IN HELL.",\ - "Sometimes when I have sex, I think about putting an entire peanut butter and jelly sandwich in the VCR.",\ - "Oh good, no-one around to watch me lick Goofball's nipples. :D",\ - "I've replaced Beepsky with a fidget spinner, glory be autism abuse.",\ - "i shure hop dere are no PRED arund!!!!",\ - "NO PRED CAN eVER CATCH MI"\ - ) + var/cheesy_message = pick( + "I have no admins online!",\ + "I'm all alone... :(",\ + "I'm feeling lonely. :(",\ + "I'm so lonely. :(",\ + "Why does nobody love me? :(",\ + "I want a man. :(",\ + "Where has everyone gone?",\ + "I need a hug. :(",\ + "Someone come hold me. :(",\ + "I need someone on me :(",\ + "What happened? Where has everyone gone?",\ + "My nipples are so stiff, but Zelda ain't here. :(",\ + "Leon senpai, play more Spessmans. :(",\ + "If only Serdy were here...",\ + "Panic bunker can't keep my love for you out.",\ + "Cebu needs to Awoo herself back into my heart.",\ + "I don't even have a Turry to snuggle viciously here.",\ + "MOM, WHERE ARE YOU??? D:",\ + "It's a beautiful day outside. Birds are singing, flowers are blooming. On days like this...kids like you...SHOULD BE BURNING IN HELL.",\ + "Sometimes when I have sex, I think about putting an entire peanut butter and jelly sandwich in the VCR.",\ + "Oh good, no-one around to watch me lick Goofball's nipples. :D",\ + "I've replaced Beepsky with a fidget spinner, glory be autism abuse.",\ + "i shure hop dere are no PRED arund!!!!",\ + "NO PRED CAN eVER CATCH MI"\ + ) - send2irc("Server", "[cheesy_message] (No admins online)") + send2irc("Server", "[cheesy_message] (No admins online)") GLOB.ahelp_tickets.ClientLogout(src) GLOB.directory -= ckey @@ -447,7 +446,7 @@ GLOBAL_LIST(external_rsc_urls) new_player = 1 account_join_date = sanitizeSQL(findJoinDate()) - var/datum/DBQuery/query_add_player = SSdbcore.NewQuery("INSERT INTO [format_table_name("player")] (`ckey`, `firstseen`, `lastseen`, `ip`, `computerid`, `lastadminrank`, `accountjoindate`) VALUES ('[sql_ckey]', Now(), Now(), INET_ATON('[sql_ip]'), '[sql_computerid]', '[sql_admin_rank]', [account_join_date ? "'[account_join_date]'" : "NULL"])") + var/datum/DBQuery/query_add_player = SSdbcore.NewQuery("INSERT INTO [format_table_name("player")] (`ckey`, `firstseen`, `firstseen_round_id`, `lastseen`, `lastseen_round_id`, `ip`, `computerid`, `lastadminrank`, `accountjoindate`) VALUES ('[sql_ckey]', Now(), '[GLOB.round_id]', Now(), '[GLOB.round_id]', INET_ATON('[sql_ip]'), '[sql_computerid]', '[sql_admin_rank]', [account_join_date ? "'[account_join_date]'" : "NULL"])") if(!query_add_player.Execute()) return if(!account_join_date) @@ -473,12 +472,12 @@ GLOBAL_LIST(external_rsc_urls) if(query_datediff.NextRow()) account_age = text2num(query_datediff.item[1]) if(!new_player) - var/datum/DBQuery/query_log_player = SSdbcore.NewQuery("UPDATE [format_table_name("player")] SET lastseen = Now(), ip = INET_ATON('[sql_ip]'), computerid = '[sql_computerid]', lastadminrank = '[sql_admin_rank]', accountjoindate = [account_join_date ? "'[account_join_date]'" : "NULL"] WHERE ckey = '[sql_ckey]'") + var/datum/DBQuery/query_log_player = SSdbcore.NewQuery("UPDATE [format_table_name("player")] SET lastseen = Now(), lastseen_round_id = '[GLOB.round_id]', ip = INET_ATON('[sql_ip]'), computerid = '[sql_computerid]', lastadminrank = '[sql_admin_rank]', accountjoindate = [account_join_date ? "'[account_join_date]'" : "NULL"] WHERE ckey = '[sql_ckey]'") if(!query_log_player.Execute()) return if(!account_join_date) account_join_date = "Error" - var/datum/DBQuery/query_log_connection = SSdbcore.NewQuery("INSERT INTO `[format_table_name("connection_log")]` (`id`,`datetime`,`server_ip`,`server_port`,`ckey`,`ip`,`computerid`) VALUES(null,Now(),INET_ATON(IF('[world.internet_address]' LIKE '', '0', '[world.internet_address]')),'[world.port]','[sql_ckey]',INET_ATON('[sql_ip]'),'[sql_computerid]')") + var/datum/DBQuery/query_log_connection = SSdbcore.NewQuery("INSERT INTO `[format_table_name("connection_log")]` (`id`,`datetime`,`server_ip`,`server_port`,`round_id`,`ckey`,`ip`,`computerid`) VALUES(null,Now(),INET_ATON(IF('[world.internet_address]' LIKE '', '0', '[world.internet_address]')),'[world.port]','[GLOB.round_id]','[sql_ckey]',INET_ATON('[sql_ip]'),'[sql_computerid]')") query_log_connection.Execute() if(new_player) player_age = -1 diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 9104b3d767..1df28192db 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -1,1649 +1,1653 @@ - - -GLOBAL_LIST_EMPTY(preferences_datums) - - - -/datum/preferences - var/client/parent - //doohickeys for savefiles - var/path - var/default_slot = 1 //Holder so it doesn't default to slot 1, rather the last one used - var/max_save_slots = 10 - - //non-preference stuff - var/muted = 0 - var/last_ip - var/last_id - - //game-preferences - var/lastchangelog = "" //Saved changlog filesize to detect if there was a change - var/ooccolor = null - var/enable_tips = TRUE - var/tip_delay = 500 //tip delay in milliseconds - - //Antag preferences - var/list/be_special = list() //Special role selection - var/tmp/old_be_special = 0 //Bitflag version of be_special, used to update old savefiles and nothing more - //If it's 0, that's good, if it's anything but 0, the owner of this prefs file's antag choices were, - //autocorrected this round, not that you'd need to check that. - - - var/UI_style = "Midnight" - var/buttons_locked = FALSE - var/hotkeys = FALSE - var/tgui_fancy = TRUE - var/tgui_lock = TRUE - var/windowflashing = TRUE - var/toggles = TOGGLES_DEFAULT - var/chat_toggles = TOGGLES_DEFAULT_CHAT - var/ghost_form = "ghost" - var/ghost_orbit = GHOST_ORBIT_CIRCLE - var/ghost_accs = GHOST_ACCS_DEFAULT_OPTION - var/ghost_others = GHOST_OTHERS_DEFAULT_OPTION - var/ghost_hud = 1 - var/inquisitive_ghost = 1 - var/allow_midround_antag = 1 - var/preferred_map = null - - var/uses_glasses_colour = 0 - - //character preferences - var/real_name //our character's name - var/be_random_name = 0 //whether we'll have a random name every round - var/be_random_body = 0 //whether we'll have a random body every round - var/gender = MALE //gender of character (well duh) - var/age = 30 //age of character - var/underwear = "Nude" //underwear type - var/undershirt = "Nude" //undershirt type - var/socks = "Nude" //socks type - var/backbag = DBACKPACK //backpack type - var/hair_style = "Bald" //Hair type - var/hair_color = "000" //Hair color - var/facial_hair_style = "Shaved" //Face hair type - var/facial_hair_color = "000" //Facial hair color - var/skin_tone = "caucasian1" //Skin color - var/eye_color = "000" //Eye color - var/datum/species/pref_species = new /datum/species/human() //Mutant race - var/list/features = list("mcolor" = "FFF", - "mcolor2" = "FFF", - "mcolor3" = "FFF", - "tail_lizard" = "Smooth", - "tail_human" = "None", - "snout" = "Round", - "horns" = "None", - "ears" = "None", - "wings" = "None", - "frills" = "None", - "spines" = "None", - "body_markings" = "None", - "mam_body_markings" = "None", - "mam_ears" = "None", - "mam_tail" = "None", - "mam_tail_animated" = "None", - "xenodorsal" = "None", - "xenohead" = "None", - "xenotail" = "None", - "legs" = "Normal Legs", - "taur" = "None", - "exhibitionist" = FALSE, - "genitals_use_skintone" = FALSE, - "has_cock" = FALSE, - "cock_shape" = "Human", - "cock_length" = 6, - "cock_girth_ratio" = COCK_GIRTH_RATIO_DEF, - "cock_color" = "fff", - "has_sheath" = FALSE, - "sheath_color" = "fff", - "has_balls" = FALSE, - "balls_internal" = FALSE, - "balls_color" = "fff", - "balls_amount" = 2, - "balls_sack_size" = BALLS_SACK_SIZE_DEF, - "balls_size" = BALLS_SIZE_DEF, - "balls_cum_rate" = CUM_RATE, - "balls_cum_mult" = CUM_RATE_MULT, - "balls_efficiency" = CUM_EFFICIENCY, - "balls_fluid" = "semen", - "has_ovi" = FALSE, - "ovi_shape" = "knotted", - "ovi_length" = 6, - "ovi_color" = "fff", - "has_eggsack" = FALSE, - "eggsack_internal" = TRUE, - "eggsack_color" = "fff", - "eggsack_size" = BALLS_SACK_SIZE_DEF, - "eggsack_egg_color" = "fff", - "eggsack_egg_size" = EGG_GIRTH_DEF, - "has_breasts" = FALSE, - "breasts_color" = "fff", - "breasts_size" = "C", - "breasts_shape" = "Pair", - "breasts_fluid" = "milk", - "has_vag" = FALSE, - "vag_shape" = "Human", - "vag_color" = "fff", - "vag_clits" = 1, - "vag_clit_diam" = 0.25, - "vag_clit_len" = 0.25, - "has_womb" = FALSE, - "womb_cum_rate" = CUM_RATE, - "womb_cum_mult" = CUM_RATE_MULT, - "womb_efficiency" = CUM_EFFICIENCY, - "womb_fluid" = "femcum", - "flavor_text" = "" - )//MAKE SURE TO UPDATE THE LIST IN MOBS.DM IF YOU'RE GOING TO ADD TO THIS LIST, OTHERWISE THINGS MIGHT GET FUCKEY - - var/list/custom_names = list("clown", "mime", "ai", "cyborg", "religion", "deity") - var/prefered_security_department = SEC_DEPT_RANDOM - - //Mob preview - var/icon/preview_icon = null - - //Jobs, uses bitflags - var/job_civilian_high = 0 - var/job_civilian_med = 0 - var/job_civilian_low = 0 - - var/job_medsci_high = 0 - var/job_medsci_med = 0 - var/job_medsci_low = 0 - - var/job_engsec_high = 0 - var/job_engsec_med = 0 - var/job_engsec_low = 0 - - // Want randomjob if preferences already filled - Donkie - var/joblessrole = BERANDOMJOB //defaults to 1 for fewer assistants - - // 0 = character settings, 1 = game preferences, 2 = character appearance - var/current_tab = 0 - - // OOC Metadata: - var/metadata = "" - - var/unlock_content = 0 - - var/list/ignoring = list() - - var/clientfps = 0 - - var/parallax - - var/uplink_spawn_loc = UPLINK_PDA - - var/list/menuoptions - - //citadel code - var/arousable = TRUE //Allows players to disable arousal from the character creation menu - -/datum/preferences/New(client/C) - parent = C - custom_names["ai"] = pick(GLOB.ai_names) - custom_names["cyborg"] = pick(GLOB.ai_names) - custom_names["clown"] = pick(GLOB.clown_names) - custom_names["mime"] = pick(GLOB.mime_names) - if(istype(C)) - if(!IsGuestKey(C.key)) - load_path(C.ckey) - unlock_content = C.IsByondMember() - if(unlock_content) - max_save_slots = 16 - var/loaded_preferences_successfully = load_preferences() - if(loaded_preferences_successfully) - if(load_character()) - return - //we couldn't load character data so just randomize the character appearance + name - random_character() //let's create a random character then - rather than a fat, bald and naked man. - real_name = pref_species.random_name(gender,1) - if(!loaded_preferences_successfully) - save_preferences() - save_character() //let's save this new random character so it doesn't keep generating new ones. - menuoptions = list() - return - -/datum/preferences/proc/ShowChoices(mob/user) - if(!user || !user.client) - return - if(current_tab == 2) - update_preview_icon(nude=TRUE) - else - update_preview_icon(nude=FALSE) - user << browse_rsc(preview_icon, "previewicon.png") - var/dat = "
    " - - dat += "Character Settings" - dat += "Character Appearance" - dat += "Game Preferences" - - if(!path) - dat += "
    Please create an account to save your preferences
    " - - dat += "
    " - - dat += "
    " - - switch(current_tab) - if (0) // Character Settings# - if(path) - var/savefile/S = new /savefile(path) - if(S) - dat += "
    " - var/name - for(var/i=1, i<=max_save_slots, i++) - S.cd = "/character[i]" - S["real_name"] >> name - if(!name) - name = "Character[i]" - //if(i!=1) dat += " | " - dat += "[name] " - dat += "
    " - - dat += "

    Occupation Choices

    " - dat += "Set Occupation Preferences
    " - dat += "

    Identity

    " - dat += "" - - dat += "
    " - if(jobban_isbanned(user, "appearance")) - dat += "You are banned from using custom names and appearances. You can continue to adjust your characters, but you will be randomised once you join the game.
    " - dat += "Random Name " - dat += "Always Random Name: [be_random_name ? "Yes" : "No"]
    " - - dat += "Name: " - dat += "[real_name]
    " - - dat += "Gender: [gender == MALE ? "Male" : "Female"]
    " - dat += "Age: [age]
    " - dat += "Arousal:[arousable == TRUE ? "Enabled" : "Disabled"]
    " - dat += "Exhibitionist:[features["exhibitionist"] == TRUE ? "Yes" : "No"]
    " - dat += "Special Names:
    " - dat += "Clown: [custom_names["clown"]] " - dat += "Mime:[custom_names["mime"]]
    " - dat += "AI: [custom_names["ai"]] " - dat += "Cyborg: [custom_names["cyborg"]]
    " - dat += "Chaplain religion: [custom_names["religion"]] " - dat += "Chaplain deity: [custom_names["deity"]]
    " - - dat += "Custom job preferences:
    " - dat += "Prefered security department: [prefered_security_department]
    " - - dat += "
    " - - dat += "
    " -// dat += "Size: [character_size]
    " - dat += "
    " - - if (1) // Game Preferences - dat += "
    " - dat += "

    General Settings

    " - dat += "UI Style: [UI_style]
    " - dat += "Keybindings: [(hotkeys) ? "Hotkeys" : "Default"]
    " - dat += "Action Buttons: [(buttons_locked) ? "Locked In Place" : "Unlocked"]
    " - dat += "tgui Style: [(tgui_fancy) ? "Fancy" : "No Frills"]
    " - dat += "tgui Monitors: [(tgui_lock) ? "Primary" : "All"]
    " - dat += "Window Flashing: [(windowflashing) ? "Yes" : "No"]
    " - dat += "Play admin midis: [(toggles & SOUND_MIDI) ? "Yes" : "No"]
    " - dat += "Play lobby music: [(toggles & SOUND_LOBBY) ? "Yes" : "No"]
    " - dat += "Ghost ears: [(chat_toggles & CHAT_GHOSTEARS) ? "All Speech" : "Nearest Creatures"]
    " - dat += "Ghost sight: [(chat_toggles & CHAT_GHOSTSIGHT) ? "All Emotes" : "Nearest Creatures"]
    " - dat += "Ghost whispers: [(chat_toggles & CHAT_GHOSTWHISPER) ? "All Speech" : "Nearest Creatures"]
    " - dat += "Ghost radio: [(chat_toggles & CHAT_GHOSTRADIO) ? "Yes" : "No"]
    " - dat += "Ghost pda: [(chat_toggles & CHAT_GHOSTPDA) ? "All Messages" : "Nearest Creatures"]
    " - dat += "Pull requests: [(chat_toggles & CHAT_PULLR) ? "Yes" : "No"]
    " - dat += "Midround Antagonist: [(toggles & MIDROUND_ANTAG) ? "Yes" : "No"]
    " - if(config.allow_Metadata) - dat += "OOC Notes: Edit
    " - - if(user.client) - if(user.client.holder) - dat += "Adminhelp Sound: [(toggles & SOUND_ADMINHELP)?"On":"Off"]
    " - dat += "Announce Login: [(toggles & ANNOUNCE_LOGIN)?"On":"Off"]
    " - - if(unlock_content || check_rights_for(user.client, R_ADMIN)) - dat += "OOC:     Change
    " - - if(unlock_content) - dat += "BYOND Membership Publicity: [(toggles & MEMBER_PUBLIC) ? "Public" : "Hidden"]
    " - dat += "Ghost Form: [ghost_form]
    " - dat += "Ghost Orbit: [ghost_orbit]
    " - - var/button_name = "If you see this something went wrong." - switch(ghost_accs) - if(GHOST_ACCS_FULL) - button_name = GHOST_ACCS_FULL_NAME - if(GHOST_ACCS_DIR) - button_name = GHOST_ACCS_DIR_NAME - if(GHOST_ACCS_NONE) - button_name = GHOST_ACCS_NONE_NAME - - dat += "Ghost Accessories: [button_name]
    " - - switch(ghost_others) - if(GHOST_OTHERS_THEIR_SETTING) - button_name = GHOST_OTHERS_THEIR_SETTING_NAME - if(GHOST_OTHERS_DEFAULT_SPRITE) - button_name = GHOST_OTHERS_DEFAULT_SPRITE_NAME - if(GHOST_OTHERS_SIMPLE) - button_name = GHOST_OTHERS_SIMPLE_NAME - - dat += "Ghosts of Others: [button_name]
    " - - if (config.maprotation) - var/p_map = preferred_map - if (!p_map) - p_map = "Default" - if (config.defaultmap) - p_map += " ([config.defaultmap.map_name])" - else - if (p_map in config.maplist) - var/datum/map_config/VM = config.maplist[p_map] - if (!VM) - p_map += " (No longer exists)" - else - p_map = VM.map_name - else - p_map += " (No longer exists)" - if(config.allow_map_voting) - dat += "Preferred Map: [p_map]
    " - - dat += "FPS: [clientfps]
    " - - dat += "Parallax (Fancy Space): " - switch (parallax) - if (PARALLAX_LOW) - dat += "Low" - if (PARALLAX_MED) - dat += "Medium" - if (PARALLAX_INSANE) - dat += "Insane" - if (PARALLAX_DISABLE) - dat += "Disabled" - else - dat += "High" - dat += "
    " - - dat += "
    " - - dat += "

    Special Role Settings

    " - - if(jobban_isbanned(user, "Syndicate")) - dat += "You are banned from antagonist roles." - src.be_special = list() - - - for (var/i in GLOB.special_roles) - if(jobban_isbanned(user, i)) - dat += "Be [capitalize(i)]: BANNED
    " - else - var/days_remaining = null - if(config.use_age_restriction_for_jobs && ispath(GLOB.special_roles[i])) //If it's a game mode antag, check if the player meets the minimum age - var/mode_path = GLOB.special_roles[i] - var/datum/game_mode/temp_mode = new mode_path - days_remaining = temp_mode.get_remaining_days(user.client) - - if(days_remaining) - dat += "Be [capitalize(i)]: \[IN [days_remaining] DAYS]
    " - else - dat += "Be [capitalize(i)]: [(i in be_special) ? "Yes" : "No"]
    " - - dat += "
    " - - //Character Appearance - if(2) - dat += "" - */ - - - dat += "
    " - dat += "

    " - dat += "Set Flavor Text
    " - if(lentext(features["flavor_text"]) <= 40) - if(!lentext(features["flavor_text"])) - dat += "\[...\]" - else - dat += "[features["flavor_text"]]" - else - dat += "[TextPreview(features["flavor_text"])]...
    " - if(config.mutant_races)//really don't need this check, but fuck un-tabbing all those lines - dat += "

    Body

    " - dat += "Gender: [gender == MALE ? "Male" : "Female"]
    " - dat += "Species:[pref_species.id]
    " - dat += "Random Body
    " - dat += "Always Random Body: [be_random_body ? "Yes" : "No"]
    " - if((MUTCOLORS in pref_species.species_traits) || (MUTCOLORS_PARTSONLY in pref_species.species_traits)) - dat += "Primary Color:     Change
    " - dat += "Secondary Color:     Change
    " - dat += "Tertiary Color:     Change
    " - if(pref_species.use_skintones) - dat += "Skin Tone: [skin_tone]
    " - dat += "Genitals Use Skintone:[features["genitals_use_skintone"] == TRUE ? "Enabled" : "Disabled"]
    " - - if(HAIR in pref_species.species_traits) - dat += "Hair Style: [hair_style]
    " - dat += "Hair Color:     Change
    " - dat += "Facial Hair Style: [facial_hair_style]
    " - dat += "Facial Hair Color:     Change
    " - if(EYECOLOR in pref_species.species_traits) - dat += "Eye Color:     Change
    " - if("tail_lizard" in pref_species.mutant_bodyparts) - dat += "Tail: [features["tail_lizard"]]
    " - else if("mam_tail" in pref_species.mutant_bodyparts) - dat += "Tail: [features["mam_tail"]]
    " - else if("tail_human" in pref_species.mutant_bodyparts) - dat += "Tail: [features["tail_human"]]
    " - if("snout" in pref_species.mutant_bodyparts) - dat += "Snout: [features["snout"]]
    " - if("horns" in pref_species.mutant_bodyparts) - dat += "Horns: [features["horns"]]
    " - if("frills" in pref_species.mutant_bodyparts) - dat += "Frills: [features["frills"]]
    " - if("spines" in pref_species.mutant_bodyparts) - dat += "Spines: [features["spines"]]
    " - if("body_markings" in pref_species.mutant_bodyparts) - dat += "Body Markings: [features["body_markings"]]
    " - else if("mam_body_markings" in pref_species.mutant_bodyparts) - dat += "Body Markings: [features["mam_body_markings"]]
    " - if("mam_ears" in pref_species.mutant_bodyparts) - dat += "Ears: [features["mam_ears"]]
    " - else if("ears" in pref_species.mutant_bodyparts) - dat += "Ears: [features["ears"]]
    " - if("legs" in pref_species.mutant_bodyparts) - dat += "Legs: [features["legs"]]
    " - if("taur" in pref_species.mutant_bodyparts) - dat += "Taur: [features["taur"]]
    " - if("wings" in pref_species.mutant_bodyparts && GLOB.r_wings_list.len >1) - dat += "Wings: [features["wings"]]
    " - if("xenohead" in pref_species.mutant_bodyparts) - dat += "Caste: [features["xenohead"]]
    " - if("xenotail" in pref_species.mutant_bodyparts) - dat += "Tail: [features["xenotail"]]
    " - if("xenodorsal" in pref_species.mutant_bodyparts) - dat += "Dorsal Tubes: [features["xenodorsal"]]
    " - - dat += "
    " - - - dat += "

    Clothing & Equipment

    " -//underwear will be refactored later so it fits in with other wearable equipment and isn't just an overlay -// dat += "Underwear:[underwear]
    " -// dat += "Undershirt:[undershirt]
    " -// dat += "Socks:[socks]
    " - dat += "Backpack:[backbag]
    " - dat += "Uplink Location:[uplink_spawn_loc]
    " - - dat += "

    Genitals

    " - if(NOGENITALS in pref_species.species_traits) - dat += "Your species ([pref_species.name]) does not support genitals!
    " - else - dat += "Has Penis:[features["has_cock"] == TRUE ? "Yes" : "No"]
    " - if(features["has_cock"] == TRUE) - if(pref_species.use_skintones && features["genitals_use_skintone"] == TRUE) - dat += "Penis Color:   (Skin tone overriding)
    " - else - dat += "Penis Color:    Change
    " -// dat += "
    " - dat += "Penis Shape: [features["cock_shape"]]
    " - dat += "Penis Length: [features["cock_length"]] inch(es)
    " - dat += "Has Testicles:[features["has_balls"] == TRUE ? "Yes" : "No"]
    " - if(features["has_balls"] == TRUE) - if(pref_species.use_skintones && features["genitals_use_skintone"] == TRUE) - dat += "Testicles Color:   (Skin tone overriding)
    " - else - dat += "Testicles Color:    Change
    " - dat += "Has Vagina:[features["has_vag"] == TRUE ? "Yes" : "No"]
    " - if(features["has_vag"]) - dat += "Vagina Type: [features["vag_shape"]]
    " - if(pref_species.use_skintones && features["genitals_use_skintone"] == TRUE) - dat += "Vagina Color:   (Skin tone overriding)
    " - else - dat += "Vagina Color:    Change
    " - dat += "Has Womb:[features["has_womb"] == TRUE ? "Yes" : "No"]
    " - dat += "Has Breasts:[features["has_breasts"] == TRUE ? "Yes" : "No"]
    " - if(features["has_breasts"]) - if(pref_species.use_skintones && features["genitals_use_skintone"] == TRUE) - dat += "Color:   (Skin tone overriding)
    " - else - dat += "Color:    Change
    " - dat += "Cup Size:[features["breasts_size"]]
    " - dat += "Breast Shape:[features["breasts_shape"]]
    " - /* - dat += "

    Ovipositor

    " - dat += "Has Ovipositor:[features["has_ovi"] == TRUE ? "Yes" : "No"]" - if(features["has_ovi"]) - dat += "Ovi Color:    Change" - dat += "

    Eggsack

    " - dat += "Has Eggsack:[features["has_eggsack"] == TRUE ? "Yes" : "No"]
    " - if(features["has_eggsack"] == TRUE) - dat += "Color:    Change" - dat += "Egg Color:    Change" - dat += "Egg Size:[features["eggsack_egg_size"]]\" Diameter" - - dat += "
    " - dat += "
    " - - if(!IsGuestKey(user.key)) - dat += "Undo " - dat += "Save Setup " - - dat += "Reset Setup" - dat += "
    " - - var/datum/browser/popup = new(user, "preferences", "
    Character Setup
    ", 640, 770) - popup.set_content(dat) - popup.open(0) - -/datum/preferences/proc/SetChoices(mob/user, limit = 17, list/splitJobs = list("Chief Engineer"), widthPerColumn = 295, height = 620) - if(!SSjob) - return - - //limit - The amount of jobs allowed per column. Defaults to 17 to make it look nice. - //splitJobs - Allows you split the table by job. You can make different tables for each department by including their heads. Defaults to CE to make it look nice. - //widthPerColumn - Screen's width for every column. - //height - Screen's height. - - var/width = widthPerColumn - - var/HTML = "
    " - if(SSjob.occupations.len <= 0) - HTML += "The job ticker is not yet finished creating jobs, please try again later" - HTML += "
    Done

    " // Easier to press up here. - - else - HTML += "Choose occupation chances
    " - HTML += "
    Left-click to raise an occupation preference, right-click to lower it.
    " - HTML += "
    Done

    " // Easier to press up here. - HTML += "" - HTML += "
    " // Table within a table for alignment, also allows you to easily add more colomns. - HTML += "" - var/index = -1 - - //The job before the current job. I only use this to get the previous jobs color when I'm filling in blank rows. - var/datum/job/lastJob - - for(var/datum/job/job in SSjob.occupations) - - index += 1 - if((index >= limit) || (job.title in splitJobs)) - width += widthPerColumn - if((index < limit) && (lastJob != null)) - //If the cells were broken up by a job in the splitJob list then it will fill in the rest of the cells with - //the last job's selection color. Creating a rather nice effect. - for(var/i = 0, i < (limit - index), i += 1) - HTML += "" - HTML += "
      
    " - index = 0 - - HTML += "" - continue - if(!job.player_old_enough(user.client)) - var/available_in_days = job.available_in_days(user.client) - HTML += "[rank]" - continue - if((job_civilian_low & ASSISTANT) && (rank != "Assistant") && !jobban_isbanned(user, "Assistant")) - HTML += "[rank]" - continue - if(config.enforce_human_authority && !user.client.prefs.pref_species.qualifies_for_rank(rank, user.client.prefs.features)) - if(user.client.prefs.pref_species.id == "human") - HTML += "[rank]" - else - HTML += "[rank]" - continue - if((rank in GLOB.command_positions) || (rank == "AI"))//Bold head jobs - HTML += "[rank]" - else - HTML += "[rank]" - - HTML += "" - continue - - HTML += "[prefLevelLabel]" - HTML += "" - - for(var/i = 1, i < (limit - index), i += 1) // Finish the column so it is even - HTML += "" - - HTML += "
    " - var/rank = job.title - lastJob = job - if(jobban_isbanned(user, rank)) - HTML += "[rank] BANNED
    \[IN [(available_in_days)] DAYS\]
    \[MUTANT\]
    \[NON-HUMAN\]
    " - - var/prefLevelLabel = "ERROR" - var/prefLevelColor = "pink" - var/prefUpperLevel = -1 // level to assign on left click - var/prefLowerLevel = -1 // level to assign on right click - - if(GetJobDepartment(job, 1) & job.flag) - prefLevelLabel = "High" - prefLevelColor = "slateblue" - prefUpperLevel = 4 - prefLowerLevel = 2 - else if(GetJobDepartment(job, 2) & job.flag) - prefLevelLabel = "Medium" - prefLevelColor = "green" - prefUpperLevel = 1 - prefLowerLevel = 3 - else if(GetJobDepartment(job, 3) & job.flag) - prefLevelLabel = "Low" - prefLevelColor = "orange" - prefUpperLevel = 2 - prefLowerLevel = 4 - else - prefLevelLabel = "NEVER" - prefLevelColor = "red" - prefUpperLevel = 3 - prefLowerLevel = 1 - - - HTML += "" - - if(rank == "Assistant")//Assistant is special - if(job_civilian_low & ASSISTANT) - HTML += "Yes" - else - HTML += "No" - HTML += "
      
    " - HTML += "
    " - - var/message = "Be an Assistant if preferences unavailable" - if(joblessrole == BERANDOMJOB) - message = "Get random job if preferences unavailable" - else if(joblessrole == RETURNTOLOBBY) - message = "Return to lobby if preferences unavailable" - HTML += "

    [message]
    " - HTML += "
    Reset Preferences
    " - - user << browse(null, "window=preferences") - var/datum/browser/popup = new(user, "mob_occupation", "
    Occupation Preferences
    ", width, height) - popup.set_window_options("can_close=0") - popup.set_content(HTML) - popup.open(0) - return - -/datum/preferences/proc/SetJobPreferenceLevel(datum/job/job, level) - if (!job) - return 0 - - if (level == 1) // to high - // remove any other job(s) set to high - job_civilian_med |= job_civilian_high - job_engsec_med |= job_engsec_high - job_medsci_med |= job_medsci_high - job_civilian_high = 0 - job_engsec_high = 0 - job_medsci_high = 0 - - if (job.department_flag == CIVILIAN) - job_civilian_low &= ~job.flag - job_civilian_med &= ~job.flag - job_civilian_high &= ~job.flag - - switch(level) - if (1) - job_civilian_high |= job.flag - if (2) - job_civilian_med |= job.flag - if (3) - job_civilian_low |= job.flag - - return 1 - else if (job.department_flag == ENGSEC) - job_engsec_low &= ~job.flag - job_engsec_med &= ~job.flag - job_engsec_high &= ~job.flag - - switch(level) - if (1) - job_engsec_high |= job.flag - if (2) - job_engsec_med |= job.flag - if (3) - job_engsec_low |= job.flag - - return 1 - else if (job.department_flag == MEDSCI) - job_medsci_low &= ~job.flag - job_medsci_med &= ~job.flag - job_medsci_high &= ~job.flag - - switch(level) - if (1) - job_medsci_high |= job.flag - if (2) - job_medsci_med |= job.flag - if (3) - job_medsci_low |= job.flag - - return 1 - - return 0 - -/datum/preferences/proc/UpdateJobPreference(mob/user, role, desiredLvl) - if(!SSjob || SSjob.occupations.len <= 0) - return - var/datum/job/job = SSjob.GetJob(role) - - if(!job) - user << browse(null, "window=mob_occupation") - ShowChoices(user) - return - - if (!isnum(desiredLvl)) - to_chat(user, "UpdateJobPreference - desired level was not a number. Please notify coders!") - ShowChoices(user) - return - - if(role == "Assistant") - if(job_civilian_low & job.flag) - job_civilian_low &= ~job.flag - else - job_civilian_low |= job.flag - SetChoices(user) - return 1 - - SetJobPreferenceLevel(job, desiredLvl) - SetChoices(user) - - return 1 - - -/datum/preferences/proc/ResetJobs() - - job_civilian_high = 0 - job_civilian_med = 0 - job_civilian_low = 0 - - job_medsci_high = 0 - job_medsci_med = 0 - job_medsci_low = 0 - - job_engsec_high = 0 - job_engsec_med = 0 - job_engsec_low = 0 - - -/datum/preferences/proc/GetJobDepartment(datum/job/job, level) - if(!job || !level) - return 0 - switch(job.department_flag) - if(CIVILIAN) - switch(level) - if(1) - return job_civilian_high - if(2) - return job_civilian_med - if(3) - return job_civilian_low - if(MEDSCI) - switch(level) - if(1) - return job_medsci_high - if(2) - return job_medsci_med - if(3) - return job_medsci_low - if(ENGSEC) - switch(level) - if(1) - return job_engsec_high - if(2) - return job_engsec_med - if(3) - return job_engsec_low - return 0 - -/datum/preferences/proc/process_link(mob/user, list/href_list) - if(href_list["jobbancheck"]) - var/job = sanitizeSQL(href_list["jobbancheck"]) - var/sql_ckey = sanitizeSQL(user.ckey) - var/datum/DBQuery/query_get_jobban = SSdbcore.NewQuery("SELECT reason, bantime, duration, expiration_time, a_ckey FROM [format_table_name("ban")] WHERE ckey = '[sql_ckey]' AND (bantype = 'JOB_PERMABAN' OR (bantype = 'JOB_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned) AND job = '[job]'") - if(!query_get_jobban.warn_execute()) - return - if(query_get_jobban.NextRow()) - var/reason = query_get_jobban.item[1] - var/bantime = query_get_jobban.item[2] - var/duration = query_get_jobban.item[3] - var/expiration_time = query_get_jobban.item[4] - var/a_ckey = query_get_jobban.item[5] - var/text - text = "You, or another user of this computer, ([user.ckey]) is banned from playing [job]. The ban reason is:
    [reason]
    This ban was applied by [a_ckey] on [bantime]" - if(text2num(duration) > 0) - text += ". The ban is for [duration] minutes and expires on [expiration_time] (server time)" - text += ".
    " - to_chat(user, text) - return - - if(href_list["preference"] == "job") - switch(href_list["task"]) - if("close") - user << browse(null, "window=mob_occupation") - ShowChoices(user) - if("reset") - ResetJobs() - SetChoices(user) - if("random") - switch(joblessrole) - if(RETURNTOLOBBY) - if(jobban_isbanned(user, "Assistant")) - joblessrole = BERANDOMJOB - else - joblessrole = BEASSISTANT - if(BEASSISTANT) - joblessrole = BERANDOMJOB - if(BERANDOMJOB) - joblessrole = RETURNTOLOBBY - SetChoices(user) - if("setJobLevel") - UpdateJobPreference(user, href_list["text"], text2num(href_list["level"])) - else - SetChoices(user) - return 1 - - switch(href_list["task"]) - if("random") - switch(href_list["preference"]) - if("name") - real_name = pref_species.random_name(gender,1) - if("age") - age = rand(AGE_MIN, AGE_MAX) - if("hair") - hair_color = random_short_color() - if("hair_style") - hair_style = random_hair_style(gender) - if("facial") - facial_hair_color = random_short_color() - if("facial_hair_style") - facial_hair_style = random_facial_hair_style(gender) - if("underwear") - underwear = random_underwear(gender) - if("undershirt") - undershirt = random_undershirt(gender) - if("socks") - socks = random_socks() - if("eyes") - eye_color = random_eye_color() - if("s_tone") - skin_tone = random_skin_tone() - if("bag") - backbag = pick(GLOB.backbaglist) - if("all") - random_character() - - if("input") - switch(href_list["preference"]) - if("ghostform") - if(unlock_content) - var/new_form = input(user, "Thanks for supporting BYOND - Choose your ghostly form:","Thanks for supporting BYOND",null) as null|anything in GLOB.ghost_forms - if(new_form) - ghost_form = new_form - if("ghostorbit") - if(unlock_content) - var/new_orbit = input(user, "Thanks for supporting BYOND - Choose your ghostly orbit:","Thanks for supporting BYOND", null) as null|anything in GLOB.ghost_orbits - if(new_orbit) - ghost_orbit = new_orbit - - if("ghostaccs") - var/new_ghost_accs = alert("Do you want your ghost to show full accessories where possible, hide accessories but still use the directional sprites where possible, or also ignore the directions and stick to the default sprites?",,GHOST_ACCS_FULL_NAME, GHOST_ACCS_DIR_NAME, GHOST_ACCS_NONE_NAME) - switch(new_ghost_accs) - if(GHOST_ACCS_FULL_NAME) - ghost_accs = GHOST_ACCS_FULL - if(GHOST_ACCS_DIR_NAME) - ghost_accs = GHOST_ACCS_DIR - if(GHOST_ACCS_NONE_NAME) - ghost_accs = GHOST_ACCS_NONE - - if("ghostothers") - var/new_ghost_others = alert("Do you want the ghosts of others to show up as their own setting, as their default sprites or always as the default white ghost?",,GHOST_OTHERS_THEIR_SETTING_NAME, GHOST_OTHERS_DEFAULT_SPRITE_NAME, GHOST_OTHERS_SIMPLE_NAME) - switch(new_ghost_others) - if(GHOST_OTHERS_THEIR_SETTING_NAME) - ghost_others = GHOST_OTHERS_THEIR_SETTING - if(GHOST_OTHERS_DEFAULT_SPRITE_NAME) - ghost_others = GHOST_OTHERS_DEFAULT_SPRITE - if(GHOST_OTHERS_SIMPLE_NAME) - ghost_others = GHOST_OTHERS_SIMPLE - - if("name") - var/new_name = reject_bad_name( input(user, "Choose your character's name:", "Character Preference") as text|null ) - if(new_name) - real_name = new_name - else - to_chat(user, "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .") - - if("age") - var/new_age = input(user, "Choose your character's age:\n([AGE_MIN]-[AGE_MAX])", "Character Preference") as num|null - if(new_age) - age = max(min( round(text2num(new_age)), AGE_MAX),AGE_MIN) - - if("flavor_text") - var/msg = input(usr,"Set the flavor text in your 'examine' verb. This can also be used for OOC notes and preferences!","Flavor Text",html_decode(features["flavor_text"])) as message - if(msg != null) - msg = copytext(msg, 1, MAX_MESSAGE_LEN) - msg = html_encode(msg) - features["flavor_text"] = msg - - if("metadata") - var/new_metadata = input(user, "Enter any information you'd like others to see, such as Roleplay-preferences:", "Game Preference" , metadata) as message|null - if(new_metadata) - metadata = sanitize(copytext(new_metadata,1,MAX_MESSAGE_LEN)) - - if("hair") - var/new_hair = input(user, "Choose your character's hair colour:", "Character Preference") as null|color - if(new_hair) - hair_color = sanitize_hexcolor(new_hair) - - - if("hair_style") - var/new_hair_style - if(gender == MALE) - new_hair_style = input(user, "Choose your character's hair style:", "Character Preference") as null|anything in GLOB.hair_styles_male_list - else - new_hair_style = input(user, "Choose your character's hair style:", "Character Preference") as null|anything in GLOB.hair_styles_female_list - if(new_hair_style) - hair_style = new_hair_style - - if("next_hair_style") - if (gender == MALE) - hair_style = next_list_item(hair_style, GLOB.hair_styles_male_list) - else - hair_style = next_list_item(hair_style, GLOB.hair_styles_female_list) - - if("previous_hair_style") - if (gender == MALE) - hair_style = previous_list_item(hair_style, GLOB.hair_styles_male_list) - else - hair_style = previous_list_item(hair_style, GLOB.hair_styles_female_list) - - if("facial") - var/new_facial = input(user, "Choose your character's facial-hair colour:", "Character Preference") as null|color - if(new_facial) - facial_hair_color = sanitize_hexcolor(new_facial) - - if("facial_hair_style") - var/new_facial_hair_style - if(gender == MALE) - new_facial_hair_style = input(user, "Choose your character's facial-hair style:", "Character Preference") as null|anything in GLOB.facial_hair_styles_male_list - else - new_facial_hair_style = input(user, "Choose your character's facial-hair style:", "Character Preference") as null|anything in GLOB.facial_hair_styles_female_list - if(new_facial_hair_style) - facial_hair_style = new_facial_hair_style - - if("next_facehair_style") - if (gender == MALE) - facial_hair_style = next_list_item(facial_hair_style, GLOB.facial_hair_styles_male_list) - else - facial_hair_style = next_list_item(facial_hair_style, GLOB.facial_hair_styles_female_list) - - if("previous_facehair_style") - if (gender == MALE) - facial_hair_style = previous_list_item(facial_hair_style, GLOB.facial_hair_styles_male_list) - else - facial_hair_style = previous_list_item(facial_hair_style, GLOB.facial_hair_styles_female_list) - - if("underwear") - var/new_underwear - if(gender == MALE) - new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in GLOB.underwear_m - else - new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in GLOB.underwear_f - if(new_underwear) - underwear = new_underwear - - if("undershirt") - var/new_undershirt - if(gender == MALE) - new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in GLOB.undershirt_m - else - new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in GLOB.undershirt_f - if(new_undershirt) - undershirt = new_undershirt - - if("socks") - var/new_socks - new_socks = input(user, "Choose your character's socks:", "Character Preference") as null|anything in GLOB.socks_list - if(new_socks) - socks = new_socks - - if("eyes") - var/new_eyes = input(user, "Choose your character's eye colour:", "Character Preference") as color|null - if(new_eyes) - eye_color = sanitize_hexcolor(new_eyes) - - if("species") - - var/result = input(user, "Select a species", "Species Selection") as null|anything in GLOB.roundstart_species - - if(result) - var/newtype = GLOB.roundstart_species[result] - pref_species = new newtype() - //Now that we changed our species, we must verify that the mutant colour is still allowed. - var/temp_hsv = RGBtoHSV(features["mcolor"]) - if(features["mcolor"] == "#000" || (!(MUTCOLORS_PARTSONLY in pref_species.species_traits) && ReadHSV(temp_hsv)[3] < ReadHSV("#202020")[3])) - features["mcolor"] = pref_species.default_color - if(features["mcolor2"] == "#000" || (!(MUTCOLORS_PARTSONLY in pref_species.species_traits) && ReadHSV(temp_hsv)[3] < ReadHSV("#202020")[3])) - features["mcolor2"] = pref_species.default_color - if(features["mcolor3"] == "#000" || (!(MUTCOLORS_PARTSONLY in pref_species.species_traits) && ReadHSV(temp_hsv)[3] < ReadHSV("#202020")[3])) - features["mcolor3"] = pref_species.default_color - - if("mutant_color") - var/new_mutantcolor = input(user, "Choose your character's primary alien/mutant color:", "Character Preference") as color|null - if(new_mutantcolor) - var/temp_hsv = RGBtoHSV(new_mutantcolor) - if(new_mutantcolor == "#000000") - features["mcolor"] = pref_species.default_color - else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) // mutantcolors must be bright, but only if they affect the skin - features["mcolor"] = sanitize_hexcolor(new_mutantcolor) - else - to_chat(user, "Invalid color. Your color is not bright enough.") - - if("mutant_color2") - var/new_mutantcolor = input(user, "Choose your character's secondary alien/mutant color:", "Character Preference") as color|null - if(new_mutantcolor) - var/temp_hsv = RGBtoHSV(new_mutantcolor) - if(new_mutantcolor == "#000000") - features["mcolor2"] = pref_species.default_color - else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) // mutantcolors must be bright, but only if they affect the skin - features["mcolor2"] = sanitize_hexcolor(new_mutantcolor) - else - to_chat(user, "Invalid color. Your color is not bright enough.") - - if("mutant_color3") - var/new_mutantcolor = input(user, "Choose your character's tertiary alien/mutant color:", "Character Preference") as color|null - if(new_mutantcolor) - var/temp_hsv = RGBtoHSV(new_mutantcolor) - if(new_mutantcolor == "#000000") - features["mcolor3"] = pref_species.default_color - else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) // mutantcolors must be bright, but only if they affect the skin - features["mcolor3"] = sanitize_hexcolor(new_mutantcolor) - else - to_chat(user, "Invalid color. Your color is not bright enough.") - - if("tail_lizard") - var/new_tail - new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in GLOB.tails_list_lizard - if(new_tail) - features["tail_lizard"] = new_tail - if(new_tail != "None") - features["taur"] = "None" - - if("tail_human") - var/new_tail - new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in GLOB.tails_list_human - if(new_tail) - features["tail_human"] = new_tail - if(new_tail != "None") - features["taur"] = "None" - if("mam_tail") - var/new_tail - new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in GLOB.mam_tails_list - if(new_tail) - features["mam_tail"] = new_tail - if(new_tail != "None") - features["taur"] = "None" - - if("taur") - var/new_taur - new_taur = input(user, "Choose your character's tauric body:", "Character Preference") as null|anything in GLOB.taur_list - if(new_taur) - features["taur"] = new_taur - if(new_taur != "None") - features["mam_tail"] = "None" - features["xenotail"] = "None" - -/* Doesn't exist yet. will include facial overlays to mimic 5th port species heads. - if("mam_snout") - var/new_snout - new_snout = input(user, "Choose your character's snout:", "Character Preference") as null|anything in GLOB.mam_snouts_list - if(new_snout) - features["snout"] = new_snout -*/ - - if("snout") - var/new_snout - new_snout = input(user, "Choose your character's snout:", "Character Preference") as null|anything in GLOB.snouts_list - if(new_snout) - features["snout"] = new_snout - - if("horns") - var/new_horns - new_horns = input(user, "Choose your character's horns:", "Character Preference") as null|anything in GLOB.horns_list - if(new_horns) - features["horns"] = new_horns - - if("mam_ears") - var/new_ears - new_ears = input(user, "Choose your character's ears:", "Character Preference") as null|anything in GLOB.mam_ears_list - if(new_ears) - features["mam_ears"] = new_ears - - if("ears") - var/new_ears - new_ears = input(user, "Choose your character's ears:", "Character Preference") as null|anything in GLOB.ears_list - if(new_ears) - features["ears"] = new_ears - - if("wings") - var/new_wings - new_wings = input(user, "Choose your character's wings:", "Character Preference") as null|anything in GLOB.r_wings_list - if(new_wings) - features["wings"] = new_wings - - if("frills") - var/new_frills - new_frills = input(user, "Choose your character's frills:", "Character Preference") as null|anything in GLOB.frills_list - if(new_frills) - features["frills"] = new_frills - - if("spines") - var/new_spines - new_spines = input(user, "Choose your character's spines:", "Character Preference") as null|anything in GLOB.spines_list - if(new_spines) - features["spines"] = new_spines - - if("body_markings") - var/new_body_markings - new_body_markings = input(user, "Choose your character's body markings:", "Character Preference") as null|anything in GLOB.body_markings_list - if(new_body_markings) - features["body_markings"] = new_body_markings - - if("mam_body_markings") - var/new_mam_body_markings - new_mam_body_markings = input(user, "Choose your character's body markings:", "Character Preference") as null|anything in GLOB.mam_body_markings_list - if(new_mam_body_markings) - features["mam_body_markings"] = new_mam_body_markings - - //Xeno Bodyparts - if("xenohead")//Head or caste type - var/new_head - new_head = input(user, "Choose your character's caste:", "Character Preference") as null|anything in GLOB.xeno_head_list - if(new_head) - features["xenohead"] = new_head - - if("xenotail")//Currently one one type, more maybe later if someone sprites them. Might include animated variants in the future. - var/new_tail - new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in GLOB.xeno_tail_list - if(new_tail) - features["xenotail"] = new_tail - - if("xenodorsal") - var/new_dors - new_dors = input(user, "Choose your character's dorsal tube type:", "Character Preference") as null|anything in GLOB.xeno_dorsal_list - if(new_dors) - features["xenodorsal"] = new_dors - - if("legs") - var/new_legs - new_legs = input(user, "Choose your character's legs:", "Character Preference") as null|anything in GLOB.legs_list - if(new_legs) - features["legs"] = new_legs - - if("s_tone") - var/new_s_tone = input(user, "Choose your character's skin-tone:", "Character Preference") as null|anything in GLOB.skin_tones - if(new_s_tone) - skin_tone = new_s_tone - - if("ooccolor") - var/new_ooccolor = input(user, "Choose your OOC colour:", "Game Preference") as color|null - if(new_ooccolor) - ooccolor = sanitize_ooccolor(new_ooccolor) - - if("bag") - var/new_backbag = input(user, "Choose your character's style of bag:", "Character Preference") as null|anything in GLOB.backbaglist - if(new_backbag) - backbag = new_backbag - - if("uplink_loc") - var/new_loc = input(user, "Choose your character's traitor uplink spawn location:", "Character Preference") as null|anything in GLOB.uplink_spawn_loc_list - if(new_loc) - uplink_spawn_loc = new_loc - - if("clown_name") - var/new_clown_name = reject_bad_name( input(user, "Choose your character's clown name:", "Character Preference") as text|null ) - if(new_clown_name) - custom_names["clown"] = new_clown_name - else - to_chat(user, "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .") - - if("mime_name") - var/new_mime_name = reject_bad_name( input(user, "Choose your character's mime name:", "Character Preference") as text|null ) - if(new_mime_name) - custom_names["mime"] = new_mime_name - else - to_chat(user, "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .") - - if("ai_name") - var/new_ai_name = reject_bad_name( input(user, "Choose your character's AI name:", "Character Preference") as text|null, 1 ) - if(new_ai_name) - custom_names["ai"] = new_ai_name - else - to_chat(user, "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, 0-9, -, ' and .") - - if("cyborg_name") - var/new_cyborg_name = reject_bad_name( input(user, "Choose your character's cyborg name:", "Character Preference") as text|null, 1 ) - if(new_cyborg_name) - custom_names["cyborg"] = new_cyborg_name - else - to_chat(user, "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, 0-9, -, ' and .") - - if("religion_name") - var/new_religion_name = reject_bad_name( input(user, "Choose your character's religion:", "Character Preference") as text|null ) - if(new_religion_name) - custom_names["religion"] = new_religion_name - else - to_chat(user, "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .") - - if("deity_name") - var/new_deity_name = reject_bad_name( input(user, "Choose your character's deity:", "Character Preference") as text|null ) - if(new_deity_name) - custom_names["deity"] = new_deity_name - else - to_chat(user, "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .") - - if("sec_dept") - var/department = input(user, "Choose your prefered security department:", "Security Departments") as null|anything in GLOB.security_depts_prefs - if(department) - prefered_security_department = department - - if ("preferred_map") - var/maplist = list() - var/default = "Default" - if (config.defaultmap) - default += " ([config.defaultmap.map_name])" - for (var/M in config.maplist) - var/datum/map_config/VM = config.maplist[M] - var/friendlyname = "[VM.map_name] " - if (VM.voteweight <= 0) - friendlyname += " (disabled)" - maplist[friendlyname] = VM.map_name - maplist[default] = null - var/pickedmap = input(user, "Choose your preferred map. This will be used to help weight random map selection.", "Character Preference") as null|anything in maplist - if (pickedmap) - preferred_map = maplist[pickedmap] - - if ("clientfps") - var/version_message - if (user.client && user.client.byond_version < 511) - version_message = "\nYou need to be using byond version 511 or later to take advantage of this feature, your version of [user.client.byond_version] is too low" - if (world.byond_version < 511) - version_message += "\nThis server does not currently support client side fps. You can set now for when it does." - var/desiredfps = input(user, "Choose your desired fps.[version_message]\n(0 = synced with server tick rate (currently:[world.fps]))", "Character Preference", clientfps) as null|num - if (!isnull(desiredfps)) - clientfps = desiredfps - if (world.byond_version >= 511 && user.client && user.client.byond_version >= 511) - user.client.vars["fps"] = clientfps - if("ui") - var/pickedui = input(user, "Choose your UI style.", "Character Preference") as null|anything in list("Midnight", "Plasmafire", "Retro", "Slimecore", "Operative", "Clockwork") - if(pickedui) - UI_style = pickedui - - //citadel code - if("cock_color") - var/new_cockcolor = input(user, "Penis color:", "Character Preference") as color|null - if(new_cockcolor) - var/temp_hsv = RGBtoHSV(new_cockcolor) - if(new_cockcolor == "#000000") - features["cock_color"] = pref_species.default_color - else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) - features["cock_color"] = sanitize_hexcolor(new_cockcolor) - else - user << "Invalid color. Your color is not bright enough." - - if("cock_length") - var/new_length = input(user, "Penis length in inches:\n([COCK_SIZE_MIN]-[COCK_SIZE_MAX])", "Character Preference") as num|null - if(new_length) - features["cock_length"] = max(min( round(text2num(new_length)), COCK_SIZE_MAX),COCK_SIZE_MIN) - - if("cock_shape") - var/new_shape - new_shape = input(user, "Penis shape:", "Character Preference") as null|anything in GLOB.cock_shapes_list - if(new_shape) - features["cock_shape"] = new_shape - - if("balls_color") - var/new_ballscolor = input(user, "Testicle Color:", "Character Preference") as color|null - if(new_ballscolor) - var/temp_hsv = RGBtoHSV(new_ballscolor) - if(new_ballscolor == "#000000") - features["balls_color"] = pref_species.default_color - else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) - features["balls_color"] = sanitize_hexcolor(new_ballscolor) - else - user << "Invalid color. Your color is not bright enough." - - if("egg_size") - var/new_size - var/list/egg_sizes = list(1,2,3) - new_size = input(user, "Egg Diameter(inches):", "Egg Size") as null|anything in egg_sizes - if(new_size) - features["eggsack_egg_size"] = new_size - - if("egg_color") - var/new_egg_color = input(user, "Egg Color:", "Character Preference") as color|null - if(new_egg_color) - var/temp_hsv = RGBtoHSV(new_egg_color) - if(ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) - features["eggsack_egg_color"] = sanitize_hexcolor(new_egg_color) - else - user << "Invalid color. Your color is not bright enough." - if("breasts_size") - var/new_size - new_size = input(user, "Breast Size", "Character Preference") as null|anything in GLOB.breasts_size_list - if(new_size) - features["breasts_size"] = new_size - - if("breasts_shape") - var/new_shape - new_shape = input(user, "Breast Shape", "Character Preference") as null|anything in GLOB.breasts_shapes_list - if(new_shape) - features["breasts_shape"] = new_shape - - if("breasts_color") - var/new_breasts_color = input(user, "Breast Color:", "Character Preference") as color|null - if(new_breasts_color) - var/temp_hsv = RGBtoHSV(new_breasts_color) - if(new_breasts_color == "#000000") - features["breasts_color"] = pref_species.default_color - else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) - features["breasts_color"] = sanitize_hexcolor(new_breasts_color) - else - user << "Invalid color. Your color is not bright enough." - if("vag_shape") - var/new_shape - new_shape = input(user, "Vagina Type", "Character Preference") as null|anything in GLOB.vagina_shapes_list - if(new_shape) - features["vag_shape"] = new_shape - if("vag_color") - var/new_vagcolor = input(user, "Vagina color:", "Character Preference") as color|null - if(new_vagcolor) - var/temp_hsv = RGBtoHSV(new_vagcolor) - if(new_vagcolor == "#000000") - features["vag_color"] = pref_species.default_color - else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) - features["vag_color"] = sanitize_hexcolor(new_vagcolor) - else - user << "Invalid color. Your color is not bright enough." - - else - switch(href_list["preference"]) - - //citadel code - if("genital_colour") - switch(features["genitals_use_skintone"]) - if(TRUE) - features["genitals_use_skintone"] = FALSE - if(FALSE) - features["genitals_use_skintone"] = TRUE - else - features["genitals_use_skintone"] = FALSE - if("arousable") - switch(arousable) - if(TRUE) - arousable = FALSE - if(FALSE) - arousable = TRUE - else//failsafe - arousable = FALSE - if("has_cock") - switch(features["has_cock"]) - if(TRUE) - features["has_cock"] = FALSE - if(FALSE) - features["has_cock"] = TRUE - features["has_ovi"] = FALSE - features["has_eggsack"] = FALSE - else - features["has_cock"] = FALSE - features["has_ovi"] = FALSE - if("has_balls") - switch(features["has_balls"]) - if(TRUE) - features["has_balls"] = FALSE - if(FALSE) - features["has_balls"] = TRUE - features["has_eggsack"] = FALSE - else - features["has_balls"] = FALSE - features["has_eggsack"] = FALSE - - if("has_ovi") - switch(features["has_ovi"]) - if(TRUE) - features["has_ovi"] = FALSE - if(FALSE) - features["has_ovi"] = TRUE - features["has_cock"] = FALSE - features["has_balls"] = FALSE - else - features["has_ovi"] = FALSE - features["has_cock"] = FALSE - - if("has_eggsack") - switch(features["has_eggsack"]) - if(TRUE) - features["has_eggsack"] = FALSE - if(FALSE) - features["has_eggsack"] = TRUE - features["has_balls"] = FALSE - else - features["has_eggsack"] = FALSE - features["has_balls"] = FALSE - - if("balls_internal") - switch(features["balls_internal"]) - if(TRUE) - features["balls_internal"] = FALSE - if(FALSE) - features["balls_internal"] = TRUE - features["eggsack_internal"] = FALSE - else - features["balls_internal"] = FALSE - features["eggsack_internal"] = FALSE - - if("eggsack_internal") - switch(features["eggsack_internal"]) - if(TRUE) - features["eggsack_internal"] = FALSE - if(FALSE) - features["eggsack_internal"] = TRUE - features["balls_internal"] = FALSE - else - features["eggsack_internal"] = FALSE - features["balls_internal"] = FALSE - - if("has_breasts") - switch(features["has_breasts"]) - if(TRUE) - features["has_breasts"] = FALSE - if(FALSE) - features["has_breasts"] = TRUE - else - features["has_breasts"] = FALSE - if("has_vag") - switch(features["has_vag"]) - if(TRUE) - features["has_vag"] = FALSE - if(FALSE) - features["has_vag"] = TRUE - else - features["has_vag"] = FALSE - if("has_womb") - switch(features["has_womb"]) - if(TRUE) - features["has_womb"] = FALSE - if(FALSE) - features["has_womb"] = TRUE - else - features["has_womb"] = FALSE - if("exhibitionist") - switch(features["exhibitionist"]) - if(TRUE) - features["exhibitionist"] = FALSE - if(FALSE) - features["exhibitionist"] = TRUE - else - features["exhibitionist"] = FALSE - - if("publicity") - if(unlock_content) - toggles ^= MEMBER_PUBLIC - if("gender") - if(gender == MALE) - gender = FEMALE - else - gender = MALE - underwear = "Nude" - undershirt = "Nude" - socks = "Nude" - facial_hair_style = "Shaved" - hair_style = "Bald" - - if("hotkeys") - hotkeys = !hotkeys - if("action_buttons") - buttons_locked = !buttons_locked - if("tgui_fancy") - tgui_fancy = !tgui_fancy - if("tgui_lock") - tgui_lock = !tgui_lock - if("winflash") - windowflashing = !windowflashing - if("hear_adminhelps") - toggles ^= SOUND_ADMINHELP - if("announce_login") - toggles ^= ANNOUNCE_LOGIN - - if("be_special") - var/be_special_type = href_list["be_special_type"] - if(be_special_type in be_special) - be_special -= be_special_type - else - be_special += be_special_type - - if("name") - be_random_name = !be_random_name - - if("all") - be_random_body = !be_random_body - - if("hear_midis") - toggles ^= SOUND_MIDI - - if("lobby_music") - toggles ^= SOUND_LOBBY - if((toggles & SOUND_LOBBY) && user.client) - user.client.playtitlemusic() - else - user.stop_sound_channel(CHANNEL_LOBBYMUSIC) - - if("ghost_ears") - chat_toggles ^= CHAT_GHOSTEARS - - if("ghost_sight") - chat_toggles ^= CHAT_GHOSTSIGHT - - if("ghost_whispers") - chat_toggles ^= CHAT_GHOSTWHISPER - - if("ghost_radio") - chat_toggles ^= CHAT_GHOSTRADIO - - if("ghost_pda") - chat_toggles ^= CHAT_GHOSTPDA - - if("pull_requests") - chat_toggles ^= CHAT_PULLR - - if("allow_midround_antag") - toggles ^= MIDROUND_ANTAG - - if("parallaxup") - parallax = Wrap(parallax + 1, PARALLAX_INSANE, PARALLAX_DISABLE + 1) - if (parent && parent.mob && parent.mob.hud_used) - parent.mob.hud_used.update_parallax_pref(parent.mob) - - if("parallaxdown") - parallax = Wrap(parallax - 1, PARALLAX_INSANE, PARALLAX_DISABLE + 1) - if (parent && parent.mob && parent.mob.hud_used) - parent.mob.hud_used.update_parallax_pref(parent.mob) - - if("save") - save_preferences() - save_character() - - if("load") - load_preferences() - load_character() - attempt_vr(parent.prefs_vr,"load_vore","") - - if("changeslot") - attempt_vr(parent.prefs_vr,"load_vore","") - if(!load_character(text2num(href_list["num"]))) - random_character() - real_name = random_unique_name(gender) - save_character() - - if("tab") - if (href_list["tab"]) - current_tab = text2num(href_list["tab"]) - - ShowChoices(user) - return 1 - -/datum/preferences/proc/copy_to(mob/living/carbon/human/character, icon_updates = 1) - if(be_random_name) - real_name = pref_species.random_name(gender) - - if(be_random_body) - random_character(gender) - - if(config.humans_need_surnames) - var/firstspace = findtext(real_name, " ") - var/name_length = length(real_name) - if(!firstspace) //we need a surname - real_name += " [pick(GLOB.last_names)]" - else if(firstspace == name_length) - real_name += "[pick(GLOB.last_names)]" - - character.real_name = real_name - character.name = character.real_name - - character.gender = gender - character.age = age - - character.eye_color = eye_color - var/obj/item/organ/eyes/organ_eyes = character.getorgan(/obj/item/organ/eyes) - if(organ_eyes) - if(!initial(organ_eyes.eye_color)) - organ_eyes.eye_color = eye_color - organ_eyes.old_eye_color = eye_color - character.hair_color = hair_color - character.facial_hair_color = facial_hair_color - - character.skin_tone = skin_tone - character.hair_style = hair_style - character.facial_hair_style = facial_hair_style - character.underwear = underwear - character.undershirt = undershirt - character.socks = socks - - character.backbag = backbag - - character.dna.features = features.Copy() //Flavor text is now a DNA feature - character.dna.real_name = character.real_name - var/datum/species/chosen_species - if(pref_species != /datum/species/human && config.mutant_races) - chosen_species = pref_species.type - else - chosen_species = /datum/species/human - character.set_species(chosen_species, icon_update=0) - - //citadel code - character.give_genitals() - character.flavor_text = features["flavor_text"] //Let's update their flavor_text at least initially - character.canbearoused = arousable - - if(icon_updates) - character.update_body() - character.update_hair() - character.update_body_parts() - character.update_genitals() +GLOBAL_LIST_EMPTY(preferences_datums) + + + +/datum/preferences + var/client/parent + //doohickeys for savefiles + var/path + var/default_slot = 1 //Holder so it doesn't default to slot 1, rather the last one used + var/max_save_slots = 10 + + //non-preference stuff + var/muted = 0 + var/last_ip + var/last_id + + //game-preferences + var/lastchangelog = "" //Saved changlog filesize to detect if there was a change + var/ooccolor = null + var/enable_tips = TRUE + var/tip_delay = 500 //tip delay in milliseconds + + //Antag preferences + var/list/be_special = list() //Special role selection + var/tmp/old_be_special = 0 //Bitflag version of be_special, used to update old savefiles and nothing more + //If it's 0, that's good, if it's anything but 0, the owner of this prefs file's antag choices were, + //autocorrected this round, not that you'd need to check that. + + + var/UI_style = "Midnight" + var/buttons_locked = FALSE + var/hotkeys = FALSE + var/tgui_fancy = TRUE + var/tgui_lock = TRUE + var/windowflashing = TRUE + var/toggles = TOGGLES_DEFAULT + var/db_flags + var/chat_toggles = TOGGLES_DEFAULT_CHAT + var/ghost_form = "ghost" + var/ghost_orbit = GHOST_ORBIT_CIRCLE + var/ghost_accs = GHOST_ACCS_DEFAULT_OPTION + var/ghost_others = GHOST_OTHERS_DEFAULT_OPTION + var/ghost_hud = 1 + var/inquisitive_ghost = 1 + var/allow_midround_antag = 1 + var/preferred_map = null + + var/uses_glasses_colour = 0 + + //character preferences + var/real_name //our character's name + var/be_random_name = 0 //whether we'll have a random name every round + var/be_random_body = 0 //whether we'll have a random body every round + var/gender = MALE //gender of character (well duh) + var/age = 30 //age of character + var/underwear = "Nude" //underwear type + var/undershirt = "Nude" //undershirt type + var/socks = "Nude" //socks type + var/backbag = DBACKPACK //backpack type + var/hair_style = "Bald" //Hair type + var/hair_color = "000" //Hair color + var/facial_hair_style = "Shaved" //Face hair type + var/facial_hair_color = "000" //Facial hair color + var/skin_tone = "caucasian1" //Skin color + var/eye_color = "000" //Eye color + var/datum/species/pref_species = new /datum/species/human() //Mutant race + var/list/features = list("mcolor" = "FFF", + "mcolor2" = "FFF", + "mcolor3" = "FFF", + "tail_lizard" = "Smooth", + "tail_human" = "None", + "snout" = "Round", + "horns" = "None", + "ears" = "None", + "wings" = "None", + "frills" = "None", + "spines" = "None", + "body_markings" = "None", + "mam_body_markings" = "None", + "mam_ears" = "None", + "mam_tail" = "None", + "mam_tail_animated" = "None", + "xenodorsal" = "None", + "xenohead" = "None", + "xenotail" = "None", + "legs" = "Normal Legs", + "taur" = "None", + "exhibitionist" = FALSE, + "genitals_use_skintone" = FALSE, + "has_cock" = FALSE, + "cock_shape" = "Human", + "cock_length" = 6, + "cock_girth_ratio" = COCK_GIRTH_RATIO_DEF, + "cock_color" = "fff", + "has_sheath" = FALSE, + "sheath_color" = "fff", + "has_balls" = FALSE, + "balls_internal" = FALSE, + "balls_color" = "fff", + "balls_amount" = 2, + "balls_sack_size" = BALLS_SACK_SIZE_DEF, + "balls_size" = BALLS_SIZE_DEF, + "balls_cum_rate" = CUM_RATE, + "balls_cum_mult" = CUM_RATE_MULT, + "balls_efficiency" = CUM_EFFICIENCY, + "balls_fluid" = "semen", + "has_ovi" = FALSE, + "ovi_shape" = "knotted", + "ovi_length" = 6, + "ovi_color" = "fff", + "has_eggsack" = FALSE, + "eggsack_internal" = TRUE, + "eggsack_color" = "fff", + "eggsack_size" = BALLS_SACK_SIZE_DEF, + "eggsack_egg_color" = "fff", + "eggsack_egg_size" = EGG_GIRTH_DEF, + "has_breasts" = FALSE, + "breasts_color" = "fff", + "breasts_size" = "C", + "breasts_shape" = "Pair", + "breasts_fluid" = "milk", + "has_vag" = FALSE, + "vag_shape" = "Human", + "vag_color" = "fff", + "vag_clits" = 1, + "vag_clit_diam" = 0.25, + "vag_clit_len" = 0.25, + "has_womb" = FALSE, + "womb_cum_rate" = CUM_RATE, + "womb_cum_mult" = CUM_RATE_MULT, + "womb_efficiency" = CUM_EFFICIENCY, + "womb_fluid" = "femcum", + "flavor_text" = "" + )//MAKE SURE TO UPDATE THE LIST IN MOBS.DM IF YOU'RE GOING TO ADD TO THIS LIST, OTHERWISE THINGS MIGHT GET FUCKEY + + var/list/custom_names = list("clown", "mime", "ai", "cyborg", "religion", "deity") + var/prefered_security_department = SEC_DEPT_RANDOM + + //Mob preview + var/icon/preview_icon = null + + //Jobs, uses bitflags + var/job_civilian_high = 0 + var/job_civilian_med = 0 + var/job_civilian_low = 0 + + var/job_medsci_high = 0 + var/job_medsci_med = 0 + var/job_medsci_low = 0 + + var/job_engsec_high = 0 + var/job_engsec_med = 0 + var/job_engsec_low = 0 + + // Want randomjob if preferences already filled - Donkie + var/joblessrole = BERANDOMJOB //defaults to 1 for fewer assistants + + // 0 = character settings, 1 = game preferences, 2 = character appearance + var/current_tab = 0 + + // OOC Metadata: + var/metadata = "" + + var/unlock_content = 0 + + var/list/ignoring = list() + + var/clientfps = 0 + + var/parallax + + var/uplink_spawn_loc = UPLINK_PDA + + var/list/exp + var/list/menuoptions + + //citadel code + var/arousable = TRUE //Allows players to disable arousal from the character creation menu + +/datum/preferences/New(client/C) + parent = C + custom_names["ai"] = pick(GLOB.ai_names) + custom_names["cyborg"] = pick(GLOB.ai_names) + custom_names["clown"] = pick(GLOB.clown_names) + custom_names["mime"] = pick(GLOB.mime_names) + if(istype(C)) + if(!IsGuestKey(C.key)) + load_path(C.ckey) + unlock_content = C.IsByondMember() + if(unlock_content) + max_save_slots = 16 + var/loaded_preferences_successfully = load_preferences() + if(loaded_preferences_successfully) + if(load_character()) + return + //we couldn't load character data so just randomize the character appearance + name + random_character() //let's create a random character then - rather than a fat, bald and naked man. + real_name = pref_species.random_name(gender,1) + if(!loaded_preferences_successfully) + save_preferences() + save_character() //let's save this new random character so it doesn't keep generating new ones. + menuoptions = list() + return + +/datum/preferences/proc/ShowChoices(mob/user) + if(!user || !user.client) + return + if(current_tab == 2) + update_preview_icon(nude=TRUE) + else + update_preview_icon(nude=FALSE) + user << browse_rsc(preview_icon, "previewicon.png") + var/dat = "
    " + + dat += "Character Settings" + dat += "Character Appearance" + dat += "Game Preferences" + + if(!path) + dat += "
    Please create an account to save your preferences
    " + + dat += "
    " + + dat += "
    " + + switch(current_tab) + if (0) // Character Settings# + if(path) + var/savefile/S = new /savefile(path) + if(S) + dat += "
    " + var/name + for(var/i=1, i<=max_save_slots, i++) + S.cd = "/character[i]" + S["real_name"] >> name + if(!name) + name = "Character[i]" + //if(i!=1) dat += " | " + dat += "[name] " + dat += "
    " + + dat += "

    Occupation Choices

    " + dat += "Set Occupation Preferences
    " + dat += "

    Identity

    " + dat += "" + + dat += "
    " + if(jobban_isbanned(user, "appearance")) + dat += "You are banned from using custom names and appearances. You can continue to adjust your characters, but you will be randomised once you join the game.
    " + dat += "Random Name " + dat += "Always Random Name: [be_random_name ? "Yes" : "No"]
    " + + dat += "Name: " + dat += "[real_name]
    " + + dat += "Gender: [gender == MALE ? "Male" : "Female"]
    " + dat += "Age: [age]
    " + dat += "Arousal:[arousable == TRUE ? "Enabled" : "Disabled"]
    " + dat += "Exhibitionist:[features["exhibitionist"] == TRUE ? "Yes" : "No"]
    " + dat += "Special Names:
    " + dat += "Clown: [custom_names["clown"]] " + dat += "Mime:[custom_names["mime"]]
    " + dat += "AI: [custom_names["ai"]] " + dat += "Cyborg: [custom_names["cyborg"]]
    " + dat += "Chaplain religion: [custom_names["religion"]] " + dat += "Chaplain deity: [custom_names["deity"]]
    " + + dat += "Custom job preferences:
    " + dat += "Prefered security department: [prefered_security_department]
    " + + dat += "
    " + + dat += "
    " +// dat += "Size: [character_size]
    " + dat += "
    " + + if (1) // Game Preferences + dat += "
    " + dat += "

    General Settings

    " + dat += "UI Style: [UI_style]
    " + dat += "Keybindings: [(hotkeys) ? "Hotkeys" : "Default"]
    " + dat += "Action Buttons: [(buttons_locked) ? "Locked In Place" : "Unlocked"]
    " + dat += "tgui Style: [(tgui_fancy) ? "Fancy" : "No Frills"]
    " + dat += "tgui Monitors: [(tgui_lock) ? "Primary" : "All"]
    " + dat += "Window Flashing: [(windowflashing) ? "Yes" : "No"]
    " + dat += "Play admin midis: [(toggles & SOUND_MIDI) ? "Yes" : "No"]
    " + dat += "Play lobby music: [(toggles & SOUND_LOBBY) ? "Yes" : "No"]
    " + dat += "Ghost ears: [(chat_toggles & CHAT_GHOSTEARS) ? "All Speech" : "Nearest Creatures"]
    " + dat += "Ghost sight: [(chat_toggles & CHAT_GHOSTSIGHT) ? "All Emotes" : "Nearest Creatures"]
    " + dat += "Ghost whispers: [(chat_toggles & CHAT_GHOSTWHISPER) ? "All Speech" : "Nearest Creatures"]
    " + dat += "Ghost radio: [(chat_toggles & CHAT_GHOSTRADIO) ? "Yes" : "No"]
    " + dat += "Ghost pda: [(chat_toggles & CHAT_GHOSTPDA) ? "All Messages" : "Nearest Creatures"]
    " + dat += "Pull requests: [(chat_toggles & CHAT_PULLR) ? "Yes" : "No"]
    " + dat += "Midround Antagonist: [(toggles & MIDROUND_ANTAG) ? "Yes" : "No"]
    " + if(config.allow_Metadata) + dat += "OOC Notes: Edit
    " + + if(user.client) + if(user.client.holder) + dat += "Adminhelp Sound: [(toggles & SOUND_ADMINHELP)?"On":"Off"]
    " + dat += "Announce Login: [(toggles & ANNOUNCE_LOGIN)?"On":"Off"]
    " + + if(unlock_content || check_rights_for(user.client, R_ADMIN)) + dat += "OOC:     Change
    " + + if(unlock_content) + dat += "BYOND Membership Publicity: [(toggles & MEMBER_PUBLIC) ? "Public" : "Hidden"]
    " + dat += "Ghost Form: [ghost_form]
    " + dat += "Ghost Orbit: [ghost_orbit]
    " + + var/button_name = "If you see this something went wrong." + switch(ghost_accs) + if(GHOST_ACCS_FULL) + button_name = GHOST_ACCS_FULL_NAME + if(GHOST_ACCS_DIR) + button_name = GHOST_ACCS_DIR_NAME + if(GHOST_ACCS_NONE) + button_name = GHOST_ACCS_NONE_NAME + + dat += "Ghost Accessories: [button_name]
    " + + switch(ghost_others) + if(GHOST_OTHERS_THEIR_SETTING) + button_name = GHOST_OTHERS_THEIR_SETTING_NAME + if(GHOST_OTHERS_DEFAULT_SPRITE) + button_name = GHOST_OTHERS_DEFAULT_SPRITE_NAME + if(GHOST_OTHERS_SIMPLE) + button_name = GHOST_OTHERS_SIMPLE_NAME + + dat += "Ghosts of Others: [button_name]
    " + + if (config.maprotation) + var/p_map = preferred_map + if (!p_map) + p_map = "Default" + if (config.defaultmap) + p_map += " ([config.defaultmap.map_name])" + else + if (p_map in config.maplist) + var/datum/map_config/VM = config.maplist[p_map] + if (!VM) + p_map += " (No longer exists)" + else + p_map = VM.map_name + else + p_map += " (No longer exists)" + if(config.allow_map_voting) + dat += "Preferred Map: [p_map]
    " + + dat += "FPS: [clientfps]
    " + + dat += "Parallax (Fancy Space): " + switch (parallax) + if (PARALLAX_LOW) + dat += "Low" + if (PARALLAX_MED) + dat += "Medium" + if (PARALLAX_INSANE) + dat += "Insane" + if (PARALLAX_DISABLE) + dat += "Disabled" + else + dat += "High" + dat += "
    " + + dat += "
    " + + dat += "

    Special Role Settings

    " + + if(jobban_isbanned(user, "Syndicate")) + dat += "You are banned from antagonist roles." + src.be_special = list() + + + for (var/i in GLOB.special_roles) + if(jobban_isbanned(user, i)) + dat += "Be [capitalize(i)]: BANNED
    " + else + var/days_remaining = null + if(config.use_age_restriction_for_jobs && ispath(GLOB.special_roles[i])) //If it's a game mode antag, check if the player meets the minimum age + var/mode_path = GLOB.special_roles[i] + var/datum/game_mode/temp_mode = new mode_path + days_remaining = temp_mode.get_remaining_days(user.client) + + if(days_remaining) + dat += "Be [capitalize(i)]: \[IN [days_remaining] DAYS]
    " + else + dat += "Be [capitalize(i)]: [(i in be_special) ? "Yes" : "No"]
    " + + dat += "
    " + + //Character Appearance + if(2) + dat += "" + */ + + + dat += "
    " + dat += "

    " + dat += "Set Flavor Text
    " + if(lentext(features["flavor_text"]) <= 40) + if(!lentext(features["flavor_text"])) + dat += "\[...\]" + else + dat += "[features["flavor_text"]]" + else + dat += "[TextPreview(features["flavor_text"])]...
    " + if(config.mutant_races)//really don't need this check, but fuck un-tabbing all those lines + dat += "

    Body

    " + dat += "Gender: [gender == MALE ? "Male" : "Female"]
    " + dat += "Species:[pref_species.id]
    " + dat += "Random Body
    " + dat += "Always Random Body: [be_random_body ? "Yes" : "No"]
    " + if((MUTCOLORS in pref_species.species_traits) || (MUTCOLORS_PARTSONLY in pref_species.species_traits)) + dat += "Primary Color:     Change
    " + dat += "Secondary Color:     Change
    " + dat += "Tertiary Color:     Change
    " + if(pref_species.use_skintones) + dat += "Skin Tone: [skin_tone]
    " + dat += "Genitals Use Skintone:[features["genitals_use_skintone"] == TRUE ? "Enabled" : "Disabled"]
    " + + if(HAIR in pref_species.species_traits) + dat += "Hair Style: [hair_style]
    " + dat += "Hair Color:     Change
    " + dat += "Facial Hair Style: [facial_hair_style]
    " + dat += "Facial Hair Color:     Change
    " + if(EYECOLOR in pref_species.species_traits) + dat += "Eye Color:     Change
    " + if("tail_lizard" in pref_species.mutant_bodyparts) + dat += "Tail: [features["tail_lizard"]]
    " + else if("mam_tail" in pref_species.mutant_bodyparts) + dat += "Tail: [features["mam_tail"]]
    " + else if("tail_human" in pref_species.mutant_bodyparts) + dat += "Tail: [features["tail_human"]]
    " + if("snout" in pref_species.mutant_bodyparts) + dat += "Snout: [features["snout"]]
    " + if("horns" in pref_species.mutant_bodyparts) + dat += "Snout: [features["horns"]]
    " + if("frills" in pref_species.mutant_bodyparts) + dat += "Frills: [features["frills"]]
    " + if("spines" in pref_species.mutant_bodyparts) + dat += "Spines: [features["spines"]]
    " + if("body_markings" in pref_species.mutant_bodyparts) + dat += "Body Markings: [features["body_markings"]]
    " + else if("mam_body_markings" in pref_species.mutant_bodyparts) + dat += "Body Markings: [features["mam_body_markings"]]
    " + if("mam_ears" in pref_species.mutant_bodyparts) + dat += "Ears: [features["mam_ears"]]
    " + else if("ears" in pref_species.mutant_bodyparts) + dat += "Ears: [features["ears"]]
    " + if("legs" in pref_species.mutant_bodyparts) + dat += "Legs: [features["legs"]]
    " + if("taur" in pref_species.mutant_bodyparts) + dat += "Taur: [features["taur"]]
    " + if("wings" in pref_species.mutant_bodyparts && GLOB.r_wings_list.len >1) + dat += "Wings: [features["wings"]]
    " + if("xenohead" in pref_species.mutant_bodyparts) + dat += "Caste: [features["xenohead"]]
    " + if("xenotail" in pref_species.mutant_bodyparts) + dat += "Tail: [features["xenotail"]]
    " + if("xenodorsal" in pref_species.mutant_bodyparts) + dat += "Dorsal Tubes: [features["xenodorsal"]]
    " + + dat += "
    " + + + dat += "

    Clothing & Equipment

    " +//underwear will be refactored later so it fits in with other wearable equipment and isn't just an overlay +// dat += "Underwear:[underwear]
    " +// dat += "Undershirt:[undershirt]
    " +// dat += "Socks:[socks]
    " + dat += "Backpack:[backbag]
    " + dat += "Uplink Location:[uplink_spawn_loc]
    " + + dat += "

    Genitals

    " + if(NOGENITALS in pref_species.species_traits) + dat += "Your species ([pref_species.name]) does not support genitals!
    " + else + dat += "Has Penis:[features["has_cock"] == TRUE ? "Yes" : "No"]
    " + if(features["has_cock"] == TRUE) + if(pref_species.use_skintones && features["genitals_use_skintone"] == TRUE) + dat += "Penis Color:   (Skin tone overriding)
    " + else + dat += "Penis Color:    Change
    " +// dat += "
    " + dat += "Penis Shape: [features["cock_shape"]]
    " + dat += "Penis Length: [features["cock_length"]] inch(es)
    " + dat += "Has Testicles:[features["has_balls"] == TRUE ? "Yes" : "No"]
    " + if(features["has_balls"] == TRUE) + if(pref_species.use_skintones && features["genitals_use_skintone"] == TRUE) + dat += "Testicles Color:   (Skin tone overriding)
    " + else + dat += "Testicles Color:    Change
    " + dat += "Has Vagina:[features["has_vag"] == TRUE ? "Yes" : "No"]
    " + if(features["has_vag"]) + dat += "Vagina Type: [features["vag_shape"]]
    " + if(pref_species.use_skintones && features["genitals_use_skintone"] == TRUE) + dat += "Vagina Color:   (Skin tone overriding)
    " + else + dat += "Vagina Color:    Change
    " + dat += "Has Womb:[features["has_womb"] == TRUE ? "Yes" : "No"]
    " + dat += "Has Breasts:[features["has_breasts"] == TRUE ? "Yes" : "No"]
    " + if(features["has_breasts"]) + if(pref_species.use_skintones && features["genitals_use_skintone"] == TRUE) + dat += "Color:   (Skin tone overriding)
    " + else + dat += "Color:    Change
    " + dat += "Cup Size:[features["breasts_size"]]
    " + dat += "Breast Shape:[features["breasts_shape"]]
    " + /* + dat += "

    Ovipositor

    " + dat += "Has Ovipositor:[features["has_ovi"] == TRUE ? "Yes" : "No"]" + if(features["has_ovi"]) + dat += "Ovi Color:    Change" + dat += "

    Eggsack

    " + dat += "Has Eggsack:[features["has_eggsack"] == TRUE ? "Yes" : "No"]
    " + if(features["has_eggsack"] == TRUE) + dat += "Color:    Change" + dat += "Egg Color:    Change" + dat += "Egg Size:[features["eggsack_egg_size"]]\" Diameter" + + dat += "
    " + dat += "
    " + + if(!IsGuestKey(user.key)) + dat += "Undo " + dat += "Save Setup " + + dat += "Reset Setup" + dat += "
    " + + var/datum/browser/popup = new(user, "preferences", "
    Character Setup
    ", 640, 770) + popup.set_content(dat) + popup.open(0) + +/datum/preferences/proc/SetChoices(mob/user, limit = 17, list/splitJobs = list("Chief Engineer"), widthPerColumn = 295, height = 620) + if(!SSjob) + return + + //limit - The amount of jobs allowed per column. Defaults to 17 to make it look nice. + //splitJobs - Allows you split the table by job. You can make different tables for each department by including their heads. Defaults to CE to make it look nice. + //widthPerColumn - Screen's width for every column. + //height - Screen's height. + + var/width = widthPerColumn + + var/HTML = "
    " + if(SSjob.occupations.len <= 0) + HTML += "The job ticker is not yet finished creating jobs, please try again later" + HTML += "
    Done

    " // Easier to press up here. + + else + HTML += "Choose occupation chances
    " + HTML += "
    Left-click to raise an occupation preference, right-click to lower it.
    " + HTML += "
    Done

    " // Easier to press up here. + HTML += "" + HTML += "
    " // Table within a table for alignment, also allows you to easily add more colomns. + HTML += "" + var/index = -1 + + //The job before the current job. I only use this to get the previous jobs color when I'm filling in blank rows. + var/datum/job/lastJob + + for(var/datum/job/job in SSjob.occupations) + + index += 1 + if((index >= limit) || (job.title in splitJobs)) + width += widthPerColumn + if((index < limit) && (lastJob != null)) + //If the cells were broken up by a job in the splitJob list then it will fill in the rest of the cells with + //the last job's selection color. Creating a rather nice effect. + for(var/i = 0, i < (limit - index), i += 1) + HTML += "" + HTML += "
      
    " + index = 0 + + HTML += "" + continue + var/required_playtime_remaining = job.required_playtime_remaining(user.client) + if(required_playtime_remaining) + HTML += "[rank]" + continue + if(!job.player_old_enough(user.client)) + var/available_in_days = job.available_in_days(user.client) + HTML += "[rank]" + continue + if((job_civilian_low & ASSISTANT) && (rank != "Assistant") && !jobban_isbanned(user, "Assistant")) + HTML += "[rank]" + continue + if(config.enforce_human_authority && !user.client.prefs.pref_species.qualifies_for_rank(rank, user.client.prefs.features)) + if(user.client.prefs.pref_species.id == "human") + HTML += "[rank]" + else + HTML += "[rank]" + continue + if((rank in GLOB.command_positions) || (rank == "AI"))//Bold head jobs + HTML += "[rank]" + else + HTML += "[rank]" + + HTML += "" + continue + + HTML += "[prefLevelLabel]" + HTML += "" + + for(var/i = 1, i < (limit - index), i += 1) // Finish the column so it is even + HTML += "" + + HTML += "
    " + var/rank = job.title + lastJob = job + if(jobban_isbanned(user, rank)) + HTML += "[rank] BANNED
    \[ [get_exp_format(required_playtime_remaining)] as [job.get_exp_req_type()] \]
    \[IN [(available_in_days)] DAYS\]
    \[MUTANT\]
    \[NON-HUMAN\]
    " + + var/prefLevelLabel = "ERROR" + var/prefLevelColor = "pink" + var/prefUpperLevel = -1 // level to assign on left click + var/prefLowerLevel = -1 // level to assign on right click + + if(GetJobDepartment(job, 1) & job.flag) + prefLevelLabel = "High" + prefLevelColor = "slateblue" + prefUpperLevel = 4 + prefLowerLevel = 2 + else if(GetJobDepartment(job, 2) & job.flag) + prefLevelLabel = "Medium" + prefLevelColor = "green" + prefUpperLevel = 1 + prefLowerLevel = 3 + else if(GetJobDepartment(job, 3) & job.flag) + prefLevelLabel = "Low" + prefLevelColor = "orange" + prefUpperLevel = 2 + prefLowerLevel = 4 + else + prefLevelLabel = "NEVER" + prefLevelColor = "red" + prefUpperLevel = 3 + prefLowerLevel = 1 + + + HTML += "" + + if(rank == "Assistant")//Assistant is special + if(job_civilian_low & ASSISTANT) + HTML += "Yes" + else + HTML += "No" + HTML += "
      
    " + HTML += "
    " + + var/message = "Be an Assistant if preferences unavailable" + if(joblessrole == BERANDOMJOB) + message = "Get random job if preferences unavailable" + else if(joblessrole == RETURNTOLOBBY) + message = "Return to lobby if preferences unavailable" + HTML += "

    [message]
    " + HTML += "
    Reset Preferences
    " + + user << browse(null, "window=preferences") + var/datum/browser/popup = new(user, "mob_occupation", "
    Occupation Preferences
    ", width, height) + popup.set_window_options("can_close=0") + popup.set_content(HTML) + popup.open(0) + return + +/datum/preferences/proc/SetJobPreferenceLevel(datum/job/job, level) + if (!job) + return 0 + + if (level == 1) // to high + // remove any other job(s) set to high + job_civilian_med |= job_civilian_high + job_engsec_med |= job_engsec_high + job_medsci_med |= job_medsci_high + job_civilian_high = 0 + job_engsec_high = 0 + job_medsci_high = 0 + + if (job.department_flag == CIVILIAN) + job_civilian_low &= ~job.flag + job_civilian_med &= ~job.flag + job_civilian_high &= ~job.flag + + switch(level) + if (1) + job_civilian_high |= job.flag + if (2) + job_civilian_med |= job.flag + if (3) + job_civilian_low |= job.flag + + return 1 + else if (job.department_flag == ENGSEC) + job_engsec_low &= ~job.flag + job_engsec_med &= ~job.flag + job_engsec_high &= ~job.flag + + switch(level) + if (1) + job_engsec_high |= job.flag + if (2) + job_engsec_med |= job.flag + if (3) + job_engsec_low |= job.flag + + return 1 + else if (job.department_flag == MEDSCI) + job_medsci_low &= ~job.flag + job_medsci_med &= ~job.flag + job_medsci_high &= ~job.flag + + switch(level) + if (1) + job_medsci_high |= job.flag + if (2) + job_medsci_med |= job.flag + if (3) + job_medsci_low |= job.flag + + return 1 + + return 0 + +/datum/preferences/proc/UpdateJobPreference(mob/user, role, desiredLvl) + if(!SSjob || SSjob.occupations.len <= 0) + return + var/datum/job/job = SSjob.GetJob(role) + + if(!job) + user << browse(null, "window=mob_occupation") + ShowChoices(user) + return + + if (!isnum(desiredLvl)) + to_chat(user, "UpdateJobPreference - desired level was not a number. Please notify coders!") + ShowChoices(user) + return + + if(role == "Assistant") + if(job_civilian_low & job.flag) + job_civilian_low &= ~job.flag + else + job_civilian_low |= job.flag + SetChoices(user) + return 1 + + SetJobPreferenceLevel(job, desiredLvl) + SetChoices(user) + + return 1 + + +/datum/preferences/proc/ResetJobs() + + job_civilian_high = 0 + job_civilian_med = 0 + job_civilian_low = 0 + + job_medsci_high = 0 + job_medsci_med = 0 + job_medsci_low = 0 + + job_engsec_high = 0 + job_engsec_med = 0 + job_engsec_low = 0 + + +/datum/preferences/proc/GetJobDepartment(datum/job/job, level) + if(!job || !level) + return 0 + switch(job.department_flag) + if(CIVILIAN) + switch(level) + if(1) + return job_civilian_high + if(2) + return job_civilian_med + if(3) + return job_civilian_low + if(MEDSCI) + switch(level) + if(1) + return job_medsci_high + if(2) + return job_medsci_med + if(3) + return job_medsci_low + if(ENGSEC) + switch(level) + if(1) + return job_engsec_high + if(2) + return job_engsec_med + if(3) + return job_engsec_low + return 0 + +/datum/preferences/proc/process_link(mob/user, list/href_list) + if(href_list["jobbancheck"]) + var/job = sanitizeSQL(href_list["jobbancheck"]) + var/sql_ckey = sanitizeSQL(user.ckey) + var/datum/DBQuery/query_get_jobban = SSdbcore.NewQuery("SELECT reason, bantime, duration, expiration_time, a_ckey FROM [format_table_name("ban")] WHERE ckey = '[sql_ckey]' AND (bantype = 'JOB_PERMABAN' OR (bantype = 'JOB_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned) AND job = '[job]'") + if(!query_get_jobban.warn_execute()) + return + if(query_get_jobban.NextRow()) + var/reason = query_get_jobban.item[1] + var/bantime = query_get_jobban.item[2] + var/duration = query_get_jobban.item[3] + var/expiration_time = query_get_jobban.item[4] + var/a_ckey = query_get_jobban.item[5] + var/text + text = "You, or another user of this computer, ([user.ckey]) is banned from playing [job]. The ban reason is:
    [reason]
    This ban was applied by [a_ckey] on [bantime]" + if(text2num(duration) > 0) + text += ". The ban is for [duration] minutes and expires on [expiration_time] (server time)" + text += ".
    " + to_chat(user, text) + return + + if(href_list["preference"] == "job") + switch(href_list["task"]) + if("close") + user << browse(null, "window=mob_occupation") + ShowChoices(user) + if("reset") + ResetJobs() + SetChoices(user) + if("random") + switch(joblessrole) + if(RETURNTOLOBBY) + if(jobban_isbanned(user, "Assistant")) + joblessrole = BERANDOMJOB + else + joblessrole = BEASSISTANT + if(BEASSISTANT) + joblessrole = BERANDOMJOB + if(BERANDOMJOB) + joblessrole = RETURNTOLOBBY + SetChoices(user) + if("setJobLevel") + UpdateJobPreference(user, href_list["text"], text2num(href_list["level"])) + else + SetChoices(user) + return 1 + + switch(href_list["task"]) + if("random") + switch(href_list["preference"]) + if("name") + real_name = pref_species.random_name(gender,1) + if("age") + age = rand(AGE_MIN, AGE_MAX) + if("hair") + hair_color = random_short_color() + if("hair_style") + hair_style = random_hair_style(gender) + if("facial") + facial_hair_color = random_short_color() + if("facial_hair_style") + facial_hair_style = random_facial_hair_style(gender) + if("underwear") + underwear = random_underwear(gender) + if("undershirt") + undershirt = random_undershirt(gender) + if("socks") + socks = random_socks() + if("eyes") + eye_color = random_eye_color() + if("s_tone") + skin_tone = random_skin_tone() + if("bag") + backbag = pick(GLOB.backbaglist) + if("all") + random_character() + + if("input") + switch(href_list["preference"]) + if("ghostform") + if(unlock_content) + var/new_form = input(user, "Thanks for supporting BYOND - Choose your ghostly form:","Thanks for supporting BYOND",null) as null|anything in GLOB.ghost_forms + if(new_form) + ghost_form = new_form + if("ghostorbit") + if(unlock_content) + var/new_orbit = input(user, "Thanks for supporting BYOND - Choose your ghostly orbit:","Thanks for supporting BYOND", null) as null|anything in GLOB.ghost_orbits + if(new_orbit) + ghost_orbit = new_orbit + + if("ghostaccs") + var/new_ghost_accs = alert("Do you want your ghost to show full accessories where possible, hide accessories but still use the directional sprites where possible, or also ignore the directions and stick to the default sprites?",,GHOST_ACCS_FULL_NAME, GHOST_ACCS_DIR_NAME, GHOST_ACCS_NONE_NAME) + switch(new_ghost_accs) + if(GHOST_ACCS_FULL_NAME) + ghost_accs = GHOST_ACCS_FULL + if(GHOST_ACCS_DIR_NAME) + ghost_accs = GHOST_ACCS_DIR + if(GHOST_ACCS_NONE_NAME) + ghost_accs = GHOST_ACCS_NONE + + if("ghostothers") + var/new_ghost_others = alert("Do you want the ghosts of others to show up as their own setting, as their default sprites or always as the default white ghost?",,GHOST_OTHERS_THEIR_SETTING_NAME, GHOST_OTHERS_DEFAULT_SPRITE_NAME, GHOST_OTHERS_SIMPLE_NAME) + switch(new_ghost_others) + if(GHOST_OTHERS_THEIR_SETTING_NAME) + ghost_others = GHOST_OTHERS_THEIR_SETTING + if(GHOST_OTHERS_DEFAULT_SPRITE_NAME) + ghost_others = GHOST_OTHERS_DEFAULT_SPRITE + if(GHOST_OTHERS_SIMPLE_NAME) + ghost_others = GHOST_OTHERS_SIMPLE + + if("name") + var/new_name = reject_bad_name( input(user, "Choose your character's name:", "Character Preference") as text|null ) + if(new_name) + real_name = new_name + else + to_chat(user, "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .") + + if("age") + var/new_age = input(user, "Choose your character's age:\n([AGE_MIN]-[AGE_MAX])", "Character Preference") as num|null + if(new_age) + age = max(min( round(text2num(new_age)), AGE_MAX),AGE_MIN) + + if("flavor_text") + var/msg = input(usr,"Set the flavor text in your 'examine' verb. This can also be used for OOC notes and preferences!","Flavor Text",html_decode(features["flavor_text"])) as message + if(msg != null) + msg = copytext(msg, 1, MAX_MESSAGE_LEN) + msg = html_encode(msg) + features["flavor_text"] = msg + + if("metadata") + var/new_metadata = input(user, "Enter any information you'd like others to see, such as Roleplay-preferences:", "Game Preference" , metadata) as message|null + if(new_metadata) + metadata = sanitize(copytext(new_metadata,1,MAX_MESSAGE_LEN)) + + if("hair") + var/new_hair = input(user, "Choose your character's hair colour:", "Character Preference") as null|color + if(new_hair) + hair_color = sanitize_hexcolor(new_hair) + + + if("hair_style") + var/new_hair_style + if(gender == MALE) + new_hair_style = input(user, "Choose your character's hair style:", "Character Preference") as null|anything in GLOB.hair_styles_male_list + else + new_hair_style = input(user, "Choose your character's hair style:", "Character Preference") as null|anything in GLOB.hair_styles_female_list + if(new_hair_style) + hair_style = new_hair_style + + if("next_hair_style") + if (gender == MALE) + hair_style = next_list_item(hair_style, GLOB.hair_styles_male_list) + else + hair_style = next_list_item(hair_style, GLOB.hair_styles_female_list) + + if("previous_hair_style") + if (gender == MALE) + hair_style = previous_list_item(hair_style, GLOB.hair_styles_male_list) + else + hair_style = previous_list_item(hair_style, GLOB.hair_styles_female_list) + + if("facial") + var/new_facial = input(user, "Choose your character's facial-hair colour:", "Character Preference") as null|color + if(new_facial) + facial_hair_color = sanitize_hexcolor(new_facial) + + if("facial_hair_style") + var/new_facial_hair_style + if(gender == MALE) + new_facial_hair_style = input(user, "Choose your character's facial-hair style:", "Character Preference") as null|anything in GLOB.facial_hair_styles_male_list + else + new_facial_hair_style = input(user, "Choose your character's facial-hair style:", "Character Preference") as null|anything in GLOB.facial_hair_styles_female_list + if(new_facial_hair_style) + facial_hair_style = new_facial_hair_style + + if("next_facehair_style") + if (gender == MALE) + facial_hair_style = next_list_item(facial_hair_style, GLOB.facial_hair_styles_male_list) + else + facial_hair_style = next_list_item(facial_hair_style, GLOB.facial_hair_styles_female_list) + + if("previous_facehair_style") + if (gender == MALE) + facial_hair_style = previous_list_item(facial_hair_style, GLOB.facial_hair_styles_male_list) + else + facial_hair_style = previous_list_item(facial_hair_style, GLOB.facial_hair_styles_female_list) + + if("underwear") + var/new_underwear + if(gender == MALE) + new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in GLOB.underwear_m + else + new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in GLOB.underwear_f + if(new_underwear) + underwear = new_underwear + + if("undershirt") + var/new_undershirt + if(gender == MALE) + new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in GLOB.undershirt_m + else + new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in GLOB.undershirt_f + if(new_undershirt) + undershirt = new_undershirt + + if("socks") + var/new_socks + new_socks = input(user, "Choose your character's socks:", "Character Preference") as null|anything in GLOB.socks_list + if(new_socks) + socks = new_socks + + if("eyes") + var/new_eyes = input(user, "Choose your character's eye colour:", "Character Preference") as color|null + if(new_eyes) + eye_color = sanitize_hexcolor(new_eyes) + + if("species") + + var/result = input(user, "Select a species", "Species Selection") as null|anything in GLOB.roundstart_species + + if(result) + var/newtype = GLOB.roundstart_species[result] + pref_species = new newtype() + //Now that we changed our species, we must verify that the mutant colour is still allowed. + var/temp_hsv = RGBtoHSV(features["mcolor"]) + if(features["mcolor"] == "#000" || (!(MUTCOLORS_PARTSONLY in pref_species.species_traits) && ReadHSV(temp_hsv)[3] < ReadHSV("#202020")[3])) + features["mcolor"] = pref_species.default_color + if(features["mcolor2"] == "#000" || (!(MUTCOLORS_PARTSONLY in pref_species.species_traits) && ReadHSV(temp_hsv)[3] < ReadHSV("#202020")[3])) + features["mcolor2"] = pref_species.default_color + if(features["mcolor3"] == "#000" || (!(MUTCOLORS_PARTSONLY in pref_species.species_traits) && ReadHSV(temp_hsv)[3] < ReadHSV("#202020")[3])) + features["mcolor3"] = pref_species.default_color + + if("mutant_color") + var/new_mutantcolor = input(user, "Choose your character's primary alien/mutant color:", "Character Preference") as color|null + if(new_mutantcolor) + var/temp_hsv = RGBtoHSV(new_mutantcolor) + if(new_mutantcolor == "#000000") + features["mcolor"] = pref_species.default_color + else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) // mutantcolors must be bright, but only if they affect the skin + features["mcolor"] = sanitize_hexcolor(new_mutantcolor) + else + to_chat(user, "Invalid color. Your color is not bright enough.") + + if("mutant_color2") + var/new_mutantcolor = input(user, "Choose your character's secondary alien/mutant color:", "Character Preference") as color|null + if(new_mutantcolor) + var/temp_hsv = RGBtoHSV(new_mutantcolor) + if(new_mutantcolor == "#000000") + features["mcolor2"] = pref_species.default_color + else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) // mutantcolors must be bright, but only if they affect the skin + features["mcolor2"] = sanitize_hexcolor(new_mutantcolor) + else + to_chat(user, "Invalid color. Your color is not bright enough.") + + if("mutant_color3") + var/new_mutantcolor = input(user, "Choose your character's tertiary alien/mutant color:", "Character Preference") as color|null + if(new_mutantcolor) + var/temp_hsv = RGBtoHSV(new_mutantcolor) + if(new_mutantcolor == "#000000") + features["mcolor3"] = pref_species.default_color + else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) // mutantcolors must be bright, but only if they affect the skin + features["mcolor3"] = sanitize_hexcolor(new_mutantcolor) + else + to_chat(user, "Invalid color. Your color is not bright enough.") + + if("tail_lizard") + var/new_tail + new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in GLOB.tails_list_lizard + if(new_tail) + features["tail_lizard"] = new_tail + if(new_tail != "None") + features["taur"] = "None" + + if("tail_human") + var/new_tail + new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in GLOB.tails_list_human + if(new_tail) + features["tail_human"] = new_tail + if(new_tail != "None") + features["taur"] = "None" + if("mam_tail") + var/new_tail + new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in GLOB.mam_tails_list + if(new_tail) + features["mam_tail"] = new_tail + if(new_tail != "None") + features["taur"] = "None" + + if("taur") + var/new_taur + new_taur = input(user, "Choose your character's tauric body:", "Character Preference") as null|anything in GLOB.taur_list + if(new_taur) + features["taur"] = new_taur + if(new_taur != "None") + features["mam_tail"] = "None" + features["xenotail"] = "None" + +/* Doesn't exist yet. will include facial overlays to mimic 5th port species heads. + if("mam_snout") + var/new_snout + new_snout = input(user, "Choose your character's snout:", "Character Preference") as null|anything in GLOB.mam_snouts_list + if(new_snout) + features["snout"] = new_snout +*/ + + if("snout") + var/new_snout + new_snout = input(user, "Choose your character's snout:", "Character Preference") as null|anything in GLOB.snouts_list + if(new_snout) + features["snout"] = new_snout + + if("horns") + var/new_horns + new_horns = input(user, "Choose your character's horns:", "Character Preference") as null|anything in GLOB.horns_list + if(new_horns) + features["horns"] = new_horns + + if("mam_ears") + var/new_ears + new_ears = input(user, "Choose your character's ears:", "Character Preference") as null|anything in GLOB.mam_ears_list + if(new_ears) + features["mam_ears"] = new_ears + + if("ears") + var/new_ears + new_ears = input(user, "Choose your character's ears:", "Character Preference") as null|anything in GLOB.ears_list + if(new_ears) + features["ears"] = new_ears + + if("wings") + var/new_wings + new_wings = input(user, "Choose your character's wings:", "Character Preference") as null|anything in GLOB.r_wings_list + if(new_wings) + features["wings"] = new_wings + + if("frills") + var/new_frills + new_frills = input(user, "Choose your character's frills:", "Character Preference") as null|anything in GLOB.frills_list + if(new_frills) + features["frills"] = new_frills + + if("spines") + var/new_spines + new_spines = input(user, "Choose your character's spines:", "Character Preference") as null|anything in GLOB.spines_list + if(new_spines) + features["spines"] = new_spines + + if("body_markings") + var/new_body_markings + new_body_markings = input(user, "Choose your character's body markings:", "Character Preference") as null|anything in GLOB.body_markings_list + if(new_body_markings) + features["body_markings"] = new_body_markings + + if("mam_body_markings") + var/new_mam_body_markings + new_mam_body_markings = input(user, "Choose your character's body markings:", "Character Preference") as null|anything in GLOB.mam_body_markings_list + if(new_mam_body_markings) + features["mam_body_markings"] = new_mam_body_markings + + //Xeno Bodyparts + if("xenohead")//Head or caste type + var/new_head + new_head = input(user, "Choose your character's caste:", "Character Preference") as null|anything in GLOB.xeno_head_list + if(new_head) + features["xenohead"] = new_head + + if("xenotail")//Currently one one type, more maybe later if someone sprites them. Might include animated variants in the future. + var/new_tail + new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in GLOB.xeno_tail_list + if(new_tail) + features["xenotail"] = new_tail + + if("xenodorsal") + var/new_dors + new_dors = input(user, "Choose your character's dorsal tube type:", "Character Preference") as null|anything in GLOB.xeno_dorsal_list + if(new_dors) + features["xenodorsal"] = new_dors + + if("legs") + var/new_legs + new_legs = input(user, "Choose your character's legs:", "Character Preference") as null|anything in GLOB.legs_list + if(new_legs) + features["legs"] = new_legs + + if("s_tone") + var/new_s_tone = input(user, "Choose your character's skin-tone:", "Character Preference") as null|anything in GLOB.skin_tones + if(new_s_tone) + skin_tone = new_s_tone + + if("ooccolor") + var/new_ooccolor = input(user, "Choose your OOC colour:", "Game Preference") as color|null + if(new_ooccolor) + ooccolor = sanitize_ooccolor(new_ooccolor) + + if("bag") + var/new_backbag = input(user, "Choose your character's style of bag:", "Character Preference") as null|anything in GLOB.backbaglist + if(new_backbag) + backbag = new_backbag + + if("uplink_loc") + var/new_loc = input(user, "Choose your character's traitor uplink spawn location:", "Character Preference") as null|anything in GLOB.uplink_spawn_loc_list + if(new_loc) + uplink_spawn_loc = new_loc + + if("clown_name") + var/new_clown_name = reject_bad_name( input(user, "Choose your character's clown name:", "Character Preference") as text|null ) + if(new_clown_name) + custom_names["clown"] = new_clown_name + else + to_chat(user, "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .") + + if("mime_name") + var/new_mime_name = reject_bad_name( input(user, "Choose your character's mime name:", "Character Preference") as text|null ) + if(new_mime_name) + custom_names["mime"] = new_mime_name + else + to_chat(user, "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .") + + if("ai_name") + var/new_ai_name = reject_bad_name( input(user, "Choose your character's AI name:", "Character Preference") as text|null, 1 ) + if(new_ai_name) + custom_names["ai"] = new_ai_name + else + to_chat(user, "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, 0-9, -, ' and .") + + if("cyborg_name") + var/new_cyborg_name = reject_bad_name( input(user, "Choose your character's cyborg name:", "Character Preference") as text|null, 1 ) + if(new_cyborg_name) + custom_names["cyborg"] = new_cyborg_name + else + to_chat(user, "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, 0-9, -, ' and .") + + if("religion_name") + var/new_religion_name = reject_bad_name( input(user, "Choose your character's religion:", "Character Preference") as text|null ) + if(new_religion_name) + custom_names["religion"] = new_religion_name + else + to_chat(user, "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .") + + if("deity_name") + var/new_deity_name = reject_bad_name( input(user, "Choose your character's deity:", "Character Preference") as text|null ) + if(new_deity_name) + custom_names["deity"] = new_deity_name + else + to_chat(user, "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .") + + if("sec_dept") + var/department = input(user, "Choose your prefered security department:", "Security Departments") as null|anything in GLOB.security_depts_prefs + if(department) + prefered_security_department = department + + if ("preferred_map") + var/maplist = list() + var/default = "Default" + if (config.defaultmap) + default += " ([config.defaultmap.map_name])" + for (var/M in config.maplist) + var/datum/map_config/VM = config.maplist[M] + var/friendlyname = "[VM.map_name] " + if (VM.voteweight <= 0) + friendlyname += " (disabled)" + maplist[friendlyname] = VM.map_name + maplist[default] = null + var/pickedmap = input(user, "Choose your preferred map. This will be used to help weight random map selection.", "Character Preference") as null|anything in maplist + if (pickedmap) + preferred_map = maplist[pickedmap] + + if ("clientfps") + var/version_message + if (user.client && user.client.byond_version < 511) + version_message = "\nYou need to be using byond version 511 or later to take advantage of this feature, your version of [user.client.byond_version] is too low" + if (world.byond_version < 511) + version_message += "\nThis server does not currently support client side fps. You can set now for when it does." + var/desiredfps = input(user, "Choose your desired fps.[version_message]\n(0 = synced with server tick rate (currently:[world.fps]))", "Character Preference", clientfps) as null|num + if (!isnull(desiredfps)) + clientfps = desiredfps + if (world.byond_version >= 511 && user.client && user.client.byond_version >= 511) + user.client.vars["fps"] = clientfps + if("ui") + var/pickedui = input(user, "Choose your UI style.", "Character Preference") as null|anything in list("Midnight", "Plasmafire", "Retro", "Slimecore", "Operative", "Clockwork") + if(pickedui) + UI_style = pickedui + + //citadel code + if("cock_color") + var/new_cockcolor = input(user, "Penis color:", "Character Preference") as color|null + if(new_cockcolor) + var/temp_hsv = RGBtoHSV(new_cockcolor) + if(new_cockcolor == "#000000") + features["cock_color"] = pref_species.default_color + else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) + features["cock_color"] = sanitize_hexcolor(new_cockcolor) + else + user << "Invalid color. Your color is not bright enough." + + if("cock_length") + var/new_length = input(user, "Penis length in inches:\n([COCK_SIZE_MIN]-[COCK_SIZE_MAX])", "Character Preference") as num|null + if(new_length) + features["cock_length"] = max(min( round(text2num(new_length)), COCK_SIZE_MAX),COCK_SIZE_MIN) + + if("cock_shape") + var/new_shape + new_shape = input(user, "Penis shape:", "Character Preference") as null|anything in GLOB.cock_shapes_list + if(new_shape) + features["cock_shape"] = new_shape + + if("balls_color") + var/new_ballscolor = input(user, "Testicle Color:", "Character Preference") as color|null + if(new_ballscolor) + var/temp_hsv = RGBtoHSV(new_ballscolor) + if(new_ballscolor == "#000000") + features["balls_color"] = pref_species.default_color + else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) + features["balls_color"] = sanitize_hexcolor(new_ballscolor) + else + user << "Invalid color. Your color is not bright enough." + + if("egg_size") + var/new_size + var/list/egg_sizes = list(1,2,3) + new_size = input(user, "Egg Diameter(inches):", "Egg Size") as null|anything in egg_sizes + if(new_size) + features["eggsack_egg_size"] = new_size + + if("egg_color") + var/new_egg_color = input(user, "Egg Color:", "Character Preference") as color|null + if(new_egg_color) + var/temp_hsv = RGBtoHSV(new_egg_color) + if(ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) + features["eggsack_egg_color"] = sanitize_hexcolor(new_egg_color) + else + user << "Invalid color. Your color is not bright enough." + if("breasts_size") + var/new_size + new_size = input(user, "Breast Size", "Character Preference") as null|anything in GLOB.breasts_size_list + if(new_size) + features["breasts_size"] = new_size + + if("breasts_shape") + var/new_shape + new_shape = input(user, "Breast Shape", "Character Preference") as null|anything in GLOB.breasts_shapes_list + if(new_shape) + features["breasts_shape"] = new_shape + + if("breasts_color") + var/new_breasts_color = input(user, "Breast Color:", "Character Preference") as color|null + if(new_breasts_color) + var/temp_hsv = RGBtoHSV(new_breasts_color) + if(new_breasts_color == "#000000") + features["breasts_color"] = pref_species.default_color + else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) + features["breasts_color"] = sanitize_hexcolor(new_breasts_color) + else + user << "Invalid color. Your color is not bright enough." + if("vag_shape") + var/new_shape + new_shape = input(user, "Vagina Type", "Character Preference") as null|anything in GLOB.vagina_shapes_list + if(new_shape) + features["vag_shape"] = new_shape + if("vag_color") + var/new_vagcolor = input(user, "Vagina color:", "Character Preference") as color|null + if(new_vagcolor) + var/temp_hsv = RGBtoHSV(new_vagcolor) + if(new_vagcolor == "#000000") + features["vag_color"] = pref_species.default_color + else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) + features["vag_color"] = sanitize_hexcolor(new_vagcolor) + else + user << "Invalid color. Your color is not bright enough." + + else + switch(href_list["preference"]) + + //citadel code + if("genital_colour") + switch(features["genitals_use_skintone"]) + if(TRUE) + features["genitals_use_skintone"] = FALSE + if(FALSE) + features["genitals_use_skintone"] = TRUE + else + features["genitals_use_skintone"] = FALSE + if("arousable") + switch(arousable) + if(TRUE) + arousable = FALSE + if(FALSE) + arousable = TRUE + else//failsafe + arousable = FALSE + if("has_cock") + switch(features["has_cock"]) + if(TRUE) + features["has_cock"] = FALSE + if(FALSE) + features["has_cock"] = TRUE + features["has_ovi"] = FALSE + features["has_eggsack"] = FALSE + else + features["has_cock"] = FALSE + features["has_ovi"] = FALSE + if("has_balls") + switch(features["has_balls"]) + if(TRUE) + features["has_balls"] = FALSE + if(FALSE) + features["has_balls"] = TRUE + features["has_eggsack"] = FALSE + else + features["has_balls"] = FALSE + features["has_eggsack"] = FALSE + + if("has_ovi") + switch(features["has_ovi"]) + if(TRUE) + features["has_ovi"] = FALSE + if(FALSE) + features["has_ovi"] = TRUE + features["has_cock"] = FALSE + features["has_balls"] = FALSE + else + features["has_ovi"] = FALSE + features["has_cock"] = FALSE + + if("has_eggsack") + switch(features["has_eggsack"]) + if(TRUE) + features["has_eggsack"] = FALSE + if(FALSE) + features["has_eggsack"] = TRUE + features["has_balls"] = FALSE + else + features["has_eggsack"] = FALSE + features["has_balls"] = FALSE + + if("balls_internal") + switch(features["balls_internal"]) + if(TRUE) + features["balls_internal"] = FALSE + if(FALSE) + features["balls_internal"] = TRUE + features["eggsack_internal"] = FALSE + else + features["balls_internal"] = FALSE + features["eggsack_internal"] = FALSE + + if("eggsack_internal") + switch(features["eggsack_internal"]) + if(TRUE) + features["eggsack_internal"] = FALSE + if(FALSE) + features["eggsack_internal"] = TRUE + features["balls_internal"] = FALSE + else + features["eggsack_internal"] = FALSE + features["balls_internal"] = FALSE + + if("has_breasts") + switch(features["has_breasts"]) + if(TRUE) + features["has_breasts"] = FALSE + if(FALSE) + features["has_breasts"] = TRUE + else + features["has_breasts"] = FALSE + if("has_vag") + switch(features["has_vag"]) + if(TRUE) + features["has_vag"] = FALSE + if(FALSE) + features["has_vag"] = TRUE + else + features["has_vag"] = FALSE + if("has_womb") + switch(features["has_womb"]) + if(TRUE) + features["has_womb"] = FALSE + if(FALSE) + features["has_womb"] = TRUE + else + features["has_womb"] = FALSE + if("exhibitionist") + switch(features["exhibitionist"]) + if(TRUE) + features["exhibitionist"] = FALSE + if(FALSE) + features["exhibitionist"] = TRUE + else + features["exhibitionist"] = FALSE + + if("publicity") + if(unlock_content) + toggles ^= MEMBER_PUBLIC + if("gender") + if(gender == MALE) + gender = FEMALE + else + gender = MALE + underwear = "Nude" + undershirt = "Nude" + socks = "Nude" + facial_hair_style = "Shaved" + hair_style = "Bald" + + if("hotkeys") + hotkeys = !hotkeys + if("action_buttons") + buttons_locked = !buttons_locked + if("tgui_fancy") + tgui_fancy = !tgui_fancy + if("tgui_lock") + tgui_lock = !tgui_lock + if("winflash") + windowflashing = !windowflashing + if("hear_adminhelps") + toggles ^= SOUND_ADMINHELP + if("announce_login") + toggles ^= ANNOUNCE_LOGIN + + if("be_special") + var/be_special_type = href_list["be_special_type"] + if(be_special_type in be_special) + be_special -= be_special_type + else + be_special += be_special_type + + if("name") + be_random_name = !be_random_name + + if("all") + be_random_body = !be_random_body + + if("hear_midis") + toggles ^= SOUND_MIDI + + if("lobby_music") + toggles ^= SOUND_LOBBY + if((toggles & SOUND_LOBBY) && user.client) + user.client.playtitlemusic() + else + user.stop_sound_channel(CHANNEL_LOBBYMUSIC) + + if("ghost_ears") + chat_toggles ^= CHAT_GHOSTEARS + + if("ghost_sight") + chat_toggles ^= CHAT_GHOSTSIGHT + + if("ghost_whispers") + chat_toggles ^= CHAT_GHOSTWHISPER + + if("ghost_radio") + chat_toggles ^= CHAT_GHOSTRADIO + + if("ghost_pda") + chat_toggles ^= CHAT_GHOSTPDA + + if("pull_requests") + chat_toggles ^= CHAT_PULLR + + if("allow_midround_antag") + toggles ^= MIDROUND_ANTAG + + if("parallaxup") + parallax = Wrap(parallax + 1, PARALLAX_INSANE, PARALLAX_DISABLE + 1) + if (parent && parent.mob && parent.mob.hud_used) + parent.mob.hud_used.update_parallax_pref(parent.mob) + + if("parallaxdown") + parallax = Wrap(parallax - 1, PARALLAX_INSANE, PARALLAX_DISABLE + 1) + if (parent && parent.mob && parent.mob.hud_used) + parent.mob.hud_used.update_parallax_pref(parent.mob) + + if("save") + save_preferences() + save_character() + + if("load") + load_preferences() + load_character() + attempt_vr(parent.prefs_vr,"load_vore","") + + if("changeslot") + attempt_vr(parent.prefs_vr,"load_vore","") + if(!load_character(text2num(href_list["num"]))) + random_character() + real_name = random_unique_name(gender) + save_character() + + if("tab") + if (href_list["tab"]) + current_tab = text2num(href_list["tab"]) + + ShowChoices(user) + return 1 + +/datum/preferences/proc/copy_to(mob/living/carbon/human/character, icon_updates = 1) + if(be_random_name) + real_name = pref_species.random_name(gender) + + if(be_random_body) + random_character(gender) + + if(config.humans_need_surnames) + var/firstspace = findtext(real_name, " ") + var/name_length = length(real_name) + if(!firstspace) //we need a surname + real_name += " [pick(GLOB.last_names)]" + else if(firstspace == name_length) + real_name += "[pick(GLOB.last_names)]" + + character.real_name = real_name + character.name = character.real_name + + character.gender = gender + character.age = age + + character.eye_color = eye_color + var/obj/item/organ/eyes/organ_eyes = character.getorgan(/obj/item/organ/eyes) + if(organ_eyes) + if(!initial(organ_eyes.eye_color)) + organ_eyes.eye_color = eye_color + organ_eyes.old_eye_color = eye_color + character.hair_color = hair_color + character.facial_hair_color = facial_hair_color + + character.skin_tone = skin_tone + character.hair_style = hair_style + character.facial_hair_style = facial_hair_style + character.underwear = underwear + character.undershirt = undershirt + character.socks = socks + + character.backbag = backbag + + character.dna.features = features.Copy() //Flavor text is now a DNA feature + character.dna.real_name = character.real_name + var/datum/species/chosen_species + if(pref_species != /datum/species/human && config.mutant_races) + chosen_species = pref_species.type + else + chosen_species = /datum/species/human + character.set_species(chosen_species, icon_update=0) + + //citadel code + character.give_genitals() + character.flavor_text = features["flavor_text"] //Let's update their flavor_text at least initially + character.canbearoused = arousable + + if(icon_updates) + character.update_body() + character.update_hair() + character.update_body_parts() + character.update_genitals() diff --git a/code/modules/client/preferences.dm.rej b/code/modules/client/preferences.dm.rej new file mode 100644 index 0000000000..02e6ad2d76 --- /dev/null +++ b/code/modules/client/preferences.dm.rej @@ -0,0 +1,14 @@ +diff a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm (rejected hunks) +@@ -130,12 +130,6 @@ GLOBAL_LIST_EMPTY(preferences_datums) + menuoptions = list() + return + +-/datum/preferences/vv_edit_var(var_name, var_value) +- var/static/list/banned_edits = list("exp") +- if(var_name in banned_edits) +- return FALSE +- return ..() +- + /datum/preferences/proc/ShowChoices(mob/user) + if(!user || !user.client) + return diff --git a/code/modules/client/preferences_toggles.dm b/code/modules/client/preferences_toggles.dm index 1d04964a8b..adf775f0e8 100644 --- a/code/modules/client/preferences_toggles.dm +++ b/code/modules/client/preferences_toggles.dm @@ -144,6 +144,9 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Sound, togglemidis)() else to_chat(usr, "You will no longer hear sounds uploaded by admins") usr.stop_sound_channel(CHANNEL_ADMIN) + var/client/C = usr.client + if(C && C.chatOutput && !C.chatOutput.broken && C.chatOutput.loaded) + C.chatOutput.sendMusic(" ") SSblackbox.add_details("preferences_verb","Toggle Hearing Midis|[usr.client.prefs.toggles & SOUND_MIDI]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /datum/verbs/menu/Settings/Sound/togglemidis/Get_checked(client/C) return C.prefs.toggles & SOUND_MIDI @@ -230,6 +233,9 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Sound, toggleprayersounds)() set category = "Preferences" set desc = "Stop Current Sounds" SEND_SOUND(usr, sound(null)) + var/client/C = usr.client + if(C && C.chatOutput && !C.chatOutput.broken && C.chatOutput.loaded) + C.chatOutput.sendMusic(" ") SSblackbox.add_details("preferences_verb","Stop Self Sounds") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 88ec800c00..1447d03ef7 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -7,7 +7,7 @@ var/flash_protect = 0 //What level of bright light protection item has. 1 = Flashers, Flashes, & Flashbangs | 2 = Welding | -1 = OH GOD WELDING BURNT OUT MY RETINAS var/tint = 0 //Sets the item's level of visual impairment tint, normally set to the same as flash_protect var/up = 0 //but separated to allow items to protect but not impair vision, like space helmets - var/visor_flags = 0 //flags_1 that are added/removed when an item is adjusted up/down + var/visor_flags = 0 //flags that are added/removed when an item is adjusted up/down var/visor_flags_inv = 0 //same as visor_flags, but for flags_inv var/visor_flags_cover = 0 //same as above, but for flags_cover //what to toggle when toggled with weldingvisortoggle() @@ -193,7 +193,6 @@ var/invis_view = SEE_INVISIBLE_LIVING var/invis_override = 0 //Override to allow glasses to set higher than normal see_invis var/lighting_alpha - var/emagged = FALSE var/list/icon/current = list() //the current hud icons var/vision_correction = 0 //does wearing these glasses correct some of our vision defects? strip_delay = 20 @@ -475,6 +474,8 @@ BLIND // can't see anything permeability_coefficient = 0.01 armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50, fire = 80, acid = 70) flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR + dynamic_hair_suffix = "" + dynamic_fhair_suffix = "" cold_protection = HEAD min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT heat_protection = HEAD @@ -783,7 +784,7 @@ BLIND // can't see anything A.UpdateButtonIcon() return TRUE -/obj/item/clothing/proc/visor_toggling() //handles all the actual toggling of flags_1 +/obj/item/clothing/proc/visor_toggling() //handles all the actual toggling of flags up = !up flags_1 ^= visor_flags flags_inv ^= visor_flags_inv diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index d15c7dd5f4..5cbbd1d3d5 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -125,17 +125,18 @@ desc = "A pair of kitty ears. Meow!" icon_state = "kitty" color = "#999999" - dynamic_hair_suffix = "" + dynamic_hair_suffix = "" dog_fashion = /datum/dog_fashion/head/kitty -/obj/item/clothing/head/kitty/equipped(mob/user, slot) - if(user && slot == slot_head) +/obj/item/clothing/head/kitty/equipped(mob/living/carbon/human/user, slot) + if(ishuman(user) && slot == slot_head) update_icon(user) + user.update_inv_head() //Color might have been changed by update_icon. ..() /obj/item/clothing/head/kitty/update_icon(mob/living/carbon/human/user) - if(istype(user)) + if(ishuman(user)) add_atom_colour("#[user.hair_color]", FIXED_COLOUR_PRIORITY) /obj/item/clothing/head/kitty/genuine @@ -151,7 +152,7 @@ flags_inv = 0 armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0) brightness_on = 1 //luminosity when on - dynamic_hair_suffix = "" + dynamic_hair_suffix = "" dog_fashion = /datum/dog_fashion/head/reindeer diff --git a/code/modules/clothing/spacesuits/miscellaneous.dm b/code/modules/clothing/spacesuits/miscellaneous.dm index 404f931490..c5af37506c 100644 --- a/code/modules/clothing/spacesuits/miscellaneous.dm +++ b/code/modules/clothing/spacesuits/miscellaneous.dm @@ -57,6 +57,8 @@ Contains: name = "officer's beret" desc = "An armored beret commonly used by special operations officers. Uses advanced force field technology to protect the head from space." icon_state = "beret_badge" + dynamic_hair_suffix = "+generic" + dynamic_fhair_suffix = "+generic" flags_1 = STOPSPRESSUREDMAGE_1 flags_inv = 0 armor = list(melee = 80, bullet = 80, laser = 50, energy = 50, bomb = 100, bio = 100, rad = 100, fire = 100, acid = 100) diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm index 9e1f1de829..fe6fe67b83 100644 --- a/code/modules/clothing/suits/miscellaneous.dm +++ b/code/modules/clothing/suits/miscellaneous.dm @@ -280,6 +280,7 @@ body_parts_covered = HEAD flags_1 = THICKMATERIAL_1 flags_inv = HIDEHAIR|HIDEEARS + dynamic_hair_suffix = "" /obj/item/clothing/suit/hooded/bloated_human //OH MY GOD WHAT HAVE YOU DONE!?!?!? name = "bloated human suit" diff --git a/code/modules/crafting/recipes.dm b/code/modules/crafting/recipes.dm index 6271d2caf5..1f12e671ec 100644 --- a/code/modules/crafting/recipes.dm +++ b/code/modules/crafting/recipes.dm @@ -555,7 +555,10 @@ name = "Pressure Plate" result = /obj/item/device/pressure_plate time = 5 - reqs = list(/obj/item/stack/sheet/plasteel = 1, /obj/item/stack/tile/plasteel = 1, /obj/item/stack/cable_coil = 2) + reqs = list(/obj/item/stack/sheet/metal = 1, + /obj/item/stack/tile/plasteel = 1, + /obj/item/stack/cable_coil = 2, + /obj/item/device/assembly/igniter = 1) category = CAT_MISC diff --git a/code/modules/events/ion_storm.dm b/code/modules/events/ion_storm.dm index 4f58090ca2..67eb43a889 100644 --- a/code/modules/events/ion_storm.dm +++ b/code/modules/events/ion_storm.dm @@ -34,7 +34,7 @@ //AI laws for(var/mob/living/silicon/ai/M in GLOB.living_mob_list) M.laws_sanity_check() - if(M.stat != 2 && M.see_in_dark != 0) + if(M.stat != DEAD && M.see_in_dark != 0) if(prob(replaceLawsetChance)) M.laws.pick_weighted_lawset() diff --git a/code/modules/events/radiation_storm.dm b/code/modules/events/radiation_storm.dm index 5f461933ad..e4f2b6b1a7 100644 --- a/code/modules/events/radiation_storm.dm +++ b/code/modules/events/radiation_storm.dm @@ -16,4 +16,5 @@ //sound not longer matches the text, but an audible warning is probably good /datum/round_event/radiation_storm/start() - SSweather.run_weather("radiation storm",ZLEVEL_STATION) \ No newline at end of file + SSweather.run_weather("radiation storm",ZLEVEL_STATION) + make_maint_all_access() diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index 0bac8e36ff..ca27d00c19 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -759,7 +759,7 @@ GLOBAL_LIST_INIT(hallucinations_major, list( people += H if(person) //Basic talk var/image/speech_overlay = image('icons/mob/talk.dmi', person, "default0", layer = ABOVE_MOB_LAYER) - var/message = target.compose_message(person,understood_language,pick(speak_messages),null,person.get_spans()) + var/message = target.compose_message(person,understood_language,pick(speak_messages),null,person.get_spans(),face_name = TRUE) feedback_details += "Type: Talk, Source: [person.real_name], Message: [message]" to_chat(target, message) if(target.client) @@ -771,7 +771,7 @@ GLOBAL_LIST_INIT(hallucinations_major, list( for(var/mob/living/carbon/human/H in GLOB.living_mob_list) humans += H person = pick(humans) - var/message = target.compose_message(person,understood_language,pick(radio_messages),"1459",person.get_spans()) + var/message = target.compose_message(person,understood_language,pick(radio_messages),"1459",person.get_spans(),face_name = TRUE) feedback_details += "Type: Radio, Source: [person.real_name], Message: [message]" to_chat(target, message) qdel(src) diff --git a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm index d9f70160a4..978e8af62d 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm @@ -51,6 +51,9 @@ /obj/machinery/gibber/container_resist(mob/living/user) go_out() +/obj/machinery/gibber/relaymove(mob/living/user) + go_out() + /obj/machinery/gibber/attack_hand(mob/user) if(stat & (NOPOWER|BROKEN)) return @@ -225,4 +228,4 @@ if(M.loc == input_plate) M.forceMove(src) - M.gib() \ No newline at end of file + M.gib() diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm index e996429939..53b899f696 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm @@ -142,69 +142,55 @@ user.set_machine(src) interact(user) -/******************* -* SmartFridge Menu -********************/ -/obj/machinery/smartfridge/interact(mob/user) - if(stat) - return FALSE - var/dat = "Select an item:
    " +/obj/machinery/smartfridge/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state) + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "smartvend", name, 440, 550, master_ui, state) + ui.open() - if (contents.len == 0) - dat += "No product loaded!" - else - var/listofitems = list() - for (var/atom/movable/O in contents) - if (listofitems[O.name]) - listofitems[O.name]++ - else - listofitems[O.name] = 1 - sortList(listofitems) +/obj/machinery/smartfridge/ui_data(mob/user) + . = list() - for (var/O in listofitems) - if(listofitems[O] <= 0) - continue - var/N = listofitems[O] - var/itemName = url_encode(O) - dat += "[capitalize(O)]:" - dat += " [N] " - dat += "Vend " - if(N > 5) - dat += "(x5)" - if(N > 10) - dat += "(x10)" - if(N > 25) - dat += "(x25)" - if(N > 1) - dat += "(All)" + var/listofitems = list() + for (var/I in src) + var/atom/movable/O = I + if (listofitems[O.name]) + listofitems[O.name]["amount"]++ + else + listofitems[O.name] = list("name" = O.name, "type" = O.type, "amount" = 1) + sortList(listofitems) - dat += "
    " + .["contents"] = listofitems + .["name"] = name + .["isdryer"] = FALSE - dat += "
    " - user << browse("[src] supplies[dat]", "window=smartfridge") - onclose(user, "smartfridge") - return dat -/obj/machinery/smartfridge/Topic(var/href, var/list/href_list) - if(..()) +/obj/machinery/smartfridge/ui_act(action, params) + . = ..() + if(.) return - usr.set_machine(src) + switch(action) + if("Release") + var/desired = 0 - var/N = href_list["vend"] - var/amount = text2num(href_list["amount"]) + if (params["amount"]) + desired = text2num(params["amount"]) + else + desired = input("How many items?", "How many items would you like to take out?", 1) as null|num - var/i = amount - for(var/obj/O in contents) - if(i <= 0) - break - if(O.name == N) - O.loc = src.loc - i-- + if(QDELETED(src) || QDELETED(usr) || !usr.Adjacent(src)) // Sanity checkin' in case stupid stuff happens while we wait for input() + return FALSE - - updateUsrDialog() + for(var/obj/item/O in src) + if(desired <= 0) + break + if(O.name == params["name"]) + O.forceMove(drop_location()) + desired-- + return TRUE + return FALSE // ---------------------------- @@ -240,20 +226,35 @@ /obj/machinery/smartfridge/drying_rack/default_deconstruction_crowbar(obj/item/crowbar/C, ignore_panel = 1) ..() -/obj/machinery/smartfridge/drying_rack/interact(mob/user) - var/dat = ..() - if(dat) - dat += "
    " - dat += "Toggle Drying " - user << browse("[src] supplies[dat]", "window=smartfridge") - onclose(user, "smartfridge") +/obj/machinery/smartfridge/drying_rack/ui_data(mob/user) + . = list() -/obj/machinery/smartfridge/drying_rack/Topic(href, list/href_list) - ..() - if(href_list["dry"]) - toggle_drying(FALSE) - updateUsrDialog() - update_icon() + var/listofitems = list() + for (var/I in src) + var/atom/movable/O = I + + if (listofitems[O.name]) + listofitems[O.name]["amount"]++ + else + listofitems[O.name] = list("name" = O.name, "type" = O.type, "amount" = 1) + sortList(listofitems) + + .["contents"] = listofitems + .["name"] = name + .["isdryer"] = TRUE + .["verb"] = "Take" + .["drying"] = drying + + +/obj/machinery/smartfridge/drying_rack/ui_act(action, params) + . = ..() + if(.) + return + switch(action) + if("Dry") + toggle_drying(FALSE) + return TRUE + return FALSE /obj/machinery/smartfridge/drying_rack/power_change() if(powered() && anchored) diff --git a/code/modules/goonchat/browserOutput.dm b/code/modules/goonchat/browserOutput.dm index 85770f618a..408da4c401 100644 --- a/code/modules/goonchat/browserOutput.dm +++ b/code/modules/goonchat/browserOutput.dm @@ -13,6 +13,7 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of ic var/cookieSent = FALSE // Has the client sent a cookie for analysis var/broken = FALSE var/list/connectionHistory //Contains the connection history passed from chat cookie + var/adminMusicVolume = 100 //This is for the Play Global Sound verb /datum/chatOutput/New(client/C) owner = C @@ -79,6 +80,9 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of ic if("analyzeClientData") data = analyzeClientData(arglist(params)) + if("setMusicVolume") + data = setMusicVolume(arglist(params)) + if(data) ehjax_send(data = data) @@ -120,6 +124,16 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of ic data = json_encode(data) C << output("[data]", "[window]:ehjaxCallback") +/datum/chatOutput/proc/sendMusic(music, pitch) + var/list/music_data = list("adminMusic" = url_encode(url_encode(music))) + if(pitch) + music_data["musicRate"] = pitch + ehjax_send(data = music_data) + +/datum/chatOutput/proc/setMusicVolume(volume = "") + if(volume) + adminMusicVolume = Clamp(text2num(volume), 0, 100) + //Sends client connection details to the chat to handle and save /datum/chatOutput/proc/sendClientData() //Get dem deets diff --git a/code/modules/goonchat/browserassets/css/browserOutput.css b/code/modules/goonchat/browserassets/css/browserOutput.css index 36640db74e..fa2c5d056c 100644 --- a/code/modules/goonchat/browserassets/css/browserOutput.css +++ b/code/modules/goonchat/browserassets/css/browserOutput.css @@ -101,7 +101,7 @@ a.popt {text-decoration: none;} top: 0; right: 0; } -#options a { +#options .optionsCell { background: #ddd; height: 30px; padding: 5px 0; @@ -111,7 +111,7 @@ a.popt {text-decoration: none;} line-height: 28px; border-top: 1px solid #b4b4b4; } -#options a:hover {background: #ccc;} +#options .optionsCell:hover {background: #ccc;} #options .toggle { width: 40px; background: #ccc; @@ -121,7 +121,7 @@ a.popt {text-decoration: none;} } #options .sub {clear: both; display: none; width: 160px;} #options .sub.scroll {overflow-y: scroll;} -#options .sub a {padding: 3px 0 3px 8px; line-height: 30px; font-size: 0.9em; clear: both;} +#options .sub.optionsCell {padding: 3px 0 3px 8px; line-height: 30px; font-size: 0.9em; clear: both;} #options .sub span { display: block; line-height: 30px; @@ -136,6 +136,13 @@ a.popt {text-decoration: none;} line-height: 30px; float: right; } +#options .sub input { + position: absolute; + padding: 7px 5px; + width: 121px; + line-height: 30px; + float: left; +} #options .decreaseFont {border-top: 0;} /* POPUPS */ diff --git a/code/modules/goonchat/browserassets/html/browserOutput.html b/code/modules/goonchat/browserassets/html/browserOutput.html index f55e69ecd1..a9e30b6b51 100644 --- a/code/modules/goonchat/browserassets/html/browserOutput.html +++ b/code/modules/goonchat/browserassets/html/browserOutput.html @@ -28,17 +28,19 @@ --ms + \ No newline at end of file diff --git a/code/modules/goonchat/browserassets/js/browserOutput.js b/code/modules/goonchat/browserassets/js/browserOutput.js index c7eff15913..eccb0dd2b6 100644 --- a/code/modules/goonchat/browserassets/js/browserOutput.js +++ b/code/modules/goonchat/browserassets/js/browserOutput.js @@ -61,8 +61,17 @@ var opts = { 'clientDataLimit': 5, 'clientData': [], + //Admin music volume update + 'volumeUpdateDelay': 5000, //Time from when the volume updates to data being sent to the server + 'volumeUpdating': false, //True if volume update function set to fire + 'updatedVolume': 0, //The volume level that is sent to the server + }; +function clamp(val, min, max) { + return Math.max(min, Math.min(val, max)) +} + function outerHTML(el) { var wrap = document.createElement('div'); wrap.appendChild(el.cloneNode(true)); @@ -95,6 +104,15 @@ function linkify(text) { }); } +function byondDecode(message) { + // Basically we url_encode twice server side so we can manually read the encoded version and actually do UTF-8. + // The replace for + is because FOR SOME REASON, BYOND replaces spaces with a + instead of %20, and a plus with %2b. + // Marvelous. + message = message.replace(/\+/g, "%20"); + message = decoder(message); + return message; +} + //Actually turns the highlight term match into appropriate html function addHighlightMarkup(match) { var extra = ''; @@ -176,11 +194,7 @@ function output(message, flag) { if (flag !== 'internal') opts.lastPang = Date.now(); - // Basically we url_encode twice server side so we can manually read the encoded version and actually do UTF-8. - // The replace for + is because FOR SOME REASON, BYOND replaces spaces with a + instead of %20, and a plus with %2b. - // Marvelous. - message = message.replace(/\+/g, "%20") - message = decoder(message) + message = byondDecode(message) //The behemoth of filter-code (for Admin message filters) //Note: This is proooobably hella inefficient @@ -423,7 +437,22 @@ function ehjaxCallback(data) { var firebugEl = document.createElement('script'); firebugEl.src = 'https://getfirebug.com/firebug-lite-debug.js'; document.body.appendChild(firebugEl); - } + } else if (data.adminMusic) { + if (typeof data.adminMusic === 'string') { + var adminMusic = byondDecode(data.adminMusic); + adminMusic = adminMusic.match(/https?:\/\/\S+/) || ''; + if (data.musicRate) { + var newRate = Number(data.musicRate); + if(newRate) { + $('#adminMusic').prop('defaultPlaybackRate', newRate); + } + } else { + $('#adminMusic').prop('defaultPlaybackRate', 1.0); + } + $('#adminMusic').prop('src', adminMusic); + $('#adminMusic').trigger("play"); + } + } } } @@ -446,6 +475,13 @@ function toggleWasd(state) { opts.wasd = (state == 'on' ? true : false); } +function sendVolumeUpdate() { + opts.volumeUpdating = false; + if(opts.updatedVolume) { + runByond('?_src_=chat&proc=setMusicVolume¶m[volume]='+opts.updatedVolume); + } +} + /***************************************** * * DOM READY @@ -486,6 +522,7 @@ $(function() { 'spingDisabled': getCookie('pingdisabled'), 'shighlightTerms': getCookie('highlightterms'), 'shighlightColor': getCookie('highlightcolor'), + 'smusicVolume': getCookie('musicVolume'), }; if (savedConfig.sfontSize) { @@ -517,6 +554,14 @@ $(function() { opts.highlightColor = savedConfig.shighlightColor; internalOutput('Loaded highlight color of: '+savedConfig.shighlightColor+'', 'internal'); } + if (savedConfig.smusicVolume) { + var newVolume = clamp(savedConfig.smusicVolume, 0, 100); + $('#adminMusic').prop('volume', newVolume / 100); + $('#musicVolume').val(newVolume); + opts.updatedVolume = newVolume; + sendVolumeUpdate(); + internalOutput('Loaded music volume of: '+savedConfig.smusicVolume+'', 'internal'); + } (function() { var dataCookie = getCookie('connData'); @@ -835,6 +880,26 @@ $(function() { opts.messageCount = 0; }); + $('#musicVolumeSpan').hover(function() { + $('#musicVolumeText').addClass('hidden'); + $('#musicVolume').removeClass('hidden'); + }, function() { + $('#musicVolume').addClass('hidden'); + $('#musicVolumeText').removeClass('hidden'); + }); + + $('#musicVolume').change(function() { + var newVolume = $('#musicVolume').val(); + newVolume = clamp(newVolume, 0, 100); + $('#adminMusic').prop('volume', newVolume / 100); + setCookie('musicVolume', newVolume, 365); + opts.updatedVolume = newVolume; + if(!opts.volumeUpdating) { + setTimeout(sendVolumeUpdate, opts.volumeUpdateDelay); + opts.volumeUpdating = true; + } + }); + $('img.icon').error(iconError); diff --git a/code/modules/holodeck/items.dm b/code/modules/holodeck/items.dm index 8dfbfa7c63..86481b4c14 100644 --- a/code/modules/holodeck/items.dm +++ b/code/modules/holodeck/items.dm @@ -120,17 +120,15 @@ else ..() -/obj/structure/holohoop/CanPass(atom/movable/mover, turf/target) - if (isitem(mover) && mover.throwing) - var/obj/item/I = mover - if(istype(I, /obj/item/projectile)) - return +/obj/structure/holohoop/hitby(atom/movable/AM) + if (isitem(AM) && !istype(AM,/obj/item/projectile)) if(prob(50)) - I.forceMove(get_turf(src)) - visible_message("Swish! [I] lands in [src].") + AM.forceMove(get_turf(src)) + visible_message("Swish! [AM] lands in [src].") + return else - visible_message("[I] bounces off of [src]'s rim!") - return 0 + visible_message("[AM] bounces off of [src]'s rim!") + return ..() else return ..() diff --git a/code/modules/hydroponics/beekeeping/beebox.dm b/code/modules/hydroponics/beekeeping/beebox.dm index b01892e636..316b2298ca 100644 --- a/code/modules/hydroponics/beekeeping/beebox.dm +++ b/code/modules/hydroponics/beekeeping/beebox.dm @@ -25,7 +25,7 @@ /obj/structure/beebox name = "apiary" - desc = "Dr Miles Manners is just your average wasp-themed super hero by day, but by night he becomes DR BEES!" + desc = "Dr. Miles Manners is just your average wasp-themed super hero by day, but by night he becomes DR. BEES!" icon = 'icons/obj/hydroponics/equipment.dmi' icon_state = "beebox" anchored = TRUE @@ -45,9 +45,7 @@ /obj/structure/beebox/Destroy() STOP_PROCESSING(SSobj, src) bees.Cut() - bees = null honeycombs.Cut() - honeycombs = null queen_bee = null return ..() @@ -151,7 +149,7 @@ honey_frames += HF else to_chat(user, "There's no room for any more frames in the apiary!") - + return if(istype(I, /obj/item/wrench)) if(default_unfasten_wrench(user, I, time = 20)) return @@ -187,6 +185,9 @@ to_chat(user, "The queen bee disappeared! Disappearing bees have been in the news lately...") qdel(qb) + return + + ..() /obj/structure/beebox/attack_hand(mob/user) @@ -203,8 +204,10 @@ bees = TRUE if(bees) visible_message("[user] disturbs the bees!") + else + visible_message("[user] disturbs the [name] to no effect!") else - var/option = alert(user, "What action do you wish to perform?","Apiary","Remove a Honey Frame","Remove the Queen Bee") + var/option = alert(user, "What action do you wish to perform?","Apiary","Remove a Honey Frame","Remove the Queen Bee", "Cancel") if(!Adjacent(user)) return switch(option) @@ -244,3 +247,13 @@ QB.loc = get_turf(src) visible_message("[user] removes the queen from the apiary.") queen_bee = null + +/obj/structure/beebox/deconstruct(disassembled = TRUE) + new /obj/item/stack/sheet/mineral/wood (loc, 20) + for(var/mob/living/simple_animal/hostile/poison/bees/B in bees) + if(B.loc == src) + B.loc = get_turf(src) + for(var/obj/item/honey_frame/HF in honey_frames) + if(HF.loc == src) + HF.loc = get_turf(src) + qdel(src) \ No newline at end of file diff --git a/code/modules/hydroponics/grown/replicapod.dm b/code/modules/hydroponics/grown/replicapod.dm index 5218c29c44..3c332b950c 100644 --- a/code/modules/hydroponics/grown/replicapod.dm +++ b/code/modules/hydroponics/grown/replicapod.dm @@ -72,7 +72,7 @@ break else //If the player has ghosted from his corpse before blood was drawn, his ckey is no longer attached to the mob, so we need to match up the cloned player through the mind key for(var/mob/M in GLOB.player_list) - if(mind && M.mind && ckey(M.mind.key) == ckey(mind.key) && M.ckey && M.client && M.stat == 2 && !M.suiciding) + if(mind && M.mind && ckey(M.mind.key) == ckey(mind.key) && M.ckey && M.client && M.stat == DEAD && !M.suiciding) if(isobserver(M)) var/mob/dead/observer/O = M if(!O.can_reenter_corpse) diff --git a/code/modules/hydroponics/hydroitemdefines.dm b/code/modules/hydroponics/hydroitemdefines.dm index 35e1df3bab..3561ccd2c9 100644 --- a/code/modules/hydroponics/hydroitemdefines.dm +++ b/code/modules/hydroponics/hydroitemdefines.dm @@ -21,7 +21,9 @@ icon = 'icons/obj/hydroponics/equipment.dmi' name = "weed spray" icon_state = "weedspray" - item_state = "spray" + item_state = "spraycan" + lefthand_file = 'icons/mob/inhands/equipment/hydroponics_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/hydroponics_righthand.dmi' volume = 100 container_type = OPENCONTAINER_1 slot_flags = SLOT_BELT diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm index 4c7af3250b..52f5e4e138 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -248,7 +248,7 @@ if(istype(src, /obj/machinery/hydroponics/soil)) add_atom_colour(rgb(255, 175, 0), FIXED_COLOUR_PRIORITY) else - overlays += mutable_appearance('icons/obj/hydroponics/equipment.dmi', "gaia_blessing") + add_overlay(mutable_appearance('icons/obj/hydroponics/equipment.dmi', "gaia_blessing")) set_light(3) update_icon_hoses() @@ -915,9 +915,11 @@ name = "soil" icon = 'icons/obj/hydroponics/equipment.dmi' icon_state = "soil" + circuit = null density = FALSE use_power = NO_POWER_USE - unwrenchable = 0 + flags_1 = NODECONSTRUCT_1 + unwrenchable = FALSE /obj/machinery/hydroponics/soil/update_icon_hoses() return // Has no hoses diff --git a/code/modules/jobs/job_exp.dm b/code/modules/jobs/job_exp.dm new file mode 100644 index 0000000000..fc61fcf40b --- /dev/null +++ b/code/modules/jobs/job_exp.dm @@ -0,0 +1,279 @@ +GLOBAL_LIST_EMPTY(exp_to_update) +GLOBAL_PROTECT(exp_to_update) + + +// Procs +/datum/job/proc/required_playtime_remaining(client/C) + if(!C) + return 0 + if(!config.use_exp_tracking) + return 0 + if(!exp_requirements || !exp_type) + return 0 + if(!job_is_xp_locked(src.title)) + return 0 + if(config.use_exp_restrictions_admin_bypass && check_rights(R_ADMIN, FALSE, C.mob)) + return 0 + var/isexempt = C.prefs.db_flags & DB_FLAG_EXEMPT + if(isexempt) + return 0 + var/my_exp = C.calc_exp_type(get_exp_req_type()) + var/job_requirement = get_exp_req_amount() + if(my_exp >= job_requirement) + return 0 + else + return (job_requirement - my_exp) + +/datum/job/proc/get_exp_req_amount() + if(title in GLOB.command_positions) + if(config.use_exp_restrictions_heads_hours) + return config.use_exp_restrictions_heads_hours * 60 + return exp_requirements + +/datum/job/proc/get_exp_req_type() + if(title in GLOB.command_positions) + if(config.use_exp_restrictions_heads_department && exp_type_department) + return exp_type_department + return exp_type + +/proc/job_is_xp_locked(jobtitle) + if(!config.use_exp_restrictions_heads && jobtitle in GLOB.command_positions) + return FALSE + if(!config.use_exp_restrictions_other && !(jobtitle in GLOB.command_positions)) + return FALSE + return TRUE + +/client/proc/calc_exp_type(exptype) + var/list/explist = prefs.exp.Copy() + var/amount = 0 + var/list/typelist = GLOB.exp_jobsmap[exptype] + if(!typelist) + return -1 + for(var/job in typelist["titles"]) + if(job in explist) + amount += explist[job] + return amount + +/client/proc/get_exp_report() + if(!config.use_exp_tracking) + return "Tracking is disabled in the server configuration file." + var/list/play_records = prefs.exp + if(!play_records.len) + set_exp_from_db() + play_records = prefs.exp + if(!play_records.len) + return "[key] has no records." + var/return_text = list() + return_text += "
      " + var/list/exp_data = list() + for(var/category in SSjob.name_occupations) + if(play_records[category]) + exp_data[category] = text2num(play_records[category]) + else + exp_data[category] = 0 + for(var/category in GLOB.exp_specialmap) + if(play_records[category]) + exp_data[category] = text2num(play_records[category]) + else + exp_data[category] = 0 + if(prefs.db_flags & DB_FLAG_EXEMPT) + return_text += "
    • Exempt (all jobs auto-unlocked)
    • " + + for(var/dep in exp_data) + if(exp_data[dep] > 0) + if(exp_data[EXP_TYPE_LIVING] > 0) + var/percentage = num2text(round(exp_data[dep]/exp_data[EXP_TYPE_LIVING]*100)) + return_text += "
    • [dep] [get_exp_format(exp_data[dep])] ([percentage]%)
    • " + else + return_text += "
    • [dep] [get_exp_format(exp_data[dep])]
    • " + if(config.use_exp_restrictions_admin_bypass && check_rights(R_ADMIN, 0, mob)) + return_text += "
    • Admin (all jobs auto-unlocked)
    • " + return_text += "
    " + var/list/jobs_locked = list() + var/list/jobs_unlocked = list() + for(var/datum/job/job in SSjob.occupations) + if(job.exp_requirements && job.exp_type) + if(!job_is_xp_locked(job.title)) + continue + else if(!job.required_playtime_remaining(mob.client)) + jobs_unlocked += job.title + else + var/xp_req = job.get_exp_req_amount() + jobs_locked += "[job.title] [get_exp_format(text2num(calc_exp_type(job.get_exp_req_type())))] / [get_exp_format(xp_req)] as [job.get_exp_req_type()])" + if(jobs_unlocked.len) + return_text += "

    Jobs Unlocked:
    • " + return_text += jobs_unlocked.Join("
    • ") + return_text += "
    " + if(jobs_locked.len) + return_text += "

    Jobs Not Unlocked:
    • " + return_text += jobs_locked.Join("
    • ") + return_text += "
    " + return return_text + + +/client/proc/get_exp_living() + if(!prefs.exp) + return "No data" + var/exp_living = text2num(prefs.exp[EXP_TYPE_LIVING]) + return get_exp_format(exp_living) + +/proc/get_exp_format(expnum) + if(expnum > 60) + return num2text(round(expnum / 60)) + "h" + else if(expnum > 0) + return num2text(expnum) + "m" + else + return "0h" + +/datum/controller/subsystem/blackbox/proc/update_exp(mins, ann = FALSE) + if(!SSdbcore.Connect()) + return -1 + for(var/client/L in GLOB.clients) + if(L.is_afk()) + continue + addtimer(CALLBACK(L,/client/proc/update_exp_list,mins,ann),10) + +/datum/controller/subsystem/blackbox/proc/update_exp_db() + SSdbcore.MassInsert(format_table_name("role_time"),GLOB.exp_to_update,TRUE) + LAZYCLEARLIST(GLOB.exp_to_update) + +//resets a client's exp to what was in the db. +/client/proc/set_exp_from_db() + if(!config.use_exp_tracking) + return -1 + if(!SSdbcore.Connect()) + return -1 + var/datum/DBQuery/exp_read = SSdbcore.NewQuery("SELECT job, minutes FROM [format_table_name("role_time")] WHERE ckey = '[sanitizeSQL(ckey)]'") + if(!exp_read.Execute()) + return -1 + var/list/play_records = list() + while(exp_read.NextRow()) + play_records[exp_read.item[1]] = text2num(exp_read.item[2]) + + for(var/rtype in SSjob.name_occupations) + if(!play_records[rtype]) + play_records[rtype] = 0 + for(var/rtype in GLOB.exp_specialmap) + if(!play_records[rtype]) + play_records[rtype] = 0 + + prefs.exp = play_records + + +//updates player db flags +/client/proc/update_flag_db(newflag, state = FALSE) + + if(!SSdbcore.Connect()) + return -1 + + if(!set_db_player_flags()) + return -1 + + if((prefs.db_flags & newflag) && !state) + prefs.db_flags &= ~newflag + else + prefs.db_flags |= newflag + + var/datum/DBQuery/flag_update = SSdbcore.NewQuery("UPDATE [format_table_name("player")] SET flags = '[prefs.db_flags]' WHERE ckey='[sanitizeSQL(ckey)]'") + + if(!flag_update.Execute()) + return -1 + + +/client/proc/update_exp_list(minutes, announce_changes = FALSE) + if(!config.use_exp_tracking) + return -1 + if(!SSdbcore.Connect()) + return -1 + var/datum/DBQuery/exp_read = SSdbcore.NewQuery("SELECT job, minutes FROM [format_table_name("role_time")] WHERE ckey = '[sanitizeSQL(ckey)]'") + if(!exp_read.Execute()) + return -1 + var/list/play_records = list() + while(exp_read.NextRow()) + play_records[exp_read.item[1]] = text2num(exp_read.item[2]) + + for(var/rtype in SSjob.name_occupations) + if(!play_records[rtype]) + play_records[rtype] = 0 + for(var/rtype in GLOB.exp_specialmap) + if(!play_records[rtype]) + play_records[rtype] = 0 + var/list/old_records = play_records.Copy() + if(isliving(mob)) + if(mob.stat != DEAD) + var/rolefound = FALSE + play_records[EXP_TYPE_LIVING] += minutes + if(announce_changes) + to_chat(src,"You got: [minutes] Living EXP!") + if(mob.mind.assigned_role) + for(var/job in SSjob.name_occupations) + if(mob.mind.assigned_role == job) + rolefound = TRUE + play_records[job] += minutes + if(announce_changes) + to_chat(src,"You got: [minutes] [job] EXP!") + if(!rolefound) + for(var/role in GLOB.exp_specialmap[EXP_TYPE_SPECIAL]) + if(mob.mind.assigned_role == role) + rolefound = TRUE + play_records[role] += minutes + if(announce_changes) + to_chat(mob,"You got: [minutes] [role] EXP!") + if(mob.mind.special_role && !mob.mind.var_edited) + var/trackedrole = mob.mind.special_role + var/gangrole = lookforgangrole(mob.mind.special_role) + if(gangrole) + trackedrole = gangrole + play_records[trackedrole] += minutes + if(announce_changes) + to_chat(src,"You got: [minutes] [trackedrole] EXP!") + if(!rolefound) + play_records["Unknown"] += minutes + else + play_records[EXP_TYPE_GHOST] += minutes + if(announce_changes) + to_chat(src,"You got: [minutes] Ghost EXP!") + else if(isobserver(mob)) + play_records[EXP_TYPE_GHOST] += minutes + if(announce_changes) + to_chat(src,"You got: [minutes] Ghost EXP!") + else if(minutes) //Let "refresh" checks go through + return + prefs.exp = play_records + + for(var/jtype in play_records) + if(play_records[jtype] != old_records[jtype]) + LAZYINITLIST(GLOB.exp_to_update) + GLOB.exp_to_update.Add(list(list( + "job" = "'[sanitizeSQL(jtype)]'", + "ckey" = "'[sanitizeSQL(ckey)]'", + "minutes" = play_records[jtype]))) + addtimer(CALLBACK(SSblackbox,/datum/controller/subsystem/blackbox/proc/update_exp_db),20,TIMER_OVERRIDE|TIMER_UNIQUE) + + +//ALWAYS call this at beginning to any proc touching player flags, or your database admin will probably be mad +/client/proc/set_db_player_flags() + if(!SSdbcore.Connect()) + return FALSE + + var/datum/DBQuery/flags_read = SSdbcore.NewQuery("SELECT flags FROM [format_table_name("player")] WHERE ckey='[ckey]'") + + if(!flags_read.Execute()) + return FALSE + + if(flags_read.NextRow()) + prefs.db_flags = text2num(flags_read.item[1]) + else if(isnull(prefs.db_flags)) + prefs.db_flags = 0 //This PROBABLY won't happen, but better safe than sorry. + return TRUE + +//Since each gang is tracked as a different antag type, records need to be generalized or you get up to 57 different possible records +/proc/lookforgangrole(rolecheck) + if(findtext(rolecheck,"Gangster")) + return "Gangster" + else if(findtext(rolecheck,"Gang Boss")) + return "Gang Boss" + else if(findtext(rolecheck,"Gang Lieutenant")) + return "Gang Lieutenant" + else + return FALSE diff --git a/code/modules/jobs/job_exp.dm.rej b/code/modules/jobs/job_exp.dm.rej new file mode 100644 index 0000000000..128a479acd --- /dev/null +++ b/code/modules/jobs/job_exp.dm.rej @@ -0,0 +1,108 @@ +diff a/code/modules/jobs/job_exp.dm b/code/modules/jobs/job_exp.dm (rejected hunks) +@@ -140,15 +140,12 @@ GLOBAL_PROTECT(exp_to_update) + //resets a client's exp to what was in the db. + /client/proc/set_exp_from_db() + if(!config.use_exp_tracking) +- return ++ return -1 + if(!SSdbcore.Connect()) + return -1 + var/datum/DBQuery/exp_read = SSdbcore.NewQuery("SELECT job, minutes FROM [format_table_name("role_time")] WHERE ckey = '[sanitizeSQL(ckey)]'") + if(!exp_read.Execute()) +- var/err = exp_read.ErrorMsg() +- log_sql("SQL ERROR during exp_update_client read. Error : \[[err]\]\n") +- message_admins("SQL ERROR during exp_update_client read. Error : \[[err]\]\n") +- return ++ return -1 + var/list/play_records = list() + while(exp_read.NextRow()) + play_records[exp_read.item[1]] = text2num(exp_read.item[2]) +@@ -172,42 +169,24 @@ GLOBAL_PROTECT(exp_to_update) + if(!set_db_player_flags()) + return -1 + +- var/datum/DBQuery/flag_read = SSdbcore.NewQuery("SELECT flags FROM [format_table_name("player")] WHERE ckey='[sanitizeSQL(ckey)]'") +- +- if(!flag_read.Execute()) +- var/err = flag_read.ErrorMsg() +- log_sql("SQL ERROR during player flags read. Error : \[[err]\]\n") +- message_admins("SQL ERROR during player flags read. Error : \[[err]\]\n") +- return +- +- var/playerflags = null +- if(flag_read.NextRow()) +- playerflags = text2num(flag_read.item[1]) +- +- if((playerflags & newflag) && !state) ++ if((prefs.db_flags & newflag) && !state) + prefs.db_flags &= ~newflag + else + prefs.db_flags |= newflag + + var/datum/DBQuery/flag_update = SSdbcore.NewQuery("UPDATE [format_table_name("player")] SET flags = '[prefs.db_flags]' WHERE ckey='[sanitizeSQL(ckey)]'") + +- + if(!flag_update.Execute()) +- var/err = flag_update.ErrorMsg() +- log_sql("SQL ERROR during exp_exempt update. Error : \[[err]\]\n") +- message_admins("SQL ERROR during exp_exempt update. Error : \[[err]\]\n") +- return ++ return -1 ++ + + /client/proc/update_exp_list(minutes, announce_changes = FALSE) + if(!config.use_exp_tracking) +- return ++ return -1 + if(!SSdbcore.Connect()) + return -1 + var/datum/DBQuery/exp_read = SSdbcore.NewQuery("SELECT job, minutes FROM [format_table_name("role_time")] WHERE ckey = '[sanitizeSQL(ckey)]'") + if(!exp_read.Execute()) +- var/err = exp_read.ErrorMsg() +- log_sql("SQL ERROR during exp_update_client read. Error : \[[err]\]\n") +- message_admins("SQL ERROR during exp_update_client read. Error : \[[err]\]\n") + return -1 + var/list/play_records = list() + while(exp_read.NextRow()) +@@ -241,9 +220,13 @@ GLOBAL_PROTECT(exp_to_update) + if(announce_changes) + to_chat(mob,"You got: [minutes] [role] EXP!") + if(mob.mind.special_role && !mob.mind.var_edited) +- play_records[mob.mind.special_role] += minutes ++ var/trackedrole = mob.mind.special_role ++ var/gangrole = lookforgangrole(mob.mind.special_role) ++ if(gangrole) ++ trackedrole = gangrole ++ play_records[trackedrole] += minutes + if(announce_changes) +- to_chat(src,"You got: [minutes] [mob.mind.special_role] EXP!") ++ to_chat(src,"You got: [minutes] [trackedrole] EXP!") + if(!rolefound) + play_records["Unknown"] += minutes + else +@@ -276,11 +259,21 @@ GLOBAL_PROTECT(exp_to_update) + var/datum/DBQuery/flags_read = SSdbcore.NewQuery("SELECT flags FROM [format_table_name("player")] WHERE ckey='[ckey]'") + + if(!flags_read.Execute()) +- var/err = flags_read.ErrorMsg() +- log_sql("SQL ERROR during player flags read. Error : \[[err]\]\n") +- message_admins("SQL ERROR during player flags read. Error : \[[err]\]\n") + return FALSE + + if(flags_read.NextRow()) + prefs.db_flags = text2num(flags_read.item[1]) ++ else if(isnull(prefs.db_flags)) ++ prefs.db_flags = 0 //This PROBABLY won't happen, but better safe than sorry. + return TRUE ++ ++//Since each gang is tracked as a different antag type, records need to be generalized or you get up to 57 different possible records ++/proc/lookforgangrole(rolecheck) ++ if(findtext(rolecheck,"Gangster")) ++ return "Gangster" ++ else if(findtext(rolecheck,"Gang Boss")) ++ return "Gang Boss" ++ else if(findtext(rolecheck,"Gang Lieutenant")) ++ return "Gang Lieutenant" ++ else ++ return FALSE +\ No newline at end of file diff --git a/code/modules/jobs/job_types/captain.dm b/code/modules/jobs/job_types/captain.dm index 5a7a0a76e5..03498f1e7b 100755 --- a/code/modules/jobs/job_types/captain.dm +++ b/code/modules/jobs/job_types/captain.dm @@ -13,6 +13,8 @@ Captain selection_color = "#ccccff" req_admin_notify = 1 minimal_player_age = 14 + exp_requirements = 180 + exp_type = EXP_TYPE_CREW outfit = /datum/outfit/job/captain @@ -64,6 +66,9 @@ Head of Personnel selection_color = "#ddddff" req_admin_notify = 1 minimal_player_age = 10 + exp_requirements = 180 + exp_type = EXP_TYPE_CREW + exp_type_department = EXP_TYPE_SUPPLY outfit = /datum/outfit/job/hop diff --git a/code/modules/jobs/job_types/engineering.dm b/code/modules/jobs/job_types/engineering.dm index daad870ec9..b61c61f6c8 100644 --- a/code/modules/jobs/job_types/engineering.dm +++ b/code/modules/jobs/job_types/engineering.dm @@ -14,6 +14,9 @@ Chief Engineer selection_color = "#ffeeaa" req_admin_notify = 1 minimal_player_age = 7 + exp_requirements = 180 + exp_type = EXP_TYPE_CREW + exp_type_department = EXP_TYPE_ENGINEERING outfit = /datum/outfit/job/ce @@ -72,6 +75,8 @@ Station Engineer spawn_positions = 5 supervisors = "the chief engineer" selection_color = "#fff5cc" + exp_requirements = 60 + exp_type = EXP_TYPE_CREW outfit = /datum/outfit/job/engineer @@ -127,6 +132,8 @@ Atmospheric Technician spawn_positions = 2 supervisors = "the chief engineer" selection_color = "#fff5cc" + exp_requirements = 60 + exp_type = EXP_TYPE_CREW outfit = /datum/outfit/job/atmos diff --git a/code/modules/jobs/job_types/job.dm b/code/modules/jobs/job_types/job.dm index 04a384357f..6b736db7fe 100644 --- a/code/modules/jobs/job_types/job.dm +++ b/code/modules/jobs/job_types/job.dm @@ -43,6 +43,11 @@ var/outfit = null + var/exp_requirements = 0 + + var/exp_type = "" + var/exp_type_department = "" + //Only override this proc //H is usually a human unless an /equip override transformed it /datum/job/proc/after_spawn(mob/living/H, mob/M) diff --git a/code/modules/jobs/job_types/medical.dm b/code/modules/jobs/job_types/medical.dm index 3d9f857dbf..9a33e1e759 100644 --- a/code/modules/jobs/job_types/medical.dm +++ b/code/modules/jobs/job_types/medical.dm @@ -14,6 +14,9 @@ Chief Medical Officer selection_color = "#ffddf0" req_admin_notify = 1 minimal_player_age = 7 + exp_requirements = 180 + exp_type = EXP_TYPE_CREW + exp_type_department = EXP_TYPE_MEDICAL outfit = /datum/outfit/job/cmo @@ -91,6 +94,8 @@ Chemist spawn_positions = 2 supervisors = "the chief medical officer" selection_color = "#ffeef0" + exp_type = EXP_TYPE_CREW + exp_requirements = 60 outfit = /datum/outfit/job/chemist @@ -125,6 +130,8 @@ Geneticist spawn_positions = 2 supervisors = "the chief medical officer and research director" selection_color = "#ffeef0" + exp_type = EXP_TYPE_CREW + exp_requirements = 60 outfit = /datum/outfit/job/geneticist @@ -159,6 +166,8 @@ Virologist spawn_positions = 1 supervisors = "the chief medical officer" selection_color = "#ffeef0" + exp_type = EXP_TYPE_CREW + exp_requirements = 60 outfit = /datum/outfit/job/virologist diff --git a/code/modules/jobs/job_types/science.dm b/code/modules/jobs/job_types/science.dm index 6ce166c48e..4eac15d9f1 100644 --- a/code/modules/jobs/job_types/science.dm +++ b/code/modules/jobs/job_types/science.dm @@ -14,6 +14,9 @@ Research Director selection_color = "#ffddff" req_admin_notify = 1 minimal_player_age = 7 + exp_type_department = EXP_TYPE_SCIENCE + exp_requirements = 180 + exp_type = EXP_TYPE_CREW outfit = /datum/outfit/job/rd @@ -68,6 +71,8 @@ Scientist spawn_positions = 3 supervisors = "the research director" selection_color = "#ffeeff" + exp_requirements = 60 + exp_type = EXP_TYPE_CREW outfit = /datum/outfit/job/scientist @@ -101,6 +106,8 @@ Roboticist spawn_positions = 2 supervisors = "research director" selection_color = "#ffeeff" + exp_requirements = 60 + exp_type = EXP_TYPE_CREW outfit = /datum/outfit/job/roboticist diff --git a/code/modules/jobs/job_types/security.dm b/code/modules/jobs/job_types/security.dm index 3ccbb7faef..84623873e8 100644 --- a/code/modules/jobs/job_types/security.dm +++ b/code/modules/jobs/job_types/security.dm @@ -20,6 +20,9 @@ Head of Security selection_color = "#ffdddd" req_admin_notify = 1 minimal_player_age = 14 + exp_requirements = 300 + exp_type = EXP_TYPE_CREW + exp_type_department = EXP_TYPE_SECURITY outfit = /datum/outfit/job/hos @@ -71,6 +74,8 @@ Warden supervisors = "the head of security" selection_color = "#ffeeee" minimal_player_age = 7 + exp_requirements = 300 + exp_type = EXP_TYPE_CREW outfit = /datum/outfit/job/warden @@ -121,6 +126,8 @@ Detective supervisors = "the head of security" selection_color = "#ffeeee" minimal_player_age = 7 + exp_requirements = 300 + exp_type = EXP_TYPE_CREW outfit = /datum/outfit/job/detective @@ -169,6 +176,8 @@ Security Officer supervisors = "the head of security, and the head of your assigned department (if applicable)" selection_color = "#ffeeee" minimal_player_age = 7 + exp_requirements = 300 + exp_type = EXP_TYPE_CREW outfit = /datum/outfit/job/security diff --git a/code/modules/jobs/job_types/silicon.dm b/code/modules/jobs/job_types/silicon.dm index 0b6380bfaf..2e0a710d41 100644 --- a/code/modules/jobs/job_types/silicon.dm +++ b/code/modules/jobs/job_types/silicon.dm @@ -12,6 +12,8 @@ AI supervisors = "your laws" req_admin_notify = 1 minimal_player_age = 30 + exp_requirements = 180 + exp_type = EXP_TYPE_CREW /datum/job/ai/equip(mob/living/carbon/human/H) return H.AIize(FALSE) @@ -44,6 +46,8 @@ Cyborg supervisors = "your laws and the AI" //Nodrak selection_color = "#ddffdd" minimal_player_age = 21 + exp_requirements = 120 + exp_type = EXP_TYPE_CREW /datum/job/cyborg/equip(mob/living/carbon/human/H) return H.Robotize(FALSE, FALSE) diff --git a/code/modules/jobs/jobs.dm b/code/modules/jobs/jobs.dm index 2d7caa5fc4..b5ec8fa27a 100644 --- a/code/modules/jobs/jobs.dm +++ b/code/modules/jobs/jobs.dm @@ -59,6 +59,26 @@ GLOBAL_LIST_INIT(nonhuman_positions, list( "Cyborg", "pAI")) +GLOBAL_LIST_INIT(exp_jobsmap, list( + EXP_TYPE_CREW = list("titles" = command_positions | engineering_positions | medical_positions | science_positions | supply_positions | security_positions | civilian_positions | list("AI","Cyborg")), // crew positions + EXP_TYPE_COMMAND = list("titles" = command_positions), + EXP_TYPE_ENGINEERING = list("titles" = engineering_positions), + EXP_TYPE_MEDICAL = list("titles" = medical_positions), + EXP_TYPE_SCIENCE = list("titles" = science_positions), + EXP_TYPE_SUPPLY = list("titles" = supply_positions), + EXP_TYPE_SECURITY = list("titles" = security_positions), + EXP_TYPE_SILICON = list("titles" = list("AI","Cyborg")), + EXP_TYPE_SERVICE = list("titles" = civilian_positions), +)) + +GLOBAL_LIST_INIT(exp_specialmap, list( + EXP_TYPE_LIVING = list(), // all living mobs + EXP_TYPE_ANTAG = list(), + EXP_TYPE_SPECIAL = list("Lifebringer","Ash Walker","Exile","Servant Golem","Free Golem","Hermit","Translocated Vet","Escaped Prisoner","Hotel Staff","SuperFriend","Space Syndicate","Ancient Crew","Space Doctor","Space Bartender","Beach Bum","Skeleton","Zombie","Space Bar Patron","Lavaland Syndicate","Ghost Role"), // Ghost roles + EXP_TYPE_GHOST = list() // dead people, observers +)) +GLOBAL_PROTECT(exp_jobsmap) +GLOBAL_PROTECT(exp_specialmap) /proc/guest_jobbans(job) return ((job in GLOB.command_positions) || (job in GLOB.nonhuman_positions) || (job in GLOB.security_positions)) diff --git a/code/modules/library/lib_codex_gigas.dm b/code/modules/library/lib_codex_gigas.dm index 481b3a6a12..d3d95db974 100644 --- a/code/modules/library/lib_codex_gigas.dm +++ b/code/modules/library/lib_codex_gigas.dm @@ -8,6 +8,8 @@ name = "\improper Codex Gigas" desc = "A book documenting the nature of devils." icon_state ="demonomicon" + lefthand_file = 'icons/mob/inhands/misc/books_lefthand.dmi' + righthand_file = 'icons/mob/inhands/misc/books_righthand.dmi' throw_speed = 1 throw_range = 10 resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index 5e7c385416..99127cd595 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -419,7 +419,7 @@ GLOBAL_LIST(cachedbooks) // List of our cached book datums var/sqlauthor = sanitizeSQL(scanner.cache.author) var/sqlcontent = sanitizeSQL(scanner.cache.dat) var/sqlcategory = sanitizeSQL(upload_category) - var/datum/DBQuery/query_library_upload = SSdbcore.NewQuery("INSERT INTO [format_table_name("library")] (author, title, content, category, ckey, datetime) VALUES ('[sqlauthor]', '[sqltitle]', '[sqlcontent]', '[sqlcategory]', '[usr.ckey]', Now())") + var/datum/DBQuery/query_library_upload = SSdbcore.NewQuery("INSERT INTO [format_table_name("library")] (author, title, content, category, ckey, datetime, round_id_created) VALUES ('[sqlauthor]', '[sqltitle]', '[sqlcontent]', '[sqlcategory]', '[usr.ckey]', Now(), '[GLOB.round_id]')") if(!query_library_upload.Execute()) alert("Database error encountered uploading to Archive") return diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index 827df09480..bf32c94058 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -480,6 +480,8 @@ icon = 'icons/obj/vehicles.dmi' icon_state = "oar" item_state = "oar" + lefthand_file = 'icons/mob/inhands/misc/lavaland_lefthand.dmi' + righthand_file = 'icons/mob/inhands/misc/lavaland_righthand.dmi' desc = "Not to be confused with the kind Research hassles you for." force = 12 w_class = WEIGHT_CLASS_NORMAL @@ -835,6 +837,8 @@ desc = "The ability to fill the emergency shuttle with lava. What more could you want out of life?" icon_state = "staffofstorms" item_state = "staffofstorms" + lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi' + righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi' icon = 'icons/obj/guns/magic.dmi' slot_flags = SLOT_BACK w_class = WEIGHT_CLASS_BULKY @@ -1008,6 +1012,7 @@ slot_flags = SLOT_BACK w_class = WEIGHT_CLASS_BULKY force = 15 + attack_verb = list("clubbed", "beat", "pummeled") hitsound = 'sound/weapons/sonic_jackhammer.ogg' actions_types = list(/datum/action/item_action/vortex_recall, /datum/action/item_action/toggle_unfriendly_fire) var/cooldown_time = 20 //how long the cooldown between non-melee ranged attacks is @@ -1024,6 +1029,21 @@ ..() to_chat(user, "The[beacon ? " beacon is not currently":"re is a beacon"] attached.") +/obj/item/hierophant_club/suicide_act(mob/living/user) + say("Xverwpsgexmrk...") + user.visible_message("[user] holds [src] into the air! It looks like [user.p_theyre()] trying to commit suicide!") + new/obj/effect/temp_visual/hierophant/telegraph(get_turf(user)) + playsound(user,'sound/machines/airlockopen.ogg', 75, TRUE) + user.visible_message("[user] fades out, leaving their belongings behind!") + for(var/obj/item/I in user) + if(I != src) + user.dropItemToGround(I) + for(var/turf/T in RANGE_TURFS(1, user)) + var/obj/effect/temp_visual/hierophant/blast/B = new(T, user, TRUE) + B.damage = 0 + user.dropItemToGround(src) //Drop us last, so it goes on top of their stuff + qdel(user) + /obj/item/hierophant_club/afterattack(atom/target, mob/user, proximity_flag, click_parameters) ..() var/turf/T = get_turf(target) diff --git a/code/modules/mob/dead/new_player/login.dm b/code/modules/mob/dead/new_player/login.dm index 9a49c23cfc..4de3b1d4dd 100644 --- a/code/modules/mob/dead/new_player/login.dm +++ b/code/modules/mob/dead/new_player/login.dm @@ -1,4 +1,7 @@ /mob/dead/new_player/Login() + if(config.use_exp_tracking) + client.set_exp_from_db() + client.set_db_player_flags() if(!mind) mind = new /datum/mind(key) mind.active = 1 diff --git a/code/modules/mob/dead/new_player/login.dm.rej b/code/modules/mob/dead/new_player/login.dm.rej new file mode 100644 index 0000000000..b7361e13ff --- /dev/null +++ b/code/modules/mob/dead/new_player/login.dm.rej @@ -0,0 +1,9 @@ +diff a/code/modules/mob/dead/new_player/login.dm b/code/modules/mob/dead/new_player/login.dm (rejected hunks) +@@ -1,5 +1,6 @@ + /mob/dead/new_player/Login() +- client.update_exp_client(0, 0) ++ if(config.use_exp_tracking) ++ client.update_exp_client(0, 0) + if(!mind) + mind = new /datum/mind(key) + mind.active = 1 diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index c65cd1a5fb..b11c6bc336 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -307,6 +307,8 @@ return 0 if(!job.player_old_enough(src.client)) return 0 + if(job.required_playtime_remaining(client)) + return 0 if(config.enforce_human_authority && !client.prefs.pref_species.qualifies_for_rank(rank, client.prefs.features)) return 0 return 1 diff --git a/code/modules/mob/dead/new_player/sprite_accessories_Citadel.dm b/code/modules/mob/dead/new_player/sprite_accessories_Citadel.dm index 18a8b38c5b..648e6170fa 100644 --- a/code/modules/mob/dead/new_player/sprite_accessories_Citadel.dm +++ b/code/modules/mob/dead/new_player/sprite_accessories_Citadel.dm @@ -96,6 +96,20 @@ icon = 'icons/mob/mam_bodyparts.dmi' extra = 1 +/datum/sprite_accessory/tails/human/kitsune + name = "Kitsune" + icon_state = "kitsune" + extra = 1 + extra_color_src = MUTCOLORS2 + icon = 'icons/mob/mam_bodyparts.dmi' + +/datum/sprite_accessory/tails_animated/human/kitsune + name = "Kitsune" + icon_state = "kitsune" + extra = 1 + extra_color_src = MUTCOLORS2 + icon = 'icons/mob/mam_bodyparts.dmi' + /datum/sprite_accessory/ears/lab name = "Dog, Floppy" icon_state = "lab" @@ -119,6 +133,33 @@ color_src = 0 icon = 'icons/mob/mam_bodyparts.dmi' +/datum/sprite_accessory/ears/human/otie + name = "Otusian" + icon_state = "otie" + hasinner= 1 + +/datum/sprite_accessory/tails/human/otie + name = "Otusian" + icon_state = "otie" + +/datum/sprite_accessory/tails_animated/human/otie + name = "Otusian" + icon_state = "otie" + +/datum/sprite_accessory/ears/human/skunk + name = "skunk" + icon_state = "skunk" + +/datum/sprite_accessory/tails/human/skunk + name = "skunk" + icon_state = "skunk" + color_src = 0 + +/datum/sprite_accessory/tails_animated/human/skunk + name = "skunk" + icon_state = "skunk" + color_src = 0 + /datum/sprite_accessory/tails/human/shark name = "Shark" icon_state = "shark" @@ -198,6 +239,16 @@ **************** Snouts ******************* *******************************************/ +/datum/sprite_accessory/snouts/none + name = "None" + icon_state = "none" + icon = 'icons/mob/mam_bodyparts.dmi' + +/datum/sprite_accessory/snouts/bird + name = "Beak" + icon_state = "bird" + icon = 'icons/mob/mam_bodyparts.dmi' + /datum/sprite_accessory/snouts/lcanid name = "Fox, Long" icon_state = "lcanid" @@ -347,6 +398,31 @@ icon_state = "husky" extra = 1 +/datum/sprite_accessory/mam_ears/kangaroo + name = "kangaroo" + icon_state = "kangaroo" + extra = 1 + +/datum/sprite_accessory/mam_tails/kangaroo + name = "kangaroo" + icon_state = "kangaroo" + +/datum/sprite_accessory/mam_tails_animated/kangaroo + name = "kangaroo" + icon_state = "kangaroo" + +/datum/sprite_accessory/mam_tails/kitsune + name = "Kitsune" + icon_state = "kitsune" + extra = 1 + extra_color_src = MUTCOLORS2 + +/datum/sprite_accessory/mam_tails_animated/kitsune + name = "Kitsune" + icon_state = "kitsune" + extra = 1 + extra_color_src = MUTCOLORS2 + /datum/sprite_accessory/mam_ears/lab name = "Dog, Long" icon_state = "lab" @@ -386,6 +462,22 @@ name = "Otusian" icon_state = "otie" +/datum/sprite_accessory/mam_ears/skunk + name = "skunk" + icon_state = "skunk" + +/datum/sprite_accessory/mam_tails/skunk + name = "skunk" + icon_state = "skunk" + color_src = 0 + extra = 1 + +/datum/sprite_accessory/mam_tails_animated/skunk + name = "skunk" + icon_state = "skunk" + color_src = 0 + extra = 1 + /datum/sprite_accessory/mam_tails/shark name = "Shark" icon_state = "shark" @@ -396,17 +488,6 @@ icon_state = "shark" color_src = 0 -/datum/sprite_accessory/mam_tails/shark/datashark - name = "DataShark" - icon_state = "datashark" - color_src = 0 -// ckeys_allowed = list("rubyflamewing") - -/datum/sprite_accessory/mam_tails_animated/shark/datashark - name = "DataShark" - icon_state = "datashark" - color_src = 0 - /datum/sprite_accessory/mam_tails/shepherd name = "Shepherd" icon_state = "shepherd" @@ -445,31 +526,18 @@ name = "Wolf" icon_state = "wolf" -/datum/sprite_accessory/mam_tails/guilmon - name = "Guilmon" - icon_state = "guilmon" - extra = 1 - -/datum/sprite_accessory/mam_tails_animated/guilmon - name = "Guilmon" - icon_state = "guilmon" - extra = 1 - -/datum/sprite_accessory/mam_ears/guilmon - name = "Guilmon" - icon_state = "guilmon" - icon = 'icons/mob/mam_bodyparts.dmi' - /datum/sprite_accessory/mam_tails/rabbit name = "Rabbit" icon_state = "rabbit" - icon = 'icons/mob/mam_bodyparts.dmi' + +/datum/sprite_accessory/mam_tails_animated/rabbit + name = "Rabbit" + icon_state = "rabbit" /datum/sprite_accessory/mam_ears/rabbit name = "Rabbit" icon_state = "rabbit" hasinner= 1 - icon = 'icons/mob/mam_bodyparts.dmi' /****************************************** ************ Body Markings **************** @@ -586,21 +654,14 @@ color_src = MUTCOLORS2 gender_specific = 1 -/datum/sprite_accessory/mam_body_markings/guilmon - name = "Guilmon" - icon_state = "guilmon" - extra = 1 - extra2 = 1 - icon = 'icons/mob/mam_body_markings.dmi' - gender_specific = 1 - - /datum/sprite_accessory/mam_body_markings/xeno +/datum/sprite_accessory/mam_body_markings/xeno name = "Xeno" icon_state = "xeno" color_src = MUTCOLORS2 extra_color_src = MUTCOLORS3 gender_specific = 1 + /****************************************** ************ Taur Bodies ****************** *******************************************/ @@ -712,7 +773,6 @@ icon = 'icons/mob/xeno_parts_greyscale.dmi' //Xeno Caste Heads -//unused as of October 3, 2016 /datum/sprite_accessory/xeno_head icon = 'icons/mob/xeno_parts_greyscale.dmi' @@ -740,17 +800,67 @@ icon_state = "warrior" icon = 'icons/mob/xeno_parts_greyscale.dmi' +// *** Snooooow flaaaaake *** + +/datum/sprite_accessory/mam_body_markings/guilmon + name = "Guilmon" + icon_state = "guilmon" + extra_color_src = MUTCOLORS2 + extra2_color_src = MUTCOLORS3 + gender_specific = 1 + +/datum/sprite_accessory/mam_tails/guilmon + name = "Guilmon" + icon_state = "guilmon" + extra = 1 + +/datum/sprite_accessory/mam_tails_animated/guilmon + name = "Guilmon" + icon_state = "guilmon" + extra = 1 + +/datum/sprite_accessory/mam_ears/guilmon + name = "Guilmon" + icon_state = "guilmon" + icon = 'icons/mob/mam_bodyparts.dmi' + +/datum/sprite_accessory/mam_tails/shark/datashark + name = "DataShark" + icon_state = "datashark" + color_src = 0 +// ckeys_allowed = list("rubyflamewing") + +/datum/sprite_accessory/mam_tails_animated/shark/datashark + name = "DataShark" + icon_state = "datashark" + color_src = 0 + /* -//Slimecoon Parts -/datum/sprite_accessory/slimecoon_ears - icon = 'icons/mob/exotic_bodyparts.dmi' - name = "Slimecoon Ears" - icon_state = "slimecoon" -/datum/sprite_accessory/slimecoon_tail - icon = 'icons/mob/exotic_bodyparts.dmi' - name = "Slimecoon Tail" - icon_state = "slimecoon" -/datum/sprite_accessory/slimecoon_snout - icon = 'icons/mob/exotic_bodyparts.dmi' - name = "Hunter" - icon_state = "slimecoon" */ +//Till I get my snowflake only ckey lock, these are locked-locked :D + +/datum/sprite_accessory/mam_ears/sabresune + name = "sabresune" + icon_state = "sabresune" + extra = 1 + extra_color_src = MUTCOLORS3 + locked = TRUE + +/datum/sprite_accessory/mam_tails/sabresune + name = "sabresune" + icon_state = "sabresune" + extra = 1 + locked = TRUE + +/datum/sprite_accessory/mam_tails_animated/sabresune + name = "sabresune" + icon_state = "sabresune" + extra = 1 + +/datum/sprite_accessory/mam_body_markings/sabresune + name = "Sabresune" + icon_state = "sabresune" + color_src = MUTCOLORS2 + extra = 0 + extra2 = 0 + locked = TRUE +*/ diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 126f3bcf01..75d7f637cd 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -309,9 +309,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp ..() if(statpanel("Status")) if(SSticker.HasRoundStarted()) - for(var/datum/gang/G in SSticker.mode.gangs) - if(G.is_dominating) - stat(null, "[G.name] Gang Takeover: [max(G.domination_time_remaining(), 0)]") if(istype(SSticker.mode, /datum/game_mode/blob)) var/datum/game_mode/blob/B = SSticker.mode if(B.message_sent) diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm index cb1535f724..48ce6e5e7b 100644 --- a/code/modules/mob/living/carbon/alien/alien.dm +++ b/code/modules/mob/living/carbon/alien/alien.dm @@ -17,7 +17,6 @@ initial_language_holder = /datum/language_holder/alien bubble_icon = "alien" type_of_meat = /obj/item/reagent_containers/food/snacks/meat/slab/xeno - var/nightvision = 1 var/obj/item/card/id/wear_id = null // Fix for station bounced radios -- Skie var/has_fine_manipulation = 0 @@ -32,7 +31,7 @@ var/static/regex/alien_name_regex = new("alien (larva|sentinel|drone|hunter|praetorian|queen)( \\(\\d+\\))?") devourable = TRUE - + /mob/living/carbon/alien/Initialize() verbs += /mob/living/proc/mob_sleep verbs += /mob/living/proc/lay_down diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 34d788e5ff..84ff0c2ef2 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -610,50 +610,94 @@ if(!client) return - if(stat == UNCONSCIOUS && health <= HEALTH_THRESHOLD_CRIT) + if(health <= HEALTH_THRESHOLD_CRIT) var/severity = 0 switch(health) - if(-20 to -10) severity = 1 - if(-30 to -20) severity = 2 - if(-40 to -30) severity = 3 - if(-50 to -40) severity = 4 - if(-60 to -50) severity = 5 - if(-70 to -60) severity = 6 - if(-80 to -70) severity = 7 - if(-90 to -80) severity = 8 - if(-95 to -90) severity = 9 - if(-INFINITY to -95) severity = 10 + if(-20 to -10) + severity = 1 + if(-30 to -20) + severity = 2 + if(-40 to -30) + severity = 3 + if(-50 to -40) + severity = 4 + if(-50 to -40) + severity = 5 + if(-60 to -50) + severity = 6 + if(-70 to -60) + severity = 7 + if(-90 to -70) + severity = 8 + if(-95 to -90) + severity = 9 + if(-INFINITY to -95) + severity = 10 + if(!InFullCritical()) + var/visionseverity = 4 + switch(health) + if(-8 to -4) + visionseverity = 5 + if(-12 to -8) + visionseverity = 6 + if(-16 to -12) + visionseverity = 7 + if(-20 to -16) + visionseverity = 8 + if(-24 to -20) + visionseverity = 9 + if(-INFINITY to -24) + visionseverity = 10 + overlay_fullscreen("critvision", /obj/screen/fullscreen/crit/vision, visionseverity) + else + clear_fullscreen("critvision") overlay_fullscreen("crit", /obj/screen/fullscreen/crit, severity) else clear_fullscreen("crit") - if(oxyloss) - var/severity = 0 - switch(oxyloss) - if(10 to 20) severity = 1 - if(20 to 25) severity = 2 - if(25 to 30) severity = 3 - if(30 to 35) severity = 4 - if(35 to 40) severity = 5 - if(40 to 45) severity = 6 - if(45 to INFINITY) severity = 7 - overlay_fullscreen("oxy", /obj/screen/fullscreen/oxy, severity) - else - clear_fullscreen("oxy") + clear_fullscreen("critvision") - //Fire and Brute damage overlay (BSSR) - var/hurtdamage = getBruteLoss() + getFireLoss() + damageoverlaytemp - if(hurtdamage) - var/severity = 0 - switch(hurtdamage) - if(5 to 15) severity = 1 - if(15 to 30) severity = 2 - if(30 to 45) severity = 3 - if(45 to 70) severity = 4 - if(70 to 85) severity = 5 - if(85 to INFINITY) severity = 6 - overlay_fullscreen("brute", /obj/screen/fullscreen/brute, severity) - else - clear_fullscreen("brute") + //Oxygen damage overlay + if(oxyloss) + var/severity = 0 + switch(oxyloss) + if(10 to 20) + severity = 1 + if(20 to 25) + severity = 2 + if(25 to 30) + severity = 3 + if(30 to 35) + severity = 4 + if(35 to 40) + severity = 5 + if(40 to 45) + severity = 6 + if(45 to INFINITY) + severity = 7 + overlay_fullscreen("oxy", /obj/screen/fullscreen/oxy, severity) + else + clear_fullscreen("oxy") + + //Fire and Brute damage overlay (BSSR) + var/hurtdamage = getBruteLoss() + getFireLoss() + damageoverlaytemp + if(hurtdamage) + var/severity = 0 + switch(hurtdamage) + if(5 to 15) + severity = 1 + if(15 to 30) + severity = 2 + if(30 to 45) + severity = 3 + if(45 to 70) + severity = 4 + if(70 to 85) + severity = 5 + if(85 to INFINITY) + severity = 6 + overlay_fullscreen("brute", /obj/screen/fullscreen/brute, severity) + else + clear_fullscreen("brute") /mob/living/carbon/update_health_hud(shown_health_amount) if(!client || !hud_used) @@ -688,20 +732,19 @@ if(status_flags & GODMODE) return if(stat != DEAD) - if(health<= HEALTH_THRESHOLD_DEAD) + if(health <= HEALTH_THRESHOLD_DEAD) death() return - if(IsUnconscious() || IsSleeping() || getOxyLoss() > 50 || (status_flags & FAKEDEATH) || health <= HEALTH_THRESHOLD_CRIT) - if(stat == CONSCIOUS) - stat = UNCONSCIOUS - blind_eyes(1) - update_canmove() + if(IsUnconscious() || IsSleeping() || getOxyLoss() > 50 || (status_flags & FAKEDEATH) || health <= HEALTH_THRESHOLD_FULLCRIT) + stat = UNCONSCIOUS + blind_eyes(1) else - if(stat == UNCONSCIOUS) + if(health <= HEALTH_THRESHOLD_CRIT) + stat = SOFT_CRIT + else stat = CONSCIOUS - resting = 0 - adjust_blindness(-1) - update_canmove() + adjust_blindness(-1) + update_canmove() update_damage_hud() update_health_hud() med_hud_set_status() diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index fab12538fc..b23cadfc5a 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -255,6 +255,8 @@ else if(check_zone(M.zone_selected) == "head") M.visible_message("[M] gives [src] a pat on the head to make [p_them()] feel better!", \ "You give [src] a pat on the head to make [p_them()] feel better!") + if(dna && dna.species && (("tail_lizard" in dna.species.mutant_bodyparts) || (dna.features["tail_human"] != "None") || ("mam_tail" in dna.species.mutant_bodyparts))) + emote("wag") //lewd else M.visible_message("[M] hugs [src] to make [p_them()] feel better!", \ "You hug [src] to make [p_them()] feel better!") diff --git a/code/modules/mob/living/carbon/carbon_movement.dm b/code/modules/mob/living/carbon/carbon_movement.dm index 70ec78092d..2bacece28d 100644 --- a/code/modules/mob/living/carbon/carbon_movement.dm +++ b/code/modules/mob/living/carbon/carbon_movement.dm @@ -1,10 +1,8 @@ /mob/living/carbon/movement_delay() - var/FP - if(iscarbon(src)) - var/mob/living/carbon/C = src - var/obj/item/device/flightpack/F = C.get_flightpack() - if(istype(F) && F.flight) - FP = 1 + var/FP = FALSE + var/obj/item/device/flightpack/F = get_flightpack() + if(istype(F) && F.flight) + FP = TRUE . = ..(FP) if(!FP) . += grab_state * 1 //Flightpacks are too powerful to be slowed too much by the weight of a corpse. diff --git a/code/modules/mob/living/carbon/examine.dm b/code/modules/mob/living/carbon/examine.dm index 600a50e595..e7fe862b1e 100644 --- a/code/modules/mob/living/carbon/examine.dm +++ b/code/modules/mob/living/carbon/examine.dm @@ -79,6 +79,8 @@ if(!appears_dead) if(stat == UNCONSCIOUS) msg += "[t_He] [t_is]n't responding to anything around [t_him] and seems to be asleep.\n" + else if(InCritical()) + msg += "[t_His] breathing is shallow and labored.\n" if(digitalcamo) msg += "[t_He] [t_is] moving [t_his] body in an unnatural and blatantly unsimian manner.\n" diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 165019160e..f93b1cc2f1 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -613,7 +613,7 @@ INITIALIZE_IMMEDIATE(/mob/living/carbon/human/dummy) //Check for dresscode violations if(istype(head, /obj/item/clothing/head/wizard) || istype(head, /obj/item/clothing/head/helmet/space/hardsuit/wizard) || istype(head, /obj/item/clothing/head/helmet/space/hardsuit/syndi) || istype(head, /obj/item/clothing/head/helmet/space/hardsuit/shielded/syndi)) - threatcount += 3 + threatcount += 6 //Check for nonhuman scum if(dna && dna.species.id && !(dna.species.id in list("human" , "lizard", "mammal", "avian", "aquatic", "insect"))) @@ -643,6 +643,7 @@ INITIALIZE_IMMEDIATE(/mob/living/carbon/human/dummy) update_hair() /mob/living/carbon/human/singularity_pull(S, current_size) + ..() if(current_size >= STAGE_THREE) for(var/obj/item/hand in held_items) if(prob(current_size * 5) && hand.w_class >= ((11-current_size)/2) && dropItemToGround(hand)) @@ -651,7 +652,6 @@ INITIALIZE_IMMEDIATE(/mob/living/carbon/human/dummy) rad_act(current_size * 3) if(mob_negates_gravity()) return - ..() /mob/living/carbon/human/proc/do_cpr(mob/living/carbon/C) CHECK_DNA_AND_SPECIES(C) diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index 1c44c96d64..b5f8ab7c81 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -105,9 +105,6 @@ /mob/living/carbon/human/IsAdvancedToolUser() return 1//Humans can use guns and such -/mob/living/carbon/human/InCritical() - return (health <= HEALTH_THRESHOLD_CRIT && stat == UNCONSCIOUS) - /mob/living/carbon/human/reagent_check(datum/reagent/R) return dna.species.handle_chemicals(R,src) // if it returns 0, it will run the usual on_mob_life for that reagent. otherwise, it will stop after running handle_chemicals for the species. diff --git a/code/modules/mob/living/carbon/human/interactive.dm b/code/modules/mob/living/carbon/human/interactive.dm index 18a4b3a7fb..7a80758eae 100644 --- a/code/modules/mob/living/carbon/human/interactive.dm +++ b/code/modules/mob/living/carbon/human/interactive.dm @@ -87,17 +87,23 @@ /// SNPC voice handling /mob/living/carbon/human/interactive/proc/loadVoice() - var/savefile/S = new /savefile("data/npc_saves/snpc.sav") - S["knownStrings"] >> knownStrings - + var/json_file = file("data/npc_saves/snpc.json") + if(!fexists(json_file)) + return + var/list/json = list() + json = json_decode(file2text(json_file)) + knownStrings = json["knownStrings"] if(isnull(knownStrings)) knownStrings = list() /mob/living/carbon/human/interactive/proc/saveVoice() if(voice_saved) return - var/savefile/S = new /savefile("data/npc_saves/snpc.sav") - WRITE_FILE(S["knownStrings"], knownStrings) + var/json_file = file("data/npc_saves/snpc.json") + var/list/file_data = list() + file_data["knownStrings"] = knownStrings + fdel(json_file) + WRITE_FILE(json_file, json_encode(file_data)) //botPool funcs /mob/living/carbon/human/interactive/proc/takeDelegate(mob/living/carbon/human/interactive/from,doReset=TRUE) @@ -284,7 +290,7 @@ //job specific favours switch(myjob.title) if("Assistant") - favoured_types = list(/obj/item/clothing, /obj/item/weapon) + favoured_types = list(/obj/item/clothing, /obj/item) if("Captain","Head of Personnel") favoured_types = list(/obj/item/clothing, /obj/item/stamp/captain, /obj/item/disk/nuclear) if("Cook") @@ -296,14 +302,14 @@ functions += "bartend" restrictedJob = 1 if("Station Engineer","Chief Engineer","Atmospheric Technician") - favoured_types = list(/obj/item/stack, /obj/item/weapon, /obj/item/clothing) + favoured_types = list(/obj/item/stack, /obj/item, /obj/item/clothing) if("Chief Medical Officer","Medical Doctor","Chemist","Virologist","Geneticist") favoured_types = list(/obj/item/reagent_containers/glass/beaker, /obj/item/storage/firstaid, /obj/item/stack/medical, /obj/item/reagent_containers/syringe) functions += "healpeople" if("Research Director","Scientist","Roboticist") favoured_types = list(/obj/item/reagent_containers/glass/beaker, /obj/item/stack, /obj/item/reagent_containers) if("Head of Security","Warden","Security Officer","Detective") - favoured_types = list(/obj/item/clothing, /obj/item/weapon, /obj/item/restraints) + favoured_types = list(/obj/item/clothing, /obj/item, /obj/item/restraints) if("Janitor") favoured_types = list(/obj/item/mop, /obj/item/reagent_containers/glass/bucket, /obj/item/reagent_containers/spray/cleaner, /obj/effect/decal/cleanable) functions += "dojanitor" @@ -313,7 +319,7 @@ if("Mime") functions -= "chatter" if("Botanist") - favoured_types = list(/obj/machinery/hydroponics, /obj/item/reagent_containers, /obj/item/weapon) + favoured_types = list(/obj/machinery/hydroponics, /obj/item/reagent_containers, /obj/item) functions += "botany" restrictedJob = 1 else @@ -633,7 +639,7 @@ insert_into_backpack() // dump random item into backpack to make space //---------ITEMS if(isitem(TARGET)) - if(istype(TARGET, /obj/item/weapon)) + if(istype(TARGET, /obj/item)) var/obj/item/W = TARGET if(W.force >= best_force || prob((FUZZY_CHANCE_LOW+FUZZY_CHANCE_HIGH)/2)) if(!get_item_for_held_index(1) || !get_item_for_held_index(2)) @@ -1473,7 +1479,7 @@ foundFav = 1 return if(!foundFav) - if(istype(test, /obj/item/weapon)) + if(istype(test, /obj/item)) var/obj/item/R = test if(R.force > 2) // make sure we don't equip any non-weaponlike items, ie bags and stuff if(!best) @@ -1498,7 +1504,7 @@ if(istype(A, /obj/item/gun)) // guns are for shooting, not throwing. continue if(prob(robustness)) - if(istype(A, /obj/item/weapon)) + if(istype(A, /obj/item)) var/obj/item/W = A if(W.throwforce > 19) // Only throw worthwile stuff, no more lobbing wrenches at wenches npcDrop(W,1) @@ -1612,4 +1618,4 @@ TRAITS |= TRAIT_ROBUST TRAITS |= TRAIT_SMART faction += "bot_power" - ..() + ..() \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index da99954f29..55203bf2e5 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -147,7 +147,7 @@ . = ..() //See mob.dm for an explanation on this and some rage about people copypasting instead of calling ..() like they should. if(!. || !I) return - if(index && dna.species.mutanthands) + if(index && !QDELETED(src) && dna.species.mutanthands) //hand freed, fill with claws, skip if we're getting deleted. put_in_hand(new dna.species.mutanthands(), index) if(I == wear_suit) if(s_store && invdrop) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 1fcf412fc8..9d8d2b704b 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -57,6 +57,8 @@ /mob/living/carbon/human/calculate_affecting_pressure(pressure) if((wear_suit && (wear_suit.flags_1 & STOPSPRESSUREDMAGE_1)) && (head && (head.flags_1 & STOPSPRESSUREDMAGE_1))) return ONE_ATMOSPHERE + if(ismob(loc)) + return ONE_ATMOSPHERE else return pressure @@ -242,6 +244,9 @@ if(dna && (RESISTCOLD in dna.species.species_traits)) return 1 + + if(ismob(loc)) + return 1 //because lazy and being inside somemone insulates you from space temperature = max(temperature, 2.7) //There is an occasional bug where the temperature is miscalculated in ares with a small amount of gas on them, so this is necessary to ensure that that bug does not affect this calculation. Space's temperature is 2.7K and most suits that are intended to protect against any cold, protect down to 2.0K. var/thermal_protection_flags = get_cold_protection_flags(temperature) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 730a398caa..68004fe93d 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1198,6 +1198,8 @@ . += (1.5 - flight) if(H.bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT) . += (BODYTEMP_COLD_DAMAGE_LIMIT - H.bodytemperature) / COLD_SLOWDOWN_FACTOR + if(H.stat == SOFT_CRIT) + . = max(SOFTCRIT_MIN_SLOWDOWN, . + SOFTCRIT_ADD_SLOWDOWN) //regardless of how fast you are, you move at a maximum of SOFTCRIT_MIN_SLOWDOWN while in softcrit return . ////////////////// diff --git a/code/modules/mob/living/carbon/human/species_types/furrypeople.dm b/code/modules/mob/living/carbon/human/species_types/furrypeople.dm index 99206f04de..d15280790e 100644 --- a/code/modules/mob/living/carbon/human/species_types/furrypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/furrypeople.dm @@ -9,6 +9,8 @@ attack_sound = 'sound/weapons/slash.ogg' miss_sound = 'sound/weapons/slashmiss.ogg' roundstart = 1 + liked_food = MEAT | FRIED + disliked_food = TOXIC /datum/species/mammal/spec_death(gibbed, mob/living/carbon/human/H) if(H) @@ -24,12 +26,14 @@ say_mod = "chirps" default_color = "BCAC9B" species_traits = list(MUTCOLORS,EYECOLOR,LIPS,HAIR) - mutant_bodyparts = list("snout", "wings", "taur", "mam_tail", "mam_body_markings") + mutant_bodyparts = list("snout", "wings", "taur", "mam_tail", "mam_body_markings", "taur") default_features = list("snout" = "Sharp", "wings" = "None", "taur" = "None", "mam_body_markings" = "Hawk") attack_verb = "peck" attack_sound = 'sound/weapons/slash.ogg' miss_sound = 'sound/weapons/slashmiss.ogg' roundstart = 1 + liked_food = MEAT | FRUIT + disliked_food = TOXIC /datum/species/avian/spec_death(gibbed, mob/living/carbon/human/H) if(H) @@ -44,12 +48,14 @@ id = "aquatic" default_color = "BCAC9B" species_traits = list(MUTCOLORS,EYECOLOR,LIPS,HAIR) - mutant_bodyparts = list("mam_tail", "mam_body_markings", "mam_ears") + mutant_bodyparts = list("mam_tail", "mam_body_markings", "mam_ears", "taur") default_features = list("mcolor" = "FFF","mcolor2" = "FFF","mcolor3" = "FFF","mam_tail" = "shark", "mam_body_markings" = "None", "mam_ears" = "None") attack_verb = "bite" attack_sound = 'sound/weapons/bite.ogg' miss_sound = 'sound/weapons/slashmiss.ogg' roundstart = 1 + liked_food = MEAT + disliked_food = TOXIC /datum/species/aquatic/spec_death(gibbed, mob/living/carbon/human/H) if(H) @@ -64,12 +70,14 @@ id = "insect" default_color = "BCAC9B" species_traits = list(MUTCOLORS,EYECOLOR,LIPS,HAIR) - mutant_bodyparts = list("mam_body_markings", "mam_ears", "mam_tail") + mutant_bodyparts = list("mam_body_markings", "mam_ears", "mam_tail", "taur") default_features = list("mcolor" = "FFF","mcolor2" = "FFF","mcolor3" = "FFF", "mam_body_markings" = "moth", "mam_tail" = "None", "mam_ears" = "None") attack_verb = "flutter" //wat? attack_sound = 'sound/weapons/slash.ogg' miss_sound = 'sound/weapons/slashmiss.ogg' roundstart = 1 + liked_food = MEAT | FRUIT + disliked_food = TOXIC /datum/species/insect/spec_death(gibbed, mob/living/carbon/human/H) if(H) @@ -98,6 +106,7 @@ exotic_bloodtype = "L" damage_overlay_type = "xeno" roundstart = 1 + liked_food = MEAT //Praise the Omnissiah, A challange worthy of my skills - HS diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm index 1a37d1b0ed..3319895fe0 100644 --- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm @@ -10,7 +10,7 @@ damage_overlay_type = "" var/datum/action/innate/regenerate_limbs/regenerate_limbs toxic_food = NONE - liked_food = NONE + liked_food = MEAT /datum/species/jelly/on_species_loss(mob/living/carbon/C) if(regenerate_limbs) diff --git a/code/modules/mob/living/carbon/inventory.dm b/code/modules/mob/living/carbon/inventory.dm index afd4d832da..4592d76138 100644 --- a/code/modules/mob/living/carbon/inventory.dm +++ b/code/modules/mob/living/carbon/inventory.dm @@ -95,24 +95,30 @@ if(I == head) head = null - head_update(I) + if(!QDELETED(src)) + head_update(I) else if(I == back) back = null - update_inv_back() + if(!QDELETED(src)) + update_inv_back() else if(I == wear_mask) wear_mask = null - wear_mask_update(I, toggle_off = 1) + if(!QDELETED(src)) + wear_mask_update(I, toggle_off = 1) if(I == wear_neck) wear_neck = null - update_inv_neck(I) + if(!QDELETED(src)) + update_inv_neck(I) else if(I == handcuffed) handcuffed = null if(buckled && buckled.buckle_requires_restraints) buckled.unbuckle_mob(src) - update_handcuffed() + if(!QDELETED(src)) + update_handcuffed() else if(I == legcuffed) legcuffed = null - update_inv_legcuffed() + if(!QDELETED(src)) + update_inv_legcuffed() //handle stuff to update when a mob equips/unequips a mask. /mob/living/proc/wear_mask_update(obj/item/clothing/C, toggle_off = 1) diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index f1a6998523..d6d6084380 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -48,6 +48,8 @@ return if(istype(loc, /obj/machinery/atmospherics/components/unary/cryo_cell)) return + if(istype(loc, /obj/item/device/dogborg/sleeper)) + return if(ismob(loc)) return var/datum/gas_mixture/environment diff --git a/code/modules/mob/living/carbon/monkey/punpun.dm b/code/modules/mob/living/carbon/monkey/punpun.dm index b56028634f..711e771074 100644 --- a/code/modules/mob/living/carbon/monkey/punpun.dm +++ b/code/modules/mob/living/carbon/monkey/punpun.dm @@ -24,7 +24,7 @@ ..() //These have to be after the parent new to ensure that the monkey - //bodyparts are actually created before we try to equip things to + //bodyparts are actually created before we try to equip things to //those slots if(relic_hat) equip_to_slot_or_del(new relic_hat, slot_head) @@ -42,32 +42,32 @@ ..() /mob/living/carbon/monkey/punpun/proc/Read_Memory() - var/savefile/S = new /savefile("data/npc_saves/Punpun.sav") - S["ancestor_name"] >> ancestor_name - S["ancestor_chain"] >> ancestor_chain - S["relic_hat"] >> relic_hat - S["relic_mask"] >> relic_mask + var/json_file = file("data/npc_saves/Punpun.json") + if(!fexists(json_file)) + return + var/list/json = list() + json = json_decode(file2text(json_file)) + ancestor_name = json["ancestor_name"] + ancestor_chain = json["ancestor_chain"] + relic_hat = json["relic_hat"] + relic_mask = json["relic_hat"] /mob/living/carbon/monkey/punpun/proc/Write_Memory(dead, gibbed) - var/savefile/S = new /savefile("data/npc_saves/Punpun.sav") + var/json_file = file("data/npc_saves/Punpun.json") + var/list/file_data = list() if(gibbed) - WRITE_FILE(S["ancestor_name"], null) - WRITE_FILE(S["ancestor_chain"], 1) - WRITE_FILE(S["relic_hat"], null) - WRITE_FILE(S["relic_mask"], null) - return + file_data["ancestor_name"] = null + file_data["ancestor_chain"] = null + file_data["relic_hat"] = null + file_data["relic_mask"] = null if(dead) - WRITE_FILE(S["ancestor_name"], ancestor_name) - WRITE_FILE(S["ancestor_chain"], ancestor_chain + 1) - if(!ancestor_name) //new monkey name this round - WRITE_FILE(S["ancestor_name"], name) - if(head) - WRITE_FILE(S["relic_hat"], head.type) - else - WRITE_FILE(S["relic_hat"], null) - if(wear_mask) - WRITE_FILE(S["relic_mask"], wear_mask.type) - else - WRITE_FILE(S["relic_mask"], null) + file_data["ancestor_name"] = ancestor_name + file_data["ancestor_chain"] = ancestor_chain + 1 + file_data["relic_hat"] = head ? head.type : null + file_data["relic_mask"] = wear_mask ? wear_mask.type : null + if(!ancestor_name) + file_data["ancestor_name"] = name + fdel(json_file) + WRITE_FILE(json_file, json_encode(json_file)) if(!dead) - memory_saved = 1 + memory_saved = 1 \ No newline at end of file diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index cd6231094c..522bf5cf57 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -229,8 +229,8 @@ /mob/living/verb/succumb(whispered as null) set hidden = 1 if (InCritical()) - src.log_message("Has [whispered ? "whispered his final words" : "succumbed to death"] with [round(health, 0.1)] points of health!", INDIVIDUAL_ATTACK_LOG) - src.adjustOxyLoss(src.health - HEALTH_THRESHOLD_DEAD) + log_message("Has [whispered ? "whispered his final words" : "succumbed to death"] while in [InFullCritical() ? "hard":"soft"] critical with [round(health, 0.1)] points of health!", INDIVIDUAL_ATTACK_LOG) + adjustOxyLoss(health - HEALTH_THRESHOLD_DEAD) updatehealth() if(!whispered) to_chat(src, "You have given up life and succumbed to death.") @@ -241,7 +241,10 @@ return 1 /mob/living/proc/InCritical() - return (health < HEALTH_THRESHOLD_CRIT && health > HEALTH_THRESHOLD_DEAD && stat == UNCONSCIOUS) + return (health <= HEALTH_THRESHOLD_CRIT && (stat == SOFT_CRIT || stat == UNCONSCIOUS)) + +/mob/living/proc/InFullCritical() + return (health <= HEALTH_THRESHOLD_FULLCRIT && stat == UNCONSCIOUS) //This proc is used for mobs which are affected by pressure to calculate the amount of pressure that actually //affects them once clothing is factored in. ~Errorage @@ -471,31 +474,31 @@ if(MOVE_INTENT_WALK) . += config.walk_speed -/mob/living/proc/makeTrail(turf/T) +/mob/living/proc/makeTrail(turf/target_turf) if(!has_gravity()) return - var/blood_exists = 0 + var/blood_exists = FALSE - for(var/obj/effect/decal/cleanable/trail_holder/C in src.loc) //checks for blood splatter already on the floor - blood_exists = 1 - if (isturf(src.loc)) + for(var/obj/effect/decal/cleanable/trail_holder/C in loc) //checks for blood splatter already on the floor + blood_exists = TRUE + if(isturf(loc)) var/trail_type = getTrail() if(trail_type) - var/brute_ratio = round(getBruteLoss()/maxHealth, 0.1) + var/brute_ratio = round(getBruteLoss() / maxHealth, 0.1) if(blood_volume && blood_volume > max(BLOOD_VOLUME_NORMAL*(1 - brute_ratio * 0.25), 0))//don't leave trail if blood volume below a threshold blood_volume = max(blood_volume - max(1, brute_ratio * 2), 0) //that depends on our brute damage. - var/newdir = get_dir(T, src.loc) - if(newdir != src.dir) - newdir = newdir | src.dir + var/newdir = get_dir(target_turf, loc) + if(newdir != dir) + newdir = newdir | dir if(newdir == 3) //N + S newdir = NORTH else if(newdir == 12) //E + W newdir = EAST if((newdir in GLOB.cardinals) && (prob(50))) - newdir = turn(get_dir(T, src.loc), 180) + newdir = turn(get_dir(target_turf, loc), 180) if(!blood_exists) - new /obj/effect/decal/cleanable/trail_holder(src.loc) - for(var/obj/effect/decal/cleanable/trail_holder/TH in src.loc) + new /obj/effect/decal/cleanable/trail_holder(loc) + for(var/obj/effect/decal/cleanable/trail_holder/TH in loc) if((!(newdir in TH.existing_dirs) || trail_type == "trails_1" || trail_type == "trails_2") && TH.existing_dirs.len <= 16) //maximum amount of overlays is 16 (all light & heavy directions filled) TH.existing_dirs += newdir TH.add_overlay(image('icons/effects/blood.dmi', trail_type, dir = newdir)) @@ -560,7 +563,7 @@ // climbing out of a gut if(attempt_vr(src,"vore_process_resist",args)) return TRUE - + //Breaking out of a container (Locker, sleeper, cryo...) else if(isobj(loc)) var/obj/C = loc @@ -687,6 +690,7 @@ who.equip_to_slot(what, where, TRUE) /mob/living/singularity_pull(S, current_size) + ..() if(current_size >= STAGE_SIX) throw_at(S,14,3, spin=1) else @@ -946,13 +950,14 @@ //Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it. //Robots, animals and brains have their own version so don't worry about them /mob/living/proc/update_canmove() - var/ko = IsKnockdown() || IsUnconscious() || stat || (status_flags & FAKEDEATH) + var/ko = IsKnockdown() || IsUnconscious() || (stat && (stat != SOFT_CRIT || pulledby)) || (status_flags & FAKEDEATH) + var/move_and_fall = stat == SOFT_CRIT && !pulledby var/chokehold = pulledby && pulledby.grab_state >= GRAB_NECK var/buckle_lying = !(buckled && !buckled.buckle_lying) var/has_legs = get_num_legs() var/has_arms = get_num_arms() var/ignore_legs = get_leg_ignore() - if(ko || resting || has_status_effect(STATUS_EFFECT_STUN) || chokehold) + if(ko || resting || move_and_fall || IsStun() || chokehold) drop_all_held_items() unset_machine() if(pulling) @@ -965,7 +970,7 @@ else if(!lying) if(resting) fall() - else if(ko || (!has_legs && !ignore_legs) || chokehold) + else if(ko || move_and_fall || (!has_legs && !ignore_legs) || chokehold) fall(forced = 1) canmove = !(ko || resting || has_status_effect(STATUS_EFFECT_STUN) || has_status_effect(/datum/status_effect/freon) || chokehold || buckled || (!has_legs && !ignore_legs && !has_arms)) density = !lying diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index 6cb3a8daa9..f32ca97b09 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -75,3 +75,5 @@ var/datum/riding/riding_datum var/datum/language/selected_default_language + + var/last_words //used for database logging diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 68e2b150f3..63ac4a6fe7 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -145,16 +145,18 @@ GLOBAL_LIST_INIT(department_radio_keys, list( var/succumbed = FALSE - if(message_mode == MODE_WHISPER) + var/fullcrit = InFullCritical() + if((InCritical() && !fullcrit) || message_mode == MODE_WHISPER) message_range = 1 - spans |= SPAN_ITALICS + message_mode = MODE_WHISPER log_talk(src,"[key_name(src)] : [message]",LOGWHISPER) - if(in_critical) + if(fullcrit) var/health_diff = round(-HEALTH_THRESHOLD_DEAD + health) // If we cut our message short, abruptly end it with a-.. var/message_len = length(message) message = copytext(message, 1, health_diff) + "[message_len > health_diff ? "-.." : "..."]" message = Ellipsis(message, 10, 1) + last_words = message message_mode = MODE_WHISPER_CRIT succumbed = TRUE else @@ -164,7 +166,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list( if(!message) return - spans += get_spans() + spans |= get_spans() if(language) var/datum/language/L = GLOB.language_datum_instances[language] @@ -295,10 +297,10 @@ GLOBAL_LIST_INIT(department_radio_keys, list( /mob/living/proc/get_message_mode(message) var/key = copytext(message, 1, 2) - if(key == ";") - return MODE_HEADSET - else if(key == "#") + if(key == "#") return MODE_WHISPER + else if(key == ";") + return MODE_HEADSET else if(length(message) > 2 && (key in GLOB.department_radio_prefixes)) var/key_symbol = lowertext(copytext(message, 2, 3)) return GLOB.department_radio_keys[key_symbol] @@ -384,6 +386,8 @@ GLOBAL_LIST_INIT(department_radio_keys, list( /mob/living/proc/radio(message, message_mode, list/spans, language) switch(message_mode) + if(MODE_WHISPER) + return ITALICS if(MODE_R_HAND) for(var/obj/item/r_hand in get_held_items_for_side("r", all = TRUE)) if (r_hand) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 35c107b532..61bc0d5d5b 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -465,7 +465,7 @@ set category = "AI Commands" set name = "Access Robot Control" set desc = "Wirelessly control various automatic robots." - if(stat == 2) + if(stat == DEAD) return //won't work if dead if(control_disabled) @@ -585,7 +585,7 @@ cameraFollow = null var/cameralist[0] - if(stat == 2) + if(stat == DEAD) return //won't work if dead var/mob/living/silicon/ai/U = usr @@ -629,7 +629,7 @@ set category = "AI Commands" set name = "AI Status" - if(stat == 2) + if(stat == DEAD) return //won't work if dead var/list/ai_emotions = list("Very Happy", "Happy", "Neutral", "Unsure", "Confused", "Sad", "BSOD", "Blank", "Problems?", "Awesome", "Facepalm", "Friend Computer", "Dorfy", "Blue Glow", "Red Glow") var/emote = input("Please, select a status!", "AI Status", null, null) in ai_emotions @@ -652,7 +652,7 @@ set desc = "Change the default hologram available to AI to something else." set category = "AI Commands" - if(stat == 2) + if(stat == DEAD) return //won't work if dead var/input switch(alert("Would you like to select a hologram based on a crew member, an animal, or switch to a unique avatar?",,"Crew Member","Unique","Animal")) @@ -774,7 +774,7 @@ set desc = "Allows you to change settings of your radio." set category = "AI Commands" - if(stat == 2) + if(stat == DEAD) return //won't work if dead to_chat(src, "Accessing Subspace Transceiver control...") @@ -790,7 +790,7 @@ set desc = "Modify the default radio setting for your automatic announcements." set category = "AI Commands" - if(stat == 2) + if(stat == DEAD) return //won't work if dead set_autosay() diff --git a/code/modules/mob/living/silicon/ai/freelook/eye.dm b/code/modules/mob/living/silicon/ai/freelook/eye.dm index 0613cacb47..2c7d81179c 100644 --- a/code/modules/mob/living/silicon/ai/freelook/eye.dm +++ b/code/modules/mob/living/silicon/ai/freelook/eye.dm @@ -106,7 +106,7 @@ set category = "AI Commands" set name = "Toggle Camera Acceleration" - if(usr.stat == 2) + if(usr.stat == DEAD) return //won't work if dead acceleration = !acceleration to_chat(usr, "Camera acceleration has been toggled [acceleration ? "on" : "off"].") diff --git a/code/modules/mob/living/silicon/ai/laws.dm b/code/modules/mob/living/silicon/ai/laws.dm index 4a01e1dca8..0f1c078ef8 100644 --- a/code/modules/mob/living/silicon/ai/laws.dm +++ b/code/modules/mob/living/silicon/ai/laws.dm @@ -2,7 +2,7 @@ /mob/living/silicon/ai/proc/show_laws_verb() set category = "AI Commands" set name = "Show Laws" - if(usr.stat == 2) + if(usr.stat == DEAD) return //won't work if dead src.show_laws() diff --git a/code/modules/mob/living/silicon/ai/say.dm b/code/modules/mob/living/silicon/ai/say.dm index f0e079b594..02053681ae 100644 --- a/code/modules/mob/living/silicon/ai/say.dm +++ b/code/modules/mob/living/silicon/ai/say.dm @@ -1,5 +1,5 @@ /mob/living/silicon/ai/say(message, language) - if(parent && istype(parent) && parent.stat != 2) //If there is a defined "parent" AI, it is actually an AI, and it is alive, anything the AI tries to say is said by the parent instead. + if(parent && istype(parent) && parent.stat != DEAD) //If there is a defined "parent" AI, it is actually an AI, and it is alive, anything the AI tries to say is said by the parent instead. parent.say(message, language) return ..(message) @@ -71,7 +71,7 @@ set desc = "Display a list of vocal words to announce to the crew." set category = "AI Commands" - if(usr.stat == 2) + if(usr.stat == DEAD) return //won't work if dead var/dat = "Here is a list of words you can type into the 'Announcement' button to create sentences to vocally announce to everyone on the same level at you.
    \ diff --git a/code/modules/mob/living/silicon/pai/software.dm b/code/modules/mob/living/silicon/pai/software.dm index 97ac300f8e..acb74b6372 100644 --- a/code/modules/mob/living/silicon/pai/software.dm +++ b/code/modules/mob/living/silicon/pai/software.dm @@ -32,7 +32,7 @@ if(temp) left_part = temp - else if(src.stat == 2) // Show some flavor text if the pAI is dead + else if(src.stat == DEAD) // Show some flavor text if the pAI is dead left_part = "�Rr�R �a�� ��Rr����o�" right_part = "
    Program index hash not found
    " diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 4d3c468191..562b51945b 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -36,11 +36,11 @@ var/d_hud = DATA_HUD_DIAGNOSTIC //There is only one kind of diag hud var/law_change_counter = 0 - var/obj/machinery/camera/builtInCamera = null - var/updating = FALSE //portable camera camerachunk update + var/obj/machinery/camera/builtInCamera = null + var/updating = FALSE //portable camera camerachunk update /mob/living/silicon/Initialize() - . = ..() + . = ..() GLOB.silicon_mobs += src var/datum/atom_hud/data/diagnostic/diag_hud = GLOB.huds[DATA_HUD_DIAGNOSTIC] diag_hud.add_to_hud(src) @@ -56,7 +56,7 @@ /mob/living/silicon/Destroy() radio = null aicamera = null - QDEL_NULL(builtInCamera) + QDEL_NULL(builtInCamera) GLOB.silicon_mobs -= src return ..() @@ -310,7 +310,7 @@ else //For department channels, if any, given by the internal radio. for(var/key in GLOB.department_radio_keys) if(GLOB.department_radio_keys[key] == Autochan) - radiomod = key + radiomod = ":" + key break to_chat(src, "Automatic announcements [Autochan == "None" ? "will not use the radio." : "set to [Autochan]."]") diff --git a/code/modules/mob/living/simple_animal/bot/ed209bot.dm b/code/modules/mob/living/simple_animal/bot/ed209bot.dm index 584464e655..eeeadb59bc 100644 --- a/code/modules/mob/living/simple_animal/bot/ed209bot.dm +++ b/code/modules/mob/living/simple_animal/bot/ed209bot.dm @@ -3,8 +3,8 @@ desc = "A security robot. He looks less than thrilled." icon = 'icons/mob/aibots.dmi' icon_state = "ed2090" - density = TRUE - anchored = FALSE + density = TRUE + anchored = FALSE health = 100 maxHealth = 100 damage_coeff = list(BRUTE = 0.5, BURN = 0.7, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0) @@ -59,7 +59,7 @@ shot_delay = 6//Longer shot delay because JESUS CHRIST check_records = 0//Don't actively target people set to arrest arrest_type = 1//Don't even try to cuff - bot_core.req_access = list(ACCESS_MAINT_TUNNELS, ACCESS_THEATRE) + bot_core.req_access = list(ACCESS_MAINT_TUNNELS, ACCESS_THEATRE) arrest_type = 1 if((lasercolor == "b") && (name == "\improper ED-209 Security Robot"))//Picks a name if there isn't already a custome one name = pick("BLUE BALLER","SANIC","BLUE KILLDEATH MURDERBOT") @@ -83,7 +83,7 @@ ..() target = null oldtarget_name = null - anchored = FALSE + anchored = FALSE walk_to(src,0) last_found = world.time set_weapon() @@ -153,7 +153,7 @@ Auto Patrol[]"}, update_controls() /mob/living/simple_animal/bot/ed209/proc/judgement_criteria() - var/final = FALSE + var/final = FALSE if(idcheck) final = final|JUDGE_IDCHECK if(check_records) @@ -201,7 +201,7 @@ Auto Patrol[]"}, set_weapon() /mob/living/simple_animal/bot/ed209/bullet_act(obj/item/projectile/Proj) - if(istype(Proj , /obj/item/projectile/beam/laser)||istype(Proj, /obj/item/projectile/bullet)) + if(istype(Proj , /obj/item/projectile/beam/laser)||istype(Proj, /obj/item/projectile/bullet)) if((Proj.damage_type == BURN) || (Proj.damage_type == BRUTE)) if(!Proj.nodamage && Proj.damage < src.health) retaliate(Proj.firer) @@ -254,7 +254,7 @@ Auto Patrol[]"}, stun_attack(target) mode = BOT_PREP_ARREST - anchored = TRUE + anchored = TRUE target_lastloc = target.loc return @@ -288,7 +288,7 @@ Auto Patrol[]"}, if(BOT_ARREST) if(!target) - anchored = FALSE + anchored = FALSE mode = BOT_IDLE last_found = world.time frustration = 0 @@ -303,7 +303,7 @@ Auto Patrol[]"}, return else mode = BOT_PREP_ARREST - anchored = FALSE + anchored = FALSE if(BOT_START_PATROL) look_for_perp() @@ -317,7 +317,7 @@ Auto Patrol[]"}, return /mob/living/simple_animal/bot/ed209/proc/back_to_idle() - anchored = FALSE + anchored = FALSE mode = BOT_IDLE target = null last_found = world.time @@ -325,7 +325,7 @@ Auto Patrol[]"}, INVOKE_ASYNC(src, .proc/handle_automated_action) //ensure bot quickly responds /mob/living/simple_animal/bot/ed209/proc/back_to_hunt() - anchored = FALSE + anchored = FALSE frustration = 0 mode = BOT_HUNT INVOKE_ASYNC(src, .proc/handle_automated_action) //ensure bot quickly responds @@ -335,7 +335,7 @@ Auto Patrol[]"}, /mob/living/simple_animal/bot/ed209/proc/look_for_perp() if(disabled) return - anchored = FALSE + anchored = FALSE threatlevel = 0 var/judgement_criteria = judgement_criteria() for (var/mob/living/carbon/C in view(7,src)) //Let's find us a criminal @@ -464,7 +464,7 @@ Auto Patrol[]"}, new /obj/effect/temp_visual/emp(loc) var/list/mob/living/carbon/targets = new for(var/mob/living/carbon/C in view(12,src)) - if(C.stat==2) + if(C.stat==DEAD) continue targets += C if(targets.len) @@ -476,7 +476,7 @@ Auto Patrol[]"}, emagged = 2 set_weapon() shootAt(toshoot) - emagged = FALSE + emagged = FALSE set_weapon() else shootAt(toshoot) diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm index 7bbb36e11a..7b7334befc 100644 --- a/code/modules/mob/living/simple_animal/bot/medbot.dm +++ b/code/modules/mob/living/simple_animal/bot/medbot.dm @@ -250,7 +250,7 @@ oldpatient = user /mob/living/simple_animal/bot/medbot/process_scan(mob/living/carbon/human/H) - if(H.stat == 2) + if(H.stat == DEAD) return if((H == oldpatient) && (world.time < last_found + 200)) diff --git a/code/modules/mob/living/simple_animal/friendly/butterfly.dm b/code/modules/mob/living/simple_animal/friendly/butterfly.dm index 07222ade05..9c16c2a924 100644 --- a/code/modules/mob/living/simple_animal/friendly/butterfly.dm +++ b/code/modules/mob/living/simple_animal/friendly/butterfly.dm @@ -28,3 +28,6 @@ . = ..() var/newcolor = rgb(rand(0, 255), rand(0, 255), rand(0, 255)) add_atom_colour(newcolor, FIXED_COLOUR_PRIORITY) + +/mob/living/simple_animal/butterfly/bee_friendly() + return TRUE //treaty signed at the Beeneeva convention diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm index c762bca6a0..ee8a25b679 100644 --- a/code/modules/mob/living/simple_animal/friendly/cat.dm +++ b/code/modules/mob/living/simple_animal/friendly/cat.dm @@ -113,14 +113,17 @@ ..() /mob/living/simple_animal/pet/cat/Runtime/proc/Read_Memory() - var/savefile/S = new /savefile("data/npc_saves/Runtime.sav") - S["family"] >> family - + var/json_file = file("data/npc_saves/Runtime.json") + if(!fexists(json_file)) + return + var/list/json = list() + json = json_decode(file2text(json_file)) + family = json["family"] if(isnull(family)) family = list() /mob/living/simple_animal/pet/cat/Runtime/proc/Write_Memory(dead) - var/savefile/S = new /savefile("data/npc_saves/Runtime.sav") + var/json_file = file("data/npc_saves/Runtime.json") family = list() if(!dead) for(var/mob/living/simple_animal/pet/cat/kitten/C in children) @@ -130,7 +133,8 @@ family[C.type] += 1 else family[C.type] = 1 - WRITE_FILE(S["family"], family) + fdel(json_file) + WRITE_FILE(json_file, json_encode(family)) memory_saved = 1 /mob/living/simple_animal/pet/cat/Runtime/proc/Deploy_The_Cats() @@ -271,4 +275,4 @@ ..() if(L.a_intent == INTENT_HARM && L.reagents && !stat) L.reagents.add_reagent("nutriment", 0.4) - L.reagents.add_reagent("vitamin", 0.4) + L.reagents.add_reagent("vitamin", 0.4) \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/friendly/dog.dm b/code/modules/mob/living/simple_animal/friendly/dog.dm index 5a6b00489e..a6db2dc0b5 100644 --- a/code/modules/mob/living/simple_animal/friendly/dog.dm +++ b/code/modules/mob/living/simple_animal/friendly/dog.dm @@ -328,33 +328,37 @@ ..() /mob/living/simple_animal/pet/dog/corgi/Ian/proc/Read_Memory() - var/savefile/S = new /savefile("data/npc_saves/Ian.sav") - S["age"] >> age - S["record_age"] >> record_age - S["saved_head"] >> saved_head - + var/json_file = file("data/npc_saves/Ian.json") + if(!fexists(json_file)) + return + var/list/json = list() + json = json_decode(file2text(json_file)) + age = json["age"] + record_age = json["record_age"] + saved_head = json["saved_head"] if(isnull(age)) age = 0 if(isnull(record_age)) record_age = 1 - if(saved_head) place_on_head(new saved_head) /mob/living/simple_animal/pet/dog/corgi/Ian/proc/Write_Memory(dead) - var/savefile/S = new /savefile("data/npc_saves/Ian.sav") + var/json_file = file("data/npc_saves/Ian.json") + var/list/file_data = list() if(!dead) - WRITE_FILE(S["age"], age + 1) + file_data["age"] = age + 1 if((age + 1) > record_age) - WRITE_FILE(S["record_age"], record_age + 1) + file_data["record_age"] = record_age + 1 if(inventory_head) - WRITE_FILE(S["saved_head"], inventory_head.type) + file_data["saved_head"] = inventory_head.type else - WRITE_FILE(S["age"], 0) - WRITE_FILE(S["saved_head"], null) + file_data["age"] = 0 + file_data["saved_head"] = null + fdel(json_file) + WRITE_FILE(json_file, json_encode(file_data)) memory_saved = 1 - /mob/living/simple_animal/pet/dog/corgi/Ian/Life() ..() @@ -565,4 +569,4 @@ emote("me", 1, "yaps happily!") else if(M && stat != DEAD) // Same check here, even though emote checks it as well (poor form to check it only in the help case) - emote("me", 1, "growls!") + emote("me", 1, "growls!") \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/friendly/drone/verbs.dm b/code/modules/mob/living/simple_animal/friendly/drone/verbs.dm index 18bd4cc3b0..49faea14b3 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/verbs.dm +++ b/code/modules/mob/living/simple_animal/friendly/drone/verbs.dm @@ -15,6 +15,10 @@ /mob/living/simple_animal/drone/verb/toggle_light() set category = "Drone" set name = "Toggle drone light" + + if(stat == DEAD) + to_chat(src, "There's no light in your life... by that I mean you're dead.") + return if(light_on) set_light(0) else diff --git a/code/modules/mob/living/simple_animal/friendly/penguin.dm b/code/modules/mob/living/simple_animal/friendly/penguin.dm index fdec7e7b47..1fa0fd53b8 100644 --- a/code/modules/mob/living/simple_animal/friendly/penguin.dm +++ b/code/modules/mob/living/simple_animal/friendly/penguin.dm @@ -24,11 +24,17 @@ butcher_results = list() gold_core_spawnable = 2 +/mob/living/simple_animal/pet/penguin/emperor/shamebrero + name = "Shamebrero penguin." + desc = "Shameful of all he surveys." + icon_state = "penguin_shamebrero" + icon_living = "penguin_shamebrero" + /mob/living/simple_animal/pet/penguin/baby speak = list("gah", "noot noot", "noot!", "noot", "squeee!", "noo!") name = "Penguin chick" real_name = "penguin" - desc = "Can't fly and can barely waddles, but the prince of all chicks." + desc = "Can't fly and barely waddles, yet the prince of all chicks." icon_state = "penguin_baby" icon_living = "penguin_baby" icon_dead = "penguin_baby_dead" diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm index 1f1f937d9a..637b0f456a 100644 --- a/code/modules/mob/living/simple_animal/guardian/guardian.dm +++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm @@ -57,7 +57,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians ..() /mob/living/simple_animal/hostile/guardian/med_hud_set_health() - if(summoner) + if(!QDELETED(summoner)) var/image/holder = hud_list[HEALTH_HUD] holder.icon_state = "hud[RoundHealth(summoner)]" diff --git a/code/modules/mob/living/simple_animal/hostile/bosses/boss.dm b/code/modules/mob/living/simple_animal/hostile/bosses/boss.dm index 154afc47bc..cc81367196 100644 --- a/code/modules/mob/living/simple_animal/hostile/bosses/boss.dm +++ b/code/modules/mob/living/simple_animal/hostile/bosses/boss.dm @@ -2,7 +2,7 @@ name = "A Perfectly Generic Boss Placeholder" desc = "" robust_searching = 1 - stat_attack = 1 + stat_attack = UNCONSCIOUS status_flags = 0 a_intent = INTENT_HARM gender = NEUTER diff --git a/code/modules/mob/living/simple_animal/hostile/faithless.dm b/code/modules/mob/living/simple_animal/hostile/faithless.dm index 4be957d771..68e6745c8d 100644 --- a/code/modules/mob/living/simple_animal/hostile/faithless.dm +++ b/code/modules/mob/living/simple_animal/hostile/faithless.dm @@ -15,7 +15,7 @@ speed = 0 maxHealth = 80 health = 80 - stat_attack = 1 + stat_attack = UNCONSCIOUS robust_searching = 1 harm_intent_damage = 10 diff --git a/code/modules/mob/living/simple_animal/hostile/headcrab.dm b/code/modules/mob/living/simple_animal/hostile/headcrab.dm index 5f2c011665..2839ac5ea0 100644 --- a/code/modules/mob/living/simple_animal/hostile/headcrab.dm +++ b/code/modules/mob/living/simple_animal/hostile/headcrab.dm @@ -15,7 +15,7 @@ attack_sound = 'sound/weapons/bite.ogg' faction = list("creature") robust_searching = 1 - stat_attack = 2 + stat_attack = DEAD obj_damage = 0 environment_smash = ENVIRONMENT_SMASH_NONE speak_emote = list("squeaks") diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index 7b4fe44d37..866f9c995a 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -28,6 +28,9 @@ var/ranged_message = "fires" //Fluff text for ranged mobs var/ranged_cooldown = 0 //What the current cooldown on ranged attacks is, generally world.time + ranged_cooldown_time var/ranged_cooldown_time = 30 //How long, in deciseconds, the cooldown of ranged attacks is + var/ranged_telegraph = "prepares to fire at *TARGET*!" //A message shown when the mob prepares to fire; use *TARGET* if you want to show the target's name + var/ranged_telegraph_sound //A sound played when the mob prepares to fire + var/ranged_telegraph_time = 0 //In deciseconds, how long between the telegraph and ranged shot var/ranged_ignores_vision = FALSE //if it'll fire ranged attacks even if it lacks vision on its target, only works with environment smash var/check_friendly_fire = 0 // Should the ranged mob check for friendlies when shooting var/retreat_distance = null //If our mob runs from players when they're too close, set in tile distance. By default, mobs do not retreat. @@ -43,8 +46,8 @@ var/search_objects_timer_id //Timer for regaining our old search_objects value after being attacked var/search_objects_regain_time = 30 //the delay between being attacked and gaining our old search_objects value back var/list/wanted_objects = list() //A typecache of objects types that will be checked against to attack, should we have search_objects enabled - var/stat_attack = 0 //Mobs with stat_attack to 1 will attempt to attack things that are unconscious, Mobs with stat_attack set to 2 will attempt to attack the dead. - var/stat_exclusive = 0 //Mobs with this set to 1 will exclusively attack things defined by stat_attack, stat_attack 2 means they will only attack corpses + var/stat_attack = CONSCIOUS //Mobs with stat_attack to UNCONSCIOUS will attempt to attack things that are unconscious, Mobs with stat_attack set to 2 will attempt to attack the dead. + var/stat_exclusive = FALSE //Mobs with this set to TRUE will exclusively attack things defined by stat_attack, stat_attack 2 means they will only attack corpses var/attack_same = 0 //Set us to 1 to allow us to attack our own faction, or 2, to only ever attack our own faction var/AIStatus = AI_ON //The Status of our AI, can be set to AI_ON (On, usual processing), AI_IDLE (Will not process, but will return to AI_ON if an enemy comes near), AI_OFF (Off, Not processing ever) var/atom/targets_from = null //all range/attack/etc. calculations should be done from this atom, defaults to the mob itself, useful for Vehicles and such @@ -171,7 +174,7 @@ var/mob/living/L = the_target var/faction_check = faction_check_mob(L) if(robust_searching) - if(L.stat > stat_attack || L.stat != stat_attack && stat_exclusive == 1) + if(L.stat > stat_attack || L.stat != stat_attack && stat_exclusive) return 0 if(faction_check && !attack_same || !faction_check && attack_same == 2) return 0 @@ -232,7 +235,14 @@ var/target_distance = get_dist(targets_from,target) if(ranged) //We ranged? Shoot at em if(!target.Adjacent(targets_from) && ranged_cooldown <= world.time) //But make sure they're not in range for a melee attack and our range attack is off cooldown - OpenFire(target) + if(!ranged_telegraph_time || client) + OpenFire(target) + else + if(ranged_telegraph) + visible_message("[src] [replacetext(ranged_telegraph, "*TARGET*", "[target]")]") + if(ranged_telegraph_sound) + playsound(src, ranged_telegraph_sound, 75, FALSE) + addtimer(CALLBACK(src, .proc/OpenFire, target), ranged_telegraph_time) if(!Process_Spacemove()) //Drifting walk(src,0) return 1 diff --git a/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm b/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm index 491aca3233..de8545d3f0 100644 --- a/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm +++ b/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm @@ -19,7 +19,7 @@ pixel_x = -16 layer = LARGE_MOB_LAYER speed = 10 - stat_attack = 1 + stat_attack = UNCONSCIOUS robust_searching = 1 var/hopping = FALSE var/hop_cooldown = 0 //Strictly for player controlled leapers diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm index fd92cc17ff..ab39c35413 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm @@ -277,19 +277,24 @@ Difficulty: Very Hard WriteMemory() /obj/machinery/smartfridge/black_box/proc/WriteMemory() - var/savefile/S = new /savefile("data/npc_saves/Blackbox.sav") + var/json_file = file("data/npc_saves/Blackbox.json") stored_items = list() for(var/obj/O in (contents-component_parts)) stored_items += O.type - - WRITE_FILE(S["stored_items"], stored_items) + var/list/file_data = list() + file_data["data"] = stored_items + fdel(json_file) + WRITE_FILE(json_file, json_encode(file_data)) memory_saved = TRUE /obj/machinery/smartfridge/black_box/proc/ReadMemory() - var/savefile/S = new /savefile("data/npc_saves/Blackbox.sav") - S["stored_items"] >> stored_items - + var/json_file = file("data/npc_saves/Blackbox.json") + if(!fexists(json_file)) + return + var/list/json = list() + json = json_decode(file2text(json_file)) + stored_items = json["data"] if(isnull(stored_items)) stored_items = list() @@ -782,4 +787,4 @@ Difficulty: Very Hard #undef ACTIVATE_WEAPON #undef ACTIVATE_MAGIC -#undef MEDAL_PREFIX +#undef MEDAL_PREFIX \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm index c214ee0490..02ca4a4e26 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm @@ -16,7 +16,7 @@ movement_type = FLYING robust_searching = 1 ranged_ignores_vision = TRUE - stat_attack = 2 + stat_attack = DEAD atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0) damage_coeff = list(BRUTE = 1, BURN = 0.5, TOX = 1, CLONE = 1, STAMINA = 0, OXY = 1) minbodytemp = 0 diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm index 28bc25fd0d..14b8056af6 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm @@ -14,6 +14,9 @@ ranged = 1 ranged_message = "stares" ranged_cooldown_time = 30 + ranged_telegraph = "gathers energy and stares at *TARGET*!" + ranged_telegraph_sound = 'sound/magic/magic_missile.ogg' + ranged_telegraph_time = 7 throw_message = "does nothing against the hard shell of" vision_range = 2 speed = 3 @@ -70,9 +73,11 @@ melee_damage_lower = 15 melee_damage_upper = 15 attacktext = "impales" + ranged_telegraph = "fixates on *TARGET* as its eye shines blue!" + ranged_telegraph_sound = 'sound/magic/tail_swing.ogg' + ranged_telegraph_time = 5 a_intent = INTENT_HARM speak_emote = list("telepathically cries") - attack_sound = 'sound/weapons/bladeslice.ogg' stat_attack = UNCONSCIOUS movement_type = FLYING robust_searching = 1 @@ -80,5 +85,35 @@ loot = list() butcher_results = list(/obj/item/ore/diamond = 2, /obj/item/stack/sheet/sinew = 2, /obj/item/stack/sheet/bone = 1) +/mob/living/simple_animal/hostile/asteroid/basilisk/watcher/make_shiny() + if(prob(75)) + name = "magmawing watcher" + real_name = name + desc = "When raised very close to lava, some watchers adapt to the extreme heat and change coloration. Such watchers are known as magmawings and use intense heat as their tool for hunting and defense." + icon_state = "watcher_magmawing" + icon_living = "watcher_magmawing" + icon_aggro = "watcher_magmawing" + icon_dead = "watcher_magmawing_dead" + maxHealth = 215 //Compensate for the lack of slowdown on projectiles with a bit of extra health + health = 215 + projectiletype = /obj/item/projectile/temp/basilisk/magmawing + else + name = "icewing watcher" + real_name = name + desc = "Very rarely, some watchers will eke out an existence far from heat sources. In the absence of warmth, their wings will become papery and turn to an icy blue; these watchers are fragile but much quicker to fire their trademark freezing blasts." + icon_state = "watcher_icewing" + icon_living = "watcher_icewing" + icon_aggro = "watcher_icewing" + icon_dead = "watcher_icewing_dead" + maxHealth = 150 + health = 150 + ranged_cooldown_time = 20 + butcher_results = list(/obj/item/ore/diamond = 5, /obj/item/stack/sheet/bone = 1) //No sinew; the wings are too fragile to be usable + +/obj/item/projectile/temp/basilisk/magmawing + name = "scorching blast" + icon_state = "gaussstrong" + temperature = 500 //Heats you up! + /mob/living/simple_animal/hostile/asteroid/basilisk/watcher/tendril fromtendril = TRUE diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/goliath.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/goliath.dm index 1d2ab6b6f2..598b6c8ff0 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/goliath.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/goliath.dm @@ -31,6 +31,7 @@ var/pre_attack = 0 var/pre_attack_icon = "Goliath_preattack" loot = list(/obj/item/stack/sheet/animalhide/goliath_hide) + butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab/goliath = 2, /obj/item/stack/sheet/animalhide/goliath_hide = 1, /obj/item/stack/sheet/bone = 2) /mob/living/simple_animal/hostile/asteroid/goliath/Life() ..() @@ -86,14 +87,28 @@ throw_message = "does nothing to the tough hide of the" pre_attack_icon = "goliath2" crusher_loot = /obj/item/crusher_trophy/goliath_tentacle - butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab/goliath = 2, /obj/item/stack/sheet/animalhide/goliath_hide = 1, /obj/item/stack/sheet/bone = 2) loot = list() stat_attack = UNCONSCIOUS robust_searching = 1 +/mob/living/simple_animal/hostile/asteroid/goliath/make_shiny() + name = "precursor goliath" + real_name = name + desc = "Due to their stone hide, goliaths are biologically immortal, although future generations evolved to look much different. This goliath is likely a very early ancestor to many others here, and at least several centuries old." + icon_state = "Goliath" + icon_living = "Goliath" + icon_aggro = "Goliath_alert" + icon_dead = "Goliath_dead" + pre_attack_icon = "Goliath_preattack" + throw_message = "does nothing to the rocky hide of the" + loot = list(/obj/item/stack/sheet/animalhide/goliath_hide) //A throwback to the asteroid days + /mob/living/simple_animal/hostile/asteroid/goliath/beast/tendril fromtendril = TRUE +/mob/living/simple_animal/hostile/asteroid/goliath/beast/tendril/make_shiny() + return //Precursor goliaths don't come from tendrils! + //tentacles /obj/effect/goliath_tentacle name = "Goliath tentacle" diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/hivelord.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/hivelord.dm index c13b63115d..81e675106e 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/hivelord.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/hivelord.dm @@ -110,8 +110,21 @@ del_on_death = 1 stat_attack = UNCONSCIOUS robust_searching = 1 + shiny_chance = 5 var/mob/living/carbon/human/stored_mob +/mob/living/simple_animal/hostile/asteroid/hivelord/legion/make_shiny() + name = "dwarf legion" + real_name = name + desc = "On the rare occasion that a human with dwarfism falls to a legion, they can become infested like any other." + icon_state = "dwarf_legion" + icon_living = "dwarf_legion" + icon_aggro = "dwarf_legion" + icon_dead = "dwarf_legion" + maxHealth = 60 + health = 60 + speed = 2 //faster! + /mob/living/simple_animal/hostile/asteroid/hivelord/legion/death(gibbed) visible_message("The skulls on [src] wail in anger as they flee from their dying host!") var/turf/T = get_turf(src) @@ -170,11 +183,13 @@ H.adjustBruteLoss(1000) L.stored_mob = H H.forceMove(L) + if(H.dna.check_mutation(DWARFISM)) + L.make_shiny() //dwarf legions aren't just fluff! qdel(src) //Advanced Legion is slightly tougher to kill and can raise corpses (revive other legions) /mob/living/simple_animal/hostile/asteroid/hivelord/legion/advanced - stat_attack = 2 + stat_attack = DEAD maxHealth = 120 health = 120 brood_type = /mob/living/simple_animal/hostile/asteroid/hivelordbrood/legion/advanced @@ -184,7 +199,7 @@ icon_dead = "dwarf_legion" /mob/living/simple_animal/hostile/asteroid/hivelordbrood/legion/advanced - stat_attack = 2 + stat_attack = DEAD can_infest_dead = TRUE //Legion that spawns Legions diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/mining_mobs.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/mining_mobs.dm index 5788a6fdc6..3fd48c18f5 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/mining_mobs.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/mining_mobs.dm @@ -15,15 +15,22 @@ a_intent = INTENT_HARM var/crusher_loot var/throw_message = "bounces off of" - var/icon_aggro = null // for swapping to when we get aggressive var/fromtendril = FALSE see_in_dark = 8 lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE mob_size = MOB_SIZE_LARGE + var/icon_aggro = null + var/shiny = FALSE //If this mob is a much rarer version of its normal self + var/shiny_chance = 1 //If this chance passes, the mob will somehow be different from normal ones /mob/living/simple_animal/hostile/asteroid/Initialize(mapload) . = ..() apply_status_effect(STATUS_EFFECT_CRUSHERDAMAGETRACKING) + if(prob(shiny_chance)) + shiny = TRUE + make_shiny() + +/mob/living/simple_animal/hostile/asteroid/proc/make_shiny() //Override this on a per-mob basis /mob/living/simple_animal/hostile/asteroid/Aggro() ..() @@ -57,7 +64,7 @@ /mob/living/simple_animal/hostile/asteroid/death(gibbed) SSblackbox.add_details("mobs_killed_mining","[src.type]") var/datum/status_effect/crusher_damage/C = has_status_effect(STATUS_EFFECT_CRUSHERDAMAGETRACKING) - if(C && crusher_loot && prob((C.total_damage/maxHealth)) * 5) //on average, you'll need to kill 20 creatures before getting the item + if(C && crusher_loot && prob(((C.total_damage/maxHealth)) * 5) + shiny) //on average, you'll need to kill 20 creatures before getting the item spawn_crusher_loot() ..(gibbed) diff --git a/code/modules/mob/living/simple_animal/hostile/mushroom.dm b/code/modules/mob/living/simple_animal/hostile/mushroom.dm index e51c4d3f29..ba2a0f3702 100644 --- a/code/modules/mob/living/simple_animal/hostile/mushroom.dm +++ b/code/modules/mob/living/simple_animal/hostile/mushroom.dm @@ -21,7 +21,7 @@ attack_sound = 'sound/weapons/bite.ogg' faction = list("mushroom") environment_smash = ENVIRONMENT_SMASH_NONE - stat_attack = 2 + stat_attack = DEAD mouse_opacity = MOUSE_OPACITY_ICON speed = 1 ventcrawler = VENTCRAWLER_ALWAYS diff --git a/code/modules/mob/living/simple_animal/hostile/nanotrasen.dm b/code/modules/mob/living/simple_animal/hostile/nanotrasen.dm index de69f623bd..0d4021400c 100644 --- a/code/modules/mob/living/simple_animal/hostile/nanotrasen.dm +++ b/code/modules/mob/living/simple_animal/hostile/nanotrasen.dm @@ -12,7 +12,7 @@ response_disarm = "shoves" response_harm = "hits" speed = 0 - stat_attack = 1 + stat_attack = UNCONSCIOUS robust_searching = 1 maxHealth = 100 health = 100 diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/spaceman.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/spaceman.dm index 96d9087459..d6d46b1a46 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/spaceman.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/spaceman.dm @@ -36,7 +36,7 @@ response_disarm = "shoves" response_harm = "hits" speed = 0 - stat_attack = 1 + stat_attack = UNCONSCIOUS robust_searching = 1 vision_range = 3 maxHealth = 100 diff --git a/code/modules/mob/living/simple_animal/hostile/skeleton.dm b/code/modules/mob/living/simple_animal/hostile/skeleton.dm index f2f4cd7d0b..3a3cfbb27d 100644 --- a/code/modules/mob/living/simple_animal/hostile/skeleton.dm +++ b/code/modules/mob/living/simple_animal/hostile/skeleton.dm @@ -24,7 +24,7 @@ atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0) unsuitable_atmos_damage = 10 robust_searching = 1 - stat_attack = 1 + stat_attack = UNCONSCIOUS gold_core_spawnable = 1 faction = list("skeleton") see_in_dark = 8 diff --git a/code/modules/mob/living/simple_animal/hostile/stickman.dm b/code/modules/mob/living/simple_animal/hostile/stickman.dm index 23921ed1f5..fd66b8d0ae 100644 --- a/code/modules/mob/living/simple_animal/hostile/stickman.dm +++ b/code/modules/mob/living/simple_animal/hostile/stickman.dm @@ -12,7 +12,7 @@ response_disarm = "shoves" response_harm = "hits" speed = 0 - stat_attack = 1 + stat_attack = UNCONSCIOUS robust_searching = 1 environment_smash = ENVIRONMENT_SMASH_NONE maxHealth = 100 diff --git a/code/modules/mob/living/simple_animal/hostile/syndicate.dm b/code/modules/mob/living/simple_animal/hostile/syndicate.dm index ef109758e8..7cadba01d9 100644 --- a/code/modules/mob/living/simple_animal/hostile/syndicate.dm +++ b/code/modules/mob/living/simple_animal/hostile/syndicate.dm @@ -23,7 +23,7 @@ response_disarm = "shoves" response_harm = "hits" speed = 0 - stat_attack = 1 + stat_attack = UNCONSCIOUS robust_searching = 1 maxHealth = 100 health = 100 diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index 66fbc8af8c..9e347e3b7a 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -924,22 +924,28 @@ ..(gibbed) /mob/living/simple_animal/parrot/Poly/proc/Read_Memory() - var/savefile/S = new /savefile("data/npc_saves/Poly.sav") - S["phrases"] >> speech_buffer - S["roundssurvived"] >> rounds_survived - S["longestsurvival"] >> longest_survival - S["longestdeathstreak"] >> longest_deathstreak - + var/json_file = file("data/npc_saves/Poly.json") + if(!fexists(json_file)) + return + var/list/json = list() + json = json_decode(file2text(json_file)) + speech_buffer = json["phrases"] + rounds_survived = json["roundssurvived"] + longest_survival = json["longestsurvival"] + longest_deathstreak = json["longestdeathstreak"] if(!islist(speech_buffer)) speech_buffer = list() /mob/living/simple_animal/parrot/Poly/proc/Write_Memory() - var/savefile/S = new /savefile("data/npc_saves/Poly.sav") + var/json_file = file("data/npc_saves/Poly.json") + var/list/file_data = list() if(islist(speech_buffer)) - WRITE_FILE(S["phrases"], speech_buffer) - WRITE_FILE(S["roundssurvived"], rounds_survived) - WRITE_FILE(S["longestsurvival"], longest_survival) - WRITE_FILE(S["longestdeathstreak"], longest_deathstreak) + file_data["phrases"] = speech_buffer + file_data["roundssurvived"] = rounds_survived + file_data["longestsurvival"] = longest_survival + file_data["longestdeathstreak"] = longest_deathstreak + fdel(json_file) + WRITE_FILE(json_file, json_encode(file_data)) memory_saved = 1 /mob/living/simple_animal/parrot/Poly/ghost diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 297f788001..a759bb89ec 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -438,7 +438,7 @@ if (!( GLOB.abandon_allowed )) return - if ((stat != 2 || !( SSticker ))) + if ((stat != DEAD || !( SSticker ))) to_chat(usr, "You must be dead to use this!") return @@ -491,7 +491,7 @@ var/t1 = text("window=[href_list["mach_close"]]") unset_machine() src << browse(null, t1) - + if(href_list["flavor_more"]) usr << browse(text("[][]", name, replacetext(flavor_text, "\n", "
    ")), text("window=[];size=500x200", name)) onclose(usr, "[name]") @@ -587,7 +587,7 @@ var/turf/T = get_turf(client.eye) stat("Location:", COORD(T)) stat("CPU:", "[world.cpu]") - stat("Instances:", "[world.contents.len]") + stat("Instances:", "[num2text(world.contents.len, 10)]") GLOB.stat_entry() config.stat_entry() stat(null) diff --git a/code/modules/mob/status_procs.dm b/code/modules/mob/status_procs.dm index bd938cf598..80ab6929d5 100644 --- a/code/modules/mob/status_procs.dm +++ b/code/modules/mob/status_procs.dm @@ -146,7 +146,7 @@ var/old_eye_blind = eye_blind eye_blind = max(eye_blind, amount) if(!old_eye_blind) - if(stat == CONSCIOUS) + if(stat == CONSCIOUS || stat == SOFT_CRIT) throw_alert("blind", /obj/screen/alert/blind) overlay_fullscreen("blind", /obj/screen/fullscreen/blind) @@ -155,12 +155,12 @@ var/old_eye_blind = eye_blind eye_blind += amount if(!old_eye_blind) - if(stat == CONSCIOUS) + if(stat == CONSCIOUS || stat == SOFT_CRIT) throw_alert("blind", /obj/screen/alert/blind) overlay_fullscreen("blind", /obj/screen/fullscreen/blind) else if(eye_blind) var/blind_minimum = 0 - if(stat != CONSCIOUS || (disabilities & BLIND)) + if((stat != CONSCIOUS && stat != SOFT_CRIT) || (disabilities & BLIND)) blind_minimum = 1 eye_blind = max(eye_blind+amount, blind_minimum) if(!eye_blind) @@ -172,12 +172,12 @@ var/old_eye_blind = eye_blind eye_blind = amount if(client && !old_eye_blind) - if(stat == CONSCIOUS) + if(stat == CONSCIOUS || stat == SOFT_CRIT) throw_alert("blind", /obj/screen/alert/blind) overlay_fullscreen("blind", /obj/screen/fullscreen/blind) else if(eye_blind) var/blind_minimum = 0 - if(stat != CONSCIOUS || (disabilities & BLIND)) + if((stat != CONSCIOUS && stat != SOFT_CRIT) || (disabilities & BLIND)) blind_minimum = 1 eye_blind = blind_minimum if(!eye_blind) diff --git a/code/modules/modular_computers/computers/item/computer.dm b/code/modules/modular_computers/computers/item/computer.dm index c0db06f730..95e78391bb 100644 --- a/code/modules/modular_computers/computers/item/computer.dm +++ b/code/modules/modular_computers/computers/item/computer.dm @@ -13,7 +13,6 @@ var/last_battery_percent = 0 // Used for deciding if battery percentage has chandged var/last_world_time = "00:00" var/list/last_header_icons - var/emagged = FALSE // Whether the computer is emagged. var/base_active_power_usage = 50 // Power usage when the computer is open (screen is active) and can be interacted with. Remember hardware can use power too. var/base_idle_power_usage = 5 // Power usage when the computer is idle and screen is off (currently only applies to laptops) diff --git a/code/modules/modular_computers/file_system/programs/sm_monitor.dm b/code/modules/modular_computers/file_system/programs/sm_monitor.dm index d62907f026..c12c83aaed 100644 --- a/code/modules/modular_computers/file_system/programs/sm_monitor.dm +++ b/code/modules/modular_computers/file_system/programs/sm_monitor.dm @@ -5,7 +5,7 @@ program_icon_state = "smmon_0" extended_desc = "This program connects to specially calibrated supermatter sensors to provide information on the status of supermatter-based engines." requires_ntnet = TRUE - transfer_access = ACCESS_ENGINE + transfer_access = ACCESS_CONSTRUCTION network_destination = "supermatter monitoring system" size = 5 tgui_id = "ntos_supermatter_monitor" diff --git a/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm b/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm index 76cacc00ef..270e1f106f 100644 --- a/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm +++ b/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm @@ -12,90 +12,72 @@ It is possible to destroy the net by the occupant or someone else. density = TRUE//Can't pass through. opacity = 0//Can see through. mouse_opacity = MOUSE_OPACITY_ICON//So you can hit it with stuff. - anchored = TRUE//Can't drag/grab the trapped mob. + anchored = TRUE//Can't drag/grab the net. layer = ABOVE_ALL_MOB_LAYER max_integrity = 25 //How much health it has. - var/mob/living/affecting = null//Who it is currently affecting, if anyone. - var/mob/living/master = null//Who shot web. Will let this person know if the net was successful or failed. - + can_buckle = 1 + buckle_lying = 0 + buckle_prevents_pull = TRUE + var/mob/living/carbon/affecting//Who it is currently affecting, if anyone. + var/mob/living/carbon/master//Who shot web. Will let this person know if the net was successful or failed. + var/check = 15//30 seconds before teleportation. Could be extended I guess. + var/success = FALSE /obj/structure/energy_net/play_attack_sound(damage, damage_type = BRUTE, damage_flag = 0) switch(damage_type) if(BRUTE) - playsound(src.loc, 'sound/weapons/slash.ogg', 80, 1) + playsound(src, 'sound/weapons/slash.ogg', 80, 1) if(BURN) - playsound(src.loc, 'sound/weapons/slash.ogg', 80, 1) + playsound(src, 'sound/weapons/slash.ogg', 80, 1) /obj/structure/energy_net/Destroy() - if(affecting) - var/mob/living/carbon/M = affecting - M.anchored = FALSE - for(var/mob/O in viewers(src, 3)) - O.show_message("[M.name] was recovered from the energy net!", 1, "You hear a grunt.", 2) - if(master)//As long as they still exist. + if(!success) + if(!QDELETED(affecting)) + affecting.visible_message("[affecting.name] was recovered from the energy net!", "You were recovered from the energy net!", "You hear a grunt.") + if(!QDELETED(master))//As long as they still exist. to_chat(master, "ERROR: unable to initiate transport protocol. Procedure terminated.") return ..() -/obj/structure/energy_net/process(mob/living/carbon/M) - var/check = 30//30 seconds before teleportation. Could be extended I guess. - var/mob_name = affecting.name//Since they will report as null if terminated before teleport. - //The person can still try and attack the net when inside. - - M.notransform = 1 //No moving for you! - - while(!isnull(M)&&!isnull(src)&&check>0)//While M and net exist, and 30 seconds have not passed. - check-- - sleep(10) - - if(isnull(M)||M.loc!=loc)//If mob is gone or not at the location. - if(!isnull(master))//As long as they still exist. - to_chat(master, "ERROR: unable to locate \the [mob_name]. Procedure terminated.") +/obj/structure/energy_net/process() + if(QDELETED(affecting)||affecting.loc!=loc) qdel(src)//Get rid of the net. - M.notransform = 0 return - if(!isnull(src))//As long as both net and person exist. - //No need to check for countdown here since while() broke, it's implicit that it finished. + if(check>0) + check-- + return - density = FALSE//Make the net pass-through. - invisibility = INVISIBILITY_ABSTRACT//Make the net invisible so all the animations can play out. - resistance_flags |= INDESTRUCTIBLE //Make the net invincible so that an explosion/something else won't kill it while, spawn() is running. - for(var/obj/item/W in M) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(W == H.w_uniform) - continue//So all they're left with are shoes and uniform. - if(W == H.shoes) - continue - M.dropItemToGround(W) + success = TRUE + qdel(src) + if(ishuman(affecting)) + var/mob/living/carbon/human/H = affecting + for(var/obj/item/W in H) + if(W == H.w_uniform) + continue//So all they're left with are shoes and uniform. + if(W == H.shoes) + continue + H.dropItemToGround(W) - playsound(M.loc, 'sound/effects/sparks4.ogg', 50, 1) - new /obj/effect/temp_visual/dir_setting/ninja/phase/out(get_turf(M), M.dir) - - visible_message("[M] suddenly vanishes!") - M.forceMove(pick(GLOB.holdingfacility)) //Throw mob in to the holding facility. - to_chat(M, "You appear in a strange place!") - - if(!isnull(master))//As long as they still exist. - to_chat(master, "SUCCESS: transport procedure of \the [affecting] complete.") - M.notransform = 0 - var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() - spark_system.set_up(5, 0, M.loc) - spark_system.start() - playsound(M.loc, 'sound/effects/phasein.ogg', 25, 1) - playsound(M.loc, 'sound/effects/sparks2.ogg', 50, 1) - new /obj/effect/temp_visual/dir_setting/ninja/phase(get_turf(M), M.dir) - qdel(src) - - else//And they are free. - to_chat(M, "You are free of the net!") - M.notransform = 0 - return + playsound(affecting, 'sound/effects/sparks4.ogg', 50, 1) + new /obj/effect/temp_visual/dir_setting/ninja/phase/out(affecting.drop_location(), affecting.dir) + visible_message("[affecting] suddenly vanishes!") + affecting.forceMove(pick(GLOB.holdingfacility)) //Throw mob in to the holding facility. + to_chat(affecting, "You appear in a strange place!") + if(!QDELETED(master))//As long as they still exist. + to_chat(master, "SUCCESS: transport procedure of [affecting] complete.") + do_sparks(5, FALSE, affecting) + playsound(affecting, 'sound/effects/phasein.ogg', 25, 1) + playsound(affecting, 'sound/effects/sparks2.ogg', 50, 1) + new /obj/effect/temp_visual/dir_setting/ninja/phase(affecting.drop_location(), affecting.dir) /obj/structure/energy_net/attack_paw(mob/user) return attack_hand() +/obj/structure/energy_net/user_buckle_mob(mob/living/M, mob/living/user) + return//We only want our target to be buckled +/obj/structure/energy_net/user_unbuckle_mob(mob/living/buckled_mob, mob/living/user) + return//The net must be destroyed to free the target diff --git a/code/modules/ninja/suit/n_suit_verbs/ninja_adrenaline.dm b/code/modules/ninja/suit/n_suit_verbs/ninja_adrenaline.dm index 71f8166339..6c0dddf88b 100644 --- a/code/modules/ninja/suit/n_suit_verbs/ninja_adrenaline.dm +++ b/code/modules/ninja/suit/n_suit_verbs/ninja_adrenaline.dm @@ -2,20 +2,19 @@ //Movement impairing would indicate drugs and the like. /obj/item/clothing/suit/space/space_ninja/proc/ninjaboost() - if(!ninjacost(0,N_ADRENALINE))//Have to make sure stat is not counted for this ability. + if(!ninjacost(0,N_ADRENALINE)) var/mob/living/carbon/human/H = affecting H.SetUnconscious(0) H.SetStun(0) H.SetKnockdown(0) - - spawn(30)//Slight delay so the enemy does not immedietly know the ability was used. Due to lag, this often came before waking up. - H.say(pick("A CORNERED FOX IS MORE DANGEROUS THAN A JACKAL!","HURT ME MOOORRREEE!","IMPRESSIVE!")) - spawn(70) - if(reagents.total_volume) - var/fraction = min(a_transfer/reagents.total_volume, 1) - reagents.reaction(H, INJECT, fraction) - reagents.trans_id_to(H, "radium", a_transfer) - to_chat(H, "You are beginning to feel the after-effect of the injection.") + H.stuttering = 0 + H.say(pick("A CORNERED FOX IS MORE DANGEROUS THAN A JACKAL!","HURT ME MOOORRREEE!","IMPRESSIVE!")) a_boost-- to_chat(H, "There are [a_boost] adrenaline boosts remaining.") s_coold = 3 + addtimer(CALLBACK(src, .proc/ninjaboost_after), 70) + +/obj/item/clothing/suit/space/space_ninja/proc/ninjaboost_after() + var/mob/living/carbon/human/H = affecting + H.reagents.add_reagent("radium", a_transfer) + to_chat(H, "You are beginning to feel the after-effect of the injection.") diff --git a/code/modules/ninja/suit/n_suit_verbs/ninja_cost_check.dm b/code/modules/ninja/suit/n_suit_verbs/ninja_cost_check.dm index 1d728084b3..12fea51815 100644 --- a/code/modules/ninja/suit/n_suit_verbs/ninja_cost_check.dm +++ b/code/modules/ninja/suit/n_suit_verbs/ninja_cost_check.dm @@ -3,10 +3,6 @@ //Cost function for suit Procs/Verbs/Abilities /obj/item/clothing/suit/space/space_ninja/proc/ninjacost(cost = 0, specificCheck = 0) var/mob/living/carbon/human/H = affecting - if((H.stat || H.incorporeal_move) && (specificCheck != N_ADRENALINE))//Will not return if user is using an adrenaline booster since you can use them when stat==1. - to_chat(H, "You must be conscious and solid to do this.") - return 1 - var/actualCost = cost*10 if(cost && cell.charge < actualCost) to_chat(H, "Not enough energy.") diff --git a/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm b/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm index 18682e87eb..81d731b110 100644 --- a/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm +++ b/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm @@ -1,24 +1,33 @@ //Allows the ninja to kidnap people -/obj/item/clothing/suit/space/space_ninja/proc/ninjanet(mob/living/carbon/C in oview())//Only living carbon mobs. +/obj/item/clothing/suit/space/space_ninja/proc/ninjanet() + var/mob/living/carbon/human/H = affecting + var/mob/living/carbon/C = input("Select who to capture:","Capture who?",null) as null|mob in oview(H) - if(!ninjacost(200,N_STEALTH_CANCEL) && iscarbon(C)) - var/mob/living/carbon/human/H = affecting - if(C.client)//Monkeys without a client can still step_to() and bypass the net. Also, netting inactive people is lame. - if(!locate(/obj/structure/energy_net) in C.loc)//Check if they are already being affected by an energy net. - for(var/turf/T in getline(H.loc, C.loc)) - if(T.density)//Don't want them shooting nets through walls. It's kind of cheesy. - to_chat(H, "You may not use an energy net through solid obstacles!") - return - H.Beam(C,"n_beam",time=15) - H.say("Get over here!") - var/obj/structure/energy_net/E = new /obj/structure/energy_net(C.loc) - H.visible_message("[H] caught [C] with an energy net!","You caught [C] with an energy net!") - E.affecting = C - E.master = H - spawn(0)//Parallel processing. - E.process(C) - else - to_chat(H, "[C.p_they(TRUE)] are already trapped inside an energy net!") - else - to_chat(H, "[C.p_they(TRUE)] will bring no honor to your Clan!") + if(QDELETED(C)||!(C in oview(H))) + return 0 + + if(!C.client)//Monkeys without a client can still step_to() and bypass the net. Also, netting inactive people is lame. + to_chat(H, "[C.p_they(TRUE)] will bring no honor to your Clan!") + return + if(locate(/obj/structure/energy_net) in get_turf(C))//Check if they are already being affected by an energy net. + to_chat(H, "[C.p_they(TRUE)] are already trapped inside an energy net!") + return + for(var/turf/T in getline(get_turf(H), get_turf(C))) + if(T.density)//Don't want them shooting nets through walls. It's kind of cheesy. + to_chat(H, "You may not use an energy net through solid obstacles!") + return + if(!ninjacost(200,N_STEALTH_CANCEL)) + H.Beam(C,"n_beam",time=15) + H.say("Get over here!") + var/obj/structure/energy_net/E = new /obj/structure/energy_net(C.drop_location()) + E.affecting = C + E.master = H + H.visible_message("[H] caught [C] with an energy net!","You caught [C] with an energy net!") + + if(C.buckled) + C.buckled.unbuckle_mob(affecting,TRUE) + E.buckle_mob(C, TRUE) //No moving for you! + //The person can still try and attack the net when inside. + + START_PROCESSING(SSobj, E) diff --git a/code/modules/ninja/suit/suit.dm b/code/modules/ninja/suit/suit.dm index 7cf355fde6..40d18951e6 100644 --- a/code/modules/ninja/suit/suit.dm +++ b/code/modules/ninja/suit/suit.dm @@ -17,7 +17,7 @@ Contents: icon_state = "s-ninja" item_state = "s-ninja_suit" allowed = list(/obj/item/gun, /obj/item/ammo_box, /obj/item/ammo_casing, /obj/item/melee/baton, /obj/item/restraints/handcuffs, /obj/item/tank/internals, /obj/item/stock_parts/cell) - slowdown = 0 + slowdown = 1 resistance_flags = LAVA_PROOF | ACID_PROOF armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30, fire = 100, acid = 100) strip_delay = 12 @@ -28,7 +28,6 @@ Contents: var/mob/living/carbon/human/affecting = null var/obj/item/stock_parts/cell/cell var/datum/effect_system/spark_spread/spark_system - var/list/reagent_list = list("omnizine","salbutamol","spaceacillin","charcoal","nutriment","radium","potass_iodide")//The reagents ids which are added to the suit at New(). var/list/stored_research = list()//For stealing station research. var/obj/item/disk/tech_disk/t_disk//To copy design onto disk. var/obj/item/dash/energy_katana/energyKatana //For teleporting the katana back to the ninja (It's an ability) @@ -44,11 +43,10 @@ Contents: var/s_cost = 5//Base energy cost each ntick. var/s_acost = 25//Additional cost for additional powers active. var/s_delay = 40//How fast the suit does certain things, lower is faster. Can be overridden in specific procs. Also determines adverse probability. - var/a_transfer = 20//How much reagent is transferred when injecting. - var/r_maxamount = 80//How much reagent in total there is. + var/a_transfer = 20//How much radium is used per adrenaline boost. + var/a_maxamount = 7//Maximum number of adrenaline boosts. //Support function variables. - var/spideros = 0//Mode of SpiderOS. This can change so I won't bother listing the modes here (0 is hub). Check ninja_equipment.dm for how it all works. var/s_active = 0//Stealth off. var/s_busy = FALSE//Is the suit busy with a process? Like AI hacking. Used for safety functions. @@ -73,28 +71,12 @@ Contents: for(var/T in subtypesof(/datum/tech))//Store up on research. stored_research += new T(src) - //Reagent Init - var/reagent_amount - for(var/reagent_id in reagent_list) - reagent_amount += reagent_id == "radium" ? r_maxamount+(a_boost*a_transfer) : r_maxamount - reagents = new(reagent_amount) - reagents.my_atom = src - for(var/reagent_id in reagent_list) - reagent_id == "radium" ? reagents.add_reagent(reagent_id, r_maxamount+(a_boost*a_transfer)) : reagents.add_reagent(reagent_id, r_maxamount)//It will take into account radium used for adrenaline boosting. - //Cell Init cell = new/obj/item/stock_parts/cell/high cell.charge = 9000 cell.name = "black power cell" cell.icon_state = "bscell" - -/obj/item/clothing/suit/space/space_ninja/Destroy() - if(affecting) - affecting << browse(null, "window=hack spideros") - return ..() - - //Simply deletes all the attachments and self, killing all related procs. /obj/item/clothing/suit/space/space_ninja/proc/terminate() qdel(n_hood) @@ -117,7 +99,7 @@ Contents: if(!istype(H)) return 0 if(!is_ninja(H)) - to_chat(H, "\red fÄTaL ÈÈRRoR: 382200-*#00CÖDE RED\nUNAU†HORIZED USÈ DETÈC†††eD\nCoMMÈNCING SUB-R0U†IN3 13...\nTÈRMInATING U-U-USÈR...") + to_chat(H, "fÄTaL ÈÈRRoR: 382200-*#00CÖDE RED\nUNAU?HORIZED USÈ DETÈC???eD\nCoMMÈNCING SUB-R0U?IN3 13...\nTÈRMInATING U-U-USÈR...") H.gib() return FALSE if(!istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja)) @@ -131,7 +113,7 @@ Contents: return FALSE affecting = H flags_1 |= NODROP_1 //colons make me go all |= - slowdown = FALSE + slowdown = 0 n_hood = H.head n_hood.flags_1 |= NODROP_1 n_shoes = H.shoes @@ -170,7 +152,7 @@ Contents: ..() if(s_initialized) if(user == affecting) - to_chat(user, "All systems operational. Current energy capacity: [cell.charge].") + to_chat(user, "All systems operational. Current energy capacity: [DisplayPower(cell.charge)].") to_chat(user, "The CLOAK-tech device is [s_active?"active":"inactive"].") to_chat(user, "There are [s_bombs] smoke bomb\s remaining.") to_chat(user, "There are [a_boost] adrenaline booster\s remaining.") diff --git a/code/modules/ninja/suit/suit_attackby.dm b/code/modules/ninja/suit/suit_attackby.dm index 23f2ac4b9e..1db76bc971 100644 --- a/code/modules/ninja/suit/suit_attackby.dm +++ b/code/modules/ninja/suit/suit_attackby.dm @@ -1,70 +1,60 @@ /obj/item/clothing/suit/space/space_ninja/attackby(obj/item/I, mob/U, params) - if(U==affecting)//Safety, in case you try doing this without wearing the suit/being the person with the suit. + if(U!=affecting)//Safety, in case you try doing this without wearing the suit/being the person with the suit. + return ..() - if(istype(I, /obj/item/reagent_containers/glass))//If it's a glass beaker. - var/total_reagent_transfer//Keep track of this stuff. - for(var/reagent_id in reagent_list) - var/datum/reagent/R = I.reagents.has_reagent(reagent_id)//Mostly to pull up the name of the reagent after calculating. Also easier to use than writing long proc paths. - if(R&&reagents.get_reagent_amount(reagent_id)=a_transfer)//Radium is always special. - //Here we determine how much reagent will actually transfer if there is enough to transfer or there is a need of transfer. Minimum of max amount available (using a_transfer) or amount needed. - var/amount_to_transfer = min( (r_maxamount+(reagent_id == "radium"?(a_boost*a_transfer):0)-reagents.get_reagent_amount(reagent_id)) ,(round(R.volume/a_transfer))*a_transfer)//In the end here, we round the amount available, then multiply it again. - R.volume -= amount_to_transfer//Remove from reagent volume. Don't want to delete the reagent now since we need to perserve the name. - reagents.add_reagent(reagent_id, amount_to_transfer)//Add to suit. Reactions are not important. - total_reagent_transfer += amount_to_transfer//Add to total reagent trans. - to_chat(U, "Added [amount_to_transfer] units of [R.name].") - I.reagents.update_total()//Now we manually update the total to make sure everything is properly shoved under the rug. - - to_chat(U, "Replenished a total of [total_reagent_transfer ? total_reagent_transfer : "zero"] chemical units.") + if(istype(I, /obj/item/reagent_containers/glass))//If it's a glass beaker. + if(I.reagents.has_reagent("radium", a_transfer) && a_boost < a_maxamount) + I.reagents.remove_reagent("radium", a_transfer) + a_boost++; + to_chat(U, "There are now [a_boost] adrenaline boosts remaining.") return - else if(istype(I, /obj/item/stock_parts/cell)) - var/obj/item/stock_parts/cell/CELL = I - if(CELL.maxcharge > cell.maxcharge && n_gloves && n_gloves.candrain) - to_chat(U, "Higher maximum capacity detected.\nUpgrading...") - if (n_gloves && n_gloves.candrain && do_after(U,s_delay, target = src)) - U.drop_item() - CELL.loc = src - CELL.charge = min(CELL.charge+cell.charge, CELL.maxcharge) - var/obj/item/stock_parts/cell/old_cell = cell - old_cell.charge = 0 - U.put_in_hands(old_cell) - old_cell.add_fingerprint(U) - old_cell.corrupt() - old_cell.update_icon() - cell = CELL - to_chat(U, "Upgrade complete. Maximum capacity: [round(cell.maxcharge/100)]%") - else - to_chat(U, "Procedure interrupted. Protocol terminated.") - return - - else if(istype(I, /obj/item/disk/tech_disk))//If it's a data disk, we want to copy the research on to the suit. - var/obj/item/disk/tech_disk/TD = I - var/has_research = 0 - for(var/V in TD.tech_stored) - if(V) - has_research = 1 - break - if(has_research)//If it has something on it. - to_chat(U, "Research information detected, processing...") - if(do_after(U,s_delay, target = src)) - for(var/V1 in 1 to TD.max_tech_stored) - var/datum/tech/new_data = TD.tech_stored[V1] - TD.tech_stored[V1] = null - if(!new_data) - continue - for(var/V2 in stored_research) - var/datum/tech/current_data = V2 - if(current_data.id == new_data.id) - current_data.level = max(current_data.level, new_data.level) - break - to_chat(U, "Data analyzed and updated. Disk erased.") - else - to_chat(U, "ERROR: Procedure interrupted. Process terminated.") + else if(istype(I, /obj/item/stock_parts/cell)) + var/obj/item/stock_parts/cell/CELL = I + if(CELL.maxcharge > cell.maxcharge && n_gloves && n_gloves.candrain) + to_chat(U, "Higher maximum capacity detected.\nUpgrading...") + if (n_gloves && n_gloves.candrain && do_after(U,s_delay, target = src)) + U.transferItemToLoc(CELL, src) + CELL.charge = min(CELL.charge+cell.charge, CELL.maxcharge) + var/obj/item/stock_parts/cell/old_cell = cell + old_cell.charge = 0 + U.put_in_hands(old_cell) + old_cell.add_fingerprint(U) + old_cell.corrupt() + old_cell.update_icon() + cell = CELL + to_chat(U, "Upgrade complete. Maximum capacity: [round(cell.maxcharge/100)]%") else - I.loc = src - t_disk = I - to_chat(U, "You slot \the [I] into \the [src].") - return - ..() \ No newline at end of file + to_chat(U, "Procedure interrupted. Protocol terminated.") + return + + else if(istype(I, /obj/item/disk/tech_disk))//If it's a data disk, we want to copy the research on to the suit. + var/obj/item/disk/tech_disk/TD = I + var/has_research = FALSE + for(var/V in TD.tech_stored) + if(V) + has_research = TRUE + break + if(has_research)//If it has something on it. + to_chat(U, "Research information detected, processing...") + if(do_after(U,s_delay, target = src)) + for(var/V1 in 1 to TD.max_tech_stored) + var/datum/tech/new_data = TD.tech_stored[V1] + TD.tech_stored[V1] = null + if(!new_data) + continue + for(var/V2 in stored_research) + var/datum/tech/current_data = V2 + if(current_data.id == new_data.id) + current_data.level = max(current_data.level, new_data.level) + break + to_chat(U, "Data analyzed and updated. Disk erased.") + + else + to_chat(U, "ERROR: Procedure interrupted. Process terminated.") + else + to_chat(U, "No research information detected.") + return + return ..() diff --git a/code/modules/ninja/suit/suit_initialisation.dm b/code/modules/ninja/suit/suit_initialisation.dm index 5fb3fe8a62..0084ff1995 100644 --- a/code/modules/ninja/suit/suit_initialisation.dm +++ b/code/modules/ninja/suit/suit_initialisation.dm @@ -11,9 +11,6 @@ /obj/item/clothing/suit/space/space_ninja/proc/ninitialize(delay = s_delay, mob/living/carbon/human/U = loc) if(!U.mind) return //Not sure how this could happen. - if(!is_ninja(U)) - to_chat(U, "You do not understand how this suit functions. Where the heck did it even come from?") - return s_busy = TRUE to_chat(U, "Now initializing...") addtimer(CALLBACK(src, .proc/ninitialize_two, delay, U), delay) @@ -30,9 +27,10 @@ addtimer(CALLBACK(src, .proc/ninitialize_four, delay, U), delay) /obj/item/clothing/suit/space/space_ninja/proc/ninitialize_four(delay, mob/living/carbon/human/U) - if(U.stat==2||U.health<=0) - to_chat(U, "FĆAL �Rr�R: 344--93#�&&21 BR��N |/|/aV� PATT$RN RED\nA-A-aB�rT�NG...") + if(U.stat == DEAD|| U.health <= 0) + to_chat(U, "FÄ?AL �Rr�R: 344--93#�&&21 BR��N |/|/aV� PATT$RN RED\nA-A-aB�rT�NG...") unlock_suit() + s_busy = FALSE return lockIcons(U)//Check for icons. U.regenerate_icons() @@ -44,13 +42,12 @@ addtimer(CALLBACK(src, .proc/ninitialize_six, delay, U), delay) /obj/item/clothing/suit/space/space_ninja/proc/ninitialize_six(delay, mob/living/carbon/human/U) - to_chat(U, "Primary system status: ONLINE.\nBackup system status: ONLINE.\nCurrent energy capacity: [cell.charge].") + to_chat(U, "Primary system status: ONLINE.\nBackup system status: ONLINE.\nCurrent energy capacity: [DisplayPower(cell.charge)].") addtimer(CALLBACK(src, .proc/ninitialize_seven, delay, U), delay) /obj/item/clothing/suit/space/space_ninja/proc/ninitialize_seven(delay, mob/living/carbon/human/U) to_chat(U, "All systems operational. Welcome to SpiderOS, [U.real_name].") - grant_ninja_verbs() - grant_equip_verbs() + s_initialized = TRUE ntick() s_busy = FALSE @@ -66,7 +63,6 @@ /obj/item/clothing/suit/space/space_ninja/proc/deinitialize_two(delay, mob/living/carbon/human/U) to_chat(U, "Now de-initializing...") - spideros = 0//Spideros resets. addtimer(CALLBACK(src, .proc/deinitialize_three, delay, U), delay) /obj/item/clothing/suit/space/space_ninja/proc/deinitialize_three(delay, mob/living/carbon/human/U) @@ -92,6 +88,7 @@ /obj/item/clothing/suit/space/space_ninja/proc/deinitialize_eight(delay, mob/living/carbon/human/U) to_chat(U, "Unsecuring external locking mechanism...\nNeural-net abolished.\nOperation status: FINISHED.") - remove_equip_verbs() + unlock_suit() U.regenerate_icons() + s_initialized = FALSE s_busy = FALSE diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index cb16d0838d..e3d6154606 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -97,7 +97,7 @@ H.update_damage_hud() return var/n_name = stripped_input(usr, "What would you like to label the paper?", "Paper Labelling", null, MAX_NAME_LEN) - if((loc == usr && usr.stat == 0)) + if((loc == usr && usr.stat == CONSCIOUS)) name = "paper[(n_name ? text("- '[n_name]'") : null)]" add_fingerprint(usr) diff --git a/code/modules/paperwork/paper_cutter.dm b/code/modules/paperwork/paper_cutter.dm index 541a49706a..2c704b8568 100644 --- a/code/modules/paperwork/paper_cutter.dm +++ b/code/modules/paperwork/paper_cutter.dm @@ -124,3 +124,5 @@ icon = 'icons/obj/bureaucracy.dmi' icon_state = "cutterblade" item_state = "knife" + lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/kitchen_righthand.dmi' diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index f6b39514b2..1cb8295df3 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -17,6 +17,8 @@ desc = "A camera film cartridge. Insert it into a camera to reload it." icon_state = "film" item_state = "electropack" + lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' + righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' w_class = WEIGHT_CLASS_TINY resistance_flags = FLAMMABLE @@ -45,7 +47,7 @@ if(istype(P, /obj/item/pen) || istype(P, /obj/item/toy/crayon)) var/txt = sanitize(input(user, "What would you like to write on the back?", "Photo Writing", null) as text) txt = copytext(txt, 1, 128) - if(loc == user && user.stat == 0) + if(loc == user && user.stat == CONSCIOUS) scribble = txt ..() @@ -76,7 +78,7 @@ var/n_name = copytext(sanitize(input(usr, "What would you like to label the photo?", "Photo Labelling", null) as text), 1, MAX_NAME_LEN) //loc.loc check is for making possible renaming photos in clipboards - if((loc == usr || loc.loc && loc.loc == usr) && usr.stat == 0 && usr.canmove && !usr.restrained()) + if((loc == usr || loc.loc && loc.loc == usr) && usr.stat == CONSCIOUS && usr.canmove && !usr.restrained()) name = "photo[(n_name ? text("- '[n_name]'") : null)]" add_fingerprint(usr) diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index ebe478a7bf..a24c0d7c57 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -170,6 +170,7 @@ By design, d1 is the smallest direction and d2 is the highest return 0 /obj/structure/cable/singularity_pull(S, current_size) + ..() if(current_size >= STAGE_FIVE) deconstruct() diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index 8dd013facc..34635084dd 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -1,11 +1,11 @@ /obj/item/stock_parts/cell name = "power cell" - desc = "A rechargeable electrochemical power cell." + desc = "A rechargeable electrochemical power cell." icon = 'icons/obj/power.dmi' icon_state = "cell" item_state = "cell" - lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' - righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' + lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' + righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' origin_tech = "powerstorage=1" force = 5 throwforce = 5 @@ -156,7 +156,7 @@ /obj/item/stock_parts/cell/blob_act(obj/structure/blob/B) - ex_act(EXPLODE_DEVASTATE) + ex_act(EXPLODE_DEVASTATE) /obj/item/stock_parts/cell/proc/get_electrocute_damage() if(charge >= 1000) @@ -166,7 +166,7 @@ /* Cell variants*/ /obj/item/stock_parts/cell/crap - name = "\improper Nanotrasen brand rechargeable AA battery" + name = "\improper Nanotrasen brand rechargeable AA battery" desc = "You can't top the plasma top." //TOTALLY TRADEMARK INFRINGEMENT maxcharge = 500 materials = list(MAT_GLASS=40) @@ -176,8 +176,21 @@ ..() charge = 0 +/obj/item/stock_parts/cell/upgraded + name = "high-capacity power cell" + desc = "A power cell with a slightly higher capacity than normal!" + maxcharge = 2500 + materials = list(MAT_GLASS=50) + rating = 2 + chargerate = 1000 + +/obj/item/stock_parts/cell/upgraded/plus + name = "upgraded power cell+" + desc = "A power cell with an even higher capacity than the base model!" + maxcharge = 5000 + /obj/item/stock_parts/cell/secborg - name = "security borg rechargeable D battery" + name = "security borg rechargeable D battery" origin_tech = null maxcharge = 600 //600 max charge / 100 charge per shot = six shots materials = list(MAT_GLASS=40) @@ -249,7 +262,7 @@ /obj/item/stock_parts/cell/bluespace name = "bluespace power cell" - desc = "A rechargeable transdimensional power cell." + desc = "A rechargeable transdimensional power cell." origin_tech = "powerstorage=5;bluespace=4;materials=4;engineering=4" icon_state = "bscell" maxcharge = 40000 @@ -289,7 +302,7 @@ /obj/item/stock_parts/cell/potato name = "potato battery" - desc = "A rechargeable starch based power cell." + desc = "A rechargeable starch based power cell." icon = 'icons/obj/hydroponics/harvest.dmi' icon_state = "potato" origin_tech = "powerstorage=1;biotech=1" diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 8654953994..096c050fcc 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -588,6 +588,8 @@ icon_state = "lbulb" base_state = "lbulb" item_state = "contvapour" + lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' brightness = 4 /obj/item/light/throw_impact(atom/hit_atom) diff --git a/code/modules/power/singularity/containment_field.dm b/code/modules/power/singularity/containment_field.dm index ca25ce708f..f819b35d75 100644 --- a/code/modules/power/singularity/containment_field.dm +++ b/code/modules/power/singularity/containment_field.dm @@ -57,8 +57,7 @@ /obj/machinery/field/containment/Crossed(mob/mover) if(isliving(mover)) shock(mover) - -/obj/machinery/field/containment/Crossed(obj/mover) + if(istype(mover, /obj/machinery) || istype(mover, /obj/structure) || istype(mover, /obj/mecha)) bump_field(mover) @@ -79,21 +78,25 @@ qdel(src) - // Abstract Field Class // Used for overriding certain procs /obj/machinery/field var/hasShocked = FALSE //Used to add a delay between shocks. In some cases this used to crash servers by spawning hundreds of sparks every second. -/obj/machinery/field/CanPass(atom/movable/mover, turf/target) +/obj/machinery/field/CollidedWith(atom/movable/mover) if(hasShocked) - return FALSE - if(isliving(mover)) // Don't let mobs through + return + if(isliving(mover)) shock(mover) - return FALSE + return if(istype(mover, /obj/machinery) || istype(mover, /obj/structure) || istype(mover, /obj/mecha)) bump_field(mover) + return + + +/obj/machinery/field/CanPass(atom/movable/mover, turf/target) + if(hasShocked || isliving(mover) || istype(mover, /obj/machinery) || istype(mover, /obj/structure) || istype(mover, /obj/mecha)) return FALSE return ..() diff --git a/code/modules/projectiles/guns/ballistic/laser_gatling.dm b/code/modules/projectiles/guns/ballistic/laser_gatling.dm index 52bff5129b..b73c1b7242 100644 --- a/code/modules/projectiles/guns/ballistic/laser_gatling.dm +++ b/code/modules/projectiles/guns/ballistic/laser_gatling.dm @@ -7,6 +7,8 @@ icon = 'icons/obj/guns/minigun.dmi' icon_state = "holstered" item_state = "backpack" + lefthand_file = 'icons/mob/inhands/equipment/backpack_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/backpack_righthand.dmi' slot_flags = SLOT_BACK w_class = WEIGHT_CLASS_HUGE var/obj/item/gun/ballistic/minigun/gun diff --git a/code/modules/projectiles/guns/magic.dm b/code/modules/projectiles/guns/magic.dm index 8e97a3d7a9..f419374857 100644 --- a/code/modules/projectiles/guns/magic.dm +++ b/code/modules/projectiles/guns/magic.dm @@ -4,6 +4,8 @@ icon = 'icons/obj/guns/magic.dmi' icon_state = "staffofnothing" item_state = "staff" + lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi' + righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi' fire_sound = 'sound/weapons/emitter.ogg' flags_1 = CONDUCT_1 w_class = WEIGHT_CLASS_HUGE diff --git a/code/modules/projectiles/pins.dm b/code/modules/projectiles/pins.dm index 232cb5987e..75066540cf 100644 --- a/code/modules/projectiles/pins.dm +++ b/code/modules/projectiles/pins.dm @@ -8,7 +8,6 @@ flags_1 = CONDUCT_1 w_class = WEIGHT_CLASS_TINY attack_verb = list("poked") - var/emagged = FALSE var/fail_message = "INVALID USER." var/selfdestruct = 0 // Explode when user check is failed. var/force_replace = 0 // Can forcefully replace other pins. diff --git a/code/modules/reagents/chemistry/machinery/pandemic.dm b/code/modules/reagents/chemistry/machinery/pandemic.dm index fa31fb8ec1..64f0eae564 100644 --- a/code/modules/reagents/chemistry/machinery/pandemic.dm +++ b/code/modules/reagents/chemistry/machinery/pandemic.dm @@ -1,3 +1,6 @@ +#define MAIN_SCREEN 1 +#define SYMPTOM_DETAILS 2 + /obj/machinery/computer/pandemic name = "PanD.E.M.I.C 2200" desc = "Used to work with viruses." @@ -10,6 +13,8 @@ idle_power_usage = 20 resistance_flags = ACID_PROOF var/wait + var/mode = MAIN_SCREEN + var/datum/symptom/selected_symptom var/obj/item/reagent_containers/beaker /obj/machinery/computer/pandemic/Initialize() @@ -34,9 +39,7 @@ /obj/machinery/computer/pandemic/proc/get_viruses_data(datum/reagent/blood/B) . = list() - if(!islist(B.data["viruses"])) - return - var/list/V = B.data["viruses"] + var/list/V = B.get_diseases() var/index = 1 for(var/virus in V) var/datum/disease/D = virus @@ -47,21 +50,24 @@ this["name"] = D.name if(istype(D, /datum/disease/advance)) var/datum/disease/advance/A = D - var/datum/disease/advance/archived = SSdisease.archive_diseases[D.GetDiseaseID()] - if(archived.name == "Unknown") + var/disease_name = SSdisease.get_disease_name(A.GetDiseaseID()) + if(disease_name == "Unknown") this["can_rename"] = TRUE - this["name"] = archived.name + this["name"] = disease_name this["is_adv"] = TRUE - this["resistance"] = A.totalResistance() - this["stealth"] = A.totalStealth() - this["stage_speed"] = A.totalStageSpeed() - this["transmission"] = A.totalTransmittable() this["symptoms"] = list() + var/symptom_index = 1 for(var/symptom in A.symptoms) var/datum/symptom/S = symptom var/list/this_symptom = list() this_symptom["name"] = S.name + this_symptom["sym_index"] = symptom_index + symptom_index++ this["symptoms"] += list(this_symptom) + this["resistance"] = A.totalResistance() + this["stealth"] = A.totalStealth() + this["stage_speed"] = A.totalStageSpeed() + this["transmission"] = A.totalTransmittable() this["index"] = index++ this["agent"] = D.agent this["description"] = D.desc || "none" @@ -70,6 +76,20 @@ . += list(this) +/obj/machinery/computer/pandemic/proc/get_symptom_data(datum/symptom/S) + . = list() + var/list/this = list() + this["name"] = S.name + this["desc"] = S.desc + this["stealth"] = S.stealth + this["resistance"] = S.resistance + this["stage_speed"] = S.stage_speed + this["transmission"] = S.transmittable + this["level"] = S.level + this["neutered"] = S.neutered + this["threshold_desc"] = S.threshold_desc + . += this + /obj/machinery/computer/pandemic/proc/get_resistance_data(datum/reagent/blood/B) . = list() if(!islist(B.data["resistances"])) @@ -81,6 +101,7 @@ if(D) this["id"] = id this["name"] = D.name + . += list(this) /obj/machinery/computer/pandemic/proc/reset_replicator_cooldown() @@ -113,18 +134,23 @@ /obj/machinery/computer/pandemic/ui_data(mob/user) var/list/data = list() data["is_ready"] = !wait - if(beaker) - data["has_beaker"] = TRUE - if(!beaker.reagents.total_volume || !beaker.reagents.reagent_list) - data["beaker_empty"] = TRUE - var/datum/reagent/blood/B = locate() in beaker.reagents.reagent_list - if(B) - data["has_blood"] = TRUE - data["blood"] = list() - data["blood"]["dna"] = B.data["blood_DNA"] || "none" - data["blood"]["type"] = B.data["blood_type"] || "none" - data["viruses"] = get_viruses_data(B) - data["resistances"] = get_resistance_data(B) + data["mode"] = mode + switch(mode) + if(MAIN_SCREEN) + if(beaker) + data["has_beaker"] = TRUE + if(!beaker.reagents.total_volume || !beaker.reagents.reagent_list) + data["beaker_empty"] = TRUE + var/datum/reagent/blood/B = locate() in beaker.reagents.reagent_list + if(B) + data["has_blood"] = TRUE + data["blood"] = list() + data["blood"]["dna"] = B.data["blood_DNA"] || "none" + data["blood"]["type"] = B.data["blood_type"] || "none" + data["viruses"] = get_viruses_data(B) + data["resistances"] = get_resistance_data(B) + if(SYMPTOM_DETAILS) + data["symptom"] = get_symptom_data(selected_symptom) return data @@ -166,8 +192,8 @@ addtimer(CALLBACK(src, .proc/reset_replicator_cooldown), 50) . = TRUE if("create_vaccine_bottle") - var/index = params["index"] - var/datum/disease/D = SSdisease.archive_diseases[index] + var/index = text2num(params["index"]) + var/datum/disease/D = SSdisease.archive_diseases[get_virus_id_by_index(index)] var/obj/item/reagent_containers/glass/bottle/B = new(get_turf(src)) B.name = "[D.name] vaccine bottle" B.reagents.add_reagent("vaccine", 15, list(index)) @@ -175,6 +201,19 @@ update_icon() addtimer(CALLBACK(src, .proc/reset_replicator_cooldown), 200) . = TRUE + if("symptom_details") + var/picked_symptom_index = text2num(params["picked_symptom"]) + var/index = text2num(params["index"]) + var/datum/disease/advance/A = get_by_index("viruses", index) + var/datum/symptom/S = A.symptoms[picked_symptom_index] + mode = SYMPTOM_DETAILS + selected_symptom = S + . = TRUE + if("back") + mode = MAIN_SCREEN + selected_symptom = null + . = TRUE + /obj/machinery/computer/pandemic/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/reagent_containers) && (I.container_type & OPENCONTAINER_1)) @@ -182,14 +221,13 @@ if(stat & (NOPOWER|BROKEN)) return if(beaker) - to_chat(user, "A beaker is already loaded into the machine!") + to_chat(user, "A container is already loaded into [src]!") return - if(!user.drop_item()) + if(!user.transferItemToLoc(I, src)) return beaker = I - beaker.forceMove(src) - to_chat(user, "You add the beaker to the machine.") + to_chat(user, "You insert [I] into [src].") update_icon() else return ..() diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm index 9b22236a03..5e3bf0f749 100644 --- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm @@ -1072,7 +1072,7 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_desc = "Aromatic beverage served piping hot. According to folk tales it can almost wake the dead." /datum/reagent/consumable/ethanol/hearty_punch/on_mob_life(mob/living/M) - if(M.stat == UNCONSCIOUS && M.health <= 0) + if(M.health <= 0) M.adjustBruteLoss(-7, 0) M.adjustFireLoss(-7, 0) M.adjustToxLoss(-7, 0) diff --git a/code/modules/reagents/reagent_containers/bottle.dm b/code/modules/reagents/reagent_containers/bottle.dm index ac86057e80..2fd728d546 100644 --- a/code/modules/reagents/reagent_containers/bottle.dm +++ b/code/modules/reagents/reagent_containers/bottle.dm @@ -276,11 +276,11 @@ icon_state = "bottle3" spawned_disease = /datum/disease/advance/heal -/obj/item/reagent_containers/glass/bottle/hullucigen_virion - name = "Hullucigen virion culture bottle" - desc = "A small bottle. Contains hullucigen virion culture in synthblood medium." +/obj/item/reagent_containers/glass/bottle/hallucigen_virion + name = "Hallucigen virion culture bottle" + desc = "A small bottle. Contains hallucigen virion culture in synthblood medium." icon_state = "bottle3" - spawned_disease = /datum/disease/advance/hullucigen + spawned_disease = /datum/disease/advance/hallucigen /obj/item/reagent_containers/glass/bottle/pierrot_throat name = "Pierrot's Throat culture bottle" diff --git a/code/modules/recycling/disposal-structures.dm b/code/modules/recycling/disposal-structures.dm index efe730d1c2..9015320c56 100644 --- a/code/modules/recycling/disposal-structures.dm +++ b/code/modules/recycling/disposal-structures.dm @@ -335,6 +335,7 @@ /obj/structure/disposalpipe/singularity_pull(S, current_size) + ..() if(current_size >= STAGE_FIVE) deconstruct() diff --git a/code/modules/recycling/disposal-unit.dm b/code/modules/recycling/disposal-unit.dm index 14ebec8128..517b4aa195 100644 --- a/code/modules/recycling/disposal-unit.dm +++ b/code/modules/recycling/disposal-unit.dm @@ -58,6 +58,7 @@ return ..() /obj/machinery/disposal/singularity_pull(S, current_size) + ..() if(current_size >= STAGE_FIVE) deconstruct() @@ -335,20 +336,18 @@ eject() . = TRUE -/obj/machinery/disposal/bin/CanPass(atom/movable/mover, turf/target) - if (isitem(mover) && mover.throwing) - var/obj/item/I = mover - if(istype(I, /obj/item/projectile)) - return + +/obj/machinery/disposal/bin/hitby(atom/movable/AM) + if(isitem(AM) && AM.CanEnterDisposals()) if(prob(75)) - I.forceMove(src) - visible_message("[I] lands in [src].") + AM.forceMove(src) + visible_message("[AM] lands in [src].") update_icon() else - visible_message("[I] bounces off of [src]'s rim!") - return 0 + visible_message("[AM] bounces off of [src]'s rim!") + return ..() else - return ..(mover, target) + return ..() /obj/machinery/disposal/bin/flush() ..() @@ -457,12 +456,12 @@ trunk.linked = src // link the pipe trunk to self /obj/machinery/disposal/deliveryChute/place_item_in_disposal(obj/item/I, mob/user) - if(I.disposalEnterTry()) + if(I.CanEnterDisposals()) ..() flush() /obj/machinery/disposal/deliveryChute/CollidedWith(atom/movable/AM) //Go straight into the chute - if(!AM.disposalEnterTry()) + if(!AM.CanEnterDisposals()) return switch(dir) if(NORTH) @@ -485,16 +484,16 @@ M.forceMove(src) flush() -/atom/movable/proc/disposalEnterTry() +/atom/movable/proc/CanEnterDisposals() return 1 -/obj/item/projectile/disposalEnterTry() +/obj/item/projectile/CanEnterDisposals() return -/obj/effect/disposalEnterTry() +/obj/effect/CanEnterDisposals() return -/obj/mecha/disposalEnterTry() +/obj/mecha/CanEnterDisposals() return /obj/machinery/disposal/deliveryChute/newHolderDestination(obj/structure/disposalholder/H) diff --git a/code/modules/research/designs/medical_designs.dm b/code/modules/research/designs/medical_designs.dm index 525cb7cd74..89767a1c55 100644 --- a/code/modules/research/designs/medical_designs.dm +++ b/code/modules/research/designs/medical_designs.dm @@ -430,3 +430,23 @@ materials = list(MAT_METAL = 500, MAT_GLASS = 500) build_path = /obj/item/organ/liver/cybernetic/upgraded category = list("Medical Designs") + +/datum/design/cybernetic_lungs + name = "Cybernetic Lungs" + desc = "A pair of cybernetic lungs." + id = "cybernetic_lungs" + req_tech = list("biotech" = 4, "materials" = 4) + build_type = PROTOLATHE + materials = list(MAT_METAL = 500, MAT_GLASS = 500) + build_path = /obj/item/organ/lungs/cybernetic + category = list("Medical Designs") + +/datum/design/cybernetic_lungs_u + name = "Upgraded Cybernetic Lungs" + desc = "A pair of upgraded cybernetic lungs." + id = "cybernetic_lungs_u" + req_tech = list("biotech" = 5, "materials" = 5, "engineering" = 5) + build_type = PROTOLATHE + materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_SILVER = 500) + build_path = /obj/item/organ/lungs/cybernetic/upgraded + category = list("Medical Designs") \ No newline at end of file diff --git a/code/modules/ruins/lavaland_ruin_code.dm b/code/modules/ruins/lavaland_ruin_code.dm index 63861b8e35..e4927349d8 100644 --- a/code/modules/ruins/lavaland_ruin_code.dm +++ b/code/modules/ruins/lavaland_ruin_code.dm @@ -46,6 +46,7 @@ desc = "The incomplete body of a golem. Add ten sheets of any mineral to finish." var/shell_type = /obj/effect/mob_spawn/human/golem var/has_owner = FALSE //if the resulting golem obeys someone + w_class = WEIGHT_CLASS_BULKY /obj/item/golem_shell/attackby(obj/item/I, mob/user, params) ..() diff --git a/code/modules/ruins/lavalandruin_code/biodome_clown_planet.dm b/code/modules/ruins/lavalandruin_code/biodome_clown_planet.dm new file mode 100644 index 0000000000..5b9a1b86b0 --- /dev/null +++ b/code/modules/ruins/lavalandruin_code/biodome_clown_planet.dm @@ -0,0 +1,7 @@ +//////lavaland clown planet papers + +/obj/item/paper/crumpled/bloody/ruins/lavaland/clown_planet/escape + info = "If you dare not continue down this path of madness, escape can be found through the chute in this room." + +/obj/item/paper/crumpled/bloody/ruins/lavaland/clown_planet/hope + info = "Abandon hope, all ye who enter here." diff --git a/code/modules/ruins/objects_and_mobs/sin_ruins.dm b/code/modules/ruins/objects_and_mobs/sin_ruins.dm index a061d00a44..a01a144bc3 100644 --- a/code/modules/ruins/objects_and_mobs/sin_ruins.dm +++ b/code/modules/ruins/objects_and_mobs/sin_ruins.dm @@ -111,7 +111,9 @@ desc = "Their success will be yours." icon = 'icons/obj/wizard.dmi' icon_state = "render" - item_state = "render" + item_state = "knife" + lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/kitchen_righthand.dmi' force = 18 throwforce = 10 w_class = WEIGHT_CLASS_NORMAL diff --git a/code/modules/ruins/spaceruin_code/TheDerelict.dm b/code/modules/ruins/spaceruin_code/TheDerelict.dm index 27d9e59063..58e257d587 100644 --- a/code/modules/ruins/spaceruin_code/TheDerelict.dm +++ b/code/modules/ruins/spaceruin_code/TheDerelict.dm @@ -10,4 +10,10 @@ /obj/item/paper/fluff/ruins/thederelict/nukie_objectives name = "Objectives of a Nuclear Operative" - info = "Objective #1: Destroy the station with a nuclear device." \ No newline at end of file + info = "Objective #1: Destroy the station with a nuclear device." + +/obj/item/paper/crumpled/bloody/ruins/thederelict/unfinished + name = "unfinished paper scrap" + desc = "Looks like someone started shakily writing a will in space common, but were interrupted by something bloody..." + info = "I, Victor Belyakov, do hereby leave my _- " + diff --git a/code/modules/ruins/spaceruin_code/bigderelict1.dm b/code/modules/ruins/spaceruin_code/bigderelict1.dm new file mode 100644 index 0000000000..a86fb3c146 --- /dev/null +++ b/code/modules/ruins/spaceruin_code/bigderelict1.dm @@ -0,0 +1,8 @@ +/////////// bigderelict1 items + +/obj/item/paper/crumpled/ruins/bigderelict1/manifest + info = "A crumpled piece of manifest paper, out of the barely legible pen writing, you can see something about a warning involving whatever was originally in the crate." + +/obj/item/paper/crumpled/ruins/bigderelict1/coward + icon_state = "scrap_bloodied" + info = "If anyone finds this, please, don't let my kids know I died a coward.." diff --git a/code/modules/ruins/spaceruin_code/originalcontent.dm b/code/modules/ruins/spaceruin_code/originalcontent.dm index 488ff8b295..5da28af26d 100644 --- a/code/modules/ruins/spaceruin_code/originalcontent.dm +++ b/code/modules/ruins/spaceruin_code/originalcontent.dm @@ -1,4 +1,28 @@ /////////// originalcontent items /obj/item/paper/crumpled/ruins/originalcontent - desc = "Various scrawled out drawings and sketches reside on the paper, apparently he didn't much care for these drawings." \ No newline at end of file + desc = "Various scrawled out drawings and sketches reside on the paper, apparently he didn't much care for these drawings." + +/obj/item/paper/pamphlet/ruin/originalcontent + icon = 'icons/obj/fluff.dmi' + +/obj/item/paper/pamphlet/ruin/originalcontent/stickman + name = "Painting - 'BANG'" + info = "This picture depicts a crudely-drawn stickman firing a crudely-drawn gun." + icon_state = "painting4" + +/obj/item/paper/pamphlet/ruin/originalcontent/treeside + name = "Painting - 'Treeside'" + info = "This picture depicts a sunny day on a lush hillside, set under a shaded tree." + icon_state = "painting1" + +/obj/item/paper/pamphlet/ruin/originalcontent/pennywise + name = "Painting - 'Pennywise'" + info = "This picture depicts a smiling clown. Something doesn't feel right about this.." + icon_state = "painting3" + +/obj/item/paper/pamphlet/ruin/originalcontent/yelling + name = "Painting - 'Hands-On-Face'" + info = "This picture depicts a man yelling on a bridge for no apparent reason." + icon_state = "painting2" + diff --git a/code/modules/server_tools/server_tools.dm b/code/modules/server_tools/server_tools.dm index be8c80ac24..f16a56b2f9 100644 --- a/code/modules/server_tools/server_tools.dm +++ b/code/modules/server_tools/server_tools.dm @@ -4,6 +4,10 @@ GLOBAL_PROTECT(reboot_mode) /world/proc/RunningService() return params[SERVICE_WORLD_PARAM] +/proc/ServiceVersion() + if(world.RunningService()) + return world.params[SERVICE_VERSION_PARAM] + /world/proc/ExportService(command) return RunningService() && shell("python code/modules/server_tools/nudge.py \"[command]\"") == 0 diff --git a/code/modules/shuttle/assault_pod.dm b/code/modules/shuttle/assault_pod.dm index 7015192722..5b21d22d19 100644 --- a/code/modules/shuttle/assault_pod.dm +++ b/code/modules/shuttle/assault_pod.dm @@ -11,7 +11,7 @@ /obj/docking_port/mobile/assault_pod/dock(obj/docking_port/stationary/S1) - ..() + . = ..() if(!istype(S1, /obj/docking_port/stationary/transit)) playsound(get_turf(src.loc), 'sound/effects/explosion1.ogg',50,1) diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index bdaac1d3cb..a3ebba05a1 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -78,7 +78,7 @@ /obj/machinery/computer/shuttle/emag_act(mob/user) if(emagged) return - req_access = null + req_access = list() emagged = TRUE to_chat(user, "You fried the consoles ID checking system.") diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm index 85f32b745d..d574a38d73 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -290,7 +290,7 @@ if(SHUTTLE_CALL) if(time_left <= 0) //move emergency shuttle to station - if(dock(SSshuttle.getDock("emergency_home"))) + if(dock(SSshuttle.getDock("emergency_home")) != DOCKING_SUCCESS) setTimer(20) return mode = SHUTTLE_DOCKED diff --git a/code/modules/shuttle/on_move.dm b/code/modules/shuttle/on_move.dm index b09c38d714..77eec512d8 100644 --- a/code/modules/shuttle/on_move.dm +++ b/code/modules/shuttle/on_move.dm @@ -4,15 +4,18 @@ All ShuttleMove procs go here /************************************Base procs************************************/ -// Called on every turf in the shuttle region, return false if it doesn't want to move -/turf/proc/fromShuttleMove(turf/newT, turf_type, baseturf_type) - if(type == turf_type && baseturf == baseturf_type) - return FALSE - return TRUE +// Called on every turf in the shuttle region, returns a bitflag for allowed movements of that turf +// returns the new move_mode (based on the old) +/turf/proc/fromShuttleMove(turf/newT, turf_type, list/baseturf_cache, move_mode) + if(!(move_mode & MOVE_AREA) || (istype(src, turf_type) && baseturf_cache[baseturf])) + return move_mode + return move_mode | MOVE_TURF | MOVE_CONTENTS // Called from the new turf before anything has been moved // Only gets called if fromShuttleMove returns true first -/turf/proc/toShuttleMove(turf/oldT, shuttle_dir) +// returns the new move_mode (based on the old) +/turf/proc/toShuttleMove(turf/oldT, move_mode, obj/docking_port/mobile/shuttle) + var/shuttle_dir = shuttle.dir for(var/i in contents) var/atom/movable/thing = i if(ismob(thing)) @@ -38,7 +41,7 @@ All ShuttleMove procs go here else qdel(thing) - return TRUE + return move_mode // Called on the old turf to move the turf data /turf/proc/onShuttleMove(turf/newT, turf_type, baseturf_type, rotation, list/movement_force, move_dir) @@ -73,9 +76,9 @@ All ShuttleMove procs go here ///////////////////////////////////////////////////////////////////////////////////// // Called on every atom in shuttle turf contents before anything has been moved -// Return true if it should be moved regardless of turf being moved -/atom/movable/proc/beforeShuttleMove(turf/newT, rotation) - return FALSE +// returns the new move_mode (based on the old) +/atom/movable/proc/beforeShuttleMove(turf/newT, rotation, move_mode) + return move_mode // Called on atoms to move the atom to the new location /atom/movable/proc/onShuttleMove(turf/newT, turf/oldT, rotation, list/movement_force, move_dir, old_dock) @@ -102,13 +105,16 @@ All ShuttleMove procs go here ///////////////////////////////////////////////////////////////////////////////////// // Called on areas before anything has been moved -/area/proc/beforeShuttleMove() - return TRUE +// returns the new move_mode (based on the old) +/area/proc/beforeShuttleMove(list/shuttle_areas) + if(!shuttle_areas[src]) + return NONE + return MOVE_AREA // Called on areas to move their turf between areas /area/proc/onShuttleMove(turf/oldT, turf/newT, area/underlying_old_area) if(newT == oldT) // In case of in place shuttle rotation shenanigans. - return + return TRUE contents -= oldT underlying_old_area.contents += oldT @@ -117,7 +123,7 @@ All ShuttleMove procs go here var/area/old_dest_area = newT.loc parallax_movedir = old_dest_area.parallax_movedir - + old_dest_area.contents -= newT contents += newT newT.change_area(old_dest_area, src) @@ -160,9 +166,11 @@ All ShuttleMove procs go here SSair.add_to_active(src, TRUE) SSair.add_to_active(oldT, TRUE) +/************************************Area move procs************************************/ + /************************************Machinery move procs************************************/ -/obj/machinery/door/airlock/beforeShuttleMove(turf/newT, rotation) +/obj/machinery/door/airlock/beforeShuttleMove(turf/newT, rotation, move_mode) . = ..() shuttledocked = 0 for(var/obj/machinery/door/airlock/A in range(1, src)) @@ -176,11 +184,11 @@ All ShuttleMove procs go here for(var/obj/machinery/door/airlock/A in range(1, src)) A.shuttledocked = 1 -/obj/machinery/camera/beforeShuttleMove(turf/newT, rotation) +/obj/machinery/camera/beforeShuttleMove(turf/newT, rotation, move_mode) . = ..() GLOB.cameranet.removeCamera(src) GLOB.cameranet.updateChunk() - return TRUE + . |= MOVE_CONTENTS /obj/machinery/camera/afterShuttleMove(list/movement_force, shuttle_dir, shuttle_preferred_direction, move_dir) . = ..() @@ -207,7 +215,7 @@ All ShuttleMove procs go here if(z == ZLEVEL_MINING) //Avoids double logging and landing on other Z-levels due to badminnery SSblackbox.add_details("colonies_dropped", "[x]|[y]|[z]") //Number of times a base has been dropped! -/obj/machinery/gravity_generator/main/beforeShuttleMove(turf/newT, rotation) +/obj/machinery/gravity_generator/main/beforeShuttleMove(turf/newT, rotation, move_mode) . = ..() on = FALSE update_list() @@ -218,9 +226,9 @@ All ShuttleMove procs go here on = TRUE update_list() -/obj/machinery/thruster/beforeShuttleMove(turf/newT, rotation) +/obj/machinery/thruster/beforeShuttleMove(turf/newT, rotation, move_mode) . = ..() - . = TRUE + . |= MOVE_CONTENTS //Properly updates pipes on shuttle movement /obj/machinery/atmospherics/shuttleRotate(rotation) @@ -271,7 +279,7 @@ All ShuttleMove procs go here var/turf/T = loc hide(T.intact) -/obj/machinery/navbeacon/beforeShuttleMove(turf/newT, rotation) +/obj/machinery/navbeacon/beforeShuttleMove(turf/newT, rotation, move_mode) . = ..() GLOB.navbeacons["[z]"] -= src GLOB.deliverybeacons -= src @@ -333,13 +341,13 @@ All ShuttleMove procs go here /************************************Structure move procs************************************/ -/obj/structure/grille/beforeShuttleMove(turf/newT, rotation) +/obj/structure/grille/beforeShuttleMove(turf/newT, rotation, move_mode) . = ..() - . = TRUE + . |= MOVE_CONTENTS -/obj/structure/lattice/beforeShuttleMove(turf/newT, rotation) +/obj/structure/lattice/beforeShuttleMove(turf/newT, rotation, move_mode) . = ..() - . = TRUE + . |= MOVE_CONTENTS /obj/structure/disposalpipe/afterShuttleMove(list/movement_force, shuttle_dir, shuttle_preferred_direction, move_dir) . = ..() @@ -350,6 +358,11 @@ All ShuttleMove procs go here var/turf/T = loc if(level==1) hide(T.intact) + +/obj/structure/shuttle/beforeShuttleMove(turf/newT, rotation, move_mode) + . = ..() + . |= MOVE_CONTENTS + /************************************Misc move procs************************************/ diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm index d0d5952a0c..4326e6298e 100644 --- a/code/modules/shuttle/shuttle.dm +++ b/code/modules/shuttle/shuttle.dm @@ -21,6 +21,10 @@ var/dwidth = 0 //position relative to covered area, perpendicular to dir var/dheight = 0 //position relative to covered area, parallel to dir + var/area_type + var/turf_type + var/baseturf_type + //these objects are indestructible /obj/docking_port/Destroy(force) // unless you assert that you know what you're doing. Horrible things @@ -119,6 +123,39 @@ else . += T +/obj/docking_port/proc/return_ordered_assoc_turfs(_x, _y, _z, _dir) + if(!_dir) + _dir = dir + if(!_x) + _x = x + if(!_y) + _y = y + if(!_z) + _z = z + var/cos = 1 + var/sin = 0 + switch(_dir) + if(WEST) + cos = 0 + sin = 1 + if(SOUTH) + cos = -1 + sin = 0 + if(EAST) + cos = 0 + sin = -1 + + . = list() + + var/xi + var/yi + for(var/dx=0, dx world.time) //Let's not spam the message + return ..() + + check_times[AM] = world.time + LUXURY_MESSAGE_COOLDOWN var/total_cash = 0 var/list/counted_money = list() - for(var/obj/item/coin/C in mover.GetAllContents()) + for(var/obj/item/coin/C in AM.GetAllContents()) total_cash += C.value counted_money += C if(total_cash >= threshold) break - for(var/obj/item/stack/spacecash/S in mover.GetAllContents()) + for(var/obj/item/stack/spacecash/S in AM.GetAllContents()) total_cash += S.value * S.amount counted_money += S if(total_cash >= threshold) @@ -241,12 +255,13 @@ for(var/obj/I in counted_money) qdel(I) - to_chat(mover, "Thank you for your payment! Please enjoy your flight.") - approved_passengers += mover - return 1 + to_chat(AM, "Thank you for your payment! Please enjoy your flight.") + approved_passengers += AM + check_times -= AM + return else - to_chat(mover, "You don't have enough money to enter the main shuttle. You'll have to fly coach.") - return 0 + to_chat(AM, "You don't have enough money to enter the main shuttle. You'll have to fly coach.") + return ..() /mob/living/simple_animal/hostile/bear/fightpit name = "fight pit bear" diff --git a/code/modules/shuttle/supply.dm b/code/modules/shuttle/supply.dm index 7c7fd1c68b..6ef04dcaba 100644 --- a/code/modules/shuttle/supply.dm +++ b/code/modules/shuttle/supply.dm @@ -67,7 +67,8 @@ GLOBAL_LIST_INIT(blacklisted_cargo_types, typecacheof(list( /obj/docking_port/mobile/supply/dock() if(getDockedId() == "supply_away") // Buy when we leave home. buy() - if(..()) // Fly/enter transit. + . = ..() // Fly/enter transit. + if(. != DOCKING_SUCCESS) return if(getDockedId() == "supply_away") // Sell when we get home sell() diff --git a/code/modules/spells/spell_types/rightandwrong.dm b/code/modules/spells/spell_types/rightandwrong.dm index 024e1ceae7..1d657117c3 100644 --- a/code/modules/spells/spell_types/rightandwrong.dm +++ b/code/modules/spells/spell_types/rightandwrong.dm @@ -10,7 +10,7 @@ message_admins("[key_name_admin(user, 1)] summoned [summon_type ? "magic" : "guns"]!") log_game("[key_name(user)] summoned [summon_type ? "magic" : "guns"]!") for(var/mob/living/carbon/human/H in GLOB.player_list) - if(H.stat == 2 || !(H.client)) continue + if(H.stat == DEAD || !(H.client)) continue if(H.mind) if(H.mind.special_role == "Wizard" || H.mind.special_role == "apprentice" || H.mind.special_role == "survivalist") continue if(prob(survivor_probability) && !(H.mind in SSticker.mode.traitors)) diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm index d71cddd3e4..4e478d3420 100644 --- a/code/modules/surgery/organs/augments_internal.dm +++ b/code/modules/surgery/organs/augments_internal.dm @@ -52,7 +52,7 @@ if(active) for(var/obj/item/I in owner.held_items) if(!(I.flags_1 & NODROP_1)) - flags_1 += I + stored_items += I var/list/L = owner.get_empty_held_indexes() if(LAZYLEN(L) == owner.held_items.len) @@ -87,6 +87,7 @@ /obj/item/organ/cyberimp/brain/anti_drop/proc/release_items() for(var/obj/item/I in stored_items) I.flags_1 &= ~NODROP_1 + stored_items = list() /obj/item/organ/cyberimp/brain/anti_drop/Remove(var/mob/living/carbon/M, special = 0) diff --git a/code/modules/surgery/organs/ears.dm b/code/modules/surgery/organs/ears.dm index 2ee223b403..26c2239bb6 100644 --- a/code/modules/surgery/organs/ears.dm +++ b/code/modules/surgery/organs/ears.dm @@ -80,9 +80,6 @@ icon = 'icons/obj/clothing/hats.dmi' icon_state = "kitty" -/obj/item/organ/ears/cat/adjustEarDamage(ddmg, ddeaf) - ..(ddmg*2,ddeaf*2) - /obj/item/organ/ears/cat/Insert(mob/living/carbon/human/H, special = 0, drop_if_replaced = TRUE) ..() color = H.hair_color @@ -93,4 +90,4 @@ ..() color = H.hair_color H.dna.features["ears"] = "None" - H.update_body() \ No newline at end of file + H.update_body() diff --git a/code/modules/surgery/organs/lungs.dm b/code/modules/surgery/organs/lungs.dm index f95e2cd996..27b0406a04 100644 --- a/code/modules/surgery/organs/lungs.dm +++ b/code/modules/surgery/organs/lungs.dm @@ -316,6 +316,29 @@ safe_toxins_min = 16 //We breath THIS! safe_toxins_max = 0 +/obj/item/organ/lungs/cybernetic + name = "cybernetic lungs" + desc = "A cybernetic version of the lungs found in traditional humanoid entities. It functions the same as an organic lung and is merely meant as a replacement." + icon_state = "lungs-c" + origin_tech = "biotech=4" + +/obj/item/organ/lungs/cybernetic/emp_act() + owner.losebreath = 20 + + +/obj/item/organ/lungs/cybernetic/upgraded + name = "upgraded cybernetic lungs" + desc = "A more advanced version of the stock cybernetic lungs. They are capable of filtering out lower levels of toxins and carbon-dioxide." + icon_state = "lungs-c-u" + origin_tech = "biotech=5" + + safe_toxins_max = 20 + safe_co2_max = 20 + + cold_level_1_threshold = 200 + cold_level_2_threshold = 140 + cold_level_3_threshold = 100 + #undef HUMAN_MAX_OXYLOSS #undef HUMAN_CRIT_MAX_OXYLOSS #undef HEAT_GAS_DAMAGE_LEVEL_1 diff --git a/code/modules/surgery/organs/tongue.dm b/code/modules/surgery/organs/tongue.dm index b69c1f4c5c..0113166d86 100644 --- a/code/modules/surgery/organs/tongue.dm +++ b/code/modules/surgery/organs/tongue.dm @@ -47,6 +47,7 @@ say_mod = "hisses" taste_sensitivity = 10 // combined nose + tongue, extra sensitive +/* /obj/item/organ/tongue/lizard/TongueSpeech(var/message) var/regex/lizard_hiss = new("s+", "g") var/regex/lizard_hiSS = new("S+", "g") @@ -54,6 +55,7 @@ message = lizard_hiss.Replace(message, "sss") message = lizard_hiSS.Replace(message, "SSS") return message + */ /obj/item/organ/tongue/fly name = "proboscis" diff --git a/code/modules/surgery/organs/vocal_cords.dm b/code/modules/surgery/organs/vocal_cords.dm index 0f5f1de91d..8f32aa89eb 100644 --- a/code/modules/surgery/organs/vocal_cords.dm +++ b/code/modules/surgery/organs/vocal_cords.dm @@ -569,6 +569,7 @@ message_admins("[key_name_admin(user)] has said '[log_message]' with a Voice of God, affecting [english_list(listeners)], with a power multiplier of [power_multiplier].") log_game("[key_name(user)] has said '[log_message]' with a Voice of God, affecting [english_list(listeners)], with a power multiplier of [power_multiplier].") + SSblackbox.add_details("voice_of_god", log_message) return cooldown diff --git a/code/modules/uplink/uplink_item.dm b/code/modules/uplink/uplink_item.dm index 924c37adf6..a3ab275767 100644 --- a/code/modules/uplink/uplink_item.dm +++ b/code/modules/uplink/uplink_item.dm @@ -970,7 +970,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once. desc = "When used with an upload console, this module allows you to upload priority laws to an artificial intelligence. \ Be careful with wording, as artificial intelligences may look for loopholes to exploit." item = /obj/item/aiModule/syndicate - cost = 14 + cost = 9 /datum/uplink_item/device_tools/briefcase_launchpad name = "Briefcase Launchpad" diff --git a/code/modules/vore/eating/belly_vr.dm b/code/modules/vore/eating/belly_vr.dm index d5c484d387..f1e4274ce9 100644 --- a/code/modules/vore/eating/belly_vr.dm +++ b/code/modules/vore/eating/belly_vr.dm @@ -24,7 +24,7 @@ var/escapetime = 200 // Deciseconds, how long to escape this belly var/escapechance = 45 // % Chance of prey beginning to escape if prey struggles. var/tmp/digest_mode = DM_HOLD // Whether or not to digest. Default to not digest. - var/tmp/list/digest_modes = list(DM_HOLD,DM_DIGEST,DM_HEAL) // Possible digest modes + var/tmp/list/digest_modes = list(DM_HOLD,DM_DIGEST,DM_HEAL,DM_NOISY) // Possible digest modes var/tmp/mob/living/owner // The mob whose belly this is. var/tmp/list/internal_contents = list() // People/Things you've eaten into this belly! var/tmp/is_full // Flag for if digested remeans are present. (for disposal messages) @@ -106,7 +106,7 @@ return 0 for (var/atom/movable/M in internal_contents) M.forceMove(owner.loc) // Move the belly contents into the same location as belly's owner. - M << sound(null, repeat = 0, wait = 0, volume = 80, channel = 50) + M << sound(null, repeat = 0, wait = 0, volume = 80, channel = CHANNEL_PREYLOOP) internal_contents.Remove(M) // Remove from the belly contents var/datum/belly/B = check_belly(owner) // This makes sure that the mob behaves properly if released into another mob @@ -124,7 +124,7 @@ return FALSE // They weren't in this belly anyway M.forceMove(owner.loc) // Move the belly contents into the same location as belly's owner. - M << sound(null, repeat = 0, wait = 0, volume = 80, channel = 50) + M << sound(null, repeat = 0, wait = 0, volume = 80, channel = CHANNEL_PREYLOOP) src.internal_contents.Add(M) // Remove from the belly contents var/datum/belly/B = check_belly(owner) if(B) @@ -143,7 +143,7 @@ prey.forceMove(owner) internal_contents.Add(prey) - prey << sound('sound/vore/prey/loop.ogg', repeat = 1, wait = 0, volume = 80, channel = 50) + prey << sound('sound/vore/prey/loop.ogg', repeat = 1, wait = 0, volume = 35, channel = CHANNEL_PREYLOOP) if(inside_flavor) prey << "[inside_flavor]" @@ -224,7 +224,7 @@ /datum/belly/proc/digestion_death(var/mob/living/M) is_full = TRUE internal_contents.Remove(M) - M << sound(null, repeat = 0, wait = 0, volume = 80, channel = 50) + M << sound(null, repeat = 0, wait = 0, volume = 80, channel = CHANNEL_PREYLOOP) // If digested prey is also a pred... anyone inside their bellies gets moved up. if (is_vore_predator(M)) for (var/bellytype in M.vore_organs) @@ -255,6 +255,7 @@ return // User is not in this belly, or struggle too soon. R.setClickCooldown(50) + var/sound/prey_struggle = sound(get_sfx("prey_struggle")) if(owner.stat) //If owner is stat (dead, KO) we can actually escape to_chat(R, "You attempt to climb out of \the [name]. (This will take around [escapetime/10] seconds.)") @@ -288,9 +289,9 @@ // for(var/mob/M in hearers(4, owner)) // M.visible_message(struggle_outer_message) // hearable R.visible_message( "[struggle_outer_message]", "[struggle_user_message]") - playsound(get_turf(owner),"struggle_sound",75,0,-5,1,channel=51) - R.stop_sound_channel(51) - R.playsound_local("prey_struggle_sound",60) + playsound(get_turf(owner),"struggle_sound",35,0,-6,1,channel=151) + R.stop_sound_channel(151) + R.playsound_local(get_turf(R), null, 45, S = prey_struggle) if(escapable && R.a_intent != "help") //If the stomach has escapable enabled and the person is actually trying to kick out to_chat(R, "You attempt to climb out of \the [name].") diff --git a/code/modules/vore/eating/bellymodes_vr.dm b/code/modules/vore/eating/bellymodes_vr.dm index b58875bd1f..19d07e6fb6 100644 --- a/code/modules/vore/eating/bellymodes_vr.dm +++ b/code/modules/vore/eating/bellymodes_vr.dm @@ -1,6 +1,8 @@ // Process the predator's effects upon the contents of its belly (i.e digestion/transformation etc) // Called from /mob/living/Life() proc. /datum/belly/proc/process_Life() + var/sound/prey_gurgle = sound(get_sfx("digest_prey")) + var/sound/prey_digest = sound(get_sfx("death_prey")) /////////////////////////// Auto-Emotes /////////////////////////// if((digest_mode in emote_lists) && !emotePend) @@ -19,11 +21,11 @@ //////////////////////////// DM_DIGEST //////////////////////////// if(digest_mode == DM_DIGEST) for (var/mob/living/M in internal_contents) - if(prob(50)) + if(prob(15)) M.stop_sound_channel(CHANNEL_PRED) - playsound(get_turf(owner),"digest_pred",75,0,-6,0,channel=CHANNEL_PRED) + playsound(get_turf(owner),"digest_pred",50,0,-6,0,channel=CHANNEL_PRED) M.stop_sound_channel(CHANNEL_PRED) - M.playsound_local("digest_prey",60) + M.playsound_local(get_turf(M), null, 45, S = prey_gurgle) //Pref protection! if (!M.digestable) @@ -50,9 +52,9 @@ owner.nutrition += 400 // so eating dead mobs gives you *something*. M.stop_sound_channel(CHANNEL_PRED) - playsound(get_turf(owner),"death_pred",50,0,-6,0,channel=CHANNEL_PRED) + playsound(get_turf(owner),"death_pred",45,0,-6,0,channel=CHANNEL_PRED) M.stop_sound_channel(CHANNEL_PRED) - M.playsound_local("death_prey",60) + M.playsound_local(get_turf(M), null, 45, S = prey_digest) digestion_death(M) owner.update_icons() continue @@ -67,11 +69,11 @@ ///////////////////////////// DM_HEAL ///////////////////////////// if(digest_mode == DM_HEAL) for (var/mob/living/M in internal_contents) - if(prob(50)) + if(prob(15)) M.stop_sound_channel(CHANNEL_PRED) - playsound(get_turf(owner),"digest_pred",50,0,-6,0,channel=CHANNEL_PRED) + playsound(get_turf(owner),"digest_pred",35,0,-6,0,channel=CHANNEL_PRED) M.stop_sound_channel(CHANNEL_PRED) - M.playsound_local("digest_prey",60) + M.playsound_local(get_turf(M), null, 45, S = prey_gurgle) if(M.stat != DEAD) if(owner.nutrition >= NUTRITION_LEVEL_STARVING && (M.health < M.maxHealth)) @@ -79,3 +81,13 @@ M.adjustFireLoss(-1) owner.nutrition -= 10 return + +////////////////////////// DM_NOISY ///////////////////////////////// +//for when you just want people to squelch around + if(digest_mode == DM_NOISY) + for (var/mob/living/M in internal_contents) + if(prob(35)) + M.stop_sound_channel(CHANNEL_PRED) + playsound(get_turf(owner),"digest_pred",35,0,-6,0,channel=CHANNEL_PRED) + M.stop_sound_channel(CHANNEL_PRED) + M.playsound_local(get_turf(M), null, 45, S = prey_gurgle) diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm index 7be607bd2a..98db33a763 100644 --- a/code/modules/vore/eating/living_vr.dm +++ b/code/modules/vore/eating/living_vr.dm @@ -21,7 +21,7 @@ if(M.client && M.client.prefs_vr) if(!M.copy_from_prefs_vr()) - M << "ERROR: You seem to have saved VOREStation prefs, but they couldn't be loaded." + M << "ERROR: You seem to have saved vore prefs, but they couldn't be loaded." return FALSE if(M.vore_organs && M.vore_organs.len) M.vore_selected = M.vore_organs[1] diff --git a/code/modules/vore/trycatch_vr.dm b/code/modules/vore/trycatch_vr.dm index 1ae5c3bc0c..2adf6e0cf6 100644 --- a/code/modules/vore/trycatch_vr.dm +++ b/code/modules/vore/trycatch_vr.dm @@ -1,6 +1,6 @@ /* This file is for jamming single-line procs into Polaris procs. -It will prevent runtimes and allow their code to run if VOREStation's fails. +It will prevent runtimes and allow their code to run if these fail. It will also log when we mess up our code rather than making it vague. Call it at the top of a stock proc with... diff --git a/config/config.txt b/config/config.txt index b344482679..70fe7812b2 100644 --- a/config/config.txt +++ b/config/config.txt @@ -32,6 +32,19 @@ BAN_LEGACY_SYSTEM ## Uncomment this to have the job system use the player's account creation date, rather than the when they first joined the server for job timers. #USE_ACCOUNT_AGE_FOR_JOBS +## Unhash this to track player playtime in the database. Requires database to be enabled. +#USE_EXP_TRACKING +## Unhash this to enable playtime requirements for head jobs. +#USE_EXP_RESTRICTIONS_HEADS +## Unhash this to override head jobs' playtime requirements with this number of hours. +#USE_EXP_RESTRICTIONS_HEADS_HOURS 15 +## Unhash this to change head jobs' playtime requirements so that they're based on department playtime, rather than crew playtime. +#USE_EXP_RESTRICTIONS_HEADS_DEPARTMENT +## Unhash this to enable playtime requirements for certain non-head jobs, like Engineer and Scientist. +#USE_EXP_RESTRICTIONS_OTHER +## Allows admins to bypass job playtime requirements. +#USE_EXP_RESTRICTIONS_ADMIN_BYPASS + ## log OOC channel LOG_OOC @@ -178,6 +191,14 @@ CHECK_RANDOMIZER ## Ban appeals URL - usually for a forum or wherever people should go to contact your admins. # BANAPPEALS http://justanotherday.example.com +## System command that invokes youtube-dl, used by Play Internet Sound. +## You can install youtube-dl with +## "pip install youtube-dl" if you have pip installed +## from https://github.com/rg3/youtube-dl/releases +## or your package manager +## The default value assumes youtube-dl is in your system PATH +# INVOKE_YOUTUBEDL youtube-dl + ## In-game features ##Toggle for having jobs load up from the .txt # LOAD_JOBS_FROM_TXT @@ -315,4 +336,4 @@ MINUTE_TOPIC_LIMIT 100 #ERROR_MSG_DELAY 50 ## Send a message to IRC when starting a new game -#IRC_ANNOUNCE_NEW_GAME \ No newline at end of file +#IRC_ANNOUNCE_NEW_GAME diff --git a/config/config.txt.rej b/config/config.txt.rej new file mode 100644 index 0000000000..fee79cf699 --- /dev/null +++ b/config/config.txt.rej @@ -0,0 +1,25 @@ +diff a/config/config.txt b/config/config.txt (rejected hunks) +@@ -32,17 +32,17 @@ BAN_LEGACY_SYSTEM + ## Uncomment this to have the job system use the player's account creation date, rather than the when they first joined the server for job timers. + #USE_ACCOUNT_AGE_FOR_JOBS + +-##Unhash this to track player playtime in the database. Requires database to be enabled. ++## Unhash this to track player playtime in the database. Requires database to be enabled. + #USE_EXP_TRACKING +-##Unhash this to enable playtime requirements for head jobs. ++## Unhash this to enable playtime requirements for head jobs. + #USE_EXP_RESTRICTIONS_HEADS +-##Unhash this to override head jobs' playtime requirements with this number of hours. ++## Unhash this to override head jobs' playtime requirements with this number of hours. + #USE_EXP_RESTRICTIONS_HEADS_HOURS 15 +-##Unhash this to change head jobs' playtime requirements so that they're based on department playtime, rather than crew playtime. ++## Unhash this to change head jobs' playtime requirements so that they're based on department playtime, rather than crew playtime. + #USE_EXP_RESTRICTIONS_HEADS_DEPARTMENT +-##Unhash this to enable playtime requirements for certain non-head jobs, like Engineer and Scientist. ++## Unhash this to enable playtime requirements for certain non-head jobs, like Engineer and Scientist. + #USE_EXP_RESTRICTIONS_OTHER +-##Allows admins to bypass job playtime requirements. ++## Allows admins to bypass job playtime requirements. + #USE_EXP_RESTRICTIONS_ADMIN_BYPASS + + diff --git a/config/custom_roundstart_items.txt b/config/custom_roundstart_items.txt new file mode 100644 index 0000000000..8c5a87a676 --- /dev/null +++ b/config/custom_roundstart_items.txt @@ -0,0 +1,10 @@ +//File should be in the format of ckey|exact character name/exact second character name/ALL for all chars|exact job name/exact job name/or put ALL instead of any job names|/path/to/item=amount;/path/to/item=amount +//Each ckey should be in a different line +//if there's multiple entries of a single ckey the later ones will add to the earlier definitions. +//is obviously a comment. +//Recommend defining one job per line, but do what you want. +//test1|Secondary Memenamefortesting|testjob1/test job 2/ALL|/obj/item/gun/energy/laser=3;/obj/item/gun/energy/laser/retro=1;/obj/item/gun/energy=2 +//test1|Memename Lastname|testjob1|/obj/item/device/aicard=3;/obj/item/device/flightpack=1;/obj/item/gun/energy=3 +//kevinz000|Skylar Lineman|ALL|/obj/item/bikehorn/airhorn=1 +//kevinz000|ALL|Clown|/obj/item/bikehorn=1 +JayEhh|ALL|ALL|/obj/item/custom/ceb_soap=1 \ No newline at end of file diff --git a/config/spaceRuinBlacklist.txt b/config/spaceRuinBlacklist.txt index 56f65f6c24..8a1069408e 100644 --- a/config/spaceRuinBlacklist.txt +++ b/config/spaceRuinBlacklist.txt @@ -41,3 +41,4 @@ #_maps/RandomRuins/SpaceRuins/bus.dmm #_maps/RandomRuins/SpaceRuins/miracle.dmm #_maps/RandomRuins/SpaceRuins/dragoontomb.dmm +#_maps/RandomRuins/SpaceRuins/oldstation.dmm diff --git a/html/changelogs/AutoChangeLog-pr-2440.yml b/html/changelogs/AutoChangeLog-pr-2440.yml new file mode 100644 index 0000000000..b353d7b79b --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2440.yml @@ -0,0 +1,4 @@ +author: "XDTM" +delete-after: True +changes: + - rscadd: "You can now click on symptoms in the Pandemic to see their description and stats" diff --git a/html/changelogs/AutoChangeLog-pr-2442.yml b/html/changelogs/AutoChangeLog-pr-2442.yml new file mode 100644 index 0000000000..47a8464ffb --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2442.yml @@ -0,0 +1,5 @@ +author: "CitadelStationBot" +delete-after: True +changes: + - experiment: "The amount of time spent playing, and jobs played are now tracked per player." + - experiment: "This tracking can be used as a requirement of playtime to unlock jobs." diff --git a/html/changelogs/AutoChangeLog-pr-2557.yml b/html/changelogs/AutoChangeLog-pr-2557.yml new file mode 100644 index 0000000000..50126b4a99 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2557.yml @@ -0,0 +1,4 @@ +author: "CitadelStationBot" +delete-after: True +changes: + - balance: "Hacked AI module cost is reduced to 9TC" diff --git a/html/changelogs/AutoChangeLog-pr-2559.yml b/html/changelogs/AutoChangeLog-pr-2559.yml new file mode 100644 index 0000000000..467f79bd99 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2559.yml @@ -0,0 +1,4 @@ +author: "ninjanomnom" +delete-after: True +changes: + - bugfix: "Fixed a problem with shuttles being unrepairable under certain circumstances." diff --git a/html/changelogs/AutoChangeLog-pr-2568.yml b/html/changelogs/AutoChangeLog-pr-2568.yml new file mode 100644 index 0000000000..fd6b478a7a --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2568.yml @@ -0,0 +1,4 @@ +author: "Kor" +delete-after: True +changes: + - balance: "Slime people can consume meat and dairy again." diff --git a/html/changelogs/AutoChangeLog-pr-2578.yml b/html/changelogs/AutoChangeLog-pr-2578.yml new file mode 100644 index 0000000000..479ce904f9 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2578.yml @@ -0,0 +1,6 @@ +author: "CitadelStationBot" +delete-after: True +changes: + - bugfix: "Pouring radium into a ninja suit restores adrenaline boosts." + - bugfix: "Adrenaline boost works while unconscious again." + - bugfix: "Energy nets can be used again!" diff --git a/html/changelogs/AutoChangeLog-pr-2588.yml b/html/changelogs/AutoChangeLog-pr-2588.yml new file mode 100644 index 0000000000..3ab78efa1d --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2588.yml @@ -0,0 +1,4 @@ +author: "LetterJay" +delete-after: True +changes: + - bugfix: "Actually fixes missing guilmon issue and puts it correctly in the list. (I tested it.)" diff --git a/html/changelogs/AutoChangeLog-pr-2590.yml b/html/changelogs/AutoChangeLog-pr-2590.yml new file mode 100644 index 0000000000..acada72b29 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2590.yml @@ -0,0 +1,4 @@ +author: "as334" +delete-after: True +changes: + - rscadd: "Added a mass spectrometer to the detective's closet" diff --git a/html/changelogs/AutoChangeLog-pr-2592.yml b/html/changelogs/AutoChangeLog-pr-2592.yml new file mode 100644 index 0000000000..95feb0302e --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2592.yml @@ -0,0 +1,4 @@ +author: "Jay" +delete-after: True +changes: + - rscdel: "Removes swarmers from the event table for the time being." diff --git a/html/changelogs/AutoChangeLog-pr-2600.yml b/html/changelogs/AutoChangeLog-pr-2600.yml new file mode 100644 index 0000000000..79380038d4 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2600.yml @@ -0,0 +1,4 @@ +author: "Jay" +delete-after: True +changes: + - tweak: "Removes the lisp lizards have when talking" diff --git a/html/changelogs/AutoChangeLog-pr-2608.yml b/html/changelogs/AutoChangeLog-pr-2608.yml new file mode 100644 index 0000000000..0025d73f45 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2608.yml @@ -0,0 +1,5 @@ +author: "Joan" +delete-after: True +changes: + - tweak: "While below 0 health but above -30 health, you will be able to crawl slowly if not pulled, whisper, hear speech, and see with worsening vision." + - wip: "The previous softcrit got reverted, for changelog context." diff --git a/html/changelogs/AutoChangeLog-pr-2623.yml b/html/changelogs/AutoChangeLog-pr-2623.yml new file mode 100644 index 0000000000..a78e6393ef --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2623.yml @@ -0,0 +1,4 @@ +author: "Poojawa" +delete-after: True +changes: + - rscadd: "Sofas are now able to be built, they're basically chairs still." diff --git a/html/changelogs/AutoChangeLog-pr-2625.yml b/html/changelogs/AutoChangeLog-pr-2625.yml new file mode 100644 index 0000000000..df49005b81 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2625.yml @@ -0,0 +1,4 @@ +author: "Raeschen" +delete-after: True +changes: + - tweak: "oldstation.dmm blacklisted" diff --git a/html/changelogs/AutoChangeLog-pr-2631.yml b/html/changelogs/AutoChangeLog-pr-2631.yml new file mode 100644 index 0000000000..3562443083 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2631.yml @@ -0,0 +1,4 @@ +author: "Xhuis" +delete-after: True +changes: + - rscadd: "Common lavaland mobs now have rare mutations! Keep an eye out for rare Poke- err, monsters." diff --git a/html/changelogs/AutoChangeLog-pr-2632.yml b/html/changelogs/AutoChangeLog-pr-2632.yml new file mode 100644 index 0000000000..dcfc2d5450 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2632.yml @@ -0,0 +1,4 @@ +author: "CitadelStationBot" +delete-after: True +changes: + - balance: "Altered pressure plate crafting recipe" diff --git a/html/changelogs/AutoChangeLog-pr-2633.yml b/html/changelogs/AutoChangeLog-pr-2633.yml new file mode 100644 index 0000000000..4806cb12c5 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2633.yml @@ -0,0 +1,4 @@ +author: "Xhuis" +delete-after: True +changes: + - imageadd: "The hand drill and jaws of life now have sprites on the toolbelt." diff --git a/html/changelogs/AutoChangeLog-pr-2641.yml b/html/changelogs/AutoChangeLog-pr-2641.yml new file mode 100644 index 0000000000..a888615c05 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2641.yml @@ -0,0 +1,4 @@ +author: "CitadelStationBot" +delete-after: True +changes: + - rscadd: "Admins may now show the variables interface to players to help contributors debug their new additions" diff --git a/html/changelogs/AutoChangeLog-pr-2642.yml b/html/changelogs/AutoChangeLog-pr-2642.yml new file mode 100644 index 0000000000..eb2a9a86cc --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2642.yml @@ -0,0 +1,4 @@ +author: "Xhuis" +delete-after: True +changes: + - rscadd: "You can now kill yourself in fun and creative ways with the hierophant club." diff --git a/html/changelogs/AutoChangeLog-pr-2650.yml b/html/changelogs/AutoChangeLog-pr-2650.yml new file mode 100644 index 0000000000..4e062b977c --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2650.yml @@ -0,0 +1,4 @@ +author: "Naksu" +delete-after: True +changes: + - rscadd: "Added TGUI interfaces to various smartfridges of different kinds, drying racks and the disk compartmentalizer" diff --git a/html/changelogs/AutoChangeLog-pr-2651.yml b/html/changelogs/AutoChangeLog-pr-2651.yml new file mode 100644 index 0000000000..18dfe3ec3d --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2651.yml @@ -0,0 +1,4 @@ +author: "Jay" +delete-after: True +changes: + - bugfix: "Goliaths can be butchered again" diff --git a/html/changelogs/AutoChangeLog-pr-2656.yml b/html/changelogs/AutoChangeLog-pr-2656.yml new file mode 100644 index 0000000000..a1be7491b7 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2656.yml @@ -0,0 +1,4 @@ +author: "JJRcop" +delete-after: True +changes: + - rscadd: "Admins can now play media content from the web to players." diff --git a/html/changelogs/AutoChangeLog-pr-2662.yml b/html/changelogs/AutoChangeLog-pr-2662.yml new file mode 100644 index 0000000000..9eb4f3020f --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2662.yml @@ -0,0 +1,4 @@ +author: "basilman" +delete-after: True +changes: + - rscadd: "penguins may now have shamebreros, noot noot" diff --git a/html/changelogs/AutoChangeLog-pr-2663.yml b/html/changelogs/AutoChangeLog-pr-2663.yml new file mode 100644 index 0000000000..99d9414d41 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2663.yml @@ -0,0 +1,4 @@ +author: "Xhuis" +delete-after: True +changes: + - balance: "Watchers now have a half-second telegraph between charging and firing their freezing blasts." diff --git a/html/changelogs/AutoChangeLog-pr-2666.yml b/html/changelogs/AutoChangeLog-pr-2666.yml new file mode 100644 index 0000000000..5f15eab5f6 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2666.yml @@ -0,0 +1,4 @@ +author: "Robustin" +delete-after: True +changes: + - tweak: "Golem shells no longer fit in standard crew bags." diff --git a/html/changelogs/AutoChangeLog-pr-2671.yml b/html/changelogs/AutoChangeLog-pr-2671.yml new file mode 100644 index 0000000000..2415108e8b --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2671.yml @@ -0,0 +1,4 @@ +author: "CitadelStationBot" +delete-after: True +changes: + - bugfix: "Windoors open when emagged again" diff --git a/html/changelogs/AutoChangeLog-pr-2674.yml b/html/changelogs/AutoChangeLog-pr-2674.yml new file mode 100644 index 0000000000..192d444569 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2674.yml @@ -0,0 +1,4 @@ +author: "VexingRaven" +delete-after: True +changes: + - bugfix: "Hearty Punch once again pulls people out of crit." diff --git a/html/changelogs/AutoChangeLog-pr-2688.yml b/html/changelogs/AutoChangeLog-pr-2688.yml new file mode 100644 index 0000000000..5a58322884 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2688.yml @@ -0,0 +1,4 @@ +author: "Firecage" +delete-after: True +changes: + - rscadd: "The NanoTrasen Department for Cybernetics (NDC) would like to announce the creation of Cybernetic Lungs. Both a stock variety to replace traditional stock human lungs in emergencies, and a more enhanced variety allowing greater tolerance of breathing cold air, toxins, and CO2." diff --git a/html/changelogs/AutoChangeLog-pr-2706.yml b/html/changelogs/AutoChangeLog-pr-2706.yml new file mode 100644 index 0000000000..4db678dd9b --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2706.yml @@ -0,0 +1,4 @@ +author: "Xhuis" +delete-after: True +changes: + - rscadd: "You can now use metal rods and departmental jumpsuits to craft departments for each banner." diff --git a/icons/mob/hair_extensions.dmi b/icons/mob/hair_extensions.dmi index 5a4ee36157..4ca025ed34 100644 Binary files a/icons/mob/hair_extensions.dmi and b/icons/mob/hair_extensions.dmi differ diff --git a/icons/mob/human_parts_greyscale.dmi b/icons/mob/human_parts_greyscale.dmi index a06f490fa7..b6d51f17ee 100644 Binary files a/icons/mob/human_parts_greyscale.dmi and b/icons/mob/human_parts_greyscale.dmi differ diff --git a/icons/mob/inhands/equipment/instruments_lefthand.dmi b/icons/mob/inhands/equipment/instruments_lefthand.dmi index 3c168f9d3d..11ae1895d1 100644 Binary files a/icons/mob/inhands/equipment/instruments_lefthand.dmi and b/icons/mob/inhands/equipment/instruments_lefthand.dmi differ diff --git a/icons/mob/inhands/equipment/instruments_righthand.dmi b/icons/mob/inhands/equipment/instruments_righthand.dmi index bb264c1370..fcf891a581 100644 Binary files a/icons/mob/inhands/equipment/instruments_righthand.dmi and b/icons/mob/inhands/equipment/instruments_righthand.dmi differ diff --git a/icons/mob/inhands/equipment/medical_lefthand.dmi b/icons/mob/inhands/equipment/medical_lefthand.dmi index d55cf81f92..24c79727d0 100644 Binary files a/icons/mob/inhands/equipment/medical_lefthand.dmi and b/icons/mob/inhands/equipment/medical_lefthand.dmi differ diff --git a/icons/mob/inhands/equipment/medical_righthand.dmi b/icons/mob/inhands/equipment/medical_righthand.dmi index 764c5c542a..427e29c49c 100644 Binary files a/icons/mob/inhands/equipment/medical_righthand.dmi and b/icons/mob/inhands/equipment/medical_righthand.dmi differ diff --git a/icons/mob/inhands/equipment/security_lefthand.dmi b/icons/mob/inhands/equipment/security_lefthand.dmi index a9f3c36ac1..6ccdfba3fc 100644 Binary files a/icons/mob/inhands/equipment/security_lefthand.dmi and b/icons/mob/inhands/equipment/security_lefthand.dmi differ diff --git a/icons/mob/inhands/equipment/security_righthand.dmi b/icons/mob/inhands/equipment/security_righthand.dmi index 201eaa19aa..e3f930a13e 100644 Binary files a/icons/mob/inhands/equipment/security_righthand.dmi and b/icons/mob/inhands/equipment/security_righthand.dmi differ diff --git a/icons/mob/inhands/items_lefthand.dmi b/icons/mob/inhands/items_lefthand.dmi index 414d12d508..198c2ee663 100644 Binary files a/icons/mob/inhands/items_lefthand.dmi and b/icons/mob/inhands/items_lefthand.dmi differ diff --git a/icons/mob/inhands/items_righthand.dmi b/icons/mob/inhands/items_righthand.dmi index e6c633294e..cef6409ca2 100644 Binary files a/icons/mob/inhands/items_righthand.dmi and b/icons/mob/inhands/items_righthand.dmi differ diff --git a/icons/mob/inhands/misc/books_lefthand.dmi b/icons/mob/inhands/misc/books_lefthand.dmi index 180e1999a4..71d06d345a 100644 Binary files a/icons/mob/inhands/misc/books_lefthand.dmi and b/icons/mob/inhands/misc/books_lefthand.dmi differ diff --git a/icons/mob/inhands/misc/books_righthand.dmi b/icons/mob/inhands/misc/books_righthand.dmi index ac7ed504d6..906f47bfe9 100644 Binary files a/icons/mob/inhands/misc/books_righthand.dmi and b/icons/mob/inhands/misc/books_righthand.dmi differ diff --git a/icons/mob/inhands/misc/lavaland_lefthand.dmi b/icons/mob/inhands/misc/lavaland_lefthand.dmi new file mode 100644 index 0000000000..74654a89a4 Binary files /dev/null and b/icons/mob/inhands/misc/lavaland_lefthand.dmi differ diff --git a/icons/mob/inhands/misc/lavaland_righthand.dmi b/icons/mob/inhands/misc/lavaland_righthand.dmi new file mode 100644 index 0000000000..c1b2447e22 Binary files /dev/null and b/icons/mob/inhands/misc/lavaland_righthand.dmi differ diff --git a/icons/mob/inhands/weapons/bombs_lefthand.dmi b/icons/mob/inhands/weapons/bombs_lefthand.dmi index a084091414..df168f848d 100644 Binary files a/icons/mob/inhands/weapons/bombs_lefthand.dmi and b/icons/mob/inhands/weapons/bombs_lefthand.dmi differ diff --git a/icons/mob/inhands/weapons/bombs_righthand.dmi b/icons/mob/inhands/weapons/bombs_righthand.dmi index 39b50584ce..718441b312 100644 Binary files a/icons/mob/inhands/weapons/bombs_righthand.dmi and b/icons/mob/inhands/weapons/bombs_righthand.dmi differ diff --git a/icons/mob/lavaland/lavaland_monsters.dmi b/icons/mob/lavaland/lavaland_monsters.dmi index 3e8ecaf1ce..7d70ce4202 100644 Binary files a/icons/mob/lavaland/lavaland_monsters.dmi and b/icons/mob/lavaland/lavaland_monsters.dmi differ diff --git a/icons/mob/lavaland/watcher.dmi b/icons/mob/lavaland/watcher.dmi index 23960478b3..6897ca4e98 100644 Binary files a/icons/mob/lavaland/watcher.dmi and b/icons/mob/lavaland/watcher.dmi differ diff --git a/icons/mob/mam_body_markings.dmi b/icons/mob/mam_body_markings.dmi index fdb97490c8..ea4ca10627 100644 Binary files a/icons/mob/mam_body_markings.dmi and b/icons/mob/mam_body_markings.dmi differ diff --git a/icons/mob/mam_bodyparts.dmi b/icons/mob/mam_bodyparts.dmi index 7de9b40734..8adb82544e 100644 Binary files a/icons/mob/mam_bodyparts.dmi and b/icons/mob/mam_bodyparts.dmi differ diff --git a/icons/mob/neck.dmi b/icons/mob/neck.dmi index 59635b8c7d..4618dee14b 100644 Binary files a/icons/mob/neck.dmi and b/icons/mob/neck.dmi differ diff --git a/icons/mob/penguins.dmi b/icons/mob/penguins.dmi index fae32b6bcc..c7417f89b4 100644 Binary files a/icons/mob/penguins.dmi and b/icons/mob/penguins.dmi differ diff --git a/icons/mob/screen_full.dmi b/icons/mob/screen_full.dmi index 207f2d3e91..988bf59592 100644 Binary files a/icons/mob/screen_full.dmi and b/icons/mob/screen_full.dmi differ diff --git a/icons/obj/cigarettes.dmi b/icons/obj/cigarettes.dmi index 76ac7bd0a8..ed8f37c4da 100644 Binary files a/icons/obj/cigarettes.dmi and b/icons/obj/cigarettes.dmi differ diff --git a/icons/obj/clothing/belt_overlays.dmi b/icons/obj/clothing/belt_overlays.dmi index bbd4df9bb0..5946966d24 100644 Binary files a/icons/obj/clothing/belt_overlays.dmi and b/icons/obj/clothing/belt_overlays.dmi differ diff --git a/icons/obj/clothing/cloaks.dmi b/icons/obj/clothing/cloaks.dmi index dd1ae7d727..b61ea963da 100644 Binary files a/icons/obj/clothing/cloaks.dmi and b/icons/obj/clothing/cloaks.dmi differ diff --git a/icons/obj/custom.dmi b/icons/obj/custom.dmi new file mode 100644 index 0000000000..3b812e445a Binary files /dev/null and b/icons/obj/custom.dmi differ diff --git a/icons/obj/sofa.dmi b/icons/obj/sofa.dmi new file mode 100644 index 0000000000..dafe06a7f1 Binary files /dev/null and b/icons/obj/sofa.dmi differ diff --git a/sound/ambience/title1.ogg b/sound/ambience/title1.ogg index 1858f38e33..560fb6342f 100644 Binary files a/sound/ambience/title1.ogg and b/sound/ambience/title1.ogg differ diff --git a/sound/music/flytothemoon_otomatone.ogg b/sound/music/flytothemoon_otomatone.ogg new file mode 100644 index 0000000000..d0267dd12b Binary files /dev/null and b/sound/music/flytothemoon_otomatone.ogg differ diff --git a/strings/greek_letters.txt b/strings/greek_letters.txt new file mode 100644 index 0000000000..b1014aa178 --- /dev/null +++ b/strings/greek_letters.txt @@ -0,0 +1,24 @@ +Alpha +Beta +Gamma +Delta +Epsilon +Zeta +Eta +Theta +Iota +Kappa +Lambda +Mu +Nu +Xi +Omicron +Pi +Rho +Sigma +Tau +Upsilon +Phi +Chi +Psi +Omega \ No newline at end of file diff --git a/strings/numbers_as_words.txt b/strings/numbers_as_words.txt new file mode 100644 index 0000000000..f7c620cd9b --- /dev/null +++ b/strings/numbers_as_words.txt @@ -0,0 +1,20 @@ +One +Two +Three +Four +Five +Six +Seven +Eight +Nine +Ten +Eleven +Twelve +Thirteen +Fourteen +Fifteen +Sixteen +Seventeen +Eighteen +Nineteen +Twenty \ No newline at end of file diff --git a/strings/phonetic_alphabet.txt b/strings/phonetic_alphabet.txt new file mode 100644 index 0000000000..d77c1164ca --- /dev/null +++ b/strings/phonetic_alphabet.txt @@ -0,0 +1,26 @@ +Alpha +Bravo +Charlie +Delta +Echo +Foxtrot +Golf +Hotel +India +Juliet +Kilo +Lima +Mike +November +Oscar +Papa +Quebec +Romeo +Sierra +Tango +Uniform +Victor +Whiskey +X-ray +Yankee +Zulu \ No newline at end of file diff --git a/strings/round_start_sounds.txt b/strings/round_start_sounds.txt index 620c4af537..01323a6120 100644 --- a/strings/round_start_sounds.txt +++ b/strings/round_start_sounds.txt @@ -18,4 +18,5 @@ sound/music/torvus.ogg sound/music/shootingstars.ogg sound/music/oceanman.ogg sound/music/indeep.ogg -sound/music/goodbyemoonmen.ogg \ No newline at end of file +sound/music/goodbyemoonmen.ogg +sound/music/flytothemoon_otomatone.ogg diff --git a/strings/station_names.txt b/strings/station_names.txt new file mode 100644 index 0000000000..0937a10da6 --- /dev/null +++ b/strings/station_names.txt @@ -0,0 +1,82 @@ +Stanford +Dorf +Alium +Prefix +Clowning +Aegis +Ishimura +Scaredy +Death-World +Mime +Honk +Rogue +MacRagge +Ultrameens +Safety +Paranoia +Explosive +Neckbear +Donk +Muppet +North +West +East +South +Slant-ways +Widdershins +Rimward +Expensive +Procreatory +Imperial +Unidentified +Immoral +Carp +Ork +Pete +Control +Nettle +Aspie +Class +Crab +Fist +Corrogated +Skeleton +Race +Fatguy +Gentleman +Capitalist +Communist +Bear +Beard +Space +Spess +Star +Moon +System +Mining +Neckbeard +Research +Supply +Military +Orbital +Battle +Science +Asteroid +Home +Production +Transport +Delivery +Extraplanetary +Orbital +Correctional +Robot +Hats +Pizza +Taco +Burger +Box +Meta +Pub +Ship +Book +Refactor \ No newline at end of file diff --git a/strings/station_prefixes.txt b/strings/station_prefixes.txt new file mode 100644 index 0000000000..576e68dc1e --- /dev/null +++ b/strings/station_prefixes.txt @@ -0,0 +1,41 @@ +Imperium +Heretical +Cuban +Psychic +Elegant +Common +Uncommon +Rare +Unique +Houseruled +Religious +Atheist +Traditional +Houseruled +Mad +Super +Ultra +Secret +Top Secret +Deep +Death +Zybourne +Central +Main +Government +Uoi +Fat +Automated +Experimental +Augmented +American +Funky +Thin +Legendary +Szechuan +White +Black +Grey +Grim +Electric +Burning \ No newline at end of file diff --git a/strings/station_suffixes.txt b/strings/station_suffixes.txt new file mode 100644 index 0000000000..c30e18c245 --- /dev/null +++ b/strings/station_suffixes.txt @@ -0,0 +1,64 @@ +Station +Frontier +Suffix +Death-trap +Space-hulk +Lab +Hazard +Spess Junk +Fishery +No-Moon +Tomb +Crypt +Hut +Monkey +Bomb +Trade Post +Fortress +Village +Town +City +Edition +Hive +Complex +Base +Facility +Depot +Outpost +Installation +Drydock +Observatory +Array +Relay +Monitor +Platform +Construct +Hangar +Prison +Center +Port +Waystation +Factory +Waypoint +Stopover +Hub +HQ +Office +Object +Fortification +Colony +Planet-Cracker +Roost +Fat Camp +Airstrip +Harbor +Garden +Continent +Environment +Course +Country +Province +Workspace +Metro +Warehouse +Space Junk \ No newline at end of file diff --git a/tgstation.dme b/tgstation.dme index 4c2da1f48b..ab1e866b8d 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -95,6 +95,7 @@ #include "code\__HELPERS\pronouns.dm" #include "code\__HELPERS\radio.dm" #include "code\__HELPERS\sanitize_values.dm" +#include "code\__HELPERS\shell.dm" #include "code\__HELPERS\text.dm" #include "code\__HELPERS\text_vr.dm" #include "code\__HELPERS\time.dm" @@ -173,6 +174,9 @@ #include "code\citadel\cit_uniforms.dm" #include "code\citadel\cit_vendors.dm" #include "code\citadel\dogborgstuff.dm" +#include "code\citadel\custom_loadout\custom_items.dm" +#include "code\citadel\custom_loadout\load_to_mob.dm" +#include "code\citadel\custom_loadout\read_from_file.dm" #include "code\citadel\organs\breasts.dm" #include "code\citadel\organs\eggsack.dm" #include "code\citadel\organs\genitals.dm" @@ -278,6 +282,7 @@ #include "code\datums\antagonists\datum_traitor.dm" #include "code\datums\antagonists\devil.dm" #include "code\datums\antagonists\ninja.dm" +#include "code\datums\components\archaeology.dm" #include "code\datums\components\component.dm" #include "code\datums\components\slippery.dm" #include "code\datums\diseases\_disease.dm" @@ -981,6 +986,7 @@ #include "code\game\objects\structures\beds_chairs\alien_nest.dm" #include "code\game\objects\structures\beds_chairs\bed.dm" #include "code\game\objects\structures\beds_chairs\chair.dm" +#include "code\game\objects\structures\beds_chairs\sofa.dm" #include "code\game\objects\structures\crates_lockers\closets.dm" #include "code\game\objects\structures\crates_lockers\crates.dm" #include "code\game\objects\structures\crates_lockers\closets\bodybag.dm" @@ -1460,6 +1466,7 @@ #include "code\modules\hydroponics\grown\tomato.dm" #include "code\modules\hydroponics\grown\towercap.dm" #include "code\modules\jobs\access.dm" +#include "code\modules\jobs\job_exp.dm" #include "code\modules\jobs\jobs.dm" #include "code\modules\jobs\job_types\assistant.dm" #include "code\modules\jobs\job_types\captain.dm" @@ -1897,7 +1904,6 @@ #include "code\modules\ninja\suit\suit_attackby.dm" #include "code\modules\ninja\suit\suit_initialisation.dm" #include "code\modules\ninja\suit\suit_process.dm" -#include "code\modules\ninja\suit\suit_verbs_handlers.dm" #include "code\modules\ninja\suit\n_suit_verbs\energy_net_nets.dm" #include "code\modules\ninja\suit\n_suit_verbs\ninja_adrenaline.dm" #include "code\modules\ninja\suit\n_suit_verbs\ninja_cost_check.dm" @@ -2094,12 +2100,14 @@ #include "code\modules\research\xenobiology\xenobio_camera.dm" #include "code\modules\research\xenobiology\xenobiology.dm" #include "code\modules\ruins\lavaland_ruin_code.dm" +#include "code\modules\ruins\lavalandruin_code\biodome_clown_planet.dm" #include "code\modules\ruins\lavalandruin_code\sloth.dm" #include "code\modules\ruins\lavalandruin_code\surface.dm" #include "code\modules\ruins\objects_and_mobs\ash_walker_den.dm" #include "code\modules\ruins\objects_and_mobs\necropolis_gate.dm" #include "code\modules\ruins\objects_and_mobs\sin_ruins.dm" #include "code\modules\ruins\spaceruin_code\asteroid4.dm" +#include "code\modules\ruins\spaceruin_code\bigderelict1.dm" #include "code\modules\ruins\spaceruin_code\crashedclownship.dm" #include "code\modules\ruins\spaceruin_code\crashedship.dm" #include "code\modules\ruins\spaceruin_code\deepstorage.dm" diff --git a/tgui/assets/tgui.css b/tgui/assets/tgui.css index e0cc437429..ffe61666b9 100644 --- a/tgui/assets/tgui.css +++ b/tgui/assets/tgui.css @@ -1 +1 @@ -@charset "utf-8";body,html{box-sizing:border-box;height:100%;margin:0}html{overflow:hidden;cursor:default}body{overflow:auto;font-family:Verdana,Geneva,sans-serif;font-size:12px;color:#fff;background-color:#2a2a2a;background-image:linear-gradient(180deg,#2a2a2a 0,#202020);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff2a2a2a",endColorstr="#ff202020",GradientType=0)}*,:after,:before{box-sizing:inherit}h1,h2,h3,h4{display:inline-block;margin:0;padding:6px 0}h1{font-size:18px}h2{font-size:16px}h3{font-size:14px}h4{font-size:12px}body.clockwork{background:linear-gradient(180deg,#b18b25 0,#5f380e);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffb18b25",endColorstr="#ff5f380e",GradientType=0)}body.clockwork .normal{color:#b18b25}body.clockwork .good{color:#cfba47}body.clockwork .average{color:#896b19}body.clockwork .bad{color:#5f380e}body.clockwork .highlight{color:#b18b25}body.clockwork main{display:block;margin-top:32px;padding:2px 6px 0}body.clockwork hr{height:2px;background-color:#b18b25;border:none}body.clockwork .hidden{display:none}body.clockwork .bar .barText,body.clockwork span.button{color:#b18b25;font-size:12px;font-weight:400;font-style:normal;text-decoration:none}body.clockwork .bold{font-weight:700}body.clockwork .italic{font-style:italic}body.clockwork [unselectable=on]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}body.clockwork div[data-tooltip],body.clockwork span[data-tooltip]{position:relative}body.clockwork div[data-tooltip]:after,body.clockwork span[data-tooltip]:after{position:absolute;display:block;z-index:2;width:250px;padding:10px;-ms-transform:translateX(-50%);transform:translateX(-50%);visibility:hidden;opacity:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";white-space:normal;text-align:left;content:attr(data-tooltip);transition:all .5s;border:1px solid #170800;background-color:#2d1400}body.clockwork div[data-tooltip]:hover:after,body.clockwork span[data-tooltip]:hover:after{visibility:visible;opacity:1;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"}body.clockwork div[data-tooltip].tooltip-top:after,body.clockwork span[data-tooltip].tooltip-top:after{bottom:100%;left:50%;-ms-transform:translateX(-50%) translateY(8px);transform:translateX(-50%) translateY(8px)}body.clockwork div[data-tooltip].tooltip-top:hover:after,body.clockwork span[data-tooltip].tooltip-top:hover:after{-ms-transform:translateX(-50%) translateY(-8px);transform:translateX(-50%) translateY(-8px)}body.clockwork div[data-tooltip].tooltip-bottom:after,body.clockwork span[data-tooltip].tooltip-bottom:after{top:100%;left:50%;-ms-transform:translateX(-50%) translateY(-8px);transform:translateX(-50%) translateY(-8px)}body.clockwork div[data-tooltip].tooltip-bottom:hover:after,body.clockwork span[data-tooltip].tooltip-bottom:hover:after{-ms-transform:translateX(-50%) translateY(8px);transform:translateX(-50%) translateY(8px)}body.clockwork div[data-tooltip].tooltip-left:after,body.clockwork span[data-tooltip].tooltip-left:after{top:50%;right:100%;-ms-transform:translateX(8px) translateY(-50%);transform:translateX(8px) translateY(-50%)}body.clockwork div[data-tooltip].tooltip-left:hover:after,body.clockwork span[data-tooltip].tooltip-left:hover:after{-ms-transform:translateX(-8px) translateY(-50%);transform:translateX(-8px) translateY(-50%)}body.clockwork div[data-tooltip].tooltip-right:after,body.clockwork span[data-tooltip].tooltip-right:after{top:50%;left:100%;-ms-transform:translateX(-8px) translateY(-50%);transform:translateX(-8px) translateY(-50%)}body.clockwork div[data-tooltip].tooltip-right:hover:after,body.clockwork span[data-tooltip].tooltip-right:hover:after{-ms-transform:translateX(8px) translateY(-50%);transform:translateX(8px) translateY(-50%)}body.clockwork .bar{display:inline-block;position:relative;vertical-align:middle;width:100%;height:20px;line-height:17px;padding:1px;border:1px solid #170800;background:#2d1400}body.clockwork .bar .barText{position:absolute;top:0;right:3px}body.clockwork .bar .barFill{display:block;height:100%;transition:background-color 1s;background-color:#b18b25}body.clockwork .bar .barFill.good{background-color:#cfba47}body.clockwork .bar .barFill.average{background-color:#896b19}body.clockwork .bar .barFill.bad{background-color:#5f380e}body.clockwork span.button{display:inline-block;vertical-align:middle;min-height:20px;line-height:17px;padding:0 5px;white-space:nowrap;border:1px solid #170800}body.clockwork span.button .fa{padding-right:2px}body.clockwork span.button.normal{transition:background-color .5s;background-color:#5f380e}body.clockwork span.button.normal.active:focus,body.clockwork span.button.normal.active:hover{transition:background-color .25s;background-color:#704211;outline:0}body.clockwork span.button.disabled{transition:background-color .5s;background-color:#2d1400}body.clockwork span.button.disabled.active:focus,body.clockwork span.button.disabled.active:hover{transition:background-color .25s;background-color:#441e00;outline:0}body.clockwork span.button.selected{transition:background-color .5s;background-color:#cfba47}body.clockwork span.button.selected.active:focus,body.clockwork span.button.selected.active:hover{transition:background-color .25s;background-color:#d1bd50;outline:0}body.clockwork span.button.toggle{transition:background-color .5s;background-color:#cfba47}body.clockwork span.button.toggle.active:focus,body.clockwork span.button.toggle.active:hover{transition:background-color .25s;background-color:#d1bd50;outline:0}body.clockwork span.button.caution{transition:background-color .5s;background-color:#be6209}body.clockwork span.button.caution.active:focus,body.clockwork span.button.caution.active:hover{transition:background-color .25s;background-color:#cd6a0a;outline:0}body.clockwork span.button.danger{transition:background-color .5s;background-color:#9a9d00}body.clockwork span.button.danger.active:focus,body.clockwork span.button.danger.active:hover{transition:background-color .25s;background-color:#abaf00;outline:0}body.clockwork span.button.gridable{width:125px;margin:2px 0}body.clockwork span.button.gridable.center{text-align:center;width:75px}body.clockwork span.button+span:not(.button),body.clockwork span:not(.button)+span.button{margin-left:5px}body.clockwork div.display{width:100%;padding:4px;margin:6px 0;background-color:#2d1400;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr=#e62d1400,endColorStr=#e62d1400)";filter:progid:DXImageTransform.Microsoft.gradient(startColorStr=#e62d1400,endColorStr=#e62d1400);background-color:rgba(45,20,0,.9);box-shadow:inset 0 0 5px rgba(0,0,0,.3)}body.clockwork div.display.tabular{padding:0;margin:0}body.clockwork div.display header,body.clockwork div.subdisplay header{display:block;position:relative;width:100%;padding:0 4px;margin-bottom:6px;color:#cfba47;border-bottom:2px solid #b18b25}body.clockwork div.display header .buttonRight,body.clockwork div.subdisplay header .buttonRight{position:absolute;bottom:6px;right:4px}body.clockwork div.display article,body.clockwork div.subdisplay article{display:table;width:100%;border-collapse:collapse}body.clockwork input{display:inline-block;vertical-align:middle;height:20px;line-height:17px;padding:0 5px;white-space:nowrap;color:#b18b25;background-color:#cfba47;border:1px solid #272727}body.clockwork input.number{width:35px}body.clockwork input::-webkit-input-placeholder{color:#999}body.clockwork input:-ms-input-placeholder{color:#999}body.clockwork input::placeholder{color:#999}body.clockwork input::-ms-clear{display:none}body.clockwork svg.linegraph{overflow:hidden}body.clockwork div.notice{margin:8px 0;padding:4px;box-shadow:none;color:#2d1400;font-weight:700;font-style:italic;background-color:#000;background-image:repeating-linear-gradient(-45deg,#000,#000 10px,#170800 0,#170800 20px)}body.clockwork div.notice .label{color:#2d1400}body.clockwork div.notice .content:only-of-type{padding:0}body.clockwork div.notice hr{background-color:#896b19}body.clockwork div.resize{position:fixed;bottom:0;right:0;width:0;height:0;border-style:solid;border-width:0 0 45px 45px;border-color:transparent transparent #5f380e;-ms-transform:rotate(1turn);transform:rotate(1turn)}body.clockwork section .cell,body.clockwork section .content,body.clockwork section .label,body.clockwork section .line,body.nanotrasen section .cell,body.nanotrasen section .content,body.nanotrasen section .label,body.nanotrasen section .line,body.syndicate section .cell,body.syndicate section .content,body.syndicate section .label,body.syndicate section .line{display:table-cell;margin:0;text-align:left;vertical-align:middle;padding:3px 2px}body.clockwork section{display:table-row;width:100%}body.clockwork section:not(:first-child){padding-top:4px}body.clockwork section.candystripe:nth-child(2n){background-color:#000;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr=#33000000,endColorStr=#33000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorStr=#33000000,endColorStr=#33000000);background-color:rgba(0,0,0,.2)}body.clockwork section .label{width:1%;padding-right:32px;white-space:nowrap;color:#b18b25}body.clockwork section .content:not(:last-child){padding-right:16px}body.clockwork section .line{width:100%}body.clockwork section .cell:not(:first-child){text-align:center;padding-top:0}body.clockwork section .cell span.button{width:75px}body.clockwork section:not(:last-child){padding-right:4px}body.clockwork div.subdisplay{width:100%;margin:0}body.clockwork header.titlebar .close,body.clockwork header.titlebar .minimize{display:inline-block;position:relative;padding:7px;margin:-7px;color:#cfba47}body.clockwork header.titlebar .close:hover,body.clockwork header.titlebar .minimize:hover{color:#d1bd50}body.clockwork header.titlebar{position:fixed;z-index:1;top:0;left:0;width:100%;height:32px;background-color:#5f380e;border-bottom:1px solid #170800;box-shadow:0 3px 3px rgba(0,0,0,.1)}body.clockwork header.titlebar .statusicon{position:absolute;top:4px;left:12px;transition:color .5s}body.clockwork header.titlebar .title{position:absolute;top:6px;left:46px;color:#cfba47;font-size:16px;white-space:nowrap}body.clockwork header.titlebar .minimize{position:absolute;top:6px;right:46px}body.clockwork header.titlebar .close{position:absolute;top:4px;right:12px}body.nanotrasen{background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjAiIHZpZXdCb3g9IjAgMCA0MjUgMjAwIiBvcGFjaXR5PSIuMzMiPgogIDxwYXRoIGQ9Im0gMTc4LjAwMzk5LDAuMDM4NjkgLTcxLjIwMzkzLDAgYSA2Ljc2MTM0MjIsNi4wMjU1NDk1IDAgMCAwIC02Ljc2MTM0LDYuMDI1NTUgbCAwLDE4Ny44NzE0NyBhIDYuNzYxMzQyMiw2LjAyNTU0OTUgMCAwIDAgNi43NjEzNCw2LjAyNTU0IGwgNTMuMTA3MiwwIGEgNi43NjEzNDIyLDYuMDI1NTQ5NSAwIDAgMCA2Ljc2MTM1LC02LjAyNTU0IGwgMCwtMTAxLjU0NDAxOCA3Mi4yMTYyOCwxMDQuNjk5Mzk4IGEgNi43NjEzNDIyLDYuMDI1NTQ5NSAwIDAgMCA1Ljc2MDE1LDIuODcwMTYgbCA3My41NTQ4NywwIGEgNi43NjEzNDIyLDYuMDI1NTQ5NSAwIDAgMCA2Ljc2MTM1LC02LjAyNTU0IGwgMCwtMTg3Ljg3MTQ3IGEgNi43NjEzNDIyLDYuMDI1NTQ5NSAwIDAgMCAtNi43NjEzNSwtNi4wMjU1NSBsIC01NC43MTY0NCwwIGEgNi43NjEzNDIyLDYuMDI1NTQ5NSAwIDAgMCAtNi43NjEzMyw2LjAyNTU1IGwgMCwxMDIuNjE5MzUgTCAxODMuNzY0MTMsMi45MDg4NiBhIDYuNzYxMzQyMiw2LjAyNTU0OTUgMCAwIDAgLTUuNzYwMTQsLTIuODcwMTcgeiIgLz4KICA8cGF0aCBkPSJNIDQuODQ0NjMzMywyMi4xMDg3NSBBIDEzLjQxMjAzOSwxMi41MDE4NDIgMCAwIDEgMTMuNDc3NTg4LDAuMDM5MjQgbCA2Ni4xMTgzMTUsMCBhIDUuMzY0ODE1OCw1LjAwMDczNyAwIDAgMSA1LjM2NDgyMyw1LjAwMDczIGwgMCw3OS44NzkzMSB6IiAvPgogIDxwYXRoIGQ9Im0gNDIwLjE1NTM1LDE3Ny44OTExOSBhIDEzLjQxMjAzOCwxMi41MDE4NDIgMCAwIDEgLTguNjMyOTUsMjIuMDY5NTEgbCAtNjYuMTE4MzIsMCBhIDUuMzY0ODE1Miw1LjAwMDczNyAwIDAgMSAtNS4zNjQ4MiwtNS4wMDA3NCBsIDAsLTc5Ljg3OTMxIHoiIC8+Cjwvc3ZnPgo8IS0tIFRoaXMgd29yayBpcyBsaWNlbnNlZCB1bmRlciBhIENyZWF0aXZlIENvbW1vbnMgQXR0cmlidXRpb24tU2hhcmVBbGlrZSA0LjAgSW50ZXJuYXRpb25hbCBMaWNlbnNlLiAtLT4KPCEtLSBodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9saWNlbnNlcy9ieS1zYS80LjAvIC0tPgo=") no-repeat fixed 50%/70% 70%,linear-gradient(180deg,#2a2a2a 0,#202020);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff2a2a2a",endColorstr="#ff202020",GradientType=0)}body.nanotrasen .normal{color:#40628a}body.nanotrasen .good{color:#537d29}body.nanotrasen .average{color:#be6209}body.nanotrasen .bad{color:#b00e0e}body.nanotrasen .highlight{color:#8ba5c4}body.nanotrasen main{display:block;margin-top:32px;padding:2px 6px 0}body.nanotrasen hr{height:2px;background-color:#40628a;border:none}body.nanotrasen .hidden{display:none}body.nanotrasen .bar .barText,body.nanotrasen span.button{color:#fff;font-size:12px;font-weight:400;font-style:normal;text-decoration:none}body.nanotrasen .bold{font-weight:700}body.nanotrasen .italic{font-style:italic}body.nanotrasen [unselectable=on]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}body.nanotrasen div[data-tooltip],body.nanotrasen span[data-tooltip]{position:relative}body.nanotrasen div[data-tooltip]:after,body.nanotrasen span[data-tooltip]:after{position:absolute;display:block;z-index:2;width:250px;padding:10px;-ms-transform:translateX(-50%);transform:translateX(-50%);visibility:hidden;opacity:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";white-space:normal;text-align:left;content:attr(data-tooltip);transition:all .5s;border:1px solid #272727;background-color:#363636}body.nanotrasen div[data-tooltip]:hover:after,body.nanotrasen span[data-tooltip]:hover:after{visibility:visible;opacity:1;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"}body.nanotrasen div[data-tooltip].tooltip-top:after,body.nanotrasen span[data-tooltip].tooltip-top:after{bottom:100%;left:50%;-ms-transform:translateX(-50%) translateY(8px);transform:translateX(-50%) translateY(8px)}body.nanotrasen div[data-tooltip].tooltip-top:hover:after,body.nanotrasen span[data-tooltip].tooltip-top:hover:after{-ms-transform:translateX(-50%) translateY(-8px);transform:translateX(-50%) translateY(-8px)}body.nanotrasen div[data-tooltip].tooltip-bottom:after,body.nanotrasen span[data-tooltip].tooltip-bottom:after{top:100%;left:50%;-ms-transform:translateX(-50%) translateY(-8px);transform:translateX(-50%) translateY(-8px)}body.nanotrasen div[data-tooltip].tooltip-bottom:hover:after,body.nanotrasen span[data-tooltip].tooltip-bottom:hover:after{-ms-transform:translateX(-50%) translateY(8px);transform:translateX(-50%) translateY(8px)}body.nanotrasen div[data-tooltip].tooltip-left:after,body.nanotrasen span[data-tooltip].tooltip-left:after{top:50%;right:100%;-ms-transform:translateX(8px) translateY(-50%);transform:translateX(8px) translateY(-50%)}body.nanotrasen div[data-tooltip].tooltip-left:hover:after,body.nanotrasen span[data-tooltip].tooltip-left:hover:after{-ms-transform:translateX(-8px) translateY(-50%);transform:translateX(-8px) translateY(-50%)}body.nanotrasen div[data-tooltip].tooltip-right:after,body.nanotrasen span[data-tooltip].tooltip-right:after{top:50%;left:100%;-ms-transform:translateX(-8px) translateY(-50%);transform:translateX(-8px) translateY(-50%)}body.nanotrasen div[data-tooltip].tooltip-right:hover:after,body.nanotrasen span[data-tooltip].tooltip-right:hover:after{-ms-transform:translateX(8px) translateY(-50%);transform:translateX(8px) translateY(-50%)}body.nanotrasen .bar{display:inline-block;position:relative;vertical-align:middle;width:100%;height:20px;line-height:17px;padding:1px;border:1px solid #40628a;background:#272727}body.nanotrasen .bar .barText{position:absolute;top:0;right:3px}body.nanotrasen .bar .barFill{display:block;height:100%;transition:background-color 1s;background-color:#40628a}body.nanotrasen .bar .barFill.good{background-color:#537d29}body.nanotrasen .bar .barFill.average{background-color:#be6209}body.nanotrasen .bar .barFill.bad{background-color:#b00e0e}body.nanotrasen span.button{display:inline-block;vertical-align:middle;min-height:20px;line-height:17px;padding:0 5px;white-space:nowrap;border:1px solid #272727}body.nanotrasen span.button .fa{padding-right:2px}body.nanotrasen span.button.normal{transition:background-color .5s;background-color:#40628a}body.nanotrasen span.button.normal.active:focus,body.nanotrasen span.button.normal.active:hover{transition:background-color .25s;background-color:#4f78aa;outline:0}body.nanotrasen span.button.disabled{transition:background-color .5s;background-color:#999}body.nanotrasen span.button.disabled.active:focus,body.nanotrasen span.button.disabled.active:hover{transition:background-color .25s;background-color:#a8a8a8;outline:0}body.nanotrasen span.button.selected{transition:background-color .5s;background-color:#2f943c}body.nanotrasen span.button.selected.active:focus,body.nanotrasen span.button.selected.active:hover{transition:background-color .25s;background-color:#3ab84b;outline:0}body.nanotrasen span.button.toggle{transition:background-color .5s;background-color:#2f943c}body.nanotrasen span.button.toggle.active:focus,body.nanotrasen span.button.toggle.active:hover{transition:background-color .25s;background-color:#3ab84b;outline:0}body.nanotrasen span.button.caution{transition:background-color .5s;background-color:#9a9d00}body.nanotrasen span.button.caution.active:focus,body.nanotrasen span.button.caution.active:hover{transition:background-color .25s;background-color:#ced200;outline:0}body.nanotrasen span.button.danger{transition:background-color .5s;background-color:#9d0808}body.nanotrasen span.button.danger.active:focus,body.nanotrasen span.button.danger.active:hover{transition:background-color .25s;background-color:#ce0b0b;outline:0}body.nanotrasen span.button.gridable{width:125px;margin:2px 0}body.nanotrasen span.button.gridable.center{text-align:center;width:75px}body.nanotrasen span.button+span:not(.button),body.nanotrasen span:not(.button)+span.button{margin-left:5px}body.nanotrasen div.display{width:100%;padding:4px;margin:6px 0;background-color:#000;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr=#54000000,endColorStr=#54000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorStr=#54000000,endColorStr=#54000000);background-color:rgba(0,0,0,.33);box-shadow:inset 0 0 5px rgba(0,0,0,.5)}body.nanotrasen div.display.tabular{padding:0;margin:0}body.nanotrasen div.display header,body.nanotrasen div.subdisplay header{display:block;position:relative;width:100%;padding:0 4px;margin-bottom:6px;color:#fff;border-bottom:2px solid #40628a}body.nanotrasen div.display header .buttonRight,body.nanotrasen div.subdisplay header .buttonRight{position:absolute;bottom:6px;right:4px}body.nanotrasen div.display article,body.nanotrasen div.subdisplay article{display:table;width:100%;border-collapse:collapse}body.nanotrasen input{display:inline-block;vertical-align:middle;height:20px;line-height:17px;padding:0 5px;white-space:nowrap;color:#000;background-color:#fff;border:1px solid #272727}body.nanotrasen input.number{width:35px}body.nanotrasen input::-webkit-input-placeholder{color:#999}body.nanotrasen input:-ms-input-placeholder{color:#999}body.nanotrasen input::placeholder{color:#999}body.nanotrasen input::-ms-clear{display:none}body.nanotrasen svg.linegraph{overflow:hidden}body.nanotrasen div.notice{margin:8px 0;padding:4px;box-shadow:none;color:#000;font-weight:700;font-style:italic;background-color:#bb9b68;background-image:repeating-linear-gradient(-45deg,#bb9b68,#bb9b68 10px,#b1905d 0,#b1905d 20px)}body.nanotrasen div.notice .label{color:#000}body.nanotrasen div.notice .content:only-of-type{padding:0}body.nanotrasen div.notice hr{background-color:#272727}body.nanotrasen div.resize{position:fixed;bottom:0;right:0;width:0;height:0;border-style:solid;border-width:0 0 45px 45px;border-color:transparent transparent #363636;-ms-transform:rotate(1turn);transform:rotate(1turn)}body.nanotrasen section .cell,body.nanotrasen section .content,body.nanotrasen section .label,body.nanotrasen section .line,body.syndicate section .cell,body.syndicate section .content,body.syndicate section .label,body.syndicate section .line{display:table-cell;margin:0;text-align:left;vertical-align:middle;padding:3px 2px}body.nanotrasen section{display:table-row;width:100%}body.nanotrasen section:not(:first-child){padding-top:4px}body.nanotrasen section.candystripe:nth-child(2n){background-color:#000;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr=#33000000,endColorStr=#33000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorStr=#33000000,endColorStr=#33000000);background-color:rgba(0,0,0,.2)}body.nanotrasen section .label{width:1%;padding-right:32px;white-space:nowrap;color:#8ba5c4}body.nanotrasen section .content:not(:last-child){padding-right:16px}body.nanotrasen section .line{width:100%}body.nanotrasen section .cell:not(:first-child){text-align:center;padding-top:0}body.nanotrasen section .cell span.button{width:75px}body.nanotrasen section:not(:last-child){padding-right:4px}body.nanotrasen div.subdisplay{width:100%;margin:0}body.nanotrasen header.titlebar .close,body.nanotrasen header.titlebar .minimize{display:inline-block;position:relative;padding:7px;margin:-7px;color:#8ba5c4}body.nanotrasen header.titlebar .close:hover,body.nanotrasen header.titlebar .minimize:hover{color:#9cb2cd}body.nanotrasen header.titlebar{position:fixed;z-index:1;top:0;left:0;width:100%;height:32px;background-color:#363636;border-bottom:1px solid #161616;box-shadow:0 3px 3px rgba(0,0,0,.1)}body.nanotrasen header.titlebar .statusicon{position:absolute;top:4px;left:12px;transition:color .5s}body.nanotrasen header.titlebar .title{position:absolute;top:6px;left:46px;color:#8ba5c4;font-size:16px;white-space:nowrap}body.nanotrasen header.titlebar .minimize{position:absolute;top:6px;right:46px}body.nanotrasen header.titlebar .close{position:absolute;top:4px;right:12px}body.syndicate{background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjAiIHZpZXdCb3g9IjAgMCAyMDAgMjg5Ljc0MiIgb3BhY2l0eT0iLjMzIj4KICA8cGF0aCBkPSJtIDkzLjUzNzY3NywwIGMgLTE4LjExMzEyNSwwIC0zNC4yMjAxMzMsMy4xMTE2NCAtNDguMzIzNDg0LDkuMzM0MzcgLTEzLjk2NTA5Miw2LjIyMTY3IC0yNC42MTI0NDIsMTUuMDcxMTQgLTMxLjk0MDY1MSwyNi41NDcxIC03LjE4OTkzOTgsMTEuMzM3ODkgLTEwLjMwMTIyNjYsMjQuNzQ5MTEgLTEwLjMwMTIyNjYsNDAuMjM0NzggMCwxMC42NDY2MiAyLjcyNTAwMjYsMjAuNDY0NjUgOC4xNzUxMTE2LDI5LjQ1MjU4IDUuNjE1Mjc3LDguOTg2ODYgMTQuMDM4Mjc3LDE3LjM1MjA0IDI1LjI2ODgyMSwyNS4wOTQzNiAxMS4yMzA1NDQsNy42MDUzMSAyNi41MDc0MjEsMTUuNDE4MzUgNDUuODMwNTE0LDIzLjQzNzgyIDE5Ljk4Mzc0OCw4LjI5NTU3IDM0Ljg0ODg0OCwxNS41NTQ3MSA0NC41OTI5OTgsMjEuNzc2MzggOS43NDQxNCw2LjIyMjczIDE2Ljc2MTcsMTIuODU4NSAyMS4wNTU3MiwxOS45MDk1MSA0LjI5NDA0LDcuMDUyMDggNi40NDE5MywxNS43NjQwOCA2LjQ0MTkzLDI2LjEzNDU5IDAsMTYuMTc3MDIgLTUuMjAxOTYsMjguNDgyMjIgLTE1LjYwNjczLDM2LjkxNjgyIC0xMC4yMzk2LDguNDM0NyAtMjUuMDIyMDMsMTIuNjUyMyAtNDQuMzQ1MTY5LDEyLjY1MjMgLTE0LjAzODE3MSwwIC0yNS41MTUyNDcsLTEuNjU5NCAtMzQuNDMzNjE4LC00Ljk3NzcgLTguOTE4MzcsLTMuNDU2NiAtMTYuMTg1NTcyLC04LjcxMTMgLTIxLjgwMDgzOSwtMTUuNzYzMyAtNS42MTUyNzcsLTcuMDUyMSAtMTAuMDc0Nzk1LC0xNi42NjA4OCAtMTMuMzc3ODk5LC0yOC44MjgxMiBsIC0yNC43NzMxNjI2MjkzOTQ1LDAgMCw1Ni44MjYzMiBDIDMzLjg1Njc2OSwyODYuMDc2MDEgNjMuNzQ5MDQsMjg5Ljc0MjAxIDg5LjY3ODM4MywyODkuNzQyMDEgYyAxNi4wMjAwMjcsMCAzMC43MTk3ODcsLTEuMzgyNyA0NC4wOTczMzcsLTQuMTQ3OSAxMy41NDI3MiwtMi45MDQzIDI1LjEwNDEsLTcuNDY3NiAzNC42ODMwOSwtMTMuNjg5MyA5Ljc0NDEzLC02LjM1OTcgMTcuMzQwNDIsLTE0LjUxOTUgMjIuNzkwNTIsLTI0LjQ3NDggNS40NTAxLC0xMC4wOTMzMiA4LjE3NTExLC0yMi4zOTk1OSA4LjE3NTExLC0zNi45MTY4MiAwLC0xMi45OTc2NCAtMy4zMDIxLC0yNC4zMzUzOSAtOS45MDgyOSwtMzQuMDE0NiAtNi40NDEwNSwtOS44MTcyNSAtMTUuNTI1NDUsLTE4LjUyNzA3IC0yNy4yNTE0NiwtMjYuMTMxMzMgLTExLjU2MDg1LC03LjYwNDI3IC0yNy45MTA4MywtMTUuODMxNDIgLTQ5LjA1MDY2LC0yNC42ODAyMiAtMTcuNTA2NDQsLTcuMTkwMTIgLTMwLjcxOTY2OCwtMTMuNjg5NDggLTM5LjYzODAzOCwtMTkuNDk3MDEgLTguOTE4MzcxLC01LjgwNzUyIC0xOC42MDc0NzQsLTEyLjQzNDA5IC0yNC4wOTY1MjQsLTE4Ljg3NDE3IC01LjQyNjA0MywtNi4zNjYxNiAtOS42NTg4MjYsLTE1LjA3MDAzIC05LjY1ODgyNiwtMjQuODg3MjkgMCwtOS4yNjQwMSAyLjA3NTQxNCwtMTcuMjEzNDUgNi4yMjM0NTQsLTIzLjg1MDMzIDExLjA5ODI5OCwtMTQuMzk3NDggNDEuMjg2NjM4LC0xLjc5NTA3IDQ1LjA3NTYwOSwyNC4zNDc2MiA0LjgzOTM5Miw2Ljc3NDkxIDguODQ5MzUsMTYuMjQ3MjkgMTIuMDI5NTE1LDI4LjQxNTYgbCAyMC41MzIzNCwwIDAsLTU1Ljk5OTY3IGMgLTQuNDc4MjUsLTUuOTI0NDggLTkuOTU0ODgsLTEwLjYzMjIyIC0xNS45MDgzNywtMTQuMzc0MTEgMS42NDA1NSwwLjQ3OTA1IDMuMTkwMzksMS4wMjM3NiA0LjYzODY1LDEuNjQwMjQgNi40OTg2MSwyLjYyNjA3IDEyLjE2NzkzLDcuMzI3NDcgMTcuMDA3MywxNC4xMDM0NSA0LjgzOTM5LDYuNzc0OTEgOC44NDkzNSwxNi4yNDU2NyAxMi4wMjk1MiwyOC40MTM5NyAwLDAgOC40ODEyOCwtMC4xMjg5NCA4LjQ4OTc4LC0wLjAwMiAwLjQxNzc2LDYuNDE0OTQgLTEuNzUzMzksOS40NTI4NiAtNC4xMjM0MiwxMi41NjEwNCAtMi40MTc0LDMuMTY5NzggLTUuMTQ0ODYsNi43ODk3MyAtNC4wMDI3OCwxMy4wMDI5IDEuNTA3ODYsOC4yMDMxOCAxMC4xODM1NCwxMC41OTY0MiAxNC42MjE5NCw5LjMxMTU0IC0zLjMxODQyLC0wLjQ5OTExIC01LjMxODU1LC0xLjc0OTQ4IC01LjMxODU1LC0xLjc0OTQ4IDAsMCAxLjg3NjQ2LDAuOTk4NjggNS42NTExNywtMS4zNTk4MSAtMy4yNzY5NSwwLjk1NTcxIC0xMC43MDUyOSwtMC43OTczOCAtMTEuODAxMjUsLTYuNzYzMTMgLTAuOTU3NTIsLTUuMjA4NjEgMC45NDY1NCwtNy4yOTUxNCAzLjQwMTEzLC0xMC41MTQ4MiAyLjQ1NDYyLC0zLjIxOTY4IDUuMjg0MjYsLTYuOTU4MzEgNC42ODQzLC0xNC40ODgyNCBsIDAuMDAzLDAuMDAyIDguOTI2NzYsMCAwLC01NS45OTk2NyBjIC0xNS4wNzEyNSwtMy44NzE2OCAtMjcuNjUzMTQsLTYuMzYwNDIgLTM3Ljc0NjcxLC03LjQ2NTg2IC05Ljk1NTMxLC0xLjEwNzU1IC0yMC4xODgyMywtMS42NTk4MSAtMzAuNjk2NjEzLC0xLjY1OTgxIHogbSA3MC4zMjE2MDMsMTcuMzA4OTMgMC4yMzgwNSw0MC4zMDQ5IGMgMS4zMTgwOCwxLjIyNjY2IDIuNDM5NjUsMi4yNzgxNSAzLjM0MDgxLDMuMTA2MDIgNC44MzkzOSw2Ljc3NDkxIDguODQ5MzQsMTYuMjQ1NjYgMTIuMDI5NTEsMjguNDEzOTcgbCAyMC41MzIzNCwwIDAsLTU1Ljk5OTY3IGMgLTYuNjc3MzEsLTQuNTkzODEgLTE5LjgzNjQzLC0xMC40NzMwOSAtMzYuMTQwNzEsLTE1LjgyNTIyIHogbSAtMjguMTIwNDksNS42MDU1MSA4LjU2NDc5LDE3LjcxNjU1IGMgLTExLjk3MDM3LC02LjQ2Njk3IC0xMy44NDY3OCwtOS43MTcyNiAtOC41NjQ3OSwtMTcuNzE2NTUgeiBtIDIyLjc5NzA1LDAgYyAyLjc3MTUsNy45OTkyOSAxLjc4NzQxLDExLjI0OTU4IC00LjQ5MzU0LDE3LjcxNjU1IGwgNC40OTM1NCwtMTcuNzE2NTUgeiBtIDE1LjIyMTk1LDI0LjAwODQ4IDguNTY0NzksMTcuNzE2NTUgYyAtMTEuOTcwMzgsLTYuNDY2OTcgLTEzLjg0Njc5LC05LjcxNzI2IC04LjU2NDc5LC0xNy43MTY1NSB6IG0gMjIuNzk3MDQsMCBjIDIuNzcxNSw3Ljk5OTI5IDEuNzg3NDEsMTEuMjQ5NTggLTQuNDkzNTQsMTcuNzE2NTUgbCA0LjQ5MzU0LC0xNy43MTY1NSB6IG0gLTk5LjExMzg0LDIuMjA3NjQgOC41NjQ3OSwxNy43MTY1NSBjIC0xMS45NzAzODIsLTYuNDY2OTcgLTEzLjg0Njc4MiwtOS43MTcyNiAtOC41NjQ3OSwtMTcuNzE2NTUgeiBtIDIyLjc5NTQyLDAgYyAyLjc3MTUsNy45OTkyOSAxLjc4NzQxLDExLjI0OTU4IC00LjQ5MzU0LDE3LjcxNjU1IGwgNC40OTM1NCwtMTcuNzE2NTUgeiIgLz4KPC9zdmc+CjwhLS0gVGhpcyB3b3JrIGlzIGxpY2Vuc2VkIHVuZGVyIGEgQ3JlYXRpdmUgQ29tbW9ucyBBdHRyaWJ1dGlvbi1TaGFyZUFsaWtlIDQuMCBJbnRlcm5hdGlvbmFsIExpY2Vuc2UuIC0tPgo8IS0tIGh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL2J5LXNhLzQuMC8gLS0+Cg==") no-repeat fixed 50%/70% 70%,linear-gradient(180deg,#750000 0,#340404);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff750000",endColorstr="#ff340404",GradientType=0)}body.syndicate .normal{color:#40628a}body.syndicate .good{color:#73e573}body.syndicate .average{color:#be6209}body.syndicate .bad{color:#b00e0e}body.syndicate .highlight{color:#000}body.syndicate main{display:block;margin-top:32px;padding:2px 6px 0}body.syndicate hr{height:2px;background-color:#272727;border:none}body.syndicate .hidden{display:none}body.syndicate .bar .barText,body.syndicate span.button{color:#fff;font-size:12px;font-weight:400;font-style:normal;text-decoration:none}body.syndicate .bold{font-weight:700}body.syndicate .italic{font-style:italic}body.syndicate [unselectable=on]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}body.syndicate div[data-tooltip],body.syndicate span[data-tooltip]{position:relative}body.syndicate div[data-tooltip]:after,body.syndicate span[data-tooltip]:after{position:absolute;display:block;z-index:2;width:250px;padding:10px;-ms-transform:translateX(-50%);transform:translateX(-50%);visibility:hidden;opacity:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";white-space:normal;text-align:left;content:attr(data-tooltip);transition:all .5s;border:1px solid #272727;background-color:#363636}body.syndicate div[data-tooltip]:hover:after,body.syndicate span[data-tooltip]:hover:after{visibility:visible;opacity:1;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"}body.syndicate div[data-tooltip].tooltip-top:after,body.syndicate span[data-tooltip].tooltip-top:after{bottom:100%;left:50%;-ms-transform:translateX(-50%) translateY(8px);transform:translateX(-50%) translateY(8px)}body.syndicate div[data-tooltip].tooltip-top:hover:after,body.syndicate span[data-tooltip].tooltip-top:hover:after{-ms-transform:translateX(-50%) translateY(-8px);transform:translateX(-50%) translateY(-8px)}body.syndicate div[data-tooltip].tooltip-bottom:after,body.syndicate span[data-tooltip].tooltip-bottom:after{top:100%;left:50%;-ms-transform:translateX(-50%) translateY(-8px);transform:translateX(-50%) translateY(-8px)}body.syndicate div[data-tooltip].tooltip-bottom:hover:after,body.syndicate span[data-tooltip].tooltip-bottom:hover:after{-ms-transform:translateX(-50%) translateY(8px);transform:translateX(-50%) translateY(8px)}body.syndicate div[data-tooltip].tooltip-left:after,body.syndicate span[data-tooltip].tooltip-left:after{top:50%;right:100%;-ms-transform:translateX(8px) translateY(-50%);transform:translateX(8px) translateY(-50%)}body.syndicate div[data-tooltip].tooltip-left:hover:after,body.syndicate span[data-tooltip].tooltip-left:hover:after{-ms-transform:translateX(-8px) translateY(-50%);transform:translateX(-8px) translateY(-50%)}body.syndicate div[data-tooltip].tooltip-right:after,body.syndicate span[data-tooltip].tooltip-right:after{top:50%;left:100%;-ms-transform:translateX(-8px) translateY(-50%);transform:translateX(-8px) translateY(-50%)}body.syndicate div[data-tooltip].tooltip-right:hover:after,body.syndicate span[data-tooltip].tooltip-right:hover:after{-ms-transform:translateX(8px) translateY(-50%);transform:translateX(8px) translateY(-50%)}body.syndicate .bar{display:inline-block;position:relative;vertical-align:middle;width:100%;height:20px;line-height:17px;padding:1px;border:1px solid #000;background:#272727}body.syndicate .bar .barText{position:absolute;top:0;right:3px}body.syndicate .bar .barFill{display:block;height:100%;transition:background-color 1s;background-color:#000}body.syndicate .bar .barFill.good{background-color:#73e573}body.syndicate .bar .barFill.average{background-color:#be6209}body.syndicate .bar .barFill.bad{background-color:#b00e0e}body.syndicate span.button{display:inline-block;vertical-align:middle;min-height:20px;line-height:17px;padding:0 5px;white-space:nowrap;border:1px solid #272727}body.syndicate span.button .fa{padding-right:2px}body.syndicate span.button.normal{transition:background-color .5s;background-color:#397439}body.syndicate span.button.normal.active:focus,body.syndicate span.button.normal.active:hover{transition:background-color .25s;background-color:#4a964a;outline:0}body.syndicate span.button.disabled{transition:background-color .5s;background-color:#363636}body.syndicate span.button.disabled.active:focus,body.syndicate span.button.disabled.active:hover{transition:background-color .25s;background-color:#545454;outline:0}body.syndicate span.button.selected{transition:background-color .5s;background-color:#9d0808}body.syndicate span.button.selected.active:focus,body.syndicate span.button.selected.active:hover{transition:background-color .25s;background-color:#ce0b0b;outline:0}body.syndicate span.button.toggle{transition:background-color .5s;background-color:#9d0808}body.syndicate span.button.toggle.active:focus,body.syndicate span.button.toggle.active:hover{transition:background-color .25s;background-color:#ce0b0b;outline:0}body.syndicate span.button.caution{transition:background-color .5s;background-color:#be6209}body.syndicate span.button.caution.active:focus,body.syndicate span.button.caution.active:hover{transition:background-color .25s;background-color:#eb790b;outline:0}body.syndicate span.button.danger{transition:background-color .5s;background-color:#9a9d00}body.syndicate span.button.danger.active:focus,body.syndicate span.button.danger.active:hover{transition:background-color .25s;background-color:#ced200;outline:0}body.syndicate span.button.gridable{width:125px;margin:2px 0}body.syndicate span.button.gridable.center{text-align:center;width:75px}body.syndicate span.button+span:not(.button),body.syndicate span:not(.button)+span.button{margin-left:5px}body.syndicate div.display{width:100%;padding:4px;margin:6px 0;background-color:#000;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr=#80000000,endColorStr=#80000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorStr=#80000000,endColorStr=#80000000);background-color:rgba(0,0,0,.5);box-shadow:inset 0 0 5px rgba(0,0,0,.75)}body.syndicate div.display.tabular{padding:0;margin:0}body.syndicate div.display header,body.syndicate div.subdisplay header{display:block;position:relative;width:100%;padding:0 4px;margin-bottom:6px;color:#fff;border-bottom:2px solid #272727}body.syndicate div.display header .buttonRight,body.syndicate div.subdisplay header .buttonRight{position:absolute;bottom:6px;right:4px}body.syndicate div.display article,body.syndicate div.subdisplay article{display:table;width:100%;border-collapse:collapse}body.syndicate input{display:inline-block;vertical-align:middle;height:20px;line-height:17px;padding:0 5px;white-space:nowrap;color:#fff;background-color:#9d0808;border:1px solid #272727}body.syndicate input.number{width:35px}body.syndicate input::-webkit-input-placeholder{color:#999}body.syndicate input:-ms-input-placeholder{color:#999}body.syndicate input::placeholder{color:#999}body.syndicate input::-ms-clear{display:none}body.syndicate svg.linegraph{overflow:hidden}body.syndicate div.notice{margin:8px 0;padding:4px;box-shadow:none;color:#000;font-weight:700;font-style:italic;background-color:#750000;background-image:repeating-linear-gradient(-45deg,#750000,#750000 10px,#910101 0,#910101 20px)}body.syndicate div.notice .label{color:#000}body.syndicate div.notice .content:only-of-type{padding:0}body.syndicate div.notice hr{background-color:#272727}body.syndicate div.resize{position:fixed;bottom:0;right:0;width:0;height:0;border-style:solid;border-width:0 0 45px 45px;border-color:transparent transparent #363636;-ms-transform:rotate(1turn);transform:rotate(1turn)}body.syndicate section .cell,body.syndicate section .content,body.syndicate section .label,body.syndicate section .line{display:table-cell;margin:0;text-align:left;vertical-align:middle;padding:3px 2px}body.syndicate section{display:table-row;width:100%}body.syndicate section:not(:first-child){padding-top:4px}body.syndicate section.candystripe:nth-child(2n){background-color:#000;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr=#33000000,endColorStr=#33000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorStr=#33000000,endColorStr=#33000000);background-color:rgba(0,0,0,.2)}body.syndicate section .label{width:1%;padding-right:32px;white-space:nowrap;color:#fff}body.syndicate section .content:not(:last-child){padding-right:16px}body.syndicate section .line{width:100%}body.syndicate section .cell:not(:first-child){text-align:center;padding-top:0}body.syndicate section .cell span.button{width:75px}body.syndicate section:not(:last-child){padding-right:4px}body.syndicate div.subdisplay{width:100%;margin:0}body.syndicate header.titlebar .close,body.syndicate header.titlebar .minimize{display:inline-block;position:relative;padding:7px;margin:-7px;color:#e74242}body.syndicate header.titlebar .close:hover,body.syndicate header.titlebar .minimize:hover{color:#eb5e5e}body.syndicate header.titlebar{position:fixed;z-index:1;top:0;left:0;width:100%;height:32px;background-color:#363636;border-bottom:1px solid #161616;box-shadow:0 3px 3px rgba(0,0,0,.1)}body.syndicate header.titlebar .statusicon{position:absolute;top:4px;left:12px;transition:color .5s}body.syndicate header.titlebar .title{position:absolute;top:6px;left:46px;color:#e74242;font-size:16px;white-space:nowrap}body.syndicate header.titlebar .minimize{position:absolute;top:6px;right:46px}body.syndicate header.titlebar .close{position:absolute;top:4px;right:12px}.no-icons header.titlebar .statusicon{font-size:20px}.no-icons header.titlebar .statusicon:after{content:"O"}.no-icons header.titlebar .minimize{top:-2px;font-size:20px}.no-icons header.titlebar .minimize:after{content:"—"}.no-icons header.titlebar .close{font-size:20px}.no-icons header.titlebar .close:after{content:"X"} \ No newline at end of file +@charset "utf-8";body,html{box-sizing:border-box;height:100%;margin:0}html{overflow:hidden;cursor:default}body{overflow:auto;font-family:Verdana,Geneva,sans-serif;font-size:12px;color:#fff;background-color:#2a2a2a;background-image:linear-gradient(180deg,#2a2a2a 0,#202020);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff2a2a2a",endColorstr="#ff202020",GradientType=0)}*,:after,:before{box-sizing:inherit}h1,h2,h3,h4{display:inline-block;margin:0;padding:6px 0}h1{font-size:18px}h2{font-size:16px}h3{font-size:14px}h4{font-size:12px}body.clockwork{background:linear-gradient(180deg,#b18b25 0,#5f380e);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffb18b25",endColorstr="#ff5f380e",GradientType=0)}body.clockwork .normal{color:#b18b25}body.clockwork .good{color:#cfba47}body.clockwork .average{color:#896b19}body.clockwork .bad{color:#5f380e}body.clockwork .highlight{color:#b18b25}body.clockwork main{display:block;margin-top:32px;padding:2px 6px 0}body.clockwork hr{height:2px;background-color:#b18b25;border:none}body.clockwork .hidden{display:none}body.clockwork .bar .barText,body.clockwork span.button{color:#b18b25;font-size:12px;font-weight:400;font-style:normal;text-decoration:none}body.clockwork .bold{font-weight:700}body.clockwork .italic{font-style:italic}body.clockwork [unselectable=on]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}body.clockwork div[data-tooltip],body.clockwork span[data-tooltip]{position:relative}body.clockwork div[data-tooltip]:after,body.clockwork span[data-tooltip]:after{position:absolute;display:block;z-index:2;width:250px;padding:10px;-ms-transform:translateX(-50%);transform:translateX(-50%);visibility:hidden;opacity:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";white-space:normal;text-align:left;content:attr(data-tooltip);transition:all .5s;border:1px solid #170800;background-color:#2d1400}body.clockwork div[data-tooltip]:hover:after,body.clockwork span[data-tooltip]:hover:after{visibility:visible;opacity:1;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"}body.clockwork div[data-tooltip].tooltip-top:after,body.clockwork span[data-tooltip].tooltip-top:after{bottom:100%;left:50%;-ms-transform:translateX(-50%) translateY(8px);transform:translateX(-50%) translateY(8px)}body.clockwork div[data-tooltip].tooltip-top:hover:after,body.clockwork span[data-tooltip].tooltip-top:hover:after{-ms-transform:translateX(-50%) translateY(-8px);transform:translateX(-50%) translateY(-8px)}body.clockwork div[data-tooltip].tooltip-bottom:after,body.clockwork span[data-tooltip].tooltip-bottom:after{top:100%;left:50%;-ms-transform:translateX(-50%) translateY(-8px);transform:translateX(-50%) translateY(-8px)}body.clockwork div[data-tooltip].tooltip-bottom:hover:after,body.clockwork span[data-tooltip].tooltip-bottom:hover:after{-ms-transform:translateX(-50%) translateY(8px);transform:translateX(-50%) translateY(8px)}body.clockwork div[data-tooltip].tooltip-left:after,body.clockwork span[data-tooltip].tooltip-left:after{top:50%;right:100%;-ms-transform:translateX(8px) translateY(-50%);transform:translateX(8px) translateY(-50%)}body.clockwork div[data-tooltip].tooltip-left:hover:after,body.clockwork span[data-tooltip].tooltip-left:hover:after{-ms-transform:translateX(-8px) translateY(-50%);transform:translateX(-8px) translateY(-50%)}body.clockwork div[data-tooltip].tooltip-right:after,body.clockwork span[data-tooltip].tooltip-right:after{top:50%;left:100%;-ms-transform:translateX(-8px) translateY(-50%);transform:translateX(-8px) translateY(-50%)}body.clockwork div[data-tooltip].tooltip-right:hover:after,body.clockwork span[data-tooltip].tooltip-right:hover:after{-ms-transform:translateX(8px) translateY(-50%);transform:translateX(8px) translateY(-50%)}body.clockwork .bar{display:inline-block;position:relative;vertical-align:middle;width:100%;height:20px;line-height:17px;padding:1px;border:1px solid #170800;background:#2d1400}body.clockwork .bar .barText{position:absolute;top:0;right:3px}body.clockwork .bar .barFill{display:block;height:100%;transition:background-color 1s;background-color:#b18b25}body.clockwork .bar .barFill.good{background-color:#cfba47}body.clockwork .bar .barFill.average{background-color:#896b19}body.clockwork .bar .barFill.bad{background-color:#5f380e}body.clockwork span.button{display:inline-block;vertical-align:middle;min-height:20px;line-height:17px;padding:0 5px;white-space:nowrap;border:1px solid #170800}body.clockwork span.button .fa{padding-right:2px}body.clockwork span.button.normal{transition:background-color .5s;background-color:#5f380e}body.clockwork span.button.normal.active:focus,body.clockwork span.button.normal.active:hover{transition:background-color .25s;background-color:#704211;outline:0}body.clockwork span.button.disabled{transition:background-color .5s;background-color:#2d1400}body.clockwork span.button.disabled.active:focus,body.clockwork span.button.disabled.active:hover{transition:background-color .25s;background-color:#441e00;outline:0}body.clockwork span.button.selected{transition:background-color .5s;background-color:#cfba47}body.clockwork span.button.selected.active:focus,body.clockwork span.button.selected.active:hover{transition:background-color .25s;background-color:#d1bd50;outline:0}body.clockwork span.button.toggle{transition:background-color .5s;background-color:#cfba47}body.clockwork span.button.toggle.active:focus,body.clockwork span.button.toggle.active:hover{transition:background-color .25s;background-color:#d1bd50;outline:0}body.clockwork span.button.caution{transition:background-color .5s;background-color:#be6209}body.clockwork span.button.caution.active:focus,body.clockwork span.button.caution.active:hover{transition:background-color .25s;background-color:#cd6a0a;outline:0}body.clockwork span.button.danger{transition:background-color .5s;background-color:#9a9d00}body.clockwork span.button.danger.active:focus,body.clockwork span.button.danger.active:hover{transition:background-color .25s;background-color:#abaf00;outline:0}body.clockwork span.button.gridable{width:125px;margin:2px 0}body.clockwork span.button.gridable.center{text-align:center;width:75px}body.clockwork span.button+span:not(.button),body.clockwork span:not(.button)+span.button{margin-left:5px}body.clockwork div.display{width:100%;padding:4px;margin:6px 0;background-color:#2d1400;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr=#e62d1400,endColorStr=#e62d1400)";filter:progid:DXImageTransform.Microsoft.gradient(startColorStr=#e62d1400,endColorStr=#e62d1400);background-color:rgba(45,20,0,.9);box-shadow:inset 0 0 5px rgba(0,0,0,.3)}body.clockwork div.display.tabular{padding:0;margin:0}body.clockwork div.display header,body.clockwork div.subdisplay header{display:block;position:relative;width:100%;padding:0 4px;margin-bottom:6px;color:#cfba47;border-bottom:2px solid #b18b25}body.clockwork div.display header .buttonRight,body.clockwork div.subdisplay header .buttonRight{position:absolute;bottom:6px;right:4px}body.clockwork div.display article,body.clockwork div.subdisplay article{display:table;width:100%;border-collapse:collapse}body.clockwork input{display:inline-block;vertical-align:middle;height:20px;line-height:17px;padding:0 5px;white-space:nowrap;color:#b18b25;background-color:#cfba47;border:1px solid #272727}body.clockwork input.number{width:35px}body.clockwork input::-webkit-input-placeholder{color:#999}body.clockwork input:-ms-input-placeholder{color:#999}body.clockwork input::placeholder{color:#999}body.clockwork input::-ms-clear{display:none}body.clockwork svg.linegraph{overflow:hidden}body.clockwork div.notice{margin:8px 0;padding:4px;box-shadow:none;color:#2d1400;font-weight:700;font-style:italic;background-color:#000;background-image:repeating-linear-gradient(-45deg,#000,#000 10px,#170800 0,#170800 20px)}body.clockwork div.notice .label{color:#2d1400}body.clockwork div.notice .content:only-of-type{padding:0}body.clockwork div.notice hr{background-color:#896b19}body.clockwork div.resize{position:fixed;bottom:0;right:0;width:0;height:0;border-style:solid;border-width:0 0 45px 45px;border-color:transparent transparent #5f380e;-ms-transform:rotate(1turn);transform:rotate(1turn)}body.clockwork section .cell,body.clockwork section .content,body.clockwork section .label,body.clockwork section .line,body.nanotrasen section .cell,body.nanotrasen section .content,body.nanotrasen section .label,body.nanotrasen section .line,body.syndicate section .cell,body.syndicate section .content,body.syndicate section .label,body.syndicate section .line{display:table-cell;margin:0;text-align:left;vertical-align:middle;padding:3px 2px}body.clockwork section{display:table-row;width:100%}body.clockwork section:not(:first-child){padding-top:4px}body.clockwork section.candystripe:nth-child(2n){background-color:#000;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr=#33000000,endColorStr=#33000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorStr=#33000000,endColorStr=#33000000);background-color:rgba(0,0,0,.2)}body.clockwork section .label{width:1%;padding-right:32px;white-space:nowrap;color:#b18b25}body.clockwork section .content:not(:last-child){padding-right:16px}body.clockwork section .line{width:100%}body.clockwork section .cell:not(:first-child){text-align:center;padding-top:0}body.clockwork section .cell span.button{width:75px}body.clockwork section:not(:last-child){padding-right:4px}body.clockwork div.subdisplay{width:100%;margin:0}body.clockwork header.titlebar .close,body.clockwork header.titlebar .minimize{display:inline-block;position:relative;padding:7px;margin:-7px;color:#cfba47}body.clockwork header.titlebar .close:hover,body.clockwork header.titlebar .minimize:hover{color:#d1bd50}body.clockwork header.titlebar{position:fixed;z-index:1;top:0;left:0;width:100%;height:32px;background-color:#5f380e;border-bottom:1px solid #170800;box-shadow:0 3px 3px rgba(0,0,0,.1)}body.clockwork header.titlebar .statusicon{position:absolute;top:4px;left:12px;transition:color .5s}body.clockwork header.titlebar .title{position:absolute;top:6px;left:46px;color:#cfba47;font-size:16px;white-space:nowrap}body.clockwork header.titlebar .minimize{position:absolute;top:6px;right:46px}body.clockwork header.titlebar .close{position:absolute;top:4px;right:12px}body.nanotrasen{background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmVyc2lvbj0iMS4wIiB2aWV3Qm94PSIwIDAgNDI1IDIwMCIgb3BhY2l0eT0iLjMzIj4NCiAgPHBhdGggZD0ibSAxNzguMDAzOTksMC4wMzg2OSAtNzEuMjAzOTMsMCBhIDYuNzYxMzQyMiw2LjAyNTU0OTUgMCAwIDAgLTYuNzYxMzQsNi4wMjU1NSBsIDAsMTg3Ljg3MTQ3IGEgNi43NjEzNDIyLDYuMDI1NTQ5NSAwIDAgMCA2Ljc2MTM0LDYuMDI1NTQgbCA1My4xMDcyLDAgYSA2Ljc2MTM0MjIsNi4wMjU1NDk1IDAgMCAwIDYuNzYxMzUsLTYuMDI1NTQgbCAwLC0xMDEuNTQ0MDE4IDcyLjIxNjI4LDEwNC42OTkzOTggYSA2Ljc2MTM0MjIsNi4wMjU1NDk1IDAgMCAwIDUuNzYwMTUsMi44NzAxNiBsIDczLjU1NDg3LDAgYSA2Ljc2MTM0MjIsNi4wMjU1NDk1IDAgMCAwIDYuNzYxMzUsLTYuMDI1NTQgbCAwLC0xODcuODcxNDcgYSA2Ljc2MTM0MjIsNi4wMjU1NDk1IDAgMCAwIC02Ljc2MTM1LC02LjAyNTU1IGwgLTU0LjcxNjQ0LDAgYSA2Ljc2MTM0MjIsNi4wMjU1NDk1IDAgMCAwIC02Ljc2MTMzLDYuMDI1NTUgbCAwLDEwMi42MTkzNSBMIDE4My43NjQxMywyLjkwODg2IGEgNi43NjEzNDIyLDYuMDI1NTQ5NSAwIDAgMCAtNS43NjAxNCwtMi44NzAxNyB6IiAvPg0KICA8cGF0aCBkPSJNIDQuODQ0NjMzMywyMi4xMDg3NSBBIDEzLjQxMjAzOSwxMi41MDE4NDIgMCAwIDEgMTMuNDc3NTg4LDAuMDM5MjQgbCA2Ni4xMTgzMTUsMCBhIDUuMzY0ODE1OCw1LjAwMDczNyAwIDAgMSA1LjM2NDgyMyw1LjAwMDczIGwgMCw3OS44NzkzMSB6IiAvPg0KICA8cGF0aCBkPSJtIDQyMC4xNTUzNSwxNzcuODkxMTkgYSAxMy40MTIwMzgsMTIuNTAxODQyIDAgMCAxIC04LjYzMjk1LDIyLjA2OTUxIGwgLTY2LjExODMyLDAgYSA1LjM2NDgxNTIsNS4wMDA3MzcgMCAwIDEgLTUuMzY0ODIsLTUuMDAwNzQgbCAwLC03OS44NzkzMSB6IiAvPg0KPC9zdmc+DQo8IS0tIFRoaXMgd29yayBpcyBsaWNlbnNlZCB1bmRlciBhIENyZWF0aXZlIENvbW1vbnMgQXR0cmlidXRpb24tU2hhcmVBbGlrZSA0LjAgSW50ZXJuYXRpb25hbCBMaWNlbnNlLiAtLT4NCjwhLS0gaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbGljZW5zZXMvYnktc2EvNC4wLyAtLT4NCg==") no-repeat fixed 50%/70% 70%,linear-gradient(180deg,#2a2a2a 0,#202020);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff2a2a2a",endColorstr="#ff202020",GradientType=0)}body.nanotrasen .normal{color:#40628a}body.nanotrasen .good{color:#537d29}body.nanotrasen .average{color:#be6209}body.nanotrasen .bad{color:#b00e0e}body.nanotrasen .highlight{color:#8ba5c4}body.nanotrasen main{display:block;margin-top:32px;padding:2px 6px 0}body.nanotrasen hr{height:2px;background-color:#40628a;border:none}body.nanotrasen .hidden{display:none}body.nanotrasen .bar .barText,body.nanotrasen span.button{color:#fff;font-size:12px;font-weight:400;font-style:normal;text-decoration:none}body.nanotrasen .bold{font-weight:700}body.nanotrasen .italic{font-style:italic}body.nanotrasen [unselectable=on]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}body.nanotrasen div[data-tooltip],body.nanotrasen span[data-tooltip]{position:relative}body.nanotrasen div[data-tooltip]:after,body.nanotrasen span[data-tooltip]:after{position:absolute;display:block;z-index:2;width:250px;padding:10px;-ms-transform:translateX(-50%);transform:translateX(-50%);visibility:hidden;opacity:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";white-space:normal;text-align:left;content:attr(data-tooltip);transition:all .5s;border:1px solid #272727;background-color:#363636}body.nanotrasen div[data-tooltip]:hover:after,body.nanotrasen span[data-tooltip]:hover:after{visibility:visible;opacity:1;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"}body.nanotrasen div[data-tooltip].tooltip-top:after,body.nanotrasen span[data-tooltip].tooltip-top:after{bottom:100%;left:50%;-ms-transform:translateX(-50%) translateY(8px);transform:translateX(-50%) translateY(8px)}body.nanotrasen div[data-tooltip].tooltip-top:hover:after,body.nanotrasen span[data-tooltip].tooltip-top:hover:after{-ms-transform:translateX(-50%) translateY(-8px);transform:translateX(-50%) translateY(-8px)}body.nanotrasen div[data-tooltip].tooltip-bottom:after,body.nanotrasen span[data-tooltip].tooltip-bottom:after{top:100%;left:50%;-ms-transform:translateX(-50%) translateY(-8px);transform:translateX(-50%) translateY(-8px)}body.nanotrasen div[data-tooltip].tooltip-bottom:hover:after,body.nanotrasen span[data-tooltip].tooltip-bottom:hover:after{-ms-transform:translateX(-50%) translateY(8px);transform:translateX(-50%) translateY(8px)}body.nanotrasen div[data-tooltip].tooltip-left:after,body.nanotrasen span[data-tooltip].tooltip-left:after{top:50%;right:100%;-ms-transform:translateX(8px) translateY(-50%);transform:translateX(8px) translateY(-50%)}body.nanotrasen div[data-tooltip].tooltip-left:hover:after,body.nanotrasen span[data-tooltip].tooltip-left:hover:after{-ms-transform:translateX(-8px) translateY(-50%);transform:translateX(-8px) translateY(-50%)}body.nanotrasen div[data-tooltip].tooltip-right:after,body.nanotrasen span[data-tooltip].tooltip-right:after{top:50%;left:100%;-ms-transform:translateX(-8px) translateY(-50%);transform:translateX(-8px) translateY(-50%)}body.nanotrasen div[data-tooltip].tooltip-right:hover:after,body.nanotrasen span[data-tooltip].tooltip-right:hover:after{-ms-transform:translateX(8px) translateY(-50%);transform:translateX(8px) translateY(-50%)}body.nanotrasen .bar{display:inline-block;position:relative;vertical-align:middle;width:100%;height:20px;line-height:17px;padding:1px;border:1px solid #40628a;background:#272727}body.nanotrasen .bar .barText{position:absolute;top:0;right:3px}body.nanotrasen .bar .barFill{display:block;height:100%;transition:background-color 1s;background-color:#40628a}body.nanotrasen .bar .barFill.good{background-color:#537d29}body.nanotrasen .bar .barFill.average{background-color:#be6209}body.nanotrasen .bar .barFill.bad{background-color:#b00e0e}body.nanotrasen span.button{display:inline-block;vertical-align:middle;min-height:20px;line-height:17px;padding:0 5px;white-space:nowrap;border:1px solid #272727}body.nanotrasen span.button .fa{padding-right:2px}body.nanotrasen span.button.normal{transition:background-color .5s;background-color:#40628a}body.nanotrasen span.button.normal.active:focus,body.nanotrasen span.button.normal.active:hover{transition:background-color .25s;background-color:#4f78aa;outline:0}body.nanotrasen span.button.disabled{transition:background-color .5s;background-color:#999}body.nanotrasen span.button.disabled.active:focus,body.nanotrasen span.button.disabled.active:hover{transition:background-color .25s;background-color:#a8a8a8;outline:0}body.nanotrasen span.button.selected{transition:background-color .5s;background-color:#2f943c}body.nanotrasen span.button.selected.active:focus,body.nanotrasen span.button.selected.active:hover{transition:background-color .25s;background-color:#3ab84b;outline:0}body.nanotrasen span.button.toggle{transition:background-color .5s;background-color:#2f943c}body.nanotrasen span.button.toggle.active:focus,body.nanotrasen span.button.toggle.active:hover{transition:background-color .25s;background-color:#3ab84b;outline:0}body.nanotrasen span.button.caution{transition:background-color .5s;background-color:#9a9d00}body.nanotrasen span.button.caution.active:focus,body.nanotrasen span.button.caution.active:hover{transition:background-color .25s;background-color:#ced200;outline:0}body.nanotrasen span.button.danger{transition:background-color .5s;background-color:#9d0808}body.nanotrasen span.button.danger.active:focus,body.nanotrasen span.button.danger.active:hover{transition:background-color .25s;background-color:#ce0b0b;outline:0}body.nanotrasen span.button.gridable{width:125px;margin:2px 0}body.nanotrasen span.button.gridable.center{text-align:center;width:75px}body.nanotrasen span.button+span:not(.button),body.nanotrasen span:not(.button)+span.button{margin-left:5px}body.nanotrasen div.display{width:100%;padding:4px;margin:6px 0;background-color:#000;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr=#54000000,endColorStr=#54000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorStr=#54000000,endColorStr=#54000000);background-color:rgba(0,0,0,.33);box-shadow:inset 0 0 5px rgba(0,0,0,.5)}body.nanotrasen div.display.tabular{padding:0;margin:0}body.nanotrasen div.display header,body.nanotrasen div.subdisplay header{display:block;position:relative;width:100%;padding:0 4px;margin-bottom:6px;color:#fff;border-bottom:2px solid #40628a}body.nanotrasen div.display header .buttonRight,body.nanotrasen div.subdisplay header .buttonRight{position:absolute;bottom:6px;right:4px}body.nanotrasen div.display article,body.nanotrasen div.subdisplay article{display:table;width:100%;border-collapse:collapse}body.nanotrasen input{display:inline-block;vertical-align:middle;height:20px;line-height:17px;padding:0 5px;white-space:nowrap;color:#000;background-color:#fff;border:1px solid #272727}body.nanotrasen input.number{width:35px}body.nanotrasen input::-webkit-input-placeholder{color:#999}body.nanotrasen input:-ms-input-placeholder{color:#999}body.nanotrasen input::placeholder{color:#999}body.nanotrasen input::-ms-clear{display:none}body.nanotrasen svg.linegraph{overflow:hidden}body.nanotrasen div.notice{margin:8px 0;padding:4px;box-shadow:none;color:#000;font-weight:700;font-style:italic;background-color:#bb9b68;background-image:repeating-linear-gradient(-45deg,#bb9b68,#bb9b68 10px,#b1905d 0,#b1905d 20px)}body.nanotrasen div.notice .label{color:#000}body.nanotrasen div.notice .content:only-of-type{padding:0}body.nanotrasen div.notice hr{background-color:#272727}body.nanotrasen div.resize{position:fixed;bottom:0;right:0;width:0;height:0;border-style:solid;border-width:0 0 45px 45px;border-color:transparent transparent #363636;-ms-transform:rotate(1turn);transform:rotate(1turn)}body.nanotrasen section .cell,body.nanotrasen section .content,body.nanotrasen section .label,body.nanotrasen section .line,body.syndicate section .cell,body.syndicate section .content,body.syndicate section .label,body.syndicate section .line{display:table-cell;margin:0;text-align:left;vertical-align:middle;padding:3px 2px}body.nanotrasen section{display:table-row;width:100%}body.nanotrasen section:not(:first-child){padding-top:4px}body.nanotrasen section.candystripe:nth-child(2n){background-color:#000;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr=#33000000,endColorStr=#33000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorStr=#33000000,endColorStr=#33000000);background-color:rgba(0,0,0,.2)}body.nanotrasen section .label{width:1%;padding-right:32px;white-space:nowrap;color:#8ba5c4}body.nanotrasen section .content:not(:last-child){padding-right:16px}body.nanotrasen section .line{width:100%}body.nanotrasen section .cell:not(:first-child){text-align:center;padding-top:0}body.nanotrasen section .cell span.button{width:75px}body.nanotrasen section:not(:last-child){padding-right:4px}body.nanotrasen div.subdisplay{width:100%;margin:0}body.nanotrasen header.titlebar .close,body.nanotrasen header.titlebar .minimize{display:inline-block;position:relative;padding:7px;margin:-7px;color:#8ba5c4}body.nanotrasen header.titlebar .close:hover,body.nanotrasen header.titlebar .minimize:hover{color:#9cb2cd}body.nanotrasen header.titlebar{position:fixed;z-index:1;top:0;left:0;width:100%;height:32px;background-color:#363636;border-bottom:1px solid #161616;box-shadow:0 3px 3px rgba(0,0,0,.1)}body.nanotrasen header.titlebar .statusicon{position:absolute;top:4px;left:12px;transition:color .5s}body.nanotrasen header.titlebar .title{position:absolute;top:6px;left:46px;color:#8ba5c4;font-size:16px;white-space:nowrap}body.nanotrasen header.titlebar .minimize{position:absolute;top:6px;right:46px}body.nanotrasen header.titlebar .close{position:absolute;top:4px;right:12px}body.syndicate{background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmVyc2lvbj0iMS4wIiB2aWV3Qm94PSIwIDAgMjAwIDI4OS43NDIiIG9wYWNpdHk9Ii4zMyI+DQogIDxwYXRoIGQ9Im0gOTMuNTM3Njc3LDAgYyAtMTguMTEzMTI1LDAgLTM0LjIyMDEzMywzLjExMTY0IC00OC4zMjM0ODQsOS4zMzQzNyAtMTMuOTY1MDkyLDYuMjIxNjcgLTI0LjYxMjQ0MiwxNS4wNzExNCAtMzEuOTQwNjUxLDI2LjU0NzEgLTcuMTg5OTM5OCwxMS4zMzc4OSAtMTAuMzAxMjI2NiwyNC43NDkxMSAtMTAuMzAxMjI2Niw0MC4yMzQ3OCAwLDEwLjY0NjYyIDIuNzI1MDAyNiwyMC40NjQ2NSA4LjE3NTExMTYsMjkuNDUyNTggNS42MTUyNzcsOC45ODY4NiAxNC4wMzgyNzcsMTcuMzUyMDQgMjUuMjY4ODIxLDI1LjA5NDM2IDExLjIzMDU0NCw3LjYwNTMxIDI2LjUwNzQyMSwxNS40MTgzNSA0NS44MzA1MTQsMjMuNDM3ODIgMTkuOTgzNzQ4LDguMjk1NTcgMzQuODQ4ODQ4LDE1LjU1NDcxIDQ0LjU5Mjk5OCwyMS43NzYzOCA5Ljc0NDE0LDYuMjIyNzMgMTYuNzYxNywxMi44NTg1IDIxLjA1NTcyLDE5LjkwOTUxIDQuMjk0MDQsNy4wNTIwOCA2LjQ0MTkzLDE1Ljc2NDA4IDYuNDQxOTMsMjYuMTM0NTkgMCwxNi4xNzcwMiAtNS4yMDE5NiwyOC40ODIyMiAtMTUuNjA2NzMsMzYuOTE2ODIgLTEwLjIzOTYsOC40MzQ3IC0yNS4wMjIwMywxMi42NTIzIC00NC4zNDUxNjksMTIuNjUyMyAtMTQuMDM4MTcxLDAgLTI1LjUxNTI0NywtMS42NTk0IC0zNC40MzM2MTgsLTQuOTc3NyAtOC45MTgzNywtMy40NTY2IC0xNi4xODU1NzIsLTguNzExMyAtMjEuODAwODM5LC0xNS43NjMzIC01LjYxNTI3NywtNy4wNTIxIC0xMC4wNzQ3OTUsLTE2LjY2MDg4IC0xMy4zNzc4OTksLTI4LjgyODEyIGwgLTI0Ljc3MzE2MjYyOTM5NDUsMCAwLDU2LjgyNjMyIEMgMzMuODU2NzY5LDI4Ni4wNzYwMSA2My43NDkwNCwyODkuNzQyMDEgODkuNjc4MzgzLDI4OS43NDIwMSBjIDE2LjAyMDAyNywwIDMwLjcxOTc4NywtMS4zODI3IDQ0LjA5NzMzNywtNC4xNDc5IDEzLjU0MjcyLC0yLjkwNDMgMjUuMTA0MSwtNy40Njc2IDM0LjY4MzA5LC0xMy42ODkzIDkuNzQ0MTMsLTYuMzU5NyAxNy4zNDA0MiwtMTQuNTE5NSAyMi43OTA1MiwtMjQuNDc0OCA1LjQ1MDEsLTEwLjA5MzMyIDguMTc1MTEsLTIyLjM5OTU5IDguMTc1MTEsLTM2LjkxNjgyIDAsLTEyLjk5NzY0IC0zLjMwMjEsLTI0LjMzNTM5IC05LjkwODI5LC0zNC4wMTQ2IC02LjQ0MTA1LC05LjgxNzI1IC0xNS41MjU0NSwtMTguNTI3MDcgLTI3LjI1MTQ2LC0yNi4xMzEzMyAtMTEuNTYwODUsLTcuNjA0MjcgLTI3LjkxMDgzLC0xNS44MzE0MiAtNDkuMDUwNjYsLTI0LjY4MDIyIC0xNy41MDY0NCwtNy4xOTAxMiAtMzAuNzE5NjY4LC0xMy42ODk0OCAtMzkuNjM4MDM4LC0xOS40OTcwMSAtOC45MTgzNzEsLTUuODA3NTIgLTE4LjYwNzQ3NCwtMTIuNDM0MDkgLTI0LjA5NjUyNCwtMTguODc0MTcgLTUuNDI2MDQzLC02LjM2NjE2IC05LjY1ODgyNiwtMTUuMDcwMDMgLTkuNjU4ODI2LC0yNC44ODcyOSAwLC05LjI2NDAxIDIuMDc1NDE0LC0xNy4yMTM0NSA2LjIyMzQ1NCwtMjMuODUwMzMgMTEuMDk4Mjk4LC0xNC4zOTc0OCA0MS4yODY2MzgsLTEuNzk1MDcgNDUuMDc1NjA5LDI0LjM0NzYyIDQuODM5MzkyLDYuNzc0OTEgOC44NDkzNSwxNi4yNDcyOSAxMi4wMjk1MTUsMjguNDE1NiBsIDIwLjUzMjM0LDAgMCwtNTUuOTk5NjcgYyAtNC40NzgyNSwtNS45MjQ0OCAtOS45NTQ4OCwtMTAuNjMyMjIgLTE1LjkwODM3LC0xNC4zNzQxMSAxLjY0MDU1LDAuNDc5MDUgMy4xOTAzOSwxLjAyMzc2IDQuNjM4NjUsMS42NDAyNCA2LjQ5ODYxLDIuNjI2MDcgMTIuMTY3OTMsNy4zMjc0NyAxNy4wMDczLDE0LjEwMzQ1IDQuODM5MzksNi43NzQ5MSA4Ljg0OTM1LDE2LjI0NTY3IDEyLjAyOTUyLDI4LjQxMzk3IDAsMCA4LjQ4MTI4LC0wLjEyODk0IDguNDg5NzgsLTAuMDAyIDAuNDE3NzYsNi40MTQ5NCAtMS43NTMzOSw5LjQ1Mjg2IC00LjEyMzQyLDEyLjU2MTA0IC0yLjQxNzQsMy4xNjk3OCAtNS4xNDQ4Niw2Ljc4OTczIC00LjAwMjc4LDEzLjAwMjkgMS41MDc4Niw4LjIwMzE4IDEwLjE4MzU0LDEwLjU5NjQyIDE0LjYyMTk0LDkuMzExNTQgLTMuMzE4NDIsLTAuNDk5MTEgLTUuMzE4NTUsLTEuNzQ5NDggLTUuMzE4NTUsLTEuNzQ5NDggMCwwIDEuODc2NDYsMC45OTg2OCA1LjY1MTE3LC0xLjM1OTgxIC0zLjI3Njk1LDAuOTU1NzEgLTEwLjcwNTI5LC0wLjc5NzM4IC0xMS44MDEyNSwtNi43NjMxMyAtMC45NTc1MiwtNS4yMDg2MSAwLjk0NjU0LC03LjI5NTE0IDMuNDAxMTMsLTEwLjUxNDgyIDIuNDU0NjIsLTMuMjE5NjggNS4yODQyNiwtNi45NTgzMSA0LjY4NDMsLTE0LjQ4ODI0IGwgMC4wMDMsMC4wMDIgOC45MjY3NiwwIDAsLTU1Ljk5OTY3IGMgLTE1LjA3MTI1LC0zLjg3MTY4IC0yNy42NTMxNCwtNi4zNjA0MiAtMzcuNzQ2NzEsLTcuNDY1ODYgLTkuOTU1MzEsLTEuMTA3NTUgLTIwLjE4ODIzLC0xLjY1OTgxIC0zMC42OTY2MTMsLTEuNjU5ODEgeiBtIDcwLjMyMTYwMywxNy4zMDg5MyAwLjIzODA1LDQwLjMwNDkgYyAxLjMxODA4LDEuMjI2NjYgMi40Mzk2NSwyLjI3ODE1IDMuMzQwODEsMy4xMDYwMiA0LjgzOTM5LDYuNzc0OTEgOC44NDkzNCwxNi4yNDU2NiAxMi4wMjk1MSwyOC40MTM5NyBsIDIwLjUzMjM0LDAgMCwtNTUuOTk5NjcgYyAtNi42NzczMSwtNC41OTM4MSAtMTkuODM2NDMsLTEwLjQ3MzA5IC0zNi4xNDA3MSwtMTUuODI1MjIgeiBtIC0yOC4xMjA0OSw1LjYwNTUxIDguNTY0NzksMTcuNzE2NTUgYyAtMTEuOTcwMzcsLTYuNDY2OTcgLTEzLjg0Njc4LC05LjcxNzI2IC04LjU2NDc5LC0xNy43MTY1NSB6IG0gMjIuNzk3MDUsMCBjIDIuNzcxNSw3Ljk5OTI5IDEuNzg3NDEsMTEuMjQ5NTggLTQuNDkzNTQsMTcuNzE2NTUgbCA0LjQ5MzU0LC0xNy43MTY1NSB6IG0gMTUuMjIxOTUsMjQuMDA4NDggOC41NjQ3OSwxNy43MTY1NSBjIC0xMS45NzAzOCwtNi40NjY5NyAtMTMuODQ2NzksLTkuNzE3MjYgLTguNTY0NzksLTE3LjcxNjU1IHogbSAyMi43OTcwNCwwIGMgMi43NzE1LDcuOTk5MjkgMS43ODc0MSwxMS4yNDk1OCAtNC40OTM1NCwxNy43MTY1NSBsIDQuNDkzNTQsLTE3LjcxNjU1IHogbSAtOTkuMTEzODQsMi4yMDc2NCA4LjU2NDc5LDE3LjcxNjU1IGMgLTExLjk3MDM4MiwtNi40NjY5NyAtMTMuODQ2NzgyLC05LjcxNzI2IC04LjU2NDc5LC0xNy43MTY1NSB6IG0gMjIuNzk1NDIsMCBjIDIuNzcxNSw3Ljk5OTI5IDEuNzg3NDEsMTEuMjQ5NTggLTQuNDkzNTQsMTcuNzE2NTUgbCA0LjQ5MzU0LC0xNy43MTY1NSB6IiAvPg0KPC9zdmc+DQo8IS0tIFRoaXMgd29yayBpcyBsaWNlbnNlZCB1bmRlciBhIENyZWF0aXZlIENvbW1vbnMgQXR0cmlidXRpb24tU2hhcmVBbGlrZSA0LjAgSW50ZXJuYXRpb25hbCBMaWNlbnNlLiAtLT4NCjwhLS0gaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbGljZW5zZXMvYnktc2EvNC4wLyAtLT4NCg==") no-repeat fixed 50%/70% 70%,linear-gradient(180deg,#750000 0,#340404);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff750000",endColorstr="#ff340404",GradientType=0)}body.syndicate .normal{color:#40628a}body.syndicate .good{color:#73e573}body.syndicate .average{color:#be6209}body.syndicate .bad{color:#b00e0e}body.syndicate .highlight{color:#000}body.syndicate main{display:block;margin-top:32px;padding:2px 6px 0}body.syndicate hr{height:2px;background-color:#272727;border:none}body.syndicate .hidden{display:none}body.syndicate .bar .barText,body.syndicate span.button{color:#fff;font-size:12px;font-weight:400;font-style:normal;text-decoration:none}body.syndicate .bold{font-weight:700}body.syndicate .italic{font-style:italic}body.syndicate [unselectable=on]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}body.syndicate div[data-tooltip],body.syndicate span[data-tooltip]{position:relative}body.syndicate div[data-tooltip]:after,body.syndicate span[data-tooltip]:after{position:absolute;display:block;z-index:2;width:250px;padding:10px;-ms-transform:translateX(-50%);transform:translateX(-50%);visibility:hidden;opacity:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";white-space:normal;text-align:left;content:attr(data-tooltip);transition:all .5s;border:1px solid #272727;background-color:#363636}body.syndicate div[data-tooltip]:hover:after,body.syndicate span[data-tooltip]:hover:after{visibility:visible;opacity:1;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"}body.syndicate div[data-tooltip].tooltip-top:after,body.syndicate span[data-tooltip].tooltip-top:after{bottom:100%;left:50%;-ms-transform:translateX(-50%) translateY(8px);transform:translateX(-50%) translateY(8px)}body.syndicate div[data-tooltip].tooltip-top:hover:after,body.syndicate span[data-tooltip].tooltip-top:hover:after{-ms-transform:translateX(-50%) translateY(-8px);transform:translateX(-50%) translateY(-8px)}body.syndicate div[data-tooltip].tooltip-bottom:after,body.syndicate span[data-tooltip].tooltip-bottom:after{top:100%;left:50%;-ms-transform:translateX(-50%) translateY(-8px);transform:translateX(-50%) translateY(-8px)}body.syndicate div[data-tooltip].tooltip-bottom:hover:after,body.syndicate span[data-tooltip].tooltip-bottom:hover:after{-ms-transform:translateX(-50%) translateY(8px);transform:translateX(-50%) translateY(8px)}body.syndicate div[data-tooltip].tooltip-left:after,body.syndicate span[data-tooltip].tooltip-left:after{top:50%;right:100%;-ms-transform:translateX(8px) translateY(-50%);transform:translateX(8px) translateY(-50%)}body.syndicate div[data-tooltip].tooltip-left:hover:after,body.syndicate span[data-tooltip].tooltip-left:hover:after{-ms-transform:translateX(-8px) translateY(-50%);transform:translateX(-8px) translateY(-50%)}body.syndicate div[data-tooltip].tooltip-right:after,body.syndicate span[data-tooltip].tooltip-right:after{top:50%;left:100%;-ms-transform:translateX(-8px) translateY(-50%);transform:translateX(-8px) translateY(-50%)}body.syndicate div[data-tooltip].tooltip-right:hover:after,body.syndicate span[data-tooltip].tooltip-right:hover:after{-ms-transform:translateX(8px) translateY(-50%);transform:translateX(8px) translateY(-50%)}body.syndicate .bar{display:inline-block;position:relative;vertical-align:middle;width:100%;height:20px;line-height:17px;padding:1px;border:1px solid #000;background:#272727}body.syndicate .bar .barText{position:absolute;top:0;right:3px}body.syndicate .bar .barFill{display:block;height:100%;transition:background-color 1s;background-color:#000}body.syndicate .bar .barFill.good{background-color:#73e573}body.syndicate .bar .barFill.average{background-color:#be6209}body.syndicate .bar .barFill.bad{background-color:#b00e0e}body.syndicate span.button{display:inline-block;vertical-align:middle;min-height:20px;line-height:17px;padding:0 5px;white-space:nowrap;border:1px solid #272727}body.syndicate span.button .fa{padding-right:2px}body.syndicate span.button.normal{transition:background-color .5s;background-color:#397439}body.syndicate span.button.normal.active:focus,body.syndicate span.button.normal.active:hover{transition:background-color .25s;background-color:#4a964a;outline:0}body.syndicate span.button.disabled{transition:background-color .5s;background-color:#363636}body.syndicate span.button.disabled.active:focus,body.syndicate span.button.disabled.active:hover{transition:background-color .25s;background-color:#545454;outline:0}body.syndicate span.button.selected{transition:background-color .5s;background-color:#9d0808}body.syndicate span.button.selected.active:focus,body.syndicate span.button.selected.active:hover{transition:background-color .25s;background-color:#ce0b0b;outline:0}body.syndicate span.button.toggle{transition:background-color .5s;background-color:#9d0808}body.syndicate span.button.toggle.active:focus,body.syndicate span.button.toggle.active:hover{transition:background-color .25s;background-color:#ce0b0b;outline:0}body.syndicate span.button.caution{transition:background-color .5s;background-color:#be6209}body.syndicate span.button.caution.active:focus,body.syndicate span.button.caution.active:hover{transition:background-color .25s;background-color:#eb790b;outline:0}body.syndicate span.button.danger{transition:background-color .5s;background-color:#9a9d00}body.syndicate span.button.danger.active:focus,body.syndicate span.button.danger.active:hover{transition:background-color .25s;background-color:#ced200;outline:0}body.syndicate span.button.gridable{width:125px;margin:2px 0}body.syndicate span.button.gridable.center{text-align:center;width:75px}body.syndicate span.button+span:not(.button),body.syndicate span:not(.button)+span.button{margin-left:5px}body.syndicate div.display{width:100%;padding:4px;margin:6px 0;background-color:#000;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr=#80000000,endColorStr=#80000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorStr=#80000000,endColorStr=#80000000);background-color:rgba(0,0,0,.5);box-shadow:inset 0 0 5px rgba(0,0,0,.75)}body.syndicate div.display.tabular{padding:0;margin:0}body.syndicate div.display header,body.syndicate div.subdisplay header{display:block;position:relative;width:100%;padding:0 4px;margin-bottom:6px;color:#fff;border-bottom:2px solid #272727}body.syndicate div.display header .buttonRight,body.syndicate div.subdisplay header .buttonRight{position:absolute;bottom:6px;right:4px}body.syndicate div.display article,body.syndicate div.subdisplay article{display:table;width:100%;border-collapse:collapse}body.syndicate input{display:inline-block;vertical-align:middle;height:20px;line-height:17px;padding:0 5px;white-space:nowrap;color:#fff;background-color:#9d0808;border:1px solid #272727}body.syndicate input.number{width:35px}body.syndicate input::-webkit-input-placeholder{color:#999}body.syndicate input:-ms-input-placeholder{color:#999}body.syndicate input::placeholder{color:#999}body.syndicate input::-ms-clear{display:none}body.syndicate svg.linegraph{overflow:hidden}body.syndicate div.notice{margin:8px 0;padding:4px;box-shadow:none;color:#000;font-weight:700;font-style:italic;background-color:#750000;background-image:repeating-linear-gradient(-45deg,#750000,#750000 10px,#910101 0,#910101 20px)}body.syndicate div.notice .label{color:#000}body.syndicate div.notice .content:only-of-type{padding:0}body.syndicate div.notice hr{background-color:#272727}body.syndicate div.resize{position:fixed;bottom:0;right:0;width:0;height:0;border-style:solid;border-width:0 0 45px 45px;border-color:transparent transparent #363636;-ms-transform:rotate(1turn);transform:rotate(1turn)}body.syndicate section .cell,body.syndicate section .content,body.syndicate section .label,body.syndicate section .line{display:table-cell;margin:0;text-align:left;vertical-align:middle;padding:3px 2px}body.syndicate section{display:table-row;width:100%}body.syndicate section:not(:first-child){padding-top:4px}body.syndicate section.candystripe:nth-child(2n){background-color:#000;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr=#33000000,endColorStr=#33000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorStr=#33000000,endColorStr=#33000000);background-color:rgba(0,0,0,.2)}body.syndicate section .label{width:1%;padding-right:32px;white-space:nowrap;color:#fff}body.syndicate section .content:not(:last-child){padding-right:16px}body.syndicate section .line{width:100%}body.syndicate section .cell:not(:first-child){text-align:center;padding-top:0}body.syndicate section .cell span.button{width:75px}body.syndicate section:not(:last-child){padding-right:4px}body.syndicate div.subdisplay{width:100%;margin:0}body.syndicate header.titlebar .close,body.syndicate header.titlebar .minimize{display:inline-block;position:relative;padding:7px;margin:-7px;color:#e74242}body.syndicate header.titlebar .close:hover,body.syndicate header.titlebar .minimize:hover{color:#eb5e5e}body.syndicate header.titlebar{position:fixed;z-index:1;top:0;left:0;width:100%;height:32px;background-color:#363636;border-bottom:1px solid #161616;box-shadow:0 3px 3px rgba(0,0,0,.1)}body.syndicate header.titlebar .statusicon{position:absolute;top:4px;left:12px;transition:color .5s}body.syndicate header.titlebar .title{position:absolute;top:6px;left:46px;color:#e74242;font-size:16px;white-space:nowrap}body.syndicate header.titlebar .minimize{position:absolute;top:6px;right:46px}body.syndicate header.titlebar .close{position:absolute;top:4px;right:12px}.no-icons header.titlebar .statusicon{font-size:20px}.no-icons header.titlebar .statusicon:after{content:"O"}.no-icons header.titlebar .minimize{top:-2px;font-size:20px}.no-icons header.titlebar .minimize:after{content:"—"}.no-icons header.titlebar .close{font-size:20px}.no-icons header.titlebar .close:after{content:"X"} \ No newline at end of file diff --git a/tgui/assets/tgui.js b/tgui/assets/tgui.js index 111e452df1..a41d648fe1 100644 --- a/tgui/assets/tgui.js +++ b/tgui/assets/tgui.js @@ -1,17 +1,16 @@ -require=function t(e,n,a){function r(o,s){if(!n[o]){if(!e[o]){var u="function"==typeof require&&require;if(!s&&u)return u(o,!0);if(i)return i(o,!0);var p=Error("Cannot find module '"+o+"'");throw p.code="MODULE_NOT_FOUND",p}var c=n[o]={exports:{}};e[o][0].call(c.exports,function(t){var n=e[o][1][t];return r(n?n:t)},c,c.exports,t,e,n,a)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o2?p[2]:void 0,l=Math.min((void 0===c?o:r(c,o))-u,o-s),d=1;for(s>u&&u+l>s&&(d=-1,u+=l-1,s+=l-1);l-- >0;)u in n?n[s]=n[u]:delete n[s],s+=d,u+=d;return n}},{76:76,79:79,80:80}],6:[function(t,e,n){"use strict";var a=t(80),r=t(76),i=t(79);e.exports=[].fill||function(t){for(var e=a(this),n=i(e.length),o=arguments,s=o.length,u=r(s>1?o[1]:void 0,n),p=s>2?o[2]:void 0,c=void 0===p?n:r(p,n);c>u;)e[u++]=t;return e}},{76:76,79:79,80:80}],7:[function(t,e,n){var a=t(78),r=t(79),i=t(76);e.exports=function(t){return function(e,n,o){var s,u=a(e),p=r(u.length),c=i(o,p);if(t&&n!=n){for(;p>c;)if(s=u[c++],s!=s)return!0}else for(;p>c;c++)if((t||c in u)&&u[c]===n)return t||c;return!t&&-1}}},{76:76,78:78,79:79}],8:[function(t,e,n){var a=t(17),r=t(34),i=t(80),o=t(79),s=t(9);e.exports=function(t){var e=1==t,n=2==t,u=3==t,p=4==t,c=6==t,l=5==t||c;return function(d,f,h){for(var m,v,g=i(d),b=r(g),y=a(f,h,3),x=o(b.length),_=0,w=e?s(d,x):n?s(d,0):void 0;x>_;_++)if((l||_ in b)&&(m=b[_],v=y(m,_,g),t))if(e)w[_]=v;else if(v)switch(t){case 3:return!0;case 5:return m;case 6:return _;case 2:w.push(m)}else if(p)return!1;return c?-1:u||p?p:w}}},{17:17,34:34,79:79,80:80,9:9}],9:[function(t,e,n){var a=t(38),r=t(36),i=t(83)("species");e.exports=function(t,e){var n;return r(t)&&(n=t.constructor,"function"!=typeof n||n!==Array&&!r(n.prototype)||(n=void 0),a(n)&&(n=n[i],null===n&&(n=void 0))),new(void 0===n?Array:n)(e)}},{36:36,38:38,83:83}],10:[function(t,e,n){var a=t(11),r=t(83)("toStringTag"),i="Arguments"==a(function(){return arguments}());e.exports=function(t){var e,n,o;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=(e=Object(t))[r])?n:i?a(e):"Object"==(o=a(e))&&"function"==typeof e.callee?"Arguments":o}},{11:11,83:83}],11:[function(t,e,n){var a={}.toString;e.exports=function(t){return a.call(t).slice(8,-1)}},{}],12:[function(t,e,n){"use strict";var a=t(46),r=t(31),i=t(60),o=t(17),s=t(69),u=t(18),p=t(27),c=t(42),l=t(44),d=t(82)("id"),f=t(30),h=t(38),m=t(65),v=t(19),g=Object.isExtensible||h,b=v?"_s":"size",y=0,x=function(t,e){if(!h(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!f(t,d)){if(!g(t))return"F";if(!e)return"E";r(t,d,++y)}return"O"+t[d]},_=function(t,e){var n,a=x(e);if("F"!==a)return t._i[a];for(n=t._f;n;n=n.n)if(n.k==e)return n};e.exports={getConstructor:function(t,e,n,r){var c=t(function(t,i){s(t,c,e),t._i=a.create(null),t._f=void 0,t._l=void 0,t[b]=0,void 0!=i&&p(i,n,t[r],t)});return i(c.prototype,{clear:function(){for(var t=this,e=t._i,n=t._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete e[n.i];t._f=t._l=void 0,t[b]=0},"delete":function(t){var e=this,n=_(e,t);if(n){var a=n.n,r=n.p;delete e._i[n.i],n.r=!0,r&&(r.n=a),a&&(a.p=r),e._f==n&&(e._f=a),e._l==n&&(e._l=r),e[b]--}return!!n},forEach:function(t){for(var e,n=o(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.n:this._f;)for(n(e.v,e.k,this);e&&e.r;)e=e.p},has:function(t){return!!_(this,t)}}),v&&a.setDesc(c.prototype,"size",{get:function(){return u(this[b])}}),c},def:function(t,e,n){var a,r,i=_(t,e);return i?i.v=n:(t._l=i={i:r=x(e,!0),k:e,v:n,p:a=t._l,n:void 0,r:!1},t._f||(t._f=i),a&&(a.n=i),t[b]++,"F"!==r&&(t._i[r]=i)),t},getEntry:_,setStrong:function(t,e,n){c(t,e,function(t,e){this._t=t,this._k=e,this._l=void 0},function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?"keys"==e?l(0,n.k):"values"==e?l(0,n.v):l(0,[n.k,n.v]):(t._t=void 0,l(1))},n?"entries":"values",!n,!0),m(e)}}},{17:17,18:18,19:19,27:27,30:30,31:31,38:38,42:42,44:44,46:46,60:60,65:65,69:69,82:82}],13:[function(t,e,n){var a=t(27),r=t(10);e.exports=function(t){return function(){if(r(this)!=t)throw TypeError(t+"#toJSON isn't generic");var e=[];return a(this,!1,e.push,e),e}}},{10:10,27:27}],14:[function(t,e,n){"use strict";var a=t(31),r=t(60),i=t(4),o=t(38),s=t(69),u=t(27),p=t(8),c=t(30),l=t(82)("weak"),d=Object.isExtensible||o,f=p(5),h=p(6),m=0,v=function(t){return t._l||(t._l=new g)},g=function(){this.a=[]},b=function(t,e){return f(t.a,function(t){return t[0]===e})};g.prototype={get:function(t){var e=b(this,t);return e?e[1]:void 0},has:function(t){return!!b(this,t)},set:function(t,e){var n=b(this,t);n?n[1]=e:this.a.push([t,e])},"delete":function(t){var e=h(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},e.exports={getConstructor:function(t,e,n,a){var i=t(function(t,r){s(t,i,e),t._i=m++,t._l=void 0,void 0!=r&&u(r,n,t[a],t)});return r(i.prototype,{"delete":function(t){return o(t)?d(t)?c(t,l)&&c(t[l],this._i)&&delete t[l][this._i]:v(this)["delete"](t):!1},has:function(t){return o(t)?d(t)?c(t,l)&&c(t[l],this._i):v(this).has(t):!1}}),i},def:function(t,e,n){return d(i(e))?(c(e,l)||a(e,l,{}),e[l][t._i]=n):v(t).set(e,n),t},frozenStore:v,WEAK:l}},{27:27,30:30,31:31,38:38,4:4,60:60,69:69,8:8,82:82}],15:[function(t,e,n){"use strict";var a=t(29),r=t(22),i=t(61),o=t(60),s=t(27),u=t(69),p=t(38),c=t(24),l=t(43),d=t(66);e.exports=function(t,e,n,f,h,m){var v=a[t],g=v,b=h?"set":"add",y=g&&g.prototype,x={},_=function(t){var e=y[t];i(y,t,"delete"==t?function(t){return m&&!p(t)?!1:e.call(this,0===t?0:t)}:"has"==t?function(t){return m&&!p(t)?!1:e.call(this,0===t?0:t)}:"get"==t?function(t){return m&&!p(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof g&&(m||y.forEach&&!c(function(){(new g).entries().next()}))){var w,k=new g,E=k[b](m?{}:-0,1)!=k,S=c(function(){k.has(1)}),C=l(function(t){new g(t)});C||(g=e(function(e,n){u(e,g,t);var a=new v;return void 0!=n&&s(n,h,a[b],a),a}),g.prototype=y,y.constructor=g),m||k.forEach(function(t,e){w=1/e===-(1/0)}),(S||w)&&(_("delete"),_("has"),h&&_("get")),(w||E)&&_(b),m&&y.clear&&delete y.clear}else g=f.getConstructor(e,t,h,b),o(g.prototype,n);return d(g,t),x[t]=g,r(r.G+r.W+r.F*(g!=v),x),m||f.setStrong(g,t,h),g}},{22:22,24:24,27:27,29:29,38:38,43:43,60:60,61:61,66:66,69:69}],16:[function(t,e,n){var a=e.exports={version:"1.2.6"};"number"==typeof __e&&(__e=a)},{}],17:[function(t,e,n){var a=t(2);e.exports=function(t,e,n){if(a(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,a){return t.call(e,n,a)};case 3:return function(n,a,r){return t.call(e,n,a,r)}}return function(){return t.apply(e,arguments)}}},{2:2}],18:[function(t,e,n){e.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},{}],19:[function(t,e,n){e.exports=!t(24)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{24:24}],20:[function(t,e,n){var a=t(38),r=t(29).document,i=a(r)&&a(r.createElement);e.exports=function(t){return i?r.createElement(t):{}}},{29:29,38:38}],21:[function(t,e,n){var a=t(46);e.exports=function(t){var e=a.getKeys(t),n=a.getSymbols;if(n)for(var r,i=n(t),o=a.isEnum,s=0;i.length>s;)o.call(t,r=i[s++])&&e.push(r);return e}},{46:46}],22:[function(t,e,n){var a=t(29),r=t(16),i=t(31),o=t(61),s=t(17),u="prototype",p=function(t,e,n){var c,l,d,f,h=t&p.F,m=t&p.G,v=t&p.S,g=t&p.P,b=t&p.B,y=m?a:v?a[e]||(a[e]={}):(a[e]||{})[u],x=m?r:r[e]||(r[e]={}),_=x[u]||(x[u]={});m&&(n=e);for(c in n)l=!h&&y&&c in y,d=(l?y:n)[c],f=b&&l?s(d,a):g&&"function"==typeof d?s(Function.call,d):d,y&&!l&&o(y,c,d),x[c]!=d&&i(x,c,f),g&&_[c]!=d&&(_[c]=d)};a.core=r,p.F=1,p.G=2,p.S=4,p.P=8,p.B=16,p.W=32,e.exports=p},{16:16,17:17,29:29,31:31,61:61}],23:[function(t,e,n){var a=t(83)("match");e.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[a]=!1,!"/./"[t](e)}catch(r){}}return!0}},{83:83}],24:[function(t,e,n){e.exports=function(t){try{return!!t()}catch(e){return!0}}},{}],25:[function(t,e,n){"use strict";var a=t(31),r=t(61),i=t(24),o=t(18),s=t(83);e.exports=function(t,e,n){var u=s(t),p=""[t];i(function(){var e={};return e[u]=function(){return 7},7!=""[t](e)})&&(r(String.prototype,t,n(o,u,p)),a(RegExp.prototype,u,2==e?function(t,e){return p.call(t,this,e)}:function(t){return p.call(t,this)}))}},{18:18,24:24,31:31,61:61,83:83}],26:[function(t,e,n){"use strict";var a=t(4);e.exports=function(){var t=a(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},{4:4}],27:[function(t,e,n){var a=t(17),r=t(40),i=t(35),o=t(4),s=t(79),u=t(84);e.exports=function(t,e,n,p){var c,l,d,f=u(t),h=a(n,p,e?2:1),m=0;if("function"!=typeof f)throw TypeError(t+" is not iterable!");if(i(f))for(c=s(t.length);c>m;m++)e?h(o(l=t[m])[0],l[1]):h(t[m]);else for(d=f.call(t);!(l=d.next()).done;)r(d,h,l.value,e)}},{17:17,35:35,4:4,40:40,79:79,84:84}],28:[function(t,e,n){var a=t(78),r=t(46).getNames,i={}.toString,o="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(t){try{return r(t)}catch(e){return o.slice()}};e.exports.get=function(t){return o&&"[object Window]"==i.call(t)?s(t):r(a(t))}},{46:46,78:78}],29:[function(t,e,n){var a=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=a)},{}],30:[function(t,e,n){var a={}.hasOwnProperty;e.exports=function(t,e){return a.call(t,e)}},{}],31:[function(t,e,n){var a=t(46),r=t(59);e.exports=t(19)?function(t,e,n){return a.setDesc(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},{19:19,46:46,59:59}],32:[function(t,e,n){e.exports=t(29).document&&document.documentElement},{29:29}],33:[function(t,e,n){e.exports=function(t,e,n){var a=void 0===n;switch(e.length){case 0:return a?t():t.call(n);case 1:return a?t(e[0]):t.call(n,e[0]);case 2:return a?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return a?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return a?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},{}],34:[function(t,e,n){var a=t(11);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==a(t)?t.split(""):Object(t)}},{11:11}],35:[function(t,e,n){var a=t(45),r=t(83)("iterator"),i=Array.prototype;e.exports=function(t){return void 0!==t&&(a.Array===t||i[r]===t)}},{45:45,83:83}],36:[function(t,e,n){var a=t(11);e.exports=Array.isArray||function(t){return"Array"==a(t)}},{11:11}],37:[function(t,e,n){var a=t(38),r=Math.floor;e.exports=function(t){return!a(t)&&isFinite(t)&&r(t)===t}},{38:38}],38:[function(t,e,n){e.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},{}],39:[function(t,e,n){var a=t(38),r=t(11),i=t(83)("match");e.exports=function(t){var e;return a(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==r(t))}},{11:11,38:38,83:83}],40:[function(t,e,n){var a=t(4);e.exports=function(t,e,n,r){try{return r?e(a(n)[0],n[1]):e(n)}catch(i){var o=t["return"];throw void 0!==o&&a(o.call(t)),i}}},{4:4}],41:[function(t,e,n){"use strict";var a=t(46),r=t(59),i=t(66),o={};t(31)(o,t(83)("iterator"),function(){return this}),e.exports=function(t,e,n){t.prototype=a.create(o,{next:r(1,n)}),i(t,e+" Iterator")}},{31:31,46:46,59:59,66:66,83:83}],42:[function(t,e,n){"use strict";var a=t(48),r=t(22),i=t(61),o=t(31),s=t(30),u=t(45),p=t(41),c=t(66),l=t(46).getProto,d=t(83)("iterator"),f=!([].keys&&"next"in[].keys()),h="@@iterator",m="keys",v="values",g=function(){return this};e.exports=function(t,e,n,b,y,x,_){p(n,e,b);var w,k,E=function(t){if(!f&&t in A)return A[t];switch(t){case m:return function(){return new n(this,t)};case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},S=e+" Iterator",C=y==v,P=!1,A=t.prototype,O=A[d]||A[h]||y&&A[y],T=O||E(y);if(O){var j=l(T.call(new t));c(j,S,!0),!a&&s(A,h)&&o(j,d,g),C&&O.name!==v&&(P=!0,T=function(){return O.call(this)})}if(a&&!_||!f&&!P&&A[d]||o(A,d,T),u[e]=T,u[S]=g,y)if(w={values:C?T:E(v),keys:x?T:E(m),entries:C?E("entries"):T},_)for(k in w)k in A||i(A,k,w[k]);else r(r.P+r.F*(f||P),e,w);return w}},{22:22,30:30,31:31,41:41,45:45,46:46,48:48,61:61,66:66,83:83}],43:[function(t,e,n){var a=t(83)("iterator"),r=!1;try{var i=[7][a]();i["return"]=function(){r=!0},Array.from(i,function(){throw 2})}catch(o){}e.exports=function(t,e){if(!e&&!r)return!1;var n=!1;try{var i=[7],o=i[a]();o.next=function(){return{done:n=!0}},i[a]=function(){return o},t(i)}catch(s){}return n}},{83:83}],44:[function(t,e,n){e.exports=function(t,e){return{value:e,done:!!t}}},{}],45:[function(t,e,n){e.exports={}},{}],46:[function(t,e,n){var a=Object;e.exports={create:a.create,getProto:a.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:a.getOwnPropertyDescriptor,setDesc:a.defineProperty,setDescs:a.defineProperties,getKeys:a.keys,getNames:a.getOwnPropertyNames,getSymbols:a.getOwnPropertySymbols,each:[].forEach}},{}],47:[function(t,e,n){var a=t(46),r=t(78);e.exports=function(t,e){for(var n,i=r(t),o=a.getKeys(i),s=o.length,u=0;s>u;)if(i[n=o[u++]]===e)return n}},{46:46,78:78}],48:[function(t,e,n){e.exports=!1},{}],49:[function(t,e,n){e.exports=Math.expm1||function(t){return 0==(t=+t)?t:t>-1e-6&&1e-6>t?t+t*t/2:Math.exp(t)-1}},{}],50:[function(t,e,n){e.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&1e-8>t?t-t*t/2:Math.log(1+t)}},{}],51:[function(t,e,n){e.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:0>t?-1:1}},{}],52:[function(t,e,n){var a,r,i,o=t(29),s=t(75).set,u=o.MutationObserver||o.WebKitMutationObserver,p=o.process,c=o.Promise,l="process"==t(11)(p),d=function(){var t,e,n;for(l&&(t=p.domain)&&(p.domain=null,t.exit());a;)e=a.domain,n=a.fn,e&&e.enter(),n(),e&&e.exit(),a=a.next;r=void 0,t&&t.enter()};if(l)i=function(){p.nextTick(d)};else if(u){var f=1,h=document.createTextNode("");new u(d).observe(h,{characterData:!0}),i=function(){h.data=f=-f}}else i=c&&c.resolve?function(){c.resolve().then(d)}:function(){s.call(o,d)};e.exports=function(t){var e={fn:t,next:void 0,domain:l&&p.domain};r&&(r.next=e),a||(a=e,i()),r=e}},{11:11,29:29,75:75}],53:[function(t,e,n){var a=t(46),r=t(80),i=t(34);e.exports=t(24)(function(){var t=Object.assign,e={},n={},a=Symbol(),r="abcdefghijklmnopqrst";return e[a]=7,r.split("").forEach(function(t){n[t]=t}),7!=t({},e)[a]||Object.keys(t({},n)).join("")!=r})?function(t,e){for(var n=r(t),o=arguments,s=o.length,u=1,p=a.getKeys,c=a.getSymbols,l=a.isEnum;s>u;)for(var d,f=i(o[u++]),h=c?p(f).concat(c(f)):p(f),m=h.length,v=0;m>v;)l.call(f,d=h[v++])&&(n[d]=f[d]);return n}:Object.assign},{24:24,34:34,46:46,80:80}],54:[function(t,e,n){var a=t(22),r=t(16),i=t(24);e.exports=function(t,e){var n=(r.Object||{})[t]||Object[t],o={};o[t]=e(n),a(a.S+a.F*i(function(){n(1)}),"Object",o)}},{16:16,22:22,24:24}],55:[function(t,e,n){var a=t(46),r=t(78),i=a.isEnum;e.exports=function(t){return function(e){for(var n,o=r(e),s=a.getKeys(o),u=s.length,p=0,c=[];u>p;)i.call(o,n=s[p++])&&c.push(t?[n,o[n]]:o[n]);return c}}},{46:46,78:78}],56:[function(t,e,n){var a=t(46),r=t(4),i=t(29).Reflect;e.exports=i&&i.ownKeys||function(t){var e=a.getNames(r(t)),n=a.getSymbols;return n?e.concat(n(t)):e}},{29:29,4:4,46:46}],57:[function(t,e,n){"use strict";var a=t(58),r=t(33),i=t(2);e.exports=function(){for(var t=i(this),e=arguments.length,n=Array(e),o=0,s=a._,u=!1;e>o;)(n[o]=arguments[o++])===s&&(u=!0);return function(){var a,i=this,o=arguments,p=o.length,c=0,l=0;if(!u&&!p)return r(t,n,i);if(a=n.slice(),u)for(;e>c;c++)a[c]===s&&(a[c]=o[l++]);for(;p>l;)a.push(o[l++]);return r(t,a,i)}}},{2:2,33:33,58:58}],58:[function(t,e,n){e.exports=t(29)},{29:29}],59:[function(t,e,n){e.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},{}],60:[function(t,e,n){var a=t(61);e.exports=function(t,e){for(var n in e)a(t,n,e[n]);return t}},{61:61}],61:[function(t,e,n){var a=t(29),r=t(31),i=t(82)("src"),o="toString",s=Function[o],u=(""+s).split(o);t(16).inspectSource=function(t){return s.call(t)},(e.exports=function(t,e,n,o){"function"==typeof n&&(n.hasOwnProperty(i)||r(n,i,t[e]?""+t[e]:u.join(e+"")),n.hasOwnProperty("name")||r(n,"name",e)),t===a?t[e]=n:(o||delete t[e],r(t,e,n))})(Function.prototype,o,function(){return"function"==typeof this&&this[i]||s.call(this)})},{16:16,29:29,31:31,82:82}],62:[function(t,e,n){e.exports=function(t,e){var n=e===Object(e)?function(t){return e[t]}:e;return function(e){return(e+"").replace(t,n)}}},{}],63:[function(t,e,n){e.exports=Object.is||function(t,e){return t===e?0!==t||1/t===1/e:t!=t&&e!=e}},{}],64:[function(t,e,n){var a=t(46).getDesc,r=t(38),i=t(4),o=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,n,r){try{r=t(17)(Function.call,a(Object.prototype,"__proto__").set,2),r(e,[]),n=!(e instanceof Array)}catch(i){n=!0}return function(t,e){return o(t,e),n?t.__proto__=e:r(t,e),t}}({},!1):void 0),check:o}},{17:17,38:38,4:4,46:46}],65:[function(t,e,n){"use strict";var a=t(29),r=t(46),i=t(19),o=t(83)("species");e.exports=function(t){var e=a[t];i&&e&&!e[o]&&r.setDesc(e,o,{configurable:!0,get:function(){return this}})}},{19:19,29:29,46:46,83:83}],66:[function(t,e,n){var a=t(46).setDesc,r=t(30),i=t(83)("toStringTag");e.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,i)&&a(t,i,{configurable:!0,value:e})}},{30:30,46:46,83:83}],67:[function(t,e,n){var a=t(29),r="__core-js_shared__",i=a[r]||(a[r]={});e.exports=function(t){return i[t]||(i[t]={})}},{29:29}],68:[function(t,e,n){var a=t(4),r=t(2),i=t(83)("species");e.exports=function(t,e){var n,o=a(t).constructor;return void 0===o||void 0==(n=a(o)[i])?e:r(n)}},{2:2,4:4,83:83}],69:[function(t,e,n){e.exports=function(t,e,n){if(!(t instanceof e))throw TypeError(n+": use the 'new' operator!");return t}},{}],70:[function(t,e,n){var a=t(77),r=t(18);e.exports=function(t){return function(e,n){var i,o,s=r(e)+"",u=a(n),p=s.length;return 0>u||u>=p?t?"":void 0:(i=s.charCodeAt(u),55296>i||i>56319||u+1===p||(o=s.charCodeAt(u+1))<56320||o>57343?t?s.charAt(u):i:t?s.slice(u,u+2):(i-55296<<10)+(o-56320)+65536)}}},{18:18,77:77}],71:[function(t,e,n){var a=t(39),r=t(18);e.exports=function(t,e,n){if(a(e))throw TypeError("String#"+n+" doesn't accept regex!");return r(t)+""}},{18:18,39:39}],72:[function(t,e,n){var a=t(79),r=t(73),i=t(18);e.exports=function(t,e,n,o){var s=i(t)+"",u=s.length,p=void 0===n?" ":n+"",c=a(e);if(u>=c)return s;""==p&&(p=" ");var l=c-u,d=r.call(p,Math.ceil(l/p.length));return d.length>l&&(d=d.slice(0,l)),o?d+s:s+d}},{18:18,73:73,79:79}],73:[function(t,e,n){"use strict";var a=t(77),r=t(18);e.exports=function(t){var e=r(this)+"",n="",i=a(t);if(0>i||i==1/0)throw RangeError("Count can't be negative");for(;i>0;(i>>>=1)&&(e+=e))1&i&&(n+=e);return n}},{18:18,77:77}],74:[function(t,e,n){var a=t(22),r=t(18),i=t(24),o=" \n\x0B\f\r   ᠎ â€â€‚         âŸã€€\u2028\u2029\ufeff",s="["+o+"]",u="​…",p=RegExp("^"+s+s+"*"),c=RegExp(s+s+"*$"),l=function(t,e){var n={};n[t]=e(d),a(a.P+a.F*i(function(){return!!o[t]()||u[t]()!=u}),"String",n)},d=l.trim=function(t,e){return t=r(t)+"",1&e&&(t=t.replace(p,"")),2&e&&(t=t.replace(c,"")),t};e.exports=l},{18:18,22:22,24:24}],75:[function(t,e,n){var a,r,i,o=t(17),s=t(33),u=t(32),p=t(20),c=t(29),l=c.process,d=c.setImmediate,f=c.clearImmediate,h=c.MessageChannel,m=0,v={},g="onreadystatechange",b=function(){var t=+this;if(v.hasOwnProperty(t)){var e=v[t];delete v[t],e()}},y=function(t){b.call(t.data)};d&&f||(d=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return v[++m]=function(){s("function"==typeof t?t:Function(t),e)},a(m),m},f=function(t){delete v[t]},"process"==t(11)(l)?a=function(t){l.nextTick(o(b,t,1))}:h?(r=new h,i=r.port2,r.port1.onmessage=y,a=o(i.postMessage,i,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(a=function(t){c.postMessage(t+"","*")},c.addEventListener("message",y,!1)):a=g in p("script")?function(t){u.appendChild(p("script"))[g]=function(){u.removeChild(this),b.call(t)}}:function(t){setTimeout(o(b,t,1),0)}),e.exports={set:d,clear:f}},{11:11,17:17,20:20,29:29,32:32,33:33}],76:[function(t,e,n){var a=t(77),r=Math.max,i=Math.min;e.exports=function(t,e){return t=a(t),0>t?r(t+e,0):i(t,e)}},{77:77}],77:[function(t,e,n){var a=Math.ceil,r=Math.floor;e.exports=function(t){return isNaN(t=+t)?0:(t>0?r:a)(t)}},{}],78:[function(t,e,n){var a=t(34),r=t(18);e.exports=function(t){return a(r(t))}},{18:18,34:34}],79:[function(t,e,n){var a=t(77),r=Math.min;e.exports=function(t){return t>0?r(a(t),9007199254740991):0}},{77:77}],80:[function(t,e,n){var a=t(18);e.exports=function(t){return Object(a(t))}},{18:18}],81:[function(t,e,n){var a=t(38);e.exports=function(t,e){if(!a(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!a(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!a(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!a(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},{38:38}],82:[function(t,e,n){var a=0,r=Math.random();e.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++a+r).toString(36))}},{}],83:[function(t,e,n){var a=t(67)("wks"),r=t(82),i=t(29).Symbol;e.exports=function(t){return a[t]||(a[t]=i&&i[t]||(i||r)("Symbol."+t))}},{29:29,67:67,82:82}],84:[function(t,e,n){var a=t(10),r=t(83)("iterator"),i=t(45);e.exports=t(16).getIteratorMethod=function(t){return void 0!=t?t[r]||t["@@iterator"]||i[a(t)]:void 0}},{10:10,16:16,45:45,83:83}],85:[function(t,e,n){"use strict";var a,r=t(46),i=t(22),o=t(19),s=t(59),u=t(32),p=t(20),c=t(30),l=t(11),d=t(33),f=t(24),h=t(4),m=t(2),v=t(38),g=t(80),b=t(78),y=t(77),x=t(76),_=t(79),w=t(34),k=t(82)("__proto__"),E=t(8),S=t(7)(!1),C=Object.prototype,P=Array.prototype,A=P.slice,O=P.join,T=r.setDesc,j=r.getDesc,M=r.setDescs,R={};o||(a=!f(function(){return 7!=T(p("div"),"a",{get:function(){return 7}}).a}),r.setDesc=function(t,e,n){if(a)try{return T(t,e,n)}catch(r){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(h(t)[e]=n.value),t},r.getDesc=function(t,e){if(a)try{return j(t,e)}catch(n){}return c(t,e)?s(!C.propertyIsEnumerable.call(t,e),t[e]):void 0},r.setDescs=M=function(t,e){h(t);for(var n,a=r.getKeys(e),i=a.length,o=0;i>o;)r.setDesc(t,n=a[o++],e[n]);return t}),i(i.S+i.F*!o,"Object",{getOwnPropertyDescriptor:r.getDesc,defineProperty:r.setDesc,defineProperties:M});var L="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),D=L.concat("length","prototype"),N=L.length,F=function(){var t,e=p("iframe"),n=N,a=">";for(e.style.display="none",u.appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(" - {{data.occupant.name ? data.occupant.name : "No Occupant"}} {{#if data.hasOccupant}} - {{data.occupant.stat == 0 ? "Conscious" : data.occupant.stat == 1 ? "Unconcious" : "Dead"}} + {{data.occupant.stat}} - {{Math.round(adata.occupant.bodyTemperature)}} K + {{data.occupant.bodyTemperature}} K {{Math.round(adata.occupant.health)}} + state='{{data.occupant.health >= 0 ? "good" : "average"}}'>{{data.occupant.health}} {{#each [{label: "Brute", type: "bruteLoss"}, {label: "Respiratory", type: "oxyLoss"}, {label: "Toxin", type: "toxLoss"}, {label: "Burn", type: "fireLoss"}]}} - {{Math.round(adata.occupant[type])}} + {{data.occupant[type]}} {{/each}} {{/if}} @@ -49,7 +28,7 @@ action='power'>{{data.isOperating ? "On" : "Off"}} - {{Math.round(adata.cellTemperature)}} K + {{data.cellTemperature}} K {{data.isOpen ? "Open" : "Closed"}} @@ -63,7 +42,7 @@ {{#if data.isBeakerLoaded}} {{#each adata.beakerContents}} - {{Math.fixed(volume, 2)}} units of {{name}}
    + {{volume}} units of {{name}}
    {{else}} Beaker Empty {{/each}} diff --git a/tgui/src/interfaces/dogborg_sleeper.ract b/tgui/src/interfaces/dogborg_sleeper.ract index 46da372198..e7613c0097 100644 --- a/tgui/src/interfaces/dogborg_sleeper.ract +++ b/tgui/src/interfaces/dogborg_sleeper.ract @@ -1,24 +1,10 @@ - - {{data.occupant.name ? data.occupant.name : "No Occupant"}} {{#if data.occupied}} - {{data.occupant.stat == 0 ? "Conscious" : data.occupant.stat == 1 ? "Unconcious" : "Dead"}} + {{data.occupant.stat}} - - Eject + + {{data.open ? "Open" : "Closed"}} {{#each data.chems}} diff --git a/tgui/src/interfaces/pandemic.ract b/tgui/src/interfaces/pandemic.ract index 4ffccd0f66..f9bfc0566b 100644 --- a/tgui/src/interfaces/pandemic.ract +++ b/tgui/src/interfaces/pandemic.ract @@ -1,84 +1,113 @@ - - {{#partial button}} - - Empty and eject - - - Empty - - - Eject - - {{/partial}} - {{#if data.has_beaker}} - - {{#if data.beaker_empty}} - The beaker is empty! - {{else}} - - {{#if data.has_blood}} - {{data.blood.dna}} - {{data.blood.type}} - {{else}} - - No blood sample detected. - - {{/if}} - - {{/if}} - - {{else}} - - No beaker loaded. - - {{/if}} - -{{#if data.has_blood}} - - {{#each data.viruses}} - - {{#partial button}} - {{#if is_adv}} - - Name advanced disease - - {{/if}} - - Create virus culture bottle - - {{/partial}} - {{agent}} - {{description}} - {{spread}} - {{cure}} - {{#if is_adv}} - {{resistance}} - {{stealth}} - {{stage_speed}} - - {{#each symptoms}} - {{name}}
    - {{/each}} -
    +{{#if data.mode == 1}} + + {{#partial button}} + + Empty and eject + + + Empty + + + Eject + + {{/partial}} + {{#if data.has_beaker}} + + {{#if data.beaker_empty}} + The beaker is empty! + {{else}} + + {{#if data.has_blood}} + {{data.blood.dna}} + {{data.blood.type}} + {{else}} + + No blood sample detected. + + {{/if}} + {{/if}} - - {{else}} - - No detectable virus in the blood sample. - - {{/each}} -
    - - {{#each data.resistances}} - - - Create vaccine bottle - {{else}} - No antibodies detected in the blood sample. + No beaker loaded. - {{/each}} + {{/if}} -{{/if}} \ No newline at end of file + {{#if data.has_blood}} + + {{#each data.viruses}} + + {{#partial button}} + {{#if is_adv}} + + Name advanced disease + + {{/if}} + + Create virus culture bottle + + {{/partial}} + {{agent}} + {{description}} + {{spread}} + {{cure}} + {{#if is_adv}} + + {{#each symptoms}} + + {{name}} +
    + {{/each}} +
    + {{resistance}} + {{stealth}} + {{stage_speed}} + {{transmission}} + {{/if}} +
    + {{else}} + + No detectable virus in the blood sample. + + {{/each}} +
    + + {{#each data.resistances}} + + + Create vaccine bottle + + + {{else}} + + No antibodies detected in the blood sample. + + {{/each}} + + {{/if}} +{{else}} + + Back + + {{#with data.symptom}} + + + {{desc}} + {{#if neutered}} +
    + This symptom has been neutered, and has no effect. It will still affect the virus' statistics. + {{/if}} +
    + + {{level}} + {{resistance}} + {{stealth}} + {{stage_speed}} + {{transmission}} + + + {{{threshold_desc}}} + + {{/with}} +{{/if}} diff --git a/tgui/src/interfaces/smartvend.ract b/tgui/src/interfaces/smartvend.ract new file mode 100644 index 0000000000..ebe02d1235 --- /dev/null +++ b/tgui/src/interfaces/smartvend.ract @@ -0,0 +1,48 @@ + + +{{#partial button}} + {{#if data.isdryer}}{{data.drying ? 'Stop drying' : 'Dry'}}{{/if}} +{{/partial}} +{{#if data.contents.length == 0}} + + Unfortunately, this {{data.name}} is empty. + +{{else}} +
    +
    +
    + Item +
    +
    + Quantity +
    +
    + {{#if data.verb}}{{data.verb}}{{else}}Dispense{{/if}} +
    +
    + {{#each data.contents}} +
    +
    + {{name}} +
    +
    + {{amount}} +
    +
    +
    +
    + = 1) ? null : 'disabled'}} params='{ "name" : {{name}}, "amount" : 1 }' > + One + +
    +
    + 1) ? null : 'disabled'}} params='{ "name" : {{name}} }' > + Many + +
    +
    +
    + {{/each}} +
    +{{/if}} +
    \ No newline at end of file diff --git a/tools/github_webhook_processor.php b/tools/github_webhook_processor.php index 4ccdafa3f3..a915c76ad2 100644 --- a/tools/github_webhook_processor.php +++ b/tools/github_webhook_processor.php @@ -23,6 +23,12 @@ //This is required as otherwise somebody could trick the script into leaking the api key. $hookSecret = '08ajh0qj93209qj90jfq932j32r'; +$trackPRBalance = true; //set this to false to disable PR balance tracking +$prBalanceJson = ''; //Set this to the path you'd like the writable pr balance file to be stored, not setting it writes it to the working directory +$startingPRBalance = 3; //Starting balance for never before seen users +//team 133041: tgstation/commit-access +$maintainer_team_id = 133041; //org team id that is exempt from PR balance system, setting this to null will use anyone with write access to the repo. Get from https://api.github.com/orgs/:org/teams + //Api key for pushing changelogs. $apiKey = '209ab8d879c0f987d06a09b9d879c0f987d06a09b9d8787d0a089c'; @@ -138,7 +144,7 @@ function tag_pr($payload, $opened) { if(strpos($lowertitle, 'refactor') !== FALSE) $tags[] = 'Refactor'; - if(strpos($lowertitle, 'revert') !== FALSE || strpos($lowertitle, 'removes') !== FALSE) + if(strpos(strtolower($title), 'revert') !== FALSE || strpos(strtolower($title), 'removes') !== FALSE) $tags[] = 'Revert/Removal'; } @@ -168,7 +174,7 @@ function tag_pr($payload, $opened) { if(strpos($lowertitle, '[wip]') !== FALSE) $tags[] = 'Work In Progress'; - $url = $payload['pull_request']['base']['repo']['url'] . '/issues/' . $payload['pull_request']['number'] . '/labels'; + $url = $payload['pull_request']['issue_url'] . '/labels'; $existing_labels = file_get_contents($url, false, stream_context_create($scontext)); $existing_labels = json_decode($existing_labels, true); @@ -195,6 +201,12 @@ function handle_pr($payload) { switch ($payload["action"]) { case 'opened': tag_pr($payload, true); + if(get_pr_code_friendliness($payload) < 0){ + $balances = pr_balances(); + $author = $payload['pull_request']['user']['login']; + if(isset($balances[$author]) && $balances[$author] < 0) + create_comment($payload, 'You currently have a negative Fix/Feature pull request delta of ' . $balances[$author] . '. Maintainers may close this PR at will. Fixing issues or improving the codebase will improve this score.'); + } break; case 'edited': case 'synchronize': @@ -210,6 +222,8 @@ function handle_pr($payload) { else { $action = 'merged'; checkchangelog($payload, true, true); + update_pr_balance($payload); + $validated = TRUE; //pr merged events always get announced. } break; default: @@ -223,7 +237,116 @@ function handle_pr($payload) { $msg = '['.$payload['pull_request']['base']['repo']['full_name'].'] Pull Request '.$action.' by '.htmlSpecialChars($payload['sender']['login']).': '.htmlSpecialChars('#'.$payload['pull_request']['number'].' '.$payload['pull_request']['user']['login'].' - '.$payload['pull_request']['title']).''; sendtoallservers('?announce='.urlencode($msg), $payload); +} +//creates a comment on the payload issue +function create_comment($payload, $comment){ + apisend($payload['pull_request']['comments_url'], 'POST', json_encode(array('body' => $comment))); +} + +//returns the payload issue's labels as a flat array +function get_pr_labels_array($payload){ + $url = $payload['pull_request']['issue_url'] . '/labels'; + $issue = json_decode(apisend($url), true); + $result = array(); + foreach($issue as $l) + $result[] = $l['name']; + return $result; +} + +//helper for getting the path the the balance json file +function pr_balance_json_path(){ + global $prBalanceJson; + return $prBalanceJson != '' ? $prBalanceJson : 'pr_balances.json'; +} + +//return the assoc array of login -> balance for prs +function pr_balances(){ + $path = pr_balance_json_path(); + if(file_exists($path)) + return json_decode(file_get_contents($path), true); + else + return array(); +} + +//returns the difference in PR balance a pull request would cause +function get_pr_code_friendliness($payload, $oldbalance = null){ + global $startingPRBalance; + if($oldbalance == null) + $oldbalance = $startingPRBalance; + $labels = get_pr_labels_array($payload); + //anything not in this list defaults to 0 + $label_values = array( + 'Fix' => 2, + 'Refactor' => 2, + 'Code Improvement' => 1, + 'Priority: High' => 4, + 'Priority: CRITICAL' => 5, + 'Atmospherics' => 4, + 'Logging' => 1, + 'Feedback' => 1, + 'Performance' => 3, + 'Feature' => -1, + 'Balance/Rebalance' => -1, + 'Tweak' => -1, + 'PRB: Reset' => $startingPRBalance - $oldbalance, + ); + + $affecting = 0; + $is_neutral = FALSE; + $found_something_positive = false; + foreach($labels as $l){ + if($l == 'PRB: No Update') { //no effect on balance + $affecting = 0; + break; + } + else if(isset($label_values[$l])) { + $friendliness = $label_values[$l]; + if($friendliness > 0) + $found_something_positive = true; + $affecting = $found_something_positive ? max($affecting, $friendliness) : $friendliness; + } + } + return $affecting; +} + +function is_maintainer($payload, $author){ + global $maintainer_team_id; + $repo_is_org = $payload['pull_request']['base']['repo']['owner']['type'] == 'Organization'; + if($maintainer_team_id == null || !$repo_is_org) { + $collaburl = $payload['pull_request']['base']['repo']['collaborators_url'] . '/' . $author . '/permissions'; + $perms = json_decode(apisend($collaburl), true); + $permlevel = $perms['permission']; + return $permlevel == 'admin' || $permlevel == 'write'; + } + else { + $check_url = 'https://api.github.com/teams/' . $maintainer_team_id . '/memberships/' . $author; + $result = json_decode(apisend($check_url), true); + return isset($result['state']); //this field won't be here if they aren't a member + } +} + +//payload is a merged pull request, updates the pr balances file with the correct positive or negative balance based on comments +function update_pr_balance($payload) { + global $startingPRBalance; + global $trackPRBalance; + if(!$trackPRBalance) + return; + $author = $payload['pull_request']['user']['login']; + if(is_maintainer($payload, $author)) //immune + return; + $balances = pr_balances(); + if(!isset($balances[$author])) + $balances[$author] = $startingPRBalance; + $friendliness = get_pr_code_friendliness($payload, $balances[$author]); + $balances[$author] += $friendliness; + if($balances[$author] < 0 && $friendliness < 0) + create_comment($payload, 'Your Fix/Feature pull request delta is currently below zero (' . $balances[$author] . '). Maintainers may close future Feature/Tweak/Balance PRs. Fixing issues or helping to improve the codebase will raise this score.'); + else if($balances[$author] >= 0 && ($balances[$author] - $friendliness) < 0) + create_comment($payload, 'Your Fix/Feature pull request delta is now above zero (' . $balances[$author] . '). Feel free to make Feature/Tweak/Balance PRs.'); + $balances_file = fopen(pr_balance_json_path(), 'w'); + fwrite($balances_file, json_encode($balances)); + fclose($balances_file); } function has_tree_been_edited($payload, $tree){ diff --git a/tools/toolsmerge-upstream-pull-request.sh b/tools/toolsmerge-upstream-pull-request.sh deleted file mode 100755 index 2534e9c55f..0000000000 --- a/tools/toolsmerge-upstream-pull-request.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env bash - -set -u # don't expand unbound variable -set -f # disable pathname expansion -set -C # noclobber - -BASE_PATCH_URL="https://patch-diff.githubusercontent.com/raw/tgstation/tgstation/pull/" -BASE_BRANCH_NAME="upstream-merge-" - -tmpfile=$(mktemp /tmp/git-patch-script.XXXXXX) - -# Ensure the current directory is a git directory -if [ ! -d .git ]; then - echo "Error: must run this script from the root of a git repository" - exit 1 -fi - -# Ensure all given parameters exist -if [ $# -eq 0 ]; then - echo "Error: No arguments have been given, the first argument needs to be a pull ID, the second argument needs to be the commit message" - exit 1 -fi - -# Make sure our temp file exists -if [ ! -f "$tmpfile" ]; then - echo "Error: mktemp failed to create a temporarily file" - exit 1 -fi - -# Ensure wget exists and is available in the current context -type wget >/dev/null 2>&1 || { echo >&2 "Error: This script requires wget, please ensure wget is installed and exists in the current PATH"; exit 1; } - -# Download the patchfile -wget "$BASE_PATCH_URL$1.patch" -q -O "$tmpfile" - -# We need to make sure we are always on a clean master when creating the new branch. -# So we forcefully reset, clean and then checkout the master branch -git fetch -git checkout master -git reset --hard origin/master -git clean -f - -# Remove the other branches -git branch | grep -v "master" | xargs git branch -D - -# Create a new branch -git checkout -b "$BASE_BRANCH_NAME$1" - -# Apply the patch on top of this new branch -git apply --reject --ignore-space-change --ignore-whitespace "$tmpfile" - -# Add all files onto this branch -git add -A . - -# Commit these changes -git commit -m "$2" - -# Push them onto the branch -git push -u origin "$BASE_BRANCH_NAME$1" - -# Remove the temp file -rm "$tmpfile" \ No newline at end of file