Merge branch 'master' into upstream-merge-30297
This commit is contained in:
+43
-15
@@ -1,13 +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.1; The query to update the schema revision table is:
|
||||
The latest database version is 3.4; The query to update the schema revision table is:
|
||||
|
||||
INSERT INTO `schema_revision` (`major`, `minor`) VALUES (3, 1);
|
||||
INSERT INTO `schema_revision` (`major`, `minor`) VALUES (3, 4);
|
||||
or
|
||||
INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (3, 1);
|
||||
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.
|
||||
@@ -17,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?
|
||||
|
||||
@@ -336,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.)
|
||||
|
||||
----------------------------------------------------
|
||||
----------------------------------------------------
|
||||
@@ -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;
|
||||
@@ -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);
|
||||
@@ -254,10 +254,11 @@ CREATE TABLE `messages` (
|
||||
`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 */;
|
||||
|
||||
@@ -430,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 */;
|
||||
@@ -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`),
|
||||
@@ -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` (
|
||||
@@ -254,10 +254,11 @@ CREATE TABLE `SS13_messages` (
|
||||
`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 */;
|
||||
|
||||
@@ -430,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 */;
|
||||
@@ -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`),
|
||||
File diff suppressed because it is too large
Load Diff
@@ -24458,7 +24458,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;
|
||||
|
||||
@@ -53210,7 +53210,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";
|
||||
|
||||
@@ -29108,7 +29108,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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -13917,7 +13917,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
|
||||
|
||||
+148
-74
@@ -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) "(<a href='?_src_=holder;adminmoreinfo=\ref[user]'>?</a>)"
|
||||
#define ADMIN_FLW(user) "(<a href='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</a>)"
|
||||
#define ADMIN_PP(user) "(<a href='?_src_=holder;adminplayeropts=\ref[user]'>PP</a>)"
|
||||
#define ADMIN_VV(atom) "(<a href='?_src_=vars;Vars=\ref[atom]'>VV</a>)"
|
||||
#define ADMIN_SM(user) "(<a href='?_src_=holder;subtlemessage=\ref[user]'>SM</a>)"
|
||||
#define ADMIN_TP(user) "(<a href='?_src_=holder;traitor=\ref[user]'>TP</a>)"
|
||||
#define ADMIN_KICK(user) "(<a href='?_src_=holder;boot2=\ref[user]'>KICK</a>)"
|
||||
#define ADMIN_CENTCOM_REPLY(user) "(<a href='?_src_=holder;CentComReply=\ref[user]'>RPLY</a>)"
|
||||
#define ADMIN_SYNDICATE_REPLY(user) "(<a href='?_src_=holder;SyndicateReply=\ref[user]'>RPLY</a>)"
|
||||
#define ADMIN_SC(user) "(<a href='?_src_=holder;adminspawncookie=\ref[user]'>SC</a>)"
|
||||
#define ADMIN_SMITE(user) "(<a href='?_src_=holder;adminsmite=\ref[user]'>SMITE</a>)"
|
||||
#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 "(<a href='?_src_=holder;set_selfdestruct_code=1'>SETCODE</a>)"
|
||||
#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) "(<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)"
|
||||
#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) "(<a href='?_src_=holder;individuallog=\ref[user]'>LOGS</a>)"
|
||||
|
||||
#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) "(<a href='?_src_=holder;adminmoreinfo=\ref[user]'>?</a>)"
|
||||
#define ADMIN_FLW(user) "(<a href='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</a>)"
|
||||
#define ADMIN_PP(user) "(<a href='?_src_=holder;adminplayeropts=\ref[user]'>PP</a>)"
|
||||
#define ADMIN_VV(atom) "(<a href='?_src_=vars;Vars=\ref[atom]'>VV</a>)"
|
||||
#define ADMIN_SM(user) "(<a href='?_src_=holder;subtlemessage=\ref[user]'>SM</a>)"
|
||||
#define ADMIN_TP(user) "(<a href='?_src_=holder;traitor=\ref[user]'>TP</a>)"
|
||||
#define ADMIN_KICK(user) "(<a href='?_src_=holder;boot2=\ref[user]'>KICK</a>)"
|
||||
#define ADMIN_CENTCOM_REPLY(user) "(<a href='?_src_=holder;CentComReply=\ref[user]'>RPLY</a>)"
|
||||
#define ADMIN_SYNDICATE_REPLY(user) "(<a href='?_src_=holder;SyndicateReply=\ref[user]'>RPLY</a>)"
|
||||
#define ADMIN_SC(user) "(<a href='?_src_=holder;adminspawncookie=\ref[user]'>SC</a>)"
|
||||
#define ADMIN_SMITE(user) "(<a href='?_src_=holder;adminsmite=\ref[user]'>SMITE</a>)"
|
||||
#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 "(<a href='?_src_=holder;set_selfdestruct_code=1'>SETCODE</a>)"
|
||||
#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) "(<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)"
|
||||
#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) "(<a href='?_src_=holder;individuallog=\ref[user]'>LOGS</a>)"
|
||||
|
||||
#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) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminmoreinfo=\ref[user]'>?</a>)"
|
||||
#define ADMIN_FLW(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminplayerobservefollow=\ref[user]'>FLW</a>)"
|
||||
#define ADMIN_PP(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminplayeropts=\ref[user]'>PP</a>)"
|
||||
#define ADMIN_VV(atom) "(<a href='?_src_=vars;[HrefToken(TRUE)];Vars=\ref[atom]'>VV</a>)"
|
||||
#define ADMIN_SM(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];subtlemessage=\ref[user]'>SM</a>)"
|
||||
#define ADMIN_TP(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];traitor=\ref[user]'>TP</a>)"
|
||||
#define ADMIN_KICK(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];boot2=\ref[user]'>KICK</a>)"
|
||||
#define ADMIN_CENTCOM_REPLY(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];CentComReply=\ref[user]'>RPLY</a>)"
|
||||
#define ADMIN_SYNDICATE_REPLY(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];SyndicateReply=\ref[user]'>RPLY</a>)"
|
||||
#define ADMIN_SC(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminspawncookie=\ref[user]'>SC</a>)"
|
||||
#define ADMIN_SMITE(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminsmite=\ref[user]'>SMITE</a>)"
|
||||
#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 "(<a href='?_src_=holder;[HrefToken(TRUE)];set_selfdestruct_code=1'>SETCODE</a>)"
|
||||
#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) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)"
|
||||
#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) "(<a href='?_src_=holder;[HrefToken(TRUE)];individuallog=\ref[user]'>LOGS</a>)"
|
||||
|
||||
#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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
|
||||
#define islava(A) (istype(A, /turf/open/lava))
|
||||
|
||||
#define isplatingturf(A) (istype(A, /turf/open/floor/plating))
|
||||
|
||||
//Mobs
|
||||
#define isliving(A) (istype(A, /mob/living))
|
||||
|
||||
|
||||
@@ -458,3 +458,8 @@ GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE
|
||||
#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
|
||||
|
||||
@@ -154,3 +154,5 @@
|
||||
#define JUDGE_IGNOREMONKEYS 16
|
||||
|
||||
#define MEGAFAUNA_DEFAULT_RECOVERY_TIME 5
|
||||
|
||||
#define SHADOW_SPECIES_LIGHT_THRESHOLD 0.2
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
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."
|
||||
@@ -19,6 +22,16 @@
|
||||
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.'"
|
||||
@@ -30,4 +43,14 @@
|
||||
slot_flags = SLOT_BELT
|
||||
heat = 1500
|
||||
resistance_flags = FIRE_PROOF
|
||||
light_color = LIGHT_COLOR_FIRE
|
||||
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
|
||||
@@ -108,6 +108,8 @@ GLOBAL_PROTECT(config_dir)
|
||||
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
|
||||
@@ -280,6 +282,8 @@ GLOBAL_PROTECT(config_dir)
|
||||
|
||||
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)
|
||||
@@ -484,6 +488,10 @@ GLOBAL_PROTECT(config_dir)
|
||||
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")
|
||||
@@ -563,6 +571,8 @@ GLOBAL_PROTECT(config_dir)
|
||||
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]'")
|
||||
|
||||
+102
-102
@@ -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, "<span class='adminnotice'>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, "<span class='boldannounce'>Warning: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks. Automatic restart in [processing_interval] ticks.</span>")
|
||||
--defcon
|
||||
if(1)
|
||||
|
||||
to_chat(GLOB.admins, "<span class='boldannounce'>Warning: DEFCON [defcon_pretty()]. The Master Controller has still not fired within the last [(5-defcon) * processing_interval] ticks. Killing and restarting...</span>")
|
||||
--defcon
|
||||
var/rtn = Recreate_MC()
|
||||
if(rtn > 0)
|
||||
defcon = 4
|
||||
master_iteration = 0
|
||||
to_chat(GLOB.admins, "<span class='adminnotice'>MC restarted successfully</span>")
|
||||
else if(rtn < 0)
|
||||
log_game("FailSafe: Could not restart MC, runtime encountered. Entering defcon 0")
|
||||
to_chat(GLOB.admins, "<span class='boldannounce'>ERROR: DEFCON [defcon_pretty()]. Could not restart MC, runtime encountered. I will silently keep retrying.</span>")
|
||||
//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, "<span class='adminnotice'>MC restarted successfully</span>")
|
||||
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("<span class='adminnotice'>Notice: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks.</span>")
|
||||
--defcon
|
||||
if(2)
|
||||
to_chat(GLOB.admins, "<span class='boldannounce'>Warning: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks. Automatic restart in [processing_interval] ticks.</span>")
|
||||
--defcon
|
||||
if(1)
|
||||
|
||||
to_chat(GLOB.admins, "<span class='boldannounce'>Warning: DEFCON [defcon_pretty()]. The Master Controller has still not fired within the last [(5-defcon) * processing_interval] ticks. Killing and restarting...</span>")
|
||||
--defcon
|
||||
var/rtn = Recreate_MC()
|
||||
if(rtn > 0)
|
||||
defcon = 4
|
||||
master_iteration = 0
|
||||
to_chat(GLOB.admins, "<span class='adminnotice'>MC restarted successfully</span>")
|
||||
else if(rtn < 0)
|
||||
log_game("FailSafe: Could not restart MC, runtime encountered. Entering defcon 0")
|
||||
to_chat(GLOB.admins, "<span class='boldannounce'>ERROR: DEFCON [defcon_pretty()]. Could not restart MC, runtime encountered. I will silently keep retrying.</span>")
|
||||
//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, "<span class='adminnotice'>MC restarted successfully</span>")
|
||||
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])"))
|
||||
|
||||
@@ -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 = "<BR><A href='?src=\ref[src];forceevent=\ref[E]'>[E]</A>"
|
||||
dat = "<BR><A href='?src=\ref[src];[HrefToken()];forceevent=\ref[E]'>[E]</A>"
|
||||
if(E.holidayID)
|
||||
holiday += dat
|
||||
else if(E.wizardevent)
|
||||
|
||||
@@ -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, "<span class='warning'>Your hellish powers have been restored.")
|
||||
to_chat(owner.current, "<span class='warning'>Your hellish powers have been restored.</span>")
|
||||
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, "<span class='warning'>As punishment for your failures, all of your powers except contract creation have been revoked.")
|
||||
to_chat(owner.current, "<span class='warning'>As punishment for your failures, all of your powers except contract creation have been revoked.</span>")
|
||||
|
||||
/datum/antagonist/devil/proc/regress_humanoid()
|
||||
to_chat(owner.current, "<span class='warning'>Your powers weaken, have more contracts be signed to regain power.")
|
||||
to_chat(owner.current, "<span class='warning'>Your powers weaken, have more contracts be signed to regain power.</span>")
|
||||
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, "<span class='warning'>Your powers weaken, have more contracts be signed to regain power.")
|
||||
to_chat(D, "<span class='warning'>Your powers weaken, have more contracts be signed to regain power.</span>")
|
||||
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, "<span class='warning'>You feel as though your humanoid form is about to shed. You will soon turn into a blood lizard.")
|
||||
to_chat(owner.current, "<span class='warning'>You feel as though your humanoid form is about to shed. You will soon turn into a blood lizard.</span>")
|
||||
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, "<span class='warning'>You feel as though your current form is about to shed. You will soon turn into a true devil.")
|
||||
to_chat(owner.current, "<span class='warning'>You feel as though your current form is about to shed. You will soon turn into a true devil.</span>")
|
||||
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, "<span class='warning'>You feel as though your form is about to ascend.")
|
||||
to_chat(D, "<span class='warning'>You feel as though your form is about to ascend.</span>")
|
||||
sleep(50)
|
||||
if(!D)
|
||||
return
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
/datum/component/archaeology
|
||||
dupe_type = COMPONENT_DUPE_UNIQUE
|
||||
var/list/archdrops
|
||||
var/prob2drop
|
||||
var/dug
|
||||
|
||||
/datum/component/archaeology/Initialize(_prob2drop, list/_archdrops = list())
|
||||
prob2drop = Clamp(_prob2drop, 0, 100)
|
||||
archdrops = _archdrops
|
||||
RegisterSignal(COMSIG_PARENT_ATTACKBY,.proc/Dig)
|
||||
RegisterSignal(COMSIG_ATOM_EX_ACT, .proc/BombDig)
|
||||
RegisterSignal(COMSIG_ATOM_SING_PULL, .proc/SingDig)
|
||||
|
||||
/datum/component/archaeology/InheritComponent(datum/component/archaeology/A, i_am_original)
|
||||
var/list/other_archdrops = A.archdrops
|
||||
var/list/_archdrops = archdrops
|
||||
for(var/I in other_archdrops)
|
||||
_archdrops[I] += other_archdrops[I]
|
||||
|
||||
/datum/component/archaeology/proc/Dig(mob/user, obj/item/W)
|
||||
if(dug)
|
||||
to_chat(user, "<span class='notice'>Looks like someone has dug here already.</span>")
|
||||
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, "<span class='notice'>You start digging...</span>")
|
||||
playsound(parent, 'sound/effects/shovel_dig.ogg', 50, 1)
|
||||
|
||||
if(do_after(user, digging_speed, target = parent))
|
||||
to_chat(user, "<span class='notice'>You dig a hole.</span>")
|
||||
gets_dug()
|
||||
dug = TRUE
|
||||
SSblackbox.add_details("pick_used_mining",W.type)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/component/archaeology/proc/gets_dug()
|
||||
if(dug)
|
||||
return
|
||||
else
|
||||
var/turf/open/OT = get_turf(parent)
|
||||
for(var/thing in archdrops)
|
||||
var/maxtodrop = archdrops[thing]
|
||||
for(var/i in 1 to maxtodrop)
|
||||
if(prob(prob2drop)) // can't win them all!
|
||||
new thing(OT)
|
||||
|
||||
if(isopenturf(OT))
|
||||
if(OT.postdig_icon_change)
|
||||
if(istype(OT, /turf/open/floor/plating/asteroid/) && !OT.postdig_icon)
|
||||
var/turf/open/floor/plating/asteroid/AOT = parent
|
||||
AOT.icon_plating = "[AOT.environment_type]_dug"
|
||||
AOT.icon_state = "[AOT.environment_type]_dug"
|
||||
else
|
||||
if(isplatingturf(OT))
|
||||
var/turf/open/floor/plating/POT = parent
|
||||
POT.icon_plating = "[POT.postdig_icon]"
|
||||
OT.icon_state = "[OT.postdig_icon]"
|
||||
|
||||
if(OT.slowdown) //Things like snow slow you down until you dig them.
|
||||
OT.slowdown = 0
|
||||
dug = TRUE
|
||||
|
||||
/datum/component/archaeology/proc/SingDig(S, current_size)
|
||||
switch(current_size)
|
||||
if(STAGE_THREE)
|
||||
if(prob(30))
|
||||
gets_dug()
|
||||
if(STAGE_FOUR)
|
||||
if(prob(50))
|
||||
gets_dug()
|
||||
else
|
||||
if(current_size >= STAGE_FIVE && prob(70))
|
||||
gets_dug()
|
||||
|
||||
/datum/component/archaeology/proc/BombDig(severity, target)
|
||||
switch(severity)
|
||||
if(3)
|
||||
return
|
||||
if(2)
|
||||
if(prob(20))
|
||||
gets_dug()
|
||||
if(1)
|
||||
gets_dug()
|
||||
+1159
-1138
File diff suppressed because it is too large
Load Diff
@@ -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")
|
||||
|
||||
+1
-1
@@ -311,7 +311,7 @@
|
||||
traitor_mob.mind.store_memory("<B>Radio Frequency:</B> [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("<B>Uplink Passcode:</B> [PDA.lock_code] ([PDA.name]).")
|
||||
|
||||
@@ -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!"
|
||||
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?"
|
||||
|
||||
@@ -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
|
||||
|
||||
+7
-6
@@ -304,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
|
||||
@@ -468,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
|
||||
@@ -613,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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
if (active)
|
||||
E.sight_flags ^= SEE_MOBS | SEE_OBJS | SEE_TURFS
|
||||
else
|
||||
E.flash_protect = 0
|
||||
user.update_sight()
|
||||
@@ -247,7 +247,7 @@
|
||||
|
||||
|
||||
/obj/item/gun/magic/tentacle/shoot_with_empty_chamber(mob/living/user as mob|obj)
|
||||
to_chat(user, "<span class='warning'>The [name] is not ready yet.<span>")
|
||||
to_chat(user, "<span class='warning'>The [name] is not ready yet.</span>")
|
||||
|
||||
/obj/item/gun/magic/tentacle/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] coils [src] tightly around [user.p_their()] neck! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
@@ -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, "<span class='danger'>You can't seem to pry [I] off [C]'s hands!<span>")
|
||||
to_chat(firer, "<span class='danger'>You can't seem to pry [I] off [C]'s hands!</span>")
|
||||
return 0
|
||||
else
|
||||
to_chat(firer, "<span class='danger'>[C] has nothing in hand to disarm!<span>")
|
||||
to_chat(firer, "<span class='danger'>[C] has nothing in hand to disarm!</span>")
|
||||
return 0
|
||||
|
||||
if(INTENT_GRAB)
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
if(!selected_dna)
|
||||
return
|
||||
if(NOTRANSSTING in selected_dna.dna.species.species_traits)
|
||||
to_chat(user, "<span class = 'notice'>That DNA is not compatible with changeling retrovirus!")
|
||||
to_chat(user, "<span class = 'notice'>That DNA is not compatible with changeling retrovirus!</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
to_chat(user, "<span class='inathneq'>An emergency shuttle has arrived and this prism is no longer useful; attempt to activate it to gain a partial refund of components used.</span>")
|
||||
else
|
||||
var/efficiency = get_efficiency_mod(TRUE)
|
||||
to_chat(user, "<span class='inathneq_small'>It requires at least <b>[get_delay_cost()]W</b> of power to attempt to delay the arrival of an emergency shuttle by <b>[2 * efficiency]</b> minutes.</span>")
|
||||
to_chat(user, "<span class='inathneq_small'>This cost increases by <b>[delay_cost_increase]W</b> for every previous activation.</span>")
|
||||
to_chat(user, "<span class='inathneq_small'>It requires at least <b>[DisplayPower(get_delay_cost())]</b> of power to attempt to delay the arrival of an emergency shuttle by <b>[2 * efficiency]</b> minutes.</span>")
|
||||
to_chat(user, "<span class='inathneq_small'>This cost increases by <b>[DisplayPower(delay_cost_increase)]</b> for every previous activation.</span>")
|
||||
|
||||
/obj/structure/destructible/clockwork/powered/prolonging_prism/forced_disable(bad_effects)
|
||||
if(active)
|
||||
@@ -126,7 +126,7 @@
|
||||
if(!hex_combo)
|
||||
hex_combo = mutable_appearance('icons/effects/64x64.dmi', n, RIPPLE_LAYER)
|
||||
else
|
||||
hex_combo.overlays += mutable_appearance('icons/effects/64x64.dmi', n, RIPPLE_LAYER)
|
||||
hex_combo.add_overlay(mutable_appearance('icons/effects/64x64.dmi', n, RIPPLE_LAYER))
|
||||
if(hex_combo) //YOU BUILT A HEXAGON
|
||||
hex_combo.pixel_x = -16
|
||||
hex_combo.pixel_y = -16
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
to_chat(mob, "<span class='userdanger'>Unfortunately, you weren't able to get a [item_name]. This is very bad and you should adminhelp immediately (press F1).</span>")
|
||||
return 0
|
||||
else
|
||||
to_chat(mob, "<span class='danger'>You have a [item_name] in your [where].")
|
||||
to_chat(mob, "<span class='danger'>You have a [item_name] in your [where].</span>")
|
||||
if(where == "backpack")
|
||||
var/obj/item/storage/B = mob.back
|
||||
B.orient2hud(mob)
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
if(B.current)
|
||||
B.current.update_action_buttons_icon()
|
||||
if(!B.current.incapacitated())
|
||||
to_chat(B.current,"<span class='cultlarge'>[Nominee] has died in the process of attempting to win the cult's support!")
|
||||
to_chat(B.current,"<span class='cultlarge'>[Nominee] has died in the process of attempting to win the cult's support!</span>")
|
||||
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,"<span class='cultlarge'>[Nominee] has gone catatonic in the process of attempting to win the cult's support!")
|
||||
to_chat(B.current,"<span class='cultlarge'>[Nominee] has gone catatonic in the process of attempting to win the cult's support!</span>")
|
||||
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, "<span class='cultlarge'>[Nominee] could not win the cult's support and shall continue to serve as an acolyte.")
|
||||
to_chat(B.current, "<span class='cultlarge'>[Nominee] could not win the cult's support and shall continue to serve as an acolyte.</span>")
|
||||
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,"<span class='cultlarge'>[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,"<span class='cultlarge'>[Nominee] has won the cult's support and is now their master. Follow [Nominee.p_their()] orders to the best of your ability!</span>")
|
||||
return TRUE
|
||||
|
||||
/datum/action/innate/cult/master/IsAvailable()
|
||||
|
||||
@@ -257,10 +257,8 @@ This file contains the arcane tome files.
|
||||
to_chat(user, "<span class='cult'>There is already a rune here.</span>")
|
||||
return FALSE
|
||||
|
||||
|
||||
if(!(T.z in GLOB.station_z_levels) && T.z != ZLEVEL_MINING)
|
||||
to_chat(user, "<span class='warning'>The veil is not weak enough here.</span>")
|
||||
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
@@ -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/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)
|
||||
|
||||
@@ -534,7 +533,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
if(!(AA.z in GLOB.station_z_levels))
|
||||
continue
|
||||
AA.emagged = TRUE
|
||||
to_chat(owner, "<span class='notice'>All air alarm safeties on the station have been overriden. Air alarms may now use the Flood environmental mode.")
|
||||
to_chat(owner, "<span class='notice'>All air alarm safeties on the station have been overriden. Air alarms may now use the Flood environmental mode.</span>")
|
||||
owner.playsound_local(owner, 'sound/machines/terminal_off.ogg', 50, 0)
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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, "<span class='warning'>[src]'s door won't budge!</span>")
|
||||
|
||||
/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, "<span class='notice'>You lean on the back of [src] and start pushing the door open... (this will take about a minute.)</span>")
|
||||
user.visible_message("<span class='italics'>You hear a metallic creaking from [src]!</span>")
|
||||
|
||||
if(do_after(user,(breakout_time), target = src))
|
||||
user.visible_message("<span class='notice'>You see [user] kicking against the door of [src]!</span>", \
|
||||
"<span class='notice'>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"].)</span>", \
|
||||
"<span class='italics'>You hear a metallic creaking from [src].</span>")
|
||||
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("<span class='warning'>[user] successfully broke out of [src]!</span>")
|
||||
to_chat(user, "<span class='notice'>You successfully break out of [src]!</span>")
|
||||
|
||||
user.visible_message("<span class='warning'>[user] successfully broke out of [src]!</span>", \
|
||||
"<span class='notice'>You successfully break out of [src]!</span>")
|
||||
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"
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
/datum/game_mode/monkey/proc/greet_carrier(datum/mind/carrier)
|
||||
to_chat(carrier.current, "<B><span class='notice'>You are the Jungle Fever patient zero!!</B>")
|
||||
to_chat(carrier.current, "<B><span class='notice'>You are the Jungle Fever patient zero!!</B></span>")
|
||||
to_chat(carrier.current, "<b>You have been planted onto this station by the Animal Rights Consortium.</b>")
|
||||
to_chat(carrier.current, "<b>Soon the disease will transform you into an ape. Afterwards, you will be able spread the infection to others with a bite.</b>")
|
||||
to_chat(carrier.current, "<b>While your infection strain is undetectable by scanners, any other infectees will show up on medical equipment.</b>")
|
||||
|
||||
@@ -325,7 +325,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)
|
||||
|
||||
@@ -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)
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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("<span class='notice'>[user] [active ? "" : "de"]activates their pinpointer.</span>", "<span class='notice'>You [active ? "" : "de"]activate your pinpointer.</span>")
|
||||
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("<span class='notice'>[user] tunes [src] to [I].</span>", "<span class='notice'>You fine-tune [src]'s tracking to track [I].</span>")
|
||||
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, "<span class='userdanger'>Your [name] vibrates and lets out a tinny alarm. Uh oh.</span>")
|
||||
|
||||
/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, "<span class='userdanger'>Your [name] vibrates and lets out a tinny alarm. Uh oh.</span>")
|
||||
|
||||
/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, "<span class='userdanger'>Your [name] beeps as it reconfigures its tracking algorithms.</span>")
|
||||
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
|
||||
..()
|
||||
|
||||
|
||||
@@ -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, "<span class='userdanger'>Your [name] vibrates and lets out a tinny alarm. Uh oh.</span>")
|
||||
|
||||
-
|
||||
/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"
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -24,7 +24,7 @@
|
||||
name = "motion-sensitive security camera"
|
||||
|
||||
/obj/machinery/camera/motion/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
upgradeMotion()
|
||||
|
||||
// ALL UPGRADES
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -1,86 +1,86 @@
|
||||
/obj/machinery/computer/atmos_alert
|
||||
name = "atmospheric alert console"
|
||||
desc = "Used to monitor the station's air alarms."
|
||||
circuit = /obj/item/circuitboard/computer/atmos_alert
|
||||
icon_screen = "alert:0"
|
||||
icon_keyboard = "atmos_key"
|
||||
var/list/priority_alarms = list()
|
||||
var/list/minor_alarms = list()
|
||||
var/receive_frequency = 1437
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
|
||||
/obj/machinery/computer/atmos_alert/Initialize()
|
||||
..()
|
||||
set_frequency(receive_frequency)
|
||||
|
||||
/obj/machinery/computer/atmos_alert/Destroy()
|
||||
/obj/machinery/computer/atmos_alert
|
||||
name = "atmospheric alert console"
|
||||
desc = "Used to monitor the station's air alarms."
|
||||
circuit = /obj/item/circuitboard/computer/atmos_alert
|
||||
icon_screen = "alert:0"
|
||||
icon_keyboard = "atmos_key"
|
||||
var/list/priority_alarms = list()
|
||||
var/list/minor_alarms = list()
|
||||
var/receive_frequency = 1437
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
|
||||
/obj/machinery/computer/atmos_alert/Initialize()
|
||||
. = ..()
|
||||
set_frequency(receive_frequency)
|
||||
|
||||
/obj/machinery/computer/atmos_alert/Destroy()
|
||||
SSradio.remove_object(src, receive_frequency)
|
||||
return ..()
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/atmos_alert/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_alert", name, 350, 300, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/atmos_alert/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
|
||||
data["priority"] = list()
|
||||
for(var/zone in priority_alarms)
|
||||
data["priority"] += zone
|
||||
data["minor"] = list()
|
||||
for(var/zone in minor_alarms)
|
||||
data["minor"] += zone
|
||||
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/atmos_alert/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
switch(action)
|
||||
if("clear")
|
||||
var/zone = params["zone"]
|
||||
if(zone in priority_alarms)
|
||||
to_chat(usr, "Priority alarm for [zone] cleared.")
|
||||
priority_alarms -= zone
|
||||
. = TRUE
|
||||
if(zone in minor_alarms)
|
||||
to_chat(usr, "Minor alarm for [zone] cleared.")
|
||||
minor_alarms -= zone
|
||||
. = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/computer/atmos_alert/proc/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, receive_frequency)
|
||||
receive_frequency = new_frequency
|
||||
radio_connection = SSradio.add_object(src, receive_frequency, GLOB.RADIO_ATMOSIA)
|
||||
|
||||
/obj/machinery/computer/atmos_alert/receive_signal(datum/signal/signal)
|
||||
if(!signal || signal.encryption) return
|
||||
|
||||
var/zone = signal.data["zone"]
|
||||
var/severity = signal.data["alert"]
|
||||
|
||||
if(!zone || !severity) return
|
||||
|
||||
minor_alarms -= zone
|
||||
priority_alarms -= zone
|
||||
if(severity == "severe")
|
||||
priority_alarms += zone
|
||||
else if (severity == "minor")
|
||||
minor_alarms += zone
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/atmos_alert/update_icon()
|
||||
..()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(priority_alarms.len)
|
||||
add_overlay("alert:2")
|
||||
else if(minor_alarms.len)
|
||||
add_overlay("alert:1")
|
||||
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_alert", name, 350, 300, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/atmos_alert/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
|
||||
data["priority"] = list()
|
||||
for(var/zone in priority_alarms)
|
||||
data["priority"] += zone
|
||||
data["minor"] = list()
|
||||
for(var/zone in minor_alarms)
|
||||
data["minor"] += zone
|
||||
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/atmos_alert/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
switch(action)
|
||||
if("clear")
|
||||
var/zone = params["zone"]
|
||||
if(zone in priority_alarms)
|
||||
to_chat(usr, "Priority alarm for [zone] cleared.")
|
||||
priority_alarms -= zone
|
||||
. = TRUE
|
||||
if(zone in minor_alarms)
|
||||
to_chat(usr, "Minor alarm for [zone] cleared.")
|
||||
minor_alarms -= zone
|
||||
. = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/computer/atmos_alert/proc/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, receive_frequency)
|
||||
receive_frequency = new_frequency
|
||||
radio_connection = SSradio.add_object(src, receive_frequency, GLOB.RADIO_ATMOSIA)
|
||||
|
||||
/obj/machinery/computer/atmos_alert/receive_signal(datum/signal/signal)
|
||||
if(!signal || signal.encryption) return
|
||||
|
||||
var/zone = signal.data["zone"]
|
||||
var/severity = signal.data["alert"]
|
||||
|
||||
if(!zone || !severity) return
|
||||
|
||||
minor_alarms -= zone
|
||||
priority_alarms -= zone
|
||||
if(severity == "severe")
|
||||
priority_alarms += zone
|
||||
else if (severity == "minor")
|
||||
minor_alarms += zone
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/atmos_alert/update_icon()
|
||||
..()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(priority_alarms.len)
|
||||
add_overlay("alert:2")
|
||||
else if(minor_alarms.len)
|
||||
add_overlay("alert:1")
|
||||
|
||||
@@ -1,230 +1,230 @@
|
||||
/////////////////////////////////////////////////////////////
|
||||
// AIR SENSOR (found in gas tanks)
|
||||
/////////////////////////////////////////////////////////////
|
||||
|
||||
/obj/machinery/air_sensor
|
||||
name = "gas sensor"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "gsensor1"
|
||||
/////////////////////////////////////////////////////////////
|
||||
// AIR SENSOR (found in gas tanks)
|
||||
/////////////////////////////////////////////////////////////
|
||||
|
||||
/obj/machinery/air_sensor
|
||||
name = "gas sensor"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "gsensor1"
|
||||
anchored = TRUE
|
||||
|
||||
var/on = TRUE
|
||||
|
||||
var/id_tag
|
||||
var/frequency = 1441
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
/obj/machinery/air_sensor/update_icon()
|
||||
icon_state = "gsensor[on]"
|
||||
|
||||
/obj/machinery/air_sensor/process_atmos()
|
||||
if(on)
|
||||
var/datum/signal/signal = new
|
||||
var/datum/gas_mixture/air_sample = return_air()
|
||||
|
||||
signal.transmission_method = 1 //radio signal
|
||||
signal.data = list(
|
||||
"sigtype" = "status",
|
||||
"id_tag" = id_tag,
|
||||
"timestamp" = world.time,
|
||||
"pressure" = air_sample.return_pressure(),
|
||||
"temperature" = air_sample.temperature,
|
||||
"gases" = list()
|
||||
)
|
||||
var/total_moles = air_sample.total_moles()
|
||||
if(total_moles)
|
||||
for(var/gas_id in air_sample.gases)
|
||||
var/gas_name = air_sample.gases[gas_id][GAS_META][META_GAS_NAME]
|
||||
signal.data["gases"][gas_name] = air_sample.gases[gas_id][MOLES] / total_moles * 100
|
||||
|
||||
radio_connection.post_signal(src, signal, filter = GLOB.RADIO_ATMOSIA)
|
||||
|
||||
|
||||
/obj/machinery/air_sensor/proc/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = SSradio.add_object(src, frequency, GLOB.RADIO_ATMOSIA)
|
||||
|
||||
/obj/machinery/air_sensor/Initialize()
|
||||
..()
|
||||
SSair.atmos_machinery += src
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/machinery/air_sensor/Destroy()
|
||||
SSair.atmos_machinery -= src
|
||||
|
||||
var/on = TRUE
|
||||
|
||||
var/id_tag
|
||||
var/frequency = 1441
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
/obj/machinery/air_sensor/update_icon()
|
||||
icon_state = "gsensor[on]"
|
||||
|
||||
/obj/machinery/air_sensor/process_atmos()
|
||||
if(on)
|
||||
var/datum/signal/signal = new
|
||||
var/datum/gas_mixture/air_sample = return_air()
|
||||
|
||||
signal.transmission_method = 1 //radio signal
|
||||
signal.data = list(
|
||||
"sigtype" = "status",
|
||||
"id_tag" = id_tag,
|
||||
"timestamp" = world.time,
|
||||
"pressure" = air_sample.return_pressure(),
|
||||
"temperature" = air_sample.temperature,
|
||||
"gases" = list()
|
||||
)
|
||||
var/total_moles = air_sample.total_moles()
|
||||
if(total_moles)
|
||||
for(var/gas_id in air_sample.gases)
|
||||
var/gas_name = air_sample.gases[gas_id][GAS_META][META_GAS_NAME]
|
||||
signal.data["gases"][gas_name] = air_sample.gases[gas_id][MOLES] / total_moles * 100
|
||||
|
||||
radio_connection.post_signal(src, signal, filter = GLOB.RADIO_ATMOSIA)
|
||||
|
||||
|
||||
/obj/machinery/air_sensor/proc/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, frequency)
|
||||
return ..()
|
||||
|
||||
/////////////////////////////////////////////////////////////
|
||||
// GENERAL AIR CONTROL (a.k.a atmos computer)
|
||||
/////////////////////////////////////////////////////////////
|
||||
|
||||
/obj/machinery/computer/atmos_control
|
||||
frequency = new_frequency
|
||||
radio_connection = SSradio.add_object(src, frequency, GLOB.RADIO_ATMOSIA)
|
||||
|
||||
/obj/machinery/air_sensor/Initialize()
|
||||
. = ..()
|
||||
SSair.atmos_machinery += src
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/machinery/air_sensor/Destroy()
|
||||
SSair.atmos_machinery -= src
|
||||
SSradio.remove_object(src, frequency)
|
||||
return ..()
|
||||
|
||||
/////////////////////////////////////////////////////////////
|
||||
// GENERAL AIR CONTROL (a.k.a atmos computer)
|
||||
/////////////////////////////////////////////////////////////
|
||||
|
||||
/obj/machinery/computer/atmos_control
|
||||
name = "atmospherics monitoring"
|
||||
desc = "Used to monitor the station's atmospherics sensors."
|
||||
icon_screen = "tank"
|
||||
icon_keyboard = "atmos_key"
|
||||
circuit = /obj/item/circuitboard/computer/atmos_control
|
||||
|
||||
var/frequency = 1441
|
||||
var/list/sensors = list(
|
||||
"n2_sensor" = "Nitrogen Tank",
|
||||
"o2_sensor" = "Oxygen Tank",
|
||||
"co2_sensor" = "Carbon Dioxide Tank",
|
||||
"tox_sensor" = "Plasma Tank",
|
||||
"n2o_sensor" = "Nitrous Oxide Tank",
|
||||
"air_sensor" = "Mixed Air Tank",
|
||||
"mix_sensor" = "Mix Tank",
|
||||
"distro_meter" = "Distribution Loop",
|
||||
"waste_meter" = "Waste Loop",
|
||||
)
|
||||
var/list/sensor_information = list()
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
|
||||
/obj/machinery/computer/atmos_control/Initialize()
|
||||
..()
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/machinery/computer/atmos_control/Destroy()
|
||||
desc = "Used to monitor the station's atmospherics sensors."
|
||||
icon_screen = "tank"
|
||||
icon_keyboard = "atmos_key"
|
||||
circuit = /obj/item/circuitboard/computer/atmos_control
|
||||
|
||||
var/frequency = 1441
|
||||
var/list/sensors = list(
|
||||
"n2_sensor" = "Nitrogen Tank",
|
||||
"o2_sensor" = "Oxygen Tank",
|
||||
"co2_sensor" = "Carbon Dioxide Tank",
|
||||
"tox_sensor" = "Plasma Tank",
|
||||
"n2o_sensor" = "Nitrous Oxide Tank",
|
||||
"air_sensor" = "Mixed Air Tank",
|
||||
"mix_sensor" = "Mix Tank",
|
||||
"distro_meter" = "Distribution Loop",
|
||||
"waste_meter" = "Waste Loop",
|
||||
)
|
||||
var/list/sensor_information = list()
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
|
||||
/obj/machinery/computer/atmos_control/Initialize()
|
||||
..()
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/machinery/computer/atmos_control/Destroy()
|
||||
SSradio.remove_object(src, frequency)
|
||||
return ..()
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/atmos_control/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, 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, "<span class='alert'>No machinery detected.</span>")
|
||||
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, "<span class='alert'>No machinery detected.</span>")
|
||||
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)
|
||||
|
||||
@@ -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, "<span class='notice'>You lean on the back of [src] and start pushing the door open... (this will take about [breakout_time] minutes.)</span>")
|
||||
user.visible_message("<span class='italics'>You hear a metallic creaking from [src]!</span>")
|
||||
|
||||
user.visible_message("<span class='notice'>You see [user] kicking against the door of [src]!</span>", \
|
||||
"<span class='notice'>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"].)</span>", \
|
||||
"<span class='italics'>You hear a metallic creaking from [src].</span>")
|
||||
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("<span class='warning'>[user] successfully broke out of [src]!</span>")
|
||||
to_chat(user, "<span class='notice'>You successfully break out of [src]!</span>")
|
||||
|
||||
user.visible_message("<span class='warning'>[user] successfully broke out of [src]!</span>", \
|
||||
"<span class='notice'>You successfully break out of [src]!</span>")
|
||||
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, "<span class='warning'>[src]'s door won't budge!</span>")
|
||||
return
|
||||
|
||||
open_machine()
|
||||
return
|
||||
|
||||
/obj/machinery/dna_scannernew/attackby(obj/item/I, mob/user, params)
|
||||
|
||||
|
||||
@@ -1157,7 +1157,7 @@
|
||||
charge = C
|
||||
else if(istype(C, /obj/item/paper) || istype(C, /obj/item/photo))
|
||||
if(note)
|
||||
to_chat(user, "<span class='warning'>There's already something pinned to this airlock! Use wirecutters to remove it.<spa>")
|
||||
to_chat(user, "<span class='warning'>There's already something pinned to this airlock! Use wirecutters to remove it.</span>")
|
||||
return
|
||||
if(!user.transferItemToLoc(C, src))
|
||||
to_chat(user, "<span class='warning'>For some reason, you can't attach [C]!</span>")
|
||||
|
||||
@@ -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, "<span class='warning'>[src] is locked!</span>")
|
||||
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, "<span class='warning'>[src]'s door won't budge!</span>")
|
||||
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, "<span class='notice'>You lean on the back of [src] and start pushing the door open... (this will take about a minute.)</span>")
|
||||
user.visible_message("<span class='italics'>You hear a metallic creaking from [src]!</span>")
|
||||
|
||||
if(do_after(user,(breakout_time), target = src))
|
||||
user.visible_message("<span class='notice'>You see [user] kicking against the door of [src]!</span>", \
|
||||
"<span class='notice'>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"].)</span>", \
|
||||
"<span class='italics'>You hear a metallic creaking from [src].</span>")
|
||||
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("<span class='warning'>[user] successfully broke out of [src]!</span>")
|
||||
to_chat(user, "<span class='notice'>You successfully break out of [src]!</span>")
|
||||
|
||||
user.visible_message("<span class='warning'>[user] successfully broke out of [src]!</span>", \
|
||||
"<span class='notice'>You successfully break out of [src]!</span>")
|
||||
open_machine()
|
||||
|
||||
/obj/machinery/gulag_teleporter/proc/locate_reclaimer()
|
||||
|
||||
@@ -221,7 +221,7 @@
|
||||
if(!isturf(user.loc)) //no setting up in a locker
|
||||
return
|
||||
add_fingerprint(user)
|
||||
user.visible_message("<span class='notice'>[user] starts setting down [src]...", "You start setting up [pad]...")
|
||||
user.visible_message("<span class='notice'>[user] starts setting down [src]...", "You start setting up [pad]...</span>")
|
||||
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
|
||||
. = TRUE
|
||||
|
||||
@@ -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, "<span class='warning'>The unit's doors are shut!</span>")
|
||||
return
|
||||
if(!is_operational())
|
||||
to_chat(user, "<span class='warning'>The unit is not operational!</span>")
|
||||
return
|
||||
if(occupant || helmet || suit || storage)
|
||||
to_chat(user, "<span class='warning'>It's too cluttered inside to fit in!</span>")
|
||||
return
|
||||
|
||||
if(target == user)
|
||||
user.visible_message("<span class='warning'>[user] starts squeezing into [src]!</span>", "<span class='notice'>You start working your way into [src]...</span>")
|
||||
else
|
||||
target.visible_message("<span class='warning'>[user] starts shoving [target] into [src]!</span>", "<span class='userdanger'>[user] starts shoving you into [src]!</span>")
|
||||
|
||||
if(do_mob(user, target, 30))
|
||||
if(occupant || helmet || suit || storage)
|
||||
return
|
||||
if(target == user)
|
||||
user.visible_message("<span class='warning'>[user] slips into [src] and closes the door behind them!</span>", "<span class=notice'>You slip into [src]'s cramped space and shut its door.</span>")
|
||||
else
|
||||
target.visible_message("<span class='warning'>[user] pushes [target] into [src] and shuts its door!<span>", "<span class='userdanger'>[user] shoves you into [src] and shuts the door!</span>")
|
||||
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("<span class='warning'>[src]'s door creaks open with a loud whining noise. A cloud of foul black smoke escapes from its chamber.</span>")
|
||||
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("<span class='notice'>[src]'s door slides open. The glowing yellow lights dim to a gentle green.</span>")
|
||||
else
|
||||
visible_message("<span class='warning'>[src]'s door slides open, barraging you with the nauseating smell of charred flesh.</span>")
|
||||
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("<span class='notice'>You see [user] kicking against the doors of [src]!</span>", "<span class='notice'>You start kicking against the doors...</span>")
|
||||
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("<span class='notice'>You see [user] bursts out of [src]!</span>", "<span class='notice'>You escape the cramped confines of [src]!</span>")
|
||||
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, "<span class='warning'>The unit already contains a suit!.</span>")
|
||||
return
|
||||
if(!user.drop_item())
|
||||
return
|
||||
suit = I
|
||||
else if(istype(I, /obj/item/clothing/head/helmet))
|
||||
if(helmet)
|
||||
to_chat(user, "<span class='warning'>The unit already contains a helmet!</span>")
|
||||
return
|
||||
if(!user.drop_item())
|
||||
return
|
||||
helmet = I
|
||||
else if(istype(I, /obj/item/clothing/mask))
|
||||
if(mask)
|
||||
to_chat(user, "<span class='warning'>The unit already contains a mask!</span>")
|
||||
return
|
||||
if(!user.drop_item())
|
||||
return
|
||||
mask = I
|
||||
else
|
||||
if(storage)
|
||||
to_chat(user, "<span class='warning'>The auxiliary storage compartment is full!</span>")
|
||||
return
|
||||
if(!user.drop_item())
|
||||
return
|
||||
storage = I
|
||||
|
||||
I.loc = src
|
||||
visible_message("<span class='notice'>[user] inserts [I] into [src]</span>", "<span class='notice'>You load [I] into [src].</span>")
|
||||
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, "<span class='warning'>The unit's doors are shut!</span>")
|
||||
return
|
||||
if(!is_operational())
|
||||
to_chat(user, "<span class='warning'>The unit is not operational!</span>")
|
||||
return
|
||||
if(occupant || helmet || suit || storage)
|
||||
to_chat(user, "<span class='warning'>It's too cluttered inside to fit in!</span>")
|
||||
return
|
||||
|
||||
if(target == user)
|
||||
user.visible_message("<span class='warning'>[user] starts squeezing into [src]!</span>", "<span class='notice'>You start working your way into [src]...</span>")
|
||||
else
|
||||
target.visible_message("<span class='warning'>[user] starts shoving [target] into [src]!</span>", "<span class='userdanger'>[user] starts shoving you into [src]!</span>")
|
||||
|
||||
if(do_mob(user, target, 30))
|
||||
if(occupant || helmet || suit || storage)
|
||||
return
|
||||
if(target == user)
|
||||
user.visible_message("<span class='warning'>[user] slips into [src] and closes the door behind them!</span>", "<span class=notice'>You slip into [src]'s cramped space and shut its door.</span>")
|
||||
else
|
||||
target.visible_message("<span class='warning'>[user] pushes [target] into [src] and shuts its door!<span>", "<span class='userdanger'>[user] shoves you into [src] and shuts the door!</span>")
|
||||
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("<span class='warning'>[src]'s door creaks open with a loud whining noise. A cloud of foul black smoke escapes from its chamber.</span>")
|
||||
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("<span class='notice'>[src]'s door slides open. The glowing yellow lights dim to a gentle green.</span>")
|
||||
else
|
||||
visible_message("<span class='warning'>[src]'s door slides open, barraging you with the nauseating smell of charred flesh.</span>")
|
||||
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, "<span class='warning'>[src]'s door won't budge!</span>")
|
||||
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("<span class='notice'>You see [user] kicking against the doors of [src]!</span>", \
|
||||
"<span class='notice'>You start kicking against the doors... (this will take about [(breakout_time<1) ? "[breakout_time*60] seconds" : "[breakout_time] minute\s"].)</span>", \
|
||||
"<span class='italics'>You hear a thump from [src].</span>")
|
||||
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("<span class='warning'>[user] successfully broke out of [src]!</span>", \
|
||||
"<span class='notice'>You successfully break out of [src]!</span>")
|
||||
open_machine()
|
||||
dump_contents()
|
||||
|
||||
add_fingerprint(user)
|
||||
if(locked)
|
||||
visible_message("<span class='notice'>You see [user] kicking against the doors of [src]!</span>", \
|
||||
"<span class='notice'>You start kicking against the doors...</span>")
|
||||
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("<span class='notice'>You see [user] bursts out of [src]!</span>", \
|
||||
"<span class='notice'>You escape the cramped confines of [src]!</span>")
|
||||
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, "<span class='warning'>The unit already contains a suit!.</span>")
|
||||
return
|
||||
if(!user.drop_item())
|
||||
return
|
||||
suit = I
|
||||
else if(istype(I, /obj/item/clothing/head/helmet))
|
||||
if(helmet)
|
||||
to_chat(user, "<span class='warning'>The unit already contains a helmet!</span>")
|
||||
return
|
||||
if(!user.drop_item())
|
||||
return
|
||||
helmet = I
|
||||
else if(istype(I, /obj/item/clothing/mask))
|
||||
if(mask)
|
||||
to_chat(user, "<span class='warning'>The unit already contains a mask!</span>")
|
||||
return
|
||||
if(!user.drop_item())
|
||||
return
|
||||
mask = I
|
||||
else
|
||||
if(storage)
|
||||
to_chat(user, "<span class='warning'>The auxiliary storage compartment is full!</span>")
|
||||
return
|
||||
if(!user.drop_item())
|
||||
return
|
||||
storage = I
|
||||
|
||||
I.loc = src
|
||||
visible_message("<span class='notice'>[user] inserts [I] into [src]</span>", "<span class='notice'>You load [I] into [src].</span>")
|
||||
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, "<span class='userdanger'>[src]'s confines grow warm, then hot, then scorching. You're being burned [!mob_occupant.stat ? "alive" : "away"]!</span>")
|
||||
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, "<span class='userdanger'>[src]'s confines grow warm, then hot, then scorching. You're being burned [!mob_occupant.stat ? "alive" : "away"]!</span>")
|
||||
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()
|
||||
|
||||
+1068
-1041
File diff suppressed because it is too large
Load Diff
@@ -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()
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -451,6 +451,9 @@
|
||||
. = ..()
|
||||
if(.)
|
||||
events.fireEvent("onMove",get_turf(src))
|
||||
if (internal_tank.disconnect()) // Something moved us and broke connection
|
||||
occupant_message("<span class='warning'>Air port connection teared off!</span>")
|
||||
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, "<span class='notice'>You climb out from [src].</span>")
|
||||
return 0
|
||||
if(connected_port)
|
||||
if(internal_tank.connected_port)
|
||||
if(world.time - last_message > 20)
|
||||
occupant_message("<span class='warning'>Unable to move while connected to the air system port!</span>")
|
||||
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, "<span class='danger'>Warning: Tracking Beacon detected. Enter at your own risk. Beacon Data:")
|
||||
to_chat(user, "<span class='danger'>Warning: Tracking Beacon detected. Enter at your own risk. Beacon Data:</span>")
|
||||
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, "<span class='warning'>Pilot detected! Forced ejection initiated!")
|
||||
to_chat(AI, "<span class='warning'>Pilot detected! Forced ejection initiated!</span>")
|
||||
to_chat(occupant, "<span class='danger'>You have been forcibly ejected!</span>")
|
||||
go_out(1) //IT IS MINE, NOW. SUCK IT, RD!
|
||||
ai_enter_mech(AI, interaction)
|
||||
@@ -691,7 +694,7 @@
|
||||
to_chat(user, "<span class='warning'>[AI.name] is currently unresponsive, and cannot be uploaded.</span>")
|
||||
return
|
||||
if(occupant || dna_lock) //Normal AIs cannot steal mechs!
|
||||
to_chat(user, "<span class='warning'>Access denied. [name] is [occupant ? "currently occupied" : "secured with a DNA lock"].")
|
||||
to_chat(user, "<span class='warning'>Access denied. [name] is [occupant ? "currently occupied" : "secured with a DNA lock"].</span>")
|
||||
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()
|
||||
|
||||
|
||||
@@ -115,6 +115,7 @@
|
||||
<div class='links'>
|
||||
<a href='?src=\ref[src];toggle_id_upload=1'><span id='t_id_upload'>[add_req_access?"L":"Unl"]ock ID upload panel</span></a><br>
|
||||
<a href='?src=\ref[src];toggle_maint_access=1'><span id='t_maint_access'>[maint_access?"Forbid":"Permit"] maintenance protocols</span></a><br>
|
||||
<a href='?src=\ref[src];toggle_port_connection=1'><span id='t_port_connection'>[internal_tank.connected_port?"Disconnect from":"Connect to"] gas port</span></a><br>
|
||||
<a href='?src=\ref[src];dna_lock=1'>DNA-lock</a><br>
|
||||
<a href='?src=\ref[src];view_log=1'>View internal log</a><br>
|
||||
<a href='?src=\ref[src];change_name=1'>Change exosuit name</a><br>
|
||||
@@ -306,6 +307,24 @@
|
||||
maint_access = !maint_access
|
||||
send_byjax(src.occupant,"exosuit.browser","t_maint_access","[maint_access?"Forbid":"Permit"] maintenance protocols")
|
||||
|
||||
if (href_list["toggle_port_connection"])
|
||||
if(internal_tank.connected_port)
|
||||
if(internal_tank.disconnect())
|
||||
occupant_message("Disconnected from the air system port.")
|
||||
log_message("Disconnected from gas port.")
|
||||
else
|
||||
occupant_message("<span class='warning'>Unable to disconnect from the air system port!</span>")
|
||||
return
|
||||
else
|
||||
var/obj/machinery/atmospherics/components/unary/portables_connector/possible_port = locate() in loc
|
||||
if(internal_tank.connect(possible_port))
|
||||
occupant_message("Connected to the air system port.")
|
||||
log_message("Connected to gas port.")
|
||||
else
|
||||
occupant_message("<span class='warning'>Unable to connect with air system port!</span>")
|
||||
return
|
||||
send_byjax(occupant,"exosuit.browser","t_port_connection","[internal_tank.connected_port?"Disconnect from":"Connect to"] gas port")
|
||||
|
||||
if(href_list["dna_lock"])
|
||||
if(occupant && !iscarbon(occupant))
|
||||
to_chat(occupant, "<span class='danger'> You do not have any DNA!</span>")
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
sleep(10)
|
||||
animate(victim.client,color = old_color, time = duration)//, easing = SINE_EASING|EASE_OUT)
|
||||
sleep(duration)
|
||||
to_chat(victim, "<span class='notice'>Your bloodlust seeps back into the bog of your subconscious and you regain self control.<span>")
|
||||
to_chat(victim, "<span class='notice'>Your bloodlust seeps back into the bog of your subconscious and you regain self control.</span>")
|
||||
qdel(chainsaw)
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -549,9 +549,10 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
transfer_blood = 0
|
||||
|
||||
/obj/item/singularity_pull(S, current_size)
|
||||
..()
|
||||
if(current_size >= STAGE_FOUR)
|
||||
throw_at(S,14,3, spin=0)
|
||||
else ..()
|
||||
else return
|
||||
|
||||
/obj/item/throw_impact(atom/A)
|
||||
if(A && !QDELETED(A))
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -74,7 +74,7 @@ obj/item/construction
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You insert [amount_to_use] [S.name] sheets into the [src]. </span>")
|
||||
return 1
|
||||
to_chat(user, "<span class='warning'>You can't insert any more [S.name] sheets into the [src]!")
|
||||
to_chat(user, "<span class='warning'>You can't insert any more [S.name] sheets into the [src]!</span>")
|
||||
return 0
|
||||
|
||||
/obj/item/construction/proc/activate()
|
||||
|
||||
@@ -121,7 +121,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
return (TOXLOSS|OXYLOSS)
|
||||
|
||||
/obj/item/clothing/mask/cigarette/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
create_reagents(chem_volume)
|
||||
reagents.set_reacting(FALSE) // so it doesn't react until you light it
|
||||
if(list_reagents)
|
||||
@@ -378,7 +378,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
var/packeditem = 0
|
||||
|
||||
/obj/item/clothing/mask/cigarette/pipe/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
name = "empty [initial(name)]"
|
||||
|
||||
/obj/item/clothing/mask/cigarette/pipe/Destroy()
|
||||
@@ -534,7 +534,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
if(fancy)
|
||||
user.visible_message("You hear a quiet click, as [user] shuts off [src] without even looking at what [user.p_theyre()] doing. Wow.", "<span class='notice'>You quietly shut off [src] without even looking at what you're doing. Wow.</span>")
|
||||
else
|
||||
user.visible_message("[user] quietly shuts off [src].", "<span class='notice'>You quietly shut off [src].")
|
||||
user.visible_message("[user] quietly shuts off [src].", "<span class='notice'>You quietly shut off [src].</span>")
|
||||
else
|
||||
. = ..()
|
||||
|
||||
@@ -632,7 +632,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
var/super = 0 //for the fattest vapes dude.
|
||||
|
||||
/obj/item/clothing/mask/vape/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is puffin hard on dat vape, [user.p_they()] trying to join the vape life on a whole notha plane!")//it doesn't give you cancer, it is cancer
|
||||
user.visible_message("<span class='suicide'>[user] is puffin hard on dat vape, [user.p_they()] trying to join the vape life on a whole notha plane!</span>")//it doesn't give you cancer, it is cancer
|
||||
return (TOXLOSS|OXYLOSS)
|
||||
|
||||
|
||||
|
||||
@@ -720,4 +720,12 @@
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/stock_parts/console_screen = 1,
|
||||
/obj/item/stack/sheet/glass = 1)
|
||||
/obj/item/stack/sheet/glass = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/vending/donksofttoyvendor
|
||||
name = "Donksoft Toy Vendor (Machine Board)"
|
||||
build_path = /obj/machinery/vending/donksofttoyvendor
|
||||
origin_tech = "programming=1;syndicate=2"
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/console_screen = 1,
|
||||
/obj/item/vending_refill/donksoft = 3)
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
/obj/item/soap/suicide_act(mob/user)
|
||||
user.say(";FFFFFFFFFFFFFFFFUUUUUUUDGE!!")
|
||||
user.visible_message("<span class='suicide'>[user] lifts [src] to their mouth and gnaws on it furiously, producing a thick froth! [user.p_they(TRUE)]'ll never get that BB gun now!")
|
||||
user.visible_message("<span class='suicide'>[user] lifts [src] to their mouth and gnaws on it furiously, producing a thick froth! [user.p_they(TRUE)]'ll never get that BB gun now!</span>")
|
||||
new /obj/effect/particle_effect/foam(loc)
|
||||
return (TOXLOSS)
|
||||
|
||||
|
||||
@@ -135,10 +135,10 @@
|
||||
/obj/item/defibrillator/emag_act(mob/user)
|
||||
if(safety)
|
||||
safety = 0
|
||||
to_chat(user, "<span class='warning'>You silently disable [src]'s safety protocols with the cryptographic sequencer.")
|
||||
to_chat(user, "<span class='warning'>You silently disable [src]'s safety protocols with the cryptographic sequencer.</span>")
|
||||
else
|
||||
safety = 1
|
||||
to_chat(user, "<span class='notice'>You silently enable [src]'s safety protocols with the cryptographic sequencer.")
|
||||
to_chat(user, "<span class='notice'>You silently enable [src]'s safety protocols with the cryptographic sequencer.</span>")
|
||||
|
||||
/obj/item/defibrillator/emp_act(severity)
|
||||
if(cell)
|
||||
@@ -497,7 +497,7 @@
|
||||
update_icon()
|
||||
return
|
||||
if(H.stat == DEAD)
|
||||
H.visible_message("<span class='warning'>[H]'s body convulses a bit.")
|
||||
H.visible_message("<span class='warning'>[H]'s body convulses a bit.</span>")
|
||||
playsound(get_turf(src), "bodyfall", 50, 1)
|
||||
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
|
||||
total_brute = H.getBruteLoss()
|
||||
|
||||
@@ -30,7 +30,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
//Secondary variables
|
||||
var/scanmode = 0 //1 is medical scanner, 2 is forensics, 3 is reagent scanner.
|
||||
var/fon = 0 //Is the flashlight function on?
|
||||
var/f_lum = 3 //Luminosity for the flashlight function
|
||||
var/f_lum = 2.3 //Luminosity for the flashlight function
|
||||
var/silent = 0 //To beep or not to beep, that is the question
|
||||
var/toff = 0 //If 1, messenger disabled
|
||||
var/tnote = null //Current Texts
|
||||
@@ -352,9 +352,9 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
if(fon)
|
||||
fon = 0
|
||||
set_light(0)
|
||||
else
|
||||
else if(f_lum)
|
||||
fon = 1
|
||||
set_light(2.3)
|
||||
set_light(f_lum)
|
||||
update_icon()
|
||||
if("Medical Scan")
|
||||
if(scanmode == 1)
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
access = CART_REAGENT_SCANNER | CART_ATMOS
|
||||
|
||||
/obj/item/cartridge/signal/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
radio = new /obj/item/radio/integrated/signal(src)
|
||||
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
bot_access_flags = FLOOR_BOT | CLEAN_BOT | MED_BOT
|
||||
|
||||
/obj/item/cartridge/rd/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
radio = new /obj/item/radio/integrated/signal(src)
|
||||
|
||||
/obj/item/cartridge/captain
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/integrated/signal/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
if (src.frequency < 1200 || src.frequency > 1600)
|
||||
src.frequency = sanitize_frequency(src.frequency)
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
return
|
||||
if(!isnull(target) && !target.toff)
|
||||
charges--
|
||||
var/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")]"
|
||||
var/lock_code = "[rand(100,999)] [pick(GLOB.phonetic_alphabet)]"
|
||||
to_chat(U, "<span class='notice'>Virus Sent! The unlock code to the target is: [lock_code]</span>")
|
||||
if(!target.hidden_uplink)
|
||||
var/obj/item/device/uplink/uplink = new(target)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
var/flashlight_power = 1 //strength of the light when on
|
||||
|
||||
/obj/item/device/flashlight/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
update_brightness()
|
||||
|
||||
/obj/item/device/flashlight/proc/update_brightness(mob/user = null)
|
||||
@@ -152,7 +152,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[M] doesn't have any organs in [their] mouth.</span>")
|
||||
if(pill_count)
|
||||
to_chat(user, "<span class='notice'>[M] has [pill_count] pill[pill_count > 1 ? "s" : ""] implanted in [their] teeth.")
|
||||
to_chat(user, "<span class='notice'>[M] has [pill_count] pill[pill_count > 1 ? "s" : ""] implanted in [their] teeth.</span>")
|
||||
|
||||
else
|
||||
return ..()
|
||||
@@ -409,7 +409,7 @@
|
||||
/obj/item/device/flashlight/glowstick/Initialize()
|
||||
fuel = rand(1600, 2000)
|
||||
light_color = color
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/device/flashlight/glowstick/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
@@ -428,7 +428,7 @@
|
||||
|
||||
/obj/item/device/flashlight/glowstick/update_icon()
|
||||
item_state = "glowstick"
|
||||
overlays.Cut()
|
||||
cut_overlays()
|
||||
if(!fuel)
|
||||
icon_state = "glowstick-empty"
|
||||
cut_overlays()
|
||||
|
||||
@@ -17,7 +17,7 @@ GLOBAL_LIST_EMPTY(GPS_list)
|
||||
|
||||
|
||||
/obj/item/device/gps/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
GLOB.GPS_list += src
|
||||
name = "global positioning system ([gpstag])"
|
||||
add_overlay("working")
|
||||
|
||||
@@ -0,0 +1,152 @@
|
||||
//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/weapon/pinpointer
|
||||
name = "pinpointer"
|
||||
desc = "A handheld tracking device that locks onto certain signals."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "pinpointer"
|
||||
flags = CONDUCT
|
||||
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/minimum_range = 0 //at what range the pinpointer declares you to be at your destination
|
||||
var/alert = FALSE // TRUE to display things more seriously
|
||||
|
||||
/obj/item/weapon/pinpointer/New()
|
||||
..()
|
||||
GLOB.pinpointer_list += src
|
||||
|
||||
/obj/item/weapon/pinpointer/Destroy()
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
GLOB.pinpointer_list -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/pinpointer/attack_self(mob/living/user)
|
||||
active = !active
|
||||
user.visible_message("<span class='notice'>[user] [active ? "" : "de"]activates their pinpointer.</span>", "<span class='notice'>You [active ? "" : "de"]activate your pinpointer.</span>")
|
||||
playsound(user, 'sound/items/screwdriver2.ogg', 50, 1)
|
||||
if(active)
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
else
|
||||
target = null
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
update_pointer_overlay()
|
||||
|
||||
/obj/item/weapon/pinpointer/process()
|
||||
if(!active)
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
return
|
||||
scan_for_target()
|
||||
update_pointer_overlay()
|
||||
|
||||
/obj/item/weapon/pinpointer/proc/scan_for_target()
|
||||
return
|
||||
|
||||
/obj/item/weapon/pinpointer/proc/update_pointer_overlay()
|
||||
cut_overlays()
|
||||
if(!active)
|
||||
return
|
||||
if(!target)
|
||||
add_overlay("pinon[alert ? "alert" : ""]null")
|
||||
var/turf/here = get_turf(src)
|
||||
var/turf/there = get_turf(target)
|
||||
if(here.z != there.z)
|
||||
add_overlay("pinon[alert ? "alert" : ""]null")
|
||||
return
|
||||
if(get_dist_euclidian(here,there) <= minimum_range)
|
||||
add_overlay("pinon[alert ? "alert" : ""]direct")
|
||||
else
|
||||
setDir(get_dir(here, there))
|
||||
switch(get_dist(here, there))
|
||||
if(1 to 8)
|
||||
add_overlay("pinon[alert ? "alert" : "close"]")
|
||||
if(9 to 16)
|
||||
add_overlay("pinon[alert ? "alert" : "medium"]")
|
||||
if(16 to INFINITY)
|
||||
add_overlay("pinon[alert ? "alert" : "far"]")
|
||||
|
||||
/obj/item/weapon/pinpointer/crew // A replacement for the old crew monitoring consoles
|
||||
name = "crew pinpointer"
|
||||
desc = "A handheld tracking device that points to crew suit sensors."
|
||||
icon_state = "pinpointer_crew"
|
||||
|
||||
/obj/item/weapon/pinpointer/crew/proc/trackable(mob/living/carbon/human/H)
|
||||
var/turf/here = get_turf(src)
|
||||
if((H.z == 0 || H.z == here.z) && istype(H.w_uniform, /obj/item/clothing/under))
|
||||
var/obj/item/clothing/under/U = H.w_uniform
|
||||
|
||||
// Suit sensors must be on maximum.
|
||||
if(!U.has_sensor || U.sensor_mode < SENSOR_COORDS)
|
||||
return FALSE
|
||||
|
||||
var/turf/there = get_turf(H)
|
||||
return (H.z != 0 || (there && there.z == H.z))
|
||||
|
||||
return FALSE
|
||||
|
||||
/obj/item/weapon/pinpointer/crew/attack_self(mob/living/user)
|
||||
if(active)
|
||||
active = FALSE
|
||||
user.visible_message("<span class='notice'>[user] deactivates their pinpointer.</span>", "<span class='notice'>You deactivate your pinpointer.</span>")
|
||||
playsound(user, 'sound/items/screwdriver2.ogg', 50, 1)
|
||||
target = null //Restarting the pinpointer forces a target reset
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
update_pointer_overlay()
|
||||
return
|
||||
|
||||
var/list/name_counts = list()
|
||||
var/list/names = list()
|
||||
|
||||
for(var/mob/living/carbon/human/H in GLOB.mob_list)
|
||||
if(!trackable(H))
|
||||
continue
|
||||
|
||||
var/name = "Unknown"
|
||||
if(H.wear_id)
|
||||
var/obj/item/weapon/card/id/I = H.wear_id.GetID()
|
||||
name = I.registered_name
|
||||
|
||||
while(name in name_counts)
|
||||
name_counts[name]++
|
||||
name = text("[] ([])", name, name_counts[name])
|
||||
names[name] = H
|
||||
name_counts[name] = 1
|
||||
|
||||
if(!names.len)
|
||||
user.visible_message("<span class='notice'>[user]'s pinpointer fails to detect a signal.</span>", "<span class='notice'>Your pinpointer fails to detect a signal.</span>")
|
||||
return
|
||||
|
||||
var/A = input(user, "Person to track", "Pinpoint") in names
|
||||
if(!src || QDELETED(src) || !user || !user.is_holding(src) || user.incapacitated() || !A)
|
||||
return
|
||||
|
||||
target = names[A]
|
||||
active = TRUE
|
||||
user.visible_message("<span class='notice'>[user] activates their pinpointer.</span>", "<span class='notice'>You activate your pinpointer.</span>")
|
||||
playsound(user, 'sound/items/screwdriver2.ogg', 50, 1)
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
update_pointer_overlay()
|
||||
|
||||
/obj/item/weapon/pinpointer/crew/scan_for_target()
|
||||
if(target)
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(!trackable(H))
|
||||
target = null
|
||||
if(!target)
|
||||
active = FALSE
|
||||
|
||||
/obj/item/weapon/pinpointer/process()
|
||||
if(!active)
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
return
|
||||
scan_for_target()
|
||||
update_pointer_overlay()
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
icon_state = null
|
||||
active = TRUE
|
||||
if(tile_overlay)
|
||||
loc.overlays += tile_overlay
|
||||
loc.add_overlay(tile_overlay)
|
||||
else
|
||||
if(crossed)
|
||||
trigger() //no cheesing.
|
||||
|
||||
@@ -555,7 +555,7 @@
|
||||
flags_2 = NO_EMP_WIRES_2
|
||||
|
||||
/obj/item/device/radio/borg/Initialize(mapload)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/device/radio/borg/syndicate
|
||||
syndie = 1
|
||||
|
||||
@@ -1,294 +1,294 @@
|
||||
/obj/item/device/taperecorder
|
||||
name = "universal recorder"
|
||||
desc = "A device that can record to cassette tapes, and play them. It automatically translates the content in playback."
|
||||
icon_state = "taperecorder_empty"
|
||||
item_state = "analyzer"
|
||||
/obj/item/device/taperecorder
|
||||
name = "universal recorder"
|
||||
desc = "A device that can record to cassette tapes, and play them. It automatically translates the content in playback."
|
||||
icon_state = "taperecorder_empty"
|
||||
item_state = "analyzer"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
flags_1 = HEAR_1
|
||||
slot_flags = SLOT_BELT
|
||||
materials = list(MAT_METAL=60, MAT_GLASS=30)
|
||||
force = 2
|
||||
throwforce = 0
|
||||
var/recording = 0
|
||||
var/playing = 0
|
||||
var/playsleepseconds = 0
|
||||
var/obj/item/device/tape/mytape
|
||||
var/starting_tape_type = /obj/item/device/tape/random
|
||||
var/open_panel = 0
|
||||
var/canprint = 1
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/Initialize(mapload)
|
||||
..()
|
||||
if(starting_tape_type)
|
||||
mytape = new starting_tape_type(src)
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "The wire panel is [open_panel ? "opened" : "closed"].")
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/attackby(obj/item/I, mob/user, params)
|
||||
if(!mytape && istype(I, /obj/item/device/tape))
|
||||
if(!user.transferItemToLoc(I,src))
|
||||
return
|
||||
mytape = I
|
||||
to_chat(user, "<span class='notice'>You insert [I] into [src].</span>")
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/proc/eject(mob/user)
|
||||
if(mytape)
|
||||
to_chat(user, "<span class='notice'>You remove [mytape] from [src].</span>")
|
||||
stop()
|
||||
user.put_in_hands(mytape)
|
||||
mytape = null
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/taperecorder/fire_act(exposed_temperature, exposed_volume)
|
||||
mytape.ruin() //Fires destroy the tape
|
||||
..()
|
||||
|
||||
/obj/item/device/taperecorder/attack_hand(mob/user)
|
||||
if(loc == user)
|
||||
if(mytape)
|
||||
if(!user.is_holding(src))
|
||||
..()
|
||||
return
|
||||
eject(user)
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/proc/can_use(mob/user)
|
||||
if(user && ismob(user))
|
||||
if(!user.incapacitated())
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/ejectverb()
|
||||
set name = "Eject Tape"
|
||||
set category = "Object"
|
||||
|
||||
if(!can_use(usr))
|
||||
return
|
||||
if(!mytape)
|
||||
return
|
||||
|
||||
eject(usr)
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/update_icon()
|
||||
if(!mytape)
|
||||
icon_state = "taperecorder_empty"
|
||||
else if(recording)
|
||||
icon_state = "taperecorder_recording"
|
||||
else if(playing)
|
||||
icon_state = "taperecorder_playing"
|
||||
else
|
||||
icon_state = "taperecorder_idle"
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq, spans, message_mode)
|
||||
if(mytape && recording)
|
||||
mytape.timestamp += mytape.used_capacity
|
||||
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] [message]"
|
||||
|
||||
/obj/item/device/taperecorder/verb/record()
|
||||
set name = "Start Recording"
|
||||
set category = "Object"
|
||||
|
||||
if(!can_use(usr))
|
||||
return
|
||||
if(!mytape || mytape.ruined)
|
||||
return
|
||||
if(recording)
|
||||
return
|
||||
if(playing)
|
||||
return
|
||||
|
||||
if(mytape.used_capacity < mytape.max_capacity)
|
||||
to_chat(usr, "<span class='notice'>Recording started.</span>")
|
||||
recording = 1
|
||||
update_icon()
|
||||
mytape.timestamp += mytape.used_capacity
|
||||
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] Recording started."
|
||||
var/used = mytape.used_capacity //to stop runtimes when you eject the tape
|
||||
var/max = mytape.max_capacity
|
||||
for(used, used < max)
|
||||
if(recording == 0)
|
||||
break
|
||||
mytape.used_capacity++
|
||||
used++
|
||||
sleep(10)
|
||||
recording = 0
|
||||
update_icon()
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>The tape is full.</span>")
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/stop()
|
||||
set name = "Stop"
|
||||
set category = "Object"
|
||||
|
||||
if(!can_use(usr))
|
||||
return
|
||||
|
||||
if(recording)
|
||||
recording = 0
|
||||
mytape.timestamp += mytape.used_capacity
|
||||
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] Recording stopped."
|
||||
to_chat(usr, "<span class='notice'>Recording stopped.</span>")
|
||||
return
|
||||
else if(playing)
|
||||
playing = 0
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<font color=Maroon><B>Tape Recorder</B>: Playback stopped.</font>")
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/play()
|
||||
set name = "Play Tape"
|
||||
set category = "Object"
|
||||
|
||||
if(!can_use(usr))
|
||||
return
|
||||
if(!mytape || mytape.ruined)
|
||||
return
|
||||
if(recording)
|
||||
return
|
||||
if(playing)
|
||||
return
|
||||
|
||||
playing = 1
|
||||
update_icon()
|
||||
to_chat(usr, "<span class='notice'>Playing started.</span>")
|
||||
var/used = mytape.used_capacity //to stop runtimes when you eject the tape
|
||||
var/max = mytape.max_capacity
|
||||
for(var/i = 1, used < max, sleep(10 * playsleepseconds))
|
||||
if(!mytape)
|
||||
break
|
||||
if(playing == 0)
|
||||
break
|
||||
if(mytape.storedinfo.len < i)
|
||||
break
|
||||
say(mytape.storedinfo[i])
|
||||
if(mytape.storedinfo.len < i + 1)
|
||||
playsleepseconds = 1
|
||||
sleep(10)
|
||||
say("End of recording.")
|
||||
else
|
||||
playsleepseconds = mytape.timestamp[i + 1] - mytape.timestamp[i]
|
||||
if(playsleepseconds > 14)
|
||||
sleep(10)
|
||||
say("Skipping [playsleepseconds] seconds of silence")
|
||||
playsleepseconds = 1
|
||||
i++
|
||||
|
||||
playing = 0
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/attack_self(mob/user)
|
||||
if(!mytape || mytape.ruined)
|
||||
return
|
||||
if(recording)
|
||||
stop()
|
||||
else
|
||||
record()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/print_transcript()
|
||||
set name = "Print Transcript"
|
||||
set category = "Object"
|
||||
|
||||
if(!can_use(usr))
|
||||
return
|
||||
if(!mytape)
|
||||
return
|
||||
if(!canprint)
|
||||
to_chat(usr, "<span class='notice'>The recorder can't print that fast!</span>")
|
||||
return
|
||||
if(recording || playing)
|
||||
return
|
||||
|
||||
to_chat(usr, "<span class='notice'>Transcript printed.</span>")
|
||||
var/obj/item/paper/P = new /obj/item/paper(get_turf(src))
|
||||
var/t1 = "<B>Transcript:</B><BR><BR>"
|
||||
for(var/i = 1, mytape.storedinfo.len >= i, i++)
|
||||
t1 += "[mytape.storedinfo[i]]<BR>"
|
||||
P.info = t1
|
||||
P.name = "paper- 'Transcript'"
|
||||
usr.put_in_hands(P)
|
||||
canprint = 0
|
||||
sleep(300)
|
||||
canprint = 1
|
||||
|
||||
|
||||
//empty tape recorders
|
||||
/obj/item/device/taperecorder/empty
|
||||
starting_tape_type = null
|
||||
|
||||
|
||||
/obj/item/device/tape
|
||||
name = "tape"
|
||||
desc = "A magnetic tape that can hold up to ten minutes of content."
|
||||
icon_state = "tape_white"
|
||||
item_state = "analyzer"
|
||||
slot_flags = SLOT_BELT
|
||||
materials = list(MAT_METAL=60, MAT_GLASS=30)
|
||||
force = 2
|
||||
throwforce = 0
|
||||
var/recording = 0
|
||||
var/playing = 0
|
||||
var/playsleepseconds = 0
|
||||
var/obj/item/device/tape/mytape
|
||||
var/starting_tape_type = /obj/item/device/tape/random
|
||||
var/open_panel = 0
|
||||
var/canprint = 1
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/Initialize(mapload)
|
||||
. = ..()
|
||||
if(starting_tape_type)
|
||||
mytape = new starting_tape_type(src)
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "The wire panel is [open_panel ? "opened" : "closed"].")
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/attackby(obj/item/I, mob/user, params)
|
||||
if(!mytape && istype(I, /obj/item/device/tape))
|
||||
if(!user.transferItemToLoc(I,src))
|
||||
return
|
||||
mytape = I
|
||||
to_chat(user, "<span class='notice'>You insert [I] into [src].</span>")
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/proc/eject(mob/user)
|
||||
if(mytape)
|
||||
to_chat(user, "<span class='notice'>You remove [mytape] from [src].</span>")
|
||||
stop()
|
||||
user.put_in_hands(mytape)
|
||||
mytape = null
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/taperecorder/fire_act(exposed_temperature, exposed_volume)
|
||||
mytape.ruin() //Fires destroy the tape
|
||||
..()
|
||||
|
||||
/obj/item/device/taperecorder/attack_hand(mob/user)
|
||||
if(loc == user)
|
||||
if(mytape)
|
||||
if(!user.is_holding(src))
|
||||
..()
|
||||
return
|
||||
eject(user)
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/proc/can_use(mob/user)
|
||||
if(user && ismob(user))
|
||||
if(!user.incapacitated())
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/ejectverb()
|
||||
set name = "Eject Tape"
|
||||
set category = "Object"
|
||||
|
||||
if(!can_use(usr))
|
||||
return
|
||||
if(!mytape)
|
||||
return
|
||||
|
||||
eject(usr)
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/update_icon()
|
||||
if(!mytape)
|
||||
icon_state = "taperecorder_empty"
|
||||
else if(recording)
|
||||
icon_state = "taperecorder_recording"
|
||||
else if(playing)
|
||||
icon_state = "taperecorder_playing"
|
||||
else
|
||||
icon_state = "taperecorder_idle"
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq, spans, message_mode)
|
||||
if(mytape && recording)
|
||||
mytape.timestamp += mytape.used_capacity
|
||||
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] [message]"
|
||||
|
||||
/obj/item/device/taperecorder/verb/record()
|
||||
set name = "Start Recording"
|
||||
set category = "Object"
|
||||
|
||||
if(!can_use(usr))
|
||||
return
|
||||
if(!mytape || mytape.ruined)
|
||||
return
|
||||
if(recording)
|
||||
return
|
||||
if(playing)
|
||||
return
|
||||
|
||||
if(mytape.used_capacity < mytape.max_capacity)
|
||||
to_chat(usr, "<span class='notice'>Recording started.</span>")
|
||||
recording = 1
|
||||
update_icon()
|
||||
mytape.timestamp += mytape.used_capacity
|
||||
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] Recording started."
|
||||
var/used = mytape.used_capacity //to stop runtimes when you eject the tape
|
||||
var/max = mytape.max_capacity
|
||||
for(used, used < max)
|
||||
if(recording == 0)
|
||||
break
|
||||
mytape.used_capacity++
|
||||
used++
|
||||
sleep(10)
|
||||
recording = 0
|
||||
update_icon()
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>The tape is full.</span>")
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/stop()
|
||||
set name = "Stop"
|
||||
set category = "Object"
|
||||
|
||||
if(!can_use(usr))
|
||||
return
|
||||
|
||||
if(recording)
|
||||
recording = 0
|
||||
mytape.timestamp += mytape.used_capacity
|
||||
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] Recording stopped."
|
||||
to_chat(usr, "<span class='notice'>Recording stopped.</span>")
|
||||
return
|
||||
else if(playing)
|
||||
playing = 0
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<font color=Maroon><B>Tape Recorder</B>: Playback stopped.</font>")
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/play()
|
||||
set name = "Play Tape"
|
||||
set category = "Object"
|
||||
|
||||
if(!can_use(usr))
|
||||
return
|
||||
if(!mytape || mytape.ruined)
|
||||
return
|
||||
if(recording)
|
||||
return
|
||||
if(playing)
|
||||
return
|
||||
|
||||
playing = 1
|
||||
update_icon()
|
||||
to_chat(usr, "<span class='notice'>Playing started.</span>")
|
||||
var/used = mytape.used_capacity //to stop runtimes when you eject the tape
|
||||
var/max = mytape.max_capacity
|
||||
for(var/i = 1, used < max, sleep(10 * playsleepseconds))
|
||||
if(!mytape)
|
||||
break
|
||||
if(playing == 0)
|
||||
break
|
||||
if(mytape.storedinfo.len < i)
|
||||
break
|
||||
say(mytape.storedinfo[i])
|
||||
if(mytape.storedinfo.len < i + 1)
|
||||
playsleepseconds = 1
|
||||
sleep(10)
|
||||
say("End of recording.")
|
||||
else
|
||||
playsleepseconds = mytape.timestamp[i + 1] - mytape.timestamp[i]
|
||||
if(playsleepseconds > 14)
|
||||
sleep(10)
|
||||
say("Skipping [playsleepseconds] seconds of silence")
|
||||
playsleepseconds = 1
|
||||
i++
|
||||
|
||||
playing = 0
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/attack_self(mob/user)
|
||||
if(!mytape || mytape.ruined)
|
||||
return
|
||||
if(recording)
|
||||
stop()
|
||||
else
|
||||
record()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/print_transcript()
|
||||
set name = "Print Transcript"
|
||||
set category = "Object"
|
||||
|
||||
if(!can_use(usr))
|
||||
return
|
||||
if(!mytape)
|
||||
return
|
||||
if(!canprint)
|
||||
to_chat(usr, "<span class='notice'>The recorder can't print that fast!</span>")
|
||||
return
|
||||
if(recording || playing)
|
||||
return
|
||||
|
||||
to_chat(usr, "<span class='notice'>Transcript printed.</span>")
|
||||
var/obj/item/paper/P = new /obj/item/paper(get_turf(src))
|
||||
var/t1 = "<B>Transcript:</B><BR><BR>"
|
||||
for(var/i = 1, mytape.storedinfo.len >= i, i++)
|
||||
t1 += "[mytape.storedinfo[i]]<BR>"
|
||||
P.info = t1
|
||||
P.name = "paper- 'Transcript'"
|
||||
usr.put_in_hands(P)
|
||||
canprint = 0
|
||||
sleep(300)
|
||||
canprint = 1
|
||||
|
||||
|
||||
//empty tape recorders
|
||||
/obj/item/device/taperecorder/empty
|
||||
starting_tape_type = null
|
||||
|
||||
|
||||
/obj/item/device/tape
|
||||
name = "tape"
|
||||
desc = "A magnetic tape that can hold up to ten minutes of content."
|
||||
icon_state = "tape_white"
|
||||
item_state = "analyzer"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
materials = list(MAT_METAL=20, MAT_GLASS=5)
|
||||
force = 1
|
||||
throwforce = 0
|
||||
var/max_capacity = 600
|
||||
var/used_capacity = 0
|
||||
var/list/storedinfo = list()
|
||||
var/list/timestamp = list()
|
||||
var/ruined = 0
|
||||
|
||||
/obj/item/device/tape/fire_act(exposed_temperature, exposed_volume)
|
||||
ruin()
|
||||
..()
|
||||
|
||||
/obj/item/device/tape/attack_self(mob/user)
|
||||
if(!ruined)
|
||||
to_chat(user, "<span class='notice'>You pull out all the tape!</span>")
|
||||
ruin()
|
||||
|
||||
|
||||
/obj/item/device/tape/proc/ruin()
|
||||
//Lets not add infinite amounts of overlays when our fireact is called
|
||||
//repeatedly
|
||||
if(!ruined)
|
||||
add_overlay("ribbonoverlay")
|
||||
ruined = 1
|
||||
|
||||
|
||||
/obj/item/device/tape/proc/fix()
|
||||
cut_overlay("ribbonoverlay")
|
||||
ruined = 0
|
||||
|
||||
|
||||
/obj/item/device/tape/attackby(obj/item/I, mob/user, params)
|
||||
if(ruined)
|
||||
var/delay = -1
|
||||
if (istype(I, /obj/item/screwdriver))
|
||||
delay = 120*I.toolspeed
|
||||
else if(istype(I, /obj/item/pen))
|
||||
delay = 120*1.5
|
||||
if (delay != -1)
|
||||
to_chat(user, "<span class='notice'>You start winding the tape back in...</span>")
|
||||
if(do_after(user, delay, target = src))
|
||||
to_chat(user, "<span class='notice'>You wound the tape back in.</span>")
|
||||
fix()
|
||||
|
||||
//Random colour tapes
|
||||
/obj/item/device/tape/random/New()
|
||||
icon_state = "tape_[pick("white", "blue", "red", "yellow", "purple")]"
|
||||
..()
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
materials = list(MAT_METAL=20, MAT_GLASS=5)
|
||||
force = 1
|
||||
throwforce = 0
|
||||
var/max_capacity = 600
|
||||
var/used_capacity = 0
|
||||
var/list/storedinfo = list()
|
||||
var/list/timestamp = list()
|
||||
var/ruined = 0
|
||||
|
||||
/obj/item/device/tape/fire_act(exposed_temperature, exposed_volume)
|
||||
ruin()
|
||||
..()
|
||||
|
||||
/obj/item/device/tape/attack_self(mob/user)
|
||||
if(!ruined)
|
||||
to_chat(user, "<span class='notice'>You pull out all the tape!</span>")
|
||||
ruin()
|
||||
|
||||
|
||||
/obj/item/device/tape/proc/ruin()
|
||||
//Lets not add infinite amounts of overlays when our fireact is called
|
||||
//repeatedly
|
||||
if(!ruined)
|
||||
add_overlay("ribbonoverlay")
|
||||
ruined = 1
|
||||
|
||||
|
||||
/obj/item/device/tape/proc/fix()
|
||||
cut_overlay("ribbonoverlay")
|
||||
ruined = 0
|
||||
|
||||
|
||||
/obj/item/device/tape/attackby(obj/item/I, mob/user, params)
|
||||
if(ruined)
|
||||
var/delay = -1
|
||||
if (istype(I, /obj/item/screwdriver))
|
||||
delay = 120*I.toolspeed
|
||||
else if(istype(I, /obj/item/pen))
|
||||
delay = 120*1.5
|
||||
if (delay != -1)
|
||||
to_chat(user, "<span class='notice'>You start winding the tape back in...</span>")
|
||||
if(do_after(user, delay, target = src))
|
||||
to_chat(user, "<span class='notice'>You wound the tape back in.</span>")
|
||||
fix()
|
||||
|
||||
//Random colour tapes
|
||||
/obj/item/device/tape/random/New()
|
||||
icon_state = "tape_[pick("white", "blue", "red", "yellow", "purple")]"
|
||||
..()
|
||||
|
||||
@@ -147,7 +147,7 @@ effective or pretty fucking useless.
|
||||
usr.set_machine(src)
|
||||
if(href_list["rad"])
|
||||
irradiate = !irradiate
|
||||
|
||||
|
||||
else if(href_list["stealthy"])
|
||||
stealth = !stealth
|
||||
|
||||
@@ -242,11 +242,10 @@ effective or pretty fucking useless.
|
||||
var/range = 12
|
||||
|
||||
/obj/item/device/jammer/attack_self(mob/user)
|
||||
to_chat(user,"<span class='notice'>You [active ? "deactivate" : "activate"] the [src]<span>")
|
||||
to_chat(user,"<span class='notice'>You [active ? "deactivate" : "activate"] the [src].</span>")
|
||||
active = !active
|
||||
if(active)
|
||||
GLOB.active_jammers |= src
|
||||
else
|
||||
GLOB.active_jammers -= src
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -1,370 +1,370 @@
|
||||
/obj/item/dnainjector
|
||||
name = "\improper DNA injector"
|
||||
desc = "This injects the person with DNA."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "dnainjector"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
origin_tech = "biotech=1"
|
||||
|
||||
var/damage_coeff = 1
|
||||
var/list/fields
|
||||
var/list/add_mutations = list()
|
||||
var/list/remove_mutations = list()
|
||||
|
||||
var/list/add_mutations_static = list()
|
||||
var/list/remove_mutations_static = list()
|
||||
|
||||
var/used = 0
|
||||
|
||||
/obj/item/dnainjector/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/item/dnainjector/proc/prepare()
|
||||
for(var/mut_key in add_mutations_static)
|
||||
add_mutations.Add(GLOB.mutations_list[mut_key])
|
||||
for(var/mut_key in remove_mutations_static)
|
||||
remove_mutations.Add(GLOB.mutations_list[mut_key])
|
||||
|
||||
/obj/item/dnainjector/proc/inject(mob/living/carbon/M, mob/user)
|
||||
prepare()
|
||||
|
||||
if(M.has_dna() && !(RADIMMUNE in M.dna.species.species_traits) && !(M.disabilities & NOCLONE))
|
||||
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
|
||||
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
|
||||
for(var/datum/mutation/human/HM in remove_mutations)
|
||||
HM.force_lose(M)
|
||||
for(var/datum/mutation/human/HM in add_mutations)
|
||||
if(HM.name == RACEMUT)
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] <span class='danger'>(MONKEY)</span>")
|
||||
log_msg += " (MONKEY)"
|
||||
HM.force_give(M)
|
||||
if(fields)
|
||||
if(fields["name"] && fields["UE"] && fields["blood_type"])
|
||||
M.real_name = fields["name"]
|
||||
M.dna.unique_enzymes = fields["UE"]
|
||||
M.name = M.real_name
|
||||
M.dna.blood_type = fields["blood_type"]
|
||||
if(fields["UI"]) //UI+UE
|
||||
M.dna.uni_identity = merge_text(M.dna.uni_identity, fields["UI"])
|
||||
M.updateappearance(mutations_overlay_update=1)
|
||||
log_attack(log_msg)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/dnainjector/attack(mob/target, mob/user)
|
||||
if(!user.IsAdvancedToolUser())
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
if(used)
|
||||
to_chat(user, "<span class='warning'>This injector is used up!</span>")
|
||||
return
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/humantarget = target
|
||||
if (!humantarget.can_inject(user, 1))
|
||||
return
|
||||
add_logs(user, target, "attempted to inject", src)
|
||||
|
||||
if(target != user)
|
||||
target.visible_message("<span class='danger'>[user] is trying to inject [target] with [src]!</span>", "<span class='userdanger'>[user] is trying to inject [target] with [src]!</span>")
|
||||
if(!do_mob(user, target) || used)
|
||||
return
|
||||
target.visible_message("<span class='danger'>[user] injects [target] with the syringe with [src]!", \
|
||||
"<span class='userdanger'>[user] injects [target] with the syringe with [src]!")
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You inject yourself with [src].</span>")
|
||||
|
||||
add_logs(user, target, "injected", src)
|
||||
|
||||
if(!inject(target, user)) //Now we actually do the heavy lifting.
|
||||
to_chat(user, "<span class='notice'>It appears that [target] does not have compatible DNA.</span>")
|
||||
|
||||
used = 1
|
||||
icon_state = "dnainjector0"
|
||||
desc += " This one is used up."
|
||||
|
||||
|
||||
/obj/item/dnainjector/antihulk
|
||||
name = "\improper DNA injector (Anti-Hulk)"
|
||||
desc = "Cures green skin."
|
||||
remove_mutations_static = list(HULK)
|
||||
|
||||
/obj/item/dnainjector/hulkmut
|
||||
name = "\improper DNA injector (Hulk)"
|
||||
desc = "This will make you big and strong, but give you a bad skin condition."
|
||||
add_mutations_static = list(HULK)
|
||||
|
||||
/obj/item/dnainjector/xraymut
|
||||
name = "\improper DNA injector (Xray)"
|
||||
desc = "Finally you can see what the Captain does."
|
||||
add_mutations_static = list(XRAY)
|
||||
|
||||
/obj/item/dnainjector/antixray
|
||||
name = "\improper DNA injector (Anti-Xray)"
|
||||
desc = "It will make you see harder."
|
||||
remove_mutations_static = list(XRAY)
|
||||
|
||||
/////////////////////////////////////
|
||||
/obj/item/dnainjector/antiglasses
|
||||
name = "\improper DNA injector (Anti-Glasses)"
|
||||
desc = "Toss away those glasses!"
|
||||
remove_mutations_static = list(BADSIGHT)
|
||||
|
||||
/obj/item/dnainjector/glassesmut
|
||||
name = "\improper DNA injector (Glasses)"
|
||||
desc = "Will make you need dorkish glasses."
|
||||
add_mutations_static = list(BADSIGHT)
|
||||
|
||||
/obj/item/dnainjector/epimut
|
||||
name = "\improper DNA injector (Epi.)"
|
||||
desc = "Shake shake shake the room!"
|
||||
add_mutations_static = list(EPILEPSY)
|
||||
|
||||
/obj/item/dnainjector/antiepi
|
||||
name = "\improper DNA injector (Anti-Epi.)"
|
||||
desc = "Will fix you up from shaking the room."
|
||||
remove_mutations_static = list(EPILEPSY)
|
||||
////////////////////////////////////
|
||||
/obj/item/dnainjector/anticough
|
||||
name = "\improper DNA injector (Anti-Cough)"
|
||||
desc = "Will stop that aweful noise."
|
||||
remove_mutations_static = list(COUGH)
|
||||
|
||||
/obj/item/dnainjector/coughmut
|
||||
name = "\improper DNA injector (Cough)"
|
||||
desc = "Will bring forth a sound of horror from your throat."
|
||||
add_mutations_static = list(COUGH)
|
||||
|
||||
/obj/item/dnainjector/antidwarf
|
||||
name = "\improper DNA injector (Anti-Dwarfism)"
|
||||
desc = "Helps you grow big and strong."
|
||||
remove_mutations_static = list(DWARFISM)
|
||||
|
||||
/obj/item/dnainjector/dwarf
|
||||
name = "\improper DNA injector (Dwarfism)"
|
||||
desc = "It's a small world after all."
|
||||
add_mutations_static = list(DWARFISM)
|
||||
|
||||
/obj/item/dnainjector/clumsymut
|
||||
name = "\improper DNA injector (Clumsy)"
|
||||
desc = "Makes clown minions."
|
||||
add_mutations_static = list(CLOWNMUT)
|
||||
|
||||
/obj/item/dnainjector/anticlumsy
|
||||
name = "\improper DNA injector (Anti-Clumsy)"
|
||||
desc = "Apply this for Security Clown."
|
||||
remove_mutations_static = list(CLOWNMUT)
|
||||
|
||||
/obj/item/dnainjector/antitour
|
||||
name = "\improper DNA injector (Anti-Tour.)"
|
||||
desc = "Will cure tourrets."
|
||||
remove_mutations_static = list(TOURETTES)
|
||||
|
||||
/obj/item/dnainjector/tourmut
|
||||
name = "\improper DNA injector (Tour.)"
|
||||
desc = "Gives you a nasty case of Tourette's."
|
||||
add_mutations_static = list(TOURETTES)
|
||||
|
||||
/obj/item/dnainjector/stuttmut
|
||||
name = "\improper DNA injector (Stutt.)"
|
||||
desc = "Makes you s-s-stuttterrr"
|
||||
add_mutations_static = list(NERVOUS)
|
||||
|
||||
/obj/item/dnainjector/antistutt
|
||||
name = "\improper DNA injector (Anti-Stutt.)"
|
||||
desc = "Fixes that speaking impairment."
|
||||
remove_mutations_static = list(NERVOUS)
|
||||
|
||||
/obj/item/dnainjector/antifire
|
||||
name = "\improper DNA injector (Anti-Fire)"
|
||||
desc = "Cures fire."
|
||||
remove_mutations_static = list(COLDRES)
|
||||
|
||||
/obj/item/dnainjector/firemut
|
||||
name = "\improper DNA injector (Fire)"
|
||||
desc = "Gives you fire."
|
||||
add_mutations_static = list(COLDRES)
|
||||
|
||||
/obj/item/dnainjector/blindmut
|
||||
name = "\improper DNA injector (Blind)"
|
||||
desc = "Makes you not see anything."
|
||||
add_mutations_static = list(BLINDMUT)
|
||||
|
||||
/obj/item/dnainjector/antiblind
|
||||
name = "\improper DNA injector (Anti-Blind)"
|
||||
desc = "IT'S A MIRACLE!!!"
|
||||
remove_mutations_static = list(BLINDMUT)
|
||||
|
||||
/obj/item/dnainjector/antitele
|
||||
name = "\improper DNA injector (Anti-Tele.)"
|
||||
desc = "Will make you not able to control your mind."
|
||||
remove_mutations_static = list(TK)
|
||||
|
||||
/obj/item/dnainjector/telemut
|
||||
name = "\improper DNA injector (Tele.)"
|
||||
desc = "Super brain man!"
|
||||
add_mutations_static = list(TK)
|
||||
|
||||
/obj/item/dnainjector/telemut/darkbundle
|
||||
name = "\improper DNA injector"
|
||||
desc = "Good. Let the hate flow through you."
|
||||
|
||||
/obj/item/dnainjector/deafmut
|
||||
name = "\improper DNA injector (Deaf)"
|
||||
desc = "Sorry, what did you say?"
|
||||
add_mutations_static = list(DEAFMUT)
|
||||
|
||||
/obj/item/dnainjector/antideaf
|
||||
name = "\improper DNA injector (Anti-Deaf)"
|
||||
desc = "Will make you hear once more."
|
||||
remove_mutations_static = list(DEAFMUT)
|
||||
|
||||
/obj/item/dnainjector/h2m
|
||||
name = "\improper DNA injector (Human > Monkey)"
|
||||
desc = "Will make you a flea bag."
|
||||
add_mutations_static = list(RACEMUT)
|
||||
|
||||
/obj/item/dnainjector/m2h
|
||||
name = "\improper DNA injector (Monkey > Human)"
|
||||
desc = "Will make you...less hairy."
|
||||
remove_mutations_static = list(RACEMUT)
|
||||
|
||||
/obj/item/dnainjector/antichameleon
|
||||
name = "\improper DNA injector (Anti-Chameleon)"
|
||||
remove_mutations_static = list(CHAMELEON)
|
||||
|
||||
/obj/item/dnainjector/chameleonmut
|
||||
name = "\improper DNA injector (Chameleon)"
|
||||
add_mutations_static = list(CHAMELEON)
|
||||
|
||||
/obj/item/dnainjector/antiwacky
|
||||
name = "\improper DNA injector (Anti-Wacky)"
|
||||
remove_mutations_static = list(WACKY)
|
||||
|
||||
/obj/item/dnainjector/wackymut
|
||||
name = "\improper DNA injector (Wacky)"
|
||||
add_mutations_static = list(WACKY)
|
||||
|
||||
/obj/item/dnainjector/antimute
|
||||
name = "\improper DNA injector (Anti-Mute)"
|
||||
remove_mutations_static = list(MUT_MUTE)
|
||||
|
||||
/obj/item/dnainjector/mutemut
|
||||
name = "\improper DNA injector (Mute)"
|
||||
add_mutations_static = list(MUT_MUTE)
|
||||
|
||||
/obj/item/dnainjector/antismile
|
||||
name = "\improper DNA injector (Anti-Smile)"
|
||||
remove_mutations_static = list(SMILE)
|
||||
|
||||
/obj/item/dnainjector/smilemut
|
||||
name = "\improper DNA injector (Smile)"
|
||||
add_mutations_static = list(SMILE)
|
||||
|
||||
/obj/item/dnainjector/unintelligablemut
|
||||
name = "\improper DNA injector (Unintelligable)"
|
||||
add_mutations_static = list(UNINTELLIGABLE)
|
||||
|
||||
/obj/item/dnainjector/antiunintelligable
|
||||
name = "\improper DNA injector (Anti-Unintelligable)"
|
||||
remove_mutations_static = list(UNINTELLIGABLE)
|
||||
|
||||
/obj/item/dnainjector/swedishmut
|
||||
name = "\improper DNA injector (Swedish)"
|
||||
add_mutations_static = list(SWEDISH)
|
||||
|
||||
/obj/item/dnainjector/antiswedish
|
||||
name = "\improper DNA injector (Anti-Swedish)"
|
||||
remove_mutations_static = list(SWEDISH)
|
||||
|
||||
/obj/item/dnainjector/chavmut
|
||||
name = "\improper DNA injector (Chav)"
|
||||
add_mutations_static = list(CHAV)
|
||||
|
||||
/obj/item/dnainjector/antichav
|
||||
name = "\improper DNA injector (Anti-Chav)"
|
||||
remove_mutations_static = list(CHAV)
|
||||
|
||||
/obj/item/dnainjector/elvismut
|
||||
name = "\improper DNA injector (Elvis)"
|
||||
add_mutations_static = list(ELVIS)
|
||||
|
||||
/obj/item/dnainjector/antielvis
|
||||
name = "\improper DNA injector (Anti-Elvis)"
|
||||
remove_mutations_static = list(ELVIS)
|
||||
|
||||
/obj/item/dnainjector/lasereyesmut
|
||||
name = "\improper DNA injector (Laser Eyes)"
|
||||
add_mutations_static = list(LASEREYES)
|
||||
|
||||
/obj/item/dnainjector/antilasereyes
|
||||
name = "\improper DNA injector (Anti-Laser Eyes)"
|
||||
remove_mutations_static = list(LASEREYES)
|
||||
|
||||
/obj/item/dnainjector/timed
|
||||
var/duration = 600
|
||||
|
||||
/obj/item/dnainjector/timed/inject(mob/living/carbon/M, mob/user)
|
||||
prepare()
|
||||
if(M.stat == DEAD) //prevents dead people from having their DNA changed
|
||||
to_chat(user, "<span class='notice'>You can't modify [M]'s DNA while [M.p_theyre()] dead.</span>")
|
||||
return FALSE
|
||||
|
||||
if(M.has_dna() && !(M.disabilities & NOCLONE))
|
||||
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
|
||||
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
|
||||
var/endtime = world.time+duration
|
||||
for(var/datum/mutation/human/HM in remove_mutations)
|
||||
if(HM.name == RACEMUT)
|
||||
if(ishuman(M))
|
||||
continue
|
||||
M = HM.force_lose(M)
|
||||
else
|
||||
HM.force_lose(M)
|
||||
for(var/datum/mutation/human/HM in add_mutations)
|
||||
if((HM in M.dna.mutations) && !(M.dna.temporary_mutations[HM.name]))
|
||||
continue //Skip permanent mutations we already have.
|
||||
if(HM.name == RACEMUT && ishuman(M))
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] <span class='danger'>(MONKEY)</span>")
|
||||
log_msg += " (MONKEY)"
|
||||
M = HM.force_give(M)
|
||||
else
|
||||
HM.force_give(M)
|
||||
M.dna.temporary_mutations[HM.name] = endtime
|
||||
if(fields)
|
||||
if(fields["name"] && fields["UE"] && fields["blood_type"])
|
||||
if(!M.dna.previous["name"])
|
||||
M.dna.previous["name"] = M.real_name
|
||||
if(!M.dna.previous["UE"])
|
||||
M.dna.previous["UE"] = M.dna.unique_enzymes
|
||||
if(!M.dna.previous["blood_type"])
|
||||
M.dna.previous["blood_type"] = M.dna.blood_type
|
||||
M.real_name = fields["name"]
|
||||
M.dna.unique_enzymes = fields["UE"]
|
||||
M.name = M.real_name
|
||||
M.dna.blood_type = fields["blood_type"]
|
||||
M.dna.temporary_mutations[UE_CHANGED] = endtime
|
||||
if(fields["UI"]) //UI+UE
|
||||
if(!M.dna.previous["UI"])
|
||||
M.dna.previous["UI"] = M.dna.uni_identity
|
||||
M.dna.uni_identity = merge_text(M.dna.uni_identity, fields["UI"])
|
||||
M.updateappearance(mutations_overlay_update=1)
|
||||
M.dna.temporary_mutations[UI_CHANGED] = endtime
|
||||
log_attack(log_msg)
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
|
||||
/obj/item/dnainjector/timed/hulk
|
||||
name = "\improper DNA injector (Hulk)"
|
||||
desc = "This will make you big and strong, but give you a bad skin condition."
|
||||
add_mutations_static = list(HULK)
|
||||
|
||||
/obj/item/dnainjector/timed/h2m
|
||||
name = "\improper DNA injector (Human > Monkey)"
|
||||
desc = "Will make you a flea bag."
|
||||
add_mutations_static = list(RACEMUT)
|
||||
/obj/item/dnainjector
|
||||
name = "\improper DNA injector"
|
||||
desc = "This injects the person with DNA."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "dnainjector"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
origin_tech = "biotech=1"
|
||||
|
||||
var/damage_coeff = 1
|
||||
var/list/fields
|
||||
var/list/add_mutations = list()
|
||||
var/list/remove_mutations = list()
|
||||
|
||||
var/list/add_mutations_static = list()
|
||||
var/list/remove_mutations_static = list()
|
||||
|
||||
var/used = 0
|
||||
|
||||
/obj/item/dnainjector/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/item/dnainjector/proc/prepare()
|
||||
for(var/mut_key in add_mutations_static)
|
||||
add_mutations.Add(GLOB.mutations_list[mut_key])
|
||||
for(var/mut_key in remove_mutations_static)
|
||||
remove_mutations.Add(GLOB.mutations_list[mut_key])
|
||||
|
||||
/obj/item/dnainjector/proc/inject(mob/living/carbon/M, mob/user)
|
||||
prepare()
|
||||
|
||||
if(M.has_dna() && !(RADIMMUNE in M.dna.species.species_traits) && !(M.disabilities & NOCLONE))
|
||||
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
|
||||
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
|
||||
for(var/datum/mutation/human/HM in remove_mutations)
|
||||
HM.force_lose(M)
|
||||
for(var/datum/mutation/human/HM in add_mutations)
|
||||
if(HM.name == RACEMUT)
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] <span class='danger'>(MONKEY)</span>")
|
||||
log_msg += " (MONKEY)"
|
||||
HM.force_give(M)
|
||||
if(fields)
|
||||
if(fields["name"] && fields["UE"] && fields["blood_type"])
|
||||
M.real_name = fields["name"]
|
||||
M.dna.unique_enzymes = fields["UE"]
|
||||
M.name = M.real_name
|
||||
M.dna.blood_type = fields["blood_type"]
|
||||
if(fields["UI"]) //UI+UE
|
||||
M.dna.uni_identity = merge_text(M.dna.uni_identity, fields["UI"])
|
||||
M.updateappearance(mutations_overlay_update=1)
|
||||
log_attack(log_msg)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/dnainjector/attack(mob/target, mob/user)
|
||||
if(!user.IsAdvancedToolUser())
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
if(used)
|
||||
to_chat(user, "<span class='warning'>This injector is used up!</span>")
|
||||
return
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/humantarget = target
|
||||
if (!humantarget.can_inject(user, 1))
|
||||
return
|
||||
add_logs(user, target, "attempted to inject", src)
|
||||
|
||||
if(target != user)
|
||||
target.visible_message("<span class='danger'>[user] is trying to inject [target] with [src]!</span>", "<span class='userdanger'>[user] is trying to inject [target] with [src]!</span>")
|
||||
if(!do_mob(user, target) || used)
|
||||
return
|
||||
target.visible_message("<span class='danger'>[user] injects [target] with the syringe with [src]!", \
|
||||
"<span class='userdanger'>[user] injects [target] with the syringe with [src]!</span>")
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You inject yourself with [src].</span>")
|
||||
|
||||
add_logs(user, target, "injected", src)
|
||||
|
||||
if(!inject(target, user)) //Now we actually do the heavy lifting.
|
||||
to_chat(user, "<span class='notice'>It appears that [target] does not have compatible DNA.</span>")
|
||||
|
||||
used = 1
|
||||
icon_state = "dnainjector0"
|
||||
desc += " This one is used up."
|
||||
|
||||
|
||||
/obj/item/dnainjector/antihulk
|
||||
name = "\improper DNA injector (Anti-Hulk)"
|
||||
desc = "Cures green skin."
|
||||
remove_mutations_static = list(HULK)
|
||||
|
||||
/obj/item/dnainjector/hulkmut
|
||||
name = "\improper DNA injector (Hulk)"
|
||||
desc = "This will make you big and strong, but give you a bad skin condition."
|
||||
add_mutations_static = list(HULK)
|
||||
|
||||
/obj/item/dnainjector/xraymut
|
||||
name = "\improper DNA injector (Xray)"
|
||||
desc = "Finally you can see what the Captain does."
|
||||
add_mutations_static = list(XRAY)
|
||||
|
||||
/obj/item/dnainjector/antixray
|
||||
name = "\improper DNA injector (Anti-Xray)"
|
||||
desc = "It will make you see harder."
|
||||
remove_mutations_static = list(XRAY)
|
||||
|
||||
/////////////////////////////////////
|
||||
/obj/item/dnainjector/antiglasses
|
||||
name = "\improper DNA injector (Anti-Glasses)"
|
||||
desc = "Toss away those glasses!"
|
||||
remove_mutations_static = list(BADSIGHT)
|
||||
|
||||
/obj/item/dnainjector/glassesmut
|
||||
name = "\improper DNA injector (Glasses)"
|
||||
desc = "Will make you need dorkish glasses."
|
||||
add_mutations_static = list(BADSIGHT)
|
||||
|
||||
/obj/item/dnainjector/epimut
|
||||
name = "\improper DNA injector (Epi.)"
|
||||
desc = "Shake shake shake the room!"
|
||||
add_mutations_static = list(EPILEPSY)
|
||||
|
||||
/obj/item/dnainjector/antiepi
|
||||
name = "\improper DNA injector (Anti-Epi.)"
|
||||
desc = "Will fix you up from shaking the room."
|
||||
remove_mutations_static = list(EPILEPSY)
|
||||
////////////////////////////////////
|
||||
/obj/item/dnainjector/anticough
|
||||
name = "\improper DNA injector (Anti-Cough)"
|
||||
desc = "Will stop that aweful noise."
|
||||
remove_mutations_static = list(COUGH)
|
||||
|
||||
/obj/item/dnainjector/coughmut
|
||||
name = "\improper DNA injector (Cough)"
|
||||
desc = "Will bring forth a sound of horror from your throat."
|
||||
add_mutations_static = list(COUGH)
|
||||
|
||||
/obj/item/dnainjector/antidwarf
|
||||
name = "\improper DNA injector (Anti-Dwarfism)"
|
||||
desc = "Helps you grow big and strong."
|
||||
remove_mutations_static = list(DWARFISM)
|
||||
|
||||
/obj/item/dnainjector/dwarf
|
||||
name = "\improper DNA injector (Dwarfism)"
|
||||
desc = "It's a small world after all."
|
||||
add_mutations_static = list(DWARFISM)
|
||||
|
||||
/obj/item/dnainjector/clumsymut
|
||||
name = "\improper DNA injector (Clumsy)"
|
||||
desc = "Makes clown minions."
|
||||
add_mutations_static = list(CLOWNMUT)
|
||||
|
||||
/obj/item/dnainjector/anticlumsy
|
||||
name = "\improper DNA injector (Anti-Clumsy)"
|
||||
desc = "Apply this for Security Clown."
|
||||
remove_mutations_static = list(CLOWNMUT)
|
||||
|
||||
/obj/item/dnainjector/antitour
|
||||
name = "\improper DNA injector (Anti-Tour.)"
|
||||
desc = "Will cure tourrets."
|
||||
remove_mutations_static = list(TOURETTES)
|
||||
|
||||
/obj/item/dnainjector/tourmut
|
||||
name = "\improper DNA injector (Tour.)"
|
||||
desc = "Gives you a nasty case of Tourette's."
|
||||
add_mutations_static = list(TOURETTES)
|
||||
|
||||
/obj/item/dnainjector/stuttmut
|
||||
name = "\improper DNA injector (Stutt.)"
|
||||
desc = "Makes you s-s-stuttterrr"
|
||||
add_mutations_static = list(NERVOUS)
|
||||
|
||||
/obj/item/dnainjector/antistutt
|
||||
name = "\improper DNA injector (Anti-Stutt.)"
|
||||
desc = "Fixes that speaking impairment."
|
||||
remove_mutations_static = list(NERVOUS)
|
||||
|
||||
/obj/item/dnainjector/antifire
|
||||
name = "\improper DNA injector (Anti-Fire)"
|
||||
desc = "Cures fire."
|
||||
remove_mutations_static = list(COLDRES)
|
||||
|
||||
/obj/item/dnainjector/firemut
|
||||
name = "\improper DNA injector (Fire)"
|
||||
desc = "Gives you fire."
|
||||
add_mutations_static = list(COLDRES)
|
||||
|
||||
/obj/item/dnainjector/blindmut
|
||||
name = "\improper DNA injector (Blind)"
|
||||
desc = "Makes you not see anything."
|
||||
add_mutations_static = list(BLINDMUT)
|
||||
|
||||
/obj/item/dnainjector/antiblind
|
||||
name = "\improper DNA injector (Anti-Blind)"
|
||||
desc = "IT'S A MIRACLE!!!"
|
||||
remove_mutations_static = list(BLINDMUT)
|
||||
|
||||
/obj/item/dnainjector/antitele
|
||||
name = "\improper DNA injector (Anti-Tele.)"
|
||||
desc = "Will make you not able to control your mind."
|
||||
remove_mutations_static = list(TK)
|
||||
|
||||
/obj/item/dnainjector/telemut
|
||||
name = "\improper DNA injector (Tele.)"
|
||||
desc = "Super brain man!"
|
||||
add_mutations_static = list(TK)
|
||||
|
||||
/obj/item/dnainjector/telemut/darkbundle
|
||||
name = "\improper DNA injector"
|
||||
desc = "Good. Let the hate flow through you."
|
||||
|
||||
/obj/item/dnainjector/deafmut
|
||||
name = "\improper DNA injector (Deaf)"
|
||||
desc = "Sorry, what did you say?"
|
||||
add_mutations_static = list(DEAFMUT)
|
||||
|
||||
/obj/item/dnainjector/antideaf
|
||||
name = "\improper DNA injector (Anti-Deaf)"
|
||||
desc = "Will make you hear once more."
|
||||
remove_mutations_static = list(DEAFMUT)
|
||||
|
||||
/obj/item/dnainjector/h2m
|
||||
name = "\improper DNA injector (Human > Monkey)"
|
||||
desc = "Will make you a flea bag."
|
||||
add_mutations_static = list(RACEMUT)
|
||||
|
||||
/obj/item/dnainjector/m2h
|
||||
name = "\improper DNA injector (Monkey > Human)"
|
||||
desc = "Will make you...less hairy."
|
||||
remove_mutations_static = list(RACEMUT)
|
||||
|
||||
/obj/item/dnainjector/antichameleon
|
||||
name = "\improper DNA injector (Anti-Chameleon)"
|
||||
remove_mutations_static = list(CHAMELEON)
|
||||
|
||||
/obj/item/dnainjector/chameleonmut
|
||||
name = "\improper DNA injector (Chameleon)"
|
||||
add_mutations_static = list(CHAMELEON)
|
||||
|
||||
/obj/item/dnainjector/antiwacky
|
||||
name = "\improper DNA injector (Anti-Wacky)"
|
||||
remove_mutations_static = list(WACKY)
|
||||
|
||||
/obj/item/dnainjector/wackymut
|
||||
name = "\improper DNA injector (Wacky)"
|
||||
add_mutations_static = list(WACKY)
|
||||
|
||||
/obj/item/dnainjector/antimute
|
||||
name = "\improper DNA injector (Anti-Mute)"
|
||||
remove_mutations_static = list(MUT_MUTE)
|
||||
|
||||
/obj/item/dnainjector/mutemut
|
||||
name = "\improper DNA injector (Mute)"
|
||||
add_mutations_static = list(MUT_MUTE)
|
||||
|
||||
/obj/item/dnainjector/antismile
|
||||
name = "\improper DNA injector (Anti-Smile)"
|
||||
remove_mutations_static = list(SMILE)
|
||||
|
||||
/obj/item/dnainjector/smilemut
|
||||
name = "\improper DNA injector (Smile)"
|
||||
add_mutations_static = list(SMILE)
|
||||
|
||||
/obj/item/dnainjector/unintelligablemut
|
||||
name = "\improper DNA injector (Unintelligable)"
|
||||
add_mutations_static = list(UNINTELLIGABLE)
|
||||
|
||||
/obj/item/dnainjector/antiunintelligable
|
||||
name = "\improper DNA injector (Anti-Unintelligable)"
|
||||
remove_mutations_static = list(UNINTELLIGABLE)
|
||||
|
||||
/obj/item/dnainjector/swedishmut
|
||||
name = "\improper DNA injector (Swedish)"
|
||||
add_mutations_static = list(SWEDISH)
|
||||
|
||||
/obj/item/dnainjector/antiswedish
|
||||
name = "\improper DNA injector (Anti-Swedish)"
|
||||
remove_mutations_static = list(SWEDISH)
|
||||
|
||||
/obj/item/dnainjector/chavmut
|
||||
name = "\improper DNA injector (Chav)"
|
||||
add_mutations_static = list(CHAV)
|
||||
|
||||
/obj/item/dnainjector/antichav
|
||||
name = "\improper DNA injector (Anti-Chav)"
|
||||
remove_mutations_static = list(CHAV)
|
||||
|
||||
/obj/item/dnainjector/elvismut
|
||||
name = "\improper DNA injector (Elvis)"
|
||||
add_mutations_static = list(ELVIS)
|
||||
|
||||
/obj/item/dnainjector/antielvis
|
||||
name = "\improper DNA injector (Anti-Elvis)"
|
||||
remove_mutations_static = list(ELVIS)
|
||||
|
||||
/obj/item/dnainjector/lasereyesmut
|
||||
name = "\improper DNA injector (Laser Eyes)"
|
||||
add_mutations_static = list(LASEREYES)
|
||||
|
||||
/obj/item/dnainjector/antilasereyes
|
||||
name = "\improper DNA injector (Anti-Laser Eyes)"
|
||||
remove_mutations_static = list(LASEREYES)
|
||||
|
||||
/obj/item/dnainjector/timed
|
||||
var/duration = 600
|
||||
|
||||
/obj/item/dnainjector/timed/inject(mob/living/carbon/M, mob/user)
|
||||
prepare()
|
||||
if(M.stat == DEAD) //prevents dead people from having their DNA changed
|
||||
to_chat(user, "<span class='notice'>You can't modify [M]'s DNA while [M.p_theyre()] dead.</span>")
|
||||
return FALSE
|
||||
|
||||
if(M.has_dna() && !(M.disabilities & NOCLONE))
|
||||
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
|
||||
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
|
||||
var/endtime = world.time+duration
|
||||
for(var/datum/mutation/human/HM in remove_mutations)
|
||||
if(HM.name == RACEMUT)
|
||||
if(ishuman(M))
|
||||
continue
|
||||
M = HM.force_lose(M)
|
||||
else
|
||||
HM.force_lose(M)
|
||||
for(var/datum/mutation/human/HM in add_mutations)
|
||||
if((HM in M.dna.mutations) && !(M.dna.temporary_mutations[HM.name]))
|
||||
continue //Skip permanent mutations we already have.
|
||||
if(HM.name == RACEMUT && ishuman(M))
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] <span class='danger'>(MONKEY)</span>")
|
||||
log_msg += " (MONKEY)"
|
||||
M = HM.force_give(M)
|
||||
else
|
||||
HM.force_give(M)
|
||||
M.dna.temporary_mutations[HM.name] = endtime
|
||||
if(fields)
|
||||
if(fields["name"] && fields["UE"] && fields["blood_type"])
|
||||
if(!M.dna.previous["name"])
|
||||
M.dna.previous["name"] = M.real_name
|
||||
if(!M.dna.previous["UE"])
|
||||
M.dna.previous["UE"] = M.dna.unique_enzymes
|
||||
if(!M.dna.previous["blood_type"])
|
||||
M.dna.previous["blood_type"] = M.dna.blood_type
|
||||
M.real_name = fields["name"]
|
||||
M.dna.unique_enzymes = fields["UE"]
|
||||
M.name = M.real_name
|
||||
M.dna.blood_type = fields["blood_type"]
|
||||
M.dna.temporary_mutations[UE_CHANGED] = endtime
|
||||
if(fields["UI"]) //UI+UE
|
||||
if(!M.dna.previous["UI"])
|
||||
M.dna.previous["UI"] = M.dna.uni_identity
|
||||
M.dna.uni_identity = merge_text(M.dna.uni_identity, fields["UI"])
|
||||
M.updateappearance(mutations_overlay_update=1)
|
||||
M.dna.temporary_mutations[UI_CHANGED] = endtime
|
||||
log_attack(log_msg)
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
|
||||
/obj/item/dnainjector/timed/hulk
|
||||
name = "\improper DNA injector (Hulk)"
|
||||
desc = "This will make you big and strong, but give you a bad skin condition."
|
||||
add_mutations_static = list(HULK)
|
||||
|
||||
/obj/item/dnainjector/timed/h2m
|
||||
name = "\improper DNA injector (Human > Monkey)"
|
||||
desc = "Will make you a flea bag."
|
||||
add_mutations_static = list(RACEMUT)
|
||||
|
||||
@@ -405,3 +405,14 @@
|
||||
attack_verb = list("poked", "impaled", "pierced", "jabbed")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
sharpness = IS_SHARP
|
||||
|
||||
/obj/item/nullrod/egyptian
|
||||
name = "egyptian staff"
|
||||
desc = "A tutorial in mummification is carved into the staff. You could probably follow the steps yourself if you had some bandages."
|
||||
icon = 'icons/obj/guns/magic.dmi'
|
||||
icon_state = "pharoah_sceptre"
|
||||
item_state = "pharoah_sceptre"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
attack_verb = list("bashes", "smacks", "whacks")
|
||||
|
||||
@@ -1,187 +1,188 @@
|
||||
/obj/machinery/implantchair
|
||||
name = "mindshield implanter"
|
||||
desc = "Used to implant occupants with mindshield implants."
|
||||
icon = 'icons/obj/machines/implantchair.dmi'
|
||||
icon_state = "implantchair"
|
||||
density = TRUE
|
||||
opacity = 0
|
||||
anchored = TRUE
|
||||
|
||||
var/ready = TRUE
|
||||
var/replenishing = FALSE
|
||||
|
||||
var/ready_implants = 5
|
||||
var/max_implants = 5
|
||||
var/injection_cooldown = 600
|
||||
var/replenish_cooldown = 6000
|
||||
var/implant_type = /obj/item/implant/mindshield
|
||||
var/auto_inject = FALSE
|
||||
var/auto_replenish = TRUE
|
||||
var/special = FALSE
|
||||
var/special_name = "special function"
|
||||
|
||||
/obj/machinery/implantchair/Initialize()
|
||||
. = ..()
|
||||
open_machine()
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/machinery/implantchair/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.notcontained_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "implantchair", name, 375, 280, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
|
||||
/obj/machinery/implantchair/ui_data()
|
||||
var/list/data = list()
|
||||
data["occupied"] = occupant ? 1 : 0
|
||||
data["open"] = state_open
|
||||
|
||||
data["occupant"] = list()
|
||||
if(occupant)
|
||||
var/mob/living/mob_occupant = occupant
|
||||
data["occupant"]["name"] = mob_occupant.name
|
||||
data["occupant"]["stat"] = mob_occupant.stat
|
||||
|
||||
data["special_name"] = special ? special_name : null
|
||||
data["ready_implants"] = ready_implants
|
||||
data["ready"] = ready
|
||||
data["replenishing"] = replenishing
|
||||
|
||||
return data
|
||||
|
||||
/obj/machinery/implantchair/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
switch(action)
|
||||
if("door")
|
||||
if(state_open)
|
||||
close_machine()
|
||||
else
|
||||
open_machine()
|
||||
. = TRUE
|
||||
if("implant")
|
||||
implant(occupant,usr)
|
||||
. = TRUE
|
||||
|
||||
/obj/machinery/implantchair/proc/implant(mob/living/M,mob/user)
|
||||
if (!istype(M))
|
||||
return
|
||||
if(!ready_implants || !ready)
|
||||
return
|
||||
if(implant_action(M,user))
|
||||
ready_implants--
|
||||
if(!replenishing && auto_replenish)
|
||||
replenishing = TRUE
|
||||
addtimer(CALLBACK(src,"replenish"),replenish_cooldown)
|
||||
if(injection_cooldown > 0)
|
||||
ready = FALSE
|
||||
addtimer(CALLBACK(src,"set_ready"),injection_cooldown)
|
||||
else
|
||||
playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 25, 1)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/implantchair/proc/implant_action(mob/living/M)
|
||||
var/obj/item/implant/I = new implant_type
|
||||
if(I.implant(M))
|
||||
visible_message("<span class='warning'>[M] has been implanted by the [name].</span>")
|
||||
return 1
|
||||
|
||||
/obj/machinery/implantchair/update_icon()
|
||||
icon_state = initial(icon_state)
|
||||
if(state_open)
|
||||
icon_state += "_open"
|
||||
if(occupant)
|
||||
icon_state += "_occupied"
|
||||
if(ready)
|
||||
add_overlay("ready")
|
||||
else
|
||||
cut_overlays()
|
||||
|
||||
/obj/machinery/implantchair/proc/replenish()
|
||||
if(ready_implants < max_implants)
|
||||
ready_implants++
|
||||
if(ready_implants < max_implants)
|
||||
addtimer(CALLBACK(src,"replenish"),replenish_cooldown)
|
||||
else
|
||||
replenishing = FALSE
|
||||
|
||||
/obj/machinery/implantchair/proc/set_ready()
|
||||
ready = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/implantchair/container_resist(mob/living/user)
|
||||
if(state_open)
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
to_chat(user, "<span class='notice'>You lean on the back of [src] and start pushing the door open... (this will take about about a minute.)</span>")
|
||||
audible_message("<span class='italics'>You hear a metallic creaking from [src]!</span>",hearing_distance = 2)
|
||||
|
||||
if(do_after(user, 600, target = src))
|
||||
if(!user || user.stat != CONSCIOUS || user.loc != src || state_open)
|
||||
return
|
||||
visible_message("<span class='warning'>[user] successfully broke out of [src]!</span>")
|
||||
to_chat(user, "<span class='notice'>You successfully break out of [src]!</span>")
|
||||
open_machine()
|
||||
|
||||
/obj/machinery/implantchair/relaymove(mob/user)
|
||||
container_resist(user)
|
||||
|
||||
/obj/machinery/implantchair/MouseDrop_T(mob/target, mob/user)
|
||||
if(user.stat || user.lying || !Adjacent(user) || !user.Adjacent(target) || !isliving(target) || !user.IsAdvancedToolUser())
|
||||
return
|
||||
close_machine(target)
|
||||
|
||||
/obj/machinery/implantchair/close_machine(mob/living/user)
|
||||
if((isnull(user) || istype(user)) && state_open)
|
||||
..(user)
|
||||
if(auto_inject && ready && ready_implants > 0)
|
||||
implant(user,null)
|
||||
|
||||
/obj/machinery/implantchair/genepurge
|
||||
name = "Genetic purifier"
|
||||
desc = "Used to purge human genome of foreign influences"
|
||||
special = TRUE
|
||||
special_name = "Purge genome"
|
||||
injection_cooldown = 0
|
||||
replenish_cooldown = 300
|
||||
|
||||
/obj/machinery/implantchair/genepurge/implant_action(mob/living/carbon/human/H,mob/user)
|
||||
if(!istype(H))
|
||||
return 0
|
||||
H.set_species(/datum/species/human, 1)//lizards go home
|
||||
purrbation_remove(H)//remove cats
|
||||
H.dna.remove_all_mutations()//hulks out
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/implantchair/brainwash
|
||||
name = "Neural Imprinter"
|
||||
desc = "Used to <s>indoctrinate</s> rehabilitate hardened recidivists."
|
||||
special_name = "Imprint"
|
||||
injection_cooldown = 3000
|
||||
auto_inject = FALSE
|
||||
auto_replenish = FALSE
|
||||
special = TRUE
|
||||
var/objective = "Obey the law. Praise Nanotrasen."
|
||||
var/custom = FALSE
|
||||
|
||||
/obj/machinery/implantchair/brainwash/implant_action(mob/living/C,mob/user)
|
||||
if(!istype(C) || !C.mind) // I don't know how this makes any sense for silicons but laws trump objectives anyway.
|
||||
return 0
|
||||
if(custom)
|
||||
if(!user || !user.Adjacent(src))
|
||||
return 0
|
||||
objective = stripped_input(usr,"What order do you want to imprint on [C]?","Enter the order","",120)
|
||||
message_admins("[key_name_admin(user)] set brainwash machine objective to '[objective]'.")
|
||||
log_game("[key_name_admin(user)] set brainwash machine objective to '[objective]'.")
|
||||
var/datum/objective/custom_objective = new/datum/objective(objective)
|
||||
custom_objective.owner = C.mind
|
||||
C.mind.objectives += custom_objective
|
||||
C.mind.announce_objectives()
|
||||
message_admins("[key_name_admin(user)] brainwashed [key_name_admin(C)] with objective '[objective]'.")
|
||||
log_game("[key_name_admin(user)] brainwashed [key_name_admin(C)] with objective '[objective]'.")
|
||||
return 1
|
||||
|
||||
/obj/machinery/implantchair
|
||||
name = "mindshield implanter"
|
||||
desc = "Used to implant occupants with mindshield implants."
|
||||
icon = 'icons/obj/machines/implantchair.dmi'
|
||||
icon_state = "implantchair"
|
||||
density = TRUE
|
||||
opacity = 0
|
||||
anchored = TRUE
|
||||
|
||||
var/ready = TRUE
|
||||
var/replenishing = FALSE
|
||||
|
||||
var/ready_implants = 5
|
||||
var/max_implants = 5
|
||||
var/injection_cooldown = 600
|
||||
var/replenish_cooldown = 6000
|
||||
var/implant_type = /obj/item/implant/mindshield
|
||||
var/auto_inject = FALSE
|
||||
var/auto_replenish = TRUE
|
||||
var/special = FALSE
|
||||
var/special_name = "special function"
|
||||
var/message_cooldown
|
||||
var/breakout_time = 1
|
||||
|
||||
/obj/machinery/implantchair/Initialize()
|
||||
. = ..()
|
||||
open_machine()
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/machinery/implantchair/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.notcontained_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "implantchair", name, 375, 280, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
|
||||
/obj/machinery/implantchair/ui_data()
|
||||
var/list/data = list()
|
||||
data["occupied"] = occupant ? 1 : 0
|
||||
data["open"] = state_open
|
||||
|
||||
data["occupant"] = list()
|
||||
if(occupant)
|
||||
var/mob/living/mob_occupant = occupant
|
||||
data["occupant"]["name"] = mob_occupant.name
|
||||
data["occupant"]["stat"] = mob_occupant.stat
|
||||
|
||||
data["special_name"] = special ? special_name : null
|
||||
data["ready_implants"] = ready_implants
|
||||
data["ready"] = ready
|
||||
data["replenishing"] = replenishing
|
||||
|
||||
return data
|
||||
|
||||
/obj/machinery/implantchair/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
switch(action)
|
||||
if("door")
|
||||
if(state_open)
|
||||
close_machine()
|
||||
else
|
||||
open_machine()
|
||||
. = TRUE
|
||||
if("implant")
|
||||
implant(occupant,usr)
|
||||
. = TRUE
|
||||
|
||||
/obj/machinery/implantchair/proc/implant(mob/living/M,mob/user)
|
||||
if (!istype(M))
|
||||
return
|
||||
if(!ready_implants || !ready)
|
||||
return
|
||||
if(implant_action(M,user))
|
||||
ready_implants--
|
||||
if(!replenishing && auto_replenish)
|
||||
replenishing = TRUE
|
||||
addtimer(CALLBACK(src,"replenish"),replenish_cooldown)
|
||||
if(injection_cooldown > 0)
|
||||
ready = FALSE
|
||||
addtimer(CALLBACK(src,"set_ready"),injection_cooldown)
|
||||
else
|
||||
playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 25, 1)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/implantchair/proc/implant_action(mob/living/M)
|
||||
var/obj/item/implant/I = new implant_type
|
||||
if(I.implant(M))
|
||||
visible_message("<span class='warning'>[M] has been implanted by the [name].</span>")
|
||||
return 1
|
||||
|
||||
/obj/machinery/implantchair/update_icon()
|
||||
icon_state = initial(icon_state)
|
||||
if(state_open)
|
||||
icon_state += "_open"
|
||||
if(occupant)
|
||||
icon_state += "_occupied"
|
||||
if(ready)
|
||||
add_overlay("ready")
|
||||
else
|
||||
cut_overlays()
|
||||
|
||||
/obj/machinery/implantchair/proc/replenish()
|
||||
if(ready_implants < max_implants)
|
||||
ready_implants++
|
||||
if(ready_implants < max_implants)
|
||||
addtimer(CALLBACK(src,"replenish"),replenish_cooldown)
|
||||
else
|
||||
replenishing = FALSE
|
||||
|
||||
/obj/machinery/implantchair/proc/set_ready()
|
||||
ready = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/implantchair/container_resist(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
user.visible_message("<span class='notice'>You see [user] kicking against the door of [src]!</span>", \
|
||||
"<span class='notice'>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"].)</span>", \
|
||||
"<span class='italics'>You hear a metallic creaking from [src].</span>")
|
||||
if(do_after(user,(breakout_time*60*10), target = src)) //minutes * 60seconds * 10deciseconds
|
||||
if(!user || user.stat != CONSCIOUS || user.loc != src || state_open)
|
||||
return
|
||||
user.visible_message("<span class='warning'>[user] successfully broke out of [src]!</span>", \
|
||||
"<span class='notice'>You successfully break out of [src]!</span>")
|
||||
open_machine()
|
||||
|
||||
/obj/machinery/implantchair/relaymove(mob/user)
|
||||
if(message_cooldown <= world.time)
|
||||
message_cooldown = world.time + 50
|
||||
to_chat(user, "<span class='warning'>[src]'s door won't budge!</span>")
|
||||
|
||||
/obj/machinery/implantchair/MouseDrop_T(mob/target, mob/user)
|
||||
if(user.stat || user.lying || !Adjacent(user) || !user.Adjacent(target) || !isliving(target) || !user.IsAdvancedToolUser())
|
||||
return
|
||||
close_machine(target)
|
||||
|
||||
/obj/machinery/implantchair/close_machine(mob/living/user)
|
||||
if((isnull(user) || istype(user)) && state_open)
|
||||
..(user)
|
||||
if(auto_inject && ready && ready_implants > 0)
|
||||
implant(user,null)
|
||||
|
||||
/obj/machinery/implantchair/genepurge
|
||||
name = "Genetic purifier"
|
||||
desc = "Used to purge human genome of foreign influences"
|
||||
special = TRUE
|
||||
special_name = "Purge genome"
|
||||
injection_cooldown = 0
|
||||
replenish_cooldown = 300
|
||||
|
||||
/obj/machinery/implantchair/genepurge/implant_action(mob/living/carbon/human/H,mob/user)
|
||||
if(!istype(H))
|
||||
return 0
|
||||
H.set_species(/datum/species/human, 1)//lizards go home
|
||||
purrbation_remove(H)//remove cats
|
||||
H.dna.remove_all_mutations()//hulks out
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/implantchair/brainwash
|
||||
name = "Neural Imprinter"
|
||||
desc = "Used to <s>indoctrinate</s> rehabilitate hardened recidivists."
|
||||
special_name = "Imprint"
|
||||
injection_cooldown = 3000
|
||||
auto_inject = FALSE
|
||||
auto_replenish = FALSE
|
||||
special = TRUE
|
||||
var/objective = "Obey the law. Praise Nanotrasen."
|
||||
var/custom = FALSE
|
||||
|
||||
/obj/machinery/implantchair/brainwash/implant_action(mob/living/C,mob/user)
|
||||
if(!istype(C) || !C.mind) // I don't know how this makes any sense for silicons but laws trump objectives anyway.
|
||||
return 0
|
||||
if(custom)
|
||||
if(!user || !user.Adjacent(src))
|
||||
return 0
|
||||
objective = stripped_input(usr,"What order do you want to imprint on [C]?","Enter the order","",120)
|
||||
message_admins("[key_name_admin(user)] set brainwash machine objective to '[objective]'.")
|
||||
log_game("[key_name_admin(user)] set brainwash machine objective to '[objective]'.")
|
||||
var/datum/objective/custom_objective = new/datum/objective(objective)
|
||||
custom_objective.owner = C.mind
|
||||
C.mind.objectives += custom_objective
|
||||
C.mind.announce_objectives()
|
||||
message_admins("[key_name_admin(user)] brainwashed [key_name_admin(C)] with objective '[objective]'.")
|
||||
log_game("[key_name_admin(user)] brainwashed [key_name_admin(C)] with objective '[objective]'.")
|
||||
return 1
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
//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 = "pinpointer"
|
||||
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 //The thing we're searching for
|
||||
var/minimum_range = 0 //at what range the pinpointer declares you to be at your destination
|
||||
var/alert = FALSE // TRUE to display things more seriously
|
||||
|
||||
/obj/item/pinpointer/Initialize()
|
||||
. = ..()
|
||||
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("<span class='notice'>[user] [active ? "" : "de"]activates their pinpointer.</span>", "<span class='notice'>You [active ? "" : "de"]activate your pinpointer.</span>")
|
||||
playsound(src, 'sound/items/screwdriver2.ogg', 50, 1)
|
||||
if(active)
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
else
|
||||
target = null
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/pinpointer/process()
|
||||
if(!active)
|
||||
return PROCESS_KILL
|
||||
scan_for_target()
|
||||
update_icon()
|
||||
|
||||
/obj/item/pinpointer/proc/scan_for_target()
|
||||
return
|
||||
|
||||
/obj/item/pinpointer/update_icon()
|
||||
cut_overlays()
|
||||
if(!active)
|
||||
return
|
||||
if(!target)
|
||||
add_overlay("pinon[alert ? "alert" : ""]null")
|
||||
var/turf/here = get_turf(src)
|
||||
var/turf/there = get_turf(target)
|
||||
if(here.z != there.z)
|
||||
add_overlay("pinon[alert ? "alert" : ""]null")
|
||||
return
|
||||
if(get_dist_euclidian(here,there) <= minimum_range)
|
||||
add_overlay("pinon[alert ? "alert" : ""]direct")
|
||||
else
|
||||
setDir(get_dir(here, there))
|
||||
switch(get_dist(here, there))
|
||||
if(1 to 8)
|
||||
add_overlay("pinon[alert ? "alert" : "close"]")
|
||||
if(9 to 16)
|
||||
add_overlay("pinon[alert ? "alert" : "medium"]")
|
||||
if(16 to INFINITY)
|
||||
add_overlay("pinon[alert ? "alert" : "far"]")
|
||||
|
||||
/obj/item/pinpointer/crew // A replacement for the old crew monitoring consoles
|
||||
name = "crew pinpointer"
|
||||
desc = "A handheld tracking device that points to crew suit sensors."
|
||||
icon_state = "pinpointer_crew"
|
||||
|
||||
/obj/item/pinpointer/crew/proc/trackable(mob/living/carbon/human/H)
|
||||
var/turf/here = get_turf(src)
|
||||
if((H.z == 0 || H.z == here.z) && istype(H.w_uniform, /obj/item/clothing/under))
|
||||
var/obj/item/clothing/under/U = H.w_uniform
|
||||
|
||||
// Suit sensors must be on maximum.
|
||||
if(!U.has_sensor || U.sensor_mode < SENSOR_COORDS)
|
||||
return FALSE
|
||||
|
||||
var/turf/there = get_turf(H)
|
||||
return (H.z != 0 || (there && there.z == H.z))
|
||||
|
||||
return FALSE
|
||||
|
||||
/obj/item/pinpointer/crew/attack_self(mob/living/user)
|
||||
if(active)
|
||||
active = FALSE
|
||||
user.visible_message("<span class='notice'>[user] deactivates their pinpointer.</span>", "<span class='notice'>You deactivate your pinpointer.</span>")
|
||||
playsound(src, 'sound/items/screwdriver2.ogg', 50, 1)
|
||||
target = null //Restarting the pinpointer forces a target reset
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
var/list/name_counts = list()
|
||||
var/list/names = list()
|
||||
|
||||
for(var/mob/living/carbon/human/H in GLOB.mob_list)
|
||||
if(!trackable(H))
|
||||
continue
|
||||
|
||||
var/crewmember_name = "Unknown"
|
||||
if(H.wear_id)
|
||||
var/obj/item/card/id/I = H.wear_id.GetID()
|
||||
crewmember_name = I.registered_name
|
||||
|
||||
while(crewmember_name in name_counts)
|
||||
name_counts[crewmember_name]++
|
||||
crewmember_name = text("[] ([])", crewmember_name, name_counts[crewmember_name])
|
||||
names[crewmember_name] = H
|
||||
name_counts[crewmember_name] = 1
|
||||
|
||||
if(!names.len)
|
||||
user.visible_message("<span class='notice'>[user]'s pinpointer fails to detect a signal.</span>", "<span class='notice'>Your pinpointer fails to detect a signal.</span>")
|
||||
return
|
||||
|
||||
var/A = input(user, "Person to track", "Pinpoint") in names
|
||||
if(!A || QDELETED(src) || !user || !user.is_holding(src) || user.incapacitated())
|
||||
return
|
||||
|
||||
target = names[A]
|
||||
active = TRUE
|
||||
user.visible_message("<span class='notice'>[user] activates their pinpointer.</span>", "<span class='notice'>You activate your pinpointer.</span>")
|
||||
playsound(src, 'sound/items/screwdriver2.ogg', 50, 1)
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/pinpointer/crew/scan_for_target()
|
||||
if(target)
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(!trackable(H))
|
||||
target = null
|
||||
if(!target) //target can be set to null from above code, or elsewhere
|
||||
active = FALSE
|
||||
|
||||
/obj/item/pinpointer/process()
|
||||
if(!active)
|
||||
return PROCESS_KILL
|
||||
scan_for_target()
|
||||
update_icon()
|
||||
|
||||
@@ -1,27 +1,201 @@
|
||||
/obj/item/banner
|
||||
name = "banner"
|
||||
desc = "A banner with Nanotrasen's logo on it."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "banner"
|
||||
item_state = "banner"
|
||||
force = 8
|
||||
attack_verb = list("forcefully inspired", "violently encouraged", "relentlessly galvanized")
|
||||
lefthand_file = 'icons/mob/inhands/equipment/banners_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/banners_righthand.dmi'
|
||||
desc = "A banner with Nanotrasen's logo on it."
|
||||
var/moralecooldown = 0
|
||||
var/moralewait = 600
|
||||
var/inspiration_available = TRUE //If this banner can be used to inspire crew
|
||||
var/morale_time = 0
|
||||
var/morale_cooldown = 600 //How many deciseconds between uses
|
||||
var/list/job_loyalties //Mobs with any of these assigned roles will be inspired
|
||||
var/list/role_loyalties //Mobs with any of these special roles will be inspired
|
||||
var/warcry
|
||||
|
||||
/obj/item/banner/examine(mob/user)
|
||||
..()
|
||||
if(inspiration_available)
|
||||
to_chat(user, "<span class='notice'>Activate it in your hand to inspire nearby allies of this banner's allegiance!</span>")
|
||||
|
||||
/obj/item/banner/attack_self(mob/living/carbon/human/user)
|
||||
if(moralecooldown + moralewait > world.time)
|
||||
if(!inspiration_available)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You increase the morale of your fellows!</span>")
|
||||
moralecooldown = world.time
|
||||
if(morale_time > world.time)
|
||||
to_chat(user, "<span class='warning'>You aren't feeling inspired enough to flourish [src] again yet.</span>")
|
||||
return
|
||||
user.visible_message("<span class='big notice'>[user] flourishes [src]!</span>", \
|
||||
"<span class='notice'>You raise [src] skywards, inspiring your allies!</span>")
|
||||
playsound(src, "rustle", 100, FALSE)
|
||||
if(warcry)
|
||||
user.say("[warcry]")
|
||||
var/old_transform = user.transform
|
||||
user.transform *= 1.2
|
||||
animate(user, transform = old_transform, time = 10)
|
||||
morale_time = world.time + morale_cooldown
|
||||
|
||||
for(var/mob/living/carbon/human/H in range(4,get_turf(src)))
|
||||
to_chat(H, "<span class='notice'>Your morale is increased by [user]'s banner!</span>")
|
||||
H.adjustBruteLoss(-15)
|
||||
H.adjustFireLoss(-15)
|
||||
H.AdjustStun(-40)
|
||||
H.AdjustKnockdown(-40)
|
||||
H.AdjustUnconscious(-40)
|
||||
var/list/inspired = list()
|
||||
var/has_job_loyalties = LAZYLEN(job_loyalties)
|
||||
var/has_role_loyalties = LAZYLEN(role_loyalties)
|
||||
inspired += user //The user is always inspired, regardless of loyalties
|
||||
for(var/mob/living/carbon/human/H in range(4, get_turf(src)))
|
||||
if(H.stat == DEAD || H == user)
|
||||
continue
|
||||
if(H.mind && (has_job_loyalties || has_role_loyalties))
|
||||
if(has_job_loyalties && H.mind.assigned_role in job_loyalties)
|
||||
inspired += H
|
||||
else if(has_role_loyalties && H.mind.special_role in role_loyalties)
|
||||
inspired += H
|
||||
else if(check_inspiration(H))
|
||||
inspired += H
|
||||
|
||||
for(var/V in inspired)
|
||||
var/mob/living/carbon/human/H = V
|
||||
if(H != user)
|
||||
to_chat(H, "<span class='notice'>Your confidence surges as [user] flourishes [user.p_their()] [name]!</span>")
|
||||
inspiration(H)
|
||||
special_inspiration(H)
|
||||
|
||||
/obj/item/banner/proc/check_inspiration(mob/living/carbon/human/H) //Banner-specific conditions for being eligible
|
||||
return
|
||||
|
||||
/obj/item/banner/proc/inspiration(mob/living/carbon/human/H)
|
||||
H.adjustBruteLoss(-15)
|
||||
H.adjustFireLoss(-15)
|
||||
H.AdjustStun(-40)
|
||||
H.AdjustKnockdown(-40)
|
||||
H.AdjustUnconscious(-40)
|
||||
playsound(H, 'sound/magic/staff_healing.ogg', 25, FALSE)
|
||||
|
||||
/obj/item/banner/proc/special_inspiration(mob/living/carbon/human/H) //Any banner-specific inspiration effects go here
|
||||
return
|
||||
|
||||
/obj/item/banner/security
|
||||
name = "securistan banner"
|
||||
desc = "The banner of Securistan, ruling the station with an iron fist."
|
||||
icon_state = "banner_security"
|
||||
job_loyalties = list("Security Officer", "Warden", "Detective", "Head of Security")
|
||||
warcry = "EVERYONE DOWN ON THE GROUND!!"
|
||||
|
||||
/obj/item/banner/security/mundane
|
||||
inspiration_available = FALSE
|
||||
|
||||
/datum/crafting_recipe/security_banner
|
||||
name = "Securistan Banner"
|
||||
result = /obj/item/banner/security/mundane
|
||||
time = 40
|
||||
reqs = list(/obj/item/stack/rods = 2,
|
||||
/obj/item/clothing/under/rank/security = 1)
|
||||
category = CAT_MISC
|
||||
|
||||
/obj/item/banner/medical
|
||||
name = "meditopia banner"
|
||||
desc = "The banner of Meditopia, generous benefactors that cure wounds and shelter the weak."
|
||||
icon_state = "banner_medical"
|
||||
job_loyalties = list("Medical Doctor", "Chemist", "Geneticist", "Virologist", "Chief Medical Officer")
|
||||
warcry = "No wounds cannot be healed!"
|
||||
|
||||
/obj/item/banner/medical/mundane
|
||||
inspiration_available = FALSE
|
||||
|
||||
/obj/item/banner/medical/check_inspiration(mob/living/carbon/human/H)
|
||||
return H.stat //Meditopia is moved to help those in need
|
||||
|
||||
/datum/crafting_recipe/medical_banner
|
||||
name = "Meditopia Banner"
|
||||
result = /obj/item/banner/medical/mundane
|
||||
time = 40
|
||||
reqs = list(/obj/item/stack/rods = 2,
|
||||
/obj/item/clothing/under/rank/medical = 1)
|
||||
category = CAT_MISC
|
||||
|
||||
/obj/item/banner/medical/special_inspiration(mob/living/carbon/human/H)
|
||||
H.adjustToxLoss(-15)
|
||||
H.setOxyLoss(0)
|
||||
H.reagents.add_reagent("inaprovaline", 5)
|
||||
|
||||
/obj/item/banner/science
|
||||
name = "sciencia banner"
|
||||
desc = "The banner of Sciencia, bold and daring thaumaturges and researchers that take the path less traveled."
|
||||
icon_state = "banner_science"
|
||||
job_loyalties = list("Scientist", "Roboticist", "Research Director")
|
||||
warcry = "For Cuban Pete!"
|
||||
|
||||
/obj/item/banner/science/mundane
|
||||
inspiration_available = FALSE
|
||||
|
||||
/obj/item/banner/science/check_inspiration(mob/living/carbon/human/H)
|
||||
return H.on_fire //Sciencia is pleased by dedication to the art of Toxins
|
||||
|
||||
/datum/crafting_recipe/science_banner
|
||||
name = "Sciencia Banner"
|
||||
result = /obj/item/banner/science/mundane
|
||||
time = 40
|
||||
reqs = list(/obj/item/stack/rods = 2,
|
||||
/obj/item/clothing/under/rank/scientist = 1)
|
||||
category = CAT_MISC
|
||||
|
||||
/obj/item/banner/cargo
|
||||
name = "cargonia banner"
|
||||
desc = "The banner of the eternal Cargonia, with the mystical power of conjuring any object into existence."
|
||||
icon_state = "banner_cargo"
|
||||
job_loyalties = list("Cargo Technician", "Shaft Miner", "Quartermaster")
|
||||
warcry = "Hail Cargonia!"
|
||||
|
||||
/obj/item/banner/cargo/mundane
|
||||
inspiration_available = FALSE
|
||||
|
||||
/datum/crafting_recipe/cargo_banner
|
||||
name = "Cargonia Banner"
|
||||
result = /obj/item/banner/cargo/mundane
|
||||
time = 40
|
||||
reqs = list(/obj/item/stack/rods = 2,
|
||||
/obj/item/clothing/under/rank/cargotech = 1)
|
||||
category = CAT_MISC
|
||||
|
||||
/obj/item/banner/engineering
|
||||
name = "engitopia banner"
|
||||
desc = "The banner of Engitopia, wielders of limitless power."
|
||||
icon_state = "banner_engineering"
|
||||
job_loyalties = list("Station Engineer", "Atmospheric Technician", "Chief Engineer")
|
||||
warcry = "All hail lord Singuloth!!"
|
||||
|
||||
/obj/item/banner/engineering/mundane
|
||||
inspiration_available = FALSE
|
||||
|
||||
/obj/item/banner/engineering/special_inspiration(mob/living/carbon/human/H)
|
||||
H.radiation = 0
|
||||
|
||||
/datum/crafting_recipe/engineering_banner
|
||||
name = "Engitopia Banner"
|
||||
result = /obj/item/banner/engineering/mundane
|
||||
time = 40
|
||||
reqs = list(/obj/item/stack/rods = 2,
|
||||
/obj/item/clothing/under/rank/engineer = 1)
|
||||
category = CAT_MISC
|
||||
|
||||
/obj/item/banner/command
|
||||
name = "command banner"
|
||||
desc = "The banner of Command, a staunch and ancient line of bueraucratic kings and queens."
|
||||
//No icon state here since the default one is the NT banner
|
||||
job_loyalties = list("Captain", "Head of Personnel", "Chief Engineer", "Head of Security", "Research Director", "Chief Medical Officer")
|
||||
warcry = "Hail Nanotrasen!"
|
||||
|
||||
/obj/item/banner/command/mundane
|
||||
inspiration_available = FALSE
|
||||
|
||||
/obj/item/banner/command/check_inspiration(mob/living/carbon/human/H)
|
||||
return H.isloyal() //Command is stalwart but rewards their allies.
|
||||
|
||||
/datum/crafting_recipe/command_banner
|
||||
name = "Command Banner"
|
||||
result = /obj/item/banner/command/mundane
|
||||
time = 40
|
||||
reqs = list(/obj/item/stack/rods = 2,
|
||||
/obj/item/clothing/under/captainparade = 1)
|
||||
category = CAT_MISC
|
||||
|
||||
/obj/item/banner/red
|
||||
name = "red banner"
|
||||
|
||||
@@ -32,6 +32,13 @@ GLOBAL_LIST_INIT(human_recipes, list( \
|
||||
singular_name = "corgi hide piece"
|
||||
icon_state = "sheet-corgi"
|
||||
|
||||
/obj/item/stack/sheet/animalhide/gondola
|
||||
name = "gondola hide"
|
||||
desc = "The extremely valuable by-product of gondola hunting."
|
||||
singular_name = "gondola hide piece"
|
||||
icon_state = "sheet-gondola"
|
||||
|
||||
|
||||
GLOBAL_LIST_INIT(corgi_recipes, list ( \
|
||||
new/datum/stack_recipe("corgi costume", /obj/item/clothing/suit/hooded/ian_costume, 3), \
|
||||
))
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
if(quickdraw)
|
||||
to_chat(user, "<span class='notice'>You discreetly slip [W] into [src]. Alt-click [src] to remove it.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You discreetly slip [W] into [src].")
|
||||
to_chat(user, "<span class='notice'>You discreetly slip [W] into [src].</span>")
|
||||
|
||||
/obj/item/storage/internal/pocket/big
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
+790
-790
File diff suppressed because it is too large
Load Diff
@@ -487,7 +487,7 @@
|
||||
righthand_file = 'icons/mob/inhands/weapons/chainsaw_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
force = 13
|
||||
var/force_on = 21
|
||||
var/force_on = 24
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
throwforce = 13
|
||||
throw_speed = 2
|
||||
|
||||
@@ -1,81 +1,87 @@
|
||||
/obj/item/vending_refill
|
||||
name = "resupply canister"
|
||||
var/machine_name = "Generic"
|
||||
|
||||
icon = 'icons/obj/vending_restock.dmi'
|
||||
icon_state = "refill_snack"
|
||||
item_state = "restock_unit"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
force = 7
|
||||
throwforce = 10
|
||||
throw_speed = 1
|
||||
throw_range = 7
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 70, acid = 30)
|
||||
var/charges = list(0, 0, 0) //how many restocking "charges" the refill has for standard/contraband/coin products
|
||||
var/init_charges = list(0, 0, 0)
|
||||
|
||||
|
||||
/obj/item/vending_refill/New(amt = -1)
|
||||
..()
|
||||
name = "\improper [machine_name] restocking unit"
|
||||
if(isnum(amt) && amt > -1)
|
||||
charges[1] = amt
|
||||
|
||||
/obj/item/vending_refill/examine(mob/user)
|
||||
..()
|
||||
if(charges[1] > 0)
|
||||
to_chat(user, "It can restock [charges[1]+charges[2]+charges[3]] item(s).")
|
||||
else
|
||||
to_chat(user, "It's empty!")
|
||||
|
||||
//NOTE I decided to go for about 1/3 of a machine's capacity
|
||||
|
||||
/obj/item/vending_refill/boozeomat
|
||||
machine_name = "Booze-O-Mat"
|
||||
icon_state = "refill_booze"
|
||||
charges = list(54, 4, 0)//of 159 standard, 12 contraband
|
||||
init_charges = list(54, 4, 0)
|
||||
|
||||
/obj/item/vending_refill/coffee
|
||||
machine_name = "Solar's Best Hot Drinks"
|
||||
icon_state = "refill_joe"
|
||||
charges = list(25, 4, 0)//of 75 standard, 12 contraband
|
||||
init_charges = list(25, 4, 0)
|
||||
|
||||
/obj/item/vending_refill/snack
|
||||
machine_name = "Getmore Chocolate Corp"
|
||||
charges = list(12, 2, 0)//of 36 standard, 6 contraband
|
||||
init_charges = list(12, 2, 0)
|
||||
|
||||
/obj/item/vending_refill/cola
|
||||
machine_name = "Robust Softdrinks"
|
||||
icon_state = "refill_cola"
|
||||
charges = list(30, 4, 1)//of 90 standard, 12 contraband, 1 premium
|
||||
init_charges = list(30, 4, 1)
|
||||
|
||||
/obj/item/vending_refill/cigarette
|
||||
machine_name = "ShadyCigs Deluxe"
|
||||
icon_state = "refill_smoke"
|
||||
charges = list(12, 3, 2)// of 36 standard, 9 contraband, 6 premium
|
||||
init_charges = list(12, 3, 2)
|
||||
|
||||
/obj/item/vending_refill/autodrobe
|
||||
machine_name = "AutoDrobe"
|
||||
icon_state = "refill_costume"
|
||||
charges = list(32, 2, 3)// of 96 standard, 6 contraband, 9 premium
|
||||
init_charges = list(32, 2, 3)
|
||||
|
||||
/obj/item/vending_refill/clothing
|
||||
machine_name = "ClothesMate"
|
||||
icon_state = "refill_clothes"
|
||||
charges = list(37, 4, 4)// of 111 standard, 12 contraband, 10 premium(?)
|
||||
init_charges = list(37, 4, 4)
|
||||
|
||||
/obj/item/vending_refill/medical
|
||||
machine_name = "NanoMed"
|
||||
icon_state = "refill_medical"
|
||||
charges = list(26, 5, 3)// of 76 standard, 13 contraband, 8 premium
|
||||
init_charges = list(26, 5, 3)
|
||||
/obj/item/vending_refill
|
||||
name = "resupply canister"
|
||||
var/machine_name = "Generic"
|
||||
|
||||
icon = 'icons/obj/vending_restock.dmi'
|
||||
icon_state = "refill_snack"
|
||||
item_state = "restock_unit"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
force = 7
|
||||
throwforce = 10
|
||||
throw_speed = 1
|
||||
throw_range = 7
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 70, acid = 30)
|
||||
var/charges = list(0, 0, 0) //how many restocking "charges" the refill has for standard/contraband/coin products
|
||||
var/init_charges = list(0, 0, 0)
|
||||
|
||||
|
||||
/obj/item/vending_refill/New(amt = -1)
|
||||
..()
|
||||
name = "\improper [machine_name] restocking unit"
|
||||
if(isnum(amt) && amt > -1)
|
||||
charges[1] = amt
|
||||
|
||||
/obj/item/vending_refill/examine(mob/user)
|
||||
..()
|
||||
if(charges[1] > 0)
|
||||
to_chat(user, "It can restock [charges[1]+charges[2]+charges[3]] item(s).")
|
||||
else
|
||||
to_chat(user, "It's empty!")
|
||||
|
||||
//NOTE I decided to go for about 1/3 of a machine's capacity
|
||||
|
||||
/obj/item/vending_refill/boozeomat
|
||||
machine_name = "Booze-O-Mat"
|
||||
icon_state = "refill_booze"
|
||||
charges = list(54, 4, 0)//of 159 standard, 12 contraband
|
||||
init_charges = list(54, 4, 0)
|
||||
|
||||
/obj/item/vending_refill/coffee
|
||||
machine_name = "Solar's Best Hot Drinks"
|
||||
icon_state = "refill_joe"
|
||||
charges = list(25, 4, 0)//of 75 standard, 12 contraband
|
||||
init_charges = list(25, 4, 0)
|
||||
|
||||
/obj/item/vending_refill/snack
|
||||
machine_name = "Getmore Chocolate Corp"
|
||||
charges = list(12, 2, 0)//of 36 standard, 6 contraband
|
||||
init_charges = list(12, 2, 0)
|
||||
|
||||
/obj/item/vending_refill/cola
|
||||
machine_name = "Robust Softdrinks"
|
||||
icon_state = "refill_cola"
|
||||
charges = list(30, 4, 1)//of 90 standard, 12 contraband, 1 premium
|
||||
init_charges = list(30, 4, 1)
|
||||
|
||||
/obj/item/vending_refill/cigarette
|
||||
machine_name = "ShadyCigs Deluxe"
|
||||
icon_state = "refill_smoke"
|
||||
charges = list(12, 3, 2)// of 36 standard, 9 contraband, 6 premium
|
||||
init_charges = list(12, 3, 2)
|
||||
|
||||
/obj/item/vending_refill/autodrobe
|
||||
machine_name = "AutoDrobe"
|
||||
icon_state = "refill_costume"
|
||||
charges = list(32, 2, 3)// of 96 standard, 6 contraband, 9 premium
|
||||
init_charges = list(32, 2, 3)
|
||||
|
||||
/obj/item/vending_refill/clothing
|
||||
machine_name = "ClothesMate"
|
||||
icon_state = "refill_clothes"
|
||||
charges = list(37, 4, 4)// of 111 standard, 12 contraband, 10 premium(?)
|
||||
init_charges = list(37, 4, 4)
|
||||
|
||||
/obj/item/vending_refill/medical
|
||||
machine_name = "NanoMed"
|
||||
icon_state = "refill_medical"
|
||||
charges = list(26, 5, 3)// of 76 standard, 13 contraband, 8 premium
|
||||
init_charges = list(26, 5, 3)
|
||||
|
||||
/obj/item/vending_refill/donksoft
|
||||
machine_name = "Donksoft Toy Vendor"
|
||||
icon_state = "refill_donksoft"
|
||||
charges = list(32,28,0)// of 90 standard, 75 contraband, 0 premium
|
||||
init_charges = list(32,28,0)
|
||||
|
||||
+586
-586
File diff suppressed because it is too large
Load Diff
@@ -169,6 +169,7 @@
|
||||
return
|
||||
|
||||
/obj/singularity_pull(S, current_size)
|
||||
..()
|
||||
if(!anchored || current_size >= STAGE_FIVE)
|
||||
step_towards(src,S)
|
||||
|
||||
@@ -198,7 +199,7 @@
|
||||
|
||||
/obj/vv_get_dropdown()
|
||||
. = ..()
|
||||
.["Delete all of type"] = "?_src_=vars;delall=\ref[src]"
|
||||
.["Delete all of type"] = "?_src_=vars;[HrefToken()];delall=\ref[src]"
|
||||
|
||||
/obj/examine(mob/user)
|
||||
..()
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
/obj/structure/alien/weeds/Initialize()
|
||||
pixel_x = -4
|
||||
pixel_y = -4 //so the sprites line up right in the map editor
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
if(!blacklisted_turfs)
|
||||
blacklisted_turfs = typecacheof(list(
|
||||
@@ -178,7 +178,7 @@
|
||||
|
||||
/obj/structure/alien/weeds/node/Initialize()
|
||||
icon = 'icons/obj/smooth_structures/alien/weednode.dmi'
|
||||
..()
|
||||
. = ..()
|
||||
set_light(lon_range)
|
||||
var/obj/structure/alien/weeds/W = locate(/obj/structure/alien/weeds) in loc
|
||||
if(W && W != src)
|
||||
@@ -223,7 +223,7 @@
|
||||
var/obj/item/clothing/mask/facehugger/child
|
||||
|
||||
/obj/structure/alien/egg/Initialize(mapload)
|
||||
..()
|
||||
. = ..()
|
||||
update_icon()
|
||||
if(status == GROWING || status == GROWN)
|
||||
child = new(src)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user