diff --git a/SQL/database_changelog.txt b/SQL/database_changelog.txt index ce5c2c654d..7063273378 100644 --- a/SQL/database_changelog.txt +++ b/SQL/database_changelog.txt @@ -1,3 +1,52 @@ +Any time you make a change to the schema files, remember to increment the database schema version. Generally increment the minor number, major should be reserved for significant changes to the schema. Both values go up to 255. + +The latest database version is 3.4; The query to update the schema revision table is: + +INSERT INTO `schema_revision` (`major`, `minor`) VALUES (3, 4); +or +INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (3, 4); + +In any query remember to add a prefix to the table names if you use one. + +---------------------------------------------------- + +28 August 2017, by MrStonedOne +Modified table 'messages', adding a deleted column and editing all indexes to include it + +ALTER TABLE `messages` +ADD COLUMN `deleted` tinyint(1) unsigned NOT NULL DEFAULT '0' AFTER `edits`, +DROP INDEX `idx_msg_ckey_time`, +DROP INDEX `idx_msg_type_ckeys_time`, +DROP INDEX `idx_msg_type_ckey_time_odr`, +ADD INDEX `idx_msg_ckey_time` (`targetckey`,`timestamp`, `deleted`), +ADD INDEX `idx_msg_type_ckeys_time` (`type`,`targetckey`,`adminckey`,`timestamp`, `deleted`), +ADD INDEX `idx_msg_type_ckey_time_odr` (`type`,`targetckey`,`timestamp`, `deleted`); + +---------------------------------------------------- + +25 August 2017, by Jordie0608 + +Modified tables 'connection_log', 'legacy_population', 'library', 'messages' and 'player' to add additional 'round_id' tracking in various forms and 'server_ip' and 'server_port' to the table 'messages'. + +ALTER TABLE `connection_log` ADD COLUMN `round_id` INT(11) UNSIGNED NOT NULL AFTER `server_port`; +ALTER TABLE `legacy_population` ADD COLUMN `round_id` INT(11) UNSIGNED NOT NULL AFTER `server_port`; +ALTER TABLE `library` ADD COLUMN `round_id_created` INT(11) UNSIGNED NOT NULL AFTER `deleted`; +ALTER TABLE `messages` ADD COLUMN `server_ip` INT(10) UNSIGNED NOT NULL AFTER `server`, ADD COLUMN `server_port` SMALLINT(5) UNSIGNED NOT NULL AFTER `server_ip`, ADD COLUMN `round_id` INT(11) UNSIGNED NOT NULL AFTER `server_port`; +ALTER TABLE `player` ADD COLUMN `firstseen_round_id` INT(11) UNSIGNED NOT NULL AFTER `firstseen`, ADD COLUMN `lastseen_round_id` INT(11) UNSIGNED NOT NULL AFTER `lastseen`; + +---------------------------------------------------- + +18 August 2017, by Cyberboss and nfreader + +Modified table 'death', adding the columns `last_words` and 'suicide'. + +ALTER TABLE `death` +ADD COLUMN `last_words` varchar(255) DEFAULT NULL AFTER `staminaloss`, +ADD COLUMN `suicide` tinyint(0) NOT NULL DEFAULT '0' AFTER `last_words`; + +Remember to add a prefix to the table name if you use them. + +---------------------------------------------------- 20th July 2017, by Shadowlight213 Added role_time table to track time spent playing departments. @@ -7,21 +56,10 @@ CREATE TABLE `role_time` ( `ckey` VARCHAR(32) NOT NULL , `job` VARCHAR(128) NOT 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? @@ -326,4 +364,4 @@ UPDATE erro_library SET deleted = 1 WHERE id = someid (Replace someid with the id of the book you want to soft delete.) ----------------------------------------------------- +---------------------------------------------------- \ No newline at end of file diff --git a/SQL/errofreedatabase.sql b/SQL/errofreedatabase.sql index 7f23fcc861..7d6ea4561c 100644 --- a/SQL/errofreedatabase.sql +++ b/SQL/errofreedatabase.sql @@ -12,4 +12,4 @@ ALTER TABLE erro_poll_option RENAME TO SS13_poll_option; ALTER TABLE erro_poll_question RENAME TO SS13_poll_question; ALTER TABLE erro_poll_textreply RENAME TO SS13_poll_textreply; ALTER TABLE erro_poll_vote RENAME TO SS13_poll_vote; -ALTER TABLE erro_watch RENAME TO SS13_watch; +ALTER TABLE erro_watch RENAME TO SS13_watch; \ No newline at end of file diff --git a/SQL/optimisations_2017-02-19.sql b/SQL/optimisations_2017-02-19.sql index 674cbcf9c6..b9017497ed 100644 --- a/SQL/optimisations_2017-02-19.sql +++ b/SQL/optimisations_2017-02-19.sql @@ -38,7 +38,7 @@ Take note some columns have been renamed, removed or changed type. Any services ----------------------------------------------------*/ START TRANSACTION; -ALTER TABLE `feedback`.`ban` +ALTER TABLE `ban` DROP COLUMN `rounds` , CHANGE COLUMN `bantype` `bantype` ENUM('PERMABAN', 'TEMPBAN', 'JOB_PERMABAN', 'JOB_TEMPBAN', 'ADMIN_PERMABAN', 'ADMIN_TEMPBAN') NOT NULL , CHANGE COLUMN `reason` `reason` VARCHAR(2048) NOT NULL @@ -51,14 +51,14 @@ ALTER TABLE `feedback`.`ban` , ADD COLUMN `a_ipTEMP` INT UNSIGNED NOT NULL AFTER `a_ip` , ADD COLUMN `unbanned_ipTEMP` INT UNSIGNED NULL DEFAULT NULL AFTER `unbanned_ip`; SET SQL_SAFE_UPDATES = 0; -UPDATE `feedback`.`ban` +UPDATE `ban` SET `server_ip` = INET_ATON(SUBSTRING_INDEX(IF(`serverip` = '', '0', IF(SUBSTRING_INDEX(`serverip`, ':', 1) LIKE '%_._%', `serverip`, '0')), ':', 1)) , `server_port` = IF(`serverip` LIKE '%:_%', CAST(SUBSTRING_INDEX(`serverip`, ':', -1) AS UNSIGNED), '0') , `ipTEMP` = INET_ATON(IF(`ip` LIKE '%_._%', `ip`, '0')) , `a_ipTEMP` = INET_ATON(IF(`a_ip` LIKE '%_._%', `a_ip`, '0')) , `unbanned_ipTEMP` = INET_ATON(IF(`unbanned_ip` LIKE '%_._%', `unbanned_ip`, '0')); SET SQL_SAFE_UPDATES = 1; -ALTER TABLE `feedback`.`ban` +ALTER TABLE `ban` DROP COLUMN `unbanned_ip` , DROP COLUMN `a_ip` , DROP COLUMN `ip` @@ -69,17 +69,17 @@ ALTER TABLE `feedback`.`ban` COMMIT; START TRANSACTION; -ALTER TABLE `feedback`.`connection_log` +ALTER TABLE `connection_log` ADD COLUMN `server_ip` INT UNSIGNED NOT NULL AFTER `serverip` , ADD COLUMN `server_port` SMALLINT UNSIGNED NOT NULL AFTER `server_ip` , ADD COLUMN `ipTEMP` INT UNSIGNED NOT NULL AFTER `ip`; SET SQL_SAFE_UPDATES = 0; -UPDATE `feedback`.`connection_log` +UPDATE `connection_log` SET `server_ip` = INET_ATON(SUBSTRING_INDEX(IF(`serverip` = '', '0', IF(SUBSTRING_INDEX(`serverip`, ':', 1) LIKE '%_._%', `serverip`, '0')), ':', 1)) , `server_port` = IF(`serverip` LIKE '%:_%', CAST(SUBSTRING_INDEX(`serverip`, ':', -1) AS UNSIGNED), '0') , `ipTEMP` = INET_ATON(IF(`ip` LIKE '%_._%', `ip`, '0')); SET SQL_SAFE_UPDATES = 1; -ALTER TABLE `feedback`.`connection_log` +ALTER TABLE `connection_log` DROP COLUMN `ip` , DROP COLUMN `serverip` , CHANGE COLUMN `ipTEMP` `ip` INT(10) UNSIGNED NOT NULL; @@ -87,12 +87,12 @@ COMMIT; START TRANSACTION; SET SQL_SAFE_UPDATES = 0; -UPDATE `feedback`.`death` +UPDATE `death` SET `bruteloss` = LEAST(`bruteloss`, 65535) , `brainloss` = LEAST(`brainloss`, 65535) , `fireloss` = LEAST(`fireloss`, 65535) , `oxyloss` = LEAST(`oxyloss`, 65535); -ALTER TABLE `feedback`.`death` +ALTER TABLE `death` CHANGE COLUMN `pod` `pod` VARCHAR(50) NOT NULL , CHANGE COLUMN `coord` `coord` VARCHAR(32) NOT NULL , CHANGE COLUMN `mapname` `mapname` VARCHAR(32) NOT NULL @@ -109,39 +109,39 @@ ALTER TABLE `feedback`.`death` , CHANGE COLUMN `oxyloss` `oxyloss` SMALLINT UNSIGNED NOT NULL , ADD COLUMN `server_ip` INT UNSIGNED NOT NULL AFTER `server` , ADD COLUMN `server_port` SMALLINT UNSIGNED NOT NULL AFTER `server_ip`; -UPDATE `feedback`.`death` +UPDATE `death` SET `server_ip` = INET_ATON(SUBSTRING_INDEX(IF(`server` = '', '0', IF(SUBSTRING_INDEX(`server`, ':', 1) LIKE '%_._%', `server`, '0')), ':', 1)) , `server_port` = IF(`server` LIKE '%:_%', CAST(SUBSTRING_INDEX(`server`, ':', -1) AS UNSIGNED), '0'); SET SQL_SAFE_UPDATES = 1; -ALTER TABLE `feedback`.`death` +ALTER TABLE `death` DROP COLUMN `server`; COMMIT; -ALTER TABLE `feedback`.`library` +ALTER TABLE `library` CHANGE COLUMN `category` `category` ENUM('Any', 'Fiction', 'Non-Fiction', 'Adult', 'Reference', 'Religion') NOT NULL , CHANGE COLUMN `ckey` `ckey` VARCHAR(32) NOT NULL DEFAULT 'LEGACY' , CHANGE COLUMN `datetime` `datetime` DATETIME NOT NULL , CHANGE COLUMN `deleted` `deleted` TINYINT(1) UNSIGNED NULL DEFAULT NULL; -ALTER TABLE `feedback`.`messages` +ALTER TABLE `messages` CHANGE COLUMN `type` `type` ENUM('memo', 'message', 'message sent', 'note', 'watchlist entry') NOT NULL , CHANGE COLUMN `text` `text` VARCHAR(2048) NOT NULL , CHANGE COLUMN `secret` `secret` TINYINT(1) UNSIGNED NOT NULL; START TRANSACTION; -ALTER TABLE `feedback`.`player` +ALTER TABLE `player` ADD COLUMN `ipTEMP` INT UNSIGNED NOT NULL AFTER `ip`; SET SQL_SAFE_UPDATES = 0; -UPDATE `feedback`.`player` +UPDATE `player` SET `ipTEMP` = INET_ATON(IF(`ip` LIKE '%_._%', `ip`, '0')); SET SQL_SAFE_UPDATES = 1; -ALTER TABLE `feedback`.`player` +ALTER TABLE `player` DROP COLUMN `ip` , CHANGE COLUMN `ipTEMP` `ip` INT(10) UNSIGNED NOT NULL; COMMIT; START TRANSACTION; -ALTER TABLE `feedback`.`poll_question` +ALTER TABLE `poll_question` CHANGE COLUMN `polltype` `polltype` ENUM('OPTION', 'TEXT', 'NUMVAL', 'MULTICHOICE', 'IRV') NOT NULL , CHANGE COLUMN `adminonly` `adminonly` TINYINT(1) UNSIGNED NOT NULL , CHANGE COLUMN `createdby_ckey` `createdby_ckey` VARCHAR(32) NULL DEFAULT NULL @@ -149,36 +149,36 @@ ALTER TABLE `feedback`.`poll_question` , ADD COLUMN `createdby_ipTEMP` INT UNSIGNED NOT NULL AFTER `createdby_ip` , DROP COLUMN `for_trialmin`; SET SQL_SAFE_UPDATES = 0; -UPDATE `feedback`.`poll_question` +UPDATE `poll_question` SET `createdby_ipTEMP` = INET_ATON(IF(`createdby_ip` LIKE '%_._%', `createdby_ip`, '0')); SET SQL_SAFE_UPDATES = 1; -ALTER TABLE `feedback`.`poll_question` +ALTER TABLE `poll_question` DROP COLUMN `createdby_ip` , CHANGE COLUMN `createdby_ipTEMP` `createdby_ip` INT(10) UNSIGNED NOT NULL; COMMIT; START TRANSACTION; -ALTER TABLE `feedback`.`poll_textreply` +ALTER TABLE `poll_textreply` CHANGE COLUMN `replytext` `replytext` VARCHAR(2048) NOT NULL , ADD COLUMN `ipTEMP` INT UNSIGNED NOT NULL AFTER `ip`; SET SQL_SAFE_UPDATES = 0; -UPDATE `feedback`.`poll_textreply` +UPDATE `poll_textreply` SET `ipTEMP` = INET_ATON(IF(`ip` LIKE '%_._%', `ip`, '0')); SET SQL_SAFE_UPDATES = 1; -ALTER TABLE `feedback`.`poll_textreply` +ALTER TABLE `poll_textreply` DROP COLUMN `ip` , CHANGE COLUMN `ipTEMP` `ip` INT(10) UNSIGNED NOT NULL; COMMIT; START TRANSACTION; -ALTER TABLE `feedback`.`poll_vote` +ALTER TABLE `poll_vote` CHANGE COLUMN `ckey` `ckey` VARCHAR(32) NOT NULL , ADD COLUMN `ipTEMP` INT UNSIGNED NOT NULL AFTER `ip`; SET SQL_SAFE_UPDATES = 0; -UPDATE `feedback`.`poll_vote` +UPDATE `poll_vote` SET `ipTEMP` = INET_ATON(IF(`ip` LIKE '%_._%', `ip`, '0')); SET SQL_SAFE_UPDATES = 1; -ALTER TABLE `feedback`.`poll_vote` +ALTER TABLE `poll_vote` DROP COLUMN `ip` , CHANGE COLUMN `ipTEMP` `ip` INT(10) UNSIGNED NOT NULL; COMMIT; @@ -191,39 +191,39 @@ You may find it helpful to modify or create your own indexes if you utilise addi ----------------------------------------------------*/ -ALTER TABLE `feedback`.`ban` +ALTER TABLE `ban` ADD INDEX `idx_ban_checkban` (`ckey` ASC, `bantype` ASC, `expiration_time` ASC, `unbanned` ASC, `job` ASC) , ADD INDEX `idx_ban_isbanned` (`ckey` ASC, `ip` ASC, `computerid` ASC, `bantype` ASC, `expiration_time` ASC, `unbanned` ASC) , ADD INDEX `idx_ban_count` (`id` ASC, `a_ckey` ASC, `bantype` ASC, `expiration_time` ASC, `unbanned` ASC); -ALTER TABLE `feedback`.`ipintel` +ALTER TABLE `ipintel` ADD INDEX `idx_ipintel` (`ip` ASC, `intel` ASC, `date` ASC); -ALTER TABLE `feedback`.`library` +ALTER TABLE `library` ADD INDEX `idx_lib_id_del` (`id` ASC, `deleted` ASC) , ADD INDEX `idx_lib_del_title` (`deleted` ASC, `title` ASC) , ADD INDEX `idx_lib_search` (`deleted` ASC, `author` ASC, `title` ASC, `category` ASC); -ALTER TABLE `feedback`.`messages` +ALTER TABLE `messages` ADD INDEX `idx_msg_ckey_time` (`targetckey` ASC, `timestamp` ASC) , ADD INDEX `idx_msg_type_ckeys_time` (`type` ASC, `targetckey` ASC, `adminckey` ASC, `timestamp` ASC) , ADD INDEX `idx_msg_type_ckey_time_odr` (`type` ASC, `targetckey` ASC, `timestamp` ASC); -ALTER TABLE `feedback`.`player` +ALTER TABLE `player` ADD INDEX `idx_player_cid_ckey` (`computerid` ASC, `ckey` ASC) , ADD INDEX `idx_player_ip_ckey` (`ip` ASC, `ckey` ASC); -ALTER TABLE `feedback`.`poll_option` +ALTER TABLE `poll_option` ADD INDEX `idx_pop_pollid` (`pollid` ASC); -ALTER TABLE `feedback`.`poll_question` +ALTER TABLE `poll_question` ADD INDEX `idx_pquest_question_time_ckey` (`question` ASC, `starttime` ASC, `endtime` ASC, `createdby_ckey` ASC, `createdby_ip` ASC) , ADD INDEX `idx_pquest_time_admin` (`starttime` ASC, `endtime` ASC, `adminonly` ASC) , ADD INDEX `idx_pquest_id_time_type_admin` (`id` ASC, `starttime` ASC, `endtime` ASC, `polltype` ASC, `adminonly` ASC); -ALTER TABLE `feedback`.`poll_vote` +ALTER TABLE `poll_vote` ADD INDEX `idx_pvote_pollid_ckey` (`pollid` ASC, `ckey` ASC) , ADD INDEX `idx_pvote_optionid_ckey` (`optionid` ASC, `ckey` ASC); -ALTER TABLE `feedback`.`poll_textreply` - ADD INDEX `idx_ptext_pollid_ckey` (`pollid` ASC, `ckey` ASC); +ALTER TABLE `poll_textreply` + ADD INDEX `idx_ptext_pollid_ckey` (`pollid` ASC, `ckey` ASC); \ No newline at end of file diff --git a/SQL/tgstation_schema.sql b/SQL/tgstation_schema.sql index 9795b90672..1edd5ad12b 100644 --- a/SQL/tgstation_schema.sql +++ b/SQL/tgstation_schema.sql @@ -110,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, @@ -148,6 +149,8 @@ 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 */; @@ -200,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 */; @@ -220,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`), @@ -243,13 +248,17 @@ 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, + `deleted` tinyint(1) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`), - KEY `idx_msg_ckey_time` (`targetckey`,`timestamp`), - KEY `idx_msg_type_ckeys_time` (`type`,`targetckey`,`adminckey`,`timestamp`), - KEY `idx_msg_type_ckey_time_odr` (`type`,`targetckey`,`timestamp`) + KEY `idx_msg_ckey_time` (`targetckey`,`timestamp`, `deleted`), + KEY `idx_msg_type_ckeys_time` (`type`,`targetckey`,`adminckey`,`timestamp`, `deleted`), + KEY `idx_msg_type_ckey_time_odr` (`type`,`targetckey`,`timestamp`, `deleted`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; @@ -278,7 +287,9 @@ 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', @@ -420,4 +431,4 @@ CREATE TABLE `schema_revision` ( /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; \ No newline at end of file diff --git a/SQL/tgstation_schema.sql.rej b/SQL/tgstation_schema.sql.rej deleted file mode 100644 index 51068bed4e..0000000000 --- a/SQL/tgstation_schema.sql.rej +++ /dev/null @@ -1,9 +0,0 @@ -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 b810a82ca3..72045e50fb 100644 --- a/SQL/tgstation_schema_prefixed.sql +++ b/SQL/tgstation_schema_prefixed.sql @@ -31,7 +31,7 @@ CREATE TABLE `SS13_admin` ( -- Table structure for table `SS13_admin_log` -- -DROP TABLE IF EXISTS `SS13_dmin_log`; +DROP TABLE IF EXISTS `SS13_admin_log`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `SS13_admin_log` ( @@ -110,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, @@ -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,13 +248,17 @@ 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, + `deleted` tinyint(1) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`), - KEY `idx_msg_ckey_time` (`targetckey`,`timestamp`), - KEY `idx_msg_type_ckeys_time` (`type`,`targetckey`,`adminckey`,`timestamp`), - KEY `idx_msg_type_ckey_time_odr` (`type`,`targetckey`,`timestamp`) + KEY `idx_msg_ckey_time` (`targetckey`,`timestamp`, `deleted`), + KEY `idx_msg_type_ckeys_time` (`type`,`targetckey`,`adminckey`,`timestamp`, `deleted`), + KEY `idx_msg_type_ckey_time_odr` (`type`,`targetckey`,`timestamp`, `deleted`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; @@ -278,7 +287,9 @@ 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', @@ -420,4 +431,4 @@ CREATE TABLE `SS13_schema_revision` ( /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; \ No newline at end of file diff --git a/SQL/tgstation_schema_prefixed.sql.rej b/SQL/tgstation_schema_prefixed.sql.rej deleted file mode 100644 index dd4bc6a7f5..0000000000 --- a/SQL/tgstation_schema_prefixed.sql.rej +++ /dev/null @@ -1,9 +0,0 @@ -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/LavaRuins/lavaland_surface_golem_ship.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_golem_ship.dmm index eba45a14bf..3b4e4ce09e 100644 --- a/_maps/RandomRuins/LavaRuins/lavaland_surface_golem_ship.dmm +++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_golem_ship.dmm @@ -7,6 +7,9 @@ /area/ruin/powered/golem_ship) "c" = ( /obj/structure/closet/crate, +/obj/item/shovel, +/obj/item/shovel, +/obj/item/shovel, /obj/item/pickaxe, /obj/item/pickaxe, /obj/item/pickaxe, @@ -19,6 +22,8 @@ /area/ruin/powered/golem_ship) "d" = ( /obj/structure/closet/crate, +/obj/item/shovel, +/obj/item/shovel, /obj/item/pickaxe, /obj/item/pickaxe, /obj/item/storage/bag/ore, diff --git a/_maps/RandomRuins/LavaRuins/lavaland_surface_syndicate_base1.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_syndicate_base1.dmm index a004ba7a9d..3c7cb364c6 100644 --- a/_maps/RandomRuins/LavaRuins/lavaland_surface_syndicate_base1.dmm +++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_syndicate_base1.dmm @@ -694,8 +694,8 @@ /area/ruin/powered/syndicate_lava_base) "bJ" = ( /obj/structure/table/reinforced, -/obj/item/gun/ballistic/automatic/c20r/toy/unrestricted, -/obj/item/gun/ballistic/automatic/c20r/toy/unrestricted, +/obj/item/gun/ballistic/automatic/c20r/toy/unrestricted/riot, +/obj/item/gun/ballistic/automatic/c20r/toy/unrestricted/riot, /turf/open/floor/plasteel/vault{ dir = 8 }, 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..f667074c38 100644 --- a/_maps/RandomRuins/SpaceRuins/bigderelict1.dmm +++ b/_maps/RandomRuins/SpaceRuins/bigderelict1.dmm @@ -67,7 +67,7 @@ /area/ruin/space/has_grav/derelictoutpost/cargobay) "ao" = ( /obj/machinery/power/apc{ - cell_type = 0; + start_charge = 0; dir = 4; name = "Cargo Bay APC"; pixel_x = 24 @@ -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 @@ -754,7 +749,7 @@ /area/ruin/space/has_grav/derelictoutpost/powerstorage) "ca" = ( /obj/machinery/power/apc{ - cell_type = 0; + start_charge = 0; dir = 4; name = "Power Storage APC"; pixel_x = 23; @@ -850,7 +845,7 @@ /area/ruin/space/has_grav/derelictoutpost) "ck" = ( /obj/machinery/power/apc{ - cell_type = 0; + start_charge = 0; dir = 2; name = "Tradepost APC"; pixel_y = -24 @@ -2011,7 +2006,7 @@ /area/ruin/space/has_grav/derelictoutpost/cargostorage) "el" = ( /obj/machinery/power/apc{ - cell_type = 0; + start_charge = 0; dir = 4; name = "Cargo Storage APC"; pixel_x = 24 @@ -3912,4 +3907,4 @@ aa aa aa aa -"} +"} \ No newline at end of file diff --git a/_maps/RandomRuins/SpaceRuins/caravanambush.dmm b/_maps/RandomRuins/SpaceRuins/caravanambush.dmm index 43cd290ca0..d2a416bba2 100644 --- a/_maps/RandomRuins/SpaceRuins/caravanambush.dmm +++ b/_maps/RandomRuins/SpaceRuins/caravanambush.dmm @@ -815,8 +815,8 @@ /area/ruin/unpowered) "cC" = ( /obj/structure/closet/crate/secure/weapon, -/obj/item/gun/ballistic/automatic/c20r/toy/unrestricted, -/obj/item/gun/ballistic/automatic/c20r/toy/unrestricted, +/obj/item/gun/ballistic/automatic/c20r/toy/unrestricted/riot, +/obj/item/gun/ballistic/automatic/c20r/toy/unrestricted/riot, /turf/open/floor/mineral/titanium/yellow/airless, /area/ruin/unpowered) "cD" = ( diff --git a/_maps/RandomRuins/SpaceRuins/deepstorage.dmm b/_maps/RandomRuins/SpaceRuins/deepstorage.dmm index 7a146f0988..6eae7dd6e1 100644 --- a/_maps/RandomRuins/SpaceRuins/deepstorage.dmm +++ b/_maps/RandomRuins/SpaceRuins/deepstorage.dmm @@ -1096,8 +1096,7 @@ d2 = 8; icon_state = "0-8" }, -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 4; name = "Hydroponics APC"; pixel_x = 24 @@ -1466,8 +1465,7 @@ /area/ruin/space/has_grav/deepstorage) "cQ" = ( /obj/structure/cable/yellow, -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 4; name = "Storage APC"; pixel_x = 24 @@ -2260,8 +2258,7 @@ d2 = 8; icon_state = "0-8" }, -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 4; name = "Armory APC"; pixel_x = 24 @@ -3085,8 +3082,7 @@ "fE" = ( /obj/machinery/atmospherics/pipe/simple/supplymain/hidden, /obj/structure/cable/yellow, -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 4; name = "Dormory APC"; pixel_x = 24 @@ -6625,4 +6621,4 @@ aa aa aa aa -"} +"} \ No newline at end of file diff --git a/_maps/RandomRuins/SpaceRuins/gasthelizards.dmm b/_maps/RandomRuins/SpaceRuins/gasthelizards.dmm index 75ba049548..6396cda06f 100644 --- a/_maps/RandomRuins/SpaceRuins/gasthelizards.dmm +++ b/_maps/RandomRuins/SpaceRuins/gasthelizards.dmm @@ -174,7 +174,6 @@ dir = 1 }, /obj/machinery/power/apc{ - cell_type = 2500; dir = 1; name = "Worn-out APC"; pixel_x = 1; diff --git a/_maps/RandomRuins/SpaceRuins/gondolaasteroid.dmm b/_maps/RandomRuins/SpaceRuins/gondolaasteroid.dmm new file mode 100644 index 0000000000..b7a5910b1e --- /dev/null +++ b/_maps/RandomRuins/SpaceRuins/gondolaasteroid.dmm @@ -0,0 +1,1382 @@ +//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE +"a" = ( +/turf/template_noop, +/area/template_noop) +"b" = ( +/turf/closed/mineral/random, +/area/ruin/space/has_grav) +"c" = ( +/turf/open/floor/plating/asteroid/airless, +/area/ruin/space/has_grav) +"d" = ( +/obj/structure/marker_beacon{ + light_color = "#FFE8AA"; + light_range = 20 + }, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/space/has_grav) +"e" = ( +/obj/structure/flora/ausbushes/fullgrass, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/space/has_grav) +"f" = ( +/obj/structure/flora/ausbushes/ywflowers, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/space/has_grav) +"g" = ( +/turf/open/floor/plating/asteroid/airless, +/area/ruin/space/has_grav{ + dynamic_lighting = 1 + }) +"h" = ( +/mob/living/simple_animal/pet/gondola, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/space/has_grav) +"i" = ( +/obj/structure/flora/ausbushes/sparsegrass, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/space/has_grav) +"j" = ( +/obj/effect/overlay/coconut, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/space/has_grav) +"k" = ( +/obj/effect/overlay/palmtree_l, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/space/has_grav) +"l" = ( +/obj/structure/flora/ausbushes/stalkybush, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/space/has_grav) +"m" = ( +/obj/structure/flora/ausbushes/grassybush, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/space/has_grav) +"n" = ( +/obj/structure/flora/ausbushes/reedbush, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/space/has_grav) +"o" = ( +/obj/structure/flora/ausbushes/lavendergrass, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/space/has_grav) +"p" = ( +/obj/structure/flora/ausbushes/brflowers, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/space/has_grav) +"q" = ( +/obj/structure/flora/ausbushes/fernybush, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/space/has_grav) +"r" = ( +/obj/effect/overlay/palmtree_r, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/space/has_grav) +"s" = ( +/obj/structure/flora/junglebush/large, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/space/has_grav) +"t" = ( +/obj/structure/flora/ausbushes/sunnybush, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/space/has_grav) +"u" = ( +/obj/machinery/door/airlock/survival_pod/vertical, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/space/has_grav) + +(1,1,1) = {" +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +b +b +b +b +b +b +a +a +a +"} +(2,1,1) = {" +a +a +a +a +b +b +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +b +b +b +b +b +b +b +b +b +a +a +"} +(3,1,1) = {" +a +a +b +b +b +b +b +a +a +a +a +a +a +a +a +a +a +a +a +b +b +b +b +b +b +b +b +b +b +b +b +b +b +b +c +"} +(4,1,1) = {" +a +b +b +b +b +a +a +a +a +a +a +a +a +a +a +b +b +b +b +b +b +b +b +b +b +b +b +b +b +c +b +b +b +b +b +"} +(5,1,1) = {" +a +b +b +b +a +a +a +a +a +a +a +a +a +a +b +b +b +b +b +b +b +b +b +b +b +c +c +c +c +c +c +c +b +b +b +"} +(6,1,1) = {" +a +a +a +a +a +a +a +a +a +b +b +b +b +b +b +b +b +b +b +b +b +b +b +c +c +c +c +f +c +c +c +h +c +b +b +"} +(7,1,1) = {" +a +a +a +a +a +a +a +a +b +b +b +b +b +b +b +b +b +b +b +b +b +c +c +c +c +o +c +r +c +b +b +b +b +b +c +"} +(8,1,1) = {" +a +a +a +a +a +a +b +b +b +b +b +b +b +b +b +b +c +b +c +c +c +c +c +c +c +c +j +c +c +c +c +b +b +b +c +"} +(9,1,1) = {" +a +a +a +a +a +b +b +b +b +b +b +b +b +c +k +c +c +q +c +c +j +c +c +k +c +c +c +c +m +c +c +b +b +b +c +"} +(10,1,1) = {" +a +a +a +b +b +b +b +b +b +b +b +b +b +b +b +c +c +c +c +c +s +c +c +c +c +c +c +i +c +c +c +b +b +b +c +"} +(11,1,1) = {" +a +a +b +b +b +b +b +b +b +b +b +b +b +b +c +i +n +f +c +c +d +c +c +j +c +h +c +l +c +d +c +b +b +b +c +"} +(12,1,1) = {" +a +a +b +b +b +b +b +b +b +b +b +b +c +c +c +c +o +o +c +h +c +c +c +c +c +c +c +i +o +c +c +b +b +b +c +"} +(13,1,1) = {" +a +b +b +b +b +b +b +b +b +b +b +b +c +c +c +c +i +c +q +c +c +c +c +c +c +s +c +c +c +c +b +b +b +b +c +"} +(14,1,1) = {" +a +b +b +b +b +b +b +b +b +b +b +h +c +c +c +c +l +c +c +c +m +i +c +c +c +c +c +c +c +b +b +b +b +b +c +"} +(15,1,1) = {" +a +b +b +b +b +b +b +b +b +b +b +b +b +b +b +c +c +c +c +c +i +o +c +c +c +c +c +c +c +c +b +b +b +b +c +"} +(16,1,1) = {" +a +b +b +b +b +b +b +b +b +b +b +b +b +b +b +b +b +c +c +c +o +p +c +c +c +c +r +c +c +c +c +b +b +b +c +"} +(17,1,1) = {" +a +b +b +b +b +b +b +b +b +b +b +b +b +b +b +b +b +b +c +e +n +c +c +c +c +c +c +c +c +c +c +c +b +b +c +"} +(18,1,1) = {" +a +b +b +b +b +b +b +b +b +b +c +e +c +b +b +b +b +b +c +c +c +c +c +c +i +t +c +c +c +i +c +c +b +b +b +"} +(19,1,1) = {" +a +b +b +b +b +b +b +b +b +g +c +c +c +c +c +b +b +b +b +c +r +j +c +c +c +f +c +c +c +c +c +c +u +c +u +"} +(20,1,1) = {" +a +c +b +b +b +b +b +b +b +h +c +c +d +c +c +c +c +c +c +c +c +c +c +c +c +c +c +c +c +c +c +b +b +b +b +"} +(21,1,1) = {" +a +c +c +b +b +b +b +b +b +c +c +c +k +c +i +i +c +c +q +c +c +c +c +c +d +c +h +c +c +c +c +c +b +b +b +"} +(22,1,1) = {" +a +c +c +b +b +b +b +b +b +c +c +c +c +c +c +l +c +c +c +c +c +c +c +c +c +c +c +c +c +r +c +c +b +b +b +"} +(23,1,1) = {" +a +c +c +b +b +b +b +b +b +c +c +j +c +c +c +c +c +c +c +c +c +h +s +c +c +c +s +c +c +c +c +c +b +b +b +"} +(24,1,1) = {" +a +a +c +c +b +b +b +b +e +c +c +c +c +c +h +c +c +c +c +c +c +c +c +c +m +c +c +c +c +c +c +c +b +b +b +"} +(25,1,1) = {" +a +a +c +c +b +b +b +c +c +c +c +c +c +c +c +c +i +l +c +c +c +c +c +c +n +m +c +c +c +c +c +b +b +b +a +"} +(26,1,1) = {" +a +a +c +c +b +b +b +c +c +c +c +c +c +c +c +m +p +i +c +f +c +c +c +c +c +c +k +c +c +j +c +b +b +b +a +"} +(27,1,1) = {" +a +a +c +c +b +b +b +b +c +c +c +c +c +c +c +c +c +c +c +d +m +i +c +c +c +c +c +c +c +c +b +b +b +a +a +"} +(28,1,1) = {" +a +a +a +c +c +b +b +b +c +c +c +c +c +e +c +c +c +c +c +c +i +l +p +c +c +c +c +c +c +b +b +b +b +a +a +"} +(29,1,1) = {" +a +a +a +c +c +b +b +c +c +c +e +c +c +c +c +c +c +c +c +c +c +c +c +c +c +i +c +c +c +b +b +b +c +c +a +"} +(30,1,1) = {" +a +a +a +c +b +b +c +d +f +c +i +c +c +c +b +c +c +c +c +c +j +c +c +c +c +c +c +c +b +b +b +c +c +c +a +"} +(31,1,1) = {" +a +a +a +b +b +b +b +c +c +c +c +c +c +b +b +b +c +c +c +r +c +c +c +c +c +c +b +b +b +b +c +c +c +b +b +"} +(32,1,1) = {" +a +a +a +b +b +b +c +c +c +c +c +c +b +b +b +b +b +b +b +b +b +b +b +b +b +b +b +b +b +b +c +c +b +b +b +"} +(33,1,1) = {" +a +a +a +b +b +c +c +c +c +b +b +b +b +b +b +b +b +b +b +b +b +b +b +b +b +b +b +b +b +a +a +b +b +b +a +"} +(34,1,1) = {" +a +a +a +b +b +b +b +b +b +b +b +b +b +b +c +c +c +c +c +b +b +b +b +b +a +a +a +a +a +a +a +b +b +b +a +"} +(35,1,1) = {" +a +a +a +a +b +b +b +b +b +b +b +b +b +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +"} diff --git a/_maps/RandomRuins/SpaceRuins/oldAIsat.dmm b/_maps/RandomRuins/SpaceRuins/oldAIsat.dmm index 864621b1df..193242e689 100644 --- a/_maps/RandomRuins/SpaceRuins/oldAIsat.dmm +++ b/_maps/RandomRuins/SpaceRuins/oldAIsat.dmm @@ -44,7 +44,6 @@ /area/tcommsat/chamber) "ak" = ( /obj/machinery/power/apc{ - cell_type = 2500; dir = 1; name = "Worn-out APC"; pixel_x = 1; diff --git a/_maps/RandomRuins/SpaceRuins/onehalf.dmm b/_maps/RandomRuins/SpaceRuins/onehalf.dmm index 237407f3e5..16d0d80887 100644 --- a/_maps/RandomRuins/SpaceRuins/onehalf.dmm +++ b/_maps/RandomRuins/SpaceRuins/onehalf.dmm @@ -350,7 +350,6 @@ icon_state = "0-8" }, /obj/machinery/power/apc{ - cell_type = 2500; dir = 1; name = "Mining Drone Bay APC"; pixel_y = 24 @@ -848,7 +847,6 @@ d2 = 4 }, /obj/machinery/power/apc{ - cell_type = 2500; dir = 1; name = "Bridge APC"; pixel_y = 24 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/RandomRuins/SpaceRuins/spacehotel.dmm b/_maps/RandomRuins/SpaceRuins/spacehotel.dmm index d1f7f178fc..f577cbbf37 100644 --- a/_maps/RandomRuins/SpaceRuins/spacehotel.dmm +++ b/_maps/RandomRuins/SpaceRuins/spacehotel.dmm @@ -655,8 +655,7 @@ name = "Hotel Guest Room 3" }) "bN" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 2; name = "Guest Room APC"; pixel_y = -24 @@ -719,8 +718,7 @@ name = "Hotel Guest Room 4" }) "bT" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 2; name = "Guest Room APC"; pixel_y = -24 @@ -783,8 +781,7 @@ name = "Hotel Guest Room 5" }) "bZ" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 2; name = "Guest Room APC"; pixel_y = -24 @@ -847,8 +844,7 @@ name = "Hotel Guest Room 6" }) "cf" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 2; name = "Guest Room APC"; pixel_y = -24 @@ -1379,8 +1375,7 @@ name = "Hotel Guest Room 2" }) "dn" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 1; name = "Guest Room APC"; pixel_y = 25 @@ -1461,8 +1456,7 @@ name = "Hotel Guest Room 1" }) "dv" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 1; name = "Guest Room APC"; pixel_y = 25 @@ -1874,8 +1868,7 @@ /turf/open/floor/plasteel/white, /area/ruin/space/has_grav/hotel/workroom) "eA" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 2; name = "Laundry APC"; pixel_y = -24 @@ -2080,8 +2073,7 @@ /turf/open/floor/plating, /area/ruin/space/has_grav/hotel) "fh" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 2; name = "Kitchen APC"; pixel_y = -24 @@ -2874,8 +2866,7 @@ /turf/open/floor/plasteel/cafeteria, /area/ruin/space/has_grav/hotel/bar) "hA" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 2; name = "Staff Room APC"; pixel_y = -24 @@ -3261,8 +3252,7 @@ }, /area/ruin/space/has_grav/hotel/power) "iw" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 1; name = "Power Storage APC"; pixel_y = 25 @@ -3427,8 +3417,7 @@ }, /area/ruin/space/has_grav/hotel/power) "iU" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 2; name = "Security APC"; pixel_y = -24 @@ -3500,8 +3489,7 @@ /turf/open/floor/plating, /area/ruin/space/has_grav/hotel/pool) "iZ" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 2; name = "Pool APC"; pixel_y = -24 @@ -3559,8 +3547,7 @@ /obj/machinery/light{ dir = 8 }, -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 2; name = "Dock APC"; pixel_y = -24 @@ -4824,8 +4811,7 @@ /turf/open/floor/plasteel/neutral, /area/ruin/space/has_grav/hotel/custodial) "mJ" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 2; name = "Custodial APC"; pixel_y = -24 diff --git a/_maps/RandomZLevels/moonoutpost19.dmm b/_maps/RandomZLevels/moonoutpost19.dmm index 22f0169437..44c5d01da5 100644 --- a/_maps/RandomZLevels/moonoutpost19.dmm +++ b/_maps/RandomZLevels/moonoutpost19.dmm @@ -1973,8 +1973,7 @@ }) "cK" = ( /obj/structure/cable, -/obj/machinery/power/apc{ - cell_type = 15000; +/obj/machinery/power/apc/highcap/fifteen_k{ dir = 2; locked = 1; name = "Worn-out APC"; @@ -4917,8 +4916,7 @@ }) "gG" = ( /obj/structure/cable, -/obj/machinery/power/apc{ - cell_type = 15000; +/obj/machinery/power/apc/highcap/fifteen_k{ dir = 4; locked = 0; name = "Worn-out APC"; @@ -5156,22 +5154,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{ @@ -6981,8 +6967,7 @@ icon_state = "0-2"; d2 = 2 }, -/obj/machinery/power/apc{ - cell_type = 15000; +/obj/machinery/power/apc/highcap/fifteen_k{ dir = 1; locked = 0; name = "Worn-out APC"; diff --git a/_maps/RandomZLevels/research.dmm b/_maps/RandomZLevels/research.dmm index 7da8026638..0841c32e24 100644 --- a/_maps/RandomZLevels/research.dmm +++ b/_maps/RandomZLevels/research.dmm @@ -371,9 +371,8 @@ icon_state = "0-2"; d2 = 2 }, -/obj/machinery/power/apc{ +/obj/machinery/power/apc/highcap/ten_k{ auto_name = 1; - cell_type = 9000; dir = 4; name = "Engineering APC"; pixel_x = 27; @@ -660,8 +659,7 @@ /turf/open/floor/plasteel/black, /area/awaymission/research/interior/gateway) "cb" = ( -/obj/machinery/power/apc{ - cell_type = 12000; +/obj/machinery/power/apc/highcap/fifteen_k{ dir = 4; name = "Gateway APC"; pixel_x = 24 @@ -988,8 +986,7 @@ d2 = 2; icon_state = "1-2" }, -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 4; name = "Genetics APC"; pixel_x = 24 @@ -1718,8 +1715,7 @@ /turf/open/floor/plasteel/whitepurple, /area/awaymission/research/interior) "fa" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 4; name = "Cryostatis APC"; pixel_x = 24 @@ -1889,8 +1885,7 @@ /turf/open/floor/plasteel/black, /area/awaymission/research/interior/secure) "fy" = ( -/obj/machinery/power/apc{ - cell_type = 12000; +/obj/machinery/power/apc/highcap/fifteen_k{ dir = 4; name = "Vault APC"; pixel_x = 24 @@ -3057,8 +3052,7 @@ /turf/open/floor/plating, /area/awaymission/research/interior/maint) "iw" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 4; name = "Genetics APC"; pixel_x = 24 @@ -3655,8 +3649,7 @@ }, /area/awaymission/research/interior/medbay) "kp" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 4; name = "Dorms APC"; pixel_x = 24 diff --git a/_maps/RandomZLevels/undergroundoutpost45.dmm b/_maps/RandomZLevels/undergroundoutpost45.dmm index a22555c6c8..a1ddd715b1 100644 --- a/_maps/RandomZLevels/undergroundoutpost45.dmm +++ b/_maps/RandomZLevels/undergroundoutpost45.dmm @@ -3159,8 +3159,7 @@ dir = 1; network = list("UO45") }, -/obj/machinery/power/apc{ - cell_type = 15000; +/obj/machinery/power/apc/highcap/fifteen_k{ dir = 2; locked = 0; name = "Hydroponics APC"; @@ -6240,8 +6239,7 @@ icon_state = "0-4"; d2 = 4 }, -/obj/machinery/power/apc{ - cell_type = 15000; +/obj/machinery/power/apc/highcap/fifteen_k{ dir = 1; locked = 0; name = "UO45 Bar APC"; @@ -7619,8 +7617,7 @@ d2 = 8; icon_state = "0-8" }, -/obj/machinery/power/apc{ - cell_type = 15000; +/obj/machinery/power/apc/highcap/fifteen_k{ dir = 2; locked = 0; name = "UO45 Research Division APC"; @@ -8313,8 +8310,7 @@ }) "mE" = ( /obj/structure/cable, -/obj/machinery/power/apc{ - cell_type = 15000; +/obj/machinery/power/apc/highcap/fifteen_k{ dir = 2; locked = 0; name = "UO45 Gateway APC"; @@ -11932,8 +11928,7 @@ icon_state = "0-4"; d2 = 4 }, -/obj/machinery/power/apc{ - cell_type = 15000; +/obj/machinery/power/apc/highcap/fifteen_k{ dir = 8; locked = 1; name = "UO45 Engineering APC"; @@ -12695,8 +12690,7 @@ }) "sj" = ( /obj/structure/cable, -/obj/machinery/power/apc{ - cell_type = 15000; +/obj/machinery/power/apc/highcap/fifteen_k{ dir = 2; locked = 0; name = "UO45 Mining APC"; 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/BoxStation/BoxStation.dmm b/_maps/map_files/BoxStation/BoxStation.dmm index 95f1cb283c..90dbdd9a27 100644 --- a/_maps/map_files/BoxStation/BoxStation.dmm +++ b/_maps/map_files/BoxStation/BoxStation.dmm @@ -851,8 +851,7 @@ /turf/open/floor/plasteel, /area/ai_monitored/security/armory) "acm" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 4; areastring = "/area/ai_monitored/security/armory"; name = "Armory APC"; @@ -2408,7 +2407,7 @@ dir = 4; id = "pod3"; name = "escape pod 3"; - port_angle = 180; + port_direction = 2; preferred_direction = 4 }, /turf/open/floor/mineral/titanium/blue, @@ -6125,7 +6124,7 @@ /turf/open/floor/plating, /area/maintenance/port/fore) "ank" = ( -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ req_access_txt = "12" }, /turf/open/floor/plating, @@ -6369,7 +6368,7 @@ height = 5; id = "laborcamp"; name = "labor camp shuttle"; - port_angle = 90; + port_direction = 4; width = 9 }, /obj/docking_port/stationary{ @@ -6899,7 +6898,7 @@ /area/security/detectives_office) "ape" = ( /obj/machinery/door/firedoor, -/obj/machinery/door/airlock/engineering{ +/obj/machinery/door/airlock/engineering/abandoned{ name = "Vacant Office B"; req_access_txt = "32" }, @@ -7055,7 +7054,7 @@ /turf/open/floor/plating, /area/maintenance/fore/secondary) "apx" = ( -/obj/machinery/door/airlock/atmos{ +/obj/machinery/door/airlock/atmos/abandoned{ name = "Atmospherics Maintenance"; req_access_txt = "12;24" }, @@ -8272,7 +8271,7 @@ /turf/open/floor/plating, /area/maintenance/starboard/fore) "asy" = ( -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ name = "Firefighting equipment"; req_access_txt = "12" }, @@ -8646,7 +8645,7 @@ /turf/open/floor/plating, /area/maintenance/starboard/fore) "atB" = ( -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ req_access_txt = "12" }, /turf/open/floor/plating, @@ -9081,7 +9080,7 @@ /turf/open/floor/plating, /area/maintenance/starboard/fore) "auG" = ( -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ req_access_txt = "12" }, /obj/structure/cable{ @@ -9271,7 +9270,7 @@ /turf/open/floor/plating, /area/maintenance/fore) "avf" = ( -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ name = "Chemical Storage"; req_access_txt = "12" }, @@ -10053,7 +10052,7 @@ d2 = 8; icon_state = "4-8" }, -/obj/machinery/door/airlock/engineering{ +/obj/machinery/door/airlock/engineering/abandoned{ name = "Electrical Maintenance"; req_access_txt = "11" }, @@ -10229,7 +10228,7 @@ /turf/open/floor/plating, /area/maintenance/port/fore) "axj" = ( -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ name = "Firefighting equipment"; req_access_txt = "12" }, @@ -16485,7 +16484,7 @@ height = 7; id = "arrival"; name = "arrival shuttle"; - port_angle = -90; + port_direction = 8; preferred_direction = 8; width = 15 }, @@ -20943,8 +20942,7 @@ }, /area/bridge) "aWW" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 2; name = "Bridge APC"; areastring = "/area/bridge"; @@ -21395,7 +21393,7 @@ /turf/open/floor/carpet, /area/chapel/main) "aXX" = ( -/obj/machinery/door/airlock/engineering{ +/obj/machinery/door/airlock/engineering/abandoned{ name = "Vacant Office A"; req_access_txt = "32" }, @@ -22745,7 +22743,6 @@ /area/quartermaster/storage) "bbu" = ( /obj/machinery/power/apc{ - cell_type = 2500; dir = 1; name = "Captain's Office APC"; areastring = "/area/crew_quarters/heads/captain"; @@ -23802,8 +23799,7 @@ /turf/open/floor/plasteel/black, /area/ai_monitored/turret_protected/ai_upload) "bed" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 2; name = "Upload APC"; areastring = "/area/ai_monitored/turret_protected/ai_upload"; @@ -24458,7 +24454,7 @@ /area/crew_quarters/heads/captain) "bfE" = ( /obj/structure/table/wood, -/obj/item/pinpointer, +/obj/item/pinpointer/nuke, /obj/item/disk/nuclear, /obj/item/storage/secure/safe{ pixel_x = 35; @@ -29906,7 +29902,7 @@ }, /area/science/explab) "brE" = ( -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ req_access_txt = "0"; req_one_access_txt = "8;12" }, @@ -32546,7 +32542,7 @@ height = 24; id = "syndicate"; name = "syndicate infiltrator"; - port_angle = 0; + port_direction = 1; roundstart_move = "syndicate_away"; width = 18 }, @@ -36558,7 +36554,7 @@ /turf/open/floor/plasteel, /area/quartermaster/miningdock) "bGo" = ( -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ name = "Firefighting equipment"; req_access_txt = "12" }, @@ -37967,7 +37963,7 @@ height = 5; id = "mining"; name = "mining shuttle"; - port_angle = 90; + port_direction = 4; width = 7 }, /obj/docking_port/stationary{ @@ -38895,7 +38891,7 @@ /turf/open/floor/plating, /area/maintenance/aft) "bKU" = ( -/obj/machinery/door/airlock/engineering{ +/obj/machinery/door/airlock/engineering/abandoned{ name = "Construction Area"; req_access_txt = "32" }, @@ -42341,8 +42337,7 @@ /turf/open/floor/plasteel/white, /area/medical/virology) "bSX" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 1; name = "Virology APC"; areastring = "/area/medical/virology"; @@ -42583,7 +42578,7 @@ /turf/open/floor/plating, /area/maintenance/port/aft) "bTw" = ( -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ req_access_txt = "12" }, /obj/machinery/atmospherics/pipe/simple/general/hidden{ @@ -43924,8 +43919,7 @@ /obj/machinery/light{ dir = 1 }, -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 1; name = "Telecomms Server APC"; areastring = "/area/tcommsat/server"; @@ -44808,7 +44802,7 @@ /turf/open/floor/plasteel/floorgrime, /area/maintenance/port/aft) "bYy" = ( -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ name = "Incinerator Access"; req_access_txt = "12" }, @@ -46081,8 +46075,7 @@ /obj/structure/closet/secure_closet/engineering_chief{ req_access_txt = "0" }, -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 4; name = "CE Office APC"; areastring = "/area/crew_quarters/heads/chief"; @@ -46159,7 +46152,7 @@ /turf/open/floor/plasteel, /area/engine/break_room) "cbv" = ( -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ name = "Research Delivery access"; req_access_txt = "12" }, @@ -46304,7 +46297,7 @@ /turf/open/floor/plating, /area/maintenance/aft) "cbO" = ( -/obj/machinery/door/airlock/atmos{ +/obj/machinery/door/airlock/atmos/abandoned{ name = "Atmospherics Maintenance"; req_access_txt = "12;24" }, @@ -46477,7 +46470,7 @@ /obj/structure/disposalpipe/segment{ dir = 4 }, -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ name = "Construction Area Maintenance"; req_access_txt = "32" }, @@ -47850,7 +47843,7 @@ /turf/open/floor/circuit/killroom, /area/science/xenobiology) "cfs" = ( -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ name = "Air Supply Maintenance"; req_access_txt = "12" }, @@ -47875,7 +47868,7 @@ /turf/closed/wall/r_wall, /area/science/misc_lab) "cfv" = ( -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ name = "Firefighting equipment"; req_access_txt = "12" }, @@ -49118,8 +49111,7 @@ /turf/open/floor/plasteel, /area/engine/engineering) "cib" = ( -/obj/machinery/power/apc{ - cell_type = 15000; +/obj/machinery/power/apc/highcap/fifteen_k{ dir = 1; name = "Engineering APC"; areastring = "/area/engine/engineering"; @@ -49156,8 +49148,7 @@ dir = 1 }, /obj/structure/reagent_dispensers/watertank, -/obj/machinery/power/apc{ - cell_type = 15000; +/obj/machinery/power/apc/highcap/fifteen_k{ dir = 1; name = "Engineering APC"; areastring = "/area/engine/engineering"; @@ -50080,7 +50071,7 @@ /turf/open/floor/plating, /area/maintenance/aft) "ckm" = ( -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ name = "Biohazard Disposals"; req_access_txt = "12" }, @@ -52688,7 +52679,7 @@ dir = 4; id = "pod4"; name = "escape pod 4"; - port_angle = 180; + port_direction = 2; preferred_direction = 4 }, /turf/open/floor/mineral/titanium/blue, @@ -52754,7 +52745,7 @@ /turf/open/space, /area/maintenance/disposal/incinerator) "cpR" = ( -/obj/machinery/door/airlock{ +/obj/machinery/door/airlock/abandoned{ name = "Observatory Access" }, /turf/open/floor/plating, @@ -52995,7 +52986,7 @@ dir = 8; id = "pod2"; name = "escape pod 2"; - port_angle = 180 + port_direction = 2 }, /turf/open/floor/mineral/titanium/blue, /area/shuttle/pod_2) @@ -55811,8 +55802,7 @@ d2 = 8; icon_state = "0-8" }, -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 2; name = "AI Chamber APC"; areastring = "/area/ai_monitored/turret_protected/ai"; @@ -56189,7 +56179,7 @@ height = 13; id = "ferry"; name = "ferry shuttle"; - port_angle = 0; + port_direction = 1; preferred_direction = 4; roundstart_move = "ferry_away"; width = 5 @@ -56213,7 +56203,7 @@ dir = 8; id = "pod1"; name = "escape pod 1"; - port_angle = 180 + port_direction = 2 }, /turf/open/floor/mineral/titanium/blue, /area/shuttle/pod_1) @@ -56382,7 +56372,7 @@ id = "whiteship"; launch_status = 0; name = "NT Medical Ship"; - port_angle = -90; + port_direction = 8; preferred_direction = 4; roundstart_move = "whiteship_away"; timid = null; @@ -56617,7 +56607,7 @@ /turf/open/floor/plating, /area/maintenance/solars/port/aft) "cyL" = ( -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ req_access_txt = "12" }, /obj/structure/cable{ @@ -60916,7 +60906,7 @@ height = 24; id = "syndicate"; name = "syndicate infiltrator"; - port_angle = 0; + port_direction = 1; roundstart_move = "syndicate_away"; width = 18 }, @@ -62503,7 +62493,6 @@ /area/quartermaster/sorting) "cNL" = ( /obj/machinery/power/apc{ - cell_type = 2500; dir = 1; name = "Central Maintenance APC"; areastring = "/area/maintenance/central"; @@ -62606,7 +62595,7 @@ /turf/open/floor/plating, /area/maintenance/starboard) "cNV" = ( -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ req_access_txt = "0"; req_one_access_txt = "8;12" }, @@ -63930,6 +63919,30 @@ dir = 4 }, /area/construction/mining/aux_base) +"cTF" = ( +/obj/machinery/door/airlock/maintenance/abandoned{ + req_access_txt = "12" + }, +/turf/open/floor/plating, +/area/maintenance/port/aft) +"cTG" = ( +/obj/machinery/door/airlock/maintenance/abandoned{ + req_access_txt = "12" + }, +/turf/open/floor/plating, +/area/maintenance/port/aft) +"cTH" = ( +/obj/machinery/door/airlock/maintenance/abandoned{ + req_access_txt = "12" + }, +/turf/open/floor/plating, +/area/maintenance/port/aft) +"cTI" = ( +/obj/machinery/door/airlock/maintenance/abandoned{ + req_access_txt = "12" + }, +/turf/open/floor/plating, +/area/maintenance/starboard/aft) (1,1,1) = {" aaa @@ -83888,7 +83901,7 @@ bHE bYu bZk bCq -bTz +cTG bCq bCq bCq @@ -85184,7 +85197,7 @@ bCq bCq bCq bCq -bTz +cTH bCq bLv bLv @@ -86193,7 +86206,7 @@ bLv bPZ bHE bHE -bTz +cTF bHE bLv aoV @@ -109860,7 +109873,7 @@ cmq ciI cnJ cri -bYr +cTI cmn cBT cBU @@ -129465,4 +129478,4 @@ aaa aaa aaa aaa -"} +"} \ No newline at end of file diff --git a/_maps/map_files/Deltastation/DeltaStation2.dmm b/_maps/map_files/Deltastation/DeltaStation2.dmm index 5e0ded4416..b5a0bf5dd4 100644 --- a/_maps/map_files/Deltastation/DeltaStation2.dmm +++ b/_maps/map_files/Deltastation/DeltaStation2.dmm @@ -319,7 +319,7 @@ /obj/docking_port/mobile/pod{ id = "pod1"; name = "escape pod 1"; - port_angle = 180 + port_direction = 2 }, /obj/effect/turf_decal/stripes/end, /turf/open/floor/plasteel/white, @@ -335,7 +335,7 @@ /obj/docking_port/mobile/pod{ id = "pod2"; name = "escape pod 2"; - port_angle = 180 + port_direction = 2 }, /obj/effect/turf_decal/stripes/end, /turf/open/floor/plasteel/white, @@ -863,8 +863,7 @@ /area/maintenance/solars/starboard/fore) "abM" = ( /obj/structure/cable/white, -/obj/machinery/power/apc{ - cell_type = 10000; +/obj/machinery/power/apc/highcap/ten_k{ dir = 2; name = "Starboard Bow Solar APC"; areastring = "/area/maintenance/solars/starboard/fore"; @@ -2598,7 +2597,7 @@ d2 = 8; icon_state = "4-8" }, -/obj/machinery/door/airlock/maintenance_hatch{ +/obj/machinery/door/airlock/maintenance_hatch/abandoned{ name = "Maintenance Hatch"; req_access_txt = "12" }, @@ -2671,7 +2670,7 @@ height = 24; id = "syndicate"; name = "syndicate infiltrator"; - port_angle = 0; + port_direction = 1; roundstart_move = "syndicate_away"; width = 18 }, @@ -3388,7 +3387,7 @@ /turf/closed/wall, /area/security/vacantoffice) "ahx" = ( -/obj/machinery/door/airlock{ +/obj/machinery/door/airlock/abandoned{ name = "Auxiliary Office"; req_access_txt = "32" }, @@ -4917,7 +4916,7 @@ /turf/open/floor/wood, /area/security/vacantoffice) "alk" = ( -/obj/machinery/door/airlock/maintenance_hatch{ +/obj/machinery/door/airlock/maintenance_hatch/abandoned{ name = "Office Maintenance"; req_access_txt = "32" }, @@ -7663,7 +7662,7 @@ /area/maintenance/starboard/fore) "aqK" = ( /obj/effect/decal/cleanable/dirt, -/obj/machinery/door/airlock/maintenance_hatch{ +/obj/machinery/door/airlock/maintenance_hatch/abandoned{ name = "Maintenance Hatch"; req_access_txt = "12" }, @@ -8008,7 +8007,7 @@ /turf/open/floor/plating, /area/maintenance/port/fore) "arq" = ( -/obj/machinery/door/airlock/maintenance_hatch{ +/obj/machinery/door/airlock/maintenance_hatch/abandoned{ name = "Maintenance Hatch"; req_access_txt = "12" }, @@ -8023,7 +8022,7 @@ /turf/open/floor/plasteel, /area/maintenance/port/fore) "arr" = ( -/obj/machinery/door/airlock/maintenance_hatch{ +/obj/machinery/door/airlock/maintenance_hatch/abandoned{ name = "Maintenance Hatch"; req_access_txt = "12" }, @@ -9188,7 +9187,7 @@ /turf/open/floor/wood, /area/maintenance/port/fore) "atE" = ( -/obj/machinery/door/airlock/maintenance_hatch{ +/obj/machinery/door/airlock/maintenance_hatch/abandoned{ name = "Maintenance Hatch"; req_access_txt = "12" }, @@ -15589,8 +15588,7 @@ /area/maintenance/solars/port/fore) "aGh" = ( /obj/structure/cable/white, -/obj/machinery/power/apc{ - cell_type = 10000; +/obj/machinery/power/apc/highcap/ten_k{ dir = 2; name = "Port Bow Solar APC"; areastring = "/area/maintenance/solars/port/fore"; @@ -24570,8 +24568,7 @@ /area/security/prison) "aXv" = ( /obj/structure/cable/white, -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 2; name = "Prison Wing APC"; areastring = "/area/security/prison"; @@ -24696,7 +24693,7 @@ dir = 4; id = "pod3"; name = "escape pod 3"; - port_angle = 180; + port_direction = 2; preferred_direction = 4 }, /obj/effect/turf_decal/stripes/end{ @@ -27292,7 +27289,7 @@ height = 5; id = "mining"; name = "mining shuttle"; - port_angle = 90; + port_direction = 4; width = 7 }, /obj/docking_port/stationary{ @@ -27406,8 +27403,7 @@ }, /area/engine/atmos) "bdr" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 1; name = "Atmospherics APC"; areastring = "/area/engine/atmos"; @@ -37439,7 +37435,7 @@ height = 5; id = "laborcamp"; name = "labor camp shuttle"; - port_angle = 90; + port_direction = 4; width = 9 }, /obj/docking_port/stationary{ @@ -37815,8 +37811,7 @@ /turf/open/floor/plasteel, /area/engine/gravity_generator) "bwL" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 1; name = "Gravity Generator APC"; areastring = "/area/engine/gravity_generator"; @@ -38945,8 +38940,7 @@ /obj/machinery/light{ dir = 1 }, -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 1; name = "Engineering Foyer APC"; areastring = "/area/engine/break_room"; @@ -43406,8 +43400,7 @@ d2 = 2; icon_state = "0-2" }, -/obj/machinery/power/apc{ - cell_type = 10000; +/obj/machinery/power/apc/highcap/ten_k{ dir = 1; name = "Council Chambers APC"; areastring = "/area/bridge/meeting_room/council"; @@ -43982,8 +43975,7 @@ /turf/closed/wall, /area/engine/transit_tube) "bHy" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 1; name = "Transit Tube Access APC"; areastring = "/area/engine/transit_tube"; @@ -44496,8 +44488,7 @@ /turf/open/floor/plasteel/grimy, /area/tcommsat/computer) "bIq" = ( -/obj/machinery/power/apc{ - cell_type = 10000; +/obj/machinery/power/apc/highcap/ten_k{ dir = 1; name = "Telecomms Monitoring APC"; areastring = "/area/tcommsat/computer"; @@ -44659,8 +44650,7 @@ /obj/effect/decal/cleanable/dirt, /obj/machinery/disposal/bin, /obj/structure/disposalpipe/trunk, -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 1; name = "Auxiliary Tool Storage APC"; areastring = "/area/storage/tools"; @@ -46594,8 +46584,7 @@ /turf/open/floor/wood, /area/crew_quarters/heads/captain) "bMI" = ( -/obj/machinery/power/apc{ - cell_type = 10000; +/obj/machinery/power/apc/highcap/ten_k{ dir = 2; name = "Captain's Office APC"; areastring = "/area/crew_quarters/heads/captain"; @@ -53210,7 +53199,7 @@ /area/tcommsat/server) "bYo" = ( /obj/structure/table/wood, -/obj/item/pinpointer, +/obj/item/pinpointer/nuke, /obj/item/disk/nuclear, /obj/item/device/radio/intercom{ name = "Station Intercom"; @@ -54595,8 +54584,7 @@ d2 = 8; icon_state = "0-8" }, -/obj/machinery/power/apc{ - cell_type = 10000; +/obj/machinery/power/apc/highcap/ten_k{ dir = 1; name = "Brig APC"; areastring = "/area/security/brig"; @@ -55181,8 +55169,7 @@ /obj/structure/window/reinforced{ dir = 8 }, -/obj/machinery/power/apc{ - cell_type = 10000; +/obj/machinery/power/apc/highcap/ten_k{ dir = 2; name = "Captain's Quarters APC"; areastring = "/area/crew_quarters/heads/captain/private"; @@ -57975,7 +57962,7 @@ /turf/open/floor/plasteel, /area/maintenance/port) "chF" = ( -/obj/machinery/door/airlock/maintenance_hatch{ +/obj/machinery/door/airlock/maintenance_hatch/abandoned{ name = "Maintenance Hatch"; req_access_txt = "12" }, @@ -58237,8 +58224,7 @@ "cig" = ( /obj/structure/table, /obj/item/hand_tele, -/obj/machinery/power/apc{ - cell_type = 10000; +/obj/machinery/power/apc/highcap/ten_k{ dir = 1; name = "Teleporter APC"; areastring = "/area/teleporter"; @@ -61491,7 +61477,7 @@ icon_state = "2-8" }, /obj/effect/decal/cleanable/dirt, -/obj/machinery/door/airlock/glass_security{ +/obj/machinery/door/airlock/glass_security/abandoned{ name = "Storage Closet"; req_access_txt = "63" }, @@ -63428,8 +63414,7 @@ d2 = 2; icon_state = "0-2" }, -/obj/machinery/power/apc{ - cell_type = 10000; +/obj/machinery/power/apc/highcap/ten_k{ dir = 1; name = "Gateway APC"; areastring = "/area/gateway"; @@ -67174,7 +67159,7 @@ /turf/open/floor/plasteel, /area/maintenance/port) "czB" = ( -/obj/machinery/door/airlock/maintenance_hatch{ +/obj/machinery/door/airlock/maintenance_hatch/abandoned{ name = "Maintenance Hatch"; req_access_txt = "12" }, @@ -70784,7 +70769,7 @@ "cFS" = ( /obj/effect/decal/cleanable/dirt, /obj/effect/decal/cleanable/dirt, -/obj/machinery/door/airlock/maintenance_hatch{ +/obj/machinery/door/airlock/maintenance_hatch/abandoned{ name = "Maintenance Hatch"; req_access_txt = "12" }, @@ -72959,7 +72944,7 @@ /area/maintenance/starboard/aft) "cKH" = ( /obj/effect/decal/cleanable/dirt, -/obj/machinery/door/airlock/maintenance_hatch{ +/obj/machinery/door/airlock/maintenance_hatch/abandoned{ name = "Maintenance Hatch"; req_access_txt = "12" }, @@ -80832,7 +80817,7 @@ /area/maintenance/starboard/aft) "daD" = ( /obj/effect/decal/cleanable/dirt, -/obj/machinery/door/airlock/maintenance_hatch{ +/obj/machinery/door/airlock/maintenance_hatch/abandoned{ name = "Maintenance Hatch"; req_access_txt = "12" }, @@ -80897,7 +80882,7 @@ /area/medical/abandoned) "daJ" = ( /obj/effect/decal/cleanable/dirt, -/obj/machinery/door/airlock/maintenance_hatch{ +/obj/machinery/door/airlock/maintenance_hatch/abandoned{ name = "Maintenance Hatch"; req_access_txt = "12" }, @@ -83153,7 +83138,7 @@ /area/maintenance/starboard/aft) "dfA" = ( /obj/effect/decal/cleanable/dirt, -/obj/machinery/door/airlock/maintenance_hatch{ +/obj/machinery/door/airlock/maintenance_hatch/abandoned{ name = "Maintenance Hatch"; req_access_txt = "12" }, @@ -84197,8 +84182,7 @@ d2 = 8; icon_state = "0-8" }, -/obj/machinery/power/apc{ - cell_type = 10000; +/obj/machinery/power/apc/highcap/ten_k{ dir = 1; name = "Mech Bay APC"; areastring = "/area/science/robotics/mechbay"; @@ -84331,8 +84315,7 @@ d2 = 2; icon_state = "0-2" }, -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 1; name = "Cloning Lab APC"; areastring = "/area/medical/genetics/cloning"; @@ -87492,7 +87475,7 @@ /area/maintenance/starboard/aft) "doy" = ( /obj/effect/decal/cleanable/dirt, -/obj/machinery/door/airlock/maintenance_hatch{ +/obj/machinery/door/airlock/maintenance_hatch/abandoned{ name = "Maintenance Hatch"; req_access_txt = "12" }, @@ -87547,7 +87530,7 @@ /area/hallway/secondary/construction) "doE" = ( /obj/effect/decal/cleanable/dirt, -/obj/machinery/door/airlock/maintenance_hatch{ +/obj/machinery/door/airlock/maintenance_hatch/abandoned{ name = "Maintenance Hatch"; req_access_txt = "12" }, @@ -90680,7 +90663,7 @@ /turf/open/floor/plating, /area/maintenance/starboard/aft) "duA" = ( -/obj/machinery/door/airlock/maintenance_hatch{ +/obj/machinery/door/airlock/maintenance_hatch/abandoned{ name = "Maintenance Hatch"; req_access_txt = "12" }, @@ -92088,8 +92071,7 @@ /area/maintenance/starboard/aft) "dxk" = ( /obj/structure/cable/white, -/obj/machinery/power/apc{ - cell_type = 10000; +/obj/machinery/power/apc/highcap/ten_k{ dir = 2; name = "Starboard Quarter Solar APC"; areastring = "/area/maintenance/solars/starboard/aft"; @@ -92672,7 +92654,7 @@ /turf/closed/wall, /area/security/detectives_office/private_investigators_office) "dyt" = ( -/obj/machinery/door/airlock/maintenance_hatch{ +/obj/machinery/door/airlock/maintenance_hatch/abandoned{ name = "Maintenance Hatch"; req_access_txt = "12" }, @@ -95220,7 +95202,7 @@ /area/maintenance/starboard/aft) "dDr" = ( /obj/effect/decal/cleanable/dirt, -/obj/machinery/door/airlock/maintenance_hatch{ +/obj/machinery/door/airlock/maintenance_hatch/abandoned{ name = "Maintenance Hatch"; req_access_txt = "12" }, @@ -102792,7 +102774,7 @@ name = "Delta emergency shuttle"; width = 30; preferred_direction = 2; - port_angle = 90 + port_direction = 4 }, /obj/docking_port/stationary{ dheight = 0; @@ -104595,8 +104577,7 @@ /area/maintenance/solars/port/aft) "dWj" = ( /obj/structure/cable/white, -/obj/machinery/power/apc{ - cell_type = 10000; +/obj/machinery/power/apc/highcap/ten_k{ dir = 2; name = "Port Quarter Solar APC"; areastring = "/area/maintenance/solars/port/aft"; @@ -107661,7 +107642,7 @@ height = 13; id = "ferry"; name = "ferry shuttle"; - port_angle = 0; + port_direction = 1; preferred_direction = 4; roundstart_move = "ferry_away"; width = 5 @@ -108844,8 +108825,7 @@ /turf/open/floor/plasteel, /area/hallway/secondary/exit/departure_lounge) "egC" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 1; name = "Departure Lounge APC"; areastring = "/area/hallway/secondary/exit/departure_lounge"; @@ -110542,7 +110522,7 @@ height = 24; id = "syndicate"; name = "syndicate infiltrator"; - port_angle = 0; + port_direction = 1; roundstart_move = "syndicate_away"; width = 18 }, @@ -112349,7 +112329,7 @@ /turf/open/floor/plasteel, /area/engine/gravity_generator) "eqf" = ( -/obj/machinery/door/airlock/maintenance_hatch{ +/obj/machinery/door/airlock/maintenance_hatch/abandoned{ name = "Maintenance Hatch"; req_access_txt = "12" }, @@ -178697,4 +178677,4 @@ aaa aaa aaa aaa -"} +"} \ No newline at end of file diff --git a/_maps/map_files/MetaStation/MetaStation.dmm b/_maps/map_files/MetaStation/MetaStation.dmm index ec76a564d5..fec17f558a 100644 --- a/_maps/map_files/MetaStation/MetaStation.dmm +++ b/_maps/map_files/MetaStation/MetaStation.dmm @@ -613,7 +613,7 @@ /obj/docking_port/mobile/pod{ id = "pod2"; name = "escape pod 2"; - port_angle = 180 + port_direction = 2 }, /turf/open/floor/mineral/titanium/blue, /area/shuttle/pod_2) @@ -1461,7 +1461,6 @@ /area/security/execution/education) "acZ" = ( /obj/machinery/power/apc{ - cell_type = 2500; dir = 1; name = "Prisoner Education Chamber APC"; areastring = "/area/security/execution/education"; @@ -1771,7 +1770,7 @@ dir = 4; id = "pod3"; name = "escape pod 3"; - port_angle = 180; + port_direction = 2; preferred_direction = 4 }, /turf/open/floor/mineral/titanium/blue, @@ -2554,8 +2553,7 @@ }, /area/security/prison) "aeX" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 1; name = "Prison Wing APC"; areastring = "/area/security/prison"; @@ -3934,8 +3932,7 @@ }, /area/ai_monitored/security/armory) "ahF" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 2; name = "Armory APC"; areastring = "/area/ai_monitored/security/armory"; @@ -5999,7 +5996,7 @@ /turf/open/floor/plating, /area/maintenance/port/fore) "alF" = ( -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ name = "Secure Storage Room"; req_access_txt = "65" }, @@ -6333,8 +6330,7 @@ d2 = 4; icon_state = "1-4" }, -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 8; name = "Brig Control APC"; areastring = "/area/security/warden"; @@ -6499,7 +6495,6 @@ req_access_txt = "1" }, /obj/machinery/power/apc{ - cell_type = 2500; dir = 4; name = "Shooting Range APC"; areastring = "/area/security/range"; @@ -7000,8 +6995,7 @@ /turf/open/floor/plasteel, /area/security/main) "anC" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 4; name = "Security Office APC"; areastring = "/area/security/main"; @@ -7029,7 +7023,7 @@ /area/maintenance/fore) "anE" = ( /obj/machinery/atmospherics/pipe/simple/supply/hidden, -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ name = "Storage Room"; req_access_txt = "12" }, @@ -8012,7 +8006,7 @@ /turf/open/floor/plating, /area/maintenance/port/fore) "apv" = ( -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ name = "Storage Room"; req_access_txt = "12" }, @@ -9398,7 +9392,7 @@ /turf/open/floor/plating, /area/maintenance/port/fore) "asl" = ( -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ name = "Storage Room"; req_access_txt = "12" }, @@ -9842,7 +9836,7 @@ /obj/machinery/atmospherics/pipe/simple/supply/hidden{ dir = 4 }, -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ name = "Storage Room"; req_access_txt = "12" }, @@ -10618,7 +10612,7 @@ /turf/open/floor/plating, /area/maintenance/starboard/fore) "aut" = ( -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ name = "Storage Room"; req_access_txt = "12" }, @@ -11944,7 +11938,7 @@ /turf/open/floor/wood, /area/crew_quarters/dorms) "awI" = ( -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ name = "Storage Room"; req_access_txt = "12" }, @@ -12217,8 +12211,7 @@ /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{ dir = 4 }, -/obj/machinery/power/apc{ - cell_type = 10000; +/obj/machinery/power/apc/highcap/ten_k{ dir = 2; name = "Brig APC"; areastring = "/area/security/brig"; @@ -13956,7 +13949,7 @@ height = 5; id = "mining"; name = "mining shuttle"; - port_angle = 90; + port_direction = 4; width = 7 }, /obj/docking_port/stationary{ @@ -14172,7 +14165,7 @@ height = 5; id = "laborcamp"; name = "labor camp shuttle"; - port_angle = 90; + port_direction = 4; width = 9 }, /obj/docking_port/stationary{ @@ -17037,8 +17030,7 @@ /obj/machinery/atmospherics/pipe/simple/supply/hidden{ dir = 4 }, -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 2; name = "Fore Primary Hallway APC"; areastring = "/area/hallway/primary/fore"; @@ -21223,8 +21215,7 @@ }, /area/hydroponics/garden) "aOO" = ( -/obj/machinery/power/apc{ - cell_type = 10000; +/obj/machinery/power/apc/highcap/ten_k{ dir = 8; name = "Engine Room APC"; areastring = "/area/engine/engineering"; @@ -22133,8 +22124,7 @@ /turf/open/floor/plasteel/black, /area/ai_monitored/turret_protected/ai_upload) "aQA" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 2; name = "Upload APC"; areastring = "/area/ai_monitored/turret_protected/ai_upload"; @@ -22691,7 +22681,7 @@ /obj/docking_port/mobile/pod{ id = "pod1"; name = "escape pod 1"; - port_angle = 180 + port_direction = 2 }, /turf/open/floor/mineral/titanium/blue, /area/shuttle/pod_1) @@ -24313,7 +24303,6 @@ /area/security/courtroom) "aUG" = ( /obj/machinery/power/apc{ - cell_type = 2500; dir = 2; name = "Courtroom APC"; areastring = "/area/security/courtroom"; @@ -26780,7 +26769,7 @@ /area/storage/tools) "aZv" = ( /obj/machinery/atmospherics/pipe/simple/supply/hidden, -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ name = "Storage Room"; req_access_txt = "12" }, @@ -29108,7 +29097,7 @@ }, /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden, /obj/structure/table/wood, -/obj/item/pinpointer, +/obj/item/pinpointer/nuke, /obj/item/disk/nuclear, /turf/open/floor/carpet, /area/crew_quarters/heads/captain/private) @@ -30962,7 +30951,6 @@ "bhf" = ( /obj/effect/landmark/blobstart, /obj/machinery/power/apc{ - cell_type = 2500; dir = 4; name = "Central Maintenance APC"; areastring = "/area/maintenance/central"; @@ -31519,7 +31507,7 @@ dir = 4; id = "pod4"; name = "escape pod 4"; - port_angle = 180; + port_direction = 2; preferred_direction = 4 }, /turf/open/floor/mineral/titanium/blue, @@ -32675,7 +32663,6 @@ }, /obj/item/hand_labeler, /obj/machinery/power/apc{ - cell_type = 2500; dir = 4; name = "Delivery Office APC"; areastring = "/area/quartermaster/sorting"; @@ -34503,7 +34490,6 @@ "bnE" = ( /obj/machinery/power/apc{ aidisabled = 0; - cell_type = 2500; dir = 4; name = "MiniSat Antechamber APC"; areastring = "/area/ai_monitored/turret_protected/aisat_interior"; @@ -34914,8 +34900,7 @@ /turf/open/floor/wood, /area/crew_quarters/heads/hop) "bop" = ( -/obj/machinery/power/apc{ - cell_type = 10000; +/obj/machinery/power/apc/highcap/ten_k{ dir = 8; name = "Bridge APC"; areastring = "/area/bridge"; @@ -36423,7 +36408,6 @@ "brd" = ( /obj/structure/table, /obj/machinery/power/apc{ - cell_type = 2500; dir = 8; name = "Art Storage APC"; areastring = "/area/storage/art"; @@ -37019,9 +37003,8 @@ /obj/machinery/atmospherics/pipe/simple/supply/hidden{ dir = 4 }, -/obj/machinery/power/apc{ +/obj/machinery/power/apc/highcap/five_k{ aidisabled = 0; - cell_type = 5000; dir = 2; name = "MiniSat Foyer APC"; areastring = "/area/ai_monitored/turret_protected/aisat/foyer"; @@ -39570,8 +39553,7 @@ /turf/open/floor/plasteel/bar, /area/crew_quarters/bar) "bwR" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 1; name = "Bar APC"; areastring = "/area/crew_quarters/bar"; @@ -40107,8 +40089,7 @@ /area/crew_quarters/toilet/auxiliary) "bxS" = ( /obj/item/cigbutt, -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 2; name = "Port Maintenance APC"; areastring = "/area/maintenance/port"; @@ -40670,8 +40651,7 @@ }, /area/engine/atmos) "byX" = ( -/obj/machinery/power/apc{ - cell_type = 10000; +/obj/machinery/power/apc/highcap/ten_k{ dir = 1; name = "Atmospherics APC"; areastring = "/area/engine/atmos"; @@ -40909,8 +40889,7 @@ /turf/open/floor/plasteel/grimy, /area/tcommsat/computer) "bzt" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 4; name = "Telecomms Control Room APC"; areastring = "/area/tcommsat/computer"; @@ -40972,7 +40951,7 @@ /area/security/vacantoffice) "bzz" = ( /obj/machinery/door/firedoor, -/obj/machinery/door/airlock/centcom{ +/obj/machinery/door/airlock/centcom/abandoned{ name = "Vacant Office"; opacity = 1; req_access_txt = "32" @@ -42538,8 +42517,7 @@ /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{ dir = 9 }, -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 2; name = "Auxiliary Restrooms APC"; areastring = "/area/crew_quarters/toilet/auxiliary"; @@ -42794,8 +42772,7 @@ /obj/machinery/atmospherics/pipe/simple/supply/hidden{ dir = 4 }, -/obj/machinery/power/apc{ - cell_type = 10000; +/obj/machinery/power/apc/highcap/ten_k{ dir = 1; name = "Command Hallway APC"; areastring = "/area/hallway/secondary/command"; @@ -45460,8 +45437,7 @@ }, /obj/item/storage/toolbox/emergency, /obj/item/device/flashlight, -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 4; name = "Gateway APC"; areastring = "/area/gateway"; @@ -47415,8 +47391,7 @@ /turf/open/floor/plasteel/black/telecomms/mainframe, /area/tcommsat/server) "bMs" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 4; name = "Telecomms Server Room APC"; areastring = "/area/tcommsat/server"; @@ -48631,8 +48606,7 @@ /turf/open/floor/wood, /area/bridge/showroom/corporate) "bOF" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 4; name = "Nanotrasen Corporate Showroom APC"; areastring = "/area/bridge/showroom/corporate"; @@ -49127,7 +49101,7 @@ /turf/open/floor/plating, /area/maintenance/port) "bPI" = ( -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ name = "Vacant Office Maintenance"; req_access_txt = "32"; req_one_access_txt = "0" @@ -49786,7 +49760,7 @@ /turf/open/floor/plating, /area/maintenance/port) "bRf" = ( -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ name = "Storage Room"; req_access_txt = "12" }, @@ -50924,7 +50898,6 @@ /area/maintenance/starboard) "bTc" = ( /obj/machinery/power/apc{ - cell_type = 2500; dir = 1; name = "Starboard Maintenance APC"; areastring = "/area/maintenance/starboard"; @@ -51069,7 +51042,7 @@ /area/engine/engineering) "bTr" = ( /obj/machinery/atmospherics/pipe/simple/supply/hidden, -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ name = "Storage Room"; req_access_txt = "12" }, @@ -51374,8 +51347,7 @@ /obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden{ dir = 1 }, -/obj/machinery/power/apc{ - cell_type = 10000; +/obj/machinery/power/apc/highcap/ten_k{ dir = 1; name = "Central Primary Hallway APC"; areastring = "/area/hallway/primary/central"; @@ -54362,7 +54334,7 @@ /turf/open/floor/plating/airless, /area/maintenance/solars/port/aft) "bZO" = ( -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ name = "Storage Room"; req_access_txt = "12" }, @@ -55242,7 +55214,7 @@ id = "whiteship"; launch_status = 0; name = "NT Recovery White-Ship"; - port_angle = -90; + port_direction = 8; preferred_direction = 4; roundstart_move = "whiteship_away"; width = 27 @@ -56190,7 +56162,7 @@ /turf/open/floor/plating, /area/maintenance/port/aft) "cde" = ( -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ name = "Storage Room"; req_access_txt = "12" }, @@ -57350,7 +57322,7 @@ /turf/open/floor/plating, /area/maintenance/starboard) "cfl" = ( -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ name = "Storage Room"; req_access_txt = "12" }, @@ -59120,8 +59092,7 @@ /turf/open/floor/plasteel/white, /area/science/research) "ciJ" = ( -/obj/machinery/power/apc{ - cell_type = 10000; +/obj/machinery/power/apc/highcap/ten_k{ dir = 1; name = "Research Division APC"; areastring = "/area/science/research"; @@ -60662,7 +60633,7 @@ /turf/open/floor/plating, /area/maintenance/starboard/aft) "clX" = ( -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ locked = 0; name = "Storage Room"; req_access_txt = "0"; @@ -63763,8 +63734,7 @@ /turf/open/floor/plasteel, /area/hallway/primary/aft) "crH" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 4; name = "Aft Hallway APC"; areastring = "/area/hallway/primary/aft"; @@ -64655,8 +64625,7 @@ /area/science/storage) "cti" = ( /obj/machinery/portable_atmospherics/canister/oxygen, -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 1; name = "Toxins Storage APC"; areastring = "/area/science/storage"; @@ -65586,7 +65555,7 @@ /turf/open/floor/plating, /area/maintenance/starboard/aft) "cuZ" = ( -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ name = "Storage Room"; req_access_txt = "0"; req_one_access_txt = "12;47" @@ -66668,7 +66637,7 @@ /turf/open/floor/plasteel, /area/science/storage) "cwZ" = ( -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ name = "airlock access"; req_access_txt = "0"; req_one_access_txt = "12;47" @@ -70046,8 +70015,7 @@ pixel_y = 2 }, /obj/item/storage/box/syringes, -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 1; name = "Virology APC"; areastring = "/area/medical/virology"; @@ -71950,7 +71918,7 @@ }, /area/medical/medbay/aft) "cGP" = ( -/obj/machinery/door/airlock{ +/obj/machinery/door/airlock/abandoned{ name = "Medical Surplus Storeroom"; req_access_txt = "5" }, @@ -73434,7 +73402,7 @@ /obj/machinery/atmospherics/pipe/simple/supply/hidden{ dir = 4 }, -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ name = "Medical Surplus Storeroom"; req_access_txt = "12"; req_one_access_txt = "0" @@ -73954,8 +73922,7 @@ /turf/open/floor/plasteel, /area/hallway/secondary/exit/departure_lounge) "cKy" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 1; name = "Departure Lounge APC"; areastring = "/area/hallway/secondary/exit/departure_lounge"; @@ -74108,7 +74075,7 @@ /obj/machinery/atmospherics/pipe/simple/supply/hidden{ dir = 4 }, -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ locked = 0; name = "Storage Room"; req_access_txt = "0"; @@ -74944,8 +74911,7 @@ /turf/open/floor/plasteel, /area/hallway/secondary/exit/departure_lounge) "cMk" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 2; name = "Aft Maintenance APC"; areastring = "/area/maintenance/aft"; @@ -78474,7 +78440,7 @@ height = 24; id = "syndicate"; name = "syndicate infiltrator"; - port_angle = 0; + port_direction = 1; roundstart_move = "syndicate_away"; width = 18 }, @@ -79453,7 +79419,7 @@ height = 13; id = "ferry"; name = "ferry shuttle"; - port_angle = 0; + port_direction = 1; preferred_direction = 4; roundstart_move = "ferry_away"; width = 5 @@ -82764,8 +82730,7 @@ pixel_y = 3 }, /obj/item/reagent_containers/dropper, -/obj/machinery/power/apc{ - cell_type = 10000; +/obj/machinery/power/apc/highcap/ten_k{ dir = 1; name = "Xenobiology APC"; areastring = "/area/science/xenobiology"; @@ -87024,7 +86989,6 @@ icon_state = "0-8" }, /obj/machinery/power/apc{ - cell_type = 2500; dir = 4; name = "Port Bow Maintenance APC"; areastring = "/area/maintenance/port/fore"; @@ -89548,8 +89512,7 @@ /turf/open/floor/plating, /area/maintenance/starboard/aft) "dAd" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 2; name = "Starboard Quarter Maintenance APC"; areastring = "/area/maintenance/starboard/aft"; @@ -90803,6 +90766,22 @@ dir = 1 }, /area/construction/mining/aux_base) +"dDL" = ( +/obj/machinery/door/airlock/maintenance/abandoned{ + name = "Storage Room"; + req_access_txt = "12" + }, +/obj/machinery/atmospherics/pipe/simple/supply/hidden, +/turf/open/floor/plating, +/area/maintenance/starboard/fore) +"dDM" = ( +/obj/machinery/door/airlock/maintenance/abandoned{ + name = "Storage Room"; + req_access_txt = "12" + }, +/obj/machinery/atmospherics/pipe/simple/supply/hidden, +/turf/open/floor/plating, +/area/maintenance/starboard/fore) (1,1,1) = {" aaa @@ -129958,7 +129937,7 @@ arI atd bai ate -dpP +dDM axP dnS axY @@ -131755,7 +131734,7 @@ ape dnS arL ate -dpP +dDL avt awJ axS @@ -156338,4 +156317,4 @@ aaa aaa aaa aaa -"} +"} \ No newline at end of file diff --git a/_maps/map_files/OmegaStation/OmegaStation.dmm b/_maps/map_files/OmegaStation/OmegaStation.dmm index 207a64fe5d..1d961d66bc 100644 --- a/_maps/map_files/OmegaStation/OmegaStation.dmm +++ b/_maps/map_files/OmegaStation/OmegaStation.dmm @@ -1187,7 +1187,7 @@ pixel_x = 32; pixel_y = 24 }, -/obj/item/pinpointer, +/obj/item/pinpointer/nuke, /obj/item/disk/nuclear, /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{ dir = 10 @@ -2783,8 +2783,7 @@ d2 = 2; icon_state = "0-2" }, -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 1; name = "Head of Personnel Quarter's APC"; areastring = "/area/crew_quarters/heads/hop"; @@ -2968,8 +2967,7 @@ /turf/open/floor/wood, /area/security/detectives_office) "afh" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 1; name = "Detective's Office APC"; areastring = "/area/security/detectives_office"; @@ -9503,7 +9501,7 @@ height = 5; id = "mining"; name = "mining shuttle"; - port_angle = 90; + port_direction = 4; width = 7 }, /obj/docking_port/stationary{ @@ -15182,8 +15180,7 @@ d2 = 2; icon_state = "0-2" }, -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 1; name = "Central Starboard Maintenance APC"; areastring = "/area/maintenance/starboard/central"; @@ -16893,8 +16890,7 @@ d2 = 2; icon_state = "0-2" }, -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 1; name = "Theatre Backstage APC"; areastring = "/area/crew_quarters/theatre"; @@ -19560,8 +19556,7 @@ d2 = 2; icon_state = "0-2" }, -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 1; name = "Central Port Maintenance APC"; areastring = "/area/maintenance/port/central"; @@ -21269,8 +21264,7 @@ /turf/open/floor/plasteel, /area/engine/gravity_generator) "aJl" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 1; name = "Gravity Generator APC"; areastring = "/area/engine/gravity_generator"; @@ -21563,8 +21557,7 @@ /obj/effect/decal/cleanable/dirt, /obj/item/storage/bag/trash, /obj/item/key/janitor, -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 1; name = "Custodial Closet APC"; areastring = "/area/janitor"; @@ -26410,8 +26403,7 @@ /obj/machinery/light{ dir = 1 }, -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 1; name = "Chemistry Lab APC"; areastring = "/area/medical/chemistry"; @@ -30345,8 +30337,7 @@ locked = 0; pixel_x = -23 }, -/obj/machinery/power/apc{ - cell_type = 10000; +/obj/machinery/power/apc/highcap/ten_k{ dir = 1; name = "Mech Bay APC"; areastring = "/area/science/robotics/mechbay"; @@ -33800,8 +33791,7 @@ /obj/structure/chair/wood/normal{ dir = 8 }, -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 1; name = "Chapel APC"; areastring = "/area/chapel/main"; @@ -34639,8 +34629,7 @@ /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{ dir = 4 }, -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 1; name = "Arrivals APC"; areastring = "/area/hallway/secondary/entry"; @@ -37387,7 +37376,7 @@ height = 24; id = "syndicate"; name = "syndicate infiltrator"; - port_angle = 0; + port_direction = 1; roundstart_move = "syndicate_away"; width = 18 }, @@ -39910,7 +39899,7 @@ height = 13; id = "ferry"; name = "ferry shuttle"; - port_angle = 0; + port_direction = 1; preferred_direction = 4; roundstart_move = "ferry_away"; width = 5 @@ -106004,4 +105993,4 @@ aaa aaa aaa aaa -"} +"} \ No newline at end of file diff --git a/_maps/map_files/PubbyStation/PubbyStation.dmm b/_maps/map_files/PubbyStation/PubbyStation.dmm index 502f7ba293..d11b0d9352 100644 --- a/_maps/map_files/PubbyStation/PubbyStation.dmm +++ b/_maps/map_files/PubbyStation/PubbyStation.dmm @@ -297,7 +297,7 @@ height = 24; id = "syndicate"; name = "syndicate infiltrator"; - port_angle = 0; + port_direction = 1; roundstart_move = "syndicate_away"; width = 18 }, @@ -3325,8 +3325,7 @@ }, /area/security/prison) "ahJ" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 1; name = "Prison Wing APC"; pixel_x = 1; @@ -3804,8 +3803,7 @@ /obj/item/storage/box/firingpins, /obj/item/storage/box/firingpins, /obj/item/key/security, -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 4; name = "Armory APC"; pixel_x = 24 @@ -4967,7 +4965,7 @@ /turf/open/floor/plating, /area/maintenance/department/crew_quarters/dorms) "ali" = ( -/obj/machinery/door/airlock{ +/obj/machinery/door/airlock/abandoned{ id_tag = "mainthideout"; name = "Hideout" }, @@ -5369,8 +5367,7 @@ d2 = 8; icon_state = "0-8" }, -/obj/machinery/power/apc{ - cell_type = 10000; +/obj/machinery/power/apc/highcap/ten_k{ dir = 4; name = "Brig APC"; pixel_x = 24 @@ -5668,7 +5665,7 @@ }, /area/maintenance/department/crew_quarters/dorms) "amH" = ( -/obj/machinery/door/airlock/atmos{ +/obj/machinery/door/airlock/atmos/abandoned{ name = "Atmospherics Maintenance"; req_access_txt = "12;24" }, @@ -5932,7 +5929,7 @@ /turf/open/space/basic, /area/space) "anm" = ( -/obj/machinery/door/airlock/maintenance{ +/obj/machinery/door/airlock/maintenance/abandoned{ name = "Pete's Speakeasy"; req_access_txt = "12" }, @@ -7656,7 +7653,7 @@ id = "pod1"; launch_status = 0; name = "monastery shuttle"; - port_angle = 180; + port_direction = 2; width = 5 }, /turf/open/floor/mineral/titanium/blue, @@ -9701,7 +9698,7 @@ height = 5; id = "laborcamp"; name = "labor camp shuttle"; - port_angle = 90; + port_direction = 4; width = 9 }, /obj/docking_port/stationary{ @@ -10810,7 +10807,6 @@ /area/crew_quarters/heads/captain) "axS" = ( /obj/machinery/power/apc{ - cell_type = 2500; dir = 1; name = "Captain's Office APC"; pixel_y = 24 @@ -11495,8 +11491,7 @@ /area/bridge) "azo" = ( /obj/machinery/atmospherics/pipe/simple/supply/hidden, -/obj/machinery/power/apc{ - cell_type = 10000; +/obj/machinery/power/apc/highcap/ten_k{ dir = 4; name = "Bridge APC"; areastring = "/area/bridge"; @@ -12401,8 +12396,7 @@ }, /area/ai_monitored/turret_protected/ai_upload) "aBx" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 1; name = "Upload APC"; areastring = "/area/ai_monitored/turret_protected/ai_upload"; @@ -12508,8 +12502,7 @@ /turf/open/floor/wood, /area/crew_quarters/heads/hop) "aBH" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 8; name = "Central Hall APC"; pixel_x = -25 @@ -13917,7 +13910,7 @@ /area/storage/primary) "aEx" = ( /obj/structure/table/wood, -/obj/item/pinpointer, +/obj/item/pinpointer/nuke, /obj/item/disk/nuclear, /obj/machinery/light{ dir = 8 @@ -15121,7 +15114,7 @@ /turf/open/floor/plasteel, /area/hallway/primary/central) "aHn" = ( -/obj/machinery/door/airlock{ +/obj/machinery/door/airlock/abandoned{ name = "Starboard Emergency Storage"; req_access_txt = "0" }, @@ -17679,8 +17672,7 @@ }, /area/hallway/secondary/exit/departure_lounge) "aMO" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 1; name = "Departure Lounge APC"; areastring = "/area/hallway/secondary/exit/departure_lounge"; @@ -17841,8 +17833,7 @@ /area/crew_quarters/toilet/auxiliary) "aNe" = ( /obj/structure/cable, -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 2; name = "Auxiliary Restrooms APC"; pixel_y = -24 @@ -20209,7 +20200,6 @@ /area/quartermaster/storage) "aSl" = ( /obj/machinery/power/apc{ - cell_type = 2500; dir = 4; name = "Cargo Maintenance APC"; pixel_x = 24 @@ -20903,7 +20893,7 @@ dwidth = 4; height = 15; name = "Pubby emergency shuttle"; - port_angle = 90; + port_direction = 4; width = 18 }, /turf/open/floor/plating, @@ -26406,7 +26396,7 @@ height = 5; id = "mining"; name = "mining shuttle"; - port_angle = 90; + port_direction = 4; width = 7 }, /obj/docking_port/stationary{ @@ -32730,7 +32720,7 @@ height = 13; id = "ferry"; name = "ferry shuttle"; - port_angle = 0; + port_direction = 1; preferred_direction = 4; roundstart_move = "ferry_away"; width = 5 @@ -33661,8 +33651,7 @@ /obj/machinery/atmospherics/pipe/simple/supply/hidden{ dir = 4 }, -/obj/machinery/power/apc{ - cell_type = 10000; +/obj/machinery/power/apc/highcap/ten_k{ dir = 1; name = "Research Lobby APC"; pixel_y = 25 @@ -33769,8 +33758,7 @@ /turf/closed/wall, /area/science/research) "bvL" = ( -/obj/machinery/power/apc{ - cell_type = 10000; +/obj/machinery/power/apc/highcap/ten_k{ dir = 1; name = "Research Division APC"; pixel_y = 25 @@ -34020,8 +34008,7 @@ icon_state = "0-4"; d2 = 4 }, -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 8; name = "Xenobiology APC"; pixel_x = -25 @@ -38010,7 +37997,7 @@ /turf/open/floor/plating, /area/maintenance/department/engine) "bEm" = ( -/obj/machinery/door/airlock/atmos{ +/obj/machinery/door/airlock/atmos/abandoned{ name = "Atmospherics Maintenance"; req_access_txt = "12;24" }, @@ -39331,8 +39318,7 @@ /turf/open/floor/plasteel/white, /area/medical/virology) "bGU" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 1; name = "Virology APC"; pixel_y = 24 @@ -43456,7 +43442,7 @@ dir = 2; network = list("SS13") }, -/obj/item/circuitboard/computer/shuttle/monastery_shuttle, +/obj/item/circuitboard/computer/monastery_shuttle, /turf/open/floor/plasteel/darkgreen, /area/storage/tech) "bQx" = ( @@ -44660,7 +44646,7 @@ /turf/open/floor/plating, /area/maintenance/department/engine) "bTf" = ( -/obj/machinery/door/airlock/atmos{ +/obj/machinery/door/airlock/atmos/abandoned{ name = "Atmospherics Maintenance"; req_access_txt = "12;24" }, @@ -46639,8 +46625,7 @@ amount = 50 }, /obj/item/stack/cable_coil, -/obj/machinery/power/apc{ - cell_type = 10000; +/obj/machinery/power/apc/highcap/ten_k{ dir = 8; name = "Engine Room APC"; areastring = "/area/engine/engine_smes"; @@ -47190,8 +47175,7 @@ /turf/open/floor/plating, /area/maintenance/department/engine) "bYG" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 8; name = "Engineering Maintenance APC"; pixel_x = -25; @@ -47588,8 +47572,7 @@ /turf/open/floor/plasteel, /area/engine/engineering) "bZc" = ( -/obj/machinery/power/apc{ - cell_type = 15000; +/obj/machinery/power/apc/highcap/fifteen_k{ dir = 4; name = "Engineering APC"; pixel_x = 28 @@ -52041,7 +52024,7 @@ id = "whiteship"; launch_status = 0; name = "White Ship"; - port_angle = 90; + port_direction = 4; preferred_direction = 1; roundstart_move = "whiteship_away"; timid = null; @@ -53310,8 +53293,7 @@ /turf/open/floor/circuit/telecomms/mainframe, /area/tcommsat/server) "cmI" = ( -/obj/machinery/power/apc{ - cell_type = 5000; +/obj/machinery/power/apc/highcap/five_k{ dir = 1; layer = 4; name = "Telecomms Server APC"; @@ -58378,6 +58360,42 @@ }, /turf/open/floor/plasteel/black, /area/chapel/office) +"cBN" = ( +/obj/effect/spawner/structure/window/shuttle, +/turf/open/floor/plating, +/area/shuttle/escape) +"cBO" = ( +/obj/effect/spawner/structure/window/shuttle, +/turf/open/floor/plating, +/area/shuttle/escape) +"cBP" = ( +/obj/effect/spawner/structure/window/shuttle, +/turf/open/floor/plating, +/area/shuttle/escape) +"cBQ" = ( +/obj/effect/spawner/structure/window/shuttle, +/turf/open/floor/plating, +/area/shuttle/escape) +"cBR" = ( +/obj/effect/spawner/structure/window/shuttle, +/turf/open/floor/plating, +/area/shuttle/escape) +"cBS" = ( +/obj/effect/spawner/structure/window/shuttle, +/turf/open/floor/plating, +/area/shuttle/escape) +"cBT" = ( +/obj/effect/spawner/structure/window/shuttle, +/turf/open/floor/plating, +/area/shuttle/escape) +"cBU" = ( +/obj/effect/spawner/structure/window/shuttle, +/turf/open/floor/plating, +/area/shuttle/escape) +"cBV" = ( +/obj/effect/spawner/structure/window/shuttle, +/turf/open/floor/plating, +/area/shuttle/escape) (1,1,1) = {" aaa @@ -72108,11 +72126,11 @@ aaa aaa aaa aaa -bVq -cBF -bVq -cBG -bVq +aaa +aaa +aaa +aaa +aaa aaa aaa aaa @@ -72356,20 +72374,20 @@ aaa aaa aaa aFS -aFT -aFT +cBN +cBN aKs aFS aFS -aFT -aFT +cBN +cBN aFS aKs -cBC -aOc -aPj -aOc -cBH +aFS +aKs +aFS +aFS +aFS aaa aaa aaa @@ -72616,17 +72634,17 @@ aFS aIs aJx aJx -aFT +cBN aMI aNZ aNZ aNZ aMI -cBD -aOd -aPk -aQq -cBI +aNZ +aMI +aNZ +aVJ +aWD aaa aaa aaa @@ -72879,11 +72897,11 @@ aIx aIx aIx aIx -cBE -aOc -aPl -aOc -cBJ +aIx +aIx +aIx +aVJ +aWD aaa aaa aaa @@ -73130,7 +73148,7 @@ aFS aIu aJy aKt -aFT +cBN aIx aOa aOa @@ -73895,19 +73913,19 @@ aaa aaa aaa aaa -aFT +cBN aGQ aHw aIw aIw -aFT +cBN aIx aIx aOc aPj aOc aIx -aFT +cBN aMI aMI aMI @@ -95714,8 +95732,8 @@ ajv aju ajt alQ -alb -alb +cBt +cBt aiS anY apt @@ -95972,7 +95990,7 @@ akh alc alR amF -alb +cBt anm ajv ajv @@ -96229,7 +96247,7 @@ cBm cBp alS amG -alb +cBt aiS aiS aiS @@ -123913,4 +123931,4 @@ aaa aaa aaa aaa -"} +"} \ No newline at end of file diff --git a/_maps/map_files/generic/CentCom.dmm b/_maps/map_files/generic/CentCom.dmm index ca7c26625b..3e78a685dc 100644 --- a/_maps/map_files/generic/CentCom.dmm +++ b/_maps/map_files/generic/CentCom.dmm @@ -1,4 +1,4 @@ -//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE +//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE "aa" = ( /turf/open/space/basic, /area/space) @@ -58,10 +58,7 @@ /obj/item/stack/medical/ointment{ heal_burn = 10 }, -/turf/open/floor/holofloor{ - icon_state = "asteroid_warn_side"; - dir = 8 - }, +/turf/open/floor/holofloor/asteroid, /area/holodeck/rec_center/bunker) "am" = ( /obj/structure/table/wood{ @@ -160,10 +157,7 @@ "aA" = ( /obj/structure/table, /obj/machinery/recharger, -/turf/open/floor/holofloor{ - icon_state = "asteroidfloor"; - dir = 8 - }, +/turf/open/floor/holofloor/asteroid, /area/holodeck/rec_center/bunker) "aB" = ( /obj/structure/table/wood, @@ -213,10 +207,7 @@ "aJ" = ( /obj/structure/table, /obj/item/gun/energy/laser, -/turf/open/floor/holofloor{ - icon_state = "asteroidfloor"; - dir = 8 - }, +/turf/open/floor/holofloor/asteroid, /area/holodeck/rec_center/bunker) "aK" = ( /obj/structure/chair/wood/normal{ @@ -360,10 +351,7 @@ /obj/item/stack/medical/bruise_pack{ heal_brute = 10 }, -/turf/open/floor/holofloor{ - icon_state = "asteroid_warn_side"; - dir = 8 - }, +/turf/open/floor/holofloor/asteroid, /area/holodeck/rec_center/bunker) "bf" = ( /obj/structure/table/wood, @@ -428,7 +416,6 @@ /obj/item/surgicaldrill, /turf/open/floor/holofloor{ icon_state = "white"; - dir = 9 }, /area/holodeck/rec_center/medical) "br" = ( @@ -436,7 +423,6 @@ /obj/item/hemostat, /turf/open/floor/holofloor{ icon_state = "white"; - dir = 1 }, /area/holodeck/rec_center/medical) "bs" = ( @@ -447,7 +433,6 @@ /obj/item/circular_saw, /turf/open/floor/holofloor{ icon_state = "white"; - dir = 1 }, /area/holodeck/rec_center/medical) "bt" = ( @@ -455,7 +440,6 @@ /obj/item/retractor, /turf/open/floor/holofloor{ icon_state = "white"; - dir = 1 }, /area/holodeck/rec_center/medical) "bu" = ( @@ -464,7 +448,6 @@ /obj/item/cautery, /turf/open/floor/holofloor{ icon_state = "white"; - dir = 5 }, /area/holodeck/rec_center/medical) "bv" = ( @@ -492,33 +475,21 @@ /turf/open/floor/holofloor/beach, /area/holodeck/rec_center/beach) "bz" = ( -/turf/open/floor/holofloor/basalt, /obj/structure/table, /obj/machinery/readybutton, -/turf/open/floor/holofloor{ - icon_state = "warningline"; - dir = 2 - }, +/turf/open/floor/holofloor/basalt, /area/holodeck/rec_center/thunderdome) "bA" = ( -/turf/open/floor/holofloor/basalt, /obj/structure/table, /obj/item/clothing/head/helmet/thunderdome, /obj/item/clothing/suit/armor/tdome/red, /obj/item/clothing/under/color/red, /obj/item/holo/esword/red, -/turf/open/floor/holofloor{ - icon_state = "warningline"; - dir = 2 - }, +/turf/open/floor/holofloor/basalt, /area/holodeck/rec_center/thunderdome) "bB" = ( -/turf/open/floor/holofloor/basalt, /obj/structure/table, -/turf/open/floor/holofloor{ - icon_state = "warningline"; - dir = 2 - }, +/turf/open/floor/holofloor/basalt, /area/holodeck/rec_center/thunderdome) "bC" = ( /obj/machinery/readybutton, @@ -558,7 +529,6 @@ /obj/item/razor, /turf/open/floor/holofloor{ icon_state = "white"; - dir = 8 }, /area/holodeck/rec_center/medical) "bJ" = ( @@ -569,7 +539,6 @@ "bK" = ( /turf/open/floor/holofloor{ icon_state = "white"; - dir = 4 }, /area/holodeck/rec_center/medical) "bL" = ( @@ -636,19 +605,18 @@ "bX" = ( /turf/open/floor/holofloor{ icon_state = "white"; - dir = 10 }, /area/holodeck/rec_center/medical) "bZ" = ( /obj/structure/table/optable, /turf/open/floor/holofloor{ - icon_state = "white" + icon_state = "white"; }, /area/holodeck/rec_center/medical) "ca" = ( /obj/machinery/computer/operating, /turf/open/floor/holofloor{ - icon_state = "white" + icon_state = "white"; }, /area/holodeck/rec_center/medical) "cb" = ( @@ -658,7 +626,6 @@ /obj/item/clothing/mask/surgical, /turf/open/floor/holofloor{ icon_state = "white"; - dir = 6 }, /area/holodeck/rec_center/medical) "cc" = ( @@ -701,7 +668,7 @@ dir = 1 }, /turf/open/floor/holofloor{ - icon_state = "white" + icon_state = "white"; }, /area/holodeck/rec_center/medical) "cj" = ( @@ -714,13 +681,11 @@ /obj/machinery/reagentgrinder, /turf/open/floor/holofloor{ icon_state = "white"; - dir = 9 }, /area/holodeck/rec_center/medical) "cl" = ( /turf/open/floor/holofloor{ icon_state = "white"; - dir = 5 }, /area/holodeck/rec_center/medical) "cm" = ( @@ -731,13 +696,13 @@ }, /obj/item/storage/box/beakers, /turf/open/floor/holofloor{ - icon_state = "white" + icon_state = "white"; }, /area/holodeck/rec_center/medical) "cn" = ( /obj/machinery/washing_machine, /turf/open/floor/holofloor{ - icon_state = "white" + icon_state = "white"; }, /area/holodeck/rec_center/medical) "co" = ( @@ -812,26 +777,24 @@ /obj/machinery/chem_master, /turf/open/floor/holofloor{ icon_state = "white"; - dir = 10 }, /area/holodeck/rec_center/medical) "cz" = ( /turf/open/floor/holofloor{ icon_state = "white"; - dir = 6 }, /area/holodeck/rec_center/medical) "cA" = ( /obj/structure/table/glass, /obj/item/device/healthanalyzer, /turf/open/floor/holofloor{ - icon_state = "white" + icon_state = "white"; }, /area/holodeck/rec_center/medical) "cB" = ( /obj/structure/closet/wardrobe/white, /turf/open/floor/holofloor{ - icon_state = "white" + icon_state = "white"; }, /area/holodeck/rec_center/medical) "cC" = ( @@ -948,7 +911,6 @@ }, /turf/open/floor/holofloor{ icon_state = "white"; - dir = 9 }, /area/holodeck/rec_center/medical) "cW" = ( @@ -962,7 +924,6 @@ }, /turf/open/floor/holofloor{ icon_state = "white"; - dir = 5 }, /area/holodeck/rec_center/medical) "cX" = ( @@ -971,7 +932,7 @@ }, /obj/machinery/computer/pandemic, /turf/open/floor/holofloor{ - icon_state = "white" + icon_state = "white"; }, /area/holodeck/rec_center/medical) "cY" = ( @@ -1004,7 +965,6 @@ "de" = ( /turf/open/floor/holofloor{ icon_state = "white"; - dir = 8 }, /area/holodeck/rec_center/medical) "df" = ( @@ -1017,13 +977,11 @@ /obj/machinery/door/window/westleft, /turf/open/floor/holofloor{ icon_state = "white"; - dir = 1 }, /area/holodeck/rec_center/medical) "dh" = ( /turf/open/floor/holofloor{ icon_state = "white"; - dir = 1 }, /area/holodeck/rec_center/medical) "di" = ( @@ -1037,7 +995,6 @@ }, /turf/open/floor/holofloor{ icon_state = "white"; - dir = 10 }, /area/holodeck/rec_center/medical) "dk" = ( @@ -1050,7 +1007,7 @@ density = 0 }, /turf/open/floor/holofloor{ - icon_state = "white" + icon_state = "white"; }, /area/holodeck/rec_center/medical) "dl" = ( @@ -1061,7 +1018,7 @@ dir = 1 }, /turf/open/floor/holofloor{ - icon_state = "white" + icon_state = "white"; }, /area/holodeck/rec_center/medical) "dm" = ( @@ -1069,7 +1026,7 @@ density = 0 }, /turf/open/floor/holofloor{ - icon_state = "white" + icon_state = "white"; }, /area/holodeck/rec_center/medical) "dn" = ( @@ -1078,7 +1035,6 @@ }, /turf/open/floor/holofloor{ icon_state = "white"; - dir = 6 }, /area/holodeck/rec_center/medical) "do" = ( @@ -1115,16 +1071,12 @@ }, /area/holodeck/rec_center/thunderdome) "dt" = ( -/turf/open/floor/holofloor/basalt, /obj/structure/table, /obj/item/clothing/head/helmet/thunderdome, /obj/item/clothing/suit/armor/tdome/green, /obj/item/clothing/under/color/green, /obj/item/holo/esword/green, -/turf/open/floor/holofloor{ - icon_state = "warningline"; - dir = 1 - }, +/turf/open/floor/holofloor/basalt, /area/holodeck/rec_center/thunderdome) "du" = ( /turf/open/floor/holofloor/basalt, @@ -1158,11 +1110,7 @@ /turf/open/floor/holofloor/plating, /area/holodeck/rec_center/refuel) "dz" = ( -/turf/open/floor/holofloor/grass, -/turf/open/floor/holofloor{ - icon_state = "warningline"; - dir = 2 - }, +/turf/open/floor/holofloor/plating, /area/holodeck/rec_center/spacechess) "dA" = ( /obj/item/banner/blue, @@ -1248,21 +1196,15 @@ }, /area/holodeck/rec_center/chapelcourt) "dM" = ( -/obj/machinery/conveyor/holodeck{ - dir = 5; - id = "holocoaster"; - movedir = null; - verted = -1 - }, -/turf/open/floor/holofloor/asteroid, -/area/holodeck/rec_center/rollercoaster) +/turf/open/floor/holofloor, +/area/holodeck/rec_center/school) "dN" = ( /obj/machinery/conveyor/holodeck{ dir = 8; id = "holocoaster" }, /turf/open/floor/holofloor/asteroid, -/area/holodeck/rec_center/rollercoaster) +/area/holodeck/rec_center/school) "dO" = ( /obj/machinery/conveyor/holodeck{ dir = 6; @@ -1271,7 +1213,7 @@ verted = -1 }, /turf/open/floor/holofloor/asteroid, -/area/holodeck/rec_center/rollercoaster) +/area/holodeck/rec_center/school) "dP" = ( /turf/open/floor/holofloor{ dir = 8; @@ -1287,7 +1229,6 @@ }, /turf/open/floor/holofloor{ icon_state = "white"; - dir = 9 }, /area/holodeck/rec_center/firingrange) "dR" = ( @@ -1296,7 +1237,6 @@ }, /turf/open/floor/holofloor{ icon_state = "white"; - dir = 1 }, /area/holodeck/rec_center/firingrange) "dS" = ( @@ -1308,7 +1248,6 @@ }, /turf/open/floor/holofloor{ icon_state = "white"; - dir = 5 }, /area/holodeck/rec_center/firingrange) "dT" = ( @@ -1502,10 +1441,13 @@ id = "holocoaster" }, /turf/open/floor/holofloor/asteroid, -/area/holodeck/rec_center/rollercoaster) +/area/holodeck/rec_center/school) "em" = ( -/turf/open/floor/holofloor/asteroid, -/area/holodeck/rec_center/rollercoaster) +/obj/structure/table/wood, +/obj/item/folder, +/obj/item/melee/classic_baton/telescopic, +/turf/open/floor/holofloor, +/area/holodeck/rec_center/school) "en" = ( /obj/machinery/conveyor/holodeck{ dir = 1; @@ -1513,7 +1455,7 @@ layer = 2.5 }, /turf/open/floor/holofloor/asteroid, -/area/holodeck/rec_center/rollercoaster) +/area/holodeck/rec_center/school) "eo" = ( /obj/structure/window/reinforced{ dir = 8 @@ -1638,7 +1580,7 @@ "eF" = ( /obj/item/shovel, /turf/open/floor/holofloor/asteroid, -/area/holodeck/rec_center/rollercoaster) +/area/holodeck/rec_center/school) "eG" = ( /obj/structure/window/reinforced{ dir = 8 @@ -1808,14 +1750,14 @@ name = "coaster car" }, /turf/open/floor/holofloor/asteroid, -/area/holodeck/rec_center/rollercoaster) +/area/holodeck/rec_center/school) "fg" = ( -/obj/machinery/conveyor_switch/oneway{ - convdir = -1; - id = "holocoaster" - }, -/turf/open/floor/holofloor/asteroid, -/area/holodeck/rec_center/rollercoaster) +/obj/structure/table, +/obj/item/paper, +/obj/item/pen, +/obj/item/clothing/under/schoolgirl/orange, +/turf/open/floor/holofloor, +/area/holodeck/rec_center/school) "fh" = ( /obj/structure/window/reinforced, /turf/open/floor/holofloor/plating, @@ -1896,13 +1838,13 @@ /turf/open/floor/holofloor/plating, /area/holodeck/rec_center/kobayashi) "fr" = ( -/obj/structure/closet/crate/miningcar{ - can_buckle = 1; - desc = "Great for mining!"; - name = "minecart" - }, -/turf/open/floor/holofloor/asteroid, -/area/holodeck/rec_center/rollercoaster) +/obj/structure/table, +/obj/item/paper, +/obj/item/pen, +/obj/item/clothing/under/schoolgirl, +/obj/item/toy/katana, +/turf/open/floor/holofloor, +/area/holodeck/rec_center/school) "fs" = ( /obj/structure/table/reinforced, /obj/machinery/recharger, @@ -2038,14 +1980,14 @@ verted = -1 }, /turf/open/floor/holofloor/asteroid, -/area/holodeck/rec_center/rollercoaster) +/area/holodeck/rec_center/school) "fI" = ( /obj/machinery/conveyor/holodeck{ dir = 4; id = "holocoaster" }, /turf/open/floor/holofloor/asteroid, -/area/holodeck/rec_center/rollercoaster) +/area/holodeck/rec_center/school) "fJ" = ( /obj/machinery/conveyor/holodeck{ dir = 10; @@ -2053,7 +1995,7 @@ verted = -1 }, /turf/open/floor/holofloor/asteroid, -/area/holodeck/rec_center/rollercoaster) +/area/holodeck/rec_center/school) "fK" = ( /obj/item/target, /obj/item/target/clown, @@ -3081,7 +3023,7 @@ "je" = ( /obj/machinery/conveyor{ dir = 1; - id = "QMLoad2"; + id = "XCCQMLoad2"; movedir = 2 }, /obj/effect/turf_decal/stripes/line{ @@ -3092,7 +3034,7 @@ "jf" = ( /obj/machinery/conveyor_switch/oneway{ convdir = 1; - id = "QMLoad2"; + id = "XCCQMLoad2"; pixel_x = 6 }, /turf/open/floor/plasteel/brown{ @@ -3149,13 +3091,13 @@ /obj/machinery/door/poddoor{ density = 1; icon_state = "closed"; - id = "QMLoaddoor2"; + id = "XCCQMLoaddoor2"; name = "Supply Dock Loading Door"; opacity = 1 }, /obj/machinery/conveyor{ dir = 4; - id = "QMLoad2"; + id = "XCCQMLoad2"; movedir = 8 }, /obj/effect/turf_decal/stripes/end{ @@ -3167,7 +3109,7 @@ /obj/structure/plasticflaps, /obj/machinery/conveyor{ dir = 4; - id = "QMLoad2"; + id = "XCCQMLoad2"; movedir = 8 }, /obj/effect/turf_decal/stripes/line{ @@ -3179,13 +3121,13 @@ /obj/machinery/door/poddoor{ density = 1; icon_state = "closed"; - id = "QMLoaddoor2"; + id = "XCCQMLoaddoor2"; name = "Supply Dock Loading Door"; opacity = 1 }, /obj/machinery/conveyor{ dir = 4; - id = "QMLoad2"; + id = "XCCQMLoad2"; movedir = 8 }, /obj/effect/turf_decal/stripes/line{ @@ -3196,7 +3138,7 @@ "jo" = ( /obj/machinery/conveyor{ dir = 1; - id = "QMLoad2"; + id = "XCCQMLoad2"; movedir = 2 }, /obj/effect/turf_decal/stripes/end, @@ -3266,7 +3208,7 @@ /area/centcom/control) "jz" = ( /obj/machinery/button/door{ - id = "QMLoaddoor"; + id = "XCCQMLoaddoor"; layer = 4; name = "Loading Doors"; pixel_x = -27; @@ -3274,7 +3216,7 @@ }, /obj/machinery/button/door{ dir = 2; - id = "QMLoaddoor2"; + id = "XCCQMLoaddoor2"; layer = 4; name = "Loading Doors"; pixel_x = -27; @@ -3353,13 +3295,13 @@ /obj/machinery/door/poddoor{ density = 1; icon_state = "closed"; - id = "QMLoaddoor"; + id = "XCCQMLoaddoor"; name = "Supply Dock Loading Door"; opacity = 1 }, /obj/machinery/conveyor{ dir = 8; - id = "QMLoad" + id = "XCCQMLoad" }, /obj/effect/turf_decal/stripes/end{ dir = 8 @@ -3370,7 +3312,7 @@ /obj/structure/plasticflaps, /obj/machinery/conveyor{ dir = 8; - id = "QMLoad" + id = "XCCQMLoad" }, /obj/effect/turf_decal/stripes/line{ dir = 2 @@ -3381,13 +3323,13 @@ /obj/machinery/door/poddoor{ density = 1; icon_state = "closed"; - id = "QMLoaddoor"; + id = "XCCQMLoaddoor"; name = "Supply Dock Loading Door"; opacity = 1 }, /obj/machinery/conveyor{ dir = 8; - id = "QMLoad" + id = "XCCQMLoad" }, /obj/effect/turf_decal/stripes/line{ dir = 2 @@ -3397,7 +3339,7 @@ "jM" = ( /obj/machinery/conveyor{ dir = 8; - id = "QMLoad" + id = "XCCQMLoad" }, /obj/effect/turf_decal/stripes/end{ dir = 1 @@ -3418,7 +3360,7 @@ "jP" = ( /obj/machinery/conveyor{ dir = 1; - id = "QMLoad"; + id = "XCCQMLoad"; movedir = 2 }, /obj/effect/turf_decal/stripes/line{ @@ -3429,7 +3371,7 @@ "jQ" = ( /obj/machinery/conveyor_switch/oneway{ convdir = 1; - id = "QMLoad"; + id = "XCCQMLoad"; pixel_x = 6 }, /turf/open/floor/plasteel/brown{ @@ -8091,7 +8033,7 @@ /obj/docking_port/mobile/assault_pod{ dwidth = 3; name = "steel rain"; - port_angle = 90; + port_direction = 4; preferred_direction = 4 }, /turf/open/floor/plating, @@ -13647,6 +13589,80 @@ }, /turf/open/floor/plating/asteroid/snow/airless, /area/syndicate_mothership) +"QH" = ( +/obj/structure/table/wood, +/obj/item/toy/crayon/white, +/turf/open/floor/holofloor, +/area/holodeck/rec_center/school) +"QI" = ( +/obj/structure/table/wood, +/obj/item/reagent_containers/food/snacks/grown/apple, +/turf/open/floor/holofloor, +/area/holodeck/rec_center/school) +"QJ" = ( +/obj/structure/table, +/obj/item/paper, +/obj/item/pen, +/obj/item/clothing/under/schoolgirl, +/turf/open/floor/holofloor, +/area/holodeck/rec_center/school) +"QK" = ( +/obj/structure/table, +/obj/item/paper, +/obj/item/pen, +/obj/item/clothing/under/schoolgirl/green, +/turf/open/floor/holofloor, +/area/holodeck/rec_center/school) +"QL" = ( +/obj/structure/chair{ + dir = 1 + }, +/turf/open/floor/holofloor, +/area/holodeck/rec_center/school) +"QM" = ( +/obj/structure/chair{ + dir = 1 + }, +/turf/open/floor/holofloor, +/area/holodeck/rec_center/school) +"QN" = ( +/obj/structure/table, +/obj/item/paper, +/obj/item/pen, +/obj/item/clothing/under/schoolgirl/red, +/turf/open/floor/holofloor, +/area/holodeck/rec_center/school) +"QO" = ( +/obj/structure/chair{ + dir = 1 + }, +/turf/open/floor/holofloor, +/area/holodeck/rec_center/school) +"QP" = ( +/obj/structure/chair{ + dir = 1 + }, +/turf/open/floor/holofloor, +/area/holodeck/rec_center/school) +"QQ" = ( +/obj/structure/table, +/obj/item/paper, +/obj/item/pen, +/obj/item/clothing/under/schoolgirl/green, +/turf/open/floor/holofloor, +/area/holodeck/rec_center/school) +"QR" = ( +/obj/structure/chair{ + dir = 1 + }, +/turf/open/floor/holofloor, +/area/holodeck/rec_center/school) +"QS" = ( +/obj/structure/chair{ + dir = 1 + }, +/turf/open/floor/holofloor, +/area/holodeck/rec_center/school) (1,1,1) = {" aa @@ -40574,7 +40590,7 @@ AR Ay Ay Ay -CN +CL CV CV zV @@ -69964,7 +69980,7 @@ eK eL fi fv -fC +dz fN aa aa @@ -70221,7 +70237,7 @@ eL eK fj fw -fC +dz fN aa aa @@ -70478,7 +70494,7 @@ eK eL fi fx -fC +dz fN aa aa @@ -70704,16 +70720,16 @@ aa "} (223,1,1) = {" ac -ak -az -az -ak -az -az -ak -az -az -ak +aj +aj +aj +aj +aj +aj +aj +aj +aj +aj bl bp bH @@ -70735,7 +70751,7 @@ eL eK fj fy -fC +dz fN ab ab @@ -70964,10 +70980,10 @@ ac al aA aJ -ak +aj aJ aJ -ak +aj aJ aA be @@ -70992,7 +71008,7 @@ eK eL fi fv -fC +dz fN ab fR @@ -71488,13 +71504,13 @@ aR bl bq bI -bX -bJ +cl +cl ck cy -bJ +cl cV -de +cl dj ac dA @@ -71744,14 +71760,14 @@ bc bf bl br -bJ -bJ -bJ cl -cz -bJ +cl +cl +cl +cl +cl cW -df +cl dk ac dB @@ -72001,12 +72017,12 @@ bb bg bl bs -bJ +cl bZ ci cm cA -bJ +cl cX dg dl @@ -72258,14 +72274,14 @@ bb bg bl bt -bJ +cl ca ci -bJ -bJ -bJ -bJ -dh +cl +cl +cl +cl +cl dm ac dD @@ -72515,13 +72531,13 @@ bd bh bl bu -bK +cl cb ci cn cB -bJ -bJ +cl +cl cl dn ac @@ -76121,18 +76137,18 @@ cG bQ bQ bQ -ds +bB bl dM -el -el -el -el -ff -ff -ff -ff -fH +dM +dM +dM +dM +dM +dM +dM +dM +dM fN Ij Il @@ -76380,16 +76396,16 @@ bQ bQ dt bl -dN -em -eF -em +dM em +dM +QJ +QL fg -em -em -em -fI +QO +QQ +QR +dM fN fQ fQ @@ -76637,16 +76653,16 @@ bQ bQ dt bl -dN -em -em -em -em -em -em -em -em -fI +dM +QH +dM +dM +dM +dM +dM +dM +dM +dM fN fP fV @@ -76894,16 +76910,16 @@ bQ bQ dt bl -dN -em -em -em -em -em -em +dM +QI +dM +QK +QM +QN +QP fr -em -fI +QS +dM fN ab fT @@ -77149,18 +77165,18 @@ cG bQ bQ bQ -du +bz bl -dO -en -en -en -en -en -en -en -en -fJ +dM +dM +dM +dM +dM +dM +dM +dM +dM +dM fN ab ab @@ -79182,4 +79198,4 @@ aa aa HT HT -"} +"} \ No newline at end of file diff --git a/_maps/shuttles/cargo_birdboat.dmm b/_maps/shuttles/cargo_birdboat.dmm index f05af797d1..0644e9dd70 100644 --- a/_maps/shuttles/cargo_birdboat.dmm +++ b/_maps/shuttles/cargo_birdboat.dmm @@ -1,273 +1,591 @@ //MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE -"a" = ( -/turf/closed/wall/mineral/titanium/overspace, -/area/shuttle/supply) -"b" = ( +"aa" = ( +/turf/open/space, +/area/space) +"ab" = ( /turf/closed/wall/mineral/titanium, -/area/shuttle/supply) -"c" = ( -/turf/closed/wall/mineral/titanium, -/area/shuttle/supply) -"d" = ( -/turf/closed/wall/mineral/titanium, -/area/shuttle/supply) -"e" = ( -/obj/machinery/conveyor{ - dir = 2; - id = "cargoshuttle"; - name = "cargo shuttle conveyor belt" - }, -/turf/open/floor/mineral/titanium/blue, -/area/shuttle/supply) -"f" = ( -/obj/machinery/conveyor{ - dir = 8; - id = "cargoshuttle"; - name = "cargo shuttle conveyor belt" - }, -/turf/open/floor/mineral/titanium/blue, -/area/shuttle/supply) -"g" = ( -/obj/machinery/conveyor{ - dir = 4; - id = "cargoshuttle"; - name = "cargo shuttle conveyor belt" - }, -/turf/open/floor/mineral/titanium/blue, -/area/shuttle/supply) -"h" = ( -/obj/machinery/conveyor{ - dir = 9; - id = "cargoshuttle"; - name = "cargo shuttle conveyor belt" - }, -/turf/open/floor/mineral/titanium/blue, -/area/shuttle/supply) -"i" = ( -/obj/machinery/conveyor{ - dir = 1; - id = "cargoshuttle"; - name = "cargo shuttle conveyor belt" - }, -/turf/open/floor/mineral/titanium/blue, -/area/shuttle/supply) -"j" = ( -/obj/machinery/conveyor{ - dir = 10; - id = "cargoshuttle"; - name = "cargo shuttle conveyor belt" - }, -/turf/open/floor/mineral/titanium/blue, -/area/shuttle/supply) -"k" = ( -/obj/machinery/conveyor{ - dir = 6; - id = "cargoshuttle"; - name = "cargo shuttle conveyor belt" - }, -/turf/open/floor/mineral/titanium/blue, -/area/shuttle/supply) -"l" = ( -/obj/machinery/door/poddoor{ - id = "QMLoaddoor2"; - name = "supply dock loading door" - }, -/obj/machinery/conveyor{ - dir = 8; - id = "cargoshuttle"; - name = "cargo shuttle conveyor belt" - }, +/area/shuttle/escape) +"ac" = ( +/obj/effect/spawner/structure/window/shuttle, /turf/open/floor/plating, -/area/shuttle/supply) -"m" = ( +/area/shuttle/escape) +"ad" = ( +/obj/structure/table, +/obj/item/scalpel, +/obj/item/retractor{ + pixel_y = 5 + }, +/obj/item/hemostat, +/turf/open/floor/plasteel/white, +/area/shuttle/escape) +"ae" = ( +/obj/structure/table, +/obj/item/cautery, +/obj/item/surgicaldrill, +/obj/item/circular_saw{ + pixel_y = 9 + }, +/turf/open/floor/plasteel/white, +/area/shuttle/escape) +"af" = ( +/turf/open/floor/plasteel/white, +/area/shuttle/escape) +"ag" = ( +/obj/structure/shuttle/engine/propulsion/right{ + dir = 4 + }, +/turf/open/floor/plating/airless, +/area/shuttle/escape) +"ah" = ( +/turf/closed/wall/mineral/titanium/nodiagonal, +/area/shuttle/escape) +"ai" = ( +/obj/machinery/computer/emergency_shuttle, /turf/open/floor/mineral/titanium/blue, -/area/shuttle/supply) -"n" = ( -/turf/open/floor/mineral/titanium, -/area/shuttle/supply) -"o" = ( -/obj/machinery/door/airlock/titanium{ - name = "Supply Shuttle Airlock"; - req_access_txt = "31" +/area/shuttle/escape) +"aj" = ( +/turf/open/floor/mineral/titanium/blue, +/area/shuttle/escape) +"ak" = ( +/obj/item/twohanded/required/kirbyplants{ + icon_state = "plant-22" }, -/turf/open/floor/plating, -/area/shuttle/supply) -"p" = ( -/obj/machinery/button/door{ - dir = 2; - id = "QMLoaddoor2"; - name = "Loading Doors"; - pixel_x = 24; - pixel_y = 8 - }, -/obj/machinery/button/door{ - id = "QMLoaddoor"; - name = "Loading Doors"; - pixel_x = 24; - pixel_y = -8 - }, -/obj/machinery/conveyor_switch/oneway{ - id = "cargoshuttle" +/turf/open/floor/mineral/titanium/blue, +/area/shuttle/escape) +"al" = ( +/obj/structure/chair, +/turf/open/floor/mineral/plastitanium/brig, +/area/shuttle/escape) +"am" = ( +/obj/structure/chair, +/obj/machinery/light{ + dir = 1 }, +/turf/open/floor/mineral/plastitanium/brig, +/area/shuttle/escape) +"an" = ( +/obj/structure/table/optable, +/obj/item/surgical_drapes, +/turf/open/floor/plasteel/white, +/area/shuttle/escape) +"ao" = ( /obj/machinery/light{ dir = 4 }, -/turf/open/floor/mineral/titanium, -/area/shuttle/supply) -"q" = ( -/obj/machinery/door/airlock/titanium{ - name = "Supply Shuttle Airlock"; - req_access_txt = "31" +/turf/open/floor/plasteel/white, +/area/shuttle/escape) +"ap" = ( +/obj/structure/shuttle/engine/propulsion{ + dir = 4 }, -/obj/docking_port/mobile/supply{ - dwidth = 3; - width = 10; - timid = 1 - }, -/turf/open/floor/plating, -/area/shuttle/supply) -"r" = ( -/obj/machinery/door/poddoor{ - id = "QMLoaddoor"; - name = "supply dock loading door" - }, -/obj/machinery/conveyor{ - dir = 4; - id = "cargoshuttle"; - name = "cargo shuttle conveyor belt" - }, -/turf/open/floor/plating, -/area/shuttle/supply) -"s" = ( -/turf/closed/wall/mineral/titanium/nodiagonal, -/area/shuttle/supply) -"t" = ( -/turf/closed/wall/mineral/titanium, -/area/shuttle/supply) -"u" = ( -/obj/structure/window/reinforced{ - dir = 1 - }, -/obj/structure/shuttle/engine/heater, /turf/open/floor/plating/airless, -/area/shuttle/supply) -"v" = ( -/turf/closed/wall/mineral/titanium, -/area/shuttle/supply) -"w" = ( -/turf/open/space, -/area/space) -"x" = ( -/obj/structure/shuttle/engine/propulsion/burst/left, -/turf/open/floor/plating/airless, -/area/shuttle/supply) -"y" = ( -/obj/structure/shuttle/engine/propulsion, -/turf/open/floor/plating/airless, -/area/shuttle/supply) -"z" = ( -/obj/structure/shuttle/engine/propulsion/burst/right, -/turf/open/floor/plating/airless, -/area/shuttle/supply) -"A" = ( -/obj/machinery/conveyor{ - dir = 8; - id = "cargoshuttle"; - name = "cargo shuttle conveyor belt" - }, -/obj/machinery/light{ - dir = 1 - }, +/area/shuttle/escape) +"aq" = ( +/obj/machinery/computer/communications, /turf/open/floor/mineral/titanium/blue, -/area/shuttle/supply) -"B" = ( -/obj/machinery/light{ +/area/shuttle/escape) +"ar" = ( +/obj/structure/chair{ dir = 8 }, /turf/open/floor/mineral/titanium/blue, -/area/shuttle/supply) +/area/shuttle/escape) +"as" = ( +/obj/machinery/door/airlock/glass_command{ + name = "bridge door"; + req_access_txt = "19" + }, +/turf/open/floor/mineral/titanium/blue, +/area/shuttle/escape) +"at" = ( +/turf/open/floor/mineral/plastitanium/brig, +/area/shuttle/escape) +"au" = ( +/obj/structure/shuttle/engine/propulsion/left{ + dir = 4 + }, +/turf/open/floor/plating/airless, +/area/shuttle/escape) +"av" = ( +/obj/machinery/light, +/turf/open/floor/mineral/titanium/blue, +/area/shuttle/escape) +"aw" = ( +/obj/structure/extinguisher_cabinet{ + pixel_y = -32 + }, +/turf/open/floor/mineral/titanium/blue, +/area/shuttle/escape) +"ax" = ( +/obj/structure/table, +/obj/machinery/recharger{ + active_power_usage = 0; + idle_power_usage = 0; + pixel_y = 4; + use_power = 0 + }, +/turf/open/floor/mineral/plastitanium/brig, +/area/shuttle/escape) +"ay" = ( +/obj/structure/table, +/obj/item/storage/box/handcuffs, +/turf/open/floor/mineral/plastitanium/brig, +/area/shuttle/escape) +"az" = ( +/obj/machinery/door/airlock/glass_security{ + name = "security airlock"; + req_access_txt = "63" + }, +/turf/open/floor/mineral/plastitanium/brig, +/area/shuttle/escape) +"aA" = ( +/obj/machinery/door/airlock/glass, +/turf/open/floor/plasteel/white, +/area/shuttle/escape) +"aB" = ( +/obj/item/twohanded/required/kirbyplants{ + icon_state = "plant-21"; + layer = 4.1 + }, +/turf/open/floor/mineral/titanium, +/area/shuttle/escape) +"aC" = ( +/turf/open/floor/mineral/titanium, +/area/shuttle/escape) +"aD" = ( +/turf/open/floor/plasteel/black, +/area/shuttle/escape) +"aE" = ( +/obj/structure/chair{ + dir = 4 + }, +/turf/open/floor/plasteel/black, +/area/shuttle/escape) +"aF" = ( +/obj/structure/table, +/obj/machinery/light{ + dir = 1 + }, +/turf/open/floor/plasteel/black, +/area/shuttle/escape) +"aG" = ( +/obj/machinery/door/airlock/titanium, +/turf/open/floor/mineral/titanium, +/area/shuttle/escape) +"aH" = ( +/obj/structure/chair{ + dir = 8 + }, +/turf/open/floor/plasteel/black, +/area/shuttle/escape) +"aI" = ( +/obj/structure/table, +/obj/item/reagent_containers/food/snacks/boiledspaghetti{ + name = "pasghetti"; + pixel_x = 4; + pixel_y = 7 + }, +/turf/open/floor/plasteel/black, +/area/shuttle/escape) +"aJ" = ( +/obj/machinery/light/small, +/turf/open/floor/mineral/titanium, +/area/shuttle/escape) +"aK" = ( +/obj/machinery/door/airlock/titanium, +/obj/docking_port/mobile/emergency{ + dheight = 0; + dir = 8; + dwidth = 6; + height = 18; + port_direction = 4; + width = 14; + timid = 1; + name = "Birdboat emergency escape shuttle" + }, +/turf/open/floor/mineral/titanium, +/area/shuttle/escape) +"aL" = ( +/obj/structure/table, +/turf/open/floor/plasteel/black, +/area/shuttle/escape) +"aM" = ( +/obj/structure/table, +/obj/item/reagent_containers/food/snacks/chocolatebar, +/turf/open/floor/plasteel/black, +/area/shuttle/escape) +"aN" = ( +/obj/structure/chair{ + dir = 1 + }, +/obj/structure/window/reinforced, +/turf/open/floor/plasteel/black, +/area/shuttle/escape) +"aO" = ( +/obj/structure/chair{ + dir = 1 + }, +/obj/structure/window/reinforced, +/obj/machinery/light{ + dir = 4 + }, +/turf/open/floor/plasteel/black, +/area/shuttle/escape) +"aP" = ( +/obj/structure/chair, +/obj/structure/window/reinforced{ + dir = 1; + pixel_y = 2 + }, +/turf/open/floor/plasteel/black, +/area/shuttle/escape) +"aQ" = ( +/obj/structure/extinguisher_cabinet{ + pixel_x = -27 + }, +/turf/open/floor/plasteel/white, +/area/shuttle/escape) +"aR" = ( +/obj/structure/table/glass, +/obj/item/storage/firstaid/fire{ + pixel_x = 5; + pixel_y = 5 + }, +/obj/item/storage/firstaid/toxin, +/turf/open/floor/plasteel/white, +/area/shuttle/escape) +"aS" = ( +/obj/structure/chair{ + dir = 1 + }, +/turf/open/floor/plasteel/black, +/area/shuttle/escape) +"aT" = ( +/obj/structure/chair{ + dir = 1 + }, +/obj/machinery/light, +/turf/open/floor/plasteel/black, +/area/shuttle/escape) +"aU" = ( +/obj/structure/table/glass, +/obj/item/storage/firstaid/brute{ + pixel_x = 5; + pixel_y = 5 + }, +/obj/item/storage/firstaid/brute, +/obj/machinery/light{ + dir = 4 + }, +/turf/open/floor/plasteel/white, +/area/shuttle/escape) +"aV" = ( +/obj/structure/extinguisher_cabinet{ + pixel_y = -32 + }, +/turf/open/floor/mineral/titanium, +/area/shuttle/escape) +"aW" = ( +/obj/structure/chair, +/turf/open/floor/plasteel/black, +/area/shuttle/escape) +"aX" = ( +/obj/machinery/sleeper{ + dir = 1 + }, +/turf/open/floor/plasteel/white, +/area/shuttle/escape) +"aY" = ( +/obj/structure/table/glass, +/obj/item/defibrillator/loaded, +/turf/open/floor/plasteel/white, +/area/shuttle/escape) (1,1,1) = {" -b -b -b -b -b -b -b -b -b -w +aa +aa +ab +ab +ac +ab +ac +ac +ac +ac +ac +ab +aa +aa "} (2,1,1) = {" -b -e -g -e -m -B -m -g -b -x +aa +ab +ah +aq +ak +ac +aB +aH +aH +aH +aB +ah +ab +aa "} (3,1,1) = {" -b -f -g -f -m -m -m -g -u -y +aa +ab +ai +ar +aj +as +aC +aC +aC +aC +aC +aS +ab +aa "} (4,1,1) = {" -b -A -g -f -m -m -m -g -u -y +aa +ac +aj +aj +av +ab +aD +aD +aL +aC +aC +aS +ab +aa "} (5,1,1) = {" -b -f -h -j -m -m -m -g -u -y +aa +ac +aj +aj +aw +ab +aE +aE +aM +aC +aC +aS +ab +aa "} (6,1,1) = {" -b -f -i -k -n -p -n -g -b -z +aa +ab +ak +aj +ak +ab +aF +aI +aL +aC +aC +aT +ah +ab "} (7,1,1) = {" -b -b -b -l -o -b -q -r -b -w +aa +ab +ab +as +ac +ab +aC +aC +aC +aC +aC +aC +aB +ab "} +(8,1,1) = {" +aa +ab +al +at +at +ac +aB +aC +aC +aC +aC +aC +aV +ab +"} +(9,1,1) = {" +aa +ab +al +at +at +az +aC +aC +aN +aP +aC +aC +aW +ac +"} +(10,1,1) = {" +aa +ab +am +at +at +ac +aC +aC +aN +aP +aC +aC +aW +ac +"} +(11,1,1) = {" +aa +ab +al +at +ax +ab +aC +aC +aN +aP +aC +aC +aW +ac +"} +(12,1,1) = {" +aa +ab +al +at +ay +ab +aC +aC +aO +aP +aC +aC +aB +ab +"} +(13,1,1) = {" +ab +ab +ab +ab +ab +ah +aC +aC +ah +ab +aA +ac +ab +ab +"} +(14,1,1) = {" +ab +ad +an +af +af +aA +aC +aC +aA +aQ +af +af +aX +ab +"} +(15,1,1) = {" +ab +ae +af +af +af +aA +aC +aC +aA +af +af +af +af +ab +"} +(16,1,1) = {" +ab +af +ao +af +ab +ab +aG +aG +ab +ab +aR +aU +aY +ab +"} +(17,1,1) = {" +ab +ab +ab +ab +ab +ab +aC +aJ +ab +ab +ab +ab +ab +ab +"} +(18,1,1) = {" +ab +ag +ap +au +ab +ab +aG +aK +ab +ab +ag +ap +au +ab +"} \ No newline at end of file diff --git a/_maps/shuttles/emergency_birdboat.dmm b/_maps/shuttles/emergency_birdboat.dmm index dd4ffeac54..0644e9dd70 100644 --- a/_maps/shuttles/emergency_birdboat.dmm +++ b/_maps/shuttles/emergency_birdboat.dmm @@ -198,7 +198,7 @@ dir = 8; dwidth = 6; height = 18; - port_angle = 90; + port_direction = 4; width = 14; timid = 1; name = "Birdboat emergency escape shuttle" @@ -588,4 +588,4 @@ ag ap au ab -"} +"} \ No newline at end of file diff --git a/_maps/shuttles/emergency_cere.dmm b/_maps/shuttles/emergency_cere.dmm index 0aaccabb3e..887a43aa69 100644 --- a/_maps/shuttles/emergency_cere.dmm +++ b/_maps/shuttles/emergency_cere.dmm @@ -540,7 +540,7 @@ dwidth = 15; height = 20; name = "Cere emergency shuttle"; - port_angle = 90; + port_direction = 4; preferred_direction = 2; width = 42 }, @@ -2075,4 +2075,4 @@ aa aa aa aa -"} +"} \ No newline at end of file diff --git a/_maps/shuttles/emergency_delta.dmm b/_maps/shuttles/emergency_delta.dmm index 48cd143c44..0b535fe457 100644 --- a/_maps/shuttles/emergency_delta.dmm +++ b/_maps/shuttles/emergency_delta.dmm @@ -444,7 +444,7 @@ name = "Delta emergency shuttle"; width = 30; preferred_direction = 2; - port_angle = 90 + port_direction = 4 }, /turf/open/floor/plating, /area/shuttle/escape) @@ -1669,4 +1669,4 @@ aa aa aa aa -"} +"} \ No newline at end of file diff --git a/_maps/shuttles/emergency_pubby.dmm b/_maps/shuttles/emergency_pubby.dmm index 5e14226d56..8a5f05cc01 100644 --- a/_maps/shuttles/emergency_pubby.dmm +++ b/_maps/shuttles/emergency_pubby.dmm @@ -279,7 +279,7 @@ dwidth = 4; height = 15; name = "Pubby emergency shuttle"; - port_angle = 90; + port_direction = 4; width = 18 }, /turf/open/floor/plating, @@ -638,4 +638,4 @@ ab ab ab aa -"} +"} \ No newline at end of file diff --git a/_maps/shuttles/ferry_base.dmm b/_maps/shuttles/ferry_base.dmm index f227228b85..8e33236727 100644 --- a/_maps/shuttles/ferry_base.dmm +++ b/_maps/shuttles/ferry_base.dmm @@ -57,7 +57,7 @@ id = "ferry"; name = "ferry shuttle"; roundstart_move = "ferry_away"; - port_angle = 180; + port_direction = 2; width = 5; timid = 1 }, @@ -170,4 +170,4 @@ d m d c -"} +"} \ No newline at end of file diff --git a/_maps/shuttles/ferry_lighthouse.dmm b/_maps/shuttles/ferry_lighthouse.dmm index d7880e1164..87f3d30e0e 100644 --- a/_maps/shuttles/ferry_lighthouse.dmm +++ b/_maps/shuttles/ferry_lighthouse.dmm @@ -184,7 +184,7 @@ name = "The Lighthouse"; roundstart_move = "ferry_away"; timid = 1; - port_angle = 180; + port_direction = 2; width = 16 }, /turf/open/floor/mineral/titanium/blue, diff --git a/_maps/shuttles/ferry_meat.dmm b/_maps/shuttles/ferry_meat.dmm index 6384f0e057..bb21220f03 100644 --- a/_maps/shuttles/ferry_meat.dmm +++ b/_maps/shuttles/ferry_meat.dmm @@ -113,7 +113,7 @@ id = "ferry"; name = "ferry shuttle"; roundstart_move = "ferry_away"; - port_angle = 180; + port_direction = 2; width = 5; timid = 1 }, diff --git a/_maps/shuttles/whiteship_box.dmm b/_maps/shuttles/whiteship_box.dmm index a52eb6aa36..338212e727 100644 --- a/_maps/shuttles/whiteship_box.dmm +++ b/_maps/shuttles/whiteship_box.dmm @@ -18,7 +18,7 @@ id = "whiteship"; launch_status = 0; name = "NT Medical Ship"; - port_angle = -90; + port_direction = 8; preferred_direction = 4; roundstart_move = "whiteship_away"; timid = null; diff --git a/_maps/shuttles/whiteship_cere.dmm b/_maps/shuttles/whiteship_cere.dmm index ce705d1850..913a9e65b8 100644 --- a/_maps/shuttles/whiteship_cere.dmm +++ b/_maps/shuttles/whiteship_cere.dmm @@ -21,7 +21,7 @@ id = "whiteship"; launch_status = 0; name = "NT Recovery White-Ship"; - port_angle = -90; + port_direction = 8; preferred_direction = 1; roundstart_move = "whiteship_away"; width = 16 diff --git a/_maps/shuttles/whiteship_meta.dmm b/_maps/shuttles/whiteship_meta.dmm index 67847a4b9f..7ac0a05c54 100644 --- a/_maps/shuttles/whiteship_meta.dmm +++ b/_maps/shuttles/whiteship_meta.dmm @@ -27,7 +27,7 @@ id = "whiteship"; launch_status = 0; name = "NT Recovery White-Ship"; - port_angle = -90; + port_direction = 8; preferred_direction = 4; roundstart_move = "whiteship_away"; width = 27 diff --git a/_maps/shuttles/whiteship_pubby.dmm b/_maps/shuttles/whiteship_pubby.dmm index 49c4f1dde0..e67318005c 100644 --- a/_maps/shuttles/whiteship_pubby.dmm +++ b/_maps/shuttles/whiteship_pubby.dmm @@ -92,7 +92,7 @@ id = "whiteship"; launch_status = 0; name = "White Ship"; - port_angle = 90; + port_direction = 4; preferred_direction = 1; roundstart_move = "whiteship_away"; timid = 1; diff --git a/citadel/tools/merge-upstream-pull-request.sh b/citadel/tools/merge-upstream-pull-request.sh index 69ee3e91c6..a034b5c450 100755 --- a/citadel/tools/merge-upstream-pull-request.sh +++ b/citadel/tools/merge-upstream-pull-request.sh @@ -1,4 +1,11 @@ #!/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 @@ -37,6 +44,14 @@ 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 @@ -54,15 +69,16 @@ git checkout -b "$BASE_BRANCH_NAME$1" readonly MERGE_SHA=$(curl --silent "$BASE_PULL_URL/$1" | jq '.merge_commit_sha' -r) # Get the commits -readonly COMMITS=$(curl "$BASE_PULL_URL/$1/commits" | jq '.[].sha' -r) +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 'error: mainline was specified but commit'; then +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 @@ -79,14 +95,16 @@ if echo "$CHERRY_PICK_OUTPUT" | grep 'error: mainline was specified but commit'; 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/admin.dm b/code/__DEFINES/admin.dm index 26a1535e33..c5c79b9610 100644 --- a/code/__DEFINES/admin.dm +++ b/code/__DEFINES/admin.dm @@ -1,74 +1,148 @@ -//A set of constants used to determine which type of mute an admin wishes to apply: -//Please read and understand the muting/automuting stuff before changing these. MUTE_IC_AUTO etc = (MUTE_IC << 1) -//Therefore there needs to be a gap between the flags_1 for the automute flags_1 -#define MUTE_IC 1 -#define MUTE_OOC 2 -#define MUTE_PRAY 4 -#define MUTE_ADMINHELP 8 -#define MUTE_DEADCHAT 16 -#define MUTE_ALL 31 - -//Some constants for DB_Ban -#define BANTYPE_PERMA 1 -#define BANTYPE_TEMP 2 -#define BANTYPE_JOB_PERMA 3 -#define BANTYPE_JOB_TEMP 4 -#define BANTYPE_ANY_FULLBAN 5 //used to locate stuff to unban. - -#define BANTYPE_ADMIN_PERMA 7 -#define BANTYPE_ADMIN_TEMP 8 -#define BANTYPE_ANY_JOB 9 //used to remove jobbans - -//Please don't edit these values without speaking to Errorage first ~Carn -//Admin Permissions -#define R_BUILDMODE 1 -#define R_ADMIN 2 -#define R_BAN 4 -#define R_FUN 8 -#define R_SERVER 16 -#define R_DEBUG 32 -#define R_POSSESS 64 -#define R_PERMISSIONS 128 -#define R_STEALTH 256 -#define R_POLL 512 -#define R_VAREDIT 1024 -#define R_SOUNDS 2048 -#define R_SPAWN 4096 - -#if DM_VERSION > 512 -#error Remove the flag below , its been long enough -#endif -//legacy , remove post 512, it was replaced by R_POLL -#define R_REJUVINATE 2 - -#define R_MAXPERMISSION 4096 //This holds the maximum value for a permission. It is used in iteration, so keep it updated. - -#define ADMIN_QUE(user) "(?)" -#define ADMIN_FLW(user) "(FLW)" -#define ADMIN_PP(user) "(PP)" -#define ADMIN_VV(atom) "(VV)" -#define ADMIN_SM(user) "(SM)" -#define ADMIN_TP(user) "(TP)" -#define ADMIN_KICK(user) "(KICK)" -#define ADMIN_CENTCOM_REPLY(user) "(RPLY)" -#define ADMIN_SYNDICATE_REPLY(user) "(RPLY)" -#define ADMIN_SC(user) "(SC)" -#define ADMIN_SMITE(user) "(SMITE)" -#define ADMIN_LOOKUP(user) "[key_name_admin(user)][ADMIN_QUE(user)]" -#define ADMIN_LOOKUPFLW(user) "[key_name_admin(user)][ADMIN_QUE(user)] [ADMIN_FLW(user)]" -#define ADMIN_SET_SD_CODE "(SETCODE)" -#define ADMIN_FULLMONTY_NONAME(user) "[ADMIN_QUE(user)] [ADMIN_PP(user)] [ADMIN_VV(user)] [ADMIN_SM(user)] [ADMIN_FLW(user)] [ADMIN_TP(user)] [ADMIN_INDIVIDUALLOG(user)] [ADMIN_SMITE(user)]" -#define ADMIN_FULLMONTY(user) "[key_name_admin(user)] [ADMIN_FULLMONTY_NONAME(user)]" -#define ADMIN_JMP(src) "(JMP)" -#define COORD(src) "[src ? "([src.x],[src.y],[src.z])" : "nonexistent location"]" -#define ADMIN_COORDJMP(src) "[src ? "[COORD(src)] [ADMIN_JMP(src)]" : "nonexistent location"]" -#define ADMIN_INDIVIDUALLOG(user) "(LOGS)" - -#define ADMIN_PUNISHMENT_LIGHTNING "Lightning bolt" -#define ADMIN_PUNISHMENT_BRAINDAMAGE "Brain damage" -#define ADMIN_PUNISHMENT_GIB "Gib" -#define ADMIN_PUNISHMENT_BSA "Bluespace Artillery Device" - -#define AHELP_ACTIVE 1 -#define AHELP_CLOSED 2 -#define AHELP_RESOLVED 3 +//A set of constants used to determine which type of mute an admin wishes to apply: +//Please read and understand the muting/automuting stuff before changing these. MUTE_IC_AUTO etc = (MUTE_IC << 1) +//Therefore there needs to be a gap between the flags_1 for the automute flags_1 +#define MUTE_IC 1 +#define MUTE_OOC 2 +#define MUTE_PRAY 4 +#define MUTE_ADMINHELP 8 +#define MUTE_DEADCHAT 16 +#define MUTE_ALL 31 + +//Some constants for DB_Ban +#define BANTYPE_PERMA 1 +#define BANTYPE_TEMP 2 +#define BANTYPE_JOB_PERMA 3 +#define BANTYPE_JOB_TEMP 4 +#define BANTYPE_ANY_FULLBAN 5 //used to locate stuff to unban. + +#define BANTYPE_ADMIN_PERMA 7 +#define BANTYPE_ADMIN_TEMP 8 +#define BANTYPE_ANY_JOB 9 //used to remove jobbans + +//Please don't edit these values without speaking to Errorage first ~Carn +//Admin Permissions +#define R_BUILDMODE 1 +#define R_ADMIN 2 +#define R_BAN 4 +#define R_FUN 8 +#define R_SERVER 16 +#define R_DEBUG 32 +#define R_POSSESS 64 +#define R_PERMISSIONS 128 +#define R_STEALTH 256 +#define R_POLL 512 +#define R_VAREDIT 1024 +#define R_SOUNDS 2048 +#define R_SPAWN 4096 + +#if DM_VERSION > 512 +#error Remove the flag below , its been long enough +#endif +//legacy , remove post 512, it was replaced by R_POLL +#define R_REJUVINATE 2 + +#define R_MAXPERMISSION 4096 //This holds the maximum value for a permission. It is used in iteration, so keep it updated. + +#define ADMIN_QUE(user) "(?)" +#define ADMIN_FLW(user) "(FLW)" +#define ADMIN_PP(user) "(PP)" +#define ADMIN_VV(atom) "(VV)" +#define ADMIN_SM(user) "(SM)" +#define ADMIN_TP(user) "(TP)" +#define ADMIN_KICK(user) "(KICK)" +#define ADMIN_CENTCOM_REPLY(user) "(RPLY)" +#define ADMIN_SYNDICATE_REPLY(user) "(RPLY)" +#define ADMIN_SC(user) "(SC)" +#define ADMIN_SMITE(user) "(SMITE)" +#define ADMIN_LOOKUP(user) "[key_name_admin(user)][ADMIN_QUE(user)]" +#define ADMIN_LOOKUPFLW(user) "[key_name_admin(user)][ADMIN_QUE(user)] [ADMIN_FLW(user)]" +#define ADMIN_SET_SD_CODE "(SETCODE)" +#define ADMIN_FULLMONTY_NONAME(user) "[ADMIN_QUE(user)] [ADMIN_PP(user)] [ADMIN_VV(user)] [ADMIN_SM(user)] [ADMIN_FLW(user)] [ADMIN_TP(user)] [ADMIN_INDIVIDUALLOG(user)] [ADMIN_SMITE(user)]" +#define ADMIN_FULLMONTY(user) "[key_name_admin(user)] [ADMIN_FULLMONTY_NONAME(user)]" +#define ADMIN_JMP(src) "(JMP)" +#define COORD(src) "[src ? "([src.x],[src.y],[src.z])" : "nonexistent location"]" +#define ADMIN_COORDJMP(src) "[src ? "[COORD(src)] [ADMIN_JMP(src)]" : "nonexistent location"]" +#define ADMIN_INDIVIDUALLOG(user) "(LOGS)" + +#define ADMIN_PUNISHMENT_LIGHTNING "Lightning bolt" +#define ADMIN_PUNISHMENT_BRAINDAMAGE "Brain damage" +#define ADMIN_PUNISHMENT_GIB "Gib" +#define ADMIN_PUNISHMENT_BSA "Bluespace Artillery Device" + +#define AHELP_ACTIVE 1 +#define AHELP_CLOSED 2 +#define AHELP_RESOLVED 3 +//A set of constants used to determine which type of mute an admin wishes to apply: +//Please read and understand the muting/automuting stuff before changing these. MUTE_IC_AUTO etc = (MUTE_IC << 1) +//Therefore there needs to be a gap between the flags for the automute flags +#define MUTE_IC 1 +#define MUTE_OOC 2 +#define MUTE_PRAY 4 +#define MUTE_ADMINHELP 8 +#define MUTE_DEADCHAT 16 +#define MUTE_ALL 31 + +//Some constants for DB_Ban +#define BANTYPE_PERMA 1 +#define BANTYPE_TEMP 2 +#define BANTYPE_JOB_PERMA 3 +#define BANTYPE_JOB_TEMP 4 +#define BANTYPE_ANY_FULLBAN 5 //used to locate stuff to unban. + +#define BANTYPE_ADMIN_PERMA 7 +#define BANTYPE_ADMIN_TEMP 8 +#define BANTYPE_ANY_JOB 9 //used to remove jobbans + +//Please don't edit these values without speaking to Errorage first ~Carn +//Admin Permissions +#define R_BUILDMODE 1 +#define R_ADMIN 2 +#define R_BAN 4 +#define R_FUN 8 +#define R_SERVER 16 +#define R_DEBUG 32 +#define R_POSSESS 64 +#define R_PERMISSIONS 128 +#define R_STEALTH 256 +#define R_POLL 512 +#define R_VAREDIT 1024 +#define R_SOUNDS 2048 +#define R_SPAWN 4096 + +#if DM_VERSION > 512 +#error Remove the flag below , its been long enough +#endif +//legacy , remove post 512, it was replaced by R_POLL +#define R_REJUVINATE 2 + +#define R_MAXPERMISSION 4096 //This holds the maximum value for a permission. It is used in iteration, so keep it updated. + +#define ADMIN_QUE(user) "(?)" +#define ADMIN_FLW(user) "(FLW)" +#define ADMIN_PP(user) "(PP)" +#define ADMIN_VV(atom) "(VV)" +#define ADMIN_SM(user) "(SM)" +#define ADMIN_TP(user) "(TP)" +#define ADMIN_KICK(user) "(KICK)" +#define ADMIN_CENTCOM_REPLY(user) "(RPLY)" +#define ADMIN_SYNDICATE_REPLY(user) "(RPLY)" +#define ADMIN_SC(user) "(SC)" +#define ADMIN_SMITE(user) "(SMITE)" +#define ADMIN_LOOKUP(user) "[key_name_admin(user)][ADMIN_QUE(user)]" +#define ADMIN_LOOKUPFLW(user) "[key_name_admin(user)][ADMIN_QUE(user)] [ADMIN_FLW(user)]" +#define ADMIN_SET_SD_CODE "(SETCODE)" +#define ADMIN_FULLMONTY_NONAME(user) "[ADMIN_QUE(user)] [ADMIN_PP(user)] [ADMIN_VV(user)] [ADMIN_SM(user)] [ADMIN_FLW(user)] [ADMIN_TP(user)] [ADMIN_INDIVIDUALLOG(user)] [ADMIN_SMITE(user)]" +#define ADMIN_FULLMONTY(user) "[key_name_admin(user)] [ADMIN_FULLMONTY_NONAME(user)]" +#define ADMIN_JMP(src) "(JMP)" +#define COORD(src) "[src ? "([src.x],[src.y],[src.z])" : "nonexistent location"]" +#define ADMIN_COORDJMP(src) "[src ? "[COORD(src)] [ADMIN_JMP(src)]" : "nonexistent location"]" +#define ADMIN_INDIVIDUALLOG(user) "(LOGS)" + +#define ADMIN_PUNISHMENT_LIGHTNING "Lightning bolt" +#define ADMIN_PUNISHMENT_BRAINDAMAGE "Brain damage" +#define ADMIN_PUNISHMENT_GIB "Gib" +#define ADMIN_PUNISHMENT_BSA "Bluespace Artillery Device" + +#define AHELP_ACTIVE 1 +#define AHELP_CLOSED 2 +#define AHELP_RESOLVED 3 diff --git a/code/__DEFINES/combat.dm b/code/__DEFINES/combat.dm index c088e81c4a..7fa8c2db77 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,9 @@ #define GRAB_NECK 2 #define GRAB_KILL 3 +//slowdown when in softcrit +#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/construction.dm b/code/__DEFINES/construction.dm index 46589408a2..ae3f9f6fe9 100644 --- a/code/__DEFINES/construction.dm +++ b/code/__DEFINES/construction.dm @@ -101,6 +101,7 @@ #define CAT_ROBOT "Robots" #define CAT_MISC "Misc" #define CAT_PRIMAL "Tribal" +#define CAT_CLOTHING "Clothing" #define CAT_FOOD "Foods" #define CAT_BREAD "Breads" #define CAT_BURGER "Burgers" diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index 16b2a8f4fb..3f85c93a00 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -1,5 +1,7 @@ // simple is_type and similar inline helpers +#define isdatum(D) (istype(D, /datum)) + #define islist(L) (istype(L, /list)) #define in_range(source, user) (get_dist(source, user) <= 1) @@ -25,6 +27,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/maps.dm b/code/__DEFINES/maps.dm index 084cc7d1ab..5e7ee3a468 100644 --- a/code/__DEFINES/maps.dm +++ b/code/__DEFINES/maps.dm @@ -35,7 +35,7 @@ Last space-z level = empty //zlevel defines, can be overridden for different maps in the appropriate _maps file. #define ZLEVEL_CENTCOM 1 -#define ZLEVEL_STATION 2 +#define ZLEVEL_STATION_PRIMARY 2 #define ZLEVEL_MINING 5 #define ZLEVEL_LAVALAND 5 #define ZLEVEL_EMPTY_SPACE 12 diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 6ccebf83b0..11b0396cbd 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -361,7 +361,6 @@ GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE #define debug_admins(msg) if (GLOB.Debug2) to_chat(GLOB.admins, "DEBUG: [msg]") #define debug_world_log(msg) if (GLOB.Debug2) log_world("DEBUG: [msg]") -#define COORD(A) "([A.x],[A.y],[A.z])" #define INCREMENT_TALLY(L, stat) if(L[stat]){L[stat]++}else{L[stat] = 1} // Medal names @@ -399,8 +398,6 @@ GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE #define NUKE_SYNDICATE_BASE 3 #define STATION_DESTROYED_NUKE 4 #define STATION_EVACUATED 5 -#define GANG_LOSS 6 -#define GANG_TAKEOVER 7 #define BLOB_WIN 8 #define BLOB_NUKE 9 #define BLOB_DESTROYED 10 @@ -437,10 +434,6 @@ GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE #define GIBTONITE_DETONATE 3 //for obj explosion block calculation #define EXPLOSION_BLOCK_PROC -1 -//Gangster starting influences - -#define GANGSTER_SOLDIER_STARTING_INFLUENCE 5 -#define GANGSTER_BOSS_STARTING_INFLUENCE 20 //for determining which type of heartbeat sound is playing #define BEAT_FAST 1 @@ -453,3 +446,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/mobs.dm b/code/__DEFINES/mobs.dm index 52e324bd76..c2d3256e59 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -154,3 +154,5 @@ #define JUDGE_IGNOREMONKEYS 16 #define MEGAFAUNA_DEFAULT_RECOVERY_TIME 5 + +#define SHADOW_SPECIES_LIGHT_THRESHOLD 0.2 \ No newline at end of file diff --git a/code/__DEFINES/pinpointers.dm b/code/__DEFINES/pinpointers.dm index 80403e54de..75f0452ea9 100644 --- a/code/__DEFINES/pinpointers.dm +++ b/code/__DEFINES/pinpointers.dm @@ -2,6 +2,3 @@ #define TRACK_NUKE_DISK 1 //We track the nuclear authentication disk, either to protect it or steal it #define TRACK_MALF_AI 2 //We track the malfunctioning AI, so we can prevent it from blowing us all up #define TRACK_INFILTRATOR 3 //We track the Syndicate infiltrator, so we can get back to ship when the nuke's armed -#define TRACK_OPERATIVES 4 //We track the closest operative, so we can regroup when we need to -#define TRACK_ATOM 5 //We track a specified atom, so admins can make us function for events -#define TRACK_COORDINATES 6 //We point towards the specified coordinates on our z-level, so we can navigate diff --git a/code/__DEFINES/qdel.dm b/code/__DEFINES/qdel.dm index 041a6283e7..8749218847 100644 --- a/code/__DEFINES/qdel.dm +++ b/code/__DEFINES/qdel.dm @@ -10,6 +10,11 @@ //if TESTING is enabled, qdel will call this object's find_references() verb. //defines for the gc_destroyed var +#define GC_QUEUE_PREQUEUE 1 +#define GC_QUEUE_CHECK 2 +#define GC_QUEUE_HARDDELETE 3 +#define GC_QUEUE_COUNT 3 //increase this when adding more steps. + #define GC_QUEUED_FOR_QUEUING -1 #define GC_QUEUED_FOR_HARD_DEL -2 #define GC_CURRENTLY_BEING_QDELETED -3 diff --git a/code/__DEFINES/role_preferences.dm b/code/__DEFINES/role_preferences.dm index cb4d552e5d..fbefab15bb 100644 --- a/code/__DEFINES/role_preferences.dm +++ b/code/__DEFINES/role_preferences.dm @@ -18,7 +18,6 @@ #define ROLE_BLOB "blob" #define ROLE_NINJA "space ninja" #define ROLE_MONKEY "monkey" -#define ROLE_GANG "gangster" #define ROLE_ABDUCTOR "abductor" #define ROLE_REVENANT "revenant" #define ROLE_DEVIL "devil" @@ -41,7 +40,6 @@ GLOBAL_LIST_INIT(special_roles, list( ROLE_BLOB = /datum/game_mode/blob, ROLE_NINJA, ROLE_MONKEY = /datum/game_mode/monkey, - ROLE_GANG = /datum/game_mode/gang, ROLE_REVENANT, ROLE_ABDUCTOR = /datum/game_mode/abduction, ROLE_DEVIL = /datum/game_mode/devil, 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/subsystems.dm b/code/__DEFINES/subsystems.dm index f7322abe6c..9ec26b7506 100644 --- a/code/__DEFINES/subsystems.dm +++ b/code/__DEFINES/subsystems.dm @@ -56,7 +56,6 @@ #define INIT_ORDER_TIMER 1 #define INIT_ORDER_DEFAULT 0 #define INIT_ORDER_AIR -1 -#define INIT_ORDER_SHUTTLE -2 #define INIT_ORDER_MINIMAP -3 #define INIT_ORDER_ASSETS -4 #define INIT_ORDER_ICON_SMOOTHING -5 @@ -64,6 +63,7 @@ #define INIT_ORDER_XKEYSCORE -10 #define INIT_ORDER_STICKY_BAN -10 #define INIT_ORDER_LIGHTING -20 +#define INIT_ORDER_SHUTTLE -21 #define INIT_ORDER_SQUEAK -40 #define INIT_ORDER_PERSISTENCE -100 diff --git a/code/__DEFINES/time.dm b/code/__DEFINES/time.dm index 956935258b..28017de85c 100644 --- a/code/__DEFINES/time.dm +++ b/code/__DEFINES/time.dm @@ -13,3 +13,11 @@ When using time2text(), please use "DDD" to find the weekday. Refrain from using #define FRIDAY "Fri" #define SATURDAY "Sat" #define SUNDAY "Sun" + +#define SECONDS *10 + +#define MINUTES SECONDS*60 + +#define HOURS MINUTES*60 + +#define TICKS *world.tick_lag \ No newline at end of file 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/_lists.dm b/code/__HELPERS/_lists.dm index 9646f03252..540ec9fb63 100644 --- a/code/__HELPERS/_lists.dm +++ b/code/__HELPERS/_lists.dm @@ -205,6 +205,22 @@ return null +/proc/pickweightAllowZero(list/L) //The original pickweight proc will sometimes pick entries with zero weight. I'm not sure if changing the original will break anything, so I left it be. + var/total = 0 + var/item + for (item in L) + if (!L[item]) + L[item] = 0 + total += L[item] + + total = rand(0, total) + for (item in L) + total -=L [item] + if (total <= 0 && L[item]) + return item + + return null + //Pick a random element from the list and remove it from the list. /proc/pick_n_take(list/L) if(L.len) diff --git a/code/__HELPERS/_logging.dm b/code/__HELPERS/_logging.dm index cde5e0b4e7..4b5342031f 100644 --- a/code/__HELPERS/_logging.dm +++ b/code/__HELPERS/_logging.dm @@ -96,6 +96,9 @@ if (config.log_pda) WRITE_FILE(GLOB.world_game_log, "\[[time_stamp()]]CHAT: [text]") +/proc/log_qdel(text) + WRITE_FILE(GLOB.world_qdel_log, "\[[time_stamp()]]QDEL: [text]") + /proc/log_sql(text) WRITE_FILE(GLOB.sql_error_log, "\[[time_stamp()]]SQL: [text]") diff --git a/code/__HELPERS/cmp.dm b/code/__HELPERS/cmp.dm index 171d776d0d..1c9c33f21a 100644 --- a/code/__HELPERS/cmp.dm +++ b/code/__HELPERS/cmp.dm @@ -49,3 +49,12 @@ GLOBAL_VAR_INIT(cmp_field, "name") /proc/cmp_ruincost_priority(datum/map_template/ruin/A, datum/map_template/ruin/B) return initial(A.cost) - initial(B.cost) + +/proc/cmp_qdel_item_time(datum/qdel_item/A, datum/qdel_item/B) + . = B.hard_delete_time - A.hard_delete_time + if (!.) + . = B.destroy_time - A.destroy_time + if (!.) + . = B.failures - A.failures + if (!.) + . = B.qdels - A.qdels diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index d1d330fb01..5bcc66eeda 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -9,10 +9,10 @@ #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 + if(isarea(A)) + 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/priority_announce.dm b/code/__HELPERS/priority_announce.dm index d3b9580f37..0ffd8d8580 100644 --- a/code/__HELPERS/priority_announce.dm +++ b/code/__HELPERS/priority_announce.dm @@ -39,7 +39,7 @@ priority_announce("A report has been downloaded and printed out at all communications consoles.", "Incoming Classified Message", 'sound/ai/commandreport.ogg') for(var/obj/machinery/computer/communications/C in GLOB.machines) - if(!(C.stat & (BROKEN|NOPOWER)) && C.z == ZLEVEL_STATION) + if(!(C.stat & (BROKEN|NOPOWER)) && (C.z in GLOB.station_z_levels)) var/obj/item/paper/P = new /obj/item/paper(C.loc) P.name = "paper - '[title]'" P.info = text 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 54459da0b5..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 1 +#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/_globalvars/lists/mapping.dm b/code/_globalvars/lists/mapping.dm index 1581c904b9..a2d30b1528 100644 --- a/code/_globalvars/lists/mapping.dm +++ b/code/_globalvars/lists/mapping.dm @@ -1,55 +1,57 @@ -#define Z_NORTH 1 -#define Z_EAST 2 -#define Z_SOUTH 3 -#define Z_WEST 4 - +#define Z_NORTH 1 +#define Z_EAST 2 +#define Z_SOUTH 3 +#define Z_WEST 4 + GLOBAL_LIST_INIT(cardinals, list(NORTH, SOUTH, EAST, WEST)) -GLOBAL_LIST_INIT(alldirs, list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)) -GLOBAL_LIST_INIT(diagonals, list(NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)) - -//This list contains the z-level numbers which can be accessed via space travel and the percentile chances to get there. -//(Exceptions: extended, sandbox and nuke) -Errorage -//Was list("3" = 30, "4" = 70). -//Spacing should be a reliable method of getting rid of a body -- Urist. -//Go away Urist, I'm restoring this to the longer list. ~Errorage -GLOBAL_LIST_INIT(accessable_z_levels, list(1,3,4,5,6,7)) //Keep this to six maps, repeating z-levels is ok if needed - -GLOBAL_LIST(global_map) - //list/global_map = list(list(1,5),list(4,3))//an array of map Z levels. - //Resulting sector map looks like - //|_1_|_4_| - //|_5_|_3_| - // - //1 - SS13 - //4 - Derelict - //3 - AI satellite - //5 - empty space - -GLOBAL_LIST_EMPTY(landmarks_list) //list of all landmarks created -GLOBAL_LIST_EMPTY(start_landmarks_list) //list of all spawn points created -GLOBAL_LIST_EMPTY(department_security_spawns) //list of all department security spawns -GLOBAL_LIST_EMPTY(generic_event_spawns) //list of all spawns for events - -GLOBAL_LIST_EMPTY(wizardstart) -GLOBAL_LIST_EMPTY(newplayer_start) -GLOBAL_LIST_EMPTY(prisonwarp) //prisoners go to these -GLOBAL_LIST_EMPTY(holdingfacility) //captured people go here -GLOBAL_LIST_EMPTY(xeno_spawn)//Aliens spawn at these. -GLOBAL_LIST_EMPTY(tdome1) -GLOBAL_LIST_EMPTY(tdome2) -GLOBAL_LIST_EMPTY(tdomeobserve) -GLOBAL_LIST_EMPTY(tdomeadmin) -GLOBAL_LIST_EMPTY(prisonwarped) //list of players already warped -GLOBAL_LIST_EMPTY(blobstart) -GLOBAL_LIST_EMPTY(secequipment) -GLOBAL_LIST_EMPTY(deathsquadspawn) -GLOBAL_LIST_EMPTY(emergencyresponseteamspawn) -GLOBAL_LIST_EMPTY(ruin_landmarks) - - //away missions -GLOBAL_LIST_EMPTY(awaydestinations) //a list of landmarks that the warpgate can take you to - - //used by jump-to-area etc. Updated by area/updateName() -GLOBAL_LIST_EMPTY(sortedAreas) - -GLOBAL_LIST_EMPTY(all_abstract_markers) \ No newline at end of file +GLOBAL_LIST_INIT(alldirs, list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)) +GLOBAL_LIST_INIT(diagonals, list(NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)) + +//This list contains the z-level numbers which can be accessed via space travel and the percentile chances to get there. +//(Exceptions: extended, sandbox and nuke) -Errorage +//Was list("3" = 30, "4" = 70). +//Spacing should be a reliable method of getting rid of a body -- Urist. +//Go away Urist, I'm restoring this to the longer list. ~Errorage +GLOBAL_LIST_INIT(accessable_z_levels, list(1,3,4,5,6,7)) //Keep this to six maps, repeating z-levels is ok if needed + +GLOBAL_LIST_INIT(station_z_levels, list(ZLEVEL_STATION_PRIMARY)) + +GLOBAL_LIST(global_map) + //list/global_map = list(list(1,5),list(4,3))//an array of map Z levels. + //Resulting sector map looks like + //|_1_|_4_| + //|_5_|_3_| + // + //1 - SS13 + //4 - Derelict + //3 - AI satellite + //5 - empty space + +GLOBAL_LIST_EMPTY(landmarks_list) //list of all landmarks created +GLOBAL_LIST_EMPTY(start_landmarks_list) //list of all spawn points created +GLOBAL_LIST_EMPTY(department_security_spawns) //list of all department security spawns +GLOBAL_LIST_EMPTY(generic_event_spawns) //list of all spawns for events + +GLOBAL_LIST_EMPTY(wizardstart) +GLOBAL_LIST_EMPTY(newplayer_start) +GLOBAL_LIST_EMPTY(prisonwarp) //prisoners go to these +GLOBAL_LIST_EMPTY(holdingfacility) //captured people go here +GLOBAL_LIST_EMPTY(xeno_spawn)//Aliens spawn at these. +GLOBAL_LIST_EMPTY(tdome1) +GLOBAL_LIST_EMPTY(tdome2) +GLOBAL_LIST_EMPTY(tdomeobserve) +GLOBAL_LIST_EMPTY(tdomeadmin) +GLOBAL_LIST_EMPTY(prisonwarped) //list of players already warped +GLOBAL_LIST_EMPTY(blobstart) +GLOBAL_LIST_EMPTY(secequipment) +GLOBAL_LIST_EMPTY(deathsquadspawn) +GLOBAL_LIST_EMPTY(emergencyresponseteamspawn) +GLOBAL_LIST_EMPTY(ruin_landmarks) + + //away missions +GLOBAL_LIST_EMPTY(awaydestinations) //a list of landmarks that the warpgate can take you to + + //used by jump-to-area etc. Updated by area/updateName() +GLOBAL_LIST_EMPTY(sortedAreas) + +GLOBAL_LIST_EMPTY(all_abstract_markers) diff --git a/code/_globalvars/logging.dm b/code/_globalvars/logging.dm index 5be6a8dbaa..e600619d45 100644 --- a/code/_globalvars/logging.dm +++ b/code/_globalvars/logging.dm @@ -4,6 +4,8 @@ GLOBAL_VAR(world_game_log) GLOBAL_PROTECT(world_game_log) GLOBAL_VAR(world_runtime_log) GLOBAL_PROTECT(world_runtime_log) +GLOBAL_VAR(world_qdel_log) +GLOBAL_PROTECT(world_qdel_log) GLOBAL_VAR(world_attack_log) GLOBAL_PROTECT(world_attack_log) GLOBAL_VAR(world_href_log) 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/_onclick/hud/parallax.dm b/code/_onclick/hud/parallax.dm index f364bac76f..a9971895a7 100755 --- a/code/_onclick/hud/parallax.dm +++ b/code/_onclick/hud/parallax.dm @@ -247,7 +247,7 @@ /obj/screen/parallax_layer/Initialize(mapload, view) - ..() + . = ..() if (!view) view = world.view update_o(view) diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index f1ac1af1af..5265a8e8ea 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -21,7 +21,7 @@ /obj/attackby(obj/item/I, mob/living/user, params) return I.attack_obj(src, user) -/mob/living/attackby(obj/item/I, mob/user, params) +/mob/living/attackby(obj/item/I, mob/living/user, params) user.changeNext_move(CLICK_CD_MELEE) if(user.a_intent == INTENT_HARM && stat == DEAD && butcher_results) //can we butcher it? var/sharpness = I.is_sharp() 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/cit_uniforms.dm b/code/citadel/cit_uniforms.dm index 1e2fc3a914..fc7e03a676 100644 --- a/code/citadel/cit_uniforms.dm +++ b/code/citadel/cit_uniforms.dm @@ -7,6 +7,7 @@ body_parts_covered = CHEST|ARMS can_adjust = 1 icon = 'icons/obj/clothing/turtlenecks.dmi' + icon_override = 'icons/mob/citadel/uniforms.dmi' /obj/item/clothing/under/bb_sweater/black name = "black sweater" diff --git a/code/citadel/cit_vendors.dm b/code/citadel/cit_vendors.dm index d35d11a5f8..18bdde040a 100644 --- a/code/citadel/cit_vendors.dm +++ b/code/citadel/cit_vendors.dm @@ -22,7 +22,7 @@ ) premium = list() refill_canister = /obj/item/vending_refill/kink - +/* /obj/machinery/vending/nazivend name = "Nazivend" desc = "A vending machine containing Nazi German supplies. A label reads: \"Remember the gorrilions lost.\"" @@ -34,20 +34,20 @@ /obj/item/clothing/head/stalhelm = 20, /obj/item/clothing/head/panzer = 20, /obj/item/clothing/suit/soldiercoat = 20, - /obj/item/clothing/under/soldieruniform = 20, + // /obj/item/clothing/under/soldieruniform = 20, /obj/item/clothing/shoes/jackboots = 20 ) contraband = list( /obj/item/clothing/head/naziofficer = 10, - /obj/item/clothing/suit/officercoat = 10, - /obj/item/clothing/under/officeruniform = 10, + // /obj/item/clothing/suit/officercoat = 10, + // /obj/item/clothing/under/officeruniform = 10, /obj/item/clothing/suit/space/hardsuit/nazi = 3, /obj/item/gun/energy/plasma/MP40k = 4 ) premium = list() refill_canister = /obj/item/vending_refill/nazi - +*/ /obj/machinery/vending/sovietvend name = "KomradeVendtink" desc = "Rodina-mat' zovyot!" diff --git a/code/citadel/custom_loadout/custom_items.dm b/code/citadel/custom_loadout/custom_items.dm index d620dd9017..5ee9f3f508 100644 --- a/code/citadel/custom_loadout/custom_items.dm +++ b/code/citadel/custom_loadout/custom_items.dm @@ -8,4 +8,63 @@ icon = 'icons/obj/custom.dmi' icon_state = "cebu" w_class = WEIGHT_CLASS_TINY - flags_1 = NOBLUDGEON_1 \ No newline at end of file + flags_1 = NOBLUDGEON_1 + + +/*Inferno707*/ + +/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/clothing/neck/petcollar/inferno + name = "Kiara's Collar" + desc = "A soft black collar that seems to stretch to fit whoever wears it." + icon_state = "infcollar" + item_state = "infcollar" + item_color = null + tagname = null + +/*DirtyOldHarry*/ + +/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 + + +/*Zombierobin*/ + +/obj/item/clothing/neck/scarf/zomb //Default white color, same functionality as beanies. + name = "A special scarf" + icon_state = "zombscarf" + desc = "A fashionable collar" + item_color = "zombscarf" + dog_fashion = /datum/dog_fashion/head + + +/*PLACEHOLDER*/ + +/obj/item/toy/plush/carrot + name = "carrot plushie" + desc = "While a normal carrot would be good for your eyes, this one seems a bit more for hugging then eating." + icon = 'icons/obj/hydroponics/harvest.dmi' + icon_state = "carrot" + item_state = "carrot" + w_class = WEIGHT_CLASS_SMALL + attack_verb = list("slapped") + resistance_flags = FLAMMABLE + var/bitesound = 'sound/items/bikehorn.ogg' diff --git a/code/citadel/dogborgstuff.dm b/code/citadel/dogborgstuff.dm index 4f3eae0fb7..ee5cfd2fd9 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() ..() @@ -339,7 +337,6 @@ /obj/item/hand_tele, /obj/item/card/id/captains_spare, /obj/item/device/aicard, - /obj/item/device/paicard, /obj/item/gun, /obj/item/pinpointer, /obj/item/clothing/shoes/magboots, @@ -354,7 +351,9 @@ /obj/item/nuke_core_container, /obj/item/areaeditor/blueprints, /obj/item/documents/syndicate, - /obj/item/disk/nuclear) + /obj/item/disk/nuclear, + /obj/item/bombcore, + /obj/item/grenade) /obj/item/device/dogborg/sleeper/New() ..() diff --git a/code/citadel/plasmacases.dm b/code/citadel/plasmacases.dm new file mode 100644 index 0000000000..ac3621b58a --- /dev/null +++ b/code/citadel/plasmacases.dm @@ -0,0 +1,23 @@ +/obj/structure/guncase/plasma + name = "plasma rifle locker" + desc = "A locker that holds plasma rifles. Only opens in dire emergencies." + icon_state = "ecase" + case_type = "egun" + gun_category = /obj/item/gun/energy/plasma + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF //because fuck you, powergaming nerds. + +/obj/structure/guncase/plasma/attackby(obj/item/W, mob/user, params) + return + +/obj/structure/guncase/plasma/MouseDrop(over_object, src_location, over_location) + if(GLOB.security_level == SEC_LEVEL_RED || GLOB.security_level == SEC_LEVEL_DELTA) + . = ..() + else + to_chat(usr, "The storage unit will only unlock during a Red or Delta security alert.") + +/obj/structure/guncase/plasma/attack_hand(mob/user) + return MouseDrop(user) + +/obj/structure/guncase/plasma/emag_act() + to_chat(usr, "The locking mechanism is fitted with old style parts, The card has no effect.") + return \ No newline at end of file diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 1d8f7add38..d19484fd3f 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 @@ -102,6 +108,8 @@ var/use_age_restriction_for_jobs = 0 //Do jobs use account age restrictions? --requires database 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/note_fresh_days + var/note_stale_days var/use_exp_tracking = FALSE var/use_exp_restrictions_heads = FALSE @@ -121,6 +129,8 @@ //game_options.txt configs var/force_random_names = 0 var/list/mode_names = list() + var/list/mode_reports = list() + var/list/mode_false_report_weight = list() var/list/modes = list() // allowed modes var/list/votable_modes = list() // votable modes var/list/probabilities = list() // relative probability of each mode @@ -175,6 +185,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 @@ -273,6 +284,8 @@ var/list/policies = list() + var/debug_admin_hrefs = FALSE //turns off admin href token protection for debugging purposes + /datum/configuration/New() gamemode_cache = typecacheof(/datum/game_mode,TRUE) for(var/T in gamemode_cache) @@ -286,6 +299,8 @@ modes += M.config_tag mode_names[M.config_tag] = M.name probabilities[M.config_tag] = M.probability + mode_reports[M.config_tag] = M.generate_report() + mode_false_report_weight[M.config_tag] = M.false_report_weight if(M.votable) votable_modes += M.config_tag qdel(M) @@ -294,19 +309,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) @@ -470,10 +486,16 @@ 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") see_own_notes = 1 + if("note_fresh_days") + note_fresh_days = text2num(value) + if("note_stale_days") + note_stale_days = text2num(value) if("soft_popcap") soft_popcap = text2num(value) if("hard_popcap") @@ -553,6 +575,8 @@ error_msg_delay = text2num(value) if("irc_announce_new_game") irc_announce_new_game = TRUE + if("debug_admin_hrefs") + debug_admin_hrefs = TRUE else #if DM_VERSION > 511 #error Replace the line below with WRITE_FILE(GLOB.config_error_log, "Unknown setting in configuration: '[name]'") @@ -576,6 +600,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") @@ -819,6 +845,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 @@ -871,6 +898,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/failsafe.dm b/code/controllers/failsafe.dm index d5298f7dde..2ca208642c 100644 --- a/code/controllers/failsafe.dm +++ b/code/controllers/failsafe.dm @@ -1,102 +1,102 @@ - /** - * Failsafe - * - * Pretty much pokes the MC to make sure it's still alive. - **/ - -GLOBAL_REAL(Failsafe, /datum/controller/failsafe) - -/datum/controller/failsafe // This thing pretty much just keeps poking the master controller - name = "Failsafe" - - // The length of time to check on the MC (in deciseconds). - // Set to 0 to disable. - var/processing_interval = 20 - // The alert level. For every failed poke, we drop a DEFCON level. Once we hit DEFCON 1, restart the MC. - var/defcon = 5 - //the world.time of the last check, so the mc can restart US if we hang. - // (Real friends look out for *eachother*) - var/lasttick = 0 - - // Track the MC iteration to make sure its still on track. - var/master_iteration = 0 - var/running = TRUE - -/datum/controller/failsafe/New() - // Highlander-style: there can only be one! Kill off the old and replace it with the new. - if(Failsafe != src) - if(istype(Failsafe)) - qdel(Failsafe) - Failsafe = src - Initialize() - -/datum/controller/failsafe/Initialize() - set waitfor = 0 - Failsafe.Loop() - if(!QDELETED(src)) - qdel(src) //when Loop() returns, we delete ourselves and let the mc recreate us - -/datum/controller/failsafe/Destroy() - running = FALSE - ..() - return QDEL_HINT_HARDDEL_NOW - -/datum/controller/failsafe/proc/Loop() - while(running) - lasttick = world.time - if(!Master) - // Replace the missing Master! This should never, ever happen. - new /datum/controller/master() - // Only poke it if overrides are not in effect. - if(processing_interval > 0) - if(Master.processing && Master.iteration) - // Check if processing is done yet. - if(Master.iteration == master_iteration) - switch(defcon) - if(4,5) - --defcon - if(3) - to_chat(GLOB.admins, "Notice: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks.") - --defcon - if(2) - to_chat(GLOB.admins, "Warning: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks. Automatic restart in [processing_interval] ticks.") - --defcon - if(1) - - to_chat(GLOB.admins, "Warning: DEFCON [defcon_pretty()]. The Master Controller has still not fired within the last [(5-defcon) * processing_interval] ticks. Killing and restarting...") - --defcon - var/rtn = Recreate_MC() - if(rtn > 0) - defcon = 4 - master_iteration = 0 - to_chat(GLOB.admins, "MC restarted successfully") - else if(rtn < 0) - log_game("FailSafe: Could not restart MC, runtime encountered. Entering defcon 0") - to_chat(GLOB.admins, "ERROR: DEFCON [defcon_pretty()]. Could not restart MC, runtime encountered. I will silently keep retrying.") - //if the return number was 0, it just means the mc was restarted too recently, and it just needs some time before we try again - //no need to handle that specially when defcon 0 can handle it - if(0) //DEFCON 0! (mc failed to restart) - var/rtn = Recreate_MC() - if(rtn > 0) - defcon = 4 - master_iteration = 0 - to_chat(GLOB.admins, "MC restarted successfully") - else - defcon = min(defcon + 1,5) - master_iteration = Master.iteration - if (defcon <= 1) - sleep(processing_interval*2) - else - sleep(processing_interval) - else - defcon = 5 - sleep(initial(processing_interval)) - -/datum/controller/failsafe/proc/defcon_pretty() - return defcon - -/datum/controller/failsafe/stat_entry() - if(!statclick) - statclick = new/obj/effect/statclick/debug(null, "Initializing...", src) - - stat("Failsafe Controller:", statclick.update("Defcon: [defcon_pretty()] (Interval: [Failsafe.processing_interval] | Iteration: [Failsafe.master_iteration])")) + /** + * Failsafe + * + * Pretty much pokes the MC to make sure it's still alive. + **/ + +GLOBAL_REAL(Failsafe, /datum/controller/failsafe) + +/datum/controller/failsafe // This thing pretty much just keeps poking the master controller + name = "Failsafe" + + // The length of time to check on the MC (in deciseconds). + // Set to 0 to disable. + var/processing_interval = 20 + // The alert level. For every failed poke, we drop a DEFCON level. Once we hit DEFCON 1, restart the MC. + var/defcon = 5 + //the world.time of the last check, so the mc can restart US if we hang. + // (Real friends look out for *eachother*) + var/lasttick = 0 + + // Track the MC iteration to make sure its still on track. + var/master_iteration = 0 + var/running = TRUE + +/datum/controller/failsafe/New() + // Highlander-style: there can only be one! Kill off the old and replace it with the new. + if(Failsafe != src) + if(istype(Failsafe)) + qdel(Failsafe) + Failsafe = src + Initialize() + +/datum/controller/failsafe/Initialize() + set waitfor = 0 + Failsafe.Loop() + if(!QDELETED(src)) + qdel(src) //when Loop() returns, we delete ourselves and let the mc recreate us + +/datum/controller/failsafe/Destroy() + running = FALSE + ..() + return QDEL_HINT_HARDDEL_NOW + +/datum/controller/failsafe/proc/Loop() + while(running) + lasttick = world.time + if(!Master) + // Replace the missing Master! This should never, ever happen. + new /datum/controller/master() + // Only poke it if overrides are not in effect. + if(processing_interval > 0) + if(Master.processing && Master.iteration) + // Check if processing is done yet. + if(Master.iteration == master_iteration) + switch(defcon) + if(4,5) + --defcon + if(3) + message_admins("Notice: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks.") + --defcon + if(2) + to_chat(GLOB.admins, "Warning: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks. Automatic restart in [processing_interval] ticks.") + --defcon + if(1) + + to_chat(GLOB.admins, "Warning: DEFCON [defcon_pretty()]. The Master Controller has still not fired within the last [(5-defcon) * processing_interval] ticks. Killing and restarting...") + --defcon + var/rtn = Recreate_MC() + if(rtn > 0) + defcon = 4 + master_iteration = 0 + to_chat(GLOB.admins, "MC restarted successfully") + else if(rtn < 0) + log_game("FailSafe: Could not restart MC, runtime encountered. Entering defcon 0") + to_chat(GLOB.admins, "ERROR: DEFCON [defcon_pretty()]. Could not restart MC, runtime encountered. I will silently keep retrying.") + //if the return number was 0, it just means the mc was restarted too recently, and it just needs some time before we try again + //no need to handle that specially when defcon 0 can handle it + if(0) //DEFCON 0! (mc failed to restart) + var/rtn = Recreate_MC() + if(rtn > 0) + defcon = 4 + master_iteration = 0 + to_chat(GLOB.admins, "MC restarted successfully") + else + defcon = min(defcon + 1,5) + master_iteration = Master.iteration + if (defcon <= 1) + sleep(processing_interval*2) + else + sleep(processing_interval) + else + defcon = 5 + sleep(initial(processing_interval)) + +/datum/controller/failsafe/proc/defcon_pretty() + return defcon + +/datum/controller/failsafe/stat_entry() + if(!statclick) + statclick = new/obj/effect/statclick/debug(null, "Initializing...", src) + + stat("Failsafe Controller:", statclick.update("Defcon: [defcon_pretty()] (Interval: [Failsafe.processing_interval] | Iteration: [Failsafe.master_iteration])")) diff --git a/code/controllers/subsystem/blackbox.dm b/code/controllers/subsystem/blackbox.dm index b85e99a0b9..301ceeac21 100644 --- a/code/controllers/subsystem/blackbox.dm +++ b/code/controllers/subsystem/blackbox.dm @@ -18,16 +18,14 @@ SUBSYSTEM_DEF(blackbox) 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()) @@ -37,16 +35,14 @@ SUBSYSTEM_DEF(blackbox) 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]')") + 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 @@ -212,8 +208,10 @@ SUBSYSTEM_DEF(blackbox) 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) 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])") + 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() @@ -229,7 +227,7 @@ SUBSYSTEM_DEF(blackbox) /datum/feedback_variable var/variable var/value - var/details + var/list/details /datum/feedback_variable/New(param_variable, param_value = 0) variable = param_variable @@ -267,19 +265,17 @@ SUBSYSTEM_DEF(blackbox) /datum/feedback_variable/proc/get_variable() return variable -/datum/feedback_variable/proc/set_details(text) - if (istext(text)) - details = text +/datum/feedback_variable/proc/set_details(deets) + details = list("\"[deets]\"") -/datum/feedback_variable/proc/add_details(text) - if (istext(text)) - if (!details) - details = "\"[text]\"" - else - details += " | \"[text]\"" +/datum/feedback_variable/proc/add_details(deets) + if (!details) + set_details(deets) + else + details += "\"[deets]\"" /datum/feedback_variable/proc/get_details() - return details + return details.Join(" | ") /datum/feedback_variable/proc/get_parsed() - return list(variable,value,details) \ No newline at end of file + return list(variable,value,details.Join(" | ")) 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/events.dm b/code/controllers/subsystem/events.dm index c41f422575..7816a6bdf8 100644 --- a/code/controllers/subsystem/events.dm +++ b/code/controllers/subsystem/events.dm @@ -116,6 +116,8 @@ SUBSYSTEM_DEF(events) //allows a client to trigger an event //aka Badmin Central +// > Not in modules/admin +// REEEEEEEEE /client/proc/forceEvent() set name = "Trigger Event" set category = "Fun" @@ -131,7 +133,7 @@ SUBSYSTEM_DEF(events) var/magic = "" var/holiday = "" for(var/datum/round_event_control/E in SSevents.control) - dat = "
[E]" + dat = "
[E]" if(E.holidayID) holiday += dat else if(E.wizardevent) diff --git a/code/controllers/subsystem/garbage.dm b/code/controllers/subsystem/garbage.dm index 8502280aaf..d202c08d39 100644 --- a/code/controllers/subsystem/garbage.dm +++ b/code/controllers/subsystem/garbage.dm @@ -1,40 +1,44 @@ SUBSYSTEM_DEF(garbage) name = "Garbage" priority = 15 - wait = 20 + wait = 2 SECONDS flags = SS_POST_FIRE_TIMING|SS_BACKGROUND|SS_NO_INIT runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY - var/collection_timeout = 3000// deciseconds to wait to let running procs finish before we just say fuck it and force del() the object - var/delslasttick = 0 // number of del()'s we've done this tick - var/gcedlasttick = 0 // number of things that gc'ed last tick + var/list/collection_timeout = list(0, 2 MINUTES, 10 SECONDS) // deciseconds to wait before moving something up in the queue to the next level + + //Stat tracking + var/delslasttick = 0 // number of del()'s we've done this tick + var/gcedlasttick = 0 // number of things that gc'ed last tick var/totaldels = 0 var/totalgcs = 0 var/highest_del_time = 0 var/highest_del_tickusage = 0 - var/list/queue = list() // list of refID's of things that should be garbage collected - // refID's are associated with the time at which they time out and need to be manually del() - // we do this so we aren't constantly locating them and preventing them from being gc'd + var/list/pass_counts + var/list/fail_counts - var/list/tobequeued = list() //We store the references of things to be added to the queue separately so we can spread out GC overhead over a few ticks + var/list/items = list() // Holds our qdel_item statistics datums - var/list/didntgc = list() // list of all types that have failed to GC associated with the number of times that's happened. - // the types are stored as strings - var/list/sleptDestroy = list() //Same as above but these are paths that slept during their Destroy call + //Queue + var/list/queues - var/list/noqdelhint = list()// list of all types that do not return a QDEL_HINT - // all types that did not respect qdel(A, force=TRUE) and returned one - // of the immortality qdel hints - var/list/noforcerespect = list() -#ifdef TESTING - var/list/qdel_list = list() // list of all types that have been qdel()eted -#endif +/datum/controller/subsystem/garbage/PreInit() + queues = new(GC_QUEUE_COUNT) + pass_counts = new(GC_QUEUE_COUNT) + fail_counts = new(GC_QUEUE_COUNT) + for(var/i in 1 to GC_QUEUE_COUNT) + queues[i] = list() + pass_counts[i] = 0 + fail_counts[i] = 0 /datum/controller/subsystem/garbage/stat_entry(msg) - msg += "Q:[queue.len]|D:[delslasttick]|G:[gcedlasttick]|" + var/list/counts = list() + for (var/list/L in queues) + counts += length(L) + msg += "Q:[counts.Join(",")]|D:[delslasttick]|G:[gcedlasttick]|" msg += "GR:" if (!(delslasttick+gcedlasttick)) msg += "n/a|" @@ -46,116 +50,179 @@ SUBSYSTEM_DEF(garbage) msg += "n/a|" else msg += "TGR:[round((totalgcs/(totaldels+totalgcs))*100, 0.01)]%" + msg += " P:[pass_counts.Join(",")]" + msg += "|F:[fail_counts.Join(",")]" ..(msg) /datum/controller/subsystem/garbage/Shutdown() - //Adds the del() log to world.log in a format condensable by the runtime condenser found in tools - if(didntgc.len || sleptDestroy.len) - var/list/dellog = list() - for(var/path in didntgc) - dellog += "Path : [path] \n" - dellog += "Failures : [didntgc[path]] \n" - if(path in sleptDestroy) - dellog += "Sleeps : [sleptDestroy[path]] \n" - sleptDestroy -= path - for(var/path in sleptDestroy) - dellog += "Path : [path] \n" - dellog += "Sleeps : [sleptDestroy[path]] \n" - text2file(dellog.Join(), "[GLOB.log_directory]/qdel.log") + //Adds the del() log to the qdel log file + var/list/dellog = list() + + //sort by how long it's wasted hard deleting + sortTim(items, cmp=/proc/cmp_qdel_item_time, associative = TRUE) + for(var/path in items) + var/datum/qdel_item/I = items[path] + dellog += "Path: [path]" + if (I.failures) + dellog += "\tFailures: [I.failures]" + dellog += "\tqdel() Count: [I.qdels]" + dellog += "\tDestroy() Cost: [I.destroy_time]ms" + if (I.hard_deletes) + dellog += "\tTotal Hard Deletes [I.hard_deletes]" + dellog += "\tTime Spent Hard Deleting: [I.hard_delete_time]ms" + if (I.slept_destroy) + dellog += "\tSleeps: [I.slept_destroy]" + if (I.no_respect_force) + dellog += "\tIgnored force: [I.no_respect_force] times" + if (I.no_hint) + dellog += "\tNo hint: [I.no_hint] times" + log_qdel(dellog.Join("\n")) /datum/controller/subsystem/garbage/fire() - HandleToBeQueued() - if(state == SS_RUNNING) - HandleQueue() - + //the fact that this resets its processing each fire (rather then resume where it left off) is intentional. + var/queue = GC_QUEUE_PREQUEUE + + while (state == SS_RUNNING) + switch (queue) + if (GC_QUEUE_PREQUEUE) + HandlePreQueue() + queue = GC_QUEUE_PREQUEUE+1 + if (GC_QUEUE_CHECK) + HandleQueue(GC_QUEUE_CHECK) + queue = GC_QUEUE_CHECK+1 + if (GC_QUEUE_HARDDELETE) + HandleQueue(GC_QUEUE_HARDDELETE) + break + if (state == SS_PAUSED) //make us wait again before the next run. - state = SS_RUNNING + state = SS_RUNNING //If you see this proc high on the profile, what you are really seeing is the garbage collection/soft delete overhead in byond. //Don't attempt to optimize, not worth the effort. -/datum/controller/subsystem/garbage/proc/HandleToBeQueued() - var/list/tobequeued = src.tobequeued - var/starttime = world.time - var/starttimeofday = world.timeofday - while(tobequeued.len && starttime == world.time && starttimeofday == world.timeofday) - if (MC_TICK_CHECK) - break - var/ref = tobequeued[1] - Queue(ref) - tobequeued.Cut(1, 2) +/datum/controller/subsystem/garbage/proc/HandlePreQueue() + var/list/tobequeued = queues[GC_QUEUE_PREQUEUE] + var/static/count = 0 + if (count) + var/c = count + count = 0 //so if we runtime on the Cut, we don't try again. + tobequeued.Cut(1,c+1) -/datum/controller/subsystem/garbage/proc/HandleQueue() - delslasttick = 0 - gcedlasttick = 0 - var/time_to_kill = world.time - collection_timeout // Anything qdel() but not GC'd BEFORE this time needs to be manually del() - var/list/queue = src.queue - var/starttime = world.time - var/starttimeofday = world.timeofday - while(queue.len && starttime == world.time && starttimeofday == world.timeofday) + for (var/ref in tobequeued) + count++ + Queue(ref, GC_QUEUE_PREQUEUE+1) if (MC_TICK_CHECK) break - var/refID = queue[1] + if (count) + tobequeued.Cut(1,count+1) + count = 0 + +/datum/controller/subsystem/garbage/proc/HandleQueue(level = GC_QUEUE_CHECK) + if (level == GC_QUEUE_CHECK) + delslasttick = 0 + gcedlasttick = 0 + var/cut_off_time = world.time - collection_timeout[level] //ignore entries newer then this + var/list/queue = queues[level] + var/static/lastlevel + var/static/count = 0 + if (count) //runtime last run before we could do this. + var/c = count + count = 0 //so if we runtime on the Cut, we don't try again. + var/list/lastqueue = queues[lastlevel] + lastqueue.Cut(1, c+1) + + lastlevel = level + + for (var/refID in queue) if (!refID) - queue.Cut(1, 2) + count++ + if (MC_TICK_CHECK) + break continue var/GCd_at_time = queue[refID] - if(GCd_at_time > time_to_kill) + if(GCd_at_time > cut_off_time) break // Everything else is newer, skip them - queue.Cut(1, 2) - var/datum/A - A = locate(refID) - if (A && A.gc_destroyed == GCd_at_time) // So if something else coincidently gets the same ref, it's not deleted by mistake - #ifdef GC_FAILURE_HARD_LOOKUP - A.find_references() - #endif + count++ - // Something's still referring to the qdel'd object. Kill it. - var/type = A.type - testing("GC: -- \ref[A] | [type] was unable to be GC'd and was deleted --") - didntgc["[type]"]++ - - HardDelete(A) + var/datum/D + D = locate(refID) - ++delslasttick - ++totaldels - else + if (!D || D.gc_destroyed != GCd_at_time) // So if something else coincidently gets the same ref, it's not deleted by mistake ++gcedlasttick ++totalgcs + pass_counts[level]++ + if (MC_TICK_CHECK) + break + continue -/datum/controller/subsystem/garbage/proc/QueueForQueuing(datum/A) - if (istype(A) && A.gc_destroyed == GC_CURRENTLY_BEING_QDELETED) - tobequeued += A - A.gc_destroyed = GC_QUEUED_FOR_QUEUING + // Something's still referring to the qdel'd object. + fail_counts[level]++ + switch (level) + if (GC_QUEUE_CHECK) + #ifdef GC_FAILURE_HARD_LOOKUP + D.find_references() + #endif + var/type = D.type + var/datum/qdel_item/I = items[type] + testing("GC: -- \ref[D] | [type] was unable to be GC'd --") + I.failures++ + if (GC_QUEUE_HARDDELETE) + HardDelete(D) + if (MC_TICK_CHECK) + break + continue -/datum/controller/subsystem/garbage/proc/Queue(datum/A) - if (isnull(A) || (!isnull(A.gc_destroyed) && A.gc_destroyed >= 0)) + Queue(D, level+1) + + if (MC_TICK_CHECK) + break + if (count) + queue.Cut(1,count+1) + count = 0 + +/datum/controller/subsystem/garbage/proc/PreQueue(datum/D) + if (D.gc_destroyed == GC_CURRENTLY_BEING_QDELETED) + queues[GC_QUEUE_PREQUEUE] += D + D.gc_destroyed = GC_QUEUED_FOR_QUEUING + +/datum/controller/subsystem/garbage/proc/Queue(datum/D, level = GC_QUEUE_CHECK) + if (isnull(D)) return - if (A.gc_destroyed == GC_QUEUED_FOR_HARD_DEL) - HardDelete(A) + if (D.gc_destroyed == GC_QUEUED_FOR_HARD_DEL) + level = GC_QUEUE_HARDDELETE + if (level > GC_QUEUE_COUNT) + HardDelete(D) return var/gctime = world.time - var/refid = "\ref[A]" - - A.gc_destroyed = gctime + var/refid = "\ref[D]" + D.gc_destroyed = gctime + var/list/queue = queues[level] if (queue[refid]) queue -= refid // Removing any previous references that were GC'd so that the current object will be at the end of the list. queue[refid] = gctime -//this is purely to separate things profile wise. -/datum/controller/subsystem/garbage/proc/HardDelete(datum/A) +//this is mainly to separate things profile wise. +/datum/controller/subsystem/garbage/proc/HardDelete(datum/D) var/time = world.timeofday var/tick = TICK_USAGE var/ticktime = world.time - - var/type = A.type - var/refID = "\ref[A]" - - del(A) - + ++delslasttick + ++totaldels + var/type = D.type + var/refID = "\ref[D]" + + del(D) + tick = (TICK_USAGE-tick+((world.time-ticktime)/world.tick_lag*100)) + + var/datum/qdel_item/I = items[type] + + I.hard_deletes++ + I.hard_delete_time += TICK_DELTA_TO_MS(tick) + + if (tick > highest_del_tickusage) highest_del_tickusage = tick time = world.timeofday - time @@ -166,18 +233,33 @@ SUBSYSTEM_DEF(garbage) if (time > 10) log_game("Error: [type]([refID]) took longer than 1 second to delete (took [time/10] seconds to delete)") message_admins("Error: [type]([refID]) took longer than 1 second to delete (took [time/10] seconds to delete).") - postpone(time/5) - -/datum/controller/subsystem/garbage/proc/HardQueue(datum/A) - if (istype(A) && A.gc_destroyed == GC_CURRENTLY_BEING_QDELETED) - tobequeued += A - A.gc_destroyed = GC_QUEUED_FOR_HARD_DEL + postpone(time) + +/datum/controller/subsystem/garbage/proc/HardQueue(datum/D) + if (D.gc_destroyed == GC_CURRENTLY_BEING_QDELETED) + queues[GC_QUEUE_PREQUEUE] += D + D.gc_destroyed = GC_QUEUED_FOR_HARD_DEL /datum/controller/subsystem/garbage/Recover() - if (istype(SSgarbage.queue)) - queue |= SSgarbage.queue - if (istype(SSgarbage.tobequeued)) - tobequeued |= SSgarbage.tobequeued + if (istype(SSgarbage.queues)) + for (var/i in 1 to SSgarbage.queues.len) + queues[i] |= SSgarbage.queues[i] + + +/datum/qdel_item + var/name = "" + var/qdels = 0 //Total number of times it's passed thru qdel. + var/destroy_time = 0 //Total amount of milliseconds spent processing this type's Destroy() + var/failures = 0 //Times it was queued for soft deletion but failed to soft delete. + var/hard_deletes = 0 //Different from failures because it also includes QDEL_HINT_HARDDEL deletions + var/hard_delete_time = 0//Total amount of milliseconds spent hard deleting this type. + var/no_respect_force = 0//Number of times it's not respected force=TRUE + var/no_hint = 0 //Number of times it's not even bother to give a qdel hint + var/slept_destroy = 0 //Number of times it's slept in its destroy + +/datum/qdel_item/New(mytype) + name = "[mytype]" + // Should be treated as a replacement for the 'del' keyword. // Datums passed to this will be given a chance to clean up references to allow the GC to collect them. @@ -185,21 +267,27 @@ SUBSYSTEM_DEF(garbage) if(!istype(D)) del(D) return -#ifdef TESTING - SSgarbage.qdel_list += "[D.type]" -#endif + var/datum/qdel_item/I = SSgarbage.items[D.type] + if (!I) + I = SSgarbage.items[D.type] = new /datum/qdel_item(D.type) + I.qdels++ + + if(isnull(D.gc_destroyed)) D.SendSignal(COMSIG_PARENT_QDELETED) D.gc_destroyed = GC_CURRENTLY_BEING_QDELETED var/start_time = world.time + var/start_tick = world.tick_usage var/hint = D.Destroy(force) // Let our friend know they're about to get fucked up. if(world.time != start_time) - SSgarbage.sleptDestroy["[D.type]"]++ + I.slept_destroy++ + else + I.destroy_time += TICK_USAGE_TO_MS(start_tick) if(!D) return switch(hint) if (QDEL_HINT_QUEUE) //qdel should queue the object for deletion. - SSgarbage.QueueForQueuing(D) + SSgarbage.PreQueue(D) if (QDEL_HINT_IWILLGC) D.gc_destroyed = world.time return @@ -209,28 +297,33 @@ SUBSYSTEM_DEF(garbage) return // Returning LETMELIVE after being told to force destroy // indicates the objects Destroy() does not respect force - if(!SSgarbage.noforcerespect["[D.type]"]) - SSgarbage.noforcerespect["[D.type]"] = "[D.type]" + #ifdef TESTING + if(!I.no_respect_force) testing("WARNING: [D.type] has been force deleted, but is \ returning an immortal QDEL_HINT, indicating it does \ not respect the force flag for qdel(). It has been \ placed in the queue, further instances of this type \ will also be queued.") - SSgarbage.QueueForQueuing(D) + #endif + I.no_respect_force++ + + SSgarbage.PreQueue(D) if (QDEL_HINT_HARDDEL) //qdel should assume this object won't gc, and queue a hard delete using a hard reference to save time from the locate() SSgarbage.HardQueue(D) if (QDEL_HINT_HARDDEL_NOW) //qdel should assume this object won't gc, and hard del it post haste. SSgarbage.HardDelete(D) if (QDEL_HINT_FINDREFERENCE)//qdel will, if TESTING is enabled, display all references to this object, then queue the object for deletion. - SSgarbage.QueueForQueuing(D) + SSgarbage.PreQueue(D) #ifdef TESTING D.find_references() #endif else - if(!SSgarbage.noqdelhint["[D.type]"]) - SSgarbage.noqdelhint["[D.type]"] = "[D.type]" + #ifdef TESTING + if(!I.no_hint) testing("WARNING: [D.type] is not returning a qdel hint. It is being placed in the queue. Further instances of this type will also be queued.") - SSgarbage.QueueForQueuing(D) + #endif + I.no_hint++ + SSgarbage.PreQueue(D) else if(D.gc_destroyed == GC_CURRENTLY_BEING_QDELETED) CRASH("[D.type] destroy proc was called multiple times, likely due to a qdel loop in the Destroy logic") @@ -281,15 +374,6 @@ SUBSYSTEM_DEF(garbage) SSgarbage.can_fire = 1 SSgarbage.next_fire = world.time + world.tick_lag -/client/verb/purge_all_destroyed_objects() - set category = "Debug" - while(SSgarbage.queue.len) - var/datum/o = locate(SSgarbage.queue[1]) - if(istype(o) && o.gc_destroyed) - del(o) - SSgarbage.totaldels++ - SSgarbage.queue.Cut(1, 2) - /datum/verb/qdel_then_find_references() set category = "Debug" set name = "qdel() then Find References" @@ -300,24 +384,6 @@ SUBSYSTEM_DEF(garbage) if(!running_find_references) find_references(TRUE) -/client/verb/show_qdeleted() - set category = "Debug" - set name = "Show qdel() Log" - set desc = "Render the qdel() log and display it" - - var/dat = "List of things that have been qdel()eted this round

" - - var/tmplist = list() - for(var/elem in SSgarbage.qdel_list) - if(!(elem in tmplist)) - tmplist[elem] = 0 - tmplist[elem]++ - - for(var/path in tmplist) - dat += "[path] - [tmplist[path]] times
" - - usr << browse(dat, "window=qdeletedlog") - /datum/proc/DoSearchVar(X, Xname) if(usr && usr.client && !usr.client.running_find_references) return if(istype(X, /datum)) diff --git a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm index 2c36e10d31..f2bb300471 100644 --- a/code/controllers/subsystem/mapping.dm +++ b/code/controllers/subsystem/mapping.dm @@ -117,7 +117,7 @@ SUBSYSTEM_DEF(mapping) var/start_time = REALTIMEOFDAY INIT_ANNOUNCE("Loading [config.map_name]...") - TryLoadZ(config.GetFullMapPath(), FailedZs, ZLEVEL_STATION) + TryLoadZ(config.GetFullMapPath(), FailedZs, ZLEVEL_STATION_PRIMARY) INIT_ANNOUNCE("Loaded station in [(REALTIMEOFDAY - start_time)/10]s!") if(SSdbcore.Connect()) var/datum/DBQuery/query_round_map_name = SSdbcore.NewQuery("UPDATE [format_table_name("round")] SET map_name = '[config.map_name]' WHERE id = [GLOB.round_id]") diff --git a/code/controllers/subsystem/minimap.dm b/code/controllers/subsystem/minimap.dm index 10c6f8e5c4..4e58212b44 100644 --- a/code/controllers/subsystem/minimap.dm +++ b/code/controllers/subsystem/minimap.dm @@ -5,7 +5,7 @@ SUBSYSTEM_DEF(minimap) var/const/MINIMAP_SIZE = 2048 var/const/TILE_SIZE = 8 - var/list/z_levels = list(ZLEVEL_STATION) + var/list/z_levels = list(ZLEVEL_STATION_PRIMARY) /datum/controller/subsystem/minimap/Initialize(timeofday) var/hash = md5(SSmapping.config.GetFullMapPath()) diff --git a/code/controllers/subsystem/persistence.dm b/code/controllers/subsystem/persistence.dm index 0137953a65..13762b83f9 100644 --- a/code/controllers/subsystem/persistence.dm +++ b/code/controllers/subsystem/persistence.dm @@ -35,7 +35,7 @@ SUBSYSTEM_DEF(persistence) if(chosen_satchel.len == 3) F.x = text2num(chosen_satchel[1]) F.y = text2num(chosen_satchel[2]) - F.z = ZLEVEL_STATION + F.z = ZLEVEL_STATION_PRIMARY path = text2path(chosen_satchel[3]) else var/json_file = file("data/npc_saves/SecretSatchels[SSmapping.config.map_name].json") @@ -50,7 +50,7 @@ SUBSYSTEM_DEF(persistence) old_secret_satchels.Cut(pos, pos+1) F.x = old_secret_satchels[pos]["x"] F.y = old_secret_satchels[pos]["y"] - F.z = ZLEVEL_STATION + F.z = ZLEVEL_STATION_PRIMARY path = text2path(old_secret_satchels[pos]["saved_obj"]) if(!ispath(path)) return @@ -59,7 +59,7 @@ SUBSYSTEM_DEF(persistence) 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 + for(var/turf/T in shuffle(block(locate(TRANSITIONEDGE,TRANSITIONEDGE,ZLEVEL_STATION_PRIMARY), locate(world.maxx-TRANSITIONEDGE,world.maxy-TRANSITIONEDGE,ZLEVEL_STATION_PRIMARY)))) //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_satchel) >= (50 - old_secret_satchels.len) * 0.1)) //up to six tiles, more than enough to kill anything that moves @@ -171,7 +171,7 @@ SUBSYSTEM_DEF(persistence) satchel_blacklist = typecacheof(list(/obj/item/stack/tile/plasteel, /obj/item/crowbar)) 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) + if(QDELETED(F) || F.z != ZLEVEL_STATION_PRIMARY || F.invisibility != INVISIBILITY_MAXIMUM) continue var/list/savable_obj = list() for(var/obj/O in F) diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm index ea91e8a688..de6445831d 100644 --- a/code/controllers/subsystem/shuttle.dm +++ b/code/controllers/subsystem/shuttle.dm @@ -290,7 +290,7 @@ SUBSYSTEM_DEF(shuttle) continue var/turf/T = get_turf(thing) - if(T && T.z == ZLEVEL_STATION) + if(T && (T.z in GLOB.station_z_levels)) callShuttle = 0 break @@ -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 @@ -384,7 +384,7 @@ SUBSYSTEM_DEF(shuttle) var/travel_dir = M.preferred_direction // Remember, the direction is the direction we appear to be // coming from - var/dock_angle = dir2angle(M.preferred_direction) + M.port_angle + 180 + var/dock_angle = dir2angle(M.preferred_direction) + dir2angle(M.port_direction) + 180 var/dock_dir = angle2dir(dock_angle) var/transit_width = SHUTTLE_TRANSIT_BORDER * 2 diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index dfe55379f1..6d458cb0ee 100755 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -69,6 +69,9 @@ SUBSYSTEM_DEF(ticker) /datum/controller/subsystem/ticker/Initialize(timeofday) load_mode() var/list/music = world.file2list(ROUND_START_MUSIC_LIST, "\n") + var/old_login_music = trim(file2text("data/last_round_lobby_music.txt")) + if(music.len > 1) + music -= old_login_music login_music = pick(music) if(!GLOB.syndicate_code_phrase) @@ -316,11 +319,6 @@ SUBSYSTEM_DEF(ticker) flick("station_corrupted",cinematic) SEND_SOUND(world, sound('sound/effects/ghost.ogg')) actually_blew_up = FALSE - if("gang war") //Gang Domination (just show the override screen) - cinematic.icon_state = "intro_malf_still" - flick("intro_malf",cinematic) - actually_blew_up = FALSE - sleep(70) if("fake") //The round isn't over, we're just freaking people out for fun flick("intro_nuke",cinematic) sleep(35) @@ -393,7 +391,7 @@ SUBSYSTEM_DEF(ticker) if(bomb && bomb.loc) bombloc = bomb.z else if(!station_missed) - bombloc = ZLEVEL_STATION + bombloc = ZLEVEL_STATION_PRIMARY if(mode) mode.explosion_in_progress = 0 @@ -473,6 +471,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)) @@ -521,7 +525,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 @@ -541,7 +545,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:") @@ -767,10 +771,6 @@ SUBSYSTEM_DEF(ticker) news_message = "We would like to reassure all employees that the reports of a Syndicate backed nuclear attack on [station_name()] are, in fact, a hoax. Have a secure day!" if(STATION_EVACUATED) news_message = "The crew of [station_name()] has been evacuated amid unconfirmed reports of enemy activity." - if(GANG_LOSS) - news_message = "Organized crime aboard [station_name()] has been stamped out by members of our ever vigilant security team. Remember to thank your assigned officers today!" - if(GANG_TAKEOVER) - news_message = "Contact with [station_name()] has been lost after a sophisticated hacking attack by organized criminal elements. Stay vigilant!" if(BLOB_WIN) news_message = "[station_name()] was overcome by an unknown biological outbreak, killing all crew on board. Don't let it happen to you! Remember, a clean work station is a safe work station." if(BLOB_NUKE) @@ -893,3 +893,4 @@ SUBSYSTEM_DEF(ticker) ) SEND_SOUND(world, sound(round_end_sound)) + text2file(login_music, "data/last_round_lobby_music.txt") 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/antagonists/datum_cult.dm b/code/datums/antagonists/datum_cult.dm index d17b799ca2..8c05c54b21 100644 --- a/code/datums/antagonists/datum_cult.dm +++ b/code/datums/antagonists/datum_cult.dm @@ -40,7 +40,7 @@ if(!GLOB.summon_spots.len) while(GLOB.summon_spots.len < SUMMON_POSSIBILITIES) var/area/summon = pick(GLOB.sortedAreas - GLOB.summon_spots) - if(summon && (summon.z == ZLEVEL_STATION) && summon.valid_territory) + if(summon && (summon.z in GLOB.station_z_levels) && summon.valid_territory) GLOB.summon_spots += summon SSticker.mode.cult_objectives += "eldergod" diff --git a/code/datums/antagonists/devil.dm b/code/datums/antagonists/devil.dm index 9839dfe4ac..14c92f3263 100644 --- a/code/datums/antagonists/devil.dm +++ b/code/datums/antagonists/devil.dm @@ -164,7 +164,7 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master", update_hud() switch(SOULVALUE) if(0) - to_chat(owner.current, "Your hellish powers have been restored.") + to_chat(owner.current, "Your hellish powers have been restored.") give_appropriate_spells() if(BLOOD_THRESHOLD) increase_blood_lizard() @@ -189,10 +189,10 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master", regress_humanoid() if(SOULVALUE < 0) give_appropriate_spells() - to_chat(owner.current, "As punishment for your failures, all of your powers except contract creation have been revoked.") + to_chat(owner.current, "As punishment for your failures, all of your powers except contract creation have been revoked.") /datum/antagonist/devil/proc/regress_humanoid() - to_chat(owner.current, "Your powers weaken, have more contracts be signed to regain power.") + to_chat(owner.current, "Your powers weaken, have more contracts be signed to regain power.") if(ishuman(owner.current)) var/mob/living/carbon/human/H = owner.current H.set_species(/datum/species/human, 1) @@ -204,7 +204,7 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master", /datum/antagonist/devil/proc/regress_blood_lizard() var/mob/living/carbon/true_devil/D = owner.current - to_chat(D, "Your powers weaken, have more contracts be signed to regain power.") + to_chat(D, "Your powers weaken, have more contracts be signed to regain power.") D.oldform.loc = D.loc owner.transfer_to(D.oldform) give_appropriate_spells() @@ -214,7 +214,7 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master", /datum/antagonist/devil/proc/increase_blood_lizard() - to_chat(owner.current, "You feel as though your humanoid form is about to shed. You will soon turn into a blood lizard.") + to_chat(owner.current, "You feel as though your humanoid form is about to shed. You will soon turn into a blood lizard.") sleep(50) if(ishuman(owner.current)) var/mob/living/carbon/human/H = owner.current @@ -232,7 +232,7 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master", /datum/antagonist/devil/proc/increase_true_devil() - to_chat(owner.current, "You feel as though your current form is about to shed. You will soon turn into a true devil.") + to_chat(owner.current, "You feel as though your current form is about to shed. You will soon turn into a true devil.") sleep(50) var/mob/living/carbon/true_devil/A = new /mob/living/carbon/true_devil(owner.current.loc) A.faction |= "hell" @@ -248,7 +248,7 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master", if(!ascendable) return var/mob/living/carbon/true_devil/D = owner.current - to_chat(D, "You feel as though your form is about to ascend.") + to_chat(D, "You feel as though your form is about to ascend.") sleep(50) if(!D) return diff --git a/code/datums/components/archaeology.dm b/code/datums/components/archaeology.dm new file mode 100644 index 0000000000..7c61613c41 --- /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(obj/item/W, mob/living/user) + 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]" + POT.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..d55a32609a 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;[HrefToken()];proc_call=\ref[src]" + .["Mark Object"] = "?_src_=vars;[HrefToken()];mark_object=\ref[src]" + .["Delete"] = "?_src_=vars;[HrefToken()];delete=\ref[src]" + .["Show VV To Player"] = "?_src_=vars;[HrefToken(TRUE)];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;[HrefToken()];listadd=[refid]", + "Remove Nulls" = "?_src_=vars;[HrefToken()];listnulls=[refid]", + "Remove Dupes" = "?_src_=vars;[HrefToken()];listdupes=[refid]", + "Set len" = "?_src_=vars;[HrefToken()];listlen=[refid]", + "Shuffle" = "?_src_=vars;[HrefToken()];listshuffle=[refid]", + "Show VV To Player" = "?_src_=vars;[HrefToken()];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 || !holder.CheckAdminHref(href, href_list)) + 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/advance.dm b/code/datums/diseases/advance/advance.dm index 7f09ffa48c..9be242a391 100644 --- a/code/datums/diseases/advance/advance.dm +++ b/code/datums/diseases/advance/advance.dm @@ -413,7 +413,7 @@ AD.Refresh() for(var/mob/living/carbon/human/H in shuffle(GLOB.living_mob_list)) - if(H.z != ZLEVEL_STATION) + if(!(H.z in GLOB.station_z_levels)) continue if(!H.HasDisease(D)) H.ForceContractDisease(D) 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/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm index fc943a8049..0eb76388ae 100644 --- a/code/datums/helper_datums/teleport.dm +++ b/code/datums/helper_datums/teleport.dm @@ -1,230 +1,230 @@ -//wrapper -/proc/do_teleport(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null) - var/datum/teleport/instant/science/D = new - if(D.start(arglist(args))) - return 1 - return 0 - -/datum/teleport - var/atom/movable/teleatom //atom to teleport - var/atom/destination //destination to teleport to - var/precision = 0 //teleport precision - var/datum/effect_system/effectin //effect to show right before teleportation - var/datum/effect_system/effectout //effect to show right after teleportation - var/soundin //soundfile to play before teleportation - var/soundout //soundfile to play after teleportation - var/force_teleport = 1 //if false, teleport will use Move() proc (dense objects will prevent teleportation) - -/datum/teleport/proc/start(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null) - if(!initTeleport(arglist(args))) - return 0 - return 1 - -/datum/teleport/proc/initTeleport(ateleatom,adestination,aprecision,afteleport,aeffectin,aeffectout,asoundin,asoundout) - if(!setTeleatom(ateleatom)) - return 0 - if(!setDestination(adestination)) - return 0 - if(!setPrecision(aprecision)) - return 0 - setEffects(aeffectin,aeffectout) - setForceTeleport(afteleport) - setSounds(asoundin,asoundout) - return 1 - -//must succeed -/datum/teleport/proc/setPrecision(aprecision) - if(isnum(aprecision)) - precision = aprecision - return 1 - return 0 - -//must succeed -/datum/teleport/proc/setDestination(atom/adestination) - if(istype(adestination)) - destination = adestination - return 1 - return 0 - -//must succeed in most cases -/datum/teleport/proc/setTeleatom(atom/movable/ateleatom) - if(istype(ateleatom, /obj/effect) && !istype(ateleatom, /obj/effect/dummy/chameleon)) - qdel(ateleatom) - return 0 - if(istype(ateleatom)) - teleatom = ateleatom - return 1 - return 0 - -//custom effects must be properly set up first for instant-type teleports -//optional -/datum/teleport/proc/setEffects(datum/effect_system/aeffectin=null,datum/effect_system/aeffectout=null) - effectin = istype(aeffectin) ? aeffectin : null - effectout = istype(aeffectout) ? aeffectout : null - return 1 - -//optional -/datum/teleport/proc/setForceTeleport(afteleport) - force_teleport = afteleport - return 1 - -//optional -/datum/teleport/proc/setSounds(asoundin=null,asoundout=null) - soundin = isfile(asoundin) ? asoundin : null - soundout = isfile(asoundout) ? asoundout : null - return 1 - -//placeholder -/datum/teleport/proc/teleportChecks() - return 1 - -/datum/teleport/proc/playSpecials(atom/location,datum/effect_system/effect,sound) - if(location) - if(effect) - INVOKE_ASYNC(src, .proc/do_effect, location, effect) - if(sound) - INVOKE_ASYNC(src, .proc/do_sound, location, sound) - -/datum/teleport/proc/do_effect(atom/location, datum/effect_system/effect) - src = null - effect.attach(location) - effect.start() - -/datum/teleport/proc/do_sound(atom/location, sound) - src = null - playsound(location, sound, 60, 1) - -//do the monkey dance -/datum/teleport/proc/doTeleport() - - var/turf/destturf - var/turf/curturf = get_turf(teleatom) - destturf = get_teleport_turf(get_turf(destination), precision) - - if(!destturf || !curturf || destturf.is_transition_turf()) - return 0 - - var/area/A = get_area(curturf) - if(A.noteleport) - return 0 - - playSpecials(curturf,effectin,soundin) - if(force_teleport) - teleatom.forceMove(destturf) - if(ismegafauna(teleatom)) - message_admins("[teleatom] [ADMIN_FLW(teleatom)] has teleported from [ADMIN_COORDJMP(curturf)] to [ADMIN_COORDJMP(destturf)].") - playSpecials(destturf,effectout,soundout) - else - if(teleatom.Move(destturf)) - playSpecials(destturf,effectout,soundout) - if(ismegafauna(teleatom)) - message_admins("[teleatom] [ADMIN_FLW(teleatom)] has teleported from [ADMIN_COORDJMP(curturf)] to [ADMIN_COORDJMP(destturf)].") - return 1 - -/datum/teleport/proc/teleport() - if(teleportChecks()) - return doTeleport() - return 0 - -/datum/teleport/instant //teleports when datum is created - - start(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null) - if(..()) - if(teleport()) - return 1 - return 0 - - -/datum/teleport/instant/science - -/datum/teleport/instant/science/setEffects(datum/effect_system/aeffectin,datum/effect_system/aeffectout) - if(aeffectin==null || aeffectout==null) - var/datum/effect_system/spark_spread/aeffect = new - aeffect.set_up(5, 1, teleatom) - effectin = effectin || aeffect - effectout = effectout || aeffect - return 1 - else - return ..() - -/datum/teleport/instant/science/setPrecision(aprecision) - ..() - if(istype(teleatom, /obj/item/storage/backpack/holding)) - precision = rand(1,100) - - var/list/bagholding = teleatom.search_contents_for(/obj/item/storage/backpack/holding) - if(bagholding.len) - precision = max(rand(1,100)*bagholding.len,100) - if(isliving(teleatom)) - var/mob/living/MM = teleatom - to_chat(MM, "The bluespace interface on your bag of holding interferes with the teleport!") - return 1 - -// Safe location finder - -/proc/find_safe_turf(zlevel = ZLEVEL_STATION, list/zlevels, extended_safety_checks = FALSE) - if(!zlevels) - zlevels = list(zlevel) - var/cycles = 1000 - for(var/cycle in 1 to cycles) - // DRUNK DIALLING WOOOOOOOOO - var/x = rand(1, world.maxx) - var/y = rand(1, world.maxy) - var/z = pick(zlevels) - var/random_location = locate(x,y,z) - - if(!isfloorturf(random_location)) - continue - var/turf/open/floor/F = random_location - if(!F.air) - continue - - var/datum/gas_mixture/A = F.air - var/list/A_gases = A.gases - var/trace_gases - for(var/id in A_gases) - if(id in GLOB.hardcoded_gases) - continue - trace_gases = TRUE - break - - // Can most things breathe? - if(trace_gases) - continue - if(!(A_gases["o2"] && A_gases["o2"][MOLES] >= 16)) - continue - if(A_gases["plasma"]) - continue - if(A_gases["co2"] && A_gases["co2"][MOLES] >= 10) - continue - - // Aim for goldilocks temperatures and pressure - if((A.temperature <= 270) || (A.temperature >= 360)) - continue - var/pressure = A.return_pressure() - if((pressure <= 20) || (pressure >= 550)) - continue - - if(extended_safety_checks) +//wrapper +/proc/do_teleport(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null) + var/datum/teleport/instant/science/D = new + if(D.start(arglist(args))) + return 1 + return 0 + +/datum/teleport + var/atom/movable/teleatom //atom to teleport + var/atom/destination //destination to teleport to + var/precision = 0 //teleport precision + var/datum/effect_system/effectin //effect to show right before teleportation + var/datum/effect_system/effectout //effect to show right after teleportation + var/soundin //soundfile to play before teleportation + var/soundout //soundfile to play after teleportation + var/force_teleport = 1 //if false, teleport will use Move() proc (dense objects will prevent teleportation) + +/datum/teleport/proc/start(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null) + if(!initTeleport(arglist(args))) + return 0 + return 1 + +/datum/teleport/proc/initTeleport(ateleatom,adestination,aprecision,afteleport,aeffectin,aeffectout,asoundin,asoundout) + if(!setTeleatom(ateleatom)) + return 0 + if(!setDestination(adestination)) + return 0 + if(!setPrecision(aprecision)) + return 0 + setEffects(aeffectin,aeffectout) + setForceTeleport(afteleport) + setSounds(asoundin,asoundout) + return 1 + +//must succeed +/datum/teleport/proc/setPrecision(aprecision) + if(isnum(aprecision)) + precision = aprecision + return 1 + return 0 + +//must succeed +/datum/teleport/proc/setDestination(atom/adestination) + if(istype(adestination)) + destination = adestination + return 1 + return 0 + +//must succeed in most cases +/datum/teleport/proc/setTeleatom(atom/movable/ateleatom) + if(istype(ateleatom, /obj/effect) && !istype(ateleatom, /obj/effect/dummy/chameleon)) + qdel(ateleatom) + return 0 + if(istype(ateleatom)) + teleatom = ateleatom + return 1 + return 0 + +//custom effects must be properly set up first for instant-type teleports +//optional +/datum/teleport/proc/setEffects(datum/effect_system/aeffectin=null,datum/effect_system/aeffectout=null) + effectin = istype(aeffectin) ? aeffectin : null + effectout = istype(aeffectout) ? aeffectout : null + return 1 + +//optional +/datum/teleport/proc/setForceTeleport(afteleport) + force_teleport = afteleport + return 1 + +//optional +/datum/teleport/proc/setSounds(asoundin=null,asoundout=null) + soundin = isfile(asoundin) ? asoundin : null + soundout = isfile(asoundout) ? asoundout : null + return 1 + +//placeholder +/datum/teleport/proc/teleportChecks() + return 1 + +/datum/teleport/proc/playSpecials(atom/location,datum/effect_system/effect,sound) + if(location) + if(effect) + INVOKE_ASYNC(src, .proc/do_effect, location, effect) + if(sound) + INVOKE_ASYNC(src, .proc/do_sound, location, sound) + +/datum/teleport/proc/do_effect(atom/location, datum/effect_system/effect) + src = null + effect.attach(location) + effect.start() + +/datum/teleport/proc/do_sound(atom/location, sound) + src = null + playsound(location, sound, 60, 1) + +//do the monkey dance +/datum/teleport/proc/doTeleport() + + var/turf/destturf + var/turf/curturf = get_turf(teleatom) + destturf = get_teleport_turf(get_turf(destination), precision) + + if(!destturf || !curturf || destturf.is_transition_turf()) + return 0 + + var/area/A = get_area(curturf) + if(A.noteleport) + return 0 + + playSpecials(curturf,effectin,soundin) + if(force_teleport) + teleatom.forceMove(destturf) + if(ismegafauna(teleatom)) + message_admins("[teleatom] [ADMIN_FLW(teleatom)] has teleported from [ADMIN_COORDJMP(curturf)] to [ADMIN_COORDJMP(destturf)].") + playSpecials(destturf,effectout,soundout) + else + if(teleatom.Move(destturf)) + playSpecials(destturf,effectout,soundout) + if(ismegafauna(teleatom)) + message_admins("[teleatom] [ADMIN_FLW(teleatom)] has teleported from [ADMIN_COORDJMP(curturf)] to [ADMIN_COORDJMP(destturf)].") + return 1 + +/datum/teleport/proc/teleport() + if(teleportChecks()) + return doTeleport() + return 0 + +/datum/teleport/instant //teleports when datum is created + + start(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null) + if(..()) + if(teleport()) + return 1 + return 0 + + +/datum/teleport/instant/science + +/datum/teleport/instant/science/setEffects(datum/effect_system/aeffectin,datum/effect_system/aeffectout) + if(aeffectin==null || aeffectout==null) + var/datum/effect_system/spark_spread/aeffect = new + aeffect.set_up(5, 1, teleatom) + effectin = effectin || aeffect + effectout = effectout || aeffect + return 1 + else + return ..() + +/datum/teleport/instant/science/setPrecision(aprecision) + ..() + if(istype(teleatom, /obj/item/storage/backpack/holding)) + precision = rand(1,100) + + var/list/bagholding = teleatom.search_contents_for(/obj/item/storage/backpack/holding) + if(bagholding.len) + precision = max(rand(1,100)*bagholding.len,100) + if(isliving(teleatom)) + var/mob/living/MM = teleatom + to_chat(MM, "The bluespace interface on your bag of holding interferes with the teleport!") + return 1 + +// Safe location finder + +/proc/find_safe_turf(zlevel = ZLEVEL_STATION_PRIMARY, list/zlevels, extended_safety_checks = FALSE) + if(!zlevels) + zlevels = list(zlevel) + var/cycles = 1000 + for(var/cycle in 1 to cycles) + // DRUNK DIALLING WOOOOOOOOO + var/x = rand(1, world.maxx) + var/y = rand(1, world.maxy) + var/z = pick(zlevels) + var/random_location = locate(x,y,z) + + if(!isfloorturf(random_location)) + continue + var/turf/open/floor/F = random_location + if(!F.air) + continue + + var/datum/gas_mixture/A = F.air + var/list/A_gases = A.gases + var/trace_gases + for(var/id in A_gases) + if(id in GLOB.hardcoded_gases) + continue + trace_gases = TRUE + break + + // Can most things breathe? + if(trace_gases) + continue + if(!(A_gases["o2"] && A_gases["o2"][MOLES] >= 16)) + continue + if(A_gases["plasma"]) + continue + if(A_gases["co2"] && A_gases["co2"][MOLES] >= 10) + continue + + // Aim for goldilocks temperatures and pressure + if((A.temperature <= 270) || (A.temperature >= 360)) + continue + var/pressure = A.return_pressure() + if((pressure <= 20) || (pressure >= 550)) + continue + + if(extended_safety_checks) if(istype(F, /turf/open/lava)) //chasms aren't /floor, and so are pre-filtered var/turf/open/lava/L = F - if(!L.is_safe()) - continue - - // DING! You have passed the gauntlet, and are "probably" safe. - return F - -/proc/get_teleport_turfs(turf/center, precision = 0) - if(!precision) - return list(center) - var/list/posturfs = list() - for(var/turf/T in range(precision,center)) - if(T.is_transition_turf()) - continue // Avoid picking these. - var/area/A = T.loc - if(!A.noteleport) - posturfs.Add(T) - return posturfs - -/proc/get_teleport_turf(turf/center, precision = 0) - return safepick(get_teleport_turfs(center, precision)) + if(!L.is_safe()) + continue + + // DING! You have passed the gauntlet, and are "probably" safe. + return F + +/proc/get_teleport_turfs(turf/center, precision = 0) + if(!precision) + return list(center) + var/list/posturfs = list() + for(var/turf/T in range(precision,center)) + if(T.is_transition_turf()) + continue // Avoid picking these. + var/area/A = T.loc + if(!A.noteleport) + posturfs.Add(T) + return posturfs + +/proc/get_teleport_turf(turf/center, precision = 0) + return safepick(get_teleport_turfs(center, precision)) diff --git a/code/datums/hud.dm b/code/datums/hud.dm index dc78eea396..0d4f7810c6 100644 --- a/code/datums/hud.dm +++ b/code/datums/hud.dm @@ -75,12 +75,7 @@ GLOBAL_LIST_INIT(huds, list( //MOB PROCS /mob/proc/reload_huds() - var/gang_huds = list() - if(SSticker.mode) - for(var/datum/gang/G in SSticker.mode.gangs) - gang_huds += G.ganghud - - for(var/datum/atom_hud/hud in (GLOB.huds|gang_huds|GLOB.active_alternate_appearances)) + for(var/datum/atom_hud/hud in (GLOB.huds|GLOB.active_alternate_appearances)) if(hud && hud.hudusers[src]) hud.add_hud_to(src) 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 78a402a2dc..5ad9f4aa6d 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -56,7 +56,6 @@ var/list/antag_datums var/antag_hud_icon_state = null //this mind's ANTAG_HUD should have this icon_state var/datum/atom_hud/antag/antag_hud = null //this mind's antag HUD - var/datum/gang/gang_datum //Which gang this mind belongs to, if any var/damnation_type = 0 var/datum/mind/soulOwner //who owns the soul. Under normal circumstances, this will point to src var/hasSoul = TRUE // If false, renders the character unable to sell their soul. @@ -228,11 +227,6 @@ remove_objectives() remove_antag_equip() - -/datum/mind/proc/remove_gang() - SSticker.mode.remove_gangster(src,0,1,1) - remove_objectives() - /datum/mind/proc/remove_antag_equip() var/list/Mob_Contents = current.get_contents() for(var/obj/item/I in Mob_Contents) @@ -251,14 +245,11 @@ remove_wizard() remove_cultist() remove_rev() - remove_gang() SSticker.mode.update_changeling_icons_removed(src) SSticker.mode.update_traitor_icons_removed(src) SSticker.mode.update_wiz_icons_removed(src) SSticker.mode.update_cult_icons_removed(src) SSticker.mode.update_rev_icons_removed(src) - if(gang_datum) - gang_datum.remove_gang_hud(src) /datum/mind/proc/equip_traitor(var/employer = "The Syndicate", var/silent = FALSE) if(!current) @@ -311,7 +302,7 @@ traitor_mob.mind.store_memory("Radio Frequency: [format_frequency(R.traitor_frequency)] ([R.name]).") else if(uplink_loc == PDA) - PDA.lock_code = "[rand(100,999)] [pick("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")]" + PDA.lock_code = "[rand(100,999)] [pick(GLOB.phonetic_alphabet)]" if(!silent) to_chat(traitor_mob, "[employer] has cunningly disguised a Syndicate Uplink as your [PDA.name]. Simply enter the code \"[PDA.lock_code]\" into the ringtone select to unlock its hidden features.") traitor_mob.mind.store_memory("Uplink Passcode: [PDA.lock_code] ([PDA.name]).") @@ -328,9 +319,6 @@ if(iscultist(creator)) SSticker.mode.add_cultist(src) - else if(is_gangster(creator)) - SSticker.mode.add_gangster(src, creator.mind.gang_datum, TRUE) - else if(is_revolutionary_in_general(creator)) SSticker.mode.add_revolutionary(src) @@ -385,7 +373,6 @@ "nuclear", "wizard", "revolution", - "gang", "cult", "clockcult", "abductor", @@ -535,7 +522,7 @@ if(I == src) continue var/mob/M = I - if(M.z == ZLEVEL_STATION && !M.stat) + if((M.z in GLOB.station_z_levels) && !M.stat) last_healthy_headrev = FALSE break text += "head | not mindshielded | employee | [last_healthy_headrev ? "LAST " : ""]HEADREV | rev" @@ -568,48 +555,8 @@ sections["revolution"] = text - /** GANG ***/ - text = "gang" - if (SSticker.mode.config_tag=="gang") - text = uppertext(text) - text = "[text]: " - 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
    " - else - text += " | Disabled in Prefs
    " - - for(var/datum/gang/G in SSticker.mode.gangs) - text += "[G.name]: " - if(src in (G.gangsters)) - text += "GANGSTER" - else - text += "gangster" - text += " | " - if(src in (G.bosses)) - text += "GANG LEADER" - text += " | Equipment: give" - var/list/L = current.get_contents() - var/obj/item/device/gangtool/gangtool = locate() in L - if (gangtool) - text += " | take" - - else - text += "gang leader" - text += "
    " - - if(GLOB.gang_colors_pool.len) - text += "Create New Gang" - - sections["gang"] = text - - /** ABDUCTION **/ - text = "abductor" + /** Abductors **/ + text = "Abductor" if(SSticker.mode.config_tag == "abductor") text = uppertext(text) text = "[text]: " @@ -1031,73 +978,6 @@ -//////////////////// GANG MODE - - else if (href_list["gang"]) - switch(href_list["gang"]) - if("clear") - remove_gang() - message_admins("[key_name_admin(usr)] has de-gang'ed [current].") - log_admin("[key_name(usr)] has de-gang'ed [current].") - - if("equip") - switch(SSticker.mode.equip_gang(current,gang_datum)) - if(1) - to_chat(usr, "Unable to equip territory spraycan!") - if(2) - to_chat(usr, "Unable to equip recruitment pen and spraycan!") - if(3) - to_chat(usr, "Unable to equip gangtool, pen, and spraycan!") - - if("takeequip") - var/list/L = current.get_contents() - for(var/obj/item/pen/gang/pen in L) - qdel(pen) - for(var/obj/item/device/gangtool/gangtool in L) - qdel(gangtool) - for(var/obj/item/toy/crayon/spraycan/gang/SC in L) - qdel(SC) - - if("new") - if(GLOB.gang_colors_pool.len) - var/list/names = list("Random") + GLOB.gang_name_pool - var/gangname = input("Pick a gang name.","Select Name") as null|anything in names - if(gangname && GLOB.gang_colors_pool.len) //Check again just in case another admin made max gangs at the same time - if(!(gangname in GLOB.gang_name_pool)) - gangname = null - var/datum/gang/newgang = new(null,gangname) - SSticker.mode.gangs += newgang - message_admins("[key_name_admin(usr)] has created the [newgang.name] Gang.") - log_admin("[key_name(usr)] has created the [newgang.name] Gang.") - - else if (href_list["gangboss"]) - var/datum/gang/G = locate(href_list["gangboss"]) in SSticker.mode.gangs - if(!G || (src in G.bosses)) - return - SSticker.mode.remove_gangster(src,0,2,1) - G.bosses[src] = GANGSTER_BOSS_STARTING_INFLUENCE - gang_datum = G - special_role = "[G.name] Gang Boss" - G.add_gang_hud(src) - to_chat(current, "You are a [G.name] Gang Boss!") - message_admins("[key_name_admin(usr)] has added [current] to the [G.name] Gang leadership.") - log_admin("[key_name(usr)] has added [current] to the [G.name] Gang leadership.") - SSticker.mode.forge_gang_objectives(src) - SSticker.mode.greet_gang(src,0) - - else if (href_list["gangster"]) - var/datum/gang/G = locate(href_list["gangster"]) in SSticker.mode.gangs - if(!G || (src in G.gangsters)) - return - SSticker.mode.remove_gangster(src,0,2,1) - SSticker.mode.add_gangster(src,G,0) - message_admins("[key_name_admin(usr)] has added [current] to the [G.name] Gang (A).") - log_admin("[key_name(usr)] has added [current] to the [G.name] Gang (A).") - -///////////////////////////////// - - - else if (href_list["cult"]) switch(href_list["cult"]) if("clear") @@ -1584,16 +1464,6 @@ var/fail = 0 fail |= !SSticker.mode.equip_revolutionary(current) - -/datum/mind/proc/make_Gang(datum/gang/G) - special_role = "[G.name] Gang Boss" - G.bosses += src - gang_datum = G - G.add_gang_hud(src) - SSticker.mode.forge_gang_objectives(src) - SSticker.mode.greet_gang(src) - SSticker.mode.equip_gang(current,G) - /datum/mind/proc/make_Abductor() var/role = alert("Abductor Role ?","Role","Agent","Scientist") var/team = input("Abductor Team ?","Team ?") in list(1,2,3,4) diff --git a/code/datums/mutations.dm b/code/datums/mutations.dm index df124260fe..e2296dd39a 100644 --- a/code/datums/mutations.dm +++ b/code/datums/mutations.dm @@ -117,8 +117,7 @@ GLOBAL_LIST_EMPTY(mutations_list) name = "Hulk" quality = POSITIVE - get_chance = 15 - lowest_value = 256 * 12 + dna_block = NON_SCANNABLE text_gain_indication = "Your muscles hurt!" species_allowed = list("human") //no skeleton/lizard hulk health_req = 25 diff --git a/code/datums/ruins/space.dm b/code/datums/ruins/space.dm index 88beec629f..b3af867bb4 100644 --- a/code/datums/ruins/space.dm +++ b/code/datums/ruins/space.dm @@ -18,6 +18,7 @@ name = "Asteroid 1" description = "I-spy with my little eye, something beginning with R." + /datum/map_template/ruin/space/asteroid2 id = "asteroid2" suffix = "asteroid2.dmm" @@ -247,4 +248,10 @@ id = "miracle" suffix = "miracle.dmm" name = "Ordinary Space Tile" - description = "Absolutely nothing strange going on here please move along, plenty more space to see right this way!" \ No newline at end of file + description = "Absolutely nothing strange going on here please move along, plenty more space to see right this way!" + +/datum/map_template/ruin/space/gondoland + id = "gondolaasteroid" + suffix = "gondolaasteroid.dmm" + name = "Gondoland" + description = "Just an ordinary rock- wait, what's that thing?" diff --git a/code/datums/status_effects/gas.dm b/code/datums/status_effects/gas.dm index ff92b67978..688c921a73 100644 --- a/code/datums/status_effects/gas.dm +++ b/code/datums/status_effects/gas.dm @@ -4,6 +4,7 @@ status_type = STATUS_EFFECT_UNIQUE alert_type = /obj/screen/alert/status_effect/freon var/icon/cube + var/can_melt = TRUE /obj/screen/alert/status_effect/freon name = "Frozen Solid" @@ -20,7 +21,7 @@ /datum/status_effect/freon/tick() owner.update_canmove() - if(owner && owner.bodytemperature >= 310.055) + if(can_melt && owner.bodytemperature >= 310.055) qdel(src) /datum/status_effect/freon/on_remove() @@ -29,3 +30,7 @@ owner.cut_overlay(cube) owner.bodytemperature += 100 owner.update_canmove() + +/datum/status_effect/freon/watcher + duration = 8 + can_melt = FALSE diff --git a/code/datums/weather/weather.dm b/code/datums/weather/weather.dm index f4f2fc089c..a2abdf64a1 100644 --- a/code/datums/weather/weather.dm +++ b/code/datums/weather/weather.dm @@ -30,7 +30,7 @@ var/area_type = /area/space //Types of area to affect var/list/impacted_areas = list() //Areas to be affected by the weather, calculated when the weather begins var/list/protected_areas = list()//Areas that are protected and excluded from the affected areas. - var/target_z = ZLEVEL_STATION //The z-level to affect + var/target_z = ZLEVEL_STATION_PRIMARY //The z-level to affect var/overlay_layer = AREA_LAYER //Since it's above everything else, this is the layer used by default. TURF_LAYER is below mobs and walls if you need to use that. var/aesthetic = FALSE //If the weather has no purpose other than looks diff --git a/code/datums/weather/weather_types.dm b/code/datums/weather/weather_types.dm index d23bf3c8a6..3368dcf1dd 100644 --- a/code/datums/weather/weather_types.dm +++ b/code/datums/weather/weather_types.dm @@ -17,7 +17,7 @@ area_type = /area protected_areas = list(/area/space) - target_z = ZLEVEL_STATION + target_z = ZLEVEL_STATION_PRIMARY overlay_layer = ABOVE_OPEN_TURF_LAYER //Covers floors only immunity_type = "lava" @@ -48,7 +48,7 @@ end_duration = 0 area_type = /area - target_z = ZLEVEL_STATION + target_z = ZLEVEL_STATION_PRIMARY /datum/weather/advanced_darkness/update_areas() for(var/V in impacted_areas) @@ -142,7 +142,7 @@ area_type = /area protected_areas = list(/area/maintenance, /area/ai_monitored/turret_protected/ai_upload, /area/ai_monitored/turret_protected/ai_upload_foyer, /area/ai_monitored/turret_protected/ai, /area/storage/emergency/starboard, /area/storage/emergency/port, /area/shuttle) - target_z = ZLEVEL_STATION + target_z = ZLEVEL_STATION_PRIMARY immunity_type = "rad" diff --git a/code/game/area/ai_monitored.dm b/code/game/area/ai_monitored.dm index f5700625c8..75548ff81e 100644 --- a/code/game/area/ai_monitored.dm +++ b/code/game/area/ai_monitored.dm @@ -1,30 +1,30 @@ -/area/ai_monitored - name = "AI Monitored Area" - var/list/obj/machinery/camera/motioncameras = list() - var/list/motionTargets = list() - -/area/ai_monitored/Initialize(mapload) - ..() - if(mapload) - for (var/obj/machinery/camera/M in src) - if(M.isMotion()) - motioncameras.Add(M) - M.area_motion = src - -//Only need to use one camera - -/area/ai_monitored/Entered(atom/movable/O) - ..() - if (ismob(O) && motioncameras.len) - for(var/X in motioncameras) - var/obj/machinery/camera/cam = X - cam.newTarget(O) - return - -/area/ai_monitored/Exited(atom/movable/O) - ..() - if (ismob(O) && motioncameras.len) - for(var/X in motioncameras) - var/obj/machinery/camera/cam = X - cam.lostTarget(O) - return \ No newline at end of file +/area/ai_monitored + name = "AI Monitored Area" + var/list/obj/machinery/camera/motioncameras = list() + var/list/motionTargets = list() + +/area/ai_monitored/Initialize(mapload) + . = ..() + if(mapload) + for (var/obj/machinery/camera/M in src) + if(M.isMotion()) + motioncameras.Add(M) + M.area_motion = src + +//Only need to use one camera + +/area/ai_monitored/Entered(atom/movable/O) + ..() + if (ismob(O) && motioncameras.len) + for(var/X in motioncameras) + var/obj/machinery/camera/cam = X + cam.newTarget(O) + return + +/area/ai_monitored/Exited(atom/movable/O) + ..() + if (ismob(O) && motioncameras.len) + for(var/X in motioncameras) + var/obj/machinery/camera/cam = X + cam.lostTarget(O) + return diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 0baef4ace8..fafd057fea 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -75,7 +75,7 @@ GLOBAL_LIST_EMPTY(teleportlocs) if(GLOB.teleportlocs[AR.name]) continue var/turf/picked = safepick(get_area_turfs(AR.type)) - if (picked && (picked.z == ZLEVEL_STATION)) + if (picked && (picked.z in GLOB.station_z_levels)) GLOB.teleportlocs[AR.name] = AR sortTim(GLOB.teleportlocs, /proc/cmp_text_dsc) @@ -120,7 +120,7 @@ GLOBAL_LIST_EMPTY(teleportlocs) if(dynamic_lighting == DYNAMIC_LIGHTING_IFSTARLIGHT) dynamic_lighting = config.starlight ? DYNAMIC_LIGHTING_ENABLED : DYNAMIC_LIGHTING_DISABLED - ..() + . = ..() power_change() // all machines set to current power level, also updates icon diff --git a/code/game/area/areas/holodeck.dm b/code/game/area/areas/holodeck.dm index cadc2e43d6..51399ca7e1 100644 --- a/code/game/area/areas/holodeck.dm +++ b/code/game/area/areas/holodeck.dm @@ -84,8 +84,8 @@ /area/holodeck/rec_center/firingrange name = "Holodeck - Firing Range" -/area/holodeck/rec_center/rollercoaster - name = "Holodeck - Roller Coaster" +/area/holodeck/rec_center/school + name = "Holodeck - Anime School" /area/holodeck/rec_center/chapelcourt name = "Holodeck - Chapel Courtroom" @@ -123,4 +123,4 @@ /area/holodeck/rec_center/thunderdome1218 name = "Holodeck - 1218 AD" - restricted = 1 + restricted = 1 \ No newline at end of file diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 272ec34d94..c399f7c00d 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 @@ -609,10 +614,10 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons) . += "---" var/turf/curturf = get_turf(src) if (curturf) - .["Jump to"] = "?_src_=holder;adminplayerobservecoodjump=1;X=[curturf.x];Y=[curturf.y];Z=[curturf.z]" - .["Add reagent"] = "?_src_=vars;addreagent=\ref[src]" - .["Trigger EM pulse"] = "?_src_=vars;emp=\ref[src]" - .["Trigger explosion"] = "?_src_=vars;explode=\ref[src]" + .["Jump to"] = "?_src_=holder;[HrefToken()];adminplayerobservecoodjump=1;X=[curturf.x];Y=[curturf.y];Z=[curturf.z]" + .["Add reagent"] = "?_src_=vars;[HrefToken()];addreagent=\ref[src]" + .["Trigger EM pulse"] = "?_src_=vars;[HrefToken()];emp=\ref[src]" + .["Trigger explosion"] = "?_src_=vars;[HrefToken()];explode=\ref[src]" /atom/proc/drop_location() var/atom/L = loc diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index f4cbcda098..05991cb213 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -215,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 @@ -497,7 +497,7 @@ /atom/movable/vv_get_dropdown() . = ..() . -= "Jump to" - .["Follow"] = "?_src_=holder;adminplayerobservefollow=\ref[src]" + .["Follow"] = "?_src_=holder;[HrefToken()];adminplayerobservefollow=\ref[src]" /atom/movable/proc/ex_check(ex_id) if(!ex_id) @@ -560,7 +560,7 @@ flags_2 |= STATIONLOVING_2 /atom/movable/proc/relocate() - var/targetturf = find_safe_turf(ZLEVEL_STATION) + var/targetturf = find_safe_turf(ZLEVEL_STATION_PRIMARY) if(!targetturf) if(GLOB.blobstart.len > 0) targetturf = get_turf(pick(GLOB.blobstart)) @@ -592,7 +592,7 @@ /atom/movable/proc/in_bounds() . = FALSE var/turf/currentturf = get_turf(src) - if(currentturf && (currentturf.z == ZLEVEL_CENTCOM || currentturf.z == ZLEVEL_STATION || currentturf.z == ZLEVEL_TRANSIT)) + if(currentturf && (currentturf.z == ZLEVEL_CENTCOM || (currentturf.z in GLOB.station_z_levels) || currentturf.z == ZLEVEL_TRANSIT)) . = TRUE diff --git a/code/game/gamemodes/antag_hud.dm b/code/game/gamemodes/antag_hud.dm index 26279ece7e..4fba08101c 100644 --- a/code/game/gamemodes/antag_hud.dm +++ b/code/game/gamemodes/antag_hud.dm @@ -48,41 +48,4 @@ newhud.join_hud(current) /datum/mind/proc/leave_all_antag_huds() - for(var/datum/atom_hud/antag/hud in GLOB.huds) - if(hud.hudusers[current]) - hud.leave_hud(current) - -/datum/atom_hud/antag/gang - var/color = null - -/datum/atom_hud/antag/gang/add_to_hud(atom/A) - if(!A) - return - var/image/holder = A.hud_list[ANTAG_HUD] - if(holder) - holder.color = color - ..() - -/datum/atom_hud/antag/gang/remove_from_hud(atom/A) - if(!A) - return - var/image/holder = A.hud_list[ANTAG_HUD] - if(holder) - holder.color = null - ..() - -/datum/atom_hud/antag/gang/join_hud(mob/M) - if(!istype(M)) - CRASH("join_hud(): [M] ([M.type]) is not a mob!") - var/image/holder = M.hud_list[ANTAG_HUD] - if(holder) - holder.color = color - ..() - -/datum/atom_hud/antag/gang/leave_hud(mob/M) - if(!istype(M)) - CRASH("leave_hud(): [M] ([M.type]) is not a mob!") - var/image/holder = M.hud_list[ANTAG_HUD] - if(holder) - holder.color = null - ..() + for(var/datum/atom_hud/antag/hud in GLOB.huds) \ No newline at end of file diff --git a/code/game/gamemodes/antag_spawner.dm b/code/game/gamemodes/antag_spawner.dm index ab9c041efe..9b585ea653 100644 --- a/code/game/gamemodes/antag_spawner.dm +++ b/code/game/gamemodes/antag_spawner.dm @@ -219,6 +219,7 @@ R.mmi.brain.name = "[brainopsname]'s brain" R.mmi.brainmob.real_name = brainopsname R.mmi.brainmob.name = brainopsname + R.real_name = R.name R.key = C.key R.mind.make_Nuke(null, nuke_code = null,leader=0, telecrystals = TRUE) @@ -238,7 +239,7 @@ /obj/item/antag_spawner/slaughter_demon/attack_self(mob/user) - if(user.z != ZLEVEL_STATION) + if(!(user.z in GLOB.station_z_levels)) to_chat(user, "You should probably wait until you reach the station.") return if(used) diff --git a/code/game/gamemodes/blob/blob.dm b/code/game/gamemodes/blob/blob.dm index ec923c635b..36a23b2bd1 100644 --- a/code/game/gamemodes/blob/blob.dm +++ b/code/game/gamemodes/blob/blob.dm @@ -1,104 +1,109 @@ - - -//Few global vars to track the blob -GLOBAL_LIST_EMPTY(blobs) //complete list of all blobs made. -GLOBAL_LIST_EMPTY(blob_cores) -GLOBAL_LIST_EMPTY(overminds) -GLOBAL_LIST_EMPTY(blob_nodes) -GLOBAL_LIST_EMPTY(blobs_legit) //used for win-score calculations, contains only blobs counted for win condition - -#define BLOB_NO_PLACE_TIME 1800 //time, in deciseconds, blobs are prevented from bursting in the gamemode - -/datum/game_mode/blob - name = "blob" - config_tag = "blob" - antag_flag = ROLE_BLOB - - required_players = 25 - required_enemies = 1 - recommended_enemies = 1 - - round_ends_with_antag_death = 1 - - announce_span = "green" - announce_text = "Dangerous gelatinous organisms are spreading throughout the station!\n\ - Blobs: Consume the station and spread as far as you can.\n\ - Crew: Fight back the blobs and minimize station damage." - - var/message_sent = FALSE - - var/cores_to_spawn = 1 - var/players_per_core = 25 - var/blob_point_rate = 3 - var/blob_base_starting_points = 80 - - var/blobwincount = 250 - - var/messagedelay_low = 2400 //in deciseconds - var/messagedelay_high = 3600 //blob report will be sent after a random value between these (minimum 4 minutes, maximum 6 minutes) - - var/list/blob_overminds = list() - -/datum/game_mode/blob/pre_setup() - cores_to_spawn = max(round(num_players()/players_per_core, 1), 1) - - var/win_multiplier = 1 + (0.1 * cores_to_spawn) - blobwincount = initial(blobwincount) * cores_to_spawn * win_multiplier - - for(var/j = 0, j < cores_to_spawn, j++) - if (!antag_candidates.len) - break - var/datum/mind/blob = pick(antag_candidates) - blob_overminds += blob - blob.assigned_role = "Blob" - blob.special_role = "Blob" - log_game("[blob.key] (ckey) has been selected as a Blob") - antag_candidates -= blob - - if(!blob_overminds.len) - return 0 - - return 1 - -/datum/game_mode/blob/proc/get_blob_candidates() - var/list/candidates = list() - for(var/mob/living/carbon/human/player in GLOB.player_list) - if(!player.stat && player.mind && !player.mind.special_role && !jobban_isbanned(player, "Syndicate") && (ROLE_BLOB in player.client.prefs.be_special)) - if(age_check(player.client)) - candidates += player - return candidates - -/datum/game_mode/blob/proc/show_message(message) - for(var/datum/mind/blob in blob_overminds) - to_chat(blob.current, message) - -/datum/game_mode/blob/post_setup() - set waitfor = FALSE - - for(var/datum/mind/blob in blob_overminds) - var/mob/camera/blob/B = blob.current.become_overmind(TRUE, round(blob_base_starting_points/blob_overminds.len)) - B.mind.name = B.name - var/turf/T = pick(GLOB.blobstart) - B.loc = T - B.base_point_rate = blob_point_rate - - SSshuttle.registerHostileEnvironment(src) - - // Disable the blob event for this round. - var/datum/round_event_control/blob/B = locate() in SSevents.control - if(B) - B.max_occurrences = 0 // disable the event - - . = ..() - - var/message_delay = rand(messagedelay_low, messagedelay_high) //between 4 and 6 minutes with 2400 low and 3600 high. - - sleep(message_delay) - - send_intercept(1) - message_sent = TRUE +//Few global vars to track the blob +GLOBAL_LIST_EMPTY(blobs) //complete list of all blobs made. +GLOBAL_LIST_EMPTY(blob_cores) +GLOBAL_LIST_EMPTY(overminds) +GLOBAL_LIST_EMPTY(blob_nodes) +GLOBAL_LIST_EMPTY(blobs_legit) //used for win-score calculations, contains only blobs counted for win condition + +#define BLOB_NO_PLACE_TIME 1800 //time, in deciseconds, blobs are prevented from bursting in the gamemode + +/datum/game_mode/blob + name = "blob" + config_tag = "blob" + antag_flag = ROLE_BLOB + false_report_weight = 5 + + required_players = 25 + required_enemies = 1 + recommended_enemies = 1 + + round_ends_with_antag_death = 1 + + announce_span = "green" + announce_text = "Dangerous gelatinous organisms are spreading throughout the station!\n\ + Blobs: Consume the station and spread as far as you can.\n\ + Crew: Fight back the blobs and minimize station damage." + + var/message_sent = FALSE + + var/cores_to_spawn = 1 + var/players_per_core = 25 + var/blob_point_rate = 3 + var/blob_base_starting_points = 80 + + var/blobwincount = 250 + + var/messagedelay_low = 2400 //in deciseconds + var/messagedelay_high = 3600 //blob report will be sent after a random value between these (minimum 4 minutes, maximum 6 minutes) + + var/list/blob_overminds = list() + +/datum/game_mode/blob/pre_setup() + cores_to_spawn = max(round(num_players()/players_per_core, 1), 1) + + var/win_multiplier = 1 + (0.1 * cores_to_spawn) + blobwincount = initial(blobwincount) * cores_to_spawn * win_multiplier + + for(var/j = 0, j < cores_to_spawn, j++) + if (!antag_candidates.len) + break + var/datum/mind/blob = pick(antag_candidates) + blob_overminds += blob + blob.assigned_role = "Blob" + blob.special_role = "Blob" + log_game("[blob.key] (ckey) has been selected as a Blob") + antag_candidates -= blob + + if(!blob_overminds.len) + return 0 + + return 1 + +/datum/game_mode/blob/proc/get_blob_candidates() + var/list/candidates = list() + for(var/mob/living/carbon/human/player in GLOB.player_list) + if(!player.stat && player.mind && !player.mind.special_role && !jobban_isbanned(player, "Syndicate") && (ROLE_BLOB in player.client.prefs.be_special)) + if(age_check(player.client)) + candidates += player + return candidates + +/datum/game_mode/blob/proc/show_message(message) + for(var/datum/mind/blob in blob_overminds) + to_chat(blob.current, message) + +/datum/game_mode/blob/post_setup() + set waitfor = FALSE + + for(var/datum/mind/blob in blob_overminds) + var/mob/camera/blob/B = blob.current.become_overmind(TRUE, round(blob_base_starting_points/blob_overminds.len)) + B.mind.name = B.name + var/turf/T = pick(GLOB.blobstart) + B.loc = T + B.base_point_rate = blob_point_rate + + SSshuttle.registerHostileEnvironment(src) + + // Disable the blob event for this round. + var/datum/round_event_control/blob/B = locate() in SSevents.control + if(B) + B.max_occurrences = 0 // disable the event + + . = ..() + + var/message_delay = rand(messagedelay_low, messagedelay_high) //between 4 and 6 minutes with 2400 low and 3600 high. + + sleep(message_delay) + + send_intercept(1) + message_sent = TRUE addtimer(CALLBACK(src, .proc/SendSecondIntercept), 24000) - + /datum/game_mode/blob/proc/SendSecondIntercept() - if(!replacementmode) + if(!replacementmode) send_intercept(2) //if the blob has been alive this long, it's time to bomb it + +/datum/game_mode/blob/generate_report() + return "A CMP scientist by the name of [pick("Griff", "Pasteur", "Chamberland", "Buist", "Rivers", "Stanley")] boasted about his corporation's \"finest creation\" - a macrobiological \ + virus capable of self-reproduction and hellbent on consuming whatever it touches. He went on to query Cybersun for permission to utilize the virus in biochemical warfare, to which \ + CMP subsequently gained. Be vigilant for any large organisms rapidly spreading across the station, as they are classified as a level 5 biohazard and critically dangerous. Note that \ + this organism seems to be weak to extreme heat; concentrated fire (such as welding tools and lasers) will be effective against it." diff --git a/code/game/gamemodes/blob/blob_report.dm b/code/game/gamemodes/blob/blob_report.dm index ea6bd07c58..e90626485a 100644 --- a/code/game/gamemodes/blob/blob_report.dm +++ b/code/game/gamemodes/blob/blob_report.dm @@ -19,7 +19,7 @@ var/nukecode = random_nukecode() for(var/obj/machinery/nuclearbomb/bomb in GLOB.machines) if(bomb && bomb.r_code) - if(bomb.z == ZLEVEL_STATION) + if(bomb.z in GLOB.station_z_levels) bomb.r_code = nukecode intercepttext += "NanoTrasen Update: Biohazard Alert.
    " @@ -91,7 +91,7 @@ if(count_territories) var/list/valid_territories = list() for(var/area/A in world) //First, collect all area types on the station zlevel - if(A.z == ZLEVEL_STATION) + if(A.z in GLOB.station_z_levels) if(!(A.type in valid_territories) && A.valid_territory) valid_territories |= A.type if(valid_territories.len) diff --git a/code/game/gamemodes/blob/blobs/blob_mobs.dm b/code/game/gamemodes/blob/blobs/blob_mobs.dm index d9e803f3a0..7ddc71eecc 100644 --- a/code/game/gamemodes/blob/blobs/blob_mobs.dm +++ b/code/game/gamemodes/blob/blobs/blob_mobs.dm @@ -106,7 +106,7 @@ if(istype(linked_node)) factory = linked_node factory.spores += src - ..() + . = ..() /mob/living/simple_animal/hostile/blob/blobspore/Life() if(!is_zombie && isturf(src.loc)) @@ -223,7 +223,7 @@ var/independent = FALSE /mob/living/simple_animal/hostile/blob/blobbernaut/Initialize() - ..() + . = ..() if(!independent) //no pulling people deep into the blob verbs -= /mob/living/verb/pulled 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/overmind.dm b/code/game/gamemodes/blob/overmind.dm index 247b660dbc..e22b2747e0 100644 --- a/code/game/gamemodes/blob/overmind.dm +++ b/code/game/gamemodes/blob/overmind.dm @@ -50,7 +50,7 @@ if(blob_core) blob_core.update_icon() - ..() + .= ..() /mob/camera/blob/Life() if(!blob_core) 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/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm index 4d9f1c7f23..14126c69f3 100644 --- a/code/game/gamemodes/changeling/changeling.dm +++ b/code/game/gamemodes/changeling/changeling.dm @@ -1,526 +1,511 @@ -#define LING_FAKEDEATH_TIME 400 //40 seconds -#define LING_DEAD_GENETICDAMAGE_HEAL_CAP 50 //The lowest value of geneticdamage handle_changeling() can take it to while dead. -#define LING_ABSORB_RECENT_SPEECH 8 //The amount of recent spoken lines to gain on absorbing a mob - -GLOBAL_LIST_INIT(possible_changeling_IDs, 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(slots, list("head", "wear_mask", "back", "wear_suit", "w_uniform", "shoes", "belt", "gloves", "glasses", "ears", "wear_id", "s_store")) -GLOBAL_LIST_INIT(slot2slot, list("head" = slot_head, "wear_mask" = slot_wear_mask, "neck" = slot_neck, "back" = slot_back, "wear_suit" = slot_wear_suit, "w_uniform" = slot_w_uniform, "shoes" = slot_shoes, "belt" = slot_belt, "gloves" = slot_gloves, "glasses" = slot_glasses, "ears" = slot_ears, "wear_id" = slot_wear_id, "s_store" = slot_s_store)) -GLOBAL_LIST_INIT(slot2type, list("head" = /obj/item/clothing/head/changeling, "wear_mask" = /obj/item/clothing/mask/changeling, "back" = /obj/item/changeling, "wear_suit" = /obj/item/clothing/suit/changeling, "w_uniform" = /obj/item/clothing/under/changeling, "shoes" = /obj/item/clothing/shoes/changeling, "belt" = /obj/item/changeling, "gloves" = /obj/item/clothing/gloves/changeling, "glasses" = /obj/item/clothing/glasses/changeling, "ears" = /obj/item/changeling, "wear_id" = /obj/item/changeling, "s_store" = /obj/item/changeling)) - - -/datum/game_mode - var/list/datum/mind/changelings = list() - - -/datum/game_mode/changeling - name = "changeling" - config_tag = "changeling" - antag_flag = ROLE_CHANGELING - restricted_jobs = list("AI", "Cyborg") - protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain") - required_players = 15 - required_enemies = 1 - recommended_enemies = 4 - reroll_friendly = 1 - - announce_span = "green" - announce_text = "Alien changelings have infiltrated the crew!\n\ - Changelings: Accomplish the objectives assigned to you.\n\ - Crew: Root out and eliminate the changeling menace." - - var/const/prob_int_murder_target = 50 // intercept names the assassination target half the time - var/const/prob_right_murder_target_l = 25 // lower bound on probability of naming right assassination target - var/const/prob_right_murder_target_h = 50 // upper bound on probability of naimg the right assassination target - - var/const/prob_int_item = 50 // intercept names the theft target half the time - var/const/prob_right_item_l = 25 // lower bound on probability of naming right theft target - var/const/prob_right_item_h = 50 // upper bound on probability of naming the right theft target - - var/const/prob_int_sab_target = 50 // intercept names the sabotage target half the time - var/const/prob_right_sab_target_l = 25 // lower bound on probability of naming right sabotage target - var/const/prob_right_sab_target_h = 50 // upper bound on probability of naming right sabotage target - - var/const/prob_right_killer_l = 25 //lower bound on probability of naming the right operative - var/const/prob_right_killer_h = 50 //upper bound on probability of naming the right operative - var/const/prob_right_objective_l = 25 //lower bound on probability of determining the objective correctly - var/const/prob_right_objective_h = 50 //upper bound on probability of determining the objective correctly - - var/const/changeling_amount = 4 //hard limit on changelings if scaling is turned off - - var/changeling_team_objective_type = null //If this is not null, we hand our this objective to all lings - -/datum/game_mode/changeling/pre_setup() - - if(config.protect_roles_from_antagonist) - restricted_jobs += protected_jobs - - if(config.protect_assistant_from_antagonist) - restricted_jobs += "Assistant" - - var/num_changelings = 1 - - if(config.changeling_scaling_coeff) - num_changelings = max(1, min( round(num_players()/(config.changeling_scaling_coeff*2))+2, round(num_players()/config.changeling_scaling_coeff) )) - else - num_changelings = max(1, min(num_players(), changeling_amount)) - - if(antag_candidates.len>0) - for(var/i = 0, i < num_changelings, i++) - if(!antag_candidates.len) break - var/datum/mind/changeling = pick(antag_candidates) - antag_candidates -= changeling - changelings += changeling - changeling.special_role = "Changeling" - changeling.restricted_roles = restricted_jobs - return 1 - else - return 0 - -/datum/game_mode/changeling/post_setup() - - //Decide if it's ok for the lings to have a team objective - //And then set it up to be handed out in forge_changeling_objectives - var/list/team_objectives = subtypesof(/datum/objective/changeling_team_objective) - var/list/possible_team_objectives = list() - for(var/T in team_objectives) - var/datum/objective/changeling_team_objective/CTO = T - - if(changelings.len >= initial(CTO.min_lings)) - possible_team_objectives += T - - if(possible_team_objectives.len && prob(20*changelings.len)) - changeling_team_objective_type = pick(possible_team_objectives) - - for(var/datum/mind/changeling in changelings) - log_game("[changeling.key] (ckey) has been selected as a changeling") - changeling.current.make_changeling() - forge_changeling_objectives(changeling) - greet_changeling(changeling) - SSticker.mode.update_changeling_icons_added(changeling) - modePlayer += changelings - ..() - -/datum/game_mode/changeling/make_antag_chance(mob/living/carbon/human/character) //Assigns changeling to latejoiners - var/changelingcap = min( round(GLOB.joined_player_list.len/(config.changeling_scaling_coeff*2))+2, round(GLOB.joined_player_list.len/config.changeling_scaling_coeff) ) - if(SSticker.mode.changelings.len >= changelingcap) //Caps number of latejoin antagonists - return - if(SSticker.mode.changelings.len <= (changelingcap - 2) || prob(100 - (config.changeling_scaling_coeff*2))) - if(ROLE_CHANGELING in character.client.prefs.be_special) - if(!jobban_isbanned(character, ROLE_CHANGELING) && !jobban_isbanned(character, "Syndicate")) - if(age_check(character.client)) - if(!(character.job in restricted_jobs)) - character.mind.make_Changling() - -/datum/game_mode/proc/forge_changeling_objectives(datum/mind/changeling, var/team_mode = 0) - //OBJECTIVES - random traitor objectives. Unique objectives "steal brain" and "identity theft". - //No escape alone because changelings aren't suited for it and it'd probably just lead to rampant robusting - //If it seems like they'd be able to do it in play, add a 10% chance to have to escape alone - - var/escape_objective_possible = TRUE - - //if there's a team objective, check if it's compatible with escape objectives - for(var/datum/objective/changeling_team_objective/CTO in changeling.objectives) - if(!CTO.escape_objective_compatible) - escape_objective_possible = FALSE - break - - var/datum/objective/absorb/absorb_objective = new - absorb_objective.owner = changeling - absorb_objective.gen_amount_goal(6, 8) - changeling.objectives += absorb_objective - - if(prob(60)) - var/datum/objective/steal/steal_objective = new - steal_objective.owner = changeling - steal_objective.find_target() - changeling.objectives += steal_objective - - var/list/active_ais = active_ais() - if(active_ais.len && prob(100/GLOB.joined_player_list.len)) - var/datum/objective/destroy/destroy_objective = new - destroy_objective.owner = changeling - destroy_objective.find_target() - changeling.objectives += destroy_objective - else - if(prob(70)) - var/datum/objective/assassinate/kill_objective = new - kill_objective.owner = changeling - if(team_mode) //No backstabbing while in a team - kill_objective.find_target_by_role(role = "Changeling", role_type = 1, invert = 1) - else - kill_objective.find_target() - changeling.objectives += kill_objective - else - var/datum/objective/maroon/maroon_objective = new - maroon_objective.owner = changeling - if(team_mode) - maroon_objective.find_target_by_role(role = "Changeling", role_type = 1, invert = 1) - else - maroon_objective.find_target() - changeling.objectives += maroon_objective - - if (!(locate(/datum/objective/escape) in changeling.objectives) && escape_objective_possible) - var/datum/objective/escape/escape_with_identity/identity_theft = new - identity_theft.owner = changeling - identity_theft.target = maroon_objective.target - identity_theft.update_explanation_text() - changeling.objectives += identity_theft - escape_objective_possible = FALSE - - if (!(locate(/datum/objective/escape) in changeling.objectives) && escape_objective_possible) - if(prob(50)) - var/datum/objective/escape/escape_objective = new - escape_objective.owner = changeling - changeling.objectives += escape_objective - else - var/datum/objective/escape/escape_with_identity/identity_theft = new - identity_theft.owner = changeling - if(team_mode) - identity_theft.find_target_by_role(role = "Changeling", role_type = 1, invert = 1) - else - identity_theft.find_target() - changeling.objectives += identity_theft - escape_objective_possible = FALSE - - - -/datum/game_mode/changeling/forge_changeling_objectives(datum/mind/changeling) - if(changeling_team_objective_type) - var/datum/objective/changeling_team_objective/team_objective = new changeling_team_objective_type - team_objective.owner = changeling - changeling.objectives += team_objective - - ..(changeling,1) - else - ..(changeling,0) - - -/datum/game_mode/proc/greet_changeling(datum/mind/changeling, you_are=1) - if (you_are) - to_chat(changeling.current, "You are [changeling.changeling.changelingID], a changeling! You have absorbed and taken the form of a human.") - to_chat(changeling.current, "Use say \":g message\" to communicate with your fellow changelings.") - to_chat(changeling.current, "You must complete the following tasks:") - changeling.current.playsound_local(get_turf(changeling.current), 'sound/ambience/antag/ling_aler.ogg', 100, FALSE, pressure_affected = FALSE) - - if (changeling.current.mind) - var/mob/living/carbon/human/H = changeling.current - if(H.mind.assigned_role == "Clown") - to_chat(H, "You have evolved beyond your clownish nature, allowing you to wield weapons without harming yourself.") - H.dna.remove_mutation(CLOWNMUT) - - var/obj_count = 1 - for(var/datum/objective/objective in changeling.objectives) - to_chat(changeling.current, "Objective #[obj_count]: [objective.explanation_text]") - obj_count++ - return - -/*/datum/game_mode/changeling/check_finished() - var/changelings_alive = 0 - for(var/datum/mind/changeling in changelings) - if(!iscarbon(changeling.current)) - continue - if(changeling.current.stat==2) - continue - changelings_alive++ - - if (changelings_alive) - changelingdeath = 0 - return ..() - else - if (!changelingdeath) - changelingdeathtime = world.time - changelingdeath = 1 - if(world.time-changelingdeathtime > TIME_TO_GET_REVIVED) - return 1 - else - return ..() - return 0*/ - -/datum/game_mode/proc/auto_declare_completion_changeling() - if(changelings.len) - var/text = "
    The changelings were:" - for(var/datum/mind/changeling in changelings) - var/changelingwin = 1 - if(!changeling.current) - changelingwin = 0 - - text += printplayer(changeling) - - //Removed sanity if(changeling) because we -want- a runtime to inform us that the changelings list is incorrect and needs to be fixed. - text += "
    Changeling ID: [changeling.changeling.changelingID]." - text += "
    Genomes Extracted: [changeling.changeling.absorbedcount]" - - if(changeling.objectives.len) - var/count = 1 - for(var/datum/objective/objective in changeling.objectives) - if(objective.check_completion()) - text += "
    Objective #[count]: [objective.explanation_text] Success!" - SSblackbox.add_details("changeling_objective","[objective.type]|SUCCESS") - else - text += "
    Objective #[count]: [objective.explanation_text] Fail." - SSblackbox.add_details("changeling_objective","[objective.type]|FAIL") - changelingwin = 0 - count++ - - if(changelingwin) - text += "
    The changeling was successful!" - SSblackbox.add_details("changeling_success","SUCCESS") - else - text += "
    The changeling has failed." - SSblackbox.add_details("changeling_success","FAIL") - text += "
    " - - to_chat(world, text) - - - return 1 - -/datum/changeling //stores changeling powers, changeling recharge thingie, changeling absorbed DNA and changeling ID (for changeling hivemind) - var/list/stored_profiles = list() //list of datum/changelingprofile - var/datum/changelingprofile/first_prof = null - //var/list/absorbed_dna = list() - //var/list/protected_dna = list() //dna that is not lost when capacity is otherwise full - var/dna_max = 6 //How many extra DNA strands the changeling can store for transformation. - var/absorbedcount = 0 - var/chem_charges = 20 - var/chem_storage = 75 - var/chem_recharge_rate = 1 - var/chem_recharge_slowdown = 0 - var/sting_range = 2 - var/changelingID = "Changeling" - var/geneticdamage = 0 - var/isabsorbing = 0 - var/islinking = 0 - var/geneticpoints = 10 - var/purchasedpowers = list() - var/mimicing = "" - var/canrespec = 0 - var/changeling_speak = 0 - var/datum/dna/chosen_dna - var/obj/effect/proc_holder/changeling/sting/chosen_sting - var/datum/cellular_emporium/cellular_emporium - var/datum/action/innate/cellular_emporium/emporium_action - -/datum/changeling/New(var/gender=FEMALE) - ..() - var/honorific - if(gender == FEMALE) - honorific = "Ms." - else - honorific = "Mr." - if(GLOB.possible_changeling_IDs.len) - changelingID = pick(GLOB.possible_changeling_IDs) - GLOB.possible_changeling_IDs -= changelingID - changelingID = "[honorific] [changelingID]" - else - changelingID = "[honorific] [rand(1,999)]" - - cellular_emporium = new(src) - emporium_action = new(cellular_emporium) - -/datum/changeling/Destroy() - qdel(cellular_emporium) - cellular_emporium = null - qdel(emporium_action) - emporium_action = null - . = ..() - -/datum/changeling/proc/regenerate(var/mob/living/carbon/the_ling) - if(istype(the_ling)) - emporium_action.Grant(the_ling) - if(the_ling.stat == DEAD) - chem_charges = min(max(0, chem_charges + chem_recharge_rate - chem_recharge_slowdown), (chem_storage*0.5)) - geneticdamage = max(LING_DEAD_GENETICDAMAGE_HEAL_CAP,geneticdamage-1) - else //not dead? no chem/geneticdamage caps. - chem_charges = min(max(0, chem_charges + chem_recharge_rate - chem_recharge_slowdown), chem_storage) - geneticdamage = max(0, geneticdamage-1) - - -/datum/changeling/proc/get_dna(dna_owner) - for(var/datum/changelingprofile/prof in stored_profiles) - if(dna_owner == prof.name) - return prof - -/datum/changeling/proc/has_dna(datum/dna/tDNA) - for(var/datum/changelingprofile/prof in stored_profiles) - if(tDNA.is_same_as(prof.dna)) - return 1 - return 0 - -/datum/changeling/proc/can_absorb_dna(mob/living/carbon/user, mob/living/carbon/human/target, var/verbose=1) - if(stored_profiles.len) - var/datum/changelingprofile/prof = stored_profiles[1] - if(prof.dna == user.dna && stored_profiles.len >= dna_max)//If our current DNA is the stalest, we gotta ditch it. - if(verbose) - to_chat(user, "We have reached our capacity to store genetic information! We must transform before absorbing more.") - return - if(!target) - return - if((target.disabilities & NOCLONE) || (target.disabilities & HUSK)) - if(verbose) - to_chat(user, "DNA of [target] is ruined beyond usability!") - return - if(!ishuman(target))//Absorbing monkeys is entirely possible, but it can cause issues with transforming. That's what lesser form is for anyway! - if(verbose) - to_chat(user, "We could gain no benefit from absorbing a lesser creature.") - return - if(has_dna(target.dna)) - if(verbose) - to_chat(user, "We already have this DNA in storage!") - return - if(!target.has_dna()) - if(verbose) - to_chat(user, "[target] is not compatible with our biology.") - return - return 1 - -/datum/changeling/proc/create_profile(mob/living/carbon/human/H, mob/living/carbon/human/user, protect = 0) - var/datum/changelingprofile/prof = new - - H.dna.real_name = H.real_name //Set this again, just to be sure that it's properly set. - var/datum/dna/new_dna = new H.dna.type - H.dna.copy_dna(new_dna) - prof.dna = new_dna - prof.name = H.real_name - prof.protected = protect - - prof.underwear = H.underwear - prof.undershirt = H.undershirt - prof.socks = H.socks - - var/list/slots = list("head", "wear_mask", "back", "wear_suit", "w_uniform", "shoes", "belt", "gloves", "glasses", "ears", "wear_id", "s_store") - for(var/slot in slots) - if(slot in H.vars) - var/obj/item/I = H.vars[slot] - if(!I) - continue - prof.name_list[slot] = I.name - prof.appearance_list[slot] = I.appearance - prof.flags_cover_list[slot] = I.flags_cover - prof.item_color_list[slot] = I.item_color - prof.item_state_list[slot] = I.item_state - prof.exists_list[slot] = 1 - else - continue - - return prof - -/datum/changeling/proc/add_profile(datum/changelingprofile/prof) - if(stored_profiles.len > dna_max) - if(!push_out_profile()) - return - - stored_profiles += prof - absorbedcount++ - -/datum/changeling/proc/add_new_profile(mob/living/carbon/human/H, mob/living/carbon/human/user, protect = 0) - var/datum/changelingprofile/prof = create_profile(H, protect) - add_profile(prof) - return prof - -/datum/changeling/proc/remove_profile(mob/living/carbon/human/H, force = 0) - for(var/datum/changelingprofile/prof in stored_profiles) - if(H.real_name == prof.name) - if(prof.protected && !force) - continue - stored_profiles -= prof - qdel(prof) - -/datum/changeling/proc/get_profile_to_remove() - for(var/datum/changelingprofile/prof in stored_profiles) - if(!prof.protected) - return prof - -/datum/changeling/proc/push_out_profile() - var/datum/changelingprofile/removeprofile = get_profile_to_remove() - if(removeprofile) - stored_profiles -= removeprofile - return 1 - return 0 - -/proc/changeling_transform(mob/living/carbon/human/user, datum/changelingprofile/chosen_prof) - var/datum/dna/chosen_dna = chosen_prof.dna - user.real_name = chosen_prof.name - user.underwear = chosen_prof.underwear - user.undershirt = chosen_prof.undershirt - user.socks = chosen_prof.socks - - chosen_dna.transfer_identity(user, 1) - user.updateappearance(mutcolor_update=1) - user.update_body() - user.domutcheck() - - //vars hackery. not pretty, but better than the alternative. - for(var/slot in GLOB.slots) - if(istype(user.vars[slot], GLOB.slot2type[slot]) && !(chosen_prof.exists_list[slot])) //remove unnecessary flesh items - qdel(user.vars[slot]) - continue - - if((user.vars[slot] && !istype(user.vars[slot], GLOB.slot2type[slot])) || !(chosen_prof.exists_list[slot])) - continue - - var/obj/item/C - var/equip = 0 - if(!user.vars[slot]) - var/thetype = GLOB.slot2type[slot] - equip = 1 - C = new thetype(user) - - else if(istype(user.vars[slot], GLOB.slot2type[slot])) - C = user.vars[slot] - - C.appearance = chosen_prof.appearance_list[slot] - C.name = chosen_prof.name_list[slot] - C.flags_cover = chosen_prof.flags_cover_list[slot] - C.item_color = chosen_prof.item_color_list[slot] - C.item_state = chosen_prof.item_state_list[slot] - if(equip) - user.equip_to_slot_or_del(C, GLOB.slot2slot[slot]) - - user.regenerate_icons() - -/datum/changelingprofile - var/name = "a bug" - - var/protected = 0 - - var/datum/dna/dna = null - var/list/name_list = list() //associative list of slotname = itemname - var/list/appearance_list = list() - var/list/flags_cover_list = list() - var/list/exists_list = list() - var/list/item_color_list = list() - var/list/item_state_list = list() - - var/underwear - var/undershirt - var/socks - -/datum/changelingprofile/Destroy() - qdel(dna) - . = ..() - -/datum/changelingprofile/proc/copy_profile(datum/changelingprofile/newprofile) - newprofile.name = name - newprofile.protected = protected - newprofile.dna = new dna.type - dna.copy_dna(newprofile.dna) - newprofile.name_list = name_list.Copy() - newprofile.appearance_list = appearance_list.Copy() - newprofile.flags_cover_list = flags_cover_list.Copy() - newprofile.exists_list = exists_list.Copy() - newprofile.item_color_list = item_color_list.Copy() - newprofile.item_state_list = item_state_list.Copy() - newprofile.underwear = underwear - newprofile.undershirt = undershirt - newprofile.socks = socks - -/datum/game_mode/proc/update_changeling_icons_added(datum/mind/changling_mind) - var/datum/atom_hud/antag/hud = GLOB.huds[ANTAG_HUD_CHANGELING] - hud.join_hud(changling_mind.current) - set_antag_hud(changling_mind.current, "changling") - -/datum/game_mode/proc/update_changeling_icons_removed(datum/mind/changling_mind) - var/datum/atom_hud/antag/hud = GLOB.huds[ANTAG_HUD_CHANGELING] - hud.leave_hud(changling_mind.current) - set_antag_hud(changling_mind.current, null) +#define LING_FAKEDEATH_TIME 400 //40 seconds +#define LING_DEAD_GENETICDAMAGE_HEAL_CAP 50 //The lowest value of geneticdamage handle_changeling() can take it to while dead. +#define LING_ABSORB_RECENT_SPEECH 8 //The amount of recent spoken lines to gain on absorbing a mob + +GLOBAL_LIST_INIT(possible_changeling_IDs, 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(slots, list("head", "wear_mask", "back", "wear_suit", "w_uniform", "shoes", "belt", "gloves", "glasses", "ears", "wear_id", "s_store")) +GLOBAL_LIST_INIT(slot2slot, list("head" = slot_head, "wear_mask" = slot_wear_mask, "neck" = slot_neck, "back" = slot_back, "wear_suit" = slot_wear_suit, "w_uniform" = slot_w_uniform, "shoes" = slot_shoes, "belt" = slot_belt, "gloves" = slot_gloves, "glasses" = slot_glasses, "ears" = slot_ears, "wear_id" = slot_wear_id, "s_store" = slot_s_store)) +GLOBAL_LIST_INIT(slot2type, list("head" = /obj/item/clothing/head/changeling, "wear_mask" = /obj/item/clothing/mask/changeling, "back" = /obj/item/changeling, "wear_suit" = /obj/item/clothing/suit/changeling, "w_uniform" = /obj/item/clothing/under/changeling, "shoes" = /obj/item/clothing/shoes/changeling, "belt" = /obj/item/changeling, "gloves" = /obj/item/clothing/gloves/changeling, "glasses" = /obj/item/clothing/glasses/changeling, "ears" = /obj/item/changeling, "wear_id" = /obj/item/changeling, "s_store" = /obj/item/changeling)) + + +/datum/game_mode + var/list/datum/mind/changelings = list() + + +/datum/game_mode/changeling + name = "changeling" + config_tag = "changeling" + antag_flag = ROLE_CHANGELING + false_report_weight = 10 + restricted_jobs = list("AI", "Cyborg") + protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain") + required_players = 15 + required_enemies = 1 + recommended_enemies = 4 + reroll_friendly = 1 + + announce_span = "green" + announce_text = "Alien changelings have infiltrated the crew!\n\ + Changelings: Accomplish the objectives assigned to you.\n\ + Crew: Root out and eliminate the changeling menace." + + var/const/prob_int_murder_target = 50 // intercept names the assassination target half the time + var/const/prob_right_murder_target_l = 25 // lower bound on probability of naming right assassination target + var/const/prob_right_murder_target_h = 50 // upper bound on probability of naimg the right assassination target + + var/const/prob_int_item = 50 // intercept names the theft target half the time + var/const/prob_right_item_l = 25 // lower bound on probability of naming right theft target + var/const/prob_right_item_h = 50 // upper bound on probability of naming the right theft target + + var/const/prob_int_sab_target = 50 // intercept names the sabotage target half the time + var/const/prob_right_sab_target_l = 25 // lower bound on probability of naming right sabotage target + var/const/prob_right_sab_target_h = 50 // upper bound on probability of naming right sabotage target + + var/const/prob_right_killer_l = 25 //lower bound on probability of naming the right operative + var/const/prob_right_killer_h = 50 //upper bound on probability of naming the right operative + var/const/prob_right_objective_l = 25 //lower bound on probability of determining the objective correctly + var/const/prob_right_objective_h = 50 //upper bound on probability of determining the objective correctly + + var/const/changeling_amount = 4 //hard limit on changelings if scaling is turned off + + var/changeling_team_objective_type = null //If this is not null, we hand our this objective to all lings + +/datum/game_mode/changeling/pre_setup() + + if(config.protect_roles_from_antagonist) + restricted_jobs += protected_jobs + + if(config.protect_assistant_from_antagonist) + restricted_jobs += "Assistant" + + var/num_changelings = 1 + + if(config.changeling_scaling_coeff) + num_changelings = max(1, min( round(num_players()/(config.changeling_scaling_coeff*2))+2, round(num_players()/config.changeling_scaling_coeff) )) + else + num_changelings = max(1, min(num_players(), changeling_amount)) + + if(antag_candidates.len>0) + for(var/i = 0, i < num_changelings, i++) + if(!antag_candidates.len) break + var/datum/mind/changeling = pick(antag_candidates) + antag_candidates -= changeling + changelings += changeling + changeling.special_role = "Changeling" + changeling.restricted_roles = restricted_jobs + return 1 + else + return 0 + +/datum/game_mode/changeling/post_setup() + + //Decide if it's ok for the lings to have a team objective + //And then set it up to be handed out in forge_changeling_objectives + var/list/team_objectives = subtypesof(/datum/objective/changeling_team_objective) + var/list/possible_team_objectives = list() + for(var/T in team_objectives) + var/datum/objective/changeling_team_objective/CTO = T + + if(changelings.len >= initial(CTO.min_lings)) + possible_team_objectives += T + + if(possible_team_objectives.len && prob(20*changelings.len)) + changeling_team_objective_type = pick(possible_team_objectives) + + for(var/datum/mind/changeling in changelings) + log_game("[changeling.key] (ckey) has been selected as a changeling") + changeling.current.make_changeling() + forge_changeling_objectives(changeling) + greet_changeling(changeling) + SSticker.mode.update_changeling_icons_added(changeling) + modePlayer += changelings + ..() + +/datum/game_mode/changeling/make_antag_chance(mob/living/carbon/human/character) //Assigns changeling to latejoiners + var/changelingcap = min( round(GLOB.joined_player_list.len/(config.changeling_scaling_coeff*2))+2, round(GLOB.joined_player_list.len/config.changeling_scaling_coeff) ) + if(SSticker.mode.changelings.len >= changelingcap) //Caps number of latejoin antagonists + return + if(SSticker.mode.changelings.len <= (changelingcap - 2) || prob(100 - (config.changeling_scaling_coeff*2))) + if(ROLE_CHANGELING in character.client.prefs.be_special) + if(!jobban_isbanned(character, ROLE_CHANGELING) && !jobban_isbanned(character, "Syndicate")) + if(age_check(character.client)) + if(!(character.job in restricted_jobs)) + character.mind.make_Changling() + +/datum/game_mode/proc/forge_changeling_objectives(datum/mind/changeling, var/team_mode = 0) + //OBJECTIVES - random traitor objectives. Unique objectives "steal brain" and "identity theft". + //No escape alone because changelings aren't suited for it and it'd probably just lead to rampant robusting + //If it seems like they'd be able to do it in play, add a 10% chance to have to escape alone + + var/escape_objective_possible = TRUE + + //if there's a team objective, check if it's compatible with escape objectives + for(var/datum/objective/changeling_team_objective/CTO in changeling.objectives) + if(!CTO.escape_objective_compatible) + escape_objective_possible = FALSE + break + + var/datum/objective/absorb/absorb_objective = new + absorb_objective.owner = changeling + absorb_objective.gen_amount_goal(6, 8) + changeling.objectives += absorb_objective + + if(prob(60)) + var/datum/objective/steal/steal_objective = new + steal_objective.owner = changeling + steal_objective.find_target() + changeling.objectives += steal_objective + + var/list/active_ais = active_ais() + if(active_ais.len && prob(100/GLOB.joined_player_list.len)) + var/datum/objective/destroy/destroy_objective = new + destroy_objective.owner = changeling + destroy_objective.find_target() + changeling.objectives += destroy_objective + else + if(prob(70)) + var/datum/objective/assassinate/kill_objective = new + kill_objective.owner = changeling + if(team_mode) //No backstabbing while in a team + kill_objective.find_target_by_role(role = "Changeling", role_type = 1, invert = 1) + else + kill_objective.find_target() + changeling.objectives += kill_objective + else + var/datum/objective/maroon/maroon_objective = new + maroon_objective.owner = changeling + if(team_mode) + maroon_objective.find_target_by_role(role = "Changeling", role_type = 1, invert = 1) + else + maroon_objective.find_target() + changeling.objectives += maroon_objective + + if (!(locate(/datum/objective/escape) in changeling.objectives) && escape_objective_possible) + var/datum/objective/escape/escape_with_identity/identity_theft = new + identity_theft.owner = changeling + identity_theft.target = maroon_objective.target + identity_theft.update_explanation_text() + changeling.objectives += identity_theft + escape_objective_possible = FALSE + + if (!(locate(/datum/objective/escape) in changeling.objectives) && escape_objective_possible) + if(prob(50)) + var/datum/objective/escape/escape_objective = new + escape_objective.owner = changeling + changeling.objectives += escape_objective + else + var/datum/objective/escape/escape_with_identity/identity_theft = new + identity_theft.owner = changeling + if(team_mode) + identity_theft.find_target_by_role(role = "Changeling", role_type = 1, invert = 1) + else + identity_theft.find_target() + changeling.objectives += identity_theft + escape_objective_possible = FALSE + + + +/datum/game_mode/changeling/forge_changeling_objectives(datum/mind/changeling) + if(changeling_team_objective_type) + var/datum/objective/changeling_team_objective/team_objective = new changeling_team_objective_type + team_objective.owner = changeling + changeling.objectives += team_objective + + ..(changeling,1) + else + ..(changeling,0) + +/datum/game_mode/changeling/generate_report() + return "The Gorlex Marauders have announced the successful raid and destruction of Central Command containment ship #S-[rand(1111, 9999)]. This ship housed only a single prisoner - \ + codenamed \"Thing\", and it was highly adaptive and extremely dangerous. We have reason to believe that the Thing has allied with the Syndicate, and you should note that likelihood \ + of the Thing being sent to a station in this sector is highly likely. It may be in the guise of any crew member. Trust nobody - suspect everybody. Do not announce this to the crew, \ + as paranoia may spread and inhibit workplace efficiency." + +/datum/game_mode/proc/greet_changeling(datum/mind/changeling, you_are=1) + if (you_are) + to_chat(changeling.current, "You are [changeling.changeling.changelingID], a changeling! You have absorbed and taken the form of a human.") + to_chat(changeling.current, "Use say \":g message\" to communicate with your fellow changelings.") + to_chat(changeling.current, "You must complete the following tasks:") + changeling.current.playsound_local(get_turf(changeling.current), 'sound/ambience/antag/ling_aler.ogg', 100, FALSE, pressure_affected = FALSE) + + if (changeling.current.mind) + var/mob/living/carbon/human/H = changeling.current + if(H.mind.assigned_role == "Clown") + to_chat(H, "You have evolved beyond your clownish nature, allowing you to wield weapons without harming yourself.") + H.dna.remove_mutation(CLOWNMUT) + + var/obj_count = 1 + for(var/datum/objective/objective in changeling.objectives) + to_chat(changeling.current, "Objective #[obj_count]: [objective.explanation_text]") + obj_count++ + return + +/datum/game_mode/proc/auto_declare_completion_changeling() + if(changelings.len) + var/text = "
    The changelings were:" + for(var/datum/mind/changeling in changelings) + var/changelingwin = 1 + if(!changeling.current) + changelingwin = 0 + + text += printplayer(changeling) + + //Removed sanity if(changeling) because we -want- a runtime to inform us that the changelings list is incorrect and needs to be fixed. + text += "
    Changeling ID: [changeling.changeling.changelingID]." + text += "
    Genomes Extracted: [changeling.changeling.absorbedcount]" + + if(changeling.objectives.len) + var/count = 1 + for(var/datum/objective/objective in changeling.objectives) + if(objective.check_completion()) + text += "
    Objective #[count]: [objective.explanation_text] Success!" + SSblackbox.add_details("changeling_objective","[objective.type]|SUCCESS") + else + text += "
    Objective #[count]: [objective.explanation_text] Fail." + SSblackbox.add_details("changeling_objective","[objective.type]|FAIL") + changelingwin = 0 + count++ + + if(changelingwin) + text += "
    The changeling was successful!" + SSblackbox.add_details("changeling_success","SUCCESS") + else + text += "
    The changeling has failed." + SSblackbox.add_details("changeling_success","FAIL") + text += "
    " + + to_chat(world, text) + + + return 1 + +/datum/changeling //stores changeling powers, changeling recharge thingie, changeling absorbed DNA and changeling ID (for changeling hivemind) + var/list/stored_profiles = list() //list of datum/changelingprofile + var/datum/changelingprofile/first_prof = null + //var/list/absorbed_dna = list() + //var/list/protected_dna = list() //dna that is not lost when capacity is otherwise full + var/dna_max = 6 //How many extra DNA strands the changeling can store for transformation. + var/absorbedcount = 0 + var/chem_charges = 20 + var/chem_storage = 75 + var/chem_recharge_rate = 1 + var/chem_recharge_slowdown = 0 + var/sting_range = 2 + var/changelingID = "Changeling" + var/geneticdamage = 0 + var/isabsorbing = 0 + var/islinking = 0 + var/geneticpoints = 10 + var/purchasedpowers = list() + var/mimicing = "" + var/canrespec = 0 + var/changeling_speak = 0 + var/datum/dna/chosen_dna + var/obj/effect/proc_holder/changeling/sting/chosen_sting + var/datum/cellular_emporium/cellular_emporium + var/datum/action/innate/cellular_emporium/emporium_action + +/datum/changeling/New(var/gender=FEMALE) + ..() + var/honorific + if(gender == FEMALE) + honorific = "Ms." + else + honorific = "Mr." + if(GLOB.possible_changeling_IDs.len) + changelingID = pick(GLOB.possible_changeling_IDs) + GLOB.possible_changeling_IDs -= changelingID + changelingID = "[honorific] [changelingID]" + else + changelingID = "[honorific] [rand(1,999)]" + + cellular_emporium = new(src) + emporium_action = new(cellular_emporium) + +/datum/changeling/Destroy() + qdel(cellular_emporium) + cellular_emporium = null + qdel(emporium_action) + emporium_action = null + . = ..() + +/datum/changeling/proc/regenerate(var/mob/living/carbon/the_ling) + if(istype(the_ling)) + emporium_action.Grant(the_ling) + if(the_ling.stat == DEAD) + chem_charges = min(max(0, chem_charges + chem_recharge_rate - chem_recharge_slowdown), (chem_storage*0.5)) + geneticdamage = max(LING_DEAD_GENETICDAMAGE_HEAL_CAP,geneticdamage-1) + else //not dead? no chem/geneticdamage caps. + chem_charges = min(max(0, chem_charges + chem_recharge_rate - chem_recharge_slowdown), chem_storage) + geneticdamage = max(0, geneticdamage-1) + + +/datum/changeling/proc/get_dna(dna_owner) + for(var/datum/changelingprofile/prof in stored_profiles) + if(dna_owner == prof.name) + return prof + +/datum/changeling/proc/has_dna(datum/dna/tDNA) + for(var/datum/changelingprofile/prof in stored_profiles) + if(tDNA.is_same_as(prof.dna)) + return 1 + return 0 + +/datum/changeling/proc/can_absorb_dna(mob/living/carbon/user, mob/living/carbon/human/target, var/verbose=1) + if(stored_profiles.len) + var/datum/changelingprofile/prof = stored_profiles[1] + if(prof.dna == user.dna && stored_profiles.len >= dna_max)//If our current DNA is the stalest, we gotta ditch it. + if(verbose) + to_chat(user, "We have reached our capacity to store genetic information! We must transform before absorbing more.") + return + if(!target) + return + if((target.disabilities & NOCLONE) || (target.disabilities & HUSK)) + if(verbose) + to_chat(user, "DNA of [target] is ruined beyond usability!") + return + if(!ishuman(target))//Absorbing monkeys is entirely possible, but it can cause issues with transforming. That's what lesser form is for anyway! + if(verbose) + to_chat(user, "We could gain no benefit from absorbing a lesser creature.") + return + if(has_dna(target.dna)) + if(verbose) + to_chat(user, "We already have this DNA in storage!") + return + if(!target.has_dna()) + if(verbose) + to_chat(user, "[target] is not compatible with our biology.") + return + return 1 + +/datum/changeling/proc/create_profile(mob/living/carbon/human/H, mob/living/carbon/human/user, protect = 0) + var/datum/changelingprofile/prof = new + + H.dna.real_name = H.real_name //Set this again, just to be sure that it's properly set. + var/datum/dna/new_dna = new H.dna.type + H.dna.copy_dna(new_dna) + prof.dna = new_dna + prof.name = H.real_name + prof.protected = protect + + prof.underwear = H.underwear + prof.undershirt = H.undershirt + prof.socks = H.socks + + var/list/slots = list("head", "wear_mask", "back", "wear_suit", "w_uniform", "shoes", "belt", "gloves", "glasses", "ears", "wear_id", "s_store") + for(var/slot in slots) + if(slot in H.vars) + var/obj/item/I = H.vars[slot] + if(!I) + continue + prof.name_list[slot] = I.name + prof.appearance_list[slot] = I.appearance + prof.flags_cover_list[slot] = I.flags_cover + prof.item_color_list[slot] = I.item_color + prof.item_state_list[slot] = I.item_state + prof.exists_list[slot] = 1 + else + continue + + return prof + +/datum/changeling/proc/add_profile(datum/changelingprofile/prof) + if(stored_profiles.len > dna_max) + if(!push_out_profile()) + return + + stored_profiles += prof + absorbedcount++ + +/datum/changeling/proc/add_new_profile(mob/living/carbon/human/H, mob/living/carbon/human/user, protect = 0) + var/datum/changelingprofile/prof = create_profile(H, protect) + add_profile(prof) + return prof + +/datum/changeling/proc/remove_profile(mob/living/carbon/human/H, force = 0) + for(var/datum/changelingprofile/prof in stored_profiles) + if(H.real_name == prof.name) + if(prof.protected && !force) + continue + stored_profiles -= prof + qdel(prof) + +/datum/changeling/proc/get_profile_to_remove() + for(var/datum/changelingprofile/prof in stored_profiles) + if(!prof.protected) + return prof + +/datum/changeling/proc/push_out_profile() + var/datum/changelingprofile/removeprofile = get_profile_to_remove() + if(removeprofile) + stored_profiles -= removeprofile + return 1 + return 0 + +/proc/changeling_transform(mob/living/carbon/human/user, datum/changelingprofile/chosen_prof) + var/datum/dna/chosen_dna = chosen_prof.dna + user.real_name = chosen_prof.name + user.underwear = chosen_prof.underwear + user.undershirt = chosen_prof.undershirt + user.socks = chosen_prof.socks + + chosen_dna.transfer_identity(user, 1) + user.updateappearance(mutcolor_update=1) + user.update_body() + user.domutcheck() + + //vars hackery. not pretty, but better than the alternative. + for(var/slot in GLOB.slots) + if(istype(user.vars[slot], GLOB.slot2type[slot]) && !(chosen_prof.exists_list[slot])) //remove unnecessary flesh items + qdel(user.vars[slot]) + continue + + if((user.vars[slot] && !istype(user.vars[slot], GLOB.slot2type[slot])) || !(chosen_prof.exists_list[slot])) + continue + + var/obj/item/C + var/equip = 0 + if(!user.vars[slot]) + var/thetype = GLOB.slot2type[slot] + equip = 1 + C = new thetype(user) + + else if(istype(user.vars[slot], GLOB.slot2type[slot])) + C = user.vars[slot] + + C.appearance = chosen_prof.appearance_list[slot] + C.name = chosen_prof.name_list[slot] + C.flags_cover = chosen_prof.flags_cover_list[slot] + C.item_color = chosen_prof.item_color_list[slot] + C.item_state = chosen_prof.item_state_list[slot] + if(equip) + user.equip_to_slot_or_del(C, GLOB.slot2slot[slot]) + + user.regenerate_icons() + +/datum/changelingprofile + var/name = "a bug" + + var/protected = 0 + + var/datum/dna/dna = null + var/list/name_list = list() //associative list of slotname = itemname + var/list/appearance_list = list() + var/list/flags_cover_list = list() + var/list/exists_list = list() + var/list/item_color_list = list() + var/list/item_state_list = list() + + var/underwear + var/undershirt + var/socks + +/datum/changelingprofile/Destroy() + qdel(dna) + . = ..() + +/datum/changelingprofile/proc/copy_profile(datum/changelingprofile/newprofile) + newprofile.name = name + newprofile.protected = protected + newprofile.dna = new dna.type + dna.copy_dna(newprofile.dna) + newprofile.name_list = name_list.Copy() + newprofile.appearance_list = appearance_list.Copy() + newprofile.flags_cover_list = flags_cover_list.Copy() + newprofile.exists_list = exists_list.Copy() + newprofile.item_color_list = item_color_list.Copy() + newprofile.item_state_list = item_state_list.Copy() + newprofile.underwear = underwear + newprofile.undershirt = undershirt + newprofile.socks = socks + +/datum/game_mode/proc/update_changeling_icons_added(datum/mind/changling_mind) + var/datum/atom_hud/antag/hud = GLOB.huds[ANTAG_HUD_CHANGELING] + hud.join_hud(changling_mind.current) + set_antag_hud(changling_mind.current, "changling") + +/datum/game_mode/proc/update_changeling_icons_removed(datum/mind/changling_mind) + var/datum/atom_hud/antag/hud = GLOB.huds[ANTAG_HUD_CHANGELING] + hud.leave_hud(changling_mind.current) + set_antag_hud(changling_mind.current, null) + diff --git a/code/game/gamemodes/changeling/powers/augmented_eyesight.dm b/code/game/gamemodes/changeling/powers/augmented_eyesight.dm index 6cf5d55d2d..b2ddd022a4 100644 --- a/code/game/gamemodes/changeling/powers/augmented_eyesight.dm +++ b/code/game/gamemodes/changeling/powers/augmented_eyesight.dm @@ -1,4 +1,4 @@ -//Augmented Eyesight: Gives you thermal and night vision - bye bye, flashlights. Also, high DNA cost because of how powerful it is. +//Augmented Eyesight: Gives you x-ray vision or protection from flashes. Also, high DNA cost because of how powerful it is. //Possible todo: make a custom message for directing a penlight/flashlight at the eyes - not sure what would display though. /obj/effect/proc_holder/changeling/augmented_eyesight @@ -7,21 +7,31 @@ helptext = "Grants us thermal vision or flash protection. We will become a lot more vulnerable to flash-based devices while thermal vision is active." chemical_cost = 0 dna_cost = 2 //Would be 1 without thermal vision - active = 0 //Whether or not vision is enhanced + active = FALSE + +/obj/effect/proc_holder/changeling/augmented_eyesight/on_purchase(mob/user) //The ability starts inactive, so we should be protected from flashes. + var/obj/item/organ/eyes/E = user.getorganslot("eye_sight") + if (E) + E.flash_protect = 2 //Adjust the user's eyes' flash protection + to_chat(user, "We adjust our eyes to protect them from bright lights.") + else + to_chat(user, "We can't adjust our eyes if we don't have any!") /obj/effect/proc_holder/changeling/augmented_eyesight/sting_action(mob/living/carbon/human/user) if(!istype(user)) return var/obj/item/organ/eyes/E = user.getorganslot("eye_sight") if(E) - if(E.flash_protect) - E.sight_flags |= SEE_MOBS - E.flash_protect = -1 + if(!active) + E.sight_flags |= SEE_MOBS | SEE_OBJS | SEE_TURFS //Add sight flags to the user's eyes + E.flash_protect = -1 //Adjust the user's eyes' flash protection to_chat(user, "We adjust our eyes to sense prey through walls.") + active = TRUE //Defined in code/modules/spells/spell.dm else - E.sight_flags -= SEE_MOBS - E.flash_protect = 2 + E.sight_flags ^= SEE_MOBS | SEE_OBJS | SEE_TURFS //Remove sight flags from the user's eyes + E.flash_protect = 2 //Adjust the user's eyes' flash protection to_chat(user, "We adjust our eyes to protect them from bright lights.") + active = FALSE user.update_sight() else to_chat(user, "We can't adjust our eyes if we don't have any!") @@ -31,7 +41,11 @@ return 1 -/obj/effect/proc_holder/changeling/augmented_eyesight/on_refund(mob/user) +/obj/effect/proc_holder/changeling/augmented_eyesight/on_refund(mob/user) //Get rid of x-ray vision and flash protection when the user refunds this ability var/obj/item/organ/eyes/E = user.getorganslot("eye_sight") if(E) - E.sight_flags -= SEE_MOBS \ No newline at end of file + if (active) + E.sight_flags ^= SEE_MOBS | SEE_OBJS | SEE_TURFS + else + E.flash_protect = 0 + user.update_sight() \ No newline at end of file diff --git a/code/game/gamemodes/changeling/powers/mutations.dm b/code/game/gamemodes/changeling/powers/mutations.dm index 443720fefc..addca91629 100644 --- a/code/game/gamemodes/changeling/powers/mutations.dm +++ b/code/game/gamemodes/changeling/powers/mutations.dm @@ -247,7 +247,7 @@ /obj/item/gun/magic/tentacle/shoot_with_empty_chamber(mob/living/user as mob|obj) - to_chat(user, "The [name] is not ready yet.") + to_chat(user, "The [name] is not ready yet.") /obj/item/gun/magic/tentacle/suicide_act(mob/user) user.visible_message("[user] coils [src] tightly around [user.p_their()] neck! It looks like [user.p_theyre()] trying to commit suicide!") @@ -343,10 +343,10 @@ on_hit(I) //grab the item as if you had hit it directly with the tentacle return 1 else - to_chat(firer, "You can't seem to pry [I] off [C]'s hands!") + to_chat(firer, "You can't seem to pry [I] off [C]'s hands!") return 0 else - to_chat(firer, "[C] has nothing in hand to disarm!") + to_chat(firer, "[C] has nothing in hand to disarm!") return 0 if(INTENT_GRAB) diff --git a/code/game/gamemodes/changeling/powers/tiny_prick.dm b/code/game/gamemodes/changeling/powers/tiny_prick.dm index 6a680f27d6..ca2fd6f03e 100644 --- a/code/game/gamemodes/changeling/powers/tiny_prick.dm +++ b/code/game/gamemodes/changeling/powers/tiny_prick.dm @@ -73,7 +73,7 @@ if(!selected_dna) return if(NOTRANSSTING in selected_dna.dna.species.species_traits) - to_chat(user, "That DNA is not compatible with changeling retrovirus!") + to_chat(user, "That DNA is not compatible with changeling retrovirus!") return ..() diff --git a/code/game/gamemodes/changeling/traitor_chan.dm b/code/game/gamemodes/changeling/traitor_chan.dm index 3392f46578..af33b649ed 100644 --- a/code/game/gamemodes/changeling/traitor_chan.dm +++ b/code/game/gamemodes/changeling/traitor_chan.dm @@ -1,76 +1,82 @@ -/datum/game_mode/traitor/changeling - name = "traitor+changeling" - config_tag = "traitorchan" - traitors_possible = 3 //hard limit on traitors if scaling is turned off - restricted_jobs = list("AI", "Cyborg") - required_players = 25 - required_enemies = 1 // how many of each type are required - recommended_enemies = 3 - reroll_friendly = 1 - - var/list/possible_changelings = list() - var/const/changeling_amount = 1 //hard limit on changelings if scaling is turned off - -/datum/game_mode/traitor/changeling/announce() - to_chat(world, "The current game mode is - Traitor+Changeling!") - to_chat(world, "There are alien creatures on the station along with some syndicate operatives out for their own gain! Do not let the changelings or the traitors succeed!") - -/datum/game_mode/traitor/changeling/can_start() - if(!..()) - return 0 - possible_changelings = get_players_for_role(ROLE_CHANGELING) - if(possible_changelings.len < required_enemies) - return 0 - return 1 - -/datum/game_mode/traitor/changeling/pre_setup() - if(config.protect_roles_from_antagonist) - restricted_jobs += protected_jobs - - if(config.protect_assistant_from_antagonist) - restricted_jobs += "Assistant" - - var/list/datum/mind/possible_changelings = get_players_for_role(ROLE_CHANGELING) - - var/num_changelings = 1 - - if(config.changeling_scaling_coeff) - num_changelings = max(1, min( round(num_players()/(config.changeling_scaling_coeff*4))+2, round(num_players()/(config.changeling_scaling_coeff*2)) )) - else - num_changelings = max(1, min(num_players(), changeling_amount/2)) - - if(possible_changelings.len>0) - for(var/j = 0, j < num_changelings, j++) - if(!possible_changelings.len) break - var/datum/mind/changeling = pick(possible_changelings) - antag_candidates -= changeling - possible_changelings -= changeling - changeling.special_role = "Changeling" - changelings += changeling - changeling.restricted_roles = restricted_jobs - return ..() - else - return 0 - -/datum/game_mode/traitor/changeling/post_setup() - modePlayer += changelings - for(var/datum/mind/changeling in changelings) - changeling.current.make_changeling() - forge_changeling_objectives(changeling) - greet_changeling(changeling) - SSticker.mode.update_changeling_icons_added(changeling) - ..() - return - -/datum/game_mode/traitor/changeling/make_antag_chance(mob/living/carbon/human/character) //Assigns changeling to latejoiners - var/changelingcap = min( round(GLOB.joined_player_list.len/(config.changeling_scaling_coeff*4))+2, round(GLOB.joined_player_list.len/(config.changeling_scaling_coeff*2)) ) - if(SSticker.mode.changelings.len >= changelingcap) //Caps number of latejoin antagonists - ..() - return - if(SSticker.mode.changelings.len <= (changelingcap - 2) || prob(100 / (config.changeling_scaling_coeff * 4))) - if(ROLE_CHANGELING in character.client.prefs.be_special) - if(!jobban_isbanned(character, ROLE_CHANGELING) && !jobban_isbanned(character, "Syndicate")) - if(age_check(character.client)) - if(!(character.job in restricted_jobs)) - character.mind.make_Changling() - ..() +/datum/game_mode/traitor/changeling + name = "traitor+changeling" + config_tag = "traitorchan" + false_report_weight = 10 + traitors_possible = 3 //hard limit on traitors if scaling is turned off + restricted_jobs = list("AI", "Cyborg") + required_players = 25 + required_enemies = 1 // how many of each type are required + recommended_enemies = 3 + reroll_friendly = 1 + + var/list/possible_changelings = list() + var/const/changeling_amount = 1 //hard limit on changelings if scaling is turned off + +/datum/game_mode/traitor/changeling/announce() + to_chat(world, "The current game mode is - Traitor+Changeling!") + to_chat(world, "There are alien creatures on the station along with some syndicate operatives out for their own gain! Do not let the changelings or the traitors succeed!") + +/datum/game_mode/traitor/changeling/can_start() + if(!..()) + return 0 + possible_changelings = get_players_for_role(ROLE_CHANGELING) + if(possible_changelings.len < required_enemies) + return 0 + return 1 + +/datum/game_mode/traitor/changeling/pre_setup() + if(config.protect_roles_from_antagonist) + restricted_jobs += protected_jobs + + if(config.protect_assistant_from_antagonist) + restricted_jobs += "Assistant" + + var/list/datum/mind/possible_changelings = get_players_for_role(ROLE_CHANGELING) + + var/num_changelings = 1 + + if(config.changeling_scaling_coeff) + num_changelings = max(1, min( round(num_players()/(config.changeling_scaling_coeff*4))+2, round(num_players()/(config.changeling_scaling_coeff*2)) )) + else + num_changelings = max(1, min(num_players(), changeling_amount/2)) + + if(possible_changelings.len>0) + for(var/j = 0, j < num_changelings, j++) + if(!possible_changelings.len) break + var/datum/mind/changeling = pick(possible_changelings) + antag_candidates -= changeling + possible_changelings -= changeling + changeling.special_role = "Changeling" + changelings += changeling + changeling.restricted_roles = restricted_jobs + return ..() + else + return 0 + +/datum/game_mode/traitor/changeling/post_setup() + modePlayer += changelings + for(var/datum/mind/changeling in changelings) + changeling.current.make_changeling() + forge_changeling_objectives(changeling) + greet_changeling(changeling) + SSticker.mode.update_changeling_icons_added(changeling) + ..() + return + +/datum/game_mode/traitor/changeling/make_antag_chance(mob/living/carbon/human/character) //Assigns changeling to latejoiners + var/changelingcap = min( round(GLOB.joined_player_list.len/(config.changeling_scaling_coeff*4))+2, round(GLOB.joined_player_list.len/(config.changeling_scaling_coeff*2)) ) + if(SSticker.mode.changelings.len >= changelingcap) //Caps number of latejoin antagonists + ..() + return + if(SSticker.mode.changelings.len <= (changelingcap - 2) || prob(100 / (config.changeling_scaling_coeff * 4))) + if(ROLE_CHANGELING in character.client.prefs.be_special) + if(!jobban_isbanned(character, ROLE_CHANGELING) && !jobban_isbanned(character, "Syndicate")) + if(age_check(character.client)) + if(!(character.job in restricted_jobs)) + character.mind.make_Changling() + ..() + +/datum/game_mode/traitor/changeling/generate_report() + return "The Syndicate has started some experimental research regarding humanoid shapeshifting. There are rumors that this technology will be field tested on a Nanotrasen station \ + for infiltration purposes. Be advised that support personel may also be deployed to defend these shapeshifters. Trust nobody - suspect everybody. Do not announce this to the crew, \ + as paranoia may spread and inhibit workplace efficiency." diff --git a/code/game/gamemodes/clock_cult/clock_cult.dm b/code/game/gamemodes/clock_cult/clock_cult.dm index ec387a71e5..0fb720f9d6 100644 --- a/code/game/gamemodes/clock_cult/clock_cult.dm +++ b/code/game/gamemodes/clock_cult/clock_cult.dm @@ -94,6 +94,7 @@ Credit where due: name = "clockwork cult" config_tag = "clockwork_cult" antag_flag = ROLE_SERVANT_OF_RATVAR + false_report_weight = 10 required_players = 24 required_enemies = 3 recommended_enemies = 3 @@ -185,6 +186,13 @@ Credit where due: ..() return 0 //Doesn't end until the round does +/datum/game_mode/clockwork_cult/generate_report() + return "We have lost contact with multiple stations in your sector. They have gone dark and do not respond to all transmissions, although they appear intact and the crew's life \ + signs remain uninterrupted. Those that have managed to send a transmission or have had some of their crew escape tell tales of a machine cult creating sapient automatons and seeking \ + to brainwash the crew to summon their god, Ratvar. If evidence of this cult is dicovered aboard your station, extreme caution and extreme vigilance must be taken going forward, and \ + all resources should be devoted to stopping this cult. Note that holy water seems to weaken and eventually return the minds of cultists that ingest it, and mindshield implants will \ + prevent conversion altogether." + /datum/game_mode/proc/auto_declare_completion_clockwork_cult() var/text = "" if(istype(SSticker.mode, /datum/game_mode/clockwork_cult)) //Possibly hacky? diff --git a/code/game/gamemodes/clock_cult/clock_effects/clock_sigils.dm b/code/game/gamemodes/clock_cult/clock_effects/clock_sigils.dm index 507c673921..d607adb37f 100644 --- a/code/game/gamemodes/clock_cult/clock_effects/clock_sigils.dm +++ b/code/game/gamemodes/clock_cult/clock_effects/clock_sigils.dm @@ -193,13 +193,13 @@ var/structure_number = 0 for(var/obj/structure/destructible/clockwork/powered/P in range(SIGIL_ACCESS_RANGE, src)) structure_number++ - to_chat(user, "It is storing [GLOB.ratvar_awakens ? "INFINITY":"[power_charge]"]W of power, \ + to_chat(user, "It is storing [GLOB.ratvar_awakens ? "INFINITE":"[DisplayPower(power_charge)] of"] power, \ and [structure_number] Clockwork Structure[structure_number == 1 ? " is":"s are"] in range.") to_chat(user, "While active, it will gradually drain power from nearby electronics. It is currently [isprocessing ? "active":"disabled"].") if(iscyborg(user)) to_chat(user, "You can recharge from the [sigil_name] by crossing it.") else if(!GLOB.ratvar_awakens) - to_chat(user, "Hitting the [sigil_name] with brass sheets will convert them to power at a rate of 1 brass sheet to [POWER_FLOOR]W power.") + to_chat(user, "Hitting the [sigil_name] with brass sheets will convert them to power at a rate of 1 brass sheet to [DisplayPower(POWER_FLOOR)] power.") if(!GLOB.ratvar_awakens) to_chat(user, "You can recharge Replica Fabricators from the [sigil_name].") @@ -207,7 +207,7 @@ if(is_servant_of_ratvar(user) && istype(I, /obj/item/stack/tile/brass) && !GLOB.ratvar_awakens) var/obj/item/stack/tile/brass/B = I user.visible_message("[user] places [B] on [src], causing it to disintegrate into glowing orange energy!", \ - "You charge the [sigil_name] with [B], providing it with [B.amount * POWER_FLOOR]W of power.") + "You charge the [sigil_name] with [B], providing it with [DisplayPower(B.amount * POWER_FLOOR)] of power.") modify_charge(-(B.amount * POWER_FLOOR)) playsound(src, 'sound/effects/light_flicker.ogg', (B.amount * POWER_FLOOR) * 0.01, 1) qdel(B) diff --git a/code/game/gamemodes/clock_cult/clock_helpers/fabrication_helpers.dm b/code/game/gamemodes/clock_cult/clock_helpers/fabrication_helpers.dm index 18c8103eef..a4409cf22c 100644 --- a/code/game/gamemodes/clock_cult/clock_helpers/fabrication_helpers.dm +++ b/code/game/gamemodes/clock_cult/clock_helpers/fabrication_helpers.dm @@ -269,7 +269,7 @@ fabricator.recharging = null if(user) user.visible_message("[user]'s [fabricator.name] stops draining glowing orange energy from [src].", \ - "You finish recharging your [fabricator.name]. It now contains [fabricator.get_power()]W/[fabricator.get_max_power()]W power.") + "You finish recharging your [fabricator.name]. It now contains [DisplayPower(fabricator.get_power())]/[DisplayPower(fabricator.get_max_power())] power.") //Fabricator mob heal proc, to avoid as much copypaste as possible. /mob/living/proc/fabricator_heal(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator) diff --git a/code/game/gamemodes/clock_cult/clock_helpers/scripture_checks.dm b/code/game/gamemodes/clock_cult/clock_helpers/scripture_checks.dm index d6e56f38d5..d8281242ef 100644 --- a/code/game/gamemodes/clock_cult/clock_helpers/scripture_checks.dm +++ b/code/game/gamemodes/clock_cult/clock_helpers/scripture_checks.dm @@ -31,7 +31,7 @@ var/mob/living/silicon/ai/AI = ai if(AI.deployed_shell && is_servant_of_ratvar(AI.deployed_shell)) continue - if(is_servant_of_ratvar(AI) || !isturf(AI.loc) || AI.z != ZLEVEL_STATION || AI.stat == DEAD) + if(is_servant_of_ratvar(AI) || !isturf(AI.loc) || !(AI.z in GLOB.station_z_levels) || AI.stat == DEAD) continue .++ diff --git a/code/game/gamemodes/clock_cult/clock_items/clockwork_slab.dm b/code/game/gamemodes/clock_cult/clock_items/clockwork_slab.dm index 343f2e70e7..eecfec7780 100644 --- a/code/game/gamemodes/clock_cult/clock_items/clockwork_slab.dm +++ b/code/game/gamemodes/clock_cult/clock_items/clockwork_slab.dm @@ -500,7 +500,7 @@ anything but a last resort. Instead, it is recommended that a Sigil of Transmission is created. This sigil serves as both battery and power generator for nearby clockwork \ structures, and those structures will happily draw power from the sigil before they resort to APCs.

    " dat += "Generating power is less easy. The most reliable and efficient way is using brass sheets; attacking a sigil of transmission with brass sheets will convert them \ - to power, at a rate of [POWER_FLOOR]W per sheet. (Brass sheets are created from replica fabricators, which are explained more in detail in the Conversion section.) \ + to power, at a rate of [DisplayPower(POWER_FLOOR)] per sheet. (Brass sheets are created from replica fabricators, which are explained more in detail in the Conversion section.) \ Activating a sigil of transmission will also cause it to drain power from the nearby area, which, while effective, serves as an obvious tell that there is something wrong.

    " dat += "Without power, many structures will not function, making a base vulnerable to attack. For this reason, it is critical that you keep an eye on your power reserves and \ ensure that they remain comfortably high.

    " diff --git a/code/game/gamemodes/clock_cult/clock_items/replica_fabricator.dm b/code/game/gamemodes/clock_cult/clock_items/replica_fabricator.dm index 3f7e826017..bd356982b5 100644 --- a/code/game/gamemodes/clock_cult/clock_items/replica_fabricator.dm +++ b/code/game/gamemodes/clock_cult/clock_items/replica_fabricator.dm @@ -126,22 +126,22 @@ to_chat(user, "Can be used to replace walls, floors, tables, windows, windoors, and airlocks with Clockwork variants.") to_chat(user, "Can construct Clockwork Walls on Clockwork Floors and deconstruct Clockwork Walls to Clockwork Floors.") if(uses_power) - to_chat(user, "It can consume floor tiles, rods, metal, and plasteel for power at rates of 2:[POWER_ROD]W, 1:[POWER_ROD]W, 1:[POWER_METAL]W, \ - and 1:[POWER_PLASTEEL]W, respectively.") - to_chat(user, "It can also consume brass sheets for power at a rate of 1:[POWER_FLOOR]W.") - to_chat(user, "It is storing [get_power()]W/[get_max_power()]W of power[charge_rate ? ", and is gaining [charge_rate*0.5]W of power per second":""].") - to_chat(user, "Use it in-hand to produce 5 brass sheets at a cost of [POWER_WALL_TOTAL]W power.") + to_chat(user, "It can consume floor tiles, rods, metal, and plasteel for power at rates of 2:[DisplayPower(POWER_ROD)], 1:[DisplayPower(POWER_ROD)], 1:[DisplayPower(POWER_METAL)], \ + and 1:[DisplayPower(POWER_PLASTEEL)], respectively.") + to_chat(user, "It can also consume brass sheets for power at a rate of 1:[DisplayPower(POWER_FLOOR)].") + to_chat(user, "It is storing [DisplayPower(get_power())]/[DisplayPower(get_max_power())] of power[charge_rate ? ", and is gaining [DisplayPower(charge_rate*0.5)] of power per second":""].") + to_chat(user, "Use it in-hand to produce 5 brass sheets at a cost of [DisplayPower(POWER_WALL_TOTAL)] power.") /obj/item/clockwork/replica_fabricator/attack_self(mob/living/user) if(is_servant_of_ratvar(user)) if(uses_power) if(!can_use_power(POWER_WALL_TOTAL)) - to_chat(user, "[src] requires [POWER_WALL_TOTAL]W of power to produce brass sheets!") + to_chat(user, "[src] requires [DisplayPower(POWER_WALL_TOTAL)] of power to produce brass sheets!") return modify_stored_power(-POWER_WALL_TOTAL) playsound(src, 'sound/items/deconstruct.ogg', 50, 1) new/obj/item/stack/tile/brass(user.loc, 5) - to_chat(user, "You use [stored_power ? "some":"all"] of [src]'s power to produce 5 brass sheets. It now stores [get_power()]W/[get_max_power()]W of power.") + to_chat(user, "You use [stored_power ? "some":"all"] of [src]'s power to produce 5 brass sheets. It now stores [DisplayPower(get_power())]/[DisplayPower(get_max_power())] of power.") /obj/item/clockwork/replica_fabricator/pre_attackby(atom/target, mob/living/user, params) if(!target || !user || !is_servant_of_ratvar(user) || istype(target, /obj/item/storage)) @@ -196,7 +196,7 @@ fabrication_values["power_cost"] = 0 var/turf/Y = get_turf(user) - if(!Y || (Y.z != ZLEVEL_STATION && Y.z != ZLEVEL_CENTCOM && Y.z != ZLEVEL_MINING && Y.z != ZLEVEL_LAVALAND)) + if(!Y || (!(Y.z in GLOB.station_z_levels) && Y.z != ZLEVEL_CENTCOM && Y.z != ZLEVEL_MINING && Y.z != ZLEVEL_LAVALAND)) fabrication_values["operation_time"] *= 2 if(fabrication_values["power_cost"] > 0) fabrication_values["power_cost"] *= 2 @@ -276,7 +276,7 @@ if(!silent) var/atom/A = fabrication_values["new_obj_type"] if(A) - to_chat(user, "You need [fabrication_values["power_cost"]]W power to fabricate \a [initial(A.name)] from [target]!") + to_chat(user, "You need [DisplayPower(fabrication_values["power_cost"])] power to fabricate \a [initial(A.name)] from [target]!") else if(stored_power - fabrication_values["power_cost"] > max_power) if(!silent) var/atom/A = fabrication_values["new_obj_type"] @@ -323,8 +323,8 @@ repair_values["power_required"] = round(repair_values["healing_for_cycle"]*MIN_CLOCKCULT_POWER, MIN_CLOCKCULT_POWER) //and get the power cost from that if(!can_use_power(RATVAR_POWER_CHECK) && !can_use_power(repair_values["power_required"])) if(!silent) - to_chat(user, "You need at least [repair_values["power_required"]]W power to start repairin[target == user ? "g yourself" : "g [target]"], and at least \ - [round(repair_values["amount_to_heal"]*MIN_CLOCKCULT_POWER, MIN_CLOCKCULT_POWER)]W to fully repair [target == user ? "yourself" : "[target.p_them()]"]!") + to_chat(user, "You need at least [DisplayPower(repair_values["power_required"])] power to start repairin[target == user ? "g yourself" : "g [target]"], and at least \ + [DisplayPower(repair_values["amount_to_heal"]*MIN_CLOCKCULT_POWER, MIN_CLOCKCULT_POWER)] to fully repair [target == user ? "yourself" : "[target.p_them()]"]!") return FALSE return TRUE diff --git a/code/game/gamemodes/clock_cult/clock_scripture.dm b/code/game/gamemodes/clock_cult/clock_scripture.dm index 318d3e243d..806d08dffb 100644 --- a/code/game/gamemodes/clock_cult/clock_scripture.dm +++ b/code/game/gamemodes/clock_cult/clock_scripture.dm @@ -158,7 +158,7 @@ Judgement: 12 servants, 5 caches, 300 CV, and any existing AIs are converted or /datum/clockwork_scripture/proc/check_offstation_penalty() var/turf/T = get_turf(invoker) - if(!T || (T.z != ZLEVEL_STATION && T.z != ZLEVEL_CENTCOM && T.z != ZLEVEL_MINING && T.z != ZLEVEL_LAVALAND)) + if(!T || (!(T.z in GLOB.station_z_levels) && T.z != ZLEVEL_CENTCOM && T.z != ZLEVEL_MINING && T.z != ZLEVEL_LAVALAND)) channel_time *= 2 for(var/i in consumed_components) if(consumed_components[i]) diff --git a/code/game/gamemodes/clock_cult/clock_scriptures/scripture_applications.dm b/code/game/gamemodes/clock_cult/clock_scriptures/scripture_applications.dm index d0b7f11eb4..2930088ca2 100644 --- a/code/game/gamemodes/clock_cult/clock_scriptures/scripture_applications.dm +++ b/code/game/gamemodes/clock_cult/clock_scriptures/scripture_applications.dm @@ -175,7 +175,7 @@ to_chat(invoker, "\"It is too late to construct one of these, champion.\"") return FALSE var/turf/T = get_turf(invoker) - if(!T || T.z != ZLEVEL_STATION) + if(!T || !(T.z in GLOB.station_z_levels)) to_chat(invoker, "\"You must be on the station to construct one of these, champion.\"") return FALSE return ..() diff --git a/code/game/gamemodes/clock_cult/clock_scriptures/scripture_judgement.dm b/code/game/gamemodes/clock_cult/clock_scriptures/scripture_judgement.dm index e7beff846f..c7daef1450 100644 --- a/code/game/gamemodes/clock_cult/clock_scriptures/scripture_judgement.dm +++ b/code/game/gamemodes/clock_cult/clock_scriptures/scripture_judgement.dm @@ -33,7 +33,7 @@ return FALSE var/area/A = get_area(invoker) var/turf/T = get_turf(invoker) - if(!T || T.z != ZLEVEL_STATION || istype(A, /area/shuttle) || !A.blob_allowed) + if(!T || !(T.z in GLOB.station_z_levels) || istype(A, /area/shuttle) || !A.blob_allowed) to_chat(invoker, "You must be on the station to activate the Ark!") return FALSE if(GLOB.clockwork_gateway_activated) diff --git a/code/game/gamemodes/clock_cult/clock_structure.dm b/code/game/gamemodes/clock_cult/clock_structure.dm index 0c29361e59..1da3053605 100644 --- a/code/game/gamemodes/clock_cult/clock_structure.dm +++ b/code/game/gamemodes/clock_cult/clock_structure.dm @@ -160,7 +160,7 @@ if(is_servant_of_ratvar(user) || isobserver(user)) var/powered = total_accessable_power() var/sigil_number = LAZYLEN(check_apc_and_sigils()) - to_chat(user, "It has access to [powered == INFINITY ? "INFINITY":"[powered]"]W of power, \ + to_chat(user, "It has access to [powered == INFINITY ? "INFINITE":"[DisplayPower(powered)] of"] power, \ and [sigil_number] Sigil[sigil_number == 1 ? "":"s"] of Transmission [sigil_number == 1 ? "is":"are"] in range.") /obj/structure/destructible/clockwork/powered/Destroy() diff --git a/code/game/gamemodes/clock_cult/clock_structures/clockwork_obelisk.dm b/code/game/gamemodes/clock_cult/clock_structures/clockwork_obelisk.dm index 4df615450f..de6b058b78 100644 --- a/code/game/gamemodes/clock_cult/clock_structures/clockwork_obelisk.dm +++ b/code/game/gamemodes/clock_cult/clock_structures/clockwork_obelisk.dm @@ -23,7 +23,7 @@ /obj/structure/destructible/clockwork/powered/clockwork_obelisk/examine(mob/user) ..() if(is_servant_of_ratvar(user) || isobserver(user)) - to_chat(user, "It requires [hierophant_cost]W to broadcast over the Hierophant Network, and [gateway_cost]W to open a Spatial Gateway.") + to_chat(user, "It requires [DisplayPower(hierophant_cost)] to broadcast over the Hierophant Network, and [DisplayPower(gateway_cost)] to open a Spatial Gateway.") /obj/structure/destructible/clockwork/powered/clockwork_obelisk/can_be_unfasten_wrench(mob/user, silent) if(active) diff --git a/code/game/gamemodes/clock_cult/clock_structures/mania_motor.dm b/code/game/gamemodes/clock_cult/clock_structures/mania_motor.dm index 732897fda4..23a50fdd4c 100644 --- a/code/game/gamemodes/clock_cult/clock_structures/mania_motor.dm +++ b/code/game/gamemodes/clock_cult/clock_structures/mania_motor.dm @@ -19,7 +19,7 @@ /obj/structure/destructible/clockwork/powered/mania_motor/examine(mob/user) ..() if(is_servant_of_ratvar(user) || isobserver(user)) - to_chat(user, "It requires [mania_cost]W to run.") + to_chat(user, "It requires [DisplayPower(mania_cost)] to run.") /obj/structure/destructible/clockwork/powered/mania_motor/forced_disable(bad_effects) if(active) 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..155413a612 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) @@ -48,7 +48,7 @@ if(active) return 0 var/turf/T = get_turf(src) - if(!T || T.z != ZLEVEL_STATION) + if(!T || !(T.z in GLOB.station_z_levels)) to_chat(user, "[src] must be on the station to function!") return 0 if(SSshuttle.emergency.mode != SHUTTLE_CALL) @@ -63,7 +63,7 @@ /obj/structure/destructible/clockwork/powered/prolonging_prism/process() var/turf/own_turf = get_turf(src) - if(SSshuttle.emergency.mode != SHUTTLE_CALL || delay_remaining <= 0 || !own_turf || own_turf.z != ZLEVEL_STATION) + if(SSshuttle.emergency.mode != SHUTTLE_CALL || delay_remaining <= 0 || !own_turf || !(own_turf.z in GLOB.station_z_levels)) forced_disable(FALSE) return . = ..() @@ -97,7 +97,7 @@ mean_x = Ceiling(mean_x) else mean_x = Floor(mean_x) - var/turf/semi_random_center_turf = locate(mean_x, mean_y, ZLEVEL_STATION) + var/turf/semi_random_center_turf = locate(mean_x, mean_y, ZLEVEL_STATION_PRIMARY) for(var/t in getline(src, semi_random_center_turf)) prism_turfs[t] = TRUE var/placement_style = prob(50) @@ -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/clock_cult/clock_structures/tinkerers_daemon.dm b/code/game/gamemodes/clock_cult/clock_structures/tinkerers_daemon.dm index 079fd081fe..4ceb7c3e26 100644 --- a/code/game/gamemodes/clock_cult/clock_structures/tinkerers_daemon.dm +++ b/code/game/gamemodes/clock_cult/clock_structures/tinkerers_daemon.dm @@ -33,7 +33,7 @@ to_chat(user, "It is currently producing random components.") to_chat(user, "It will produce a component every [round((production_cooldown*0.1) * get_efficiency_mod(TRUE), 0.1)] seconds and requires at least the following power for each component type:") for(var/i in GLOB.clockwork_component_cache) - to_chat(user, "[get_component_icon(i)] [get_component_name(i)]: [get_component_cost(i)]W ([GLOB.clockwork_component_cache[i]] exist[GLOB.clockwork_component_cache[i] == 1 ? "s" : ""])") + to_chat(user, "[get_component_icon(i)] [get_component_name(i)]: [DisplayPower(get_component_cost(i))] ([GLOB.clockwork_component_cache[i]] exist[GLOB.clockwork_component_cache[i] == 1 ? "s" : ""])") /obj/structure/destructible/clockwork/powered/tinkerers_daemon/forced_disable(bad_effects) if(active) @@ -80,7 +80,7 @@ if("Specific Component") var/list/components = list() for(var/i in GLOB.clockwork_component_cache) - components["[get_component_name(i)] ([get_component_cost(i)]W)"] = i + components["[get_component_name(i)] ([DisplayPower(get_component_cost(i))])"] = i var/input_component = input(user, "Choose a component type.", name) as null|anything in components component_id_to_produce = components[input_component] servants = 0 diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index 06407079ce..6406232596 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -31,6 +31,7 @@ name = "cult" config_tag = "cult" antag_flag = ROLE_CULTIST + false_report_weight = 10 restricted_jobs = list("Chaplain","AI", "Cyborg", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel") protected_jobs = list() required_players = 24 @@ -104,7 +105,7 @@ if(!GLOB.summon_spots.len) while(GLOB.summon_spots.len < SUMMON_POSSIBILITIES) var/area/summon = pick(GLOB.sortedAreas - GLOB.summon_spots) - if((summon.z == ZLEVEL_STATION) && summon.valid_territory) + if((summon.z in GLOB.station_z_levels) && summon.valid_territory) GLOB.summon_spots += summon cult_objectives += "eldergod" @@ -144,7 +145,7 @@ to_chat(mob, "Unfortunately, you weren't able to get a [item_name]. This is very bad and you should adminhelp immediately (press F1).") return 0 else - to_chat(mob, "You have a [item_name] in your [where].") + to_chat(mob, "You have a [item_name] in your [where].") if(where == "backpack") var/obj/item/storage/B = mob.back B.orient2hud(mob) @@ -258,6 +259,12 @@ ..() return 1 +/datum/game_mode/cult/generate_report() + return "Some stations in your sector have reported evidence of blood sacrifice and strange magic. Ties to the Wizards' Federation have been proven not to exist, and many employees \ + have disappeared; even Central Command employees light-years away have felt strange presences and at times hysterical compulsions. Interrogations point towards this being the work of \ + the cult of Nar-Sie. If evidence of this cult is discovered aboard your station, extreme caution and extreme vigilance must be taken going forward, and all resources should be \ + devoted to stopping this cult. Note that holy water seems to weaken and eventually return the minds of cultists that ingest it, and mindshield implants will prevent conversion \ + altogether." /datum/game_mode/proc/datum_cult_completion() var/text = "" diff --git a/code/game/gamemodes/cult/cult_comms.dm b/code/game/gamemodes/cult/cult_comms.dm index 647b47e7fa..283376b055 100644 --- a/code/game/gamemodes/cult/cult_comms.dm +++ b/code/game/gamemodes/cult/cult_comms.dm @@ -118,7 +118,7 @@ if(B.current) B.current.update_action_buttons_icon() if(!B.current.incapacitated()) - to_chat(B.current,"[Nominee] has died in the process of attempting to win the cult's support!") + to_chat(B.current,"[Nominee] has died in the process of attempting to win the cult's support!") return FALSE if(!Nominee.mind) GLOB.cult_vote_called = FALSE @@ -126,7 +126,7 @@ if(B.current) B.current.update_action_buttons_icon() if(!B.current.incapacitated()) - to_chat(B.current,"[Nominee] has gone catatonic in the process of attempting to win the cult's support!") + to_chat(B.current,"[Nominee] has gone catatonic in the process of attempting to win the cult's support!") return FALSE if(LAZYLEN(yes_voters) <= LAZYLEN(asked_cultists) * 0.5) GLOB.cult_vote_called = FALSE @@ -134,7 +134,7 @@ if(B.current) B.current.update_action_buttons_icon() if(!B.current.incapacitated()) - to_chat(B.current, "[Nominee] could not win the cult's support and shall continue to serve as an acolyte.") + to_chat(B.current, "[Nominee] could not win the cult's support and shall continue to serve as an acolyte.") return FALSE GLOB.cult_mastered = TRUE SSticker.mode.remove_cultist(Nominee.mind, TRUE) @@ -144,7 +144,7 @@ for(var/datum/action/innate/cult/mastervote/vote in B.current.actions) vote.Remove(B.current) if(!B.current.incapacitated()) - to_chat(B.current,"[Nominee] has won the cult's support and is now their master. Follow [Nominee.p_their()] orders to the best of your ability!") + to_chat(B.current,"[Nominee] has won the cult's support and is now their master. Follow [Nominee.p_their()] orders to the best of your ability!") return TRUE /datum/action/innate/cult/master/IsAvailable() diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index 06f0910c19..4dd5f70731 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -257,8 +257,8 @@ This file contains the arcane tome files. to_chat(user, "There is already a rune here.") return FALSE - if(T.z != ZLEVEL_STATION && T.z != ZLEVEL_MINING) - to_chat(user, "The veil is not weak enough here.") + if(!(T.z in GLOB.station_z_levels) && T.z != ZLEVEL_MINING) + to_chat(user, "The veil is not weak enough here.") return FALSE return TRUE diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index 936afe9090..089265d2fb 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -465,7 +465,7 @@ structure_check() searches for nearby cultist structures required for the invoca /obj/effect/rune/narsie/invoke(var/list/invokers) if(used) return - if(z != ZLEVEL_STATION) + if(!(z in GLOB.station_z_levels)) return if(locate(/obj/singularity/narsie) in GLOB.poi_list) diff --git a/code/game/gamemodes/devil/devil agent/devil_agent.dm b/code/game/gamemodes/devil/devil agent/devil_agent.dm index 5c48406f23..ec09bfc739 100644 --- a/code/game/gamemodes/devil/devil agent/devil_agent.dm +++ b/code/game/gamemodes/devil/devil agent/devil_agent.dm @@ -41,3 +41,7 @@ devil.objectives += outsellobjective return 1 return 0 + +/datum/game_mode/devil/devil_agents/generate_report() + return "Multiple soul merchants have been spotted in the quadrant, and appear to be competing over who can purchase the most souls. Be advised that they are likely to manufacture \ + emergencies to encourage employees to sell their souls. If anyone sells their soul in error, contact an attorney to overrule the sale." diff --git a/code/game/gamemodes/devil/devil_game_mode.dm b/code/game/gamemodes/devil/devil_game_mode.dm index 41016fa770..755fdef87f 100644 --- a/code/game/gamemodes/devil/devil_game_mode.dm +++ b/code/game/gamemodes/devil/devil_game_mode.dm @@ -2,6 +2,7 @@ name = "devil" config_tag = "devil" antag_flag = ROLE_DEVIL + false_report_weight = 1 protected_jobs = list("Lawyer", "Curator", "Chaplain", "Head of Security", "Captain", "AI") required_players = 0 required_enemies = 1 @@ -54,6 +55,10 @@ ..() return 1 +/datum/game_mode/devil/generate_report() + return "Infernal creatures have been seen nearby offering great boons in exchange for souls. This is considered theft against Nanotrasen, as all employment contracts contain a lien on the \ + employee's soul. If anyone sells their soul in error, contact an attorney to overrule the sale. Be warned that if the devil purchases enough souls, a gateway to hell may open." + /datum/game_mode/devil/proc/post_setup_finalize(datum/mind/devil) add_devil(devil.current, ascendable = TRUE) //Devil gamemode devils are ascendable. add_devil_objectives(devil,2) diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm index a56a2d6647..b405cc935c 100644 --- a/code/game/gamemodes/events.dm +++ b/code/game/gamemodes/events.dm @@ -1,80 +1,80 @@ -/proc/power_failure() - priority_announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure", 'sound/ai/poweroff.ogg') - for(var/obj/machinery/power/smes/S in GLOB.machines) - if(istype(get_area(S), /area/ai_monitored/turret_protected) || S.z != ZLEVEL_STATION) - continue - S.charge = 0 - S.output_level = 0 - S.output_attempt = 0 - S.update_icon() - S.power_change() - - var/list/skipped_areas = list(/area/engine/engineering, /area/engine/supermatter, /area/engine/atmospherics_engine, /area/ai_monitored/turret_protected/ai) - - for(var/area/A in world) - if( !A.requires_power || A.always_unpowered ) - continue - - var/skip = 0 - for(var/area_type in skipped_areas) - if(istype(A,area_type)) - skip = 1 - break - if(A.contents) - for(var/atom/AT in A.contents) - if(AT.z != ZLEVEL_STATION) //Only check one, it's enough. - skip = 1 - break - if(skip) continue +/proc/power_failure() + priority_announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure", 'sound/ai/poweroff.ogg') + for(var/obj/machinery/power/smes/S in GLOB.machines) + if(istype(get_area(S), /area/ai_monitored/turret_protected) || !(S.z in GLOB.station_z_levels)) + continue + S.charge = 0 + S.output_level = 0 + S.output_attempt = 0 + S.update_icon() + S.power_change() + + var/list/skipped_areas = list(/area/engine/engineering, /area/engine/supermatter, /area/engine/atmospherics_engine, /area/ai_monitored/turret_protected/ai) + + for(var/area/A in world) + if( !A.requires_power || A.always_unpowered ) + continue + + var/skip = 0 + for(var/area_type in skipped_areas) + if(istype(A,area_type)) + skip = 1 + break + if(A.contents) + for(var/atom/AT in A.contents) + if(!(AT.z in GLOB.station_z_levels)) //Only check one, it's enough. + skip = 1 + break + if(skip) continue A.power_light = FALSE A.power_equip = FALSE A.power_environ = FALSE - A.power_change() - - for(var/obj/machinery/power/apc/C in GLOB.apcs_list) - if(C.cell && C.z == ZLEVEL_STATION) + A.power_change() + + for(var/obj/machinery/power/apc/C in GLOB.apcs_list) + if(C.cell && (C.z in GLOB.station_z_levels)) var/area/A = C.area - - var/skip = 0 - for(var/area_type in skipped_areas) - if(istype(A,area_type)) - skip = 1 - break - if(skip) continue - - C.cell.charge = 0 - -/proc/power_restore() - - priority_announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", 'sound/ai/poweron.ogg') - for(var/obj/machinery/power/apc/C in GLOB.machines) - if(C.cell && C.z == ZLEVEL_STATION) - C.cell.charge = C.cell.maxcharge - C.failure_timer = 0 - for(var/obj/machinery/power/smes/S in GLOB.machines) - if(S.z != ZLEVEL_STATION) - continue - S.charge = S.capacity - S.output_level = S.output_level_max - S.output_attempt = 1 - S.update_icon() - S.power_change() - for(var/area/A in world) + + var/skip = 0 + for(var/area_type in skipped_areas) + if(istype(A,area_type)) + skip = 1 + break + if(skip) continue + + C.cell.charge = 0 + +/proc/power_restore() + + priority_announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", 'sound/ai/poweron.ogg') + for(var/obj/machinery/power/apc/C in GLOB.machines) + if(C.cell && (C.z in GLOB.station_z_levels)) + C.cell.charge = C.cell.maxcharge + C.failure_timer = 0 + for(var/obj/machinery/power/smes/S in GLOB.machines) + if(!(S.z in GLOB.station_z_levels)) + continue + S.charge = S.capacity + S.output_level = S.output_level_max + S.output_attempt = 1 + S.update_icon() + S.power_change() + for(var/area/A in world) if(!istype(A, /area/space) && !istype(A, /area/shuttle) && !istype(A, /area/arrival)) A.power_light = TRUE A.power_equip = TRUE A.power_environ = TRUE - A.power_change() - -/proc/power_restore_quick() - - priority_announce("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal", 'sound/ai/poweron.ogg') - for(var/obj/machinery/power/smes/S in GLOB.machines) - if(S.z != ZLEVEL_STATION) - continue - S.charge = S.capacity - S.output_level = S.output_level_max - S.output_attempt = 1 - S.update_icon() - S.power_change() - + A.power_change() + +/proc/power_restore_quick() + + priority_announce("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal", 'sound/ai/poweron.ogg') + for(var/obj/machinery/power/smes/S in GLOB.machines) + if(!(S.z in GLOB.station_z_levels)) + continue + S.charge = S.capacity + S.output_level = S.output_level_max + S.output_attempt = 1 + S.update_icon() + S.power_change() + diff --git a/code/game/gamemodes/extended/extended.dm b/code/game/gamemodes/extended/extended.dm index fdc3aee2ae..72e8b472ed 100644 --- a/code/game/gamemodes/extended/extended.dm +++ b/code/game/gamemodes/extended/extended.dm @@ -1,6 +1,7 @@ /datum/game_mode/extended name = "secret extended" config_tag = "secret_extended" + false_report_weight = 5 required_players = 0 announce_span = "notice" @@ -12,9 +13,13 @@ /datum/game_mode/extended/post_setup() ..() +/datum/game_mode/extended/generate_report() + return "The transmission mostly failed to mention your sector. It is possible that there is nothing in the Syndicate that could threaten your station during this shift." + /datum/game_mode/extended/announced name = "extended" config_tag = "extended" + false_report_weight = 0 /datum/game_mode/extended/announced/generate_station_goals() for(var/T in subtypesof(/datum/station_goal)) diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 1aee6ee7d3..82350726d9 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -1,593 +1,564 @@ - - -/* - * GAMEMODES (by Rastaf0) - * - * In the new mode system all special roles are fully supported. - * You can have proper wizards/traitors/changelings/cultists during any mode. - * Only two things really depends on gamemode: - * 1. Starting roles, equipment and preparations - * 2. Conditions of finishing the round. - * - */ - - -/datum/game_mode - var/name = "invalid" - var/config_tag = null - var/votable = 1 - var/probability = 0 - var/station_was_nuked = 0 //see nuclearbomb.dm and malfunction.dm - var/explosion_in_progress = 0 //sit back and relax - var/round_ends_with_antag_death = 0 //flags_1 the "one verse the station" antags as such - var/list/datum/mind/modePlayer = new - var/list/datum/mind/antag_candidates = list() // List of possible starting antags goes here - var/list/restricted_jobs = list() // Jobs it doesn't make sense to be. I.E chaplain or AI cultist - var/list/protected_jobs = list() // Jobs that can't be traitors because - var/required_players = 0 - var/maximum_players = -1 // -1 is no maximum, positive numbers limit the selection of a mode on overstaffed stations - var/required_enemies = 0 - var/recommended_enemies = 0 - var/antag_flag = null //preferences flag such as BE_WIZARD that need to be turned on for players to be antag - var/mob/living/living_antag_player = null - var/list/datum/game_mode/replacementmode = null - var/round_converted = 0 //0: round not converted, 1: round going to convert, 2: round converted - var/reroll_friendly //During mode conversion only these are in the running - var/continuous_sanity_checked //Catches some cases where config options could be used to suggest that modes without antagonists should end when all antagonists die - var/enemy_minimum_age = 7 //How many days must players have been playing before they can play this antagonist - - var/announce_span = "warning" //The gamemode's name will be in this span during announcement. - var/announce_text = "This gamemode forgot to set a descriptive text! Uh oh!" //Used to describe a gamemode when it's announced. - - var/const/waittime_l = 600 - var/const/waittime_h = 1800 // started at 1800 - - var/list/datum/station_goal/station_goals = list() - - var/allow_persistence_save = TRUE - -/datum/game_mode/proc/announce() //Shows the gamemode's name and a fast description. - to_chat(world, "The gamemode is: [name]!") - to_chat(world, "[announce_text]") - - -///Checks to see if the game can be setup and ran with the current number of players or whatnot. -/datum/game_mode/proc/can_start() - var/playerC = 0 - for(var/mob/dead/new_player/player in GLOB.player_list) - if((player.client)&&(player.ready == PLAYER_READY_TO_PLAY)) - playerC++ - if(!GLOB.Debug2) - if(playerC < required_players || (maximum_players >= 0 && playerC > maximum_players)) - return 0 - antag_candidates = get_players_for_role(antag_flag) - if(!GLOB.Debug2) - if(antag_candidates.len < required_enemies) - return 0 - return 1 - else - message_admins("DEBUG: GAME STARTING WITHOUT PLAYER NUMBER CHECKS, THIS WILL PROBABLY BREAK SHIT.") - return 1 - - -///Attempts to select players for special roles the mode might have. -/datum/game_mode/proc/pre_setup() - return 1 - - -///Everyone should now be on the station and have their normal gear. This is the place to give the special roles extra things -/datum/game_mode/proc/post_setup(report) //Gamemodes can override the intercept report. Passing TRUE as the argument will force a report. - if(!report) - report = config.intercept - addtimer(CALLBACK(GLOBAL_PROC, .proc/display_roundstart_logout_report), ROUNDSTART_LOGOUT_REPORT_TIME) - - if(SSdbcore.Connect()) - var/sql - if(SSticker.mode) - sql += "game_mode = '[SSticker.mode]'" - if(GLOB.revdata.originmastercommit) - if(sql) - sql += ", " - sql += "commit_hash = '[GLOB.revdata.originmastercommit]'" - if(sql) - var/datum/DBQuery/query_round_game_mode = SSdbcore.NewQuery("UPDATE [format_table_name("round")] SET [sql] WHERE id = [GLOB.round_id]") - query_round_game_mode.Execute() - if(report) - addtimer(CALLBACK(src, .proc/send_intercept, 0), rand(waittime_l, waittime_h)) - generate_station_goals() - return 1 - - -///Handles late-join antag assignments -/datum/game_mode/proc/make_antag_chance(mob/living/carbon/human/character) - if(replacementmode && round_converted == 2) - replacementmode.make_antag_chance(character) - return - - -///Allows rounds to basically be "rerolled" should the initial premise fall through. Also known as mulligan antags. -/datum/game_mode/proc/convert_roundtype() - set waitfor = FALSE - var/list/living_crew = list() - - for(var/mob/Player in GLOB.mob_list) - if(Player.mind && Player.stat != DEAD && !isnewplayer(Player) && !isbrain(Player) && Player.client) - living_crew += Player - if(living_crew.len / GLOB.joined_player_list.len <= config.midround_antag_life_check) //If a lot of the player base died, we start fresh - message_admins("Convert_roundtype failed due to too many dead people. Limit is [config.midround_antag_life_check * 100]% living crew") - return null - - var/list/datum/game_mode/runnable_modes = config.get_runnable_midround_modes(living_crew.len) - var/list/datum/game_mode/usable_modes = list() - for(var/datum/game_mode/G in runnable_modes) - if(G.reroll_friendly && living_crew >= G.required_players) - usable_modes += G - else - qdel(G) - - if(!usable_modes) - message_admins("Convert_roundtype failed due to no valid modes to convert to. Please report this error to the Coders.") - return null - - replacementmode = pickweight(usable_modes) - - switch(SSshuttle.emergency.mode) //Rounds on the verge of ending don't get new antags, they just run out - if(SHUTTLE_STRANDED, SHUTTLE_ESCAPE) - return 1 - if(SHUTTLE_CALL) - if(SSshuttle.emergency.timeLeft(1) < initial(SSshuttle.emergencyCallTime)*0.5) - return 1 - - if(world.time >= (config.midround_antag_time_check * 600)) - message_admins("Convert_roundtype failed due to round length. Limit is [config.midround_antag_time_check] minutes.") - return null - - var/list/antag_candidates = list() - - for(var/mob/living/carbon/human/H in living_crew) - if(H.client && H.client.prefs.allow_midround_antag) - antag_candidates += H - - if(!antag_candidates) - message_admins("Convert_roundtype failed due to no antag candidates.") - return null - - antag_candidates = shuffle(antag_candidates) - - if(config.protect_roles_from_antagonist) - replacementmode.restricted_jobs += replacementmode.protected_jobs - if(config.protect_assistant_from_antagonist) - replacementmode.restricted_jobs += "Assistant" - - message_admins("The roundtype will be converted. If you have other plans for the station or feel the station is too messed up to inhabit stop the creation of antags or end the round now.") - - . = 1 - sleep(rand(600,1800)) - if(!SSticker.IsRoundInProgress()) - message_admins("Roundtype conversion cancelled, the game appears to have finished!") - round_converted = 0 - return - //somewhere between 1 and 3 minutes from now - if(!config.midround_antag[SSticker.mode.config_tag]) - round_converted = 0 - return 1 - for(var/mob/living/carbon/human/H in antag_candidates) - replacementmode.make_antag_chance(H) - round_converted = 2 - message_admins("-- IMPORTANT: The roundtype has been converted to [replacementmode.name], antagonists may have been created! --") - - -///Called by the gameSSticker -/datum/game_mode/process() - return 0 - - -/datum/game_mode/proc/check_finished(force_ending) //to be called by SSticker - if(replacementmode && round_converted == 2) - return replacementmode.check_finished() - if(SSshuttle.emergency && (SSshuttle.emergency.mode == SHUTTLE_ENDGAME)) - return TRUE - if(station_was_nuked) - return TRUE - if(!round_converted && (!config.continuous[config_tag] || (config.continuous[config_tag] && config.midround_antag[config_tag]))) //Non-continuous or continous with replacement antags - if(!continuous_sanity_checked) //make sure we have antags to be checking in the first place - for(var/mob/Player in GLOB.mob_list) - if(Player.mind) - if(Player.mind.special_role) - continuous_sanity_checked = 1 - return 0 - if(!continuous_sanity_checked) - message_admins("The roundtype ([config_tag]) has no antagonists, continuous round has been defaulted to on and midround_antag has been defaulted to off.") - config.continuous[config_tag] = 1 - config.midround_antag[config_tag] = 0 - SSshuttle.clearHostileEnvironment(src) - return 0 - - - if(living_antag_player && living_antag_player.mind && isliving(living_antag_player) && living_antag_player.stat != DEAD && !isnewplayer(living_antag_player) &&!isbrain(living_antag_player)) - return 0 //A resource saver: once we find someone who has to die for all antags to be dead, we can just keep checking them, cycling over everyone only when we lose our mark. - - for(var/mob/Player in GLOB.living_mob_list) - if(Player.mind && Player.stat != DEAD && !isnewplayer(Player) &&!isbrain(Player) && Player.client) - if(Player.mind.special_role) //Someone's still antaging! - living_antag_player = Player - return 0 - - if(!config.continuous[config_tag] || force_ending) - return 1 - - else - round_converted = convert_roundtype() - if(!round_converted) - if(round_ends_with_antag_death) - return 1 - else - config.midround_antag[config_tag] = 0 - return 0 - - return 0 - - -/datum/game_mode/proc/declare_completion() - var/clients = 0 - var/surviving_humans = 0 - var/surviving_total = 0 - var/ghosts = 0 - var/escaped_humans = 0 - var/escaped_total = 0 - - for(var/mob/M in GLOB.player_list) - if(M.client) - clients++ - if(ishuman(M)) - if(!M.stat) - surviving_humans++ - if(M.z == ZLEVEL_CENTCOM) - escaped_humans++ - if(!M.stat) - surviving_total++ - if(M.z == ZLEVEL_CENTCOM) - escaped_total++ - - - if(isobserver(M)) - ghosts++ - - if(clients > 0) - SSblackbox.set_val("round_end_clients",clients) - if(ghosts > 0) - SSblackbox.set_val("round_end_ghosts",ghosts) - if(surviving_humans > 0) - SSblackbox.set_val("survived_human",surviving_humans) - if(surviving_total > 0) - SSblackbox.set_val("survived_total",surviving_total) - if(escaped_humans > 0) - SSblackbox.set_val("escaped_human",escaped_humans) - if(escaped_total > 0) - SSblackbox.set_val("escaped_total",escaped_total) - send2irc("Server", "Round just ended.") - if(cult.len && !istype(SSticker.mode, /datum/game_mode/cult)) - datum_cult_completion() - - - if(GLOB.borers.len) - var/borertext = "
    The borers were:" - for(var/mob/living/simple_animal/borer/B in GLOB.borers) - if((B.key || B.controlling) && B.stat != DEAD) - borertext += "
    [B.controlling ? B.victim.key : B.key] was [B.truename]" - var/count = 1 - for(var/datum/objective/objective in B.mind.objectives) - if(objective.check_completion()) - borertext += "
    Objective #[count]: [objective.explanation_text] Success!" - else - borertext += "
    Objective #[count]: [objective.explanation_text] Fail." - count++ - - - to_chat(world, borertext) - - var/total_borers = 0 - for(var/mob/living/simple_animal/borer/B in GLOB.borers) - if((B.key || B.victim) && B.stat != DEAD) - total_borers++ - if(total_borers) - var/total_borer_hosts = 0 - for(var/mob/living/carbon/C in GLOB.mob_list) - var/mob/living/simple_animal/borer/D = C.has_brain_worms() - var/turf/location = get_turf(C) - if(location.z == ZLEVEL_CENTCOM && D && D.stat != DEAD) - total_borer_hosts++ - to_chat(world, "There were [total_borers] borers alive at round end!") - to_chat(world, "A total of [total_borer_hosts] borers with hosts escaped on the shuttle alive.") - - CHECK_TICK - return 0 - - -/datum/game_mode/proc/check_win() //universal trigger to be called at mob death, nuke explosion, etc. To be called from everywhere. - return 0 - - -/datum/game_mode/proc/send_intercept() - var/intercepttext = "Central Command Status Summary
    " - intercepttext += "Central Command has intercepted and partially decoded a Syndicate transmission with vital information regarding their movements. The following report outlines the most \ - likely threats to appear in your sector." - var/list/possible_modes = list() - possible_modes.Add("blob", "changeling", "clock_cult", "cult", "extended", "gang", "malf", "nuclear", "revolution", "traitor", "wizard") - possible_modes -= name //remove the current gamemode to prevent it from being randomly deleted, it will be readded later - - for(var/i in 1 to 6) //Remove a few modes to leave four - possible_modes -= pick(possible_modes) - - possible_modes |= name //Re-add the actual gamemode - the intercept will thus always have the correct mode in its list - possible_modes = shuffle(possible_modes) //Meta prevention - - var/datum/intercept_text/i_text = new /datum/intercept_text - for(var/V in possible_modes) - intercepttext += i_text.build(V) - - if(station_goals.len) - intercepttext += "
    Special Orders for [station_name()]:" - for(var/datum/station_goal/G in station_goals) - G.on_report() - intercepttext += G.get_report() - - print_command_report(intercepttext, "Central Command Status Summary", announce=FALSE) - priority_announce("A summary has been copied and printed to all communications consoles.", "Enemy communication intercepted. Security level elevated.", 'sound/ai/intercept.ogg') - if(GLOB.security_level < SEC_LEVEL_BLUE) - set_security_level(SEC_LEVEL_BLUE) - - -/datum/game_mode/proc/get_players_for_role(role) - var/list/players = list() - var/list/candidates = list() - var/list/drafted = list() - var/datum/mind/applicant = null - - // Ultimate randomizing code right here - for(var/mob/dead/new_player/player in GLOB.player_list) - if(player.client && player.ready == PLAYER_READY_TO_PLAY) - players += player - - // Shuffling, the players list is now ping-independent!!! - // Goodbye antag dante - players = shuffle(players) - - for(var/mob/dead/new_player/player in players) - if(player.client && player.ready == PLAYER_READY_TO_PLAY) - if(role in player.client.prefs.be_special) - if(!jobban_isbanned(player, "Syndicate") && !jobban_isbanned(player, role)) //Nodrak/Carn: Antag Job-bans - if(age_check(player.client)) //Must be older than the minimum age - candidates += player.mind // Get a list of all the people who want to be the antagonist for this round - - if(restricted_jobs) - for(var/datum/mind/player in candidates) - for(var/job in restricted_jobs) // Remove people who want to be antagonist but have a job already that precludes it - if(player.assigned_role == job) - candidates -= player - - if(candidates.len < recommended_enemies) - for(var/mob/dead/new_player/player in players) - if(player.client && player.ready == PLAYER_READY_TO_PLAY) - if(!(role in player.client.prefs.be_special)) // We don't have enough people who want to be antagonist, make a separate list of people who don't want to be one - if(!jobban_isbanned(player, "Syndicate") && !jobban_isbanned(player, role)) //Nodrak/Carn: Antag Job-bans - drafted += player.mind - - if(restricted_jobs) - for(var/datum/mind/player in drafted) // Remove people who can't be an antagonist - for(var/job in restricted_jobs) - if(player.assigned_role == job) - drafted -= player - - drafted = shuffle(drafted) // Will hopefully increase randomness, Donkie - - while(candidates.len < recommended_enemies) // Pick randomlly just the number of people we need and add them to our list of candidates - if(drafted.len > 0) - applicant = pick(drafted) - if(applicant) - candidates += applicant - drafted.Remove(applicant) - - else // Not enough scrubs, ABORT ABORT ABORT - break - - if(restricted_jobs) - for(var/datum/mind/player in drafted) // Remove people who can't be an antagonist - for(var/job in restricted_jobs) - if(player.assigned_role == job) - drafted -= player - - drafted = shuffle(drafted) // Will hopefully increase randomness, Donkie - - while(candidates.len < recommended_enemies) // Pick randomlly just the number of people we need and add them to our list of candidates - if(drafted.len > 0) - applicant = pick(drafted) - if(applicant) - candidates += applicant - drafted.Remove(applicant) - - else // Not enough scrubs, ABORT ABORT ABORT - break - - return candidates // Returns: The number of people who had the antagonist role set to yes, regardless of recomended_enemies, if that number is greater than recommended_enemies - // recommended_enemies if the number of people with that role set to yes is less than recomended_enemies, - // Less if there are not enough valid players in the game entirely to make recommended_enemies. - - - -/datum/game_mode/proc/num_players() - . = 0 - for(var/mob/dead/new_player/P in GLOB.player_list) - if(P.client && P.ready == PLAYER_READY_TO_PLAY) - . ++ - -/////////////////////////////////// -//Keeps track of all living heads// -/////////////////////////////////// -/datum/game_mode/proc/get_living_heads() - . = list() - for(var/mob/living/carbon/human/player in GLOB.mob_list) - if(player.stat != DEAD && player.mind && (player.mind.assigned_role in GLOB.command_positions)) - . |= player.mind - - -//////////////////////////// -//Keeps track of all heads// -//////////////////////////// -/datum/game_mode/proc/get_all_heads() - . = list() - for(var/mob/player in GLOB.mob_list) - if(player.mind && (player.mind.assigned_role in GLOB.command_positions)) - . |= player.mind - -////////////////////////////////////////////// -//Keeps track of all living security members// -////////////////////////////////////////////// -/datum/game_mode/proc/get_living_sec() - . = list() - for(var/mob/living/carbon/human/player in GLOB.mob_list) - if(player.stat != DEAD && player.mind && (player.mind.assigned_role in GLOB.security_positions)) - . |= player.mind - -//////////////////////////////////////// -//Keeps track of all security members// -//////////////////////////////////////// -/datum/game_mode/proc/get_all_sec() - . = list() - for(var/mob/living/carbon/human/player in GLOB.mob_list) - if(player.mind && (player.mind.assigned_role in GLOB.security_positions)) - . |= player.mind - -////////////////////////// -//Reports player logouts// -////////////////////////// -/proc/display_roundstart_logout_report() - var/msg = "Roundstart logout report\n\n" - for(var/mob/living/L in GLOB.mob_list) - - if(L.ckey) - var/found = 0 - for(var/client/C in GLOB.clients) - if(C.ckey == L.ckey) - found = 1 - break - if(!found) - msg += "[L.name] ([L.ckey]), the [L.job] (Disconnected)\n" - - - if(L.ckey && L.client) - if(L.client.inactivity >= (ROUNDSTART_LOGOUT_REPORT_TIME / 2)) //Connected, but inactive (alt+tabbed or something) - msg += "[L.name] ([L.ckey]), the [L.job] (Connected, Inactive)\n" - continue //AFK client - if(L.stat) - if(L.suiciding) //Suicider - msg += "[L.name] ([L.ckey]), the [L.job] (Suicide)\n" - continue //Disconnected client - if(L.stat == UNCONSCIOUS) - msg += "[L.name] ([L.ckey]), the [L.job] (Dying)\n" - continue //Unconscious - if(L.stat == DEAD) - msg += "[L.name] ([L.ckey]), the [L.job] (Dead)\n" - continue //Dead - - continue //Happy connected client - for(var/mob/dead/observer/D in GLOB.mob_list) - if(D.mind && D.mind.current == L) - if(L.stat == DEAD) - if(L.suiciding) //Suicider - msg += "[L.name] ([ckey(D.mind.key)]), the [L.job] (Suicide)\n" - continue //Disconnected client - else - msg += "[L.name] ([ckey(D.mind.key)]), the [L.job] (Dead)\n" - continue //Dead mob, ghost abandoned - else - if(D.can_reenter_corpse) - continue //Adminghost, or cult/wizard ghost - else - msg += "[L.name] ([ckey(D.mind.key)]), the [L.job] (Ghosted)\n" - continue //Ghosted while alive - - - - for(var/mob/M in GLOB.mob_list) - if(M.client && M.client.holder) - to_chat(M, msg) - -/datum/game_mode/proc/printplayer(datum/mind/ply, fleecheck) - var/text = "
    [ply.key] was [ply.name] the [ply.assigned_role] and" - if(ply.current) - if(ply.current.stat == DEAD) - text += " died" - else - text += " survived" - if(fleecheck && ply.current.z > ZLEVEL_STATION) - text += " while fleeing the station" - if(ply.current.real_name != ply.name) - text += " as [ply.current.real_name]" - else - text += " had their body destroyed" - return text - -/datum/game_mode/proc/printobjectives(datum/mind/ply) - var/text = "" - var/count = 1 - for(var/datum/objective/objective in ply.objectives) - if(objective.check_completion()) - text += "
    Objective #[count]: [objective.explanation_text] Success!" - else - text += "
    Objective #[count]: [objective.explanation_text] Fail." - count++ - return text - -//If the configuration option is set to require players to be logged as old enough to play certain jobs, then this proc checks that they are, otherwise it just returns 1 -/datum/game_mode/proc/age_check(client/C) - if(get_remaining_days(C) == 0) - return 1 //Available in 0 days = available right now = player is old enough to play. - return 0 - - -/datum/game_mode/proc/get_remaining_days(client/C) - if(!C) - return 0 - if(!config.use_age_restriction_for_jobs) - return 0 - if(!isnum(C.player_age)) - return 0 //This is only a number if the db connection is established, otherwise it is text: "Requires database", meaning these restrictions cannot be enforced - if(!isnum(enemy_minimum_age)) - return 0 - - return max(0, enemy_minimum_age - C.player_age) - -/datum/game_mode/proc/replace_jobbaned_player(mob/living/M, role_type, pref) - var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as a [role_type]?", "[role_type]", null, pref, 50, M) - var/mob/dead/observer/theghost = null - if(candidates.len) - theghost = pick(candidates) - to_chat(M, "Your mob has been taken over by a ghost! Appeal your job ban if you want to avoid this in the future!") - message_admins("[key_name_admin(theghost)] has taken control of ([key_name_admin(M)]) to replace a jobbaned player.") - M.ghostize(0) - M.key = theghost.key - -/datum/game_mode/proc/remove_antag_for_borging(datum/mind/newborgie) - SSticker.mode.remove_cultist(newborgie, 0, 0) - SSticker.mode.remove_revolutionary(newborgie, 0) - SSticker.mode.remove_gangster(newborgie, 0, remove_bosses=1) - -/datum/game_mode/proc/generate_station_goals() - var/list/possible = list() - for(var/T in subtypesof(/datum/station_goal)) - var/datum/station_goal/G = T - if(config_tag in initial(G.gamemode_blacklist)) - continue - possible += T - var/goal_weights = 0 - while(possible.len && goal_weights < STATION_GOAL_BUDGET) - var/datum/station_goal/picked = pick_n_take(possible) - goal_weights += initial(picked.weight) - station_goals += new picked - - -/datum/game_mode/proc/declare_station_goal_completion() - for(var/V in station_goals) - var/datum/station_goal/G = V - G.print_result() + + +/* + * GAMEMODES (by Rastaf0) + * + * In the new mode system all special roles are fully supported. + * You can have proper wizards/traitors/changelings/cultists during any mode. + * Only two things really depends on gamemode: + * 1. Starting roles, equipment and preparations + * 2. Conditions of finishing the round. + * + */ + + +/datum/game_mode + var/name = "invalid" + var/config_tag = null + var/votable = 1 + var/probability = 0 + var/false_report_weight = 0 //How often will this show up incorrectly in a centcom report? + var/station_was_nuked = 0 //see nuclearbomb.dm and malfunction.dm + var/explosion_in_progress = 0 //sit back and relax + var/round_ends_with_antag_death = 0 //flags the "one verse the station" antags as such + var/list/datum/mind/modePlayer = new + var/list/datum/mind/antag_candidates = list() // List of possible starting antags goes here + var/list/restricted_jobs = list() // Jobs it doesn't make sense to be. I.E chaplain or AI cultist + var/list/protected_jobs = list() // Jobs that can't be traitors because + var/required_players = 0 + var/maximum_players = -1 // -1 is no maximum, positive numbers limit the selection of a mode on overstaffed stations + var/required_enemies = 0 + var/recommended_enemies = 0 + var/antag_flag = null //preferences flag such as BE_WIZARD that need to be turned on for players to be antag + var/mob/living/living_antag_player = null + var/list/datum/game_mode/replacementmode = null + var/round_converted = 0 //0: round not converted, 1: round going to convert, 2: round converted + var/reroll_friendly //During mode conversion only these are in the running + var/continuous_sanity_checked //Catches some cases where config options could be used to suggest that modes without antagonists should end when all antagonists die + var/enemy_minimum_age = 7 //How many days must players have been playing before they can play this antagonist + + var/announce_span = "warning" //The gamemode's name will be in this span during announcement. + var/announce_text = "This gamemode forgot to set a descriptive text! Uh oh!" //Used to describe a gamemode when it's announced. + + var/const/waittime_l = 600 + var/const/waittime_h = 1800 // started at 1800 + + var/list/datum/station_goal/station_goals = list() + + var/allow_persistence_save = TRUE + +/datum/game_mode/proc/announce() //Shows the gamemode's name and a fast description. + to_chat(world, "The gamemode is: [name]!") + to_chat(world, "[announce_text]") + + +///Checks to see if the game can be setup and ran with the current number of players or whatnot. +/datum/game_mode/proc/can_start() + var/playerC = 0 + for(var/mob/dead/new_player/player in GLOB.player_list) + if((player.client)&&(player.ready == PLAYER_READY_TO_PLAY)) + playerC++ + if(!GLOB.Debug2) + if(playerC < required_players || (maximum_players >= 0 && playerC > maximum_players)) + return 0 + antag_candidates = get_players_for_role(antag_flag) + if(!GLOB.Debug2) + if(antag_candidates.len < required_enemies) + return 0 + return 1 + else + message_admins("DEBUG: GAME STARTING WITHOUT PLAYER NUMBER CHECKS, THIS WILL PROBABLY BREAK SHIT.") + return 1 + + +///Attempts to select players for special roles the mode might have. +/datum/game_mode/proc/pre_setup() + return 1 + + +///Everyone should now be on the station and have their normal gear. This is the place to give the special roles extra things +/datum/game_mode/proc/post_setup(report) //Gamemodes can override the intercept report. Passing TRUE as the argument will force a report. + if(!report) + report = config.intercept + addtimer(CALLBACK(GLOBAL_PROC, .proc/display_roundstart_logout_report), ROUNDSTART_LOGOUT_REPORT_TIME) + + if(SSdbcore.Connect()) + var/sql + if(SSticker.mode) + sql += "game_mode = '[SSticker.mode]'" + if(GLOB.revdata.originmastercommit) + if(sql) + sql += ", " + sql += "commit_hash = '[GLOB.revdata.originmastercommit]'" + if(sql) + var/datum/DBQuery/query_round_game_mode = SSdbcore.NewQuery("UPDATE [format_table_name("round")] SET [sql] WHERE id = [GLOB.round_id]") + query_round_game_mode.Execute() + if(report) + addtimer(CALLBACK(src, .proc/send_intercept, 0), rand(waittime_l, waittime_h)) + generate_station_goals() + return 1 + + +///Handles late-join antag assignments +/datum/game_mode/proc/make_antag_chance(mob/living/carbon/human/character) + if(replacementmode && round_converted == 2) + replacementmode.make_antag_chance(character) + return + + +///Allows rounds to basically be "rerolled" should the initial premise fall through. Also known as mulligan antags. +/datum/game_mode/proc/convert_roundtype() + set waitfor = FALSE + var/list/living_crew = list() + + for(var/mob/Player in GLOB.mob_list) + if(Player.mind && Player.stat != DEAD && !isnewplayer(Player) && !isbrain(Player) && Player.client) + living_crew += Player + if(living_crew.len / GLOB.joined_player_list.len <= config.midround_antag_life_check) //If a lot of the player base died, we start fresh + message_admins("Convert_roundtype failed due to too many dead people. Limit is [config.midround_antag_life_check * 100]% living crew") + return null + + var/list/datum/game_mode/runnable_modes = config.get_runnable_midround_modes(living_crew.len) + var/list/datum/game_mode/usable_modes = list() + for(var/datum/game_mode/G in runnable_modes) + if(G.reroll_friendly && living_crew >= G.required_players) + usable_modes += G + else + qdel(G) + + if(!usable_modes) + message_admins("Convert_roundtype failed due to no valid modes to convert to. Please report this error to the Coders.") + return null + + replacementmode = pickweight(usable_modes) + + switch(SSshuttle.emergency.mode) //Rounds on the verge of ending don't get new antags, they just run out + if(SHUTTLE_STRANDED, SHUTTLE_ESCAPE) + return 1 + if(SHUTTLE_CALL) + if(SSshuttle.emergency.timeLeft(1) < initial(SSshuttle.emergencyCallTime)*0.5) + return 1 + + if(world.time >= (config.midround_antag_time_check * 600)) + message_admins("Convert_roundtype failed due to round length. Limit is [config.midround_antag_time_check] minutes.") + return null + + var/list/antag_candidates = list() + + for(var/mob/living/carbon/human/H in living_crew) + if(H.client && H.client.prefs.allow_midround_antag) + antag_candidates += H + + if(!antag_candidates) + message_admins("Convert_roundtype failed due to no antag candidates.") + return null + + antag_candidates = shuffle(antag_candidates) + + if(config.protect_roles_from_antagonist) + replacementmode.restricted_jobs += replacementmode.protected_jobs + if(config.protect_assistant_from_antagonist) + replacementmode.restricted_jobs += "Assistant" + + message_admins("The roundtype will be converted. If you have other plans for the station or feel the station is too messed up to inhabit stop the creation of antags or end the round now.") + + . = 1 + sleep(rand(600,1800)) + if(!SSticker.IsRoundInProgress()) + message_admins("Roundtype conversion cancelled, the game appears to have finished!") + round_converted = 0 + return + //somewhere between 1 and 3 minutes from now + if(!config.midround_antag[SSticker.mode.config_tag]) + round_converted = 0 + return 1 + for(var/mob/living/carbon/human/H in antag_candidates) + replacementmode.make_antag_chance(H) + round_converted = 2 + message_admins("-- IMPORTANT: The roundtype has been converted to [replacementmode.name], antagonists may have been created! --") + + +///Called by the gameSSticker +/datum/game_mode/process() + return 0 + + +/datum/game_mode/proc/check_finished(force_ending) //to be called by SSticker + if(replacementmode && round_converted == 2) + return replacementmode.check_finished() + if(SSshuttle.emergency && (SSshuttle.emergency.mode == SHUTTLE_ENDGAME)) + return TRUE + if(station_was_nuked) + return TRUE + if(!round_converted && (!config.continuous[config_tag] || (config.continuous[config_tag] && config.midround_antag[config_tag]))) //Non-continuous or continous with replacement antags + if(!continuous_sanity_checked) //make sure we have antags to be checking in the first place + for(var/mob/Player in GLOB.mob_list) + if(Player.mind) + if(Player.mind.special_role) + continuous_sanity_checked = 1 + return 0 + if(!continuous_sanity_checked) + message_admins("The roundtype ([config_tag]) has no antagonists, continuous round has been defaulted to on and midround_antag has been defaulted to off.") + config.continuous[config_tag] = 1 + config.midround_antag[config_tag] = 0 + SSshuttle.clearHostileEnvironment(src) + return 0 + + + if(living_antag_player && living_antag_player.mind && isliving(living_antag_player) && living_antag_player.stat != DEAD && !isnewplayer(living_antag_player) &&!isbrain(living_antag_player)) + return 0 //A resource saver: once we find someone who has to die for all antags to be dead, we can just keep checking them, cycling over everyone only when we lose our mark. + + for(var/mob/Player in GLOB.living_mob_list) + if(Player.mind && Player.stat != DEAD && !isnewplayer(Player) &&!isbrain(Player) && Player.client) + if(Player.mind.special_role) //Someone's still antaging! + living_antag_player = Player + return 0 + + if(!config.continuous[config_tag] || force_ending) + return 1 + + else + round_converted = convert_roundtype() + if(!round_converted) + if(round_ends_with_antag_death) + return 1 + else + config.midround_antag[config_tag] = 0 + return 0 + + return 0 + + +/datum/game_mode/proc/declare_completion() + var/clients = 0 + var/surviving_humans = 0 + var/surviving_total = 0 + var/ghosts = 0 + var/escaped_humans = 0 + var/escaped_total = 0 + + for(var/mob/M in GLOB.player_list) + if(M.client) + clients++ + if(ishuman(M)) + if(!M.stat) + surviving_humans++ + if(M.z == ZLEVEL_CENTCOM) + escaped_humans++ + if(!M.stat) + surviving_total++ + if(M.z == ZLEVEL_CENTCOM) + escaped_total++ + + + if(isobserver(M)) + ghosts++ + + if(clients > 0) + SSblackbox.set_val("round_end_clients",clients) + if(ghosts > 0) + SSblackbox.set_val("round_end_ghosts",ghosts) + if(surviving_humans > 0) + SSblackbox.set_val("survived_human",surviving_humans) + if(surviving_total > 0) + SSblackbox.set_val("survived_total",surviving_total) + if(escaped_humans > 0) + SSblackbox.set_val("escaped_human",escaped_humans) + if(escaped_total > 0) + SSblackbox.set_val("escaped_total",escaped_total) + send2irc("Server", "Round just ended.") + if(cult.len && !istype(SSticker.mode, /datum/game_mode/cult)) + datum_cult_completion() + + return 0 + + +/datum/game_mode/proc/check_win() //universal trigger to be called at mob death, nuke explosion, etc. To be called from everywhere. + return 0 + + +/datum/game_mode/proc/send_intercept() + var/intercepttext = "Central Command Status Summary
    " + intercepttext += "Central Command has intercepted and partially decoded a Syndicate transmission with vital information regarding their movements. The following report outlines the most \ + likely threats to appear in your sector." + var/list/report_weights = config.mode_false_report_weight.Copy() + report_weights[config_tag] = 0 //Prevent the current mode from being falsely selected. + var/list/reports = list() + for(var/i in 1 to rand(3,5)) //Between three and five wrong entries on the list. + var/false_report_type = pickweightAllowZero(report_weights) + report_weights[false_report_type] = 0 //Make it so the same false report won't be selected twice + reports += config.mode_reports[false_report_type] + reports += config.mode_reports[config_tag] + reports = shuffle(reports) //Randomize the order, so the real one is at a random position. + + for(var/report in reports) + intercepttext += "
    " + intercepttext += report + + if(station_goals.len) + intercepttext += "
    Special Orders for [station_name()]:" + for(var/datum/station_goal/G in station_goals) + G.on_report() + intercepttext += G.get_report() + + print_command_report(intercepttext, "Central Command Status Summary", announce=FALSE) + priority_announce("A summary has been copied and printed to all communications consoles.", "Enemy communication intercepted. Security level elevated.", 'sound/ai/intercept.ogg') + if(GLOB.security_level < SEC_LEVEL_BLUE) + set_security_level(SEC_LEVEL_BLUE) + + +/datum/game_mode/proc/get_players_for_role(role) + var/list/players = list() + var/list/candidates = list() + var/list/drafted = list() + var/datum/mind/applicant = null + + // Ultimate randomizing code right here + for(var/mob/dead/new_player/player in GLOB.player_list) + if(player.client && player.ready == PLAYER_READY_TO_PLAY) + players += player + + // Shuffling, the players list is now ping-independent!!! + // Goodbye antag dante + players = shuffle(players) + + for(var/mob/dead/new_player/player in players) + if(player.client && player.ready == PLAYER_READY_TO_PLAY) + if(role in player.client.prefs.be_special) + if(!jobban_isbanned(player, "Syndicate") && !jobban_isbanned(player, role)) //Nodrak/Carn: Antag Job-bans + if(age_check(player.client)) //Must be older than the minimum age + candidates += player.mind // Get a list of all the people who want to be the antagonist for this round + + if(restricted_jobs) + for(var/datum/mind/player in candidates) + for(var/job in restricted_jobs) // Remove people who want to be antagonist but have a job already that precludes it + if(player.assigned_role == job) + candidates -= player + + if(candidates.len < recommended_enemies) + for(var/mob/dead/new_player/player in players) + if(player.client && player.ready == PLAYER_READY_TO_PLAY) + if(!(role in player.client.prefs.be_special)) // We don't have enough people who want to be antagonist, make a separate list of people who don't want to be one + if(!jobban_isbanned(player, "Syndicate") && !jobban_isbanned(player, role)) //Nodrak/Carn: Antag Job-bans + drafted += player.mind + + if(restricted_jobs) + for(var/datum/mind/player in drafted) // Remove people who can't be an antagonist + for(var/job in restricted_jobs) + if(player.assigned_role == job) + drafted -= player + + drafted = shuffle(drafted) // Will hopefully increase randomness, Donkie + + while(candidates.len < recommended_enemies) // Pick randomlly just the number of people we need and add them to our list of candidates + if(drafted.len > 0) + applicant = pick(drafted) + if(applicant) + candidates += applicant + drafted.Remove(applicant) + + else // Not enough scrubs, ABORT ABORT ABORT + break + + if(restricted_jobs) + for(var/datum/mind/player in drafted) // Remove people who can't be an antagonist + for(var/job in restricted_jobs) + if(player.assigned_role == job) + drafted -= player + + drafted = shuffle(drafted) // Will hopefully increase randomness, Donkie + + while(candidates.len < recommended_enemies) // Pick randomlly just the number of people we need and add them to our list of candidates + if(drafted.len > 0) + applicant = pick(drafted) + if(applicant) + candidates += applicant + drafted.Remove(applicant) + + else // Not enough scrubs, ABORT ABORT ABORT + break + + return candidates // Returns: The number of people who had the antagonist role set to yes, regardless of recomended_enemies, if that number is greater than recommended_enemies + // recommended_enemies if the number of people with that role set to yes is less than recomended_enemies, + // Less if there are not enough valid players in the game entirely to make recommended_enemies. + + + +/datum/game_mode/proc/num_players() + . = 0 + for(var/mob/dead/new_player/P in GLOB.player_list) + if(P.client && P.ready == PLAYER_READY_TO_PLAY) + . ++ + +/////////////////////////////////// +//Keeps track of all living heads// +/////////////////////////////////// +/datum/game_mode/proc/get_living_heads() + . = list() + for(var/mob/living/carbon/human/player in GLOB.mob_list) + if(player.stat != DEAD && player.mind && (player.mind.assigned_role in GLOB.command_positions)) + . |= player.mind + + +//////////////////////////// +//Keeps track of all heads// +//////////////////////////// +/datum/game_mode/proc/get_all_heads() + . = list() + for(var/mob/player in GLOB.mob_list) + if(player.mind && (player.mind.assigned_role in GLOB.command_positions)) + . |= player.mind + +////////////////////////////////////////////// +//Keeps track of all living security members// +////////////////////////////////////////////// +/datum/game_mode/proc/get_living_sec() + . = list() + for(var/mob/living/carbon/human/player in GLOB.mob_list) + if(player.stat != DEAD && player.mind && (player.mind.assigned_role in GLOB.security_positions)) + . |= player.mind + +//////////////////////////////////////// +//Keeps track of all security members// +//////////////////////////////////////// +/datum/game_mode/proc/get_all_sec() + . = list() + for(var/mob/living/carbon/human/player in GLOB.mob_list) + if(player.mind && (player.mind.assigned_role in GLOB.security_positions)) + . |= player.mind + +////////////////////////// +//Reports player logouts// +////////////////////////// +/proc/display_roundstart_logout_report() + var/msg = "Roundstart logout report\n\n" + for(var/mob/living/L in GLOB.mob_list) + + if(L.ckey) + var/found = 0 + for(var/client/C in GLOB.clients) + if(C.ckey == L.ckey) + found = 1 + break + if(!found) + msg += "[L.name] ([L.ckey]), the [L.job] (Disconnected)\n" + + + if(L.ckey && L.client) + if(L.client.inactivity >= (ROUNDSTART_LOGOUT_REPORT_TIME / 2)) //Connected, but inactive (alt+tabbed or something) + msg += "[L.name] ([L.ckey]), the [L.job] (Connected, Inactive)\n" + continue //AFK client + if(L.stat) + if(L.suiciding) //Suicider + msg += "[L.name] ([L.ckey]), the [L.job] (Suicide)\n" + continue //Disconnected client + if(L.stat == UNCONSCIOUS) + msg += "[L.name] ([L.ckey]), the [L.job] (Dying)\n" + continue //Unconscious + if(L.stat == DEAD) + msg += "[L.name] ([L.ckey]), the [L.job] (Dead)\n" + continue //Dead + + continue //Happy connected client + for(var/mob/dead/observer/D in GLOB.mob_list) + if(D.mind && D.mind.current == L) + if(L.stat == DEAD) + if(L.suiciding) //Suicider + msg += "[L.name] ([ckey(D.mind.key)]), the [L.job] (Suicide)\n" + continue //Disconnected client + else + msg += "[L.name] ([ckey(D.mind.key)]), the [L.job] (Dead)\n" + continue //Dead mob, ghost abandoned + else + if(D.can_reenter_corpse) + continue //Adminghost, or cult/wizard ghost + else + msg += "[L.name] ([ckey(D.mind.key)]), the [L.job] (Ghosted)\n" + continue //Ghosted while alive + + + + for(var/mob/M in GLOB.mob_list) + if(M.client && M.client.holder) + to_chat(M, msg) + +/datum/game_mode/proc/printplayer(datum/mind/ply, fleecheck) + var/text = "
    [ply.key] was [ply.name] the [ply.assigned_role] and" + if(ply.current) + if(ply.current.stat == DEAD) + text += " died" + else + text += " survived" + if(fleecheck && (!(ply.current.z in GLOB.station_z_levels))) + text += " while fleeing the station" + if(ply.current.real_name != ply.name) + text += " as [ply.current.real_name]" + else + text += " had their body destroyed" + return text + +/datum/game_mode/proc/printobjectives(datum/mind/ply) + var/text = "" + var/count = 1 + for(var/datum/objective/objective in ply.objectives) + if(objective.check_completion()) + text += "
    Objective #[count]: [objective.explanation_text] Success!" + else + text += "
    Objective #[count]: [objective.explanation_text] Fail." + count++ + return text + +//If the configuration option is set to require players to be logged as old enough to play certain jobs, then this proc checks that they are, otherwise it just returns 1 +/datum/game_mode/proc/age_check(client/C) + if(get_remaining_days(C) == 0) + return 1 //Available in 0 days = available right now = player is old enough to play. + return 0 + + +/datum/game_mode/proc/get_remaining_days(client/C) + if(!C) + return 0 + if(!config.use_age_restriction_for_jobs) + return 0 + if(!isnum(C.player_age)) + return 0 //This is only a number if the db connection is established, otherwise it is text: "Requires database", meaning these restrictions cannot be enforced + if(!isnum(enemy_minimum_age)) + return 0 + + return max(0, enemy_minimum_age - C.player_age) + +/datum/game_mode/proc/replace_jobbaned_player(mob/living/M, role_type, pref) + var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as a [role_type]?", "[role_type]", null, pref, 50, M) + var/mob/dead/observer/theghost = null + if(candidates.len) + theghost = pick(candidates) + to_chat(M, "Your mob has been taken over by a ghost! Appeal your job ban if you want to avoid this in the future!") + message_admins("[key_name_admin(theghost)] has taken control of ([key_name_admin(M)]) to replace a jobbaned player.") + M.ghostize(0) + M.key = theghost.key + +/datum/game_mode/proc/remove_antag_for_borging(datum/mind/newborgie) + SSticker.mode.remove_cultist(newborgie, 0, 0) + SSticker.mode.remove_revolutionary(newborgie, 0) + +/datum/game_mode/proc/generate_station_goals() + var/list/possible = list() + for(var/T in subtypesof(/datum/station_goal)) + var/datum/station_goal/G = T + if(config_tag in initial(G.gamemode_blacklist)) + continue + possible += T + var/goal_weights = 0 + while(possible.len && goal_weights < STATION_GOAL_BUDGET) + var/datum/station_goal/picked = pick_n_take(possible) + goal_weights += initial(picked.weight) + station_goals += new picked + + +/datum/game_mode/proc/declare_station_goal_completion() + for(var/V in station_goals) + var/datum/station_goal/G = V + G.print_result() + +/datum/game_mode/proc/generate_report() //Generates a small text blurb for the gamemode in centcom report + return "Gamemode report for [name] not set. Contact a coder." 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/intercept_report.dm b/code/game/gamemodes/intercept_report.dm index febef46e74..af138c689e 100644 --- a/code/game/gamemodes/intercept_report.dm +++ b/code/game/gamemodes/intercept_report.dm @@ -30,11 +30,6 @@ altogether." if("extended") text += "The transmission mostly failed to mention your sector. It is possible that there is nothing in the Syndicate that could threaten your station during this shift." - if("gang") - text += "Cybersun Industries representatives claimed that they, in joint research with the Tiger Cooperative, have made a major breakthrough in brainwashing technology, and have \ - made the nanobots that apply the \"conversion\" very small and capable of fitting into usually innocent objects - namely, pens. While they refused to outsource this technology for \ - months to come due to its flaws, they reported some as missing but passed it off to carelessness. At Central Command, we don't like mysteries, and we have reason to believe that this \ - technology was stolen for anti-Nanotrasen use. Be on the lookout for territory claims and unusually violent crew behavior, applying mindshield implants as necessary." if("malf") text += "A large ionospheric anomaly recently passed through your sector. Although physically undetectable, ionospherics tend to have an extreme effect on telecommunications equipment \ as well as artificial intelligence units. Closely observe the behavior of artificial intelligence, and treat any machine malfunctions as purposeful. If necessary, termination of the \ diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm index 5dfd8f7396..80a22c6b3b 100644 --- a/code/game/gamemodes/malfunction/Malf_Modules.dm +++ b/code/game/gamemodes/malfunction/Malf_Modules.dm @@ -1,4 +1,5 @@ #define DEFAULT_DOOMSDAY_TIMER 4500 +#define DOOMSDAY_ANNOUNCE_INTERVAL 600 GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list( /obj/machinery/field/containment, @@ -232,7 +233,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list( /datum/action/innate/ai/nuke_station/Activate() var/turf/T = get_turf(owner) - if(!istype(T) || T.z != ZLEVEL_STATION) + if(!istype(T) || !(T.z in GLOB.station_z_levels)) to_chat(owner, "You cannot activate the doomsday device while off-station!") return if(alert(owner, "Send arming signal? (true = arm, false = cancel)", "purge_all_life()", "confirm = TRUE;", "confirm = FALSE;") != "confirm = TRUE;") @@ -309,8 +310,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list( owner_AI.nuking = TRUE owner_AI.doomsday_device = DOOM owner_AI.doomsday_device.start() - for(var/pinpointer in GLOB.pinpointer_list) - var/obj/item/pinpointer/P = pinpointer + for(var/obj/item/pinpointer/nuke/P in GLOB.pinpointer_list) P.switch_mode_to(TRACK_MALF_AI) //Pinpointers start tracking the AI wherever it goes qdel(src) @@ -325,12 +325,11 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list( var/timing = FALSE var/obj/effect/countdown/doomsday/countdown var/detonation_timer - var/list/milestones + var/next_announce /obj/machinery/doomsday_device/Initialize() . = ..() countdown = new(src) - milestones = list() /obj/machinery/doomsday_device/Destroy() QDEL_NULL(countdown) @@ -345,6 +344,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list( /obj/machinery/doomsday_device/proc/start() detonation_timer = world.time + DEFAULT_DOOMSDAY_TIMER + next_announce = world.time + DOOMSDAY_ANNOUNCE_INTERVAL timing = TRUE countdown.start() START_PROCESSING(SSfastprocess, src) @@ -356,7 +356,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list( /obj/machinery/doomsday_device/process() var/turf/T = get_turf(src) - if(!T || T.z != ZLEVEL_STATION) + if(!T || !(T.z in GLOB.station_z_levels)) minor_announce("DOOMSDAY DEVICE OUT OF STATION RANGE, ABORTING", "ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4", TRUE) SSshuttle.clearHostileEnvironment(src) qdel(src) @@ -368,13 +368,11 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list( if(!sec_left) timing = FALSE detonate(T.z) - else - var/key = num2text(sec_left) - if(!(sec_left % 60) && !(key in milestones)) - milestones[key] = TRUE - minor_announce("[key] SECONDS UNTIL DOOMSDAY DEVICE ACTIVATION!", "ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4", TRUE) + else if(world.time >= next_announce) + minor_announce("[sec_left] SECONDS UNTIL DOOMSDAY DEVICE ACTIVATION!", "ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4", TRUE) + next_announce += DOOMSDAY_ANNOUNCE_INTERVAL -/obj/machinery/doomsday_device/proc/detonate(z_level = ZLEVEL_STATION) +/obj/machinery/doomsday_device/proc/detonate(z_level = ZLEVEL_STATION_PRIMARY) sound_to_playing_players('sound/machines/alarm.ogg') sleep(100) for(var/mob/living/L in GLOB.mob_list) @@ -426,7 +424,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list( /datum/action/innate/ai/lockdown/Activate() for(var/obj/machinery/door/D in GLOB.airlocks) - if(D.z != ZLEVEL_STATION) + if(!(D.z in GLOB.station_z_levels)) continue INVOKE_ASYNC(D, /obj/machinery/door.proc/hostile_lockdown, src) addtimer(CALLBACK(D, /obj/machinery/door.proc/disable_lockdown), 900) @@ -504,7 +502,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list( /datum/action/innate/ai/break_fire_alarms/Activate() for(var/obj/machinery/firealarm/F in GLOB.machines) - if(F.z != ZLEVEL_STATION) + if(!(F.z in GLOB.station_z_levels)) continue F.emagged = TRUE to_chat(owner, "All thermal sensors on the station have been disabled. Fire alerts will no longer be recognized.") @@ -531,10 +529,10 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list( /datum/action/innate/ai/break_air_alarms/Activate() for(var/obj/machinery/airalarm/AA in GLOB.machines) - if(AA.z != ZLEVEL_STATION) + if(!(AA.z in GLOB.station_z_levels)) continue AA.emagged = TRUE - to_chat(owner, "All air alarm safeties on the station have been overriden. Air alarms may now use the Flood environmental mode.") + to_chat(owner, "All air alarm safeties on the station have been overriden. Air alarms may now use the Flood environmental mode.") owner.playsound_local(owner, 'sound/machines/terminal_off.ogg', 50, 0) @@ -672,7 +670,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) @@ -829,3 +827,4 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list( AI.eyeobj.relay_speech = TRUE #undef DEFAULT_DOOMSDAY_TIMER +#undef DOOMSDAY_ANNOUNCE_INTERVAL \ No newline at end of file diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm.rej b/code/game/gamemodes/malfunction/Malf_Modules.dm.rej new file mode 100644 index 0000000000..97dbe2bbdb --- /dev/null +++ b/code/game/gamemodes/malfunction/Malf_Modules.dm.rej @@ -0,0 +1,11 @@ +diff a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm (rejected hunks) +@@ -309,8 +309,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list( + owner_AI.nuking = TRUE + owner_AI.doomsday_device = DOOM + owner_AI.doomsday_device.start() +- for(var/pinpointer in GLOB.pinpointer_list) +- var/obj/item/weapon/pinpointer/P = pinpointer ++ for(var/obj/item/weapon/pinpointer/nuke/P in GLOB.pinpointer_list) + P.switch_mode_to(TRACK_MALF_AI) //Pinpointers start tracking the AI wherever it goes + qdel(src) + diff --git a/code/game/gamemodes/meteor/meteor.dm b/code/game/gamemodes/meteor/meteor.dm index d652d38d11..b7a6580570 100644 --- a/code/game/gamemodes/meteor/meteor.dm +++ b/code/game/gamemodes/meteor/meteor.dm @@ -1,6 +1,7 @@ /datum/game_mode/meteor name = "meteor" config_tag = "meteor" + false_report_weight = 1 var/meteordelay = 2000 var/nometeors = 0 var/rampupdelta = 5 @@ -53,3 +54,7 @@ SSticker.mode_result = "end - evacuation" ..() return 1 + +/datum/game_mode/meteor/generate_report() + return "[pick("Asteroids have", "Meteors have", "Large rocks have", "Stellar minerals have", "Space hail has", "Debris has")] been detected near your station, and a collision is possible, \ + though unlikely. Be prepared for largescale impacts and destruction. Please note that the debris will prevent the escape shuttle from arriving quickly." diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm index 0265b37194..3bb3c8b43e 100644 --- a/code/game/gamemodes/meteor/meteors.dm +++ b/code/game/gamemodes/meteor/meteors.dm @@ -31,15 +31,15 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event var/max_i = 10//number of tries to spawn meteor. while(!isspaceturf(pickedstart)) var/startSide = pick(GLOB.cardinals) - pickedstart = spaceDebrisStartLoc(startSide, ZLEVEL_STATION) - pickedgoal = spaceDebrisFinishLoc(startSide, ZLEVEL_STATION) + pickedstart = spaceDebrisStartLoc(startSide, ZLEVEL_STATION_PRIMARY) + pickedgoal = spaceDebrisFinishLoc(startSide, ZLEVEL_STATION_PRIMARY) max_i-- if(max_i<=0) return var/Me = pickweight(meteortypes) var/obj/effect/meteor/M = new Me(pickedstart) M.dest = pickedgoal - M.z_original = ZLEVEL_STATION + M.z_original = ZLEVEL_STATION_PRIMARY spawn(0) walk_towards(M, M.dest, 1) @@ -96,7 +96,7 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event pass_flags = PASSTABLE var/heavy = 0 var/meteorsound = 'sound/effects/meteorimpact.ogg' - var/z_original = ZLEVEL_STATION + var/z_original = ZLEVEL_STATION_PRIMARY var/threat = 0 // used for determining which meteors are most interesting var/lifetime = DEFAULT_METEOR_LIFETIME diff --git a/code/game/gamemodes/miniantags/abduction/abduction.dm b/code/game/gamemodes/miniantags/abduction/abduction.dm index ce0ab22373..7eacd9c666 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction.dm @@ -7,6 +7,7 @@ name = "abduction" config_tag = "abduction" antag_flag = ROLE_ABDUCTOR + false_report_weight = 1 recommended_enemies = 2 required_players = 15 maximum_players = 50 @@ -243,3 +244,7 @@ var/datum/atom_hud/antag/hud = GLOB.huds[ANTAG_HUD_ABDUCTOR] hud.leave_hud(alien_mind.current) set_antag_hud(alien_mind.current, null) + +/datum/game_mode/abduction/generate_report() + return "Nearby spaceships report crewmembers having been [pick("kidnapped", "abducted", "captured")] and [pick("tortured", "experimented on", "probed", "implanted")] by mysterious \ + grey humanoids, before being sent back. Be advised that the kidnapped crewmembers behave strangely upon return to duties." diff --git a/code/game/gamemodes/miniantags/abduction/machinery/camera.dm b/code/game/gamemodes/miniantags/abduction/machinery/camera.dm index ffd1b88d25..97893d6d2e 100644 --- a/code/game/gamemodes/miniantags/abduction/machinery/camera.dm +++ b/code/game/gamemodes/miniantags/abduction/machinery/camera.dm @@ -9,7 +9,7 @@ var/datum/action/innate/vest_disguise_swap/vest_disguise_action = new var/datum/action/innate/set_droppoint/set_droppoint_action = new var/obj/machinery/abductor/console/console - z_lock = ZLEVEL_STATION + z_lock = ZLEVEL_STATION_PRIMARY icon = 'icons/obj/abductor.dmi' icon_state = "camera" 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/borer/borer_event.dm b/code/game/gamemodes/miniantags/borer/borer_event.dm index 7d74a065aa..6875a97db5 100644 --- a/code/game/gamemodes/miniantags/borer/borer_event.dm +++ b/code/game/gamemodes/miniantags/borer/borer_event.dm @@ -26,7 +26,7 @@ for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in GLOB.machines) if(QDELETED(temp_vent)) continue - if(temp_vent.loc.z == ZLEVEL_STATION && !temp_vent.welded) + if(temp_vent.loc.z == ZLEVEL_STATION_PRIMARY && !temp_vent.welded) var/datum/pipeline/temp_vent_parent = temp_vent.PARENT1 if(temp_vent_parent.other_atmosmch.len > 20) vents += temp_vent diff --git a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm index bbd78ff76a..8979fb8c78 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 @@ -301,10 +306,6 @@ to_chat(S, "This device is attempting to corrupt our entire network; attempting to interact with it is too risky. Aborting.") return FALSE -/obj/effect/decal/cleanable/crayon/gang/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) - to_chat(S, "Searching... sensor malfunction! Target lost. Aborting.") - return FALSE - /obj/effect/rune/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) to_chat(S, "Searching... sensor malfunction! Target lost. Aborting.") return FALSE @@ -344,19 +345,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 @@ -447,7 +458,7 @@ if(target == src) return - if(z != ZLEVEL_STATION && z != ZLEVEL_LAVALAND) + if(!(z in GLOB.station_z_levels) && z != ZLEVEL_LAVALAND) to_chat(src, "Our bluespace transceiver cannot locate a viable bluespace link, our teleportation abilities are useless in this area.") return @@ -458,8 +469,8 @@ var/turf/open/floor/F switch(z) //Only the station/lavaland - if(ZLEVEL_STATION) - F =find_safe_turf(zlevels = ZLEVEL_STATION, extended_safety_checks = TRUE) + if(ZLEVEL_STATION_PRIMARY) + F =find_safe_turf(zlevels = ZLEVEL_STATION_PRIMARY, extended_safety_checks = TRUE) if(ZLEVEL_LAVALAND) F = find_safe_turf(zlevels = ZLEVEL_LAVALAND, extended_safety_checks = TRUE) if(!F) 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/miniantags/monkey/monkey.dm b/code/game/gamemodes/miniantags/monkey/monkey.dm index f84e4e72b6..b0d78f57a4 100644 --- a/code/game/gamemodes/miniantags/monkey/monkey.dm +++ b/code/game/gamemodes/miniantags/monkey/monkey.dm @@ -5,6 +5,7 @@ name = "monkey" config_tag = "monkey" antag_flag = ROLE_MONKEY + false_report_weight = 1 required_players = 20 required_enemies = 1 @@ -46,7 +47,7 @@ /datum/game_mode/monkey/proc/greet_carrier(datum/mind/carrier) - to_chat(carrier.current, "You are the Jungle Fever patient zero!!") + to_chat(carrier.current, "You are the Jungle Fever patient zero!!") to_chat(carrier.current, "You have been planted onto this station by the Animal Rights Consortium.") to_chat(carrier.current, "Soon the disease will transform you into an ape. Afterwards, you will be able spread the infection to others with a bite.") to_chat(carrier.current, "While your infection strain is undetectable by scanners, any other infectees will show up on medical equipment.") @@ -111,3 +112,7 @@ else SSticker.mode_result = "loss - staff stopped the monkeys" to_chat(world, "The staff managed to contain the monkey infestation!") + +/datum/game_mode/monkey/generate_report() + return "Reports of an ancient [pick("retrovirus", "flesh eating bacteria", "disease", "magical curse blamed on viruses", "bananna blight")] outbreak that turn humans into monkies has been \ + reported in your quadrant. Any such infections may be treated with bananna juice. If an outbreak occurs, ensure the station is quarantined to prevent a largescale outbreak at Centcom." diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index 59650561a6..d48628ddd1 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -5,6 +5,7 @@ /datum/game_mode/nuclear name = "nuclear emergency" config_tag = "nuclear" + false_report_weight = 10 required_players = 30 // 30 players - 3 players to be the nuke ops = 27 players remaining required_enemies = 2 recommended_enemies = 5 @@ -273,6 +274,10 @@ ..() return +/datum/game_mode/nuclear/generate_report() + return "One of Central Command's trading routes was recently disrupted by a raid carried out by the Gorlex Marauders. They seemed to only be after one ship - a highly-sensitive \ + transport containing a nuclear fission explosive, although it is useless without the proper code and authorization disk. While the code was likely found in minutes, the only disk that \ + can activate this explosive is on your station. Ensure that it is protected at all times, and remain alert for possible intruders." /datum/game_mode/proc/auto_declare_completion_nuclear() if( syndicates.len || (SSticker && istype(SSticker.mode, /datum/game_mode/nuclear)) ) @@ -325,7 +330,7 @@ gloves = /obj/item/clothing/gloves/combat back = /obj/item/storage/backpack ears = /obj/item/device/radio/headset/syndicate/alt - l_pocket = /obj/item/pinpointer/syndicate + l_pocket = /obj/item/pinpointer/nuke/syndicate id = /obj/item/card/id/syndicate belt = /obj/item/gun/ballistic/automatic/pistol backpack_contents = list(/obj/item/storage/box/syndie=1) diff --git a/code/game/gamemodes/nuclear/nuclear.dm.rej b/code/game/gamemodes/nuclear/nuclear.dm.rej new file mode 100644 index 0000000000..19648547c7 --- /dev/null +++ b/code/game/gamemodes/nuclear/nuclear.dm.rej @@ -0,0 +1,10 @@ +diff a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm (rejected hunks) +@@ -325,7 +325,7 @@ + gloves = /obj/item/clothing/gloves/combat + back = /obj/item/weapon/storage/backpack + ears = /obj/item/device/radio/headset/syndicate/alt +- l_pocket = /obj/item/weapon/pinpointer/syndicate ++ l_pocket = /obj/item/weapon/pinpointer/nuke/syndicate + id = /obj/item/weapon/card/id/syndicate + belt = /obj/item/weapon/gun/ballistic/automatic/pistol + backpack_contents = list(/obj/item/weapon/storage/box/syndie=1) 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/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index ee611349f8..7642801a6a 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -362,9 +362,9 @@ if(safety) if(timing) set_security_level(previous_level) - for(var/obj/item/pinpointer/syndicate/S in GLOB.pinpointer_list) + for(var/obj/item/pinpointer/nuke/syndicate/S in GLOB.pinpointer_list) S.switch_mode_to(initial(S.mode)) - S.nuke_warning = FALSE + S.alert = FALSE timing = FALSE bomb_set = TRUE detonation_timer = null @@ -381,16 +381,16 @@ bomb_set = TRUE set_security_level("delta") detonation_timer = world.time + (timer_set * 10) - for(var/obj/item/pinpointer/syndicate/S in GLOB.pinpointer_list) + for(var/obj/item/pinpointer/nuke/syndicate/S in GLOB.pinpointer_list) S.switch_mode_to(TRACK_INFILTRATOR) countdown.start() else bomb_set = FALSE detonation_timer = null set_security_level(previous_level) - for(var/obj/item/pinpointer/syndicate/S in GLOB.pinpointer_list) + for(var/obj/item/pinpointer/nuke/syndicate/S in GLOB.pinpointer_list) S.switch_mode_to(initial(S.mode)) - S.nuke_warning = FALSE + S.alert = FALSE countdown.stop() update_icon() @@ -435,12 +435,12 @@ var/off_station = 0 var/turf/bomb_location = get_turf(src) var/area/A = get_area(bomb_location) - if(bomb_location && (bomb_location.z == ZLEVEL_STATION)) + if(bomb_location && (bomb_location.z in GLOB.station_z_levels)) if(istype(A, /area/space)) off_station = NUKE_MISS_STATION if((bomb_location.x < (128-NUKERANGE)) || (bomb_location.x > (128+NUKERANGE)) || (bomb_location.y < (128-NUKERANGE)) || (bomb_location.y > (128+NUKERANGE))) off_station = NUKE_MISS_STATION - else if(istype(A, /area/syndicate_mothership) || (istype(A, /area/shuttle/syndicate) && bomb_location.z == ZLEVEL_CENTCOM)) + else if((istype(A, /area/syndicate_mothership) || (istype(A, /area/shuttle/syndicate)) && bomb_location.z == ZLEVEL_CENTCOM)) off_station = NUKE_SYNDICATE_BASE else off_station = NUKE_NEAR_MISS diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm.rej b/code/game/gamemodes/nuclear/nuclearbomb.dm.rej new file mode 100644 index 0000000000..6a35e91cde --- /dev/null +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm.rej @@ -0,0 +1,33 @@ +diff a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm (rejected hunks) +@@ -362,9 +362,9 @@ + if(safety) + if(timing) + set_security_level(previous_level) +- for(var/obj/item/weapon/pinpointer/syndicate/S in GLOB.pinpointer_list) ++ for(var/obj/item/weapon/pinpointer/nuke/syndicate/S in GLOB.pinpointer_list) + S.switch_mode_to(initial(S.mode)) +- S.nuke_warning = FALSE ++ S.alert = FALSE + timing = FALSE + bomb_set = TRUE + detonation_timer = null +@@ -381,16 +381,16 @@ + bomb_set = TRUE + set_security_level("delta") + detonation_timer = world.time + (timer_set * 10) +- for(var/obj/item/weapon/pinpointer/syndicate/S in GLOB.pinpointer_list) ++ for(var/obj/item/weapon/pinpointer/nuke/syndicate/S in GLOB.pinpointer_list) + S.switch_mode_to(TRACK_INFILTRATOR) + countdown.start() + else + bomb_set = FALSE + detonation_timer = null + set_security_level(previous_level) +- for(var/obj/item/weapon/pinpointer/syndicate/S in GLOB.pinpointer_list) ++ for(var/obj/item/weapon/pinpointer/nuke/syndicate/S in GLOB.pinpointer_list) + S.switch_mode_to(initial(S.mode)) +- S.nuke_warning = FALSE ++ S.alert = FALSE + countdown.stop() + update_icon() + diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm index 9f63309643..461ef78ef3 100644 --- a/code/game/gamemodes/nuclear/pinpointer.dm +++ b/code/game/gamemodes/nuclear/pinpointer.dm @@ -1,56 +1,7 @@ -//Pinpointers are used to track atoms from a distance as long as they're on the same z-level. The captain and nuke ops have ones that track the nuclear authentication disk. -/obj/item/pinpointer - name = "pinpointer" - desc = "A handheld tracking device that locks onto certain signals." - icon = 'icons/obj/device.dmi' - icon_state = "pinoff" - flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT - w_class = WEIGHT_CLASS_SMALL - item_state = "electronic" - lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' - righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' - throw_speed = 3 - throw_range = 7 - materials = list(MAT_METAL = 500, MAT_GLASS = 250) - resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF - var/active = FALSE - var/atom/movable/target = null //The thing we're searching for - var/atom/movable/constant_target = null //The thing we're always focused on, if we're in the right mode - var/target_x = 0 //The target coordinates if we're tracking those - var/target_y = 0 - var/minimum_range = 0 //at what range the pinpointer declares you to be at your destination - var/nuke_warning = FALSE // If we've set off a miniature alarm about an armed nuke - var/mode = TRACK_NUKE_DISK //What are we looking for? +/obj/item/pinpointer/nuke + var/mode = TRACK_NUKE_DISK -/obj/item/pinpointer/New() - ..() - GLOB.pinpointer_list += src - -/obj/item/pinpointer/Destroy() - STOP_PROCESSING(SSfastprocess, src) - GLOB.pinpointer_list -= src - return ..() - -/obj/item/pinpointer/attack_self(mob/living/user) - active = !active - user.visible_message("[user] [active ? "" : "de"]activates their pinpointer.", "You [active ? "" : "de"]activate your pinpointer.") - playsound(user, 'sound/items/screwdriver2.ogg', 50, 1) - icon_state = "pin[active ? "onnull" : "off"]" - if(active) - START_PROCESSING(SSfastprocess, src) - else - target = null //Restarting the pinpointer forces a target reset - STOP_PROCESSING(SSfastprocess, src) - -/obj/item/pinpointer/attackby(obj/item/I, mob/living/user, params) - if(mode != TRACK_ATOM) - return ..() - user.visible_message("[user] tunes [src] to [I].", "You fine-tune [src]'s tracking to track [I].") - playsound(src, 'sound/machines/click.ogg', 50, 1) - constant_target = I - -/obj/item/pinpointer/examine(mob/user) +/obj/item/pinpointer/nuke/examine(mob/user) ..() var/msg = "Its tracking indicator reads " switch(mode) @@ -60,12 +11,6 @@ msg += "\"01000001 01001001\"." if(TRACK_INFILTRATOR) msg += "\"vasvygengbefuvc\"." - if(TRACK_OPERATIVES) - msg += "\"[target ? "Operative [target]" : "friends"]\"." - if(TRACK_ATOM) - msg += "\"[initial(constant_target.name)]\"." - if(TRACK_COORDINATES) - msg += "\"([target_x], [target_y])\"." else msg = "Its tracking indicator is blank." to_chat(user, msg) @@ -73,22 +18,20 @@ if(bomb.timing) to_chat(user, "Extreme danger. Arming signal detected. Time remaining: [bomb.get_time_left()]") -/obj/item/pinpointer/process() - if(!active) - STOP_PROCESSING(SSfastprocess, src) - return - scan_for_target() - point_to_target() - my_god_jc_a_bomb() - addtimer(CALLBACK(src, .proc/refresh_target), 50, TIMER_UNIQUE) +/obj/item/pinpointer/nuke/process() + ..() + if(active) // If shit's going down + for(var/obj/machinery/nuclearbomb/bomb in GLOB.nuke_list) + if(bomb.timing) + if(!alert) + alert = TRUE + playsound(src, 'sound/items/nuke_toy_lowpower.ogg', 50, 0) + if(isliving(loc)) + var/mob/living/L = loc + to_chat(L, "Your [name] vibrates and lets out a tinny alarm. Uh oh.") -/obj/item/pinpointer/proc/scan_for_target() //Looks for whatever it's tracking - if(target) - if(isliving(target)) - var/mob/living/L = target - if(L.stat == DEAD) - target = null - return +/obj/item/pinpointer/nuke/scan_for_target() + target = null switch(mode) if(TRACK_NUKE_DISK) var/obj/item/disk/nuclear/N = locate() in GLOB.poi_list @@ -104,76 +47,36 @@ target = A if(TRACK_INFILTRATOR) target = SSshuttle.getShuttle("syndicate") - if(TRACK_OPERATIVES) - var/list/possible_targets = list() - var/turf/here = get_turf(src) - for(var/V in SSticker.mode.syndicates) - var/datum/mind/M = V - if(M.current && M.current.stat != DEAD) - possible_targets |= M.current - var/mob/living/closest_operative = get_closest_atom(/mob/living/carbon/human, possible_targets, here) - if(closest_operative) - target = closest_operative - if(TRACK_ATOM) - if(constant_target) - target = constant_target - if(TRACK_COORDINATES) - var/turf/T = get_turf(src) - target = locate(target_x, target_y, T.z) + ..() -/obj/item/pinpointer/proc/point_to_target() //If we found what we're looking for, show the distance and direction - if(!active) - return - if(!target || (mode == TRACK_ATOM && !constant_target)) - icon_state = "pinon[nuke_warning ? "alert" : ""]null" - return - var/turf/here = get_turf(src) - var/turf/there = get_turf(target) - if(here.z != there.z) - icon_state = "pinon[nuke_warning ? "alert" : ""]null" - return - if(get_dist_euclidian(here,there)<=minimum_range) - icon_state = "pinon[nuke_warning ? "alert" : ""]direct" - else - setDir(get_dir(here, there)) - switch(get_dist(here, there)) - if(1 to 8) - icon_state = "pinon[nuke_warning ? "alert" : "close"]" - if(9 to 16) - icon_state = "pinon[nuke_warning ? "alert" : "medium"]" - if(16 to INFINITY) - icon_state = "pinon[nuke_warning ? "alert" : "far"]" - -/obj/item/pinpointer/proc/my_god_jc_a_bomb() //If we should get the hell back to the ship - for(var/obj/machinery/nuclearbomb/bomb in GLOB.nuke_list) - if(bomb.timing) - if(!nuke_warning) - nuke_warning = TRUE - playsound(src, 'sound/items/nuke_toy_lowpower.ogg', 50, 0) - if(isliving(loc)) - var/mob/living/L = loc - to_chat(L, "Your [name] vibrates and lets out a tinny alarm. Uh oh.") - -/obj/item/pinpointer/proc/switch_mode_to(new_mode) //If we shouldn't be tracking what we are +/obj/item/pinpointer/nuke/proc/switch_mode_to(new_mode) if(isliving(loc)) var/mob/living/L = loc to_chat(L, "Your [name] beeps as it reconfigures its tracking algorithms.") playsound(L, 'sound/machines/triple_beep.ogg', 50, 1) mode = new_mode - target = null //Switch modes so we can find the new target + scan_for_target() -/obj/item/pinpointer/proc/refresh_target() //Periodically removes the target to allow the pinpointer to update (i.e. malf AI shunts, an operative dies) - target = null - -/obj/item/pinpointer/syndicate //Syndicate pinpointers automatically point towards the infiltrator once the nuke is active. +/obj/item/pinpointer/nuke/syndicate // Syndicate pinpointers automatically point towards the infiltrator once the nuke is active. name = "syndicate pinpointer" desc = "A handheld tracking device that locks onto certain signals. It's configured to switch tracking modes once it detects the activation signal of a nuclear device." + icon_state = "pinpointer_syndicate" -/obj/item/pinpointer/syndicate/cyborg //Cyborg pinpointers just look for a random operative. +/obj/item/pinpointer/syndicate_cyborg // Cyborg pinpointers just look for a random operative. name = "cyborg syndicate pinpointer" desc = "An integrated tracking device, jury-rigged to search for living Syndicate operatives." - mode = TRACK_OPERATIVES flags_1 = NODROP_1 - +/obj/item/pinpointer/syndicate_cyborg/scan_for_target() + target = null + var/list/possible_targets = list() + var/turf/here = get_turf(src) + for(var/V in SSticker.mode.syndicates) + var/datum/mind/M = V + if(M.current && M.current.stat != DEAD) + possible_targets |= M.current + var/mob/living/closest_operative = get_closest_atom(/mob/living/carbon/human, possible_targets, here) + if(closest_operative) + target = closest_operative + ..() diff --git a/code/game/gamemodes/nuclear/pinpointer.dm.rej b/code/game/gamemodes/nuclear/pinpointer.dm.rej new file mode 100644 index 0000000000..79d652af9b --- /dev/null +++ b/code/game/gamemodes/nuclear/pinpointer.dm.rej @@ -0,0 +1,21 @@ +diff a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm (rejected hunks) +@@ -30,7 +30,6 @@ + var/mob/living/L = loc + to_chat(L, "Your [name] vibrates and lets out a tinny alarm. Uh oh.") + +- + /obj/item/pinpointer/nuke/scan_for_target() + target = null + switch(mode) +@@ -58,10 +57,10 @@ + mode = new_mode + scan_for_target() + +- + /obj/item/pinpointer/nuke/syndicate // Syndicate pinpointers automatically point towards the infiltrator once the nuke is active. + name = "syndicate pinpointer" + desc = "A handheld tracking device that locks onto certain signals. It's configured to switch tracking modes once it detects the activation signal of a nuclear device." ++ icon_state = "pinpointer_syndicate" + + /obj/item/pinpointer/syndicate_cyborg // Cyborg pinpointers just look for a random operative. + name = "cyborg syndicate pinpointer" diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index b33500db22..baf0f69ab9 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) @@ -126,7 +126,7 @@ if(target.current.stat == DEAD || !ishuman(target.current) || !target.current.ckey) return 1 var/turf/T = get_turf(target.current) - if(T && (T.z > ZLEVEL_STATION) || (target.current.client && target.current.client.is_afk())) //If they leave the station or go afk they count as dead for this + if(T && (!(T.z in GLOB.station_z_levels)) || (target.current.client && target.current.client.is_afk())) //If they leave the station or go afk they count as dead for this return 2 return 0 return 1 diff --git a/code/game/gamemodes/objective_items.dm b/code/game/gamemodes/objective_items.dm index 3cfede5f93..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 @@ -186,7 +186,7 @@ return ..() //Old ninja objectives. -/datum/objective_item/special/pinpointer +/datum/objective_item/special/pinpointer/nuke name = "the captain's pinpointer." targetitem = /obj/item/pinpointer difficulty = 10 diff --git a/code/game/gamemodes/objective_items.dm.rej b/code/game/gamemodes/objective_items.dm.rej new file mode 100644 index 0000000000..3770d7eea9 --- /dev/null +++ b/code/game/gamemodes/objective_items.dm.rej @@ -0,0 +1,10 @@ +diff a/code/game/gamemodes/objective_items.dm b/code/game/gamemodes/objective_items.dm (rejected hunks) +@@ -158,7 +158,7 @@ + difficulty = 10 + + //Old ninja objectives. +-/datum/objective_item/special/pinpointer ++/datum/objective_item/special/pinpointer/nuke + name = "the captain's pinpointer." + targetitem = /obj/item/pinpointer + difficulty = 10 diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index 51a2c6c486..43c1b335f4 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -14,6 +14,7 @@ name = "revolution" config_tag = "revolution" antag_flag = ROLE_REV + false_report_weight = 10 restricted_jobs = list("Security Officer", "Warden", "Detective", "AI", "Cyborg","Captain", "Head of Personnel", "Head of Security", "Chief Engineer", "Research Director", "Chief Medical Officer") required_players = 20 required_enemies = 1 @@ -335,7 +336,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 in GLOB.station_z_levels)) if(ishuman(rev_mind.current)) return 0 return 1 @@ -394,3 +395,8 @@ text += printplayer(head, 1) text += "
    " to_chat(world, text) + +/datum/game_mode/revolution/generate_report() + return "Employee unrest has spiked in recent weeks, with several attempted mutinies on heads of staff. Some crew have been observed using flashbulb devices to blind their colleagues, \ + who then follow their orders without question and work towards dethroning departmental leaders. Watch for behavior such as this with caution. If the crew attempts a mutiny, you and \ + your heads of staff are fully authorized to execute them using lethal weaponry - they will be later cloned and interrogated at Central Command." diff --git a/code/game/gamemodes/sandbox/sandbox.dm b/code/game/gamemodes/sandbox/sandbox.dm index e69682a987..21169b8236 100644 --- a/code/game/gamemodes/sandbox/sandbox.dm +++ b/code/game/gamemodes/sandbox/sandbox.dm @@ -1,18 +1,21 @@ -/datum/game_mode/sandbox - name = "sandbox" - config_tag = "sandbox" - required_players = 0 - - announce_span = "info" - announce_text = "Build your own station... or just shoot each other!" - - allow_persistence_save = FALSE - -/datum/game_mode/sandbox/pre_setup() - for(var/mob/M in GLOB.player_list) - M.CanBuild() - return 1 - -/datum/game_mode/sandbox/post_setup() - ..() - SSshuttle.registerHostileEnvironment(src) +/datum/game_mode/sandbox + name = "sandbox" + config_tag = "sandbox" + required_players = 0 + + announce_span = "info" + announce_text = "Build your own station... or just shoot each other!" + + allow_persistence_save = FALSE + +/datum/game_mode/sandbox/pre_setup() + for(var/mob/M in GLOB.player_list) + M.CanBuild() + return 1 + +/datum/game_mode/sandbox/post_setup() + ..() + SSshuttle.registerHostileEnvironment(src) + +/datum/game_mode/sandbox/generate_report() + return "Sensors indicate that crewmembers have been all given psychic powers from which they can manifest various objects.

    This can only end poorly." diff --git a/code/game/gamemodes/traitor/double_agents.dm b/code/game/gamemodes/traitor/double_agents.dm index 32d7da4072..858f21bd76 100644 --- a/code/game/gamemodes/traitor/double_agents.dm +++ b/code/game/gamemodes/traitor/double_agents.dm @@ -5,6 +5,7 @@ /datum/game_mode/traitor/internal_affairs name = "Internal Affairs" config_tag = "internal_affairs" + false_report_weight = 10 required_players = 25 required_enemies = 5 recommended_enemies = 8 @@ -75,3 +76,6 @@ late_joining_list -= M +/datum/game_mode/traitor/internal_affairs/generate_report() + return "Nanotrasen denies any accusations of placing internal affairs agents onboard your station to eliminate inconvenient employees. Any further accusations against Centcom for such \ + actions will be met with a conversation with an official internal affairs agent." diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm index 3b91816ee9..1b8370068f 100644 --- a/code/game/gamemodes/traitor/traitor.dm +++ b/code/game/gamemodes/traitor/traitor.dm @@ -1,164 +1,167 @@ -/datum/game_mode - var/traitor_name = "traitor" - var/list/datum/mind/traitors = list() - - var/datum/mind/exchange_red - var/datum/mind/exchange_blue - -/datum/game_mode/traitor - name = "traitor" - config_tag = "traitor" - antag_flag = ROLE_TRAITOR - restricted_jobs = list("Cyborg")//They are part of the AI if he is traitor so are they, they use to get double chances - protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain") - required_players = 0 - required_enemies = 1 - recommended_enemies = 4 - reroll_friendly = 1 - enemy_minimum_age = 0 - - announce_span = "danger" - announce_text = "There are Syndicate agents on the station!\n\ - Traitors: Accomplish your objectives.\n\ - Crew: Do not let the traitors succeed!" - - var/list/datum/mind/pre_traitors = list() - var/traitors_possible = 4 //hard limit on traitors if scaling is turned off - var/num_modifier = 0 // Used for gamemodes, that are a child of traitor, that need more than the usual. - var/antag_datum = ANTAG_DATUM_TRAITOR //what type of antag to create - - -/datum/game_mode/traitor/pre_setup() - - if(config.protect_roles_from_antagonist) - restricted_jobs += protected_jobs - - if(config.protect_assistant_from_antagonist) - restricted_jobs += "Assistant" - - var/num_traitors = 1 - - if(config.traitor_scaling_coeff) - num_traitors = max(1, min( round(num_players()/(config.traitor_scaling_coeff*2))+ 2 + num_modifier, round(num_players()/(config.traitor_scaling_coeff)) + num_modifier )) - else - num_traitors = max(1, min(num_players(), traitors_possible)) - - for(var/j = 0, j < num_traitors, j++) - if (!antag_candidates.len) - break - var/datum/mind/traitor = pick(antag_candidates) - pre_traitors += traitor - traitor.special_role = traitor_name - traitor.restricted_roles = restricted_jobs - log_game("[traitor.key] (ckey) has been selected as a [traitor_name]") - antag_candidates.Remove(traitor) - - - if(pre_traitors.len < required_enemies) - return 0 - return 1 - - -/datum/game_mode/traitor/post_setup() - for(var/datum/mind/traitor in pre_traitors) - spawn(rand(10,100)) - traitor.add_antag_datum(antag_datum) - if(!exchange_blue) - exchange_blue = -1 //Block latejoiners from getting exchange objectives - modePlayer += traitors - ..() - return 1 - -/datum/game_mode/traitor/make_antag_chance(mob/living/carbon/human/character) //Assigns traitor to latejoiners - var/traitorcap = min(round(GLOB.joined_player_list.len / (config.traitor_scaling_coeff * 2)) + 2 + num_modifier, round(GLOB.joined_player_list.len/config.traitor_scaling_coeff) + num_modifier ) +/datum/game_mode + var/traitor_name = "traitor" + var/list/datum/mind/traitors = list() + + var/datum/mind/exchange_red + var/datum/mind/exchange_blue + +/datum/game_mode/traitor + name = "traitor" + config_tag = "traitor" + antag_flag = ROLE_TRAITOR + false_report_weight = 20 //Reports of traitors are pretty common. + restricted_jobs = list("Cyborg")//They are part of the AI if he is traitor so are they, they use to get double chances + protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain") + required_players = 0 + required_enemies = 1 + recommended_enemies = 4 + reroll_friendly = 1 + enemy_minimum_age = 0 + + announce_span = "danger" + announce_text = "There are Syndicate agents on the station!\n\ + Traitors: Accomplish your objectives.\n\ + Crew: Do not let the traitors succeed!" + + var/list/datum/mind/pre_traitors = list() + var/traitors_possible = 4 //hard limit on traitors if scaling is turned off + var/num_modifier = 0 // Used for gamemodes, that are a child of traitor, that need more than the usual. + var/antag_datum = ANTAG_DATUM_TRAITOR //what type of antag to create + + +/datum/game_mode/traitor/pre_setup() + + if(config.protect_roles_from_antagonist) + restricted_jobs += protected_jobs + + if(config.protect_assistant_from_antagonist) + restricted_jobs += "Assistant" + + var/num_traitors = 1 + + if(config.traitor_scaling_coeff) + num_traitors = max(1, min( round(num_players()/(config.traitor_scaling_coeff*2))+ 2 + num_modifier, round(num_players()/(config.traitor_scaling_coeff)) + num_modifier )) + else + num_traitors = max(1, min(num_players(), traitors_possible)) + + for(var/j = 0, j < num_traitors, j++) + if (!antag_candidates.len) + break + var/datum/mind/traitor = pick(antag_candidates) + pre_traitors += traitor + traitor.special_role = traitor_name + traitor.restricted_roles = restricted_jobs + log_game("[traitor.key] (ckey) has been selected as a [traitor_name]") + antag_candidates.Remove(traitor) + + + if(pre_traitors.len < required_enemies) + return 0 + return 1 + + +/datum/game_mode/traitor/post_setup() + for(var/datum/mind/traitor in pre_traitors) + spawn(rand(10,100)) + traitor.add_antag_datum(antag_datum) + if(!exchange_blue) + exchange_blue = -1 //Block latejoiners from getting exchange objectives + modePlayer += traitors + ..() + return 1 + +/datum/game_mode/traitor/make_antag_chance(mob/living/carbon/human/character) //Assigns traitor to latejoiners + var/traitorcap = min(round(GLOB.joined_player_list.len / (config.traitor_scaling_coeff * 2)) + 2 + num_modifier, round(GLOB.joined_player_list.len/config.traitor_scaling_coeff) + num_modifier ) if((SSticker.mode.traitors.len + pre_traitors.len) >= traitorcap) //Upper cap for number of latejoin antagonists - return + return if((SSticker.mode.traitors.len + pre_traitors.len) <= (traitorcap - 2) || prob(100 / (config.traitor_scaling_coeff * 2))) - if(ROLE_TRAITOR in character.client.prefs.be_special) - if(!jobban_isbanned(character, ROLE_TRAITOR) && !jobban_isbanned(character, "Syndicate")) - if(age_check(character.client)) - if(!(character.job in restricted_jobs)) - add_latejoin_traitor(character.mind) - -/datum/game_mode/traitor/proc/add_latejoin_traitor(datum/mind/character) - character.add_antag_datum(antag_datum) - - - -/datum/game_mode/traitor/declare_completion() - ..() - return//Traitors will be checked as part of check_extra_completion. Leaving this here as a reminder. - - -/datum/game_mode/proc/auto_declare_completion_traitor() - if(traitors.len) - var/text = "
    The [traitor_name]s were:" - for(var/datum/mind/traitor in traitors) - var/traitorwin = 1 - - text += printplayer(traitor) - - var/TC_uses = 0 - var/uplink_true = 0 - var/purchases = "" - for(var/obj/item/device/uplink/H in GLOB.uplinks) - if(H && H.owner && H.owner == traitor.key) - TC_uses += H.spent_telecrystals - uplink_true = 1 - purchases += H.purchase_log - - var/objectives = "" - if(traitor.objectives.len)//If the traitor had no objectives, don't need to process this. - var/count = 1 - for(var/datum/objective/objective in traitor.objectives) - if(objective.check_completion()) - objectives += "
    Objective #[count]: [objective.explanation_text] Success!" - SSblackbox.add_details("traitor_objective","[objective.type]|SUCCESS") - else - objectives += "
    Objective #[count]: [objective.explanation_text] Fail." - SSblackbox.add_details("traitor_objective","[objective.type]|FAIL") - traitorwin = 0 - count++ - - if(uplink_true) - text += " (used [TC_uses] TC) [purchases]" - if(TC_uses==0 && traitorwin) - var/static/icon/badass = icon('icons/badass.dmi', "badass") + if(ROLE_TRAITOR in character.client.prefs.be_special) + if(!jobban_isbanned(character, ROLE_TRAITOR) && !jobban_isbanned(character, "Syndicate")) + if(age_check(character.client)) + if(!(character.job in restricted_jobs)) + add_latejoin_traitor(character.mind) + +/datum/game_mode/traitor/proc/add_latejoin_traitor(datum/mind/character) + character.add_antag_datum(antag_datum) + + + +/datum/game_mode/traitor/declare_completion() + ..() + return//Traitors will be checked as part of check_extra_completion. Leaving this here as a reminder. + + +/datum/game_mode/proc/auto_declare_completion_traitor() + if(traitors.len) + var/text = "
    The [traitor_name]s were:" + for(var/datum/mind/traitor in traitors) + var/traitorwin = 1 + + text += printplayer(traitor) + + var/TC_uses = 0 + var/uplink_true = 0 + var/purchases = "" + for(var/obj/item/device/uplink/H in GLOB.uplinks) + if(H && H.owner && H.owner == traitor.key) + TC_uses += H.spent_telecrystals + uplink_true = 1 + purchases += H.purchase_log + + var/objectives = "" + if(traitor.objectives.len)//If the traitor had no objectives, don't need to process this. + var/count = 1 + for(var/datum/objective/objective in traitor.objectives) + if(objective.check_completion()) + objectives += "
    Objective #[count]: [objective.explanation_text] Success!" + SSblackbox.add_details("traitor_objective","[objective.type]|SUCCESS") + else + objectives += "
    Objective #[count]: [objective.explanation_text] Fail." + SSblackbox.add_details("traitor_objective","[objective.type]|FAIL") + traitorwin = 0 + count++ + + if(uplink_true) + text += " (used [TC_uses] TC) [purchases]" + if(TC_uses==0 && traitorwin) + var/static/icon/badass = icon('icons/badass.dmi', "badass") text += "[icon2html(badass, world)]" - - text += objectives - - var/special_role_text - if(traitor.special_role) - special_role_text = lowertext(traitor.special_role) - else - special_role_text = "antagonist" - - - if(traitorwin) - text += "
    The [special_role_text] was successful!" - SSblackbox.add_details("traitor_success","SUCCESS") - else - text += "
    The [special_role_text] has failed!" - SSblackbox.add_details("traitor_success","FAIL") - - text += "
    " - - text += "
    The code phrases were: [GLOB.syndicate_code_phrase]
    \ - The code responses were: [GLOB.syndicate_code_response]
    " - to_chat(world, text) - - return 1 - - - - -/datum/game_mode/proc/update_traitor_icons_added(datum/mind/traitor_mind) - var/datum/atom_hud/antag/traitorhud = GLOB.huds[ANTAG_HUD_TRAITOR] - traitorhud.join_hud(traitor_mind.current) - set_antag_hud(traitor_mind.current, "traitor") - -/datum/game_mode/proc/update_traitor_icons_removed(datum/mind/traitor_mind) - var/datum/atom_hud/antag/traitorhud = GLOB.huds[ANTAG_HUD_TRAITOR] - traitorhud.leave_hud(traitor_mind.current) - set_antag_hud(traitor_mind.current, null) + + text += objectives + + var/special_role_text + if(traitor.special_role) + special_role_text = lowertext(traitor.special_role) + else + special_role_text = "antagonist" + + + if(traitorwin) + text += "
    The [special_role_text] was successful!" + SSblackbox.add_details("traitor_success","SUCCESS") + else + text += "
    The [special_role_text] has failed!" + SSblackbox.add_details("traitor_success","FAIL") + + text += "
    " + + text += "
    The code phrases were: [GLOB.syndicate_code_phrase]
    \ + The code responses were: [GLOB.syndicate_code_response]
    " + to_chat(world, text) + + return 1 + +/datum/game_mode/traitor/generate_report() + return "Although more specific threats are commonplace, you should always remain vigilant for Syndicate agents aboard your station. Syndicate communications have implied that many \ + Nanotrasen employees are Syndicate agents with hidden memories that may be activated at a moment's notice, so it's possible that these agents might not even know their positions." + + +/datum/game_mode/proc/update_traitor_icons_added(datum/mind/traitor_mind) + var/datum/atom_hud/antag/traitorhud = GLOB.huds[ANTAG_HUD_TRAITOR] + traitorhud.join_hud(traitor_mind.current) + set_antag_hud(traitor_mind.current, "traitor") + +/datum/game_mode/proc/update_traitor_icons_removed(datum/mind/traitor_mind) + var/datum/atom_hud/antag/traitorhud = GLOB.huds[ANTAG_HUD_TRAITOR] + traitorhud.leave_hud(traitor_mind.current) + set_antag_hud(traitor_mind.current, null) diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index 59e4db9893..f4847e30a7 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 @@ -196,258 +198,6 @@ H.equip_to_slot_or_del(new /obj/item/twohanded/spear(H), slot_back) - -/////////////////////Multiverse Blade//////////////////// - -/obj/item/multisword - name = "multiverse sword" - desc = "A weapon capable of conquering the universe and beyond. Activate it to summon copies of yourself from others dimensions to fight by your side." - icon = 'icons/obj/items_and_weapons.dmi' - icon_state = "multiverse" - item_state = "multiverse" - 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 - sharpness = IS_SHARP - force = 20 - throwforce = 10 - w_class = WEIGHT_CLASS_NORMAL - attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") - var/faction = list("unassigned") - var/cooldown = 0 - var/assigned = "unassigned" - var/static/list/multiverse = list() - -/obj/item/multisword/New() - ..() - multiverse += src - - -/obj/item/multisword/Destroy() - multiverse.Remove(src) - return ..() - -/obj/item/multisword/attack_self(mob/user) - if(user.mind.special_role == "apprentice") - to_chat(user, "You know better than to touch your teacher's stuff.") - return - if(cooldown < world.time) - var/faction_check = 0 - for(var/F in faction) - if(F in user.faction) - faction_check = 1 - break - if(faction_check == 0) - faction = list("[user.real_name]") - assigned = "[user.real_name]" - user.faction = list("[user.real_name]") - to_chat(user, "You bind the sword to yourself. You can now use it to summon help.") - if(!is_gangster(user)) - var/datum/gang/multiverse/G = new(src, "[user.real_name]") - SSticker.mode.gangs += G - G.bosses[user.mind] = 0 - G.add_gang_hud(user.mind) - user.mind.gang_datum = G - to_chat(user, "With your new found power you could easily conquer the station!") - var/datum/objective/hijackclone/hijack_objective = new /datum/objective/hijackclone - hijack_objective.owner = user.mind - user.mind.objectives += hijack_objective - hijack_objective.explanation_text = "Ensure only [user.real_name] and their copies are on the shuttle!" - to_chat(user, "Objective #[1]: [hijack_objective.explanation_text]") - SSticker.mode.traitors += user.mind - user.mind.special_role = "[user.real_name] Prime" - else - var/list/candidates = get_candidates(ROLE_WIZARD) - if(candidates.len) - var/client/C = pick(candidates) - spawn_copy(C, get_turf(user.loc), user) - to_chat(user, "The sword flashes, and you find yourself face to face with...you!") - cooldown = world.time + 400 - for(var/obj/item/multisword/M in multiverse) - if(M.assigned == assigned) - M.cooldown = cooldown - - else - to_chat(user, "You fail to summon any copies of yourself. Perhaps you should try again in a bit.") - else - to_chat(user, "[src] is recharging! Keep in mind it shares a cooldown with the swords wielded by your copies.") - - -/obj/item/multisword/proc/spawn_copy(var/client/C, var/turf/T, mob/user) - var/mob/living/carbon/human/M = new/mob/living/carbon/human(T) - C.prefs.copy_to(M, icon_updates=0) - M.key = C.key - M.mind.name = user.real_name - to_chat(M, "You are an alternate version of [user.real_name] from another universe! Help them accomplish their goals at all costs.") - SSticker.mode.add_gangster(M.mind, user.mind.gang_datum, FALSE) - M.real_name = user.real_name - M.name = user.real_name - M.faction = list("[user.real_name]") - if(prob(50)) - var/list/all_species = list() - for(var/speciestype in subtypesof(/datum/species)) - var/datum/species/S = speciestype - if(!initial(S.dangerous_existence)) - all_species += speciestype - M.set_species(pick(all_species), icon_update=0) - M.update_body() - M.update_hair() - M.update_body_parts() - M.dna.update_dna_identity() - equip_copy(M) - -/obj/item/multisword/proc/equip_copy(var/mob/living/carbon/human/M) - - var/obj/item/multisword/sword = new /obj/item/multisword - sword.assigned = assigned - sword.faction = list("[assigned]") - - var/randomize = pick("mobster","roman","wizard","cyborg","syndicate","assistant", "animu", "cultist", "highlander", "clown", "killer", "pirate", "soviet", "officer", "gladiator") - - switch(randomize) - if("mobster") - M.equip_to_slot_or_del(new /obj/item/clothing/head/fedora(M), slot_head) - M.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(M), slot_shoes) - M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/black(M), slot_gloves) - M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears) - M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(M), slot_glasses) - M.equip_to_slot_or_del(new /obj/item/clothing/under/suit_jacket/really_black(M), slot_w_uniform) - M.put_in_hands_or_del(sword) - - if("roman") - var/hat = pick(/obj/item/clothing/head/helmet/roman, /obj/item/clothing/head/helmet/roman/legionaire) - M.equip_to_slot_or_del(new hat(M), slot_head) - M.equip_to_slot_or_del(new /obj/item/clothing/under/roman(M), slot_w_uniform) - M.equip_to_slot_or_del(new /obj/item/clothing/shoes/roman(M), slot_shoes) - M.put_in_hands_or_del(new /obj/item/shield/riot/roman(M)) - M.put_in_hands_or_del(sword) - - if("wizard") - M.equip_to_slot_or_del(new /obj/item/clothing/under/color/lightpurple(M), slot_w_uniform) - M.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe/red(M), slot_wear_suit) - M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal/magic(M), slot_shoes) - M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears) - M.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/red(M), slot_head) - M.put_in_hands_or_del(sword) - if("cyborg") - for(var/X in M.bodyparts) - var/obj/item/bodypart/affecting = X - affecting.change_bodypart_status(BODYPART_ROBOTIC, FALSE, TRUE) - M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/eyepatch(M), slot_glasses) - M.put_in_hands_or_del(sword) - - if("syndicate") - M.equip_to_slot_or_del(new /obj/item/clothing/under/syndicate(M), slot_w_uniform) - M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(M), slot_shoes) - M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves) - M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/swat(M), slot_head) - M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears) - M.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest(M), slot_wear_suit) - M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M),slot_wear_mask) - M.put_in_hands_or_del(sword) - - if("assistant") - M.equip_to_slot_or_del(new /obj/item/clothing/under/color/grey(M), slot_w_uniform) - M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears) - M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(M), slot_shoes) - M.put_in_hands_or_del(sword) - - if("animu") - M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(M), slot_shoes) - M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears) - M.equip_to_slot_or_del(new /obj/item/clothing/head/kitty(M), slot_head) - M.equip_to_slot_or_del(new /obj/item/clothing/under/schoolgirl/red(M), slot_w_uniform) - M.put_in_hands_or_del(sword) - - if("cultist") - M.equip_to_slot_or_del(new /obj/item/clothing/head/culthood/alt(M), slot_head) - M.equip_to_slot_or_del(new /obj/item/clothing/suit/cultrobes/alt(M), slot_wear_suit) - M.equip_to_slot_or_del(new /obj/item/clothing/shoes/cult(M), slot_shoes) - M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears) - M.put_in_hands_or_del(sword) - - if("highlander") - M.equip_to_slot_or_del(new /obj/item/clothing/under/kilt(M), slot_w_uniform) - M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears) - M.equip_to_slot_or_del(new /obj/item/clothing/head/beret(M), slot_head) - M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(M), slot_shoes) - M.put_in_hands_or_del(sword) - - if("clown") - M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/clown(M), slot_w_uniform) - M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears) - M.equip_to_slot_or_del(new /obj/item/clothing/shoes/clown_shoes(M), slot_shoes) - M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(M), slot_wear_mask) - M.equip_to_slot_or_del(new /obj/item/bikehorn(M), slot_l_store) - M.put_in_hands_or_del(sword) - - if("killer") - M.equip_to_slot_or_del(new /obj/item/clothing/under/overalls(M), slot_w_uniform) - M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/white(M), slot_shoes) - M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/latex(M), slot_gloves) - M.equip_to_slot_or_del(new /obj/item/clothing/mask/surgical(M), slot_wear_mask) - M.equip_to_slot_or_del(new /obj/item/clothing/head/welding(M), slot_head) - M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears) - M.equip_to_slot_or_del(new /obj/item/clothing/suit/apron(M), slot_wear_suit) - M.equip_to_slot_or_del(new /obj/item/kitchen/knife(M), slot_l_store) - M.equip_to_slot_or_del(new /obj/item/scalpel(M), slot_r_store) - M.put_in_hands_or_del(sword) - for(var/obj/item/carried_item in M.get_equipped_items()) - carried_item.add_mob_blood(M) - for(var/obj/item/I in M.held_items) - I.add_mob_blood(M) - if("pirate") - M.equip_to_slot_or_del(new /obj/item/clothing/under/pirate(M), slot_w_uniform) - M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/brown(M), slot_shoes) - M.equip_to_slot_or_del(new /obj/item/clothing/head/bandana(M), slot_head) - M.equip_to_slot_or_del(new /obj/item/clothing/glasses/eyepatch(M), slot_glasses) - M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears) - M.put_in_hands_or_del(sword) - - if("soviet") - M.equip_to_slot_or_del(new /obj/item/clothing/head/pirate/captain(M), slot_head) - M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(M), slot_shoes) - M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves) - M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears) - M.equip_to_slot_or_del(new /obj/item/clothing/suit/pirate/captain(M), slot_wear_suit) - M.equip_to_slot_or_del(new /obj/item/clothing/under/soviet(M), slot_w_uniform) - M.put_in_hands_or_del(sword) - - if("officer") - M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/beret(M), slot_head) - M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(M), slot_shoes) - M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves) - M.equip_to_slot_or_del(new /obj/item/clothing/mask/cigarette/cigar/havana(M), slot_wear_mask) - M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears) - M.equip_to_slot_or_del(new /obj/item/clothing/suit/jacket/miljacket(M), slot_wear_suit) - M.equip_to_slot_or_del(new /obj/item/clothing/under/syndicate(M), slot_w_uniform) - M.equip_to_slot_or_del(new /obj/item/clothing/glasses/eyepatch(M), slot_glasses) - M.put_in_hands_or_del(sword) - - if("gladiator") - M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/gladiator(M), slot_head) - M.equip_to_slot_or_del(new /obj/item/clothing/under/gladiator(M), slot_w_uniform) - M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears) - M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(M), slot_shoes) - M.put_in_hands_or_del(sword) - - - else - return - - M.update_body_parts() - - var/obj/item/card/id/W = new /obj/item/card/id - W.icon_state = "centcom" - W.access += ACCESS_MAINT_TUNNELS - W.assignment = "Multiverse Traveller" - W.registered_name = M.real_name - W.update_label(M.real_name) - M.equip_to_slot_or_del(W, slot_wear_id) - - /obj/item/voodoo name = "wicker doll" desc = "Something creepy about it." diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index 2d18c1f9e9..31060fffc3 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -553,7 +553,7 @@ to_chat(user, "It appears to have no author.") /obj/item/spellbook/Initialize() - ..() + . = ..() prepare_spells() /obj/item/spellbook/proc/prepare_spells() diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm index b342ab4009..eea7afcb4b 100644 --- a/code/game/gamemodes/wizard/wizard.dm +++ b/code/game/gamemodes/wizard/wizard.dm @@ -6,6 +6,7 @@ name = "wizard" config_tag = "wizard" antag_flag = ROLE_WIZARD + false_report_weight = 10 required_players = 20 required_enemies = 1 recommended_enemies = 1 @@ -46,6 +47,10 @@ ..() return +/datum/game_mode/wizard/generate_report() + return "A dangerous Wizards' Federation individual by the name of [pick(GLOB.wizard_first)] [pick(GLOB.wizard_second)] has recently escaped confinement from an unlisted prison facility. This \ + man is a dangerous mutant with the ability to alter himself and the world around him by what he and his leaders believe to be magic. If this man attempts an attack on your station, \ + his execution is highly encouraged, as is the preservation of his body for later study." /datum/game_mode/proc/forge_wizard_objectives(datum/mind/wizard) switch(rand(1,100)) 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/camera.dm b/code/game/machinery/camera/camera.dm index d56837b9ef..bc6833f84a 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -47,7 +47,7 @@ GLOB.cameranet.addCamera(src) proximity_monitor = new(src, 1) - if(mapload && z == ZLEVEL_STATION && prob(3) && !start_active) + if(mapload && (z in GLOB.station_z_levels) && prob(3) && !start_active) toggle_cam() /obj/machinery/camera/Destroy() diff --git a/code/game/machinery/camera/presets.dm b/code/game/machinery/camera/presets.dm index 6f205a870d..864ab2bff2 100644 --- a/code/game/machinery/camera/presets.dm +++ b/code/game/machinery/camera/presets.dm @@ -24,7 +24,7 @@ name = "motion-sensitive security camera" /obj/machinery/camera/motion/Initialize() - ..() + . = ..() upgradeMotion() // ALL UPGRADES 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..033676264c 100644 --- a/code/game/machinery/computer/_computer.dm +++ b/code/game/machinery/computer/_computer.dm @@ -19,6 +19,10 @@ /obj/machinery/computer/Initialize(mapload, obj/item/circuitboard/C) . = ..() power_change() + if(!QDELETED(C)) + qdel(circuit) + circuit = C + C.forceMove(null) /obj/machinery/computer/Destroy() QDEL_NULL(circuit) @@ -90,6 +94,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/computer/apc_control.dm b/code/game/machinery/computer/apc_control.dm index 8b3e946501..c93c96429c 100644 --- a/code/game/machinery/computer/apc_control.dm +++ b/code/game/machinery/computer/apc_control.dm @@ -66,7 +66,7 @@ if(filters["Responsive"] && !APC.aidisabled) continue dat += "[A]
    \ - Charge: [APC.cell.charge] / [APC.cell.maxcharge] W ([round((APC.cell.charge / APC.cell.maxcharge) * 100)]%)
    \ + Charge: [DisplayPower(APC.cell.charge)] / [DisplayPower(APC.cell.maxcharge)] ([round((APC.cell.charge / APC.cell.maxcharge) * 100)]%)
    \ Area: [APC.area]
    \ [APC.aidisabled || APC.panel_open ? "APC does not respond to interface query." : "APC responds to interface query."]

    " dat += "Check Logs
    " diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index fa0008b51b..082f1aa895 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -414,8 +414,8 @@ if(gameStatus == ORION_STATUS_GAMEOVER) dat = "

    Game Over

    " dat += "Like many before you, your crew never made it to Orion, lost to space...
    Forever." - if(settlers.len == 0) - dat += "
    Your entire crew died, your ship joins the fleet of ghost-ships littering the galaxy." + if(!settlers.len) + dat += "
    Your entire crew died, and your ship joins the fleet of ghost-ships littering the galaxy." else if(food <= 0) dat += "
    You ran out of food and starved." @@ -429,7 +429,6 @@ M.adjust_fire_stacks(5) M.IgniteMob() //flew into a star, so you're on fire to_chat(user, "You feel an immense wave of heat emanate from the arcade machine. Your skin bursts into flames.") - dat += "

    OK...

    " if(emagged) to_chat(user, "You're never going to make it to Orion...") @@ -439,6 +438,7 @@ name = "The Orion Trail" desc = "Learn how our ancestors got to Orion, and have fun in the process!" + dat += "

    May They Rest In Peace

    " else if(event) dat = eventdat else if(gameStatus == ORION_STATUS_NORMAL) @@ -454,7 +454,7 @@ dat += "

    Go Around Continue

    " else dat += "

    Continue

    " - dat += "

    Kill a crewmember

    " + dat += "

    Kill a Crewmember

    " dat += "

    Close

    " else dat = "

    The Orion Trail

    " @@ -609,17 +609,15 @@ if(prob(75)) event = ORION_TRAIL_BLACKHOLE event() - if(emagged) //has to be here because otherwise it doesn't work + if(emagged) playsound(loc, 'sound/effects/supermatter.ogg', 100, 1) say("A miniature black hole suddenly appears in front of [src], devouring [usr] alive!") if(isliving(usr)) var/mob/living/L = usr L.Stun(200, ignore_canstun = TRUE) //you can't run :^) var/S = new /obj/singularity/academy(usr.loc) - emagged = FALSE //immediately removes emagged status so people can't kill themselves by sprinting up and interacting - sleep(50) - say("[S] winks out, just as suddenly as it appeared.") - qdel(S) + addtimer(CALLBACK(src, /atom/movable/proc/say, "[S] winks out, just as suddenly as it appeared."), 50) + QDEL_IN(src, 50) else event = null turns += 1 @@ -691,19 +689,20 @@ if(prob(success)) FU = rand(5,15) FO = rand(5,15) - last_spaceport_action = "You successfully raided the spaceport! you gained [FU] Fuel and [FO] Food! (+[FU]FU,+[FO]FO)" + last_spaceport_action = "You successfully raided the spaceport! You gained [FU] Fuel and [FO] Food! (+[FU]FU,+[FO]FO)" else FU = rand(-5,-15) FO = rand(-5,-15) - last_spaceport_action = "You failed to raid the spaceport! you lost [FU*-1] Fuel and [FO*-1] Food in your scramble to escape! ([FU]FU,[FO]FO)" + last_spaceport_action = "You failed to raid the spaceport! You lost [FU*-1] Fuel and [FO*-1] Food in your scramble to escape! ([FU]FU,[FO]FO)" //your chance of lose a crewmember is 1/2 your chance of success //this makes higher % failures hurt more, don't get cocky space cowboy! if(prob(success*5)) var/lost_crew = remove_crewmember() - last_spaceport_action = "You failed to raid the spaceport! you lost [FU*-1] Fuel and [FO*-1] Food, AND [lost_crew] in your scramble to escape! ([FU]FI,[FO]FO,-Crew)" + last_spaceport_action = "You failed to raid the spaceport! You lost [FU*-1] Fuel and [FO*-1] Food, AND [lost_crew] in your scramble to escape! ([FU]FI,[FO]FO,-Crew)" if(emagged) - say("WEEWOO WEEWOO, Spaceport Security en route!") + say("WEEWOO! WEEWOO! Spaceport security en route!") + playsound(src, 'sound/items/weeoo1.ogg', 100, FALSE) for(var/i, i<=3, i++) var/mob/living/simple_animal/hostile/syndicate/ranged/orion/O = new/mob/living/simple_animal/hostile/syndicate/ranged/orion(get_turf(src)) O.target = usr @@ -766,9 +765,9 @@ eventdat += "
    They have stolen [sfood] Food and [sfuel] Fuel." else if(prob(10)) var/deadname = remove_crewmember() - eventdat += "
    [deadname] tried to fight back but was killed." + eventdat += "
    [deadname] tried to fight back, but was killed." else - eventdat += "
    Fortunately you fended them off without any trouble." + eventdat += "
    Fortunately, you fended them off without any trouble." eventdat += "

    Continue

    " eventdat += "

    Close

    " canContinueEvent = 1 @@ -844,7 +843,7 @@ else if(prob(70)) lings_aboard = min(++lings_aboard,2) - eventdat += "

    Kill a crewmember

    " + eventdat += "

    Kill a Crewmember

    " eventdat += "

    Risk it

    " eventdat += "

    Close

    " canContinueEvent = 1 @@ -859,7 +858,7 @@ if(lings_aboard >= 2) ling2 = remove_crewmember() - eventdat += "Oh no, some of your crew are Changelings!" + eventdat += "Changelings among your crew suddenly burst from hiding and attack!" if(ling2) eventdat += "
    [ling1] and [ling2]'s arms twist and contort into grotesque blades!" else @@ -870,18 +869,23 @@ var/chancetokill = 30*lings_aboard-(5*alive) //eg: 30*2-(10) = 50%, 2 lings, 2 crew is 50% chance if(prob(chancetokill)) var/deadguy = remove_crewmember() - eventdat += "
    The Changeling[ling2 ? "s":""] run[ling2 ? "":"s"] up to [deadguy] and capitulates them!" + var/murder_text = pick("The changeling[ling2 ? "s" : ""] bring[ling2 ? "" : "s"] down [deadguy] and disembowel[ling2 ? "" : "s"] them in a spray of gore!", \ + "[ling2 ? pick(ling1, ling2) : ling1] corners [deadguy] and impales them through the stomach!", \ + "[ling2 ? pick(ling1, ling2) : ling1] decapitates [deadguy] in a single cleaving arc!") + eventdat += "
    [murder_text]" else - eventdat += "
    You valiantly fight off the Changeling[ling2 ? "s":""]!" - eventdat += "
    You cut the Changeling[ling2 ? "s":""] up into meat... Eww" + eventdat += "

    You valiantly fight off the changeling[ling2 ? "s":""]!" if(ling2) food += 30 lings_aboard = max(0,lings_aboard-2) else food += 15 lings_aboard = max(0,--lings_aboard) + eventdat += "
    Well, it's perfectly good food...\ +
    You cut the changeling[ling2 ? "s" : ""] into meat, gaining [ling2 ? "30" : "15"] Food!" else - eventdat += "
    The Changeling[ling2 ? "s":""] run[ling2 ? "":"s"] away, What wimps!" + eventdat += "

    [pick("Sensing unfavorable odds", "After a failed attack", "Suddenly breaking nerve")], \ + the changeling[ling2 ? "s":""] vanish[ling2 ? "" : "es"] into space through the airlocks! You're safe... for now." if(ling2) lings_aboard = max(0,lings_aboard-2) else @@ -895,17 +899,17 @@ if(ORION_TRAIL_SPACEPORT) gameStatus = ORION_STATUS_MARKET if(spaceport_raided) - eventdat += "The Spaceport is on high alert! They won't let you dock since you tried to attack them!" + eventdat += "The spaceport is on high alert! You've been barred from docking by the local authorities after your failed raid." if(last_spaceport_action) - eventdat += "
    Last Spaceport Action: [last_spaceport_action]" + eventdat += "
    Last Spaceport Action: [last_spaceport_action]" eventdat += "

    Depart Spaceport

    " eventdat += "

    Close

    " else - eventdat += "You pull the ship up to dock at a nearby Spaceport, lucky find!" - eventdat += "
    This Spaceport is home to travellers who failed to reach Orion, but managed to find a different home..." + eventdat += "Your jump into the sector yields a spaceport - a lucky find!" + eventdat += "
    This spaceport is home to travellers who failed to reach Orion, but managed to find a different home..." eventdat += "
    Trading terms: FU = Fuel, FO = Food" if(last_spaceport_action) - eventdat += "
    Last Spaceport Action: [last_spaceport_action]" + eventdat += "
    Last action: [last_spaceport_action]" eventdat += "

    Crew:

    " eventdat += english_list(settlers) eventdat += "
    Food: [food] | Fuel: [fuel]" @@ -926,7 +930,7 @@ add_crewmember() freecrew++ - eventdat += "
    The traders of the spaceport take pitty on you, and give you some food and fuel (+[FU]FU,+[FO]FO)" + eventdat += "
    The traders of the spaceport take pity on you, and generously give you some free supplies! (+[FU]FU, +[FO]FO)" if(freecrew) eventdat += "
    You also gain a new crewmember!" @@ -938,15 +942,15 @@ //Buy crew if(food >= 10 && fuel >= 10) - eventdat += "

    Hire a new Crewmember (-10FU,-10FO)

    " + eventdat += "

    Hire a New Crewmember (-10FU, -10FO)

    " else - eventdat += "

    Cant afford a new Crewmember

    " + eventdat += "

    You cannot afford a new crewmember.

    " //Sell crew if(settlers.len > 1) - eventdat += "

    Sell crew for Fuel and Food (+7FU,+7FO)

    " + eventdat += "

    Sell Crew for Fuel and Food (+7FU, +7FO)

    " else - eventdat += "

    Cant afford to sell a Crewmember

    " + eventdat += "

    You have no other crew to sell.

    " //BUY/SELL STUFF eventdat += "

    Spare Parts:

    " @@ -955,30 +959,30 @@ if(fuel > 5) eventdat += "

    Buy Engine Parts (-5FU)

    " else - eventdat += "

    Cant afford to buy Engine Parts" + eventdat += "

    You cannot afford engine parts." //Hull plates if(fuel > 5) eventdat += "

    Buy Hull Plates (-5FU)

    " else - eventdat += "

    Cant afford to buy Hull Plates" + eventdat += "

    You cannot afford hull plates." //Electronics if(fuel > 5) eventdat += "

    Buy Spare Electronics (-5FU)

    " else - eventdat += "

    Cant afford to buy Spare Electronics" + eventdat += "

    You cannot afford spare electronics." //Trade if(fuel > 5) eventdat += "

    Trade Fuel for Food (-5FU,+5FO)

    " else - eventdat += "

    Cant afford to Trade Fuel for Food 5) eventdat += "

    Trade Food for Fuel (+5FU,-5FO)

    " else - eventdat += "

    Cant afford to Trade Food for FuelNo machinery detected.") - var/S = input("Select the device set: ", "Selection", IO[1]) as anything in IO - if(src) - src.input_tag = "[S]_in" - src.output_tag = "[S]_out" - name = "[uppertext(S)] Supply Control" - var/list/new_devices = freq.devices["4"] - for(var/obj/machinery/air_sensor/U in new_devices) - var/list/text = splittext(U.id_tag, "_") - if(text[1] == S) - sensors = list("[S]_sensor" = "Tank") - break - - for(var/obj/machinery/atmospherics/components/unary/outlet_injector/U in devices) - U.broadcast_status() - for(var/obj/machinery/atmospherics/components/unary/vent_pump/U in devices) - U.broadcast_status() - + 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, "atmos_control", name, 400, 925, master_ui, state) + ui.open() + +/obj/machinery/computer/atmos_control/ui_data(mob/user) + var/data = list() + + data["sensors"] = list() + for(var/id_tag in sensors) + var/long_name = sensors[id_tag] + var/list/info = sensor_information[id_tag] + if(!info) + continue + data["sensors"] += list(list( + "id_tag" = id_tag, + "long_name" = sanitize(long_name), + "pressure" = info["pressure"], + "temperature" = info["temperature"], + "gases" = info["gases"] + )) + return data + +/obj/machinery/computer/atmos_control/receive_signal(datum/signal/signal) + if(!signal || signal.encryption) + return + + var/id_tag = signal.data["id_tag"] + if(!id_tag || !sensors.Find(id_tag)) + return + + sensor_information[id_tag] = signal.data + +/obj/machinery/computer/atmos_control/proc/set_frequency(new_frequency) + SSradio.remove_object(src, frequency) + frequency = new_frequency + radio_connection = SSradio.add_object(src, frequency, GLOB.RADIO_ATMOSIA) + +///////////////////////////////////////////////////////////// +// LARGE TANK CONTROL +///////////////////////////////////////////////////////////// + +/obj/machinery/computer/atmos_control/tank + var/input_tag + var/output_tag + frequency = 1441 + circuit = /obj/item/circuitboard/computer/atmos_control/tank + + var/list/input_info + var/list/output_info + +// This hacky madness is the evidence of the fact that a lot of machines were never meant to be constructable, im so sorry you had to see this +/obj/machinery/computer/atmos_control/tank/proc/reconnect(mob/user) + var/list/IO = list() + var/datum/radio_frequency/freq = SSradio.return_frequency(1441) + var/list/devices = freq.devices["_default"] + for(var/obj/machinery/atmospherics/components/unary/vent_pump/U in devices) + var/list/text = splittext(U.id_tag, "_") + IO |= text[1] + for(var/obj/machinery/atmospherics/components/unary/outlet_injector/U in devices) + var/list/text = splittext(U.id, "_") + IO |= text[1] + if(!IO.len) + to_chat(user, "No machinery detected.") + var/S = input("Select the device set: ", "Selection", IO[1]) as anything in IO + if(src) + src.input_tag = "[S]_in" + src.output_tag = "[S]_out" + name = "[uppertext(S)] Supply Control" + var/list/new_devices = freq.devices["4"] + for(var/obj/machinery/air_sensor/U in new_devices) + var/list/text = splittext(U.id_tag, "_") + if(text[1] == S) + sensors = list("[S]_sensor" = "Tank") + break + + for(var/obj/machinery/atmospherics/components/unary/outlet_injector/U in devices) + U.broadcast_status() + for(var/obj/machinery/atmospherics/components/unary/vent_pump/U in devices) + U.broadcast_status() + /obj/machinery/computer/atmos_control/tank/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, "atmos_control", name, 500, 305, master_ui, state) - ui.open() - -/obj/machinery/computer/atmos_control/tank/ui_data(mob/user) - var/list/data = ..() - data["tank"] = TRUE - data["inputting"] = input_info ? input_info["power"] : FALSE - data["inputRate"] = input_info ? input_info["volume_rate"] : 0 - data["outputting"] = output_info ? output_info["power"] : FALSE - data["outputPressure"] = output_info ? output_info["internal"] : 0 - - return data - -/obj/machinery/computer/atmos_control/tank/ui_act(action, params) - if(..() || !radio_connection) - return - var/datum/signal/signal = new - signal.transmission_method = 1 - signal.source = src - signal.data = list("sigtype" = "command") - switch(action) - if("reconnect") - reconnect(usr) - . = TRUE - if("input") - signal.data += list("tag" = input_tag, "power_toggle" = TRUE) - . = TRUE - if("output") - signal.data += list("tag" = output_tag, "power_toggle" = TRUE) - . = TRUE - if("pressure") - var/target = input("New target pressure:", name, output_info ? output_info["internal"] : 0) as num|null - if(!isnull(target) && !..()) - target = Clamp(target, 0, 50 * ONE_ATMOSPHERE) - signal.data += list("tag" = output_tag, "set_internal_pressure" = target) - . = TRUE - radio_connection.post_signal(src, signal, filter = GLOB.RADIO_ATMOSIA) - -/obj/machinery/computer/atmos_control/tank/receive_signal(datum/signal/signal) - if(!signal || signal.encryption) - return - - var/id_tag = signal.data["tag"] - - if(input_tag == id_tag) - input_info = signal.data - else if(output_tag == id_tag) - output_info = signal.data - else - ..(signal) + 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, "atmos_control", name, 500, 305, master_ui, state) + ui.open() + +/obj/machinery/computer/atmos_control/tank/ui_data(mob/user) + var/list/data = ..() + data["tank"] = TRUE + data["inputting"] = input_info ? input_info["power"] : FALSE + data["inputRate"] = input_info ? input_info["volume_rate"] : 0 + data["outputting"] = output_info ? output_info["power"] : FALSE + data["outputPressure"] = output_info ? output_info["internal"] : 0 + + return data + +/obj/machinery/computer/atmos_control/tank/ui_act(action, params) + if(..() || !radio_connection) + return + var/datum/signal/signal = new + signal.transmission_method = 1 + signal.source = src + signal.data = list("sigtype" = "command") + switch(action) + if("reconnect") + reconnect(usr) + . = TRUE + if("input") + signal.data += list("tag" = input_tag, "power_toggle" = TRUE) + . = TRUE + if("output") + signal.data += list("tag" = output_tag, "power_toggle" = TRUE) + . = TRUE + if("pressure") + var/target = input("New target pressure:", name, output_info ? output_info["internal"] : 0) as num|null + if(!isnull(target) && !..()) + target = Clamp(target, 0, 50 * ONE_ATMOSPHERE) + signal.data += list("tag" = output_tag, "set_internal_pressure" = target) + . = TRUE + radio_connection.post_signal(src, signal, filter = GLOB.RADIO_ATMOSIA) + +/obj/machinery/computer/atmos_control/tank/receive_signal(datum/signal/signal) + if(!signal || signal.encryption) + return + + var/id_tag = signal.data["tag"] + + if(input_tag == id_tag) + input_info = signal.data + else if(output_tag == id_tag) + output_info = signal.data + else + ..(signal) diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index d774eff0e0..0548d94f3d 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -1,604 +1,604 @@ - - -//Keeps track of the time for the ID console. Having it as a global variable prevents people from dismantling/reassembling it to -//increase the slots of many jobs. -GLOBAL_VAR_INIT(time_last_changed_position, 0) - -/obj/machinery/computer/card - name = "identification console" - desc = "You can use this to manage jobs and ID access." - icon_screen = "id" - icon_keyboard = "id_key" + + +//Keeps track of the time for the ID console. Having it as a global variable prevents people from dismantling/reassembling it to +//increase the slots of many jobs. +GLOBAL_VAR_INIT(time_last_changed_position, 0) + +/obj/machinery/computer/card + name = "identification console" + desc = "You can use this to manage jobs and ID access." + icon_screen = "id" + icon_keyboard = "id_key" req_one_access = list(ACCESS_HEADS, ACCESS_CHANGE_IDS) - circuit = /obj/item/circuitboard/computer/card - var/obj/item/card/id/scan = null - var/obj/item/card/id/modify = null - var/authenticated = 0 - var/mode = 0 - var/printing = null - var/list/region_access = null - var/list/head_subordinates = null - var/target_dept = 0 //Which department this computer has access to. 0=all departments - var/prioritycount = 0 // we don't want 500 prioritized jobs - - //Cooldown for closing positions in seconds - //if set to -1: No cooldown... probably a bad idea - //if set to 0: Not able to close "original" positions. You can only close positions that you have opened before - var/change_position_cooldown = 30 - //Jobs you cannot open new positions for - var/list/blacklisted = list( - "AI", - "Assistant", - "Cyborg", - "Captain", - "Head of Personnel", - "Head of Security", - "Chief Engineer", - "Research Director", - "Chief Medical Officer") - - //The scaling factor of max total positions in relation to the total amount of people on board the station in % - var/max_relative_positions = 30 //30%: Seems reasonable, limit of 6 @ 20 players - - //This is used to keep track of opened positions for jobs to allow instant closing - //Assoc array: "JobName" = (int) - var/list/opened_positions = list(); - - light_color = LIGHT_COLOR_BLUE - -/obj/machinery/computer/card/Initialize() - . = ..() - change_position_cooldown = config.id_console_jobslot_delay - -/obj/machinery/computer/card/attackby(obj/O, mob/user, params)//TODO:SANITY - if(istype(O, /obj/item/card/id)) - var/obj/item/card/id/idcard = O - if(check_access(idcard)) - if(!scan) - if(!usr.drop_item()) - return - idcard.loc = src - scan = idcard - playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0) - else if(!modify) - if(!usr.drop_item()) - return - idcard.loc = src - modify = idcard - playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0) - else - if(!modify) - if(!usr.drop_item()) - return - idcard.loc = src - modify = idcard - playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0) - else - return ..() - -/obj/machinery/computer/card/Destroy() - if(scan) - qdel(scan) - scan = null - if(modify) - qdel(modify) - modify = null - return ..() - -/obj/machinery/computer/card/handle_atom_del(atom/A) - ..() - if(A == scan) - scan = null - updateUsrDialog() - if(A == modify) - modify = null - updateUsrDialog() - -/obj/machinery/computer/card/on_deconstruction() - if(scan) - scan.forceMove(loc) - scan = null - if(modify) - modify.forceMove(loc) - modify = null - -//Check if you can't open a new position for a certain job -/obj/machinery/computer/card/proc/job_blacklisted(jobtitle) - return (jobtitle in blacklisted) - - -//Logic check for Topic() if you can open the job -/obj/machinery/computer/card/proc/can_open_job(datum/job/job) - if(job) - if(!job_blacklisted(job.title)) - if((job.total_positions <= GLOB.player_list.len * (max_relative_positions / 100))) - var/delta = (world.time / 10) - GLOB.time_last_changed_position - if((change_position_cooldown < delta) || (opened_positions[job.title] < 0)) - return 1 - return -2 - return -1 - return 0 - -//Logic check for Topic() if you can close the job -/obj/machinery/computer/card/proc/can_close_job(datum/job/job) - if(job) - if(!job_blacklisted(job.title)) - if(job.total_positions > job.current_positions) - var/delta = (world.time / 10) - GLOB.time_last_changed_position - if((change_position_cooldown < delta) || (opened_positions[job.title] > 0)) - return 1 - return -2 - return -1 - return 0 - -/obj/machinery/computer/card/attack_hand(mob/user) - if(..()) - return - - user.set_machine(src) - var/dat - if(!SSticker) - return - if (mode == 1) // accessing crew manifest - var/crew = "" - for(var/datum/data/record/t in sortRecord(GLOB.data_core.general)) - crew += t.fields["name"] + " - " + t.fields["rank"] + "
    " - dat = "Crew Manifest:
    Please use security record computer to modify entries.

    [crew]Print

    Access ID modification console.
    " - - else if(mode == 2) - // JOB MANAGEMENT - dat = "Return" - dat += " || Confirm Identity: " - var/S - if(scan) - S = html_encode(scan.name) - else - S = "--------" - dat += "[S]" - dat += "" - dat += "" - var/ID + circuit = /obj/item/circuitboard/computer/card + var/obj/item/card/id/scan = null + var/obj/item/card/id/modify = null + var/authenticated = 0 + var/mode = 0 + var/printing = null + var/list/region_access = null + var/list/head_subordinates = null + var/target_dept = 0 //Which department this computer has access to. 0=all departments + + //Cooldown for closing positions in seconds + //if set to -1: No cooldown... probably a bad idea + //if set to 0: Not able to close "original" positions. You can only close positions that you have opened before + var/change_position_cooldown = 30 + //Jobs you cannot open new positions for + var/list/blacklisted = list( + "AI", + "Assistant", + "Cyborg", + "Captain", + "Head of Personnel", + "Head of Security", + "Chief Engineer", + "Research Director", + "Chief Medical Officer") + + //The scaling factor of max total positions in relation to the total amount of people on board the station in % + var/max_relative_positions = 30 //30%: Seems reasonable, limit of 6 @ 20 players + + //This is used to keep track of opened positions for jobs to allow instant closing + //Assoc array: "JobName" = (int) + var/list/opened_positions = list(); + + light_color = LIGHT_COLOR_BLUE + +/obj/machinery/computer/card/Initialize() + . = ..() + change_position_cooldown = config.id_console_jobslot_delay + +/obj/machinery/computer/card/attackby(obj/O, mob/user, params)//TODO:SANITY + if(istype(O, /obj/item/card/id)) + var/obj/item/card/id/idcard = O + if(check_access(idcard)) + if(!scan) + if(!usr.drop_item()) + return + idcard.loc = src + scan = idcard + playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0) + else if(!modify) + if(!usr.drop_item()) + return + idcard.loc = src + modify = idcard + playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0) + else + if(!modify) + if(!usr.drop_item()) + return + idcard.loc = src + modify = idcard + playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0) + else + return ..() + +/obj/machinery/computer/card/Destroy() + if(scan) + qdel(scan) + scan = null + if(modify) + qdel(modify) + modify = null + return ..() + +/obj/machinery/computer/card/handle_atom_del(atom/A) + ..() + if(A == scan) + scan = null + updateUsrDialog() + if(A == modify) + modify = null + updateUsrDialog() + +/obj/machinery/computer/card/on_deconstruction() + if(scan) + scan.forceMove(loc) + scan = null + if(modify) + modify.forceMove(loc) + modify = null + +//Check if you can't open a new position for a certain job +/obj/machinery/computer/card/proc/job_blacklisted(jobtitle) + return (jobtitle in blacklisted) + + +//Logic check for Topic() if you can open the job +/obj/machinery/computer/card/proc/can_open_job(datum/job/job) + if(job) + if(!job_blacklisted(job.title)) + if((job.total_positions <= GLOB.player_list.len * (max_relative_positions / 100))) + var/delta = (world.time / 10) - GLOB.time_last_changed_position + if((change_position_cooldown < delta) || (opened_positions[job.title] < 0)) + return 1 + return -2 + return -1 + return 0 + +//Logic check for Topic() if you can close the job +/obj/machinery/computer/card/proc/can_close_job(datum/job/job) + if(job) + if(!job_blacklisted(job.title)) + if(job.total_positions > job.current_positions) + var/delta = (world.time / 10) - GLOB.time_last_changed_position + if((change_position_cooldown < delta) || (opened_positions[job.title] > 0)) + return 1 + return -2 + return -1 + return 0 + +/obj/machinery/computer/card/attack_hand(mob/user) + if(..()) + return + + user.set_machine(src) + var/dat + if(!SSticker) + return + if (mode == 1) // accessing crew manifest + var/crew = "" + for(var/datum/data/record/t in sortRecord(GLOB.data_core.general)) + crew += t.fields["name"] + " - " + t.fields["rank"] + "
    " + dat = "Crew Manifest:
    Please use security record computer to modify entries.

    [crew]Print

    Access ID modification console.
    " + + else if(mode == 2) + // JOB MANAGEMENT + dat = "Return" + dat += " || Confirm Identity: " + var/S + if(scan) + S = html_encode(scan.name) + else + S = "--------" + dat += "[S]" + dat += "
    JobSlotsOpen jobClose jobPrioritize
    " + dat += "" + var/ID if(scan && (ACCESS_CHANGE_IDS in scan.access) && !target_dept) - ID = 1 - else - ID = 0 - for(var/datum/job/job in SSjob.occupations) - dat += "" - if(job.title in blacklisted) - continue - dat += "" - dat += "" - dat += "" - dat += "
    JobSlotsOpen jobClose jobPrioritize
    [job.title][job.current_positions]/[job.total_positions]" - switch(can_open_job(job)) - if(1) - if(ID) - dat += "Open Position
    " - else - dat += "Open Position" - if(-1) - dat += "Denied" - if(-2) - var/time_to_wait = round(change_position_cooldown - ((world.time / 10) - GLOB.time_last_changed_position), 1) - var/mins = round(time_to_wait / 60) - var/seconds = time_to_wait - (60*mins) - dat += "Cooldown ongoing: [mins]:[(seconds < 10) ? "0[seconds]" : "[seconds]"]" - if(0) - dat += "Denied" - dat += "
    " - switch(can_close_job(job)) - if(1) - if(ID) - dat += "Close Position" - else - dat += "Close Position" - if(-1) - dat += "Denied" - if(-2) - var/time_to_wait = round(change_position_cooldown - ((world.time / 10) - GLOB.time_last_changed_position), 1) - var/mins = round(time_to_wait / 60) - var/seconds = time_to_wait - (60*mins) - dat += "Cooldown ongoing: [mins]:[(seconds < 10) ? "0[seconds]" : "[seconds]"]" - if(0) - dat += "Denied" - dat += "" - switch(job.total_positions) - if(0) - dat += "Denied" - else - if(ID) - if(job in SSjob.prioritized_jobs) - dat += "Deprioritize" - else - if(prioritycount < 5) - dat += "Prioritize" - else - dat += "Denied" - else - dat += "Prioritize" - - dat += "
    " - else - var/header = "" - - var/target_name - var/target_owner - var/target_rank - if(modify) - target_name = html_encode(modify.name) - else - target_name = "--------" - if(modify && modify.registered_name) - target_owner = html_encode(modify.registered_name) - else - target_owner = "--------" - if(modify && modify.assignment) - target_rank = html_encode(modify.assignment) - else - target_rank = "Unassigned" - - var/scan_name - if(scan) - scan_name = html_encode(scan.name) - else - scan_name = "--------" - - if(!authenticated) - header += "
    Please insert the cards into the slots
    " - header += "Target: [target_name]
    " - header += "Confirm Identity: [scan_name]
    " - else - header += "


    " - header += "Remove [target_name] || " - header += "Remove [scan_name]
    " - header += "Access Crew Manifest
    " - header += "Log Out
    " - - header += "
    " - - var/jobs_all = "" - var/list/alljobs = list("Unassigned") + ID = 1 + else + ID = 0 + for(var/datum/job/job in SSjob.occupations) + dat += "" + if(job.title in blacklisted) + continue + dat += "[job.title]" + dat += "[job.current_positions]/[job.total_positions]" + dat += "" + switch(can_open_job(job)) + if(1) + if(ID) + dat += "Open Position
    " + else + dat += "Open Position" + if(-1) + dat += "Denied" + if(-2) + var/time_to_wait = round(change_position_cooldown - ((world.time / 10) - GLOB.time_last_changed_position), 1) + var/mins = round(time_to_wait / 60) + var/seconds = time_to_wait - (60*mins) + dat += "Cooldown ongoing: [mins]:[(seconds < 10) ? "0[seconds]" : "[seconds]"]" + if(0) + dat += "Denied" + dat += "" + switch(can_close_job(job)) + if(1) + if(ID) + dat += "Close Position" + else + dat += "Close Position" + if(-1) + dat += "Denied" + if(-2) + var/time_to_wait = round(change_position_cooldown - ((world.time / 10) - GLOB.time_last_changed_position), 1) + var/mins = round(time_to_wait / 60) + var/seconds = time_to_wait - (60*mins) + dat += "Cooldown ongoing: [mins]:[(seconds < 10) ? "0[seconds]" : "[seconds]"]" + if(0) + dat += "Denied" + dat += "" + switch(job.total_positions) + if(0) + dat += "Denied" + else + if(ID) + if(job in SSjob.prioritized_jobs) + dat += "Deprioritize" + else + if(SSjob.prioritized_jobs.len < 5) + dat += "Prioritize" + else + dat += "Denied" + else + dat += "Prioritize" + + dat += "" + dat += "" + else + var/header = "" + + var/target_name + var/target_owner + var/target_rank + if(modify) + target_name = html_encode(modify.name) + else + target_name = "--------" + if(modify && modify.registered_name) + target_owner = html_encode(modify.registered_name) + else + target_owner = "--------" + if(modify && modify.assignment) + target_rank = html_encode(modify.assignment) + else + target_rank = "Unassigned" + + var/scan_name + if(scan) + scan_name = html_encode(scan.name) + else + scan_name = "--------" + + if(!authenticated) + header += "
    Please insert the cards into the slots
    " + header += "Target: [target_name]
    " + header += "Confirm Identity: [scan_name]
    " + else + header += "

    " + header += "Remove [target_name] || " + header += "Remove [scan_name]
    " + header += "Access Crew Manifest
    " + header += "Log Out
    " + + header += "
    " + + var/jobs_all = "" + var/list/alljobs = list("Unassigned") alljobs += (istype(src, /obj/machinery/computer/card/centcom)? get_all_centcom_jobs() : get_all_jobs()) + "Custom" - for(var/job in alljobs) - jobs_all += "[replacetext(job, " ", " ")] " //make sure there isn't a line break in the middle of a job - - - var/body - - if (authenticated && modify) - - var/carddesc = text("") - var/jobs = text("") - if( authenticated == 2) - carddesc += {""} - carddesc += "
    " - carddesc += "" - carddesc += "" - carddesc += "registered name: " - carddesc += "" - carddesc += "
    " - carddesc += "Assignment: " - - jobs += "[target_rank]" //CHECK THIS - - else - carddesc += "registered_name: [target_owner]
    " - jobs += "Assignment: [target_rank] (Demote)
    " - - var/accesses = "" + for(var/job in alljobs) + jobs_all += "[replacetext(job, " ", " ")] " //make sure there isn't a line break in the middle of a job + + + var/body + + if (authenticated && modify) + + var/carddesc = text("") + var/jobs = text("") + if( authenticated == 2) + carddesc += {""} + carddesc += "
    " + carddesc += "" + carddesc += "" + carddesc += "registered name: " + carddesc += "" + carddesc += "
    " + carddesc += "Assignment: " + + jobs += "[target_rank]" //CHECK THIS + + else + carddesc += "registered_name: [target_owner]
    " + jobs += "Assignment: [target_rank] (Demote)
    " + + var/accesses = "" if(istype(src, /obj/machinery/computer/card/centcom)) - accesses += "
    Central Command:
    " - for(var/A in get_all_centcom_access()) - if(A in modify.access) - accesses += "[replacetext(get_centcom_access_desc(A), " ", " ")] " - else - accesses += "[replacetext(get_centcom_access_desc(A), " ", " ")] " - else - accesses += "
    Access
    " - accesses += "" - accesses += "" - for(var/i = 1; i <= 7; i++) - if(authenticated == 1 && !(i in region_access)) - continue - accesses += "" - accesses += "" - for(var/i = 1; i <= 7; i++) - if(authenticated == 1 && !(i in region_access)) - continue - accesses += "" - accesses += "
    [get_region_accesses_name(i)]:
    " - for(var/A in get_region_accesses(i)) - if(A in modify.access) - accesses += "[replacetext(get_access_desc(A), " ", " ")] " - else - accesses += "[replacetext(get_access_desc(A), " ", " ")] " - accesses += "
    " - accesses += "
    " - body = "[carddesc]
    [jobs]

    [accesses]" //CHECK THIS - - else - body = "{Log in}

    " - body += "Access Crew Manifest" - if(!target_dept) - body += "

    Job Management" - - dat = "[header][body]

    " - var/datum/browser/popup = new(user, "id_com", src.name, 900, 620) - popup.set_content(dat) - popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) - popup.open() - return - - -/obj/machinery/computer/card/Topic(href, href_list) - if(..()) - return - usr.set_machine(src) - switch(href_list["choice"]) - if ("modify") - if (modify) - GLOB.data_core.manifest_modify(modify.registered_name, modify.assignment) - modify.update_label() - modify.loc = loc - modify.verb_pickup() - playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0) - modify = null - region_access = null - head_subordinates = null - else - var/obj/item/I = usr.get_active_held_item() - if (istype(I, /obj/item/card/id)) - if(!usr.drop_item()) - return - playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0) - I.loc = src - modify = I - authenticated = 0 - - if ("scan") - if (scan) - scan.loc = src.loc - scan.verb_pickup() - playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0) - scan = null - else - var/obj/item/I = usr.get_active_held_item() - if (istype(I, /obj/item/card/id)) - if(!usr.drop_item()) - return - playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0) - I.loc = src - scan = I - authenticated = 0 - if ("auth") - if ((!( authenticated ) && (scan || issilicon(usr)) && (modify || mode))) - if (check_access(scan)) - region_access = list() - head_subordinates = list() + accesses += "
    Central Command:
    " + for(var/A in get_all_centcom_access()) + if(A in modify.access) + accesses += "[replacetext(get_centcom_access_desc(A), " ", " ")] " + else + accesses += "[replacetext(get_centcom_access_desc(A), " ", " ")] " + else + accesses += "
    Access
    " + accesses += "" + accesses += "" + for(var/i = 1; i <= 7; i++) + if(authenticated == 1 && !(i in region_access)) + continue + accesses += "" + accesses += "" + for(var/i = 1; i <= 7; i++) + if(authenticated == 1 && !(i in region_access)) + continue + accesses += "" + accesses += "
    [get_region_accesses_name(i)]:
    " + for(var/A in get_region_accesses(i)) + if(A in modify.access) + accesses += "[replacetext(get_access_desc(A), " ", " ")] " + else + accesses += "[replacetext(get_access_desc(A), " ", " ")] " + accesses += "
    " + accesses += "
    " + body = "[carddesc]
    [jobs]

    [accesses]" //CHECK THIS + + else + body = "{Log in}

    " + body += "Access Crew Manifest" + if(!target_dept) + body += "

    Job Management" + + dat = "[header][body]

    " + var/datum/browser/popup = new(user, "id_com", src.name, 900, 620) + popup.set_content(dat) + popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) + popup.open() + return + + +/obj/machinery/computer/card/Topic(href, href_list) + if(..()) + return + usr.set_machine(src) + switch(href_list["choice"]) + if ("modify") + if (modify) + GLOB.data_core.manifest_modify(modify.registered_name, modify.assignment) + modify.update_label() + modify.loc = loc + modify.verb_pickup() + playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0) + modify = null + region_access = null + head_subordinates = null + else + var/obj/item/I = usr.get_active_held_item() + if (istype(I, /obj/item/card/id)) + if(!usr.drop_item()) + return + playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0) + I.loc = src + modify = I + authenticated = 0 + + if ("scan") + if (scan) + scan.loc = src.loc + scan.verb_pickup() + playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0) + scan = null + else + var/obj/item/I = usr.get_active_held_item() + if (istype(I, /obj/item/card/id)) + if(!usr.drop_item()) + return + playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0) + I.loc = src + scan = I + authenticated = 0 + if ("auth") + if ((!( authenticated ) && (scan || issilicon(usr)) && (modify || mode))) + if (check_access(scan)) + region_access = list() + head_subordinates = list() if(ACCESS_CHANGE_IDS in scan.access) - if(target_dept) - head_subordinates = get_all_jobs() - region_access |= target_dept - authenticated = 1 - else - authenticated = 2 - playsound(src, 'sound/machines/terminal_on.ogg', 50, 0) - - else + if(target_dept) + head_subordinates = get_all_jobs() + region_access |= target_dept + authenticated = 1 + else + authenticated = 2 + playsound(src, 'sound/machines/terminal_on.ogg', 50, 0) + + else if((ACCESS_HOP in scan.access) && ((target_dept==1) || !target_dept)) - region_access |= 1 - region_access |= 6 - get_subordinates("Head of Personnel") + region_access |= 1 + region_access |= 6 + get_subordinates("Head of Personnel") if((ACCESS_HOS in scan.access) && ((target_dept==2) || !target_dept)) - region_access |= 2 - get_subordinates("Head of Security") + region_access |= 2 + get_subordinates("Head of Security") if((ACCESS_CMO in scan.access) && ((target_dept==3) || !target_dept)) - region_access |= 3 - get_subordinates("Chief Medical Officer") + region_access |= 3 + get_subordinates("Chief Medical Officer") if((ACCESS_RD in scan.access) && ((target_dept==4) || !target_dept)) - region_access |= 4 - get_subordinates("Research Director") + region_access |= 4 + get_subordinates("Research Director") if((ACCESS_CE in scan.access) && ((target_dept==5) || !target_dept)) - region_access |= 5 - get_subordinates("Chief Engineer") - if(region_access) - authenticated = 1 - else if ((!( authenticated ) && issilicon(usr)) && (!modify)) - to_chat(usr, "You can't modify an ID without an ID inserted to modify! Once one is in the modify slot on the computer, you can log in.") - if ("logout") - region_access = null - head_subordinates = null - authenticated = 0 - playsound(src, 'sound/machines/terminal_off.ogg', 50, 0) - - if("access") - if(href_list["allowed"]) - if(authenticated) - var/access_type = text2num(href_list["access_target"]) - var/access_allowed = text2num(href_list["allowed"]) + region_access |= 5 + get_subordinates("Chief Engineer") + if(region_access) + authenticated = 1 + else if ((!( authenticated ) && issilicon(usr)) && (!modify)) + to_chat(usr, "You can't modify an ID without an ID inserted to modify! Once one is in the modify slot on the computer, you can log in.") + if ("logout") + region_access = null + head_subordinates = null + authenticated = 0 + playsound(src, 'sound/machines/terminal_off.ogg', 50, 0) + + if("access") + if(href_list["allowed"]) + if(authenticated) + var/access_type = text2num(href_list["access_target"]) + var/access_allowed = text2num(href_list["allowed"]) if(access_type in (istype(src, /obj/machinery/computer/card/centcom)?get_all_centcom_access() : get_all_accesses())) - modify.access -= access_type - if(access_allowed == 1) - modify.access += access_type - playsound(src, "terminal_type", 50, 0) - if ("assign") - if (authenticated == 2) - var/t1 = href_list["assign_target"] - if(t1 == "Custom") - var/newJob = reject_bad_text(input("Enter a custom job assignment.", "Assignment", modify ? modify.assignment : "Unassigned"), MAX_NAME_LEN) - if(newJob) - t1 = newJob - - else if(t1 == "Unassigned") - modify.access -= get_all_accesses() - - else - var/datum/job/jobdatum - for(var/jobtype in typesof(/datum/job)) - var/datum/job/J = new jobtype - if(ckey(J.title) == ckey(t1)) - jobdatum = J - break - if(!jobdatum) - to_chat(usr, "No log exists for this job.") - return - + modify.access -= access_type + if(access_allowed == 1) + modify.access += access_type + playsound(src, "terminal_type", 50, 0) + if ("assign") + if (authenticated == 2) + var/t1 = href_list["assign_target"] + if(t1 == "Custom") + var/newJob = reject_bad_text(input("Enter a custom job assignment.", "Assignment", modify ? modify.assignment : "Unassigned"), MAX_NAME_LEN) + if(newJob) + t1 = newJob + + else if(t1 == "Unassigned") + modify.access -= get_all_accesses() + + else + var/datum/job/jobdatum + for(var/jobtype in typesof(/datum/job)) + var/datum/job/J = new jobtype + if(ckey(J.title) == ckey(t1)) + jobdatum = J + break + if(!jobdatum) + to_chat(usr, "No log exists for this job.") + return + modify.access = ( istype(src, /obj/machinery/computer/card/centcom) ? get_centcom_access(t1) : jobdatum.get_access() ) - if (modify) - modify.assignment = t1 - playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0) - if ("demote") - if(modify.assignment in head_subordinates || modify.assignment == "Assistant") - modify.assignment = "Unassigned" - playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0) - else - to_chat(usr, "You are not authorized to demote this position.") - if ("reg") - if (authenticated) - var/t2 = modify - if ((authenticated && modify == t2 && (in_range(src, usr) || issilicon(usr)) && isturf(loc))) - var/newName = reject_bad_name(href_list["reg"]) - if(newName) - modify.registered_name = newName - playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0) - else - to_chat(usr, "Invalid name entered.") - return - if ("mode") - mode = text2num(href_list["mode_target"]) - - if("return") - //DISPLAY MAIN MENU - mode = 3; - playsound(src, "terminal_type", 25, 0) - - if("make_job_available") - // MAKE ANOTHER JOB POSITION AVAILABLE FOR LATE JOINERS + if (modify) + modify.assignment = t1 + playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0) + if ("demote") + if(modify.assignment in head_subordinates || modify.assignment == "Assistant") + modify.assignment = "Unassigned" + playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0) + else + to_chat(usr, "You are not authorized to demote this position.") + if ("reg") + if (authenticated) + var/t2 = modify + if ((authenticated && modify == t2 && (in_range(src, usr) || issilicon(usr)) && isturf(loc))) + var/newName = reject_bad_name(href_list["reg"]) + if(newName) + modify.registered_name = newName + playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0) + else + to_chat(usr, "Invalid name entered.") + return + if ("mode") + mode = text2num(href_list["mode_target"]) + + if("return") + //DISPLAY MAIN MENU + mode = 3; + playsound(src, "terminal_type", 25, 0) + + if("make_job_available") + // MAKE ANOTHER JOB POSITION AVAILABLE FOR LATE JOINERS if(scan && (ACCESS_CHANGE_IDS in scan.access) && !target_dept) - var/edit_job_target = href_list["job"] - var/datum/job/j = SSjob.GetJob(edit_job_target) - if(!j) - return 0 - if(can_open_job(j) != 1) - return 0 - if(opened_positions[edit_job_target] >= 0) - GLOB.time_last_changed_position = world.time / 10 - j.total_positions++ - opened_positions[edit_job_target]++ - playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0) - - if("make_job_unavailable") - // MAKE JOB POSITION UNAVAILABLE FOR LATE JOINERS + var/edit_job_target = href_list["job"] + var/datum/job/j = SSjob.GetJob(edit_job_target) + if(!j) + return 0 + if(can_open_job(j) != 1) + return 0 + if(opened_positions[edit_job_target] >= 0) + GLOB.time_last_changed_position = world.time / 10 + j.total_positions++ + opened_positions[edit_job_target]++ + playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0) + + if("make_job_unavailable") + // MAKE JOB POSITION UNAVAILABLE FOR LATE JOINERS if(scan && (ACCESS_CHANGE_IDS in scan.access) && !target_dept) - var/edit_job_target = href_list["job"] - var/datum/job/j = SSjob.GetJob(edit_job_target) - if(!j) - return 0 - if(can_close_job(j) != 1) - return 0 - //Allow instant closing without cooldown if a position has been opened before - if(opened_positions[edit_job_target] <= 0) - GLOB.time_last_changed_position = world.time / 10 - j.total_positions-- - opened_positions[edit_job_target]-- - playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0) - - if ("prioritize_job") - // TOGGLE WHETHER JOB APPEARS AS PRIORITIZED IN THE LOBBY + var/edit_job_target = href_list["job"] + var/datum/job/j = SSjob.GetJob(edit_job_target) + if(!j) + return 0 + if(can_close_job(j) != 1) + return 0 + //Allow instant closing without cooldown if a position has been opened before + if(opened_positions[edit_job_target] <= 0) + GLOB.time_last_changed_position = world.time / 10 + j.total_positions-- + opened_positions[edit_job_target]-- + playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0) + + if ("prioritize_job") + // TOGGLE WHETHER JOB APPEARS AS PRIORITIZED IN THE LOBBY if(scan && (ACCESS_CHANGE_IDS in scan.access) && !target_dept) - var/priority_target = href_list["job"] - var/datum/job/j = SSjob.GetJob(priority_target) - if(!j) - return 0 - var/priority = TRUE - if(j in SSjob.prioritized_jobs) - SSjob.prioritized_jobs -= j - prioritycount-- - priority = FALSE - else - SSjob.prioritized_jobs += j - prioritycount++ - to_chat(usr, "[j.title] has been successfully [priority ? "prioritized" : "unprioritized"]. Potential employees will notice your request.") - playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0) - - if ("print") - if (!( printing )) - printing = 1 - sleep(50) - var/obj/item/paper/P = new /obj/item/paper( loc ) - var/t1 = "Crew Manifest:
    " - for(var/datum/data/record/t in sortRecord(GLOB.data_core.general)) - t1 += t.fields["name"] + " - " + t.fields["rank"] + "
    " - P.info = t1 - P.name = "paper- 'Crew Manifest'" - printing = null - playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0) - if (modify) - modify.update_label() - updateUsrDialog() - return - -/obj/machinery/computer/card/proc/get_subordinates(rank) - for(var/datum/job/job in SSjob.occupations) - if(rank in job.department_head) - head_subordinates += job.title - -/obj/machinery/computer/card/centcom + var/priority_target = href_list["job"] + var/datum/job/j = SSjob.GetJob(priority_target) + if(!j) + return 0 + var/priority = TRUE + if(j in SSjob.prioritized_jobs) + SSjob.prioritized_jobs -= j + priority = FALSE + else if(j.total_positions <= j.current_positions) + to_chat(usr, "[j.title] has had all positions filled. Open up more slots before prioritizing it.") + return + else + SSjob.prioritized_jobs += j + to_chat(usr, "[j.title] has been successfully [priority ? "prioritized" : "unprioritized"]. Potential employees will notice your request.") + playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0) + + if ("print") + if (!( printing )) + printing = 1 + sleep(50) + var/obj/item/paper/P = new /obj/item/paper( loc ) + var/t1 = "Crew Manifest:
    " + for(var/datum/data/record/t in sortRecord(GLOB.data_core.general)) + t1 += t.fields["name"] + " - " + t.fields["rank"] + "
    " + P.info = t1 + P.name = "paper- 'Crew Manifest'" + printing = null + playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0) + if (modify) + modify.update_label() + updateUsrDialog() + return + +/obj/machinery/computer/card/proc/get_subordinates(rank) + for(var/datum/job/job in SSjob.occupations) + if(rank in job.department_head) + head_subordinates += job.title + +/obj/machinery/computer/card/centcom name = "\improper CentCom identification console" - circuit = /obj/item/circuitboard/computer/card/centcom + circuit = /obj/item/circuitboard/computer/card/centcom req_access = list(ACCESS_CENT_CAPTAIN) - -/obj/machinery/computer/card/minor - name = "department management console" - desc = "You can use this to change ID's for specific departments." - icon_screen = "idminor" - circuit = /obj/item/circuitboard/computer/card/minor - + +/obj/machinery/computer/card/minor + name = "department management console" + desc = "You can use this to change ID's for specific departments." + icon_screen = "idminor" + circuit = /obj/item/circuitboard/computer/card/minor + /obj/machinery/computer/card/minor/Initialize() . = ..() - var/obj/item/circuitboard/computer/card/minor/typed_circuit = circuit - if(target_dept) - typed_circuit.target_dept = target_dept - else - target_dept = typed_circuit.target_dept - var/list/dept_list = list("general","security","medical","science","engineering") - name = "[dept_list[target_dept]] department console" - -/obj/machinery/computer/card/minor/hos - target_dept = 2 - icon_screen = "idhos" - - light_color = LIGHT_COLOR_RED - -/obj/machinery/computer/card/minor/cmo - target_dept = 3 - icon_screen = "idcmo" - -/obj/machinery/computer/card/minor/rd - target_dept = 4 - icon_screen = "idrd" - - light_color = LIGHT_COLOR_PINK - -/obj/machinery/computer/card/minor/ce - target_dept = 5 - icon_screen = "idce" - - light_color = LIGHT_COLOR_YELLOW + var/obj/item/circuitboard/computer/card/minor/typed_circuit = circuit + if(target_dept) + typed_circuit.target_dept = target_dept + else + target_dept = typed_circuit.target_dept + var/list/dept_list = list("general","security","medical","science","engineering") + name = "[dept_list[target_dept]] department console" + +/obj/machinery/computer/card/minor/hos + target_dept = 2 + icon_screen = "idhos" + + light_color = LIGHT_COLOR_RED + +/obj/machinery/computer/card/minor/cmo + target_dept = 3 + icon_screen = "idcmo" + +/obj/machinery/computer/card/minor/rd + target_dept = 4 + icon_screen = "idrd" + + light_color = LIGHT_COLOR_PINK + +/obj/machinery/computer/card/minor/ce + target_dept = 5 + icon_screen = "idce" + + light_color = LIGHT_COLOR_YELLOW diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index bf67e05f11..bd203772cb 100755 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -54,7 +54,7 @@ /obj/machinery/computer/communications/Topic(href, href_list) if(..()) return - if (z != ZLEVEL_STATION && z != ZLEVEL_CENTCOM) //Can only use on centcom and SS13 + if(!(z in GLOB.station_z_levels) && z != ZLEVEL_CENTCOM) //Can only use on centcom and SS13 to_chat(usr, "Unable to establish a connection: \black You're too far away from the station!") return usr.set_machine(src) diff --git a/code/game/machinery/computer/monastery_shuttle.dm b/code/game/machinery/computer/monastery_shuttle.dm index 98e7909954..b04c202dca 100644 --- a/code/game/machinery/computer/monastery_shuttle.dm +++ b/code/game/machinery/computer/monastery_shuttle.dm @@ -1,7 +1,7 @@ /obj/machinery/computer/shuttle/monastery_shuttle name = "monastery shuttle console" desc = "Used to control the monastery shuttle." - circuit = /obj/item/circuitboard/computer/shuttle/monastery_shuttle + circuit = /obj/item/circuitboard/computer/monastery_shuttle shuttleId = "pod1" possible_destinations = "monastery_shuttle_asteroid;monastery_shuttle_station" no_destination_swap = TRUE diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm index 56a6320640..a7626258ae 100644 --- a/code/game/machinery/computer/prisoner.dm +++ b/code/game/machinery/computer/prisoner.dm @@ -56,7 +56,7 @@ var/loc_display = "Unknown" var/mob/living/M = T.imp_in - if(Tr.z == ZLEVEL_STATION && !isspaceturf(M.loc)) + if((Tr.z in GLOB.station_z_levels) && !isspaceturf(M.loc)) var/turf/mob_loc = get_turf(M) loc_display = mob_loc.loc 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/airlock.dm b/code/game/machinery/doors/airlock.dm index ce82cd0e85..13e6ca1253 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -73,6 +73,7 @@ var/obj/item/device/doorCharge/charge = null //If applied, causes an explosion upon opening the door var/obj/item/note //Any papers pinned to the airlock var/detonated = 0 + var/abandoned = FALSE var/doorOpen = 'sound/machines/airlock.ogg' var/doorClose = 'sound/machines/airlockclose.ogg' var/doorDeni = 'sound/machines/deniedbeep.ogg' // i'm thinkin' Deni's @@ -117,6 +118,25 @@ max_integrity = normal_integrity if(damage_deflection == AIRLOCK_DAMAGE_DEFLECTION_N && security_level > AIRLOCK_SECURITY_METAL) damage_deflection = AIRLOCK_DAMAGE_DEFLECTION_R + if(abandoned) + var/outcome = rand(1,100) + switch(outcome) + if(1 to 9) + var/turf/here = get_turf(src) + for(var/turf/closed/T in range(2, src)) + here.ChangeTurf(T.type) + return INITIALIZE_HINT_QDEL + here.ChangeTurf(/turf/closed/wall) + return INITIALIZE_HINT_QDEL + if(9 to 11) + lights = FALSE + locked = TRUE + if(12 to 15) + locked = TRUE + if(16 to 23) + welded = TRUE + if(24 to 30) + panel_open = TRUE prepare_huds() var/datum/atom_hud/data/diagnostic/diag_hud = GLOB.huds[DATA_HUD_DIAGNOSTIC] diag_hud.add_to_hud(src) @@ -1157,7 +1177,7 @@ charge = C else if(istype(C, /obj/item/paper) || istype(C, /obj/item/photo)) if(note) - to_chat(user, "There's already something pinned to this airlock! Use wirecutters to remove it.") + to_chat(user, "There's already something pinned to this airlock! Use wirecutters to remove it.") return if(!user.transferItemToLoc(C, src)) to_chat(user, "For some reason, you can't attach [C]!") diff --git a/code/game/machinery/doors/airlock_types.dm b/code/game/machinery/doors/airlock_types.dm index 8563d0b93d..7a88286ea1 100644 --- a/code/game/machinery/doors/airlock_types.dm +++ b/code/game/machinery/doors/airlock_types.dm @@ -1,6 +1,9 @@ /* Station Airlocks Regular */ +/obj/machinery/door/airlock/abandoned + abandoned = TRUE + /obj/machinery/door/airlock/command icon = 'icons/obj/doors/airlocks/station/command.dmi' assemblytype = /obj/structure/door_assembly/door_assembly_com @@ -14,6 +17,9 @@ /obj/machinery/door/airlock/engineering icon = 'icons/obj/doors/airlocks/station/engineering.dmi' assemblytype = /obj/structure/door_assembly/door_assembly_eng + +/obj/machinery/door/airlock/engineering/abandoned + abandoned = TRUE /obj/machinery/door/airlock/medical icon = 'icons/obj/doors/airlocks/station/medical.dmi' @@ -25,6 +31,9 @@ assemblytype = /obj/structure/door_assembly/door_assembly_mai normal_integrity = 250 +/obj/machinery/door/airlock/maintenance/abandoned + abandoned = TRUE + /obj/machinery/door/airlock/maintenance/external name = "external airlock access" icon = 'icons/obj/doors/airlocks/station/maintenanceexternal.dmi' @@ -41,6 +50,9 @@ icon = 'icons/obj/doors/airlocks/station/atmos.dmi' assemblytype = /obj/structure/door_assembly/door_assembly_atmo +/obj/machinery/door/airlock/atmos/abandoned + abandoned = TRUE + /obj/machinery/door/airlock/research icon = 'icons/obj/doors/airlocks/station/research.dmi' assemblytype = /obj/structure/door_assembly/door_assembly_research @@ -83,6 +95,9 @@ glass = TRUE normal_integrity = 400 +/obj/machinery/door/airlock/glass_security/abandoned + abandoned = TRUE + /obj/machinery/door/airlock/glass_medical icon = 'icons/obj/doors/airlocks/station/medical.dmi' opacity = 0 @@ -279,6 +294,9 @@ security_level = 6 explosion_block = 2 +/obj/machinery/door/airlock/centcom/abandoned + abandoned = TRUE + ////////////////////////////////// /* Vault Airlocks @@ -316,6 +334,9 @@ opacity = 1 assemblytype = /obj/structure/door_assembly/door_assembly_mhatch +/obj/machinery/door/airlock/maintenance_hatch/abandoned + abandoned = TRUE + ////////////////////////////////// /* High Security Airlocks 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/firealarm.dm b/code/game/machinery/firealarm.dm index 2b66b23db3..518cd8ab09 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -61,7 +61,7 @@ if(stat & NOPOWER) return - if(src.z == ZLEVEL_STATION) + if(src.z in GLOB.station_z_levels) add_overlay("overlay_[GLOB.security_level]") else //var/green = SEC_LEVEL_GREEN @@ -121,7 +121,7 @@ var/list/data = list() data["emagged"] = emagged - if(src.z == ZLEVEL_STATION) + if(src.z in GLOB.station_z_levels) data["seclevel"] = get_security_level() else data["seclevel"] = "green" 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/launch_pad.dm b/code/game/machinery/launch_pad.dm index bc61bdc3ed..65f5b946ef 100644 --- a/code/game/machinery/launch_pad.dm +++ b/code/game/machinery/launch_pad.dm @@ -221,7 +221,7 @@ if(!isturf(user.loc)) //no setting up in a locker return add_fingerprint(user) - user.visible_message("[user] starts setting down [src]...", "You start setting up [pad]...") + user.visible_message("[user] starts setting down [src]...", "You start setting up [pad]...") if(do_after(user, 30, target = user)) pad.forceMove(get_turf(src)) pad.closed = FALSE @@ -356,4 +356,4 @@ if("pull") sending = FALSE teleport(usr, pad) - . = TRUE \ No newline at end of file + . = TRUE 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/status_display.dm b/code/game/machinery/status_display.dm index 4cfc6809cc..5d6370188b 100644 --- a/code/game/machinery/status_display.dm +++ b/code/game/machinery/status_display.dm @@ -107,7 +107,7 @@ var/line1 var/line2 if(SSshuttle.supply.mode == SHUTTLE_IDLE) - if(SSshuttle.supply.z == ZLEVEL_STATION) + if(SSshuttle.supply.z in GLOB.station_z_levels) line1 = "CARGO" line2 = "Docked" else 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/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm index 9077283a68..5638b92b99 100644 --- a/code/game/machinery/telecomms/machine_interactions.dm +++ b/code/game/machinery/telecomms/machine_interactions.dm @@ -106,7 +106,7 @@ // Off-Site Relays // -// You are able to send/receive signals from the station's z level (changeable in the ZLEVEL_STATION #define) if +// You are able to send/receive signals from the station's z level (changeable in the ZLEVEL_STATION_PRIMARY #define) if /obj/machinery/telecomms/relay/proc/toggle_level() @@ -114,7 +114,7 @@ var/turf/position = get_turf(src) // Toggle on/off getting signals from the station or the current Z level - if(listening_level == ZLEVEL_STATION) // equals the station + if(listening_level in GLOB.station_z_levels) // equals the station listening_level = position.z return TRUE return FALSE diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index 427bc95253..07b21c1fe4 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -1,947 +1,947 @@ -#define STANDARD_CHARGE 1 -#define CONTRABAND_CHARGE 2 -#define COIN_CHARGE 3 - -/datum/data/vending_product - var/product_name = "generic" - var/product_path = null - var/amount = 0 - var/max_amount = 0 - var/display_color = "blue" - - -/obj/machinery/vending - name = "\improper Vendomat" - desc = "A generic vending machine." - icon = 'icons/obj/vending.dmi' - icon_state = "generic" - layer = BELOW_OBJ_LAYER +#define STANDARD_CHARGE 1 +#define CONTRABAND_CHARGE 2 +#define COIN_CHARGE 3 + +/datum/data/vending_product + var/product_name = "generic" + var/product_path = null + var/amount = 0 + var/max_amount = 0 + var/display_color = "blue" + + +/obj/machinery/vending + name = "\improper Vendomat" + desc = "A generic vending machine." + icon = 'icons/obj/vending.dmi' + icon_state = "generic" + layer = BELOW_OBJ_LAYER anchored = TRUE density = TRUE - verb_say = "beeps" - verb_ask = "beeps" - verb_exclaim = "beeps" - max_integrity = 300 - integrity_failure = 100 - armor = list(melee = 20, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 70) + verb_say = "beeps" + verb_ask = "beeps" + verb_exclaim = "beeps" + max_integrity = 300 + integrity_failure = 100 + armor = list(melee = 20, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 70) circuit = /obj/item/circuitboard/machine/vendor - var/active = 1 //No sales pitches if off! - var/vend_ready = 1 //Are we ready to vend?? Is it time?? - - // To be filled out at compile time - var/list/products = list() //For each, use the following pattern: + var/active = 1 //No sales pitches if off! + var/vend_ready = 1 //Are we ready to vend?? Is it time?? + + // To be filled out at compile time + var/list/products = list() //For each, use the following pattern: var/list/contraband = list() //list(/type/path = amount, /type/path2 = amount2) - var/list/premium = list() //No specified amount = only one in stock - - var/product_slogans = "" //String of slogans separated by semicolons, optional - var/product_ads = "" //String of small ad messages in the vending screen - random chance - var/list/product_records = list() - var/list/hidden_records = list() - var/list/coin_records = list() - var/list/slogan_list = list() - var/list/small_ads = list() //Small ad messages in the vending screen - random chance of popping up whenever you open it - var/vend_reply //Thank you for shopping! - var/last_reply = 0 - var/last_slogan = 0 //When did we last pitch? - var/slogan_delay = 6000 //How long until we can pitch again? - var/icon_vend //Icon_state when vending! - var/icon_deny //Icon_state when vending! - var/seconds_electrified = 0 //Shock customers like an airlock. - var/shoot_inventory = 0 //Fire items at customers! We're broken! - var/shoot_inventory_chance = 2 - var/shut_up = 0 //Stop spouting those godawful pitches! - var/extended_inventory = 0 //can we access the hidden inventory? - var/scan_id = 1 - var/obj/item/coin/coin - var/obj/item/stack/spacecash/bill - - var/dish_quants = list() //used by the snack machine's custom compartment to count dishes. - - var/obj/item/vending_refill/refill_canister = null //The type of refill canisters used by this machine. - var/refill_count = 3 //The number of canisters the vending machine uses - -/obj/machinery/vending/Initialize() - var/build_inv = FALSE - if(!refill_canister) - circuit = null - build_inv = TRUE - . = ..() - wires = new /datum/wires/vending(src) - if(build_inv) //non-constructable vending machine - build_inventory(products) - build_inventory(contraband, 1) - build_inventory(premium, 0, 1) - - slogan_list = splittext(product_slogans, ";") - // So not all machines speak at the exact same time. - // The first time this machine says something will be at slogantime + this random value, - // so if slogantime is 10 minutes, it will say it at somewhere between 10 and 20 minutes after the machine is crated. - last_slogan = world.time + rand(0, slogan_delay) - power_change() - -/obj/machinery/vending/Destroy() - QDEL_NULL(wires) - QDEL_NULL(coin) - QDEL_NULL(bill) - return ..() - -/obj/machinery/vending/snack/Destroy() - for(var/obj/item/reagent_containers/food/snacks/S in contents) - S.forceMove(get_turf(src)) - return ..() - -/obj/machinery/vending/RefreshParts() //Better would be to make constructable child - if(component_parts) - product_records = list() - hidden_records = list() - coin_records = list() - build_inventory(products, start_empty = 1) - build_inventory(contraband, 1, start_empty = 1) - build_inventory(premium, 0, 1, start_empty = 1) - for(var/obj/item/vending_refill/VR in component_parts) - refill_inventory(VR, product_records, STANDARD_CHARGE) - refill_inventory(VR, coin_records, COIN_CHARGE) - refill_inventory(VR, hidden_records, CONTRABAND_CHARGE) - - -/obj/machinery/vending/deconstruct(disassembled = TRUE) - if(!refill_canister) //the non constructable vendors drop metal instead of a machine frame. + var/list/premium = list() //No specified amount = only one in stock + + var/product_slogans = "" //String of slogans separated by semicolons, optional + var/product_ads = "" //String of small ad messages in the vending screen - random chance + var/list/product_records = list() + var/list/hidden_records = list() + var/list/coin_records = list() + var/list/slogan_list = list() + var/list/small_ads = list() //Small ad messages in the vending screen - random chance of popping up whenever you open it + var/vend_reply //Thank you for shopping! + var/last_reply = 0 + var/last_slogan = 0 //When did we last pitch? + var/slogan_delay = 6000 //How long until we can pitch again? + var/icon_vend //Icon_state when vending! + var/icon_deny //Icon_state when vending! + var/seconds_electrified = 0 //Shock customers like an airlock. + var/shoot_inventory = 0 //Fire items at customers! We're broken! + var/shoot_inventory_chance = 2 + var/shut_up = 0 //Stop spouting those godawful pitches! + var/extended_inventory = 0 //can we access the hidden inventory? + var/scan_id = 1 + var/obj/item/coin/coin + var/obj/item/stack/spacecash/bill + + var/dish_quants = list() //used by the snack machine's custom compartment to count dishes. + + var/obj/item/vending_refill/refill_canister = null //The type of refill canisters used by this machine. + var/refill_count = 3 //The number of canisters the vending machine uses + +/obj/machinery/vending/Initialize() + var/build_inv = FALSE + if(!refill_canister) + circuit = null + build_inv = TRUE + . = ..() + wires = new /datum/wires/vending(src) + if(build_inv) //non-constructable vending machine + build_inventory(products) + build_inventory(contraband, 1) + build_inventory(premium, 0, 1) + + slogan_list = splittext(product_slogans, ";") + // So not all machines speak at the exact same time. + // The first time this machine says something will be at slogantime + this random value, + // so if slogantime is 10 minutes, it will say it at somewhere between 10 and 20 minutes after the machine is crated. + last_slogan = world.time + rand(0, slogan_delay) + power_change() + +/obj/machinery/vending/Destroy() + QDEL_NULL(wires) + QDEL_NULL(coin) + QDEL_NULL(bill) + return ..() + +/obj/machinery/vending/snack/Destroy() + for(var/obj/item/reagent_containers/food/snacks/S in contents) + S.forceMove(get_turf(src)) + return ..() + +/obj/machinery/vending/RefreshParts() //Better would be to make constructable child + if(component_parts) + product_records = list() + hidden_records = list() + coin_records = list() + build_inventory(products, start_empty = 1) + build_inventory(contraband, 1, start_empty = 1) + build_inventory(premium, 0, 1, start_empty = 1) + for(var/obj/item/vending_refill/VR in component_parts) + refill_inventory(VR, product_records, STANDARD_CHARGE) + refill_inventory(VR, coin_records, COIN_CHARGE) + refill_inventory(VR, hidden_records, CONTRABAND_CHARGE) + + +/obj/machinery/vending/deconstruct(disassembled = TRUE) + if(!refill_canister) //the non constructable vendors drop metal instead of a machine frame. if(!(flags_1 & NODECONSTRUCT_1)) - new /obj/item/stack/sheet/metal(loc, 3) - qdel(src) - else - ..() - -/obj/machinery/vending/obj_break(damage_flag) + new /obj/item/stack/sheet/metal(loc, 3) + qdel(src) + else + ..() + +/obj/machinery/vending/obj_break(damage_flag) if(!(stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1)) - var/dump_amount = 0 - for(var/datum/data/vending_product/R in product_records) - if(R.amount <= 0) //Try to use a record that actually has something to dump. - continue - var/dump_path = R.product_path - if(!dump_path) - continue - - while(R.amount>0) - var/obj/O = new dump_path(loc) - step(O, pick(GLOB.alldirs)) //we only drop 20% of the total of each products and spread it - R.amount -= 5 //around to not fill the turf with too many objects. - dump_amount++ - if(dump_amount > 15) //so we don't drop too many items (e.g. ClothesMate) - break - stat |= BROKEN - icon_state = "[initial(icon_state)]-broken" - -/obj/machinery/vending/proc/build_inventory(list/productlist, hidden=0, req_coin=0, start_empty = null) - for(var/typepath in productlist) - var/amount = productlist[typepath] - if(isnull(amount)) - amount = 0 - - var/atom/temp = new typepath(null) - var/datum/data/vending_product/R = new /datum/data/vending_product() - R.product_name = initial(temp.name) - R.product_path = typepath - if(!start_empty) - R.amount = amount - R.max_amount = amount - R.display_color = pick("red","blue","green") - - if(hidden) - hidden_records += R - else if(req_coin) - coin_records += R - else - product_records += R - -/obj/machinery/vending/proc/refill_inventory(obj/item/vending_refill/refill, datum/data/vending_product/machine, var/charge_type = STANDARD_CHARGE) - var/total = 0 - var/to_restock = 0 - - for(var/datum/data/vending_product/machine_content in machine) - if(machine_content.amount == 0 && refill.charges[charge_type] > 0) - machine_content.amount++ - refill.charges[charge_type]-- - total++ - to_restock += machine_content.max_amount - machine_content.amount - if(to_restock <= refill.charges[charge_type]) - for(var/datum/data/vending_product/machine_content in machine) - machine_content.amount = machine_content.max_amount - refill.charges[charge_type] -= to_restock - total += to_restock - else - var/tmp_charges = refill.charges[charge_type] - for(var/datum/data/vending_product/machine_content in machine) - if(refill.charges[charge_type] == 0) - break - var/restock = Ceiling(((machine_content.max_amount - machine_content.amount)/to_restock)*tmp_charges) - if(restock > refill.charges[charge_type]) - restock = refill.charges[charge_type] - machine_content.amount += restock - refill.charges[charge_type] -= restock - total += restock - return total - -/obj/machinery/vending/snack/attackby(obj/item/W, mob/user, params) - if(istype(W, /obj/item/reagent_containers/food/snacks)) - if(!compartment_access_check(user)) - return - var/obj/item/reagent_containers/food/snacks/S = W - if(!S.junkiness) - if(!iscompartmentfull(user)) - if(!user.drop_item()) - return - W.loc = src - food_load(W) - to_chat(user, "You insert [W] into [src]'s chef compartment.") - else - to_chat(user, "[src]'s chef compartment does not accept junk food.") - - else if(istype(W, /obj/item/storage/bag/tray)) - if(!compartment_access_check(user)) - return - var/obj/item/storage/T = W - var/loaded = 0 - var/denied_items = 0 - for(var/obj/item/reagent_containers/food/snacks/S in T.contents) - if(iscompartmentfull(user)) - break - if(!S.junkiness) - T.remove_from_storage(S, src) - food_load(S) - loaded++ - else - denied_items++ - if(denied_items) - to_chat(user, "[src] refuses some items.") - if(loaded) - to_chat(user, "You insert [loaded] dishes into [src]'s chef compartment.") - updateUsrDialog() - return - - else - return ..() - -/obj/machinery/vending/snack/proc/compartment_access_check(user) - req_access_txt = chef_compartment_access - if(!allowed(user) && !emagged && scan_id) - to_chat(user, "[src]'s chef compartment blinks red: Access denied.") - req_access_txt = "0" - return 0 - req_access_txt = "0" - return 1 - -/obj/machinery/vending/snack/proc/iscompartmentfull(mob/user) - if(contents.len >= 30) // no more than 30 dishes can fit inside - to_chat(user, "[src]'s chef compartment is full.") - return 1 - return 0 - -/obj/machinery/vending/snack/proc/food_load(obj/item/reagent_containers/food/snacks/S) - if(dish_quants[S.name]) - dish_quants[S.name]++ - else - dish_quants[S.name] = 1 - sortList(dish_quants) - -/obj/machinery/vending/attackby(obj/item/W, mob/user, params) - if(panel_open) - if(default_unfasten_wrench(user, W, time = 60)) - return - - if(component_parts) - if(default_deconstruction_crowbar(W)) - return - - if(istype(W, /obj/item/screwdriver)) - if(anchored) - panel_open = !panel_open - to_chat(user, "You [panel_open ? "open" : "close"] the maintenance panel.") - cut_overlays() - if(panel_open) - add_overlay("[initial(icon_state)]-panel") - playsound(src.loc, W.usesound, 50, 1) - updateUsrDialog() - else - to_chat(user, "You must first secure [src].") - return - else if(istype(W, /obj/item/device/multitool)||istype(W, /obj/item/wirecutters)) - if(panel_open) - attack_hand(user) - return - else if(istype(W, /obj/item/coin)) - if(coin) - to_chat(user, "[src] already has [coin] inserted") - return - if(bill) - to_chat(user, "[src] already has [bill] inserted") - return - if(!premium.len) - to_chat(user, "[src] doesn't have a coin slot.") - return - if(!user.drop_item()) - return - W.loc = src - coin = W - to_chat(user, "You insert [W] into [src].") - return - else if(istype(W, /obj/item/stack/spacecash)) - if(coin) - to_chat(user, "[src] already has [coin] inserted") - return - if(bill) - to_chat(user, "[src] already has [bill] inserted") - return - var/obj/item/stack/S = W - if(!premium.len) - to_chat(user, "[src] doesn't have a bill slot.") - return - S.use(1) - bill = new S.type(src,1) - to_chat(user, "You insert [W] into [src].") - return - else if(istype(W, refill_canister) && refill_canister != null) - if(stat & (BROKEN|NOPOWER)) - to_chat(user, "It does nothing.") - else if(panel_open) - //if the panel is open we attempt to refill the machine - var/obj/item/vending_refill/canister = W - if(canister.charges[STANDARD_CHARGE] == 0) - to_chat(user, "This [canister.name] is empty!") - else - var/transfered = refill_inventory(canister,product_records,STANDARD_CHARGE) - transfered += refill_inventory(canister,coin_records,COIN_CHARGE) - transfered += refill_inventory(canister,hidden_records,CONTRABAND_CHARGE) - if(transfered) - to_chat(user, "You loaded [transfered] items in \the [name].") - else - to_chat(user, "The [name] is fully stocked.") - return - else - to_chat(user, "You should probably unscrew the service panel first.") - else - return ..() - - -/obj/machinery/vending/on_deconstruction() - var/product_list = list(product_records, hidden_records, coin_records) - for(var/i=1, i<=3, i++) - for(var/datum/data/vending_product/machine_content in product_list[i]) - while(machine_content.amount !=0) - var/safety = 0 //to avoid infinite loop - for(var/obj/item/vending_refill/VR in component_parts) - safety++ - if(VR.charges[i] < VR.init_charges[i]) - VR.charges[i]++ - machine_content.amount-- - if(!machine_content.amount) - break - else - safety-- - if(safety <= 0) // all refill canisters are full - break - ..() - -/obj/machinery/vending/emag_act(mob/user) + var/dump_amount = 0 + for(var/datum/data/vending_product/R in product_records) + if(R.amount <= 0) //Try to use a record that actually has something to dump. + continue + var/dump_path = R.product_path + if(!dump_path) + continue + + while(R.amount>0) + var/obj/O = new dump_path(loc) + step(O, pick(GLOB.alldirs)) //we only drop 20% of the total of each products and spread it + R.amount -= 5 //around to not fill the turf with too many objects. + dump_amount++ + if(dump_amount > 15) //so we don't drop too many items (e.g. ClothesMate) + break + stat |= BROKEN + icon_state = "[initial(icon_state)]-broken" + +/obj/machinery/vending/proc/build_inventory(list/productlist, hidden=0, req_coin=0, start_empty = null) + for(var/typepath in productlist) + var/amount = productlist[typepath] + if(isnull(amount)) + amount = 0 + + var/atom/temp = new typepath(null) + var/datum/data/vending_product/R = new /datum/data/vending_product() + R.product_name = initial(temp.name) + R.product_path = typepath + if(!start_empty) + R.amount = amount + R.max_amount = amount + R.display_color = pick("red","blue","green") + + if(hidden) + hidden_records += R + else if(req_coin) + coin_records += R + else + product_records += R + +/obj/machinery/vending/proc/refill_inventory(obj/item/vending_refill/refill, datum/data/vending_product/machine, var/charge_type = STANDARD_CHARGE) + var/total = 0 + var/to_restock = 0 + + for(var/datum/data/vending_product/machine_content in machine) + if(machine_content.amount == 0 && refill.charges[charge_type] > 0) + machine_content.amount++ + refill.charges[charge_type]-- + total++ + to_restock += machine_content.max_amount - machine_content.amount + if(to_restock <= refill.charges[charge_type]) + for(var/datum/data/vending_product/machine_content in machine) + machine_content.amount = machine_content.max_amount + refill.charges[charge_type] -= to_restock + total += to_restock + else + var/tmp_charges = refill.charges[charge_type] + for(var/datum/data/vending_product/machine_content in machine) + if(refill.charges[charge_type] == 0) + break + var/restock = Ceiling(((machine_content.max_amount - machine_content.amount)/to_restock)*tmp_charges) + if(restock > refill.charges[charge_type]) + restock = refill.charges[charge_type] + machine_content.amount += restock + refill.charges[charge_type] -= restock + total += restock + return total + +/obj/machinery/vending/snack/attackby(obj/item/W, mob/user, params) + if(istype(W, /obj/item/reagent_containers/food/snacks)) + if(!compartment_access_check(user)) + return + var/obj/item/reagent_containers/food/snacks/S = W + if(!S.junkiness) + if(!iscompartmentfull(user)) + if(!user.drop_item()) + return + W.loc = src + food_load(W) + to_chat(user, "You insert [W] into [src]'s chef compartment.") + else + to_chat(user, "[src]'s chef compartment does not accept junk food.") + + else if(istype(W, /obj/item/storage/bag/tray)) + if(!compartment_access_check(user)) + return + var/obj/item/storage/T = W + var/loaded = 0 + var/denied_items = 0 + for(var/obj/item/reagent_containers/food/snacks/S in T.contents) + if(iscompartmentfull(user)) + break + if(!S.junkiness) + T.remove_from_storage(S, src) + food_load(S) + loaded++ + else + denied_items++ + if(denied_items) + to_chat(user, "[src] refuses some items.") + if(loaded) + to_chat(user, "You insert [loaded] dishes into [src]'s chef compartment.") + updateUsrDialog() + return + + else + return ..() + +/obj/machinery/vending/snack/proc/compartment_access_check(user) + req_access_txt = chef_compartment_access + if(!allowed(user) && !emagged && scan_id) + to_chat(user, "[src]'s chef compartment blinks red: Access denied.") + req_access_txt = "0" + return 0 + req_access_txt = "0" + return 1 + +/obj/machinery/vending/snack/proc/iscompartmentfull(mob/user) + if(contents.len >= 30) // no more than 30 dishes can fit inside + to_chat(user, "[src]'s chef compartment is full.") + return 1 + return 0 + +/obj/machinery/vending/snack/proc/food_load(obj/item/reagent_containers/food/snacks/S) + if(dish_quants[S.name]) + dish_quants[S.name]++ + else + dish_quants[S.name] = 1 + sortList(dish_quants) + +/obj/machinery/vending/attackby(obj/item/W, mob/user, params) + if(panel_open) + if(default_unfasten_wrench(user, W, time = 60)) + return + + if(component_parts) + if(default_deconstruction_crowbar(W)) + return + + if(istype(W, /obj/item/screwdriver)) + if(anchored) + panel_open = !panel_open + to_chat(user, "You [panel_open ? "open" : "close"] the maintenance panel.") + cut_overlays() + if(panel_open) + add_overlay("[initial(icon_state)]-panel") + playsound(src.loc, W.usesound, 50, 1) + updateUsrDialog() + else + to_chat(user, "You must first secure [src].") + return + else if(istype(W, /obj/item/device/multitool)||istype(W, /obj/item/wirecutters)) + if(panel_open) + attack_hand(user) + return + else if(istype(W, /obj/item/coin)) + if(coin) + to_chat(user, "[src] already has [coin] inserted") + return + if(bill) + to_chat(user, "[src] already has [bill] inserted") + return + if(!premium.len) + to_chat(user, "[src] doesn't have a coin slot.") + return + if(!user.drop_item()) + return + W.loc = src + coin = W + to_chat(user, "You insert [W] into [src].") + return + else if(istype(W, /obj/item/stack/spacecash)) + if(coin) + to_chat(user, "[src] already has [coin] inserted") + return + if(bill) + to_chat(user, "[src] already has [bill] inserted") + return + var/obj/item/stack/S = W + if(!premium.len) + to_chat(user, "[src] doesn't have a bill slot.") + return + S.use(1) + bill = new S.type(src,1) + to_chat(user, "You insert [W] into [src].") + return + else if(istype(W, refill_canister) && refill_canister != null) + if(stat & (BROKEN|NOPOWER)) + to_chat(user, "It does nothing.") + else if(panel_open) + //if the panel is open we attempt to refill the machine + var/obj/item/vending_refill/canister = W + if(canister.charges[STANDARD_CHARGE] == 0) + to_chat(user, "This [canister.name] is empty!") + else + var/transfered = refill_inventory(canister,product_records,STANDARD_CHARGE) + transfered += refill_inventory(canister,coin_records,COIN_CHARGE) + transfered += refill_inventory(canister,hidden_records,CONTRABAND_CHARGE) + if(transfered) + to_chat(user, "You loaded [transfered] items in \the [name].") + else + to_chat(user, "The [name] is fully stocked.") + return + else + to_chat(user, "You should probably unscrew the service panel first.") + else + return ..() + + +/obj/machinery/vending/on_deconstruction() + var/product_list = list(product_records, hidden_records, coin_records) + for(var/i=1, i<=3, i++) + for(var/datum/data/vending_product/machine_content in product_list[i]) + while(machine_content.amount !=0) + var/safety = 0 //to avoid infinite loop + for(var/obj/item/vending_refill/VR in component_parts) + safety++ + if(VR.charges[i] < VR.init_charges[i]) + VR.charges[i]++ + machine_content.amount-- + if(!machine_content.amount) + break + else + safety-- + if(safety <= 0) // all refill canisters are full + break + ..() + +/obj/machinery/vending/emag_act(mob/user) if(emagged) return emagged = TRUE to_chat(user, "You short out the product lock on [src].") - -/obj/machinery/vending/attack_ai(mob/user) - return attack_hand(user) - -/obj/machinery/vending/attack_hand(mob/user) - var/dat = "" - if(panel_open && !isAI(user)) - return wires.interact(user) - else - if(stat & (BROKEN|NOPOWER)) - return - - dat += "

    Select an item

    " - dat += "
    " - if(product_records.len == 0) - dat += "No product loaded!" - else - var/list/display_records = product_records - if(extended_inventory) - display_records = product_records + hidden_records - if(coin || bill) - display_records = product_records + coin_records - if((coin || bill) && extended_inventory) - display_records = product_records + hidden_records + coin_records - dat += "
      " - for (var/datum/data/vending_product/R in display_records) - dat += "
    • " - if(R.amount > 0) - dat += "Vend " - else - dat += "Sold out " - dat += "[sanitize(R.product_name)]:" - dat += " [R.amount]" - dat += "
    • " - dat += "
    " - dat += "
    " - if(premium.len > 0) - dat += "Change Return: " - if (coin || bill) - dat += "[(coin ? coin : "")][(bill ? bill : "")]  Remove" - else - dat += "No money  Remove" - if(istype(src, /obj/machinery/vending/snack)) - dat += "

    Chef's Food Selection

    " - dat += "
    " - for (var/O in dish_quants) - if(dish_quants[O] > 0) - var/N = dish_quants[O] - dat += "Dispense " - dat += "[capitalize(O)]: [N]
    " - dat += "
    " - user.set_machine(src) - if(seconds_electrified && !(stat & NOPOWER)) - if(shock(user, 100)) - return - - var/datum/browser/popup = new(user, "vending", (name)) - popup.set_content(dat) - popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) - popup.open() - - -/obj/machinery/vending/Topic(href, href_list) - if(..()) - return - - if(issilicon(usr)) - if(iscyborg(usr)) - var/mob/living/silicon/robot/R = usr + +/obj/machinery/vending/attack_ai(mob/user) + return attack_hand(user) + +/obj/machinery/vending/attack_hand(mob/user) + var/dat = "" + if(panel_open && !isAI(user)) + return wires.interact(user) + else + if(stat & (BROKEN|NOPOWER)) + return + + dat += "

    Select an item

    " + dat += "
    " + if(product_records.len == 0) + dat += "No product loaded!" + else + var/list/display_records = product_records + if(extended_inventory) + display_records = product_records + hidden_records + if(coin || bill) + display_records = product_records + coin_records + if((coin || bill) && extended_inventory) + display_records = product_records + hidden_records + coin_records + dat += "
      " + for (var/datum/data/vending_product/R in display_records) + dat += "
    • " + if(R.amount > 0) + dat += "Vend " + else + dat += "Sold out " + dat += "[sanitize(R.product_name)]:" + dat += " [R.amount]" + dat += "
    • " + dat += "
    " + dat += "
    " + if(premium.len > 0) + dat += "Change Return: " + if (coin || bill) + dat += "[(coin ? coin : "")][(bill ? bill : "")]  Remove" + else + dat += "No money  Remove" + if(istype(src, /obj/machinery/vending/snack)) + dat += "

    Chef's Food Selection

    " + dat += "
    " + for (var/O in dish_quants) + if(dish_quants[O] > 0) + var/N = dish_quants[O] + dat += "Dispense " + dat += "[capitalize(O)]: [N]
    " + dat += "
    " + user.set_machine(src) + if(seconds_electrified && !(stat & NOPOWER)) + if(shock(user, 100)) + return + + var/datum/browser/popup = new(user, "vending", (name)) + popup.set_content(dat) + popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) + popup.open() + + +/obj/machinery/vending/Topic(href, href_list) + if(..()) + return + + if(issilicon(usr)) + if(iscyborg(usr)) + var/mob/living/silicon/robot/R = usr if(!(R.module && istype(R.module, /obj/item/robot_module/butler) )) - to_chat(usr, "The vending machine refuses to interface with you, as you are not in its target demographic!") - return - else - to_chat(usr, "The vending machine refuses to interface with you, as you are not in its target demographic!") - return - - if(href_list["remove_coin"]) - if(!(coin || bill)) - to_chat(usr, "There is no money in this machine.") - return - if(coin) - if(!usr.get_active_held_item()) - usr.put_in_hands(coin) - else - coin.forceMove(get_turf(src)) - to_chat(usr, "You remove [coin] from [src].") - coin = null - if(bill) - if(!usr.get_active_held_item()) - usr.put_in_hands(bill) - else - bill.forceMove(get_turf(src)) - to_chat(usr, "You remove [bill] from [src].") - bill = null - - - usr.set_machine(src) - - if((href_list["dispense"]) && (vend_ready)) - var/N = href_list["dispense"] - if(dish_quants[N] <= 0) // Sanity check, there are probably ways to press the button when it shouldn't be possible. - return - vend_ready = 0 - use_power(5) - - dish_quants[N] = max(dish_quants[N] - 1, 0) - for(var/obj/O in contents) - if(O.name == N) - O.loc = src.loc - break - vend_ready = 1 - updateUsrDialog() - return - - if((href_list["vend"]) && (vend_ready)) - if(panel_open) - to_chat(usr, "The vending machine cannot dispense products while its service panel is open!") - return - - if((!allowed(usr)) && !emagged && scan_id) //For SECURE VENDING MACHINES YEAH - to_chat(usr, "Access denied." ) - flick(icon_deny,src) - return - - vend_ready = 0 //One thing at a time!! - - var/datum/data/vending_product/R = locate(href_list["vend"]) - if(!R || !istype(R) || !R.product_path) - vend_ready = 1 - return - - if(R in hidden_records) - if(!extended_inventory) - vend_ready = 1 - return - else if(R in coin_records) - if(!(coin || bill)) - to_chat(usr, "You need to insert money to get this item!") - vend_ready = 1 - return - if(coin && coin.string_attached) - if(prob(50)) - if(usr.put_in_hands(coin)) - to_chat(usr, "You successfully pull [coin] out before [src] could swallow it.") - coin = null - else - to_chat(usr, "You couldn't pull [coin] out because your hands are full!") - QDEL_NULL(coin) - else - to_chat(usr, "You weren't able to pull [coin] out fast enough, the machine ate it, string and all!") - QDEL_NULL(coin) - else - QDEL_NULL(coin) - QDEL_NULL(bill) - - else if (!(R in product_records)) - vend_ready = 1 - message_admins("Vending machine exploit attempted by [key_name(usr, usr.client)]!") - return - - if (R.amount <= 0) - to_chat(usr, "Sold out.") - vend_ready = 1 - return - else - R.amount-- - - if(((last_reply + 200) <= world.time) && vend_reply) - speak(vend_reply) - last_reply = world.time - - use_power(5) - if(icon_vend) //Show the vending animation if needed - flick(icon_vend,src) - new R.product_path(get_turf(src)) - SSblackbox.add_details("vending_machine_usage","[src.type]|[R.product_path]") - vend_ready = 1 - return - - updateUsrDialog() - return - - else if(href_list["togglevoice"] && panel_open) - shut_up = !shut_up - - updateUsrDialog() - - -/obj/machinery/vending/process() - if(stat & (BROKEN|NOPOWER)) - return - if(!active) - return - - if(seconds_electrified > 0) - seconds_electrified-- - - //Pitch to the people! Really sell it! - if(last_slogan + slogan_delay <= world.time && slogan_list.len > 0 && !shut_up && prob(5)) - var/slogan = pick(slogan_list) - speak(slogan) - last_slogan = world.time - - if(shoot_inventory && prob(shoot_inventory_chance)) - throw_item() - - -/obj/machinery/vending/proc/speak(message) - if(stat & (BROKEN|NOPOWER)) - return - if(!message) - return - - say(message) - -/obj/machinery/vending/power_change() - if(stat & BROKEN) - icon_state = "[initial(icon_state)]-broken" - else - if(powered()) - icon_state = initial(icon_state) - stat &= ~NOPOWER - else - icon_state = "[initial(icon_state)]-off" - stat |= NOPOWER - - -//Somebody cut an important wire and now we're following a new definition of "pitch." -/obj/machinery/vending/proc/throw_item() - var/obj/throw_item = null - var/mob/living/target = locate() in view(7,src) - if(!target) - return 0 - - for(var/datum/data/vending_product/R in shuffle(product_records)) - if(R.amount <= 0) //Try to use a record that actually has something to dump. - continue - var/dump_path = R.product_path - if(!dump_path) - continue - - R.amount-- - throw_item = new dump_path(loc) - break - if(!throw_item) - return 0 - - pre_throw(throw_item) - - throw_item.throw_at(target, 16, 3) - visible_message("[src] launches [throw_item] at [target]!") - return 1 - -/obj/machinery/vending/proc/pre_throw(obj/item/I) - return - - -/obj/machinery/vending/proc/shock(mob/user, prb) - if(stat & (BROKEN|NOPOWER)) // unpowered, no shock - return FALSE - if(!prob(prb)) - return FALSE - do_sparks(5, TRUE, src) - var/tmp/check_range = TRUE - if(electrocute_mob(user, get_area(src), src, 0.7, check_range)) - return TRUE - else - return FALSE - -/* - * Vending machine types - */ - -/* - -/obj/machinery/vending/[vendors name here] // --vending machine template :) - name = "" - desc = "" - icon = '' - icon_state = "" - products = list() - contraband = list() - premium = list() - -IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY CANISTER CHARGES in vending_items.dm -*/ - -/* -/obj/machinery/vending/atmospherics //Commenting this out until someone ponies up some actual working, broken, and unpowered sprites - Quarxink - name = "Tank Vendor" - desc = "A vendor with a wide variety of masks and gas tanks." - icon = 'icons/obj/objects.dmi' - icon_state = "dispenser" - product_paths = "/obj/item/tank/internals/oxygen;/obj/item/tank/internals/plasma;/obj/item/tank/internals/emergency_oxygen;/obj/item/tank/internals/emergency_oxygen/engi;/obj/item/clothing/mask/breath" - product_amounts = "10;10;10;5;25" -*/ - -/obj/machinery/vending/boozeomat - name = "\improper Booze-O-Mat" - desc = "A technological marvel, supposedly able to mix just the mixture you'd like to drink the moment you ask for one." - icon_state = "boozeomat" //////////////18 drink entities below, plus the glasses, in case someone wants to edit the number of bottles - icon_deny = "boozeomat-deny" + to_chat(usr, "The vending machine refuses to interface with you, as you are not in its target demographic!") + return + else + to_chat(usr, "The vending machine refuses to interface with you, as you are not in its target demographic!") + return + + if(href_list["remove_coin"]) + if(!(coin || bill)) + to_chat(usr, "There is no money in this machine.") + return + if(coin) + if(!usr.get_active_held_item()) + usr.put_in_hands(coin) + else + coin.forceMove(get_turf(src)) + to_chat(usr, "You remove [coin] from [src].") + coin = null + if(bill) + if(!usr.get_active_held_item()) + usr.put_in_hands(bill) + else + bill.forceMove(get_turf(src)) + to_chat(usr, "You remove [bill] from [src].") + bill = null + + + usr.set_machine(src) + + if((href_list["dispense"]) && (vend_ready)) + var/N = href_list["dispense"] + if(dish_quants[N] <= 0) // Sanity check, there are probably ways to press the button when it shouldn't be possible. + return + vend_ready = 0 + use_power(5) + + dish_quants[N] = max(dish_quants[N] - 1, 0) + for(var/obj/O in contents) + if(O.name == N) + O.loc = src.loc + break + vend_ready = 1 + updateUsrDialog() + return + + if((href_list["vend"]) && (vend_ready)) + if(panel_open) + to_chat(usr, "The vending machine cannot dispense products while its service panel is open!") + return + + if((!allowed(usr)) && !emagged && scan_id) //For SECURE VENDING MACHINES YEAH + to_chat(usr, "Access denied." ) + flick(icon_deny,src) + return + + vend_ready = 0 //One thing at a time!! + + var/datum/data/vending_product/R = locate(href_list["vend"]) + if(!R || !istype(R) || !R.product_path) + vend_ready = 1 + return + + if(R in hidden_records) + if(!extended_inventory) + vend_ready = 1 + return + else if(R in coin_records) + if(!(coin || bill)) + to_chat(usr, "You need to insert money to get this item!") + vend_ready = 1 + return + if(coin && coin.string_attached) + if(prob(50)) + if(usr.put_in_hands(coin)) + to_chat(usr, "You successfully pull [coin] out before [src] could swallow it.") + coin = null + else + to_chat(usr, "You couldn't pull [coin] out because your hands are full!") + QDEL_NULL(coin) + else + to_chat(usr, "You weren't able to pull [coin] out fast enough, the machine ate it, string and all!") + QDEL_NULL(coin) + else + QDEL_NULL(coin) + QDEL_NULL(bill) + + else if (!(R in product_records)) + vend_ready = 1 + message_admins("Vending machine exploit attempted by [key_name(usr, usr.client)]!") + return + + if (R.amount <= 0) + to_chat(usr, "Sold out.") + vend_ready = 1 + return + else + R.amount-- + + if(((last_reply + 200) <= world.time) && vend_reply) + speak(vend_reply) + last_reply = world.time + + use_power(5) + if(icon_vend) //Show the vending animation if needed + flick(icon_vend,src) + new R.product_path(get_turf(src)) + SSblackbox.add_details("vending_machine_usage","[src.type]|[R.product_path]") + vend_ready = 1 + return + + updateUsrDialog() + return + + else if(href_list["togglevoice"] && panel_open) + shut_up = !shut_up + + updateUsrDialog() + + +/obj/machinery/vending/process() + if(stat & (BROKEN|NOPOWER)) + return + if(!active) + return + + if(seconds_electrified > 0) + seconds_electrified-- + + //Pitch to the people! Really sell it! + if(last_slogan + slogan_delay <= world.time && slogan_list.len > 0 && !shut_up && prob(5)) + var/slogan = pick(slogan_list) + speak(slogan) + last_slogan = world.time + + if(shoot_inventory && prob(shoot_inventory_chance)) + throw_item() + + +/obj/machinery/vending/proc/speak(message) + if(stat & (BROKEN|NOPOWER)) + return + if(!message) + return + + say(message) + +/obj/machinery/vending/power_change() + if(stat & BROKEN) + icon_state = "[initial(icon_state)]-broken" + else + if(powered()) + icon_state = initial(icon_state) + stat &= ~NOPOWER + else + icon_state = "[initial(icon_state)]-off" + stat |= NOPOWER + + +//Somebody cut an important wire and now we're following a new definition of "pitch." +/obj/machinery/vending/proc/throw_item() + var/obj/throw_item = null + var/mob/living/target = locate() in view(7,src) + if(!target) + return 0 + + for(var/datum/data/vending_product/R in shuffle(product_records)) + if(R.amount <= 0) //Try to use a record that actually has something to dump. + continue + var/dump_path = R.product_path + if(!dump_path) + continue + + R.amount-- + throw_item = new dump_path(loc) + break + if(!throw_item) + return 0 + + pre_throw(throw_item) + + throw_item.throw_at(target, 16, 3) + visible_message("[src] launches [throw_item] at [target]!") + return 1 + +/obj/machinery/vending/proc/pre_throw(obj/item/I) + return + + +/obj/machinery/vending/proc/shock(mob/user, prb) + if(stat & (BROKEN|NOPOWER)) // unpowered, no shock + return FALSE + if(!prob(prb)) + return FALSE + do_sparks(5, TRUE, src) + var/tmp/check_range = TRUE + if(electrocute_mob(user, get_area(src), src, 0.7, check_range)) + return TRUE + else + return FALSE + +/* + * Vending machine types + */ + +/* + +/obj/machinery/vending/[vendors name here] // --vending machine template :) + name = "" + desc = "" + icon = '' + icon_state = "" + products = list() + contraband = list() + premium = list() + +IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY CANISTER CHARGES in vending_items.dm +*/ + +/* +/obj/machinery/vending/atmospherics //Commenting this out until someone ponies up some actual working, broken, and unpowered sprites - Quarxink + name = "Tank Vendor" + desc = "A vendor with a wide variety of masks and gas tanks." + icon = 'icons/obj/objects.dmi' + icon_state = "dispenser" + product_paths = "/obj/item/tank/internals/oxygen;/obj/item/tank/internals/plasma;/obj/item/tank/internals/emergency_oxygen;/obj/item/tank/internals/emergency_oxygen/engi;/obj/item/clothing/mask/breath" + product_amounts = "10;10;10;5;25" +*/ + +/obj/machinery/vending/boozeomat + name = "\improper Booze-O-Mat" + desc = "A technological marvel, supposedly able to mix just the mixture you'd like to drink the moment you ask for one." + icon_state = "boozeomat" //////////////18 drink entities below, plus the glasses, in case someone wants to edit the number of bottles + icon_deny = "boozeomat-deny" products = list(/obj/item/reagent_containers/food/drinks/bottle/gin = 5, /obj/item/reagent_containers/food/drinks/bottle/whiskey = 5, /obj/item/reagent_containers/food/drinks/bottle/tequila = 5, /obj/item/reagent_containers/food/drinks/bottle/vodka = 5, /obj/item/reagent_containers/food/drinks/bottle/vermouth = 5, /obj/item/reagent_containers/food/drinks/bottle/rum = 5, /obj/item/reagent_containers/food/drinks/bottle/wine = 5, /obj/item/reagent_containers/food/drinks/bottle/cognac = 5, /obj/item/reagent_containers/food/drinks/bottle/kahlua = 5, /obj/item/reagent_containers/food/drinks/bottle/hcider = 5, - /obj/item/reagent_containers/food/drinks/bottle/absinthe = 5, /obj/item/reagent_containers/food/drinks/bottle/grappa = 5, + /obj/item/reagent_containers/food/drinks/bottle/absinthe = 5, /obj/item/reagent_containers/food/drinks/bottle/grappa = 5, /obj/item/reagent_containers/food/drinks/ale = 6, /obj/item/reagent_containers/food/drinks/bottle/orangejuice = 4, /obj/item/reagent_containers/food/drinks/bottle/tomatojuice = 4, /obj/item/reagent_containers/food/drinks/bottle/limejuice = 4, /obj/item/reagent_containers/food/drinks/bottle/cream = 4, /obj/item/reagent_containers/food/drinks/soda_cans/tonic = 8, - /obj/item/reagent_containers/food/drinks/soda_cans/cola = 8, /obj/item/reagent_containers/food/drinks/soda_cans/sodawater = 15, + /obj/item/reagent_containers/food/drinks/soda_cans/cola = 8, /obj/item/reagent_containers/food/drinks/soda_cans/sodawater = 15, /obj/item/reagent_containers/food/drinks/drinkingglass = 30, /obj/item/reagent_containers/food/drinks/ice = 10, /obj/item/reagent_containers/food/drinks/drinkingglass/shotglass = 12, /obj/item/reagent_containers/food/drinks/flask = 3) - contraband = list(/obj/item/reagent_containers/food/drinks/mug/tea = 12) - product_slogans = "I hope nobody asks me for a bloody cup o' tea...;Alcohol is humanity's friend. Would you abandon a friend?;Quite delighted to serve you!;Is nobody thirsty on this station?" - product_ads = "Drink up!;Booze is good for you!;Alcohol is humanity's best friend.;Quite delighted to serve you!;Care for a nice, cold beer?;Nothing cures you like booze!;Have a sip!;Have a drink!;Have a beer!;Beer is good for you!;Only the finest alcohol!;Best quality booze since 2053!;Award-winning wine!;Maximum alcohol!;Man loves beer.;A toast for progress!" - req_access_txt = "25" - refill_canister = /obj/item/vending_refill/boozeomat - -/obj/machinery/vending/assist + contraband = list(/obj/item/reagent_containers/food/drinks/mug/tea = 12) + product_slogans = "I hope nobody asks me for a bloody cup o' tea...;Alcohol is humanity's friend. Would you abandon a friend?;Quite delighted to serve you!;Is nobody thirsty on this station?" + product_ads = "Drink up!;Booze is good for you!;Alcohol is humanity's best friend.;Quite delighted to serve you!;Care for a nice, cold beer?;Nothing cures you like booze!;Have a sip!;Have a drink!;Have a beer!;Beer is good for you!;Only the finest alcohol!;Best quality booze since 2053!;Award-winning wine!;Maximum alcohol!;Man loves beer.;A toast for progress!" + req_access_txt = "25" + refill_canister = /obj/item/vending_refill/boozeomat + +/obj/machinery/vending/assist products = list( /obj/item/device/assembly/prox_sensor = 5, /obj/item/device/assembly/igniter = 3, /obj/item/device/assembly/signaler = 4, - /obj/item/wirecutters = 1, /obj/item/cartridge/signal = 4) - contraband = list(/obj/item/device/assembly/timer = 2, /obj/item/device/assembly/voice = 2, /obj/item/device/assembly/health = 2) - product_ads = "Only the finest!;Have some tools.;The most robust equipment.;The finest gear in space!" - armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) - resistance_flags = FIRE_PROOF - -/obj/machinery/vending/coffee - name = "\improper Solar's Best Hot Drinks" - desc = "A vending machine which dispenses hot drinks." - product_ads = "Have a drink!;Drink up!;It's good for you!;Would you like a hot joe?;I'd kill for some coffee!;The best beans in the galaxy.;Only the finest brew for you.;Mmmm. Nothing like a coffee.;I like coffee, don't you?;Coffee helps you work!;Try some tea.;We hope you like the best!;Try our new chocolate!;Admin conspiracies" - icon_state = "coffee" - icon_vend = "coffee-vend" + /obj/item/wirecutters = 1, /obj/item/cartridge/signal = 4) + contraband = list(/obj/item/device/assembly/timer = 2, /obj/item/device/assembly/voice = 2, /obj/item/device/assembly/health = 2) + product_ads = "Only the finest!;Have some tools.;The most robust equipment.;The finest gear in space!" + armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + resistance_flags = FIRE_PROOF + +/obj/machinery/vending/coffee + name = "\improper Solar's Best Hot Drinks" + desc = "A vending machine which dispenses hot drinks." + product_ads = "Have a drink!;Drink up!;It's good for you!;Would you like a hot joe?;I'd kill for some coffee!;The best beans in the galaxy.;Only the finest brew for you.;Mmmm. Nothing like a coffee.;I like coffee, don't you?;Coffee helps you work!;Try some tea.;We hope you like the best!;Try our new chocolate!;Admin conspiracies" + icon_state = "coffee" + icon_vend = "coffee-vend" products = list(/obj/item/reagent_containers/food/drinks/coffee = 25, /obj/item/reagent_containers/food/drinks/mug/tea = 25, /obj/item/reagent_containers/food/drinks/mug/coco = 25) - contraband = list(/obj/item/reagent_containers/food/drinks/ice = 12) - refill_canister = /obj/item/vending_refill/coffee - -/obj/machinery/vending/snack - name = "\improper Getmore Chocolate Corp" - desc = "A snack machine courtesy of the Getmore Chocolate Corporation, based out of Mars." - product_slogans = "Try our new nougat bar!;Twice the calories for half the price!" - product_ads = "The healthiest!;Award-winning chocolate bars!;Mmm! So good!;Oh my god it's so juicy!;Have a snack.;Snacks are good for you!;Have some more Getmore!;Best quality snacks straight from mars.;We love chocolate!;Try our new jerky!" - icon_state = "snack" + contraband = list(/obj/item/reagent_containers/food/drinks/ice = 12) + refill_canister = /obj/item/vending_refill/coffee + +/obj/machinery/vending/snack + name = "\improper Getmore Chocolate Corp" + desc = "A snack machine courtesy of the Getmore Chocolate Corporation, based out of Mars." + product_slogans = "Try our new nougat bar!;Twice the calories for half the price!" + product_ads = "The healthiest!;Award-winning chocolate bars!;Mmm! So good!;Oh my god it's so juicy!;Have a snack.;Snacks are good for you!;Have some more Getmore!;Best quality snacks straight from mars.;We love chocolate!;Try our new jerky!" + icon_state = "snack" products = list(/obj/item/reagent_containers/food/snacks/candy = 6, /obj/item/reagent_containers/food/drinks/dry_ramen = 6, /obj/item/reagent_containers/food/snacks/chips =6, /obj/item/reagent_containers/food/snacks/sosjerky = 6, /obj/item/reagent_containers/food/snacks/no_raisin = 6, /obj/item/reagent_containers/food/snacks/spacetwinkie = 6, - /obj/item/reagent_containers/food/snacks/cheesiehonkers = 6) - contraband = list(/obj/item/reagent_containers/food/snacks/syndicake = 6) - refill_canister = /obj/item/vending_refill/snack - var/chef_compartment_access = "28" - -/obj/machinery/vending/snack/random - name = "\improper Random Snackies" - desc = "Uh oh!" - -/obj/machinery/vending/snack/random/Initialize() - ..() - var/T = pick(subtypesof(/obj/machinery/vending/snack) - /obj/machinery/vending/snack/random) - new T(get_turf(src)) - qdel(src) - -/obj/machinery/vending/snack/blue - icon_state = "snackblue" - -/obj/machinery/vending/snack/orange - icon_state = "snackorange" - -/obj/machinery/vending/snack/green - icon_state = "snackgreen" - -/obj/machinery/vending/snack/teal - icon_state = "snackteal" - -/obj/machinery/vending/sustenance - name = "\improper Sustenance Vendor" - desc = "A vending machine which vends food, as required by section 47-C of the NT's Prisoner Ethical Treatment Agreement." - product_slogans = "Enjoy your meal.;Enough calories to support strenuous labor." - product_ads = "Sufficiently healthy.;Efficiently produced tofu!;Mmm! So good!;Have a meal.;You need food to live!;Have some more candy corn!;Try our new ice cups!" - icon_state = "sustenance" - products = list(/obj/item/reagent_containers/food/snacks/tofu = 24, - /obj/item/reagent_containers/food/drinks/ice = 12, + /obj/item/reagent_containers/food/snacks/cheesiehonkers = 6) + contraband = list(/obj/item/reagent_containers/food/snacks/syndicake = 6) + refill_canister = /obj/item/vending_refill/snack + var/chef_compartment_access = "28" + +/obj/machinery/vending/snack/random + name = "\improper Random Snackies" + desc = "Uh oh!" + +/obj/machinery/vending/snack/random/Initialize() + ..() + var/T = pick(subtypesof(/obj/machinery/vending/snack) - /obj/machinery/vending/snack/random) + new T(get_turf(src)) + qdel(src) + +/obj/machinery/vending/snack/blue + icon_state = "snackblue" + +/obj/machinery/vending/snack/orange + icon_state = "snackorange" + +/obj/machinery/vending/snack/green + icon_state = "snackgreen" + +/obj/machinery/vending/snack/teal + icon_state = "snackteal" + +/obj/machinery/vending/sustenance + name = "\improper Sustenance Vendor" + desc = "A vending machine which vends food, as required by section 47-C of the NT's Prisoner Ethical Treatment Agreement." + product_slogans = "Enjoy your meal.;Enough calories to support strenuous labor." + product_ads = "Sufficiently healthy.;Efficiently produced tofu!;Mmm! So good!;Have a meal.;You need food to live!;Have some more candy corn!;Try our new ice cups!" + icon_state = "sustenance" + products = list(/obj/item/reagent_containers/food/snacks/tofu = 24, + /obj/item/reagent_containers/food/drinks/ice = 12, /obj/item/reagent_containers/food/snacks/candy_corn = 6) - contraband = list(/obj/item/kitchen/knife = 6, - /obj/item/reagent_containers/food/drinks/coffee = 12, - /obj/item/tank/internals/emergency_oxygen = 6, - /obj/item/clothing/mask/breath = 6) - armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) - resistance_flags = FIRE_PROOF - -/obj/machinery/vending/cola - name = "\improper Robust Softdrinks" - desc = "A softdrink vendor provided by Robust Industries, LLC." - icon_state = "Cola_Machine" - product_slogans = "Robust Softdrinks: More robust than a toolbox to the head!" - product_ads = "Refreshing!;Hope you're thirsty!;Over 1 million drinks sold!;Thirsty? Why not cola?;Please, have a drink!;Drink up!;The best drinks in space." + contraband = list(/obj/item/kitchen/knife = 6, + /obj/item/reagent_containers/food/drinks/coffee = 12, + /obj/item/tank/internals/emergency_oxygen = 6, + /obj/item/clothing/mask/breath = 6) + armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + resistance_flags = FIRE_PROOF + +/obj/machinery/vending/cola + name = "\improper Robust Softdrinks" + desc = "A softdrink vendor provided by Robust Industries, LLC." + icon_state = "Cola_Machine" + product_slogans = "Robust Softdrinks: More robust than a toolbox to the head!" + product_ads = "Refreshing!;Hope you're thirsty!;Over 1 million drinks sold!;Thirsty? Why not cola?;Please, have a drink!;Drink up!;The best drinks in space." products = list(/obj/item/reagent_containers/food/drinks/soda_cans/cola = 10, /obj/item/reagent_containers/food/drinks/soda_cans/space_mountain_wind = 10, /obj/item/reagent_containers/food/drinks/soda_cans/dr_gibb = 10, /obj/item/reagent_containers/food/drinks/soda_cans/starkist = 10, /obj/item/reagent_containers/food/drinks/soda_cans/space_up = 10, /obj/item/reagent_containers/food/drinks/soda_cans/pwr_game = 10, /obj/item/reagent_containers/food/drinks/soda_cans/lemon_lime = 10, /obj/item/reagent_containers/glass/beaker/waterbottle = 10) contraband = list(/obj/item/reagent_containers/food/drinks/soda_cans/thirteenloko = 6, /obj/item/reagent_containers/food/drinks/soda_cans/shamblers = 6) premium = list(/obj/item/reagent_containers/food/drinks/drinkingglass/filled/nuka_cola = 1, /obj/item/reagent_containers/food/drinks/soda_cans/air = 1) - refill_canister = /obj/item/vending_refill/cola - -/obj/machinery/vending/cola/random - name = "\improper Random Drinkies" - desc = "Uh oh!" - -/obj/machinery/vending/cola/random/Initialize() + refill_canister = /obj/item/vending_refill/cola + +/obj/machinery/vending/cola/random + name = "\improper Random Drinkies" + desc = "Uh oh!" + +/obj/machinery/vending/cola/random/Initialize() . = ..() - var/T = pick(subtypesof(/obj/machinery/vending/cola) - /obj/machinery/vending/cola/random) - new T(get_turf(src)) - qdel(src) - -/obj/machinery/vending/cola/blue - icon_state = "Cola_Machine" - -/obj/machinery/vending/cola/black - icon_state = "cola_black" - -/obj/machinery/vending/cola/red - icon_state = "red_cola" - name = "\improper Space Cola Vendor" - desc = "It vends cola, in space." - product_slogans = "Cola in space!" - -/obj/machinery/vending/cola/space_up - icon_state = "space_up" - name = "\improper Space-up! Vendor" - desc = "Indulge in an explosion of flavor." - product_slogans = "Space-up! Like a hull breach in your mouth." - -/obj/machinery/vending/cola/starkist - icon_state = "starkist" - name = "\improper Star-kist Vendor" - desc = "The taste of a star in liquid form." - product_slogans = "Drink the stars! Star-kist!" - -/obj/machinery/vending/cola/sodie - icon_state = "soda" - -/obj/machinery/vending/cola/pwr_game - icon_state = "pwr_game" - name = "\improper Pwr Game Vendor" - desc = "You want it, we got it. Brought to you in partnership with Vlad's Salads." - product_slogans = "The POWER that gamers crave! PWR GAME!" - -/obj/machinery/vending/cola/shamblers - name = "\improper Shambler's Vendor" - desc = "~Shake me up some of that Shambler's Juice!~" - icon_state = "shamblers_juice" + var/T = pick(subtypesof(/obj/machinery/vending/cola) - /obj/machinery/vending/cola/random) + new T(get_turf(src)) + qdel(src) + +/obj/machinery/vending/cola/blue + icon_state = "Cola_Machine" + +/obj/machinery/vending/cola/black + icon_state = "cola_black" + +/obj/machinery/vending/cola/red + icon_state = "red_cola" + name = "\improper Space Cola Vendor" + desc = "It vends cola, in space." + product_slogans = "Cola in space!" + +/obj/machinery/vending/cola/space_up + icon_state = "space_up" + name = "\improper Space-up! Vendor" + desc = "Indulge in an explosion of flavor." + product_slogans = "Space-up! Like a hull breach in your mouth." + +/obj/machinery/vending/cola/starkist + icon_state = "starkist" + name = "\improper Star-kist Vendor" + desc = "The taste of a star in liquid form." + product_slogans = "Drink the stars! Star-kist!" + +/obj/machinery/vending/cola/sodie + icon_state = "soda" + +/obj/machinery/vending/cola/pwr_game + icon_state = "pwr_game" + name = "\improper Pwr Game Vendor" + desc = "You want it, we got it. Brought to you in partnership with Vlad's Salads." + product_slogans = "The POWER that gamers crave! PWR GAME!" + +/obj/machinery/vending/cola/shamblers + name = "\improper Shambler's Vendor" + desc = "~Shake me up some of that Shambler's Juice!~" + icon_state = "shamblers_juice" products = list(/obj/item/reagent_containers/food/drinks/soda_cans/cola = 10, /obj/item/reagent_containers/food/drinks/soda_cans/space_mountain_wind = 10, /obj/item/reagent_containers/food/drinks/soda_cans/dr_gibb = 10, /obj/item/reagent_containers/food/drinks/soda_cans/starkist = 10, /obj/item/reagent_containers/food/drinks/soda_cans/space_up = 10, /obj/item/reagent_containers/food/drinks/soda_cans/pwr_game = 10, /obj/item/reagent_containers/food/drinks/soda_cans/lemon_lime = 10, /obj/item/reagent_containers/food/drinks/soda_cans/shamblers = 10) - product_slogans = "~Shake me up some of that Shambler's Juice!~" - product_ads = "Refreshing!;Jyrbv dv lg jfdv fw kyrk Jyrdscvi'j Alztv!;Over 1 trillion souls drank!;Thirsty? Nyp efk uizeb kyv uribevjj?;Kyv Jyrdscvi uizebj kyv ezxyk!;Drink up!;Krjkp." - - -//This one's from bay12 -/obj/machinery/vending/cart - name = "\improper PTech" - desc = "Cartridges for PDAs" - product_slogans = "Carts to go!" - icon_state = "cart" - icon_deny = "cart-deny" + product_slogans = "~Shake me up some of that Shambler's Juice!~" + product_ads = "Refreshing!;Jyrbv dv lg jfdv fw kyrk Jyrdscvi'j Alztv!;Over 1 trillion souls drank!;Thirsty? Nyp efk uizeb kyv uribevjj?;Kyv Jyrdscvi uizebj kyv ezxyk!;Drink up!;Krjkp." + + +//This one's from bay12 +/obj/machinery/vending/cart + name = "\improper PTech" + desc = "Cartridges for PDAs" + product_slogans = "Carts to go!" + icon_state = "cart" + icon_deny = "cart-deny" products = list(/obj/item/cartridge/medical = 10, /obj/item/cartridge/engineering = 10, /obj/item/cartridge/security = 10, /obj/item/cartridge/janitor = 10, /obj/item/cartridge/signal/toxins = 10, /obj/item/device/pda/heads = 10, /obj/item/cartridge/captain = 3, /obj/item/cartridge/quartermaster = 10) - armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) - resistance_flags = FIRE_PROOF - -/obj/machinery/vending/liberationstation - name = "\improper Liberation Station" - desc = "An overwhelming amount of ancient patriotism washes over you just by looking at the machine." - icon_state = "liberationstation" - req_access_txt = "1" - product_slogans = "Liberation Station: Your one-stop shop for all things second ammendment!;Be a patriot today, pick up a gun!;Quality weapons for cheap prices!;Better dead than red!" - product_ads = "Float like an astronaut, sting like a bullet!;Express your second ammendment today!;Guns don't kill people, but you can!;Who needs responsibilities when you have guns?" - vend_reply = "Remember the name: Liberation Station!" + armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + resistance_flags = FIRE_PROOF + +/obj/machinery/vending/liberationstation + name = "\improper Liberation Station" + desc = "An overwhelming amount of ancient patriotism washes over you just by looking at the machine." + icon_state = "liberationstation" + req_access_txt = "1" + product_slogans = "Liberation Station: Your one-stop shop for all things second ammendment!;Be a patriot today, pick up a gun!;Quality weapons for cheap prices!;Better dead than red!" + product_ads = "Float like an astronaut, sting like a bullet!;Express your second ammendment today!;Guns don't kill people, but you can!;Who needs responsibilities when you have guns?" + vend_reply = "Remember the name: Liberation Station!" products = list(/obj/item/gun/ballistic/automatic/pistol/deagle/gold = 2, /obj/item/gun/ballistic/automatic/pistol/deagle/camo = 2, /obj/item/gun/ballistic/automatic/pistol/m1911 = 2, /obj/item/gun/ballistic/automatic/proto/unrestricted = 2, /obj/item/gun/ballistic/shotgun/automatic/combat = 2, /obj/item/gun/ballistic/automatic/gyropistol = 1, /obj/item/gun/ballistic/shotgun = 2, /obj/item/gun/ballistic/automatic/ar = 2) premium = list(/obj/item/ammo_box/magazine/smgm9mm = 2, /obj/item/ammo_box/magazine/m50 = 4, /obj/item/ammo_box/magazine/m45 = 2, /obj/item/ammo_box/magazine/m75 = 2) contraband = list(/obj/item/clothing/under/patriotsuit = 1, /obj/item/bedsheet/patriot = 3) - armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) - resistance_flags = FIRE_PROOF - -/obj/machinery/vending/cigarette - name = "\improper ShadyCigs Deluxe" - desc = "If you want to get cancer, might as well do it in style." - product_slogans = "Space cigs taste good like a cigarette should.;I'd rather toolbox than switch.;Smoke!;Don't believe the reports - smoke today!" - product_ads = "Probably not bad for you!;Don't believe the scientists!;It's good for you!;Don't quit, buy more!;Smoke!;Nicotine heaven.;Best cigarettes since 2150.;Award-winning cigs." - icon_state = "cigs" - products = list(/obj/item/storage/fancy/cigarettes = 5, - /obj/item/storage/fancy/cigarettes/cigpack_uplift = 3, - /obj/item/storage/fancy/cigarettes/cigpack_robust = 3, - /obj/item/storage/fancy/cigarettes/cigpack_carp = 3, - /obj/item/storage/fancy/cigarettes/cigpack_midori = 3, - /obj/item/storage/box/matches = 10, - /obj/item/lighter/greyscale = 4, - /obj/item/storage/fancy/rollingpapers = 5) - contraband = list(/obj/item/lighter = 3, /obj/item/clothing/mask/vape = 5) - premium = list(/obj/item/storage/fancy/cigarettes/cigpack_robustgold = 3, \ - /obj/item/storage/fancy/cigarettes/cigars = 1, /obj/item/storage/fancy/cigarettes/cigars/havana = 1, /obj/item/storage/fancy/cigarettes/cigars/cohiba = 1) - refill_canister = /obj/item/vending_refill/cigarette - -/obj/machinery/vending/cigarette/pre_throw(obj/item/I) - if(istype(I, /obj/item/lighter)) - var/obj/item/lighter/L = I - L.set_lit(TRUE) - -/obj/machinery/vending/medical - name = "\improper NanoMed Plus" - desc = "Medical drug dispenser." - icon_state = "med" - icon_deny = "med-deny" - product_ads = "Go save some lives!;The best stuff for your medbay.;Only the finest tools.;Natural chemicals!;This stuff saves lives.;Don't you want some?;Ping!" - req_access_txt = "5" + armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + resistance_flags = FIRE_PROOF + +/obj/machinery/vending/cigarette + name = "\improper ShadyCigs Deluxe" + desc = "If you want to get cancer, might as well do it in style." + product_slogans = "Space cigs taste good like a cigarette should.;I'd rather toolbox than switch.;Smoke!;Don't believe the reports - smoke today!" + product_ads = "Probably not bad for you!;Don't believe the scientists!;It's good for you!;Don't quit, buy more!;Smoke!;Nicotine heaven.;Best cigarettes since 2150.;Award-winning cigs." + icon_state = "cigs" + products = list(/obj/item/storage/fancy/cigarettes = 5, + /obj/item/storage/fancy/cigarettes/cigpack_uplift = 3, + /obj/item/storage/fancy/cigarettes/cigpack_robust = 3, + /obj/item/storage/fancy/cigarettes/cigpack_carp = 3, + /obj/item/storage/fancy/cigarettes/cigpack_midori = 3, + /obj/item/storage/box/matches = 10, + /obj/item/lighter/greyscale = 4, + /obj/item/storage/fancy/rollingpapers = 5) + contraband = list(/obj/item/lighter = 3, /obj/item/clothing/mask/vape = 5) + premium = list(/obj/item/storage/fancy/cigarettes/cigpack_robustgold = 3, \ + /obj/item/storage/fancy/cigarettes/cigars = 1, /obj/item/storage/fancy/cigarettes/cigars/havana = 1, /obj/item/storage/fancy/cigarettes/cigars/cohiba = 1) + refill_canister = /obj/item/vending_refill/cigarette + +/obj/machinery/vending/cigarette/pre_throw(obj/item/I) + if(istype(I, /obj/item/lighter)) + var/obj/item/lighter/L = I + L.set_lit(TRUE) + +/obj/machinery/vending/medical + name = "\improper NanoMed Plus" + desc = "Medical drug dispenser." + icon_state = "med" + icon_deny = "med-deny" + product_ads = "Go save some lives!;The best stuff for your medbay.;Only the finest tools.;Natural chemicals!;This stuff saves lives.;Don't you want some?;Ping!" + req_access_txt = "5" products = list(/obj/item/reagent_containers/syringe = 12, /obj/item/reagent_containers/dropper = 3, /obj/item/stack/medical/gauze = 8, /obj/item/reagent_containers/pill/patch/styptic = 5, /obj/item/reagent_containers/pill/insulin = 10, /obj/item/reagent_containers/pill/patch/silver_sulf = 5, /obj/item/reagent_containers/glass/bottle/charcoal = 4, /obj/item/reagent_containers/spray/medical/sterilizer = 1, /obj/item/reagent_containers/glass/bottle/epinephrine = 4, /obj/item/reagent_containers/glass/bottle/morphine = 4, /obj/item/reagent_containers/glass/bottle/salglu_solution = 3, - /obj/item/reagent_containers/glass/bottle/toxin = 3, /obj/item/reagent_containers/syringe/antiviral = 6, /obj/item/reagent_containers/pill/salbutamol = 2, /obj/item/device/healthanalyzer = 4, /obj/item/device/sensor_device = 2) + /obj/item/reagent_containers/glass/bottle/toxin = 3, /obj/item/reagent_containers/syringe/antiviral = 6, /obj/item/reagent_containers/pill/salbutamol = 2, /obj/item/device/healthanalyzer = 4, /obj/item/device/sensor_device = 2, /obj/item/pinpointer/crew = 2) contraband = list(/obj/item/reagent_containers/pill/tox = 3, /obj/item/reagent_containers/pill/morphine = 4, /obj/item/reagent_containers/pill/charcoal = 6) premium = list(/obj/item/storage/box/hug/medical = 1, /obj/item/reagent_containers/hypospray/medipen = 3, /obj/item/storage/belt/medical = 3, /obj/item/wrench/medical = 1) - armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) - resistance_flags = FIRE_PROOF - refill_canister = /obj/item/vending_refill/medical - -//This one's from bay12 -/obj/machinery/vending/plasmaresearch - name = "\improper Toximate 3000" - desc = "All the fine parts you need in one vending machine!" + armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + resistance_flags = FIRE_PROOF + refill_canister = /obj/item/vending_refill/medical + +//This one's from bay12 +/obj/machinery/vending/plasmaresearch + name = "\improper Toximate 3000" + desc = "All the fine parts you need in one vending machine!" products = list(/obj/item/clothing/under/rank/scientist = 6, /obj/item/clothing/suit/bio_suit = 6, /obj/item/clothing/head/bio_hood = 6, /obj/item/device/transfer_valve = 6, /obj/item/device/assembly/timer = 6, /obj/item/device/assembly/signaler = 6, /obj/item/device/assembly/prox_sensor = 6, /obj/item/device/assembly/igniter = 6) - contraband = list(/obj/item/device/assembly/health = 3) - -/obj/machinery/vending/wallmed - name = "\improper NanoMed" - desc = "Wall-mounted Medical Equipment dispenser." - icon_state = "wallmed" - icon_deny = "wallmed-deny" + contraband = list(/obj/item/device/assembly/health = 3) + +/obj/machinery/vending/wallmed + name = "\improper NanoMed" + desc = "Wall-mounted Medical Equipment dispenser." + icon_state = "wallmed" + icon_deny = "wallmed-deny" density = FALSE products = list(/obj/item/reagent_containers/syringe = 3, /obj/item/reagent_containers/pill/patch/styptic = 5, /obj/item/reagent_containers/pill/patch/silver_sulf = 5, /obj/item/reagent_containers/pill/charcoal = 2, - /obj/item/reagent_containers/spray/medical/sterilizer = 1) + /obj/item/reagent_containers/spray/medical/sterilizer = 1) contraband = list(/obj/item/reagent_containers/pill/tox = 2, /obj/item/reagent_containers/pill/morphine = 2) - armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) - resistance_flags = FIRE_PROOF - refill_canister = /obj/item/vending_refill/medical - refill_count = 1 - -/obj/machinery/vending/security - name = "\improper SecTech" - desc = "A security equipment vendor" - product_ads = "Crack capitalist skulls!;Beat some heads in!;Don't forget - harm is good!;Your weapons are right here.;Handcuffs!;Freeze, scumbag!;Don't tase me bro!;Tase them, bro.;Why not have a donut?" - icon_state = "sec" - icon_deny = "sec-deny" - req_access_txt = "1" + armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + resistance_flags = FIRE_PROOF + refill_canister = /obj/item/vending_refill/medical + refill_count = 1 + +/obj/machinery/vending/security + name = "\improper SecTech" + desc = "A security equipment vendor" + product_ads = "Crack capitalist skulls!;Beat some heads in!;Don't forget - harm is good!;Your weapons are right here.;Handcuffs!;Freeze, scumbag!;Don't tase me bro!;Tase them, bro.;Why not have a donut?" + icon_state = "sec" + icon_deny = "sec-deny" + req_access_txt = "1" products = list(/obj/item/restraints/handcuffs = 8, /obj/item/restraints/handcuffs/cable/zipties = 10, /obj/item/grenade/flashbang = 4, /obj/item/device/assembly/flash/handheld = 5, /obj/item/reagent_containers/food/snacks/donut = 12, /obj/item/storage/box/evidence = 6, /obj/item/device/flashlight/seclite = 4, /obj/item/restraints/legcuffs/bola/energy = 7) contraband = list(/obj/item/clothing/glasses/sunglasses = 2, /obj/item/storage/fancy/donut_box = 2) - premium = list(/obj/item/coin/antagtoken = 1) - armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) - resistance_flags = FIRE_PROOF - -/obj/machinery/vending/security/pre_throw(obj/item/I) - if(istype(I, /obj/item/grenade)) - var/obj/item/grenade/G = I - G.preprime() - else if(istype(I, /obj/item/device/flashlight)) - var/obj/item/device/flashlight/F = I - F.on = TRUE - F.update_brightness() - -/obj/machinery/vending/hydronutrients - name = "\improper NutriMax" - desc = "A plant nutrients vendor." - product_slogans = "Aren't you glad you don't have to fertilize the natural way?;Now with 50% less stink!;Plants are people too!" - product_ads = "We like plants!;Don't you want some?;The greenest thumbs ever.;We like big plants.;Soft soil..." - icon_state = "nutri" - icon_deny = "nutri-deny" + premium = list(/obj/item/coin/antagtoken = 1) + armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + resistance_flags = FIRE_PROOF + +/obj/machinery/vending/security/pre_throw(obj/item/I) + if(istype(I, /obj/item/grenade)) + var/obj/item/grenade/G = I + G.preprime() + else if(istype(I, /obj/item/device/flashlight)) + var/obj/item/device/flashlight/F = I + F.on = TRUE + F.update_brightness() + +/obj/machinery/vending/hydronutrients + name = "\improper NutriMax" + desc = "A plant nutrients vendor." + product_slogans = "Aren't you glad you don't have to fertilize the natural way?;Now with 50% less stink!;Plants are people too!" + product_ads = "We like plants!;Don't you want some?;The greenest thumbs ever.;We like big plants.;Soft soil..." + icon_state = "nutri" + icon_deny = "nutri-deny" products = list(/obj/item/reagent_containers/glass/bottle/nutrient/ez = 30, /obj/item/reagent_containers/glass/bottle/nutrient/l4z = 20, /obj/item/reagent_containers/glass/bottle/nutrient/rh = 10, /obj/item/reagent_containers/spray/pestspray = 20, /obj/item/reagent_containers/syringe = 5, /obj/item/storage/bag/plants = 5, /obj/item/cultivator = 3, /obj/item/shovel/spade = 3, /obj/item/device/plant_analyzer = 4) contraband = list(/obj/item/reagent_containers/glass/bottle/ammonia = 10, /obj/item/reagent_containers/glass/bottle/diethylamine = 5) - armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) - resistance_flags = FIRE_PROOF - -/obj/machinery/vending/hydroseeds - name = "\improper MegaSeed Servitor" - desc = "When you need seeds fast!" - product_slogans = "THIS'S WHERE TH' SEEDS LIVE! GIT YOU SOME!;Hands down the best seed selection on the station!;Also certain mushroom varieties available, more for experts! Get certified today!" - product_ads = "We like plants!;Grow some crops!;Grow, baby, growww!;Aw h'yeah son!" - icon_state = "seeds" + armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + resistance_flags = FIRE_PROOF + +/obj/machinery/vending/hydroseeds + name = "\improper MegaSeed Servitor" + desc = "When you need seeds fast!" + product_slogans = "THIS'S WHERE TH' SEEDS LIVE! GIT YOU SOME!;Hands down the best seed selection on the station!;Also certain mushroom varieties available, more for experts! Get certified today!" + product_ads = "We like plants!;Grow some crops!;Grow, baby, growww!;Aw h'yeah son!" + icon_state = "seeds" products = list(/obj/item/seeds/ambrosia = 3, /obj/item/seeds/apple = 3, /obj/item/seeds/banana = 3, /obj/item/seeds/berry = 3, /obj/item/seeds/cabbage = 3, /obj/item/seeds/carrot = 3, /obj/item/seeds/cherry = 3, /obj/item/seeds/chanter = 3, /obj/item/seeds/chili = 3, /obj/item/seeds/cocoapod = 3, /obj/item/seeds/coffee = 3, /obj/item/seeds/corn = 3, @@ -952,31 +952,31 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C /obj/item/seeds/tower = 3, /obj/item/seeds/watermelon = 3, /obj/item/seeds/wheat = 3, /obj/item/seeds/whitebeet = 3) contraband = list(/obj/item/seeds/amanita = 2, /obj/item/seeds/glowshroom = 2, /obj/item/seeds/liberty = 2, /obj/item/seeds/nettle = 2, /obj/item/seeds/plump = 2, /obj/item/seeds/reishi = 2, /obj/item/seeds/cannabis = 3, /obj/item/seeds/starthistle = 2, - /obj/item/seeds/random = 2) - premium = list(/obj/item/reagent_containers/spray/waterflower = 1) - armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) - resistance_flags = FIRE_PROOF - -/obj/machinery/vending/magivend - name = "\improper MagiVend" - desc = "A magic vending machine." - icon_state = "MagiVend" - product_slogans = "Sling spells the proper way with MagiVend!;Be your own Houdini! Use MagiVend!" - vend_reply = "Have an enchanted evening!" - product_ads = "FJKLFJSD;AJKFLBJAKL;1234 LOONIES LOL!;>MFW;Kill them fuckers!;GET DAT FUKKEN DISK;HONK!;EI NATH;Destroy the station!;Admin conspiracies since forever!;Space-time bending hardware!" + /obj/item/seeds/random = 2) + premium = list(/obj/item/reagent_containers/spray/waterflower = 1) + armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + resistance_flags = FIRE_PROOF + +/obj/machinery/vending/magivend + name = "\improper MagiVend" + desc = "A magic vending machine." + icon_state = "MagiVend" + product_slogans = "Sling spells the proper way with MagiVend!;Be your own Houdini! Use MagiVend!" + vend_reply = "Have an enchanted evening!" + product_ads = "FJKLFJSD;AJKFLBJAKL;1234 LOONIES LOL!;>MFW;Kill them fuckers!;GET DAT FUKKEN DISK;HONK!;EI NATH;Destroy the station!;Admin conspiracies since forever!;Space-time bending hardware!" products = list(/obj/item/clothing/head/wizard = 1, /obj/item/clothing/suit/wizrobe = 1, /obj/item/clothing/head/wizard/red = 1, /obj/item/clothing/suit/wizrobe/red = 1, /obj/item/clothing/head/wizard/yellow = 1, /obj/item/clothing/suit/wizrobe/yellow = 1, /obj/item/clothing/shoes/sandal/magic = 1, /obj/item/staff = 2) - contraband = list(/obj/item/reagent_containers/glass/bottle/wizarditis = 1) //No one can get to the machine to hack it anyways; for the lulz - Microwave - armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) - resistance_flags = FIRE_PROOF - -/obj/machinery/vending/autodrobe - name = "\improper AutoDrobe" - desc = "A vending machine for costumes." - icon_state = "theater" - icon_deny = "theater-deny" - req_access_txt = "46" //Theatre access needed, unless hacked. - product_slogans = "Dress for success!;Suited and booted!;It's show time!;Why leave style up to fate? Use AutoDrobe!" - vend_reply = "Thank you for using AutoDrobe!" + contraband = list(/obj/item/reagent_containers/glass/bottle/wizarditis = 1) //No one can get to the machine to hack it anyways; for the lulz - Microwave + armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + resistance_flags = FIRE_PROOF + +/obj/machinery/vending/autodrobe + name = "\improper AutoDrobe" + desc = "A vending machine for costumes." + icon_state = "theater" + icon_deny = "theater-deny" + req_access_txt = "46" //Theatre access needed, unless hacked. + product_slogans = "Dress for success!;Suited and booted!;It's show time!;Why leave style up to fate? Use AutoDrobe!" + vend_reply = "Thank you for using AutoDrobe!" products = list(/obj/item/clothing/suit/chickensuit = 1, /obj/item/clothing/head/chicken = 1, /obj/item/clothing/under/gladiator = 1, /obj/item/clothing/head/helmet/gladiator = 1, /obj/item/clothing/under/gimmick/rank/captain/suit = 1, /obj/item/clothing/head/flatcap = 1, /obj/item/clothing/suit/toggle/labcoat/mad = 1, /obj/item/clothing/shoes/jackboots = 1, @@ -985,7 +985,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C /obj/item/clothing/glasses/monocle =1, /obj/item/clothing/head/bowler = 1, /obj/item/cane = 1, /obj/item/clothing/under/sl_suit = 1, /obj/item/clothing/mask/fakemoustache = 1, /obj/item/clothing/suit/bio_suit/plaguedoctorsuit = 1, /obj/item/clothing/head/plaguedoctorhat = 1, /obj/item/clothing/mask/gas/plaguedoctor = 1, /obj/item/clothing/suit/toggle/owlwings = 1, /obj/item/clothing/under/owl = 1, /obj/item/clothing/mask/gas/owl_mask = 1, - /obj/item/clothing/suit/toggle/owlwings/griffinwings = 1, /obj/item/clothing/under/griffin = 1, /obj/item/clothing/shoes/griffin = 1, /obj/item/clothing/head/griffin = 1, + /obj/item/clothing/suit/toggle/owlwings/griffinwings = 1, /obj/item/clothing/under/griffin = 1, /obj/item/clothing/shoes/griffin = 1, /obj/item/clothing/head/griffin = 1, /obj/item/clothing/suit/apron = 1, /obj/item/clothing/under/waiter = 1, /obj/item/clothing/suit/jacket/miljacket = 1, /obj/item/clothing/under/pirate = 1, /obj/item/clothing/suit/pirate = 1, /obj/item/clothing/head/pirate = 1, /obj/item/clothing/head/bandana = 1, /obj/item/clothing/head/bandana = 1, /obj/item/clothing/under/soviet = 1, /obj/item/clothing/head/ushanka = 1, /obj/item/clothing/suit/imperium_monk = 1, @@ -993,132 +993,132 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C /obj/item/clothing/suit/wizrobe/marisa/fake = 1, /obj/item/clothing/under/sundress = 1, /obj/item/clothing/head/witchwig = 1, /obj/item/staff/broom = 1, /obj/item/clothing/suit/wizrobe/fake = 1, /obj/item/clothing/head/wizard/fake = 1, /obj/item/staff = 3, /obj/item/clothing/mask/gas/sexyclown = 1, /obj/item/clothing/under/rank/clown/sexy = 1, /obj/item/clothing/mask/gas/sexymime = 1, /obj/item/clothing/under/sexymime = 1, /obj/item/clothing/mask/rat/bat = 1, /obj/item/clothing/mask/rat/bee = 1, /obj/item/clothing/mask/rat/bear = 1, /obj/item/clothing/mask/rat/raven = 1, /obj/item/clothing/mask/rat/jackal = 1, /obj/item/clothing/mask/rat/fox = 1, /obj/item/clothing/mask/rat/tribal = 1, /obj/item/clothing/mask/rat = 1, /obj/item/clothing/suit/apron/overalls = 1, - /obj/item/clothing/head/rabbitears =1, /obj/item/clothing/head/sombrero = 1, /obj/item/clothing/head/sombrero/green = 1, /obj/item/clothing/suit/poncho = 1, - /obj/item/clothing/suit/poncho/green = 1, /obj/item/clothing/suit/poncho/red = 1, + /obj/item/clothing/head/rabbitears =1, /obj/item/clothing/head/sombrero = 1, /obj/item/clothing/head/sombrero/green = 1, /obj/item/clothing/suit/poncho = 1, + /obj/item/clothing/suit/poncho/green = 1, /obj/item/clothing/suit/poncho/red = 1, /obj/item/clothing/under/maid = 1, /obj/item/clothing/under/janimaid = 1, /obj/item/clothing/glasses/cold=1, /obj/item/clothing/glasses/heat=1, - /obj/item/clothing/suit/whitedress = 1, - /obj/item/clothing/under/jester = 1, /obj/item/clothing/head/jester = 1, - /obj/item/clothing/under/villain = 1, + /obj/item/clothing/suit/whitedress = 1, + /obj/item/clothing/under/jester = 1, /obj/item/clothing/head/jester = 1, + /obj/item/clothing/under/villain = 1, /obj/item/clothing/shoes/singery = 1, /obj/item/clothing/under/singery = 1, /obj/item/clothing/shoes/singerb = 1, /obj/item/clothing/under/singerb = 1, - /obj/item/clothing/suit/hooded/carp_costume = 1, - /obj/item/clothing/suit/hooded/ian_costume = 1, - /obj/item/clothing/suit/hooded/bee_costume = 1, - /obj/item/clothing/suit/snowman = 1, - /obj/item/clothing/head/snowman = 1, - /obj/item/clothing/mask/joy = 1, - /obj/item/clothing/head/cueball = 1, - /obj/item/clothing/under/scratch = 1, + /obj/item/clothing/suit/hooded/carp_costume = 1, + /obj/item/clothing/suit/hooded/ian_costume = 1, + /obj/item/clothing/suit/hooded/bee_costume = 1, + /obj/item/clothing/suit/snowman = 1, + /obj/item/clothing/head/snowman = 1, + /obj/item/clothing/mask/joy = 1, + /obj/item/clothing/head/cueball = 1, + /obj/item/clothing/under/scratch = 1, /obj/item/clothing/under/sailor = 1, /obj/item/clothing/ears/headphones = 2) contraband = list(/obj/item/clothing/suit/judgerobe = 1, /obj/item/clothing/head/powdered_wig = 1, /obj/item/gun/magic/wand = 2, /obj/item/clothing/glasses/sunglasses/garb = 2, /obj/item/clothing/glasses/sunglasses/blindfold = 1, /obj/item/clothing/mask/muzzle = 2) - premium = list(/obj/item/clothing/suit/pirate/captain = 2, /obj/item/clothing/head/pirate/captain = 2, /obj/item/clothing/head/helmet/roman = 1, /obj/item/clothing/head/helmet/roman/legionaire = 1, /obj/item/clothing/under/roman = 1, /obj/item/clothing/shoes/roman = 1, /obj/item/shield/riot/roman = 1, /obj/item/skub = 1) - refill_canister = /obj/item/vending_refill/autodrobe - -/obj/machinery/vending/dinnerware - name = "\improper Plasteel Chef's Dinnerware Vendor" - desc = "A kitchen and restaurant equipment vendor" - product_ads = "Mm, food stuffs!;Food and food accessories.;Get your plates!;You like forks?;I like forks.;Woo, utensils.;You don't really need these..." - icon_state = "dinnerware" + premium = list(/obj/item/clothing/suit/pirate/captain = 2, /obj/item/clothing/head/pirate/captain = 2, /obj/item/clothing/head/helmet/roman = 1, /obj/item/clothing/head/helmet/roman/legionaire = 1, /obj/item/clothing/under/roman = 1, /obj/item/clothing/shoes/roman = 1, /obj/item/shield/riot/roman = 1, /obj/item/skub = 1) + refill_canister = /obj/item/vending_refill/autodrobe + +/obj/machinery/vending/dinnerware + name = "\improper Plasteel Chef's Dinnerware Vendor" + desc = "A kitchen and restaurant equipment vendor" + product_ads = "Mm, food stuffs!;Food and food accessories.;Get your plates!;You like forks?;I like forks.;Woo, utensils.;You don't really need these..." + icon_state = "dinnerware" products = list(/obj/item/storage/bag/tray = 8, /obj/item/kitchen/fork = 6, /obj/item/kitchen/knife = 6, /obj/item/kitchen/rollingpin = 2, /obj/item/reagent_containers/food/drinks/drinkingglass = 8, /obj/item/clothing/suit/apron/chef = 2, /obj/item/reagent_containers/food/condiment/pack/ketchup = 5, /obj/item/reagent_containers/food/condiment/pack/hotsauce = 5, /obj/item/reagent_containers/food/condiment/saltshaker = 5, /obj/item/reagent_containers/food/condiment/peppermill = 5, /obj/item/reagent_containers/glass/bowl = 20) - contraband = list(/obj/item/kitchen/rollingpin = 2, /obj/item/kitchen/knife/butcher = 2) - armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) - resistance_flags = FIRE_PROOF - -/obj/machinery/vending/sovietsoda - name = "\improper BODA" - desc = "Old sweet water vending machine" - icon_state = "sovietsoda" - product_ads = "For Tsar and Country.;Have you fulfilled your nutrition quota today?;Very nice!;We are simple people, for this is all we eat.;If there is a person, there is a problem. If there is no person, then there is no problem." - products = list(/obj/item/reagent_containers/food/drinks/drinkingglass/filled/soda = 30) - contraband = list(/obj/item/reagent_containers/food/drinks/drinkingglass/filled/cola = 20) - armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) - resistance_flags = FIRE_PROOF - -/obj/machinery/vending/tool - name = "\improper YouTool" - desc = "Tools for tools." - icon_state = "tool" - icon_deny = "tool-deny" - //req_access_txt = "12" //Maintenance access - products = list( - /obj/item/stack/cable_coil/random = 10, - /obj/item/crowbar = 5, - /obj/item/weldingtool = 3, - /obj/item/wirecutters = 5, - /obj/item/wrench = 5, - /obj/item/device/analyzer = 5, - /obj/item/device/t_scanner = 5, - /obj/item/screwdriver = 5, - /obj/item/device/flashlight/glowstick = 3, - /obj/item/device/flashlight/glowstick/red = 3, - /obj/item/device/flashlight = 5) - contraband = list( - /obj/item/weldingtool/hugetank = 2, - /obj/item/clothing/gloves/color/fyellow = 2) - premium = list( - /obj/item/clothing/gloves/color/yellow = 1) - armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 70) - resistance_flags = FIRE_PROOF - -/obj/machinery/vending/engivend - name = "\improper Engi-Vend" - desc = "Spare tool vending. What? Did you expect some witty description?" - icon_state = "engivend" - icon_deny = "engivend-deny" - req_access_txt = "11" //Engineering Equipment access + contraband = list(/obj/item/kitchen/rollingpin = 2, /obj/item/kitchen/knife/butcher = 2) + armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + resistance_flags = FIRE_PROOF + +/obj/machinery/vending/sovietsoda + name = "\improper BODA" + desc = "Old sweet water vending machine" + icon_state = "sovietsoda" + product_ads = "For Tsar and Country.;Have you fulfilled your nutrition quota today?;Very nice!;We are simple people, for this is all we eat.;If there is a person, there is a problem. If there is no person, then there is no problem." + products = list(/obj/item/reagent_containers/food/drinks/drinkingglass/filled/soda = 30) + contraband = list(/obj/item/reagent_containers/food/drinks/drinkingglass/filled/cola = 20) + armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + resistance_flags = FIRE_PROOF + +/obj/machinery/vending/tool + name = "\improper YouTool" + desc = "Tools for tools." + icon_state = "tool" + icon_deny = "tool-deny" + //req_access_txt = "12" //Maintenance access + products = list( + /obj/item/stack/cable_coil/random = 10, + /obj/item/crowbar = 5, + /obj/item/weldingtool = 3, + /obj/item/wirecutters = 5, + /obj/item/wrench = 5, + /obj/item/device/analyzer = 5, + /obj/item/device/t_scanner = 5, + /obj/item/screwdriver = 5, + /obj/item/device/flashlight/glowstick = 3, + /obj/item/device/flashlight/glowstick/red = 3, + /obj/item/device/flashlight = 5) + contraband = list( + /obj/item/weldingtool/hugetank = 2, + /obj/item/clothing/gloves/color/fyellow = 2) + premium = list( + /obj/item/clothing/gloves/color/yellow = 1) + armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 70) + resistance_flags = FIRE_PROOF + +/obj/machinery/vending/engivend + name = "\improper Engi-Vend" + desc = "Spare tool vending. What? Did you expect some witty description?" + icon_state = "engivend" + icon_deny = "engivend-deny" + req_access_txt = "11" //Engineering Equipment access products = list(/obj/item/clothing/glasses/meson/engine = 2, /obj/item/device/multitool = 4, /obj/item/electronics/airlock = 10, /obj/item/electronics/apc = 10, /obj/item/electronics/airalarm = 10, /obj/item/stock_parts/cell/high = 10, /obj/item/construction/rcd/loaded = 3, /obj/item/device/geiger_counter = 5, /obj/item/grenade/chem_grenade/smart_metal_foam = 10) - contraband = list(/obj/item/stock_parts/cell/potato = 3) - premium = list(/obj/item/storage/belt/utility = 3, /obj/item/storage/box/smart_metal_foam = 1) - armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) - resistance_flags = FIRE_PROOF - -//This one's from bay12 -/obj/machinery/vending/engineering - name = "\improper Robco Tool Maker" - desc = "Everything you need for do-it-yourself station repair." - icon_state = "engi" - icon_deny = "engi-deny" - req_access_txt = "11" + contraband = list(/obj/item/stock_parts/cell/potato = 3) + premium = list(/obj/item/storage/belt/utility = 3, /obj/item/storage/box/smart_metal_foam = 1) + armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + resistance_flags = FIRE_PROOF + +//This one's from bay12 +/obj/machinery/vending/engineering + name = "\improper Robco Tool Maker" + desc = "Everything you need for do-it-yourself station repair." + icon_state = "engi" + icon_deny = "engi-deny" + req_access_txt = "11" products = list(/obj/item/clothing/under/rank/chief_engineer = 4, /obj/item/clothing/under/rank/engineer = 4, /obj/item/clothing/shoes/sneakers/orange = 4, /obj/item/clothing/head/hardhat = 4, /obj/item/storage/belt/utility = 4, /obj/item/clothing/glasses/meson/engine = 4, /obj/item/clothing/gloves/color/yellow = 4, /obj/item/screwdriver = 12, /obj/item/crowbar = 12, /obj/item/wirecutters = 12, /obj/item/device/multitool = 12, /obj/item/wrench = 12, /obj/item/device/t_scanner = 12, /obj/item/stock_parts/cell = 8, /obj/item/weldingtool = 8, /obj/item/clothing/head/welding = 8, /obj/item/light/tube = 10, /obj/item/clothing/suit/fire = 4, /obj/item/stock_parts/scanning_module = 5, /obj/item/stock_parts/micro_laser = 5, /obj/item/stock_parts/matter_bin = 5, /obj/item/stock_parts/manipulator = 5, /obj/item/stock_parts/console_screen = 5) - armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) - resistance_flags = FIRE_PROOF - -//This one's from bay12 -/obj/machinery/vending/robotics - name = "\improper Robotech Deluxe" - desc = "All the tools you need to create your own robot army." - icon_state = "robotics" - icon_deny = "robotics-deny" - req_access_txt = "29" + armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + resistance_flags = FIRE_PROOF + +//This one's from bay12 +/obj/machinery/vending/robotics + name = "\improper Robotech Deluxe" + desc = "All the tools you need to create your own robot army." + icon_state = "robotics" + icon_deny = "robotics-deny" + req_access_txt = "29" products = list(/obj/item/clothing/suit/toggle/labcoat = 4, /obj/item/clothing/under/rank/roboticist = 4, /obj/item/stack/cable_coil = 4, /obj/item/device/assembly/flash/handheld = 4, /obj/item/stock_parts/cell/high = 12, /obj/item/device/assembly/prox_sensor = 3, /obj/item/device/assembly/signaler = 3, /obj/item/device/healthanalyzer = 3, /obj/item/scalpel = 2, /obj/item/circular_saw = 2, /obj/item/tank/internals/anesthetic = 2, /obj/item/clothing/mask/breath/medical = 5, /obj/item/screwdriver = 5, /obj/item/crowbar = 5) - armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) - resistance_flags = FIRE_PROOF - -//DON'T FORGET TO CHANGE THE REFILL SIZE IF YOU CHANGE THE MACHINE'S CONTENTS! -/obj/machinery/vending/clothing - name = "ClothesMate" //renamed to make the slogan rhyme - desc = "A vending machine for clothing." - icon_state = "clothes" - product_slogans = "Dress for success!;Prepare to look swagalicious!;Look at all this free swag!;Why leave style up to fate? Use the ClothesMate!" - vend_reply = "Thank you for using the ClothesMate!" + armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + resistance_flags = FIRE_PROOF + +//DON'T FORGET TO CHANGE THE REFILL SIZE IF YOU CHANGE THE MACHINE'S CONTENTS! +/obj/machinery/vending/clothing + name = "ClothesMate" //renamed to make the slogan rhyme + desc = "A vending machine for clothing." + icon_state = "clothes" + product_slogans = "Dress for success!;Prepare to look swagalicious!;Look at all this free swag!;Why leave style up to fate? Use the ClothesMate!" + vend_reply = "Thank you for using the ClothesMate!" products = list(/obj/item/clothing/head/that=2, /obj/item/clothing/head/fedora=1, /obj/item/clothing/glasses/monocle=1, - /obj/item/clothing/suit/jacket=2, /obj/item/clothing/suit/jacket/puffer/vest=2, /obj/item/clothing/suit/jacket/puffer=2, + /obj/item/clothing/suit/jacket=2, /obj/item/clothing/suit/jacket/puffer/vest=2, /obj/item/clothing/suit/jacket/puffer=2, /obj/item/clothing/under/suit_jacket/navy=1, /obj/item/clothing/under/suit_jacket/really_black=1, /obj/item/clothing/under/suit_jacket/burgundy=1, /obj/item/clothing/under/suit_jacket/charcoal=1, /obj/item/clothing/under/suit_jacket/white=1, /obj/item/clothing/under/kilt=1, /obj/item/clothing/under/overalls=1, /obj/item/clothing/under/sl_suit=1, /obj/item/clothing/under/pants/jeans=3, /obj/item/clothing/under/pants/classicjeans=2, /obj/item/clothing/under/pants/camo = 1, /obj/item/clothing/under/pants/blackjeans=2, /obj/item/clothing/under/pants/khaki=2, /obj/item/clothing/under/pants/white=2, /obj/item/clothing/under/pants/red=1, /obj/item/clothing/under/pants/black=2, /obj/item/clothing/under/pants/tan=2, /obj/item/clothing/under/pants/track=1, /obj/item/clothing/suit/jacket/miljacket = 1, - /obj/item/clothing/neck/tie/blue=1, /obj/item/clothing/neck/tie/red=1, /obj/item/clothing/neck/tie/black=1, /obj/item/clothing/neck/tie/horrible=1, + /obj/item/clothing/neck/tie/blue=1, /obj/item/clothing/neck/tie/red=1, /obj/item/clothing/neck/tie/black=1, /obj/item/clothing/neck/tie/horrible=1, /obj/item/clothing/neck/scarf/red=1, /obj/item/clothing/neck/scarf/green=1, /obj/item/clothing/neck/scarf/darkblue=1, /obj/item/clothing/neck/scarf/purple=1, /obj/item/clothing/neck/scarf/yellow=1, /obj/item/clothing/neck/scarf/orange=1, /obj/item/clothing/neck/scarf/cyan=1, /obj/item/clothing/neck/scarf=1, /obj/item/clothing/neck/scarf/black=1, @@ -1130,42 +1130,69 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C /obj/item/clothing/glasses/regular=1, /obj/item/clothing/glasses/regular/jamjar=1, /obj/item/clothing/head/sombrero=1, /obj/item/clothing/suit/poncho=1, /obj/item/clothing/suit/ianshirt=1, /obj/item/clothing/shoes/laceup=2, /obj/item/clothing/shoes/sneakers/black=4, /obj/item/clothing/shoes/sandal=1, /obj/item/clothing/gloves/fingerless=2, /obj/item/clothing/glasses/orange=1, /obj/item/clothing/glasses/red=1, - /obj/item/storage/belt/fannypack=1, /obj/item/storage/belt/fannypack/blue=1, /obj/item/storage/belt/fannypack/red=1, /obj/item/clothing/suit/jacket/letterman=2, - /obj/item/clothing/head/beanie=1, /obj/item/clothing/head/beanie/black=1, /obj/item/clothing/head/beanie/red=1, /obj/item/clothing/head/beanie/green=1, /obj/item/clothing/head/beanie/darkblue=1, - /obj/item/clothing/head/beanie/purple=1, /obj/item/clothing/head/beanie/yellow=1, /obj/item/clothing/head/beanie/orange=1, /obj/item/clothing/head/beanie/cyan=1, /obj/item/clothing/head/beanie/christmas=1, - /obj/item/clothing/head/beanie/striped=1, /obj/item/clothing/head/beanie/stripedred=1, /obj/item/clothing/head/beanie/stripedblue=1, /obj/item/clothing/head/beanie/stripedgreen=1, + /obj/item/storage/belt/fannypack=1, /obj/item/storage/belt/fannypack/blue=1, /obj/item/storage/belt/fannypack/red=1, /obj/item/clothing/suit/jacket/letterman=2, + /obj/item/clothing/head/beanie=1, /obj/item/clothing/head/beanie/black=1, /obj/item/clothing/head/beanie/red=1, /obj/item/clothing/head/beanie/green=1, /obj/item/clothing/head/beanie/darkblue=1, + /obj/item/clothing/head/beanie/purple=1, /obj/item/clothing/head/beanie/yellow=1, /obj/item/clothing/head/beanie/orange=1, /obj/item/clothing/head/beanie/cyan=1, /obj/item/clothing/head/beanie/christmas=1, + /obj/item/clothing/head/beanie/striped=1, /obj/item/clothing/head/beanie/stripedred=1, /obj/item/clothing/head/beanie/stripedblue=1, /obj/item/clothing/head/beanie/stripedgreen=1, /obj/item/clothing/suit/jacket/letterman_red=1, /obj/item/clothing/ears/headphones = 10) contraband = list(/obj/item/clothing/under/syndicate/tacticool=1, /obj/item/clothing/mask/balaclava=1, /obj/item/clothing/head/ushanka=1, /obj/item/clothing/under/soviet=1, /obj/item/storage/belt/fannypack/black=2, /obj/item/clothing/suit/jacket/letterman_syndie=1, /obj/item/clothing/under/jabroni=1, /obj/item/clothing/suit/vapeshirt=1, /obj/item/clothing/under/geisha=1) premium = list(/obj/item/clothing/under/suit_jacket/checkered=1, /obj/item/clothing/head/mailman=1, /obj/item/clothing/under/rank/mailman=1, /obj/item/clothing/suit/jacket/leather=1, /obj/item/clothing/suit/jacket/leather/overcoat=1, /obj/item/clothing/under/pants/mustangjeans=1, /obj/item/clothing/neck/necklace/dope=3, /obj/item/clothing/suit/jacket/letterman_nanotrasen=1) - refill_canister = /obj/item/vending_refill/clothing - -/obj/machinery/vending/toyliberationstation - name = "\improper Syndicate Donksoft Toy Vendor" - desc = "A ages 8 and up approved vendor that dispenses toys. If you were to find the right wires, you can unlock the adult mode setting!" - icon_state = "syndi" - req_access_txt = "1" - product_slogans = "Get your cool toys today!;Trigger a valid hunter today!;Quality toy weapons for cheap prices!;Give them to HoPs for all access!;Give them to HoS to get perma briged!" - product_ads = "Feel robust with your toys!;Express your inner child today!;Toy weapons don't kill people, but valid hunters do!;Who needs responsibilities when you have toy weapons?;Make your next murder FUN!" - vend_reply = "Come back for more!" - products = list(/obj/item/gun/ballistic/automatic/toy/unrestricted = 10, - /obj/item/gun/ballistic/automatic/toy/pistol/unrestricted = 10, - /obj/item/gun/ballistic/shotgun/toy/unrestricted = 10, - /obj/item/toy/sword = 10, /obj/item/ammo_box/foambox = 20, - /obj/item/toy/foamblade = 10, - /obj/item/toy/syndicateballoon = 10, - /obj/item/clothing/suit/syndicatefake = 5, - /obj/item/clothing/head/syndicatefake = 5) //OPS IN DORMS oh wait it's just a assistant - contraband = list(/obj/item/gun/ballistic/shotgun/toy/crossbow = 10, //Congrats, you unlocked the +18 setting! - /obj/item/gun/ballistic/automatic/c20r/toy/unrestricted = 10, - /obj/item/gun/ballistic/automatic/l6_saw/toy/unrestricted = 10, - /obj/item/ammo_box/foambox/riot = 20, - /obj/item/toy/katana = 10, - /obj/item/twohanded/dualsaber/toy = 5, - /obj/item/toy/cards/deck/syndicate = 10) //Gambling and it hurts, making it a +18 item - armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) - resistance_flags = FIRE_PROOF - -#undef STANDARD_CHARGE -#undef CONTRABAND_CHARGE -#undef COIN_CHARGE + refill_canister = /obj/item/vending_refill/clothing + +/obj/machinery/vending/toyliberationstation + name = "\improper Syndicate Donksoft Toy Vendor" + desc = "A ages 8 and up approved vendor that dispenses toys. If you were to find the right wires, you can unlock the adult mode setting!" + icon_state = "syndi" + req_access_txt = "1" + product_slogans = "Get your cool toys today!;Trigger a valid hunter today!;Quality toy weapons for cheap prices!;Give them to HoPs for all access!;Give them to HoS to get perma briged!" + product_ads = "Feel robust with your toys!;Express your inner child today!;Toy weapons don't kill people, but valid hunters do!;Who needs responsibilities when you have toy weapons?;Make your next murder FUN!" + vend_reply = "Come back for more!" + products = list(/obj/item/gun/ballistic/automatic/toy/unrestricted = 10, + /obj/item/gun/ballistic/automatic/toy/pistol/unrestricted = 10, + /obj/item/gun/ballistic/shotgun/toy/unrestricted = 10, + /obj/item/toy/sword = 10, + /obj/item/ammo_box/foambox = 20, + /obj/item/toy/foamblade = 10, + /obj/item/toy/syndicateballoon = 10, + /obj/item/clothing/suit/syndicatefake = 5, + /obj/item/clothing/head/syndicatefake = 5) //OPS IN DORMS oh wait it's just a assistant + contraband = list(/obj/item/gun/ballistic/shotgun/toy/crossbow = 10, //Congrats, you unlocked the +18 setting! + /obj/item/gun/ballistic/automatic/c20r/toy/unrestricted/riot = 10, + /obj/item/gun/ballistic/automatic/l6_saw/toy/unrestricted/riot = 10, + /obj/item/ammo_box/foambox/riot = 20, + /obj/item/toy/katana = 10, + /obj/item/twohanded/dualsaber/toy = 5, + /obj/item/toy/cards/deck/syndicate = 10) //Gambling and it hurts, making it a +18 item + armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + resistance_flags = FIRE_PROOF + refill_canister = /obj/item/vending_refill/donksoft + +/obj/machinery/vending/donksofttoyvendor + name = "\improper Donksoft Toy Vendor" + desc = "Ages 8 and up approved vendor that dispenses toys." + icon_state = "syndi" + product_slogans = "Get your cool toys today!;Trigger a valid hunter today!;Quality toy weapons for cheap prices!;Give them to HoPs for all access!;Give them to HoS to get perma briged!" + product_ads = "Feel robust with your toys!;Express your inner child today!;Toy weapons don't kill people, but valid hunters do!;Who needs responsibilities when you have toy weapons?;Make your next murder FUN!" + vend_reply = "Come back for more!" + products = list(/obj/item/gun/ballistic/automatic/toy/unrestricted = 10, + /obj/item/gun/ballistic/automatic/toy/pistol/unrestricted = 10, + /obj/item/gun/ballistic/shotgun/toy/unrestricted = 10, + /obj/item/toy/sword = 10, + /obj/item/ammo_box/foambox = 20, + /obj/item/toy/foamblade = 10, + /obj/item/toy/syndicateballoon = 10, + /obj/item/clothing/suit/syndicatefake = 5, + /obj/item/clothing/head/syndicatefake = 5) + contraband = list(/obj/item/gun/ballistic/shotgun/toy/crossbow = 10, + /obj/item/gun/ballistic/automatic/c20r/toy/unrestricted = 10, + /obj/item/gun/ballistic/automatic/l6_saw/toy/unrestricted = 10, + /obj/item/toy/katana = 10, + /obj/item/twohanded/dualsaber/toy = 5) + armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + resistance_flags = FIRE_PROOF + refill_canister = /obj/item/vending_refill/donksoft + +#undef STANDARD_CHARGE +#undef CONTRABAND_CHARGE +#undef COIN_CHARGE 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/tools/other_tools.dm b/code/game/mecha/equipment/tools/other_tools.dm index 089cfdf625..e22db80bb7 100644 --- a/code/game/mecha/equipment/tools/other_tools.dm +++ b/code/game/mecha/equipment/tools/other_tools.dm @@ -94,10 +94,13 @@ send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",src.get_equip_info()) else if(target!=locked) if(locked in view(chassis)) + var/turf/targ = get_turf(target) + var/turf/orig = get_turf(locked) locked.throw_at(target, 14, 1.5) locked = null send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",src.get_equip_info()) - return 1 + log_game("[key_name(chassis.occupant)] used a Gravitational Catapult to throw [locked]([COORD(orig)]) at [target]([COORD(targ)]).") + return TRUE else locked = null occupant_message("Lock on [locked] disengaged.") @@ -116,8 +119,8 @@ step_away(A,target) sleep(2) var/turf/T = get_turf(target) - log_game("[chassis.occupant.ckey]([chassis.occupant]) used a Gravitational Catapult in ([T.x],[T.y],[T.z])") - return 1 + log_game("[key_name(chassis.occupant)] used a Gravitational Catapult repulse wave on ([COORD(T)])") + return TRUE /obj/item/mecha_parts/mecha_equipment/gravcatapult/get_equip_info() 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 aa5788192e..fd52a75c18 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -451,6 +451,9 @@ . = ..() if(.) events.fireEvent("onMove",get_turf(src)) + if (internal_tank.disconnect()) // Something moved us and broke connection + occupant_message("Air port connection teared off!") + log_message("Lost connection to gas port.") /obj/mecha/Process_Spacemove(var/movement_dir = 0) . = ..() @@ -474,7 +477,7 @@ user.forceMove(get_turf(src)) to_chat(user, "You climb out from [src].") return 0 - if(connected_port) + if(internal_tank.connected_port) if(world.time - last_message > 20) occupant_message("Unable to move while connected to the air system port!") last_message = world.time @@ -623,7 +626,7 @@ if(user.can_dominate_mechs) examine(user) //Get diagnostic information! for(var/obj/item/mecha_parts/mecha_tracking/B in trackers) - to_chat(user, "Warning: Tracking Beacon detected. Enter at your own risk. Beacon Data:") + to_chat(user, "Warning: Tracking Beacon detected. Enter at your own risk. Beacon Data:") to_chat(user, "[B.get_mecha_info()]") break //Nothing like a big, red link to make the player feel powerful! @@ -675,7 +678,7 @@ AI.linked_core = new /obj/structure/AIcore/deactivated(AI.loc) if(AI.can_dominate_mechs) if(occupant) //Oh, I am sorry, were you using that? - to_chat(AI, "Pilot detected! Forced ejection initiated!") + to_chat(AI, "Pilot detected! Forced ejection initiated!") to_chat(occupant, "You have been forcibly ejected!") go_out(1) //IT IS MINE, NOW. SUCK IT, RD! ai_enter_mech(AI, interaction) @@ -691,7 +694,7 @@ to_chat(user, "[AI.name] is currently unresponsive, and cannot be uploaded.") return if(occupant || dna_lock) //Normal AIs cannot steal mechs! - to_chat(user, "Access denied. [name] is [occupant ? "currently occupied" : "secured with a DNA lock"].") + to_chat(user, "Access denied. [name] is [occupant ? "currently occupied" : "secured with a DNA lock"].") return AI.control_disabled = 0 AI.radio_enabled = 1 @@ -763,40 +766,12 @@ . = t_air.return_pressure() return - /obj/mecha/proc/return_temperature() var/datum/gas_mixture/t_air = return_air() if(t_air) . = t_air.return_temperature() return -/obj/mecha/proc/connect(obj/machinery/atmospherics/components/unary/portables_connector/new_port) - //Make sure not already connected to something else - if(connected_port || !new_port || new_port.connected_device) - return 0 - - //Make sure are close enough for a valid connection - if(new_port.loc != loc) - return 0 - - //Perform the connection - connected_port = new_port - connected_port.connected_device = src - var/datum/pipeline/connected_port_parent = connected_port.PARENT1 - connected_port_parent.reconcile_air() - - log_message("Connected to gas port.") - return 1 - -/obj/mecha/proc/disconnect() - if(!connected_port) - return 0 - - connected_port.connected_device = null - connected_port = null - log_message("Disconnected from gas port.") - return 1 - /obj/mecha/portableConnectorReturnAir() return internal_tank.return_air() diff --git a/code/game/mecha/mecha_topic.dm b/code/game/mecha/mecha_topic.dm index 4df6578c50..87009ac292 100644 --- a/code/game/mecha/mecha_topic.dm +++ b/code/game/mecha/mecha_topic.dm @@ -115,6 +115,7 @@
    + \ 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..bb555982cc 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 @@ -414,6 +428,7 @@ function ehjaxCallback(data) { } else { handleClientData(data.clientData.ckey, data.clientData.ip, data.clientData.compid); } + sendVolumeUpdate(); } else if (data.firebug) { if (data.trigger) { internalOutput('Loading firebug console, triggered by '+data.trigger+'...', 'internal'); @@ -423,7 +438,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 +476,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 +523,7 @@ $(function() { 'spingDisabled': getCookie('pingdisabled'), 'shighlightTerms': getCookie('highlightterms'), 'shighlightColor': getCookie('highlightcolor'), + 'smusicVolume': getCookie('musicVolume'), }; if (savedConfig.sfontSize) { @@ -517,6 +555,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 +881,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/holiday/halloween.dm b/code/modules/holiday/halloween.dm index dd26f289ff..f8716870e1 100644 --- a/code/modules/holiday/halloween.dm +++ b/code/modules/holiday/halloween.dm @@ -130,7 +130,7 @@ var/timer = 0 /mob/living/simple_animal/shade/howling_ghost/Initialize() - ..() + . = ..() icon_state = pick("ghost","ghostian","ghostian2","ghostking","ghost1","ghost2") icon_living = icon_state status_flags |= GODMODE @@ -194,7 +194,7 @@ var/timer /mob/living/simple_animal/hostile/retaliate/clown/insane/Initialize() - ..() + . = ..() timer = rand(5,15) status_flags = (status_flags | GODMODE) return 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/citrus.dm b/code/modules/hydroponics/grown/citrus.dm index 76401da535..2abbab0f29 100644 --- a/code/modules/hydroponics/grown/citrus.dm +++ b/code/modules/hydroponics/grown/citrus.dm @@ -53,7 +53,7 @@ /obj/item/reagent_containers/food/snacks/grown/citrus/orange seed = /obj/item/seeds/orange name = "orange" - desc = "It's an tangy fruit." + desc = "It's a tangy fruit." icon_state = "orange" filling_color = "#FFA500" 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/grown/towercap.dm b/code/modules/hydroponics/grown/towercap.dm index a88a095aef..3a9e75fdaa 100644 --- a/code/modules/hydroponics/grown/towercap.dm +++ b/code/modules/hydroponics/grown/towercap.dm @@ -163,7 +163,7 @@ /obj/structure/bonfire/attack_hand(mob/user) if(burning) - to_chat(user, "You need to extinguish [src] before removing the logs!") + to_chat(user, "You need to extinguish [src] before removing the logs!") return if(!has_buckled_mobs() && do_after(user, 50, target = src)) for(var/I in 1 to 5) 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 index fc61fcf40b..f7679898d4 100644 --- a/code/modules/jobs/job_exp.dm +++ b/code/modules/jobs/job_exp.dm @@ -221,9 +221,6 @@ GLOBAL_PROTECT(exp_to_update) 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!") @@ -266,14 +263,3 @@ GLOBAL_PROTECT(exp_to_update) 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_types/medical.dm b/code/modules/jobs/job_types/medical.dm index 94d2753fc5..9a33e1e759 100644 --- a/code/modules/jobs/job_types/medical.dm +++ b/code/modules/jobs/job_types/medical.dm @@ -33,6 +33,7 @@ Chief Medical Officer id = /obj/item/card/id/silver belt = /obj/item/device/pda/heads/cmo + l_pocket = /obj/item/pinpointer/crew ears = /obj/item/device/radio/headset/heads/cmo uniform = /obj/item/clothing/under/rank/chief_medical_officer shoes = /obj/item/clothing/shoes/sneakers/brown 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/lighting/lighting_object.dm b/code/modules/lighting/lighting_object.dm index d0fbf029b8..23d6bdba50 100644 --- a/code/modules/lighting/lighting_object.dm +++ b/code/modules/lighting/lighting_object.dm @@ -1,5 +1,3 @@ -GLOBAL_LIST_EMPTY(all_lighting_objects) // Global list of lighting objects. - /atom/movable/lighting_object name = "" @@ -16,15 +14,17 @@ GLOBAL_LIST_EMPTY(all_lighting_objects) // Global list of lighting objects. blend_mode = BLEND_ADD var/needs_update = FALSE + var/turf/myturf /atom/movable/lighting_object/Initialize(mapload) . = ..() verbs.Cut() - GLOB.all_lighting_objects += src - var/turf/T = loc // If this runtimes atleast we'll know what's creating overlays in things that aren't turfs. - T.lighting_object = src - T.luminosity = 0 + myturf = loc + if (myturf.lighting_object) + qdel(myturf.lighting_object, force = TRUE) + myturf.lighting_object = src + myturf.luminosity = 0 for(var/turf/open/space/S in RANGE_TURFS(1, src)) //RANGE_TURFS is in code\__HELPERS\game.dm S.update_starlight() @@ -34,26 +34,27 @@ GLOBAL_LIST_EMPTY(all_lighting_objects) // Global list of lighting objects. /atom/movable/lighting_object/Destroy(var/force) if (force) - GLOB.all_lighting_objects -= src GLOB.lighting_update_objects -= src - - var/turf/T = loc - if (istype(T)) - T.lighting_object = null - T.luminosity = 1 + if (loc != myturf) + var/turf/oldturf = get_turf(myturf) + var/turf/newturf = get_turf(loc) + stack_trace("A lighting object was qdeleted with a different loc then it is suppose to have ([COORD(oldturf)] -> [COORD(newturf)])") + if (isturf(myturf)) + myturf.lighting_object = null + myturf.luminosity = 1 + myturf = null return ..() + else return QDEL_HINT_LETMELIVE /atom/movable/lighting_object/proc/update() - var/turf/T = loc - if (!istype(T)) // Erm... + if (loc != myturf) if (loc) - warning("A lighting object realised its loc was NOT a turf (actual loc: [loc], [loc.type]) in update()!") - - else - warning("A lighting object realised it was in nullspace in update()!") + var/turf/oldturf = get_turf(myturf) + var/turf/newturf = get_turf(loc) + warning("A lighting object realised it's loc had changed in update() ([myturf]\[[myturf ? myturf.type : "null"]]([COORD(oldturf)]) -> [loc]\[[ loc ? loc.type : "null"]]([COORD(newturf)]))!") qdel(src, TRUE) return @@ -69,7 +70,7 @@ GLOBAL_LIST_EMPTY(all_lighting_objects) // Global list of lighting objects. // See LIGHTING_CORNER_DIAGONAL in lighting_corner.dm for why these values are what they are. var/static/datum/lighting_corner/dummy/dummy_lighting_corner = new - var/list/corners = T.corners + var/list/corners = myturf.corners var/datum/lighting_corner/cr = dummy_lighting_corner var/datum/lighting_corner/cg = dummy_lighting_corner var/datum/lighting_corner/cb = dummy_lighting_corner @@ -142,4 +143,4 @@ GLOBAL_LIST_EMPTY(all_lighting_objects) // Global list of lighting objects. // Override here to prevent things accidentally moving around overlays. /atom/movable/lighting_object/forceMove(atom/destination, var/no_tp=FALSE, var/harderforce = FALSE) if(harderforce) - . = ..() \ No newline at end of file + . = ..() diff --git a/code/modules/lighting/lighting_turf.dm b/code/modules/lighting/lighting_turf.dm index fc03cfb8c0..8372d21a5f 100644 --- a/code/modules/lighting/lighting_turf.dm +++ b/code/modules/lighting/lighting_turf.dm @@ -103,12 +103,12 @@ reconsider_lights() /turf/proc/change_area(var/area/old_area, var/area/new_area) - if (new_area.dynamic_lighting != old_area.dynamic_lighting) - if (new_area.dynamic_lighting) - lighting_build_overlay() - - else - lighting_clear_overlay() + if(SSlighting.initialized) + if (new_area.dynamic_lighting != old_area.dynamic_lighting) + if (new_area.dynamic_lighting) + lighting_build_overlay() + else + lighting_clear_overlay() /turf/proc/get_corners() if (!IS_DYNAMIC_LIGHTING(src) && !light_sources) diff --git a/code/modules/mining/aux_base.dm b/code/modules/mining/aux_base.dm index fbe5a1fb30..cd6104607f 100644 --- a/code/modules/mining/aux_base.dm +++ b/code/modules/mining/aux_base.dm @@ -37,7 +37,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also var/list/options = params2list(possible_destinations) var/obj/docking_port/mobile/M = SSshuttle.getShuttle(shuttleId) - var/dat = "[z == ZLEVEL_STATION ? "Docking clamps engaged. Standing by." : "Mining Shuttle Uplink: [M ? M.getStatusText() : "*OFFLINE*"]"]
    " + var/dat = "[(z in GLOB.station_z_levels) ? "Docking clamps engaged. Standing by." : "Mining Shuttle Uplink: [M ? M.getStatusText() : "*OFFLINE*"]"]
    " if(M) var/destination_found for(var/obj/docking_port/stationary/S in SSshuttle.stationary) @@ -47,7 +47,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also continue destination_found = 1 dat += "Send to [S.name]
    " - if(!destination_found && z == ZLEVEL_STATION) //Only available if miners are lazy and did not set an LZ using the remote. + if(!destination_found && (z in GLOB.station_z_levels)) //Only available if miners are lazy and did not set an LZ using the remote. dat += "Prepare for blind drop? (Dangerous)
    " if(LAZYLEN(turrets)) dat += "
    Perimeter Defense System: Enable All / Disable All
    \ @@ -86,7 +86,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also return if(href_list["move"]) - if(z != ZLEVEL_STATION && shuttleId == "colony_drop") + if(!(z in GLOB.station_z_levels) && shuttleId == "colony_drop") to_chat(usr, "You can't move the base again!") return var/shuttle_error = SSshuttle.moveShuttle(shuttleId, href_list["move"], 1) @@ -200,7 +200,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also var/obj/machinery/computer/auxillary_base/AB for (var/obj/machinery/computer/auxillary_base/A in GLOB.machines) - if(A.z == ZLEVEL_STATION) + if(A.z in GLOB.station_z_levels) AB = A break if(!AB) @@ -345,4 +345,4 @@ obj/docking_port/stationary/public_mining_dock #undef BAD_ZLEVEL #undef BAD_AREA #undef BAD_COORDS -#undef ZONE_SET \ No newline at end of file +#undef ZONE_SET diff --git a/code/modules/mining/aux_base_camera.dm b/code/modules/mining/aux_base_camera.dm index 56b7fe3175..4270b54b0a 100644 --- a/code/modules/mining/aux_base_camera.dm +++ b/code/modules/mining/aux_base_camera.dm @@ -7,7 +7,7 @@ var/area/starting_area /mob/camera/aiEye/remote/base_construction/Initialize() - ..() + . = ..() starting_area = get_area(loc) /mob/camera/aiEye/remote/base_construction/setLoc(var/t) @@ -54,7 +54,7 @@ RCD = new(src) /obj/machinery/computer/camera_advanced/base_construction/Initialize(mapload) - ..() + . = ..() if(mapload) //Map spawned consoles have a filled RCD and stocked special structures RCD.matter = RCD.max_matter fans_remaining = 4 @@ -151,8 +151,7 @@ to_chat(owner, "You can only build within the mining base!") return FALSE - - if(build_target.z != ZLEVEL_STATION) + if(!(build_target.z in GLOB.station_z_levels)) to_chat(owner, "The mining base has launched and can no longer be modified.") return FALSE diff --git a/code/modules/mining/equipment/kinetic_crusher.dm b/code/modules/mining/equipment/kinetic_crusher.dm index 372956ce2f..89e9d6fd10 100644 --- a/code/modules/mining/equipment/kinetic_crusher.dm +++ b/code/modules/mining/equipment/kinetic_crusher.dm @@ -231,6 +231,31 @@ else H.ranged_cooldown_time = bonus_value + world.time +//magmawing watcher +/obj/item/crusher_trophy/blaster_tubes/magma_wing + name = "magmawing watcher wing" + desc = "A still-searing wing from a magmawing watcher. Suitable as a trophy for a kinetic crusher." + icon_state = "magma_wing" + gender = NEUTER + bonus_value = 5 + +/obj/item/crusher_trophy/blaster_tubes/magma_wing/effect_desc() + return "mark detonation to make the next destabilizer shot deal [bonus_value] damage" + +/obj/item/crusher_trophy/blaster_tubes/magma_wing/on_projectile_fire(obj/item/projectile/destabilizer/marker, mob/living/user) + if(deadly_shot) + marker.name = "heated [marker.name]" + marker.icon_state = "lava" + marker.damage = bonus_value + marker.nodamage = FALSE + deadly_shot = FALSE + +//icewing watcher +/obj/item/crusher_trophy/watcher_wing/ice_wing + name = "icewing watcher wing" + desc = "A carefully preserved frozen wing from an icewing watcher. Suitable as a trophy for a kinetic crusher." + icon_state = "ice_wing" + //legion /obj/item/crusher_trophy/legion_skull name = "legion skull" @@ -281,7 +306,7 @@ playsound(L, 'sound/magic/fireball.ogg', 20, 1) new /obj/effect/temp_visual/fire(L.loc) addtimer(CALLBACK(src, .proc/pushback, L, user), 1) //no free backstabs, we push AFTER module stuff is done - L.adjustBruteLoss(bonus_value) + L.adjustFireLoss(bonus_value, forced = TRUE) /obj/item/crusher_trophy/tail_spike/proc/pushback(mob/living/target, mob/living/user) if(!QDELETED(target) && !QDELETED(user) && (!target.anchored || ismegafauna(target))) //megafauna will always be pushed diff --git a/code/modules/mining/equipment/wormhole_jaunter.dm b/code/modules/mining/equipment/wormhole_jaunter.dm index 00fdbfb561..e0197cc4e3 100644 --- a/code/modules/mining/equipment/wormhole_jaunter.dm +++ b/code/modules/mining/equipment/wormhole_jaunter.dm @@ -41,7 +41,7 @@ for(var/obj/item/device/radio/beacon/B in GLOB.teleportbeacons) var/turf/T = get_turf(B) - if(T.z == ZLEVEL_STATION) + if(T.z in GLOB.station_z_levels) destinations += B return destinations @@ -93,7 +93,7 @@ /obj/effect/portal/wormhole/jaunt_tunnel/teleport(atom/movable/M) if(!ismob(M) && !isobj(M)) //No don't teleport lighting and effects! return - + if(M.anchored && (!ismob(M) || (istype(M, /obj/mecha) && !mech_sized))) return diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index 827df09480..3562314458 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -173,7 +173,7 @@ SSblackbox.add_details("wisp_lantern","Returned") /obj/item/device/wisp_lantern/Initialize() - ..() + . = ..() wisp = new(src) /obj/item/device/wisp_lantern/Destroy() @@ -242,7 +242,7 @@ teleport_color = "#FD3F48" /obj/item/device/warp_cube/red/Initialize() - ..() + . = ..() if(!linked) var/obj/item/device/warp_cube/blue = new(src.loc) linked = blue @@ -397,7 +397,7 @@ desc = "Somehow, it's in two places at once." /obj/item/device/shared_storage/red/Initialize() - ..() + . = ..() if(!bag) var/obj/item/storage/backpack/shared/S = new(src) var/obj/item/device/shared_storage/blue = new(src.loc) @@ -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 @@ -701,7 +703,7 @@ var/list/mob/dead/observer/spirits /obj/item/melee/ghost_sword/Initialize() - ..() + . = ..() spirits = list() START_PROCESSING(SSobj, src) GLOB.poi_list |= src @@ -800,7 +802,7 @@ to_chat(user, "Your flesh begins to melt! Miraculously, you seem fine otherwise.") H.set_species(/datum/species/skeleton) if(3) - to_chat(user, "Power courses through you! You can now shift your form at will.") + to_chat(user, "Power courses through you! You can now shift your form at will.") if(user.mind) var/obj/effect/proc_holder/spell/targeted/shapeshift/dragon/D = new user.mind.AddSpell(D) @@ -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/mining/machine_redemption.dm b/code/modules/mining/machine_redemption.dm index 9726022afc..abead3ab9a 100644 --- a/code/modules/mining/machine_redemption.dm +++ b/code/modules/mining/machine_redemption.dm @@ -102,7 +102,7 @@ smelt_ore(ore) /obj/machinery/mineral/ore_redemption/proc/send_console_message() - if(z != ZLEVEL_STATION) + if(!(z in GLOB.station_z_levels)) return message_sent = TRUE var/area/A = get_area(src) diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index 71010d252e..15d05d37fe 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -69,7 +69,7 @@ var/global/list/dumb_rev_heads = list() /obj/machinery/computer/shuttle/mining/attack_hand(mob/user) - if(user.z == ZLEVEL_STATION && user.mind && (user.mind in SSticker.mode.head_revolutionaries) && !(user.mind in dumb_rev_heads)) + if((user.z in GLOB.station_z_levels) && user.mind && (user.mind in SSticker.mode.head_revolutionaries) && !(user.mind in dumb_rev_heads)) to_chat(user, "You get a feeling that leaving the station might be a REALLY dumb idea...") dumb_rev_heads += user.mind return diff --git a/code/modules/mining/minebot.dm b/code/modules/mining/minebot.dm index 2f2d3c0a7e..58f091fd4c 100644 --- a/code/modules/mining/minebot.dm +++ b/code/modules/mining/minebot.dm @@ -48,7 +48,7 @@ var/datum/action/innate/minedrone/dump_ore/dump_ore_action /mob/living/simple_animal/hostile/mining_drone/Initialize() - ..() + . = ..() toggle_light_action = new() toggle_light_action.Grant(src) toggle_mode_action = new() diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm index 7c1465d926..858bec6607 100644 --- a/code/modules/mining/ores_coins.dm +++ b/code/modules/mining/ores_coins.dm @@ -295,7 +295,7 @@ qdel(src) /obj/item/ore/Initialize() - ..() + . = ..() pixel_x = rand(0,16)-8 pixel_y = rand(0,8)-8 @@ -322,7 +322,7 @@ var/value = 1 /obj/item/coin/Initialize() - ..() + . = ..() pixel_x = rand(0,16)-8 pixel_y = rand(0,8)-8 diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index 19ed0bed9d..349ee546a4 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -413,6 +413,11 @@ if(job && IsJobAvailable(job.title)) available_job_count++; + + for(var/datum/job/prioritized_job in SSjob.prioritized_jobs) + if(prioritized_job.current_positions >= prioritized_job.total_positions) + SSjob.prioritized_jobs -= prioritized_job + if(length(SSjob.prioritized_jobs)) dat += "
    The station has flagged these jobs as high priority:
    " var/amt = length(SSjob.prioritized_jobs) diff --git a/code/modules/mob/dead/new_player/poll.dm b/code/modules/mob/dead/new_player/poll.dm index 9fba6eb2e9..9ca76c6356 100644 --- a/code/modules/mob/dead/new_player/poll.dm +++ b/code/modules/mob/dead/new_player/poll.dm @@ -411,7 +411,7 @@ to_chat(src, "Error: Invalid (non-numeric) votes in the vote data.") return 0 if (!(vote in optionlist)) - to_chat(src, "Votes for choices that do not appear to be in the poll detected") + to_chat(src, "Votes for choices that do not appear to be in the poll detected.") return 0 if (!numberedvotelist.len) to_chat(src, "Invalid vote data") diff --git a/code/modules/mob/dead/new_player/sprite_accessories.dm b/code/modules/mob/dead/new_player/sprite_accessories.dm index ec5a034f19..1eb1379dce 100644 --- a/code/modules/mob/dead/new_player/sprite_accessories.dm +++ b/code/modules/mob/dead/new_player/sprite_accessories.dm @@ -500,6 +500,10 @@ name = "Sidecut" icon_state = "hair_sidecut" +/datum/sprite_accessory/hair/largebun + name = "Large Bun" + icon_state = "hair_largebun" + ///////////////////////////// // Facial Hair Definitions // ///////////////////////////// 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 7fbcacfc64..228c9fe6e7 100644 --- a/code/modules/mob/dead/new_player/sprite_accessories_Citadel.dm +++ b/code/modules/mob/dead/new_player/sprite_accessories_Citadel.dm @@ -1,8 +1,8 @@ /datum/sprite_accessory - var/extra = 0 + var/extra = FALSE var/extra_icon = 'icons/mob/mam_bodyparts.dmi' var/extra_color_src = MUTCOLORS2 //The color source for the extra overlay. - var/extra2 = 0 + var/extra2 = FALSE var/extra2_icon = 'icons/mob/mam_bodyparts.dmi' var/extra2_color_src = MUTCOLORS3 // var/list/ckeys_allowed = null @@ -13,6 +13,10 @@ icon = 'icons/mob/mam_bodyparts.dmi' */ +/***************** Alphabetical Order please *************** +************* Keep it to Ears, Tails, Tails Animated *********/ + + /datum/sprite_accessory/tails/lizard/none name = "None" icon_state = "None" @@ -31,12 +35,17 @@ color_src = 0 icon = 'icons/mob/mam_bodyparts.dmi' +/datum/sprite_accessory/ears/human/bear + name = "Bear" + icon_state = "bear" + icon = 'icons/mob/mam_bodyparts.dmi' + /datum/sprite_accessory/tails/human/bear name = "Bear" icon_state = "bear" icon = 'icons/mob/mam_bodyparts.dmi' -/datum/sprite_accessory/ears/human/bear +/datum/sprite_accessory/tails_animated/human/bear name = "Bear" icon_state = "bear" icon = 'icons/mob/mam_bodyparts.dmi' @@ -51,10 +60,27 @@ icon_state = "catbig" icon = 'icons/mob/mam_bodyparts.dmi' +/datum/sprite_accessory/ears/human/cow + name = "Cow" + icon_state = "cow" + icon = 'icons/mob/mam_bodyparts.dmi' + gender_specific = 1 + +/datum/sprite_accessory/tails/human/cow + name = "Cow" + icon_state = "cow" + icon = 'icons/mob/mam_bodyparts.dmi' + +/datum/sprite_accessory/tails_animated/human/cow + name = "Cow" + icon_state = "cow" + icon = 'icons/mob/mam_bodyparts.dmi' + /datum/sprite_accessory/ears/fennec name = "Fennec" icon_state = "fennec" icon = 'icons/mob/mam_bodyparts.dmi' + hasinner = 1 /datum/sprite_accessory/tails/human/fennec name = "Fennec" @@ -76,25 +102,51 @@ name = "Fox" icon_state = "fox" icon = 'icons/mob/mam_bodyparts.dmi' - extra = 1 + extra = TRUE /datum/sprite_accessory/tails_animated/human/fox name = "Fox" icon_state = "fox" icon = 'icons/mob/mam_bodyparts.dmi' - extra = 1 + extra = TRUE + +/datum/sprite_accessory/tails/human/horse + name = "Horse" + icon_state = "horse" + icon = 'icons/mob/mam_bodyparts.dmi' + color_src = HAIR + +/datum/sprite_accessory/tails_animated/human/horse + name = "Horse" + icon_state = "horse" + icon = 'icons/mob/mam_bodyparts.dmi' + color_src = HAIR /datum/sprite_accessory/tails/human/husky name = "Husky" icon_state = "husky" icon = 'icons/mob/mam_bodyparts.dmi' - extra = 1 + extra = TRUE /datum/sprite_accessory/tails_animated/human/husky name = "Husky" icon_state = "husky" icon = 'icons/mob/mam_bodyparts.dmi' - extra = 1 + extra = TRUE + +/datum/sprite_accessory/tails/human/kitsune + name = "Kitsune" + icon_state = "kitsune" + extra = TRUE + extra_color_src = MUTCOLORS2 + icon = 'icons/mob/mam_bodyparts.dmi' + +/datum/sprite_accessory/tails_animated/human/kitsune + name = "Kitsune" + icon_state = "kitsune" + extra = TRUE + extra_color_src = MUTCOLORS2 + icon = 'icons/mob/mam_bodyparts.dmi' /datum/sprite_accessory/ears/lab name = "Dog, Floppy" @@ -119,6 +171,51 @@ 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/rabbit + name = "Rabbit" + icon_state = "rabbit" + hasinner= 1 + icon = 'icons/mob/mam_bodyparts.dmi' + +/datum/sprite_accessory/tails/human/rabbit + name = "Rabbit" + icon_state = "rabbit" + color_src = 0 + icon = 'icons/mob/mam_bodyparts.dmi' + +/datum/sprite_accessory/tails_animated/human/rabbit + name = "Rabbit" + icon_state = "rabbit" + color_src = 0 + icon = 'icons/mob/mam_bodyparts.dmi' + +/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" @@ -150,7 +247,7 @@ /datum/sprite_accessory/ears/wolf name = "Wolf" icon_state = "wolf" - extra = 1 + hasinner = 1 /datum/sprite_accessory/tails/human/wolf name = "Wolf" @@ -162,18 +259,6 @@ icon_state = "wolf" icon = 'icons/mob/mam_bodyparts.dmi' -/datum/sprite_accessory/tails/human/rabbit - name = "Rabbit" - icon_state = "rabbit" - color_src = 0 - icon = 'icons/mob/mam_bodyparts.dmi' - -/datum/sprite_accessory/ears/human/rabbit - name = "Rabbit" - icon_state = "rabbit" - hasinner= 1 - icon = 'icons/mob/mam_bodyparts.dmi' - /****************************************** *************** Body Parts **************** *******************************************/ @@ -198,35 +283,46 @@ **************** 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' + color_src = MUTCOLORS3 + /datum/sprite_accessory/snouts/lcanid name = "Fox, Long" icon_state = "lcanid" icon = 'icons/mob/mam_bodyparts.dmi' - extra = 1 + extra = TRUE /datum/sprite_accessory/snouts/scanid name = "Fox, Short" icon_state = "scanid" icon = 'icons/mob/mam_bodyparts.dmi' - extra = 1 + extra = TRUE /datum/sprite_accessory/snouts/wolf name = "Wolf" icon_state = "wolf" icon = 'icons/mob/mam_bodyparts.dmi' - extra = 1 + extra = TRUE /datum/sprite_accessory/snouts/husky name = "Husky" icon_state = "husky" icon = 'icons/mob/mam_bodyparts.dmi' - extra = 1 + extra = TRUE /datum/sprite_accessory/snouts/otie name = "Otie" icon_state = "otie" icon = 'icons/mob/mam_bodyparts.dmi' - extra = 1 + extra = TRUE /****************************************** ************ Actual Species *************** @@ -235,31 +331,30 @@ /datum/sprite_accessory/mam_tails/ailurus name = "Ailurus" icon_state = "ailurus" - extra = 1 - extra_color_src = MUTCOLORS2 + extra = TRUE /datum/sprite_accessory/mam_tails_animated/ailurus name = "Ailurus" icon_state = "ailurus" - extra = 1 - extra_color_src = MUTCOLORS2 - -/datum/sprite_accessory/mam_tails/bear - name = "Bear" - icon_state = "bear" - icon = 'icons/mob/mam_bodyparts.dmi' + extra = TRUE /datum/sprite_accessory/mam_ears/bear name = "Bear" icon_state = "bear" - icon = 'icons/mob/mam_bodyparts.dmi' + +/datum/sprite_accessory/mam_tails/bear + name = "Bear" + icon_state = "bear" + +/datum/sprite_accessory/mam_tails_animated/bear + name = "Bear" + icon_state = "bear" /datum/sprite_accessory/mam_ears/catbig name = "Cat, Big" icon_state = "cat" hasinner = 1 - icon = 'icons/mob/mutant_bodyparts.dmi' - + /datum/sprite_accessory/mam_tails/catbig name = "Cat, Big" icon_state = "catbig" @@ -272,6 +367,14 @@ name = "Cow" icon_state = "cow" gender_specific = 1 + +/datum/sprite_accessory/mam_tail/cow + name = "Cow" + icon_state = "cow" + +/datum/sprite_accessory/mam_tails_animated/cow + name = "Cow" + icon_state = "cow" /datum/sprite_accessory/mam_ears/deer name = "Deer" @@ -280,8 +383,7 @@ /datum/sprite_accessory/mam_tails/eevee name = "Eevee" icon_state = "eevee" - extra = 1 - extra_color_src = MUTCOLORS2 + extra = TRUE /datum/sprite_accessory/mam_ears/eevee name = "Eevee" @@ -290,8 +392,7 @@ /datum/sprite_accessory/mam_tails_animated/eevee name = "Eevee" icon_state = "eevee" - extra = 1 - extra_color_src = MUTCOLORS2 + extra = TRUE /datum/sprite_accessory/mam_ears/fennec name = "Fennec" @@ -309,25 +410,17 @@ /datum/sprite_accessory/mam_ears/fox name = "Fox" icon_state = "fox" - hasinner = 0 + hasinner = 1 /datum/sprite_accessory/mam_tails/fox name = "Fox" icon_state = "fox" - extra = 1 - extra_color_src = MUTCOLORS2 + extra = TRUE /datum/sprite_accessory/mam_tails_animated/fox name = "Fox" icon_state = "fox" - extra = 1 - extra_color_src = MUTCOLORS2 - -/datum/sprite_accessory/mam_ears/husky - name = "Husky" - icon_state = "wolf" - icon = 'icons/mob/mam_bodyparts.dmi' - extra = 1 + extra = TRUE /datum/sprite_accessory/mam_tails/hawk name = "Hawk" @@ -337,15 +430,54 @@ name = "Hawk" icon_state = "hawk" +/datum/sprite_accessory/mam_tails/horse + name = "Horse" + icon_state = "horse" + color_src = HAIR + +/datum/sprite_accessory/mam_tails_animated/horse + name = "Horse" + icon_state = "Horse" + color_src = HAIR + +/datum/sprite_accessory/mam_ears/husky + name = "Husky" + icon_state = "wolf" + icon = 'icons/mob/mam_bodyparts.dmi' + extra = TRUE + /datum/sprite_accessory/mam_tails/husky name = "Husky" icon_state = "husky" - extra = 1 + extra = TRUE /datum/sprite_accessory/mam_tails_animated/husky name = "Husky" icon_state = "husky" - extra = 1 + extra = TRUE + +/datum/sprite_accessory/mam_ears/kangaroo + name = "kangaroo" + icon_state = "kangaroo" + extra = TRUE + +/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 = TRUE + +/datum/sprite_accessory/mam_tails_animated/kitsune + name = "Kitsune" + icon_state = "kitsune" + extra = TRUE /datum/sprite_accessory/mam_ears/lab name = "Dog, Long" @@ -386,6 +518,48 @@ name = "Otusian" icon_state = "otie" +/datum/sprite_accessory/mam_ears/rabbit + name = "Rabbit" + icon_state = "rabbit" + hasinner= 1 + +/datum/sprite_accessory/mam_tails/rabbit + name = "Rabbit" + icon_state = "rabbit" + +/datum/sprite_accessory/mam_tails_animated/rabbit + name = "Rabbit" + icon_state = "rabbit" + +/datum/sprite_accessory/mam_ears/sergal + name = "Sergal" + icon_state = "sergal" + hasinner= 1 + +/datum/sprite_accessory/mam_tails/sergal + name = "Sergal" + icon_state = "sergal" + +/datum/sprite_accessory/mam_tails_animated/sergal + name = "Sergal" + icon_state = "sergal" + +/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 = TRUE + +/datum/sprite_accessory/mam_tails_animated/skunk + name = "skunk" + icon_state = "skunk" + color_src = 0 + extra = TRUE + /datum/sprite_accessory/mam_tails/shark name = "Shark" icon_state = "shark" @@ -394,30 +568,19 @@ /datum/sprite_accessory/mam_tails_animated/shark name = "Shark" 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 + color_src = MUTCOLORS /datum/sprite_accessory/mam_tails/shepherd name = "Shepherd" icon_state = "shepherd" - extra = 1 - extra2 = 1 + extra = TRUE + extra2 = TRUE /datum/sprite_accessory/mam_tails_animated/shepherd name = "Shepherd" icon_state = "shepherd" - extra = 1 - extra2 = 1 + extra = TRUE + extra2 = TRUE /datum/sprite_accessory/mam_ears/squirrel name = "Squirrel" @@ -435,7 +598,7 @@ /datum/sprite_accessory/mam_ears/wolf name = "Wolf" icon_state = "wolf" - extra = 1 + hasinner = 1 /datum/sprite_accessory/mam_tails/wolf name = "Wolf" @@ -445,39 +608,13 @@ 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_ears/rabbit - name = "Rabbit" - icon_state = "rabbit" - hasinner= 1 - icon = 'icons/mob/mam_bodyparts.dmi' - /****************************************** ************ Body Markings **************** *******************************************/ /datum/sprite_accessory/mam_body_markings - extra = 1 - extra2 = 1 + extra = TRUE + extra2 = TRUE icon = 'icons/mob/mam_body_markings.dmi' /datum/sprite_accessory/mam_body_markings/none @@ -487,8 +624,6 @@ /datum/sprite_accessory/mam_body_markings/ailurus name = "Red Panda" icon_state = "ailurus" - extra_color_src = MUTCOLORS2 - extra2_color_src = MUTCOLORS3 gender_specific = 1 /datum/sprite_accessory/mam_body_markings/belly @@ -530,20 +665,11 @@ /datum/sprite_accessory/mam_body_markings/fennec name = "Fennec" icon_state = "Fennec" - extra_color_src = MUTCOLORS3 gender_specific = 1 /datum/sprite_accessory/mam_body_markings/fox name = "Fox" icon_state = "fox" - extra_color_src = MUTCOLORS3 - gender_specific = 1 - -/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_body_markings/hawk @@ -593,22 +719,23 @@ color_src = MUTCOLORS2 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 ****************** *******************************************/ /datum/sprite_accessory/taur icon = 'icons/mob/mam_taur.dmi' extra_icon = 'icons/mob/mam_taur.dmi' - extra = 1 + extra = TRUE extra2_icon = 'icons/mob/mam_taur.dmi' - extra2 = 1 + extra2 = TRUE center = TRUE dimension_x = 64 @@ -711,7 +838,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' @@ -739,17 +865,65 @@ icon_state = "warrior" icon = 'icons/mob/xeno_parts_greyscale.dmi' +// *** Snooooow flaaaaake *** + +/datum/sprite_accessory/mam_body_markings/guilmon + name = "Guilmon" + icon_state = "guilmon" + gender_specific = 1 + +/datum/sprite_accessory/mam_tails/guilmon + name = "Guilmon" + icon_state = "guilmon" + extra = TRUE + +/datum/sprite_accessory/mam_tails_animated/guilmon + name = "Guilmon" + icon_state = "guilmon" + extra = TRUE + +/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 = TRUE + extra_color_src = MUTCOLORS3 + locked = TRUE + +/datum/sprite_accessory/mam_tails/sabresune + name = "sabresune" + icon_state = "sabresune" + extra = TRUE + locked = TRUE + +/datum/sprite_accessory/mam_tails_animated/sabresune + name = "sabresune" + icon_state = "sabresune" + extra = TRUE + +/datum/sprite_accessory/mam_body_markings/sabresune + name = "Sabresune" + icon_state = "sabresune" + color_src = MUTCOLORS2 + extra = FALSE + extra2 = FALSE + locked = TRUE +*/ diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 126f3bcf01..9eb16d74e2 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -106,7 +106,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER) if(turfs.len) T = pick(turfs) else - T = locate(round(world.maxx/2), round(world.maxy/2), ZLEVEL_STATION) //middle of the station + T = locate(round(world.maxx/2), round(world.maxy/2), ZLEVEL_STATION_PRIMARY) //middle of the station loc = T @@ -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) @@ -823,10 +820,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp GLOB.observer_default_invisibility = amount /mob/dead/observer/proc/open_spawners_menu() - set name = "Mob spawners menu" - set desc = "See all currently available ghost spawners" + set name = "Spawners Menu" + set desc = "See all currently available spawners" set category = "Ghost" if(!spawners_menu) spawners_menu = new(src) - spawners_menu.ui_interact(src) \ No newline at end of file + spawners_menu.ui_interact(src) diff --git a/code/modules/mob/living/bloodcrawl.dm b/code/modules/mob/living/bloodcrawl.dm index 32ee4d9e3d..b749bcda91 100644 --- a/code/modules/mob/living/bloodcrawl.dm +++ b/code/modules/mob/living/bloodcrawl.dm @@ -162,7 +162,7 @@ return src.loc = B.loc src.client.eye = src - src.visible_message("[src] rises out of the pool of blood!") + src.visible_message("[src] rises out of the pool of blood!") exit_blood_effect(B) if(iscarbon(src)) var/mob/living/carbon/C = src diff --git a/code/modules/mob/living/brain/brain.dm b/code/modules/mob/living/brain/brain.dm index 5161f94808..c437daef48 100644 --- a/code/modules/mob/living/brain/brain.dm +++ b/code/modules/mob/living/brain/brain.dm @@ -7,7 +7,7 @@ see_invisible = SEE_INVISIBLE_LIVING /mob/living/brain/Initialize() - ..() + . = ..() create_dna(src) stored_dna.initialize_dna(random_blood_type()) if(isturf(loc)) //not spawned in an MMI or brain organ (most likely adminspawned) diff --git a/code/modules/mob/living/brain/posibrain.dm b/code/modules/mob/living/brain/posibrain.dm index 175e04dcac..d158eb9576 100644 --- a/code/modules/mob/living/brain/posibrain.dm +++ b/code/modules/mob/living/brain/posibrain.dm @@ -149,7 +149,7 @@ GLOBAL_VAR(posibrain_notify_cooldown) to_chat(user, msg) /obj/item/device/mmi/posibrain/Initialize() - ..() + . = ..() brainmob = new(src) var/new_name if(!LAZYLEN(possible_names)) 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/alien/larva/powers.dm b/code/modules/mob/living/carbon/alien/larva/powers.dm index 64ee746b06..36191203ad 100644 --- a/code/modules/mob/living/carbon/alien/larva/powers.dm +++ b/code/modules/mob/living/carbon/alien/larva/powers.dm @@ -1,62 +1,62 @@ -/obj/effect/proc_holder/alien/hide - name = "Hide" - desc = "Allows aliens to hide beneath tables or certain items. Toggled on or off." - plasma_cost = 0 - - action_icon_state = "alien_hide" - -/obj/effect/proc_holder/alien/hide/fire(mob/living/carbon/alien/user) - if(user.stat != CONSCIOUS) - return - - if (user.layer != ABOVE_NORMAL_TURF_LAYER) - user.layer = ABOVE_NORMAL_TURF_LAYER - user.visible_message("[user] scurries to the ground!", \ - "You are now hiding.") - else - user.layer = MOB_LAYER - user.visible_message("[user.] slowly peeks up from the ground...", \ - "You stop hiding.") - return 1 - - -/obj/effect/proc_holder/alien/larva_evolve - name = "Evolve" - desc = "Evolve into a higher alien caste." - plasma_cost = 0 - - action_icon_state = "alien_evolve_larva" - -/obj/effect/proc_holder/alien/larva_evolve/fire(mob/living/carbon/alien/user) - if(!islarva(user)) - return - var/mob/living/carbon/alien/larva/L = user - - if(L.handcuffed || L.legcuffed) // Cuffing larvas ? Eh ? - to_chat(user, "You cannot evolve when you are cuffed.") - - if(L.amount_grown >= L.max_grown) //TODO ~Carn - to_chat(L, "You are growing into a beautiful alien! It is time to choose a caste.") - to_chat(L, "There are three to choose from:") - to_chat(L, "Hunters are the most agile caste, tasked with hunting for hosts. They are faster than a human and can even pounce, but are not much tougher than a drone.") - to_chat(L, "Sentinels are tasked with protecting the hive. With their ranged spit, invisibility, and high health, they make formidable guardians and acceptable secondhand hunters.") - to_chat(L, "Drones are the weakest and slowest of the castes, but can grow into a praetorian and then queen if no queen exists, and are vital to maintaining a hive with their resin secretion abilities.") - var/alien_caste = alert(L, "Please choose which alien caste you shall belong to.",,"Hunter","Sentinel","Drone") - - if(user.incapacitated()) //something happened to us while we were choosing. - return - - var/mob/living/carbon/alien/humanoid/new_xeno - switch(alien_caste) - if("Hunter") - new_xeno = new /mob/living/carbon/alien/humanoid/hunter(L.loc) - if("Sentinel") - new_xeno = new /mob/living/carbon/alien/humanoid/sentinel(L.loc) - if("Drone") - new_xeno = new /mob/living/carbon/alien/humanoid/drone(L.loc) - - L.alien_evolve(new_xeno) - return 0 - else - to_chat(user, "You are not fully grown.") - return 0 \ No newline at end of file +/obj/effect/proc_holder/alien/hide + name = "Hide" + desc = "Allows aliens to hide beneath tables or certain items. Toggled on or off." + plasma_cost = 0 + + action_icon_state = "alien_hide" + +/obj/effect/proc_holder/alien/hide/fire(mob/living/carbon/alien/user) + if(user.stat != CONSCIOUS) + return + + if (user.layer != ABOVE_NORMAL_TURF_LAYER) + user.layer = ABOVE_NORMAL_TURF_LAYER + user.visible_message("[user] scurries to the ground!", \ + "You are now hiding.") + else + user.layer = MOB_LAYER + user.visible_message("[user.] slowly peeks up from the ground...", \ + "You stop hiding.") + return 1 + + +/obj/effect/proc_holder/alien/larva_evolve + name = "Evolve" + desc = "Evolve into a higher alien caste." + plasma_cost = 0 + + action_icon_state = "alien_evolve_larva" + +/obj/effect/proc_holder/alien/larva_evolve/fire(mob/living/carbon/alien/user) + if(!islarva(user)) + return + var/mob/living/carbon/alien/larva/L = user + + if(L.handcuffed || L.legcuffed) // Cuffing larvas ? Eh ? + to_chat(user, "You cannot evolve when you are cuffed.") + + if(L.amount_grown >= L.max_grown) //TODO ~Carn + to_chat(L, "You are growing into a beautiful alien! It is time to choose a caste.") + to_chat(L, "There are three to choose from:") + to_chat(L, "Hunters are the most agile caste, tasked with hunting for hosts. They are faster than a human and can even pounce, but are not much tougher than a drone.") + to_chat(L, "Sentinels are tasked with protecting the hive. With their ranged spit, invisibility, and high health, they make formidable guardians and acceptable secondhand hunters.") + to_chat(L, "Drones are the weakest and slowest of the castes, but can grow into a praetorian and then queen if no queen exists, and are vital to maintaining a hive with their resin secretion abilities.") + var/alien_caste = alert(L, "Please choose which alien caste you shall belong to.",,"Hunter","Sentinel","Drone") + + if(user.incapacitated()) //something happened to us while we were choosing. + return + + var/mob/living/carbon/alien/humanoid/new_xeno + switch(alien_caste) + if("Hunter") + new_xeno = new /mob/living/carbon/alien/humanoid/hunter(L.loc) + if("Sentinel") + new_xeno = new /mob/living/carbon/alien/humanoid/sentinel(L.loc) + if("Drone") + new_xeno = new /mob/living/carbon/alien/humanoid/drone(L.loc) + + L.alien_evolve(new_xeno) + return 0 + else + to_chat(user, "You are not fully grown.") + return 0 diff --git a/code/modules/mob/living/carbon/alien/organs.dm b/code/modules/mob/living/carbon/alien/organs.dm index e538d32fb7..ae8eec5529 100644 --- a/code/modules/mob/living/carbon/alien/organs.dm +++ b/code/modules/mob/living/carbon/alien/organs.dm @@ -128,12 +128,12 @@ return if(isalien(owner)) //Different effects for aliens than humans to_chat(owner, "Your Queen has been struck down!") - to_chat(owner, "You are struck with overwhelming agony! You feel confused, and your connection to the hivemind is severed.") + to_chat(owner, "You are struck with overwhelming agony! You feel confused, and your connection to the hivemind is severed.") owner.emote("roar") owner.Stun(200) //Actually just slows them down a bit. else if(ishuman(owner)) //Humans, being more fragile, are more overwhelmed by the mental backlash. - to_chat(owner, "You feel a splitting pain in your head, and are struck with a wave of nausea. You cannot hear the hivemind anymore!") + to_chat(owner, "You feel a splitting pain in your head, and are struck with a wave of nausea. You cannot hear the hivemind anymore!") owner.emote("scream") owner.Knockdown(100) diff --git a/code/modules/mob/living/carbon/alien/special/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm index a2197baa9b..8b8b8d5761 100644 --- a/code/modules/mob/living/carbon/alien/special/facehugger.dm +++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm @@ -119,14 +119,12 @@ Leap(hit_atom) /obj/item/clothing/mask/facehugger/proc/valid_to_attach(mob/living/M) - // valid targets: corgis, carbons except aliens and devils + // valid targets: carbons except aliens and devils // facehugger state early exit checks if(stat != CONSCIOUS) return FALSE if(attached) return FALSE - if(!iscorgi(M) && !iscarbon(M)) - return FALSE if(iscarbon(M)) // disallowed carbons if(isalien(M) || isdevil(M)) @@ -140,9 +138,8 @@ return FALSE // carbon, has head, not alien or devil, has no hivenode or embryo: valid return TRUE - else if(iscorgi(M)) - // corgi: valid - return TRUE + + return FALSE /obj/item/clothing/mask/facehugger/proc/Leap(mob/living/M) if(!valid_to_attach(M)) @@ -183,11 +180,6 @@ //ensure we detach once we no longer need to be attached addtimer(CALLBACK(src, .proc/detach), MAX_IMPREGNATION_TIME) - if (iscorgi(M)) - var/mob/living/simple_animal/pet/dog/corgi/C = M - loc = C - C.facehugger = src - C.regenerate_icons() if(!sterile) M.take_bodypart_damage(strength,0) //done here so that humans in helmets take damage @@ -221,10 +213,6 @@ if((!LC || LC.status != BODYPART_ROBOTIC) && !target.getorgan(/obj/item/organ/body_egg/alien_embryo)) new /obj/item/organ/body_egg/alien_embryo(target) - if(iscorgi(target)) - var/mob/living/simple_animal/pet/dog/corgi/C = target - src.loc = get_turf(C) - C.facehugger = null else target.visible_message("[src] violates [target]'s face!", \ "[src] violates [target]'s face!") @@ -263,7 +251,7 @@ if(M.getorgan(/obj/item/organ/alien/hivenode)) return 0 - if(iscorgi(M) || ismonkey(M)) + if(ismonkey(M)) return 1 var/mob/living/carbon/C = M diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 34d788e5ff..717c5478a5 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() @@ -817,7 +860,7 @@ /mob/living/carbon/vv_get_dropdown() . = ..() . += "---" - .["Make AI"] = "?_src_=vars;makeai=\ref[src]" - .["Modify bodypart"] = "?_src_=vars;editbodypart=\ref[src]" - .["Modify organs"] = "?_src_=vars;editorgans=\ref[src]" - .["Hallucinate"] = "?_src_=vars;hallucinate=\ref[src]" + .["Make AI"] = "?_src_=vars;[HrefToken()];makeai=\ref[src]" + .["Modify bodypart"] = "?_src_=vars;[HrefToken()];editbodypart=\ref[src]" + .["Modify organs"] = "?_src_=vars;[HrefToken()];editorgans=\ref[src]" + .["Hallucinate"] = "?_src_=vars;[HrefToken()];hallucinate=\ref[src]" diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index fab12538fc..6068ef2d66 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -244,7 +244,7 @@ /mob/living/carbon/proc/help_shake_act(mob/living/carbon/M) if(on_fire) - to_chat(M, "You can't put them out with just your bare hands!") + to_chat(M, "You can't put them out with just your bare hands!") return if(health >= 0 && !(status_flags & FAKEDEATH)) @@ -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..aa37315b13 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. @@ -19,6 +17,9 @@ if(legcuffed) . += legcuffed.slowdown + if(stat == SOFT_CRIT) + . += SOFTCRIT_ADD_SLOWDOWN + /mob/living/carbon/slip(knockdown_amount, obj/O, lube) if(movement_type & FLYING) return 0 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..0fd685e77c 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -34,7 +34,7 @@ INITIALIZE_IMMEDIATE(/mob/living/carbon/human/dummy) handcrafting = new() - ..() + . = ..() /mob/living/carbon/human/create_internal_organs() if(!(NOHUNGER in dna.species.species_traits)) @@ -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) @@ -906,12 +906,12 @@ INITIALIZE_IMMEDIATE(/mob/living/carbon/human/dummy) /mob/living/carbon/human/vv_get_dropdown() . = ..() . += "---" - .["Make monkey"] = "?_src_=vars;makemonkey=\ref[src]" - .["Set Species"] = "?_src_=vars;setspecies=\ref[src]" - .["Make cyborg"] = "?_src_=vars;makerobot=\ref[src]" - .["Make alien"] = "?_src_=vars;makealien=\ref[src]" - .["Make slime"] = "?_src_=vars;makeslime=\ref[src]" - .["Toggle Purrbation"] = "?_src_=vars;purrbation=\ref[src]" + .["Make monkey"] = "?_src_=vars;[HrefToken()];makemonkey=\ref[src]" + .["Set Species"] = "?_src_=vars;[HrefToken()];setspecies=\ref[src]" + .["Make cyborg"] = "?_src_=vars;[HrefToken()];makerobot=\ref[src]" + .["Make alien"] = "?_src_=vars;[HrefToken()];makealien=\ref[src]" + .["Make slime"] = "?_src_=vars;[HrefToken()];makeslime=\ref[src]" + .["Toggle Purrbation"] = "?_src_=vars;[HrefToken()];purrbation=\ref[src]" /mob/living/carbon/human/MouseDrop_T(mob/living/target, mob/living/user) if((target != pulling) || (grab_state < GRAB_AGGRESSIVE) || (user != target) || !isliving(user) || stat || user.stat)//Get consent first :^) 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/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index 52650ec273..06f3007e6b 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -1,67 +1,67 @@ -/mob/living/carbon/human/movement_delay() - . = 0 - . += ..() - . += config.human_delay - . += dna.species.movement_delay(src) - -/mob/living/carbon/human/slip(knockdown_amount, obj/O, lube) +/mob/living/carbon/human/movement_delay() + . = 0 + . += ..() + . += config.human_delay + . += dna.species.movement_delay(src) + +/mob/living/carbon/human/slip(knockdown_amount, obj/O, lube) if(isobj(shoes) && (shoes.flags_1&NOSLIP_1) && !(lube&GALOSHES_DONT_HELP)) - return 0 - return ..() - -/mob/living/carbon/human/experience_pressure_difference() - playsound(src, 'sound/effects/space_wind.ogg', 50, 1) + return 0 + return ..() + +/mob/living/carbon/human/experience_pressure_difference() + playsound(src, 'sound/effects/space_wind.ogg', 50, 1) if(shoes && shoes.flags_1&NOSLIP_1) - return 0 - return ..() - -/mob/living/carbon/human/mob_has_gravity() - . = ..() - if(!.) - if(mob_negates_gravity()) - . = 1 - -/mob/living/carbon/human/mob_negates_gravity() - return ((shoes && shoes.negates_gravity()) || dna.species.negates_gravity(src)) - -/mob/living/carbon/human/Move(NewLoc, direct) - . = ..() - for(var/datum/mutation/human/HM in dna.mutations) - HM.on_move(src, NewLoc) - if(shoes) - if(!lying && !buckled) - if(loc == NewLoc) - if(!has_gravity(loc)) - return - var/obj/item/clothing/shoes/S = shoes - - //Bloody footprints - var/turf/T = get_turf(src) - if(S.bloody_shoes && S.bloody_shoes[S.blood_state]) - var/obj/effect/decal/cleanable/blood/footprints/oldFP = locate(/obj/effect/decal/cleanable/blood/footprints) in T - if(oldFP && oldFP.blood_state == S.blood_state) - return - else - //No oldFP or it's a different kind of blood - S.bloody_shoes[S.blood_state] = max(0, S.bloody_shoes[S.blood_state]-BLOOD_LOSS_PER_STEP) - var/obj/effect/decal/cleanable/blood/footprints/FP = new /obj/effect/decal/cleanable/blood/footprints(T) - FP.blood_state = S.blood_state - FP.entered_dirs |= dir - FP.bloodiness = S.bloody_shoes[S.blood_state] - if(S.blood_DNA && S.blood_DNA.len) - FP.transfer_blood_dna(S.blood_DNA) - FP.update_icon() - update_inv_shoes() - //End bloody footprints - - S.step_action() - -/mob/living/carbon/human/Moved() - . = ..() - if(buckled_mobs && buckled_mobs.len && riding_datum) - riding_datum.on_vehicle_move() - -/mob/living/carbon/human/Process_Spacemove(movement_dir = 0) //Temporary laziness thing. Will change to handles by species reee. - if(..()) - return 1 - return dna.species.space_move(src) + return 0 + return ..() + +/mob/living/carbon/human/mob_has_gravity() + . = ..() + if(!.) + if(mob_negates_gravity()) + . = 1 + +/mob/living/carbon/human/mob_negates_gravity() + return ((shoes && shoes.negates_gravity()) || dna.species.negates_gravity(src)) + +/mob/living/carbon/human/Move(NewLoc, direct) + . = ..() + for(var/datum/mutation/human/HM in dna.mutations) + HM.on_move(src, NewLoc) + + if(shoes) + if(!lying && !buckled) + if(loc == NewLoc) + if(!has_gravity(loc)) + return + var/obj/item/clothing/shoes/S = shoes + + //Bloody footprints + var/turf/T = get_turf(src) + if(S.bloody_shoes && S.bloody_shoes[S.blood_state]) + var/obj/effect/decal/cleanable/blood/footprints/oldFP = locate(/obj/effect/decal/cleanable/blood/footprints) in T + if(oldFP && oldFP.blood_state == S.blood_state) + return + else + //No oldFP or it's a different kind of blood + S.bloody_shoes[S.blood_state] = max(0, S.bloody_shoes[S.blood_state]-BLOOD_LOSS_PER_STEP) + var/obj/effect/decal/cleanable/blood/footprints/FP = new /obj/effect/decal/cleanable/blood/footprints(T) + FP.blood_state = S.blood_state + FP.entered_dirs |= dir + FP.bloodiness = S.bloody_shoes[S.blood_state] + if(S.blood_DNA && S.blood_DNA.len) + FP.transfer_blood_dna(S.blood_DNA) + FP.update_icon() + update_inv_shoes() + //End bloody footprints + + S.step_action() +/mob/living/carbon/human/Moved() + . = ..() + if(buckled_mobs && buckled_mobs.len && riding_datum) + riding_datum.on_vehicle_move() + +/mob/living/carbon/human/Process_Spacemove(movement_dir = 0) //Temporary laziness thing. Will change to handles by species reee. + if(..()) + return 1 + return dna.species.space_move(src) diff --git a/code/modules/mob/living/carbon/human/interactive.dm b/code/modules/mob/living/carbon/human/interactive.dm index b1eaa5349b..6add1cb80c 100644 --- a/code/modules/mob/living/carbon/human/interactive.dm +++ b/code/modules/mob/living/carbon/human/interactive.dm @@ -87,17 +87,12 @@ /// SNPC voice handling /mob/living/carbon/human/interactive/proc/loadVoice() - if(fexists("data/npc_saves/snpc.sav")) - var/savefile/S = new /savefile("data/npc_saves/snpc.sav") - S["knownStrings"] >> knownStrings - fdel(S) - else - 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"] + 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() @@ -295,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") @@ -307,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" @@ -324,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 @@ -375,7 +370,7 @@ faction += "hostile" /mob/living/carbon/human/interactive/Initialize() - ..() + . = ..() set_species(/datum/species/synth) @@ -644,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)) @@ -1484,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) @@ -1509,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) @@ -1596,7 +1591,7 @@ TRAITS |= TRAIT_ROBUST TRAITS |= TRAIT_MEAN faction += "bot_angry" - ..() + . = ..() /mob/living/carbon/human/interactive/friendly/Initialize() TRAITS |= TRAIT_FRIENDLY @@ -1604,7 +1599,7 @@ faction += "bot_friendly" faction += "neutral" functions -= "combat" - ..() + . = ..() /mob/living/carbon/human/interactive/greytide/Initialize() TRAITS |= TRAIT_ROBUST @@ -1615,7 +1610,7 @@ targetInterestShift = 2 // likewise faction += "bot_grey" graytide = 1 - ..() + . = ..() //Walk softly and carry a big stick /mob/living/carbon/human/interactive/robust/Initialize() @@ -1623,4 +1618,4 @@ TRAITS |= TRAIT_ROBUST TRAITS |= TRAIT_SMART faction += "bot_power" - ..() + . = ..() diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 1fcf412fc8..e2a257e0ce 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) @@ -417,7 +422,7 @@ All effects don't start immediately, but rather get worse over time; the rate is if(drunkenness >= 91) adjustBrainLoss(0.4) if(prob(20) && !stat) - if(SSshuttle.emergency.mode == SHUTTLE_DOCKED && z == ZLEVEL_STATION) //QoL mainly + if(SSshuttle.emergency.mode == SHUTTLE_DOCKED && (z in GLOB.station_z_levels)) //QoL mainly to_chat(src, "You're so tired... but you can't miss that shuttle...") else to_chat(src, "Just a quick nap...") diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 730a398caa..821ed9d7a6 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1108,7 +1108,7 @@ if(prob(15)) if(!( H.hair_style == "Shaved") || !(H.hair_style == "Bald") || (HAIR in species_traits)) - to_chat(H, "Your hair starts to fall out in clumps...") + to_chat(H, "Your hair starts to fall out in clumps...") addtimer(CALLBACK(src, .proc/go_bald, H), 50) if(75 to 100) 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/golems.dm b/code/modules/mob/living/carbon/human/species_types/golems.dm index 14726df76a..49659f0128 100644 --- a/code/modules/mob/living/carbon/human/species_types/golems.dm +++ b/code/modules/mob/living/carbon/human/species_types/golems.dm @@ -80,11 +80,11 @@ /datum/species/golem/plasma/spec_life(mob/living/carbon/human/H) if(H.bodytemperature > 750) if(!boom_warning && H.on_fire) - to_chat(H, "You feel like you could blow up at any moment!") + to_chat(H, "You feel like you could blow up at any moment!") boom_warning = TRUE else if(boom_warning) - to_chat(H, "You feel more stable.") + to_chat(H, "You feel more stable.") boom_warning = FALSE if(H.bodytemperature > 850 && H.on_fire && prob(25)) 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/human/species_types/shadowpeople.dm b/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm index 3d30a3e1c1..636c2b7890 100644 --- a/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm @@ -1,23 +1,115 @@ -/datum/species/shadow - // Humans cursed to stay in the darkness, lest their life forces drain. They regain health in shadow and die in light. - name = "???" - id = "shadow" - sexes = 0 - blacklisted = 1 - ignored_by = list(/mob/living/simple_animal/hostile/faithless) - meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/shadow - species_traits = list(NOBREATH,NOBLOOD,RADIMMUNE,VIRUSIMMUNE) - dangerous_existence = 1 - mutanteyes = /obj/item/organ/eyes/night_vision - - -/datum/species/shadow/spec_life(mob/living/carbon/human/H) - var/light_amount = 0 - if(isturf(H.loc)) - var/turf/T = H.loc - light_amount = T.get_lumcount() - - if(light_amount > 0.2) //if there's enough light, start dying - H.take_overall_damage(1,1) - else if (light_amount < 0.2) //heal in the dark - H.heal_overall_damage(1,1) +/datum/species/shadow + // Humans cursed to stay in the darkness, lest their life forces drain. They regain health in shadow and die in light. + name = "???" + id = "shadow" + sexes = 0 + blacklisted = 1 + ignored_by = list(/mob/living/simple_animal/hostile/faithless) + meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/shadow + species_traits = list(NOBREATH,NOBLOOD,RADIMMUNE,VIRUSIMMUNE) + + dangerous_existence = 1 + mutanteyes = /obj/item/organ/eyes/night_vision + + +/datum/species/shadow/spec_life(mob/living/carbon/human/H) + var/turf/T = H.loc + if(istype(T)) + var/light_amount = T.get_lumcount() + + if(light_amount > SHADOW_SPECIES_LIGHT_THRESHOLD) //if there's enough light, start dying + H.take_overall_damage(1,1) + else if (light_amount < SHADOW_SPECIES_LIGHT_THRESHOLD) //heal in the dark + H.heal_overall_damage(1,1) + + +/datum/species/shadow/nightmare + name = "Nightmare" + id = "nightmare" + limbs_id = "shadow" + burnmod = 1.5 + blacklisted = TRUE + no_equip = list(slot_wear_mask, slot_wear_suit, slot_gloves, slot_shoes, slot_w_uniform, slot_s_store) + species_traits = list(NOBREATH,RESISTCOLD,RESISTPRESSURE,NOGUNS,NOBLOOD,RADIMMUNE,VIRUSIMMUNE,PIERCEIMMUNE,NODISMEMBER,NO_UNDERWEAR,NOHUNGER) + mutanteyes = /obj/item/organ/eyes/night_vision/nightmare + var/obj/effect/proc_holder/spell/targeted/shadowwalk/shadowwalk + + var/info_text = "You are a Nightmare. The ability shadow walk allows unlimited, unrestricted movement in the dark using. \ + Your light eater will destroy any light producing objects you attack, as well as destroy any lights a living creature may be holding. You will automatically dodge gunfire and melee attacks when on a dark tile." + +/datum/species/shadow/nightmare/on_species_gain(mob/living/carbon/C, datum/species/old_species) + . = ..() + var/obj/effect/proc_holder/spell/targeted/shadowwalk/SW = new + C.AddSpell(SW) + shadowwalk = SW + var/obj/item/light_eater/blade = new + C.put_in_hands(blade) + + to_chat(C, "[info_text]") + + C.real_name = "Nightmare" + C.name = "Nightmare" + if(C.mind) + C.mind.name = "Nightmare" + C.dna.real_name = "Nightmare" + +/datum/species/shadow/nightmare/on_species_loss(mob/living/carbon/C) + . = ..() + if(shadowwalk) + C.RemoveSpell(shadowwalk) + +/datum/species/shadow/nightmare/bullet_act(obj/item/projectile/P, mob/living/carbon/human/H) + var/turf/T = H.loc + if(istype(T)) + var/light_amount = T.get_lumcount() + if(light_amount < SHADOW_SPECIES_LIGHT_THRESHOLD) + H.visible_message("[H] dances in the shadows, evading [P]!") + playsound(T, "bullet_miss", 75, 1) + return -1 + return 0 + +/obj/item/light_eater + name = "light eater" + icon_state = "arm_blade" + item_state = "arm_blade" + force = 25 + armour_penetration = 35 + lefthand_file = 'icons/mob/inhands/antag/changeling_lefthand.dmi' + righthand_file = 'icons/mob/inhands/antag/changeling_righthand.dmi' + flags_1 = ABSTRACT_1 | NODROP_1 | DROPDEL_1 + w_class = WEIGHT_CLASS_HUGE + sharpness = IS_SHARP + +/obj/item/light_eater/afterattack(atom/movable/AM, mob/user, proximity) + if(!proximity) + return + if(isopenturf(AM)) //So you can actually melee with it + return + if(isliving(AM)) + var/mob/living/L = AM + if(iscyborg(AM)) + var/mob/living/silicon/robot/borg = AM + borg.update_headlamp(TRUE, 100) + else + for(var/obj/item/O in AM) + if(O.light_range && O.light_power) + disintegrate(O) + if(L.pulling && L.pulling.light_range && isitem(L.pulling)) + disintegrate(L.pulling) + else if(isitem(AM)) + var/obj/item/I = AM + if(I.light_range && I.light_power) + disintegrate(I) + +/obj/item/light_eater/proc/disintegrate(obj/item/O) + if(istype(O, /obj/item/device/pda)) + var/obj/item/device/pda/PDA = O + PDA.set_light(0) + PDA.fon = 0 + PDA.f_lum = 0 + PDA.update_icon() + visible_message("The light in [PDA] shorts out!") + else + visible_message("[O] is disintegrated by [src]!") + O.burn() + playsound(src, 'sound/items/welder.ogg', 50, 1) diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index a9d6bda10a..7fa8a90318 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -129,10 +129,10 @@ There are several things that need to be remembered: if(dna && dna.species.sexes) var/G = (gender == FEMALE) ? "f" : "m" if(G == "f" && U.fitted != NO_FEMALE_UNIFORM) - uniform_overlay = U.build_worn_icon(state = "[t_color]", default_layer = UNIFORM_LAYER, default_icon_file = 'icons/mob/uniform.dmi', isinhands = FALSE, femaleuniform = U.fitted) + uniform_overlay = U.build_worn_icon(state = "[t_color]", default_layer = UNIFORM_LAYER, default_icon_file = ((w_uniform.icon_override) ? w_uniform.icon_override : 'icons/mob/uniform.dmi'), isinhands = FALSE, femaleuniform = U.fitted) if(!uniform_overlay) - uniform_overlay = U.build_worn_icon(state = "[t_color]", default_layer = UNIFORM_LAYER, default_icon_file = 'icons/mob/uniform.dmi', isinhands = FALSE) + uniform_overlay = U.build_worn_icon(state = "[t_color]", default_layer = UNIFORM_LAYER, default_icon_file = ((w_uniform.icon_override) ? w_uniform.icon_override : 'icons/mob/uniform.dmi'), isinhands = FALSE) overlays_standing[UNIFORM_LAYER] = uniform_overlay @@ -154,7 +154,7 @@ There are several things that need to be remembered: update_observer_view(wear_id) //TODO: add an icon file for ID slot stuff, so it's less snowflakey - overlays_standing[ID_LAYER] = wear_id.build_worn_icon(state = wear_id.item_state, default_layer = ID_LAYER, default_icon_file = 'icons/mob/mob.dmi') + overlays_standing[ID_LAYER] = wear_id.build_worn_icon(state = wear_id.item_state, default_layer = ID_LAYER, default_icon_file = ((wear_id.icon_override) ? wear_id.icon_override : 'icons/mob/mob.dmi')) apply_overlay(ID_LAYER) @@ -185,7 +185,7 @@ There are several things that need to be remembered: var/t_state = gloves.item_state if(!t_state) t_state = gloves.icon_state - overlays_standing[GLOVES_LAYER] = gloves.build_worn_icon(state = t_state, default_layer = GLOVES_LAYER, default_icon_file = 'icons/mob/hands.dmi') + overlays_standing[GLOVES_LAYER] = gloves.build_worn_icon(state = t_state, default_layer = GLOVES_LAYER, default_icon_file = ((gloves.icon_override) ? gloves.icon_override : 'icons/mob/hands.dmi')) apply_overlay(GLOVES_LAYER) @@ -208,7 +208,7 @@ There are several things that need to be remembered: update_observer_view(glasses,1) if(!(head && (head.flags_inv & HIDEEYES)) && !(wear_mask && (wear_mask.flags_inv & HIDEEYES))) - overlays_standing[GLASSES_LAYER] = glasses.build_worn_icon(state = glasses.icon_state, default_layer = GLASSES_LAYER, default_icon_file = 'icons/mob/eyes.dmi') + overlays_standing[GLASSES_LAYER] = glasses.build_worn_icon(state = glasses.icon_state, default_layer = GLASSES_LAYER, default_icon_file = ((glasses.icon_override) ? glasses.icon_override : 'icons/mob/eyes.dmi')) apply_overlay(GLASSES_LAYER) @@ -230,7 +230,7 @@ There are several things that need to be remembered: client.screen += ears //add it to the client's screen update_observer_view(ears,1) - overlays_standing[EARS_LAYER] = ears.build_worn_icon(state = ears.icon_state, default_layer = EARS_LAYER, default_icon_file = 'icons/mob/ears.dmi') + overlays_standing[EARS_LAYER] = ears.build_worn_icon(state = ears.icon_state, default_layer = EARS_LAYER, default_icon_file = ((ears.icon_override) ? ears.icon_override : 'icons/mob/ears.dmi')) apply_overlay(EARS_LAYER) @@ -251,7 +251,7 @@ There are several things that need to be remembered: if(hud_used.inventory_shown) //if the inventory is open client.screen += shoes //add it to client's screen update_observer_view(shoes,1) - overlays_standing[SHOES_LAYER] = shoes.build_worn_icon(state = shoes.icon_state, default_layer = SHOES_LAYER, default_icon_file = 'icons/mob/feet.dmi') + overlays_standing[SHOES_LAYER] = shoes.build_worn_icon(state = shoes.icon_state, default_layer = SHOES_LAYER, default_icon_file = ((shoes.icon_override) ? shoes.icon_override : 'icons/mob/feet.dmi')) apply_overlay(SHOES_LAYER) @@ -297,7 +297,7 @@ There are several things that need to be remembered: if(!t_state) t_state = belt.icon_state - overlays_standing[BELT_LAYER] = belt.build_worn_icon(state = t_state, default_layer = BELT_LAYER, default_icon_file = 'icons/mob/belt.dmi') + overlays_standing[BELT_LAYER] = belt.build_worn_icon(state = t_state, default_layer = BELT_LAYER, default_icon_file = ((belt.icon_override) ? belt.icon_override : 'icons/mob/belt.dmi')) apply_overlay(BELT_LAYER) @@ -318,7 +318,7 @@ There are several things that need to be remembered: client.screen += wear_suit update_observer_view(wear_suit,1) - overlays_standing[SUIT_LAYER] = wear_suit.build_worn_icon(state = wear_suit.icon_state, default_layer = SUIT_LAYER, default_icon_file = 'icons/mob/suit.dmi') + overlays_standing[SUIT_LAYER] = wear_suit.build_worn_icon(state = wear_suit.icon_state, default_layer = SUIT_LAYER, default_icon_file = ((wear_suit.icon_override) ? wear_suit.icon_override : 'icons/mob/suit.dmi')) update_hair() update_mutant_bodyparts() diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index f1a6998523..b2e88e278a 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 @@ -56,11 +58,16 @@ var/datum/gas_mixture/breath - if(health <= HEALTH_THRESHOLD_CRIT || (pulledby && pulledby.grab_state >= GRAB_KILL && !getorganslot("breathing_tube"))) - losebreath++ + if(!getorganslot("breathing_tube")) + if(health <= HEALTH_THRESHOLD_FULLCRIT || (pulledby && pulledby.grab_state >= GRAB_KILL)) + losebreath++ //You can't breath at all when in critical or when being choked, so you're going to miss a breath + + else if(health <= HEALTH_THRESHOLD_CRIT) + losebreath += 0.25 //You're having trouble breathing in soft crit, so you'll miss a breath one in four times + //Suffocate - if(losebreath > 0) + if(losebreath >= 1) //You've missed a breath, take oxy damage losebreath-- if(prob(10)) emote("gasp") @@ -148,7 +155,7 @@ else //Enough oxygen failed_last_breath = 0 - if(oxyloss) + if(health >= HEALTH_THRESHOLD_CRIT) adjustOxyLoss(-5) oxygen_used = breath_gases["o2"][MOLES] clear_alert("not_enough_oxy") diff --git a/code/modules/mob/living/carbon/monkey/death.dm b/code/modules/mob/living/carbon/monkey/death.dm index 3c5cdf3b38..5b9125a5d1 100644 --- a/code/modules/mob/living/carbon/monkey/death.dm +++ b/code/modules/mob/living/carbon/monkey/death.dm @@ -3,3 +3,7 @@ /mob/living/carbon/monkey/dust_animation() new /obj/effect/temp_visual/dust_animation(loc, "dust-m") + +/mob/living/carbon/monkey/death(gibbed) + walk(src,0) // Stops dead monkeys from fleeing their attacker or climbing out from inside His Grace + . = ..() diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index 8adde0b69c..81e918e152 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -147,7 +147,7 @@ aggressive = TRUE /mob/living/carbon/monkey/angry/Initialize() - ..() + . = ..() if(prob(10)) var/obj/item/clothing/head/helmet/justice/escape/helmet = new(src) equip_to_slot_or_del(helmet,slot_head) diff --git a/code/modules/mob/living/carbon/monkey/punpun.dm b/code/modules/mob/living/carbon/monkey/punpun.dm index 2cf821093d..be716e26ba 100644 --- a/code/modules/mob/living/carbon/monkey/punpun.dm +++ b/code/modules/mob/living/carbon/monkey/punpun.dm @@ -21,7 +21,7 @@ else name = pick(pet_monkey_names) gender = pick(MALE, FEMALE) - ..() + . = ..() //These have to be after the parent new to ensure that the monkey //bodyparts are actually created before we try to equip things to @@ -42,23 +42,15 @@ ..() /mob/living/carbon/monkey/punpun/proc/Read_Memory() - if(fexists("data/npc_saves/Punpun.sav")) //legacy compatability to convert old format to new - 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 - fdel("data/npc_saves/Punpun.sav") - else - 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"] + 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/json_file = file("data/npc_saves/Punpun.json") @@ -76,6 +68,6 @@ if(!ancestor_name) file_data["ancestor_name"] = name fdel(json_file) - WRITE_FILE(json_file, json_encode(json_file)) + WRITE_FILE(json_file, json_encode(file_data)) 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..acea72e911 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 @@ -426,6 +429,7 @@ else return 0 + var/old_direction = dir var/atom/movable/pullee = pulling if(pullee && get_dist(src, pullee) > 1) stop_pulling() @@ -441,10 +445,6 @@ var/pull_dir = get_dir(src, pulling) if(get_dist(src, pulling) > 1 || ((pull_dir - 1) & pull_dir)) //puller and pullee more than one tile away or in diagonal position - if(isliving(pulling)) - var/mob/living/M = pulling - if(M.lying && !M.buckled && (prob(M.getBruteLoss()*200/M.maxHealth))) - M.makeTrail(T) pulling.Move(T, get_dir(pulling, T)) //the pullee tries to reach our previous position if(pulling && get_dist(src, pulling) > 1) //the pullee couldn't keep up stop_pulling() @@ -455,6 +455,10 @@ if (s_active && !(CanReach(s_active,view_only = TRUE))) s_active.close(src) + if(lying && !buckled && prob(getBruteLoss()*200/maxHealth)) + + makeTrail(newloc, T, old_direction) + /mob/living/movement_delay(ignorewalk = 0) . = ..() if(isopenturf(loc) && !is_flying()) @@ -471,31 +475,32 @@ if(MOVE_INTENT_WALK) . += config.walk_speed -/mob/living/proc/makeTrail(turf/T) +/mob/living/proc/makeTrail(turf/target_turf, turf/start, direction) 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 start) //checks for blood splatter already on the floor + blood_exists = TRUE + if(isturf(start)) 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, start) + if(newdir != direction) + newdir = newdir | direction 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, start), 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(start) + + for(var/obj/effect/decal/cleanable/trail_holder/TH in start) 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,16 +565,16 @@ // 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 C.container_resist(src) - else if(has_status_effect(/datum/status_effect/freon)) + else if(IsFrozen()) to_chat(src, "You start breaking out of the ice cube!") if(do_mob(src, src, 40)) - if(has_status_effect(/datum/status_effect/freon)) + if(IsFrozen()) to_chat(src, "You break out of the ice cube!") remove_status_effect(/datum/status_effect/freon) update_canmove() @@ -687,6 +692,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 @@ -740,9 +746,6 @@ if(statpanel("Status")) if(SSticker && SSticker.mode) - 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) @@ -946,13 +949,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,9 +969,9 @@ 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)) + canmove = !(ko || resting || IsStun() || IsFrozen() || chokehold || buckled || (!has_legs && !ignore_legs && !has_arms)) density = !lying if(lying) if(layer == initial(layer)) //to avoid special cases like hiding larvas. 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..9c34ca4dbd 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] @@ -178,6 +180,8 @@ GLOBAL_LIST_INIT(department_radio_keys, list( spans |= SPAN_ITALICS if(radio_return & REDUCE_RANGE) message_range = 1 + if(radio_return & NOPASS) + return 1 //No screams in space, unless you're next to someone. var/turf/T = get_turf(src) @@ -295,10 +299,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 +388,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/death.dm b/code/modules/mob/living/silicon/ai/death.dm index 52c06439fb..d41b6f5f29 100644 --- a/code/modules/mob/living/silicon/ai/death.dm +++ b/code/modules/mob/living/silicon/ai/death.dm @@ -35,9 +35,9 @@ if(nuking) set_security_level("red") nuking = FALSE - for(var/obj/item/pinpointer/P in GLOB.pinpointer_list) + for(var/obj/item/pinpointer/nuke/P in GLOB.pinpointer_list) P.switch_mode_to(TRACK_NUKE_DISK) //Party's over, back to work, everyone - P.nuke_warning = FALSE + P.alert = FALSE if(doomsday_device) doomsday_device.timing = FALSE diff --git a/code/modules/mob/living/silicon/ai/death.dm.rej b/code/modules/mob/living/silicon/ai/death.dm.rej new file mode 100644 index 0000000000..40b5625e8c --- /dev/null +++ b/code/modules/mob/living/silicon/ai/death.dm.rej @@ -0,0 +1,13 @@ +diff a/code/modules/mob/living/silicon/ai/death.dm b/code/modules/mob/living/silicon/ai/death.dm (rejected hunks) +@@ -35,9 +35,9 @@ + if(nuking) + set_security_level("red") + nuking = FALSE +- for(var/obj/item/weapon/pinpointer/P in GLOB.pinpointer_list) ++ for(var/obj/item/weapon/pinpointer/nuke/P in GLOB.pinpointer_list) + P.switch_mode_to(TRACK_NUKE_DISK) //Party's over, back to work, everyone +- P.nuke_warning = FALSE ++ P.alert = FALSE + + if(doomsday_device) + doomsday_device.timing = FALSE 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/login.dm b/code/modules/mob/living/silicon/login.dm index 9474b787ea..b0e9d41038 100644 --- a/code/modules/mob/living/silicon/login.dm +++ b/code/modules/mob/living/silicon/login.dm @@ -2,5 +2,4 @@ if(mind && SSticker.mode) SSticker.mode.remove_cultist(mind, 0, 0) SSticker.mode.remove_revolutionary(mind, 0) - SSticker.mode.remove_gangster(mind, remove_bosses=1) ..() diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 8ca558cd81..3a143c7910 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -104,7 +104,7 @@ pda.owner = text("[]", src) pda.name = pda.owner + " (" + pda.ownjob + ")" - ..() + . = ..() var/datum/action/innate/pai/shell/AS = new /datum/action/innate/pai/shell var/datum/action/innate/pai/chassis/AC = new /datum/action/innate/pai/chassis diff --git a/code/modules/mob/living/silicon/pai/pai_shell.dm b/code/modules/mob/living/silicon/pai/pai_shell.dm index ff5da89678..8a3121166e 100644 --- a/code/modules/mob/living/silicon/pai/pai_shell.dm +++ b/code/modules/mob/living/silicon/pai/pai_shell.dm @@ -93,7 +93,7 @@ return FALSE /mob/living/silicon/pai/proc/toggle_integrated_light() - if(!luminosity) + if(!light_range) set_light(brightness_power) to_chat(src, "You enable your integrated light.") else 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/robot/login.dm b/code/modules/mob/living/silicon/robot/login.dm index b7987322a7..a9a2f899fb 100644 --- a/code/modules/mob/living/silicon/robot/login.dm +++ b/code/modules/mob/living/silicon/robot/login.dm @@ -5,4 +5,3 @@ show_laws(0) if(mind) SSticker.mode.remove_revolutionary(mind) - SSticker.mode.remove_gangster(mind,1,remove_bosses=1) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 644f845901..8fab4c3286 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -72,7 +72,7 @@ var/lamp_max = 10 //Maximum brightness of a borg lamp. Set as a var for easy adjusting. var/lamp_intensity = 0 //Luminosity of the headlamp. 0 is off. Higher settings than the minimum require power. - var/lamp_recharging = 0 //Flag for if the lamp is on cooldown after being forcibly disabled. + var/lamp_cooldown = 0 //Flag for if the lamp is on cooldown after being forcibly disabled. var/sight_mode = 0 hud_possible = list(ANTAG_HUD, DIAG_STAT_HUD, DIAG_HUD, DIAG_BATT_HUD, DIAG_TRACK_HUD) @@ -742,7 +742,7 @@ set_autosay() /mob/living/silicon/robot/proc/control_headlamp() - if(stat || lamp_recharging || low_power_mode) + if(stat || lamp_cooldown > world.time || low_power_mode) to_chat(src, "This function is currently offline.") return @@ -757,8 +757,7 @@ if(lamp_intensity && (turn_off || stat || low_power_mode)) to_chat(src, "Your headlamp has been deactivated.") lamp_intensity = 0 - lamp_recharging = TRUE - addtimer(CALLBACK(src, .proc/reset_headlamp), cooldown) + lamp_cooldown = world.time + cooldown else set_light(lamp_intensity) @@ -767,9 +766,6 @@ update_icons() -/mob/living/silicon/robot/proc/reset_headlamp() - lamp_recharging = FALSE - /mob/living/silicon/robot/proc/deconstruct() var/turf/T = get_turf(src) if (robot_suit) @@ -828,7 +824,7 @@ var/set_module = /obj/item/robot_module/syndicate /mob/living/silicon/robot/syndicate/Initialize() - ..() + . = ..() cell.maxcharge = 25000 cell.charge = 25000 radio = new /obj/item/device/radio/borg/syndicate(src) diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 41fbc69180..af6f3daf92 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -599,7 +599,7 @@ /obj/item/gun/ballistic/revolver/grenadelauncher/cyborg, /obj/item/card/emag, /obj/item/crowbar/cyborg, - /obj/item/pinpointer/syndicate/cyborg) + /obj/item/pinpointer/syndicate_cyborg) ratvar_modules = list( /obj/item/clockwork/slab/cyborg/security, @@ -625,7 +625,7 @@ /obj/item/roller/robo, /obj/item/card/emag, /obj/item/crowbar/cyborg, - /obj/item/pinpointer/syndicate/cyborg, + /obj/item/pinpointer/syndicate_cyborg, /obj/item/stack/medical/gauze/cyborg, /obj/item/gun/medbeam) ratvar_modules = list( diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm.rej b/code/modules/mob/living/silicon/robot/robot_modules.dm.rej new file mode 100644 index 0000000000..b0f0812dc4 --- /dev/null +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm.rej @@ -0,0 +1,19 @@ +diff a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm (rejected hunks) +@@ -519,7 +519,7 @@ + /obj/item/weapon/gun/ballistic/revolver/grenadelauncher/cyborg, + /obj/item/weapon/card/emag, + /obj/item/weapon/crowbar/cyborg, +- /obj/item/weapon/pinpointer/syndicate/cyborg) ++ /obj/item/weapon/pinpointer/syndicate_cyborg) + + ratvar_modules = list( + /obj/item/clockwork/slab/cyborg/security, +@@ -545,7 +545,7 @@ + /obj/item/roller/robo, + /obj/item/weapon/card/emag, + /obj/item/weapon/crowbar/cyborg, +- /obj/item/weapon/pinpointer/syndicate/cyborg, ++ /obj/item/weapon/pinpointer/syndicate_cyborg, + /obj/item/stack/medical/gauze/cyborg, + /obj/item/weapon/gun/medbeam) + ratvar_modules = list( 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..3cd66724e9 100644 --- a/code/modules/mob/living/simple_animal/bot/ed209bot.dm +++ b/code/modules/mob/living/simple_animal/bot/ed209bot.dm @@ -1,567 +1,567 @@ -/mob/living/simple_animal/bot/ed209 - name = "\improper ED-209 Security Robot" - desc = "A security robot. He looks less than thrilled." - icon = 'icons/mob/aibots.dmi' - icon_state = "ed2090" +/mob/living/simple_animal/bot/ed209 + name = "\improper ED-209 Security Robot" + desc = "A security robot. He looks less than thrilled." + icon = 'icons/mob/aibots.dmi' + icon_state = "ed2090" 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) - obj_damage = 60 - environment_smash = ENVIRONMENT_SMASH_WALLS //Walls can't stop THE LAW - mob_size = MOB_SIZE_LARGE - - radio_key = /obj/item/device/encryptionkey/headset_sec - radio_channel = "Security" - bot_type = SEC_BOT - model = "ED-209" - bot_core = /obj/machinery/bot_core/secbot - window_id = "autoed209" - window_name = "Automatic Security Unit v2.6" - allow_pai = 0 - data_hud_type = DATA_HUD_SECURITY_ADVANCED - - var/lastfired = 0 - var/shot_delay = 15 - var/lasercolor = "" - var/disabled = 0//A holder for if it needs to be disabled, if true it will not seach for targets, shoot at targets, or move, currently only used for lasertag - - - var/mob/living/carbon/target - var/oldtarget_name - var/threatlevel = 0 - var/target_lastloc //Loc of target when arrested. - var/last_found //There's a delay - var/declare_arrests = 1 //When making an arrest, should it notify everyone wearing sechuds? - var/idcheck = 1 //If true, arrest people with no IDs - var/weaponscheck = 1 //If true, arrest people for weapons if they don't have access - var/check_records = 1 //Does it check security records? - var/arrest_type = 0 //If true, don't handcuff - var/projectile = /obj/item/projectile/energy/electrode //Holder for projectile type - var/shoot_sound = 'sound/weapons/taser.ogg' - - -/mob/living/simple_animal/bot/ed209/Initialize(mapload,created_name,created_lasercolor) - ..() - if(created_name) - name = created_name - if(created_lasercolor) - lasercolor = created_lasercolor - icon_state = "[lasercolor]ed209[on]" - set_weapon() //giving it the right projectile and firing sound. - spawn(3) - var/datum/job/detective/J = new/datum/job/detective - access_card.access += J.get_access() - prev_access = access_card.access - - if(lasercolor) - 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 + health = 100 + maxHealth = 100 + damage_coeff = list(BRUTE = 0.5, BURN = 0.7, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0) + obj_damage = 60 + environment_smash = ENVIRONMENT_SMASH_WALLS //Walls can't stop THE LAW + mob_size = MOB_SIZE_LARGE + + radio_key = /obj/item/device/encryptionkey/headset_sec + radio_channel = "Security" + bot_type = SEC_BOT + model = "ED-209" + bot_core = /obj/machinery/bot_core/secbot + window_id = "autoed209" + window_name = "Automatic Security Unit v2.6" + allow_pai = 0 + data_hud_type = DATA_HUD_SECURITY_ADVANCED + + var/lastfired = 0 + var/shot_delay = 15 + var/lasercolor = "" + var/disabled = 0//A holder for if it needs to be disabled, if true it will not seach for targets, shoot at targets, or move, currently only used for lasertag + + + var/mob/living/carbon/target + var/oldtarget_name + var/threatlevel = 0 + var/target_lastloc //Loc of target when arrested. + var/last_found //There's a delay + var/declare_arrests = 1 //When making an arrest, should it notify everyone wearing sechuds? + var/idcheck = 1 //If true, arrest people with no IDs + var/weaponscheck = 1 //If true, arrest people for weapons if they don't have access + var/check_records = 1 //Does it check security records? + var/arrest_type = 0 //If true, don't handcuff + var/projectile = /obj/item/projectile/energy/electrode //Holder for projectile type + var/shoot_sound = 'sound/weapons/taser.ogg' + + +/mob/living/simple_animal/bot/ed209/Initialize(mapload,created_name,created_lasercolor) + . = ..() + if(created_name) + name = created_name + if(created_lasercolor) + lasercolor = created_lasercolor + icon_state = "[lasercolor]ed209[on]" + set_weapon() //giving it the right projectile and firing sound. + spawn(3) + var/datum/job/detective/J = new/datum/job/detective + access_card.access += J.get_access() + prev_access = access_card.access + + if(lasercolor) + 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) - 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") - if((lasercolor == "r") && (name == "\improper ED-209 Security Robot")) - name = pick("RED RAMPAGE","RED ROVER","RED KILLDEATH MURDERBOT") - - //SECHUD - var/datum/atom_hud/secsensor = GLOB.huds[DATA_HUD_SECURITY_ADVANCED] - secsensor.add_hud_to(src) - -/mob/living/simple_animal/bot/ed209/turn_on() - . = ..() - icon_state = "[lasercolor]ed209[on]" - mode = BOT_IDLE - -/mob/living/simple_animal/bot/ed209/turn_off() - ..() - icon_state = "[lasercolor]ed209[on]" - -/mob/living/simple_animal/bot/ed209/bot_reset() - ..() - target = null - oldtarget_name = null + 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") + if((lasercolor == "r") && (name == "\improper ED-209 Security Robot")) + name = pick("RED RAMPAGE","RED ROVER","RED KILLDEATH MURDERBOT") + + //SECHUD + var/datum/atom_hud/secsensor = GLOB.huds[DATA_HUD_SECURITY_ADVANCED] + secsensor.add_hud_to(src) + +/mob/living/simple_animal/bot/ed209/turn_on() + . = ..() + icon_state = "[lasercolor]ed209[on]" + mode = BOT_IDLE + +/mob/living/simple_animal/bot/ed209/turn_off() + ..() + icon_state = "[lasercolor]ed209[on]" + +/mob/living/simple_animal/bot/ed209/bot_reset() + ..() + target = null + oldtarget_name = null anchored = FALSE - walk_to(src,0) - last_found = world.time - set_weapon() - -/mob/living/simple_animal/bot/ed209/set_custom_texts() - text_hack = "You disable [name]'s combat inhibitor." - text_dehack = "You restore [name]'s combat inhibitor." - text_dehack_fail = "[name] ignores your attempts to restrict him!" - -/mob/living/simple_animal/bot/ed209/get_controls(mob/user) - var/dat - dat += hack(user) - dat += showpai(user) - dat += text({" -Security Unit v2.6 controls

    -Status: []
    -Behaviour controls are [locked ? "locked" : "unlocked"]
    -Maintenance panel panel is [open ? "opened" : "closed"]
    "}, - -"[on ? "On" : "Off"]" ) - - if(!locked || issilicon(user)|| IsAdminGhost(user)) - if(!lasercolor) - dat += text({"
    -Arrest Unidentifiable Persons: []
    -Arrest for Unauthorized Weapons: []
    -Arrest for Warrant: []
    -
    -Operating Mode: []
    -Report Arrests[]
    -Auto Patrol[]"}, - -"[idcheck ? "Yes" : "No"]", -"[weaponscheck ? "Yes" : "No"]", -"[check_records ? "Yes" : "No"]", -"[arrest_type ? "Detain" : "Arrest"]", -"[declare_arrests ? "Yes" : "No"]", -"[auto_patrol ? "On" : "Off"]" ) - - return dat - -/mob/living/simple_animal/bot/ed209/Topic(href, href_list) - if(lasercolor && ishuman(usr)) - var/mob/living/carbon/human/H = usr - if((lasercolor == "b") && (istype(H.wear_suit, /obj/item/clothing/suit/redtag)))//Opposing team cannot operate it - return - else if((lasercolor == "r") && (istype(H.wear_suit, /obj/item/clothing/suit/bluetag))) - return - if(..()) - return 1 - - switch(href_list["operation"]) - if("idcheck") - idcheck = !idcheck - update_controls() - if("weaponscheck") - weaponscheck = !weaponscheck - update_controls() - if("ignorerec") - check_records = !check_records - update_controls() - if("switchmode") - arrest_type = !arrest_type - update_controls() - if("declarearrests") - declare_arrests = !declare_arrests - update_controls() - -/mob/living/simple_animal/bot/ed209/proc/judgement_criteria() + walk_to(src,0) + last_found = world.time + set_weapon() + +/mob/living/simple_animal/bot/ed209/set_custom_texts() + text_hack = "You disable [name]'s combat inhibitor." + text_dehack = "You restore [name]'s combat inhibitor." + text_dehack_fail = "[name] ignores your attempts to restrict him!" + +/mob/living/simple_animal/bot/ed209/get_controls(mob/user) + var/dat + dat += hack(user) + dat += showpai(user) + dat += text({" +Security Unit v2.6 controls

    +Status: []
    +Behaviour controls are [locked ? "locked" : "unlocked"]
    +Maintenance panel panel is [open ? "opened" : "closed"]
    "}, + +"[on ? "On" : "Off"]" ) + + if(!locked || issilicon(user)|| IsAdminGhost(user)) + if(!lasercolor) + dat += text({"
    +Arrest Unidentifiable Persons: []
    +Arrest for Unauthorized Weapons: []
    +Arrest for Warrant: []
    +
    +Operating Mode: []
    +Report Arrests[]
    +Auto Patrol[]"}, + +"[idcheck ? "Yes" : "No"]", +"[weaponscheck ? "Yes" : "No"]", +"[check_records ? "Yes" : "No"]", +"[arrest_type ? "Detain" : "Arrest"]", +"[declare_arrests ? "Yes" : "No"]", +"[auto_patrol ? "On" : "Off"]" ) + + return dat + +/mob/living/simple_animal/bot/ed209/Topic(href, href_list) + if(lasercolor && ishuman(usr)) + var/mob/living/carbon/human/H = usr + if((lasercolor == "b") && (istype(H.wear_suit, /obj/item/clothing/suit/redtag)))//Opposing team cannot operate it + return + else if((lasercolor == "r") && (istype(H.wear_suit, /obj/item/clothing/suit/bluetag))) + return + if(..()) + return 1 + + switch(href_list["operation"]) + if("idcheck") + idcheck = !idcheck + update_controls() + if("weaponscheck") + weaponscheck = !weaponscheck + update_controls() + if("ignorerec") + check_records = !check_records + update_controls() + if("switchmode") + arrest_type = !arrest_type + update_controls() + if("declarearrests") + declare_arrests = !declare_arrests + update_controls() + +/mob/living/simple_animal/bot/ed209/proc/judgement_criteria() var/final = FALSE - if(idcheck) - final = final|JUDGE_IDCHECK - if(check_records) - final = final|JUDGE_RECORDCHECK - if(weaponscheck) - final = final|JUDGE_WEAPONCHECK - if(emagged) - final = final|JUDGE_EMAGGED - //ED209's ignore monkeys - final = final|JUDGE_IGNOREMONKEYS - return final - -/mob/living/simple_animal/bot/ed209/proc/retaliate(mob/living/carbon/human/H) - var/judgement_criteria = judgement_criteria() - threatlevel = H.assess_threat(judgement_criteria, weaponcheck=CALLBACK(src, .proc/check_for_weapons)) - threatlevel += 6 - if(threatlevel >= 4) - target = H - mode = BOT_HUNT - -/mob/living/simple_animal/bot/ed209/attack_hand(mob/living/carbon/human/H) - if(H.a_intent == INTENT_HARM) - retaliate(H) - return ..() - -/mob/living/simple_animal/bot/ed209/attackby(obj/item/W, mob/user, params) - ..() - if(istype(W, /obj/item/weldingtool) && user.a_intent != INTENT_HARM) // Any intent but harm will heal, so we shouldn't get angry. - return - if(!istype(W, /obj/item/screwdriver) && (!target)) // Added check for welding tool to fix #2432. Welding tool behavior is handled in superclass. - if(W.force && W.damtype != STAMINA)//If force is non-zero and damage type isn't stamina. - retaliate(user) - if(lasercolor)//To make up for the fact that lasertag bots don't hunt - shootAt(user) - -/mob/living/simple_animal/bot/ed209/emag_act(mob/user) - ..() - if(emagged == 2) - if(user) - to_chat(user, "You short out [src]'s target assessment circuits.") - oldtarget_name = user.name - audible_message("[src] buzzes oddly!") - declare_arrests = 0 - icon_state = "[lasercolor]ed209[on]" - set_weapon() - -/mob/living/simple_animal/bot/ed209/bullet_act(obj/item/projectile/Proj) + if(idcheck) + final = final|JUDGE_IDCHECK + if(check_records) + final = final|JUDGE_RECORDCHECK + if(weaponscheck) + final = final|JUDGE_WEAPONCHECK + if(emagged) + final = final|JUDGE_EMAGGED + //ED209's ignore monkeys + final = final|JUDGE_IGNOREMONKEYS + return final + +/mob/living/simple_animal/bot/ed209/proc/retaliate(mob/living/carbon/human/H) + var/judgement_criteria = judgement_criteria() + threatlevel = H.assess_threat(judgement_criteria, weaponcheck=CALLBACK(src, .proc/check_for_weapons)) + threatlevel += 6 + if(threatlevel >= 4) + target = H + mode = BOT_HUNT + +/mob/living/simple_animal/bot/ed209/attack_hand(mob/living/carbon/human/H) + if(H.a_intent == INTENT_HARM) + retaliate(H) + return ..() + +/mob/living/simple_animal/bot/ed209/attackby(obj/item/W, mob/user, params) + ..() + if(istype(W, /obj/item/weldingtool) && user.a_intent != INTENT_HARM) // Any intent but harm will heal, so we shouldn't get angry. + return + if(!istype(W, /obj/item/screwdriver) && (!target)) // Added check for welding tool to fix #2432. Welding tool behavior is handled in superclass. + if(W.force && W.damtype != STAMINA)//If force is non-zero and damage type isn't stamina. + retaliate(user) + if(lasercolor)//To make up for the fact that lasertag bots don't hunt + shootAt(user) + +/mob/living/simple_animal/bot/ed209/emag_act(mob/user) + ..() + if(emagged == 2) + if(user) + to_chat(user, "You short out [src]'s target assessment circuits.") + oldtarget_name = user.name + audible_message("[src] buzzes oddly!") + declare_arrests = 0 + icon_state = "[lasercolor]ed209[on]" + 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((Proj.damage_type == BURN) || (Proj.damage_type == BRUTE)) - if(!Proj.nodamage && Proj.damage < src.health) - retaliate(Proj.firer) - ..() - -/mob/living/simple_animal/bot/ed209/handle_automated_action() - if(!..()) - return - - if(disabled) - return - - var/judgement_criteria = judgement_criteria() - var/list/targets = list() - for(var/mob/living/carbon/C in view(7,src)) //Let's find us a target - var/threatlevel = 0 - if((C.stat) || (C.lying)) - continue - threatlevel = C.assess_threat(judgement_criteria, lasercolor, weaponcheck=CALLBACK(src, .proc/check_for_weapons)) - //speak(C.real_name + text(": threat: []", threatlevel)) - if(threatlevel < 4 ) - continue - - var/dst = get_dist(src, C) - if(dst <= 1 || dst > 7) - continue - - targets += C - if(targets.len>0) - var/mob/living/carbon/t = pick(targets) - if((t.stat!=2) && (t.lying != 1) && (!t.handcuffed)) //we don't shoot people who are dead, cuffed or lying down. - shootAt(t) - switch(mode) - - if(BOT_IDLE) // idle - walk_to(src,0) - if(!lasercolor) //lasertag bots don't want to arrest anyone - look_for_perp() // see if any criminals are in range - if(!mode && auto_patrol) // still idle, and set to patrol - mode = BOT_START_PATROL // switch to patrol mode - - if(BOT_HUNT) // hunting for perp - // if can't reach perp for long enough, go idle - if(frustration >= 8) - walk_to(src,0) - back_to_idle() - - if(target) // make sure target exists - if(Adjacent(target) && isturf(target.loc)) // if right next to perp - stun_attack(target) - - mode = BOT_PREP_ARREST + if((Proj.damage_type == BURN) || (Proj.damage_type == BRUTE)) + if(!Proj.nodamage && Proj.damage < src.health) + retaliate(Proj.firer) + ..() + +/mob/living/simple_animal/bot/ed209/handle_automated_action() + if(!..()) + return + + if(disabled) + return + + var/judgement_criteria = judgement_criteria() + var/list/targets = list() + for(var/mob/living/carbon/C in view(7,src)) //Let's find us a target + var/threatlevel = 0 + if((C.stat) || (C.lying)) + continue + threatlevel = C.assess_threat(judgement_criteria, lasercolor, weaponcheck=CALLBACK(src, .proc/check_for_weapons)) + //speak(C.real_name + text(": threat: []", threatlevel)) + if(threatlevel < 4 ) + continue + + var/dst = get_dist(src, C) + if(dst <= 1 || dst > 7) + continue + + targets += C + if(targets.len>0) + var/mob/living/carbon/t = pick(targets) + if((t.stat!=2) && (t.lying != 1) && (!t.handcuffed)) //we don't shoot people who are dead, cuffed or lying down. + shootAt(t) + switch(mode) + + if(BOT_IDLE) // idle + walk_to(src,0) + if(!lasercolor) //lasertag bots don't want to arrest anyone + look_for_perp() // see if any criminals are in range + if(!mode && auto_patrol) // still idle, and set to patrol + mode = BOT_START_PATROL // switch to patrol mode + + if(BOT_HUNT) // hunting for perp + // if can't reach perp for long enough, go idle + if(frustration >= 8) + walk_to(src,0) + back_to_idle() + + if(target) // make sure target exists + if(Adjacent(target) && isturf(target.loc)) // if right next to perp + stun_attack(target) + + mode = BOT_PREP_ARREST anchored = TRUE - target_lastloc = target.loc - return - - else // not next to perp - var/turf/olddist = get_dist(src, target) - walk_to(src, target,1,4) - if((get_dist(src, target)) >= (olddist)) - frustration++ - else - frustration = 0 - else - back_to_idle() - - if(BOT_PREP_ARREST) // preparing to arrest target - - // see if he got away. If he's no no longer adjacent or inside a closet or about to get up, we hunt again. - if(!Adjacent(target) || !isturf(target.loc) || target.AmountKnockdown() < 40) - back_to_hunt() - return - - if(iscarbon(target) && target.canBeHandcuffed()) - if(!arrest_type) - if(!target.handcuffed) //he's not cuffed? Try to cuff him! - cuff(target) - else - back_to_idle() - return - else - back_to_idle() - return - - if(BOT_ARREST) - if(!target) + target_lastloc = target.loc + return + + else // not next to perp + var/turf/olddist = get_dist(src, target) + walk_to(src, target,1,4) + if((get_dist(src, target)) >= (olddist)) + frustration++ + else + frustration = 0 + else + back_to_idle() + + if(BOT_PREP_ARREST) // preparing to arrest target + + // see if he got away. If he's no no longer adjacent or inside a closet or about to get up, we hunt again. + if(!Adjacent(target) || !isturf(target.loc) || target.AmountKnockdown() < 40) + back_to_hunt() + return + + if(iscarbon(target) && target.canBeHandcuffed()) + if(!arrest_type) + if(!target.handcuffed) //he's not cuffed? Try to cuff him! + cuff(target) + else + back_to_idle() + return + else + back_to_idle() + return + + if(BOT_ARREST) + if(!target) anchored = FALSE - mode = BOT_IDLE - last_found = world.time - frustration = 0 - return - - if(target.handcuffed) //no target or target cuffed? back to idle. - back_to_idle() - return - - if(!Adjacent(target) || !isturf(target.loc) || (target.loc != target_lastloc && target.AmountKnockdown() < 40)) //if he's changed loc and about to get up or not adjacent or got into a closet, we prep arrest again. - back_to_hunt() - return - else - mode = BOT_PREP_ARREST + mode = BOT_IDLE + last_found = world.time + frustration = 0 + return + + if(target.handcuffed) //no target or target cuffed? back to idle. + back_to_idle() + return + + if(!Adjacent(target) || !isturf(target.loc) || (target.loc != target_lastloc && target.AmountKnockdown() < 40)) //if he's changed loc and about to get up or not adjacent or got into a closet, we prep arrest again. + back_to_hunt() + return + else + mode = BOT_PREP_ARREST anchored = FALSE - - if(BOT_START_PATROL) - look_for_perp() - start_patrol() - - if(BOT_PATROL) - look_for_perp() - bot_patrol() - - - return - -/mob/living/simple_animal/bot/ed209/proc/back_to_idle() + + if(BOT_START_PATROL) + look_for_perp() + start_patrol() + + if(BOT_PATROL) + look_for_perp() + bot_patrol() + + + return + +/mob/living/simple_animal/bot/ed209/proc/back_to_idle() anchored = FALSE - mode = BOT_IDLE - target = null - last_found = world.time - frustration = 0 - INVOKE_ASYNC(src, .proc/handle_automated_action) //ensure bot quickly responds - -/mob/living/simple_animal/bot/ed209/proc/back_to_hunt() + mode = BOT_IDLE + target = null + last_found = world.time + frustration = 0 + INVOKE_ASYNC(src, .proc/handle_automated_action) //ensure bot quickly responds + +/mob/living/simple_animal/bot/ed209/proc/back_to_hunt() anchored = FALSE - frustration = 0 - mode = BOT_HUNT - INVOKE_ASYNC(src, .proc/handle_automated_action) //ensure bot quickly responds - -// look for a criminal in view of the bot - -/mob/living/simple_animal/bot/ed209/proc/look_for_perp() - if(disabled) - return + frustration = 0 + mode = BOT_HUNT + INVOKE_ASYNC(src, .proc/handle_automated_action) //ensure bot quickly responds + +// look for a criminal in view of the bot + +/mob/living/simple_animal/bot/ed209/proc/look_for_perp() + if(disabled) + return 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 - if((C.stat) || (C.handcuffed)) - continue - - if((C.name == oldtarget_name) && (world.time < last_found + 100)) - continue - - threatlevel = C.assess_threat(judgement_criteria, lasercolor, weaponcheck=CALLBACK(src, .proc/check_for_weapons)) - - if(!threatlevel) - continue - - else if(threatlevel >= 4) - target = C - oldtarget_name = C.name - speak("Level [threatlevel] infraction alert!") - playsound(loc, pick('sound/voice/ed209_20sec.ogg', 'sound/voice/edplaceholder.ogg'), 50, 0) - visible_message("[src] points at [C.name]!") - mode = BOT_HUNT - spawn(0) - handle_automated_action() // ensure bot quickly responds to a perp - break - else - continue - -/mob/living/simple_animal/bot/ed209/proc/check_for_weapons(var/obj/item/slot_item) - if(slot_item && slot_item.needs_permit) - return 1 - return 0 - -/mob/living/simple_animal/bot/ed209/explode() - walk_to(src,0) - visible_message("[src] blows apart!") - var/turf/Tsec = get_turf(src) - - var/obj/item/ed209_assembly/Sa = new /obj/item/ed209_assembly(Tsec) - Sa.build_step = 1 - Sa.add_overlay("hs_hole") - Sa.created_name = name - new /obj/item/device/assembly/prox_sensor(Tsec) - - if(!lasercolor) - var/obj/item/gun/energy/e_gun/advtaser/G = new /obj/item/gun/energy/e_gun/advtaser(Tsec) - G.cell.charge = 0 - G.update_icon() - else if(lasercolor == "b") - var/obj/item/gun/energy/laser/bluetag/G = new /obj/item/gun/energy/laser/bluetag(Tsec) - G.cell.charge = 0 - G.update_icon() - else if(lasercolor == "r") - var/obj/item/gun/energy/laser/redtag/G = new /obj/item/gun/energy/laser/redtag(Tsec) - G.cell.charge = 0 - G.update_icon() - - if(prob(50)) - new /obj/item/bodypart/l_leg/robot(Tsec) - if(prob(25)) - new /obj/item/bodypart/r_leg/robot(Tsec) - if(prob(25))//50% chance for a helmet OR vest - if(prob(50)) - new /obj/item/clothing/head/helmet(Tsec) - else - if(!lasercolor) - new /obj/item/clothing/suit/armor/vest(Tsec) - if(lasercolor == "b") - new /obj/item/clothing/suit/bluetag(Tsec) - if(lasercolor == "r") - new /obj/item/clothing/suit/redtag(Tsec) - - do_sparks(3, TRUE, src) - - new /obj/effect/decal/cleanable/oil(loc) - ..() - -/mob/living/simple_animal/bot/ed209/proc/set_weapon() //used to update the projectile type and firing sound - shoot_sound = 'sound/weapons/laser.ogg' - if(emagged == 2) - if(lasercolor) - projectile = /obj/item/projectile/beam/lasertag - else - projectile = /obj/item/projectile/beam - else - if(!lasercolor) - shoot_sound = 'sound/weapons/taser.ogg' - projectile = /obj/item/projectile/energy/electrode - else if(lasercolor == "b") - projectile = /obj/item/projectile/beam/lasertag/bluetag - else if(lasercolor == "r") - projectile = /obj/item/projectile/beam/lasertag/redtag - -/mob/living/simple_animal/bot/ed209/proc/shootAt(mob/target) - if(lastfired && world.time - lastfired < shot_delay) - return - lastfired = world.time - var/turf/T = loc - var/turf/U = get_turf(target) - if(!U) - return - if(!isturf(T)) - return - - if(!projectile) - return - - var/obj/item/projectile/A = new projectile (loc) - playsound(loc, shoot_sound, 50, 1) - A.current = U - A.yo = U.y - T.y - A.xo = U.x - T.x - A.fire() - -/mob/living/simple_animal/bot/ed209/attack_alien(mob/living/carbon/alien/user) - ..() - if(!isalien(target)) - target = user - mode = BOT_HUNT - - -/mob/living/simple_animal/bot/ed209/emp_act(severity) - - if(severity==2 && prob(70)) - ..(severity-1) - else - 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) - continue - targets += C - if(targets.len) - if(prob(50)) - var/mob/toshoot = pick(targets) - if(toshoot) - targets-=toshoot - if(prob(50) && emagged < 2) - emagged = 2 - set_weapon() - shootAt(toshoot) + threatlevel = 0 + var/judgement_criteria = judgement_criteria() + for (var/mob/living/carbon/C in view(7,src)) //Let's find us a criminal + if((C.stat) || (C.handcuffed)) + continue + + if((C.name == oldtarget_name) && (world.time < last_found + 100)) + continue + + threatlevel = C.assess_threat(judgement_criteria, lasercolor, weaponcheck=CALLBACK(src, .proc/check_for_weapons)) + + if(!threatlevel) + continue + + else if(threatlevel >= 4) + target = C + oldtarget_name = C.name + speak("Level [threatlevel] infraction alert!") + playsound(loc, pick('sound/voice/ed209_20sec.ogg', 'sound/voice/edplaceholder.ogg'), 50, 0) + visible_message("[src] points at [C.name]!") + mode = BOT_HUNT + spawn(0) + handle_automated_action() // ensure bot quickly responds to a perp + break + else + continue + +/mob/living/simple_animal/bot/ed209/proc/check_for_weapons(var/obj/item/slot_item) + if(slot_item && slot_item.needs_permit) + return 1 + return 0 + +/mob/living/simple_animal/bot/ed209/explode() + walk_to(src,0) + visible_message("[src] blows apart!") + var/turf/Tsec = get_turf(src) + + var/obj/item/ed209_assembly/Sa = new /obj/item/ed209_assembly(Tsec) + Sa.build_step = 1 + Sa.add_overlay("hs_hole") + Sa.created_name = name + new /obj/item/device/assembly/prox_sensor(Tsec) + + if(!lasercolor) + var/obj/item/gun/energy/e_gun/advtaser/G = new /obj/item/gun/energy/e_gun/advtaser(Tsec) + G.cell.charge = 0 + G.update_icon() + else if(lasercolor == "b") + var/obj/item/gun/energy/laser/bluetag/G = new /obj/item/gun/energy/laser/bluetag(Tsec) + G.cell.charge = 0 + G.update_icon() + else if(lasercolor == "r") + var/obj/item/gun/energy/laser/redtag/G = new /obj/item/gun/energy/laser/redtag(Tsec) + G.cell.charge = 0 + G.update_icon() + + if(prob(50)) + new /obj/item/bodypart/l_leg/robot(Tsec) + if(prob(25)) + new /obj/item/bodypart/r_leg/robot(Tsec) + if(prob(25))//50% chance for a helmet OR vest + if(prob(50)) + new /obj/item/clothing/head/helmet(Tsec) + else + if(!lasercolor) + new /obj/item/clothing/suit/armor/vest(Tsec) + if(lasercolor == "b") + new /obj/item/clothing/suit/bluetag(Tsec) + if(lasercolor == "r") + new /obj/item/clothing/suit/redtag(Tsec) + + do_sparks(3, TRUE, src) + + new /obj/effect/decal/cleanable/oil(loc) + ..() + +/mob/living/simple_animal/bot/ed209/proc/set_weapon() //used to update the projectile type and firing sound + shoot_sound = 'sound/weapons/laser.ogg' + if(emagged == 2) + if(lasercolor) + projectile = /obj/item/projectile/beam/lasertag + else + projectile = /obj/item/projectile/beam + else + if(!lasercolor) + shoot_sound = 'sound/weapons/taser.ogg' + projectile = /obj/item/projectile/energy/electrode + else if(lasercolor == "b") + projectile = /obj/item/projectile/beam/lasertag/bluetag + else if(lasercolor == "r") + projectile = /obj/item/projectile/beam/lasertag/redtag + +/mob/living/simple_animal/bot/ed209/proc/shootAt(mob/target) + if(lastfired && world.time - lastfired < shot_delay) + return + lastfired = world.time + var/turf/T = loc + var/turf/U = get_turf(target) + if(!U) + return + if(!isturf(T)) + return + + if(!projectile) + return + + var/obj/item/projectile/A = new projectile (loc) + playsound(loc, shoot_sound, 50, 1) + A.current = U + A.yo = U.y - T.y + A.xo = U.x - T.x + A.fire() + +/mob/living/simple_animal/bot/ed209/attack_alien(mob/living/carbon/alien/user) + ..() + if(!isalien(target)) + target = user + mode = BOT_HUNT + + +/mob/living/simple_animal/bot/ed209/emp_act(severity) + + if(severity==2 && prob(70)) + ..(severity-1) + else + 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==DEAD) + continue + targets += C + if(targets.len) + if(prob(50)) + var/mob/toshoot = pick(targets) + if(toshoot) + targets-=toshoot + if(prob(50) && emagged < 2) + emagged = 2 + set_weapon() + shootAt(toshoot) emagged = FALSE - set_weapon() - else - shootAt(toshoot) - else if(prob(50)) - if(targets.len) - var/mob/toarrest = pick(targets) - if(toarrest) - target = toarrest - mode = BOT_HUNT - - -/mob/living/simple_animal/bot/ed209/bullet_act(obj/item/projectile/Proj) - if(!disabled) - var/lasertag_check = 0 - if((lasercolor == "b")) - if(istype(Proj, /obj/item/projectile/beam/lasertag/redtag)) - lasertag_check++ - else if((lasercolor == "r")) - if(istype(Proj, /obj/item/projectile/beam/lasertag/bluetag)) - lasertag_check++ - if(lasertag_check) - icon_state = "[lasercolor]ed2090" - disabled = 1 - target = null - spawn(100) - disabled = 0 - icon_state = "[lasercolor]ed2091" - return 1 - else - ..(Proj) - else - ..(Proj) - -/mob/living/simple_animal/bot/ed209/bluetag - lasercolor = "b" - -/mob/living/simple_animal/bot/ed209/redtag - lasercolor = "r" - -/mob/living/simple_animal/bot/ed209/UnarmedAttack(atom/A) - if(!on) - return - if(iscarbon(A)) - var/mob/living/carbon/C = A - if(!C.IsStun() || arrest_type) - stun_attack(A) - else if(C.canBeHandcuffed() && !C.handcuffed) - cuff(A) - else - ..() - -/mob/living/simple_animal/bot/ed209/RangedAttack(atom/A) - if(!on) - return - shootAt(A) - -/mob/living/simple_animal/bot/ed209/proc/stun_attack(mob/living/carbon/C) - playsound(loc, 'sound/weapons/egloves.ogg', 50, 1, -1) - icon_state = "[lasercolor]ed209-c" - spawn(2) - icon_state = "[lasercolor]ed209[on]" - var/threat = 5 - C.Knockdown(100) - C.stuttering = 5 - if(ishuman(C)) - var/mob/living/carbon/human/H = C - var/judgement_criteria = judgement_criteria() - threat = H.assess_threat(judgement_criteria, weaponcheck=CALLBACK(src, .proc/check_for_weapons)) - add_logs(src,C,"stunned") - if(declare_arrests) - var/area/location = get_area(src) - speak("[arrest_type ? "Detaining" : "Arresting"] level [threat] scumbag [C] in [location].", radio_channel) - C.visible_message("[src] has stunned [C]!",\ - "[src] has stunned you!") - -/mob/living/simple_animal/bot/ed209/proc/cuff(mob/living/carbon/C) - mode = BOT_ARREST - playsound(loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2) - C.visible_message("[src] is trying to put zipties on [C]!",\ - "[src] is trying to put zipties on you!") - - spawn(60) - if( !Adjacent(C) || !isturf(C.loc) ) //if he's in a closet or not adjacent, we cancel cuffing. - return - if(!C.handcuffed) - C.handcuffed = new /obj/item/restraints/handcuffs/cable/zipties/used(C) - C.update_handcuffed() - back_to_idle() + set_weapon() + else + shootAt(toshoot) + else if(prob(50)) + if(targets.len) + var/mob/toarrest = pick(targets) + if(toarrest) + target = toarrest + mode = BOT_HUNT + + +/mob/living/simple_animal/bot/ed209/bullet_act(obj/item/projectile/Proj) + if(!disabled) + var/lasertag_check = 0 + if((lasercolor == "b")) + if(istype(Proj, /obj/item/projectile/beam/lasertag/redtag)) + lasertag_check++ + else if((lasercolor == "r")) + if(istype(Proj, /obj/item/projectile/beam/lasertag/bluetag)) + lasertag_check++ + if(lasertag_check) + icon_state = "[lasercolor]ed2090" + disabled = 1 + target = null + spawn(100) + disabled = 0 + icon_state = "[lasercolor]ed2091" + return 1 + else + ..(Proj) + else + ..(Proj) + +/mob/living/simple_animal/bot/ed209/bluetag + lasercolor = "b" + +/mob/living/simple_animal/bot/ed209/redtag + lasercolor = "r" + +/mob/living/simple_animal/bot/ed209/UnarmedAttack(atom/A) + if(!on) + return + if(iscarbon(A)) + var/mob/living/carbon/C = A + if(!C.IsStun() || arrest_type) + stun_attack(A) + else if(C.canBeHandcuffed() && !C.handcuffed) + cuff(A) + else + ..() + +/mob/living/simple_animal/bot/ed209/RangedAttack(atom/A) + if(!on) + return + shootAt(A) + +/mob/living/simple_animal/bot/ed209/proc/stun_attack(mob/living/carbon/C) + playsound(loc, 'sound/weapons/egloves.ogg', 50, 1, -1) + icon_state = "[lasercolor]ed209-c" + spawn(2) + icon_state = "[lasercolor]ed209[on]" + var/threat = 5 + C.Knockdown(100) + C.stuttering = 5 + if(ishuman(C)) + var/mob/living/carbon/human/H = C + var/judgement_criteria = judgement_criteria() + threat = H.assess_threat(judgement_criteria, weaponcheck=CALLBACK(src, .proc/check_for_weapons)) + add_logs(src,C,"stunned") + if(declare_arrests) + var/area/location = get_area(src) + speak("[arrest_type ? "Detaining" : "Arresting"] level [threat] scumbag [C] in [location].", radio_channel) + C.visible_message("[src] has stunned [C]!",\ + "[src] has stunned you!") + +/mob/living/simple_animal/bot/ed209/proc/cuff(mob/living/carbon/C) + mode = BOT_ARREST + playsound(loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2) + C.visible_message("[src] is trying to put zipties on [C]!",\ + "[src] is trying to put zipties on you!") + + spawn(60) + if( !Adjacent(C) || !isturf(C.loc) ) //if he's in a closet or not adjacent, we cancel cuffing. + return + if(!C.handcuffed) + C.handcuffed = new /obj/item/restraints/handcuffs/cable/zipties/used(C) + C.update_handcuffed() + back_to_idle() diff --git a/code/modules/mob/living/simple_animal/bot/floorbot.dm b/code/modules/mob/living/simple_animal/bot/floorbot.dm index 1b7647d412..9f86737717 100644 --- a/code/modules/mob/living/simple_animal/bot/floorbot.dm +++ b/code/modules/mob/living/simple_animal/bot/floorbot.dm @@ -39,7 +39,7 @@ #define TILE_EMAG 7 /mob/living/simple_animal/bot/floorbot/Initialize() - ..() + . = ..() update_icon() var/datum/job/engineer/J = new/datum/job/engineer access_card.access += J.get_access() 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/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 0d4edd53f5..4007822ebb 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -47,7 +47,7 @@ var/bloodiness = 0 /mob/living/simple_animal/bot/mulebot/Initialize() - ..() + . = ..() wires = new /datum/wires/mulebot(src) var/datum/job/cargo_tech/J = new/datum/job/cargo_tech access_card.access = J.get_access() @@ -650,7 +650,7 @@ /mob/living/simple_animal/bot/mulebot/proc/RunOver(mob/living/carbon/human/H) add_logs(src, H, "run over", null, "(DAMTYPE: [uppertext(BRUTE)])") H.visible_message("[src] drives over [H]!", \ - "[src] drives over you!") + "[src] drives over you!") playsound(loc, 'sound/effects/splat.ogg', 50, 1) var/damage = rand(5,15) 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 0e0b811810..49ef79a4d9 100644 --- a/code/modules/mob/living/simple_animal/friendly/cat.dm +++ b/code/modules/mob/living/simple_animal/friendly/cat.dm @@ -32,7 +32,7 @@ devourable = TRUE /mob/living/simple_animal/pet/cat/Initialize() - ..() + . = ..() verbs += /mob/living/proc/lay_down /mob/living/simple_animal/pet/cat/update_canmove() @@ -92,7 +92,7 @@ icon_living = "original" icon_dead = "original_dead" Read_Memory() - ..() + . = ..() /mob/living/simple_animal/pet/cat/Runtime/Life() if(!cats_deployed && SSticker.current_state >= GAME_STATE_SETTING_UP) @@ -113,17 +113,12 @@ ..() /mob/living/simple_animal/pet/cat/Runtime/proc/Read_Memory() - if(fexists("data/npc_saves/Runtime.sav")) //legacy compatability to convert old format to new - var/savefile/S = new /savefile("data/npc_saves/Runtime.sav") - S["family"] >> family - fdel("data/npc_saves/Runtime.sav") - else - 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"] + 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() @@ -280,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/crab.dm b/code/modules/mob/living/simple_animal/friendly/crab.dm index bce9c91706..6f5158ac83 100644 --- a/code/modules/mob/living/simple_animal/friendly/crab.dm +++ b/code/modules/mob/living/simple_animal/friendly/crab.dm @@ -1,47 +1,78 @@ -//Look Sir, free crabs! -/mob/living/simple_animal/crab - name = "crab" - desc = "Free crabs!" - icon_state = "crab" - icon_living = "crab" - icon_dead = "crab_dead" - speak_emote = list("clicks") - emote_hear = list("clicks.") - emote_see = list("clacks.") - speak_chance = 1 - turns_per_move = 5 - butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab = 1) - response_help = "pets" - response_disarm = "gently pushes aside" - response_harm = "stomps" - stop_automated_movement = 1 - friendly = "pinches" - ventcrawler = VENTCRAWLER_ALWAYS - var/obj/item/inventory_head - var/obj/item/inventory_mask - gold_core_spawnable = 2 - devourable = TRUE - -/mob/living/simple_animal/crab/Life() - ..() - //CRAB movement - if(!ckey && !stat) - if(isturf(src.loc) && !resting && !buckled) //This is so it only moves if it's not inside a closet, gentics machine, etc. - turns_since_move++ - if(turns_since_move >= turns_per_move) - var/east_vs_west = pick(4,8) - if(Process_Spacemove(east_vs_west)) - Move(get_step(src,east_vs_west), east_vs_west) - turns_since_move = 0 - regenerate_icons() - -//COFFEE! SQUEEEEEEEEE! -/mob/living/simple_animal/crab/Coffee - name = "Coffee" - real_name = "Coffee" - desc = "It's Coffee, the other pet!" - gender = FEMALE - response_help = "pets" - response_disarm = "gently pushes aside" - response_harm = "stomps" - gold_core_spawnable = 0 \ No newline at end of file +//Look Sir, free crabs! +/mob/living/simple_animal/crab + name = "crab" + desc = "Free crabs!" + icon_state = "crab" + icon_living = "crab" + icon_dead = "crab_dead" + speak_emote = list("clicks") + emote_hear = list("clicks.") + emote_see = list("clacks.") + speak_chance = 1 + turns_per_move = 5 + butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab = 1) + response_help = "pets" + response_disarm = "gently pushes aside" + response_harm = "stomps" + stop_automated_movement = 1 + friendly = "pinches" + ventcrawler = VENTCRAWLER_ALWAYS + var/obj/item/inventory_head + var/obj/item/inventory_mask + gold_core_spawnable = 2 + devourable = TRUE + +/mob/living/simple_animal/crab/Life() + ..() + //CRAB movement + if(!ckey && !stat) + if(isturf(src.loc) && !resting && !buckled) //This is so it only moves if it's not inside a closet, gentics machine, etc. + turns_since_move++ + if(turns_since_move >= turns_per_move) + var/east_vs_west = pick(4,8) + if(Process_Spacemove(east_vs_west)) + Move(get_step(src,east_vs_west), east_vs_west) + turns_since_move = 0 + regenerate_icons() + +//COFFEE! SQUEEEEEEEEE! +/mob/living/simple_animal/crab/Coffee + name = "Coffee" + real_name = "Coffee" + desc = "It's Coffee, the other pet!" + gender = FEMALE + response_help = "pets" + response_disarm = "gently pushes aside" + response_harm = "stomps" + gold_core_spawnable = FALSE + +/mob/living/simple_animal/crab/evil + name = "Evil Crab" + real_name = "Evil Crab" + desc = "Unnerving, isn't it? It has to be planning something nefarious..." + icon_state = "evilcrab" + icon_living = "evilcrab" + icon_dead = "evilcrab_dead" + response_help = "pokes" + response_disarm = "shoves" + response_harm = "stomps" + gold_core_spawnable = TRUE + +/mob/living/simple_animal/crab/kreb + name = "Kreb" + desc = "This is a real crab. The other crabs are simply gubbucks in disguise!" + real_name = "Kreb" + icon_state = "kreb" + icon_living = "kreb" + icon_dead = "kreb_dead" + response_help = "pets" + response_disarm = "gently pushes aside" + response_harm = "stomps" + gold_core_spawnable = FALSE + +/mob/living/simple_animal/crab/evil/kreb + name = "Evil Kreb" + real_name = "Evil Kreb" + icon_state = "evilkreb" + icon_living = "evilkreb" + icon_dead = "evilkreb_dead" diff --git a/code/modules/mob/living/simple_animal/friendly/dog.dm b/code/modules/mob/living/simple_animal/friendly/dog.dm index 244e77d33a..31c080c66c 100644 --- a/code/modules/mob/living/simple_animal/friendly/dog.dm +++ b/code/modules/mob/living/simple_animal/friendly/dog.dm @@ -29,7 +29,6 @@ var/shaved = 0 var/obj/item/inventory_head var/obj/item/inventory_back - var/facehugger var/nofur = 0 //Corgis that have risen past the material plane of existence. gold_core_spawnable = 2 @@ -328,21 +327,14 @@ ..() /mob/living/simple_animal/pet/dog/corgi/Ian/proc/Read_Memory() - if(fexists("data/npc_saves/Ian.sav")) //legacy compatability to convert old format to new - var/savefile/S = new /savefile("data/npc_saves/Ian.sav") - S["age"] >> age - S["record_age"] >> record_age - S["saved_head"] >> saved_head - fdel("data/npc_saves/Ian.sav") - else - 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"] + 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)) @@ -463,13 +455,6 @@ back_icon = DF.get_overlay() add_overlay(back_icon) - if(facehugger) - var/mutable_appearance/facehugger_overlay = mutable_appearance('icons/mob/mask.dmi') - if(istype(src, /mob/living/simple_animal/pet/dog/corgi/puppy)) - facehugger_overlay.icon_state = "facehugger_corgipuppy" - else - facehugger_overlay.icon_state = "facehugger_corgi" - add_overlay(facehugger_overlay) if(pcollar) add_overlay(collar) add_overlay(pettag) @@ -576,4 +561,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/extra_drone_types.dm b/code/modules/mob/living/simple_animal/friendly/drone/extra_drone_types.dm index 7d7ec3db82..d920bf63b3 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/extra_drone_types.dm +++ b/code/modules/mob/living/simple_animal/friendly/drone/extra_drone_types.dm @@ -33,7 +33,7 @@ flavortext = null /mob/living/simple_animal/drone/syndrone/Initialize() - ..() + . = ..() internal_storage.hidden_uplink.telecrystals = 10 /mob/living/simple_animal/drone/syndrone/Login() @@ -46,7 +46,7 @@ default_storage = /obj/item/device/radio/uplink/nuclear /mob/living/simple_animal/drone/syndrone/badass/Initialize() - ..() + . = ..() internal_storage.hidden_uplink.telecrystals = 30 var/obj/item/implant/weapons_auth/W = new/obj/item/implant/weapons_auth(src) W.implant(src) @@ -55,7 +55,7 @@ default_hatmask = /obj/item/clothing/head/chameleon/drone /mob/living/simple_animal/drone/snowflake/Initialize() - ..() + . = ..() desc += " This drone appears to have a complex holoprojector built on its 'head'." /obj/item/drone_shell/syndrone 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/gondola.dm b/code/modules/mob/living/simple_animal/friendly/gondola.dm new file mode 100644 index 0000000000..7e8dcec1ce --- /dev/null +++ b/code/modules/mob/living/simple_animal/friendly/gondola.dm @@ -0,0 +1,65 @@ +#define GONDOLA_HEIGHT pick("gondola_body_long", "gondola_body_medium", "gondola_body_short") +#define GONDOLA_COLOR pick("A87855", "915E48", "683E2C") +#define GONDOLA_MOUSTACHE pick("gondola_moustache_large", "gondola_moustache_small") +#define GONDOLA_EYES pick("gondola_eyes_close", "gondola_eyes_far") + +//Gondolas + +/mob/living/simple_animal/pet/gondola + name = "gondola" + real_name = "gondola" + desc = "Gondola is the silent walker. Having no hands he embodies the Taoist principle of wu-wei (non-action) while his smiling facial expression shows his utter and complete acceptance of the world as it is. Its hide is extremely valuable." + response_help = "pets" + response_disarm = "bops" + response_harm = "kicks" + faction = list("gondola") + turns_per_move = 10 + icon = 'icons/mob/gondolas.dmi' + icon_state = "gondola" + icon_living = "gondola" + loot = list(/obj/effect/decal/cleanable/blood/gibs, /obj/item/stack/sheet/animalhide/gondola = 1) + //Gondolas aren't affected by cold. + 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) + minbodytemp = 0 + maxbodytemp = 1500 + maxHealth = 200 + health = 200 + del_on_death = TRUE + +/mob/living/simple_animal/pet/gondola/Initialize() + . = ..() + CreateGondola() + +/mob/living/simple_animal/pet/gondola/proc/CreateGondola() + icon_state = null + icon_living = null + var/height = GONDOLA_HEIGHT + var/mutable_appearance/body_overlay = mutable_appearance(icon, height) + var/mutable_appearance/eyes_overlay = mutable_appearance(icon, GONDOLA_EYES) + var/mutable_appearance/moustache_overlay = mutable_appearance(icon, GONDOLA_MOUSTACHE) + body_overlay.color = ("#[GONDOLA_COLOR]") + + //Offset the face to match the Gondola's height. + switch(height) + if("gondola_body_medium") + eyes_overlay.pixel_y = -4 + moustache_overlay.pixel_y = -4 + if("gondola_body_short") + eyes_overlay.pixel_y = -8 + moustache_overlay.pixel_y = -8 + + cut_overlays(TRUE) + add_overlay(body_overlay) + add_overlay(eyes_overlay) + add_overlay(moustache_overlay) + +/mob/living/simple_animal/pet/gondola/IsVocal() //Gondolas are the silent walker. + return FALSE + +/mob/living/simple_animal/pet/gondola/emote() + return + +#undef GONDOLA_HEIGHT +#undef GONDOLA_COLOR +#undef GONDOLA_MOUSTACHE +#undef GONDOLA_EYES \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm index c95cbb116a..6983bed378 100644 --- a/code/modules/mob/living/simple_animal/friendly/mouse.dm +++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm @@ -27,7 +27,7 @@ devourable = TRUE /mob/living/simple_animal/mouse/Initialize() - ..() + . = ..() if(!body_color) body_color = pick( list("brown","gray","white") ) icon_state = "mouse_[body_color]" 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/friendly/pet.dm b/code/modules/mob/living/simple_animal/friendly/pet.dm index b2c14faaa2..3200c8b7d7 100644 --- a/code/modules/mob/living/simple_animal/friendly/pet.dm +++ b/code/modules/mob/living/simple_animal/friendly/pet.dm @@ -31,7 +31,7 @@ ..() /mob/living/simple_animal/pet/Initialize() - ..() + . = ..() if(pcollar) pcollar = new(src) regenerate_icons() diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm index 1f1f937d9a..d8a2985594 100644 --- a/code/modules/mob/living/simple_animal/guardian/guardian.dm +++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm @@ -54,10 +54,10 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians GLOB.parasites += src setthemename(theme) - ..() + . = ..() /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)]" @@ -129,7 +129,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians update_health_hud() //we need to update all of our health displays to match our summoner and we can't practically give the summoner a hook to do it med_hud_set_health() med_hud_set_status() - if(summoner) + if(!QDELETED(summoner)) if(summoner.stat == DEAD) forceMove(summoner.loc) to_chat(src, "Your summoner has died!") @@ -659,7 +659,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians name = "holoparasite injector kit" /obj/item/storage/box/syndie_kit/guardian/Initialize() - ..() + . = ..() new /obj/item/guardiancreator/tech/choose/traitor(src) new /obj/item/paper/guides/antag/guardian(src) return diff --git a/code/modules/mob/living/simple_animal/guardian/types/assassin.dm b/code/modules/mob/living/simple_animal/guardian/types/assassin.dm index ed21310cd9..9632ce3ff9 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/assassin.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/assassin.dm @@ -17,7 +17,7 @@ var/obj/screen/alert/instealthalert /mob/living/simple_animal/hostile/guardian/assassin/Initialize() - ..() + . = ..() stealthcooldown = 0 /mob/living/simple_animal/hostile/guardian/assassin/Life() diff --git a/code/modules/mob/living/simple_animal/hostile/bees.dm b/code/modules/mob/living/simple_animal/hostile/bees.dm index b3070a8db6..dea21157c6 100644 --- a/code/modules/mob/living/simple_animal/hostile/bees.dm +++ b/code/modules/mob/living/simple_animal/hostile/bees.dm @@ -56,7 +56,7 @@ /mob/living/simple_animal/hostile/poison/bees/Initialize() - ..() + . = ..() generate_bee_visuals() @@ -275,7 +275,7 @@ /obj/item/queen_bee/bought/Initialize() - ..() + . = ..() queen = new(src) 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..9ae70745cf 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 @@ -12,7 +12,7 @@ /mob/living/simple_animal/hostile/boss/Initialize() - ..() + . = ..() atb = new() atb.point_regen_delay = point_regen_delay 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/mecha_pilot.dm b/code/modules/mob/living/simple_animal/hostile/mecha_pilot.dm index f4195a93b3..b84f3c8682 100644 --- a/code/modules/mob/living/simple_animal/hostile/mecha_pilot.dm +++ b/code/modules/mob/living/simple_animal/hostile/mecha_pilot.dm @@ -40,7 +40,7 @@ search_objects = 2 /mob/living/simple_animal/hostile/syndicate/mecha_pilot/no_mech/Initialize() - ..() + . = ..() wanted_objects = typecacheof(/obj/mecha/combat, ignore_root_path=TRUE) /mob/living/simple_animal/hostile/syndicate/mecha_pilot/nanotrasen //nanotrasen are syndies! no it's just a weird path. @@ -60,7 +60,7 @@ /mob/living/simple_animal/hostile/syndicate/mecha_pilot/Initialize() - ..() + . = ..() if(spawn_mecha_type) var/obj/mecha/M = new spawn_mecha_type (get_turf(src)) if(istype(M)) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm index a63e4cf89f..815b20c0c5 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm @@ -114,7 +114,7 @@ Difficulty: Medium if(L.stat == DEAD) visible_message("[src] butchers [L]!", "You butcher [L], restoring your health!") - if(z != ZLEVEL_STATION && !client) //NPC monsters won't heal while on station + if(!(z in GLOB.station_z_levels && !client)) //NPC monsters won't heal while on station if(guidance) adjustHealth(-L.maxHealth) else diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm index 2e11a152a9..6e6237aab5 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm @@ -105,11 +105,10 @@ Difficulty: Hard /mob/living/simple_animal/hostile/megafauna/bubblegum/Initialize() - ..() + . = ..() for(var/mob/living/simple_animal/hostile/megafauna/bubblegum/B in GLOB.mob_list) if(B != src) - qdel(src) //There can be only one - return + return INITIALIZE_HINT_QDEL //There can be only one var/obj/effect/proc_holder/spell/bloodcrawl/bloodspell = new AddSpell(bloodspell) if(istype(loc, /obj/effect/dummy/slaughter)) 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 66fd219358..480408eab4 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm @@ -93,7 +93,7 @@ Difficulty: Very Hard /mob/living/simple_animal/hostile/megafauna/colossus/Initialize() - ..() + . = ..() internal = new/obj/item/device/gps/internal/colossus(src) /obj/effect/temp_visual/at_shield @@ -289,17 +289,12 @@ Difficulty: Very Hard memory_saved = TRUE /obj/machinery/smartfridge/black_box/proc/ReadMemory() - if(fexists("data/npc_saves/Blackbox.sav")) //legacy compatability to convert old format to new - var/savefile/S = new /savefile("data/npc_saves/Blackbox.sav") - S["stored_items"] >> stored_items - fdel("data/npc_saves/Blackbox.sav") - else - 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"] + 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() @@ -792,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..c4618db620 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 @@ -101,7 +101,7 @@ visible_message( "[src] devours [L]!", "You feast on [L], restoring your health!") - if(z != ZLEVEL_STATION && !client) //NPC monsters won't heal while on station + if(!(z in GLOB.station_z_levels && !client)) //NPC monsters won't heal while on station adjustBruteLoss(-L.maxHealth/2) L.gib() diff --git a/code/modules/mob/living/simple_animal/hostile/mimic.dm b/code/modules/mob/living/simple_animal/hostile/mimic.dm index 131abbec2d..abe095779b 100644 --- a/code/modules/mob/living/simple_animal/hostile/mimic.dm +++ b/code/modules/mob/living/simple_animal/hostile/mimic.dm @@ -1,268 +1,268 @@ -/mob/living/simple_animal/hostile/mimic - name = "crate" - desc = "A rectangular steel crate." - icon = 'icons/obj/crates.dmi' - icon_state = "crate" - icon_living = "crate" - - response_help = "touches" - response_disarm = "pushes" - response_harm = "hits" - speed = 0 - maxHealth = 250 - health = 250 - gender = NEUTER - - harm_intent_damage = 5 - melee_damage_lower = 8 - melee_damage_upper = 12 - attacktext = "attacks" - attack_sound = 'sound/weapons/punch1.ogg' - emote_taunt = list("growls") - speak_emote = list("creaks") - taunt_chance = 30 - - 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) - minbodytemp = 0 - - faction = list("mimic") - move_to_delay = 9 - gold_core_spawnable = 1 - del_on_death = 1 - -// Aggro when you try to open them. Will also pickup loot when spawns and drop it when dies. -/mob/living/simple_animal/hostile/mimic/crate - attacktext = "bites" - speak_emote = list("clatters") - stop_automated_movement = 1 - wander = 0 +/mob/living/simple_animal/hostile/mimic + name = "crate" + desc = "A rectangular steel crate." + icon = 'icons/obj/crates.dmi' + icon_state = "crate" + icon_living = "crate" + + response_help = "touches" + response_disarm = "pushes" + response_harm = "hits" + speed = 0 + maxHealth = 250 + health = 250 + gender = NEUTER + + harm_intent_damage = 5 + melee_damage_lower = 8 + melee_damage_upper = 12 + attacktext = "attacks" + attack_sound = 'sound/weapons/punch1.ogg' + emote_taunt = list("growls") + speak_emote = list("creaks") + taunt_chance = 30 + + 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) + minbodytemp = 0 + + faction = list("mimic") + move_to_delay = 9 + gold_core_spawnable = 1 + del_on_death = 1 + +// Aggro when you try to open them. Will also pickup loot when spawns and drop it when dies. +/mob/living/simple_animal/hostile/mimic/crate + attacktext = "bites" + speak_emote = list("clatters") + stop_automated_movement = 1 + wander = 0 var/attempt_open = FALSE - -// Pickup loot -/mob/living/simple_animal/hostile/mimic/crate/Initialize(mapload) - ..() - if(mapload) //eat shit - for(var/obj/item/I in loc) - I.loc = src - -/mob/living/simple_animal/hostile/mimic/crate/DestroySurroundings() - ..() - if(prob(90)) - icon_state = "[initial(icon_state)]open" - else - icon_state = initial(icon_state) - -/mob/living/simple_animal/hostile/mimic/crate/ListTargets() - if(attempt_open) - return ..() - return ..(1) - -/mob/living/simple_animal/hostile/mimic/crate/FindTarget() - . = ..() - if(.) - trigger() - -/mob/living/simple_animal/hostile/mimic/crate/AttackingTarget() - . = ..() - if(.) - icon_state = initial(icon_state) - if(prob(15) && iscarbon(target)) - var/mob/living/carbon/C = target - C.Knockdown(40) - C.visible_message("\The [src] knocks down \the [C]!", \ - "\The [src] knocks you down!") - -/mob/living/simple_animal/hostile/mimic/crate/proc/trigger() - if(!attempt_open) - visible_message("[src] starts to move!") + +// Pickup loot +/mob/living/simple_animal/hostile/mimic/crate/Initialize(mapload) + . = ..() + if(mapload) //eat shit + for(var/obj/item/I in loc) + I.loc = src + +/mob/living/simple_animal/hostile/mimic/crate/DestroySurroundings() + ..() + if(prob(90)) + icon_state = "[initial(icon_state)]open" + else + icon_state = initial(icon_state) + +/mob/living/simple_animal/hostile/mimic/crate/ListTargets() + if(attempt_open) + return ..() + return ..(1) + +/mob/living/simple_animal/hostile/mimic/crate/FindTarget() + . = ..() + if(.) + trigger() + +/mob/living/simple_animal/hostile/mimic/crate/AttackingTarget() + . = ..() + if(.) + icon_state = initial(icon_state) + if(prob(15) && iscarbon(target)) + var/mob/living/carbon/C = target + C.Knockdown(40) + C.visible_message("\The [src] knocks down \the [C]!", \ + "\The [src] knocks you down!") + +/mob/living/simple_animal/hostile/mimic/crate/proc/trigger() + if(!attempt_open) + visible_message("[src] starts to move!") attempt_open = TRUE - -/mob/living/simple_animal/hostile/mimic/crate/adjustHealth(amount, updating_health = TRUE, forced = FALSE) - trigger() - . = ..() - -/mob/living/simple_animal/hostile/mimic/crate/LoseTarget() - ..() - icon_state = initial(icon_state) - -/mob/living/simple_animal/hostile/mimic/crate/death() - var/obj/structure/closet/crate/C = new(get_turf(src)) - // Put loot in crate - for(var/obj/O in src) - O.loc = C - ..() - -GLOBAL_LIST_INIT(protected_objects, list(/obj/structure/table, /obj/structure/cable, /obj/structure/window)) - -/mob/living/simple_animal/hostile/mimic/copy - health = 100 - maxHealth = 100 - var/mob/living/creator = null // the creator - var/destroy_objects = 0 - var/knockdown_people = 0 - var/static/mutable_appearance/googly_eyes = mutable_appearance('icons/mob/mob.dmi', "googly_eyes") - gold_core_spawnable = 0 - -/mob/living/simple_animal/hostile/mimic/copy/Initialize(mapload, obj/copy, mob/living/creator, destroy_original = 0) - ..() - CopyObject(copy, creator, destroy_original) - -/mob/living/simple_animal/hostile/mimic/copy/Life() - ..() - if(!target && !ckey) //Objects eventually revert to normal if no one is around to terrorize - adjustBruteLoss(1) - for(var/mob/living/M in contents) //a fix for animated statues from the flesh to stone spell - death() - -/mob/living/simple_animal/hostile/mimic/copy/death() - for(var/atom/movable/M in src) - M.loc = get_turf(src) - ..() - -/mob/living/simple_animal/hostile/mimic/copy/ListTargets() - . = ..() - return . - creator - -/mob/living/simple_animal/hostile/mimic/copy/proc/ChangeOwner(mob/owner) - if(owner != creator) - LoseTarget() - creator = owner - faction |= "\ref[owner]" - -/mob/living/simple_animal/hostile/mimic/copy/proc/CheckObject(obj/O) - if((isitem(O) || istype(O, /obj/structure)) && !is_type_in_list(O, GLOB.protected_objects)) - return 1 - return 0 - -/mob/living/simple_animal/hostile/mimic/copy/proc/CopyObject(obj/O, mob/living/user, destroy_original = 0) - if(destroy_original || CheckObject(O)) - O.loc = src - name = O.name - desc = O.desc - icon = O.icon - icon_state = O.icon_state - icon_living = icon_state - copy_overlays(O) - add_overlay(googly_eyes) - if(istype(O, /obj/structure) || istype(O, /obj/machinery)) - health = (anchored * 50) + 50 - destroy_objects = 1 - if(O.density && O.anchored) - knockdown_people = 1 - melee_damage_lower *= 2 - melee_damage_upper *= 2 - else if(isitem(O)) - var/obj/item/I = O - health = 15 * I.w_class - melee_damage_lower = 2 + I.force - melee_damage_upper = 2 + I.force - move_to_delay = 2 * I.w_class + 1 - maxHealth = health - if(user) - creator = user - faction += "\ref[creator]" // very unique - if(destroy_original) - qdel(O) - return 1 - -/mob/living/simple_animal/hostile/mimic/copy/DestroySurroundings() - if(destroy_objects) - ..() - -/mob/living/simple_animal/hostile/mimic/copy/AttackingTarget() - . = ..() - if(knockdown_people && . && prob(15) && iscarbon(target)) - var/mob/living/carbon/C = target - C.Knockdown(40) - C.visible_message("\The [src] knocks down \the [C]!", \ - "\The [src] knocks you down!") - -/mob/living/simple_animal/hostile/mimic/copy/machine - speak = list("HUMANS ARE IMPERFECT!", "YOU SHALL BE ASSIMILATED!", "YOU ARE HARMING YOURSELF", "You have been deemed hazardous. Will you comply?", \ - "My logic is undeniable.", "One of us.", "FLESH IS WEAK", "THIS ISN'T WAR, THIS IS EXTERMINATION!") - speak_chance = 7 - -/mob/living/simple_animal/hostile/mimic/copy/machine/CanAttack(atom/the_target) - if(the_target == creator) // Don't attack our creator AI. - return 0 - if(iscyborg(the_target)) - var/mob/living/silicon/robot/R = the_target - if(R.connected_ai == creator) // Only attack robots that aren't synced to our creator AI. - return 0 - return ..() - - - -/mob/living/simple_animal/hostile/mimic/copy/ranged - var/obj/item/gun/TrueGun = null - var/obj/item/gun/magic/Zapstick - var/obj/item/gun/ballistic/Pewgun - var/obj/item/gun/energy/Zapgun - -/mob/living/simple_animal/hostile/mimic/copy/ranged/CopyObject(obj/O, mob/living/creator, destroy_original = 0) - if(..()) - emote_see = list("aims menacingly") - obj_damage = 0 - environment_smash = ENVIRONMENT_SMASH_NONE //needed? seems weird for them to do so - ranged = 1 - retreat_distance = 1 //just enough to shoot - minimum_distance = 6 - var/obj/item/gun/G = O - melee_damage_upper = G.force - melee_damage_lower = G.force - max(0, (G.force / 2)) - move_to_delay = 2 * G.w_class + 1 - projectilesound = G.fire_sound - TrueGun = G - if(istype(G, /obj/item/gun/magic)) - Zapstick = G - var/obj/item/ammo_casing/magic/M = Zapstick.ammo_type - projectiletype = initial(M.projectile_type) - if(istype(G, /obj/item/gun/ballistic)) - Pewgun = G - var/obj/item/ammo_box/magazine/M = Pewgun.mag_type - casingtype = initial(M.ammo_type) - if(istype(G, /obj/item/gun/energy)) - Zapgun = G - var/selectfiresetting = Zapgun.select - var/obj/item/ammo_casing/energy/E = Zapgun.ammo_type[selectfiresetting] - projectiletype = initial(E.projectile_type) - -/mob/living/simple_animal/hostile/mimic/copy/ranged/OpenFire(the_target) - if(Zapgun) - if(Zapgun.cell) - var/obj/item/ammo_casing/energy/shot = Zapgun.ammo_type[Zapgun.select] - if(Zapgun.cell.charge >= shot.e_cost) - Zapgun.cell.use(shot.e_cost) - Zapgun.update_icon() - ..() - else if(Zapstick) - if(Zapstick.charges) - Zapstick.charges-- - Zapstick.update_icon() - ..() - else if(Pewgun) - if(Pewgun.chambered) - if(Pewgun.chambered.BB) - qdel(Pewgun.chambered.BB) - Pewgun.chambered.BB = null //because qdel takes too long, ensures icon update - Pewgun.chambered.update_icon() - ..() - else - visible_message("The [src] clears a jam!") - Pewgun.chambered.loc = loc //rip revolver immersions, blame shotgun snowflake procs - Pewgun.chambered = null - if(Pewgun.magazine && Pewgun.magazine.stored_ammo.len) - Pewgun.chambered = Pewgun.magazine.get_round(0) - Pewgun.chambered.loc = Pewgun - Pewgun.update_icon() - else if(Pewgun.magazine && Pewgun.magazine.stored_ammo.len) //only true for pumpguns i think - Pewgun.chambered = Pewgun.magazine.get_round(0) - Pewgun.chambered.loc = Pewgun - visible_message("The [src] cocks itself!") - else - ranged = 0 //BANZAIIII - retreat_distance = 0 - minimum_distance = 1 - return - icon_state = TrueGun.icon_state - icon_living = TrueGun.icon_state + +/mob/living/simple_animal/hostile/mimic/crate/adjustHealth(amount, updating_health = TRUE, forced = FALSE) + trigger() + . = ..() + +/mob/living/simple_animal/hostile/mimic/crate/LoseTarget() + ..() + icon_state = initial(icon_state) + +/mob/living/simple_animal/hostile/mimic/crate/death() + var/obj/structure/closet/crate/C = new(get_turf(src)) + // Put loot in crate + for(var/obj/O in src) + O.loc = C + ..() + +GLOBAL_LIST_INIT(protected_objects, list(/obj/structure/table, /obj/structure/cable, /obj/structure/window)) + +/mob/living/simple_animal/hostile/mimic/copy + health = 100 + maxHealth = 100 + var/mob/living/creator = null // the creator + var/destroy_objects = 0 + var/knockdown_people = 0 + var/static/mutable_appearance/googly_eyes = mutable_appearance('icons/mob/mob.dmi', "googly_eyes") + gold_core_spawnable = 0 + +/mob/living/simple_animal/hostile/mimic/copy/Initialize(mapload, obj/copy, mob/living/creator, destroy_original = 0) + . = ..() + CopyObject(copy, creator, destroy_original) + +/mob/living/simple_animal/hostile/mimic/copy/Life() + ..() + if(!target && !ckey) //Objects eventually revert to normal if no one is around to terrorize + adjustBruteLoss(1) + for(var/mob/living/M in contents) //a fix for animated statues from the flesh to stone spell + death() + +/mob/living/simple_animal/hostile/mimic/copy/death() + for(var/atom/movable/M in src) + M.loc = get_turf(src) + ..() + +/mob/living/simple_animal/hostile/mimic/copy/ListTargets() + . = ..() + return . - creator + +/mob/living/simple_animal/hostile/mimic/copy/proc/ChangeOwner(mob/owner) + if(owner != creator) + LoseTarget() + creator = owner + faction |= "\ref[owner]" + +/mob/living/simple_animal/hostile/mimic/copy/proc/CheckObject(obj/O) + if((isitem(O) || istype(O, /obj/structure)) && !is_type_in_list(O, GLOB.protected_objects)) + return 1 + return 0 + +/mob/living/simple_animal/hostile/mimic/copy/proc/CopyObject(obj/O, mob/living/user, destroy_original = 0) + if(destroy_original || CheckObject(O)) + O.loc = src + name = O.name + desc = O.desc + icon = O.icon + icon_state = O.icon_state + icon_living = icon_state + copy_overlays(O) + add_overlay(googly_eyes) + if(istype(O, /obj/structure) || istype(O, /obj/machinery)) + health = (anchored * 50) + 50 + destroy_objects = 1 + if(O.density && O.anchored) + knockdown_people = 1 + melee_damage_lower *= 2 + melee_damage_upper *= 2 + else if(isitem(O)) + var/obj/item/I = O + health = 15 * I.w_class + melee_damage_lower = 2 + I.force + melee_damage_upper = 2 + I.force + move_to_delay = 2 * I.w_class + 1 + maxHealth = health + if(user) + creator = user + faction += "\ref[creator]" // very unique + if(destroy_original) + qdel(O) + return 1 + +/mob/living/simple_animal/hostile/mimic/copy/DestroySurroundings() + if(destroy_objects) + ..() + +/mob/living/simple_animal/hostile/mimic/copy/AttackingTarget() + . = ..() + if(knockdown_people && . && prob(15) && iscarbon(target)) + var/mob/living/carbon/C = target + C.Knockdown(40) + C.visible_message("\The [src] knocks down \the [C]!", \ + "\The [src] knocks you down!") + +/mob/living/simple_animal/hostile/mimic/copy/machine + speak = list("HUMANS ARE IMPERFECT!", "YOU SHALL BE ASSIMILATED!", "YOU ARE HARMING YOURSELF", "You have been deemed hazardous. Will you comply?", \ + "My logic is undeniable.", "One of us.", "FLESH IS WEAK", "THIS ISN'T WAR, THIS IS EXTERMINATION!") + speak_chance = 7 + +/mob/living/simple_animal/hostile/mimic/copy/machine/CanAttack(atom/the_target) + if(the_target == creator) // Don't attack our creator AI. + return 0 + if(iscyborg(the_target)) + var/mob/living/silicon/robot/R = the_target + if(R.connected_ai == creator) // Only attack robots that aren't synced to our creator AI. + return 0 + return ..() + + + +/mob/living/simple_animal/hostile/mimic/copy/ranged + var/obj/item/gun/TrueGun = null + var/obj/item/gun/magic/Zapstick + var/obj/item/gun/ballistic/Pewgun + var/obj/item/gun/energy/Zapgun + +/mob/living/simple_animal/hostile/mimic/copy/ranged/CopyObject(obj/O, mob/living/creator, destroy_original = 0) + if(..()) + emote_see = list("aims menacingly") + obj_damage = 0 + environment_smash = ENVIRONMENT_SMASH_NONE //needed? seems weird for them to do so + ranged = 1 + retreat_distance = 1 //just enough to shoot + minimum_distance = 6 + var/obj/item/gun/G = O + melee_damage_upper = G.force + melee_damage_lower = G.force - max(0, (G.force / 2)) + move_to_delay = 2 * G.w_class + 1 + projectilesound = G.fire_sound + TrueGun = G + if(istype(G, /obj/item/gun/magic)) + Zapstick = G + var/obj/item/ammo_casing/magic/M = Zapstick.ammo_type + projectiletype = initial(M.projectile_type) + if(istype(G, /obj/item/gun/ballistic)) + Pewgun = G + var/obj/item/ammo_box/magazine/M = Pewgun.mag_type + casingtype = initial(M.ammo_type) + if(istype(G, /obj/item/gun/energy)) + Zapgun = G + var/selectfiresetting = Zapgun.select + var/obj/item/ammo_casing/energy/E = Zapgun.ammo_type[selectfiresetting] + projectiletype = initial(E.projectile_type) + +/mob/living/simple_animal/hostile/mimic/copy/ranged/OpenFire(the_target) + if(Zapgun) + if(Zapgun.cell) + var/obj/item/ammo_casing/energy/shot = Zapgun.ammo_type[Zapgun.select] + if(Zapgun.cell.charge >= shot.e_cost) + Zapgun.cell.use(shot.e_cost) + Zapgun.update_icon() + ..() + else if(Zapstick) + if(Zapstick.charges) + Zapstick.charges-- + Zapstick.update_icon() + ..() + else if(Pewgun) + if(Pewgun.chambered) + if(Pewgun.chambered.BB) + qdel(Pewgun.chambered.BB) + Pewgun.chambered.BB = null //because qdel takes too long, ensures icon update + Pewgun.chambered.update_icon() + ..() + else + visible_message("The [src] clears a jam!") + Pewgun.chambered.loc = loc //rip revolver immersions, blame shotgun snowflake procs + Pewgun.chambered = null + if(Pewgun.magazine && Pewgun.magazine.stored_ammo.len) + Pewgun.chambered = Pewgun.magazine.get_round(0) + Pewgun.chambered.loc = Pewgun + Pewgun.update_icon() + else if(Pewgun.magazine && Pewgun.magazine.stored_ammo.len) //only true for pumpguns i think + Pewgun.chambered = Pewgun.magazine.get_round(0) + Pewgun.chambered.loc = Pewgun + visible_message("The [src] cocks itself!") + else + ranged = 0 //BANZAIIII + retreat_distance = 0 + minimum_distance = 1 + return + icon_state = TrueGun.icon_state + icon_living = TrueGun.icon_state 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..b883720ace 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,70 @@ 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/random/Initialize() + . = ..() + if(prob(1)) + if(prob(75)) + new /mob/living/simple_animal/hostile/asteroid/basilisk/watcher/magmawing(loc) + else + new /mob/living/simple_animal/hostile/asteroid/basilisk/watcher/icewing(loc) + return INITIALIZE_HINT_QDEL + +/mob/living/simple_animal/hostile/asteroid/basilisk/watcher/magmawing + name = "magmawing watcher" + desc = "When raised very close to lava, some watchers adapt to the extreme heat and use lava as both a weapon and wings." + 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 + light_range = 3 + light_power = 2.5 + light_color = LIGHT_COLOR_LAVA + projectiletype = /obj/item/projectile/temp/basilisk/magmawing + crusher_loot = /obj/item/crusher_trophy/blaster_tubes/magma_wing + crusher_drop_mod = 60 + +/mob/living/simple_animal/hostile/asteroid/basilisk/watcher/icewing + name = "icewing watcher" + desc = "Very rarely, some watchers will eke out an existence far from heat sources. In the absence of warmth, they become icy and fragile but fire much stronger freezing blasts." + icon_state = "watcher_icewing" + icon_living = "watcher_icewing" + icon_aggro = "watcher_icewing" + icon_dead = "watcher_icewing_dead" + maxHealth = 170 + health = 170 + projectiletype = /obj/item/projectile/temp/basilisk/icewing + butcher_results = list(/obj/item/ore/diamond = 5, /obj/item/stack/sheet/bone = 1) //No sinew; the wings are too fragile to be usable + crusher_loot = /obj/item/crusher_trophy/watcher_wing/ice_wing + crusher_drop_mod = 30 + +/obj/item/projectile/temp/basilisk/magmawing + name = "scorching blast" + icon_state = "lava" + damage = 5 + damage_type = BURN + nodamage = FALSE + temperature = 500 //Heats you up! + +/obj/item/projectile/temp/basilisk/magmawing/on_hit(atom/target, blocked = FALSE) + . = ..() + if(.) + var/mob/living/L = target + L.adjust_fire_stacks(0.1) + L.IgniteMob() + +/obj/item/projectile/temp/basilisk/icewing + damage = 5 + damage_type = BURN + nodamage = FALSE + +/obj/item/projectile/temp/basilisk/icewing/on_hit(atom/target, blocked = FALSE) + . = ..() + if(.) + var/mob/living/L = target + L.apply_status_effect(/datum/status_effect/freon/watcher) + /mob/living/simple_animal/hostile/asteroid/basilisk/watcher/tendril fromtendril = TRUE diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/goldgrub.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/goldgrub.dm index bc682e4be5..85329c76ec 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/goldgrub.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/goldgrub.dm @@ -33,7 +33,7 @@ var/will_burrow = TRUE /mob/living/simple_animal/hostile/asteroid/goldgrub/Initialize() - ..() + . = ..() var/i = rand(1,3) while(i) loot += pick(/obj/item/ore/silver, /obj/item/ore/gold, /obj/item/ore/uranium, /obj/item/ore/diamond) 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..de995f951a 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 @@ -33,7 +33,7 @@ loot = list(/obj/item/stack/sheet/animalhide/goliath_hide) /mob/living/simple_animal/hostile/asteroid/goliath/Life() - ..() + . = ..() handle_preattack() /mob/living/simple_animal/hostile/asteroid/goliath/proc/handle_preattack() @@ -57,8 +57,8 @@ if(!isturf(tturf)) return if(get_dist(src, target) <= 7)//Screen range check, so you can't get tentacle'd offscreen - visible_message("The [src.name] digs its tentacles under [target.name]!") - new /obj/effect/goliath_tentacle/original(tturf) + visible_message("[src] digs its tentacles under [target]!") + new /obj/effect/temp_visual/goliath_tentacle/original(tturf, src) ranged_cooldown = world.time + ranged_cooldown_time icon_state = icon_aggro pre_attack = 0 @@ -91,43 +91,102 @@ stat_attack = UNCONSCIOUS robust_searching = 1 +/mob/living/simple_animal/hostile/asteroid/goliath/beast/random/Initialize() + . = ..() + if(prob(1)) + new /mob/living/simple_animal/hostile/asteroid/goliath/beast/ancient(loc) + return INITIALIZE_HINT_QDEL + +/mob/living/simple_animal/hostile/asteroid/goliath/beast/ancient + name = "ancient goliath" + desc = "Goliaths are biologically immortal, and rare specimens have survived for centuries. This one is clearly ancient, and its tentacles constantly churn the earth around it." + icon_state = "Goliath" + icon_living = "Goliath" + icon_aggro = "Goliath_alert" + icon_dead = "Goliath_dead" + maxHealth = 400 + health = 400 + speed = 4 + 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 + butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab/goliath = 2, /obj/item/stack/sheet/bone = 2) + crusher_drop_mod = 30 + wander = FALSE + var/list/cached_tentacle_turfs + var/turf/last_location + var/tentacle_recheck_cooldown = 100 + +/mob/living/simple_animal/hostile/asteroid/goliath/beast/ancient/Life() + . = ..() + if(isturf(loc)) + if(!LAZYLEN(cached_tentacle_turfs) || loc != last_location || tentacle_recheck_cooldown <= world.time) + LAZYCLEARLIST(cached_tentacle_turfs) + last_location = loc + tentacle_recheck_cooldown = world.time + initial(tentacle_recheck_cooldown) + for(var/turf/open/T in orange(4, loc)) + LAZYADD(cached_tentacle_turfs, T) + for(var/t in cached_tentacle_turfs) + if(isopenturf(t)) + if(prob(10)) + new /obj/effect/temp_visual/goliath_tentacle(t, src) + else + cached_tentacle_turfs -= t + /mob/living/simple_animal/hostile/asteroid/goliath/beast/tendril fromtendril = TRUE //tentacles -/obj/effect/goliath_tentacle - name = "Goliath tentacle" +/obj/effect/temp_visual/goliath_tentacle + name = "goliath tentacle" icon = 'icons/mob/lavaland/lavaland_monsters.dmi' - icon_state = "Goliath_tentacle" - var/latched = FALSE - anchored = TRUE + icon_state = "Goliath_tentacle_spawn" + layer = BELOW_MOB_LAYER + var/mob/living/spawner -/obj/effect/goliath_tentacle/Initialize() +/obj/effect/temp_visual/goliath_tentacle/Initialize(mapload, mob/living/new_spawner) . = ..() + for(var/obj/effect/temp_visual/goliath_tentacle/T in loc) + if(T != src) + return INITIALIZE_HINT_QDEL + if(!QDELETED(new_spawner)) + spawner = new_spawner if(ismineralturf(loc)) var/turf/closed/mineral/M = loc M.gets_drilled() - addtimer(CALLBACK(src, .proc/Trip), 10) + deltimer(timerid) + timerid = addtimer(CALLBACK(src, .proc/tripanim), 7, TIMER_STOPPABLE) -/obj/effect/goliath_tentacle/original/Initialize() +/obj/effect/temp_visual/goliath_tentacle/original/Initialize(mapload, new_spawner) . = ..() - for(var/obj/effect/goliath_tentacle/original/O in loc)//No more GG NO RE from 2+ goliaths simultaneously tentacling you - if(O != src) - qdel(src) var/list/directions = GLOB.cardinals.Copy() for(var/i in 1 to 3) var/spawndir = pick_n_take(directions) - var/turf/T = get_step(src,spawndir) + var/turf/T = get_step(src, spawndir) if(T) - new /obj/effect/goliath_tentacle(T) + new /obj/effect/temp_visual/goliath_tentacle(T, spawner) -/obj/effect/goliath_tentacle/proc/Trip() - for(var/mob/living/M in src.loc) - visible_message("The [src.name] grabs hold of [M.name]!") - M.Stun(100) - M.adjustBruteLoss(rand(10,15)) +/obj/effect/temp_visual/goliath_tentacle/proc/tripanim() + icon_state = "Goliath_tentacle_wiggle" + deltimer(timerid) + timerid = addtimer(CALLBACK(src, .proc/trip), 3, TIMER_STOPPABLE) + +/obj/effect/temp_visual/goliath_tentacle/proc/trip() + var/latched = FALSE + for(var/mob/living/L in loc) + if((!QDELETED(spawner) && spawner.faction_check_mob(L)) || L.stat == DEAD) + continue + visible_message("[src] grabs hold of [L]!") + L.Stun(100) + L.adjustBruteLoss(rand(10,15)) latched = TRUE if(!latched) - qdel(src) + retract() else - QDEL_IN(src, 50) + deltimer(timerid) + timerid = addtimer(CALLBACK(src, .proc/retract), 10, TIMER_STOPPABLE) + +/obj/effect/temp_visual/goliath_tentacle/proc/retract() + icon_state = "Goliath_tentacle_retract" + deltimer(timerid) + timerid = QDEL_IN(src, 7) diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/gutlunch.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/gutlunch.dm index 321e176309..11188a9023 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/gutlunch.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/gutlunch.dm @@ -76,7 +76,7 @@ gender = MALE /mob/living/simple_animal/hostile/asteroid/gutlunch/gubbuck/Initialize() - ..() + . = ..() add_atom_colour(pick("#E39FBB", "#D97D64", "#CF8C4A"), FIXED_COLOUR_PRIORITY) resize = 0.85 update_transform() 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..d2980bbdaf 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 @@ -84,7 +84,7 @@ del_on_death = 1 /mob/living/simple_animal/hostile/asteroid/hivelordbrood/Initialize() - ..() + . = ..() addtimer(CALLBACK(src, .proc/death), 100) //Legion @@ -110,8 +110,28 @@ del_on_death = 1 stat_attack = UNCONSCIOUS robust_searching = 1 + var/dwarf_mob = FALSE var/mob/living/carbon/human/stored_mob +/mob/living/simple_animal/hostile/asteroid/hivelord/legion/random/Initialize() + . = ..() + if(prob(5)) + new /mob/living/simple_animal/hostile/asteroid/hivelord/legion/dwarf(loc) + return INITIALIZE_HINT_QDEL + +/mob/living/simple_animal/hostile/asteroid/hivelord/legion/dwarf + name = "dwarf legion" + desc = "You can still see what was once a rather small human under the shifting mass of corruption." + icon_state = "dwarf_legion" + icon_living = "dwarf_legion" + icon_aggro = "dwarf_legion" + icon_dead = "dwarf_legion" + maxHealth = 60 + health = 60 + speed = 2 //faster! + crusher_drop_mod = 20 + dwarf_mob = TRUE + /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) @@ -121,6 +141,8 @@ stored_mob = null else if(fromtendril) new /obj/effect/mob_spawn/human/corpse/charredskeleton(T) + else if(dwarf_mob) + new /obj/effect/mob_spawn/human/corpse/damaged/legioninfested/dwarf(T) else new /obj/effect/mob_spawn/human/corpse/damaged/legioninfested(T) ..(gibbed) @@ -164,7 +186,11 @@ /mob/living/simple_animal/hostile/asteroid/hivelordbrood/legion/proc/infest(mob/living/carbon/human/H) visible_message("[name] burrows into the flesh of [H]!") - var/mob/living/simple_animal/hostile/asteroid/hivelord/legion/L = new(H.loc) + var/mob/living/simple_animal/hostile/asteroid/hivelord/legion/L + if(H.dna.check_mutation(DWARFISM)) //dwarf legions aren't just fluff! + L = new /mob/living/simple_animal/hostile/asteroid/hivelord/legion/dwarf(H.loc) + else + L = new(H.loc) visible_message("[L] staggers to their feet!") H.death() H.adjustBruteLoss(1000) @@ -174,7 +200,7 @@ //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 +210,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 @@ -236,6 +262,10 @@ //Legion infested mobs +/obj/effect/mob_spawn/human/corpse/damaged/legioninfested/dwarf/equip(mob/living/carbon/human/H) + . = ..() + H.dna.add_mutation(DWARFISM) + /obj/effect/mob_spawn/human/corpse/damaged/legioninfested/Initialize() var/type = pickweight(list("Miner" = 66, "Ashwalker" = 10, "Golem" = 10,"Clown" = 10, pick(list("Shadow", "YeOlde","Operative", "Cultist")) = 4)) switch(type) diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/mining_mobs.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/mining_mobs.dm index 5788a6fdc6..0ea88aedcf 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,11 +15,12 @@ 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/crusher_drop_mod = 5 /mob/living/simple_animal/hostile/asteroid/Initialize(mapload) . = ..() @@ -57,7 +58,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) * crusher_drop_mod)) //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/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm index 1235d81bbe..b4dc7c8fac 100644 --- a/code/modules/mob/living/simple_animal/hostile/statue.dm +++ b/code/modules/mob/living/simple_animal/hostile/statue.dm @@ -55,7 +55,7 @@ // No movement while seen code. /mob/living/simple_animal/hostile/statue/Initialize(mapload, var/mob/living/creator) - ..() + . = ..() // Give spells mob_spell_list += new /obj/effect/proc_holder/spell/aoe_turf/flicker_lights(src) mob_spell_list += new /obj/effect/proc_holder/spell/aoe_turf/blindness(src) 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/hostile/wizard.dm b/code/modules/mob/living/simple_animal/hostile/wizard.dm index c30e573a79..f53b5b8f50 100644 --- a/code/modules/mob/living/simple_animal/hostile/wizard.dm +++ b/code/modules/mob/living/simple_animal/hostile/wizard.dm @@ -37,7 +37,7 @@ var/next_cast = 0 /mob/living/simple_animal/hostile/wizard/Initialize() - ..() + . = ..() fireball = new /obj/effect/proc_holder/spell/aimed/fireball fireball.clothes_req = 0 fireball.human_req = 0 diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index a70a60a809..467bd13c65 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -734,7 +734,7 @@ visible_message("[src] grabs [held_item] out of [C]'s hand!", "You snag [held_item] out of [C]'s hand!", "You hear the sounds of wings flapping furiously.") return held_item - to_chat(src, "There is nothing of interest to take!") + to_chat(src, "There is nothing of interest to take!") return 0 /mob/living/simple_animal/parrot/verb/drop_held_item_player() @@ -896,7 +896,7 @@ else speak += pick("...alive?", "This isn't parrot heaven!", "I live, I die, I live again!", "The void fades!") - ..() + . = ..() /mob/living/simple_animal/parrot/Poly/Life() if(!stat && SSticker.current_state == GAME_STATE_FINISHED && !memory_saved) @@ -924,28 +924,20 @@ ..(gibbed) /mob/living/simple_animal/parrot/Poly/proc/Read_Memory() - if(fexists("data/npc_saves/Poly.sav")) //legacy compatability to convert old format to new - 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 - fdel("data/npc_saves/Poly.sav") - else - 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"] + 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/json_file = file("data/npc_saves/Punpun.json") + var/json_file = file("data/npc_saves/Poly.json") var/list/file_data = list() if(islist(speech_buffer)) file_data["phrases"] = speech_buffer diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm index a7af1daef8..3d50f03e17 100644 --- a/code/modules/mob/living/status_procs.dm +++ b/code/modules/mob/living/status_procs.dm @@ -99,6 +99,11 @@ K = apply_status_effect(STATUS_EFFECT_KNOCKDOWN, amount, updating) return K +///////////////////////////////// FROZEN ///////////////////////////////////// + +/mob/living/proc/IsFrozen() + return has_status_effect(/datum/status_effect/freon) + ///////////////////////////////////// STUN ABSORPTION ///////////////////////////////////// /mob/living/proc/add_stun_absorption(key, duration, priority, message, self_message, examine_message) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 297f788001..f768cbe2d2 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) @@ -950,18 +950,18 @@ /mob/vv_get_dropdown() . = ..() . += "---" - .["Gib"] = "?_src_=vars;gib=\ref[src]" - .["Give Spell"] = "?_src_=vars;give_spell=\ref[src]" - .["Remove Spell"] = "?_src_=vars;remove_spell=\ref[src]" - .["Give Disease"] = "?_src_=vars;give_disease=\ref[src]" - .["Toggle Godmode"] = "?_src_=vars;godmode=\ref[src]" - .["Drop Everything"] = "?_src_=vars;drop_everything=\ref[src]" - .["Regenerate Icons"] = "?_src_=vars;regenerateicons=\ref[src]" - .["Make Space Ninja"] = "?_src_=vars;ninja=\ref[src]" - .["Show player panel"] = "?_src_=vars;mob_player_panel=\ref[src]" - .["Toggle Build Mode"] = "?_src_=vars;build_mode=\ref[src]" - .["Assume Direct Control"] = "?_src_=vars;direct_control=\ref[src]" - .["Offer Control to Ghosts"] = "?_src_=vars;offer_control=\ref[src]" + .["Gib"] = "?_src_=vars;[HrefToken()];gib=\ref[src]" + .["Give Spell"] = "?_src_=vars;[HrefToken()];give_spell=\ref[src]" + .["Remove Spell"] = "?_src_=vars;[HrefToken()];remove_spell=\ref[src]" + .["Give Disease"] = "?_src_=vars;[HrefToken()];give_disease=\ref[src]" + .["Toggle Godmode"] = "?_src_=vars;[HrefToken()];godmode=\ref[src]" + .["Drop Everything"] = "?_src_=vars;[HrefToken()];drop_everything=\ref[src]" + .["Regenerate Icons"] = "?_src_=vars;[HrefToken()];regenerateicons=\ref[src]" + .["Make Space Ninja"] = "?_src_=vars;[HrefToken()];ninja=\ref[src]" + .["Show player panel"] = "?_src_=vars;[HrefToken()];mob_player_panel=\ref[src]" + .["Toggle Build Mode"] = "?_src_=vars;[HrefToken()];build_mode=\ref[src]" + .["Assume Direct Control"] = "?_src_=vars;[HrefToken()];direct_control=\ref[src]" + .["Offer Control to Ghosts"] = "?_src_=vars;[HrefToken()];offer_control=\ref[src]" /mob/vv_get_var(var_name) switch(var_name) diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index b8350e2a02..457376990e 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -385,7 +385,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp return for(var/mob/dead/observer/O in GLOB.player_list) if(O.client) - to_chat(O, "[message][(enter_link) ? " [enter_link]" : ""]") + to_chat(O, "[message][(enter_link) ? " [enter_link]" : ""]") if(ghost_sound) SEND_SOUND(O, sound(ghost_sound)) if(flashwindow) 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/alarm.dm b/code/modules/modular_computers/file_system/programs/alarm.dm index fc050545a5..616fd15dd3 100644 --- a/code/modules/modular_computers/file_system/programs/alarm.dm +++ b/code/modules/modular_computers/file_system/programs/alarm.dm @@ -13,7 +13,7 @@ var/has_alert = 0 var/alarms = list("Fire" = list(), "Atmosphere" = list(), "Power" = list()) - var/alarm_z = list(ZLEVEL_STATION,ZLEVEL_LAVALAND) + var/alarm_z = list(ZLEVEL_STATION_PRIMARY,ZLEVEL_LAVALAND) /datum/computer_file/program/alarm_monitor/process_tick() ..() diff --git a/code/modules/modular_computers/file_system/programs/powermonitor.dm b/code/modules/modular_computers/file_system/programs/powermonitor.dm index b334f523f7..37b2b0c151 100644 --- a/code/modules/modular_computers/file_system/programs/powermonitor.dm +++ b/code/modules/modular_computers/file_system/programs/powermonitor.dm @@ -58,8 +58,8 @@ data["interval"] = record_interval / 10 data["attached"] = attached ? TRUE : FALSE if(attached) - data["supply"] = attached.powernet.viewavail - data["demand"] = attached.powernet.viewload + data["supply"] = DisplayPower(attached.powernet.viewavail) + data["demand"] = DisplayPower(attached.powernet.viewload) data["history"] = history data["areas"] = list() @@ -70,7 +70,7 @@ data["areas"] += list(list( "name" = A.area.name, "charge" = A.cell ? A.cell.percent() : 0, - "load" = A.lastused_total, + "load" = DisplayPower(A.lastused_total), "charging" = A.charging, "eqp" = A.equipment, "lgt" = A.lighting, 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..4a0532104a 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" @@ -44,7 +44,7 @@ //var/valid_z_levels = (GetConnectedZlevels(T.z) & using_map.station_levels) for(var/obj/machinery/power/supermatter_shard/S in GLOB.machines) // Delaminating, not within coverage, not on a tile. - if(!(S.z == ZLEVEL_STATION || S.z == ZLEVEL_MINING || S.z == T.z) || !istype(S.loc, /turf/)) + if(!((S.z in GLOB.station_z_levels) || S.z == ZLEVEL_MINING || S.z == T.z) || !istype(S.loc, /turf/)) continue supermatters.Add(S) diff --git a/code/modules/modular_computers/hardware/network_card.dm b/code/modules/modular_computers/hardware/network_card.dm index 24c1580ea2..8ed67d761b 100644 --- a/code/modules/modular_computers/hardware/network_card.dm +++ b/code/modules/modular_computers/hardware/network_card.dm @@ -48,7 +48,7 @@ if(holder) var/turf/T = get_turf(holder) - if((T && istype(T)) && (T.z == ZLEVEL_STATION || T.z == ZLEVEL_MINING)) + if((T && istype(T)) && ((T.z in GLOB.station_z_levels) || T.z == ZLEVEL_MINING)) // Computer is on station. Low/High signal depending on what type of network card you have if(long_range) return 2 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 6c0dddf88b..1385f4e54c 100644 --- a/code/modules/ninja/suit/n_suit_verbs/ninja_adrenaline.dm +++ b/code/modules/ninja/suit/n_suit_verbs/ninja_adrenaline.dm @@ -7,6 +7,7 @@ H.SetUnconscious(0) H.SetStun(0) H.SetKnockdown(0) + H.adjustStaminaLoss(-75) H.stuttering = 0 H.say(pick("A CORNERED FOX IS MORE DANGEROUS THAN A JACKAL!","HURT ME MOOORRREEE!","IMPRESSIVE!")) a_boost-- diff --git a/code/modules/ninja/suit/suit_attackby.dm b/code/modules/ninja/suit/suit_attackby.dm index 1db76bc971..ce75fd6ed3 100644 --- a/code/modules/ninja/suit/suit_attackby.dm +++ b/code/modules/ninja/suit/suit_attackby.dm @@ -8,7 +8,7 @@ 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.") + to_chat(U, "There are now [a_boost] adrenaline boosts remaining.") return else if(istype(I, /obj/item/stock_parts/cell)) 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/antimatter/control.dm b/code/modules/power/antimatter/control.dm index 85ae6edf14..7863f6a52f 100644 --- a/code/modules/power/antimatter/control.dm +++ b/code/modules/power/antimatter/control.dm @@ -306,7 +306,7 @@ dat += "Cores: [linked_cores.len]

    " dat += "-Current Efficiency: [reported_core_efficiency]
    " dat += "-Average Stability: [stored_core_stability] (update)
    " - dat += "Last Produced: [stored_power]
    " + dat += "Last Produced: [DisplayPower(stored_power)]
    " dat += "Fuel: " if(!fueljar) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 3b070f1384..1545bfd452 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -55,7 +55,7 @@ var/areastring = null var/obj/item/stock_parts/cell/cell var/start_charge = 90 // initial cell charge % - var/cell_type = 2500 // 0=no cell, 1=regular, 2=high-cap (x5) <- old, now it's just 0=no cell, otherwise dictate cellcapacity by changing this value. 1 used to be 1000, 2 was 2500 + var/cell_type = /obj/item/stock_parts/cell/upgraded //Base cell has 2500 capacity. Enter the path of a different cell you want to use. cell determines charge rates, max capacity, ect. These can also be changed with other APC vars, but isn't recommended to minimize the risk of accidental usage of dirty editted APCs var/opened = 0 //0=closed, 1=opened, 2=cover removed var/shorted = 0 var/lighting = 3 @@ -92,6 +92,15 @@ var/update_overlay = -1 var/icon_update_needed = FALSE +/obj/machinery/power/apc/highcap/five_k + cell_type = /obj/item/stock_parts/cell/upgraded/plus + +/obj/machinery/power/apc/highcap/ten_k + cell_type = /obj/item/stock_parts/cell/high + +/obj/machinery/power/apc/highcap/fifteen_k + cell_type = /obj/item/stock_parts/cell/high/plus + /obj/machinery/power/apc/get_cell() return cell @@ -177,8 +186,7 @@ has_electronics = 2 //installed and secured // is starting with a power cell installed, create it and set its charge level if(cell_type) - src.cell = new/obj/item/stock_parts/cell(src) - cell.maxcharge = cell_type // cell_type is maximum charge (old default was 1000 or 2500 (values one and two respectively) + cell = new cell_type cell.charge = start_charge * cell.maxcharge / 100 // (convert percentage to actual value) var/area/A = src.loc.loc @@ -665,7 +673,7 @@ "powerCellStatus" = cell ? cell.percent() : null, "chargeMode" = chargemode, "chargingStatus" = charging, - "totalLoad" = lastused_total, + "totalLoad" = DisplayPower(lastused_total), "coverLocked" = coverlocked, "siliconUser" = user.has_unlimited_silicon_privilege || user.using_power_flow_console(), "malfStatus" = get_malf_status(user), @@ -673,7 +681,7 @@ "powerChannels" = list( list( "title" = "Equipment", - "powerLoad" = lastused_equip, + "powerLoad" = DisplayPower(lastused_equip), "status" = equipment, "topicParams" = list( "auto" = list("eqp" = 3), @@ -683,7 +691,7 @@ ), list( "title" = "Lighting", - "powerLoad" = lastused_light, + "powerLoad" = DisplayPower(lastused_light), "status" = lighting, "topicParams" = list( "auto" = list("lgt" = 3), @@ -693,7 +701,7 @@ ), list( "title" = "Environment", - "powerLoad" = lastused_environ, + "powerLoad" = DisplayPower(lastused_environ), "status" = environ, "topicParams" = list( "auto" = list("env" = 3), @@ -840,7 +848,7 @@ if(!malf.can_shunt) to_chat(malf, "You cannot shunt!") return - if(src.z != ZLEVEL_STATION) + if(!(src.z in GLOB.station_z_levels)) return occupier = new /mob/living/silicon/ai(src, malf.laws, malf) //DEAR GOD WHY? //IKR???? occupier.adjustOxyLoss(malf.getOxyLoss()) @@ -874,9 +882,9 @@ occupier.loc = src.loc occupier.death() occupier.gib() - for(var/obj/item/pinpointer/P in GLOB.pinpointer_list) + for(var/obj/item/pinpointer/nuke/P in GLOB.pinpointer_list) P.switch_mode_to(TRACK_NUKE_DISK) //Pinpointers go back to tracking the nuke disk - P.nuke_warning = FALSE + P.alert = FALSE /obj/machinery/power/apc/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/device/aicard/card) if(card.AI) diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index ebe478a7bf..37ec831462 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -143,7 +143,7 @@ By design, d1 is the smallest direction and d2 is the highest else if(istype(W, /obj/item/device/multitool)) if(powernet && (powernet.avail > 0)) // is it powered? - to_chat(user, "[powernet.avail]W in power network.") + to_chat(user, "[DisplayPower(powernet.avail)] in power network.") else to_chat(user, "The cable is not powered.") shock(user, 5, 0.2) @@ -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..16e2ae92f2 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" @@ -335,4 +348,4 @@ return /obj/item/stock_parts/cell/beam_rifle/emp_act(severity) - charge = Clamp((charge-(10000/severity)),0,maxcharge) + charge = Clamp((charge-(10000/severity)),0,maxcharge) \ No newline at end of file diff --git a/code/modules/power/generator.dm b/code/modules/power/generator.dm index 1e43380f2f..b5eef4260e 100644 --- a/code/modules/power/generator.dm +++ b/code/modules/power/generator.dm @@ -55,7 +55,7 @@ stat |= BROKEN update_icon() - + /obj/machinery/power/generator/Destroy() SSair.atmos_machinery -= src return ..() @@ -126,7 +126,7 @@ if(cold_air) var/datum/gas_mixture/cold_circ_air1 = cold_circ.AIR1 cold_circ_air1.merge(cold_air) - + update_icon() var/circ = "[cold_circ && cold_circ.last_pressure_delta > 0 ? "1" : "0"][hot_circ && hot_circ.last_pressure_delta > 0 ? "1" : "0"]" @@ -135,7 +135,7 @@ update_icon() src.updateDialog() - + /obj/machinery/power/generator/process() //Setting this number higher just makes the change in power output slower, it doesnt actualy reduce power output cause **math** var/power_output = round(lastgen / 10) @@ -161,15 +161,9 @@ var/datum/gas_mixture/hot_circ_air2 = hot_circ.AIR2 t += "
    " - - var/displaygen = lastgenlev - if(displaygen < 1000000) //less than a MW - displaygen /= 1000 - t += "Output: [round(displaygen,0.01)] kW" - else - displaygen /= 1000000 - t += "Output: [round(displaygen,0.01)] MW" - + + t += "Output: [DisplayPower(lastgenlev)]" + t += "
    " t += "Cold loop
    " 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/monitor.dm b/code/modules/power/monitor.dm index 85a85113f6..a3edc99951 100644 --- a/code/modules/power/monitor.dm +++ b/code/modules/power/monitor.dm @@ -66,8 +66,8 @@ data["areas"] = list() if(attached) - data["supply"] = attached.powernet.viewavail - data["demand"] = attached.powernet.viewload + data["supply"] = DisplayPower(attached.powernet.viewavail) + data["demand"] = DisplayPower(attached.powernet.viewload) for(var/obj/machinery/power/terminal/term in attached.powernet.nodes) var/obj/machinery/power/apc/A = term.master if(istype(A)) @@ -79,7 +79,7 @@ data["areas"] += list(list( "name" = A.area.name, "charge" = cell_charge, - "load" = A.lastused_total, + "load" = DisplayPower(A.lastused_total), "charging" = A.charging, "eqp" = A.equipment, "lgt" = A.lighting, diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index 630d248f25..0f4a58e5ef 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -230,7 +230,7 @@ var/stack_percent = round(sheet_left * 100, 1) dat += text("Current stack: [stack_percent]%
    ") dat += text("Power output: - [power_gen * power_output] +
    ") - dat += text("Power current: [(powernet == null ? "Unconnected" : "[avail()]")]
    ") + dat += text("Power current: [(powernet == null ? "Unconnected" : "[DisplayPower(avail())]")]
    ") dat += text("Heat: [current_heat]
    ") dat += "
    Close" user << browse(dat, "window=port_gen") 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/power/singularity/narsie.dm b/code/modules/power/singularity/narsie.dm index df969d869e..381dcbaa75 100644 --- a/code/modules/power/singularity/narsie.dm +++ b/code/modules/power/singularity/narsie.dm @@ -54,7 +54,7 @@ var/mob/living/L = cult_mind.current L.narsie_act() for(var/mob/living/player in GLOB.player_list) - if(player.stat != DEAD && player.loc.z == ZLEVEL_STATION && !iscultist(player)) + if(player.stat != DEAD && (player.loc.z in GLOB.station_z_levels) && !iscultist(player)) souls_needed[player] = TRUE soul_goal = round(1 + LAZYLEN(souls_needed) * 0.6) INVOKE_ASYNC(src, .proc/begin_the_end) diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index 90226d532d..70776b5c05 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -45,7 +45,7 @@ to_chat(user, "This SMES has no power terminal!") /obj/machinery/power/smes/Initialize() - ..() + . = ..() dir_loop: for(var/d in GLOB.cardinals) var/turf/T = get_step(src, d) @@ -335,14 +335,16 @@ "inputAttempt" = input_attempt, "inputting" = inputting, "inputLevel" = input_level, + "inputLevel_text" = DisplayPower(input_level), "inputLevelMax" = input_level_max, - "inputAvailable" = input_available, + "inputAvailable" = DisplayPower(input_available), "outputAttempt" = output_attempt, "outputting" = outputting, "outputLevel" = output_level, + "outputLevel_text" = DisplayPower(output_level), "outputLevelMax" = output_level_max, - "outputUsed" = output_used + "outputUsed" = DisplayPower(output_used) ) return data diff --git a/code/modules/power/turbine.dm b/code/modules/power/turbine.dm index c8f8d8bfd0..ee531697aa 100644 --- a/code/modules/power/turbine.dm +++ b/code/modules/power/turbine.dm @@ -272,7 +272,7 @@ var/t = "Gas Turbine Generator
    "
     
    -	t += "Generated power : [round(lastgen)] W

    " + t += "Generated power : [DisplayPower(lastgen)]

    " t += "Turbine: [round(compressor.rpm)] RPM
    " @@ -337,7 +337,7 @@ dat += {"Turbine status: [ src.compressor.starter ? "Off On" : "Off On"] \n
    \nTurbine speed: [src.compressor.rpm]rpm
    - \nPower currently being generated: [src.compressor.turbine.lastgen]W
    + \nPower currently being generated: [DisplayPower(src.compressor.turbine.lastgen)]
    \nInternal gas temperature: [src.compressor.gas_contained.temperature]K
    \n

    Close \n
    diff --git a/code/modules/procedural_mapping/mapGenerators/repair.dm b/code/modules/procedural_mapping/mapGenerators/repair.dm index f9b94bba89..9796535df7 100644 --- a/code/modules/procedural_mapping/mapGenerators/repair.dm +++ b/code/modules/procedural_mapping/mapGenerators/repair.dm @@ -20,11 +20,11 @@ if(!istype(mother, /datum/mapGenerator/repair/reload_station_map)) return var/datum/mapGenerator/repair/reload_station_map/mother1 = mother - if(mother1.z != ZLEVEL_STATION) + if(!(mother1.z in GLOB.station_z_levels)) return //This is only for reloading station blocks! GLOB.reloading_map = TRUE var/static/dmm_suite/reloader = new - var/list/bounds = reloader.load_map(file(SSmapping.config.GetFullMapPath()),measureOnly = FALSE, no_changeturf = FALSE,x_offset = 0, y_offset = 0, z_offset = ZLEVEL_STATION, cropMap=TRUE, lower_crop_x = mother1.x_low, lower_crop_y = mother1.y_low, upper_crop_x = mother1.x_high, upper_crop_y = mother1.y_high) + var/list/bounds = reloader.load_map(file(SSmapping.config.GetFullMapPath()),measureOnly = FALSE, no_changeturf = FALSE,x_offset = 0, y_offset = 0, z_offset = ZLEVEL_STATION_PRIMARY, cropMap=TRUE, lower_crop_x = mother1.x_low, lower_crop_y = mother1.y_low, upper_crop_x = mother1.x_high, upper_crop_y = mother1.y_high) var/list/obj/machinery/atmospherics/atmos_machines = list() var/list/obj/structure/cable/cables = list() @@ -87,13 +87,13 @@ /datum/mapGenerator/repair/reload_station_map/defineRegion(turf/start, turf/end) . = ..() - if(start.z != ZLEVEL_STATION || end.z != ZLEVEL_STATION) + if(!(start.z in GLOB.station_z_levels) || !(end.z in GLOB.station_z_levels)) return x_low = min(start.x, end.x) y_low = min(start.y, end.y) x_high = max(start.x, end.x) y_high = max(start.y, end.y) - z = ZLEVEL_STATION + z = ZLEVEL_STATION_PRIMARY GLOBAL_VAR_INIT(reloading_map, FALSE) diff --git a/code/modules/projectiles/ammunition/plasma.dm b/code/modules/projectiles/ammunition/plasma.dm index 484d029519..2592c6a36a 100644 --- a/code/modules/projectiles/ammunition/plasma.dm +++ b/code/modules/projectiles/ammunition/plasma.dm @@ -6,7 +6,7 @@ /obj/item/ammo_casing/energy/plasmagun/rifle projectile_type = /obj/item/projectile/energy/plasmabolt/rifle - e_cost = 150 + e_cost = 100 /obj/item/ammo_casing/energy/plasmagun/light projectile_type = /obj/item/projectile/energy/plasmabolt/light diff --git a/code/modules/projectiles/boxes_magazines/external_mag.dm b/code/modules/projectiles/boxes_magazines/external_mag.dm index 3bfb90224d..525466be28 100644 --- a/code/modules/projectiles/boxes_magazines/external_mag.dm +++ b/code/modules/projectiles/boxes_magazines/external_mag.dm @@ -324,6 +324,7 @@ /obj/item/ammo_box/magazine/toy/smg name = "foam force SMG magazine" icon_state = "smg9mm-42" + ammo_type = /obj/item/ammo_casing/caseless/foam_dart max_ammo = 20 /obj/item/ammo_box/magazine/toy/smg/update_icon() @@ -348,23 +349,29 @@ /obj/item/ammo_box/magazine/toy/smgm45 name = "donksoft SMG magazine" caliber = "foam_force" - ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot + ammo_type = /obj/item/ammo_casing/caseless/foam_dart max_ammo = 20 /obj/item/ammo_box/magazine/toy/smgm45/update_icon() ..() icon_state = "c20r45-[round(ammo_count(),2)]" +/obj/item/ammo_box/magazine/toy/smgm45/riot + ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot + /obj/item/ammo_box/magazine/toy/m762 name = "donksoft box magazine" caliber = "foam_force" - ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot + ammo_type = /obj/item/ammo_casing/caseless/foam_dart max_ammo = 50 /obj/item/ammo_box/magazine/toy/m762/update_icon() ..() icon_state = "a762-[round(ammo_count(),10)]" +/obj/item/ammo_box/magazine/toy/m762/riot + ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot + diff --git a/code/modules/projectiles/guns/ballistic/automatic.dm b/code/modules/projectiles/guns/ballistic/automatic.dm index 77df793bc0..5388bf8e0a 100644 --- a/code/modules/projectiles/guns/ballistic/automatic.dm +++ b/code/modules/projectiles/guns/ballistic/automatic.dm @@ -295,6 +295,12 @@ pin = /obj/item/device/firing_pin +/obj/item/gun/ballistic/automatic/l6_saw/examine(mob/user) + ..() + if(cover_open && magazine) + to_chat(user, "It seems like you could use an empty hand to remove the magazine.") + + /obj/item/gun/ballistic/automatic/l6_saw/attack_self(mob/user) cover_open = !cover_open to_chat(user, "You [cover_open ? "open" : "close"] [src]'s cover.") 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/ballistic/pistol.dm b/code/modules/projectiles/guns/ballistic/pistol.dm index 16353f4255..c460a24fcf 100644 --- a/code/modules/projectiles/guns/ballistic/pistol.dm +++ b/code/modules/projectiles/guns/ballistic/pistol.dm @@ -54,7 +54,7 @@ name = "stechkin APS pistol" desc = "The original russian version of a widely used Syndicate sidearm. Uses 9mm ammo." icon_state = "aps" - w_class = WEIGHT_CLASS_NORMAL + w_class = WEIGHT_CLASS_SMALL origin_tech = "combat=3;materials=2;syndicate=3" mag_type = /obj/item/ammo_box/magazine/pistolm9mm can_suppress = 0 diff --git a/code/modules/projectiles/guns/ballistic/toy.dm b/code/modules/projectiles/guns/ballistic/toy.dm index 135540436a..3ddd6375b2 100644 --- a/code/modules/projectiles/guns/ballistic/toy.dm +++ b/code/modules/projectiles/guns/ballistic/toy.dm @@ -77,26 +77,34 @@ slot_flags = SLOT_BELT w_class = WEIGHT_CLASS_SMALL -/obj/item/gun/ballistic/automatic/c20r/toy +/obj/item/gun/ballistic/automatic/c20r/toy //This is the syndicate variant with syndicate firing pin and riot darts. name = "donksoft SMG" desc = "A bullpup two-round burst toy SMG, designated 'C-20r'. Ages 8 and up." icon = 'icons/obj/guns/toy.dmi' can_suppress = TRUE needs_permit = 0 - mag_type = /obj/item/ammo_box/magazine/toy/smgm45 + mag_type = /obj/item/ammo_box/magazine/toy/smgm45/riot casing_ejector = 0 -/obj/item/gun/ballistic/automatic/c20r/toy/unrestricted +/obj/item/gun/ballistic/automatic/c20r/toy/unrestricted //Use this for actual toys pin = /obj/item/device/firing_pin + mag_type = /obj/item/ammo_box/magazine/toy/smgm45 -/obj/item/gun/ballistic/automatic/l6_saw/toy +/obj/item/gun/ballistic/automatic/c20r/toy/unrestricted/riot + mag_type = /obj/item/ammo_box/magazine/toy/smgm45/riot + +/obj/item/gun/ballistic/automatic/l6_saw/toy //This is the syndicate variant with syndicate firing pin and riot darts. name = "donksoft LMG" desc = "A heavily modified toy light machine gun, designated 'L6 SAW'. Ages 8 and up." icon = 'icons/obj/guns/toy.dmi' can_suppress = FALSE needs_permit = 0 - mag_type = /obj/item/ammo_box/magazine/toy/m762 + mag_type = /obj/item/ammo_box/magazine/toy/m762/riot casing_ejector = 0 -/obj/item/gun/ballistic/automatic/l6_saw/toy/unrestricted - pin = /obj/item/device/firing_pin \ No newline at end of file +/obj/item/gun/ballistic/automatic/l6_saw/toy/unrestricted //Use this for actual toys + pin = /obj/item/device/firing_pin + mag_type = /obj/item/ammo_box/magazine/toy/m762 + +/obj/item/gun/ballistic/automatic/l6_saw/toy/unrestricted/riot + mag_type = /obj/item/ammo_box/magazine/toy/m762/riot diff --git a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm index 74987d2052..0eb6a7137d 100644 --- a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm +++ b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm @@ -130,7 +130,7 @@ if(!suppressed) playsound(src.loc, 'sound/weapons/kenetic_reload.ogg', 60, 1) else - to_chat(loc, "[src] silently charges up.") + to_chat(loc, "[src] silently charges up.") update_icon() overheat = FALSE diff --git a/code/modules/projectiles/guns/energy/megabuster.dm b/code/modules/projectiles/guns/energy/megabuster.dm index 6df6725926..c4096ad5cb 100644 --- a/code/modules/projectiles/guns/energy/megabuster.dm +++ b/code/modules/projectiles/guns/energy/megabuster.dm @@ -8,7 +8,9 @@ clumsy_check = 0 needs_permit = 0 selfcharge = 1 + cell_type = "/obj/item/stock_parts/cell/pulse" icon = 'icons/obj/guns/VGguns.dmi' + /obj/item/gun/energy/megabuster/proto name = "Proto-buster" icon_state = "protobuster" diff --git a/code/modules/projectiles/guns/energy/plasma.dm b/code/modules/projectiles/guns/energy/plasma.dm index 77033070fc..4324053a14 100644 --- a/code/modules/projectiles/guns/energy/plasma.dm +++ b/code/modules/projectiles/guns/energy/plasma.dm @@ -4,8 +4,11 @@ icon_state = "xray" w_class = WEIGHT_CLASS_NORMAL ammo_type = list(/obj/item/ammo_casing/energy/plasmagun) + cell_type = "/obj/item/stock_parts/cell/pulse/carbine" ammo_x_offset = 2 shaded_charge = 1 + lefthand_file = 'icons/mob/citadel/guns_lefthand.dmi' + righthand_file = 'icons/mob/citadel/guns_righthand.dmi' /obj/item/gun/energy/plasma/rifle @@ -47,8 +50,11 @@ icon_state = "xcomlasergun" item_state = null icon = 'icons/obj/guns/VGguns.dmi' + cell_type = "/obj/item/stock_parts/cell/pulse/carbine" ammo_type = list(/obj/item/ammo_casing/energy/lasergun) ammo_x_offset = 4 + lefthand_file = 'icons/mob/citadel/guns_lefthand.dmi' + righthand_file = 'icons/mob/citadel/guns_righthand.dmi' /obj/item/gun/energy/laser/LaserAK name = "Laser AK470" @@ -56,5 +62,8 @@ icon_state = "LaserAK" item_state = null icon = 'icons/obj/guns/VGguns.dmi' + cell_type = "/obj/item/stock_parts/cell/pulse/carbine" ammo_type = list(/obj/item/ammo_casing/energy/laser) ammo_x_offset = 4 + lefthand_file = 'icons/mob/citadel/guns_lefthand.dmi' + righthand_file = 'icons/mob/citadel/guns_righthand.dmi' diff --git a/code/modules/projectiles/guns/magic.dm b/code/modules/projectiles/guns/magic.dm index 8e97a3d7a9..21bc12bb1f 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 @@ -26,7 +28,7 @@ if(no_den_usage) var/area/A = get_area(user) if(istype(A, /area/wizard_station)) - to_chat(user, "You know better than to violate the security of The Den, best wait until you leave to use [src].") + to_chat(user, "You know better than to violate the security of The Den, best wait until you leave to use [src].") return else no_den_usage = 0 @@ -72,7 +74,7 @@ return /obj/item/gun/magic/shoot_with_empty_chamber(mob/living/user as mob|obj) - to_chat(user, "The [name] whizzles quietly.") + to_chat(user, "The [name] whizzles quietly.") /obj/item/gun/magic/suicide_act(mob/user) user.visible_message("[user] is twisting [src] above [user.p_their()] head, releasing a magical blast! It looks like [user.p_theyre()] trying to commit suicide!") @@ -83,4 +85,4 @@ . = ..() switch (var_name) if ("charges") - recharge_newshot() \ No newline at end of file + recharge_newshot() diff --git a/code/modules/projectiles/guns/magic/wand.dm b/code/modules/projectiles/guns/magic/wand.dm index f19fc7c693..27fb040de4 100644 --- a/code/modules/projectiles/guns/magic/wand.dm +++ b/code/modules/projectiles/guns/magic/wand.dm @@ -37,7 +37,7 @@ if(no_den_usage) var/area/A = get_area(user) if(istype(A, /area/wizard_station)) - to_chat(user, "You know better than to violate the security of The Den, best wait until you leave to use [src].") + to_chat(user, "You know better than to violate the security of The Den, best wait until you leave to use [src].") return else no_den_usage = 0 @@ -167,4 +167,4 @@ /obj/item/gun/magic/wand/fireball/zap_self(mob/living/user) ..() explosion(user.loc, -1, 0, 2, 3, 0, flame_range = 2) - charges-- \ No newline at end of file + charges-- 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/projectiles/projectile/megabuster.dm b/code/modules/projectiles/projectile/megabuster.dm index 01671aefe5..e3f3f9403e 100644 --- a/code/modules/projectiles/projectile/megabuster.dm +++ b/code/modules/projectiles/projectile/megabuster.dm @@ -7,9 +7,13 @@ hitsound = 'sound/weapons/sear.ogg' hitsound_wall = 'sound/weapons/effects/searwall.ogg' icon = 'icons/obj/VGprojectile.dmi' + lefthand_file = 'icons/mob/citadel/guns_lefthand.dmi' + righthand_file = 'icons/mob/citadel/guns_righthand.dmi' /obj/item/projectile/energy/megabuster name = "buster pellet" icon_state = "megabuster" nodamage = 1 icon = 'icons/obj/VGprojectile.dmi' + lefthand_file = 'icons/mob/citadel/guns_lefthand.dmi' + righthand_file = 'icons/mob/citadel/guns_righthand.dmi' diff --git a/code/modules/projectiles/projectile/plasma.dm b/code/modules/projectiles/projectile/plasma.dm index 2177b0fd51..0e40e80828 100644 --- a/code/modules/projectiles/projectile/plasma.dm +++ b/code/modules/projectiles/projectile/plasma.dm @@ -2,7 +2,6 @@ obj/item/projectile/energy/plasmabolt icon = 'icons/obj/VGProjectile.dmi' name = "plasma bolt" icon_state = "plasma" - knockdown = 0 flag = "energy" damage_type = BURN hitsound = 'sound/weapons/sear.ogg' @@ -10,21 +9,27 @@ obj/item/projectile/energy/plasmabolt light_range = 3 light_color = LIGHT_COLOR_GREEN +/obj/item/projectile/energy/plasmabolt/on_hit(atom/target, blocked = FALSE) + . = ..() + if(isturf(target) || istype(target, /obj/structure/)) + target.ex_act(EXPLODE_LIGHT) + + /obj/item/projectile/energy/plasmabolt/light - damage = 35 + damage = 30 icon_state = "plasma2" - irradiate = 20 - knockdown = 60 + irradiate = 10 + stamina = 20 /obj/item/projectile/energy/plasmabolt/rifle damage = 50 icon_state = "plasma3" irradiate = 35 - knockdown = 120 + stamina = 120 /obj/item/projectile/energy/plasmabolt/MP40k damage = 35 eyeblur = 4 irradiate = 25 - knockdown = 100 + stamina = 100 icon_state = "plasma3" \ No newline at end of file diff --git a/code/modules/reagents/chemistry/machinery/chem_heater.dm b/code/modules/reagents/chemistry/machinery/chem_heater.dm index f562da2df0..ce1f469f8d 100644 --- a/code/modules/reagents/chemistry/machinery/chem_heater.dm +++ b/code/modules/reagents/chemistry/machinery/chem_heater.dm @@ -45,14 +45,13 @@ if(istype(I, /obj/item/reagent_containers) && (I.container_type & OPENCONTAINER_1)) . = 1 //no afterattack 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 - I.loc = src - to_chat(user, "You add the beaker to the machine.") + to_chat(user, "You add [I] to [src].") icon_state = "mixer1b" return return ..() diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index 14adaa5fd7..802e4c70ca 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -85,27 +85,25 @@ to_chat(user, "You can't use the [src.name] while its panel is opened!") return if(beaker) - to_chat(user, "A container is already loaded in 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.loc = src - to_chat(user, "You add the beaker to the machine.") + to_chat(user, "You add [I] to [src].") src.updateUsrDialog() icon_state = "mixer1" else if(!condi && istype(I, /obj/item/storage/pill_bottle)) if(bottle) - to_chat(user, "A pill bottle is already loaded into the machine!") + to_chat(user, "A pill bottle is already loaded into [src]!") return - if(!user.drop_item()) + if(!user.transferItemToLoc(I, src)) return bottle = I - bottle.loc = src - to_chat(user, "You add the pill bottle into the dispenser slot.") + to_chat(user, "You add [I] into the dispenser slot.") src.updateUsrDialog() else return ..() 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/machinery/reagentgrinder.dm b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm index c08e56dad6..311efd0140 100644 --- a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm +++ b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm @@ -118,21 +118,20 @@ if (istype(I, /obj/item/reagent_containers) && (I.container_type & OPENCONTAINER_1) ) if (!beaker) - if(!user.drop_item()) + if(!user.transferItemToLoc(I, src)) return 1 beaker = I - beaker.loc = src update_icon() src.updateUsrDialog() else - to_chat(user, "There's already a container inside.") + to_chat(user, "There's already a container inside [src].") return 1 //no afterattack if(is_type_in_list(I, dried_items)) if(istype(I, /obj/item/reagent_containers/food/snacks/grown)) var/obj/item/reagent_containers/food/snacks/grown/G = I if(!G.dry) - to_chat(user, "You must dry that first!") + to_chat(user, "You must dry [G] first!") return 1 if(holdingitems && holdingitems.len >= limit) @@ -146,11 +145,11 @@ B.remove_from_storage(G, src) holdingitems += G if(holdingitems && holdingitems.len >= limit) //Sanity checking so the blender doesn't overfill - to_chat(user, "You fill the All-In-One grinder to the brim.") + to_chat(user, "You fill [src] to the brim.") break if(!I.contents.len) - to_chat(user, "You empty the plant bag into the All-In-One grinder.") + to_chat(user, "You empty [I] into [src].") src.updateUsrDialog() return 1 @@ -162,8 +161,7 @@ to_chat(user, "Cannot refine into a reagent!") return 1 - if(user.drop_item()) - I.loc = src + if(user.transferItemToLoc(I, src)) holdingitems += I src.updateUsrDialog() return 0 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/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 33d2b81017..324a7d7066 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -135,7 +135,7 @@ if(L.reagents.total_volume >= L.reagents.maximum_volume) return L.visible_message("[user] injects [L] with the syringe!", \ - "[user] injects [L] with the syringe!") + "[user] injects [L] with the syringe!") var/list/rinject = list() for(var/datum/reagent/R in reagents.reagent_list) 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/machine_designs.dm b/code/modules/research/designs/machine_designs.dm index cee8167666..bb2887e2a1 100644 --- a/code/modules/research/designs/machine_designs.dm +++ b/code/modules/research/designs/machine_designs.dm @@ -418,3 +418,11 @@ req_tech = list("programming" = 1) build_path = /obj/item/circuitboard/machine/deep_fryer category = list ("Misc. Machinery") + +/datum/design/board/donksofttoyvendor + name = "Machine Design (Donksoft Toy Vendor Board)" + desc = "The circuit board for a Donksoft Toy Vendor." + id = "donksofttoyvendor" + req_tech = list("programming" = 1, "syndicate" = 2) + build_path = /obj/item/circuitboard/machine/vending/donksofttoyvendor + category = list ("Misc. Machinery") 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..da965aae9d 100644 --- a/code/modules/ruins/lavaland_ruin_code.dm +++ b/code/modules/ruins/lavaland_ruin_code.dm @@ -46,70 +46,35 @@ 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) ..() - var/species - if(istype(I, /obj/item/stack/)) + var/static/list/golem_shell_species_types = list( + /obj/item/stack/sheet/metal = /datum/species/golem, + /obj/item/stack/sheet/glass = /datum/species/golem/glass, + /obj/item/stack/sheet/plasteel = /datum/species/golem/plasteel, + /obj/item/stack/sheet/mineral/sandstone = /datum/species/golem/sand, + /obj/item/stack/sheet/mineral/plasma = /datum/species/golem/plasma, + /obj/item/stack/sheet/mineral/diamond = /datum/species/golem/diamond, + /obj/item/stack/sheet/mineral/gold = /datum/species/golem/gold, + /obj/item/stack/sheet/mineral/silver = /datum/species/golem/silver, + /obj/item/stack/sheet/mineral/uranium = /datum/species/golem/uranium, + /obj/item/stack/sheet/mineral/bananium = /datum/species/golem/bananium, + /obj/item/stack/sheet/mineral/titanium = /datum/species/golem/titanium, + /obj/item/stack/sheet/mineral/plastitanium = /datum/species/golem/plastitanium, + /obj/item/stack/sheet/mineral/abductor = /datum/species/golem/alloy, + /obj/item/stack/sheet/mineral/wood = /datum/species/golem/wood, + /obj/item/stack/sheet/bluespace_crystal = /datum/species/golem/bluespace, + /obj/item/stack/sheet/runed_metal = /datum/species/golem/runic, + /obj/item/stack/medical/gauze = /datum/species/golem/cloth, + /obj/item/stack/sheet/cloth = /datum/species/golem/cloth, + /obj/item/stack/sheet/mineral/adamantine = /datum/species/golem/adamantine, + /obj/item/stack/sheet/plastic = /datum/species/golem/plastic) + + if(istype(I, /obj/item/stack)) var/obj/item/stack/O = I - - if(istype(O, /obj/item/stack/sheet/metal)) - species = /datum/species/golem - - if(istype(O, /obj/item/stack/sheet/glass)) - species = /datum/species/golem/glass - - if(istype(O, /obj/item/stack/sheet/plasteel)) - species = /datum/species/golem/plasteel - - if(istype(O, /obj/item/stack/sheet/mineral/sandstone)) - species = /datum/species/golem/sand - - if(istype(O, /obj/item/stack/sheet/mineral/plasma)) - species = /datum/species/golem/plasma - - if(istype(O, /obj/item/stack/sheet/mineral/diamond)) - species = /datum/species/golem/diamond - - if(istype(O, /obj/item/stack/sheet/mineral/gold)) - species = /datum/species/golem/gold - - if(istype(O, /obj/item/stack/sheet/mineral/silver)) - species = /datum/species/golem/silver - - if(istype(O, /obj/item/stack/sheet/mineral/uranium)) - species = /datum/species/golem/uranium - - if(istype(O, /obj/item/stack/sheet/mineral/bananium)) - species = /datum/species/golem/bananium - - if(istype(O, /obj/item/stack/sheet/mineral/titanium)) - species = /datum/species/golem/titanium - - if(istype(O, /obj/item/stack/sheet/mineral/plastitanium)) - species = /datum/species/golem/plastitanium - - if(istype(O, /obj/item/stack/sheet/mineral/abductor)) - species = /datum/species/golem/alloy - - if(istype(O, /obj/item/stack/sheet/mineral/wood)) - species = /datum/species/golem/wood - - if(istype(O, /obj/item/stack/sheet/bluespace_crystal)) - species = /datum/species/golem/bluespace - - if(istype(O, /obj/item/stack/sheet/runed_metal)) - species = /datum/species/golem/runic - - if(istype(O, /obj/item/stack/medical/gauze) || istype(O, /obj/item/stack/sheet/cloth)) - species = /datum/species/golem/cloth - - if(istype(O, /obj/item/stack/sheet/mineral/adamantine)) - species = /datum/species/golem/adamantine - - if(istype(O, /obj/item/stack/sheet/plastic)) - species = /datum/species/golem/plastic - + var/species = golem_shell_species_types[O.merge_type] if(species) if(O.use(10)) to_chat(user, "You finish up the golem shell with ten sheets of [O].") 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/security_levels/security_levels.dm b/code/modules/security_levels/security_levels.dm index a3e190814e..e83061b232 100644 --- a/code/modules/security_levels/security_levels.dm +++ b/code/modules/security_levels/security_levels.dm @@ -1,134 +1,128 @@ -GLOBAL_VAR_INIT(security_level, 0) -//0 = code green -//1 = code blue -//2 = code red -//3 = code delta - -//config.alert_desc_blue_downto - -/proc/set_security_level(level) - switch(level) - if("green") - level = SEC_LEVEL_GREEN - if("blue") - level = SEC_LEVEL_BLUE - if("red") - level = SEC_LEVEL_RED - if("delta") - level = SEC_LEVEL_DELTA - - //Will not be announced if you try to set to the same level as it already is - if(level >= SEC_LEVEL_GREEN && level <= SEC_LEVEL_DELTA && level != GLOB.security_level) - switch(level) - if(SEC_LEVEL_GREEN) - minor_announce(config.alert_desc_green, "Attention! Security level lowered to green:") - if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL) - if(GLOB.security_level >= SEC_LEVEL_RED) - SSshuttle.emergency.modTimer(4) - else - SSshuttle.emergency.modTimer(2) - GLOB.security_level = SEC_LEVEL_GREEN - for(var/obj/machinery/firealarm/FA in GLOB.machines) - if(FA.z == ZLEVEL_STATION) - FA.update_icon() - if(SEC_LEVEL_BLUE) - if(GLOB.security_level < SEC_LEVEL_BLUE) - minor_announce(config.alert_desc_blue_upto, "Attention! Security level elevated to blue:",1) - if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL) - SSshuttle.emergency.modTimer(0.5) - else - minor_announce(config.alert_desc_blue_downto, "Attention! Security level lowered to blue:") - if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL) - SSshuttle.emergency.modTimer(2) - GLOB.security_level = SEC_LEVEL_BLUE - for(var/mob/M in GLOB.player_list) - M << sound('sound/misc/voybluealert.ogg') - for(var/obj/machinery/firealarm/FA in GLOB.machines) - if(FA.z == ZLEVEL_STATION) - FA.update_icon() - if(SEC_LEVEL_RED) - if(GLOB.security_level < SEC_LEVEL_RED) - minor_announce(config.alert_desc_red_upto, "Attention! Code red!",1) - if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL) - if(GLOB.security_level == SEC_LEVEL_GREEN) - SSshuttle.emergency.modTimer(0.25) - else - SSshuttle.emergency.modTimer(0.5) - else - minor_announce(config.alert_desc_red_downto, "Attention! Code red!") - GLOB.security_level = SEC_LEVEL_RED - for(var/mob/M in GLOB.player_list) - M << sound('sound/misc/voyalert.ogg') - - /* - At the time of commit, setting status displays didn't work properly - var/obj/machinery/computer/communications/CC = locate(/obj/machinery/computer/communications,world) - if(CC) - CC.post_status("alert", "redalert")*/ - - for(var/obj/machinery/firealarm/FA in GLOB.machines) - if(FA.z == ZLEVEL_STATION) - FA.update_icon() - for(var/obj/machinery/computer/shuttle/pod/pod in GLOB.machines) - pod.admin_controlled = 0 - if(SEC_LEVEL_DELTA) - minor_announce(config.alert_desc_delta, "Attention! Delta security level reached!",1) - if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL) - if(GLOB.security_level == SEC_LEVEL_GREEN) - SSshuttle.emergency.modTimer(0.25) - else if(GLOB.security_level == SEC_LEVEL_BLUE) - SSshuttle.emergency.modTimer(0.5) - GLOB.security_level = SEC_LEVEL_DELTA - for(var/mob/M in GLOB.player_list) - M << sound('sound/misc/deltakalaxon.ogg') - for(var/obj/machinery/firealarm/FA in GLOB.machines) - if(FA.z == ZLEVEL_STATION) - FA.update_icon() - for(var/obj/machinery/computer/shuttle/pod/pod in GLOB.machines) - pod.admin_controlled = 0 - else - return - -/proc/get_security_level() - switch(GLOB.security_level) - if(SEC_LEVEL_GREEN) - return "green" - if(SEC_LEVEL_BLUE) - return "blue" - if(SEC_LEVEL_RED) - return "red" - if(SEC_LEVEL_DELTA) - return "delta" - -/proc/num2seclevel(num) - switch(num) - if(SEC_LEVEL_GREEN) - return "green" - if(SEC_LEVEL_BLUE) - return "blue" - if(SEC_LEVEL_RED) - return "red" - if(SEC_LEVEL_DELTA) - return "delta" - -/proc/seclevel2num(seclevel) - switch( lowertext(seclevel) ) - if("green") - return SEC_LEVEL_GREEN - if("blue") - return SEC_LEVEL_BLUE - if("red") - return SEC_LEVEL_RED - if("delta") - return SEC_LEVEL_DELTA - - -/*DEBUG -/mob/verb/set_thing0() - set_security_level(0) -/mob/verb/set_thing1() - set_security_level(1) -/mob/verb/set_thing2() - set_security_level(2) -/mob/verb/set_thing3() - set_security_level(3) -*/ +GLOBAL_VAR_INIT(security_level, 0) +//0 = code green +//1 = code blue +//2 = code red +//3 = code delta + +//config.alert_desc_blue_downto + +/proc/set_security_level(level) + switch(level) + if("green") + level = SEC_LEVEL_GREEN + if("blue") + level = SEC_LEVEL_BLUE + if("red") + level = SEC_LEVEL_RED + if("delta") + level = SEC_LEVEL_DELTA + + //Will not be announced if you try to set to the same level as it already is + if(level >= SEC_LEVEL_GREEN && level <= SEC_LEVEL_DELTA && level != GLOB.security_level) + switch(level) + if(SEC_LEVEL_GREEN) + minor_announce(config.alert_desc_green, "Attention! Security level lowered to green:") + if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL) + if(GLOB.security_level >= SEC_LEVEL_RED) + SSshuttle.emergency.modTimer(4) + else + SSshuttle.emergency.modTimer(2) + GLOB.security_level = SEC_LEVEL_GREEN + for(var/obj/machinery/firealarm/FA in GLOB.machines) + if(FA.z in GLOB.station_z_levels) + FA.update_icon() + if(SEC_LEVEL_BLUE) + if(GLOB.security_level < SEC_LEVEL_BLUE) + minor_announce(config.alert_desc_blue_upto, "Attention! Security level elevated to blue:",1) + if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL) + SSshuttle.emergency.modTimer(0.5) + else + minor_announce(config.alert_desc_blue_downto, "Attention! Security level lowered to blue:") + if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL) + SSshuttle.emergency.modTimer(2) + GLOB.security_level = SEC_LEVEL_BLUE + for(var/obj/machinery/firealarm/FA in GLOB.machines) + if(FA.z in GLOB.station_z_levels) + FA.update_icon() + if(SEC_LEVEL_RED) + if(GLOB.security_level < SEC_LEVEL_RED) + minor_announce(config.alert_desc_red_upto, "Attention! Code red!",1) + if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL) + if(GLOB.security_level == SEC_LEVEL_GREEN) + SSshuttle.emergency.modTimer(0.25) + else + SSshuttle.emergency.modTimer(0.5) + else + minor_announce(config.alert_desc_red_downto, "Attention! Code red!") + GLOB.security_level = SEC_LEVEL_RED + + /* - At the time of commit, setting status displays didn't work properly + var/obj/machinery/computer/communications/CC = locate(/obj/machinery/computer/communications,world) + if(CC) + CC.post_status("alert", "redalert")*/ + + for(var/obj/machinery/firealarm/FA in GLOB.machines) + if(FA.z in GLOB.station_z_levels) + FA.update_icon() + for(var/obj/machinery/computer/shuttle/pod/pod in GLOB.machines) + pod.admin_controlled = 0 + if(SEC_LEVEL_DELTA) + minor_announce(config.alert_desc_delta, "Attention! Delta security level reached!",1) + if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL) + if(GLOB.security_level == SEC_LEVEL_GREEN) + SSshuttle.emergency.modTimer(0.25) + else if(GLOB.security_level == SEC_LEVEL_BLUE) + SSshuttle.emergency.modTimer(0.5) + GLOB.security_level = SEC_LEVEL_DELTA + for(var/obj/machinery/firealarm/FA in GLOB.machines) + if(FA.z in GLOB.station_z_levels) + FA.update_icon() + for(var/obj/machinery/computer/shuttle/pod/pod in GLOB.machines) + pod.admin_controlled = 0 + else + return + +/proc/get_security_level() + switch(GLOB.security_level) + if(SEC_LEVEL_GREEN) + return "green" + if(SEC_LEVEL_BLUE) + return "blue" + if(SEC_LEVEL_RED) + return "red" + if(SEC_LEVEL_DELTA) + return "delta" + +/proc/num2seclevel(num) + switch(num) + if(SEC_LEVEL_GREEN) + return "green" + if(SEC_LEVEL_BLUE) + return "blue" + if(SEC_LEVEL_RED) + return "red" + if(SEC_LEVEL_DELTA) + return "delta" + +/proc/seclevel2num(seclevel) + switch( lowertext(seclevel) ) + if("green") + return SEC_LEVEL_GREEN + if("blue") + return SEC_LEVEL_BLUE + if("red") + return SEC_LEVEL_RED + if("delta") + return SEC_LEVEL_DELTA + + +/*DEBUG +/mob/verb/set_thing0() + set_security_level(0) +/mob/verb/set_thing1() + set_security_level(1) +/mob/verb/set_thing2() + set_security_level(2) +/mob/verb/set_thing3() + set_security_level(3) +*/ 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/arrivals.dm b/code/modules/shuttle/arrivals.dm index d89e1420fc..16aa279901 100644 --- a/code/modules/shuttle/arrivals.dm +++ b/code/modules/shuttle/arrivals.dm @@ -6,7 +6,7 @@ width = 7 height = 15 dir = WEST - port_angle = 180 + port_direction = SOUTH callTime = INFINITY ignitionTime = 50 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..8384e978e5 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -4,22 +4,11 @@ icon_keyboard = "tech_key" light_color = LIGHT_COLOR_CYAN req_access = list( ) - circuit = /obj/item/circuitboard/computer/shuttle var/shuttleId var/possible_destinations = "" var/admin_controlled var/no_destination_swap = 0 -/obj/machinery/computer/shuttle/Initialize() - ..() - return INITIALIZE_HINT_LATELOAD - -/obj/machinery/computer/shuttle/LateInitialize() - if(istype(circuit, /obj/item/circuitboard/computer/shuttle)) - var/obj/item/circuitboard/computer/shuttle/C = circuit - possible_destinations = C.possible_destinations - shuttleId = C.shuttleId - /obj/machinery/computer/shuttle/attack_hand(mob/user) if(..(user)) return @@ -78,7 +67,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..8bc90cf787 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -183,7 +183,7 @@ width = 22 height = 11 dir = EAST - port_angle = -90 + port_direction = WEST roundstart_move = "emergency_away" var/sound_played = 0 //If the launch sound has been sent to all players on the shuttle itself @@ -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 @@ -301,16 +301,6 @@ var/datum/DBQuery/query_round_shuttle_name = SSdbcore.NewQuery("UPDATE [format_table_name("round")] SET shuttle_name = '[name]' WHERE id = [GLOB.round_id]") query_round_shuttle_name.Execute() - // Gangs only have one attempt left if the shuttle has - // docked with the station to prevent suffering from - // endless dominator delays - for(var/datum/gang/G in SSticker.mode.gangs) - if(G.is_dominating) - G.dom_attempts = 0 - else - G.dom_attempts = min(1,G.dom_attempts) - - if(SHUTTLE_DOCKED) if(time_left <= ENGINES_START_TIME) mode = SHUTTLE_IGNITING diff --git a/code/modules/shuttle/navigation_computer.dm b/code/modules/shuttle/navigation_computer.dm index 32324ea233..9199e5eb14 100644 --- a/code/modules/shuttle/navigation_computer.dm +++ b/code/modules/shuttle/navigation_computer.dm @@ -1,7 +1,7 @@ /obj/machinery/computer/camera_advanced/shuttle_docker name = "navigation computer" desc = "Used to designate a precise transit location for a spacecraft." - z_lock = ZLEVEL_STATION + z_lock = ZLEVEL_STATION_PRIMARY jump_action = null var/datum/action/innate/shuttledocker_rotate/rotate_action = new var/datum/action/innate/shuttledocker_place/place_action = new 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..6da68f695a 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..56c7b85410 100644 --- a/code/modules/shuttle/supply.dm +++ b/code/modules/shuttle/supply.dm @@ -30,7 +30,7 @@ GLOBAL_LIST_INIT(blacklisted_cargo_types, typecacheof(list( callTime = 600 dir = WEST - port_angle = 90 + port_direction = EAST width = 12 dwidth = 5 height = 7 @@ -45,7 +45,7 @@ GLOBAL_LIST_INIT(blacklisted_cargo_types, typecacheof(list( SSshuttle.supply = src /obj/docking_port/mobile/supply/canMove() - if(z == ZLEVEL_STATION) + if(z in GLOB.station_z_levels) return check_blacklist(shuttle_areas) return ..() @@ -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/shuttle/syndicate.dm b/code/modules/shuttle/syndicate.dm index f9d90dd342..b21df4000c 100644 --- a/code/modules/shuttle/syndicate.dm +++ b/code/modules/shuttle/syndicate.dm @@ -47,7 +47,7 @@ desc = "Used to designate a precise transit location for the syndicate shuttle." icon_screen = "syndishuttle" icon_keyboard = "syndie_key" - z_lock = ZLEVEL_STATION + z_lock = ZLEVEL_STATION_PRIMARY shuttleId = "syndicate" shuttlePortId = "syndicate_custom" shuttlePortName = "custom location" diff --git a/code/modules/spells/spell.dm b/code/modules/spells/spell.dm index ea113ba4fd..3cb56becf8 100644 --- a/code/modules/spells/spell.dm +++ b/code/modules/spells/spell.dm @@ -18,7 +18,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th /obj/effect/proc_holder/proc/InterceptClickOn(mob/living/caller, params, atom/A) if(caller.ranged_ability != src || ranged_ability_user != caller) //I'm not actually sure how these would trigger, but, uh, safety, I guess? - to_chat(caller, "[caller.ranged_ability.name] has been disabled.") + to_chat(caller, "[caller.ranged_ability.name] has been disabled.") caller.ranged_ability.remove_ranged_ability() return TRUE //TRUE for failed, FALSE for passed. if(ranged_clickcd_override >= 0) @@ -33,7 +33,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th return if(user.ranged_ability && user.ranged_ability != src) if(forced) - to_chat(user, "[user.ranged_ability.name] has been replaced by [name].") + to_chat(user, "[user.ranged_ability.name] has been replaced by [name].") user.ranged_ability.remove_ranged_ability() else return diff --git a/code/modules/spells/spell_types/devil.dm b/code/modules/spells/spell_types/devil.dm index f54034c5ec..9d1afdcebc 100644 --- a/code/modules/spells/spell_types/devil.dm +++ b/code/modules/spells/spell_types/devil.dm @@ -114,7 +114,7 @@ to_chat(user, "You are no longer near a potential signer.") else - to_chat(user, "You can only re-appear near a potential signer.") + to_chat(user, "You can only re-appear near a potential signer.") revert_cast() return ..() else @@ -166,7 +166,7 @@ fakefire() src.loc = get_turf(src) src.client.eye = src - src.visible_message("[src] appears in a fiery blaze!") + src.visible_message("[src] appears in a fiery blaze!") playsound(get_turf(src), 'sound/magic/exit_blood.ogg', 100, 1, -1) addtimer(CALLBACK(src, .proc/fakefireextinguish), 15, TIMER_UNIQUE) @@ -260,4 +260,4 @@ effect_type = /obj/effect/particle_effect/smoke/transparent/dancefloor_devil /obj/effect/particle_effect/smoke/transparent/dancefloor_devil - lifetime = 2 \ No newline at end of file + lifetime = 2 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/spells/spell_types/shadow_walk.dm b/code/modules/spells/spell_types/shadow_walk.dm index 546b960793..45ea521098 100644 --- a/code/modules/spells/spell_types/shadow_walk.dm +++ b/code/modules/spells/spell_types/shadow_walk.dm @@ -13,7 +13,7 @@ action_icon_state = "ninja_cloak" action_background_icon_state = "bg_alien" -/obj/effect/proc_holder/spell/targeted/shadowwalk/cast(list/targets,mob/user = usr) +/obj/effect/proc_holder/spell/targeted/shadowwalk/cast(list/targets,mob/living/user = usr) var/L = user.loc if(istype(user.loc, /obj/effect/dummy/shadow)) var/obj/effect/dummy/shadow/S = L @@ -22,9 +22,11 @@ else var/turf/T = get_turf(user) var/light_amount = T.get_lumcount() - if(light_amount < 0.2) + if(light_amount < SHADOW_SPECIES_LIGHT_THRESHOLD) playsound(get_turf(user), 'sound/magic/ethereal_enter.ogg', 50, 1, -1) visible_message("[user] melts into the shadows!") + user.AdjustStun(-20, 0) + user.AdjustKnockdown(-20, 0) var/obj/effect/dummy/shadow/S2 = new(get_turf(user.loc)) user.forceMove(S2) S2.jaunter = user diff --git a/code/modules/station_goals/dna_vault.dm b/code/modules/station_goals/dna_vault.dm index 1b6d11719f..cfa95f2d1a 100644 --- a/code/modules/station_goals/dna_vault.dm +++ b/code/modules/station_goals/dna_vault.dm @@ -90,10 +90,10 @@ to_chat(user, "Plant needs to be ready to harvest to perform full data scan.") //Because space dna is actually magic return if(plants[H.myseed.type]) - to_chat(user, "Plant data already present in local storage.") + to_chat(user, "Plant data already present in local storage.") return plants[H.myseed.type] = 1 - to_chat(user, "Plant data added to local storage.") + to_chat(user, "Plant data added to local storage.") //animals var/static/list/non_simple_animals = typecacheof(list(/mob/living/carbon/monkey, /mob/living/carbon/alien)) @@ -104,19 +104,19 @@ to_chat(user, "No compatible DNA detected") return if(animals[target.type]) - to_chat(user, "Animal data already present in local storage.") + to_chat(user, "Animal data already present in local storage.") return animals[target.type] = 1 - to_chat(user, "Animal data added to local storage.") + to_chat(user, "Animal data added to local storage.") //humans if(ishuman(target)) var/mob/living/carbon/human/H = target if(dna[H.dna.uni_identity]) - to_chat(user, "Humanoid data already present in local storage.") + to_chat(user, "Humanoid data already present in local storage.") return dna[H.dna.uni_identity] = 1 - to_chat(user, "Humanoid data added to local storage.") + to_chat(user, "Humanoid data added to local storage.") /obj/machinery/dna_vault name = "DNA Vault" diff --git a/code/modules/station_goals/shield.dm b/code/modules/station_goals/shield.dm index 94cf2dfe9c..6639297e23 100644 --- a/code/modules/station_goals/shield.dm +++ b/code/modules/station_goals/shield.dm @@ -31,7 +31,7 @@ /datum/station_goal/proc/get_coverage() var/list/coverage = list() for(var/obj/machinery/satellite/meteor_shield/A in GLOB.machines) - if(!A.active || A.z != ZLEVEL_STATION) + if(!A.active || !(A.z in GLOB.station_z_levels)) continue coverage |= view(A.kill_range,A) return coverage.len diff --git a/code/modules/station_goals/station_goal.dm b/code/modules/station_goals/station_goal.dm index 4a9bc42438..98ec01f641 100644 --- a/code/modules/station_goals/station_goal.dm +++ b/code/modules/station_goals/station_goal.dm @@ -39,7 +39,7 @@ /datum/station_goal/Topic(href, href_list) ..() - if(!check_rights(R_ADMIN)) + if(!check_rights(R_ADMIN) || !usr.client.holder.CheckAdminHref(href, href_list)) return if(href_list["announce"]) diff --git a/code/modules/surgery/organs/autosurgeon.dm b/code/modules/surgery/organs/autosurgeon.dm index 0b8131d4cc..caa6cc7a97 100644 --- a/code/modules/surgery/organs/autosurgeon.dm +++ b/code/modules/surgery/organs/autosurgeon.dm @@ -38,6 +38,9 @@ if(!uses) desc = "[initial(desc)] Looks like it's been used up." +/obj/item/device/autosurgeon/attack_self_tk(mob/user) + return //stops TK fuckery + /obj/item/device/autosurgeon/attackby(obj/item/I, mob/user, params) if(istype(I, organ_type)) if(storedorgan) 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/eyes.dm b/code/modules/surgery/organs/eyes.dm index 554bcfdf60..4b939bf4f1 100644 --- a/code/modules/surgery/organs/eyes.dm +++ b/code/modules/surgery/organs/eyes.dm @@ -61,14 +61,17 @@ /obj/item/organ/eyes/night_vision/alien name = "alien eyes" desc = "It turned out they had them after all!" - see_in_dark = 8 - lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE sight_flags = SEE_MOBS /obj/item/organ/eyes/night_vision/zombie name = "undead eyes" desc = "Somewhat counterintuitively, these half rotten eyes actually have superior vision to those of a living human." +/obj/item/organ/eyes/night_vision/nightmare + name = "burning red eyes" + desc = "Even without their shadowy owner, looking at these eyes gives you a sense of dread." + icon_state = "burning_eyes" + ///Robotic /obj/item/organ/eyes/robotic diff --git a/code/modules/surgery/organs/lungs.dm b/code/modules/surgery/organs/lungs.dm index f95e2cd996..834a99d1ec 100644 --- a/code/modules/surgery/organs/lungs.dm +++ b/code/modules/surgery/organs/lungs.dm @@ -122,7 +122,8 @@ H.throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy) else H.failed_last_breath = FALSE - H.adjustOxyLoss(-5) + if(H.health >= HEALTH_THRESHOLD_CRIT) + H.adjustOxyLoss(-5) gas_breathed = breath_gases["o2"][MOLES] H.clear_alert("not_enough_oxy") @@ -149,7 +150,8 @@ H.throw_alert("nitro", /obj/screen/alert/not_enough_nitro) else H.failed_last_breath = FALSE - H.adjustOxyLoss(-5) + if(H.health >= HEALTH_THRESHOLD_CRIT) + H.adjustOxyLoss(-5) gas_breathed = breath_gases["n2"][MOLES] H.clear_alert("nitro") @@ -185,7 +187,8 @@ H.throw_alert("not_enough_co2", /obj/screen/alert/not_enough_co2) else H.failed_last_breath = FALSE - H.adjustOxyLoss(-5) + if(H.health >= HEALTH_THRESHOLD_CRIT) + H.adjustOxyLoss(-5) gas_breathed = breath_gases["co2"][MOLES] H.clear_alert("not_enough_co2") @@ -214,7 +217,8 @@ H.throw_alert("not_enough_tox", /obj/screen/alert/not_enough_tox) else H.failed_last_breath = FALSE - H.adjustOxyLoss(-5) + if(H.health >= HEALTH_THRESHOLD_CRIT) + H.adjustOxyLoss(-5) gas_breathed = breath_gases["plasma"][MOLES] H.clear_alert("not_enough_tox") @@ -316,6 +320,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/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..1f57ac93ce 100644 --- a/code/modules/uplink/uplink_item.dm +++ b/code/modules/uplink/uplink_item.dm @@ -218,10 +218,6 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once. surplus = 40 include_modes = list(/datum/game_mode/nuclear) -/datum/uplink_item/dangerous/smg/unrestricted - item = /obj/item/gun/ballistic/automatic/c20r/unrestricted - include_modes = list(/datum/game_mode/gang) - /datum/uplink_item/dangerous/machinegun name = "L6 Squad Automatic Weapon" desc = "A fully-loaded Aussec Armoury belt-fed machine gun. \ @@ -265,7 +261,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once. item = /obj/item/gun/energy/kinetic_accelerator/crossbow cost = 12 surplus = 50 - exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang) + exclude_modes = list(/datum/game_mode/nuclear) /datum/uplink_item/dangerous/flamethrower name = "Flamethrower" @@ -274,7 +270,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once. item = /obj/item/flamethrower/full/tank cost = 4 surplus = 40 - include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang) + include_modes = list(/datum/game_mode/nuclear) /datum/uplink_item/dangerous/sword name = "Energy Sword" @@ -361,7 +357,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once. item = /obj/item/reagent_containers/spray/chemsprayer/bioterror cost = 20 surplus = 0 - include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang) + include_modes = list(/datum/game_mode/nuclear) /datum/uplink_item/stealthy_weapons/virus_grenade name = "Fungal Tuberculosis Grenade" @@ -403,6 +399,12 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once. item = /obj/item/ammo_box/magazine/m10mm/hp cost = 3 +/datum/uplink_item/ammo/pistolaps + name = "9mm Handgun Magazine" + desc = "An additional 15-round 9mm magazine, compatible with the Stetchkin APS pistol, found in the Spetsnaz Pyro bundle." + item = /obj/item/ammo_box/magazine/pistolm9mm + cost = 2 + /datum/uplink_item/ammo/bolt_action name = "Surplus Rifle Clip" desc = "A stripper clip used to quickly load bolt action rifles. Contains 5 rounds." @@ -466,7 +468,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once. These bullets pack a lot of punch that can knock most targets down, but do limited overall damage." item = /obj/item/ammo_box/magazine/smgm45 cost = 3 - include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang) + include_modes = list(/datum/game_mode/nuclear) /datum/uplink_item/ammo/smg/bag name = ".45 Ammo Duffel Bag" @@ -607,7 +609,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once. item = /obj/item/sleeping_carp_scroll cost = 17 surplus = 0 - exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang) + exclude_modes = list(/datum/game_mode/nuclear) /datum/uplink_item/stealthy_weapons/cqc name = "CQC Manual" @@ -637,7 +639,6 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once. item = /obj/item/gun/ballistic/automatic/toy/pistol/riot cost = 3 surplus = 10 - exclude_modes = list(/datum/game_mode/gang) /datum/uplink_item/stealthy_weapons/sleepy_pen name = "Sleepy Pen" @@ -647,7 +648,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once. falls asleep, they will be able to move and act." item = /obj/item/pen/sleepy cost = 4 - exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang) + exclude_modes = list(/datum/game_mode/nuclear) /datum/uplink_item/stealthy_weapons/soap name = "Syndicate Soap" @@ -670,7 +671,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once. item = /obj/item/storage/box/syndie_kit/romerol cost = 25 cant_discount = TRUE - exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang) + exclude_modes = list(/datum/game_mode/nuclear) /datum/uplink_item/stealthy_weapons/dart_pistol name = "Dart Pistol" @@ -778,7 +779,6 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once. move the projector from their hand. Disguised users move slowly, and projectiles pass over them." item = /obj/item/device/chameleon cost = 7 - exclude_modes = list(/datum/game_mode/gang) /datum/uplink_item/stealthy_tools/camera_bug name = "Camera Bug" @@ -812,7 +812,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once. item = /obj/item/reagent_containers/syringe/mulligan cost = 4 surplus = 30 - exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang) + exclude_modes = list(/datum/game_mode/nuclear) /datum/uplink_item/stealthy_tools/emplight name = "EMP Flashlight" @@ -840,7 +840,6 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once. //Space Suits and Hardsuits /datum/uplink_item/suits category = "Space Suits and Hardsuits" - exclude_modes = list(/datum/game_mode/gang) surplus = 40 /datum/uplink_item/suits/space_suit @@ -891,7 +890,6 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once. in electronic devices, subverts intended functions, and easily breaks security mechanisms." item = /obj/item/card/emag cost = 6 - exclude_modes = list(/datum/game_mode/gang) /datum/uplink_item/device_tools/toolbox name = "Full Syndicate Toolbox" @@ -921,7 +919,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once. and other supplies helpful for a field medic." item = /obj/item/storage/firstaid/tactical cost = 4 - include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang) + include_modes = list(/datum/game_mode/nuclear) /datum/uplink_item/device_tools/syndietome name = "Syndicate Tome" @@ -970,7 +968,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" @@ -1038,7 +1036,6 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once. sends you a small beacon that will teleport the larger beacon to your location upon activation." item = /obj/item/device/sbeacondrop cost = 14 - exclude_modes = list(/datum/game_mode/gang) /datum/uplink_item/device_tools/syndicate_bomb name = "Syndicate Bomb" @@ -1084,7 +1081,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once. item = /obj/item/shield/energy cost = 16 surplus = 20 - include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang) + include_modes = list(/datum/game_mode/nuclear) /datum/uplink_item/device_tools/medgun name = "Medbeam Gun" @@ -1372,7 +1369,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once. you will receive." item = /obj/item/storage/box/syndicate cost = 20 - exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang) + exclude_modes = list(/datum/game_mode/nuclear) cant_discount = TRUE /datum/uplink_item/badass/surplus @@ -1382,7 +1379,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once. item = /obj/structure/closet/crate cost = 20 player_minimum = 25 - exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang) + exclude_modes = list(/datum/game_mode/nuclear) cant_discount = TRUE /datum/uplink_item/badass/surplus/spawn_item(turf/loc, obj/item/device/uplink/U) 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 ae2cc1e43a..652651e425 100644 --- a/config/config.txt +++ b/config/config.txt @@ -191,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 @@ -329,3 +337,6 @@ MINUTE_TOPIC_LIMIT 100 ## Send a message to IRC when starting a new game #IRC_ANNOUNCE_NEW_GAME + +## Allow admin hrefs that don't use the new token system, will eventually be removed +DEBUG_ADMIN_HREFS 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-2442.yml b/html/changelogs/AutoChangeLog-pr-2442.yml deleted file mode 100644 index 47a8464ffb..0000000000 --- a/html/changelogs/AutoChangeLog-pr-2442.yml +++ /dev/null @@ -1,5 +0,0 @@ -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-2463.yml b/html/changelogs/AutoChangeLog-pr-2463.yml deleted file mode 100644 index 72c9de6edd..0000000000 --- a/html/changelogs/AutoChangeLog-pr-2463.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Xhuis" -delete-after: True -changes: - - bugfix: "You can now empty storage objects onto floors again." diff --git a/html/changelogs/AutoChangeLog-pr-2484.yml b/html/changelogs/AutoChangeLog-pr-2484.yml new file mode 100644 index 0000000000..f7d8732121 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2484.yml @@ -0,0 +1,5 @@ +author: "Naksu" +delete-after: True +changes: + - spellcheck: "fixed inconsistent grammar between machines that derive from /obj/machinery/chem_dispenser" + - spellcheck: "touched up some chat messages to include references to objects instead of \"that\" or \"the machine\" etc., also removed references to beakers being loaded in machines that can accept any container" diff --git a/html/changelogs/AutoChangeLog-pr-2509.yml b/html/changelogs/AutoChangeLog-pr-2509.yml deleted file mode 100644 index c54ef55884..0000000000 --- a/html/changelogs/AutoChangeLog-pr-2509.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "MMMiracles" -delete-after: True -changes: - - rscdel: "Cerestation has been decommissioned. Nanotrasen apologizes for any spikes of suicidal tendencies, sporadic outbursts of primitive anger, and other issues that may of been caused during the station's run." diff --git a/html/changelogs/AutoChangeLog-pr-2539.yml b/html/changelogs/AutoChangeLog-pr-2539.yml new file mode 100644 index 0000000000..3401e4c4c9 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2539.yml @@ -0,0 +1,4 @@ +author: "ShizCalev" +delete-after: True +changes: + - tweak: "All power systems will now report their wattage values in Watts, Kilowatts, Megawatts, and Gigawatts. Gone are the days of seeing 48760 W total load when working with an APC!" diff --git a/html/changelogs/AutoChangeLog-pr-2545.yml b/html/changelogs/AutoChangeLog-pr-2545.yml deleted file mode 100644 index b3f555c1c2..0000000000 --- a/html/changelogs/AutoChangeLog-pr-2545.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Cobby & Cyberboss" -delete-after: True -changes: - - rscadd: "A stealth option for the traitor microlaser has been added. When used, it adds 30 seconds to the cooldown of the device." diff --git a/html/changelogs/AutoChangeLog-pr-2555.yml b/html/changelogs/AutoChangeLog-pr-2555.yml deleted file mode 100644 index 6991c2709b..0000000000 --- a/html/changelogs/AutoChangeLog-pr-2555.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Jay" -delete-after: True -changes: - - bugfix: "Fixes missing Guilmon var that prevented their bodymarkings form showing up in character creation" diff --git a/html/changelogs/AutoChangeLog-pr-2577.yml b/html/changelogs/AutoChangeLog-pr-2577.yml new file mode 100644 index 0000000000..6aed6839d7 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2577.yml @@ -0,0 +1,4 @@ +author: "More Robust Than You" +delete-after: True +changes: + - rscdel: "Finally fucking removed gangs" diff --git a/html/changelogs/AutoChangeLog-pr-2578.yml b/html/changelogs/AutoChangeLog-pr-2578.yml deleted file mode 100644 index 479ce904f9..0000000000 --- a/html/changelogs/AutoChangeLog-pr-2578.yml +++ /dev/null @@ -1,6 +0,0 @@ -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 deleted file mode 100644 index 3ab78efa1d..0000000000 --- a/html/changelogs/AutoChangeLog-pr-2588.yml +++ /dev/null @@ -1,4 +0,0 @@ -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-2599.yml b/html/changelogs/AutoChangeLog-pr-2599.yml new file mode 100644 index 0000000000..1a184bb194 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2599.yml @@ -0,0 +1,4 @@ +author: "Pubby" +delete-after: True +changes: + - bugfix: "Escape pods and PubbyStation's monastery shuttle are back in commission" diff --git a/html/changelogs/AutoChangeLog-pr-2615.yml b/html/changelogs/AutoChangeLog-pr-2615.yml new file mode 100644 index 0000000000..8ea320ce6c --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2615.yml @@ -0,0 +1,4 @@ +author: "CitadelStationBot" +delete-after: True +changes: + - bugfix: "Stands now check if their user got queue deleted somehow" diff --git a/html/changelogs/AutoChangeLog-pr-2699.yml b/html/changelogs/AutoChangeLog-pr-2699.yml new file mode 100644 index 0000000000..6b0a665b67 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2699.yml @@ -0,0 +1,4 @@ +author: "CitadelStationBot" +delete-after: True +changes: + - rscadd: "Mechs now can be connected to atmos ports" diff --git a/html/changelogs/AutoChangeLog-pr-2701.yml b/html/changelogs/AutoChangeLog-pr-2701.yml new file mode 100644 index 0000000000..8ad7c8ac56 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2701.yml @@ -0,0 +1,5 @@ +author: "BeeSting12" +delete-after: True +changes: + - balance: "The stetchkin APS pistol is smaller." + - rscadd: "The 9mm pistol magazines can be purchased from nuke op uplinks at two telecrystals each." diff --git a/html/changelogs/AutoChangeLog-pr-2703.yml b/html/changelogs/AutoChangeLog-pr-2703.yml new file mode 100644 index 0000000000..f507d35652 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2703.yml @@ -0,0 +1,4 @@ +author: "Xhuis" +delete-after: True +changes: + - bugfix: "The Orion Trail machines are no longer on hardcore mode and you can now restart after losing." diff --git a/html/changelogs/AutoChangeLog-pr-2709.yml b/html/changelogs/AutoChangeLog-pr-2709.yml new file mode 100644 index 0000000000..15a73203fb --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2709.yml @@ -0,0 +1,4 @@ +author: "Kor" +delete-after: True +changes: + - rscadd: "Added Nightmares. They're admin only currently, so as usual, make sure to beg admins to be one." diff --git a/html/changelogs/AutoChangeLog-pr-2710.yml b/html/changelogs/AutoChangeLog-pr-2710.yml new file mode 100644 index 0000000000..3ff0987838 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2710.yml @@ -0,0 +1,6 @@ +author: "VexingRaven" +delete-after: True +changes: + - bugfix: "Changeling Augmented Eyesight ability now grants flash protection when toggled off" + - bugfix: "Changeling Augmented Eyesight ability can now be toggled properly" + - bugfix: "Changeling Augmented Eyesight ability is properly removed when readapting" diff --git a/html/changelogs/AutoChangeLog-pr-2717.yml b/html/changelogs/AutoChangeLog-pr-2717.yml new file mode 100644 index 0000000000..59473e3f39 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2717.yml @@ -0,0 +1,4 @@ +author: "Jay" +delete-after: True +changes: + - rscadd: "SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS" diff --git a/html/changelogs/AutoChangeLog-pr-2739.yml b/html/changelogs/AutoChangeLog-pr-2739.yml new file mode 100644 index 0000000000..62b91671d4 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2739.yml @@ -0,0 +1,4 @@ +author: "Lordpidey" +delete-after: True +changes: + - bugfix: "Centcom roundstart threat reports are fixed, and can now be used to narrow down the types of threats facing the station." diff --git a/html/changelogs/AutoChangeLog-pr-2740.yml b/html/changelogs/AutoChangeLog-pr-2740.yml new file mode 100644 index 0000000000..bb5531fcf8 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2740.yml @@ -0,0 +1,4 @@ +author: "VexingRaven" +delete-after: True +changes: + - bugfix: "The syndicate have once again stocked the toy C20r and L6 Saw with riot darts." diff --git a/html/changelogs/AutoChangeLog-pr-2754.yml b/html/changelogs/AutoChangeLog-pr-2754.yml new file mode 100644 index 0000000000..2de36c6227 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2754.yml @@ -0,0 +1,4 @@ +author: "ShizCalev" +delete-after: True +changes: + - bugfix: "Holding a potted plant will no longer put you above objects on walls." diff --git a/html/changelogs/AutoChangeLog-pr-2759.yml b/html/changelogs/AutoChangeLog-pr-2759.yml new file mode 100644 index 0000000000..829515f4fa --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2759.yml @@ -0,0 +1,8 @@ +author: "Poojawa" +delete-after: True +changes: + - rscadd: "Added inhands for a few weapons" + - rscadd: "sweaters and some vg clothes" + - rscadd: "icon_override now works. Use that instead of putting shit in uniform.dmi for snowflake clothes" + - rscadd: "AK-47s FOR EVERYONE!! button for Admins to use." + - rscadd: "Plasma Rifle Gunlocker, for mapping memes. Unbreakable and emags don't work, they only unlock during Red or Delta security alerts. Mainly designed for Anti-Xenomorph or Blob duty." diff --git a/html/changelogs/AutoChangeLog-pr-2760.yml b/html/changelogs/AutoChangeLog-pr-2760.yml new file mode 100644 index 0000000000..5b85e77b64 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2760.yml @@ -0,0 +1,4 @@ +author: "Fun Police" +delete-after: True +changes: + - rscdel: "Removed some of the free lag." diff --git a/html/changelogs/AutoChangeLog-pr-2766.yml b/html/changelogs/AutoChangeLog-pr-2766.yml new file mode 100644 index 0000000000..a289ab49d4 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2766.yml @@ -0,0 +1,4 @@ +author: "Kor" +delete-after: True +changes: + - bugfix: "It is possible to multitool the cargo computer circuitboard for contraband again" diff --git a/html/changelogs/AutoChangeLog-pr-2780.yml b/html/changelogs/AutoChangeLog-pr-2780.yml new file mode 100644 index 0000000000..c4436213cb --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2780.yml @@ -0,0 +1,4 @@ +author: "Naksu" +delete-after: True +changes: + - bugfix: "Prevents dead monkeys from fleeing their attackers or escaping His Grace only to be eaten again" diff --git a/html/changelogs/AutoChangeLog-pr-2782.yml b/html/changelogs/AutoChangeLog-pr-2782.yml new file mode 100644 index 0000000000..4dbe69d9b5 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2782.yml @@ -0,0 +1,4 @@ +author: "Naksu" +delete-after: True +changes: + - bugfix: "Evidence bags will no longer show ghosts of items such as primed flashbangs after the flashbang inside explodes" diff --git a/html/changelogs/AutoChangeLog-pr-2783.yml b/html/changelogs/AutoChangeLog-pr-2783.yml new file mode 100644 index 0000000000..1a585894a1 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2783.yml @@ -0,0 +1,4 @@ +author: "CitadelStationBot" +delete-after: True +changes: + - rscadd: "Ninja adrenaline boost removes stamina damage" diff --git a/html/changelogs/AutoChangeLog-pr-2784.yml b/html/changelogs/AutoChangeLog-pr-2784.yml new file mode 100644 index 0000000000..63f59afadd --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2784.yml @@ -0,0 +1,4 @@ +author: "Robustin" +delete-after: True +changes: + - rscadd: "Due to budget cuts, airlocks that control access to non-functional maint rooms and other abandoned areas now have a chance to spawn welded, bolted, screwdrivered, or flat out replaced by a wall at roundstart." diff --git a/html/changelogs/AutoChangeLog-pr-2786.yml b/html/changelogs/AutoChangeLog-pr-2786.yml new file mode 100644 index 0000000000..758a493466 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2786.yml @@ -0,0 +1,4 @@ +author: "Basilman" +delete-after: True +changes: + - rscadd: "Gondolas are now procedural generated." diff --git a/html/changelogs/AutoChangeLog-pr-2789.yml b/html/changelogs/AutoChangeLog-pr-2789.yml new file mode 100644 index 0000000000..b988853fde --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2789.yml @@ -0,0 +1,4 @@ +author: "CitadelStationBot" +delete-after: True +changes: + - bugfix: "The doomsday device will again periodically announce the time until its activation" diff --git a/html/changelogs/AutoChangeLog-pr-2791.yml b/html/changelogs/AutoChangeLog-pr-2791.yml new file mode 100644 index 0000000000..a802189796 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2791.yml @@ -0,0 +1,4 @@ +author: "Naksu" +delete-after: True +changes: + - rscdel: "Corgis can no longer be targeted by facehuggers" diff --git a/icons/mob/animal.dmi b/icons/mob/animal.dmi index 3ed8c153d8..8dbe11a55d 100644 Binary files a/icons/mob/animal.dmi and b/icons/mob/animal.dmi differ diff --git a/icons/mob/citadel/glasses.dmi b/icons/mob/citadel/glasses.dmi new file mode 100644 index 0000000000..cf74d73796 Binary files /dev/null and b/icons/mob/citadel/glasses.dmi differ diff --git a/icons/mob/citadel/guns_lefthand.dmi b/icons/mob/citadel/guns_lefthand.dmi new file mode 100644 index 0000000000..9323726d77 Binary files /dev/null and b/icons/mob/citadel/guns_lefthand.dmi differ diff --git a/icons/mob/citadel/guns_righthand.dmi b/icons/mob/citadel/guns_righthand.dmi new file mode 100644 index 0000000000..6f22a499c7 Binary files /dev/null and b/icons/mob/citadel/guns_righthand.dmi differ diff --git a/icons/mob/citadel/head.dmi b/icons/mob/citadel/head.dmi new file mode 100644 index 0000000000..cf74d73796 Binary files /dev/null and b/icons/mob/citadel/head.dmi differ diff --git a/icons/mob/citadel/masks.dmi b/icons/mob/citadel/masks.dmi new file mode 100644 index 0000000000..cf74d73796 Binary files /dev/null and b/icons/mob/citadel/masks.dmi differ diff --git a/icons/mob/citadel/neck.dmi b/icons/mob/citadel/neck.dmi new file mode 100644 index 0000000000..cf74d73796 Binary files /dev/null and b/icons/mob/citadel/neck.dmi differ diff --git a/icons/mob/citadel/shoes.dmi b/icons/mob/citadel/shoes.dmi new file mode 100644 index 0000000000..cf74d73796 Binary files /dev/null and b/icons/mob/citadel/shoes.dmi differ diff --git a/icons/mob/citadel/suit.dmi b/icons/mob/citadel/suit.dmi new file mode 100644 index 0000000000..cf74d73796 Binary files /dev/null and b/icons/mob/citadel/suit.dmi differ diff --git a/icons/mob/citadel/uniforms.dmi b/icons/mob/citadel/uniforms.dmi new file mode 100644 index 0000000000..cad8fb18e8 Binary files /dev/null and b/icons/mob/citadel/uniforms.dmi differ diff --git a/icons/mob/gondolas.dmi b/icons/mob/gondolas.dmi new file mode 100644 index 0000000000..c8540fbac0 Binary files /dev/null and b/icons/mob/gondolas.dmi differ 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/hud.dmi b/icons/mob/hud.dmi index 6d05b89039..0cdee31ae1 100644 Binary files a/icons/mob/hud.dmi and b/icons/mob/hud.dmi differ diff --git a/icons/mob/human_face.dmi b/icons/mob/human_face.dmi index c8ab9f0e0a..5c61706c70 100644 Binary files a/icons/mob/human_face.dmi and b/icons/mob/human_face.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/antag/changeling_lefthand.dmi b/icons/mob/inhands/antag/changeling_lefthand.dmi index b5a0928fbe..daf0e2fb3f 100644 Binary files a/icons/mob/inhands/antag/changeling_lefthand.dmi and b/icons/mob/inhands/antag/changeling_lefthand.dmi differ diff --git a/icons/mob/inhands/antag/changeling_righthand.dmi b/icons/mob/inhands/antag/changeling_righthand.dmi index 34e34e4eda..aa2144c596 100644 Binary files a/icons/mob/inhands/antag/changeling_righthand.dmi and b/icons/mob/inhands/antag/changeling_righthand.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/inhands/weapons/staves_lefthand.dmi b/icons/mob/inhands/weapons/staves_lefthand.dmi index 382e8e4848..1384624a58 100644 Binary files a/icons/mob/inhands/weapons/staves_lefthand.dmi and b/icons/mob/inhands/weapons/staves_lefthand.dmi differ diff --git a/icons/mob/inhands/weapons/staves_righthand.dmi b/icons/mob/inhands/weapons/staves_righthand.dmi index 591b5d0a2c..94ee9bd6f1 100644 Binary files a/icons/mob/inhands/weapons/staves_righthand.dmi and b/icons/mob/inhands/weapons/staves_righthand.dmi differ diff --git a/icons/mob/lavaland/lavaland_monsters.dmi b/icons/mob/lavaland/lavaland_monsters.dmi index 3e8ecaf1ce..f072421196 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..df4bbb6182 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..b8491525a7 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..e7c2d4025d 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_alert.dmi b/icons/mob/screen_alert.dmi index 13f16aae59..8eb2775c5c 100644 Binary files a/icons/mob/screen_alert.dmi and b/icons/mob/screen_alert.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/mob/uniform.dmi b/icons/mob/uniform.dmi index ef7f594c70..6ed5b6c928 100644 Binary files a/icons/mob/uniform.dmi and b/icons/mob/uniform.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/clothing/neck.dmi b/icons/obj/clothing/neck.dmi index 0f3668ce10..40c4aa03bc 100644 Binary files a/icons/obj/clothing/neck.dmi and b/icons/obj/clothing/neck.dmi differ diff --git a/icons/obj/device.dmi b/icons/obj/device.dmi index 808de69446..79f0a207d4 100644 Binary files a/icons/obj/device.dmi and b/icons/obj/device.dmi differ diff --git a/icons/obj/guns/magic.dmi b/icons/obj/guns/magic.dmi index 45e7b49f4e..b8e77530be 100644 Binary files a/icons/obj/guns/magic.dmi and b/icons/obj/guns/magic.dmi differ diff --git a/icons/obj/items_and_weapons.dmi b/icons/obj/items_and_weapons.dmi index 7667672715..94c0c03835 100644 Binary files a/icons/obj/items_and_weapons.dmi and b/icons/obj/items_and_weapons.dmi differ diff --git a/icons/obj/lavaland/artefacts.dmi b/icons/obj/lavaland/artefacts.dmi index 9b7ed4a35f..ce3030b6c5 100644 Binary files a/icons/obj/lavaland/artefacts.dmi and b/icons/obj/lavaland/artefacts.dmi differ diff --git a/icons/obj/projectiles.dmi b/icons/obj/projectiles.dmi index def7a71bd3..74f9df85a7 100644 Binary files a/icons/obj/projectiles.dmi and b/icons/obj/projectiles.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/icons/obj/stationobjs.dmi b/icons/obj/stationobjs.dmi index 28dd158ff7..0f4cda5d8b 100644 Binary files a/icons/obj/stationobjs.dmi and b/icons/obj/stationobjs.dmi differ diff --git a/icons/obj/surgery.dmi b/icons/obj/surgery.dmi index 3753cc6e11..d18a1bf262 100755 Binary files a/icons/obj/surgery.dmi and b/icons/obj/surgery.dmi differ diff --git a/icons/obj/vending_restock.dmi b/icons/obj/vending_restock.dmi index eac7b8a266..7f8289a087 100644 Binary files a/icons/obj/vending_restock.dmi and b/icons/obj/vending_restock.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/misc/ak47s.ogg b/sound/misc/ak47s.ogg new file mode 100644 index 0000000000..fa14ce4bb4 Binary files /dev/null and b/sound/misc/ak47s.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 da750b8b1d..730fc7ac51 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" @@ -175,6 +176,7 @@ #include "code\citadel\cit_uniforms.dm" #include "code\citadel\cit_vendors.dm" #include "code\citadel\dogborgstuff.dm" +#include "code\citadel\plasmacases.dm" #include "code\citadel\crew_objectives\cit_crewobjectives_cargo.dm" #include "code\citadel\crew_objectives\cit_crewobjectives_civilian.dm" #include "code\citadel\crew_objectives\cit_crewobjectives_command.dm" @@ -290,6 +292,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" @@ -387,7 +390,6 @@ #include "code\game\data_huds.dm" #include "code\game\say.dm" #include "code\game\shuttle_engines.dm" -#include "code\game\skincmd.dm" #include "code\game\sound.dm" #include "code\game\world.dm" #include "code\game\area\ai_monitored.dm" @@ -412,7 +414,6 @@ #include "code\game\gamemodes\events.dm" #include "code\game\gamemodes\factions.dm" #include "code\game\gamemodes\game_mode.dm" -#include "code\game\gamemodes\intercept_report.dm" #include "code\game\gamemodes\objective.dm" #include "code\game\gamemodes\objective_items.dm" #include "code\game\gamemodes\blob\blob.dm" @@ -516,12 +517,6 @@ #include "code\game\gamemodes\devil\true_devil\_true_devil.dm" #include "code\game\gamemodes\devil\true_devil\inventory.dm" #include "code\game\gamemodes\extended\extended.dm" -#include "code\game\gamemodes\gang\dominator.dm" -#include "code\game\gamemodes\gang\gang.dm" -#include "code\game\gamemodes\gang\gang_datum.dm" -#include "code\game\gamemodes\gang\gang_items.dm" -#include "code\game\gamemodes\gang\gang_pen.dm" -#include "code\game\gamemodes\gang\recaller.dm" #include "code\game\gamemodes\malfunction\Malf_Modules.dm" #include "code\game\gamemodes\meteor\meteor.dm" #include "code\game\gamemodes\meteor\meteors.dm" @@ -805,6 +800,7 @@ #include "code\game\objects\items\mop.dm" #include "code\game\objects\items\paint.dm" #include "code\game\objects\items\paiwire.dm" +#include "code\game\objects\items\pinpointer.dm" #include "code\game\objects\items\pneumaticCannon.dm" #include "code\game\objects\items\powerfist.dm" #include "code\game\objects\items\RCD.dm" @@ -883,7 +879,6 @@ #include "code\game\objects\items\implants\implant_exile.dm" #include "code\game\objects\items\implants\implant_explosive.dm" #include "code\game\objects\items\implants\implant_freedom.dm" -#include "code\game\objects\items\implants\implant_gang.dm" #include "code\game\objects\items\implants\implant_krav_maga.dm" #include "code\game\objects\items\implants\implant_loyality.dm" #include "code\game\objects\items\implants\implant_misc.dm" @@ -992,6 +987,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" @@ -1076,6 +1072,7 @@ #include "code\modules\admin\verbs\adminjump.dm" #include "code\modules\admin\verbs\adminpm.dm" #include "code\modules\admin\verbs\adminsay.dm" +#include "code\modules\admin\verbs\ak47s.dm" #include "code\modules\admin\verbs\atmosdebug.dm" #include "code\modules\admin\verbs\bluespacearty.dm" #include "code\modules\admin\verbs\BrokenInhands.dm" @@ -1761,6 +1758,7 @@ #include "code\modules\mob\living\simple_animal\friendly\dog.dm" #include "code\modules\mob\living\simple_animal\friendly\farm_animals.dm" #include "code\modules\mob\living\simple_animal\friendly\fox.dm" +#include "code\modules\mob\living\simple_animal\friendly\gondola.dm" #include "code\modules\mob\living\simple_animal\friendly\lizard.dm" #include "code\modules\mob\living\simple_animal\friendly\mouse.dm" #include "code\modules\mob\living\simple_animal\friendly\penguin.dm" @@ -2105,12 +2103,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..f6d706373d 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(" - - - - {{#if data.docked && !data.requestonly}} - {{data.location}} - {{else}} - {{data.location}} - {{/if}} - - - {{Math.floor(adata.points)}} - + + + + + {{#if data.docked && !data.requestonly}} + {{data.location}} + {{else}} + {{data.location}} + {{/if}} + + + {{Math.floor(adata.points)}} + - {{data.message}} - - {{#if data.loan && !data.requestonly}} - - {{#if !data.loan_dispatched}} - Loan Shuttle - {{else}} + {{data.message}} + + {{#if data.loan && !data.requestonly}} + + {{#if !data.loan_dispatched}} + Loan Shuttle + {{else}} Loaned to CentCom - {{/if}} - - {{/if}} - -{{#if !data.requestonly}} - - {{#partial button}} - Clear - {{/partial}} - {{#each data.cart}} - -
    #{{id}}
    -
    {{object}}
    -
    {{cost}} Credits
    -
    - -
    -
    - {{else}} - Nothing in Cart - {{/each}} -
    -{{/if}} - - {{#partial button}} - {{#if !data.requestonly}} - Clear - {{/if}} - {{/partial}} - {{#each data.requests}} - -
    #{{id}}
    -
    {{object}}
    -
    {{cost}} Credits
    -
    By {{orderer}}
    -
    Comment: {{reason}}
    - {{#if !data.requestonly}} -
    - - -
    - {{/if}} -
    - {{else}} - No Requests - {{/each}} -
    - - {{#each data.supplies}} - - {{#each packs}} - - {{cost}} Credits - - {{/each}} - - {{/each}} - + {{/if}} + + {{/if}} +
    +{{#if !data.requestonly}} + + {{#partial button}} + Clear + {{/partial}} + {{#each data.cart}} + +
    #{{id}}
    +
    {{object}}
    +
    {{cost}} Credits
    +
    + +
    +
    + {{else}} + Nothing in Cart + {{/each}} +
    +{{/if}} + + {{#partial button}} + {{#if !data.requestonly}} + Clear + {{/if}} + {{/partial}} + {{#each data.requests}} + +
    #{{id}}
    +
    {{object}}
    +
    {{cost}} Credits
    +
    By {{orderer}}
    +
    Comment: {{reason}}
    + {{#if !data.requestonly}} +
    + + +
    + {{/if}} +
    + {{else}} + No Requests + {{/each}} +
    + + {{#each data.supplies}} + + {{#each packs}} + + {{cost}} Credits + + {{/each}} + + {{/each}} + diff --git a/tgui/src/interfaces/cryo.ract b/tgui/src/interfaces/cryo.ract index f7ba23b5e2..619741eaad 100644 --- a/tgui/src/interfaces/cryo.ract +++ b/tgui/src/interfaces/cryo.ract @@ -1,42 +1,21 @@ - - {{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/ntos_net_downloader.ract b/tgui/src/interfaces/ntos_net_downloader.ract index 884222fe4f..41a3011142 100644 --- a/tgui/src/interfaces/ntos_net_downloader.ract +++ b/tgui/src/interfaces/ntos_net_downloader.ract @@ -65,7 +65,7 @@ {{#if data.hackedavailable}} - Please note that NanoTrasen does not recommend download of software from non-official servers. + Please note that Nanotrasen does not recommend download of software from non-official servers. {{#each data.hacked_programs}}
    {{fileinfo}}
    @@ -86,5 +86,5 @@ {{/if}} {{/if}} {{/if}} -


    NTOS v2.0.4b Copyright NanoTrasen 2557 - 2559 +


    NTOS v2.0.4b Copyright Nanotrasen 2557 - 2559
    \ No newline at end of file diff --git a/tgui/src/interfaces/ntos_power_monitor.ract b/tgui/src/interfaces/ntos_power_monitor.ract index a026b6a0ab..d29551af15 100644 --- a/tgui/src/interfaces/ntos_power_monitor.ract +++ b/tgui/src/interfaces/ntos_power_monitor.ract @@ -50,10 +50,10 @@ xinc='{{data.stored / 10}}' yinc='9'/> {{else}} - {{data.supply}} W + {{data.supply}} - {{data.demand}} W + {{data.demand}} {{/if}}
    @@ -70,7 +70,7 @@ {{#each data.areas}}
    {{Math.round(adata.areas[@index].charge)}} %
    -
    {{Math.round(adata.areas[@index].load)}} W
    +
    {{adata.areas[@index].load}}
    {{chargingMode(charging)}}
    {{channelPower(eqp)}} [{{channelMode(eqp)}}]
    {{channelPower(lgt)}} [{{channelMode(lgt)}}]
    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/power_monitor.ract b/tgui/src/interfaces/power_monitor.ract index 2ebadeccf5..856b3ceefa 100644 --- a/tgui/src/interfaces/power_monitor.ract +++ b/tgui/src/interfaces/power_monitor.ract @@ -1,77 +1,77 @@ - - - - {{#if config.fancy}} - - {{else}} - - {{data.supply}} W - - - {{data.demand}} W - - {{/if}} - - - -
    Area
    -
    Charge
    -
    Load
    -
    Status
    -
    Equipment
    -
    Lighting
    -
    Environment
    -
    - {{#each data.areas}} - -
    {{Math.round(adata.areas[@index].charge)}} %
    -
    {{Math.round(adata.areas[@index].load)}} W
    -
    {{chargingMode(charging)}}
    -
    {{channelPower(eqp)}} [{{channelMode(eqp)}}]
    -
    {{channelPower(lgt)}} [{{channelMode(lgt)}}]
    -
    {{channelPower(env)}} [{{channelMode(env)}}]
    -
    - {{/each}} -
    + + + + {{#if config.fancy}} + + {{else}} + + {{data.supply}} + + + {{data.demand}} + + {{/if}} + + + +
    Area
    +
    Charge
    +
    Load
    +
    Status
    +
    Equipment
    +
    Lighting
    +
    Environment
    +
    + {{#each data.areas}} + +
    {{Math.round(adata.areas[@index].charge)}} %
    +
    {{adata.areas[@index].load}}
    +
    {{chargingMode(charging)}}
    +
    {{channelPower(eqp)}} [{{channelMode(eqp)}}]
    +
    {{channelPower(lgt)}} [{{channelMode(lgt)}}]
    +
    {{channelPower(env)}} [{{channelMode(env)}}]
    +
    + {{/each}} +
    diff --git a/tgui/src/interfaces/sleeper.ract b/tgui/src/interfaces/sleeper.ract index 1cda6f0daa..e7613c0097 100644 --- a/tgui/src/interfaces/sleeper.ract +++ b/tgui/src/interfaces/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}} +{{#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/tgui/src/interfaces/smes.ract b/tgui/src/interfaces/smes.ract index 45982141f1..4b08535899 100644 --- a/tgui/src/interfaces/smes.ract +++ b/tgui/src/interfaces/smes.ract @@ -34,7 +34,7 @@ [{{data.capacityPercent >= 100 ? "Fully Charged" : data.inputting ? "Charging" : "Not Charging"}}]
    - {{Math.round(adata.inputLevel)}}W + {{adata.inputLevel_text}} @@ -44,7 +44,7 @@ - {{Math.round(adata.inputAvailable)}}W + {{adata.inputAvailable}}
    @@ -55,7 +55,7 @@ [{{data.outputting ? "Sending" : data.charge > 0 ? "Not Sending" : "No Charge"}}]
    - {{Math.round(adata.outputLevel)}}W + {{adata.outputLevel_text}} @@ -65,6 +65,6 @@ - {{Math.round(adata.outputUsed)}}W + {{adata.outputUsed}}
    diff --git a/tools/CreditsTool/remappings.txt b/tools/CreditsTool/remappings.txt new file mode 100644 index 0000000000..c7dc5ce0b0 --- /dev/null +++ b/tools/CreditsTool/remappings.txt @@ -0,0 +1,19 @@ +# To make your name something other than your github name type it in the format " +# e.g. +# Cyberboss Jordan Brown +# To suppress your name from appearing in the credits do " __REMOVE__ +# e.g. +# Cyberboss __REMOVE__ + +tgstation-server Thanks for playing! + +optimumtact oranges +qustinnus Floyd / Qustinnus +catalystfd __REMOVE__ +TheVekter Vekter +ChangelingRain Joan +NewSta1 NewSta +theOperand Miauw +PraiseRatvar Frozenguy5 +FuryMcFlurry Fury McFlurry +vuonojenmustaturska Naksu diff --git a/tools/github_webhook_processor.php b/tools/WebhookProcessor/github_webhook_processor.php similarity index 72% rename from tools/github_webhook_processor.php rename to tools/WebhookProcessor/github_webhook_processor.php index 4ccdafa3f3..dde21e4f43 100644 --- a/tools/github_webhook_processor.php +++ b/tools/WebhookProcessor/github_webhook_processor.php @@ -17,27 +17,24 @@ //CONFIG START (all defaults are random examples, do change them) //Use single quotes for config options that are strings. - -//Github lets you have it sign the message with a secret that you can validate. This prevents people from faking events. -//This var should match the secret you configured for this webhook on github. -//This is required as otherwise somebody could trick the script into leaking the api key. + +//These are all default settings that are described in secret.php $hookSecret = '08ajh0qj93209qj90jfq932j32r'; - -//Api key for pushing changelogs. $apiKey = '209ab8d879c0f987d06a09b9d879c0f987d06a09b9d8787d0a089c'; - -//servers to announce PRs to. +$repoOwnerAndName = "tgstation/tgstation"; $servers = array(); -/* -$servers[0] = array(); -$servers[0]['address'] = 'game.tgstation13.org'; -$servers[0]['port'] = '1337'; -$servers[0]['comskey'] = '89aj90cq2fm0amc90832mn9rm90'; -$servers[1] = array(); -$servers[1]['address'] = 'game.tgstation13.org'; -$servers[1]['port'] = '2337'; -$servers[1]['comskey'] = '89aj90cq2fm0amc90832mn9rm90'; -*/ +$enable_live_tracking = true; +$path_to_script = 'tools/WebhookProcessor/github_webhook_processor.php'; +$tracked_branch = "master"; +$trackPRBalance = true; +$prBalanceJson = ''; +$startingPRBalance = 3; +$maintainer_team_id = 133041; +$validation = "org"; +$validation_count = 1; +$tracked_branch = 'master'; + +require_once 'secret.php'; //CONFIG END set_error_handler(function($severity, $message, $file, $line) { @@ -138,7 +135,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 +165,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 +192,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': @@ -209,7 +212,10 @@ function handle_pr($payload) { } else { $action = 'merged'; + auto_update($payload); checkchangelog($payload, true, true); + update_pr_balance($payload); + $validated = TRUE; //pr merged events always get announced. } break; default: @@ -223,16 +229,147 @@ 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 auto_update($payload){ + global $enable_live_tracking; + global $path_to_script; + global $repoOwnerAndName; + global $tracked_branch; + if(!$enable_live_tracking || !has_tree_been_edited($payload, $path_to_script) || $payload['pull_request']['base']['ref'] != $tracked_branch) + return; + + $content = file_get_contents('https://raw.githubusercontent.com/' . $repoOwnerAndName . '/' . $tracked_branch . '/'. $path_to_script); + + create_comment($payload, "Edit detected. Self updating... Here is my new code:\n``" . "`HTML+PHP\n" . $content . "\n``" . '`'); + + $code_file = fopen(basename($path_to_script), 'w'); + fwrite($code_file, $content); + fclose($code_file); +} + +$github_diff = null; + function has_tree_been_edited($payload, $tree){ - //go to the diff url - $url = $payload['pull_request']['diff_url']; - $content = file_get_contents($url); + global $github_diff; + if ($github_diff === null) { + //go to the diff url + $url = $payload['pull_request']['diff_url']; + $github_diff = file_get_contents($url); + } //find things in the _maps/map_files tree //e.g. diff --git a/_maps/map_files/Cerestation/cerestation.dmm b/_maps/map_files/Cerestation/cerestation.dmm - return $content !== FALSE && strpos($content, 'diff --git a/' . $tree) !== FALSE; + return $github_diff !== FALSE && strpos($github_diff, 'diff --git a/' . $tree) !== FALSE; } function checkchangelog($payload, $merge = false, $compile = true) { diff --git a/tools/WebhookProcessor/secret.php b/tools/WebhookProcessor/secret.php new file mode 100644 index 0000000000..abea10564f --- /dev/null +++ b/tools/WebhookProcessor/secret.php @@ -0,0 +1,49 @@ +