mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +01:00
+5
-3
@@ -4,11 +4,13 @@
|
||||
*.rsc
|
||||
*.dmb
|
||||
*.lk
|
||||
<<<<<<< HEAD
|
||||
|
||||
#ignore any files in config/, except those in subdirectories.
|
||||
/config/*
|
||||
!/config/*/*
|
||||
=======
|
||||
|
||||
#ignore other, specific files and folers
|
||||
data/
|
||||
>>>>>>> 16f787a... Virology - NanoUI, gameplay tweaks, bugfixes
|
||||
maps/backup/*
|
||||
maps/cyberiad.dmm.backup
|
||||
nano/debug.html
|
||||
@@ -0,0 +1,599 @@
|
||||
CREATE DATABASE IF NOT EXISTS `paradise` /*!40100 DEFAULT CHARACTER SET utf8 */;
|
||||
USE `paradise`;
|
||||
-- MySQL dump 10.13 Distrib 5.6.13, for Win32 (x86)
|
||||
--
|
||||
-- Host: localhost Database: paradise
|
||||
-- ------------------------------------------------------
|
||||
-- Server version 5.6.15-log
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
|
||||
--
|
||||
-- Table structure for table `characters`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `characters`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `characters` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`ckey` varchar(32) NOT NULL,
|
||||
`slot` int(2) NOT NULL,
|
||||
`OOC_Notes` mediumtext NOT NULL,
|
||||
`real_name` varchar(45) NOT NULL,
|
||||
`name_is_always_random` tinyint(1) NOT NULL,
|
||||
`gender` varchar(11) NOT NULL,
|
||||
`age` smallint(4) NOT NULL,
|
||||
`species` varchar(45) NOT NULL,
|
||||
`language` varchar(45) NOT NULL,
|
||||
`hair_red` smallint(4) NOT NULL,
|
||||
`hair_green` smallint(4) NOT NULL,
|
||||
`hair_blue` smallint(4) NOT NULL,
|
||||
`facial_red` smallint(4) NOT NULL,
|
||||
`facial_green` smallint(4) NOT NULL,
|
||||
`facial_blue` smallint(4) NOT NULL,
|
||||
`skin_tone` smallint(4) NOT NULL,
|
||||
`skin_red` smallint(4) NOT NULL,
|
||||
`skin_green` smallint(4) NOT NULL,
|
||||
`skin_blue` smallint(4) NOT NULL,
|
||||
`hair_style_name` varchar(45) NOT NULL,
|
||||
`facial_style_name` varchar(45) NOT NULL,
|
||||
`eyes_red` smallint(4) NOT NULL,
|
||||
`eyes_green` smallint(4) NOT NULL,
|
||||
`eyes_blue` smallint(4) NOT NULL,
|
||||
`underwear` smallint(4) NOT NULL,
|
||||
`undershirt` smallint(4) NOT NULL,
|
||||
`backbag` smallint(4) NOT NULL,
|
||||
`b_type` varchar(45) NOT NULL,
|
||||
`alternate_option` smallint(4) NOT NULL,
|
||||
`job_support_high` mediumint(8) NOT NULL,
|
||||
`job_support_med` mediumint(8) NOT NULL,
|
||||
`job_support_low` mediumint(8) NOT NULL,
|
||||
`job_medsci_high` mediumint(8) NOT NULL,
|
||||
`job_medsci_med` mediumint(8) NOT NULL,
|
||||
`job_medsci_low` mediumint(8) NOT NULL,
|
||||
`job_engsec_high` mediumint(8) NOT NULL,
|
||||
`job_engsec_med` mediumint(8) NOT NULL,
|
||||
`job_engsec_low` mediumint(8) NOT NULL,
|
||||
`job_karma_high` mediumint(8) NOT NULL,
|
||||
`job_karma_med` mediumint(8) NOT NULL,
|
||||
`job_karma_low` mediumint(8) NOT NULL,
|
||||
`flavor_text` mediumtext NOT NULL,
|
||||
`med_record` mediumtext NOT NULL,
|
||||
`sec_record` mediumtext NOT NULL,
|
||||
`gen_record` mediumtext NOT NULL,
|
||||
`be_special` mediumint(8) NOT NULL,
|
||||
`disabilities` mediumint(8) NOT NULL,
|
||||
`player_alt_titles` mediumtext NOT NULL,
|
||||
`organ_data` mediumtext NOT NULL,
|
||||
`nanotrasen_relation` varchar(45) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `characters`
|
||||
--
|
||||
|
||||
LOCK TABLES `characters` WRITE;
|
||||
/*!40000 ALTER TABLE `characters` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `characters` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `customuseritems`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `customuseritems`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `customuseritems` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`cuiCKey` varchar(36) NOT NULL,
|
||||
`cuiRealName` varchar(60) NOT NULL,
|
||||
`cuiPath` varchar(255) NOT NULL,
|
||||
`cuiDescription` text NOT NULL,
|
||||
`cuiReason` text NOT NULL,
|
||||
`cuiPropAdjust` text NOT NULL,
|
||||
`cuiJobMask` text NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `customuseritems`
|
||||
--
|
||||
|
||||
LOCK TABLES `customuseritems` WRITE;
|
||||
/*!40000 ALTER TABLE `customuseritems` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `customuseritems` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `death`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `death`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `death` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`pod` text NOT NULL COMMENT 'Place of death',
|
||||
`coord` text NOT NULL COMMENT 'X, Y, Z POD',
|
||||
`tod` datetime NOT NULL COMMENT 'Time of death',
|
||||
`job` text NOT NULL,
|
||||
`special` text NOT NULL,
|
||||
`name` text NOT NULL,
|
||||
`byondkey` text NOT NULL,
|
||||
`laname` text NOT NULL COMMENT 'Last attacker name',
|
||||
`lakey` text NOT NULL COMMENT 'Last attacker key',
|
||||
`gender` text NOT NULL,
|
||||
`bruteloss` int(11) NOT NULL,
|
||||
`brainloss` int(11) NOT NULL,
|
||||
`fireloss` int(11) NOT NULL,
|
||||
`oxyloss` int(11) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `death`
|
||||
--
|
||||
|
||||
LOCK TABLES `death` WRITE;
|
||||
/*!40000 ALTER TABLE `death` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `death` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `erro_admin`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `erro_admin`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `erro_admin` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`ckey` varchar(32) NOT NULL,
|
||||
`rank` varchar(32) NOT NULL DEFAULT 'Administrator',
|
||||
`level` int(2) NOT NULL DEFAULT '0',
|
||||
`flags` int(16) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `erro_admin`
|
||||
--
|
||||
|
||||
LOCK TABLES `erro_admin` WRITE;
|
||||
/*!40000 ALTER TABLE `erro_admin` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `erro_admin` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `erro_admin_log`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `erro_admin_log`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `erro_admin_log` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`datetime` datetime NOT NULL,
|
||||
`adminckey` varchar(32) NOT NULL,
|
||||
`adminip` varchar(18) NOT NULL,
|
||||
`log` text NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `erro_admin_log`
|
||||
--
|
||||
|
||||
LOCK TABLES `erro_admin_log` WRITE;
|
||||
/*!40000 ALTER TABLE `erro_admin_log` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `erro_admin_log` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `erro_ban`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `erro_ban`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `erro_ban` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`bantime` datetime NOT NULL,
|
||||
`serverip` varchar(32) NOT NULL,
|
||||
`bantype` varchar(32) NOT NULL,
|
||||
`reason` text NOT NULL,
|
||||
`job` varchar(32) DEFAULT NULL,
|
||||
`duration` int(11) NOT NULL,
|
||||
`rounds` int(11) DEFAULT NULL,
|
||||
`expiration_time` datetime NOT NULL,
|
||||
`ckey` varchar(32) NOT NULL,
|
||||
`computerid` varchar(32) NOT NULL,
|
||||
`ip` varchar(32) NOT NULL,
|
||||
`a_ckey` varchar(32) NOT NULL,
|
||||
`a_computerid` varchar(32) NOT NULL,
|
||||
`a_ip` varchar(32) NOT NULL,
|
||||
`who` text NOT NULL,
|
||||
`adminwho` text NOT NULL,
|
||||
`edits` text,
|
||||
`unbanned` tinyint(1) DEFAULT NULL,
|
||||
`unbanned_datetime` datetime DEFAULT NULL,
|
||||
`unbanned_ckey` varchar(32) DEFAULT NULL,
|
||||
`unbanned_computerid` varchar(32) DEFAULT NULL,
|
||||
`unbanned_ip` varchar(32) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `erro_ban`
|
||||
--
|
||||
|
||||
LOCK TABLES `erro_ban` WRITE;
|
||||
/*!40000 ALTER TABLE `erro_ban` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `erro_ban` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `erro_feedback`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `erro_feedback`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `erro_feedback` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`time` datetime NOT NULL,
|
||||
`round_id` int(8) NOT NULL,
|
||||
`var_name` varchar(32) NOT NULL,
|
||||
`var_value` int(16) DEFAULT NULL,
|
||||
`details` text,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `erro_feedback`
|
||||
--
|
||||
|
||||
LOCK TABLES `erro_feedback` WRITE;
|
||||
/*!40000 ALTER TABLE `erro_feedback` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `erro_feedback` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `erro_player`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `erro_player`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `erro_player` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`ckey` varchar(32) NOT NULL,
|
||||
`firstseen` datetime NOT NULL,
|
||||
`lastseen` datetime NOT NULL,
|
||||
`ip` varchar(18) NOT NULL,
|
||||
`computerid` varchar(32) NOT NULL,
|
||||
`lastadminrank` varchar(32) NOT NULL DEFAULT 'Player',
|
||||
`ooccolor` varchar(7) DEFAULT '#b82e00',
|
||||
`UI_style` varchar(10) DEFAULT 'Midnight',
|
||||
`UI_style_color` varchar(7) DEFAULT '#ffffff',
|
||||
`UI_style_alpha` smallint(4) DEFAULT '255',
|
||||
`be_special` mediumint(8) DEFAULT '0',
|
||||
`default_slot` smallint(4) DEFAULT '1',
|
||||
`toggles` mediumint(8) DEFAULT '383',
|
||||
`sound` mediumint(8) DEFAULT '31',
|
||||
`randomslot` tinyint(1) DEFAULT '0',
|
||||
`volume` smallint(4) DEFAULT '100',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `ckey` (`ckey`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `erro_player`
|
||||
--
|
||||
|
||||
LOCK TABLES `erro_player` WRITE;
|
||||
/*!40000 ALTER TABLE `erro_player` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `erro_player` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `erro_poll_option`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `erro_poll_option`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `erro_poll_option` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`pollid` int(11) NOT NULL,
|
||||
`text` varchar(255) NOT NULL,
|
||||
`percentagecalc` tinyint(1) NOT NULL DEFAULT '1',
|
||||
`minval` int(3) DEFAULT NULL,
|
||||
`maxval` int(3) DEFAULT NULL,
|
||||
`descmin` varchar(32) DEFAULT NULL,
|
||||
`descmid` varchar(32) DEFAULT NULL,
|
||||
`descmax` varchar(32) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `erro_poll_option`
|
||||
--
|
||||
|
||||
LOCK TABLES `erro_poll_option` WRITE;
|
||||
/*!40000 ALTER TABLE `erro_poll_option` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `erro_poll_option` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `erro_poll_question`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `erro_poll_question`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `erro_poll_question` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`polltype` varchar(16) NOT NULL DEFAULT 'OPTION',
|
||||
`starttime` datetime NOT NULL,
|
||||
`endtime` datetime NOT NULL,
|
||||
`question` varchar(255) NOT NULL,
|
||||
`adminonly` tinyint(1) DEFAULT '0',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `erro_poll_question`
|
||||
--
|
||||
|
||||
LOCK TABLES `erro_poll_question` WRITE;
|
||||
/*!40000 ALTER TABLE `erro_poll_question` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `erro_poll_question` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `erro_poll_textreply`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `erro_poll_textreply`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `erro_poll_textreply` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`datetime` datetime NOT NULL,
|
||||
`pollid` int(11) NOT NULL,
|
||||
`ckey` varchar(32) NOT NULL,
|
||||
`ip` varchar(18) NOT NULL,
|
||||
`replytext` text NOT NULL,
|
||||
`adminrank` varchar(32) NOT NULL DEFAULT 'Player',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `erro_poll_textreply`
|
||||
--
|
||||
|
||||
LOCK TABLES `erro_poll_textreply` WRITE;
|
||||
/*!40000 ALTER TABLE `erro_poll_textreply` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `erro_poll_textreply` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `erro_poll_vote`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `erro_poll_vote`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `erro_poll_vote` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`datetime` datetime NOT NULL,
|
||||
`pollid` int(11) NOT NULL,
|
||||
`optionid` int(11) NOT NULL,
|
||||
`ckey` varchar(255) NOT NULL,
|
||||
`ip` varchar(16) NOT NULL,
|
||||
`adminrank` varchar(32) NOT NULL,
|
||||
`rating` int(2) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `erro_poll_vote`
|
||||
--
|
||||
|
||||
LOCK TABLES `erro_poll_vote` WRITE;
|
||||
/*!40000 ALTER TABLE `erro_poll_vote` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `erro_poll_vote` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `erro_privacy`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `erro_privacy`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `erro_privacy` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`datetime` datetime NOT NULL,
|
||||
`ckey` varchar(32) NOT NULL,
|
||||
`option` varchar(128) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `erro_privacy`
|
||||
--
|
||||
|
||||
LOCK TABLES `erro_privacy` WRITE;
|
||||
/*!40000 ALTER TABLE `erro_privacy` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `erro_privacy` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `karma`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `karma`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `karma` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`spendername` text NOT NULL,
|
||||
`spenderkey` text NOT NULL,
|
||||
`receivername` text NOT NULL,
|
||||
`receiverkey` text NOT NULL,
|
||||
`receiverrole` text,
|
||||
`receiverspecial` text,
|
||||
`isnegative` tinyint(1) DEFAULT NULL,
|
||||
`spenderip` text NOT NULL,
|
||||
`time` datetime NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `karma`
|
||||
--
|
||||
|
||||
LOCK TABLES `karma` WRITE;
|
||||
/*!40000 ALTER TABLE `karma` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `karma` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `karmatotals`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `karmatotals`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `karmatotals` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`byondkey` text NOT NULL,
|
||||
`karma` int(11) NOT NULL,
|
||||
`karmaspent` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `karmatotals`
|
||||
--
|
||||
|
||||
LOCK TABLES `karmatotals` WRITE;
|
||||
/*!40000 ALTER TABLE `karmatotals` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `karmatotals` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `library`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `library`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `library` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`author` text NOT NULL,
|
||||
`title` text NOT NULL,
|
||||
`content` text NOT NULL,
|
||||
`category` text NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `library`
|
||||
--
|
||||
|
||||
LOCK TABLES `library` WRITE;
|
||||
/*!40000 ALTER TABLE `library` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `library` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `population`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `population`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `population` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`playercount` int(11) DEFAULT NULL,
|
||||
`admincount` int(11) DEFAULT NULL,
|
||||
`time` datetime NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `population`
|
||||
--
|
||||
|
||||
LOCK TABLES `population` WRITE;
|
||||
/*!40000 ALTER TABLE `population` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `population` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `whitelist`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `whitelist`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `whitelist` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`ckey` text NOT NULL,
|
||||
`job` text,
|
||||
`species` text,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `whitelist`
|
||||
--
|
||||
|
||||
LOCK TABLES `whitelist` WRITE;
|
||||
/*!40000 ALTER TABLE `whitelist` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `whitelist` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2014-11-19 1:24:17
|
||||
+12
-5
@@ -43,6 +43,10 @@
|
||||
#define FILE_DIR "icons/obj/assemblies"
|
||||
#define FILE_DIR "icons/obj/atmospherics"
|
||||
#define FILE_DIR "icons/obj/clothing"
|
||||
#define FILE_DIR "icons/obj/clothing/species"
|
||||
#define FILE_DIR "icons/obj/clothing/species/skrell"
|
||||
#define FILE_DIR "icons/obj/clothing/species/tajaran"
|
||||
#define FILE_DIR "icons/obj/clothing/species/unathi"
|
||||
#define FILE_DIR "icons/obj/doors"
|
||||
#define FILE_DIR "icons/obj/flora"
|
||||
#define FILE_DIR "icons/obj/machines"
|
||||
@@ -263,6 +267,7 @@
|
||||
#include "code\game\dna\genes\powers.dm"
|
||||
#include "code\game\dna\genes\vg_disabilities.dm"
|
||||
#include "code\game\dna\genes\vg_powers.dm"
|
||||
#include "code\game\gamemodes\antag_spawner.dm"
|
||||
#include "code\game\gamemodes\events.dm"
|
||||
#include "code\game\gamemodes\factions.dm"
|
||||
#include "code\game\gamemodes\game_mode.dm"
|
||||
@@ -582,6 +587,7 @@
|
||||
#include "code\game\objects\effects\spawners\vaultspawner.dm"
|
||||
#include "code\game\objects\items\apc_frame.dm"
|
||||
#include "code\game\objects\items\blueprints.dm"
|
||||
#include "code\game\objects\items\bluespace_crystal.dm"
|
||||
#include "code\game\objects\items\bodybag.dm"
|
||||
#include "code\game\objects\items\candle.dm"
|
||||
#include "code\game\objects\items\contraband.dm"
|
||||
@@ -601,6 +607,7 @@
|
||||
#include "code\game\objects\items\devices\laserpointer.dm"
|
||||
#include "code\game\objects\items\devices\lightreplacer.dm"
|
||||
#include "code\game\objects\items\devices\megaphone.dm"
|
||||
#include "code\game\objects\items\devices\modkit.dm"
|
||||
#include "code\game\objects\items\devices\multitool.dm"
|
||||
#include "code\game\objects\items\devices\paicard.dm"
|
||||
#include "code\game\objects\items\devices\pipe_freezer.dm"
|
||||
@@ -725,6 +732,7 @@
|
||||
#include "code\game\objects\structures\displaycase.dm"
|
||||
#include "code\game\objects\structures\door_assembly.dm"
|
||||
#include "code\game\objects\structures\electricchair.dm"
|
||||
#include "code\game\objects\structures\engicart.dm"
|
||||
#include "code\game\objects\structures\extinguisher.dm"
|
||||
#include "code\game\objects\structures\false_walls.dm"
|
||||
#include "code\game\objects\structures\flora.dm"
|
||||
@@ -802,6 +810,10 @@
|
||||
#include "code\game\turfs\unsimulated\beach.dm"
|
||||
#include "code\game\turfs\unsimulated\floor.dm"
|
||||
#include "code\game\turfs\unsimulated\walls.dm"
|
||||
#include "code\game\vehicles\spacepods\construction.dm"
|
||||
#include "code\game\vehicles\spacepods\equipment.dm"
|
||||
#include "code\game\vehicles\spacepods\parts.dm"
|
||||
#include "code\game\vehicles\spacepods\spacepod.dm"
|
||||
#include "code\game\verbs\atom_verbs.dm"
|
||||
#include "code\game\verbs\ooc.dm"
|
||||
#include "code\game\verbs\suicide.dm"
|
||||
@@ -1592,10 +1604,6 @@
|
||||
#include "code\WorkInProgress\computer3\computers\welcome.dm"
|
||||
#include "code\WorkInProgress\kilakk\fax.dm"
|
||||
#include "code\WorkInProgress\Mini\atmos_control.dm"
|
||||
#include "code\WorkInProgress\pomf\spacepods\construction.dm"
|
||||
#include "code\WorkInProgress\pomf\spacepods\equipment.dm"
|
||||
#include "code\WorkInProgress\pomf\spacepods\parts.dm"
|
||||
#include "code\WorkInProgress\pomf\spacepods\spacepods.dm"
|
||||
#include "code\WorkInProgress\Ported\policetape.dm"
|
||||
#include "code\WorkInProgress\Sayu\belt.dm"
|
||||
#include "code\WorkInProgress\Sayu\cargoprofile.dm"
|
||||
@@ -1604,7 +1612,6 @@
|
||||
#include "code\WorkInProgress\Sayu\random_items.dm"
|
||||
#include "code\WorkInProgress\SkyMarshal\officer_stuff.dm"
|
||||
#include "code\WorkInProgress\SkyMarshal\Ultralight_procs.dm"
|
||||
#include "code\WorkInProgress\ZomgPonies\Colored-windows.dm"
|
||||
#include "code\WorkInProgress\ZomgPonies\karma.dm"
|
||||
#include "code\WorkInProgress\ZomgPonies\clothing\civilian.dm"
|
||||
#include "code\WorkInProgress\ZomgPonies\mobs\pony.dm"
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
var/global/wcBrig
|
||||
var/global/wcBar
|
||||
var/global/wcCommon
|
||||
|
||||
//for all window/New and door/window/New
|
||||
/proc/color_windows(area = "common")
|
||||
var/list/common = list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8fcf44", "#ffffff")
|
||||
if(!wcCommon)
|
||||
wcCommon = pick(common)
|
||||
return wcCommon
|
||||
|
||||
//This func called in master-controller, replaces color in some area
|
||||
/proc/color_windows_init()
|
||||
var/list/brig = list("#aa0808", "#7f0606", "#ff0000")
|
||||
var/list/bar = list("#0d8395", "#58b5c3", "#58c366", "#90d79a", "#ffffff")
|
||||
|
||||
wcBrig = pick(brig)
|
||||
wcBar = pick(bar)
|
||||
|
||||
//BRIG
|
||||
var/wsBrigList = list(
|
||||
/area/security/brig,
|
||||
/area/security/detectives_office,
|
||||
/area/security/hos,
|
||||
/area/security/lobby,
|
||||
/area/security/main,
|
||||
/area/security/prison,
|
||||
/area/security/warden,
|
||||
/area/security/range,
|
||||
/area/prison/cell_block/A,
|
||||
/area/prison/cell_block/B,
|
||||
/area/security/processing,
|
||||
/area/security/armoury
|
||||
|
||||
)
|
||||
|
||||
for(var/A in wsBrigList)
|
||||
for(var/obj/structure/window/W in locate(A))
|
||||
W.color = wcBrig
|
||||
for(var/obj/machinery/door/window/D in locate(A))
|
||||
D.color = wcBrig
|
||||
|
||||
//BAR
|
||||
for(var/obj/structure/window/W in locate(/area/crew_quarters/bar))
|
||||
W.color = wcBar
|
||||
for(var/obj/machinery/door/window/D in locate(/area/crew_quarters/bar))
|
||||
D.color = wcBar
|
||||
@@ -184,23 +184,23 @@
|
||||
parent.helm.gas_transfer_coefficient = 0.01
|
||||
parent.helm.permeability_coefficient = 0.02
|
||||
parent.helm.cold_protection = HEAD
|
||||
parent.helm.min_cold_protection_temperature = SPACE_HELMET_MIN_COLD_PROTECITON_TEMPERATURE
|
||||
parent.helm.min_cold_protection_temperature = SPACE_HELMET_MIN_COLD_PROTECTION_TEMPERATURE
|
||||
parent.helm.heat_protection = HEAD
|
||||
parent.helm.max_heat_protection_temperature = SPACE_HELMET_MAX_HEAT_PROTECITON_TEMPERATURE
|
||||
parent.helm.max_heat_protection_temperature = SPACE_HELMET_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
if(parent.glovesrequired)
|
||||
parent.gloves.gas_transfer_coefficient = 0.01
|
||||
parent.gloves.permeability_coefficient = 0.02
|
||||
parent.gloves.cold_protection = HANDS
|
||||
parent.gloves.min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECITON_TEMPERATURE
|
||||
parent.gloves.min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE
|
||||
parent.gloves.heat_protection = HANDS
|
||||
parent.gloves.max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECITON_TEMPERATURE
|
||||
parent.gloves.max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
if(parent.shoesrequired)
|
||||
parent.shoes.gas_transfer_coefficient = 0.01
|
||||
parent.shoes.permeability_coefficient = 0.02
|
||||
parent.shoes.cold_protection = FEET
|
||||
parent.shoes.min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECITON_TEMPERATURE
|
||||
parent.shoes.min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE
|
||||
parent.shoes.heat_protection = FEET
|
||||
parent.shoes.max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECITON_TEMPERATURE
|
||||
parent.shoes.max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
sealed = 1
|
||||
|
||||
/obj/item/powerarmor/atmoseal/optional
|
||||
@@ -226,9 +226,9 @@
|
||||
parent.helm.gas_transfer_coefficient = 0.01
|
||||
parent.helm.permeability_coefficient = 0.02
|
||||
parent.helm.cold_protection = HEAD
|
||||
parent.helm.min_cold_protection_temperature = SPACE_HELMET_MIN_COLD_PROTECITON_TEMPERATURE
|
||||
parent.helm.min_cold_protection_temperature = SPACE_HELMET_MIN_COLD_PROTECTION_TEMPERATURE
|
||||
parent.helm.heat_protection = HEAD
|
||||
parent.helm.max_heat_protection_temperature = SPACE_HELMET_MAX_HEAT_PROTECITON_TEMPERATURE
|
||||
parent.helm.max_heat_protection_temperature = SPACE_HELMET_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
|
||||
user << "<span class='notice'>Helmet atmospheric seals engaged.</span>"
|
||||
if(manual)
|
||||
|
||||
@@ -326,6 +326,13 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
if(dna)
|
||||
dna.real_name = real_name
|
||||
|
||||
if(isrobot(src))
|
||||
var/mob/living/silicon/robot/R = src
|
||||
if(oldname != real_name)
|
||||
R.notify_ai(3, oldname, newname)
|
||||
if(R.camera)
|
||||
R.camera.c_tag = real_name
|
||||
|
||||
if(oldname)
|
||||
//update the datacore records! This is goig to be a bit costly.
|
||||
for(var/list/L in list(data_core.general,data_core.medical,data_core.security,data_core.locked))
|
||||
|
||||
+7
-2
@@ -31,8 +31,12 @@
|
||||
if(client.buildmode) // comes after object.Click to allow buildmode gui objects to be clicked
|
||||
build_click(src, client.buildmode, params, A)
|
||||
return
|
||||
|
||||
if(control_disabled || stat)
|
||||
return
|
||||
|
||||
if(alienAI) return
|
||||
if(alienAI)
|
||||
return
|
||||
|
||||
var/list/modifiers = params2list(params)
|
||||
if(modifiers["middle"])
|
||||
@@ -48,7 +52,8 @@
|
||||
CtrlClickOn(A)
|
||||
return
|
||||
|
||||
if(control_disabled || stat || world.time <= next_move) return
|
||||
if(world.time <= next_move)
|
||||
return
|
||||
next_move = world.time + 9
|
||||
|
||||
if(aiCamera.in_camera_mode)
|
||||
|
||||
+40
-11
@@ -15,9 +15,6 @@
|
||||
build_click(src, client.buildmode, params, A)
|
||||
return
|
||||
|
||||
if(stat || lockcharge || weakened || stunned || paralysis)
|
||||
return
|
||||
|
||||
var/list/modifiers = params2list(params)
|
||||
if(modifiers["middle"])
|
||||
MiddleClickOn(A)
|
||||
@@ -32,19 +29,14 @@
|
||||
CtrlClickOn(A)
|
||||
return
|
||||
|
||||
if(stat || lockcharge || weakened || stunned || paralysis)
|
||||
return
|
||||
|
||||
if(next_move >= world.time)
|
||||
return
|
||||
|
||||
face_atom(A) // change direction to face what you clicked on
|
||||
|
||||
if(aiCamera.in_camera_mode)
|
||||
aiCamera.camera_mode_off()
|
||||
if(is_component_functioning("camera"))
|
||||
aiCamera.captureimage(A, usr)
|
||||
else
|
||||
src << "<span class='userdanger'>Your camera isn't functional.</span>"
|
||||
return
|
||||
|
||||
/*
|
||||
cyborg restrained() currently does nothing
|
||||
if(restrained())
|
||||
@@ -109,6 +101,43 @@
|
||||
cycle_modules()
|
||||
return
|
||||
|
||||
//Give cyborgs hotkey clicks without breaking existing uses of hotkey clicks
|
||||
// for non-doors/apcs
|
||||
/mob/living/silicon/robot/ShiftClickOn(var/atom/A)
|
||||
A.BorgShiftClick(src)
|
||||
/mob/living/silicon/robot/CtrlClickOn(var/atom/A)
|
||||
A.BorgCtrlClick(src)
|
||||
/mob/living/silicon/robot/AltClickOn(var/atom/A)
|
||||
A.BorgAltClick(src)
|
||||
|
||||
/atom/proc/BorgShiftClick()
|
||||
return
|
||||
|
||||
/obj/machinery/door/airlock/BorgShiftClick() // Opens and closes doors! Forwards to AI code.
|
||||
AIShiftClick()
|
||||
|
||||
/atom/proc/BorgCtrlClick(var/mob/living/silicon/robot/user) //forward to human click if not overriden
|
||||
CtrlClick(user)
|
||||
|
||||
/obj/machinery/door/airlock/BorgCtrlClick() // Bolts doors. Forwards to AI code.
|
||||
AICtrlClick()
|
||||
|
||||
/obj/machinery/power/apc/BorgCtrlClick() // turns off/on APCs. Forwards to AI code.
|
||||
AICtrlClick()
|
||||
|
||||
/obj/machinery/turretid/BorgCtrlClick() //turret control on/off. Forwards to AI code.
|
||||
AICtrlClick()
|
||||
|
||||
/atom/proc/BorgAltClick(var/mob/living/silicon/robot/user)
|
||||
AltClick(user)
|
||||
return
|
||||
|
||||
/obj/machinery/door/airlock/BorgAltClick() // Eletrifies doors. Forwards to AI code.
|
||||
AIAltClick()
|
||||
|
||||
/obj/machinery/turretid/BorgAltClick() //turret lethal on/off. Forwards to AI code.
|
||||
AIAltClick()
|
||||
|
||||
/*
|
||||
As with AI, these are not used in click code,
|
||||
because the code for robots is specific, not generic.
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
//Crew Monitorting
|
||||
using = new /obj/screen()
|
||||
using.name = "Crew Monitorting"
|
||||
using.name = "Crew Monitoring"
|
||||
using.icon = 'icons/mob/screen_ai.dmi'
|
||||
using.icon_state = "crew_monitor"
|
||||
using.screen_loc = ui_ai_crew_monitor
|
||||
|
||||
@@ -498,7 +498,7 @@
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.toggle_camera_light()
|
||||
|
||||
if("Crew Monitorting")
|
||||
if("Crew Monitoring")
|
||||
if(isAI(usr))
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
var/obj/machinery/computer/crew/C = locate(/obj/machinery/computer/crew)
|
||||
|
||||
@@ -198,13 +198,20 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
/obj/item/weapon/reagent_containers/glass/rag,
|
||||
/obj/item/weapon/grenade/chem_grenade/cleaner,
|
||||
/obj/item/weapon/grenade/chem_grenade/cleaner,
|
||||
/obj/item/weapon/grenade/chem_grenade/cleaner,
|
||||
/obj/structure/mopbucket)
|
||||
/obj/item/weapon/grenade/chem_grenade/cleaner)
|
||||
cost = 10
|
||||
containertype = /obj/structure/closet/crate
|
||||
containername = "Janitorial supplies"
|
||||
group = "Operations"
|
||||
|
||||
/datum/supply_packs/janicart
|
||||
name = "Janitorial Cart and Galoshes crate"
|
||||
contains = list(/obj/structure/janitorialcart,
|
||||
/obj/item/clothing/shoes/galoshes)
|
||||
cost = 10
|
||||
containertype = /obj/structure/largecrate
|
||||
containername = "janitorial cart crate"
|
||||
|
||||
/datum/supply_packs/lightbulbs
|
||||
name = "Replacement lights"
|
||||
contains = list(/obj/item/weapon/storage/box/lights/mixed,
|
||||
@@ -1044,6 +1051,10 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
/datum/supply_packs/vending
|
||||
name = "Bartending Supply Crate"
|
||||
contains = list(/obj/item/weapon/vending_refill/boozeomat,
|
||||
/obj/item/weapon/vending_refill/boozeomat,
|
||||
/obj/item/weapon/vending_refill/boozeomat,
|
||||
/obj/item/weapon/vending_refill/coffee,
|
||||
/obj/item/weapon/vending_refill/coffee,
|
||||
/obj/item/weapon/vending_refill/coffee)
|
||||
cost = 15
|
||||
containertype = /obj/structure/closet/crate
|
||||
@@ -1063,6 +1074,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
/datum/supply_packs/vending/cola
|
||||
name = "Softdrinks Supply Crate"
|
||||
contains = list(/obj/item/weapon/vending_refill/cola,
|
||||
/obj/item/weapon/vending_refill/cola,
|
||||
/obj/item/weapon/vending_refill/cola)
|
||||
cost = 15
|
||||
containertype = /obj/structure/closet/crate
|
||||
@@ -1071,7 +1083,9 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
|
||||
/datum/supply_packs/vending/cigarette
|
||||
name = "Cigarette Supply Crate"
|
||||
contains = list(/obj/item/weapon/vending_refill/cigarette)
|
||||
contains = list(/obj/item/weapon/vending_refill/cigarette,
|
||||
/obj/item/weapon/vending_refill/cigarette,
|
||||
/obj/item/weapon/vending_refill/cigarette)
|
||||
cost = 15
|
||||
containertype = /obj/structure/closet/crate
|
||||
containername = "cigarette supply crate"
|
||||
|
||||
@@ -285,6 +285,19 @@ var/list/uplink_items = list()
|
||||
item = /obj/mecha/combat/marauder/mauler/loaded
|
||||
cost = 140
|
||||
gamemodes = list("nuclear emergency")
|
||||
|
||||
/datum/uplink_item/dangerous/syndieborg
|
||||
name = "Syndicate Cyborg"
|
||||
desc = "A cyborg designed and programmed for systematic extermination of non-Syndicate personnel."
|
||||
item = /obj/item/weapon/antag_spawner/borg_tele
|
||||
cost = 50
|
||||
gamemodes = list("nuclear emergency")
|
||||
|
||||
//for refunding the syndieborg teleporter
|
||||
/datum/uplink_item/dangerous/syndieborg/spawn_item()
|
||||
var/obj/item/weapon/antag_spawner/borg_tele/T = ..()
|
||||
if(istype(T))
|
||||
T.TC_cost = cost
|
||||
|
||||
// Ammunition
|
||||
|
||||
@@ -357,11 +370,11 @@ var/list/uplink_items = list()
|
||||
item = /obj/item/weapon/soap/syndie
|
||||
cost = 1
|
||||
|
||||
/*/datum/uplink_item/stealthy_weapons/detomatix
|
||||
/datum/uplink_item/stealthy_weapons/detomatix
|
||||
name = "Detomatix PDA Cartridge"
|
||||
desc = "When inserted into a personal digital assistant, this cartridge gives you five opportunities to detonate PDAs of crewmembers who have their message feature enabled. The concussive effect from the explosion will knock the recipient out for a short period, and deafen them for longer. It has a chance to detonate your PDA."
|
||||
item = /obj/item/weapon/cartridge/syndicate
|
||||
cost = 6 */
|
||||
cost = 6
|
||||
|
||||
// Commented out until a fix can be found, currently doesn't work with the PDA NanoUI and people keep wasting Telecrystals on it. -- Dave
|
||||
|
||||
|
||||
@@ -66,6 +66,7 @@ var/const/BORG_WIRE_LAWCHECK = 16 // Not used on MoMMIs
|
||||
if (BORG_WIRE_AI_CONTROL) //pulse the AI wire to make the borg reselect an AI
|
||||
if(!R.emagged)
|
||||
R.connected_ai = select_active_ai()
|
||||
R.notify_ai(1)
|
||||
|
||||
if (BORG_WIRE_CAMERA)
|
||||
if(!isnull(R.camera) && R.camera.can_use() && !R.scrambledcodes)
|
||||
|
||||
@@ -57,6 +57,8 @@
|
||||
throwforce = 0
|
||||
throw_speed = 4
|
||||
throw_range = 20
|
||||
discrete = 1
|
||||
var/cleanspeed = 50 //slower than mop
|
||||
|
||||
/obj/item/weapon/soap/nanotrasen
|
||||
desc = "A Nanotrasen brand bar of soap. Smells of plasma."
|
||||
@@ -66,11 +68,13 @@
|
||||
icon_state = "soapdeluxe"
|
||||
|
||||
/obj/item/weapon/soap/deluxe/New()
|
||||
desc = "A deluxe Waffle Co. brand bar of soap. Smells of [pick("lavender", "vanilla", "strawberry", "chocolate" ,"space")]."
|
||||
desc = "A deluxe Waffle Co. brand bar of soap. Smells of comdoms."
|
||||
cleanspeed = 40 //same speed as mop because deluxe -- captain gets one of these
|
||||
|
||||
/obj/item/weapon/soap/syndie
|
||||
desc = "An untrustworthy bar of soap. Smells of fear."
|
||||
desc = "An untrustworthy bar of soap made of strong chemical agents that dissolve blood faster."
|
||||
icon_state = "soapsyndie"
|
||||
cleanspeed = 10 //much faster than mop so it is useful for traitors who want to clean crime scenes
|
||||
|
||||
/obj/item/weapon/bikehorn
|
||||
name = "bike horn"
|
||||
@@ -204,6 +208,54 @@
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/holosign_creator
|
||||
name = "holographic sign projector"
|
||||
desc = "A handy-dandy hologaphic projector that displays a janitorial sign."
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "signmaker"
|
||||
item_state = "electronic"
|
||||
force = 5
|
||||
w_class = 2
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
origin_tech = "programming=3"
|
||||
var/list/signs = list()
|
||||
var/max_signs = 10
|
||||
|
||||
/obj/item/weapon/holosign_creator/afterattack(atom/target, mob/user, flag)
|
||||
if(flag)
|
||||
var/turf/T = get_turf(target)
|
||||
var/obj/effect/overlay/holograph/H = locate() in T
|
||||
if(H)
|
||||
user << "<span class='notice'>You use [src] to destroy [H].</span>"
|
||||
signs -= H
|
||||
del(H)
|
||||
else
|
||||
if(signs.len < max_signs)
|
||||
H = new(get_turf(target))
|
||||
signs += H
|
||||
user << "<span class='notice'>You create \a [H] with [src].</span>"
|
||||
else
|
||||
user << "<span class='notice'>[src] is projecting at max capacity!</span>"
|
||||
|
||||
/obj/item/weapon/holosign_creator/attack(mob/living/carbon/human/M, mob/user)
|
||||
return
|
||||
|
||||
/obj/item/weapon/holosign_creator/attack_self(mob/user)
|
||||
if(signs.len)
|
||||
var/list/L = signs.Copy()
|
||||
for(var/sign in L)
|
||||
del(sign)
|
||||
signs -= sign
|
||||
user << "<span class='notice'>You clear all active holograms.</span>"
|
||||
|
||||
/obj/effect/overlay/holograph
|
||||
name = "wet floor sign"
|
||||
desc = "The words flicker as if they mean nothing."
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "holosign"
|
||||
anchored = 1
|
||||
|
||||
/obj/item/weapon/caution
|
||||
desc = "Caution! Wet Floor!"
|
||||
@@ -538,7 +590,7 @@
|
||||
icon_state = "RPED"
|
||||
item_state = "RPED"
|
||||
w_class = 5
|
||||
can_hold = list("/obj/item/weapon/stock_parts")
|
||||
can_hold = list("/obj/item/weapon/stock_parts","/obj/item/weapon/cell")
|
||||
storage_slots = 14
|
||||
use_to_pickup = 1
|
||||
allow_quick_gather = 1
|
||||
@@ -547,6 +599,9 @@
|
||||
max_w_class = 3
|
||||
max_combined_w_class = 28
|
||||
|
||||
/obj/item/weapon/storage/part_replacer/proc/play_rped_sound()
|
||||
//Plays the sound for RPED exchanging or installing parts.
|
||||
playsound(src, 'sound/items/rped.ogg', 40, 1)
|
||||
|
||||
/obj/item/weapon/stock_parts
|
||||
name = "stock part"
|
||||
|
||||
@@ -543,39 +543,39 @@ var/list/ghostteleportlocs = list()
|
||||
icon_state = "yellow"
|
||||
|
||||
/area/syndicate_station/southwest
|
||||
name = "\improper south-west of SS13"
|
||||
name = "\improper South-West of SS13"
|
||||
icon_state = "southwest"
|
||||
|
||||
/area/syndicate_station/northwest
|
||||
name = "\improper north-west of SS13"
|
||||
name = "\improper North-West of SS13"
|
||||
icon_state = "northwest"
|
||||
|
||||
/area/syndicate_station/northeast
|
||||
name = "\improper north-east of SS13"
|
||||
name = "\improper North-East of SS13"
|
||||
icon_state = "northeast"
|
||||
|
||||
/area/syndicate_station/southeast
|
||||
name = "\improper south-east of SS13"
|
||||
name = "\improper South-East of SS13"
|
||||
icon_state = "southeast"
|
||||
|
||||
/area/syndicate_station/north
|
||||
name = "\improper north of SS13"
|
||||
name = "\improper North of SS13"
|
||||
icon_state = "north"
|
||||
|
||||
/area/syndicate_station/south
|
||||
name = "\improper south of SS13"
|
||||
name = "\improper South of SS13"
|
||||
icon_state = "south"
|
||||
|
||||
/area/syndicate_station/commssat
|
||||
name = "\improper south of the communication satellite"
|
||||
name = "\improper South of the Communication Satellite"
|
||||
icon_state = "south"
|
||||
|
||||
/area/syndicate_station/mining
|
||||
name = "\improper north east of the mining asteroid"
|
||||
name = "\improper North-East of the Mining Asteroid"
|
||||
icon_state = "north"
|
||||
|
||||
/area/syndicate_station/transit
|
||||
name = "\improper hyperspace"
|
||||
name = "\improper Hyperspace"
|
||||
icon_state = "shuttle"
|
||||
|
||||
/area/wizard_station
|
||||
@@ -596,66 +596,66 @@ var/list/ghostteleportlocs = list()
|
||||
|
||||
|
||||
/area/vox_station/transit
|
||||
name = "\improper hyperspace"
|
||||
name = "\improper Hyperspace"
|
||||
icon_state = "shuttle"
|
||||
requires_power = 0
|
||||
|
||||
/area/vox_station/southwest_solars
|
||||
name = "\improper aft port solars"
|
||||
name = "\improper Aft Port Solars"
|
||||
icon_state = "southwest"
|
||||
requires_power = 0
|
||||
|
||||
/area/vox_station/northwest_solars
|
||||
name = "\improper fore port solars"
|
||||
name = "\improper Fore Port Solars"
|
||||
icon_state = "northwest"
|
||||
requires_power = 0
|
||||
|
||||
/area/vox_station/northeast_solars
|
||||
name = "\improper fore starboard solars"
|
||||
name = "\improper Fore Starboard Solars"
|
||||
icon_state = "northeast"
|
||||
requires_power = 0
|
||||
|
||||
/area/vox_station/southeast_solars
|
||||
name = "\improper aft starboard solars"
|
||||
name = "\improper Aft Starboard Solars"
|
||||
icon_state = "southeast"
|
||||
requires_power = 0
|
||||
|
||||
/area/vox_station/mining
|
||||
name = "\improper nearby mining asteroid"
|
||||
name = "\improper Nearby Mining Asteroid"
|
||||
icon_state = "north"
|
||||
requires_power = 0
|
||||
|
||||
/area/xenos_station/start
|
||||
name = "\improper start area"
|
||||
name = "\improper Start Area"
|
||||
icon_state = "north"
|
||||
|
||||
/area/xenos_station/transit
|
||||
name = "\improper hyperspace"
|
||||
name = "\improper Hyperspace"
|
||||
icon_state = "shuttle"
|
||||
|
||||
/area/xenos_station/southwest
|
||||
name = "\improper aft port solars"
|
||||
name = "\improper Aft Port Solars"
|
||||
icon_state = "southwest"
|
||||
|
||||
/area/xenos_station/northwest
|
||||
name = "\improper fore port solars"
|
||||
name = "\improper Fore Port Solars"
|
||||
icon_state = "northwest"
|
||||
|
||||
/area/xenos_station/northeast
|
||||
name = "\improper fore starboard solars"
|
||||
name = "\improper Fore Starboard Solars"
|
||||
icon_state = "northeast"
|
||||
requires_power = 0
|
||||
|
||||
/area/xenos_station/southeast
|
||||
name = "\improper aft starboard solars"
|
||||
name = "\improper Aft Starboard Solars"
|
||||
icon_state = "southeast"
|
||||
|
||||
/area/xenos_station/north
|
||||
name = "\improper west landing area"
|
||||
name = "\improper West Landing Area"
|
||||
icon_state = "north"
|
||||
|
||||
/area/xenos_station/south
|
||||
name = "\improper east landing area"
|
||||
name = "\improper East Landing Area"
|
||||
icon_state = "south"
|
||||
|
||||
//PRISON
|
||||
@@ -726,19 +726,23 @@ var/list/ghostteleportlocs = list()
|
||||
icon_state = "dk_yellow"
|
||||
|
||||
/area/prison/solitary
|
||||
name = "Solitary Confinement"
|
||||
name = "\improper Solitary Confinement"
|
||||
icon_state = "brig"
|
||||
|
||||
/area/prison/cell_block
|
||||
name = "\improper Prison Cell Block"
|
||||
icon_state = "brig"
|
||||
|
||||
/area/prison/cell_block/A
|
||||
name = "Prison Cell Block A"
|
||||
name = "\improper Prison Cell Block A"
|
||||
icon_state = "brig"
|
||||
|
||||
/area/prison/cell_block/B
|
||||
name = "Prison Cell Block B"
|
||||
name = "\improper Prison Cell Block B"
|
||||
icon_state = "brig"
|
||||
|
||||
/area/prison/cell_block/C
|
||||
name = "Prison Cell Block C"
|
||||
name = "\improper Prison Cell Block C"
|
||||
icon_state = "brig"
|
||||
|
||||
//STATION13
|
||||
@@ -746,6 +750,14 @@ var/list/ghostteleportlocs = list()
|
||||
/area/atmos
|
||||
name = "Atmospherics"
|
||||
icon_state = "atmos"
|
||||
|
||||
/area/atmos/control
|
||||
name = "Atmospherics Control Room"
|
||||
icon_state = "atmos"
|
||||
|
||||
/area/atmos/distribution
|
||||
name = "Atmospherics Distribution Loop"
|
||||
icon_state = "atmos"
|
||||
|
||||
//Maintenance
|
||||
|
||||
@@ -1023,11 +1035,27 @@ var/list/ghostteleportlocs = list()
|
||||
/area/chapel/office
|
||||
name = "\improper Chapel Office"
|
||||
icon_state = "chapeloffice"
|
||||
|
||||
/area/escapepodbay
|
||||
name = "\improper Escape Shuttle Hallway Podbay"
|
||||
icon_state = "escape"
|
||||
|
||||
/area/lawoffice
|
||||
name = "\improper Law Office"
|
||||
icon_state = "law"
|
||||
|
||||
|
||||
/area/magistrateoffice
|
||||
name = "\improper Magistrate's Office"
|
||||
icon_state = "law"
|
||||
|
||||
/area/clownoffice
|
||||
name = "\improper Clown's Office"
|
||||
icon_state = "dk_yellow"
|
||||
|
||||
/area/mimeoffice
|
||||
name = "\improper Mime's Office"
|
||||
icon_state = "dk_yellow"
|
||||
|
||||
/area/civilian/barber
|
||||
name = "\improper Barber Shop"
|
||||
icon_state = "barber"
|
||||
@@ -1134,27 +1162,42 @@ var/list/ghostteleportlocs = list()
|
||||
|
||||
//Engineering
|
||||
|
||||
/area/engine
|
||||
engine_smes
|
||||
name = "\improper Engineering SMES"
|
||||
icon_state = "engine_smes"
|
||||
requires_power = 0//This area only covers the batteries and they deal with their own power
|
||||
/area/engine/engine_smes
|
||||
name = "\improper Engineering SMES"
|
||||
icon_state = "engine_smes"
|
||||
requires_power = 0//This area only covers the batteries and they deal with their own power
|
||||
|
||||
engineering
|
||||
name = "Engineering"
|
||||
icon_state = "engine_smes"
|
||||
/area/engine/engineering
|
||||
name = "Engineering"
|
||||
icon_state = "engine_smes"
|
||||
|
||||
break_room
|
||||
name = "\improper Engineering Foyer"
|
||||
icon_state = "engine"
|
||||
/area/engine/break_room
|
||||
name = "\improper Engineering Foyer"
|
||||
icon_state = "engine"
|
||||
|
||||
/area/engine/equipmentstorage
|
||||
name = "\improper Engineering Equipment Storage"
|
||||
icon_state = "storage"
|
||||
|
||||
/area/engine/hardsuitstorage
|
||||
name = "\improper Engineering Hardsuit Storage"
|
||||
icon_state = "storage"
|
||||
|
||||
/area/engine/controlroom
|
||||
name = "\improper Engineering Control Room"
|
||||
icon_state = "engine_control"
|
||||
|
||||
chiefs_office
|
||||
name = "\improper Chief Engineer's office"
|
||||
icon_state = "engine_control"
|
||||
/area/engine/gravitygenerator
|
||||
name = "\improper Gravity Generator"
|
||||
icon_state = "engine"
|
||||
|
||||
/area/engine/chiefs_office
|
||||
name = "\improper Chief Engineer's office"
|
||||
icon_state = "engine_control"
|
||||
|
||||
mechanic_workshop
|
||||
name = "\improper Mechanic Workshop"
|
||||
icon_state = "engine"
|
||||
/area/engine/mechanic_workshop
|
||||
name = "\improper Mechanic Workshop"
|
||||
icon_state = "engine"
|
||||
|
||||
//Solars
|
||||
|
||||
@@ -1188,19 +1231,19 @@ var/list/ghostteleportlocs = list()
|
||||
icon_state = "panelsP"
|
||||
|
||||
/area/maintenance/auxsolarport
|
||||
name = "Fore Port Solar Maintenance"
|
||||
name = "\improper Fore Port Solar Maintenance"
|
||||
icon_state = "SolarcontrolA"
|
||||
|
||||
/area/maintenance/starboardsolar
|
||||
name = "Aft Starboard Solar Maintenance"
|
||||
name = "\improper Aft Starboard Solar Maintenance"
|
||||
icon_state = "SolarcontrolS"
|
||||
|
||||
/area/maintenance/portsolar
|
||||
name = "Aft Port Solar Maintenance"
|
||||
name = "\improper Aft Port Solar Maintenance"
|
||||
icon_state = "SolarcontrolP"
|
||||
|
||||
/area/maintenance/auxsolarstarboard
|
||||
name = "Fore Starboard Solar Maintenance"
|
||||
name = "\improper Fore Starboard Solar Maintenance"
|
||||
icon_state = "SolarcontrolA"
|
||||
|
||||
|
||||
@@ -1334,6 +1377,10 @@ var/list/ghostteleportlocs = list()
|
||||
/area/medical/virology
|
||||
name = "\improper Virology"
|
||||
icon_state = "virology"
|
||||
|
||||
/area/medical/virology/lab
|
||||
name = "\improper Virology Laboratory"
|
||||
icon_state = "virology"
|
||||
|
||||
/area/medical/morgue
|
||||
name = "\improper Morgue"
|
||||
@@ -1370,6 +1417,10 @@ var/list/ghostteleportlocs = list()
|
||||
/area/medical/sleeper
|
||||
name = "\improper Medical Treatment Center"
|
||||
icon_state = "exam_room"
|
||||
|
||||
/area/medical/paramedic
|
||||
name = "\improper Paramedic"
|
||||
icon_state = "medbay"
|
||||
|
||||
//Security
|
||||
|
||||
@@ -1378,20 +1429,68 @@ var/list/ghostteleportlocs = list()
|
||||
icon_state = "security"
|
||||
|
||||
/area/security/lobby
|
||||
name = "\improper Security lobby"
|
||||
name = "\improper Security Lobby"
|
||||
icon_state = "security"
|
||||
|
||||
/area/security/brig
|
||||
name = "\improper Brig"
|
||||
icon_state = "brig"
|
||||
|
||||
|
||||
/area/security/permabrig
|
||||
name = "\improper Prison Wing"
|
||||
icon_state = "sec_prison"
|
||||
|
||||
/area/security/prison
|
||||
name = "\improper Prison Wing"
|
||||
icon_state = "sec_prison"
|
||||
icon_state = "sec_prison"
|
||||
|
||||
/area/security/prison/cell_block
|
||||
name = "\improper Prison Cell Block"
|
||||
icon_state = "brig"
|
||||
|
||||
/area/security/prison/cell_block/A
|
||||
name = "\improper Prison Cell Block A"
|
||||
icon_state = "brig"
|
||||
|
||||
/area/security/prison/cell_block/B
|
||||
name = "\improper Prison Cell Block B"
|
||||
icon_state = "brig"
|
||||
|
||||
/area/security/prison/cell_block/C
|
||||
name = "\improper Prison Cell Block C"
|
||||
icon_state = "brig"
|
||||
|
||||
/area/security/execution
|
||||
name = "\improper Execution"
|
||||
icon_state = "security"
|
||||
|
||||
/area/security/processing
|
||||
name = "\improper Prisoner Processing"
|
||||
icon_state = "sec_prison"
|
||||
icon_state = "security"
|
||||
|
||||
/area/security/interrogation
|
||||
name = "\improper Interrogation"
|
||||
icon_state = "security"
|
||||
|
||||
/area/security/interrogationobs
|
||||
name = "\improper Interrogation Observation"
|
||||
icon_state = "security"
|
||||
|
||||
/area/security/evidence
|
||||
name = "\improper Evidence Room"
|
||||
icon_state = "security"
|
||||
|
||||
/area/security/prisonlockers
|
||||
name = "\improper Prisoner Lockers"
|
||||
icon_state = "sec_prison"
|
||||
|
||||
/area/security/medbay
|
||||
name = "\improper Security Medbay"
|
||||
icon_state = "brig"
|
||||
|
||||
/area/security/prisonershuttle
|
||||
name = "\improper Security Prisoner Shuttle"
|
||||
icon_state = "security"
|
||||
|
||||
/area/security/warden
|
||||
name = "\improper Warden"
|
||||
@@ -1400,13 +1499,27 @@ var/list/ghostteleportlocs = list()
|
||||
/area/security/armoury
|
||||
name = "\improper Armory"
|
||||
icon_state = "Warden"
|
||||
|
||||
/area/security/securearmoury
|
||||
name = "\improper Secure Armory"
|
||||
icon_state = "Warden"
|
||||
|
||||
/area/security/armoury/gamma
|
||||
name = "\improper Gamma Armory"
|
||||
icon_state = "Warden"
|
||||
requires_power = 0
|
||||
|
||||
/area/security/securehallway
|
||||
name = "\improper Security Secure Hallway"
|
||||
icon_state = "security"
|
||||
|
||||
/area/security/hos
|
||||
name = "\improper Head of Security's Office"
|
||||
icon_state = "sec_hos"
|
||||
|
||||
area/security/podbay
|
||||
name = "\improper Security Podbay"
|
||||
icon_state = "security"
|
||||
|
||||
/area/security/detectives_office
|
||||
name = "\improper Detective's Office"
|
||||
@@ -1510,7 +1623,7 @@ var/list/ghostteleportlocs = list()
|
||||
icon_state = "janitor"
|
||||
|
||||
/area/hydroponics
|
||||
name = "Hydroponics"
|
||||
name = "\improper Hydroponics"
|
||||
icon_state = "hydro"
|
||||
|
||||
//Toxins
|
||||
@@ -1534,6 +1647,10 @@ var/list/ghostteleportlocs = list()
|
||||
/area/toxins/xenobiology
|
||||
name = "\improper Xenobiology Lab"
|
||||
icon_state = "toxlab"
|
||||
|
||||
/area/toxins/xenobiology/flora
|
||||
name = "\improper Xenobiology Flora Lab"
|
||||
icon_state = "toxlab"
|
||||
|
||||
/area/toxins/storage
|
||||
name = "\improper Toxins Storage"
|
||||
@@ -2183,7 +2300,11 @@ var/list/the_station_areas = list (
|
||||
/area/holodeck,
|
||||
/area/library,
|
||||
/area/chapel,
|
||||
/area/escapepodbay,
|
||||
/area/lawoffice,
|
||||
/area/magistrateoffice,
|
||||
/area/clownoffice,
|
||||
/area/mimeoffice,
|
||||
/area/engine,
|
||||
/area/solar,
|
||||
/area/assembly,
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
name = "\improper DNA modifier"
|
||||
desc = "It scans DNA structures."
|
||||
icon = 'icons/obj/Cryogenic2.dmi'
|
||||
icon_state = "scanner_0"
|
||||
icon_state = "scanner_open"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
use_power = 1
|
||||
@@ -49,6 +49,9 @@
|
||||
var/mob/living/carbon/occupant = null
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker = null
|
||||
var/opened = 0
|
||||
var/damage_coeff
|
||||
var/scan_level
|
||||
var/precision_coeff
|
||||
|
||||
/obj/machinery/dna_scannernew/New()
|
||||
..()
|
||||
@@ -58,10 +61,21 @@
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src, 1)
|
||||
component_parts += new /obj/item/stack/cable_coil(src, 1)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/dna_scannernew/RefreshParts()
|
||||
scan_level = 0
|
||||
damage_coeff = 0
|
||||
precision_coeff = 0
|
||||
for(var/obj/item/weapon/stock_parts/scanning_module/P in component_parts)
|
||||
scan_level += P.rating
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/P in component_parts)
|
||||
precision_coeff = P.rating
|
||||
for(var/obj/item/weapon/stock_parts/micro_laser/P in component_parts)
|
||||
damage_coeff = P.rating
|
||||
|
||||
/obj/machinery/dna_scannernew/allow_drop()
|
||||
return 0
|
||||
|
||||
@@ -119,7 +133,7 @@
|
||||
usr.client.eye = src
|
||||
usr.loc = src
|
||||
src.occupant = usr
|
||||
src.icon_state = "scanner_1"
|
||||
src.icon_state = "scanner_occupied"
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
|
||||
@@ -165,31 +179,21 @@
|
||||
user.pulling = null
|
||||
|
||||
/obj/machinery/dna_scannernew/attackby(var/obj/item/weapon/item as obj, var/mob/user as mob)
|
||||
if (istype(item, /obj/item/weapon/screwdriver))
|
||||
if (!opened)
|
||||
src.opened = 1
|
||||
user << "You open the maintenance hatch of [src]."
|
||||
//src.icon_state = "autolathe_t"
|
||||
else
|
||||
src.opened = 0
|
||||
user << "You close the maintenance hatch of [src]."
|
||||
//src.icon_state = "autolathe"
|
||||
return 1
|
||||
else if(istype(item, /obj/item/weapon/crowbar))
|
||||
if (occupant)
|
||||
user << "\red You cannot disassemble this [src], it's occupado."
|
||||
return 1
|
||||
if (opened)
|
||||
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
|
||||
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(src.loc)
|
||||
M.state = 2
|
||||
M.icon_state = "box_1"
|
||||
for(var/obj/I in component_parts)
|
||||
if(I.reliability != 100 && crit_fail)
|
||||
I.crit_fail = 1
|
||||
I.loc = src.loc
|
||||
del(src)
|
||||
if(istype(item, /obj/item/weapon/screwdriver))
|
||||
if(occupant)
|
||||
user << "<span class='notice'>The maintenance panel is locked.</span>"
|
||||
return
|
||||
default_deconstruction_screwdriver(user, "[icon_state]_maintenance", "[initial(icon_state)]", item)
|
||||
|
||||
if(exchange_parts(user, item))
|
||||
return
|
||||
|
||||
if(istype(item, /obj/item/weapon/crowbar))
|
||||
if(panel_open)
|
||||
for(var/obj/I in contents) // in case there is something in the scanner
|
||||
I.loc = src.loc
|
||||
default_deconstruction_crowbar(item)
|
||||
return
|
||||
else if(istype(item, /obj/item/weapon/reagent_containers/glass))
|
||||
if(beaker)
|
||||
user << "\red A beaker is already loaded into the machine."
|
||||
@@ -206,10 +210,13 @@
|
||||
if (!ismob(G.affecting))
|
||||
return
|
||||
if (src.occupant)
|
||||
user << "\blue <B>The scanner is already occupied!</B>"
|
||||
user << "\blue <b>The scanner is already occupied!</b>"
|
||||
return
|
||||
if (G.affecting.abiotic())
|
||||
user << "\blue <B>Subject cannot have abiotic items on.</B>"
|
||||
user << "\blue <b>Subject cannot have abiotic items on.</b>"
|
||||
return
|
||||
if(panel_open)
|
||||
usr << "\blue <b>Close the maintenance panel first.</b>"
|
||||
return
|
||||
put_in(G.affecting)
|
||||
src.add_fingerprint(user)
|
||||
@@ -222,7 +229,7 @@
|
||||
M.client.eye = src
|
||||
M.loc = src
|
||||
src.occupant = M
|
||||
src.icon_state = "scanner_1"
|
||||
src.icon_state = "scanner_occupied"
|
||||
|
||||
// search for ghosts, if the corpse is empty and the scanner is connected to a cloner
|
||||
if(locate(/obj/machinery/computer/cloning, get_step(src, NORTH)) \
|
||||
@@ -238,14 +245,20 @@
|
||||
return
|
||||
|
||||
/obj/machinery/dna_scannernew/proc/go_out()
|
||||
if ((!( src.occupant ) || src.locked))
|
||||
if (!src.occupant)
|
||||
usr << "<span class=\"warning\">The scanner is empty!</span>"
|
||||
return
|
||||
|
||||
if (src.locked)
|
||||
usr << "<span class=\"warning\">The scanner is locked!</span>"
|
||||
return
|
||||
|
||||
if (src.occupant.client)
|
||||
src.occupant.client.eye = src.occupant.client.mob
|
||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||
src.occupant.loc = src.loc
|
||||
src.occupant = null
|
||||
src.icon_state = "scanner_0"
|
||||
src.icon_state = "scanner_open"
|
||||
return
|
||||
|
||||
/obj/machinery/dna_scannernew/ex_act(severity)
|
||||
@@ -288,7 +301,7 @@
|
||||
|
||||
/obj/machinery/computer/scan_consolenew
|
||||
name = "DNA Modifier Access Console"
|
||||
desc = "Scand DNA."
|
||||
desc = "Allows you to scan and modify DNA."
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "scanner"
|
||||
density = 1
|
||||
@@ -327,7 +340,6 @@
|
||||
return
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/ex_act(severity)
|
||||
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
//SN src = null
|
||||
@@ -342,7 +354,6 @@
|
||||
return
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/blob_act()
|
||||
|
||||
if(prob(75))
|
||||
del(src)
|
||||
|
||||
@@ -395,14 +406,20 @@
|
||||
return
|
||||
*/
|
||||
/obj/machinery/computer/scan_consolenew/attack_paw(user as mob)
|
||||
ui_interact(user)
|
||||
attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/attack_ai(user as mob)
|
||||
src.add_hiddenprint(user)
|
||||
ui_interact(user)
|
||||
attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/attack_hand(user as mob)
|
||||
if(!..())
|
||||
if(isnull(connected))
|
||||
for(dir in list(NORTH,EAST,SOUTH,WEST))
|
||||
connected = locate(/obj/machinery/dna_scannernew, get_step(src, dir))
|
||||
if(!isnull(connected))
|
||||
attack_hand(user)
|
||||
break
|
||||
else if(!..())
|
||||
ui_interact(user)
|
||||
|
||||
/**
|
||||
@@ -475,7 +492,7 @@
|
||||
occupantData["name"] = connected.occupant.name
|
||||
occupantData["stat"] = connected.occupant.stat
|
||||
occupantData["isViableSubject"] = 1
|
||||
if (M_NOCLONE in connected.occupant.mutations || !src.connected.occupant.dna)
|
||||
if ((M_NOCLONE in connected.occupant.mutations && connected.scan_level < 3) || !src.connected.occupant.dna)
|
||||
occupantData["isViableSubject"] = 0
|
||||
occupantData["health"] = connected.occupant.health
|
||||
occupantData["maxHealth"] = connected.occupant.maxHealth
|
||||
@@ -553,7 +570,7 @@
|
||||
else
|
||||
randmuti(src.connected.occupant)
|
||||
|
||||
src.connected.occupant.radiation += ((src.radiation_intensity*3)+src.radiation_duration*3)
|
||||
src.connected.occupant.radiation += (((src.radiation_intensity*3)+src.radiation_duration*3) / connected.damage_coeff)
|
||||
src.connected.locked = lock_state
|
||||
return 1 // return 1 forces an update to all Nano uis attached to src
|
||||
|
||||
@@ -649,7 +666,7 @@
|
||||
src.connected.occupant.UpdateAppearance()
|
||||
src.connected.occupant.radiation += (src.radiation_intensity+src.radiation_duration)
|
||||
else
|
||||
if (prob(20+src.radiation_intensity))
|
||||
if (prob(20+src.radiation_intensity))
|
||||
randmutb(src.connected.occupant)
|
||||
domutcheck(src.connected.occupant,src.connected)
|
||||
else
|
||||
@@ -700,7 +717,7 @@
|
||||
irradiating = 0
|
||||
|
||||
if(src.connected.occupant)
|
||||
if (prob((80 + (src.radiation_duration / 2))))
|
||||
if (prob((80 + ((src.radiation_duration / 2) + (connected.precision_coeff ** 3)))))
|
||||
// FIXME: Find out what these corresponded to and change them to the WHATEVERBLOCK they need to be.
|
||||
//if ((src.selected_se_block != 2 || src.selected_se_block != 12 || src.selected_se_block != 8 || src.selected_se_block || 10) && prob (20))
|
||||
var/real_SE_block=selected_se_block
|
||||
@@ -713,11 +730,11 @@
|
||||
|
||||
//testing("Irradiated SE block [real_SE_block]:[src.selected_se_subblock] ([original_block] now [block]) [(real_SE_block!=selected_se_block) ? "(SHIFTED)":""]!")
|
||||
connected.occupant.dna.SetSESubBlock(real_SE_block,selected_se_subblock,block)
|
||||
src.connected.occupant.radiation += (src.radiation_intensity+src.radiation_duration)
|
||||
src.connected.occupant.radiation += ((src.radiation_intensity+src.radiation_duration) / connected.damage_coeff)
|
||||
domutcheck(src.connected.occupant,src.connected)
|
||||
else
|
||||
src.connected.occupant.radiation += ((src.radiation_intensity*2)+src.radiation_duration)
|
||||
if (prob(80-src.radiation_duration))
|
||||
src.connected.occupant.radiation += (((src.radiation_intensity*2)+src.radiation_duration) / connected.damage_coeff)
|
||||
if (prob(80-src.radiation_duration))
|
||||
//testing("Random bad mut!")
|
||||
randmutb(src.connected.occupant)
|
||||
domutcheck(src.connected.occupant,src.connected)
|
||||
@@ -814,7 +831,7 @@
|
||||
return 1
|
||||
|
||||
if (bufferOption == "transfer")
|
||||
if (!src.connected.occupant || (M_NOCLONE in src.connected.occupant.mutations) || !src.connected.occupant.dna)
|
||||
if (!src.connected.occupant || (M_NOCLONE in src.connected.occupant.mutations && connected.scan_level < 3) || !src.connected.occupant.dna)
|
||||
return
|
||||
|
||||
irradiating = 2
|
||||
@@ -838,7 +855,7 @@
|
||||
src.connected.occupant.dna.SE = buf.dna.SE
|
||||
src.connected.occupant.dna.UpdateSE()
|
||||
domutcheck(src.connected.occupant,src.connected)
|
||||
src.connected.occupant.radiation += rand(20,50)
|
||||
src.connected.occupant.radiation += (rand(20,50) / connected.damage_coeff)
|
||||
return 1
|
||||
|
||||
if (bufferOption == "createInjector")
|
||||
|
||||
@@ -221,14 +221,20 @@ Obviously, requires DNA2.
|
||||
|
||||
/obj/effect/proc_holder/spell/wizard/targeted/remotetalk/choose_targets(mob/user = usr)
|
||||
var/list/targets = new /list()
|
||||
targets += input("Choose the target to talk to.", "Targeting") as mob in living_mob_list
|
||||
var/list/validtargets = new /list()
|
||||
for(var/mob/M in view(usr))
|
||||
validtargets += M
|
||||
if(!validtargets.len || validtargets.len == 1)
|
||||
usr << "<span class='warning'>There are no valid targets in range!</span>"
|
||||
start_recharge()
|
||||
return
|
||||
targets += input("Choose the target to talk to.", "Targeting") as mob in validtargets
|
||||
|
||||
perform(targets)
|
||||
|
||||
/obj/effect/proc_holder/spell/wizard/targeted/remotetalk/cast(list/targets)
|
||||
if(!ishuman(usr)) return
|
||||
|
||||
var/say = input ("What do you wish to say")
|
||||
var/say = input("What do you wish to say")
|
||||
|
||||
for(var/mob/living/target in targets)
|
||||
if(M_REMOTE_TALK in target.mutations)
|
||||
@@ -267,8 +273,16 @@ Obviously, requires DNA2.
|
||||
icon_power_button = "genetic_view"
|
||||
|
||||
/obj/effect/proc_holder/spell/wizard/targeted/remoteview/choose_targets(mob/user = usr)
|
||||
var/list/targets = new /list()
|
||||
targets += input("Choose the target to spy on.", "Targeting") as mob in living_mob_list
|
||||
var/list/targets = living_mob_list
|
||||
var/list/remoteviewers = new /list()
|
||||
for(var/mob/M in targets)
|
||||
if(M_REMOTE_VIEW in M.mutations)
|
||||
remoteviewers += M
|
||||
if(!remoteviewers.len || remoteviewers.len == 1)
|
||||
usr << "<span class='warning'>No valid targets with remote view were found!</span>"
|
||||
start_recharge()
|
||||
return
|
||||
targets += input("Choose the target to spy on.", "Targeting") as mob in remoteviewers
|
||||
|
||||
perform(targets)
|
||||
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
/obj/item/weapon/antag_spawner
|
||||
throw_speed = 1
|
||||
throw_range = 5
|
||||
w_class = 1.0
|
||||
var/used = 0
|
||||
|
||||
/obj/item/weapon/antag_spawner/proc/spawn_antag(var/client/C, var/turf/T, var/type = "")
|
||||
return
|
||||
|
||||
/obj/item/weapon/antag_spawner/proc/equip_antag(mob/target as mob)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/antag_spawner/borg_tele
|
||||
name = "Syndicate Cyborg Teleporter"
|
||||
desc = "A single-use teleporter used to deploy a Syndicate Cyborg on the field."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "locator"
|
||||
var/TC_cost = 0
|
||||
var/checking = 0
|
||||
|
||||
/obj/item/weapon/antag_spawner/borg_tele/attack_self(mob/user as mob)
|
||||
if(used)
|
||||
user << "The teleporter is out of power."
|
||||
return
|
||||
if(!checking)
|
||||
checking = 1
|
||||
user << "<span class='notice'>The device is now checking for possible candidates.</span>"
|
||||
get_candidate_answer(user, get_candidates(BE_OPERATIVE))
|
||||
else
|
||||
user << "<span class='notice'>The device is already checking for possible candidates.</span>"
|
||||
return
|
||||
|
||||
/obj/item/weapon/antag_spawner/borg_tele/proc/get_candidate_answer(mob/user as mob, var/list/possiblecandidates = list())
|
||||
if(possiblecandidates.len <= 0)
|
||||
checking = 0
|
||||
user << "<span class='notice'>Unable to connect to Syndicate Command. Please wait and try again later or use the teleporter on your uplink to get your points refunded.</span>"
|
||||
return
|
||||
else
|
||||
var/possibleborg = pick(possiblecandidates)
|
||||
var/input = alert(possibleborg,"Do you want to spawn in as a cyborg for the Syndicate operatives?","Syndicate Cyborg","No","Yes")
|
||||
if(input == "Yes" && used == 0)
|
||||
possiblecandidates -= possibleborg
|
||||
used = 1
|
||||
checking = 0
|
||||
spawn_antag(possibleborg, get_turf(src.loc), "syndieborg")
|
||||
else
|
||||
possiblecandidates -= possibleborg
|
||||
get_candidate_answer(user, possiblecandidates)
|
||||
|
||||
/obj/item/weapon/antag_spawner/borg_tele/spawn_antag(var/client/C, var/turf/T, var/type = "")
|
||||
var/datum/effect/effect/system/spark_spread/S = new /datum/effect/effect/system/spark_spread
|
||||
S.set_up(4, 1, src)
|
||||
S.start()
|
||||
var/mob/living/silicon/robot/R = new /mob/living/silicon/robot/syndicate(T)
|
||||
R.key = C.key
|
||||
ticker.mode.syndicates += R.mind
|
||||
ticker.mode.update_synd_icons_added(R.mind)
|
||||
R.mind.special_role = "syndicate"
|
||||
R.faction = list("syndicate")
|
||||
@@ -12,7 +12,7 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
|
||||
required_players = 2
|
||||
required_players_secret = 10
|
||||
required_enemies = 1
|
||||
recommended_enemies = 2
|
||||
recommended_enemies = 4
|
||||
|
||||
uplink_welcome = "Syndicate Uplink Console:"
|
||||
uplink_uses = 20
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
flags = FPRINT|TABLEPASS|HEADCOVERSEYES
|
||||
armor = list(melee = 30, bullet = 10, laser = 5,energy = 5, bomb = 0, bio = 0, rad = 0)
|
||||
cold_protection = HEAD
|
||||
min_cold_protection_temperature = SPACE_HELMET_MIN_COLD_PROTECITON_TEMPERATURE
|
||||
min_cold_protection_temperature = SPACE_HELMET_MIN_COLD_PROTECTION_TEMPERATURE
|
||||
siemens_coefficient = 0
|
||||
|
||||
|
||||
|
||||
@@ -140,6 +140,13 @@ proc/issyndicate(mob/living/M as mob)
|
||||
leader_selected = 1
|
||||
else
|
||||
synd_mind.current.real_name = "[syndicate_name()] Operative #[agent_number]"
|
||||
|
||||
var/list/foundIDs = synd_mind.current.search_contents_for(/obj/item/weapon/card/id)
|
||||
if(foundIDs.len)
|
||||
for(var/obj/item/weapon/card/id/ID in foundIDs)
|
||||
ID.name = "[syndicate_name()] Operative ID card"
|
||||
ID.registered_name = synd_mind.current.real_name
|
||||
|
||||
agent_number++
|
||||
spawnpos++
|
||||
update_synd_icons_added(synd_mind)
|
||||
@@ -158,10 +165,12 @@ proc/issyndicate(mob/living/M as mob)
|
||||
|
||||
|
||||
/datum/game_mode/proc/prepare_syndicate_leader(var/datum/mind/synd_mind, var/nuke_code)
|
||||
// var/leader_title = pick("Czar", "Boss", "Commander", "Chief", "Kingpin", "Director", "Overlord")
|
||||
var/leader_title = pick("Czar", "Boss", "Commander", "Chief", "Kingpin", "Director", "Overlord")
|
||||
/*
|
||||
spawn(1)
|
||||
// NukeNameAssign(nukelastname(synd_mind.current),syndicates) //allows time for the rest of the syndies to be chosen
|
||||
synd_mind.current.real_name = "[pick(first_names_male)] [pick(last_names)]"
|
||||
NukeNameAssign(nukelastname(synd_mind.current),syndicates) //allows time for the rest of the syndies to be chosen
|
||||
*/
|
||||
synd_mind.current.real_name = "[syndicate_name()] Team [leader_title]"
|
||||
synd_mind.current << "<B>You are the Syndicate leader for this mission. You are responsible for the distribution of telecrystals and your ID is the only one who can open the launch bay doors.</B>"
|
||||
synd_mind.current << "<B>If you feel you are not up to this task, give your ID to another operative.</B>"
|
||||
|
||||
@@ -169,7 +178,8 @@ proc/issyndicate(mob/living/M as mob)
|
||||
|
||||
if(foundIDs.len)
|
||||
for(var/obj/item/weapon/card/id/ID in foundIDs)
|
||||
ID.name = "lead agent card"
|
||||
ID.name = "[syndicate_name()] [leader_title] ID card"
|
||||
ID.registered_name = synd_mind.current.real_name
|
||||
ID.access += access_syndicate_leader
|
||||
else
|
||||
message_admins("Warning: Nuke Ops spawned without access to leave their spawn area!")
|
||||
@@ -241,6 +251,13 @@ proc/issyndicate(mob/living/M as mob)
|
||||
|
||||
if(synd_mob.species)
|
||||
|
||||
/*
|
||||
Incase anyone ever gets the burning desire to have nukeops with randomized apperances. -- Dave
|
||||
synd_mob.gender = pick(MALE, FEMALE) // Randomized appearances for the nukeops.
|
||||
var/datum/preferences/pref = new()
|
||||
A.randomize_appearance_for(synd_mob)
|
||||
*/
|
||||
|
||||
var/race = synd_mob.species.name
|
||||
|
||||
switch(race)
|
||||
@@ -391,7 +408,7 @@ proc/issyndicate(mob/living/M as mob)
|
||||
return 1
|
||||
|
||||
|
||||
/*/proc/nukelastname(var/mob/M as mob) //--All praise goes to NEO|Phyte, all blame goes to DH, and it was Cindi-Kate's idea. Also praise Urist for copypasta ho.
|
||||
/proc/nukelastname(var/mob/M as mob) //--All praise goes to NEO|Phyte, all blame goes to DH, and it was Cindi-Kate's idea. Also praise Urist for copypasta ho.
|
||||
var/randomname = pick(last_names)
|
||||
var/newname = copytext(sanitize(input(M,"You are the nuke operative [pick("Czar", "Boss", "Commander", "Chief", "Kingpin", "Director", "Overlord")]. Please choose a last name for your family.", "Name change",randomname)),1,MAX_NAME_LEN)
|
||||
|
||||
@@ -404,7 +421,7 @@ proc/issyndicate(mob/living/M as mob)
|
||||
return nukelastname(M)
|
||||
|
||||
return newname
|
||||
*/
|
||||
|
||||
/proc/NukeNameAssign(var/lastname,var/list/syndicates)
|
||||
for(var/datum/mind/synd_mind in syndicates)
|
||||
switch(synd_mind.current.gender)
|
||||
|
||||
@@ -21,17 +21,18 @@ var/bomb_set
|
||||
var/light_wire
|
||||
var/safety_wire
|
||||
var/timing_wire
|
||||
var/removal_stage = 0 // 0 is no removal, 1 is covers removed, 2 is covers open,
|
||||
// 3 is sealant open, 4 is unwrenched, 5 is removed from bolts.
|
||||
var/removal_stage = 0 // 0 is no removal, 1 is covers removed, 2 is covers open, 3 is sealant open, 4 is unwrenched, 5 is removed from bolts.
|
||||
var/lastentered
|
||||
var/data[0]
|
||||
var/uiwidth
|
||||
var/uiheight
|
||||
var/uititle
|
||||
flags = FPRINT
|
||||
use_power = 0
|
||||
|
||||
|
||||
|
||||
/obj/machinery/nuclearbomb/New()
|
||||
..()
|
||||
r_code = "[rand(10000, 99999.0)]"//Creates a random code upon object spawn.
|
||||
|
||||
src.wires["Red"] = 0
|
||||
src.wires["Blue"] = 0
|
||||
src.wires["Green"] = 0
|
||||
@@ -55,11 +56,10 @@ var/bomb_set
|
||||
explode()
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_hand(M)
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
|
||||
/obj/machinery/nuclearbomb/attackby(obj/item/weapon/O as obj, mob/user as mob)
|
||||
|
||||
if (istype(O, /obj/item/weapon/screwdriver))
|
||||
src.add_fingerprint(user)
|
||||
if (src.auth)
|
||||
@@ -67,35 +67,37 @@ var/bomb_set
|
||||
src.opened = 1
|
||||
overlays += image(icon, "npanel_open")
|
||||
user << "You unscrew the control panel of [src]."
|
||||
|
||||
else
|
||||
src.opened = 0
|
||||
overlays -= image(icon, "npanel_open")
|
||||
user << "You screw the control panel of [src] back on."
|
||||
else
|
||||
if (src.opened == 0)
|
||||
user << "The [src] emits a buzzing noise, the panel staying locked in."
|
||||
user << "[src] emits a buzzing noise, the panel staying locked in."
|
||||
if (src.opened == 1)
|
||||
src.opened = 0
|
||||
overlays -= image(icon, "npanel_open")
|
||||
user << "You screw the control panel of [src] back on."
|
||||
flick("nuclearbombc", src)
|
||||
|
||||
ui_interact(user)
|
||||
return
|
||||
|
||||
if (istype(O, /obj/item/device/multitool) || istype(O, /obj/item/weapon/wirecutters))
|
||||
ui_interact(user)
|
||||
|
||||
if (src.extended)
|
||||
if (istype(O, /obj/item/weapon/disk/nuclear))
|
||||
usr.drop_item()
|
||||
O.loc = src
|
||||
src.auth = O
|
||||
src.add_fingerprint(user)
|
||||
ui_interact(user)
|
||||
return
|
||||
|
||||
if (src.anchored)
|
||||
switch(removal_stage)
|
||||
if(0)
|
||||
if(istype(O,/obj/item/weapon/weldingtool))
|
||||
|
||||
var/obj/item/weapon/weldingtool/WT = O
|
||||
if(!WT.isOn()) return
|
||||
if (WT.get_fuel() < 5) // uses up 5 fuel.
|
||||
@@ -169,25 +171,7 @@ var/bomb_set
|
||||
if (src.opened)
|
||||
nukehack_win(user,50)
|
||||
user.set_machine(src)
|
||||
var/dat = text("<TT><B>Nuclear Fission Explosive</B><BR>\nAuth. Disk: <A href='?src=\ref[];auth=1'>[]</A><HR>", src, (src.auth ? "++++++++++" : "----------"))
|
||||
if (src.auth)
|
||||
if (src.yes_code)
|
||||
dat += text("\n<B>Status</B>: []-[]<BR>\n<B>Timer</B>: []<BR>\n<BR>\nTimer: [] <A href='?src=\ref[];timer=1'>Toggle</A><BR>\nTime: <A href='?src=\ref[];time=-10'>-</A> <A href='?src=\ref[];time=-1'>-</A> [] <A href='?src=\ref[];time=1'>+</A> <A href='?src=\ref[];time=10'>+</A><BR>\n<BR>\nSafety: [] <A href='?src=\ref[];safety=1'>Toggle</A><BR>\nAnchor: [] <A href='?src=\ref[];anchor=1'>Toggle</A><BR>\n", (src.timing ? "Func/Set" : "Functional"), (src.safety ? "Safe" : "Engaged"), src.timeleft, (src.timing ? "On" : "Off"), src, src, src, src.timeleft, src, src, (src.safety ? "On" : "Off"), src, (src.anchored ? "Engaged" : "Off"), src)
|
||||
else
|
||||
dat += text("\n<B>Status</B>: Auth. S2-[]<BR>\n<B>Timer</B>: []<BR>\n<BR>\nTimer: [] Toggle<BR>\nTime: - - [] + +<BR>\n<BR>\n[] Safety: Toggle<BR>\nAnchor: [] Toggle<BR>\n", (src.safety ? "Safe" : "Engaged"), src.timeleft, (src.timing ? "On" : "Off"), src.timeleft, (src.safety ? "On" : "Off"), (src.anchored ? "Engaged" : "Off"))
|
||||
else
|
||||
if (src.timing)
|
||||
dat += text("\n<B>Status</B>: Set-[]<BR>\n<B>Timer</B>: []<BR>\n<BR>\nTimer: [] Toggle<BR>\nTime: - - [] + +<BR>\n<BR>\nSafety: [] Toggle<BR>\nAnchor: [] Toggle<BR>\n", (src.safety ? "Safe" : "Engaged"), src.timeleft, (src.timing ? "On" : "Off"), src.timeleft, (src.safety ? "On" : "Off"), (src.anchored ? "Engaged" : "Off"))
|
||||
else
|
||||
dat += text("\n<B>Status</B>: Auth. S1-[]<BR>\n<B>Timer</B>: []<BR>\n<BR>\nTimer: [] Toggle<BR>\nTime: - - [] + +<BR>\n<BR>\nSafety: [] Toggle<BR>\nAnchor: [] Toggle<BR>\n", (src.safety ? "Safe" : "Engaged"), src.timeleft, (src.timing ? "On" : "Off"), src.timeleft, (src.safety ? "On" : "Off"), (src.anchored ? "Engaged" : "Off"))
|
||||
var/message = "AUTH"
|
||||
if (src.auth)
|
||||
message = text("[]", src.code)
|
||||
if (src.yes_code)
|
||||
message = "*****"
|
||||
dat += text("<HR>\n>[]<BR>\n<A href='?src=\ref[];type=1'>1</A>-<A href='?src=\ref[];type=2'>2</A>-<A href='?src=\ref[];type=3'>3</A><BR>\n<A href='?src=\ref[];type=4'>4</A>-<A href='?src=\ref[];type=5'>5</A>-<A href='?src=\ref[];type=6'>6</A><BR>\n<A href='?src=\ref[];type=7'>7</A>-<A href='?src=\ref[];type=8'>8</A>-<A href='?src=\ref[];type=9'>9</A><BR>\n<A href='?src=\ref[];type=R'>R</A>-<A href='?src=\ref[];type=0'>0</A>-<A href='?src=\ref[];type=E'>E</A><BR>\n</TT>", message, src, src, src, src, src, src, src, src, src, src, src, src)
|
||||
user << browse(dat, "window=nuclearbomb;size=300x400")
|
||||
onclose(user, "nuclearbomb")
|
||||
ui_interact(user)
|
||||
else if (src.deployable)
|
||||
if(removal_stage < 5)
|
||||
src.anchored = 1
|
||||
@@ -201,15 +185,53 @@ var/bomb_set
|
||||
return
|
||||
|
||||
obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
|
||||
var/dat as text
|
||||
dat += "<TT><B>Nuclear Fission Explosive</B><BR>\nNuclear Device Wires:</A><HR>"
|
||||
for(var/wire in src.wires)
|
||||
dat += text("[wire] Wire: <A href='?src=\ref[src];wire=[wire];act=wire'>[src.wires[wire] ? "Mend" : "Cut"]</A> <A href='?src=\ref[src];wire=[wire];act=pulse'>Pulse</A><BR>")
|
||||
dat += text("<HR>The device is [src.timing ? "shaking!" : "still"]<BR>")
|
||||
dat += text("The device is [src.safety ? "quiet" : "whirring"].<BR>")
|
||||
dat += text("The lights are [src.lighthack ? "static" : "functional"].<BR>")
|
||||
user << browse("<HTML><HEAD><TITLE>Bomb Defusion</TITLE></HEAD><BODY>[dat]</BODY></HTML>","window=nukebomb_hack")
|
||||
onclose(user, "nukebomb_hack")
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/nuclearbomb/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
if(!src.opened)
|
||||
data["hacking"] = 0
|
||||
data["auth"] = src.auth
|
||||
if (src.auth)
|
||||
if (src.yes_code)
|
||||
data["authstatus"] = src.timing ? "Functional/Set" : "Functional"
|
||||
else
|
||||
data["authstatus"] = "Auth. S2"
|
||||
else
|
||||
if (src.timing)
|
||||
data["authstatus"] = "Set"
|
||||
else
|
||||
data["authstatus"] = "Auth. S1"
|
||||
data["safe"] = src.safety ? "Safe" : "Engaged"
|
||||
data["time"] = src.timeleft
|
||||
data["timer"] = src.timing
|
||||
data["safety"] = src.safety
|
||||
data["anchored"] = src.anchored
|
||||
data["yescode"] = src.yes_code
|
||||
data["message"] = "AUTH"
|
||||
if (src.auth)
|
||||
data["message"] = src.code
|
||||
if (src.yes_code)
|
||||
data["message"] = "*****"
|
||||
uiwidth = 300
|
||||
uiheight = 510
|
||||
uititle = "Nuke Control Panel"
|
||||
else
|
||||
data["hacking"] = 1
|
||||
var/list/tempwires[0]
|
||||
for(var/wire in src.wires)
|
||||
tempwires.Add(list(list("name" = wire, "cut" = src.wires[wire])))
|
||||
data["wires"] = tempwires
|
||||
data["timing"] = src.timing
|
||||
data["safety"] = src.safety
|
||||
data["lighthack"] = src.lighthack
|
||||
uiwidth = 420
|
||||
uiheight = 440
|
||||
uititle = "Nuclear Bomb Defusion"
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "nuclear_bomb.tmpl", uititle, uiwidth, uiheight)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/nuclearbomb/verb/make_deployable()
|
||||
set category = "Object"
|
||||
@@ -224,9 +246,9 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
|
||||
src.deployable = 1
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/nuclearbomb/Topic(href, href_list)
|
||||
..()
|
||||
if(..())
|
||||
return
|
||||
if (!usr.canmove || usr.stat || usr.restrained())
|
||||
return
|
||||
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
|
||||
@@ -297,9 +319,15 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
|
||||
src.yes_code = 0
|
||||
src.code = null
|
||||
else
|
||||
src.code += text("[]", href_list["type"])
|
||||
if (length(src.code) > 5)
|
||||
src.code = "ERROR"
|
||||
lastentered = text("[]", href_list["type"])
|
||||
if (text2num(lastentered) == null)
|
||||
var/turf/LOC = get_turf(usr)
|
||||
message_admins("[key_name_admin(usr)] tried to exploit a nuclear bomb by entering non-numerical codes: <a href='?_src_=vars;Vars=\ref[src]'>[lastentered]</a>! ([LOC ? "<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[LOC.x];Y=[LOC.y];Z=[LOC.z]'>JMP</a>" : "null"])", 0)
|
||||
log_admin("EXPLOIT: [key_name(usr)] tried to exploit a nuclear bomb by entering non-numerical codes: [lastentered]!")
|
||||
else
|
||||
src.code += lastentered
|
||||
if (length(src.code) > 5)
|
||||
src.code = "ERROR"
|
||||
if (src.yes_code)
|
||||
if (href_list["time"])
|
||||
var/time = text2num(href_list["time"])
|
||||
@@ -309,7 +337,8 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
|
||||
if (src.timing == -1.0)
|
||||
return
|
||||
if (src.safety)
|
||||
usr << "\red The safety is still on."
|
||||
usr << "\red The safety is still on."
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
src.timing = !( src.timing )
|
||||
if (src.timing)
|
||||
@@ -329,7 +358,6 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
|
||||
src.timing = 0
|
||||
bomb_set = 0
|
||||
if (href_list["anchor"])
|
||||
|
||||
if(removal_stage == 5)
|
||||
src.anchored = 0
|
||||
visible_message("\red \The [src] makes a highly unpleasant crunching noise. It looks like the anchoring bolts have been cut.")
|
||||
@@ -344,9 +372,8 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
|
||||
src.add_fingerprint(usr)
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_hand(M)
|
||||
nanomanager.update_uis(src)
|
||||
else
|
||||
usr << browse(null, "window=nuclearbomb")
|
||||
return
|
||||
return
|
||||
|
||||
@@ -398,8 +425,12 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
|
||||
ticker.mode.explosion_in_progress = 0
|
||||
if(ticker.mode.name == "nuclear emergency")
|
||||
ticker.mode:nukes_left --
|
||||
else if(off_station == 1)
|
||||
world << "<b>A nuclear device was set off, but the explosion was out of reach of the station!</b>"
|
||||
else if(off_station == 2)
|
||||
world << "<b>A nuclear device was set off, but the device was not on the station!</b>"
|
||||
else
|
||||
world << "<B>The station was destoyed by the nuclear blast!</B>"
|
||||
world << "<b>The station was destoyed by the nuclear blast!</b>"
|
||||
|
||||
ticker.mode.station_was_nuked = (off_station<2) //offstation==1 is a draw. the station becomes irradiated and needs to be evacuated.
|
||||
//kinda shit but I couldn't get permission to do what I wanted to do.
|
||||
@@ -412,7 +443,7 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
|
||||
if(blackbox)
|
||||
blackbox.save_all_data_to_sql()
|
||||
sleep(300)
|
||||
log_game("Rebooting due to nuclear detonation")
|
||||
log_game("Rebooting due to nuclear detonation.")
|
||||
world.Reboot()
|
||||
return
|
||||
return
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/datum/theft_objective/antique_laser_gun
|
||||
name = "the captain's antique laser gun"
|
||||
typepath = /obj/item/weapon/gun/energy/laser/captain
|
||||
@@ -54,9 +53,9 @@
|
||||
typepath = /obj/item/device/aicard
|
||||
|
||||
/datum/theft_objective/magboots
|
||||
name = "a pair of magboots"
|
||||
typepath = /obj/item/clothing/shoes/magboots
|
||||
protected_jobs = list("Station Engineer", "Life Support Specialist", "Chief Engineer")
|
||||
name = "the chief engineer's advanced magnetic boots"
|
||||
typepath = /obj/item/clothing/shoes/magboots/advance
|
||||
protected_jobs = list("Chief Engineer")
|
||||
|
||||
/datum/theft_objective/blueprints
|
||||
name = "the station blueprints"
|
||||
@@ -76,6 +75,21 @@
|
||||
name = "a piece of corgi meat"
|
||||
typepath = /obj/item/weapon/reagent_containers/food/snacks/meat/corgi
|
||||
|
||||
/datum/theft_objective/capmedal
|
||||
name = "the medal of captaincy"
|
||||
typepath = /obj/item/clothing/tie/medal/gold/captain
|
||||
protected_jobs = list("Captain")
|
||||
|
||||
/datum/theft_objective/nukedisc
|
||||
name = "the nuclear authentication disk"
|
||||
typepath = /obj/item/weapon/disk/nuclear
|
||||
protected_jobs = list("Captain")
|
||||
|
||||
/datum/theft_objective/reactive
|
||||
name = "the reactive teleport armor"
|
||||
typepath = /obj/item/clothing/suit/armor/reactive
|
||||
protected_jobs = list("Research Director")
|
||||
|
||||
/datum/theft_objective/rd_jumpsuit
|
||||
name = "the research director's jumpsuit"
|
||||
typepath = /obj/item/clothing/under/rank/research_director
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
required_players = 2
|
||||
required_players_secret = 10
|
||||
required_enemies = 1
|
||||
recommended_enemies = 2
|
||||
recommended_enemies = 4
|
||||
|
||||
uplink_welcome = "Syndicate Uplink Console:"
|
||||
uplink_uses = 20
|
||||
|
||||
@@ -200,6 +200,10 @@
|
||||
return list(access_cent_general, access_cent_living, access_cent_storage)
|
||||
if("Thunderdome Overseer")
|
||||
return list(access_cent_general, access_cent_thunder)
|
||||
if("Emergency Response Team")
|
||||
return list(access_cent_general, access_cent_living, access_cent_storage)
|
||||
if("Emergency Response Team Leader")
|
||||
return list(access_cent_general, access_cent_living, access_cent_storage, access_cent_teleporter)
|
||||
if("Intel Officer")
|
||||
return list(access_cent_general, access_cent_living)
|
||||
if("Medical Officer")
|
||||
@@ -210,6 +214,12 @@
|
||||
return list(access_cent_general, access_cent_specops, access_cent_medical, access_cent_teleporter, access_cent_storage)
|
||||
if("BlackOps Commander")
|
||||
return list(access_cent_general, access_cent_thunder, access_cent_specops, access_cent_living, access_cent_storage, access_cent_creed)
|
||||
if("Special Operations Officer")
|
||||
return get_all_centcom_access()
|
||||
if("NanoTrasen Navy Officer")
|
||||
return get_all_centcom_access()
|
||||
if("NanoTrasen Navy Captain")
|
||||
return get_all_centcom_access()
|
||||
if("Supreme Commander")
|
||||
return get_all_centcom_access()
|
||||
|
||||
@@ -447,7 +457,7 @@
|
||||
return all_jobs
|
||||
|
||||
/proc/get_all_centcom_jobs()
|
||||
return list("VIP Guest","Custodian","Thunderdome Overseer","Intel Officer","Medical Officer","Death Commando","Research Officer","BlackOps Commander","Supreme Commander")
|
||||
return list("VIP Guest","Custodian","Thunderdome Overseer","Emergency Response Team","Emergency Response Team Leader","Intel Officer","Medical Officer","Death Commando","Research Officer","BlackOps Commander","Special Operations Officer","NanoTrasen Navy Officer","NanoTrasen Navy Captain","Supreme Commander")
|
||||
|
||||
//gets the actual job rank (ignoring alt titles)
|
||||
//this is used solely for sechuds
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/engineer(H), slot_r_hand)
|
||||
else
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/engineer(H.back), slot_in_backpack)
|
||||
H.equip_or_collect(new /obj/item/weapon/melee/telebaton(H.back), slot_in_backpack)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -83,7 +84,7 @@
|
||||
supervisors = "the chief engineer"
|
||||
selection_color = "#fff5cc"
|
||||
access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_atmospherics)
|
||||
minimal_access = list(access_eva, access_atmospherics, access_maint_tunnels, access_emergency_storage, access_construction)
|
||||
minimal_access = list(access_eva, access_atmospherics, access_maint_tunnels, access_external_airlocks, access_emergency_storage, access_construction)
|
||||
alt_titles = list("Atmospheric Technician")
|
||||
minimal_player_age = 7
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
|
||||
else
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
|
||||
H.equip_or_collect(new /obj/item/weapon/melee/telebaton(H.back), slot_in_backpack)
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_tox(H), slot_back)
|
||||
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
|
||||
H.equip_or_collect(new /obj/item/weapon/melee/telebaton(H.back), slot_in_backpack)
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
else
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
|
||||
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
|
||||
H.equip_or_collect(new /obj/item/weapon/melee/telebaton(H.back), slot_in_backpack)
|
||||
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
|
||||
L.imp_in = H
|
||||
L.implanted = 1
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/ids(H), slot_r_hand)
|
||||
else
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack)
|
||||
H.equip_or_collect(new /obj/item/weapon/melee/telebaton(H.back), slot_in_backpack)
|
||||
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
|
||||
L.imp_in = H
|
||||
L.implanted = 1
|
||||
@@ -84,6 +85,7 @@
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/ids(H), slot_r_hand)
|
||||
else
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack)
|
||||
H.equip_or_collect(new /obj/item/weapon/melee/telebaton(H.back), slot_in_backpack)
|
||||
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
|
||||
L.imp_in = H
|
||||
L.implanted = 1
|
||||
|
||||
@@ -300,7 +300,6 @@
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
|
||||
else
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
|
||||
H.equip_or_collect(new /obj/item/key(H), slot_l_store)
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
idle_power_usage = 0
|
||||
var/syndicate = 0
|
||||
var/obj/item/device/radio/beacon/Beacon
|
||||
|
||||
New()
|
||||
@@ -17,6 +18,7 @@
|
||||
Beacon = new /obj/item/device/radio/beacon
|
||||
Beacon.invisibility = INVISIBILITY_MAXIMUM
|
||||
Beacon.loc = T
|
||||
Beacon.syndicate = syndicate
|
||||
|
||||
hide(T.intact)
|
||||
|
||||
|
||||
+131
-50
@@ -1,47 +1,81 @@
|
||||
/obj/machinery/atmospherics/unary/cold_sink/freezer
|
||||
name = "gas cooling system"
|
||||
name = "freezer"
|
||||
icon = 'icons/obj/Cryogenic2.dmi'
|
||||
icon_state = "freezer_0"
|
||||
icon_state = "freezer"
|
||||
density = 1
|
||||
|
||||
var/min_temperature = 0
|
||||
anchored = 1.0
|
||||
|
||||
use_power = 1
|
||||
current_heat_capacity = 1000
|
||||
|
||||
/obj/machinery/atmospherics/unary/cold_sink/freezer/New()
|
||||
..()
|
||||
initialize_directions = dir
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/thermomachine(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src, 1)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/atmospherics/unary/cold_sink/freezer/initialize()
|
||||
if(node) return
|
||||
/obj/machinery/atmospherics/unary/cold_sink/freezer/RefreshParts()
|
||||
var/H
|
||||
var/T
|
||||
for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts)
|
||||
H += M.rating
|
||||
for(var/obj/item/weapon/stock_parts/micro_laser/M in component_parts)
|
||||
T += M.rating
|
||||
min_temperature = T0C - (170 + (T*15))
|
||||
current_heat_capacity = 1000 * ((H - 1) ** 2)
|
||||
|
||||
var/node_connect = dir
|
||||
/obj/machinery/atmospherics/unary/cold_sink/freezer/attackby(obj/item/I, mob/user)
|
||||
if(default_deconstruction_screwdriver(user, "freezer-o", "freezer", I))
|
||||
on = 0
|
||||
update_icon()
|
||||
return
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node_connect))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
node = target
|
||||
break
|
||||
if(exchange_parts(user, I))
|
||||
return
|
||||
|
||||
update_icon()
|
||||
default_deconstruction_crowbar(I)
|
||||
|
||||
if (istype(I, /obj/item/weapon/wrench))
|
||||
if(!panel_open)
|
||||
user << "<span class='notice'>Open the maintenance panel first.</span>"
|
||||
return
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
dir = pick(WEST,EAST,SOUTH,NORTH)
|
||||
var/node_connect = dir
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node_connect))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
node = target
|
||||
break
|
||||
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/unary/cold_sink/freezer/update_icon()
|
||||
if(src.node)
|
||||
if(src.on)
|
||||
icon_state = "freezer_1"
|
||||
else
|
||||
icon_state = "freezer"
|
||||
if(panel_open)
|
||||
icon_state = "freezer-o"
|
||||
else if(src.on)
|
||||
icon_state = "freezer_1"
|
||||
else
|
||||
icon_state = "freezer_0"
|
||||
icon_state = "freezer"
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/unary/cold_sink/freezer/attack_ai(mob/user as mob)
|
||||
src.ui_interact(user)
|
||||
src.attack_hand(user)
|
||||
|
||||
/obj/machinery/atmospherics/unary/cold_sink/freezer/attack_paw(mob/user as mob)
|
||||
src.ui_interact(user)
|
||||
src.attack_hand(user)
|
||||
|
||||
/obj/machinery/atmospherics/unary/cold_sink/freezer/attack_hand(mob/user as mob)
|
||||
if(panel_open)
|
||||
user << "<span class='notice'>Close the maintenance panel first.</span>"
|
||||
return
|
||||
src.ui_interact(user)
|
||||
|
||||
/obj/machinery/atmospherics/unary/cold_sink/freezer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
@@ -50,7 +84,7 @@
|
||||
data["on"] = on ? 1 : 0
|
||||
data["gasPressure"] = round(air_contents.return_pressure())
|
||||
data["gasTemperature"] = round(air_contents.temperature)
|
||||
data["minGasTemperature"] = round(T0C - 200)
|
||||
data["minGasTemperature"] = round(min_temperature)
|
||||
data["maxGasTemperature"] = round(T20C)
|
||||
data["targetGasTemperature"] = round(current_temperature)
|
||||
|
||||
@@ -74,7 +108,7 @@
|
||||
// auto update every Master Controller tick
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/obj/machinery/atmospherics/unary/cold_sink/freezer/Topic(href, href_list)
|
||||
/obj/machinery/atmospherics/unary/cold_sink/freezer/Topic(href, href_list)
|
||||
if (href_list["toggleStatus"])
|
||||
src.on = !src.on
|
||||
update_icon()
|
||||
@@ -83,20 +117,25 @@
|
||||
if(amount > 0)
|
||||
src.current_temperature = min(T20C, src.current_temperature+amount)
|
||||
else
|
||||
src.current_temperature = max((T0C - 200), src.current_temperature+amount)
|
||||
|
||||
src.current_temperature = max(min_temperature, src.current_temperature+amount)
|
||||
src.add_fingerprint(usr)
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/unary/cold_sink/freezer/process()
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/unary/heat_reservoir/heater
|
||||
name = "gas heating system"
|
||||
icon = 'icons/obj/Cryogenic2.dmi'
|
||||
icon_state = "freezer_0"
|
||||
density = 1
|
||||
/obj/machinery/atmospherics/unary/cold_sink/freezer/power_change()
|
||||
..()
|
||||
if(stat & NOPOWER)
|
||||
on = 0
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/unary/heat_reservoir/heater/
|
||||
name = "heater"
|
||||
icon = 'icons/obj/Cryogenic2.dmi'
|
||||
icon_state = "heater"
|
||||
density = 1
|
||||
var/max_temperature = 0
|
||||
anchored = 1.0
|
||||
|
||||
current_heat_capacity = 1000
|
||||
@@ -104,39 +143,76 @@
|
||||
/obj/machinery/atmospherics/unary/heat_reservoir/heater/New()
|
||||
..()
|
||||
initialize_directions = dir
|
||||
var/obj/item/weapon/circuitboard/thermomachine/H = new /obj/item/weapon/circuitboard/thermomachine(null)
|
||||
H.build_path = /obj/machinery/atmospherics/unary/heat_reservoir/heater
|
||||
H.name = "circuit board (Heater)"
|
||||
component_parts = list()
|
||||
component_parts += H
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src, 1)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/atmospherics/unary/heat_reservoir/heater/initialize()
|
||||
if(node) return
|
||||
/obj/machinery/atmospherics/unary/heat_reservoir/heater/RefreshParts()
|
||||
var/H
|
||||
var/T
|
||||
for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts)
|
||||
H += M.rating
|
||||
for(var/obj/item/weapon/stock_parts/micro_laser/M in component_parts)
|
||||
T += M.rating
|
||||
max_temperature = T20C + (140 * T)
|
||||
current_heat_capacity = 1000 * ((H - 1) ** 2)
|
||||
|
||||
var/node_connect = dir
|
||||
/obj/machinery/atmospherics/unary/heat_reservoir/heater/attackby(obj/item/I, mob/user)
|
||||
if(default_deconstruction_screwdriver(user, "heater-o", "heater", I))
|
||||
on = 0
|
||||
update_icon()
|
||||
return
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node_connect))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
node = target
|
||||
break
|
||||
if(exchange_parts(user, I))
|
||||
return
|
||||
|
||||
update_icon()
|
||||
default_deconstruction_crowbar(I)
|
||||
|
||||
if (istype(I, /obj/item/weapon/wrench))
|
||||
if(!panel_open)
|
||||
user << "<span class='notice'>Open the maintenance panel first.</span>"
|
||||
return
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
dir = pick(WEST,EAST,SOUTH,NORTH)
|
||||
var/node_connect = dir
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node_connect))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
node = target
|
||||
break
|
||||
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/unary/heat_reservoir/heater/update_icon()
|
||||
if(src.node)
|
||||
if(src.on)
|
||||
icon_state = "heater_1"
|
||||
else
|
||||
icon_state = "heater"
|
||||
if(panel_open)
|
||||
icon_state = "heater-o"
|
||||
else if(src.on)
|
||||
icon_state = "heater_1"
|
||||
else
|
||||
icon_state = "heater_0"
|
||||
icon_state = "heater"
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/unary/heat_reservoir/heater/attack_ai(mob/user as mob)
|
||||
src.ui_interact(user)
|
||||
src.attack_hand(user)
|
||||
|
||||
/obj/machinery/atmospherics/unary/heat_reservoir/heater/attack_paw(mob/user as mob)
|
||||
src.ui_interact(user)
|
||||
src.attack_hand(user)
|
||||
|
||||
/obj/machinery/atmospherics/unary/heat_reservoir/heater/attack_hand(mob/user as mob)
|
||||
if(panel_open)
|
||||
user << "<span class='notice'>Close the maintenance panel first.</span>"
|
||||
return
|
||||
src.ui_interact(user)
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/unary/heat_reservoir/heater/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
// this is the data which will be sent to the ui
|
||||
var/data[0]
|
||||
@@ -144,7 +220,7 @@
|
||||
data["gasPressure"] = round(air_contents.return_pressure())
|
||||
data["gasTemperature"] = round(air_contents.temperature)
|
||||
data["minGasTemperature"] = round(T20C)
|
||||
data["maxGasTemperature"] = round(T20C+280)
|
||||
data["maxGasTemperature"] = round(T20C+max_temperature)
|
||||
data["targetGasTemperature"] = round(current_temperature)
|
||||
|
||||
var/temp_class = "normal"
|
||||
@@ -172,12 +248,17 @@
|
||||
if(href_list["temp"])
|
||||
var/amount = text2num(href_list["temp"])
|
||||
if(amount > 0)
|
||||
src.current_temperature = min((T20C+280), src.current_temperature+amount)
|
||||
src.current_temperature = min((T20C+max_temperature), src.current_temperature+amount)
|
||||
else
|
||||
src.current_temperature = max(T20C, src.current_temperature+amount)
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/unary/heat_reservoir/heater/process()
|
||||
..()
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/unary/heat_reservoir/heater/power_change()
|
||||
..()
|
||||
if(stat & NOPOWER)
|
||||
on = 0
|
||||
update_icon()
|
||||
|
||||
@@ -75,13 +75,36 @@
|
||||
return 0
|
||||
|
||||
|
||||
/obj/machinery/optable/MouseDrop_T(obj/O as obj, mob/user as mob)
|
||||
/obj/machinery/optable/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
|
||||
|
||||
if ((!( istype(O, /obj/item/weapon) ) || user.get_active_hand() != O))
|
||||
if(O.loc == user) //no you can't pull things out of your ass
|
||||
return
|
||||
user.drop_item()
|
||||
if (O.loc != src.loc)
|
||||
step(O, get_dir(O, src))
|
||||
if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis || user.resting) //are you cuffed, dying, lying, stunned or other
|
||||
return
|
||||
if(O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)) // is the mob anchored, too far away from you, or are you too far away from the source
|
||||
return
|
||||
if(!ismob(O)) //humans only
|
||||
return
|
||||
if(istype(O, /mob/living/simple_animal) || istype(O, /mob/living/silicon)) //animals and robutts dont fit
|
||||
return
|
||||
if(!ishuman(user) && !isrobot(user)) //No ghosts or mice putting people into the sleeper
|
||||
return
|
||||
if(user.loc==null) // just in case someone manages to get a closet into the blue light dimension, as unlikely as that seems
|
||||
return
|
||||
if(!istype(user.loc, /turf) || !istype(O.loc, /turf)) // are you in a container/closet/pod/etc?
|
||||
return
|
||||
var/mob/living/L = O
|
||||
if(!istype(L) || L.buckled)
|
||||
return
|
||||
for(var/mob/living/carbon/slime/M in range(1,L))
|
||||
if(M.Victim == L)
|
||||
usr << "[L.name] cannot be operated on while they have \a [M] attached to their head!"
|
||||
return
|
||||
if(src.victim)
|
||||
usr << "\blue <B>The table is already occupied!</B>"
|
||||
return
|
||||
|
||||
take_victim(L, user)
|
||||
return
|
||||
|
||||
/obj/machinery/optable/proc/check_victim()
|
||||
|
||||
+334
-234
@@ -5,20 +5,38 @@
|
||||
/obj/machinery/sleep_console
|
||||
name = "Sleeper Console"
|
||||
icon = 'icons/obj/Cryogenic2.dmi'
|
||||
icon_state = "sleeperconsole"
|
||||
icon_state = "console"
|
||||
var/obj/machinery/sleeper/connected = null
|
||||
anchored = 1 //About time someone fixed this.
|
||||
density = 1
|
||||
var/orient = "LEFT" // "RIGHT" changes the dir suffix to "-r"
|
||||
|
||||
l_color = "#7BF9FF"
|
||||
power_change()
|
||||
..()
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
SetLuminosity(2)
|
||||
else
|
||||
SetLuminosity(0)
|
||||
var/orient = "LEFT"
|
||||
dir = 8
|
||||
idle_power_usage = 250
|
||||
active_power_usage = 500
|
||||
|
||||
/obj/machinery/sleep_console/power_change()
|
||||
if(stat & BROKEN)
|
||||
icon_state = "console-p"
|
||||
else if(powered() && !panel_open)
|
||||
icon_state = initial(icon_state)
|
||||
stat &= ~NOPOWER
|
||||
else
|
||||
spawn(rand(0, 15))
|
||||
src.icon_state = "console-p"
|
||||
stat |= NOPOWER
|
||||
|
||||
/obj/machinery/sleep_console/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/sleep_console(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src, 2)
|
||||
RefreshParts()
|
||||
findsleeper()
|
||||
|
||||
/obj/machinery/sleep_console/RefreshParts()
|
||||
|
||||
/obj/machinery/sleep_console/process()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
@@ -39,17 +57,38 @@
|
||||
else
|
||||
return
|
||||
|
||||
/obj/machinery/sleep_console/New()
|
||||
..()
|
||||
/obj/machinery/sleep_console/proc/findsleeper()
|
||||
spawn( 5 )
|
||||
if(orient == "RIGHT")
|
||||
icon_state = "sleeperconsole-r"
|
||||
src.connected = locate(/obj/machinery/sleeper, get_step(src, EAST))
|
||||
else
|
||||
src.connected = locate(/obj/machinery/sleeper, get_step(src, WEST))
|
||||
|
||||
var/obj/machinery/sleeper/sleepernew = null
|
||||
// Loop through every direction
|
||||
for(dir in list(NORTH,EAST,SOUTH,WEST))
|
||||
// Try to find a scanner in that direction
|
||||
sleepernew = locate(/obj/machinery/sleeper, get_step(src, dir))
|
||||
src.connected = sleepernew
|
||||
return
|
||||
return
|
||||
|
||||
/obj/machinery/sleep_console/attackby(var/obj/item/weapon/G as obj, var/mob/user as mob)
|
||||
if (istype(G, /obj/item/weapon/screwdriver))
|
||||
default_deconstruction_screwdriver(user, "console-p", "console", G)
|
||||
return
|
||||
|
||||
if (istype(G, /obj/item/weapon/wrench))
|
||||
if(panel_open)
|
||||
user << "<span class='notice'>Close the maintenance panel first.</span>"
|
||||
return
|
||||
if(dir == 4)
|
||||
orient = "LEFT"
|
||||
dir = 8
|
||||
else
|
||||
orient = "RIGHT"
|
||||
dir = 4
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
|
||||
if(exchange_parts(user, G))
|
||||
return
|
||||
|
||||
default_deconstruction_crowbar(G)
|
||||
|
||||
/obj/machinery/sleep_console/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
@@ -60,6 +99,13 @@
|
||||
/obj/machinery/sleep_console/attack_hand(mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if (panel_open)
|
||||
user << "<span class='notice'>Close the maintenance panel first.</span>"
|
||||
return
|
||||
if (!src.connected)
|
||||
findsleeper()
|
||||
if (src.connected)
|
||||
var/mob/living/occupant = src.connected.occupant
|
||||
var/dat = "<font color='blue'><B>Occupant Statistics:</B></FONT><BR>"
|
||||
@@ -83,8 +129,9 @@
|
||||
dat += text("[]\t-Burn Severity %: []</FONT><BR>", (occupant.getFireLoss() < 60 ? "<font color='blue'>" : "<font color='red'>"), occupant.getFireLoss())
|
||||
dat += text("<HR>Paralysis Summary %: [] ([] seconds left!)<BR>", occupant.paralysis, round(occupant.paralysis / 4))
|
||||
if(occupant.reagents)
|
||||
for(var/chemical in connected.available_chemicals)
|
||||
dat += "[connected.available_chemicals[chemical]]: [occupant.reagents.get_reagent_amount(chemical)] units<br>"
|
||||
for(var/chemical in connected.injection_chems)
|
||||
var/datum/reagent/C = chemical_reagents_list[chemical]
|
||||
dat += "[C.name]: [occupant.reagents.get_reagent_amount(chemical)] units<br>"
|
||||
dat += "<A href='?src=\ref[src];refresh=1'>Refresh Meter Readings</A><BR>"
|
||||
if(src.connected.beaker)
|
||||
dat += "<HR><A href='?src=\ref[src];removebeaker=1'>Remove Beaker</A><BR>"
|
||||
@@ -96,8 +143,9 @@
|
||||
dat += text("Output Beaker has [] units of free space remaining<BR><HR>", src.connected.beaker.reagents.maximum_volume - src.connected.beaker.reagents.total_volume)
|
||||
else
|
||||
dat += "<HR>No Dialysis Output Beaker is present.<BR><HR>"
|
||||
for(var/chemical in connected.available_chemicals)
|
||||
dat += "Inject [connected.available_chemicals[chemical]]: "
|
||||
for(var/chemical in connected.injection_chems)
|
||||
var/datum/reagent/C = chemical_reagents_list[chemical]
|
||||
dat += "Inject [C.name]: "
|
||||
for(var/amount in connected.amounts)
|
||||
dat += "<a href ='?src=\ref[src];chemical=[chemical];amount=[amount]'>[amount] units</a><br> "
|
||||
dat += "<HR><A href='?src=\ref[src];ejectify=1'>Eject Patient</A>"
|
||||
@@ -111,6 +159,9 @@
|
||||
/obj/machinery/sleep_console/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if(panel_open)
|
||||
usr << "<span class='notice'>Close the maintenance panel first.</span>"
|
||||
return
|
||||
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai)))
|
||||
usr.set_machine(src)
|
||||
if (href_list["chemical"])
|
||||
@@ -118,7 +169,7 @@
|
||||
if (src.connected.occupant)
|
||||
if (src.connected.occupant.stat == DEAD)
|
||||
usr << "\red \b This person has no life for to preserve anymore. Take them to a department capable of reanimating them."
|
||||
else if(src.connected.occupant.health > 0 || href_list["chemical"] == "inaprovaline")
|
||||
else if(src.connected.occupant.health > src.connected.min_health || href_list["chemical"] == "inaprovaline")
|
||||
src.connected.inject_chemical(usr,href_list["chemical"],text2num(href_list["amount"]))
|
||||
else
|
||||
usr << "\red \b This person is not in good enough condition for sleepers to be effective! Use another means of treatment, such as cryogenics!"
|
||||
@@ -137,17 +188,6 @@
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/sleep_console/power_change()
|
||||
return
|
||||
// no change - sleeper works without power (you just can't inject more)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////
|
||||
// THE SLEEPER ITSELF
|
||||
/////////////////////////////////////////
|
||||
@@ -155,242 +195,303 @@
|
||||
/obj/machinery/sleeper
|
||||
name = "Sleeper"
|
||||
icon = 'icons/obj/Cryogenic2.dmi'
|
||||
icon_state = "sleeper_0"
|
||||
icon_state = "sleeper-open"
|
||||
density = 1
|
||||
anchored = 1
|
||||
dir = 8
|
||||
var/orient = "LEFT" // "RIGHT" changes the dir suffix to "-r"
|
||||
var/mob/living/carbon/human/occupant = null
|
||||
var/available_chemicals = list("inaprovaline" = "Inaprovaline", "stoxin" = "Soporific", "paracetamol" = "Paracetamol", "anti_toxin" = "Dylovene", "dexalin" = "Dexalin")
|
||||
var/possible_chems = list(list("inaprovaline", "stoxin", "dexalin", "bicaridine", "kelotane"),
|
||||
list("inaprovaline", "stoxin", "dexalinp", "bicaridine", "dermaline", "kelotane", "imidazoline"),
|
||||
list("inaprovaline", "stoxin", "dexalinp", "bicaridine", "dermaline", "kelotane", "imidazoline", "anti_toxin", "ryetalyn", "alkysine", "arithrazine"))
|
||||
var/amounts = list(5, 10)
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker = null
|
||||
var/filtering = 0
|
||||
|
||||
New()
|
||||
var/efficiency
|
||||
var/initial_bin_rating = 1
|
||||
var/min_health = 25
|
||||
var/injection_chems = list()
|
||||
idle_power_usage = 1250
|
||||
active_power_usage = 2500
|
||||
|
||||
l_color = "#7BF9FF"
|
||||
|
||||
power_change()
|
||||
..()
|
||||
beaker = new /obj/item/weapon/reagent_containers/glass/beaker/large()
|
||||
spawn( 5 )
|
||||
if(orient == "RIGHT")
|
||||
icon_state = "sleeper_0-r"
|
||||
return
|
||||
return
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
SetLuminosity(2)
|
||||
else
|
||||
SetLuminosity(0)
|
||||
|
||||
process()
|
||||
if(filtering > 0)
|
||||
if(beaker)
|
||||
if(beaker.reagents.total_volume < beaker.reagents.maximum_volume)
|
||||
/obj/machinery/sleeper/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/sleeper(src)
|
||||
|
||||
// Customizable bin rating, used by the labor camp to stop people filling themselves with chemicals and escaping.
|
||||
var/obj/item/weapon/stock_parts/matter_bin/B = new(src)
|
||||
B.rating = initial_bin_rating
|
||||
component_parts += B
|
||||
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src, 1)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/sleeper/RefreshParts()
|
||||
var/E
|
||||
var/I
|
||||
for(var/obj/item/weapon/stock_parts/matter_bin/B in component_parts)
|
||||
E += B.rating
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
|
||||
I += M.rating
|
||||
|
||||
injection_chems = possible_chems[I]
|
||||
efficiency = E
|
||||
min_health = -E * 25
|
||||
|
||||
/obj/machinery/sleeper/process()
|
||||
if(filtering > 0)
|
||||
if(beaker)
|
||||
if(beaker.reagents.total_volume < beaker.reagents.maximum_volume)
|
||||
src.occupant.vessel.trans_to(beaker, 1)
|
||||
for(var/datum/reagent/x in src.occupant.reagents.reagent_list)
|
||||
// world << "FILTERING CHEMS"
|
||||
src.occupant.reagents.trans_to(beaker, 3)
|
||||
src.occupant.vessel.trans_to(beaker, 1)
|
||||
for(var/datum/reagent/x in src.occupant.reagents.reagent_list)
|
||||
// world << "FILTERING CHEMS"
|
||||
src.occupant.reagents.trans_to(beaker, 3)
|
||||
src.occupant.vessel.trans_to(beaker, 1)
|
||||
src.updateDialog()
|
||||
src.updateDialog()
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/sleeper/blob_act()
|
||||
if(prob(75))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.blob_act()
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/sleeper/attackby(var/obj/item/weapon/G as obj, var/mob/user as mob)
|
||||
if(istype(G, /obj/item/weapon/reagent_containers/glass))
|
||||
if(!beaker)
|
||||
beaker = G
|
||||
user.drop_item()
|
||||
G.loc = src
|
||||
user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!")
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
else
|
||||
user << "\red The sleeper has a beaker already."
|
||||
return
|
||||
|
||||
if (istype(G, /obj/item/weapon/screwdriver))
|
||||
if(src.occupant)
|
||||
user << "<span class='notice'>The maintenance panel is locked.</span>"
|
||||
return
|
||||
default_deconstruction_screwdriver(user, "sleeper-o", "sleeper-open", G)
|
||||
return
|
||||
|
||||
if (istype(G, /obj/item/weapon/wrench))
|
||||
if(src.occupant)
|
||||
user << "<span class='notice'>The scanner is occupied.</span>"
|
||||
return
|
||||
if(panel_open)
|
||||
user << "<span class='notice'>Close the maintenance panel first.</span>"
|
||||
return
|
||||
if(dir == 4)
|
||||
orient = "LEFT"
|
||||
dir = 8
|
||||
else
|
||||
orient = "RIGHT"
|
||||
dir = 4
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
|
||||
if(exchange_parts(user, G))
|
||||
return
|
||||
|
||||
|
||||
blob_act()
|
||||
if(prob(75))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.blob_act()
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
attackby(var/obj/item/weapon/G as obj, var/mob/user as mob)
|
||||
if(istype(G, /obj/item/weapon/reagent_containers/glass))
|
||||
if(!beaker)
|
||||
beaker = G
|
||||
user.drop_item()
|
||||
G.loc = src
|
||||
user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!")
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
else
|
||||
user << "\red The sleeper has a beaker already."
|
||||
default_deconstruction_crowbar(G)
|
||||
|
||||
if(istype(G, /obj/item/weapon/grab))
|
||||
if(panel_open)
|
||||
user << "\blue <b>Close the maintenance panel first.</b>"
|
||||
return
|
||||
if(!ismob(G:affecting))
|
||||
return
|
||||
if(src.occupant)
|
||||
user << "\blue <B>The sleeper is already occupied!</B>"
|
||||
return
|
||||
for(var/mob/living/carbon/slime/M in range(1,G:affecting))
|
||||
if(M.Victim == G:affecting)
|
||||
usr << "[G:affecting.name] will not fit into the sleeper because they have a slime latched onto their head."
|
||||
return
|
||||
|
||||
else if(istype(G, /obj/item/weapon/grab))
|
||||
if(!ismob(G:affecting))
|
||||
return
|
||||
visible_message("[user] starts putting [G:affecting:name] into the sleeper.", 3)
|
||||
|
||||
if(do_after(user, 20))
|
||||
if(src.occupant)
|
||||
user << "\blue <B>The sleeper is already occupied!</B>"
|
||||
return
|
||||
for(var/mob/living/carbon/slime/M in range(1,G:affecting))
|
||||
if(M.Victim == G:affecting)
|
||||
usr << "[G:affecting.name] will not fit into the sleeper because they have a slime latched onto their head."
|
||||
return
|
||||
if(!G || !G:affecting) return
|
||||
var/mob/M = G:affecting
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.loc = src
|
||||
src.occupant = M
|
||||
src.icon_state = "sleeper"
|
||||
M << "\blue <b>You feel cool air surround you. You go numb as your senses turn inward.</b>"
|
||||
|
||||
visible_message("[user] starts putting [G:affecting:name] into the sleeper.", 3)
|
||||
|
||||
if(do_after(user, 20))
|
||||
if(src.occupant)
|
||||
user << "\blue <B>The sleeper is already occupied!</B>"
|
||||
return
|
||||
if(!G || !G:affecting) return
|
||||
var/mob/M = G:affecting
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.loc = src
|
||||
src.occupant = M
|
||||
src.icon_state = "sleeper_1"
|
||||
if(orient == "RIGHT")
|
||||
icon_state = "sleeper_1-r"
|
||||
|
||||
M << "\blue <b>You feel cool air surround you. You go numb as your senses turn inward.</b>"
|
||||
|
||||
src.add_fingerprint(user)
|
||||
del(G)
|
||||
return
|
||||
src.add_fingerprint(user)
|
||||
del(G)
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
ex_act(severity)
|
||||
if(filtering)
|
||||
toggle_filter()
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
/obj/machinery/sleeper/ex_act(severity)
|
||||
if(filtering)
|
||||
toggle_filter()
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
if(prob(50))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
if(prob(50))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
if(3.0)
|
||||
if(prob(25))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
emp_act(severity)
|
||||
if(filtering)
|
||||
toggle_filter()
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
..(severity)
|
||||
return
|
||||
if(occupant)
|
||||
go_out()
|
||||
if(3.0)
|
||||
if(prob(25))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/machinery/sleeper/emp_act(severity)
|
||||
if(filtering)
|
||||
toggle_filter()
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
..(severity)
|
||||
|
||||
alter_health(mob/living/M as mob)
|
||||
if (M.health > 0)
|
||||
if (M.getOxyLoss() >= 10)
|
||||
var/amount = max(0.15, 1)
|
||||
M.adjustOxyLoss(-amount)
|
||||
else
|
||||
M.adjustOxyLoss(-12)
|
||||
M.updatehealth()
|
||||
M.AdjustParalysis(-4)
|
||||
M.AdjustWeakened(-4)
|
||||
M.AdjustStunned(-4)
|
||||
M.Paralyse(1)
|
||||
M.Weaken(1)
|
||||
M.Stun(1)
|
||||
if (M:reagents.get_reagent_amount("inaprovaline") < 5)
|
||||
M:reagents.add_reagent("inaprovaline", 5)
|
||||
return
|
||||
if(occupant)
|
||||
go_out()
|
||||
..(severity)
|
||||
|
||||
proc/toggle_filter()
|
||||
if(filtering)
|
||||
filtering = 0
|
||||
/obj/machinery/sleeper/alter_health(mob/living/M as mob)
|
||||
if (M.health > 0)
|
||||
if (M.getOxyLoss() >= 10)
|
||||
var/amount = max(0.15, 1)
|
||||
M.adjustOxyLoss(-amount)
|
||||
else
|
||||
filtering = 1
|
||||
M.adjustOxyLoss(-12)
|
||||
M.updatehealth()
|
||||
M.AdjustParalysis(-4)
|
||||
M.AdjustWeakened(-4)
|
||||
M.AdjustStunned(-4)
|
||||
M.Paralyse(1)
|
||||
M.Weaken(1)
|
||||
M.Stun(1)
|
||||
if (M:reagents.get_reagent_amount("inaprovaline") < 5)
|
||||
M:reagents.add_reagent("inaprovaline", 5)
|
||||
return
|
||||
|
||||
proc/go_out()
|
||||
if(filtering)
|
||||
toggle_filter()
|
||||
if(!src.occupant)
|
||||
return
|
||||
if(src.occupant.client)
|
||||
src.occupant.client.eye = src.occupant.client.mob
|
||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||
src.occupant.loc = src.loc
|
||||
src.occupant = null
|
||||
if(orient == "RIGHT")
|
||||
icon_state = "sleeper_0-r"
|
||||
/obj/machinery/sleeper/proc/toggle_filter()
|
||||
if(filtering)
|
||||
filtering = 0
|
||||
else
|
||||
filtering = 1
|
||||
|
||||
/obj/machinery/sleeper/proc/go_out()
|
||||
if(filtering)
|
||||
toggle_filter()
|
||||
if(!src.occupant)
|
||||
return
|
||||
if(src.occupant.client)
|
||||
src.occupant.client.eye = src.occupant.client.mob
|
||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||
src.occupant.loc = src.loc
|
||||
src.occupant = null
|
||||
icon_state = "sleeper-open"
|
||||
return
|
||||
|
||||
|
||||
proc/inject_chemical(mob/living/user as mob, chemical, amount)
|
||||
if(src.occupant)
|
||||
if(src.occupant.reagents)
|
||||
if(src.occupant.reagents.get_reagent_amount(chemical) + amount <= 40)
|
||||
src.occupant.reagents.add_reagent(chemical, amount)
|
||||
user << "Occupant now has [src.occupant.reagents.get_reagent_amount(chemical)] units of [available_chemicals[chemical]] in his/her bloodstream."
|
||||
return
|
||||
else
|
||||
user << "Medical overdose safeties restrict you injecting any more of this chemical."
|
||||
return
|
||||
/obj/machinery/sleeper/proc/inject_chemical(mob/living/user as mob, chemical, amount)
|
||||
if(src.occupant)
|
||||
if(src.occupant.reagents)
|
||||
if(src.occupant.reagents.get_reagent_amount(chemical) + amount <= 20 * efficiency)
|
||||
src.occupant.reagents.add_reagent(chemical, amount)
|
||||
user << "Occupant now has [src.occupant.reagents.get_reagent_amount(chemical)] units of [chemical] in his/her bloodstream."
|
||||
return
|
||||
else
|
||||
user << "The patient rejects the chemicals!"
|
||||
user << "You can not inject any more of this chemical."
|
||||
return
|
||||
else
|
||||
user << "There's no occupant in the sleeper!"
|
||||
user << "The patient rejects the chemicals!"
|
||||
return
|
||||
else
|
||||
user << "There's no occupant in the sleeper!"
|
||||
return
|
||||
|
||||
|
||||
proc/check(mob/living/user as mob)
|
||||
if(src.occupant)
|
||||
user << text("\blue <B>Occupant ([]) Statistics:</B>", src.occupant)
|
||||
var/t1
|
||||
switch(src.occupant.stat)
|
||||
if(0.0)
|
||||
t1 = "Conscious"
|
||||
if(1.0)
|
||||
t1 = "Unconscious"
|
||||
if(2.0)
|
||||
t1 = "*dead*"
|
||||
else
|
||||
user << text("[]\t Health %: [] ([])", (src.occupant.health > 50 ? "\blue " : "\red "), src.occupant.health, t1)
|
||||
user << text("[]\t -Core Temperature: []°C ([]°F)</FONT><BR>", (src.occupant.bodytemperature > 50 ? "<font color='blue'>" : "<font color='red'>"), src.occupant.bodytemperature-T0C, src.occupant.bodytemperature*1.8-459.67)
|
||||
user << text("[]\t -Brute Damage %: []", (src.occupant.getBruteLoss() < 60 ? "\blue " : "\red "), src.occupant.getBruteLoss())
|
||||
user << text("[]\t -Respiratory Damage %: []", (src.occupant.getOxyLoss() < 60 ? "\blue " : "\red "), src.occupant.getOxyLoss())
|
||||
user << text("[]\t -Toxin Content %: []", (src.occupant.getToxLoss() < 60 ? "\blue " : "\red "), src.occupant.getToxLoss())
|
||||
user << text("[]\t -Burn Severity %: []", (src.occupant.getFireLoss() < 60 ? "\blue " : "\red "), src.occupant.getFireLoss())
|
||||
user << "\blue Expected time till occupant can safely awake: (note: If health is below 20% these times are inaccurate)"
|
||||
user << text("\blue \t [] second\s (if around 1 or 2 the sleeper is keeping them asleep.)", src.occupant.paralysis / 5)
|
||||
if(src.beaker)
|
||||
user << text("\blue \t Dialysis Output Beaker has [] of free space remaining.", src.beaker.reagents.maximum_volume - src.beaker.reagents.total_volume)
|
||||
/obj/machinery/sleeper/proc/check(mob/living/user as mob)
|
||||
if(src.occupant)
|
||||
user << text("\blue <B>Occupant ([]) Statistics:</B>", src.occupant)
|
||||
var/t1
|
||||
switch(src.occupant.stat)
|
||||
if(0.0)
|
||||
t1 = "Conscious"
|
||||
if(1.0)
|
||||
t1 = "Unconscious"
|
||||
if(2.0)
|
||||
t1 = "*dead*"
|
||||
else
|
||||
user << "\blue No Dialysis Output Beaker loaded."
|
||||
user << text("[]\t Health %: [] ([])", (src.occupant.health > 50 ? "\blue " : "\red "), src.occupant.health, t1)
|
||||
user << text("[]\t -Core Temperature: []°C ([]°F)</FONT><BR>", (src.occupant.bodytemperature > 50 ? "<font color='blue'>" : "<font color='red'>"), src.occupant.bodytemperature-T0C, src.occupant.bodytemperature*1.8-459.67)
|
||||
user << text("[]\t -Brute Damage %: []", (src.occupant.getBruteLoss() < 60 ? "\blue " : "\red "), src.occupant.getBruteLoss())
|
||||
user << text("[]\t -Respiratory Damage %: []", (src.occupant.getOxyLoss() < 60 ? "\blue " : "\red "), src.occupant.getOxyLoss())
|
||||
user << text("[]\t -Toxin Content %: []", (src.occupant.getToxLoss() < 60 ? "\blue " : "\red "), src.occupant.getToxLoss())
|
||||
user << text("[]\t -Burn Severity %: []", (src.occupant.getFireLoss() < 60 ? "\blue " : "\red "), src.occupant.getFireLoss())
|
||||
user << "\blue Expected time till occupant can safely awake: (note: If health is below 20% these times are inaccurate)"
|
||||
user << text("\blue \t [] second\s (if around 1 or 2 the sleeper is keeping them asleep.)", src.occupant.paralysis / 5)
|
||||
if(src.beaker)
|
||||
user << text("\blue \t Dialysis Output Beaker has [] of free space remaining.", src.beaker.reagents.maximum_volume - src.beaker.reagents.total_volume)
|
||||
else
|
||||
user << "\blue There is no one inside!"
|
||||
return
|
||||
user << "\blue No Dialysis Output Beaker loaded."
|
||||
else
|
||||
user << "\blue There is no one inside!"
|
||||
return
|
||||
|
||||
|
||||
verb/eject()
|
||||
set name = "Eject Sleeper"
|
||||
set category = null
|
||||
set src in oview(1)
|
||||
if(usr.stat != 0)
|
||||
return
|
||||
if(orient == "RIGHT")
|
||||
icon_state = "sleeper_0-r"
|
||||
src.icon_state = "sleeper_0"
|
||||
src.go_out()
|
||||
add_fingerprint(usr)
|
||||
/obj/machinery/sleeper/verb/eject()
|
||||
set name = "Eject Sleeper"
|
||||
set category = null
|
||||
set src in oview(1)
|
||||
if(usr.stat != 0)
|
||||
return
|
||||
src.icon_state = "sleeper-open"
|
||||
src.go_out()
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
verb/remove_beaker()
|
||||
set name = "Remove Beaker"
|
||||
set category = null
|
||||
set src in oview(1)
|
||||
if(usr.stat != 0)
|
||||
return
|
||||
if(beaker)
|
||||
filtering = 0
|
||||
beaker.loc = usr.loc
|
||||
beaker = null
|
||||
add_fingerprint(usr)
|
||||
/obj/machinery/sleeper/verb/remove_beaker()
|
||||
set name = "Remove Beaker"
|
||||
set category = null
|
||||
set src in oview(1)
|
||||
if(usr.stat != 0)
|
||||
return
|
||||
if(beaker)
|
||||
filtering = 0
|
||||
beaker.loc = usr.loc
|
||||
beaker = null
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/obj/machinery/sleeper/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
|
||||
if(O.loc == user) //no you can't pull things out of your ass
|
||||
@@ -401,7 +502,7 @@
|
||||
return
|
||||
if(!ismob(O)) //humans only
|
||||
return
|
||||
if(istype(O, /mob/living/simple_animal) || istype(O, /mob/living/silicon)) //animals and robutts dont fit
|
||||
if(istype(O, /mob/living/simple_animal) || istype(O, /mob/living/silicon)) //animals and robots dont fit
|
||||
return
|
||||
if(!ishuman(user) && !isrobot(user)) //No ghosts or mice putting people into the sleeper
|
||||
return
|
||||
@@ -409,6 +510,9 @@
|
||||
return
|
||||
if(!istype(user.loc, /turf) || !istype(O.loc, /turf)) // are you in a container/closet/pod/etc?
|
||||
return
|
||||
if(panel_open)
|
||||
user << "\blue <B>Close the maintenance panel first.</B>"
|
||||
return
|
||||
if(occupant)
|
||||
user << "\blue <B>The sleeper is already occupied!</B>"
|
||||
return
|
||||
@@ -442,12 +546,8 @@
|
||||
L.client.eye = src
|
||||
L.loc = src
|
||||
src.occupant = L
|
||||
src.icon_state = "sleeper_1"
|
||||
if(orient == "RIGHT")
|
||||
icon_state = "sleeper_1-r"
|
||||
src.icon_state = "sleeper"
|
||||
L << "\blue <b>You feel cool air surround you. You go numb as your senses turn inward.</b>"
|
||||
for(var/obj/OO in src)
|
||||
OO.loc = src.loc
|
||||
src.add_fingerprint(user)
|
||||
if(user.pulling == L)
|
||||
user.pulling = null
|
||||
@@ -463,10 +563,12 @@
|
||||
set src in oview(1)
|
||||
if(usr.stat != 0 || !(ishuman(usr) || ismonkey(usr)))
|
||||
return
|
||||
|
||||
if(src.occupant)
|
||||
usr << "\blue <B>The sleeper is already occupied!</B>"
|
||||
return
|
||||
if (panel_open)
|
||||
usr << "\blue <B>Close the maintenance panel first.</B>"
|
||||
return
|
||||
if(usr.restrained() || usr.stat || usr.weakened || usr.stunned || usr.paralysis || usr.resting) //are you cuffed, dying, lying, stunned or other
|
||||
return
|
||||
for(var/mob/living/carbon/slime/M in range(1,usr))
|
||||
@@ -483,9 +585,7 @@
|
||||
usr.client.eye = src
|
||||
usr.loc = src
|
||||
src.occupant = usr
|
||||
src.icon_state = "sleeper_1"
|
||||
if(orient == "RIGHT")
|
||||
icon_state = "sleeper_1-r"
|
||||
src.icon_state = "sleeper"
|
||||
|
||||
for(var/obj/O in src)
|
||||
del(O)
|
||||
|
||||
+305
-218
@@ -1,18 +1,17 @@
|
||||
// Pretty much everything here is stolen from the dna scanner FYI
|
||||
|
||||
|
||||
/obj/machinery/bodyscanner
|
||||
var/mob/living/carbon/occupant
|
||||
var/locked
|
||||
name = "Body Scanner"
|
||||
icon = 'icons/obj/Cryogenic2.dmi'
|
||||
icon_state = "body_scanner_0"
|
||||
icon_state = "bodyscanner-open"
|
||||
density = 1
|
||||
dir = 8
|
||||
anchored = 1
|
||||
idle_power_usage = 1250
|
||||
active_power_usage = 2500
|
||||
|
||||
l_color = "#00FF00"
|
||||
|
||||
power_change()
|
||||
..()
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
@@ -20,6 +19,72 @@
|
||||
else
|
||||
SetLuminosity(0)
|
||||
|
||||
/obj/machinery/bodyscanner/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/bodyscanner(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src, 2)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/bodyscanner/RefreshParts()
|
||||
|
||||
/obj/machinery/bodyscanner/attackby(var/obj/item/weapon/G as obj, var/mob/user as mob)
|
||||
if (istype(G, /obj/item/weapon/screwdriver))
|
||||
if(src.occupant)
|
||||
user << "<span class='notice'>The maintenance panel is locked.</span>"
|
||||
return
|
||||
default_deconstruction_screwdriver(user, "bodyscanner-o", "bodyscanner-open", G)
|
||||
return
|
||||
|
||||
if (istype(G, /obj/item/weapon/wrench))
|
||||
if(src.occupant)
|
||||
user << "<span class='notice'>The scanner is occupied.</span>"
|
||||
return
|
||||
if(panel_open)
|
||||
user << "<span class='notice'>Close the maintenance panel first.</span>"
|
||||
return
|
||||
if(dir == 4)
|
||||
dir = 8
|
||||
else
|
||||
dir = 4
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
|
||||
if(exchange_parts(user, G))
|
||||
return
|
||||
|
||||
default_deconstruction_crowbar(G)
|
||||
|
||||
if(istype(G, /obj/item/weapon/grab))
|
||||
if(panel_open)
|
||||
user << "\blue <b>Close the maintenance panel first.</b>"
|
||||
return
|
||||
if(!ismob(G:affecting))
|
||||
return
|
||||
if (src.occupant)
|
||||
user << "\blue <B>The scanner is already occupied!</B>"
|
||||
return
|
||||
for(var/mob/living/carbon/slime/M in range(1,G:affecting))
|
||||
if(M.Victim == G:affecting)
|
||||
usr << "[G:affecting.name] will not fit into the sleeper because they have a slime latched onto their head."
|
||||
return
|
||||
var/mob/M = G:affecting
|
||||
if (M.abiotic())
|
||||
user << "\blue <B>Subject cannot have abiotic items on.</B>"
|
||||
return
|
||||
if (M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.loc = src
|
||||
src.occupant = M
|
||||
src.icon_state = "body_scanner_1"
|
||||
src.add_fingerprint(user)
|
||||
//G = null
|
||||
del(G)
|
||||
return
|
||||
|
||||
/obj/machinery/bodyscanner/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
|
||||
if(O.loc == user) //no you can't pull things out of your ass
|
||||
return
|
||||
@@ -37,6 +102,9 @@
|
||||
return
|
||||
if(!istype(user.loc, /turf) || !istype(O.loc, /turf)) // are you in a container/closet/pod/etc?
|
||||
return
|
||||
if(panel_open)
|
||||
user << "\blue <B>Close the maintenance panel first.</B>"
|
||||
return
|
||||
if(occupant)
|
||||
user << "\blue <B>The body scanner is already occupied!</B>"
|
||||
return
|
||||
@@ -60,10 +128,7 @@
|
||||
L.client.eye = src
|
||||
L.loc = src
|
||||
src.occupant = L
|
||||
src.icon_state = "body_scanner_1"
|
||||
for(var/obj/OO in src)
|
||||
OO.loc = src.loc
|
||||
//Foreach goto(154)
|
||||
src.icon_state = "bodyscanner"
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
@@ -97,6 +162,9 @@
|
||||
if (src.occupant)
|
||||
usr << "\blue <B>The scanner is already occupied!</B>"
|
||||
return
|
||||
if (panel_open)
|
||||
usr << "\blue <B>Close the maintenance panel first.</B>"
|
||||
return
|
||||
if (usr.abiotic())
|
||||
usr << "\blue <B>Subject cannot have abiotic items on.</B>"
|
||||
return
|
||||
@@ -105,7 +173,7 @@
|
||||
usr.client.eye = src
|
||||
usr.loc = src
|
||||
src.occupant = usr
|
||||
src.icon_state = "body_scanner_1"
|
||||
src.icon_state = "bodyscanner"
|
||||
for(var/obj/O in src)
|
||||
//O = null
|
||||
del(O)
|
||||
@@ -116,9 +184,6 @@
|
||||
/obj/machinery/bodyscanner/proc/go_out()
|
||||
if ((!( src.occupant ) || src.locked))
|
||||
return
|
||||
for(var/obj/O in src)
|
||||
O.loc = src.loc
|
||||
//Foreach goto(30)
|
||||
if (src.occupant.client)
|
||||
src.occupant.client.eye = src.occupant.client.mob
|
||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||
@@ -127,30 +192,6 @@
|
||||
src.icon_state = "body_scanner_0"
|
||||
return
|
||||
|
||||
/obj/machinery/bodyscanner/attackby(obj/item/weapon/grab/G as obj, user as mob)
|
||||
if ((!( istype(G, /obj/item/weapon/grab) ) || !( ismob(G.affecting) )))
|
||||
return
|
||||
if (src.occupant)
|
||||
user << "\blue <B>The scanner is already occupied!</B>"
|
||||
return
|
||||
if (G.affecting.abiotic())
|
||||
user << "\blue <B>Subject cannot have abiotic items on.</B>"
|
||||
return
|
||||
var/mob/M = G.affecting
|
||||
if (M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.loc = src
|
||||
src.occupant = M
|
||||
src.icon_state = "body_scanner_1"
|
||||
for(var/obj/O in src)
|
||||
O.loc = src.loc
|
||||
//Foreach goto(154)
|
||||
src.add_fingerprint(user)
|
||||
//G = null
|
||||
del(G)
|
||||
return
|
||||
|
||||
/obj/machinery/bodyscanner/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
@@ -188,8 +229,44 @@
|
||||
A.loc = src.loc
|
||||
del(src)
|
||||
|
||||
/obj/machinery/body_scanconsole/ex_act(severity)
|
||||
/obj/machinery/body_scanconsole
|
||||
var/obj/machinery/bodyscanner/connected
|
||||
var/known_implants = list(/obj/item/weapon/implant/chem, /obj/item/weapon/implant/death_alarm, /obj/item/weapon/implant/loyalty, /obj/item/weapon/implant/tracking)
|
||||
var/delete
|
||||
var/temphtml
|
||||
name = "Body Scanner Console"
|
||||
icon = 'icons/obj/Cryogenic2.dmi'
|
||||
icon_state = "bodyscannerconsole"
|
||||
density = 1
|
||||
anchored = 1
|
||||
dir = 8
|
||||
idle_power_usage = 250
|
||||
active_power_usage = 500
|
||||
|
||||
/obj/machinery/body_scanconsole/power_change()
|
||||
if(stat & BROKEN)
|
||||
icon_state = "bodyscannerconsole-p"
|
||||
else if(powered() && !panel_open)
|
||||
icon_state = initial(icon_state)
|
||||
stat &= ~NOPOWER
|
||||
else
|
||||
spawn(rand(0, 15))
|
||||
src.icon_state = "bodyscannerconsole-p"
|
||||
stat |= NOPOWER
|
||||
|
||||
/obj/machinery/body_scanconsole/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/bodyscanner_console(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src, 2)
|
||||
RefreshParts()
|
||||
findscanner()
|
||||
|
||||
/obj/machinery/body_scanconsole/RefreshParts()
|
||||
|
||||
/obj/machinery/body_scanconsole/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
//SN src = null
|
||||
@@ -204,40 +281,20 @@
|
||||
return
|
||||
|
||||
/obj/machinery/body_scanconsole/blob_act()
|
||||
|
||||
if(prob(50))
|
||||
del(src)
|
||||
|
||||
/obj/machinery/body_scanconsole/power_change()
|
||||
if(stat & BROKEN)
|
||||
icon_state = "body_scannerconsole-p"
|
||||
else if(powered())
|
||||
icon_state = initial(icon_state)
|
||||
stat &= ~NOPOWER
|
||||
else
|
||||
spawn(rand(0, 15))
|
||||
src.icon_state = "body_scannerconsole-p"
|
||||
stat |= NOPOWER
|
||||
|
||||
/obj/machinery/body_scanconsole
|
||||
var/obj/machinery/bodyscanner/connected
|
||||
var/known_implants = list(/obj/item/weapon/implant/chem, /obj/item/weapon/implant/death_alarm, /obj/item/weapon/implant/loyalty, /obj/item/weapon/implant/tracking)
|
||||
var/delete
|
||||
var/temphtml
|
||||
name = "Body Scanner Console"
|
||||
icon = 'icons/obj/Cryogenic2.dmi'
|
||||
icon_state = "body_scannerconsole"
|
||||
density = 1
|
||||
anchored = 1
|
||||
|
||||
|
||||
/obj/machinery/body_scanconsole/New()
|
||||
..()
|
||||
/obj/machinery/body_scanconsole/proc/findscanner()
|
||||
spawn( 5 )
|
||||
src.connected = locate(/obj/machinery/bodyscanner, get_step(src, WEST))
|
||||
var/obj/machinery/bodyscanner/bodyscannernew = null
|
||||
// Loop through every direction
|
||||
for(dir in list(NORTH,EAST,SOUTH,WEST))
|
||||
// Try to find a scanner in that direction
|
||||
bodyscannernew = locate(/obj/machinery/bodyscanner, get_step(src, dir))
|
||||
src.connected = bodyscannernew
|
||||
return
|
||||
return
|
||||
|
||||
return
|
||||
|
||||
/*
|
||||
|
||||
/obj/machinery/body_scanconsole/process() //not really used right now
|
||||
@@ -261,6 +318,25 @@
|
||||
|
||||
*/
|
||||
|
||||
/obj/machinery/body_scanconsole/attackby(var/obj/item/weapon/G as obj, var/mob/user as mob)
|
||||
if (istype(G, /obj/item/weapon/screwdriver))
|
||||
default_deconstruction_screwdriver(user, "bodyscannerconsole-p", "bodyscannerconsole", G)
|
||||
return
|
||||
|
||||
if (istype(G, /obj/item/weapon/wrench))
|
||||
if(panel_open)
|
||||
user << "<span class='notice'>Close the maintenance panel first.</span>"
|
||||
return
|
||||
if(dir == 4)
|
||||
dir = 8
|
||||
else
|
||||
dir = 4
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
|
||||
if(exchange_parts(user, G))
|
||||
return
|
||||
|
||||
default_deconstruction_crowbar(G)
|
||||
|
||||
/obj/machinery/body_scanconsole/attack_paw(user as mob)
|
||||
return src.attack_hand(user)
|
||||
@@ -271,158 +347,169 @@
|
||||
/obj/machinery/body_scanconsole/attack_hand(user as mob)
|
||||
if(..())
|
||||
return
|
||||
if(!ishuman(connected.occupant))
|
||||
user << "\red This device can only scan compatible lifeforms."
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
var/dat
|
||||
if (src.delete && src.temphtml) //Window in buffer but its just simple message, so nothing
|
||||
src.delete = src.delete
|
||||
else if (!src.delete && src.temphtml) //Window in buffer - its a menu, dont add clear message
|
||||
dat = text("[]<BR><BR><A href='?src=\ref[];clear=1'>Main Menu</A>", src.temphtml, src)
|
||||
else
|
||||
if (src.connected) //Is something connected?
|
||||
var/mob/living/carbon/human/occupant = src.connected.occupant
|
||||
dat = "<font color='blue'><B>Occupant Statistics:</B></FONT><BR>" //Blah obvious
|
||||
if (istype(occupant)) //is there REALLY someone in there?
|
||||
var/t1
|
||||
switch(occupant.stat) // obvious, see what their status is
|
||||
if(0)
|
||||
t1 = "Conscious"
|
||||
if(1)
|
||||
t1 = "Unconscious"
|
||||
else
|
||||
t1 = "*dead*"
|
||||
if (!istype(occupant,/mob/living/carbon/human))
|
||||
dat += "<font color='red'>This device can only scan human occupants.</FONT>"
|
||||
else
|
||||
dat += text("[]\tHealth %: [] ([])</FONT><BR>", (occupant.health > 50 ? "<font color='blue'>" : "<font color='red'>"), occupant.health, t1)
|
||||
|
||||
if(occupant.virus2.len)
|
||||
dat += text("<font color='red'>Viral pathogen detected in blood stream.</font><BR>")
|
||||
|
||||
dat += text("[]\t-Brute Damage %: []</FONT><BR>", (occupant.getBruteLoss() < 60 ? "<font color='blue'>" : "<font color='red'>"), occupant.getBruteLoss())
|
||||
dat += text("[]\t-Respiratory Damage %: []</FONT><BR>", (occupant.getOxyLoss() < 60 ? "<font color='blue'>" : "<font color='red'>"), occupant.getOxyLoss())
|
||||
dat += text("[]\t-Toxin Content %: []</FONT><BR>", (occupant.getToxLoss() < 60 ? "<font color='blue'>" : "<font color='red'>"), occupant.getToxLoss())
|
||||
dat += text("[]\t-Burn Severity %: []</FONT><BR><BR>", (occupant.getFireLoss() < 60 ? "<font color='blue'>" : "<font color='red'>"), occupant.getFireLoss())
|
||||
|
||||
dat += text("[]\tRadiation Level %: []</FONT><BR>", (occupant.radiation < 10 ?"<font color='blue'>" : "<font color='red'>"), occupant.radiation)
|
||||
dat += text("[]\tGenetic Tissue Damage %: []</FONT><BR>", (occupant.getCloneLoss() < 1 ?"<font color='blue'>" : "<font color='red'>"), occupant.getCloneLoss())
|
||||
dat += text("[]\tApprox. Brain Damage %: []</FONT><BR>", (occupant.getBrainLoss() < 1 ?"<font color='blue'>" : "<font color='red'>"), occupant.getBrainLoss())
|
||||
dat += text("Paralysis Summary %: [] ([] seconds left!)<BR>", occupant.paralysis, round(occupant.paralysis / 4))
|
||||
dat += text("Body Temperature: [occupant.bodytemperature-T0C]°C ([occupant.bodytemperature*1.8-459.67]°F)<BR><HR>")
|
||||
|
||||
if(occupant.has_brain_worms())
|
||||
dat += "Large growth detected in frontal lobe, possibly cancerous. Surgical removal is recommended.<BR/>"
|
||||
|
||||
if(occupant.vessel)
|
||||
var/blood_volume = round(occupant.vessel.get_reagent_amount("blood"))
|
||||
var/blood_percent = blood_volume / 560
|
||||
blood_percent *= 100
|
||||
dat += text("[]\tBlood Level %: [] ([] units)</FONT><BR>", (blood_volume > 448 ?"<font color='blue'>" : "<font color='red'>"), blood_percent, blood_volume)
|
||||
if(occupant.reagents)
|
||||
dat += text("Inaprovaline units: [] units<BR>", occupant.reagents.get_reagent_amount("inaprovaline"))
|
||||
dat += text("Soporific (Sleep Toxin): [] units<BR>", occupant.reagents.get_reagent_amount("stoxin"))
|
||||
dat += text("[]\tDermaline: [] units</FONT><BR>", (occupant.reagents.get_reagent_amount("dermaline") < 30 ? "<font color='black'>" : "<font color='red'>"), occupant.reagents.get_reagent_amount("dermaline"))
|
||||
dat += text("[]\tBicaridine: [] units<BR>", (occupant.reagents.get_reagent_amount("bicaridine") < 30 ? "<font color='black'>" : "<font color='red'>"), occupant.reagents.get_reagent_amount("bicaridine"))
|
||||
dat += text("[]\tDexalin: [] units<BR>", (occupant.reagents.get_reagent_amount("dexalin") < 30 ? "<font color='black'>" : "<font color='red'>"), occupant.reagents.get_reagent_amount("dexalin"))
|
||||
|
||||
dat += "<HR><table border='1'>"
|
||||
dat += "<tr>"
|
||||
dat += "<th>Organ</th>"
|
||||
dat += "<th>Burn Damage</th>"
|
||||
dat += "<th>Brute Damage</th>"
|
||||
dat += "<th>Other Wounds</th>"
|
||||
dat += "</tr>"
|
||||
|
||||
for(var/datum/organ/external/e in occupant.organs)
|
||||
|
||||
dat += "<tr>"
|
||||
var/AN = ""
|
||||
var/open = ""
|
||||
var/infected = ""
|
||||
var/robot = ""
|
||||
var/imp = ""
|
||||
var/bled = ""
|
||||
var/splint = ""
|
||||
var/internal_bleeding = ""
|
||||
var/lung_ruptured = ""
|
||||
for(var/datum/wound/W in e.wounds) if(W.internal)
|
||||
internal_bleeding = "<br>Internal bleeding"
|
||||
break
|
||||
if(istype(e, /datum/organ/external/chest) && occupant.is_lung_ruptured())
|
||||
lung_ruptured = "Lung ruptured:"
|
||||
if(e.status & ORGAN_SPLINTED)
|
||||
splint = "Splinted:"
|
||||
if(e.status & ORGAN_BLEEDING)
|
||||
bled = "Bleeding:"
|
||||
if(e.status & ORGAN_BROKEN)
|
||||
AN = "[e.broken_description]:"
|
||||
if(e.status & ORGAN_ROBOT)
|
||||
robot = "Prosthetic:"
|
||||
if(e.open)
|
||||
open = "Open:"
|
||||
switch (e.germ_level)
|
||||
if (INFECTION_LEVEL_ONE to INFECTION_LEVEL_ONE + 200)
|
||||
infected = "Mild Infection:"
|
||||
if (INFECTION_LEVEL_ONE + 200 to INFECTION_LEVEL_ONE + 300)
|
||||
infected = "Mild Infection+:"
|
||||
if (INFECTION_LEVEL_ONE + 300 to INFECTION_LEVEL_ONE + 400)
|
||||
infected = "Mild Infection++:"
|
||||
if (INFECTION_LEVEL_TWO to INFECTION_LEVEL_TWO + 200)
|
||||
infected = "Acute Infection:"
|
||||
if (INFECTION_LEVEL_TWO + 200 to INFECTION_LEVEL_TWO + 300)
|
||||
infected = "Acute Infection+:"
|
||||
if (INFECTION_LEVEL_TWO + 300 to INFECTION_LEVEL_TWO + 400)
|
||||
infected = "Acute Infection++:"
|
||||
if (INFECTION_LEVEL_THREE to INFINITY)
|
||||
infected = "Septic:"
|
||||
|
||||
var/unknown_body = 0
|
||||
for(var/I in e.implants)
|
||||
if(is_type_in_list(I,known_implants))
|
||||
imp += "[I] implanted:"
|
||||
else
|
||||
unknown_body++
|
||||
|
||||
if(unknown_body || e.hidden)
|
||||
imp += "Unknown body present:"
|
||||
if(!AN && !open && !infected & !imp)
|
||||
AN = "None:"
|
||||
if(!(e.status & ORGAN_DESTROYED))
|
||||
dat += "<td>[e.display_name]</td><td>[e.burn_dam]</td><td>[e.brute_dam]</td><td>[robot][bled][AN][splint][open][infected][imp][internal_bleeding][lung_ruptured]</td>"
|
||||
else
|
||||
dat += "<td>[e.display_name]</td><td>-</td><td>-</td><td>Not Found</td>"
|
||||
dat += "</tr>"
|
||||
for(var/n in occupant.internal_organs_by_name)
|
||||
var/datum/organ/internal/i = occupant.internal_organs_by_name[n]
|
||||
var/mech = i.desc
|
||||
var/infection = "None"
|
||||
switch (i.germ_level)
|
||||
if (1 to INFECTION_LEVEL_ONE + 200)
|
||||
infection = "Mild Infection:"
|
||||
if (INFECTION_LEVEL_ONE + 200 to INFECTION_LEVEL_ONE + 300)
|
||||
infection = "Mild Infection+:"
|
||||
if (INFECTION_LEVEL_ONE + 300 to INFECTION_LEVEL_ONE + 400)
|
||||
infection = "Mild Infection++:"
|
||||
if (INFECTION_LEVEL_TWO to INFECTION_LEVEL_TWO + 200)
|
||||
infection = "Acute Infection:"
|
||||
if (INFECTION_LEVEL_TWO + 200 to INFECTION_LEVEL_TWO + 300)
|
||||
infection = "Acute Infection+:"
|
||||
if (INFECTION_LEVEL_TWO + 300 to INFINITY)
|
||||
infection = "Acute Infection++:"
|
||||
|
||||
dat += "<tr>"
|
||||
dat += "<td>[i.name]</td><td>N/A</td><td>[i.damage]</td><td>[infection]:[mech]</td><td></td>"
|
||||
dat += "</tr>"
|
||||
dat += "</table>"
|
||||
if(occupant.sdisabilities & BLIND)
|
||||
dat += text("<font color='red'>Cataracts detected.</font><BR>")
|
||||
if(occupant.sdisabilities & NEARSIGHTED)
|
||||
dat += text("<font color='red'>Retinal misalignment detected.</font><BR>")
|
||||
else
|
||||
dat += "\The [src] is empty."
|
||||
if (panel_open)
|
||||
user << "<span class='notice'>Close the maintenance panel first.</span>"
|
||||
return
|
||||
if(!src.connected)
|
||||
findscanner()
|
||||
if (src.connected)
|
||||
if(!connected.occupant)
|
||||
user << "<span class='notice'>The scanner is empty.</span>"
|
||||
return
|
||||
if(!ishuman(connected.occupant))
|
||||
user << "\red This device can only scan compatible lifeforms."
|
||||
return
|
||||
var/dat
|
||||
if (src.delete && src.temphtml) //Window in buffer but its just simple message, so nothing
|
||||
src.delete = src.delete
|
||||
else if (!src.delete && src.temphtml) //Window in buffer - its a menu, dont add clear message
|
||||
dat = text("[]<BR><BR><A href='?src=\ref[];clear=1'>Main Menu</A>", src.temphtml, src)
|
||||
else
|
||||
dat = "<font color='red'> Error: No Body Scanner connected.</font>"
|
||||
dat += text("<BR><BR><A href='?src=\ref[];mach_close=scanconsole'>Close</A>", user)
|
||||
user << browse(dat, "window=scanconsole;size=430x600")
|
||||
if (src.connected) //Is something connected?
|
||||
var/mob/living/carbon/human/occupant = src.connected.occupant
|
||||
dat = "<font color='blue'><B>Occupant Statistics:</B></FONT><BR>" //Blah obvious
|
||||
if (istype(occupant)) //is there REALLY someone in there?
|
||||
var/t1
|
||||
switch(occupant.stat) // obvious, see what their status is
|
||||
if(0)
|
||||
t1 = "Conscious"
|
||||
if(1)
|
||||
t1 = "Unconscious"
|
||||
else
|
||||
t1 = "*dead*"
|
||||
if (!istype(occupant,/mob/living/carbon/human))
|
||||
dat += "<font color='red'>This device can only scan human occupants.</FONT>"
|
||||
else
|
||||
dat += text("[]\tHealth %: [] ([])</FONT><BR>", (occupant.health > 50 ? "<font color='blue'>" : "<font color='red'>"), occupant.health, t1)
|
||||
|
||||
if(occupant.virus2.len)
|
||||
dat += text("<font color='red'>Viral pathogen detected in blood stream.</font><BR>")
|
||||
|
||||
dat += text("[]\t-Brute Damage %: []</FONT><BR>", (occupant.getBruteLoss() < 60 ? "<font color='blue'>" : "<font color='red'>"), occupant.getBruteLoss())
|
||||
dat += text("[]\t-Respiratory Damage %: []</FONT><BR>", (occupant.getOxyLoss() < 60 ? "<font color='blue'>" : "<font color='red'>"), occupant.getOxyLoss())
|
||||
dat += text("[]\t-Toxin Content %: []</FONT><BR>", (occupant.getToxLoss() < 60 ? "<font color='blue'>" : "<font color='red'>"), occupant.getToxLoss())
|
||||
dat += text("[]\t-Burn Severity %: []</FONT><BR><BR>", (occupant.getFireLoss() < 60 ? "<font color='blue'>" : "<font color='red'>"), occupant.getFireLoss())
|
||||
|
||||
dat += text("[]\tRadiation Level %: []</FONT><BR>", (occupant.radiation < 10 ?"<font color='blue'>" : "<font color='red'>"), occupant.radiation)
|
||||
dat += text("[]\tGenetic Tissue Damage %: []</FONT><BR>", (occupant.getCloneLoss() < 1 ?"<font color='blue'>" : "<font color='red'>"), occupant.getCloneLoss())
|
||||
dat += text("[]\tApprox. Brain Damage %: []</FONT><BR>", (occupant.getBrainLoss() < 1 ?"<font color='blue'>" : "<font color='red'>"), occupant.getBrainLoss())
|
||||
dat += text("Paralysis Summary %: [] ([] seconds left!)<BR>", occupant.paralysis, round(occupant.paralysis / 4))
|
||||
dat += text("Body Temperature: [occupant.bodytemperature-T0C]°C ([occupant.bodytemperature*1.8-459.67]°F)<BR><HR>")
|
||||
|
||||
if(occupant.has_brain_worms())
|
||||
dat += "Large growth detected in frontal lobe, possibly cancerous. Surgical removal is recommended.<BR/>"
|
||||
|
||||
if(occupant.vessel)
|
||||
var/blood_volume = round(occupant.vessel.get_reagent_amount("blood"))
|
||||
var/blood_percent = blood_volume / 560
|
||||
blood_percent *= 100
|
||||
dat += text("[]\tBlood Level %: [] ([] units)</FONT><BR>", (blood_volume > 448 ?"<font color='blue'>" : "<font color='red'>"), blood_percent, blood_volume)
|
||||
if(occupant.reagents)
|
||||
dat += text("Inaprovaline units: [] units<BR>", occupant.reagents.get_reagent_amount("inaprovaline"))
|
||||
dat += text("Soporific (Sleep Toxin): [] units<BR>", occupant.reagents.get_reagent_amount("stoxin"))
|
||||
dat += text("[]\tDermaline: [] units</FONT><BR>", (occupant.reagents.get_reagent_amount("dermaline") < 30 ? "<font color='black'>" : "<font color='red'>"), occupant.reagents.get_reagent_amount("dermaline"))
|
||||
dat += text("[]\tBicaridine: [] units<BR>", (occupant.reagents.get_reagent_amount("bicaridine") < 30 ? "<font color='black'>" : "<font color='red'>"), occupant.reagents.get_reagent_amount("bicaridine"))
|
||||
dat += text("[]\tDexalin: [] units<BR>", (occupant.reagents.get_reagent_amount("dexalin") < 30 ? "<font color='black'>" : "<font color='red'>"), occupant.reagents.get_reagent_amount("dexalin"))
|
||||
|
||||
dat += "<HR><table border='1'>"
|
||||
dat += "<tr>"
|
||||
dat += "<th>Organ</th>"
|
||||
dat += "<th>Burn Damage</th>"
|
||||
dat += "<th>Brute Damage</th>"
|
||||
dat += "<th>Other Wounds</th>"
|
||||
dat += "</tr>"
|
||||
|
||||
for(var/datum/organ/external/e in occupant.organs)
|
||||
|
||||
dat += "<tr>"
|
||||
var/AN = ""
|
||||
var/open = ""
|
||||
var/infected = ""
|
||||
var/robot = ""
|
||||
var/imp = ""
|
||||
var/bled = ""
|
||||
var/splint = ""
|
||||
var/internal_bleeding = ""
|
||||
var/lung_ruptured = ""
|
||||
for(var/datum/wound/W in e.wounds) if(W.internal)
|
||||
internal_bleeding = "<br>Internal bleeding"
|
||||
break
|
||||
if(istype(e, /datum/organ/external/chest) && occupant.is_lung_ruptured())
|
||||
lung_ruptured = "Lung ruptured:"
|
||||
if(e.status & ORGAN_SPLINTED)
|
||||
splint = "Splinted:"
|
||||
if(e.status & ORGAN_BLEEDING)
|
||||
bled = "Bleeding:"
|
||||
if(e.status & ORGAN_BROKEN)
|
||||
AN = "[e.broken_description]:"
|
||||
if(e.status & ORGAN_ROBOT)
|
||||
robot = "Prosthetic:"
|
||||
if(e.open)
|
||||
open = "Open:"
|
||||
switch (e.germ_level)
|
||||
if (INFECTION_LEVEL_ONE to INFECTION_LEVEL_ONE + 200)
|
||||
infected = "Mild Infection:"
|
||||
if (INFECTION_LEVEL_ONE + 200 to INFECTION_LEVEL_ONE + 300)
|
||||
infected = "Mild Infection+:"
|
||||
if (INFECTION_LEVEL_ONE + 300 to INFECTION_LEVEL_ONE + 400)
|
||||
infected = "Mild Infection++:"
|
||||
if (INFECTION_LEVEL_TWO to INFECTION_LEVEL_TWO + 200)
|
||||
infected = "Acute Infection:"
|
||||
if (INFECTION_LEVEL_TWO + 200 to INFECTION_LEVEL_TWO + 300)
|
||||
infected = "Acute Infection+:"
|
||||
if (INFECTION_LEVEL_TWO + 300 to INFECTION_LEVEL_TWO + 400)
|
||||
infected = "Acute Infection++:"
|
||||
if (INFECTION_LEVEL_THREE to INFINITY)
|
||||
infected = "Septic:"
|
||||
|
||||
var/unknown_body = 0
|
||||
for(var/I in e.implants)
|
||||
if(is_type_in_list(I,known_implants))
|
||||
imp += "[I] implanted:"
|
||||
else
|
||||
unknown_body++
|
||||
|
||||
if(unknown_body || e.hidden)
|
||||
imp += "Unknown body present:"
|
||||
if(!AN && !open && !infected & !imp)
|
||||
AN = "None:"
|
||||
if(!(e.status & ORGAN_DESTROYED))
|
||||
dat += "<td>[e.display_name]</td><td>[e.burn_dam]</td><td>[e.brute_dam]</td><td>[robot][bled][AN][splint][open][infected][imp][internal_bleeding][lung_ruptured]</td>"
|
||||
else
|
||||
dat += "<td>[e.display_name]</td><td>-</td><td>-</td><td>Not Found</td>"
|
||||
dat += "</tr>"
|
||||
for(var/n in occupant.internal_organs_by_name)
|
||||
var/datum/organ/internal/i = occupant.internal_organs_by_name[n]
|
||||
var/mech = i.desc
|
||||
var/infection = "None"
|
||||
switch (i.germ_level)
|
||||
if (1 to INFECTION_LEVEL_ONE + 200)
|
||||
infection = "Mild Infection:"
|
||||
if (INFECTION_LEVEL_ONE + 200 to INFECTION_LEVEL_ONE + 300)
|
||||
infection = "Mild Infection+:"
|
||||
if (INFECTION_LEVEL_ONE + 300 to INFECTION_LEVEL_ONE + 400)
|
||||
infection = "Mild Infection++:"
|
||||
if (INFECTION_LEVEL_TWO to INFECTION_LEVEL_TWO + 200)
|
||||
infection = "Acute Infection:"
|
||||
if (INFECTION_LEVEL_TWO + 200 to INFECTION_LEVEL_TWO + 300)
|
||||
infection = "Acute Infection+:"
|
||||
if (INFECTION_LEVEL_TWO + 300 to INFINITY)
|
||||
infection = "Acute Infection++:"
|
||||
|
||||
dat += "<tr>"
|
||||
dat += "<td>[i.name]</td><td>N/A</td><td>[i.damage]</td><td>[infection]:[mech]</td><td></td>"
|
||||
dat += "</tr>"
|
||||
dat += "</table>"
|
||||
if(occupant.sdisabilities & BLIND)
|
||||
dat += text("<font color='red'>Cataracts detected.</font><BR>")
|
||||
if(occupant.sdisabilities & NEARSIGHTED)
|
||||
dat += text("<font color='red'>Retinal misalignment detected.</font><BR>")
|
||||
else
|
||||
dat += "\The [src] is empty."
|
||||
else
|
||||
dat = "<font color='red'> Error: No Body Scanner connected.</font>"
|
||||
dat += text("<BR><BR><A href='?src=\ref[];mach_close=scanconsole'>Close</A>", user)
|
||||
user << browse(dat, "window=scanconsole;size=430x600")
|
||||
return
|
||||
|
||||
@@ -50,6 +50,11 @@
|
||||
icon_state = "grey"
|
||||
_color = "grey"
|
||||
can_label = 0
|
||||
/obj/machinery/portable_atmospherics/canister/custom_mix
|
||||
name = "Canister \[Custom\]"
|
||||
icon_state = "whiters"
|
||||
_color = "whiters"
|
||||
can_label = 0
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/proc/check_change()
|
||||
var/old_flag = update_flag
|
||||
@@ -332,6 +337,7 @@ update_flag
|
||||
"\[CO2\]" = "black", \
|
||||
"\[Air\]" = "grey", \
|
||||
"\[CAUTION\]" = "yellow", \
|
||||
"\[Custom\]" = "whiters",\
|
||||
)
|
||||
var/label = input("Choose canister label", "Gas canister") as null|anything in colors
|
||||
if (label)
|
||||
@@ -421,6 +427,12 @@ update_flag
|
||||
src.update_icon()
|
||||
return 1
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/custom_mix/New()
|
||||
..()
|
||||
|
||||
src.update_icon() // Otherwise new canisters do not have their icon updated with the pressure light, likely want to add this to the canister class constructor, avoiding at current time to refrain from screwing up code for other canisters. --DZD
|
||||
return 1
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/proc/weld(var/obj/item/weapon/weldingtool/WT, var/mob/user)
|
||||
|
||||
if(busy)
|
||||
|
||||
@@ -98,6 +98,7 @@ var/global/list/autolathe_recipes_hidden = list( \
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 100
|
||||
var/busy = 0
|
||||
var/prod_coeff
|
||||
|
||||
l_color = "#7BF9FF"
|
||||
power_change()
|
||||
@@ -106,7 +107,22 @@ var/global/list/autolathe_recipes_hidden = list( \
|
||||
SetLuminosity(2)
|
||||
else
|
||||
SetLuminosity(0)
|
||||
|
||||
/obj/machinery/autolathe/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/autolathe(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
||||
RefreshParts()
|
||||
|
||||
wires = new(src)
|
||||
src.L = autolathe_recipes
|
||||
src.LL = autolathe_recipes_hidden
|
||||
|
||||
/obj/machinery/autolathe/proc/wires_win(mob/user as mob)
|
||||
var/dat as text
|
||||
dat += "Autolathe Wires:<BR>"
|
||||
@@ -120,6 +136,7 @@ var/global/list/autolathe_recipes_hidden = list( \
|
||||
onclose(user, "autolathe_hack")
|
||||
|
||||
/obj/machinery/autolathe/proc/regular_win(mob/user as mob)
|
||||
var/coeff = 2 ** prod_coeff
|
||||
var/dat as text
|
||||
dat = text("<B>Metal Amount:</B> [src.m_amount] cm<sup>3</sup> (MAX: [max_m_amount])<BR>\n<FONT color=blue><B>Glass Amount:</B></FONT> [src.g_amount] cm<sup>3</sup> (MAX: [max_g_amount])<BR>\n<FONT color=orange><B>Fur Amount:</B></FONT> [src.f_amount] cm<sup>3</sup> (MAX: [max_f_amount])<HR>")
|
||||
var/list/objs = list()
|
||||
@@ -127,7 +144,7 @@ var/global/list/autolathe_recipes_hidden = list( \
|
||||
if (src.hacked)
|
||||
objs += src.LL
|
||||
for(var/obj/t in objs)
|
||||
var/title = "[t.name] ([t.m_amt] m /[t.g_amt] g/[t.f_amt] f)"
|
||||
var/title = "[t.name] ([t.m_amt/coeff] m / [t.g_amt/coeff] g / [t.f_amt/coeff] f)"
|
||||
if (m_amount<t.m_amt || g_amount<t.g_amt || f_amount<t.f_amt)
|
||||
dat += title + "<br>"
|
||||
continue
|
||||
@@ -163,34 +180,37 @@ var/global/list/autolathe_recipes_hidden = list( \
|
||||
/obj/machinery/autolathe/interact(mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
|
||||
if (src.shocked)
|
||||
src.shock(user,50)
|
||||
if (src.opened)
|
||||
|
||||
if (src.panel_open)
|
||||
wires_win(user,50)
|
||||
return
|
||||
|
||||
if (src.disabled)
|
||||
user << "\red You press the button, but nothing happens."
|
||||
return
|
||||
|
||||
regular_win(user)
|
||||
return
|
||||
|
||||
/obj/machinery/autolathe/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if (stat)
|
||||
return 1
|
||||
|
||||
if (busy)
|
||||
user << "\red The autolathe is busy. Please wait for completion of previous operation."
|
||||
return 1
|
||||
|
||||
if (istype(O, /obj/item/weapon/screwdriver))
|
||||
if (!opened)
|
||||
src.opened = 1
|
||||
src.icon_state = "autolathe_t"
|
||||
user << "You open the maintenance hatch of [src]."
|
||||
else
|
||||
src.opened = 0
|
||||
src.icon_state = "autolathe"
|
||||
user << "You close the maintenance hatch of [src]."
|
||||
default_deconstruction_screwdriver(user, "autolathe_t", "autolathe", O)
|
||||
return 1
|
||||
if (opened)
|
||||
|
||||
if(exchange_parts(user, O))
|
||||
return
|
||||
|
||||
if (panel_open)
|
||||
//Don't eat multitools or wirecutters used on an open lathe.
|
||||
if(istype(O, /obj/item/device/multitool) || istype(O, /obj/item/weapon/wirecutters))
|
||||
attack_hand(user)
|
||||
@@ -198,10 +218,6 @@ var/global/list/autolathe_recipes_hidden = list( \
|
||||
|
||||
//Dismantle the frame.
|
||||
if(istype(O, /obj/item/weapon/crowbar))
|
||||
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
|
||||
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(src.loc)
|
||||
M.state = 2
|
||||
M.icon_state = "box_1"
|
||||
for(var/obj/I in component_parts)
|
||||
if(I.reliability != 100 && crit_fail)
|
||||
I.crit_fail = 1
|
||||
@@ -212,7 +228,7 @@ var/global/list/autolathe_recipes_hidden = list( \
|
||||
if(g_amount >= 3750)
|
||||
var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(src.loc)
|
||||
G.amount = round(g_amount / 3750)
|
||||
del(src)
|
||||
default_deconstruction_crowbar(O)
|
||||
return 1
|
||||
else
|
||||
user.set_machine(src)
|
||||
@@ -288,7 +304,8 @@ var/global/list/autolathe_recipes_hidden = list( \
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if (!busy)
|
||||
if(href_list["make"])
|
||||
if(href_list["make"])
|
||||
var/coeff = 2 ** prod_coeff
|
||||
var/turf/T = get_step(src.loc, get_dir(src,usr))
|
||||
|
||||
// critical exploit fix start -walter0o
|
||||
@@ -327,31 +344,36 @@ var/global/list/autolathe_recipes_hidden = list( \
|
||||
return
|
||||
|
||||
var/power = max(2000, (template.m_amt+template.g_amt+template.f_amt)*multiplier/5)
|
||||
if(src.m_amount >= template.m_amt*multiplier && src.g_amount >= template.g_amt*multiplier && src.f_amount >= template.f_amt*multiplier)
|
||||
if(src.m_amount >= template.m_amt*multiplier/coeff && src.g_amount >= template.g_amt*multiplier/coeff && src.f_amount >= template.f_amt*multiplier/coeff)
|
||||
busy = 1
|
||||
use_power(power)
|
||||
icon_state = "autolathe"
|
||||
flick("autolathe_n",src)
|
||||
spawn(16)
|
||||
spawn(32/coeff)
|
||||
use_power(power)
|
||||
spawn(16)
|
||||
use_power(power)
|
||||
spawn(16)
|
||||
src.m_amount -= template.m_amt*multiplier
|
||||
src.g_amount -= template.g_amt*multiplier
|
||||
src.f_amount -= template.f_amt*multiplier
|
||||
if(src.m_amount < 0)
|
||||
src.m_amount = 0
|
||||
if(src.g_amount < 0)
|
||||
src.g_amount = 0
|
||||
if(src.f_amount < 0)
|
||||
src.f_amount = 0
|
||||
var/obj/new_item = new template.type(T)
|
||||
if (multiplier>1)
|
||||
var/obj/item/stack/S = new_item
|
||||
S.amount = multiplier
|
||||
busy = 0
|
||||
src.updateUsrDialog()
|
||||
if(istype(template, /obj/item/stack))
|
||||
src.m_amount -= template.m_amt*multiplier
|
||||
src.g_amount -= template.g_amt*multiplier
|
||||
src.f_amount -= template.f_amt*multiplier
|
||||
var/obj/new_item = new template.type(T)
|
||||
var/obj/item/stack/S = new_item
|
||||
S.amount = multiplier
|
||||
else
|
||||
src.m_amount -= template.m_amt/coeff
|
||||
src.g_amount -= template.g_amt/coeff
|
||||
src.f_amount -= template.f_amt/coeff
|
||||
var/obj/item/new_item = new template.type(T)
|
||||
new_item.m_amt /= coeff
|
||||
new_item.g_amt /= coeff
|
||||
new_item.f_amt /= coeff
|
||||
if(src.m_amount < 0)
|
||||
src.m_amount = 0
|
||||
if(src.g_amount < 0)
|
||||
src.g_amount = 0
|
||||
if(src.f_amount < 0)
|
||||
src.f_amount = 0
|
||||
busy = 0
|
||||
|
||||
if(href_list["act"])
|
||||
var/temp_wire = href_list["wire"]
|
||||
if(href_list["act"] == "pulse")
|
||||
@@ -390,7 +412,18 @@ var/global/list/autolathe_recipes_hidden = list( \
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/autolathe/RefreshParts()
|
||||
var/tot_rating = 0
|
||||
prod_coeff = 0
|
||||
for(var/obj/item/weapon/stock_parts/matter_bin/MB in component_parts)
|
||||
tot_rating += MB.rating
|
||||
tot_rating *= 25000
|
||||
max_m_amount = tot_rating * 2
|
||||
max_g_amount = tot_rating
|
||||
max_f_amount = tot_rating
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
|
||||
prod_coeff += M.rating - 1
|
||||
|
||||
/obj/machinery/autolathe/RefreshParts()
|
||||
..()
|
||||
var/tot_rating = 0
|
||||
|
||||
+208
-122
@@ -1,8 +1,8 @@
|
||||
/obj/machinery/biogenerator
|
||||
name = "Biogenerator"
|
||||
desc = ""
|
||||
desc = "Converts plants into biomass, which can be used to construct useful items."
|
||||
icon = 'icons/obj/biogenerator.dmi'
|
||||
icon_state = "biogen-stand"
|
||||
icon_state = "biogen-empty"
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
@@ -11,111 +11,165 @@
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker = null
|
||||
var/points = 0
|
||||
var/menustat = "menu"
|
||||
var/efficiency = 0
|
||||
var/productivity = 0
|
||||
|
||||
New()
|
||||
/obj/machinery/biogenerator/New()
|
||||
..()
|
||||
var/datum/reagents/R = new/datum/reagents(1000)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
beaker = new /obj/item/weapon/reagent_containers/glass/beaker/large(src)
|
||||
create_reagents(1000)
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/biogenerator(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 1)
|
||||
RefreshParts()
|
||||
|
||||
on_reagent_change() //When the reagents change, change the icon as well.
|
||||
/obj/machinery/biogenerator/RefreshParts()
|
||||
var/E = 0
|
||||
var/P = 0
|
||||
for(var/obj/item/weapon/stock_parts/matter_bin/B in component_parts)
|
||||
P += B.rating
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
|
||||
E += M.rating
|
||||
efficiency = E
|
||||
productivity = P
|
||||
|
||||
/obj/machinery/biogenerator/on_reagent_change() //When the reagents change, change the icon as well.
|
||||
update_icon()
|
||||
|
||||
update_icon()
|
||||
if(!src.beaker)
|
||||
icon_state = "biogen-empty"
|
||||
else if(!src.processing)
|
||||
icon_state = "biogen-stand"
|
||||
else
|
||||
icon_state = "biogen-work"
|
||||
return
|
||||
/obj/machinery/biogenerator/update_icon()
|
||||
if(panel_open)
|
||||
icon_state = "biogen-empty-o"
|
||||
else if(!src.beaker)
|
||||
icon_state = "biogen-empty"
|
||||
else if(!src.processing)
|
||||
icon_state = "biogen-stand"
|
||||
else
|
||||
icon_state = "biogen-work"
|
||||
return
|
||||
|
||||
/obj/machinery/biogenerator/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(istype(O, /obj/item/weapon/reagent_containers/glass))
|
||||
if(istype(O, /obj/item/weapon/reagent_containers/glass) && !panel_open)
|
||||
if(beaker)
|
||||
user << "\red The biogenerator is already loaded."
|
||||
user << "<span class='warning'>A container is already loaded into the machine.</span>"
|
||||
else
|
||||
user.before_take_item(O)
|
||||
O.loc = src
|
||||
beaker = O
|
||||
user << "<span class='notice'>You add the container to the machine.</span>"
|
||||
updateUsrDialog()
|
||||
|
||||
if(!processing)
|
||||
if(default_deconstruction_screwdriver(user, "biogen-empty-o", "biogen-empty", O))
|
||||
if(beaker)
|
||||
var/obj/item/weapon/reagent_containers/glass/B = beaker
|
||||
B.loc = loc
|
||||
beaker = null
|
||||
return
|
||||
|
||||
if(exchange_parts(user, O))
|
||||
return
|
||||
|
||||
else if(istype(O, /obj/item/weapon/crowbar))
|
||||
else if(panel_open)
|
||||
user << "<span class='notice'>Close the maintenance panel first.</span>"
|
||||
else if(processing)
|
||||
user << "\red The biogenerator is currently processing."
|
||||
user << "<span class='warning'>The biogenerator is currently processing.</span>"
|
||||
else if(istype(O, /obj/item/weapon/storage/bag/plants))
|
||||
var/i = 0
|
||||
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents)
|
||||
i++
|
||||
if(i >= 10)
|
||||
user << "\red The biogenerator is already full! Activate it."
|
||||
user << "<span class='warning'>The biogenerator is already full! Activate it.</span>"
|
||||
else
|
||||
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents)
|
||||
if(i >= 10)
|
||||
break
|
||||
G.loc = src
|
||||
i++
|
||||
if(i >= 10)
|
||||
user << "\blue You fill the biogenerator to its capacity."
|
||||
break
|
||||
if(i<10)
|
||||
user << "\blue You empty the plant bag into the biogenerator."
|
||||
user << "<span class='info'>You empty the plant bag into the biogenerator.</span>"
|
||||
else if(O.contents.len == 0)
|
||||
user << "<span class='info'>You empty the plant bag into the biogenerator, filling it to its capacity.</span>"
|
||||
else
|
||||
user << "<span class='info'>You fill the biogenerator to its capacity.</span>"
|
||||
|
||||
|
||||
else if(!istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown))
|
||||
user << "\red You cannot put this in [src.name]"
|
||||
else if(!istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown) && !istype(O, /obj/item/weapon/crowbar))
|
||||
user << "<span class='warning'>You can not put this in [src.name]</span>"
|
||||
else
|
||||
var/i = 0
|
||||
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents)
|
||||
i++
|
||||
if(i >= 10)
|
||||
user << "\red The biogenerator is full! Activate it."
|
||||
user << "<span class='warning'>The biogenerator is full! Activate it.</span>"
|
||||
else
|
||||
user.before_take_item(O)
|
||||
O.loc = src
|
||||
user << "\blue You put [O.name] in [src.name]"
|
||||
user << "<span class='info'>You put [O.name] in [src.name]</span>"
|
||||
|
||||
|
||||
default_deconstruction_crowbar(O)
|
||||
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/biogenerator/interact(mob/user as mob)
|
||||
if(stat & BROKEN)
|
||||
if(stat & BROKEN || panel_open)
|
||||
return
|
||||
user.set_machine(src)
|
||||
var/dat = "<TITLE>Biogenerator</TITLE>Biogenerator:<BR>"
|
||||
if (processing)
|
||||
dat += "<FONT COLOR=red>Biogenerator is processing! Please wait...</FONT>"
|
||||
var/dat
|
||||
if(processing)
|
||||
dat += "<div class='statusDisplay'>Biogenerator is processing! Please wait...</div><BR>"
|
||||
else
|
||||
dat += "Biomass: [points] points.<HR>"
|
||||
switch(menustat)
|
||||
if("menu")
|
||||
if (beaker)
|
||||
dat += "<A href='?src=\ref[src];action=activate'>Activate Biogenerator!</A><BR>"
|
||||
dat += "<A href='?src=\ref[src];action=detach'>Detach Container</A><BR><BR>"
|
||||
dat += "Food<BR>"
|
||||
dat += "<A href='?src=\ref[src];action=create;item=milk;cost=20'>10 milk</A> <FONT COLOR=blue>(20)</FONT><BR>"
|
||||
dat += "<A href='?src=\ref[src];action=create;item=meat;cost=50'>Slab of meat</A> <FONT COLOR=blue>(50)</FONT><BR>"
|
||||
dat += "Nutrient<BR>"
|
||||
dat += "<A href='?src=\ref[src];action=create;item=ez;cost=10'>E-Z-Nutrient</A> <FONT COLOR=blue>(10)</FONT> | <A href='?src=\ref[src];action=create;item=ez5;cost=50'>x5</A><BR>"
|
||||
dat += "<A href='?src=\ref[src];action=create;item=l4z;cost=20'>Left 4 Zed</A> <FONT COLOR=blue>(20)</FONT> | <A href='?src=\ref[src];action=create;item=l4z5;cost=100'>x5</A><BR>"
|
||||
dat += "<A href='?src=\ref[src];action=create;item=rh;cost=25'>Robust Harvest</A> <FONT COLOR=blue>(25)</FONT> | <A href='?src=\ref[src];action=create;item=rh5;cost=125'>x5</A><BR>"
|
||||
dat += "Leather<BR>"
|
||||
dat += "<A href='?src=\ref[src];action=create;item=wallet;cost=100'>Wallet</A> <FONT COLOR=blue>(100)</FONT><BR>"
|
||||
dat += "<A href='?src=\ref[src];action=create;item=gloves;cost=250'>Botanical gloves</A> <FONT COLOR=blue>(250)</FONT><BR>"
|
||||
dat += "<A href='?src=\ref[src];action=create;item=tbelt;cost=300'>Utility belt</A> <FONT COLOR=blue>(300)</FONT><BR>"
|
||||
dat += "<A href='?src=\ref[src];action=create;item=satchel;cost=400'>Leather Satchel</A> <FONT COLOR=blue>(400)</FONT><BR>"
|
||||
dat += "<A href='?src=\ref[src];action=create;item=cashbag;cost=400'>Cash Bag</A> <FONT COLOR=blue>(400)</FONT><BR>"
|
||||
//dat += "Other<BR>"
|
||||
//dat += "<A href='?src=\ref[src];action=create;item=monkey;cost=500'>Monkey</A> <FONT COLOR=blue>(500)</FONT><BR>"
|
||||
else
|
||||
dat += "<BR><FONT COLOR=red>No beaker inside. Please insert a beaker.</FONT><BR>"
|
||||
if("nopoints")
|
||||
dat += "You do not have biomass to create products.<BR>Please, put growns into reactor and activate it.<BR>"
|
||||
dat += "<A href='?src=\ref[src];action=menu'>Return to menu</A>"
|
||||
dat += "<div class='statusDisplay'>You do not have sufficient biomass to create products.<BR>Please put growns into the reactor and activate it.</div>"
|
||||
menustat = "menu"
|
||||
if("complete")
|
||||
dat += "Operation complete.<BR>"
|
||||
dat += "<A href='?src=\ref[src];action=menu'>Return to menu</A>"
|
||||
dat += "<div class='statusDisplay'>Operation complete.</div>"
|
||||
menustat = "menu"
|
||||
if("void")
|
||||
dat += "<FONT COLOR=red>Error: No growns inside.</FONT><BR>Please, put growns into reactor.<BR>"
|
||||
dat += "<A href='?src=\ref[src];action=menu'>Return to menu</A>"
|
||||
user << browse(dat, "window=biogenerator")
|
||||
onclose(user, "biogenerator")
|
||||
dat += "<div class='statusDisplay'>Error: No growns inside.<BR>Please put growns into reactor.</div>"
|
||||
menustat = "menu"
|
||||
if("nobeakerspace")
|
||||
dat += "<div class='statusDisplay'>Not enough space left in container. Unable to create product.</div>"
|
||||
menustat = "menu"
|
||||
if(beaker)
|
||||
dat += "<div class='statusDisplay'>Biomass: [points] units.</div><BR>"
|
||||
dat += "<A href='?src=\ref[src];activate=1'>Activate</A><A href='?src=\ref[src];detach=1'>Detach Container</A>"
|
||||
dat += "<h3>Food:</h3>"
|
||||
dat += "<div class='statusDisplay'>"
|
||||
dat += "10 milk: <A href='?src=\ref[src];create=milk;amount=1'>Make</A> ([20/efficiency])<BR>"
|
||||
/*dat += "10 cream: <A href='?src=\ref[src];create=cream;amount=1'>Make</A> ([30/efficiency])<BR>"*/
|
||||
dat += "Monkey cube: <A href='?src=\ref[src];create=meat;amount=1'>Make</A> ([250/efficiency])"
|
||||
dat += "</div>"
|
||||
dat += "<h3>Nutrients:</h3>"
|
||||
dat += "<div class='statusDisplay'>"
|
||||
dat += "E-Z-Nutrient: <A href='?src=\ref[src];create=ez;amount=1'>Make</A><A href='?src=\ref[src];create=ez;amount=5'>x5</A> ([10/efficiency])<BR>"
|
||||
dat += "Left 4 Zed: <A href='?src=\ref[src];create=l4z;amount=1'>Make</A><A href='?src=\ref[src];create=l4z;amount=5'>x5</A> ([20/efficiency])<BR>"
|
||||
dat += "Robust Harvest: <A href='?src=\ref[src];create=rh;amount=1'>Make</A><A href='?src=\ref[src];create=rh;amount=5'>x5</A> ([25/efficiency])<BR>"
|
||||
dat += "</div>"
|
||||
dat += "<h3>Leather:</h3>"
|
||||
dat += "<div class='statusDisplay'>"
|
||||
dat += "Wallet: <A href='?src=\ref[src];create=wallet;amount=1'>Make</A> ([100/efficiency])<BR>"
|
||||
/*dat += "Book bag: <A href='?src=\ref[src];create=bkbag;amount=1'>Make</A> ([200/efficiency])<BR>"
|
||||
dat += "Plant bag: <A href='?src=\ref[src];create=ptbag;amount=1'>Make</A> ([200/efficiency])<BR>"
|
||||
dat += "Mining satchel: <A href='?src=\ref[src];create=mnbag;amount=1'>Make</A> ([200/efficiency])<BR>"*/
|
||||
dat += "Botanical gloves: <A href='?src=\ref[src];create=gloves;amount=1'>Make</A> ([250/efficiency])<BR>"
|
||||
dat += "Utility belt: <A href='?src=\ref[src];create=tbelt;amount=1'>Make</A> ([300/efficiency])<BR>"
|
||||
dat += "Leather Satchel: <A href='?src=\ref[src];create=satchel;amount=1'>Make</A> ([400/efficiency])<BR>"
|
||||
dat += "Cash Bag: <A href='?src=\ref[src];create=cashbag;amount=1'>Make</A> ([400/efficiency])<BR>"
|
||||
/*dat += "Leather Jacket: <A href='?src=\ref[src];create=jacket;amount=1'>Make</A> ([500/efficiency])<BR>"*/
|
||||
//dat += "<h3>Other:</h3>"
|
||||
//dat += "Monkey: <A href='?src=\ref[src];create=monkey;amount=1'>Make</A> ([400/efficiency])<BR>"
|
||||
dat += "</div>"
|
||||
else
|
||||
dat += "<div class='statusDisplay'>No container inside. Please insert a container.</div>"
|
||||
|
||||
var/datum/browser/popup = new(user, "biogen", name, 350, 520)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
return
|
||||
|
||||
/obj/machinery/biogenerator/attack_hand(mob/user as mob)
|
||||
@@ -127,100 +181,132 @@
|
||||
if (src.stat != 0) //NOPOWER etc
|
||||
return
|
||||
if(src.processing)
|
||||
usr << "\red The biogenerator is in the process of working."
|
||||
usr << "<span class='warning'>The biogenerator is in the process of working.</span>"
|
||||
return
|
||||
var/S = 0
|
||||
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/I in contents)
|
||||
S += 5
|
||||
if(I.reagents.get_reagent_amount("nutriment") < 0.1)
|
||||
points += 1
|
||||
else points += I.reagents.get_reagent_amount("nutriment")*10
|
||||
del(I)
|
||||
points += 1*productivity
|
||||
else points += I.reagents.get_reagent_amount("nutriment")*10*productivity
|
||||
qdel(I)
|
||||
if(S)
|
||||
processing = 1
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
playsound(src.loc, 'sound/machines/blender.ogg', 50, 1)
|
||||
use_power(S*30)
|
||||
sleep(S+15)
|
||||
sleep(S+15/productivity)
|
||||
processing = 0
|
||||
update_icon()
|
||||
else
|
||||
menustat = "void"
|
||||
return
|
||||
|
||||
/obj/machinery/biogenerator/proc/create_product(var/item,var/cost)
|
||||
if(cost > points)
|
||||
/obj/machinery/biogenerator/proc/check_cost(var/cost)
|
||||
if (cost > points)
|
||||
menustat = "nopoints"
|
||||
return 1
|
||||
else
|
||||
points -= cost
|
||||
processing = 1
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
return 0
|
||||
processing = 1
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
points -= cost
|
||||
sleep(30)
|
||||
switch(item)
|
||||
|
||||
/obj/machinery/biogenerator/proc/check_container_volume(var/reagent_amount)
|
||||
if(beaker.reagents.total_volume + reagent_amount > beaker.reagents.maximum_volume)
|
||||
menustat = "nobeakerspace"
|
||||
return 1
|
||||
|
||||
/obj/machinery/biogenerator/proc/create_product(var/create)
|
||||
switch(create)
|
||||
if("milk")
|
||||
beaker.reagents.add_reagent("milk",10)
|
||||
if(check_container_volume(10)) return 0
|
||||
else if (check_cost(20/efficiency)) return 0
|
||||
else beaker.reagents.add_reagent("milk",10)
|
||||
/*if("cream")
|
||||
if(check_container_volume(10)) return 0
|
||||
else if (check_cost(30/efficiency)) return 0
|
||||
else beaker.reagents.add_reagent("cream",10)*/
|
||||
if("meat")
|
||||
new/obj/item/weapon/reagent_containers/food/snacks/meat(src.loc)
|
||||
if (check_cost(250/efficiency)) return 0
|
||||
else new/obj/item/weapon/reagent_containers/food/snacks/monkeycube(src.loc)
|
||||
if("ez")
|
||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(src.loc)
|
||||
if (check_cost(10/efficiency)) return 0
|
||||
else new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(src.loc)
|
||||
if("l4z")
|
||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(src.loc)
|
||||
if (check_cost(20/efficiency)) return 0
|
||||
else new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(src.loc)
|
||||
if("rh")
|
||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(src.loc)
|
||||
if("ez5") //It's not an elegant method, but it's safe and easy. -Cheridan
|
||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(src.loc)
|
||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(src.loc)
|
||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(src.loc)
|
||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(src.loc)
|
||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(src.loc)
|
||||
if("l4z5")
|
||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(src.loc)
|
||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(src.loc)
|
||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(src.loc)
|
||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(src.loc)
|
||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(src.loc)
|
||||
if("rh5")
|
||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(src.loc)
|
||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(src.loc)
|
||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(src.loc)
|
||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(src.loc)
|
||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(src.loc)
|
||||
if (check_cost(25/efficiency)) return 0
|
||||
else new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(src.loc)
|
||||
if("wallet")
|
||||
new/obj/item/weapon/storage/wallet(src.loc)
|
||||
if (check_cost(100/efficiency)) return 0
|
||||
else new/obj/item/weapon/storage/wallet(src.loc)
|
||||
/*if("bkbag")
|
||||
if (check_cost(200/efficiency)) return 0
|
||||
else new/obj/item/weapon/storage/bag/books(src.loc)
|
||||
if("ptbag")
|
||||
if (check_cost(200/efficiency)) return 0
|
||||
else new/obj/item/weapon/storage/bag/plants(src.loc)
|
||||
if("mnbag")
|
||||
if (check_cost(200/efficiency)) return 0
|
||||
else new/obj/item/weapon/storage/bag/ore(src.loc)*/
|
||||
if("gloves")
|
||||
new/obj/item/clothing/gloves/botanic_leather(src.loc)
|
||||
if (check_cost(250/efficiency)) return 0
|
||||
else new/obj/item/clothing/gloves/botanic_leather(src.loc)
|
||||
if("tbelt")
|
||||
new/obj/item/weapon/storage/belt/utility(src.loc)
|
||||
if (check_cost(300/efficiency)) return 0
|
||||
else new/obj/item/weapon/storage/belt/utility(src.loc)
|
||||
if("satchel")
|
||||
new/obj/item/weapon/storage/backpack/satchel(src.loc)
|
||||
if (check_cost(400/efficiency)) return 0
|
||||
else new/obj/item/weapon/storage/backpack/satchel(src.loc)
|
||||
if("cashbag")
|
||||
new/obj/item/weapon/storage/bag/cash(src.loc)
|
||||
if("monkey")
|
||||
new/mob/living/carbon/monkey(src.loc)
|
||||
if (check_cost(400/efficiency)) return 0
|
||||
else new/obj/item/weapon/storage/bag/cash(src.loc)
|
||||
/*if("jacket")
|
||||
if (check_cost(500/efficiency)) return 0
|
||||
else new/obj/item/clothing/suit/jacket/leather(src.loc)*/
|
||||
//if("monkey")
|
||||
// if (check_cost(500)) return 0
|
||||
// else new/mob/living/carbon/monkey(src.loc)
|
||||
processing = 0
|
||||
menustat = "complete"
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
/obj/machinery/biogenerator/proc/detach()
|
||||
if(beaker)
|
||||
beaker.loc = src.loc
|
||||
beaker = null
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/biogenerator/Topic(href, href_list)
|
||||
if(stat & BROKEN) return
|
||||
if(usr.stat || usr.restrained()) return
|
||||
if(!in_range(src, usr)) return
|
||||
if(..() || panel_open)
|
||||
return
|
||||
|
||||
usr.set_machine(src)
|
||||
|
||||
switch(href_list["action"])
|
||||
if("activate")
|
||||
activate()
|
||||
if("detach")
|
||||
if(beaker)
|
||||
beaker.loc = src.loc
|
||||
beaker = null
|
||||
update_icon()
|
||||
if("create")
|
||||
create_product(href_list["item"],text2num(href_list["cost"]))
|
||||
if("menu")
|
||||
menustat = "menu"
|
||||
updateUsrDialog()
|
||||
if(href_list["activate"])
|
||||
activate()
|
||||
updateUsrDialog()
|
||||
|
||||
else if(href_list["detach"])
|
||||
detach()
|
||||
updateUsrDialog()
|
||||
|
||||
else if(href_list["create"])
|
||||
var/amount = (text2num(href_list["amount"]))
|
||||
var/i = amount
|
||||
var/C = href_list["create"]
|
||||
if(i <= 0)
|
||||
return
|
||||
while(i >= 1)
|
||||
create_product(C)
|
||||
i--
|
||||
updateUsrDialog()
|
||||
|
||||
else if(href_list["menu"])
|
||||
menustat = "menu"
|
||||
updateUsrDialog()
|
||||
@@ -33,7 +33,7 @@
|
||||
var/obj/effect/decal/cleanable/target
|
||||
var/obj/effect/decal/cleanable/oldtarget
|
||||
var/oldloc = null
|
||||
req_access = list(access_janitor)
|
||||
req_access = list(access_janitor, access_robotics)
|
||||
var/path[] = new()
|
||||
var/patrol_path[] = null
|
||||
var/beacon_freq = 1445 // navigation beacon frequency
|
||||
|
||||
@@ -52,7 +52,8 @@
|
||||
var/safe_weapons = list(\
|
||||
/obj/item/weapon/gun/energy/laser/bluetag,\
|
||||
/obj/item/weapon/gun/energy/laser/redtag,\
|
||||
/obj/item/weapon/gun/energy/laser/practice)
|
||||
/obj/item/weapon/gun/energy/laser/practice,\
|
||||
/obj/item/weapon/melee/telebaton)
|
||||
|
||||
var/turf/patrol_target // this is turf to navigate to (location of beacon)
|
||||
var/new_destination // pending new destination (waiting for beacon response)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
anchored = 0
|
||||
health = 20
|
||||
maxhealth = 20
|
||||
req_access =list(access_medical)
|
||||
req_access =list(access_medical, access_robotics)
|
||||
var/stunned = 0 //It can be stunned by tasers. Delicate circuits.
|
||||
//var/emagged = 0
|
||||
var/list/botcard_access = list(access_medical)
|
||||
@@ -38,11 +38,11 @@
|
||||
var/treatment_virus = "spaceacillin"
|
||||
var/shut_up = 0 //self explanatory :)
|
||||
|
||||
/obj/machinery/bot/medbot/mysterious
|
||||
name = "Mysterious Medibot"
|
||||
desc = "International Medibot of mystery."
|
||||
/obj/machinery/bot/medbot/syndicate
|
||||
name = "Suspicious Medibot"
|
||||
desc = "You'd better have insurance!"
|
||||
skin = "bezerk"
|
||||
treatment_oxy = "dexalinp"
|
||||
treatment_oxy = "dexalin"
|
||||
treatment_brute = "bicaridine"
|
||||
treatment_fire = "kelotane"
|
||||
treatment_tox = "anti_toxin"
|
||||
@@ -62,6 +62,8 @@
|
||||
spawn(5)
|
||||
if(src.skin)
|
||||
src.overlays += image('icons/obj/aibots.dmi', "kit_skin_[src.skin]")
|
||||
if(src.skin == "bezerk")
|
||||
created_name = "Suspicious Medibot"
|
||||
|
||||
|
||||
/obj/machinery/bot/medbot/New()
|
||||
@@ -333,6 +335,9 @@
|
||||
if(src.emagged == 2) //Everyone needs our medicine. (Our medicine is toxins)
|
||||
return 1
|
||||
|
||||
if((skin == "bezerk") && (!("syndicate" in C.faction))) // No healing non-operatives as a SyndiBot.
|
||||
return 0
|
||||
|
||||
//If they're injured, we're using a beaker, and don't have one of our WONDERCHEMS.
|
||||
if((src.reagent_glass) && (src.use_beaker) && ((C.getBruteLoss() >= heal_threshold) || (C.getToxLoss() >= heal_threshold) || (C.getToxLoss() >= heal_threshold) || (C.getOxyLoss() >= (heal_threshold + 15))))
|
||||
for(var/datum/reagent/R in src.reagent_glass.reagents.reagent_list)
|
||||
@@ -534,6 +539,8 @@
|
||||
A.skin = "tox"
|
||||
else if(istype(src,/obj/item/weapon/storage/firstaid/o2))
|
||||
A.skin = "o2"
|
||||
else if(istype(src,/obj/item/weapon/storage/firstaid/tactical))
|
||||
A.skin = "bezerk"
|
||||
|
||||
del(S)
|
||||
user.put_in_hands(A)
|
||||
@@ -569,9 +576,18 @@
|
||||
src.build_step++
|
||||
user << "<span class='notice'>You complete the Medibot! Beep boop.</span>"
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/machinery/bot/medbot/S = new /obj/machinery/bot/medbot(T)
|
||||
S.skin = src.skin
|
||||
S.name = src.created_name
|
||||
|
||||
if (src.skin == "bezerk")
|
||||
var/obj/machinery/bot/medbot/syndicate/S = new /obj/machinery/bot/medbot/syndicate(T)
|
||||
S.skin = src.skin
|
||||
S.name = src.created_name
|
||||
S.req_access = list("150")
|
||||
|
||||
else
|
||||
var/obj/machinery/bot/medbot/S = new /obj/machinery/bot/medbot(T)
|
||||
S.skin = src.skin
|
||||
S.name = src.created_name
|
||||
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
|
||||
|
||||
@@ -57,7 +57,9 @@
|
||||
var/safe_weapons = list(\
|
||||
/obj/item/weapon/gun/energy/laser/bluetag,\
|
||||
/obj/item/weapon/gun/energy/laser/redtag,\
|
||||
/obj/item/weapon/gun/energy/laser/practice)
|
||||
/obj/item/weapon/gun/energy/laser/practice,\
|
||||
/obj/item/weapon/melee/telebaton,\
|
||||
/obj/item/weapon/melee/baton/loaded/ntcane)
|
||||
|
||||
|
||||
/obj/machinery/bot/secbot/beepsky
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
/mob/living/silicon/ai/proc/get_camera_list()
|
||||
|
||||
if(src.stat == 2)
|
||||
return
|
||||
|
||||
@@ -15,13 +14,11 @@
|
||||
var/list/tempnetwork = C.network&src.network
|
||||
if (tempnetwork.len)
|
||||
T[text("[][]", C.c_tag, (C.can_use() ? null : " (Deactivated)"))] = C
|
||||
else return
|
||||
|
||||
track = new()
|
||||
track.cameras = T
|
||||
return T
|
||||
|
||||
|
||||
/mob/living/silicon/ai/proc/ai_camera_list(var/camera in get_camera_list())
|
||||
if(src.stat == 2)
|
||||
src << "You can't list the cameras because you are dead!"
|
||||
@@ -29,7 +26,7 @@
|
||||
|
||||
if (!camera || camera == "Cancel")
|
||||
return 0
|
||||
|
||||
|
||||
var/obj/machinery/camera/C = track.cameras[camera]
|
||||
track = null
|
||||
src.eyeobj.setLoc(C)
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
var/attempting = 0 //One clone attempt at a time thanks
|
||||
var/eject_wait = 0 //Don't eject them as soon as they are created fuckkk
|
||||
var/biomass = CLONE_BIOMASS // * 3 - N3X
|
||||
var/speed_coeff
|
||||
var/efficiency
|
||||
|
||||
l_color = "#00FF00"
|
||||
power_change()
|
||||
@@ -30,7 +32,28 @@
|
||||
else
|
||||
SetLuminosity(0)
|
||||
|
||||
/obj/machinery/clonepod/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/clonepod(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src, 1)
|
||||
component_parts += new /obj/item/stack/cable_coil(src, 1)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/clonepod/RefreshParts()
|
||||
speed_coeff = 0
|
||||
efficiency = 0
|
||||
for(var/obj/item/weapon/stock_parts/scanning_module/S in component_parts)
|
||||
efficiency += S.rating
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/P in component_parts)
|
||||
speed_coeff += P.rating
|
||||
heal_level = (efficiency * 15) + 10
|
||||
|
||||
//The return of data disks?? Just for transferring between genetics machine/cloning machine.
|
||||
//TO-DO: Make the genetics machine accept them.
|
||||
/obj/item/weapon/disk/data
|
||||
@@ -143,7 +166,7 @@
|
||||
|
||||
//Start growing a human clone in the pod!
|
||||
/obj/machinery/clonepod/proc/growclone(var/datum/dna2/record/R)
|
||||
if(mess || attempting)
|
||||
if(mess || attempting || panel_open)
|
||||
return 0
|
||||
var/datum/mind/clonemind = locate(R.mind)
|
||||
if(!istype(clonemind)) //not a mind
|
||||
@@ -165,7 +188,6 @@
|
||||
break
|
||||
return 0
|
||||
|
||||
src.heal_level = rand(10,40) //Randomizes what health the clone is when ejected
|
||||
src.attempting = 1 //One at a time!!
|
||||
src.locked = 1
|
||||
|
||||
@@ -182,8 +204,8 @@
|
||||
|
||||
src.icon_state = "pod_1"
|
||||
//Get the clone body ready
|
||||
H.adjustCloneLoss(150) //new damage var so you can't eject a clone early then stab them to abuse the current damage system --NeoFite
|
||||
H.adjustBrainLoss(src.heal_level + 50 + rand(10, 30)) // The rand(10, 30) will come out as extra brain damage
|
||||
H.adjustCloneLoss(190) //new damage var so you can't eject a clone early then stab them to abuse the current damage system --NeoFite
|
||||
H.adjustBrainLoss(190) // The rand(10, 30) will come out as extra brain damage
|
||||
H.Paralyse(4)
|
||||
|
||||
//Here let's calculate their health so the pod doesn't immediately eject them!!!
|
||||
@@ -217,7 +239,12 @@
|
||||
else
|
||||
H.dna=R.dna
|
||||
H.UpdateAppearance()
|
||||
randmutb(H) //Sometimes the clones come out wrong.
|
||||
if(efficiency > 2 && efficiency < 5 && prob(25))
|
||||
randmutb(H)
|
||||
if(efficiency > 5 && prob(20))
|
||||
randmutg(H)
|
||||
if(efficiency < 3 && prob(50))
|
||||
randmutb(H)
|
||||
H.dna.UpdateSE()
|
||||
H.dna.UpdateUI()
|
||||
|
||||
@@ -250,14 +277,14 @@
|
||||
src.connected_message("Clone Rejected: Deceased.")
|
||||
return
|
||||
|
||||
else if(src.occupant.health < src.heal_level)
|
||||
else if(src.occupant.cloneloss > (100 - src.heal_level))
|
||||
src.occupant.Paralyse(4)
|
||||
|
||||
//Slowly get that clone healed and finished.
|
||||
src.occupant.adjustCloneLoss(-2)
|
||||
src.occupant.adjustCloneLoss(-((speed_coeff/2)))
|
||||
|
||||
//Premature clones may have brain damage.
|
||||
src.occupant.adjustBrainLoss(-1)
|
||||
src.occupant.adjustBrainLoss(-((speed_coeff/2)))
|
||||
|
||||
//So clones don't die of oxyloss in a running pod.
|
||||
if (src.occupant.reagents.get_reagent_amount("inaprovaline") < 30)
|
||||
@@ -269,7 +296,7 @@
|
||||
use_power(7500) //This might need tweaking.
|
||||
return
|
||||
|
||||
else if((src.occupant.health >= src.heal_level) && (!src.eject_wait))
|
||||
else if((src.occupant.cloneloss <= (100 - src.heal_level)) && (!src.eject_wait))
|
||||
src.connected_message("Cloning Process Complete.")
|
||||
src.locked = 0
|
||||
src.go_out()
|
||||
@@ -279,7 +306,7 @@
|
||||
src.occupant = null
|
||||
if (src.locked)
|
||||
src.locked = 0
|
||||
if (!src.mess)
|
||||
if (!src.mess && !panel_open)
|
||||
icon_state = "pod_0"
|
||||
//use_power(200)
|
||||
return
|
||||
@@ -288,6 +315,20 @@
|
||||
|
||||
//Let's unlock this early I guess. Might be too early, needs tweaking.
|
||||
/obj/machinery/clonepod/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/screwdriver))
|
||||
if(occupant || mess || locked)
|
||||
user << "<span class='notice'>The maintenance panel is locked.</span>"
|
||||
return
|
||||
default_deconstruction_screwdriver(user, "[icon_state]_maintenance", "[initial(icon_state)]", W)
|
||||
return
|
||||
|
||||
if(exchange_parts(user, W))
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
if(panel_open)
|
||||
default_deconstruction_crowbar(W)
|
||||
return
|
||||
if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
|
||||
if (!src.check_access(W))
|
||||
user << "\red Access Denied."
|
||||
@@ -348,17 +389,16 @@
|
||||
set name = "Eject Cloner"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
|
||||
if(!usr)
|
||||
return
|
||||
if (usr.stat != 0)
|
||||
return
|
||||
src.go_out()
|
||||
src.go_out(usr)
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/obj/machinery/clonepod/proc/go_out()
|
||||
if (src.locked)
|
||||
return
|
||||
|
||||
/obj/machinery/clonepod/proc/go_out(user)
|
||||
if (src.mess) //Clean that mess and dump those gibs!
|
||||
src.mess = 0
|
||||
gibs(src.loc)
|
||||
@@ -371,8 +411,12 @@
|
||||
return
|
||||
|
||||
if (!(src.occupant))
|
||||
user << "<span class=\"warning\">The cloning pod is empty!</span>"
|
||||
return
|
||||
|
||||
if (src.locked)
|
||||
user << "<span class=\"warning\">The cloning pod is locked!</span>"
|
||||
return
|
||||
/*
|
||||
for(var/obj/O in src)
|
||||
O.loc = src.loc
|
||||
@@ -409,7 +453,7 @@
|
||||
return
|
||||
|
||||
/obj/machinery/clonepod/emp_act(severity)
|
||||
if(prob(100/severity)) malfunction()
|
||||
if(prob(100/(severity*efficiency))) malfunction()
|
||||
..()
|
||||
|
||||
/obj/machinery/clonepod/ex_act(severity)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
var/list/prizes = list( /obj/item/weapon/storage/box/snappops = 2,
|
||||
/obj/item/clothing/under/syndicate/tacticool = 2,
|
||||
/obj/item/toy/blink = 2,
|
||||
/obj/item/clothing/suit/syndicatefake = 2,
|
||||
/obj/item/weapon/storage/box/fakesyndiesuit = 2,
|
||||
/obj/item/toy/sword = 2,
|
||||
/obj/item/toy/gun = 2,
|
||||
/obj/item/toy/crossbow = 2,
|
||||
@@ -26,7 +26,10 @@
|
||||
/obj/item/toy/prize/mauler = 1,
|
||||
/obj/item/toy/prize/odysseus = 1,
|
||||
/obj/item/toy/prize/phazon = 1,
|
||||
/obj/item/toy/nuke = 2
|
||||
/obj/item/toy/nuke = 2,
|
||||
/obj/item/toy/cards/deck = 2,
|
||||
/obj/item/toy/carpplushie = 2,
|
||||
/obj/item/toy/minimeteor = 2,
|
||||
)
|
||||
|
||||
/obj/machinery/computer/arcade/power_change()
|
||||
|
||||
@@ -34,15 +34,12 @@
|
||||
name = "Circuit board (Message Monitor)"
|
||||
build_path = "/obj/machinery/computer/message_monitor"
|
||||
origin_tech = "programming=3"
|
||||
/obj/item/weapon/circuitboard/security
|
||||
name = "Circuit board (Security)"
|
||||
/obj/item/weapon/circuitboard/camera
|
||||
name = "Circuit board (Camera Monitor)"
|
||||
build_path = "/obj/machinery/computer/security"
|
||||
var/network = list("SS13")
|
||||
req_access = list(access_security)
|
||||
var/locked = 1
|
||||
var/emagged = 0
|
||||
origin_tech = "programming=2"
|
||||
/obj/item/weapon/circuitboard/aicore
|
||||
name = "Circuit board (AI core)"
|
||||
name = "Circuit board (AI Core)"
|
||||
origin_tech = "programming=4;biotech=2"
|
||||
board_type = "other"
|
||||
/obj/item/weapon/circuitboard/aiupload
|
||||
@@ -65,7 +62,7 @@
|
||||
build_path = "/obj/machinery/computer/scan_consolenew"
|
||||
origin_tech = "programming=2;biotech=2"
|
||||
/obj/item/weapon/circuitboard/communications
|
||||
name = "Circuit board (Communications)"
|
||||
name = "Circuit board (Communications Console)"
|
||||
build_path = "/obj/machinery/computer/communications"
|
||||
origin_tech = "programming=2;magnets=2"
|
||||
/obj/item/weapon/circuitboard/card
|
||||
@@ -74,11 +71,8 @@
|
||||
/obj/item/weapon/circuitboard/card/centcom
|
||||
name = "Circuit board (CentCom ID Computer)"
|
||||
build_path = "/obj/machinery/computer/card/centcom"
|
||||
//obj/item/weapon/circuitboard/shield
|
||||
// name = "Circuit board (Shield Control)"
|
||||
// build_path = "/obj/machinery/computer/stationshield"
|
||||
/obj/item/weapon/circuitboard/teleporter
|
||||
name = "Circuit board (Teleporter)"
|
||||
name = "Circuit board (Teleporter Console)"
|
||||
build_path = "/obj/machinery/computer/teleporter"
|
||||
origin_tech = "programming=2;bluespace=2"
|
||||
/obj/item/weapon/circuitboard/secure_data
|
||||
@@ -91,22 +85,22 @@
|
||||
name = "Circuit board (Station Alerts)"
|
||||
build_path = "/obj/machinery/computer/station_alert"
|
||||
/obj/item/weapon/circuitboard/atmospheresiphonswitch
|
||||
name = "Circuit board (Atmosphere siphon control)"
|
||||
name = "Circuit board (Atmosphere Siphon control)"
|
||||
build_path = "/obj/machinery/computer/atmosphere/siphonswitch"
|
||||
/obj/item/weapon/circuitboard/air_management
|
||||
name = "Circuit board (Atmospheric monitor)"
|
||||
name = "Circuit board (Atmospheric Monitor)"
|
||||
build_path = "/obj/machinery/computer/general_air_control"
|
||||
/obj/item/weapon/circuitboard/injector_control
|
||||
name = "Circuit board (Injector control)"
|
||||
name = "Circuit board (Injector Control)"
|
||||
build_path = "/obj/machinery/computer/general_air_control/fuel_injection"
|
||||
/obj/item/weapon/circuitboard/atmos_alert
|
||||
name = "Circuit board (Atmospheric Alert)"
|
||||
build_path = "/obj/machinery/computer/atmos_alert"
|
||||
/obj/item/weapon/circuitboard/pod
|
||||
name = "Circuit board (Massdriver control)"
|
||||
name = "Circuit board (Massdriver Control)"
|
||||
build_path = "/obj/machinery/computer/pod"
|
||||
/obj/item/weapon/circuitboard/robotics
|
||||
name = "Circuit board (Robotics Control)"
|
||||
name = "Circuit board (Robotics Control Console)"
|
||||
build_path = "/obj/machinery/computer/robotics"
|
||||
origin_tech = "programming=3"
|
||||
/obj/item/weapon/circuitboard/drone_control
|
||||
@@ -114,7 +108,7 @@
|
||||
build_path = "/obj/machinery/computer/drone_control"
|
||||
origin_tech = "programming=3"
|
||||
/obj/item/weapon/circuitboard/cloning
|
||||
name = "Circuit board (Cloning)"
|
||||
name = "Circuit board (Cloning Machine Console)"
|
||||
build_path = "/obj/machinery/computer/cloning"
|
||||
origin_tech = "programming=3;biotech=3"
|
||||
/obj/item/weapon/circuitboard/arcade/battle
|
||||
@@ -122,18 +116,18 @@
|
||||
build_path = "/obj/machinery/computer/arcade/battle"
|
||||
origin_tech = "programming=1"
|
||||
/obj/item/weapon/circuitboard/arcade/orion_trail
|
||||
name = "circuit board (Orion_Trail)"
|
||||
name = "circuit board (Orion Trail)"
|
||||
build_path = "/obj/machinery/computer/arcade/orion_trail"
|
||||
origin_tech = "programming=2"
|
||||
/obj/item/weapon/circuitboard/turbine_control
|
||||
name = "Circuit board (Turbine control)"
|
||||
name = "Circuit board (Turbine Control)"
|
||||
build_path = "/obj/machinery/computer/turbine_computer"
|
||||
/obj/item/weapon/circuitboard/solar_control
|
||||
name = "Circuit board (Solar Control)" //name fixed 250810
|
||||
name = "Circuit board (Solar Control)"
|
||||
build_path = "/obj/machinery/power/solar_control"
|
||||
origin_tech = "programming=2;powerstorage=2"
|
||||
/obj/item/weapon/circuitboard/powermonitor
|
||||
name = "Circuit board (Power Monitor)" //name fixed 250810
|
||||
name = "Circuit board (Power Monitor)"
|
||||
build_path = "/obj/machinery/power/monitor"
|
||||
/obj/item/weapon/circuitboard/olddoor
|
||||
name = "Circuit board (DoorMex)"
|
||||
@@ -154,10 +148,10 @@
|
||||
name = "Circuit Board (Exosuit Control Console)"
|
||||
build_path = "/obj/machinery/computer/mecha"
|
||||
/obj/item/weapon/circuitboard/rdservercontrol
|
||||
name = "Circuit Board (R&D Server Control)"
|
||||
name = "Circuit Board (RD Server Control)"
|
||||
build_path = "/obj/machinery/computer/rdservercontrol"
|
||||
/obj/item/weapon/circuitboard/crew
|
||||
name = "Circuit board (Crew monitoring computer)"
|
||||
name = "Circuit board (Crew Monitoring Computer)"
|
||||
build_path = "/obj/machinery/computer/crew"
|
||||
origin_tech = "programming=3;biotech=2;magnets=2"
|
||||
/obj/item/weapon/circuitboard/mech_bay_power_console
|
||||
@@ -165,11 +159,11 @@
|
||||
build_path = "/obj/machinery/computer/mech_bay_power_console"
|
||||
origin_tech = "programming=2;powerstorage=3"
|
||||
/obj/item/weapon/circuitboard/ordercomp
|
||||
name = "Circuit board (Supply ordering console)"
|
||||
name = "Circuit board (Supply Ordering Console)"
|
||||
build_path = "/obj/machinery/computer/ordercomp"
|
||||
origin_tech = "programming=2"
|
||||
/obj/item/weapon/circuitboard/supplycomp
|
||||
name = "Circuit board (Supply shuttle console)"
|
||||
name = "Circuit board (Supply Shuttle Console)"
|
||||
build_path = "/obj/machinery/computer/supplycomp"
|
||||
origin_tech = "programming=3"
|
||||
var/contraband_enabled = 0
|
||||
@@ -192,7 +186,7 @@
|
||||
origin_tech = "programming=3"
|
||||
|
||||
/obj/item/weapon/circuitboard/curefab
|
||||
name = "Circuit board (Cure fab)"
|
||||
name = "Circuit board (Cure Fabricator)"
|
||||
build_path = "/obj/machinery/computer/curer"
|
||||
/obj/item/weapon/circuitboard/splicer
|
||||
name = "Circuit board (Disease Splicer)"
|
||||
@@ -209,7 +203,7 @@
|
||||
name = "Circuit board (Research Shuttle)"
|
||||
build_path = "/obj/machinery/computer/shuttle_control/research"
|
||||
origin_tech = "programming=2"
|
||||
/obj/item/weapon/circuitboard/HolodeckControl // Not going to let people get this, but it's just here for future
|
||||
/obj/item/weapon/circuitboard/HolodeckControl
|
||||
name = "Circuit board (Holodeck Control)"
|
||||
build_path = "/obj/machinery/computer/HolodeckControl"
|
||||
origin_tech = "programming=4"
|
||||
@@ -225,6 +219,10 @@
|
||||
name = "Circuit board (Prison Shuttle)"
|
||||
build_path = "/obj/machinery/computer/prison_shuttle"
|
||||
origin_tech = "programming=2"
|
||||
/obj/item/weapon/circuitboard/telesci_console
|
||||
name = "Circuit board (Telepad Control Console)"
|
||||
build_path = "/obj/machinery/computer/telescience"
|
||||
origin_tech = "programming=3;bluespace=2"
|
||||
|
||||
/obj/item/weapon/circuitboard/HONKputer
|
||||
name = "Circuit board (HONKputer)"
|
||||
@@ -257,40 +255,6 @@
|
||||
user << "DERP! BUG! Report this (And what you were doing to cause it) to Agouri"
|
||||
return
|
||||
|
||||
/obj/item/weapon/circuitboard/security/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I,/obj/item/weapon/card/emag))
|
||||
if(emagged)
|
||||
user << "Circuit lock is already removed."
|
||||
return
|
||||
user << "\blue You override the circuit lock and open controls."
|
||||
emagged = 1
|
||||
locked = 0
|
||||
else if(istype(I,/obj/item/weapon/card/id))
|
||||
if(emagged)
|
||||
user << "\red Circuit lock does not respond."
|
||||
return
|
||||
if(check_access(I))
|
||||
locked = !locked
|
||||
user << "\blue You [locked ? "" : "un"]lock the circuit controls."
|
||||
else
|
||||
user << "\red Access denied."
|
||||
else if(istype(I,/obj/item/device/multitool))
|
||||
if(locked)
|
||||
user << "\red Circuit controls are locked."
|
||||
return
|
||||
var/existing_networks = list2text(network,",")
|
||||
var/input = strip_html(input(usr, "Which networks would you like to connect this camera console circuit to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Multitool-Circuitboard interface", existing_networks))
|
||||
if(!input)
|
||||
usr << "No input found please hang up and try your call again."
|
||||
return
|
||||
var/list/tempnetwork = text2list(input, ",")
|
||||
tempnetwork = difflist(tempnetwork,RESTRICTED_CAMERA_NETWORKS,1)
|
||||
if(tempnetwork.len < 1)
|
||||
usr << "No network found please hang up and try your call again."
|
||||
return
|
||||
network = tempnetwork
|
||||
return
|
||||
|
||||
/obj/item/weapon/circuitboard/rdconsole/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I,/obj/item/weapon/screwdriver))
|
||||
user.visible_message("\blue \the [user] adjusts the jumper on the [src]'s access protocol pins.", "\blue You adjust the jumper on the access protocol pins.")
|
||||
@@ -407,10 +371,6 @@
|
||||
var/obj/machinery/computer/supplycomp/SC = B
|
||||
var/obj/item/weapon/circuitboard/supplycomp/C = circuit
|
||||
SC.can_order_contraband = C.contraband_enabled
|
||||
if(istype(circuit,/obj/item/weapon/circuitboard/security))
|
||||
var/obj/machinery/computer/security/C = B
|
||||
var/obj/item/weapon/circuitboard/security/CB = circuit
|
||||
C.network = CB.network
|
||||
del(src)
|
||||
|
||||
|
||||
|
||||
@@ -1,46 +1,137 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
||||
|
||||
|
||||
/obj/machinery/computer/security
|
||||
name = "Security Cameras"
|
||||
desc = "Used to access the various cameras on the station."
|
||||
name = "Camera Monitor"
|
||||
desc = "Used to access the various cameras networks on the station."
|
||||
icon_state = "cameras"
|
||||
circuit = "/obj/item/weapon/circuitboard/camera"
|
||||
var/obj/machinery/camera/current = null
|
||||
var/list/network = list("")
|
||||
var/last_pic = 1.0
|
||||
var/list/network = list("SS13")
|
||||
var/mapping = 0//For the overview file, interesting bit of code.
|
||||
|
||||
l_color = "#B40000"
|
||||
var/mapping = 0
|
||||
var/list/networks[0]
|
||||
var/list/tempnets[0]
|
||||
var/list/data[0]
|
||||
var/list/access[0]
|
||||
|
||||
|
||||
New() // Lists existing networks and their required access. Format: networks[<name>] = list(<access>)
|
||||
networks["SS13"] = list(access_hos,access_captain)
|
||||
networks["Telecomms"] = list(access_hos,access_captain)
|
||||
networks["Research Outpost"] = list(access_rd,access_hos,access_captain)
|
||||
networks["Mining Outpost"] = list(access_qm,access_hop,access_hos,access_captain)
|
||||
networks["Research"] = list(access_rd,access_hos,access_captain)
|
||||
networks["Prison"] = list(access_hos,access_captain)
|
||||
networks["Interrogation"] = list(access_hos,access_captain)
|
||||
networks["Atmosphere Alarms"] = list(access_ce,access_hos,access_captain)
|
||||
networks["Fire Alarms"] = list(access_ce,access_hos,access_captain)
|
||||
networks["Power Alarms"] = list(access_ce,access_hos,access_captain)
|
||||
networks["Supermatter"] = list(access_ce,access_hos,access_captain)
|
||||
networks["Singularity"] = list(access_ce,access_hos,access_captain)
|
||||
networks["Anomaly Isolation"] = list(access_rd,access_hos,access_captain)
|
||||
networks["Toxins"] = list(access_rd,access_hos,access_captain)
|
||||
networks["Telepad"] = list(access_rd,access_hos,access_captain)
|
||||
networks["ERT"] = list(access_cent_teleporter,access_cent_captain)
|
||||
networks["CentCom"] = list(access_cent_captain)
|
||||
networks["Thunderdome"] = list(access_cent_captain)
|
||||
|
||||
attack_ai(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
if(isAI(user))
|
||||
return ui_interact(user)
|
||||
else
|
||||
return attack_hand(user)
|
||||
|
||||
attack_paw(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
check_eye(var/mob/user as mob)
|
||||
if ((get_dist(user, src) > 1 || !( user.canmove ) || user.blinded || !( current ) || !( current.status )) && (!istype(user, /mob/living/silicon)))
|
||||
return null
|
||||
user.reset_view(current)
|
||||
return 1
|
||||
|
||||
|
||||
attack_hand(var/mob/user as mob)
|
||||
if (src.z > 6)
|
||||
user << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
|
||||
|
||||
// Network configuration
|
||||
attackby(I as obj, user as mob)
|
||||
if(istype(I,/obj/item/weapon/card/emag)) // If hit by an emag.
|
||||
var/obj/item/weapon/card/emag/E = I
|
||||
if(!emagged)
|
||||
if(E.uses)
|
||||
E.uses--
|
||||
emagged = 1
|
||||
user << "\blue You have authorized full network access!"
|
||||
ui_interact(user)
|
||||
else
|
||||
ui_interact(user)
|
||||
else
|
||||
ui_interact(user)
|
||||
else if(istype(I,/obj/item/weapon/card/id)) // If hit by a regular ID card.
|
||||
var/obj/item/weapon/card/id/E = I
|
||||
access = E.access
|
||||
ui_interact(user)
|
||||
else
|
||||
..()
|
||||
|
||||
ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
if(..())
|
||||
return
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
data.Cut()
|
||||
tempnets.Cut()
|
||||
if(emagged)
|
||||
access = list(access_captain) // Assume captain level access when emagged
|
||||
data["emagged"] = 1
|
||||
if(isAI(user))
|
||||
access = list(access_captain) // Assume captain level access when AI
|
||||
// Loop through the ID's permission, and check which networks the ID has access to.
|
||||
for(var/l in networks) // Loop through networks.
|
||||
for(var/m in networks[l]) // Loop through access levels of the networks.
|
||||
if(m in access)
|
||||
if(l in network) // Checks if the network is currently active.
|
||||
tempnets.Add(list(list("name" = l, "active" = 1)))
|
||||
else
|
||||
tempnets.Add(list(list("name" = l, "active" = 0)))
|
||||
break
|
||||
data["networks"] = tempnets
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "camera_console.tmpl", "Camera Monitor UI", 660, 280)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if(href_list["activate"]) // Activate: enable or disable networks
|
||||
var/net = href_list["activate"] // Network to be enabled or disabled.
|
||||
var/active = href_list["active"] // Is the network currently active.
|
||||
for(var/a in networks[net])
|
||||
if(a in access) // Re-check for authorization.
|
||||
if(text2num(active) == 1)
|
||||
src.network -= net
|
||||
break
|
||||
else
|
||||
src.network += net
|
||||
break
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
attack_hand(var/mob/user as mob)
|
||||
if(src.z > 6)
|
||||
user << "\red <b>Unable to establish a connection:</b> \black You're too far away from the station!"
|
||||
return
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(stat & (NOPOWER|BROKEN)) return
|
||||
|
||||
if(!isAI(user))
|
||||
user.set_machine(src)
|
||||
|
||||
|
||||
if(network.len == 0)
|
||||
user << "\red No networks configured! Swipe the monitor with an authorized ID to configure them."
|
||||
return
|
||||
|
||||
// Camera listing
|
||||
var/list/L = list()
|
||||
for (var/obj/machinery/camera/C in cameranet.viewpoints)
|
||||
L.Add(C)
|
||||
|
||||
camera_sort(L)
|
||||
|
||||
var/list/D = list()
|
||||
@@ -55,7 +146,7 @@
|
||||
return 0
|
||||
|
||||
var/obj/machinery/camera/C = D[t]
|
||||
|
||||
|
||||
if(t == "Cancel")
|
||||
user.unset_machine()
|
||||
return 0
|
||||
@@ -66,13 +157,15 @@
|
||||
spawn(5)
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
|
||||
// Check if camera is accessible when jumping
|
||||
proc/can_access_camera(var/obj/machinery/camera/C)
|
||||
var/list/shared_networks = src.network & C.network
|
||||
if(shared_networks.len)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
// Switching to cameras
|
||||
proc/switch_to_camera(var/mob/user, var/obj/machinery/camera/C)
|
||||
if ((get_dist(user, src) > 1 || user.machine != src || user.blinded || !( user.canmove ) || !( C.can_use() )) && (!istype(user, /mob/living/silicon/ai)))
|
||||
if(!C.can_use() && !isAI(user))
|
||||
@@ -88,40 +181,7 @@
|
||||
use_power(50)
|
||||
return 1
|
||||
|
||||
attackby(I as obj, user as mob)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
if (stat & BROKEN)
|
||||
user << "\blue The broken glass falls out."
|
||||
var/obj/structure/computerframe/CF = new /obj/structure/computerframe(loc)
|
||||
new /obj/item/weapon/shard(loc)
|
||||
var/obj/item/weapon/circuitboard/security/CB = new /obj/item/weapon/circuitboard/security(CF)
|
||||
CB.network = network
|
||||
for (var/obj/C in src)
|
||||
C.loc = loc
|
||||
CF.circuit = CB
|
||||
CF.state = 3
|
||||
CF.icon_state = "3"
|
||||
CF.anchored = 1
|
||||
del(src)
|
||||
else
|
||||
user << "\blue You disconnect the monitor."
|
||||
var/obj/structure/computerframe/CF = new /obj/structure/computerframe( loc )
|
||||
var/obj/item/weapon/circuitboard/security/CB = new /obj/item/weapon/circuitboard/security(CF)
|
||||
CB.network = network
|
||||
for (var/obj/C in src)
|
||||
C.loc = loc
|
||||
CF.circuit = CB
|
||||
CF.state = 4
|
||||
CF.icon_state = "4"
|
||||
CF.anchored = 1
|
||||
del(src)
|
||||
else
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
//Camera control: moving.
|
||||
//Camera control: moving.
|
||||
proc/jump_on_click(var/mob/user,var/A)
|
||||
if(user.machine != src)
|
||||
return
|
||||
@@ -150,13 +210,15 @@
|
||||
return
|
||||
if(can_access_camera(jump_to))
|
||||
switch_to_camera(user,jump_to)
|
||||
//Camera control: mouse.
|
||||
|
||||
// Camera control: mouse.
|
||||
/atom/DblClick()
|
||||
..()
|
||||
if(istype(usr.machine,/obj/machinery/computer/security))
|
||||
var/obj/machinery/computer/security/console = usr.machine
|
||||
console.jump_on_click(usr,src)
|
||||
//Camera control: arrow keys.
|
||||
|
||||
// Camera control: arrow keys.
|
||||
/mob/Move(n,direct)
|
||||
if(istype(machine,/obj/machinery/computer/security))
|
||||
var/obj/machinery/computer/security/console = machine
|
||||
@@ -167,12 +229,13 @@
|
||||
return
|
||||
return ..(n,direct)
|
||||
|
||||
// Other computer monitors.
|
||||
/obj/machinery/computer/security/telescreen
|
||||
name = "Telescreen"
|
||||
desc = "Used for watching an empty arena."
|
||||
desc = "Used for watching camera networks."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "telescreen"
|
||||
network = list("thunder")
|
||||
network = list("SS13")
|
||||
density = 0
|
||||
|
||||
/obj/machinery/computer/security/telescreen/update_icon()
|
||||
@@ -182,27 +245,26 @@
|
||||
return
|
||||
|
||||
/obj/machinery/computer/security/telescreen/entertainment
|
||||
name = "entertainment monitor"
|
||||
desc = "Damn, they better have /tg/thechannel on these things."
|
||||
name = "Entertainment Monitor"
|
||||
desc = "Damn, they better have Paradise TV on these things."
|
||||
icon = 'icons/obj/status_display.dmi'
|
||||
icon_state = "entertainment"
|
||||
network = list("news")
|
||||
|
||||
/obj/machinery/computer/security/wooden_tv
|
||||
name = "Security Cameras"
|
||||
name = "Security Camera Monitor"
|
||||
desc = "An old TV hooked into the stations camera network."
|
||||
icon_state = "security_det"
|
||||
network = list("news")
|
||||
|
||||
network = list("SS13")
|
||||
|
||||
/obj/machinery/computer/security/mining
|
||||
name = "Outpost Cameras"
|
||||
name = "Outpost Camera Monitor"
|
||||
desc = "Used to access the various cameras on the outpost."
|
||||
icon_state = "miningcameras"
|
||||
network = list("MINE")
|
||||
network = list("Mining Outpost")
|
||||
|
||||
/obj/machinery/computer/security/engineering
|
||||
name = "Engineering Cameras"
|
||||
name = "Engineering Camera Monitor"
|
||||
desc = "Used to monitor fires and breaches."
|
||||
icon_state = "engineeringcameras"
|
||||
network = list("Engineering","Power Alarms","Atmosphere Alarms","Fire Alarms")
|
||||
network = list("Power Alarms","Atmosphere Alarms","Fire Alarms")
|
||||
@@ -1,127 +0,0 @@
|
||||
|
||||
//the researchable camera circuit that can connect to any camera network
|
||||
|
||||
/obj/item/weapon/circuitboard/camera
|
||||
//name = "Circuit board (Camera)"
|
||||
var/secured = 1
|
||||
var/authorised = 0
|
||||
var/possibleNets[0]
|
||||
var/network = ""
|
||||
build_path = 0
|
||||
|
||||
//when adding a new camera network, you should only need to update these two procs
|
||||
New()
|
||||
possibleNets["Engineering"] = access_ce
|
||||
possibleNets["SS13"] = access_hos
|
||||
possibleNets["Mining"] = access_mining
|
||||
possibleNets["Cargo"] = access_qm
|
||||
possibleNets["Research"] = access_rd
|
||||
possibleNets["Medbay"] = access_cmo
|
||||
|
||||
proc/updateBuildPath()
|
||||
build_path = ""
|
||||
if(authorised && secured)
|
||||
switch(network)
|
||||
if("SS13")
|
||||
build_path = "/obj/machinery/computer/security"
|
||||
if("Engineering")
|
||||
build_path = "/obj/machinery/computer/security/engineering"
|
||||
if("Mining")
|
||||
build_path = "/obj/machinery/computer/security/mining"
|
||||
if("Research")
|
||||
build_path = "/obj/machinery/computer/security/research"
|
||||
if("Medbay")
|
||||
build_path = "/obj/machinery/computer/security/medbay"
|
||||
if("Cargo")
|
||||
build_path = "/obj/machinery/computer/security/cargo"
|
||||
|
||||
attackby(var/obj/item/I, var/mob/user)//if(health > 50)
|
||||
..()
|
||||
if(istype(I,/obj/item/weapon/card/emag))
|
||||
if(network)
|
||||
var/obj/item/weapon/card/emag/E = I
|
||||
if(E.uses)
|
||||
E.uses--
|
||||
else
|
||||
return
|
||||
authorised = 1
|
||||
user << "\blue You authorised the circuit network!"
|
||||
updateDialog()
|
||||
else
|
||||
user << "\blue You must select a camera network circuit!"
|
||||
else if(istype(I,/obj/item/weapon/screwdriver))
|
||||
secured = !secured
|
||||
user.visible_message("\blue The [src] can [secured ? "no longer" : "now"] be modified.")
|
||||
updateBuildPath()
|
||||
return
|
||||
|
||||
attack_self(var/mob/user)
|
||||
if(!secured && ishuman(user))
|
||||
user.machine = src
|
||||
interact(user, 0)
|
||||
|
||||
proc/interact(var/mob/user, var/ai=0)
|
||||
if(secured)
|
||||
return
|
||||
if (!ishuman(user))
|
||||
return ..(user)
|
||||
var/t = "<B>Circuitboard Console - Camera Monitoring Computer</B><BR>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
t += "<hr> Please select a camera network:<br>"
|
||||
|
||||
for(var/curNet in possibleNets)
|
||||
if(network == curNet)
|
||||
t += "- [curNet]<br>"
|
||||
else
|
||||
t += "- <A href='?src=\ref[src];net=[curNet]'>[curNet]</A><BR>"
|
||||
t += "<hr>"
|
||||
if(network)
|
||||
if(authorised)
|
||||
t += "Authenticated <A href='?src=\ref[src];removeauth=1'>(Clear Auth)</A><BR>"
|
||||
else
|
||||
t += "<A href='?src=\ref[src];auth=1'><b>*Authenticate*</b></A> (Requires an appropriate access ID)<br>"
|
||||
else
|
||||
t += "<A href='?src=\ref[src];auth=1'>*Authenticate*</A> (Requires an appropriate access ID)<BR>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=camcircuit;size=500x400")
|
||||
onclose(user, "camcircuit")
|
||||
|
||||
Topic(href, href_list)
|
||||
..()
|
||||
if( href_list["close"] )
|
||||
usr << browse(null, "window=camcircuit")
|
||||
usr.machine = null
|
||||
return
|
||||
else if(href_list["net"])
|
||||
network = href_list["net"]
|
||||
authorised = 0
|
||||
else if( href_list["auth"] )
|
||||
var/mob/M = usr
|
||||
var/obj/item/weapon/card/id/I = M.equipped()
|
||||
if (istype(I, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/pda = I
|
||||
I = pda.id
|
||||
if (I && istype(I))
|
||||
if(access_captain in I.access)
|
||||
authorised = 1
|
||||
else if (possibleNets[network] in I.access)
|
||||
authorised = 1
|
||||
if(istype(I,/obj/item/weapon/card/emag))
|
||||
if(network)
|
||||
var/obj/item/weapon/card/emag/E = I
|
||||
if(E.uses)
|
||||
E.uses--
|
||||
else
|
||||
return
|
||||
authorised = 1
|
||||
usr << "\blue You authorised the circuit network!"
|
||||
updateDialog()
|
||||
else
|
||||
usr << "\blue You must select a camera network circuit!"
|
||||
else if( href_list["removeauth"] )
|
||||
authorised = 0
|
||||
updateDialog()
|
||||
|
||||
updateDialog()
|
||||
if(istype(src.loc,/mob))
|
||||
attack_self(src.loc)
|
||||
@@ -1,75 +0,0 @@
|
||||
|
||||
/obj/machinery/computer/security
|
||||
|
||||
l_color = "#B40000"
|
||||
power_change()
|
||||
..()
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
SetLuminosity(2)
|
||||
else
|
||||
SetLuminosity(0)
|
||||
New()
|
||||
if(network)
|
||||
networks = list(network)
|
||||
else
|
||||
switch(department)
|
||||
if("Security")
|
||||
networks = list("Arrivals","SS13","Engineering","Research","Medbay","Tcomsat","Mess Hall","Security","Prison Wing","Atmospherics","Cargo","Command","Solars","Robotics","Chapel","Hydroponics", "Dormitory","Theatre","Library")
|
||||
if("Engineering")
|
||||
networks = list("Engineering","Tcomsat","Singularity","Atmospherics","Solars","Robotics")
|
||||
if("Research")
|
||||
networks = list("Research","Bomb Testing","Outpost")
|
||||
if("Medbay")
|
||||
networks = list("Medbay")
|
||||
if("Cargo")
|
||||
networks = list("Mine","Cargo")
|
||||
if("Mining")
|
||||
networks = list("Mine")
|
||||
if("Thunderdome")
|
||||
networks = list("thunder")
|
||||
if("CREED")
|
||||
networks = list("CREED")
|
||||
|
||||
/obj/machinery/computer/security/attack_hand(var/mob/user as mob)
|
||||
if (stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
user.machine = src
|
||||
if(src.current)
|
||||
user.reset_view(src.current)
|
||||
|
||||
var/list/L = new/list
|
||||
for (var/obj/machinery/camera/C in world)
|
||||
L.Add(C)
|
||||
|
||||
camera_network_sort(L)
|
||||
|
||||
var/list/D = new()
|
||||
D["Cancel"] = "Cancel"
|
||||
for (var/obj/machinery/camera/C in L)
|
||||
if ( C.network in src.networks )
|
||||
D[text("[]: [][]", C.network, C.c_tag, (C.status ? null : " (Deactivated)"))] = C
|
||||
|
||||
var/t = input(user, "Which camera should you change to?") as null|anything in D
|
||||
|
||||
if(!t)
|
||||
user.machine = null
|
||||
user.reset_view(null)
|
||||
return 0
|
||||
|
||||
var/obj/machinery/camera/C = D[t]
|
||||
|
||||
if (t == "Cancel")
|
||||
user.cancel_camera()
|
||||
return 0
|
||||
|
||||
if (C)
|
||||
if ((get_dist(user, src) > 1 || user.machine != src || user.blinded || !( user.canmove ) || !( C.status )) && (!istype(user, /mob/living/silicon/ai)))
|
||||
return 0
|
||||
else
|
||||
src.current = C
|
||||
use_power(50)
|
||||
user.reset_view(C)
|
||||
|
||||
spawn( 5 )
|
||||
attack_hand(user)
|
||||
@@ -1,5 +1,5 @@
|
||||
/obj/machinery/computer/cloning
|
||||
name = "Cloning console"
|
||||
name = "Cloning Console"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "dna"
|
||||
circuit = "/obj/item/weapon/circuitboard/cloning"
|
||||
@@ -7,12 +7,14 @@
|
||||
var/obj/machinery/dna_scannernew/scanner = null //Linked scanner. For scanning.
|
||||
var/obj/machinery/clonepod/pod1 = null //Linked cloning pod.
|
||||
var/temp = ""
|
||||
var/scantemp = "Scanner unoccupied"
|
||||
var/scantemp = "Scanner ready."
|
||||
var/menu = 1 //Which menu screen to display
|
||||
var/list/records = list()
|
||||
var/datum/dna2/record/active_record = null
|
||||
var/obj/item/weapon/disk/data/diskette = null //Mostly so the geneticist can steal everything.
|
||||
var/loading = 0 // Nice loading text
|
||||
var/autoprocess = 0
|
||||
var/data[0]
|
||||
|
||||
l_color = "#0000FF"
|
||||
|
||||
@@ -23,6 +25,19 @@
|
||||
return
|
||||
return
|
||||
|
||||
/obj/machinery/computer/cloning/process()
|
||||
if(!(scanner && pod1 && autoprocess))
|
||||
return
|
||||
|
||||
if(scanner.occupant && (scanner.scan_level > 2))
|
||||
scan_mob(scanner.occupant)
|
||||
|
||||
if(!(pod1.occupant || pod1.mess) && (pod1.efficiency > 5))
|
||||
for(var/datum/dna2/record/R in src.records)
|
||||
if(!(pod1.occupant || pod1.mess))
|
||||
if(pod1.growclone(R))
|
||||
records.Remove(R)
|
||||
|
||||
/obj/machinery/computer/cloning/proc/updatemodules()
|
||||
src.scanner = findscanner()
|
||||
src.pod1 = findcloner()
|
||||
@@ -65,7 +80,7 @@
|
||||
W.loc = src
|
||||
src.diskette = W
|
||||
user << "You insert [W]."
|
||||
src.updateUsrDialog()
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
else
|
||||
..()
|
||||
@@ -85,118 +100,58 @@
|
||||
return
|
||||
|
||||
updatemodules()
|
||||
ui_interact(user)
|
||||
|
||||
var/dat = "<h3>Cloning System Control</h3>"
|
||||
dat += "<font size=-1><a href='byond://?src=\ref[src];refresh=1'>Refresh</a></font>"
|
||||
/obj/machinery/computer/cloning/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
if(..())
|
||||
return
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
dat += "<br><tt>[temp]</tt><br>"
|
||||
|
||||
switch(src.menu)
|
||||
if(1)
|
||||
// Modules
|
||||
dat += "<h4>Modules</h4>"
|
||||
//dat += "<a href='byond://?src=\ref[src];relmodules=1'>Reload Modules</a>"
|
||||
if (isnull(src.scanner))
|
||||
dat += " <font color=red>Scanner-ERROR</font><br>"
|
||||
else
|
||||
dat += " <font color=green>Scanner-Found!</font><br>"
|
||||
if (isnull(src.pod1))
|
||||
dat += " <font color=red>Pod-ERROR</font><br>"
|
||||
else
|
||||
dat += " <font color=green>Pod-Found!</font><br>"
|
||||
|
||||
// Scanner
|
||||
dat += "<h4>Scanner Functions</h4>"
|
||||
|
||||
if(loading)
|
||||
dat += "<b>Scanning...</b><br>"
|
||||
else
|
||||
dat += "<b>[scantemp]</b><br>"
|
||||
|
||||
if (isnull(src.scanner))
|
||||
dat += "No scanner connected!<br>"
|
||||
else
|
||||
if (src.scanner.occupant)
|
||||
if(scantemp == "Scanner unoccupied") scantemp = "" // Stupid check to remove the text
|
||||
|
||||
dat += "<a href='byond://?src=\ref[src];scan=1'>Scan - [src.scanner.occupant]</a><br>"
|
||||
else
|
||||
scantemp = "Scanner unoccupied"
|
||||
|
||||
dat += "Lock status: <a href='byond://?src=\ref[src];lock=1'>[src.scanner.locked ? "Locked" : "Unlocked"]</a><br>"
|
||||
|
||||
if (!isnull(src.pod1))
|
||||
dat += "Biomass: <i>[src.pod1.biomass]</i><br>"
|
||||
|
||||
// Database
|
||||
dat += "<h4>Database Functions</h4>"
|
||||
dat += "<a href='byond://?src=\ref[src];menu=2'>View Records</a><br>"
|
||||
if (src.diskette)
|
||||
dat += "<a href='byond://?src=\ref[src];disk=eject'>Eject Disk</a>"
|
||||
|
||||
|
||||
if(2)
|
||||
|
||||
// AUTOFIXED BY fix_string_idiocy.py
|
||||
// C:\Users\Rob\Documents\Projects\vgstation13\code\game\machinery\computer\cloning.dm:217: dat += "<h4>Current records</h4>"
|
||||
dat += {"<h4>Current records</h4>
|
||||
<a href='byond://?src=\ref[src];menu=1'>Back</a><br><ul>"}
|
||||
// END AUTOFIX
|
||||
for(var/datum/dna2/record/R in src.records)
|
||||
dat += "<li><a href='byond://?src=\ref[src];view_rec=\ref[R]'>[R.dna.real_name]</a><li>"
|
||||
|
||||
if(3)
|
||||
dat += "<h4>Selected Record</h4>"
|
||||
dat += "<a href='byond://?src=\ref[src];menu=2'>Back</a><br>"
|
||||
|
||||
if (!src.active_record)
|
||||
dat += "<font color=red>ERROR: Record not found.</font>"
|
||||
else
|
||||
// AUTOFIXED BY fix_string_idiocy.py
|
||||
// C:\Users\Rob\Documents\Projects\vgstation13\code\game\machinery\computer\cloning.dm:229: dat += "<br><font size=1><a href='byond://?src=\ref[src];del_rec=1'>Delete Record</a></font><br>"
|
||||
dat += {"<br><font size=1><a href='byond://?src=\ref[src];del_rec=1'>Delete Record</a></font><br>
|
||||
<b>Name:</b> [src.active_record.dna.real_name]<br>"}
|
||||
// END AUTOFIX
|
||||
var/obj/item/weapon/implant/health/H = null
|
||||
if(src.active_record.implant)
|
||||
H=locate(src.active_record.implant)
|
||||
|
||||
if ((H) && (istype(H)))
|
||||
dat += "<b>Health:</b> [H.sensehealth()] | OXY-BURN-TOX-BRUTE<br>"
|
||||
else
|
||||
dat += "<font color=red>Unable to locate implant.</font><br>"
|
||||
|
||||
if (!isnull(src.diskette))
|
||||
dat += "<a href='byond://?src=\ref[src];disk=load'>Load from disk.</a>"
|
||||
|
||||
dat += " | Save: <a href='byond://?src=\ref[src];save_disk=ue'>UI + UE</a>"
|
||||
dat += " | Save: <a href='byond://?src=\ref[src];save_disk=ui'>UI</a>"
|
||||
dat += " | Save: <a href='byond://?src=\ref[src];save_disk=se'>SE</a>"
|
||||
dat += "<br>"
|
||||
else
|
||||
dat += "<br>" //Keeping a line empty for appearances I guess.
|
||||
|
||||
dat += {"<b>UI:</b> [src.active_record.dna.uni_identity]<br>
|
||||
<b>SE:</b> [src.active_record.dna.struc_enzymes]<br><br>"}
|
||||
|
||||
if(pod1 && pod1.biomass >= CLONE_BIOMASS)
|
||||
dat += {"<a href='byond://?src=\ref[src];clone=\ref[src.active_record]'>Clone</a><br>"}
|
||||
else
|
||||
dat += {"<b>Unsufficient biomass</b><br>"}
|
||||
|
||||
if(4)
|
||||
if (!src.active_record)
|
||||
src.menu = 2
|
||||
dat = "[src.temp]<br>"
|
||||
dat += "<h4>Confirm Record Deletion</h4>"
|
||||
|
||||
dat += "<b><a href='byond://?src=\ref[src];del_rec=1'>Scan card to confirm.</a></b><br>"
|
||||
dat += "<b><a href='byond://?src=\ref[src];menu=3'>No</a></b>"
|
||||
|
||||
|
||||
user << browse(dat, "window=cloning")
|
||||
onclose(user, "cloning")
|
||||
return
|
||||
data["menu"] = src.menu
|
||||
data["scanner"] = src.scanner
|
||||
data["pod"] = src.pod1
|
||||
data["loading"] = loading
|
||||
data["autoprocess"] = autoprocess
|
||||
if(scanner && pod1 && ((scanner.scan_level > 2) || (pod1.efficiency > 5)))
|
||||
data["autoallowed"] = 1
|
||||
else
|
||||
data["autoallowed"] = 0
|
||||
data["occupant"] = src.scanner.occupant
|
||||
data["locked"] = src.scanner.locked
|
||||
data["biomass"] = src.pod1.biomass
|
||||
data["temp"] = temp
|
||||
data["scantemp"] = scantemp
|
||||
data["disk"] = src.diskette
|
||||
var/list/temprecords[0]
|
||||
for(var/datum/dna2/record/R in src.records)
|
||||
var tempRealName = R.dna.real_name
|
||||
temprecords.Add(list(list("record" = "\ref[R]", "realname" = tempRealName)))
|
||||
data["records"] = temprecords
|
||||
|
||||
if(src.menu == 3)
|
||||
if (src.active_record)
|
||||
data["activerecord"] = "\ref[src.active_record]"
|
||||
var/obj/item/weapon/implant/health/H = null
|
||||
if(src.active_record.implant)
|
||||
H = locate(src.active_record.implant)
|
||||
|
||||
if ((H) && (istype(H)))
|
||||
data["health"] = H.sensehealth()
|
||||
data["realname"] = src.active_record.dna.real_name
|
||||
data["unidentity"] = src.active_record.dna.uni_identity
|
||||
data["strucenzymes"] = src.active_record.dna.struc_enzymes
|
||||
if(pod1 && pod1.biomass >= CLONE_BIOMASS)
|
||||
data["enoughbiomass"] = 1
|
||||
else
|
||||
data["enougbiomass"] = 0
|
||||
|
||||
// Set up the Nano UI
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "cloning_console.tmpl", "Cloning Console UI", 640, 480)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/cloning/Topic(href, href_list)
|
||||
if(..())
|
||||
@@ -206,42 +161,52 @@
|
||||
return
|
||||
|
||||
if ((href_list["scan"]) && (!isnull(src.scanner)))
|
||||
scantemp = ""
|
||||
scantemp = "Scanner ready."
|
||||
|
||||
loading = 1
|
||||
src.updateUsrDialog()
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
spawn(20)
|
||||
src.scan_mob(src.scanner.occupant)
|
||||
|
||||
loading = 0
|
||||
src.updateUsrDialog()
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
if(href_list["task"])
|
||||
switch(href_list["task"])
|
||||
if("autoprocess")
|
||||
autoprocess = 1
|
||||
nanomanager.update_uis(src)
|
||||
if("stopautoprocess")
|
||||
autoprocess = 0
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
//No locking an open scanner.
|
||||
//No locking an open scanner.
|
||||
else if ((href_list["lock"]) && (!isnull(src.scanner)))
|
||||
if ((!src.scanner.locked) && (src.scanner.occupant))
|
||||
src.scanner.locked = 1
|
||||
else
|
||||
src.scanner.locked = 0
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
else if (href_list["view_rec"])
|
||||
src.active_record = locate(href_list["view_rec"])
|
||||
if(istype(src.active_record,/datum/dna2/record))
|
||||
if ((isnull(src.active_record.ckey)))
|
||||
del(src.active_record)
|
||||
src.temp = "ERROR: Record Corrupt"
|
||||
src.temp = "<span class=\"bad\">Error: Record corrupt.</span>"
|
||||
else
|
||||
src.menu = 3
|
||||
else
|
||||
src.active_record = null
|
||||
src.temp = "Record missing."
|
||||
src.temp = "<span class=\"bad\">Error: Record missing.</span>"
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
else if (href_list["del_rec"])
|
||||
if ((!src.active_record) || (src.menu < 3))
|
||||
return
|
||||
if (src.menu == 3) //If we are viewing a record, confirm deletion
|
||||
src.temp = "Delete record?"
|
||||
src.temp = "Please confirm that you want to delete the record?"
|
||||
src.menu = 4
|
||||
|
||||
else if (src.menu == 4)
|
||||
@@ -253,33 +218,36 @@
|
||||
src.temp = "Record deleted."
|
||||
src.menu = 2
|
||||
else
|
||||
src.temp = "Access Denied."
|
||||
src.temp = "<span class=\"bad\">Error: Access denied.</span>"
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
else if (href_list["disk"]) //Load or eject.
|
||||
switch(href_list["disk"])
|
||||
if("load")
|
||||
if ((isnull(src.diskette)) || isnull(src.diskette.buf))
|
||||
src.temp = "Load error."
|
||||
src.updateUsrDialog()
|
||||
src.temp = "<span class=\"bad\">Error: The disk's data could not be read.</span>"
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
if (isnull(src.active_record))
|
||||
src.temp = "Record error."
|
||||
src.temp = "<span class=\"bad\">Error: No active record was found.</span>"
|
||||
src.menu = 1
|
||||
src.updateUsrDialog()
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
|
||||
src.active_record = src.diskette.buf
|
||||
|
||||
src.temp = "Load successful."
|
||||
nanomanager.update_uis(src)
|
||||
if("eject")
|
||||
if (!isnull(src.diskette))
|
||||
src.diskette.loc = src.loc
|
||||
src.diskette = null
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
else if (href_list["save_disk"]) //Save to disk!
|
||||
if ((isnull(src.diskette)) || (src.diskette.read_only) || (isnull(src.active_record)))
|
||||
src.temp = "Save error."
|
||||
src.updateUsrDialog()
|
||||
src.temp = "<span class=\"bad\">Error: The data could not be saved.</span>"
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
|
||||
// DNA2 makes things a little simpler.
|
||||
@@ -294,33 +262,32 @@
|
||||
src.diskette.buf.types=DNA2_BUF_SE
|
||||
src.diskette.name = "data disk - '[src.active_record.dna.real_name]'"
|
||||
src.temp = "Save \[[href_list["save_disk"]]\] successful."
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
else if (href_list["refresh"])
|
||||
src.updateUsrDialog()
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
else if (href_list["clone"])
|
||||
else if (href_list["clone"])
|
||||
var/datum/dna2/record/C = locate(href_list["clone"])
|
||||
//Look for that player! They better be dead!
|
||||
if(istype(C))
|
||||
if(C)
|
||||
//Can't clone without someone to clone. Or a pod. Or if the pod is busy. Or full of gibs.
|
||||
if(!pod1)
|
||||
temp = "Error: No Clonepod detected."
|
||||
temp = "<span class=\"bad\">Error: No cloning pod detected.</span>"
|
||||
else if(pod1.occupant)
|
||||
temp = "Error: Clonepod is currently occupied."
|
||||
temp = "<span class=\"bad\">Error: The cloning pod is currently occupied.</span>"
|
||||
else if(pod1.biomass < CLONE_BIOMASS)
|
||||
temp = "Error: Not enough biomass."
|
||||
temp = "<span class=\"bad\">Error: Not enough biomass.</span>"
|
||||
else if(pod1.mess)
|
||||
temp = "Error: Clonepod malfunction."
|
||||
temp = "<span class=\"bad\">Error: The cloning pod is malfunctioning.</span>"
|
||||
else if(!config.revival_cloning)
|
||||
temp = "Error: Unable to initiate cloning cycle."
|
||||
|
||||
temp = "<span class=\"bad\">Error: Unable to initiate cloning cycle.</span>"
|
||||
else if(pod1.growclone(C))
|
||||
temp = "Initiating cloning cycle..."
|
||||
records.Remove(C)
|
||||
del(C)
|
||||
menu = 1
|
||||
else
|
||||
|
||||
var/mob/selected = find_dead_player("[C.ckey]")
|
||||
selected << 'sound/machines/chime.ogg' //probably not the best sound but I think it's reasonable
|
||||
var/answer = alert(selected,"Do you want to return to life?","Cloning","Yes","No")
|
||||
@@ -330,36 +297,45 @@
|
||||
del(C)
|
||||
menu = 1
|
||||
else
|
||||
temp = "Initiating cloning cycle...<br>Error: Post-initialisation failed. Cloning cycle aborted."
|
||||
temp = "Initiating cloning cycle...<br /><span class=\"bad\">Error: Post-initialisation failed. Cloning cycle aborted.</span>"
|
||||
|
||||
else
|
||||
temp = "Error: Data corruption."
|
||||
temp = "<span class=\"bad\">Error: Data corruption.</span>"
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
else if (href_list["menu"])
|
||||
src.menu = text2num(href_list["menu"])
|
||||
temp = ""
|
||||
scantemp = "Scanner ready."
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
src.updateUsrDialog()
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
|
||||
/obj/machinery/computer/cloning/proc/scan_mob(mob/living/carbon/human/subject as mob)
|
||||
if ((isnull(subject)) || (!(ishuman(subject))) || (!subject.dna) || (subject.species.flags & NO_SCAN))
|
||||
scantemp = "Error: Unable to locate valid genetic data."
|
||||
scantemp = "<span class=\"bad\">Error: Unable to locate valid genetic data.</span>"
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
if (subject.brain_op_stage == 4.0)
|
||||
scantemp = "Error: No signs of intelligence detected."
|
||||
scantemp = "<span class=\"bad\">Error: No signs of intelligence detected.</span>"
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
if (subject.suiciding == 1)
|
||||
scantemp = "Error: Subject's brain is not responding to scanning stimuli."
|
||||
if (subject.suiciding == 1 && src.scanner.scan_level < 2)
|
||||
scantemp = "<span class=\"bad\">Error: Subject's brain is not responding to scanning stimuli.</span>"
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
if ((!subject.ckey) || (!subject.client))
|
||||
scantemp = "Error: Mental interface failure."
|
||||
scantemp = "<span class=\"bad\">Error: Mental interface failure.</span>"
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
if (M_NOCLONE in subject.mutations)
|
||||
scantemp = "Error: Mental interface failure."
|
||||
if ((M_NOCLONE in subject.mutations) && src.scanner.scan_level < 2)
|
||||
scantemp = "<span class=\"bad\">Error: Mental interface failure.</span>"
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
if (!isnull(find_record(subject.ckey)))
|
||||
scantemp = "Subject already in database."
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
|
||||
subject.dna.check_integrity()
|
||||
@@ -387,6 +363,7 @@
|
||||
|
||||
src.records += R
|
||||
scantemp = "Subject successfully scanned."
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
//Find a specific record by key.
|
||||
/obj/machinery/computer/cloning/proc/find_record(var/find_key)
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
name = "Telepad Control Console"
|
||||
desc = "Used to teleport objects to and from the telescience telepad."
|
||||
icon_state = "teleport-sci"
|
||||
|
||||
// VARIABLES //
|
||||
circuit = "/obj/item/weapon/circuitboard/telesci_console"
|
||||
var/teles_left // How many teleports left until it becomes uncalibrated
|
||||
var/x_off // X offset
|
||||
var/y_off // Y offset
|
||||
@@ -12,8 +11,10 @@
|
||||
var/z_co // Z coordinate
|
||||
var/trueX // X + offset
|
||||
var/trueY // Y + offset
|
||||
var/obj/machinery/telepad
|
||||
var/obj/machinery/telepad/telepad
|
||||
var/tele_id = "Telesci"
|
||||
var/obj/item/device/sps/inserted_sps
|
||||
var/last_target
|
||||
|
||||
/obj/machinery/computer/telescience/update_icon()
|
||||
if(stat & BROKEN)
|
||||
@@ -25,6 +26,12 @@
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
stat &= ~NOPOWER
|
||||
|
||||
/obj/machinery/computer/telescience/Destroy()
|
||||
if(inserted_sps)
|
||||
inserted_sps.loc = loc
|
||||
inserted_sps = null
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/telescience/attack_paw(mob/user)
|
||||
usr << "You are too primitive to use this computer."
|
||||
@@ -54,11 +61,12 @@
|
||||
data["coordx"] = x_co
|
||||
data["coordy"] = y_co
|
||||
data["coordz"] = z_co
|
||||
data["sps"] = inserted_sps
|
||||
|
||||
// Set up the Nano UI
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "telescience_console.tmpl", "Telescience Console UI", 640, 480)
|
||||
ui = new(user, src, ui_key, "telescience_console.tmpl", "Telescience Console UI", 640, 300)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
@@ -110,7 +118,10 @@
|
||||
|
||||
/obj/machinery/computer/telescience/proc/teleprep(var/type)
|
||||
if(!telepad)
|
||||
usr << "\red Error: no associated telepad. Please recalibrate and try again."
|
||||
usr << "\red Error: No associated telepad. Please recalibrate and try again."
|
||||
return
|
||||
if(telepad.panel_open)
|
||||
usr << "\red Error: The telepad can not be used while in maintenance mode."
|
||||
return
|
||||
var/numpick
|
||||
var/failure = checkFail()
|
||||
@@ -119,7 +130,7 @@
|
||||
telefail(numpick)
|
||||
return
|
||||
if(teles_left > 0)
|
||||
if(prob(75))
|
||||
if(prob(70 + (5 * telepad.efficiency)))
|
||||
teles_left -= 1
|
||||
tele(type)
|
||||
if(teles_left == 0)
|
||||
@@ -127,7 +138,7 @@
|
||||
O.show_message("\red The telepad has become uncalibrated.", 2)
|
||||
return
|
||||
else
|
||||
if(prob(35))
|
||||
if(prob(25 + (10 * telepad.efficiency)))
|
||||
tele(type)
|
||||
else
|
||||
numpick = pick(1,1,1,2,2,3,4)
|
||||
@@ -142,6 +153,7 @@
|
||||
trueX = (x_co + x_off)
|
||||
trueY = (y_co + y_off)
|
||||
var/target = locate(trueX, trueY, z_co)
|
||||
last_target = target
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, tele)
|
||||
s.start()
|
||||
@@ -187,32 +199,50 @@
|
||||
if(x_co == "" || x_co == "Unset")
|
||||
usr << "\red Error: set X coordinate."
|
||||
fail = 1
|
||||
return fail
|
||||
if(y_co == "" || y_co == "Unset")
|
||||
usr << "\red Error: set Y coordinate."
|
||||
fail = 1
|
||||
return fail
|
||||
if(z_co == "" || z_co == "Unset")
|
||||
usr << "\red Error: set Z coordinate."
|
||||
fail = 1
|
||||
return fail
|
||||
if(x_co < 11 || x_co > 245)
|
||||
usr << "\red Error: X is less than 11 or greater than 245."
|
||||
fail = 1
|
||||
return fail
|
||||
if(y_co < 11 || y_co > 245)
|
||||
usr << "\red Error: Y is less than 11 or greater than 245."
|
||||
fail = 1
|
||||
return fail
|
||||
if(z_co == 2 || z_co < 1 || z_co > 6)
|
||||
if (z_co == 7 & src.emagged == 1)
|
||||
// This should be empty, allows for it to continue if the z-level is 7 and the machine is emagged.
|
||||
else
|
||||
usr << "\red Error: Z is less than 1, greater than [src.emagged ? "7" : "6"], or equal to 2."
|
||||
fail = 1
|
||||
return fail
|
||||
if(istype(get_area(locate(x_co,y_co,z_co)), /area/security/armoury/gamma))
|
||||
usr << "\red Error: Attempting to access telescience-protected area."
|
||||
fail = 1
|
||||
return fail
|
||||
return fail
|
||||
|
||||
/obj/machinery/computer/telescience/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if(href_list["ejectSPS"])
|
||||
inserted_sps.loc = loc
|
||||
inserted_sps = null
|
||||
nanomanager.update_uis(src)
|
||||
if(href_list["setMemory"])
|
||||
if(last_target)
|
||||
inserted_sps.locked_location = last_target
|
||||
usr << "\blue Location saved."
|
||||
else
|
||||
usr << "\red Error: No data stored."
|
||||
nanomanager.update_uis(src)
|
||||
if(href_list["setx"])
|
||||
var/a = input("Please input desired X coordinate.", name, x_co) as num
|
||||
a = copytext(sanitize(a), 1, 20)
|
||||
@@ -247,6 +277,8 @@
|
||||
for(var/obj/machinery/telepad/T in range(src,10))
|
||||
telepad = T
|
||||
if(!telepad)
|
||||
usr << "\red Error: No telepads in range were found."
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
var/teleturf = get_turf(telepad)
|
||||
teles_left = rand(8,12)
|
||||
@@ -259,12 +291,25 @@
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
|
||||
/obj/machinery/computer/telescience/attackby(I as obj, user as mob) // Emagging
|
||||
/obj/machinery/computer/telescience/attackby(I as obj, var/mob/user as mob) // Emagging
|
||||
if(istype(I,/obj/item/weapon/card/emag))
|
||||
if (src.emagged == 0)
|
||||
user << "\blue You scramble the Telescience authentication key to an unknown signal. You should be able to teleport to more places now!"
|
||||
src.emagged = 1
|
||||
else
|
||||
user << "\red The machine seems unaffected by the card swipe..."
|
||||
else if(istype(I, /obj/item/device/sps))
|
||||
if(!inserted_sps)
|
||||
inserted_sps = I
|
||||
user.before_take_item(I)
|
||||
inserted_sps.loc = src
|
||||
user.visible_message("<span class='notice'>You insert [I] into the SPS device slot.</span>")
|
||||
attack_hand(user)
|
||||
else if(istype(I, /obj/item/device/multitool))
|
||||
var/obj/item/device/multitool/M = I
|
||||
if(M.buffer && istype(M.buffer, /obj/machinery/telepad))
|
||||
telepad = M.buffer
|
||||
M.buffer = null
|
||||
user << "<span class='caution'>You upload the data from [I]'s buffer.</span>"
|
||||
else
|
||||
return attack_hand(user)
|
||||
..()
|
||||
@@ -10,247 +10,356 @@
|
||||
var/obj/item/weapon/circuitboard/circuit = null
|
||||
var/list/components = null
|
||||
var/list/req_components = null
|
||||
var/list/req_component_names = null
|
||||
var/list/req_component_names = null // user-friendly names of components
|
||||
var/state = 1
|
||||
|
||||
|
||||
// For pods
|
||||
var/list/connected_parts = list()
|
||||
var/pattern_idx=0
|
||||
|
||||
proc/update_desc()
|
||||
var/D
|
||||
if(req_components)
|
||||
D = "Requires "
|
||||
var/first = 1
|
||||
for(var/I in req_components)
|
||||
if(req_components[I] > 0)
|
||||
D += "[first?"":", "][num2text(req_components[I])] [req_component_names[I]]"
|
||||
first = 0
|
||||
if(first) // nothing needs to be added, then
|
||||
D += "nothing"
|
||||
D += "."
|
||||
desc = D
|
||||
// unfortunately, we have to instance the objects really quickly to get the names
|
||||
// fortunately, this is only called once when the board is added and the items are immediately GC'd
|
||||
// and none of the parts do much in their constructors
|
||||
/obj/machinery/constructable_frame/proc/update_namelist()
|
||||
if(!req_components)
|
||||
return
|
||||
|
||||
/obj/machinery/constructable_frame/machine_frame
|
||||
req_component_names = new()
|
||||
for(var/tname in req_components)
|
||||
var/path = tname
|
||||
var/obj/O = new path()
|
||||
req_component_names[tname] = O.name
|
||||
|
||||
proc/find_square()
|
||||
// This is fucking stupid but what the hell.
|
||||
/obj/machinery/constructable_frame/proc/find_square()
|
||||
// This is fucking stupid but what the hell.
|
||||
|
||||
// This corresponds to indicies from alldirs.
|
||||
// 1 2 3 4 5 6 7 8
|
||||
// var/list/alldirs = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
|
||||
var/valid_patterns=list(
|
||||
list(1,3,5), //SW - NORTH,EAST,NORTHEAST
|
||||
list(2,3,7), //NW - SOUTH,EAST,SOUTHEAST
|
||||
list(1,4,6), //SE - NORTH,WEST,NORTHWEST
|
||||
list(2,4,8) //NE - SOUTH,WEST,SOUTHWEST
|
||||
)
|
||||
var/detected_parts[8]
|
||||
var/tally=0
|
||||
var/turf/T
|
||||
var/obj/machinery/constructable_frame/machine_frame/friend
|
||||
for(var/i=1;i<=8;i++)
|
||||
T=get_step(src.loc,alldirs[i])
|
||||
friend = locate() in T
|
||||
if(friend)
|
||||
detected_parts[i]=friend
|
||||
tally++
|
||||
// Need at least 3 connections to make a square
|
||||
if(tally<3)
|
||||
return
|
||||
// Find stuff in the patterns indicated
|
||||
for(var/i=1;i<=4;i++)
|
||||
var/list/scanidxs=valid_patterns[i]
|
||||
var/list/new_connected=list()
|
||||
var/allfound=1
|
||||
for(var/diridx in scanidxs)
|
||||
if(detected_parts[diridx]==null)
|
||||
allfound=0
|
||||
break
|
||||
new_connected.Add(detected_parts[diridx])
|
||||
if(allfound)
|
||||
connected_parts=new_connected
|
||||
pattern_idx=i
|
||||
return 1
|
||||
return 0
|
||||
// This corresponds to indicies from alldirs.
|
||||
// 1 2 3 4 5 6 7 8
|
||||
// var/list/alldirs = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
|
||||
var/valid_patterns=list(
|
||||
list(1,3,5), //SW - NORTH,EAST,NORTHEAST
|
||||
list(2,3,7), //NW - SOUTH,EAST,SOUTHEAST
|
||||
list(1,4,6), //SE - NORTH,WEST,NORTHWEST
|
||||
list(2,4,8) //NE - SOUTH,WEST,SOUTHWEST
|
||||
)
|
||||
var/detected_parts[8]
|
||||
var/tally=0
|
||||
var/turf/T
|
||||
var/obj/machinery/constructable_frame/machine_frame/friend
|
||||
for(var/i=1;i<=8;i++)
|
||||
T=get_step(src.loc,alldirs[i])
|
||||
friend = locate() in T
|
||||
if(friend)
|
||||
detected_parts[i]=friend
|
||||
tally++
|
||||
// Need at least 3 connections to make a square
|
||||
if(tally<3)
|
||||
return
|
||||
// Find stuff in the patterns indicated
|
||||
for(var/i=1;i<=4;i++)
|
||||
var/list/scanidxs=valid_patterns[i]
|
||||
var/list/new_connected=list()
|
||||
var/allfound=1
|
||||
for(var/diridx in scanidxs)
|
||||
if(detected_parts[diridx]==null)
|
||||
allfound=0
|
||||
break
|
||||
new_connected.Add(detected_parts[diridx])
|
||||
if(allfound)
|
||||
connected_parts=new_connected
|
||||
pattern_idx=i
|
||||
return 1
|
||||
return 0
|
||||
|
||||
// update description of required components remaining
|
||||
/obj/machinery/constructable_frame/proc/update_req_desc()
|
||||
if(!req_components || !req_component_names)
|
||||
return
|
||||
|
||||
attackby(obj/item/P as obj, mob/user as mob)
|
||||
if(P.crit_fail)
|
||||
user << "\red This part is faulty, you cannot add this to the machine!"
|
||||
return
|
||||
switch(state)
|
||||
if(1)
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = P
|
||||
if(C.amount >= 5)
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
user << "\blue You start to add cables to the frame."
|
||||
if(do_after(user, 20))
|
||||
if(C)
|
||||
C.amount -= 5
|
||||
if(!C.amount) del(C)
|
||||
user << "\blue You add cables to the frame."
|
||||
state = 2
|
||||
icon_state = "box_1"
|
||||
/*
|
||||
else if(istype(P, /obj/item/stack/sheet/glass))
|
||||
var/obj/item/stack/sheet/glass/G=P
|
||||
if(G.amount<1)
|
||||
user << "\red How...?"
|
||||
return
|
||||
G.use(1)
|
||||
user << "\blue You add the glass to the frame."
|
||||
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
new /obj/structure/displaycase_frame(src.loc)
|
||||
del(src)
|
||||
return*/
|
||||
else if(istype(P, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/R=P
|
||||
if(R.amount<10)
|
||||
user << "\red You need 10 rods to assemble a pod frame."
|
||||
return
|
||||
if(!find_square())
|
||||
user << "\red You cannot assemble a pod frame without a 2x2 square of machine frames."
|
||||
return
|
||||
var/hasContent = 0
|
||||
desc = "Requires"
|
||||
for(var/i = 1 to req_components.len)
|
||||
var/tname = req_components[i]
|
||||
var/amt = req_components[tname]
|
||||
if(amt == 0)
|
||||
continue
|
||||
var/use_and = i == req_components.len
|
||||
desc += "[(hasContent ? (use_and ? ", and" : ",") : "")] [amt] [amt == 1 ? req_component_names[tname] : "[req_component_names[tname]]\s"]"
|
||||
hasContent = 1
|
||||
|
||||
R.use(10)
|
||||
if(!hasContent)
|
||||
desc = "Does not require any more components."
|
||||
else
|
||||
desc += "."
|
||||
|
||||
for(var/obj/machinery/constructable_frame/machine_frame/F in connected_parts)
|
||||
qdel(F)
|
||||
|
||||
var/turf/T=get_turf(src)
|
||||
// Offset frame (if needed) so it doesn't look wonky when it spawns.
|
||||
switch(pattern_idx)
|
||||
if(2)
|
||||
T=get_step(T,SOUTH)
|
||||
if(3)
|
||||
T=get_step(T,WEST)
|
||||
if(4)
|
||||
T=get_step(T,SOUTHWEST)
|
||||
|
||||
new /obj/structure/spacepod_frame(T)
|
||||
user << "\blue You assemble the pod frame."
|
||||
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
qdel(src)
|
||||
/obj/machinery/constructable_frame/machine_frame/attackby(obj/item/P as obj, mob/user as mob)
|
||||
if(P.crit_fail)
|
||||
user << "<span class='danger'>This part is faulty, you cannot add this to the machine!</span>"
|
||||
return
|
||||
switch(state)
|
||||
if(1)
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = P
|
||||
if(C.amount >= 5)
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
user << "<span class='notice'>You start to add cables to the frame.</span>"
|
||||
if(do_after(user, 20))
|
||||
if(C.amount >= 5 && state == 1)
|
||||
C.use(5)
|
||||
user << "<span class='notice'>You add cables to the frame.</span>"
|
||||
state = 2
|
||||
icon_state = "box_1"
|
||||
else
|
||||
user << "<span class='warning'>You need five length of cable to wire the frame.</span>"
|
||||
return
|
||||
else if(istype(P, /obj/item/stack/sheet/glass))
|
||||
var/obj/item/stack/sheet/glass/G = P
|
||||
if(G.amount<5)
|
||||
user << "\red You do not have enough glass to build a display case."
|
||||
return
|
||||
G.use(5)
|
||||
user << "\blue You add the glass to the frame."
|
||||
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
new /obj/structure/displaycase_frame(src.loc)
|
||||
del(src)
|
||||
return
|
||||
else if(istype(P, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/R=P
|
||||
if(R.amount<10)
|
||||
user << "\red You need 10 rods to assemble a pod frame."
|
||||
return
|
||||
if(!find_square())
|
||||
user << "\red You cannot assemble a pod frame without a 2x2 square of machine frames."
|
||||
return
|
||||
|
||||
R.use(10)
|
||||
|
||||
for(var/obj/machinery/constructable_frame/machine_frame/F in connected_parts)
|
||||
qdel(F)
|
||||
|
||||
var/turf/T=get_turf(src)
|
||||
// Offset frame (if needed) so it doesn't look wonky when it spawns.
|
||||
switch(pattern_idx)
|
||||
if(2)
|
||||
T=get_step(T,SOUTH)
|
||||
if(3)
|
||||
T=get_step(T,WEST)
|
||||
if(4)
|
||||
T=get_step(T,SOUTHWEST)
|
||||
|
||||
new /obj/structure/spacepod_frame(T)
|
||||
user << "\blue You assemble the pod frame."
|
||||
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
qdel(src)
|
||||
return
|
||||
if(istype(P, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
user << "<span class='notice'>You dismantle the frame.</span>"
|
||||
new /obj/item/stack/sheet/metal(src.loc, 5)
|
||||
qdel(src)
|
||||
if(2)
|
||||
if(istype(P, /obj/item/weapon/circuitboard))
|
||||
var/obj/item/weapon/circuitboard/B = P
|
||||
if(B.board_type == "machine")
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
user << "<span class='notice'>You add the circuit board to the frame.</span>"
|
||||
circuit = P
|
||||
user.drop_item()
|
||||
P.loc = src
|
||||
icon_state = "box_2"
|
||||
state = 3
|
||||
components = list()
|
||||
req_components = circuit.req_components.Copy()
|
||||
update_namelist()
|
||||
update_req_desc()
|
||||
else
|
||||
if(istype(P, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
user << "\blue You dismantle the frame"
|
||||
new /obj/item/stack/sheet/metal(src.loc, 5)
|
||||
del(src)
|
||||
if(2)
|
||||
if(istype(P, /obj/item/weapon/circuitboard))
|
||||
var/obj/item/weapon/circuitboard/B = P
|
||||
if(B.board_type == "machine")
|
||||
user << "<span class='danger'>This frame does not accept circuit boards of this type!</span>"
|
||||
if(istype(P, /obj/item/weapon/wirecutters))
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
user << "<span class='notice'>You remove the cables.</span>"
|
||||
state = 1
|
||||
icon_state = "box_0"
|
||||
var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil(src.loc,5)
|
||||
A.amount = 5
|
||||
|
||||
if(3)
|
||||
if(istype(P, /obj/item/weapon/crowbar))
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
state = 2
|
||||
circuit.loc = src.loc
|
||||
circuit = null
|
||||
if(components.len == 0)
|
||||
user << "<span class='notice'>You remove the circuit board.</span>"
|
||||
else
|
||||
user << "<span class='notice'>You remove the circuit board and other components.</span>"
|
||||
for(var/obj/item/weapon/W in components)
|
||||
W.loc = src.loc
|
||||
desc = initial(desc)
|
||||
req_components = null
|
||||
components = null
|
||||
icon_state = "box_1"
|
||||
|
||||
if(istype(P, /obj/item/weapon/screwdriver))
|
||||
var/component_check = 1
|
||||
for(var/R in req_components)
|
||||
if(req_components[R] > 0)
|
||||
component_check = 0
|
||||
break
|
||||
if(component_check)
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
var/obj/machinery/new_machine = new src.circuit.build_path(src.loc)
|
||||
for(var/obj/O in new_machine.component_parts)
|
||||
qdel(O)
|
||||
new_machine.component_parts = list()
|
||||
for(var/obj/O in src)
|
||||
O.loc = null
|
||||
new_machine.component_parts += O
|
||||
circuit.loc = null
|
||||
new_machine.RefreshParts()
|
||||
qdel(src)
|
||||
|
||||
if(istype(P, /obj/item))
|
||||
var/success
|
||||
for(var/I in req_components)
|
||||
if(istype(P, I) && (req_components[I] > 0))
|
||||
success=1
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
user << "\blue You add the circuit board to the frame."
|
||||
circuit = P
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/CP = P
|
||||
var/camt = min(CP.amount, req_components[I])
|
||||
var/obj/item/stack/cable_coil/CC = new /obj/item/stack/cable_coil(src)
|
||||
CC.amount = camt
|
||||
CC.update_icon()
|
||||
CP.use(camt)
|
||||
components += CC
|
||||
req_components[I] -= camt
|
||||
update_req_desc()
|
||||
break
|
||||
user.drop_item()
|
||||
P.loc = src
|
||||
icon_state = "box_2"
|
||||
state = 3
|
||||
components = list()
|
||||
req_components = circuit.req_components.Copy()
|
||||
for(var/A in circuit.req_components)
|
||||
req_components[A] = circuit.req_components[A]
|
||||
req_component_names = circuit.req_components.Copy()
|
||||
for(var/A in req_components)
|
||||
var/cp = text2path(A)
|
||||
var/obj/ct = new cp() // have to quickly instantiate it get name
|
||||
req_component_names[A] = ct.name
|
||||
if(circuit.frame_desc)
|
||||
desc = circuit.frame_desc
|
||||
else
|
||||
update_desc()
|
||||
user << desc
|
||||
else
|
||||
user << "\red This frame does not accept circuit boards of this type!"
|
||||
else
|
||||
if(istype(P, /obj/item/weapon/wirecutters))
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
user << "\blue You remove the cables."
|
||||
state = 1
|
||||
icon_state = "box_0"
|
||||
var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( src.loc )
|
||||
A.amount = 5
|
||||
|
||||
if(3)
|
||||
if(istype(P, /obj/item/weapon/crowbar))
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
state = 2
|
||||
circuit.loc = src.loc
|
||||
circuit = null
|
||||
if(components.len == 0)
|
||||
user << "\blue You remove the circuit board."
|
||||
else
|
||||
user << "\blue You remove the circuit board and other components."
|
||||
for(var/obj/item/weapon/W in components)
|
||||
W.loc = src.loc
|
||||
desc = initial(desc)
|
||||
req_components = null
|
||||
components = null
|
||||
icon_state = "box_1"
|
||||
else
|
||||
if(istype(P, /obj/item/weapon/screwdriver))
|
||||
var/component_check = 1
|
||||
for(var/R in req_components)
|
||||
if(req_components[R] > 0)
|
||||
component_check = 0
|
||||
break
|
||||
if(component_check)
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
var/obj/machinery/new_machine = new src.circuit.build_path(src.loc)
|
||||
for(var/obj/O in new_machine.component_parts)
|
||||
del(O)
|
||||
new_machine.component_parts = list()
|
||||
for(var/obj/O in src)
|
||||
if(circuit.contain_parts) // things like disposal don't want their parts in them
|
||||
O.loc = new_machine
|
||||
else
|
||||
O.loc = null
|
||||
new_machine.component_parts += O
|
||||
if(circuit.contain_parts)
|
||||
circuit.loc = new_machine
|
||||
else
|
||||
circuit.loc = null
|
||||
new_machine.RefreshParts()
|
||||
del(src)
|
||||
else
|
||||
if(istype(P, /obj/item))
|
||||
for(var/I in req_components)
|
||||
if(istype(P, text2path(I)) && (req_components[I] > 0))
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/CP = P
|
||||
if(CP.amount > 1)
|
||||
var/camt = min(CP.amount, req_components[I]) // amount of cable to take, idealy amount required, but limited by amount provided
|
||||
var/obj/item/stack/cable_coil/CC = new /obj/item/stack/cable_coil(src)
|
||||
CC.amount = camt
|
||||
CC.update_icon()
|
||||
CP.use(camt)
|
||||
components += CC
|
||||
req_components[I] -= camt
|
||||
update_desc()
|
||||
break
|
||||
user.drop_item()
|
||||
P.loc = src
|
||||
components += P
|
||||
req_components[I]--
|
||||
update_desc()
|
||||
break
|
||||
user << desc
|
||||
if(P && P.loc != src && !istype(P, /obj/item/stack/cable_coil))
|
||||
user << "\red You cannot add that component to the machine!"
|
||||
|
||||
|
||||
components += P
|
||||
req_components[I]--
|
||||
update_req_desc()
|
||||
return 1
|
||||
if(!success)
|
||||
user << "<span class='danger'>You cannot add that to the machine!</span>"
|
||||
return 0
|
||||
|
||||
//Machine Frame Circuit Boards
|
||||
/*Common Parts: Parts List: Ignitor, Timer, Infra-red laser, Infra-red sensor, t_scanner, Capacitor, Valve, sensor unit,
|
||||
micro-manipulator, console screen, beaker, Microlaser, matter bin, power cells.
|
||||
Note: Once everything is added to the public areas, will add m_amt and g_amt to circuit boards since autolathe won't be able
|
||||
to destroy them and players will be able to make replacements.
|
||||
*/
|
||||
/obj/item/weapon/circuitboard/vendor
|
||||
name = "circuit board (Booze-O-Mat Vendor)"
|
||||
build_path = /obj/machinery/vending/boozeomat
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=1"
|
||||
frame_desc = "Requires 3 Resupply Canisters."
|
||||
req_components = list(
|
||||
/obj/item/weapon/vending_refill/boozeomat = 3)
|
||||
|
||||
var/list/names_paths = list(/obj/machinery/vending/boozeomat = "Booze-O-Mat",
|
||||
/obj/machinery/vending/coffee = "Solar's Best Hot Drinks",
|
||||
/obj/machinery/vending/snack = "Getmore Chocolate Corp",
|
||||
/obj/machinery/vending/cola = "Robust Softdrinks",
|
||||
/obj/machinery/vending/cigarette = "ShadyCigs Deluxe",
|
||||
/obj/machinery/vending/autodrobe = "AutoDrobe")
|
||||
|
||||
/obj/item/weapon/circuitboard/vendor/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
set_type(pick(names_paths), user)
|
||||
|
||||
|
||||
/obj/item/weapon/circuitboard/vendor/proc/set_type(typepath, mob/user)
|
||||
build_path = typepath
|
||||
name = "circuit board ([names_paths[build_path]] Vendor)"
|
||||
user << "<span class='notice'>You set the board to [names_paths[build_path]].</span>"
|
||||
req_components = list(text2path("/obj/item/weapon/vending_refill/[copytext("[build_path]", 24)]") = 3)
|
||||
|
||||
/obj/item/weapon/circuitboard/smes
|
||||
name = "circuit board (SMES)"
|
||||
build_path = /obj/machinery/power/smes
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=4;powerstorage=5;engineering=5"
|
||||
frame_desc = "Requires 5 pieces of cable, 5 Power Cells and 1 Capacitor."
|
||||
req_components = list(
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/weapon/cell = 5,
|
||||
/obj/item/weapon/stock_parts/capacitor = 1)
|
||||
|
||||
|
||||
/obj/item/weapon/circuitboard/thermomachine
|
||||
name = "circuit board (Freezer)"
|
||||
desc = "Use screwdriver to switch between heating and cooling modes."
|
||||
build_path = /obj/machinery/atmospherics/unary/cold_sink/freezer
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=3;plasmatech=3"
|
||||
frame_desc = "Requires 2 Matter Bins, 2 Micro Lasers, 1 piece of cable and 1 Console Screen."
|
||||
req_components = list(
|
||||
/obj/item/weapon/stock_parts/matter_bin = 2,
|
||||
/obj/item/weapon/stock_parts/micro_laser = 2,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/thermomachine/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
if(build_path == /obj/machinery/atmospherics/unary/cold_sink/freezer)
|
||||
build_path = /obj/machinery/atmospherics/unary/heat_reservoir/heater
|
||||
name = "circuit board (Heater)"
|
||||
user << "<span class='notice'>You set the board to heating.</span>"
|
||||
else
|
||||
build_path = /obj/machinery/atmospherics/unary/cold_sink/freezer
|
||||
name = "circuit board (Freezer)"
|
||||
user << "<span class='notice'>You set the board to cooling.</span>"
|
||||
|
||||
/obj/item/weapon/circuitboard/biogenerator
|
||||
name = "circuit board (Biogenerator)"
|
||||
build_path = /obj/machinery/biogenerator
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=3;biotech=2;materials=3"
|
||||
frame_desc = "Requires 1 Matter Bin, 1 Manipulator, 1 piece of cable and 1 Console Screen."
|
||||
req_components = list(
|
||||
/obj/item/weapon/stock_parts/matter_bin = 1,
|
||||
/obj/item/weapon/stock_parts/manipulator = 1,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/hydroponics
|
||||
name = "circuit board (Hydroponics Tray)"
|
||||
build_path = /obj/machinery/portable_atmospherics/hydroponics
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=1;biotech=1"
|
||||
frame_desc = "Requires 2 Matter Bins and 1 Console Screen."
|
||||
req_components = list(
|
||||
/obj/item/weapon/stock_parts/matter_bin = 2,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/microwave
|
||||
name = "circuit board (Microwave)"
|
||||
build_path = /obj/machinery/microwave
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=1"
|
||||
frame_desc = "Requires 1 Micro Laser, 1 piece of cable and 1 Console Screen."
|
||||
req_components = list(
|
||||
/obj/item/weapon/stock_parts/micro_laser = 1,
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/chem_dispenser
|
||||
name = "circuit board (Portable Chem Dispenser)"
|
||||
build_path = /obj/machinery/chem_dispenser/constructable
|
||||
board_type = "machine"
|
||||
origin_tech = "materials=4;engineering=4;programming=4;plasmatech=3;biotech=3"
|
||||
frame_desc = "Requires 1 Matter Bin, 1 Capacitor, 1 Manipulator, 1 Console Screen, and 1 Power Cell."
|
||||
req_components = list(
|
||||
/obj/item/weapon/stock_parts/matter_bin = 2,
|
||||
/obj/item/weapon/stock_parts/capacitor = 1,
|
||||
/obj/item/weapon/stock_parts/manipulator = 1,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1,
|
||||
/obj/item/weapon/cell = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/destructive_analyzer
|
||||
name = "Circuit board (Destructive Analyzer)"
|
||||
build_path = "/obj/machinery/r_n_d/destructive_analyzer"
|
||||
@@ -258,9 +367,9 @@ to destroy them and players will be able to make replacements.
|
||||
origin_tech = "magnets=2;engineering=2;programming=2"
|
||||
frame_desc = "Requires 1 Scanning Module, 1 Manipulator, and 1 Micro-Laser."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/scanning_module" = 1,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 1,
|
||||
"/obj/item/weapon/stock_parts/micro_laser" = 1)
|
||||
/obj/item/weapon/stock_parts/scanning_module = 1,
|
||||
/obj/item/weapon/stock_parts/manipulator = 1,
|
||||
/obj/item/weapon/stock_parts/micro_laser = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/autolathe
|
||||
name = "Circuit board (Autolathe)"
|
||||
@@ -269,9 +378,9 @@ to destroy them and players will be able to make replacements.
|
||||
origin_tech = "engineering=2;programming=2"
|
||||
frame_desc = "Requires 3 Matter Bins, 1 Manipulator, and 1 Console Screen."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 3,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1)
|
||||
/obj/item/weapon/stock_parts/matter_bin = 3,
|
||||
/obj/item/weapon/stock_parts/manipulator = 1,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/protolathe
|
||||
name = "Circuit board (Protolathe)"
|
||||
@@ -280,9 +389,9 @@ to destroy them and players will be able to make replacements.
|
||||
origin_tech = "engineering=2;programming=2"
|
||||
frame_desc = "Requires 2 Matter Bins, 2 Manipulators, and 2 Beakers."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 2,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||
"/obj/item/weapon/reagent_containers/glass/beaker" = 2)
|
||||
/obj/item/weapon/stock_parts/matter_bin = 2,
|
||||
/obj/item/weapon/stock_parts/manipulator = 2,
|
||||
/obj/item/weapon/reagent_containers/glass/beaker = 2)
|
||||
|
||||
|
||||
/obj/item/weapon/circuitboard/circuit_imprinter
|
||||
@@ -292,9 +401,9 @@ to destroy them and players will be able to make replacements.
|
||||
origin_tech = "engineering=2;programming=2"
|
||||
frame_desc = "Requires 1 Matter Bin, 1 Manipulator, and 2 Beakers."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 1,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 1,
|
||||
"/obj/item/weapon/reagent_containers/glass/beaker" = 2)
|
||||
/obj/item/weapon/stock_parts/matter_bin = 1,
|
||||
/obj/item/weapon/stock_parts/manipulator = 1,
|
||||
/obj/item/weapon/reagent_containers/glass/beaker = 2)
|
||||
|
||||
/obj/item/weapon/circuitboard/pacman
|
||||
name = "Circuit Board (PACMAN-type Generator)"
|
||||
@@ -303,10 +412,10 @@ to destroy them and players will be able to make replacements.
|
||||
origin_tech = "programming=3:powerstorage=3;plasmatech=3;engineering=3"
|
||||
frame_desc = "Requires 1 Matter Bin, 1 Micro-Laser, 2 Pieces of Cable, and 1 Capacitor."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 1,
|
||||
"/obj/item/weapon/stock_parts/micro_laser" = 1,
|
||||
"/obj/item/stack/cable_coil" = 2,
|
||||
"/obj/item/weapon/stock_parts/capacitor" = 1)
|
||||
/obj/item/weapon/stock_parts/matter_bin = 1,
|
||||
/obj/item/weapon/stock_parts/micro_laser = 1,
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/weapon/stock_parts/capacitor = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/pacman/super
|
||||
name = "Circuit Board (SUPERPACMAN-type Generator)"
|
||||
@@ -325,8 +434,8 @@ obj/item/weapon/circuitboard/rdserver
|
||||
origin_tech = "programming=3"
|
||||
frame_desc = "Requires 2 pieces of cable, and 1 Scanning Module."
|
||||
req_components = list(
|
||||
"/obj/item/stack/cable_coil" = 2,
|
||||
"/obj/item/weapon/stock_parts/scanning_module" = 1)
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/weapon/stock_parts/scanning_module = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/mechfab
|
||||
name = "Circuit board (Exosuit Fabricator)"
|
||||
@@ -335,10 +444,10 @@ obj/item/weapon/circuitboard/rdserver
|
||||
origin_tech = "programming=3;engineering=3"
|
||||
frame_desc = "Requires 2 Matter Bins, 1 Manipulator, 1 Micro-Laser and 1 Console Screen."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 2,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 1,
|
||||
"/obj/item/weapon/stock_parts/micro_laser" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1)
|
||||
/obj/item/weapon/stock_parts/matter_bin = 2,
|
||||
/obj/item/weapon/stock_parts/manipulator = 1,
|
||||
/obj/item/weapon/stock_parts/micro_laser = 1,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/clonepod
|
||||
name = "Circuit board (Clone Pod)"
|
||||
@@ -347,110 +456,213 @@ obj/item/weapon/circuitboard/rdserver
|
||||
origin_tech = "programming=3;biotech=3"
|
||||
frame_desc = "Requires 2 Manipulator, 2 Scanning Module, 2 pieces of cable and 1 Console Screen."
|
||||
req_components = list(
|
||||
"/obj/item/stack/cable_coil" = 2,
|
||||
"/obj/item/weapon/stock_parts/scanning_module" = 2,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1)
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/weapon/stock_parts/scanning_module = 2,
|
||||
/obj/item/weapon/stock_parts/manipulator = 2,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/clonescanner
|
||||
name = "Circuit board (Cloning Scanner)"
|
||||
build_path = "/obj/machinery/dna_scannernew"
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=2;biotech=2"
|
||||
frame_desc = "Requires 1 Scanning module, 1 Manipulator, 1 Micro-Laser, 2 pieces of cable and 1 Console Screen."
|
||||
frame_desc = "Requires 1 Scanning Module, 1 Manipulator, 1 Micro-Laser, 2 pieces of cable and 1 Console Screen."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/scanning_module" = 1,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 1,
|
||||
"/obj/item/weapon/stock_parts/micro_laser" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1,
|
||||
"/obj/item/stack/cable_coil" = 2,)
|
||||
/obj/item/weapon/stock_parts/scanning_module = 1,
|
||||
/obj/item/weapon/stock_parts/manipulator = 1,
|
||||
/obj/item/weapon/stock_parts/micro_laser = 1,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1,
|
||||
/obj/item/stack/cable_coil = 2,)
|
||||
|
||||
/obj/item/weapon/circuitboard/mech_recharger
|
||||
name = "circuit board (Mech Bay Recharger)"
|
||||
build_path = /obj/machinery/mech_bay_recharge_port
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=3;powerstorage=4;engineering=4"
|
||||
frame_desc = "Requires 1 piece of cable and 5 Capacitors."
|
||||
req_components = list(
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/weapon/stock_parts/capacitor = 5)
|
||||
|
||||
/obj/item/weapon/circuitboard/teleporter_hub
|
||||
name = "circuit board (Teleporter Hub)"
|
||||
build_path = /obj/machinery/teleport/hub
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=3;engineering=5;bluespace=5;materials=4"
|
||||
frame_desc = "Requires 3 Bluespace Crystals and 1 Matter Bin."
|
||||
req_components = list(
|
||||
/obj/item/bluespace_crystal = 3,
|
||||
/obj/item/weapon/stock_parts/matter_bin = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/teleporter_station
|
||||
name = "circuit board (Teleporter Station)"
|
||||
build_path = /obj/machinery/teleport/station
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=4;engineering=4;bluespace=4"
|
||||
frame_desc = "Requires 2 Bluespace Crystals, 2 Capacitors and 1 Console Screen."
|
||||
req_components = list(
|
||||
/obj/item/bluespace_crystal = 2,
|
||||
/obj/item/weapon/stock_parts/capacitor = 2,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/telesci_pad
|
||||
name = "Circuit board (Telepad)"
|
||||
build_path = /obj/machinery/telepad
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=4;engineering=3;materials=3;bluespace=4"
|
||||
frame_desc = "Requires 2 Bluespace Crystals, 1 Capacitor, 1 piece of cable and 1 Console Screen."
|
||||
req_components = list(
|
||||
/obj/item/bluespace_crystal = 2,
|
||||
/obj/item/weapon/stock_parts/capacitor = 1,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1)
|
||||
|
||||
|
||||
/obj/item/weapon/circuitboard/sleeper
|
||||
name = "circuit board (Sleeper)"
|
||||
build_path = /obj/machinery/sleeper
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=3;biotech=2;engineering=3;materials=3"
|
||||
frame_desc = "Requires 1 Matter Bin, 1 Manipulator, 1 piece of cable and 2 Console Screens."
|
||||
req_components = list(
|
||||
/obj/item/weapon/stock_parts/matter_bin = 1,
|
||||
/obj/item/weapon/stock_parts/manipulator = 1,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/weapon/stock_parts/console_screen = 2)
|
||||
|
||||
/obj/item/weapon/circuitboard/sleep_console
|
||||
name = "circuit board (Sleeper Console)"
|
||||
build_path = /obj/machinery/sleep_console
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=3;biotech=2;engineering=3;materials=3"
|
||||
frame_desc = "Requires 2 pieces of cable and 2 Console Screens."
|
||||
req_components = list(
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/weapon/stock_parts/console_screen = 2)
|
||||
|
||||
/obj/item/weapon/circuitboard/bodyscanner
|
||||
name = "circuit board (Body Scanner)"
|
||||
build_path = /obj/machinery/bodyscanner
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=3;biotech=2;engineering=3;materials=3"
|
||||
frame_desc = "Requires 1 Scanning Module, 2 pieces of cable and 2 Console Screens."
|
||||
req_components = list(
|
||||
/obj/item/weapon/stock_parts/scanning_module = 1,
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/weapon/stock_parts/console_screen = 2)
|
||||
|
||||
/obj/item/weapon/circuitboard/bodyscanner_console
|
||||
name = "circuit board (Body Scanner Console)"
|
||||
build_path = /obj/machinery/body_scanconsole
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=3;biotech=2;engineering=3;materials=3"
|
||||
frame_desc = "Requires 2 pieces of cable and 2 Console Screens."
|
||||
req_components = list(
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/weapon/stock_parts/console_screen = 2)
|
||||
|
||||
/obj/item/weapon/circuitboard/cryo_tube
|
||||
name = "circuit board (Cryotube)"
|
||||
build_path = /obj/machinery/atmospherics/unary/cryo_cell
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=4;biotech=3;engineering=4"
|
||||
frame_desc = "Requires 1 Matter Bin, 1 piece of cable and 4 Console Screens."
|
||||
req_components = list(
|
||||
/obj/item/weapon/stock_parts/matter_bin = 1,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/weapon/stock_parts/console_screen = 4)
|
||||
|
||||
/obj/item/weapon/circuitboard/cyborgrecharger
|
||||
name = "circuit board (Cyborg Recharger)"
|
||||
build_path = /obj/machinery/recharge_station
|
||||
board_type = "machine"
|
||||
origin_tech = "powerstorage=3;engineering=3"
|
||||
frame_desc = "Requires 2 Capacitors, 1 Power Cell and 1 Manipulator."
|
||||
req_components = list(
|
||||
/obj/item/weapon/stock_parts/capacitor = 2,
|
||||
/obj/item/weapon/cell = 1,
|
||||
/obj/item/weapon/stock_parts/manipulator = 1)
|
||||
|
||||
// Telecomms circuit boards:
|
||||
|
||||
/obj/item/weapon/circuitboard/telecomms/receiver
|
||||
name = "Circuit Board (Subspace Receiver)"
|
||||
build_path = "/obj/machinery/telecomms/receiver"
|
||||
build_path = /obj/machinery/telecomms/receiver
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=4;engineering=3;bluespace=2"
|
||||
frame_desc = "Requires 1 Subspace Ansible, 1 Hyperwave Filter, 2 Manipulators, and 1 Micro-Laser."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/subspace/ansible" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/filter" = 1,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||
"/obj/item/weapon/stock_parts/micro_laser" = 1)
|
||||
/obj/item/weapon/stock_parts/subspace/ansible = 1,
|
||||
/obj/item/weapon/stock_parts/subspace/filter = 1,
|
||||
/obj/item/weapon/stock_parts/manipulator = 2,
|
||||
/obj/item/weapon/stock_parts/micro_laser = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/telecomms/hub
|
||||
name = "Circuit Board (Hub Mainframe)"
|
||||
build_path = "/obj/machinery/telecomms/hub"
|
||||
build_path = /obj/machinery/telecomms/hub
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=4;engineering=4"
|
||||
frame_desc = "Requires 2 Manipulators, 2 Cable Coil and 2 Hyperwave Filter."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||
"/obj/item/stack/cable_coil" = 2,
|
||||
"/obj/item/weapon/stock_parts/subspace/filter" = 2)
|
||||
/obj/item/weapon/stock_parts/manipulator = 2,
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/weapon/stock_parts/subspace/filter = 2)
|
||||
|
||||
/obj/item/weapon/circuitboard/telecomms/relay
|
||||
name = "Circuit Board (Relay Mainframe)"
|
||||
build_path = "/obj/machinery/telecomms/relay"
|
||||
build_path = /obj/machinery/telecomms/relay
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=3;engineering=4;bluespace=3"
|
||||
frame_desc = "Requires 2 Manipulators, 2 Cable Coil and 2 Hyperwave Filters."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||
"/obj/item/stack/cable_coil" = 2,
|
||||
"/obj/item/weapon/stock_parts/subspace/filter" = 2)
|
||||
/obj/item/weapon/stock_parts/manipulator = 2,
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/weapon/stock_parts/subspace/filter = 2)
|
||||
|
||||
/obj/item/weapon/circuitboard/telecomms/bus
|
||||
name = "Circuit Board (Bus Mainframe)"
|
||||
build_path = "/obj/machinery/telecomms/bus"
|
||||
build_path = /obj/machinery/telecomms/bus
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=4;engineering=4"
|
||||
frame_desc = "Requires 2 Manipulators, 1 Cable Coil and 1 Hyperwave Filter."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||
"/obj/item/stack/cable_coil" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/filter" = 1)
|
||||
/obj/item/weapon/stock_parts/manipulator = 2,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/weapon/stock_parts/subspace/filter = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/telecomms/processor
|
||||
name = "Circuit Board (Processor Unit)"
|
||||
build_path = "/obj/machinery/telecomms/processor"
|
||||
build_path = /obj/machinery/telecomms/processor
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=4;engineering=4"
|
||||
frame_desc = "Requires 3 Manipulators, 1 Hyperwave Filter, 2 Treatment Disks, 1 Wavelength Analyzer, 2 Cable Coils and 1 Subspace Amplifier."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 3,
|
||||
"/obj/item/weapon/stock_parts/subspace/filter" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/treatment" = 2,
|
||||
"/obj/item/weapon/stock_parts/subspace/analyzer" = 1,
|
||||
"/obj/item/stack/cable_coil" = 2,
|
||||
"/obj/item/weapon/stock_parts/subspace/amplifier" = 1)
|
||||
/obj/item/weapon/stock_parts/manipulator = 3,
|
||||
/obj/item/weapon/stock_parts/subspace/filter = 1,
|
||||
/obj/item/weapon/stock_parts/subspace/treatment = 2,
|
||||
/obj/item/weapon/stock_parts/subspace/analyzer = 1,
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/weapon/stock_parts/subspace/amplifier = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/telecomms/server
|
||||
name = "Circuit Board (Telecommunication Server)"
|
||||
build_path = "/obj/machinery/telecomms/server"
|
||||
build_path = /obj/machinery/telecomms/server
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=4;engineering=4"
|
||||
frame_desc = "Requires 2 Manipulators, 1 Cable Coil and 1 Hyperwave Filter."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||
"/obj/item/stack/cable_coil" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/filter" = 1)
|
||||
/obj/item/weapon/stock_parts/manipulator = 2,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/weapon/stock_parts/subspace/filter = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/telecomms/broadcaster
|
||||
name = "Circuit Board (Subspace Broadcaster)"
|
||||
build_path = "/obj/machinery/telecomms/broadcaster"
|
||||
build_path = /obj/machinery/telecomms/broadcaster
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=4;engineering=4;bluespace=2"
|
||||
frame_desc = "Requires 2 Manipulators, 1 Cable Coil, 1 Hyperwave Filter, 1 Ansible Crystal and 2 High-Powered Micro-Lasers. "
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||
"/obj/item/stack/cable_coil" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/filter" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/crystal" = 1,
|
||||
"/obj/item/weapon/stock_parts/micro_laser/high" = 2)
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/stock_parts/manipulator = 2,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/weapon/stock_parts/subspace/filter = 1,
|
||||
/obj/item/weapon/stock_parts/subspace/crystal = 1,
|
||||
/obj/item/weapon/stock_parts/micro_laser/high = 2)
|
||||
@@ -12,6 +12,7 @@
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker = null
|
||||
|
||||
var/current_heat_capacity = 50
|
||||
var/efficiency
|
||||
|
||||
l_color = "#00FF00"
|
||||
power_change()
|
||||
@@ -24,7 +25,23 @@
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/New()
|
||||
..()
|
||||
initialize_directions = dir
|
||||
initialize()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/cryo_tube(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src, 1)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/RefreshParts()
|
||||
var/C
|
||||
for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts)
|
||||
C += M.rating
|
||||
current_heat_capacity = 50 * C
|
||||
efficiency = C
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/initialize()
|
||||
if(node) return
|
||||
@@ -35,7 +52,8 @@
|
||||
break
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/Destroy()
|
||||
go_out()
|
||||
var/turf/T = loc
|
||||
T.contents += contents
|
||||
var/obj/item/weapon/reagent_containers/glass/B = beaker
|
||||
if(beaker)
|
||||
B.loc = get_step(loc, SOUTH) //Beaker is carefully ejected from the wreckage of the cryotube
|
||||
@@ -118,7 +136,12 @@
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/attack_hand(mob/user)
|
||||
if(panel_open)
|
||||
usr << "\blue <b>Close the maintenance panel first.</b>"
|
||||
return
|
||||
|
||||
ui_interact(user)
|
||||
|
||||
|
||||
/**
|
||||
* The ui_interact proc is used to open and update Nano UIs
|
||||
@@ -229,7 +252,23 @@
|
||||
user.drop_item()
|
||||
G.loc = src
|
||||
user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!")
|
||||
else if(istype(G, /obj/item/weapon/grab))
|
||||
|
||||
if (istype(G, /obj/item/weapon/screwdriver))
|
||||
if(occupant || on)
|
||||
user << "<span class='notice'>The maintenance panel is locked.</span>"
|
||||
return
|
||||
default_deconstruction_screwdriver(user, "cell-o", "cell-off", G)
|
||||
return
|
||||
|
||||
if(exchange_parts(user, G))
|
||||
return
|
||||
|
||||
default_deconstruction_crowbar(G)
|
||||
|
||||
if(istype(G, /obj/item/weapon/grab))
|
||||
if(panel_open)
|
||||
user << "\blue <b>Close the maintenance panel first.</b>"
|
||||
return
|
||||
if(!ismob(G:affecting))
|
||||
return
|
||||
for(var/mob/living/carbon/slime/M in range(1,G:affecting))
|
||||
@@ -261,8 +300,8 @@
|
||||
occupant.bodytemperature = max(occupant.bodytemperature, air_contents.temperature) // this is so ugly i'm sorry for doing it i'll fix it later i promise
|
||||
occupant.stat = 1
|
||||
if(occupant.bodytemperature < T0C)
|
||||
occupant.sleeping = max(5, (1/occupant.bodytemperature)*2000)
|
||||
occupant.Paralyse(max(5, (1/occupant.bodytemperature)*3000))
|
||||
occupant.sleeping = max(5/efficiency, (1/occupant.bodytemperature)*2000/efficiency)
|
||||
occupant.Paralyse(max(5/efficiency, (1/occupant.bodytemperature)*3000/efficiency))
|
||||
if(air_contents.oxygen > 2)
|
||||
if(occupant.getOxyLoss()) occupant.adjustOxyLoss(-1)
|
||||
else
|
||||
@@ -270,9 +309,9 @@
|
||||
//severe damage should heal waaay slower without proper chemicals
|
||||
if(occupant.bodytemperature < 225)
|
||||
if (occupant.getToxLoss())
|
||||
occupant.adjustToxLoss(max(-1, -20/occupant.getToxLoss()))
|
||||
var/heal_brute = occupant.getBruteLoss() ? min(1, 20/occupant.getBruteLoss()) : 0
|
||||
var/heal_fire = occupant.getFireLoss() ? min(1, 20/occupant.getFireLoss()) : 0
|
||||
occupant.adjustToxLoss(max(-efficiency, (-20*(efficiency ** 2)) / occupant.getToxLoss()))
|
||||
var/heal_brute = occupant.getBruteLoss() ? min(efficiency, 20*(efficiency**2) / occupant.getBruteLoss()) : 0
|
||||
var/heal_fire = occupant.getFireLoss() ? min(efficiency, 20*(efficiency**2) / occupant.getFireLoss()) : 0
|
||||
occupant.heal_organ_damage(heal_brute,heal_fire)
|
||||
var/has_cryo = occupant.reagents.get_reagent_amount("cryoxadone") >= 1
|
||||
var/has_clonexa = occupant.reagents.get_reagent_amount("clonexadone") >= 1
|
||||
|
||||
@@ -240,7 +240,7 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
|
||||
current_mode.possible_traitors.Remove(occupant)
|
||||
|
||||
// Delete them from datacore.
|
||||
|
||||
|
||||
if(PDA_Manifest.len)
|
||||
PDA_Manifest.Cut()
|
||||
for(var/datum/data/record/R in data_core.medical)
|
||||
@@ -328,6 +328,82 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
|
||||
//Despawning occurs when process() is called with an occupant without a client.
|
||||
src.add_fingerprint(M)
|
||||
|
||||
/obj/machinery/cryopod/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
|
||||
|
||||
if(O.loc == user) //no you can't pull things out of your ass
|
||||
return
|
||||
if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis || user.resting) //are you cuffed, dying, lying, stunned or other
|
||||
return
|
||||
if(O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)) // is the mob anchored, too far away from you, or are you too far away from the source
|
||||
return
|
||||
if(!ismob(O)) //humans only
|
||||
return
|
||||
if(istype(O, /mob/living/simple_animal) || istype(O, /mob/living/silicon)) //animals and robutts dont fit
|
||||
return
|
||||
if(!ishuman(user) && !isrobot(user)) //No ghosts or mice putting people into the sleeper
|
||||
return
|
||||
if(user.loc==null) // just in case someone manages to get a closet into the blue light dimension, as unlikely as that seems
|
||||
return
|
||||
if(!istype(user.loc, /turf) || !istype(O.loc, /turf)) // are you in a container/closet/pod/etc?
|
||||
return
|
||||
if(occupant)
|
||||
user << "\blue <B>The cryo pod is already occupied!</B>"
|
||||
return
|
||||
|
||||
|
||||
var/mob/living/L = O
|
||||
if(!istype(L) || L.buckled)
|
||||
return
|
||||
for(var/mob/living/carbon/slime/M in range(1,L))
|
||||
if(M.Victim == L)
|
||||
usr << "[L.name] will not fit into the cryo pod because they have a slime latched onto their head."
|
||||
return
|
||||
|
||||
|
||||
var/willing = null //We don't want to allow people to be forced into despawning.
|
||||
|
||||
if(L.client)
|
||||
if(alert(L,"Would you like to enter cryosleep?",,"Yes","No") == "Yes")
|
||||
if(!L) return
|
||||
willing = 1
|
||||
else
|
||||
willing = 1
|
||||
|
||||
if(willing)
|
||||
if(L == user)
|
||||
visible_message("[user] starts climbing into the cryo pod.", 3)
|
||||
else
|
||||
visible_message("[user] starts putting [L] into the cryo pod.", 3)
|
||||
|
||||
if(do_after(user, 20))
|
||||
if(!L) return
|
||||
|
||||
L.loc = src
|
||||
|
||||
if(L.client)
|
||||
L.client.perspective = EYE_PERSPECTIVE
|
||||
L.client.eye = src
|
||||
|
||||
if(orient_right)
|
||||
icon_state = "body_scanner_1-r"
|
||||
else
|
||||
icon_state = "body_scanner_1"
|
||||
|
||||
L << "\blue You feel cool air surround you. You go numb as your senses turn inward."
|
||||
L << "\blue <b>If you ghost, log out or close your client now, your character will shortly be permanently removed from the round.</b>"
|
||||
occupant = L
|
||||
time_entered = world.time
|
||||
|
||||
// Book keeping!
|
||||
log_admin("[key_name_admin(L)] has entered a stasis pod.")
|
||||
message_admins("\blue [key_name_admin(L)] has entered a stasis pod.")
|
||||
|
||||
//Despawning occurs when process() is called with an occupant without a client.
|
||||
src.add_fingerprint(L)
|
||||
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/cryopod/verb/eject()
|
||||
set name = "Eject Pod"
|
||||
set category = "Object"
|
||||
|
||||
@@ -25,7 +25,10 @@
|
||||
if(T && istype(T) && T.zone)
|
||||
var/datum/gas_mixture/environment = T.return_air()
|
||||
for(var/i=1;i<=stats.len;i++)
|
||||
rstats[i] = environment.vars[stats[i]]
|
||||
if(stats[i] == "pressure")
|
||||
rstats[i] = environment.return_pressure()
|
||||
else
|
||||
rstats[i] = environment.vars[stats[i]]
|
||||
else if(istype(T, /turf/simulated))
|
||||
rstats = null // Exclude zone (wall, door, etc).
|
||||
else if(istype(T, /turf))
|
||||
@@ -37,7 +40,7 @@
|
||||
return temps
|
||||
|
||||
#define FIREDOOR_MAX_PRESSURE_DIFF 25 // kPa
|
||||
#define FIREDOOR_MAX_TEMP 50 // °C
|
||||
#define FIREDOOR_MAX_TEMP 50 // Celsius
|
||||
#define FIREDOOR_MIN_TEMP 0
|
||||
|
||||
// Bitflags
|
||||
@@ -100,6 +103,7 @@
|
||||
/obj/machinery/door/firedoor/examine()
|
||||
set src in view()
|
||||
. = ..()
|
||||
|
||||
if(pdiff >= FIREDOOR_MAX_PRESSURE_DIFF)
|
||||
usr << "<span class='warning'>WARNING: Current pressure differential is [pdiff]kPa! Opening door may result in injury!</span>"
|
||||
|
||||
@@ -125,7 +129,7 @@
|
||||
o += "<span class='warning'>"
|
||||
else
|
||||
o += "<span style='color:blue'>"
|
||||
o += "[celsius]?C</span> "
|
||||
o += "[celsius]Celsius</span> "
|
||||
o += "<span style='color:blue'>"
|
||||
o += "[pressure]kPa</span></li>"
|
||||
usr << o
|
||||
@@ -159,7 +163,6 @@
|
||||
stat |= NOPOWER
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/door/firedoor/attack_hand(mob/user as mob)
|
||||
return attackby(null, user)
|
||||
|
||||
@@ -279,8 +282,42 @@
|
||||
if(alarmed)
|
||||
nextstate = CLOSED
|
||||
|
||||
/obj/machinery/door/firedoor/attack_ai(mob/user as mob)
|
||||
if(operating)
|
||||
return //Already doing something.
|
||||
|
||||
if(blocked)
|
||||
user << "\red \The [src] is welded solid!"
|
||||
return
|
||||
|
||||
var/area/A = get_area_master(src)
|
||||
ASSERT(istype(A)) // This worries me.
|
||||
var/alarmed = A.air_doors_activated || A.fire
|
||||
|
||||
var/access_granted = 0
|
||||
if(isAI(user) || isrobot(user))
|
||||
access_granted = 1
|
||||
|
||||
if(access_granted == 1)
|
||||
user.visible_message("\blue \The [src] [density ? "open" : "close"]s for \the [user].",\
|
||||
"\The [src] [density ? "open" : "close"]s.",\
|
||||
"You hear a beep, and a door opening.")
|
||||
|
||||
var/needs_to_close = 0
|
||||
if(density)
|
||||
if(alarmed)
|
||||
needs_to_close = 1
|
||||
spawn()
|
||||
open()
|
||||
else
|
||||
spawn()
|
||||
close()
|
||||
|
||||
if(needs_to_close)
|
||||
spawn(50)
|
||||
if(alarmed)
|
||||
nextstate = CLOSED
|
||||
|
||||
// CHECK PRESSURE
|
||||
/obj/machinery/door/firedoor/process()
|
||||
..()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/machinery/door/poddoor
|
||||
name = "Podlock"
|
||||
desc = "Why it no open!!!"
|
||||
desc = "That looks like it doesn't open easily."
|
||||
icon = 'icons/obj/doors/rapid_pdoor.dmi'
|
||||
icon_state = "pdoor1"
|
||||
var/id = 1.0
|
||||
@@ -14,7 +14,10 @@
|
||||
/obj/machinery/door/poddoor/four_tile_ver/
|
||||
name = "Large Pod Door"
|
||||
icon = 'icons/obj/doors/1x4blast_vert.dmi'
|
||||
|
||||
|
||||
/obj/machinery/door/poddoor/three_tile_ver/
|
||||
name = "Large Pod Door"
|
||||
icon = 'icons/obj/doors/1x3blast_vert.dmi'
|
||||
|
||||
/obj/machinery/door/poddoor/Bumped(atom/AM)
|
||||
if(!density)
|
||||
@@ -122,6 +125,58 @@
|
||||
src.operating = 0
|
||||
return
|
||||
*/
|
||||
/obj/machinery/door/poddoor/three_tile_hor/open()
|
||||
if (src.operating == 1) //doors can still open when emag-disabled
|
||||
return
|
||||
if (!ticker)
|
||||
return 0
|
||||
if(!src.operating) //in case of emag
|
||||
src.operating = 1
|
||||
flick("pdoorc0", src)
|
||||
src.icon_state = "pdoor0"
|
||||
sleep(10)
|
||||
src.density = 0
|
||||
src.SetOpacity(0)
|
||||
|
||||
f1.density = 0
|
||||
f1.SetOpacity(0)
|
||||
f2.density = 0
|
||||
f2.SetOpacity(0)
|
||||
f3.density = 0
|
||||
f3.SetOpacity(0)
|
||||
|
||||
update_nearby_tiles()
|
||||
|
||||
if(operating == 1) //emag again
|
||||
src.operating = 0
|
||||
if(autoclose)
|
||||
spawn(150)
|
||||
autoclose()
|
||||
return 1
|
||||
|
||||
/obj/machinery/door/poddoor/three_tile_hor/close()
|
||||
if (src.operating)
|
||||
return
|
||||
src.operating = 1
|
||||
flick("pdoorc1", src)
|
||||
src.icon_state = "pdoor1"
|
||||
src.density = 1
|
||||
|
||||
f1.density = 1
|
||||
f1.SetOpacity(1)
|
||||
f2.density = 1
|
||||
f2.SetOpacity(1)
|
||||
f3.density = 1
|
||||
f3.SetOpacity(1)
|
||||
|
||||
if (src.visible)
|
||||
src.SetOpacity(1)
|
||||
update_nearby_tiles()
|
||||
|
||||
sleep(10)
|
||||
src.operating = 0
|
||||
return
|
||||
|
||||
/obj/machinery/door/poddoor/four_tile_hor/open()
|
||||
if (src.operating == 1) //doors can still open when emag-disabled
|
||||
return
|
||||
@@ -226,6 +281,59 @@
|
||||
src.operating = 0
|
||||
return
|
||||
*/
|
||||
|
||||
/obj/machinery/door/poddoor/three_tile_ver/open()
|
||||
if (src.operating == 1) //doors can still open when emag-disabled
|
||||
return
|
||||
if (!ticker)
|
||||
return 0
|
||||
if(!src.operating) //in case of emag
|
||||
src.operating = 1
|
||||
flick("pdoorc0", src)
|
||||
src.icon_state = "pdoor0"
|
||||
sleep(10)
|
||||
src.density = 0
|
||||
src.SetOpacity(0)
|
||||
|
||||
f1.density = 0
|
||||
f1.SetOpacity(0)
|
||||
f2.density = 0
|
||||
f2.SetOpacity(0)
|
||||
f3.density = 0
|
||||
f3.SetOpacity(0)
|
||||
|
||||
update_nearby_tiles()
|
||||
|
||||
if(operating == 1) //emag again
|
||||
src.operating = 0
|
||||
if(autoclose)
|
||||
spawn(150)
|
||||
autoclose()
|
||||
return 1
|
||||
|
||||
/obj/machinery/door/poddoor/three_tile_ver/close()
|
||||
if (src.operating)
|
||||
return
|
||||
src.operating = 1
|
||||
flick("pdoorc1", src)
|
||||
src.icon_state = "pdoor1"
|
||||
src.density = 1
|
||||
|
||||
f1.density = 1
|
||||
f1.SetOpacity(1)
|
||||
f2.density = 1
|
||||
f2.SetOpacity(1)
|
||||
f3.density = 1
|
||||
f3.SetOpacity(1)
|
||||
|
||||
if (src.visible)
|
||||
src.SetOpacity(1)
|
||||
update_nearby_tiles()
|
||||
|
||||
sleep(10)
|
||||
src.operating = 0
|
||||
return
|
||||
|
||||
/obj/machinery/door/poddoor/four_tile_ver/open()
|
||||
if (src.operating == 1) //doors can still open when emag-disabled
|
||||
return
|
||||
@@ -256,7 +364,7 @@
|
||||
spawn(150)
|
||||
autoclose()
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/door/poddoor/four_tile_ver/close()
|
||||
if (src.operating)
|
||||
return
|
||||
@@ -323,6 +431,54 @@
|
||||
del f2
|
||||
..()
|
||||
*/
|
||||
/obj/machinery/door/poddoor/three_tile_hor
|
||||
var/obj/machinery/door/poddoor/filler_object/f1
|
||||
var/obj/machinery/door/poddoor/filler_object/f2
|
||||
var/obj/machinery/door/poddoor/filler_object/f3
|
||||
icon = 'icons/obj/doors/1x3blast_hor.dmi'
|
||||
|
||||
New()
|
||||
..()
|
||||
f1 = new/obj/machinery/door/poddoor/filler_object (src.loc)
|
||||
f2 = new/obj/machinery/door/poddoor/filler_object (get_step(f1,EAST))
|
||||
f3 = new/obj/machinery/door/poddoor/filler_object (get_step(f2,EAST))
|
||||
f1.density = density
|
||||
f2.density = density
|
||||
f3.density = density
|
||||
f1.SetOpacity(opacity)
|
||||
f2.SetOpacity(opacity)
|
||||
f3.SetOpacity(opacity)
|
||||
|
||||
Destroy()
|
||||
del f1
|
||||
del f2
|
||||
del f3
|
||||
..()
|
||||
|
||||
/obj/machinery/door/poddoor/three_tile_ver
|
||||
var/obj/machinery/door/poddoor/filler_object/f1
|
||||
var/obj/machinery/door/poddoor/filler_object/f2
|
||||
var/obj/machinery/door/poddoor/filler_object/f3
|
||||
icon = 'icons/obj/doors/1x3blast_vert.dmi'
|
||||
|
||||
New()
|
||||
..()
|
||||
f1 = new/obj/machinery/door/poddoor/filler_object (src.loc)
|
||||
f2 = new/obj/machinery/door/poddoor/filler_object (get_step(f1,NORTH))
|
||||
f3 = new/obj/machinery/door/poddoor/filler_object (get_step(f2,NORTH))
|
||||
f1.density = density
|
||||
f2.density = density
|
||||
f3.density = density
|
||||
f1.SetOpacity(opacity)
|
||||
f2.SetOpacity(opacity)
|
||||
f3.SetOpacity(opacity)
|
||||
|
||||
Destroy()
|
||||
del f1
|
||||
del f2
|
||||
del f3
|
||||
..()
|
||||
|
||||
/obj/machinery/door/poddoor/four_tile_hor
|
||||
var/obj/machinery/door/poddoor/filler_object/f1
|
||||
var/obj/machinery/door/poddoor/filler_object/f2
|
||||
@@ -342,8 +498,8 @@
|
||||
f4.density = density
|
||||
f1.SetOpacity(opacity)
|
||||
f2.SetOpacity(opacity)
|
||||
f4.SetOpacity(opacity)
|
||||
f3.SetOpacity(opacity)
|
||||
f4.SetOpacity(opacity)
|
||||
|
||||
Destroy()
|
||||
del f1
|
||||
@@ -371,8 +527,8 @@
|
||||
f4.density = density
|
||||
f1.SetOpacity(opacity)
|
||||
f2.SetOpacity(opacity)
|
||||
f4.SetOpacity(opacity)
|
||||
f3.SetOpacity(opacity)
|
||||
f4.SetOpacity(opacity)
|
||||
|
||||
Destroy()
|
||||
del f1
|
||||
|
||||
@@ -4,22 +4,12 @@
|
||||
icon = 'icons/obj/doors/windoor.dmi'
|
||||
icon_state = "left"
|
||||
var/base_state = "left"
|
||||
var/health = 150.0 //If you change this, consiter changing ../door/window/brigdoor/ health at the bottom of this .dm file
|
||||
var/health = 150.0 //If you change this, consider changing ../door/window/brigdoor/ health at the bottom of this .dm file
|
||||
visible = 0.0
|
||||
use_power = 0
|
||||
flags = ON_BORDER
|
||||
opacity = 0
|
||||
var/obj/item/weapon/airlock_electronics/electronics = null
|
||||
explosion_resistance = 5
|
||||
air_properties_vary_with_direction = 1
|
||||
|
||||
|
||||
/obj/machinery/door/window/update_nearby_tiles(need_rebuild)
|
||||
if(!air_master) return 0
|
||||
|
||||
air_master.mark_for_update(get_turf(src))
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/door/window/New()
|
||||
..()
|
||||
@@ -27,54 +17,70 @@
|
||||
if (src.req_access && src.req_access.len)
|
||||
src.icon_state = "[src.icon_state]"
|
||||
src.base_state = src.icon_state
|
||||
|
||||
color = color_windows()
|
||||
|
||||
color = color_windows(src)
|
||||
return
|
||||
|
||||
/obj/machinery/door/window/Destroy()
|
||||
density = 0
|
||||
playsound(src, "shatter", 70, 1)
|
||||
if(health == 0)
|
||||
playsound(src, "shatter", 70, 1)
|
||||
..()
|
||||
|
||||
|
||||
/obj/machinery/door/window/proc/open_and_close()
|
||||
open()
|
||||
if(src.check_access(null))
|
||||
sleep(50)
|
||||
else //secure doors close faster
|
||||
sleep(20)
|
||||
close()
|
||||
|
||||
/obj/machinery/door/window/Bumped(atom/movable/AM as mob|obj)
|
||||
if( operating || !src.density )
|
||||
return
|
||||
if (!( ismob(AM) ))
|
||||
var/obj/machinery/bot/bot = AM
|
||||
if(istype(bot))
|
||||
if(density && src.check_access(bot.botcard))
|
||||
open()
|
||||
sleep(50)
|
||||
close()
|
||||
if(src.check_access(bot.botcard))
|
||||
open_and_close()
|
||||
else
|
||||
flick(text("[]deny", src.base_state), src)
|
||||
else if(istype(AM, /obj/mecha))
|
||||
var/obj/mecha/mecha = AM
|
||||
if(density)
|
||||
if(mecha.occupant && src.allowed(mecha.occupant))
|
||||
open()
|
||||
sleep(50)
|
||||
close()
|
||||
if(mecha.occupant && src.allowed(mecha.occupant))
|
||||
open_and_close()
|
||||
else
|
||||
flick(text("[]deny", src.base_state), src)
|
||||
return
|
||||
if (!( ticker ))
|
||||
return
|
||||
if (src.operating)
|
||||
return
|
||||
if (src.density && src.allowed(AM))
|
||||
open()
|
||||
if(src.check_access(null))
|
||||
sleep(50)
|
||||
else //secure doors close faster
|
||||
sleep(20)
|
||||
close()
|
||||
var/mob/M = AM
|
||||
if(!M.restrained())
|
||||
bumpopen(M)
|
||||
return
|
||||
|
||||
/obj/machinery/door/window/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
/obj/machinery/door/window/bumpopen(mob/user as mob)
|
||||
if( operating || !src.density )
|
||||
return
|
||||
src.add_fingerprint(user)
|
||||
if(!src.requiresID())
|
||||
user = null
|
||||
|
||||
if(allowed(user))
|
||||
open_and_close()
|
||||
else
|
||||
flick(text("[]deny", src.base_state), src)
|
||||
return
|
||||
|
||||
/obj/machinery/door/window/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return 1
|
||||
if(get_dir(loc, target) == dir) //Make sure looking at appropriate border
|
||||
if(air_group) return 0
|
||||
return !density
|
||||
else
|
||||
return 1
|
||||
|
||||
|
||||
//used in the AStar algorithm to determinate if the turf the door is on is passable
|
||||
/obj/machinery/door/window/CanAStarPass(var/obj/item/weapon/card/id/ID, var/to_dir)
|
||||
return !density || (dir != to_dir) || check_access(ID)
|
||||
@@ -87,11 +93,17 @@
|
||||
else
|
||||
return 1
|
||||
|
||||
/obj/machinery/door/window/open()
|
||||
/obj/machinery/door/window/open(var/forced=0)
|
||||
if (src.operating == 1) //doors can still open when emag-disabled
|
||||
return 0
|
||||
if (!ticker)
|
||||
return 0
|
||||
if(!forced)
|
||||
if(stat & NOPOWER)
|
||||
return 0
|
||||
if(forced < 2)
|
||||
if(emagged)
|
||||
return 0
|
||||
if(!src.operating) //in case of emag
|
||||
src.operating = 1
|
||||
flick(text("[]opening", src.base_state), src)
|
||||
@@ -108,9 +120,15 @@
|
||||
src.operating = 0
|
||||
return 1
|
||||
|
||||
/obj/machinery/door/window/close()
|
||||
/obj/machinery/door/window/close(var/forced=0)
|
||||
if (src.operating)
|
||||
return 0
|
||||
if(!forced)
|
||||
if(stat & NOPOWER)
|
||||
return 0
|
||||
if(forced < 2)
|
||||
if(emagged)
|
||||
return 0
|
||||
src.operating = 1
|
||||
flick(text("[]closing", src.base_state), src)
|
||||
playsound(src.loc, 'sound/machines/windowdoor.ogg', 100, 1)
|
||||
@@ -121,7 +139,6 @@
|
||||
// if(src.visible)
|
||||
// SetOpacity(1) //TODO: why is this here? Opaque windoors? ~Carn
|
||||
update_nearby_tiles()
|
||||
|
||||
sleep(10)
|
||||
|
||||
src.operating = 0
|
||||
@@ -130,40 +147,29 @@
|
||||
/obj/machinery/door/window/proc/take_damage(var/damage)
|
||||
src.health = max(0, src.health - damage)
|
||||
if (src.health <= 0)
|
||||
getFromPool(/obj/item/weapon/shard, loc)
|
||||
var/obj/item/stack/cable_coil/CC = new /obj/item/stack/cable_coil(src.loc)
|
||||
CC.amount = 2
|
||||
var/obj/item/weapon/airlock_electronics/ae
|
||||
if(!electronics)
|
||||
ae = new/obj/item/weapon/airlock_electronics( src.loc )
|
||||
if(!src.req_access)
|
||||
src.check_access()
|
||||
if(src.req_access.len)
|
||||
ae.conf_access = src.req_access
|
||||
else if (src.req_one_access.len)
|
||||
ae.conf_access = src.req_one_access
|
||||
ae.one_access = 1
|
||||
else
|
||||
ae = electronics
|
||||
electronics = null
|
||||
ae.loc = src.loc
|
||||
if(operating == -1)
|
||||
ae.icon_state = "door_electronics_smoked"
|
||||
operating = 0
|
||||
var/debris = list(
|
||||
new /obj/item/weapon/shard(src.loc),
|
||||
new /obj/item/weapon/shard(src.loc),
|
||||
new /obj/item/stack/rods(src.loc, 2),
|
||||
new /obj/item/stack/cable_coil(src.loc, 2)
|
||||
)
|
||||
for(var/obj/fragment in debris)
|
||||
transfer_fingerprints_to(fragment)
|
||||
src.density = 0
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/machinery/door/window/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(Proj.damage)
|
||||
take_damage(round(Proj.damage / 2))
|
||||
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
take_damage(round(Proj.damage / 2))
|
||||
..()
|
||||
|
||||
//When an object is thrown at the window
|
||||
/obj/machinery/door/window/hitby(AM as mob|obj)
|
||||
|
||||
..()
|
||||
visible_message("\red <B>The glass door was hit by [AM].</B>", 1)
|
||||
visible_message("<span class='danger'>\The [src] was hit by \the [AM].</span>")
|
||||
var/tforce = 0
|
||||
if(ismob(AM))
|
||||
tforce = 40
|
||||
@@ -174,113 +180,159 @@
|
||||
//..() //Does this really need to be here twice? The parent proc doesn't even do anything yet. - Nodrak
|
||||
return
|
||||
|
||||
/obj/machinery/door/window/attack_ghost(mob/user as mob)
|
||||
/obj/machinery/door/window/mech_melee_attack(obj/mecha/M)
|
||||
if(M.damtype == "brute")
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
M.occupant_message("<span class='danger'>You hit [src].</span>")
|
||||
visible_message("<span class='danger'>[src] has been hit by [M.name].</span>")
|
||||
take_damage(M.force)
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/door/window/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/door/window/attack_paw(mob/user as mob)
|
||||
if(istype(user, /mob/living/carbon/alien/humanoid))
|
||||
if(src.operating)
|
||||
return
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
visible_message("\red <B>[user] smashes against the [src.name].</B>", 1)
|
||||
if (src.health <= 0)
|
||||
getFromPool(/obj/item/weapon/shard, loc)
|
||||
var/obj/item/stack/cable_coil/CC = new /obj/item/stack/cable_coil(src.loc)
|
||||
CC.amount = 2
|
||||
src.density = 0
|
||||
del(src)
|
||||
else
|
||||
return src.attack_hand(user)
|
||||
/obj/machinery/door/window/proc/attack_generic(mob/user as mob, damage = 0)
|
||||
if(src.operating)
|
||||
return
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
user.visible_message("<span class='danger'>[user] smashes against the [src.name].</span>", \
|
||||
"<span class='userdanger'>[user] smashes against the [src.name].</span>")
|
||||
take_damage(damage)
|
||||
|
||||
/obj/machinery/door/window/attack_alien(mob/living/user as mob)
|
||||
if(islarva(user))
|
||||
return
|
||||
attack_generic(user, 25)
|
||||
|
||||
/obj/machinery/door/window/attack_animal(mob/living/user as mob)
|
||||
if(!isanimal(user))
|
||||
return
|
||||
var/mob/living/simple_animal/M = user
|
||||
if(M.melee_damage_upper <= 0)
|
||||
return
|
||||
attack_generic(M, M.melee_damage_upper)
|
||||
|
||||
|
||||
/obj/machinery/door/window/attack_slime(mob/living/carbon/slime/user as mob)
|
||||
if(!user.is_adult)
|
||||
return
|
||||
attack_generic(user, 25)
|
||||
|
||||
/obj/machinery/door/window/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/door/window/attack_hand(mob/user as mob)
|
||||
return src.attackby(user, user)
|
||||
|
||||
/obj/machinery/door/window/attack_animal(mob/user as mob)
|
||||
if(!isanimal(user)) return
|
||||
var/mob/living/simple_animal/M = user
|
||||
if(M.melee_damage_upper <= 0) return
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
visible_message("\red <B>[user] smashes against the [src.name].</B>", 1)
|
||||
take_damage(M.melee_damage_upper)
|
||||
|
||||
/obj/machinery/door/window/attackby(obj/item/weapon/I as obj, mob/user as mob)
|
||||
/obj/machinery/door/window/attackby(obj/item/weapon/I as obj, mob/living/user as mob)
|
||||
|
||||
//If it's in the process of opening/closing, ignore the click
|
||||
if (src.operating == 1)
|
||||
if (src.operating)
|
||||
return
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
//Emags and ninja swords? You may pass.
|
||||
if (src.density && (istype(I, /obj/item/weapon/card/emag)||istype(I, /obj/item/weapon/melee/energy/blade)))
|
||||
src.operating = -1
|
||||
flick("[src.base_state]spark", src)
|
||||
sleep(6)
|
||||
desc += "<BR><span class='warning'>Its access panel is smoking slightly.</span>"
|
||||
if(istype(I, /obj/item/weapon/melee/energy/blade))
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src.loc)
|
||||
spark_system.start()
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
visible_message("\blue The glass door was sliced open by [user]!")
|
||||
flick("[src.base_state]spark", src)
|
||||
sleep(6)
|
||||
visible_message("<span class='warning'> The glass door was sliced open by [user]!</span>")
|
||||
open(2)
|
||||
emagged = 1
|
||||
return 1
|
||||
open()
|
||||
emagged = 1
|
||||
return 1
|
||||
|
||||
//If it's emagged, crowbar can pry electronics out.
|
||||
if (src.operating == -1 && istype(I, /obj/item/weapon/crowbar))
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user.visible_message("[user] removes the electronics from the windoor.", "You start to remove electronics from the windoor.")
|
||||
if (do_after(user,40))
|
||||
user << "\blue You removed the windoor electronics!"
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
if(src.density || src.operating)
|
||||
user << "<span class='warning'>You need to open the door to access the maintenance panel.</span>"
|
||||
return
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
src.p_open = !( src.p_open )
|
||||
user << "<span class='notice'>You [p_open ? "open":"close"] the maintenance panel of the [src.name].</span>"
|
||||
return
|
||||
|
||||
var/obj/structure/windoor_assembly/wa = new/obj/structure/windoor_assembly(src.loc)
|
||||
if (istype(src, /obj/machinery/door/window/brigdoor))
|
||||
wa.secure = "secure_"
|
||||
wa.name = "Secure Wired Windoor Assembly"
|
||||
if(istype(I, /obj/item/weapon/crowbar))
|
||||
if(p_open && !src.density && !src.operating)
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user.visible_message("<span class='warning'>[user] removes the electronics from the [src.name].</span>", \
|
||||
"You start to remove electronics from the [src.name].")
|
||||
if(do_after(user,40))
|
||||
if(src.p_open && !src.density && !src.operating && src.loc)
|
||||
var/obj/structure/windoor_assembly/WA = new /obj/structure/windoor_assembly(src.loc)
|
||||
switch(base_state)
|
||||
if("left")
|
||||
WA.facing = "l"
|
||||
if("right")
|
||||
WA.facing = "r"
|
||||
if("leftsecure")
|
||||
WA.facing = "l"
|
||||
WA.secure = 1
|
||||
if("rightsecure")
|
||||
WA.facing = "r"
|
||||
WA.secure = 1
|
||||
WA.anchored = 1
|
||||
WA.state= "02"
|
||||
WA.dir = src.dir
|
||||
WA.ini_dir = src.dir
|
||||
WA.update_icon()
|
||||
WA.created_name = src.name
|
||||
|
||||
if(emagged)
|
||||
user << "<span class='warning'>You discard the damaged electronics.</span>"
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
user << "<span class='notice'>You removed the airlock electronics!</span>"
|
||||
|
||||
var/obj/item/weapon/airlock_electronics/ae
|
||||
if(!electronics)
|
||||
ae = new/obj/item/weapon/airlock_electronics( src.loc )
|
||||
if(!src.req_access)
|
||||
src.check_access()
|
||||
if(src.req_access.len)
|
||||
ae.conf_access = src.req_access
|
||||
else if (src.req_one_access.len)
|
||||
ae.conf_access = src.req_one_access
|
||||
ae.one_access = 1
|
||||
else
|
||||
ae = electronics
|
||||
electronics = null
|
||||
ae.loc = src.loc
|
||||
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
//If windoor is unpowered, crowbar, fireaxe and armblade can force it.
|
||||
if(istype(I, /obj/item/weapon/crowbar) || istype(I, /obj/item/weapon/twohanded/fireaxe))
|
||||
if(stat & NOPOWER)
|
||||
if(src.density)
|
||||
open(2)
|
||||
else
|
||||
wa.name = "Wired Windoor Assembly"
|
||||
if (src.base_state == "right" || src.base_state == "rightsecure")
|
||||
wa.facing = "r"
|
||||
wa.dir = src.dir
|
||||
wa.state = "02"
|
||||
wa.update_icon()
|
||||
|
||||
var/obj/item/weapon/airlock_electronics/ae
|
||||
if(!electronics)
|
||||
ae = new/obj/item/weapon/airlock_electronics( src.loc )
|
||||
if(!src.req_access)
|
||||
src.check_access()
|
||||
if(src.req_access.len)
|
||||
ae.conf_access = src.req_access
|
||||
else if (src.req_one_access.len)
|
||||
ae.conf_access = src.req_one_access
|
||||
ae.one_access = 1
|
||||
else
|
||||
ae = electronics
|
||||
electronics = null
|
||||
ae.loc = src.loc
|
||||
ae.icon_state = "door_electronics_smoked"
|
||||
|
||||
operating = 0
|
||||
del(src)
|
||||
close(2)
|
||||
return
|
||||
|
||||
//If it's a weapon, smash windoor. Unless it's an id card, agent card, ect.. then ignore it (Cards really shouldnt damage a door anyway)
|
||||
if(src.density && istype(I, /obj/item/weapon) && !istype(I, /obj/item/weapon/card))
|
||||
if(src.density && istype(I, /obj/item/weapon) && !istype(I, /obj/item/weapon/card) )
|
||||
if( (I.flags&NOBLUDGEON) || !I.force )
|
||||
return
|
||||
var/aforce = I.force
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
visible_message("\red <B>[src] was hit by [I].</B>")
|
||||
if (src.health <= 0)
|
||||
getFromPool(/obj/item/weapon/shard, loc)
|
||||
var/obj/item/stack/cable_coil/CC = new /obj/item/stack/cable_coil(src.loc)
|
||||
CC.amount = 2
|
||||
src.density = 0
|
||||
del(src)
|
||||
visible_message("<span class='danger'>\The [src] has been hit by [user] with [I].</span>")
|
||||
if(I.damtype == BURN || I.damtype == BRUTE)
|
||||
take_damage(aforce)
|
||||
return
|
||||
|
||||
|
||||
src.add_fingerprint(user)
|
||||
if (!src.requiresID())
|
||||
//don't care who they are or what they have, act as if they're NOTHING
|
||||
user = null
|
||||
@@ -299,11 +351,10 @@
|
||||
|
||||
|
||||
/obj/machinery/door/window/brigdoor
|
||||
name = "Secure Door"
|
||||
name = "secure door"
|
||||
icon = 'icons/obj/doors/windoor.dmi'
|
||||
icon_state = "leftsecure"
|
||||
base_state = "leftsecure"
|
||||
req_access = list(access_security)
|
||||
var/id = null
|
||||
health = 300.0 //Stronger doors for prison (regular window door health is 200)
|
||||
|
||||
|
||||
@@ -12,7 +12,9 @@
|
||||
|
||||
// Plant maintenance vars.
|
||||
var/waterlevel = 100 // Water level (max 100)
|
||||
var/maxwater = 100
|
||||
var/nutrilevel = 10 // Nutrient level (max 10)
|
||||
var/maxnutri = 10
|
||||
var/pestlevel = 0 // Pests (max 10)
|
||||
var/weedlevel = 0 // Weeds (max 10)s
|
||||
|
||||
@@ -37,6 +39,9 @@
|
||||
// Seed details/line data.
|
||||
var/datum/seed/seed = null // The currently planted seed
|
||||
|
||||
// Construction
|
||||
var/unwrenchable = 1
|
||||
|
||||
// Reagent information for process(), consider moving this to a controller along
|
||||
// with cycle information under 'mechanical concerns' at some point.
|
||||
var/global/list/toxic_reagents = list(
|
||||
@@ -111,34 +116,56 @@
|
||||
"left4zed" = list( 0, 0, 0.2 )
|
||||
)
|
||||
|
||||
// Mutagen list specifies minimum value for the mutation to take place, rather
|
||||
// than a bound as the lists above specify.
|
||||
//--FalseIncarnate
|
||||
// Mutagen list specifies reagent_min_value and reagent_step
|
||||
// Reagent_min_value (value 1) is the minimum number of units needed to begin mutations
|
||||
// Reagent_step (value 2) is the number of units between each mutation threshold
|
||||
var/global/list/mutagenic_reagents = list(
|
||||
"radium" = list(8,3),
|
||||
"mutagen" = list(3,8)
|
||||
"radium" = list(10,10),
|
||||
"mutagen" = list(1,5)
|
||||
)
|
||||
//--FalseIncarnate
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/New()
|
||||
..()
|
||||
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/hydroponics(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
||||
RefreshParts()
|
||||
|
||||
create_reagents(200)
|
||||
connect()
|
||||
update_icon()
|
||||
if(closed_system)
|
||||
flags &= ~OPENCONTAINER
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/RefreshParts()
|
||||
var/tmp_capacity = 0
|
||||
for (var/obj/item/weapon/stock_parts/matter_bin/M in component_parts)
|
||||
tmp_capacity += M.rating
|
||||
maxwater = tmp_capacity * 50 // Up to 300
|
||||
maxnutri = tmp_capacity * 5 // Up to 30
|
||||
//waterlevel = maxwater
|
||||
//nutrilevel = 3
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/bullet_act(var/obj/item/projectile/Proj)
|
||||
|
||||
//Don't act on seeds like dionaea that shouldn't change.
|
||||
if(seed && seed.immutable > 0)
|
||||
return
|
||||
|
||||
//Override for somatoray projectiles.
|
||||
if(istype(Proj ,/obj/item/projectile/energy/floramut) && prob(20))
|
||||
mutate(1)
|
||||
//--FalseIncarnate
|
||||
//Override for somatoray projectiles, updated to work with new mutation rework
|
||||
if(istype(Proj ,/obj/item/projectile/energy/floramut))
|
||||
mutate("F1")
|
||||
return
|
||||
else if(istype(Proj ,/obj/item/projectile/energy/florayield) && prob(20))
|
||||
yield_mod = min(10,yield_mod+rand(1,2))
|
||||
else if(istype(Proj ,/obj/item/projectile/energy/florayield))
|
||||
mutate("F2")
|
||||
return
|
||||
//--FalseIncarnate
|
||||
|
||||
..()
|
||||
|
||||
@@ -336,15 +363,27 @@
|
||||
mutation_mod += beneficial_reagents[R.id][3] * reagent_total
|
||||
|
||||
// Mutagen is distinct from the previous types and mostly has a chance of proccing a mutation.
|
||||
|
||||
//--FalseIncarnate
|
||||
// Mutation rework, will now use "thresholds" for proccing types of mutations and their respective chances.
|
||||
// This should make it easier to avoid species shifts when trying to only affect stats like potency.
|
||||
// Additionally, the chance of mutations will vary depending on the amount of mutagenic reagents added.
|
||||
if(mutagenic_reagents[R.id])
|
||||
var/reagent_min_value = mutagenic_reagents[R.id][1]
|
||||
var/reagent_value = mutagenic_reagents[R.id][2]+mutation_mod
|
||||
var/reagent_min_value = mutagenic_reagents[R.id][1] //10 for radium, 1 for unstable mutagen
|
||||
var/reagent_step = mutagenic_reagents[R.id][2] //10 for radium, 5 for unstable mutagen
|
||||
|
||||
if(reagent_total >= reagent_min_value)
|
||||
if(prob(min(reagent_total*reagent_value,100)))
|
||||
mutate(reagent_total > 10 ? 2 : 1)
|
||||
if(reagent_total >= reagent_min_value + (3 * reagent_step)) //31+ for radium, 16+ for unstable mutagen
|
||||
mutate(4)
|
||||
else if(reagent_total >= reagent_min_value + (2 * reagent_step)) //21-30 for radium, 11-15 for unstable mutagen
|
||||
mutate(3)
|
||||
else if(reagent_total >= reagent_min_value + reagent_step) //11-20 for radium, 6-10 for unstable mutagen
|
||||
mutate(2)
|
||||
else if(reagent_total >= reagent_min_value) //1-10 for radium, 1-5 for unstable mutagen
|
||||
mutate(1)
|
||||
|
||||
// Handle nutrient refilling.
|
||||
//--FalseIncarnate
|
||||
|
||||
// Handle nutrient refilling
|
||||
if(nutrient_reagents[R.id])
|
||||
nutrilevel += nutrient_reagents[R.id] * reagent_total
|
||||
|
||||
@@ -484,26 +523,6 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/proc/mutate(var/severity)
|
||||
|
||||
// No seed, no mutations.
|
||||
if(!seed)
|
||||
return
|
||||
|
||||
// Check if we should even bother working on the current seed datum.
|
||||
if(seed.mutants. && seed.mutants.len && severity > 1 && prob(10+mutation_mod))
|
||||
mutate_species()
|
||||
return
|
||||
|
||||
// We need to make sure we're not modifying one of the global seed datums.
|
||||
// If it's not in the global list, then no products of the line have been
|
||||
// harvested yet and it's safe to assume it's restricted to this tray.
|
||||
if(!isnull(seed_types[seed.name]))
|
||||
seed = seed.diverge()
|
||||
seed.mutate(severity,get_turf(src))
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/proc/check_level_sanity()
|
||||
//Make sure various values are sane.
|
||||
if(seed)
|
||||
@@ -512,12 +531,108 @@
|
||||
health = 0
|
||||
dead = 0
|
||||
|
||||
nutrilevel = max(0,min(nutrilevel,10))
|
||||
waterlevel = max(0,min(waterlevel,100))
|
||||
nutrilevel = max(0,min(nutrilevel,maxnutri))
|
||||
waterlevel = max(0,min(waterlevel,maxwater))
|
||||
pestlevel = max(0,min(pestlevel,10))
|
||||
weedlevel = max(0,min(weedlevel,10))
|
||||
toxins = max(0,min(toxins,10))
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/proc/mutate(var/severity)
|
||||
|
||||
// No seed, no mutations.
|
||||
if(!seed)
|
||||
return
|
||||
|
||||
/*
|
||||
--FalseIncarnate
|
||||
New mutation system, now uses "Mutation Tiers" to adjust the chances of mutations
|
||||
Tier 1 has a low chance of causing a stat mutation
|
||||
Tier 2 has a higher chance of causing a stat mutation
|
||||
Tier 3 has a low chance of causing a species shift (if possible), and will ALWAYS cause a stat mutation if it does not shift species
|
||||
Tier 4 has a higher chance of causing a species shift (if possible), and will ALWAYS cause a stat mutation if it does not shift species
|
||||
Tier 4 also has a low chance to cause a SECOND stat mutation when it does not shift species
|
||||
All mutation chances are increased by the mutation_mod value. Mutation_mod is not transferred into seeds/harvests, and is reset when the plant dies
|
||||
|
||||
*/
|
||||
|
||||
switch(severity)
|
||||
//Reagent Tiers
|
||||
if(1) //Tier 1
|
||||
if(prob(20+mutation_mod)) //Low chance of stat mutation
|
||||
if(!isnull(seed_types[seed.name]))
|
||||
seed = seed.diverge()
|
||||
seed.mutate(1,get_turf(src))
|
||||
return
|
||||
if(2) //Tier 2
|
||||
if(prob(60+mutation_mod)) //Higher chance of stat mutation
|
||||
if(!isnull(seed_types[seed.name]))
|
||||
seed = seed.diverge()
|
||||
seed.mutate(1,get_turf(src))
|
||||
return
|
||||
if(3) //Tier 3
|
||||
if(prob(20+mutation_mod)) //Low chance of species shift mutation
|
||||
if(seed.mutants. && seed.mutants.len) //Check if current seed/plant has mutant species
|
||||
mutate_species()
|
||||
else //No mutant species, mutate stats instead
|
||||
if(!isnull(seed_types[seed.name]))
|
||||
seed = seed.diverge()
|
||||
seed.mutate(1,get_turf(src))
|
||||
return
|
||||
else //Failed to shift, mutate stats instead
|
||||
if(!isnull(seed_types[seed.name]))
|
||||
seed = seed.diverge()
|
||||
seed.mutate(1,get_turf(src))
|
||||
return
|
||||
if(4) //Tier 4
|
||||
if(prob(60+mutation_mod)) //Higher chance of species shift mutation
|
||||
if(seed.mutants. && seed.mutants.len) //Check if current seed/plant has mutant species
|
||||
mutate_species()
|
||||
else //No mutant species, mutate stats instead
|
||||
if(!isnull(seed_types[seed.name]))
|
||||
seed = seed.diverge()
|
||||
seed.mutate(1,get_turf(src))
|
||||
if(prob(20+mutation_mod)) //Low chance for second stat mutation
|
||||
if(!isnull(seed_types[seed.name]))
|
||||
seed = seed.diverge()
|
||||
seed.mutate(1,get_turf(src))
|
||||
return
|
||||
else //Failed to shift, mutate stats instead
|
||||
if(!isnull(seed_types[seed.name]))
|
||||
seed = seed.diverge()
|
||||
seed.mutate(1,get_turf(src))
|
||||
if(prob(20+mutation_mod)) //Low chance for second stat mutation
|
||||
if(!isnull(seed_types[seed.name]))
|
||||
seed = seed.diverge()
|
||||
seed.mutate(1,get_turf(src))
|
||||
return
|
||||
//Floral Somatoray Tiers
|
||||
if("F1") //Random Stat Tier
|
||||
if(prob(80+mutation_mod)) //EVEN Higher chance of stat mutation
|
||||
if(!isnull(seed_types[seed.name]))
|
||||
seed = seed.diverge()
|
||||
seed.mutate(1,get_turf(src))
|
||||
return
|
||||
if("F2") //Yield Tier
|
||||
if(prob(40+mutation_mod)) //Medium chance of Yield stat mutation
|
||||
if(!isnull(seed_types[seed.name]))
|
||||
seed = seed.diverge()
|
||||
if(seed.immutable <= 0 && seed.yield != -1) //Check if the plant can be mutated and has a yield to mutate
|
||||
seed.yield = seed.yield + rand(-2, 2) //Randomly adjust yield
|
||||
if(seed.yield < 0) //If yield would drop below 0 after adjustment, set to 0 to allow further attempts
|
||||
seed.yield = 0
|
||||
return
|
||||
|
||||
/* code references
|
||||
// We need to make sure we're not modifying one of the global seed datums.
|
||||
// If it's not in the global list, then no products of the line have been
|
||||
// harvested yet and it's safe to assume it's restricted to this tray.
|
||||
if(!isnull(seed_types[seed.name]))
|
||||
seed = seed.diverge()
|
||||
seed.mutate(severity,get_turf(src))
|
||||
*/
|
||||
|
||||
//--FalseIncarnate
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/proc/mutate_species()
|
||||
|
||||
var/previous_plant = seed.display_name
|
||||
@@ -528,7 +643,7 @@
|
||||
return
|
||||
|
||||
dead = 0
|
||||
mutate(1)
|
||||
//mutate(1)
|
||||
age = 0
|
||||
health = seed.endurance
|
||||
lastcycle = world.time
|
||||
@@ -541,6 +656,14 @@
|
||||
return
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(exchange_parts(user, O))
|
||||
return
|
||||
|
||||
if(istype(O, /obj/item/weapon/crowbar))
|
||||
if(anchored==2)
|
||||
user << "Unscrew the hoses first!"
|
||||
return
|
||||
default_deconstruction_crowbar(O, 1)
|
||||
|
||||
//--FalseIncarnate
|
||||
//Check if held item is an open container
|
||||
@@ -612,7 +735,37 @@
|
||||
else
|
||||
user << "There's nothing in [src] to spray!"
|
||||
|
||||
//--FalseIncarnate
|
||||
else if(istype(O, /obj/item/weapon/wrench) && unwrenchable)
|
||||
if(anchored == 2)
|
||||
user << "Unscrew the hoses first!"
|
||||
return
|
||||
|
||||
if(!anchored && !isinspace())
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
anchored = 1
|
||||
user << "You wrench [src] in place."
|
||||
else if(anchored)
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
anchored = 0
|
||||
user << "You unwrench [src]."
|
||||
|
||||
else if(istype(O, /obj/item/weapon/screwdriver) && unwrenchable) //THIS NEED TO BE DONE DIFFERENTLY, SOMEONE REFACTOR THE TRAY CODE ALREADY
|
||||
if(anchored)
|
||||
if(anchored == 2)
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
anchored = 1
|
||||
user << "You unscrew the [src]'s hoses."
|
||||
panel_open = 0
|
||||
|
||||
else if(anchored == 1)
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
anchored = 2
|
||||
user << "You screw in the [src]'s hoses."
|
||||
panel_open = 1
|
||||
|
||||
for(var/obj/machinery/portable_atmospherics/hydroponics/h in range(1,src))
|
||||
spawn()
|
||||
h.update_icon()
|
||||
|
||||
//Held item is not an open container, check to see if it can be used (this code was already here) --FalseIncarnate
|
||||
if(istype(O, /obj/item/weapon/wirecutters) || istype(O, /obj/item/weapon/scalpel))
|
||||
|
||||
@@ -162,6 +162,8 @@
|
||||
else
|
||||
src.occupant.LAssailant = user
|
||||
|
||||
src.occupant.emote("scream")
|
||||
playsound(src.loc, 'sound/effects/gib.ogg', 50, 1)
|
||||
src.occupant.death(1)
|
||||
src.occupant.ghostize()
|
||||
del(src.occupant)
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
var/global/list/acceptable_items // List of the items you can put in
|
||||
var/global/list/acceptable_reagents // List of the reagents you can put in
|
||||
var/global/max_n_of_items = 0
|
||||
var/efficiency
|
||||
|
||||
|
||||
// see code/modules/food/recipes_microwave.dm for recipes
|
||||
@@ -43,11 +44,44 @@
|
||||
if (recipe.items)
|
||||
max_n_of_items = max(max_n_of_items,recipe.items.len)
|
||||
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/microwave(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 2)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/microwave/RefreshParts()
|
||||
var/E
|
||||
for(var/obj/item/weapon/stock_parts/micro_laser/M in component_parts)
|
||||
E += M.rating
|
||||
efficiency = E
|
||||
|
||||
/*******************
|
||||
* Item Adding
|
||||
********************/
|
||||
|
||||
/obj/machinery/microwave/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(operating)
|
||||
return
|
||||
if(!broken && dirty < 100)
|
||||
if(default_deconstruction_screwdriver(user, "mw-o", "mw", O))
|
||||
return
|
||||
if(exchange_parts(user, O))
|
||||
return
|
||||
if(istype(O, /obj/item/weapon/wrench))
|
||||
playsound(src, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(anchored)
|
||||
anchored = 0
|
||||
user << "<span class='caution'>The [src] can now be moved.</span>"
|
||||
return
|
||||
else if(!anchored)
|
||||
anchored = 1
|
||||
user << "<span class='caution'>The [src] is now secured.</span>"
|
||||
return
|
||||
|
||||
default_deconstruction_crowbar(O)
|
||||
|
||||
if(src.broken > 0)
|
||||
if(src.broken == 2 && istype(O, /obj/item/weapon/screwdriver)) // If it's broken and they're using a screwdriver
|
||||
user.visible_message( \
|
||||
@@ -78,7 +112,7 @@
|
||||
user << "\red It's broken!"
|
||||
return 1
|
||||
else if(src.dirty==100) // The microwave is all dirty so can't be used!
|
||||
if(istype(O, /obj/item/weapon/reagent_containers/spray/cleaner)) // If they're trying to clean it then let them
|
||||
if(istype(O, /obj/item/weapon/reagent_containers/spray/cleaner) || istype(O, /obj/item/weapon/soap)) // If they're trying to clean it then let them
|
||||
user.visible_message( \
|
||||
"\blue [user] starts to clean the microwave.", \
|
||||
"\blue You start to clean the microwave." \
|
||||
@@ -147,6 +181,8 @@
|
||||
********************/
|
||||
|
||||
/obj/machinery/microwave/interact(mob/user as mob) // The microwave Menu
|
||||
if(panel_open || !anchored)
|
||||
return
|
||||
var/dat = ""
|
||||
if(src.broken > 0)
|
||||
dat = {"<TT>Bzzzzttttt</TT>"}
|
||||
@@ -269,7 +305,8 @@
|
||||
stop()
|
||||
if(cooked)
|
||||
cooked.loc = src.loc
|
||||
score_meals++
|
||||
for(var/i=1,i<efficiency,i++)
|
||||
cooked = new cooked.type(loc)
|
||||
return
|
||||
|
||||
/obj/machinery/microwave/proc/wzhzhzh(var/seconds as num)
|
||||
@@ -355,7 +392,7 @@
|
||||
return ffuu
|
||||
|
||||
/obj/machinery/microwave/Topic(href, href_list)
|
||||
if(..())
|
||||
if(..() || panel_open)
|
||||
return
|
||||
|
||||
usr.set_machine(src)
|
||||
|
||||
@@ -272,26 +272,50 @@ Class Procs:
|
||||
uid = gl_uid
|
||||
gl_uid++
|
||||
|
||||
/obj/machinery/proc/default_deconstruction_crowbar()
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(src.loc)
|
||||
M.state = 2
|
||||
M.icon_state = "box_1"
|
||||
for(var/obj/I in component_parts)
|
||||
if(I.reliability != 100 && crit_fail)
|
||||
I.crit_fail = 1
|
||||
I.loc = src.loc
|
||||
del(src)
|
||||
/obj/machinery/proc/default_deconstruction_crowbar(var/obj/item/weapon/crowbar/C, var/ignore_panel = 0)
|
||||
if(istype(C) && (panel_open || ignore_panel))
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(src.loc)
|
||||
M.state = 2
|
||||
M.icon_state = "box_1"
|
||||
for(var/obj/item/I in component_parts)
|
||||
if(I.reliability != 100 && crit_fail)
|
||||
I.crit_fail = 1
|
||||
I.loc = src.loc
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/proc/default_deconstruction_screwdriver(var/mob/user, var/icon_state_open, var/icon_state_closed)
|
||||
if (!panel_open)
|
||||
panel_open = 1
|
||||
icon_state = icon_state_open
|
||||
user << "<span class='notice'>You open the maintenance hatch of [src].</span>"
|
||||
else
|
||||
panel_open = 0
|
||||
icon_state = icon_state_closed
|
||||
user << "<span class='notice'>You close the maintenance hatch of [src].</span>"
|
||||
/obj/machinery/proc/default_deconstruction_screwdriver(var/mob/user, var/icon_state_open, var/icon_state_closed, var/obj/item/weapon/screwdriver/S)
|
||||
if(istype(S))
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
if(!panel_open)
|
||||
panel_open = 1
|
||||
icon_state = icon_state_open
|
||||
user << "<span class='notice'>You open the maintenance hatch of [src].</span>"
|
||||
else
|
||||
panel_open = 0
|
||||
icon_state = icon_state_closed
|
||||
user << "<span class='notice'>You close the maintenance hatch of [src].</span>"
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/machinery/proc/default_change_direction_wrench(var/mob/user, var/obj/item/weapon/wrench/W)
|
||||
if(panel_open && istype(W))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
dir = pick(WEST,EAST,SOUTH,NORTH)
|
||||
user << "<span class='notice'>You clumsily rotate [src].</span>"
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/machinery/proc/default_unfasten_wrench(mob/user, obj/item/weapon/wrench/W, time = 20)
|
||||
if(istype(W))
|
||||
user << "<span class='notice'>Now [anchored ? "un" : ""]securing [name].</span>"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user, time))
|
||||
user << "<span class='notice'>You've [anchored ? "un" : ""]secured [name].</span>"
|
||||
anchored = !anchored
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/machinery/proc/state(var/msg)
|
||||
for(var/mob/O in hearers(src, null))
|
||||
@@ -304,15 +328,16 @@ Class Procs:
|
||||
state(text, "blue")
|
||||
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
|
||||
|
||||
/obj/machinery/proc/exchange_parts(mob/user, obj/item/weapon/storage/part_replacer/W)
|
||||
/obj/machinery/proc/exchange_parts(mob/user, obj/item/weapon/storage/part_replacer/W)
|
||||
var/shouldplaysound = 0
|
||||
if(istype(W) && component_parts)
|
||||
if(panel_open)
|
||||
var/obj/item/weapon/circuitboard/CB = locate(/obj/item/weapon/circuitboard) in component_parts
|
||||
var/P
|
||||
for(var/obj/item/weapon/stock_parts/A in component_parts)
|
||||
for(var/D in CB.req_components)
|
||||
if(ispath(A.type, text2path(D)))
|
||||
P = text2path(D)
|
||||
if(ispath(A.type, D))
|
||||
P = D
|
||||
break
|
||||
for(var/obj/item/weapon/stock_parts/B in W.contents)
|
||||
if(istype(B, P) && istype(A, P))
|
||||
@@ -323,12 +348,31 @@ Class Procs:
|
||||
component_parts += B
|
||||
B.loc = null
|
||||
user << "<span class='notice'>[A.name] replaced with [B.name].</span>"
|
||||
shouldplaysound = 1
|
||||
break
|
||||
// Power cell snowflake
|
||||
for(var/obj/item/weapon/cell/A in component_parts)
|
||||
for(var/D in CB.req_components)
|
||||
if(ispath(A.type, D))
|
||||
P = D
|
||||
break
|
||||
for(var/obj/item/weapon/cell/B in W.contents)
|
||||
if(istype(B, P) && istype(A, P))
|
||||
if(B.rating > A.rating)
|
||||
W.remove_from_storage(B, src)
|
||||
W.handle_item_insertion(A, 1)
|
||||
component_parts -= A
|
||||
component_parts += B
|
||||
B.loc = null
|
||||
user << "<span class='notice'>[A.name] replaced with [B.name].</span>"
|
||||
break
|
||||
RefreshParts()
|
||||
else
|
||||
user << "<span class='notice'>Following parts detected in the machine:</span>"
|
||||
for(var/var/obj/item/C in component_parts)
|
||||
user << "<span class='notice'> [C.name]</span>"
|
||||
if(shouldplaysound)
|
||||
W.play_rped_sound()
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
@@ -47,11 +47,12 @@ Growing it to term with nothing injected will grab a ghost from the observers. *
|
||||
for(var/mob/O in respawnable_list)
|
||||
if(O.mind == source.mind && config.revival_pod_plants)
|
||||
message_admins("Found mind, asking for respawn")
|
||||
switch(alert(O,"Your corpse has been placed into a pod plant. Do you want to be resurrected/cloned? Please not if you select 'No', you will be able to be cloned or borged again this round.","Pod Alert","Yes","No"))
|
||||
switch(alert(O,"Your corpse has been placed into a pod plant. Do you want to be resurrected/cloned? Please note if you select 'No', you will still be able to be cloned or borged again this round.","Pod Alert","Yes","No"))
|
||||
if("Yes")
|
||||
source.key = O.key
|
||||
return
|
||||
if("No")
|
||||
user << "The seeds seem to reject the blood, returning to their original size as they stop quivering."
|
||||
return
|
||||
else
|
||||
user << "Nothing happens."
|
||||
|
||||
@@ -8,187 +8,214 @@
|
||||
idle_power_usage = 5
|
||||
active_power_usage = 1000
|
||||
var/mob/occupant = null
|
||||
var/circuitboard = "/obj/item/weapon/circuitboard/cyborgrecharger"
|
||||
var/recharge_speed
|
||||
var/repairs
|
||||
|
||||
/obj/machinery/recharge_station/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/cyborgrecharger(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
||||
component_parts += new /obj/item/weapon/cell/high(src)
|
||||
RefreshParts()
|
||||
build_icon()
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
build_icon()
|
||||
|
||||
process()
|
||||
if(!(NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
if(src.occupant)
|
||||
process_occupant()
|
||||
return 1
|
||||
|
||||
|
||||
allow_drop()
|
||||
return 0
|
||||
|
||||
|
||||
relaymove(mob/user as mob)
|
||||
if(user.stat)
|
||||
return
|
||||
src.go_out()
|
||||
/obj/machinery/recharge_station/RefreshParts()
|
||||
recharge_speed = 0
|
||||
repairs = 0
|
||||
for(var/obj/item/weapon/stock_parts/capacitor/C in component_parts)
|
||||
recharge_speed += C.rating * 100
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
|
||||
repairs += M.rating - 1
|
||||
for(var/obj/item/weapon/cell/C in component_parts)
|
||||
recharge_speed *= C.maxcharge / 10000
|
||||
|
||||
/obj/machinery/recharge_station/process()
|
||||
if(!(NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
emp_act(severity)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
..(severity)
|
||||
return
|
||||
if(occupant)
|
||||
occupant.emp_act(severity)
|
||||
go_out()
|
||||
..(severity)
|
||||
|
||||
proc
|
||||
build_icon()
|
||||
if(NOPOWER|BROKEN)
|
||||
if(src.occupant)
|
||||
icon_state = "borgcharger1"
|
||||
else
|
||||
icon_state = "borgcharger0"
|
||||
else
|
||||
icon_state = "borgcharger0"
|
||||
|
||||
if(src.occupant)
|
||||
process_occupant()
|
||||
if(src.occupant)
|
||||
if (istype(occupant, /mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = occupant
|
||||
restock_modules()
|
||||
if(!R.cell)
|
||||
return
|
||||
else if(R.cell.charge >= R.cell.maxcharge)
|
||||
R.cell.charge = R.cell.maxcharge
|
||||
return
|
||||
else
|
||||
R.cell.charge = min(R.cell.charge + 200, R.cell.maxcharge)
|
||||
return
|
||||
return 1
|
||||
|
||||
/obj/machinery/recharge_station/allow_drop()
|
||||
return 0
|
||||
|
||||
/obj/machinery/recharge_station/relaymove(mob/user as mob)
|
||||
if(user.stat)
|
||||
return
|
||||
src.go_out()
|
||||
return
|
||||
|
||||
/obj/machinery/recharge_station/emp_act(severity)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
..(severity)
|
||||
return
|
||||
if(occupant)
|
||||
occupant.emp_act(severity)
|
||||
go_out()
|
||||
if(!( src.occupant ))
|
||||
return
|
||||
//for(var/obj/O in src)
|
||||
// O.loc = src.loc
|
||||
if (src.occupant.client)
|
||||
src.occupant.client.eye = src.occupant.client.mob
|
||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||
src.occupant.loc = src.loc
|
||||
src.occupant = null
|
||||
build_icon()
|
||||
src.use_power = 1
|
||||
return
|
||||
..(severity)
|
||||
|
||||
/obj/machinery/recharge_station/proc/build_icon()
|
||||
if(NOPOWER|BROKEN)
|
||||
if(src.occupant)
|
||||
icon_state = "borgcharger1"
|
||||
else
|
||||
icon_state = "borgcharger0"
|
||||
else
|
||||
icon_state = "borgcharger0"
|
||||
|
||||
restock_modules()
|
||||
if(src.occupant)
|
||||
if(istype(occupant, /mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = occupant
|
||||
if(R.module && R.module.modules)
|
||||
var/list/um = R.contents|R.module.modules
|
||||
// ^ makes sinle list of active (R.contents) and inactive modules (R.module.modules)
|
||||
for(var/obj/O in um)
|
||||
// Engineering
|
||||
if(istype(O,/obj/item/stack/sheet/metal) || istype(O,/obj/item/stack/sheet/rglass) || istype(O,/obj/item/stack/cable_coil))
|
||||
if(O:amount < 50)
|
||||
O:amount += 1
|
||||
// Security
|
||||
if(istype(O,/obj/item/device/flash))
|
||||
if(O:broken)
|
||||
O:broken = 0
|
||||
O:times_used = 0
|
||||
O:icon_state = "flash"
|
||||
if(istype(O,/obj/item/weapon/gun/energy/taser/cyborg))
|
||||
if(O:power_supply.charge < O:power_supply.maxcharge)
|
||||
O:power_supply.give(O:charge_cost)
|
||||
O:update_icon()
|
||||
else
|
||||
O:charge_tick = 0
|
||||
if(istype(O,/obj/item/weapon/melee/baton))
|
||||
var/obj/item/weapon/melee/baton/B = O
|
||||
if(B.bcell)
|
||||
B.bcell.charge = B.bcell.maxcharge
|
||||
//Service
|
||||
if(istype(O,/obj/item/weapon/reagent_containers/food/condiment/enzyme))
|
||||
if(O.reagents.get_reagent_amount("enzyme") < 50)
|
||||
O.reagents.add_reagent("enzyme", 2)
|
||||
//Medical
|
||||
if(istype(O,/obj/item/weapon/reagent_containers/glass/bottle/robot))
|
||||
var/obj/item/weapon/reagent_containers/glass/bottle/robot/B = O
|
||||
if(B.reagent && (B.reagents.get_reagent_amount(B.reagent) < B.volume))
|
||||
B.reagents.add_reagent(B.reagent, 2)
|
||||
//Janitor
|
||||
if(istype(O, /obj/item/device/lightreplacer))
|
||||
var/obj/item/device/lightreplacer/LR = O
|
||||
LR.Charge(R)
|
||||
//Alien
|
||||
if(istype(O,/obj/item/weapon/reagent_containers/spray/alien/smoke))
|
||||
if(O.reagents.get_reagent_amount("water") < 50)
|
||||
O.reagents.add_reagent("water", 2)
|
||||
if(istype(O,/obj/item/weapon/reagent_containers/spray/alien/stun))
|
||||
if(O.reagents.get_reagent_amount("stoxin") < 250)
|
||||
O.reagents.add_reagent("stoxin", 2)
|
||||
|
||||
|
||||
if(R)
|
||||
if(R.module)
|
||||
R.module.respawn_consumable(R)
|
||||
|
||||
//Emagged items for janitor and medical borg
|
||||
if(R.module.emag)
|
||||
if(istype(R.module.emag, /obj/item/weapon/reagent_containers/spray))
|
||||
var/obj/item/weapon/reagent_containers/spray/S = R.module.emag
|
||||
if(S.name == "polyacid spray")
|
||||
S.reagents.add_reagent("pacid", 2)
|
||||
if(S.name == "lube spray")
|
||||
S.reagents.add_reagent("lube", 2)
|
||||
else if(S.name == "acid synthesizer")
|
||||
S.reagents.add_reagent("pacid", 2)
|
||||
S.reagents.add_reagent("sacid", 2)
|
||||
|
||||
|
||||
|
||||
verb
|
||||
move_eject()
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
if (usr.stat != 0)
|
||||
return
|
||||
src.go_out()
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
move_inside()
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
if (usr.stat == 2)
|
||||
//Whoever had it so that a borg with a dead cell can't enter this thing should be shot. --NEO
|
||||
return
|
||||
if (!(istype(usr, /mob/living/silicon/)))
|
||||
usr << "\blue <B>Only non-organics may enter the recharger!</B>"
|
||||
return
|
||||
if (src.occupant)
|
||||
usr << "\blue <B>The cell is already occupied!</B>"
|
||||
return
|
||||
if (!usr:cell)
|
||||
usr<<"\blue Without a powercell, you can't be recharged."
|
||||
//Make sure they actually HAVE a cell, now that they can get in while powerless. --NEO
|
||||
return
|
||||
usr.stop_pulling()
|
||||
if(usr && usr.client)
|
||||
usr.client.perspective = EYE_PERSPECTIVE
|
||||
usr.client.eye = src
|
||||
usr.loc = src
|
||||
src.occupant = usr
|
||||
/*for(var/obj/O in src)
|
||||
O.loc = src.loc*/
|
||||
src.add_fingerprint(usr)
|
||||
build_icon()
|
||||
src.use_power = 2
|
||||
return
|
||||
/obj/machinery/recharge_station/attackby(obj/item/P as obj, mob/user as mob)
|
||||
if (istype(P, /obj/item/weapon/screwdriver))
|
||||
if(src.occupant)
|
||||
user << "<span class='notice'>The maintenance panel is locked.</span>"
|
||||
return
|
||||
default_deconstruction_screwdriver(user, "borgdecon2", "borgcharger0", P)
|
||||
return
|
||||
|
||||
if(exchange_parts(user, P))
|
||||
return
|
||||
|
||||
default_deconstruction_crowbar(P)
|
||||
|
||||
/obj/machinery/recharge_station/proc/process_occupant()
|
||||
if(src.occupant)
|
||||
if (istype(occupant, /mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = occupant
|
||||
restock_modules()
|
||||
if(repairs)
|
||||
R.adjustBruteLoss(-(repairs))
|
||||
R.adjustFireLoss(-(repairs))
|
||||
R.updatehealth()
|
||||
if(R.cell)
|
||||
if(R.cell.charge >= R.cell.maxcharge)
|
||||
R.cell.charge = R.cell.maxcharge
|
||||
else
|
||||
R.cell.charge = min(R.cell.charge + recharge_speed, R.cell.maxcharge)
|
||||
|
||||
/obj/machinery/recharge_station/proc/go_out()
|
||||
if(!( src.occupant ))
|
||||
return
|
||||
//for(var/obj/O in src)
|
||||
// O.loc = src.loc
|
||||
if (src.occupant.client)
|
||||
src.occupant.client.eye = src.occupant.client.mob
|
||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||
src.occupant.loc = src.loc
|
||||
src.occupant = null
|
||||
build_icon()
|
||||
src.use_power = 1
|
||||
return
|
||||
|
||||
/obj/machinery/recharge_station/proc/restock_modules()
|
||||
if(src.occupant)
|
||||
if(istype(occupant, /mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = occupant
|
||||
var/coeff = recharge_speed / 200
|
||||
if(R.module && R.module.modules)
|
||||
var/list/um = R.contents|R.module.modules
|
||||
// ^ makes sinle list of active (R.contents) and inactive modules (R.module.modules)
|
||||
for(var/obj/O in um)
|
||||
// Engineering
|
||||
if(istype(O,/obj/item/stack/sheet/metal) || istype(O,/obj/item/stack/sheet/rglass) || istype(O,/obj/item/stack/cable_coil))
|
||||
if(O:amount < 50)
|
||||
O:amount += 1 * coeff
|
||||
// Security
|
||||
if(istype(O,/obj/item/device/flash))
|
||||
if(O:broken)
|
||||
O:broken = 0
|
||||
O:times_used = 0
|
||||
O:icon_state = "flash"
|
||||
if(istype(O,/obj/item/weapon/gun/energy/taser/cyborg))
|
||||
if(O:power_supply.charge < O:power_supply.maxcharge)
|
||||
O:power_supply.give(O:charge_cost)
|
||||
O:update_icon()
|
||||
else
|
||||
O:charge_tick = 0
|
||||
if(istype(O,/obj/item/weapon/melee/baton))
|
||||
var/obj/item/weapon/melee/baton/B = O
|
||||
if(B.bcell)
|
||||
B.bcell.charge = B.bcell.maxcharge
|
||||
//Service
|
||||
if(istype(O,/obj/item/weapon/reagent_containers/food/condiment/enzyme))
|
||||
if(O.reagents.get_reagent_amount("enzyme") < 50)
|
||||
O.reagents.add_reagent("enzyme", 2 * coeff)
|
||||
//Medical
|
||||
if(istype(O,/obj/item/weapon/reagent_containers/glass/bottle/robot))
|
||||
var/obj/item/weapon/reagent_containers/glass/bottle/robot/B = O
|
||||
if(B.reagent && (B.reagents.get_reagent_amount(B.reagent) < B.volume))
|
||||
B.reagents.add_reagent(B.reagent, 2 * coeff)
|
||||
//Janitor
|
||||
if(istype(O, /obj/item/device/lightreplacer))
|
||||
var/obj/item/device/lightreplacer/LR = O
|
||||
var/i = 1
|
||||
for(1, i <= coeff, i++)
|
||||
LR.Charge(occupant)
|
||||
//Alien
|
||||
if(istype(O,/obj/item/weapon/reagent_containers/spray/alien/smoke))
|
||||
if(O.reagents.get_reagent_amount("water") < 50)
|
||||
O.reagents.add_reagent("water", 2 * coeff)
|
||||
if(istype(O,/obj/item/weapon/reagent_containers/spray/alien/stun))
|
||||
if(O.reagents.get_reagent_amount("stoxin") < 250)
|
||||
O.reagents.add_reagent("stoxin", 2 * coeff)
|
||||
|
||||
|
||||
if(R)
|
||||
if(R.module)
|
||||
R.module.respawn_consumable(R)
|
||||
|
||||
//Emagged items for janitor and medical borg
|
||||
if(R.module.emag)
|
||||
if(istype(R.module.emag, /obj/item/weapon/reagent_containers/spray))
|
||||
var/obj/item/weapon/reagent_containers/spray/S = R.module.emag
|
||||
if(S.name == "polyacid spray")
|
||||
S.reagents.add_reagent("pacid", 2 * coeff)
|
||||
if(S.name == "lube spray")
|
||||
S.reagents.add_reagent("lube", 2 * coeff)
|
||||
else if(S.name == "acid synthesizer")
|
||||
S.reagents.add_reagent("pacid", 2 * coeff)
|
||||
S.reagents.add_reagent("sacid", 2 * coeff)
|
||||
|
||||
/obj/machinery/recharge_station/verb/move_eject()
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
if (usr.stat != 0)
|
||||
return
|
||||
src.go_out()
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/obj/machinery/recharge_station/verb/move_inside()
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
if (usr.stat == 2)
|
||||
//Whoever had it so that a borg with a dead cell can't enter this thing should be shot. --NEO
|
||||
return
|
||||
if (!(istype(usr, /mob/living/silicon/)))
|
||||
usr << "\blue <b>Only non-organics may enter the recharger!</b>"
|
||||
return
|
||||
if (src.occupant)
|
||||
usr << "\blue <b>The cell is already occupied!</b>"
|
||||
return
|
||||
if (!usr:cell)
|
||||
usr << "\blue <b>Without a powercell, you can't be recharged.</b>"
|
||||
//Make sure they actually HAVE a cell, now that they can get in while powerless. --NEO
|
||||
return
|
||||
if (panel_open)
|
||||
usr << "\blue <b>Close the maintenance panel first.</b>"
|
||||
return
|
||||
usr.stop_pulling()
|
||||
if(usr && usr.client)
|
||||
usr.client.perspective = EYE_PERSPECTIVE
|
||||
usr.client.eye = src
|
||||
usr.loc = src
|
||||
src.occupant = usr
|
||||
/*for(var/obj/O in src)
|
||||
O.loc = src.loc*/
|
||||
src.add_fingerprint(usr)
|
||||
build_icon()
|
||||
src.use_power = 2
|
||||
return
|
||||
@@ -1047,16 +1047,9 @@
|
||||
if(!target_species || !target_department)
|
||||
return
|
||||
|
||||
switch(target_species)
|
||||
if("Human" || "Skrell")
|
||||
if(helmet) helmet.species_restricted = list("exclude","Unathi","Tajaran","Diona","Vox")
|
||||
if(suit) suit.species_restricted = list("exclude","Unathi","Tajaran","Diona","Vox")
|
||||
if("Unathi")
|
||||
if(helmet) helmet.species_restricted = list("Unathi")
|
||||
if(suit) suit.species_restricted = list("Unathi")
|
||||
if("Tajaran")
|
||||
if(helmet) helmet.species_restricted = list("Tajaran")
|
||||
if(suit) suit.species_restricted = list("Tajaran")
|
||||
if(target_species)
|
||||
if(helmet) helmet.refit_for_species(target_species)
|
||||
if(suit) suit.refit_for_species(target_species)
|
||||
|
||||
switch(target_department)
|
||||
if("Engineering")
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
var/universal_translate = 0 // set to 1 if it can translate nonhuman speech
|
||||
|
||||
req_access = list(access_tcomsat)
|
||||
|
||||
circuit = "/obj/item/weapon/circuitboard/comm_server"
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
|
||||
@@ -77,9 +77,11 @@
|
||||
user << "You finish prying out the components."
|
||||
|
||||
// Drop all the component stuff
|
||||
if(contents.len > 0)
|
||||
for(var/obj/x in src)
|
||||
x.loc = user.loc
|
||||
if(component_parts)
|
||||
for(var/obj/I in component_parts)
|
||||
if(I.reliability != 100 && crit_fail)
|
||||
I.crit_fail = 1
|
||||
I.loc = src.loc
|
||||
else
|
||||
|
||||
// If the machine wasn't made during runtime, probably doesn't have components:
|
||||
@@ -90,13 +92,13 @@
|
||||
for(var/i = 1, i <= C.req_components[I], i++)
|
||||
newpath = text2path(I)
|
||||
var/obj/item/s = new newpath
|
||||
s.loc = user.loc
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/A = P
|
||||
s.loc = src.loc
|
||||
if(istype(s, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/A = s
|
||||
A.amount = 1
|
||||
|
||||
// Drop a circuit board too
|
||||
C.loc = user.loc
|
||||
C.loc = src.loc
|
||||
|
||||
// Create a machine frame and delete the current machine
|
||||
var/obj/machinery/constructable_frame/machine_frame/F = new
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
var/network = "NULL" // the network to probe
|
||||
|
||||
var/temp = "" // temporary feedback messages
|
||||
|
||||
circuit = "/obj/item/weapon/circuitboard/comm_monitor"
|
||||
|
||||
l_color = "#50AB00"
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
l_color = "#50AB00"
|
||||
|
||||
req_access = list(access_tcomsat)
|
||||
circuit = "/obj/item/weapon/circuitboard/comm_traffic"
|
||||
|
||||
|
||||
proc/update_ide()
|
||||
|
||||
@@ -7,6 +7,39 @@
|
||||
use_power = 1
|
||||
idle_power_usage = 2
|
||||
active_power_usage = 50
|
||||
var/efficiency
|
||||
|
||||
/obj/machinery/telepad/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/telesci_pad(src)
|
||||
component_parts += new /obj/item/bluespace_crystal/artificial(src)
|
||||
component_parts += new /obj/item/bluespace_crystal/artificial(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src, 1)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/telepad/RefreshParts()
|
||||
var/E
|
||||
for(var/obj/item/weapon/stock_parts/capacitor/C in component_parts)
|
||||
E += C.rating
|
||||
efficiency = E
|
||||
|
||||
/obj/machinery/telepad/attackby(obj/item/I, mob/user)
|
||||
if(default_deconstruction_screwdriver(user, "pad-idle-o", "pad-idle", I))
|
||||
return
|
||||
|
||||
if(panel_open)
|
||||
if(istype(I, /obj/item/device/multitool))
|
||||
var/obj/item/device/multitool/M = I
|
||||
M.buffer = src
|
||||
user << "<span class='caution'>You save the data in the [I.name]'s buffer.</span>"
|
||||
|
||||
if(exchange_parts(user, I))
|
||||
return
|
||||
|
||||
default_deconstruction_crowbar(I)
|
||||
|
||||
/obj/machinery/telepad_cargo
|
||||
name = "cargo telepad"
|
||||
@@ -17,29 +50,29 @@
|
||||
use_power = 1
|
||||
idle_power_usage = 2
|
||||
active_power_usage = 50
|
||||
var/stage = 0
|
||||
|
||||
var/stage = 0
|
||||
|
||||
/obj/machinery/telepad_cargo/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
playsound(src, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(anchored)
|
||||
anchored = 0
|
||||
user << "\blue The [src] can now be moved."
|
||||
user << "<span class='caution'>The [src] can now be moved.</span>"
|
||||
else if(!anchored)
|
||||
anchored = 1
|
||||
user << "\blue The [src] is now secured."
|
||||
user << "<span class='caution'>The [src] is now secured.</span>"
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(stage == 0)
|
||||
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
user << "\blue You unscrew the telepad's tracking beacon."
|
||||
user << "<span class='caution'>You unscrew the telepad's tracking beacon.</span>"
|
||||
stage = 1
|
||||
else if(stage == 1)
|
||||
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
user << "\blue You screw in the telepad's tracking beacon."
|
||||
user << "<span class='caution'>You screw in the telepad's tracking beacon.</span>"
|
||||
stage = 0
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && stage == 1)
|
||||
playsound(src, 'sound/items/Welder.ogg', 50, 1)
|
||||
user << "\blue You disassemble the telepad."
|
||||
user << "<span class='caution'>You disassemble the telepad.</span>"
|
||||
new /obj/item/stack/sheet/metal(get_turf(src))
|
||||
new /obj/item/stack/sheet/glass(get_turf(src))
|
||||
del(src)
|
||||
qdel(src)
|
||||
+370
-319
@@ -1,165 +1,247 @@
|
||||
/obj/machinery/computer/teleporter
|
||||
name = "Teleporter"
|
||||
name = "Teleporter Control Console"
|
||||
desc = "Used to control a linked teleportation Hub and Station."
|
||||
icon_state = "teleport"
|
||||
circuit = "/obj/item/weapon/circuitboard/teleporter"
|
||||
var/obj/item/locked = null
|
||||
var/obj/item/device/sps/locked = null
|
||||
var/regime_set = "Teleporter"
|
||||
var/id = null
|
||||
var/one_time_use = 0 //Used for one-time-use teleport cards (such as clown planet coordinates.)
|
||||
var/obj/machinery/teleport/station/power_station
|
||||
var/calibrating
|
||||
var/turf/target //Used for one-time-use teleport cards (such as clown planet coordinates.)
|
||||
//Setting this to 1 will set src.locked to null after a player enters the portal and will not allow hand-teles to open portals to that location.
|
||||
var/data[0]
|
||||
|
||||
/obj/machinery/computer/teleporter/New()
|
||||
src.id = "[rand(1000, 9999)]"
|
||||
link_power_station()
|
||||
..()
|
||||
return
|
||||
|
||||
/*
|
||||
/obj/machinery/computer/teleporter/attackby(I as obj, mob/living/user as mob)
|
||||
if(istype(I, /obj/item/weapon/card/data/))
|
||||
var/obj/item/weapon/card/data/C = I
|
||||
if(stat & (NOPOWER|BROKEN) & (C.function != "teleporter"))
|
||||
src.attack_hand()
|
||||
/obj/machinery/computer/teleporter/initialize()
|
||||
link_power_station()
|
||||
|
||||
var/obj/L = null
|
||||
|
||||
for(var/obj/effect/landmark/sloc in landmarks_list)
|
||||
if(sloc.name != C.data) continue
|
||||
if(locate(/mob/living) in sloc.loc) continue
|
||||
L = sloc
|
||||
/obj/machinery/computer/teleporter/proc/link_power_station()
|
||||
if(power_station)
|
||||
return
|
||||
for(dir in list(NORTH,EAST,SOUTH,WEST))
|
||||
power_station = locate(/obj/machinery/teleport/station, get_step(src, dir))
|
||||
if(power_station)
|
||||
break
|
||||
|
||||
if(!L)
|
||||
L = locate("landmark*[C.data]") // use old stype
|
||||
|
||||
|
||||
if(istype(L, /obj/effect/landmark/) && istype(L.loc, /turf))
|
||||
usr << "You insert the coordinates into the machine."
|
||||
usr << "A message flashes across the screen reminding the traveller that the nuclear authentication disk is to remain on the station at all times."
|
||||
user.drop_item()
|
||||
del(I)
|
||||
|
||||
if(C.data == "Clown Land")
|
||||
//whoops
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message("\red Incoming bluespace portal detected, unable to lock in.", 2)
|
||||
|
||||
for(var/obj/machinery/teleport/hub/H in range(1))
|
||||
var/amount = rand(2,5)
|
||||
for(var/i=0;i<amount;i++)
|
||||
new /mob/living/simple_animal/hostile/carp(get_turf(H))
|
||||
//
|
||||
else
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message("\blue Locked In", 2)
|
||||
src.locked = L
|
||||
one_time_use = 1
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
else
|
||||
..()
|
||||
|
||||
return
|
||||
*/
|
||||
return power_station
|
||||
|
||||
/obj/machinery/computer/teleporter/attackby(I as obj, mob/living/user as mob)
|
||||
if(istype(I, /obj/item/weapon/card/data/))
|
||||
var/obj/item/weapon/card/data/C = I
|
||||
if(stat & (NOPOWER|BROKEN) & (C.function != "teleporter"))
|
||||
src.attack_hand()
|
||||
|
||||
var/obj/L = null
|
||||
|
||||
for(var/obj/effect/landmark/sloc in landmarks_list)
|
||||
if(sloc.name != C.data) continue
|
||||
if(locate(/mob/living) in sloc.loc) continue
|
||||
L = sloc
|
||||
break
|
||||
|
||||
if(!L)
|
||||
L = locate("landmark*[C.data]") // use old stype
|
||||
|
||||
|
||||
if(istype(L, /obj/effect/landmark/) && istype(L.loc, /turf))
|
||||
src.locked = L
|
||||
one_time_use = 1
|
||||
|
||||
usr << "You insert the coordinates into the machine."
|
||||
usr << "A message flashes across the screen reminding the traveller that the nuclear authentication disk is to remain on the station at all times."
|
||||
user.drop_item()
|
||||
del(I)
|
||||
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message("\blue Locked In", 2)
|
||||
src.add_fingerprint(usr)
|
||||
if(istype(I,/obj/item/weapon/card/emag)) // If hit by an emag.
|
||||
var/obj/item/weapon/card/emag/E = I
|
||||
if(!emagged)
|
||||
if(E.uses)
|
||||
E.uses--
|
||||
emagged = 1
|
||||
user << "\blue The teleporter can now lock on to Syndicate beacons!"
|
||||
else
|
||||
ui_interact(user)
|
||||
else if(istype(I, /obj/item/device/sps))
|
||||
var/obj/item/device/sps/L = I
|
||||
if(L.locked_location && !(stat & (NOPOWER|BROKEN)))
|
||||
user.before_take_item(L)
|
||||
L.loc = src
|
||||
locked = L
|
||||
user << "<span class='caution'>You insert the SPS device into the [name]'s slot.</span>"
|
||||
src.attack_hand(user)
|
||||
else
|
||||
user << "<span class='warning'>No useable data was found on te SPS device.</span>"
|
||||
else
|
||||
..()
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/computer/teleporter/attack_paw()
|
||||
src.attack_hand()
|
||||
/obj/machinery/computer/teleporter/attack_paw(mob/user)
|
||||
usr << "You are too primitive to use this computer."
|
||||
return
|
||||
|
||||
/obj/machinery/teleport/station/attack_ai()
|
||||
src.attack_hand()
|
||||
/obj/machinery/computer/teleporter/attack_ai(mob/user)
|
||||
src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/teleporter/attack_hand()
|
||||
/obj/machinery/computer/teleporter/attack_hand(mob/user)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/computer/teleporter/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
if(..())
|
||||
return
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
data["powerstation"] = power_station
|
||||
if(power_station)
|
||||
data["teleporterhub"] = power_station.teleporter_hub
|
||||
data["calibrated"] = power_station.teleporter_hub.calibrated
|
||||
data["accurate"] = power_station.teleporter_hub.accurate
|
||||
else
|
||||
data["teleporterhub"] = null
|
||||
data["calibrated"] = null
|
||||
data["accurate"] = null
|
||||
data["regime"] = regime_set
|
||||
data["target"] = (!target) ? "None" : get_area(target)
|
||||
data["calibrating"] = calibrating
|
||||
data["locked"] = locked
|
||||
|
||||
var/list/L = list()
|
||||
var/list/areaindex = list()
|
||||
// Set up the Nano UI
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "teleporter_console.tmpl", "Teleporter Console UI", 400, 400)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
for(var/obj/item/device/radio/beacon/R in world)
|
||||
var/turf/T = get_turf(R)
|
||||
if (!T)
|
||||
continue
|
||||
if(T.z == 2 || T.z > 6)
|
||||
if (T.z == 7 & src.emagged == 1)
|
||||
// This should be empty, allows for it to continue if the z-level is 7 and the machine.
|
||||
/obj/machinery/computer/teleporter/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
|
||||
if(href_list["eject"])
|
||||
eject()
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
|
||||
if(!check_hub_connection())
|
||||
usr << "<span class='warning'>Error: Unable to detect hub.</span>"
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
if(calibrating)
|
||||
usr << "<span class='warning'>Error: Calibration in progress. Stand by.</span>"
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
|
||||
if(href_list["regimeset"])
|
||||
power_station.engaged = 0
|
||||
power_station.teleporter_hub.update_icon()
|
||||
power_station.teleporter_hub.calibrated = 0
|
||||
reset_regime()
|
||||
nanomanager.update_uis(src)
|
||||
if(href_list["settarget"])
|
||||
power_station.engaged = 0
|
||||
power_station.teleporter_hub.update_icon()
|
||||
power_station.teleporter_hub.calibrated = 0
|
||||
set_target(usr)
|
||||
nanomanager.update_uis(src)
|
||||
if(href_list["locked"])
|
||||
power_station.engaged = 0
|
||||
power_station.teleporter_hub.update_icon()
|
||||
power_station.teleporter_hub.calibrated = 0
|
||||
target = get_turf(locked.locked_location)
|
||||
nanomanager.update_uis(src)
|
||||
if(href_list["calibrate"])
|
||||
if(!target)
|
||||
usr << "<span class='warning'>Error: No target set to calibrate to.</span>"
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
if(power_station.teleporter_hub.calibrated || power_station.teleporter_hub.accurate >= 3)
|
||||
usr << "<span class='notice'>Hub is already calibrated.</span>"
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
src.visible_message("<span class='notice'>Processing hub calibration to target...</span>")
|
||||
|
||||
calibrating = 1
|
||||
nanomanager.update_uis(src)
|
||||
spawn(50 * (3 - power_station.teleporter_hub.accurate)) //Better parts mean faster calibration
|
||||
calibrating = 0
|
||||
if(check_hub_connection())
|
||||
power_station.teleporter_hub.calibrated = 1
|
||||
src.visible_message("<span class='notice'>Calibration complete.</span>")
|
||||
else
|
||||
continue
|
||||
var/tmpname = T.loc.name
|
||||
if(areaindex[tmpname])
|
||||
tmpname = "[tmpname] ([++areaindex[tmpname]])"
|
||||
else
|
||||
areaindex[tmpname] = 1
|
||||
L[tmpname] = R
|
||||
src.visible_message("<span class='warning'>Error: Unable to detect hub.</span>")
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
for (var/obj/item/weapon/implant/tracking/I in world)
|
||||
if (!I.implanted || !ismob(I.loc))
|
||||
continue
|
||||
else
|
||||
var/mob/M = I.loc
|
||||
if (M.stat == 2)
|
||||
if (M.timeofdeath + 6000 < world.time)
|
||||
continue
|
||||
var/turf/T = get_turf(M)
|
||||
if(T) continue
|
||||
if(T.z == 2) continue
|
||||
var/tmpname = M.real_name
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
/obj/machinery/computer/teleporter/proc/check_hub_connection()
|
||||
if(!power_station)
|
||||
return
|
||||
if(!power_station.teleporter_hub)
|
||||
return
|
||||
return 1
|
||||
|
||||
/obj/machinery/computer/teleporter/proc/reset_regime()
|
||||
target = null
|
||||
if(regime_set == "Teleporter")
|
||||
regime_set = "Gate"
|
||||
else
|
||||
regime_set = "Teleporter"
|
||||
|
||||
/obj/machinery/computer/teleporter/proc/eject()
|
||||
if(locked)
|
||||
locked.loc = src.loc
|
||||
locked = null
|
||||
|
||||
/obj/machinery/computer/teleporter/proc/set_target(mob/user)
|
||||
if(regime_set == "Teleporter")
|
||||
var/list/L = list()
|
||||
var/list/areaindex = list()
|
||||
|
||||
for(var/obj/item/device/radio/beacon/R in world)
|
||||
var/turf/T = get_turf(R)
|
||||
if (!T)
|
||||
continue
|
||||
if(T.z == 2 || T.z > 7)
|
||||
continue
|
||||
if(R.syndicate == 1 && emagged == 0)
|
||||
continue
|
||||
var/tmpname = T.loc.name
|
||||
if(areaindex[tmpname])
|
||||
tmpname = "[tmpname] ([++areaindex[tmpname]])"
|
||||
else
|
||||
areaindex[tmpname] = 1
|
||||
L[tmpname] = I
|
||||
L[tmpname] = R
|
||||
|
||||
var/desc = input("Please select a location to lock in.", "Locking Computer") in L
|
||||
src.locked = L[desc]
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message("\blue Locked In", 2)
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
for (var/obj/item/weapon/implant/tracking/I in world)
|
||||
if (!I.implanted || !ismob(I.loc))
|
||||
continue
|
||||
else
|
||||
var/mob/M = I.loc
|
||||
if (M.stat == 2)
|
||||
if (M.timeofdeath + 6000 < world.time)
|
||||
continue
|
||||
var/turf/T = get_turf(M)
|
||||
if(!T) continue
|
||||
if(T.z == 2) continue
|
||||
var/tmpname = M.real_name
|
||||
if(areaindex[tmpname])
|
||||
tmpname = "[tmpname] ([++areaindex[tmpname]])"
|
||||
else
|
||||
areaindex[tmpname] = 1
|
||||
L[tmpname] = I
|
||||
|
||||
/obj/machinery/computer/teleporter/verb/set_id(t as text)
|
||||
set category = "Object"
|
||||
set name = "Set teleporter ID"
|
||||
set src in oview(1)
|
||||
set desc = "ID Tag:"
|
||||
var/desc = input("Please select a location to lock in.", "Locking Computer") in L
|
||||
target = L[desc]
|
||||
|
||||
if(stat & (NOPOWER|BROKEN) || !istype(usr,/mob/living))
|
||||
return
|
||||
if (t)
|
||||
src.id = t
|
||||
else
|
||||
var/list/L = list()
|
||||
var/list/areaindex = list()
|
||||
var/list/S = power_station.linked_stations
|
||||
if(!S.len)
|
||||
user << "<span class='alert'>No connected stations located.</span>"
|
||||
return
|
||||
for(var/obj/machinery/teleport/station/R in S)
|
||||
var/turf/T = get_turf(R)
|
||||
if (!T || !R.teleporter_hub || !R.teleporter_console)
|
||||
continue
|
||||
if(T.z == 2 || T.z > 7)
|
||||
continue
|
||||
var/tmpname = T.loc.name
|
||||
if(areaindex[tmpname])
|
||||
tmpname = "[tmpname] ([++areaindex[tmpname]])"
|
||||
else
|
||||
areaindex[tmpname] = 1
|
||||
L[tmpname] = R
|
||||
var/desc = input("Please select a station to lock in.", "Locking Computer") in L
|
||||
target = L[desc]
|
||||
if(target)
|
||||
var/obj/machinery/teleport/station/trg = target
|
||||
trg.linked_stations |= power_station
|
||||
trg.stat &= ~NOPOWER
|
||||
if(trg.teleporter_hub)
|
||||
trg.teleporter_hub.stat &= ~NOPOWER
|
||||
trg.teleporter_hub.update_icon()
|
||||
if(trg.teleporter_console)
|
||||
trg.teleporter_console.stat &= ~NOPOWER
|
||||
trg.teleporter_console.update_icon()
|
||||
return
|
||||
|
||||
/proc/find_loc(obj/R as obj)
|
||||
@@ -168,15 +250,13 @@
|
||||
while(!istype(T, /turf))
|
||||
T = T.loc
|
||||
if(!T || istype(T, /area)) return null
|
||||
return T
|
||||
|
||||
return T
|
||||
|
||||
/obj/machinery/teleport
|
||||
name = "teleport"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
var/lockeddown = 0
|
||||
|
||||
|
||||
/obj/machinery/teleport/hub
|
||||
name = "teleporter hub"
|
||||
@@ -186,138 +266,162 @@
|
||||
use_power = 1
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 2000
|
||||
var/obj/machinery/teleport/station/power_station
|
||||
var/calibrated //Calibration prevents mutation
|
||||
|
||||
/obj/machinery/teleport/hub/New()
|
||||
..()
|
||||
link_power_station()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/teleporter_hub(null)
|
||||
component_parts += new /obj/item/bluespace_crystal/artificial(null)
|
||||
component_parts += new /obj/item/bluespace_crystal/artificial(null)
|
||||
component_parts += new /obj/item/bluespace_crystal/artificial(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/teleport/hub/initialize()
|
||||
link_power_station()
|
||||
|
||||
/obj/machinery/teleport/hub/RefreshParts()
|
||||
var/A = 0
|
||||
for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts)
|
||||
A += M.rating
|
||||
accurate = A
|
||||
|
||||
/obj/machinery/teleport/hub/proc/link_power_station()
|
||||
if(power_station)
|
||||
return
|
||||
for(dir in list(NORTH,EAST,SOUTH,WEST))
|
||||
power_station = locate(/obj/machinery/teleport/station, get_step(src, dir))
|
||||
if(power_station)
|
||||
break
|
||||
return power_station
|
||||
|
||||
/obj/machinery/teleport/hub/Bumped(M as mob|obj)
|
||||
spawn()
|
||||
if (src.icon_state == "tele1")
|
||||
teleport(M)
|
||||
use_power(5000)
|
||||
if(power_station && power_station.engaged && !panel_open)
|
||||
teleport(M)
|
||||
use_power(5000)
|
||||
return
|
||||
|
||||
/obj/machinery/teleport/hub/proc/teleport(atom/movable/M as mob|obj)
|
||||
var/atom/l = src.loc
|
||||
var/obj/machinery/computer/teleporter/com = locate(/obj/machinery/computer/teleporter, locate(l.x - 2, l.y, l.z))
|
||||
/obj/machinery/teleport/hub/attackby(obj/item/W, mob/user)
|
||||
if(default_deconstruction_screwdriver(user, "tele-o", "tele0", W))
|
||||
return
|
||||
|
||||
if(exchange_parts(user, W))
|
||||
return
|
||||
|
||||
default_deconstruction_crowbar(W)
|
||||
|
||||
/obj/machinery/teleport/hub/proc/teleport(atom/movable/M as mob|obj, turf/T)
|
||||
var/obj/machinery/computer/teleporter/com = power_station.teleporter_console
|
||||
if (!com)
|
||||
return
|
||||
if (!com.locked)
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message("\red Failure: Cannot authenticate locked on coordinates. Please reinstate coordinate matrix.")
|
||||
if (!com.target)
|
||||
visible_message("<span class='notice'>Cannot authenticate locked on coordinates. Please reinstate coordinate matrix.</span>")
|
||||
return
|
||||
if (istype(M, /atom/movable))
|
||||
if(prob(5) && !accurate) //oh dear a problem, put em in deep space
|
||||
if(!calibrated && prob(25 - ((accurate) * 10))) //oh dear a problem
|
||||
do_teleport(M, locate(rand((2*TRANSITIONEDGE), world.maxx - (2*TRANSITIONEDGE)), rand((2*TRANSITIONEDGE), world.maxy - (2*TRANSITIONEDGE)), 3), 2)
|
||||
else
|
||||
do_teleport(M, com.locked) //dead-on precision
|
||||
|
||||
if(com.one_time_use) //Make one-time-use cards only usable one time!
|
||||
com.one_time_use = 0
|
||||
com.locked = null
|
||||
else
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
for(var/mob/B in hearers(src, null))
|
||||
B.show_message("\blue Test fire completed.")
|
||||
else
|
||||
do_teleport(M, com.target)
|
||||
calibrated = 0
|
||||
return
|
||||
/*
|
||||
/proc/do_teleport(atom/movable/M as mob|obj, atom/destination, precision)
|
||||
if(istype(M, /obj/effect))
|
||||
del(M)
|
||||
return
|
||||
if (istype(M, /obj/item/weapon/disk/nuclear)) // Don't let nuke disks get teleported --NeoFite
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red <B>The [] bounces off of the portal!</B>", M.name), 1)
|
||||
return
|
||||
if (istype(M, /mob/living))
|
||||
var/mob/living/MM = M
|
||||
if(MM.check_contents_for(/obj/item/weapon/disk/nuclear))
|
||||
MM << "\red Something you are carrying seems to be unable to pass through the portal. Better drop it if you want to go through."
|
||||
return
|
||||
var/disky = 0
|
||||
for (var/atom/O in M.contents) //I'm pretty sure this accounts for the maximum amount of container in container stacking. --NeoFite
|
||||
if (istype(O, /obj/item/weapon/storage) || istype(O, /obj/item/weapon/gift))
|
||||
for (var/obj/OO in O.contents)
|
||||
if (istype(OO, /obj/item/weapon/storage) || istype(OO, /obj/item/weapon/gift))
|
||||
for (var/obj/OOO in OO.contents)
|
||||
if (istype(OOO, /obj/item/weapon/disk/nuclear))
|
||||
disky = 1
|
||||
if (istype(OO, /obj/item/weapon/disk/nuclear))
|
||||
disky = 1
|
||||
if (istype(O, /obj/item/weapon/disk/nuclear))
|
||||
disky = 1
|
||||
if (istype(O, /mob/living))
|
||||
var/mob/living/MM = O
|
||||
if(MM.check_contents_for(/obj/item/weapon/disk/nuclear))
|
||||
disky = 1
|
||||
if (disky)
|
||||
for(var/mob/P in viewers(M, null))
|
||||
P.show_message(text("\red <B>The [] bounces off of the portal!</B>", M.name), 1)
|
||||
return
|
||||
|
||||
//Bags of Holding cause bluespace teleportation to go funky. --NeoFite
|
||||
if (istype(M, /mob/living))
|
||||
var/mob/living/MM = M
|
||||
if(MM.check_contents_for(/obj/item/weapon/storage/backpack/holding))
|
||||
MM << "\red The Bluespace interface on your Bag of Holding interferes with the teleport!"
|
||||
precision = rand(1,100)
|
||||
if (istype(M, /obj/item/weapon/storage/backpack/holding))
|
||||
precision = rand(1,100)
|
||||
for (var/atom/O in M.contents) //I'm pretty sure this accounts for the maximum amount of container in container stacking. --NeoFite
|
||||
if (istype(O, /obj/item/weapon/storage) || istype(O, /obj/item/weapon/gift))
|
||||
for (var/obj/OO in O.contents)
|
||||
if (istype(OO, /obj/item/weapon/storage) || istype(OO, /obj/item/weapon/gift))
|
||||
for (var/obj/OOO in OO.contents)
|
||||
if (istype(OOO, /obj/item/weapon/storage/backpack/holding))
|
||||
precision = rand(1,100)
|
||||
if (istype(OO, /obj/item/weapon/storage/backpack/holding))
|
||||
precision = rand(1,100)
|
||||
if (istype(O, /obj/item/weapon/storage/backpack/holding))
|
||||
precision = rand(1,100)
|
||||
if (istype(O, /mob/living))
|
||||
var/mob/living/MM = O
|
||||
if(MM.check_contents_for(/obj/item/weapon/storage/backpack/holding))
|
||||
precision = rand(1,100)
|
||||
|
||||
|
||||
var/turf/destturf = get_turf(destination)
|
||||
|
||||
var/tx = destturf.x + rand(precision * -1, precision)
|
||||
var/ty = destturf.y + rand(precision * -1, precision)
|
||||
|
||||
var/tmploc
|
||||
|
||||
if (ismob(destination.loc)) //If this is an implant.
|
||||
tmploc = locate(tx, ty, destturf.z)
|
||||
/obj/machinery/teleport/hub/update_icon()
|
||||
if(panel_open)
|
||||
icon_state = "tele-o"
|
||||
else if(power_station && power_station.engaged)
|
||||
icon_state = "tele1"
|
||||
else
|
||||
tmploc = locate(tx, ty, destination.z)
|
||||
icon_state = "tele0"
|
||||
|
||||
if(tx == destturf.x && ty == destturf.y && (istype(destination.loc, /obj/structure/closet) || istype(destination.loc, /obj/structure/closet/secure_closet)))
|
||||
tmploc = destination.loc
|
||||
|
||||
if(tmploc==null)
|
||||
return
|
||||
|
||||
M.loc = tmploc
|
||||
sleep(2)
|
||||
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, M)
|
||||
s.start()
|
||||
return
|
||||
*/
|
||||
/obj/machinery/teleport/hub/syndicate/New()
|
||||
..()
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin/super(null)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/teleport/station
|
||||
name = "station"
|
||||
desc = "It's the station thingy of a teleport thingy." //seriously, wtf.
|
||||
desc = "The power control station for a bluespace teleporter."
|
||||
icon_state = "controller"
|
||||
var/active = 0
|
||||
var/engaged = 0
|
||||
use_power = 1
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 2000
|
||||
var/obj/machinery/computer/teleporter/teleporter_console
|
||||
var/obj/machinery/teleport/hub/teleporter_hub
|
||||
var/list/linked_stations = list()
|
||||
var/efficiency = 0
|
||||
|
||||
/obj/machinery/teleport/station/attackby(var/obj/item/weapon/W)
|
||||
src.attack_hand()
|
||||
/obj/machinery/teleport/station/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/teleporter_station(null)
|
||||
component_parts += new /obj/item/bluespace_crystal/artificial(null)
|
||||
component_parts += new /obj/item/bluespace_crystal/artificial(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
|
||||
RefreshParts()
|
||||
link_console_and_hub()
|
||||
|
||||
/obj/machinery/teleport/station/initialize()
|
||||
link_console_and_hub()
|
||||
|
||||
/obj/machinery/teleport/station/RefreshParts()
|
||||
var/E
|
||||
for(var/obj/item/weapon/stock_parts/capacitor/C in component_parts)
|
||||
E += C.rating
|
||||
efficiency = E - 1
|
||||
|
||||
/obj/machinery/teleport/station/proc/link_console_and_hub()
|
||||
for(dir in list(NORTH,EAST,SOUTH,WEST))
|
||||
teleporter_hub = locate(/obj/machinery/teleport/hub, get_step(src, dir))
|
||||
if(teleporter_hub)
|
||||
teleporter_hub.link_power_station()
|
||||
break
|
||||
for(dir in list(NORTH,EAST,SOUTH,WEST))
|
||||
teleporter_console = locate(/obj/machinery/computer/teleporter, get_step(src, dir))
|
||||
if(teleporter_console)
|
||||
teleporter_console.link_power_station()
|
||||
break
|
||||
return teleporter_hub && teleporter_console
|
||||
|
||||
|
||||
/obj/machinery/teleport/station/Destroy()
|
||||
if(teleporter_hub)
|
||||
teleporter_hub.update_icon()
|
||||
..()
|
||||
|
||||
/obj/machinery/teleport/station/attackby(var/obj/item/weapon/W, mob/user)
|
||||
if(istype(W, /obj/item/device/multitool) && !panel_open)
|
||||
var/obj/item/device/multitool/M = W
|
||||
if(M.buffer && istype(M.buffer, /obj/machinery/teleport/station) && M.buffer != src)
|
||||
if(linked_stations.len < efficiency)
|
||||
linked_stations.Add(M.buffer)
|
||||
M.buffer = null
|
||||
user << "<span class='caution'>You upload the data from the [W.name]'s buffer.</span>"
|
||||
else
|
||||
user << "<span class='alert'>This station cant hold more information, try to use better parts.</span>"
|
||||
if(default_deconstruction_screwdriver(user, "controller-o", "controller", W))
|
||||
return
|
||||
|
||||
if(exchange_parts(user, W))
|
||||
return
|
||||
|
||||
default_deconstruction_crowbar(W)
|
||||
|
||||
if(panel_open)
|
||||
if(istype(W, /obj/item/device/multitool))
|
||||
var/obj/item/device/multitool/M = W
|
||||
M.buffer = src
|
||||
user << "<span class='caution'>You download the data to the [W.name]'s buffer.</span>"
|
||||
return
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
link_console_and_hub()
|
||||
user << "<span class='caution'>You reconnect the station to nearby machinery.</span>"
|
||||
return
|
||||
|
||||
/obj/machinery/teleport/station/attack_paw()
|
||||
src.attack_hand()
|
||||
@@ -325,93 +429,40 @@
|
||||
/obj/machinery/teleport/station/attack_ai()
|
||||
src.attack_hand()
|
||||
|
||||
/obj/machinery/teleport/station/attack_hand()
|
||||
if(engaged)
|
||||
src.disengage()
|
||||
/obj/machinery/teleport/station/attack_hand(mob/user)
|
||||
if(!panel_open)
|
||||
toggle(user)
|
||||
else
|
||||
src.engage()
|
||||
user << "<span class='notice'>Close the maintenance panel first.</span>"
|
||||
|
||||
/obj/machinery/teleport/station/proc/engage()
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
/obj/machinery/teleport/station/proc/toggle(mob/user)
|
||||
if (stat & (BROKEN|NOPOWER) || !teleporter_hub || !teleporter_console)
|
||||
return
|
||||
|
||||
var/atom/l = src.loc
|
||||
var/atom/com = locate(/obj/machinery/teleport/hub, locate(l.x + 1, l.y, l.z))
|
||||
if (com)
|
||||
com.icon_state = "tele1"
|
||||
if (teleporter_hub.panel_open)
|
||||
user << "<span class='notice'>Close the hub's maintenance panel first.</span>"
|
||||
return
|
||||
if (teleporter_console.target)
|
||||
src.engaged = !src.engaged
|
||||
use_power(5000)
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message("\blue Teleporter engaged!", 2)
|
||||
src.add_fingerprint(usr)
|
||||
src.engaged = 1
|
||||
return
|
||||
|
||||
/obj/machinery/teleport/station/proc/disengage()
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
|
||||
var/atom/l = src.loc
|
||||
var/atom/com = locate(/obj/machinery/teleport/hub, locate(l.x + 1, l.y, l.z))
|
||||
if (com)
|
||||
com.icon_state = "tele0"
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message("\blue Teleporter disengaged!", 2)
|
||||
src.add_fingerprint(usr)
|
||||
src.engaged = 0
|
||||
return
|
||||
|
||||
/obj/machinery/teleport/station/verb/testfire()
|
||||
set name = "Test Fire Teleporter"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(stat & (BROKEN|NOPOWER) || !istype(usr,/mob/living))
|
||||
return
|
||||
|
||||
var/atom/l = src.loc
|
||||
var/obj/machinery/teleport/hub/com = locate(/obj/machinery/teleport/hub, locate(l.x + 1, l.y, l.z))
|
||||
if (com && !active)
|
||||
active = 1
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message("\blue Test firing!", 2)
|
||||
com.teleport()
|
||||
use_power(5000)
|
||||
|
||||
spawn(30)
|
||||
active=0
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
visible_message("<span class='notice'>Teleporter [engaged ? "" : "dis"]engaged!</span>")
|
||||
else
|
||||
visible_message("<span class='alert'>No target detected.</span>")
|
||||
src.engaged = 0
|
||||
teleporter_hub.update_icon()
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/machinery/teleport/station/power_change()
|
||||
..()
|
||||
if(stat & NOPOWER)
|
||||
update_icon()
|
||||
if(teleporter_hub)
|
||||
teleporter_hub.update_icon()
|
||||
|
||||
/obj/machinery/teleport/station/update_icon()
|
||||
if(panel_open)
|
||||
icon_state = "controller-o"
|
||||
else if(stat & NOPOWER)
|
||||
icon_state = "controller-p"
|
||||
var/obj/machinery/teleport/hub/com = locate(/obj/machinery/teleport/hub, locate(x + 1, y, z))
|
||||
if(com)
|
||||
com.icon_state = "tele0"
|
||||
else
|
||||
icon_state = "controller"
|
||||
|
||||
|
||||
/obj/effect/laser/Bump()
|
||||
src.range--
|
||||
return
|
||||
|
||||
/obj/effect/laser/Move()
|
||||
src.range--
|
||||
return
|
||||
|
||||
/atom/proc/laserhit(L as obj)
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/computer/teleporter/attackby(I as obj, user as mob) //Emagging.
|
||||
if(istype(I,/obj/item/weapon/card/emag))
|
||||
if (src.emagged == 0)
|
||||
user << "\blue You scramble the Teleporter's circuits. You should be able to teleport to more places now!"
|
||||
src.emagged = 1
|
||||
else
|
||||
user << "\red The machine seems unaffected by the card swipe..."
|
||||
else
|
||||
return attack_hand(user)
|
||||
@@ -73,6 +73,7 @@
|
||||
sleep(30)
|
||||
if(R)
|
||||
R.lockcharge = !R.lockcharge
|
||||
R.notify_ai(1)
|
||||
|
||||
// Activate the cooldown
|
||||
cooldown = 1
|
||||
|
||||
+130
-36
@@ -57,7 +57,6 @@
|
||||
var/obj/item/weapon/coin/coin
|
||||
var/datum/wires/vending/wires = null
|
||||
|
||||
|
||||
/obj/machinery/vending/New()
|
||||
..()
|
||||
wires = new(src)
|
||||
@@ -82,7 +81,13 @@
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/machinery/vending/Destroy()
|
||||
del(wires)
|
||||
wires = null
|
||||
del(coin)
|
||||
coin = null
|
||||
..()
|
||||
|
||||
/obj/machinery/vending/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
@@ -96,7 +101,14 @@
|
||||
if(prob(25))
|
||||
malfunction()
|
||||
|
||||
|
||||
/obj/machinery/vending/RefreshParts() //Better would be to make constructable child
|
||||
if(component_parts)
|
||||
build_inventory(products, start_empty = 1)
|
||||
build_inventory(contraband, 1, 1)
|
||||
build_inventory(premium, 0, 1, 1)
|
||||
for(var/obj/item/weapon/vending_refill/VR in component_parts)
|
||||
refill_inventory(VR, product_records)
|
||||
|
||||
/obj/machinery/vending/blob_act()
|
||||
if(prob(75))
|
||||
malfunction()
|
||||
@@ -104,7 +116,7 @@
|
||||
del(src)
|
||||
|
||||
|
||||
/obj/machinery/vending/proc/build_inventory(var/list/productlist,hidden=0,req_coin=0)
|
||||
/obj/machinery/vending/proc/build_inventory(var/list/productlist,hidden=0,req_coin=0,start_empty = null)
|
||||
for(var/typepath in productlist)
|
||||
var/amount = productlist[typepath]
|
||||
var/price = prices[typepath]
|
||||
@@ -114,7 +126,8 @@
|
||||
var/datum/data/vending_product/R = new /datum/data/vending_product()
|
||||
|
||||
R.product_path = typepath
|
||||
R.amount = amount
|
||||
if(!start_empty)
|
||||
R.amount = amount
|
||||
R.max_amount = amount
|
||||
R.price = price
|
||||
R.display_color = pick("red","blue","green")
|
||||
@@ -166,13 +179,28 @@
|
||||
break
|
||||
return total
|
||||
|
||||
|
||||
/obj/machinery/vending/attackby(obj/item/weapon/W, mob/user)
|
||||
if(panel_open)
|
||||
if(default_unfasten_wrench(user, W, time = 60))
|
||||
return
|
||||
|
||||
if(component_parts && istype(W, /obj/item/weapon/crowbar))
|
||||
var/datum/data/vending_product/machine = product_records
|
||||
for(var/datum/data/vending_product/machine_content in machine)
|
||||
while(machine_content.amount !=0)
|
||||
for(var/obj/item/weapon/vending_refill/VR in component_parts)
|
||||
VR.charges++
|
||||
machine_content.amount--
|
||||
if(!machine_content.amount)
|
||||
break
|
||||
default_deconstruction_crowbar(W)
|
||||
|
||||
if(istype(W, /obj/item/weapon/card/emag))
|
||||
emagged = 1
|
||||
user << "You short out the product lock on [src]"
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/screwdriver))
|
||||
else if(istype(W, /obj/item/weapon/screwdriver) && anchored)
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
panel_open = !panel_open
|
||||
user << "You [panel_open ? "open" : "close"] the maintenance panel."
|
||||
overlays.Cut()
|
||||
@@ -184,36 +212,15 @@
|
||||
if(panel_open)
|
||||
attack_hand(user)
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/card) && currently_vending)
|
||||
var/obj/item/weapon/card/I = W
|
||||
scan_card(I)
|
||||
else if(istype(W, /obj/item/weapon/coin) && premium.len > 0)
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
coin = W
|
||||
user << "<span class='notice'>You insert [W] into [src].</span>"
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wrench))
|
||||
|
||||
if(do_after(user, 20))
|
||||
if(!src) return
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
switch (anchored)
|
||||
if (0)
|
||||
anchored = 1
|
||||
user.visible_message("[user] tightens the bolts securing \the [src] to the floor.", "You tighten the bolts securing \the [src] to the floor.")
|
||||
if (1)
|
||||
user.visible_message("[user] unfastens the bolts securing \the [src] to the floor.", "You unfasten the bolts securing \the [src] to the floor.")
|
||||
anchored = 0
|
||||
return
|
||||
|
||||
else if(src.panel_open)
|
||||
for(var/datum/data/vending_product/R in product_records)
|
||||
if(istype(W, R.product_path))
|
||||
stock(R, user)
|
||||
del(W)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/card) && currently_vending)
|
||||
var/obj/item/weapon/card/I = W
|
||||
scan_card(I)
|
||||
else if(istype(W, refill_canister) && refill_canister != null)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
user << "<span class='notice'>It does nothing.</span>"
|
||||
@@ -234,6 +241,8 @@
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
|
||||
/obj/machinery/vending/proc/scan_card(var/obj/item/weapon/card/I)
|
||||
if(!currently_vending) return
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
@@ -661,6 +670,16 @@
|
||||
contraband = list(/obj/item/device/flashlight = 5,/obj/item/device/assembly/timer = 2)
|
||||
product_ads = "Only the finest!;Have some tools.;The most robust equipment.;The finest gear in space!"
|
||||
|
||||
/obj/machinery/vending/boozeomat/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
var/obj/item/weapon/circuitboard/vendor/V = new(null)
|
||||
V.set_type(type)
|
||||
component_parts += V
|
||||
component_parts += new /obj/item/weapon/vending_refill/boozeomat(0)
|
||||
component_parts += new /obj/item/weapon/vending_refill/boozeomat(0)
|
||||
component_parts += new /obj/item/weapon/vending_refill/boozeomat(0)
|
||||
|
||||
/obj/machinery/vending/coffee
|
||||
name = "Hot Drinks machine"
|
||||
desc = "A vending machine which dispenses hot drinks."
|
||||
@@ -673,7 +692,15 @@
|
||||
prices = list(/obj/item/weapon/reagent_containers/food/drinks/coffee = 25, /obj/item/weapon/reagent_containers/food/drinks/tea = 25, /obj/item/weapon/reagent_containers/food/drinks/h_chocolate = 25)
|
||||
refill_canister = /obj/item/weapon/vending_refill/coffee
|
||||
|
||||
|
||||
/obj/machinery/vending/coffee/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
var/obj/item/weapon/circuitboard/vendor/V = new(null)
|
||||
V.set_type(type)
|
||||
component_parts += V
|
||||
component_parts += new /obj/item/weapon/vending_refill/coffee(0)
|
||||
component_parts += new /obj/item/weapon/vending_refill/coffee(0)
|
||||
component_parts += new /obj/item/weapon/vending_refill/coffee(0)
|
||||
|
||||
/obj/machinery/vending/snack
|
||||
name = "Getmore Chocolate Corp"
|
||||
@@ -699,6 +726,16 @@
|
||||
prices = list(/obj/item/weapon/reagent_containers/food/snacks/chinese/chowmein = 50, /obj/item/weapon/reagent_containers/food/snacks/chinese/tao = 50, /obj/item/weapon/reagent_containers/food/snacks/chinese/newdles = 50,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/chinese/rice = 50, /obj/item/weapon/reagent_containers/food/snacks/wingfangchu = 50)
|
||||
|
||||
/obj/machinery/vending/snack/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
var/obj/item/weapon/circuitboard/vendor/V = new(null)
|
||||
V.set_type(type)
|
||||
component_parts += V
|
||||
component_parts += new /obj/item/weapon/vending_refill/snack(0)
|
||||
component_parts += new /obj/item/weapon/vending_refill/snack(0)
|
||||
component_parts += new /obj/item/weapon/vending_refill/snack(0)
|
||||
|
||||
/obj/machinery/vending/cola
|
||||
name = "Robust Softdrinks"
|
||||
desc = "A softdrink vendor provided by Robust Industries, LLC."
|
||||
@@ -724,7 +761,16 @@
|
||||
/obj/item/weapon/cartridge/janitor = 10,/obj/item/weapon/cartridge/signal/toxins = 10,/obj/item/device/pda/heads = 10,
|
||||
/obj/item/weapon/cartridge/captain = 3,/obj/item/weapon/cartridge/quartermaster = 10)
|
||||
|
||||
|
||||
/obj/machinery/vending/cola/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
var/obj/item/weapon/circuitboard/vendor/V = new(null)
|
||||
V.set_type(type)
|
||||
component_parts += V
|
||||
component_parts += new /obj/item/weapon/vending_refill/cola(0)
|
||||
component_parts += new /obj/item/weapon/vending_refill/cola(0)
|
||||
component_parts += new /obj/item/weapon/vending_refill/cola(0)
|
||||
|
||||
/obj/machinery/vending/cigarette
|
||||
name = "Cigarette machine" //OCD had to be uppercase to look nice with the new formating
|
||||
desc = "If you want to get cancer, might as well do it in style"
|
||||
@@ -738,6 +784,16 @@
|
||||
prices = list(/obj/item/weapon/storage/fancy/cigarettes = 60,/obj/item/weapon/storage/box/matches = 10,/obj/item/weapon/lighter/random = 60, /obj/item/weapon/rollingpaperpack = 20)
|
||||
refill_canister = /obj/item/weapon/vending_refill/cigarette
|
||||
|
||||
/obj/machinery/vending/cigarette/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
var/obj/item/weapon/circuitboard/vendor/V = new(null)
|
||||
V.set_type(type)
|
||||
component_parts += V
|
||||
component_parts += new /obj/item/weapon/vending_refill/cigarette(0)
|
||||
component_parts += new /obj/item/weapon/vending_refill/cigarette(0)
|
||||
component_parts += new /obj/item/weapon/vending_refill/cigarette(0)
|
||||
|
||||
/obj/machinery/vending/medical
|
||||
name = "NanoMed Plus"
|
||||
desc = "Medical drug dispenser."
|
||||
@@ -783,6 +839,16 @@
|
||||
/obj/item/stack/medical/ointment =3,/obj/item/device/healthanalyzer = 3)
|
||||
contraband = list(/obj/item/weapon/reagent_containers/pill/tox = 3)
|
||||
|
||||
/obj/machinery/vending/wallmed1/syndicate
|
||||
name = "SyndiMed Plus"
|
||||
desc = "<b>EVIL</b> wall-mounted Medical Equipment dispenser."
|
||||
icon_state = "syndimed"
|
||||
icon_deny = "syndimed-deny"
|
||||
product_ads = "Go end some lives!;The best stuff for your ship.;Only the finest tools.;Natural chemicals!;This stuff saves lives.;Don't you want some?;Ping!"
|
||||
req_access_txt = "150"
|
||||
products = list(/obj/item/stack/medical/bruise_pack = 2,/obj/item/stack/medical/ointment = 2,/obj/item/weapon/reagent_containers/hypospray/autoinjector = 4,/obj/item/device/healthanalyzer = 1)
|
||||
contraband = list(/obj/item/weapon/reagent_containers/syringe/antitoxin = 4,/obj/item/weapon/reagent_containers/syringe/antiviral = 4,/obj/item/weapon/reagent_containers/pill/tox = 1)
|
||||
|
||||
/obj/machinery/vending/security
|
||||
name = "SecTech"
|
||||
desc = "A security equipment vendor"
|
||||
@@ -854,7 +920,7 @@
|
||||
/obj/item/clothing/glasses/monocle =1,/obj/item/clothing/head/bowlerhat = 1,/obj/item/weapon/cane = 1,/obj/item/clothing/under/sl_suit = 1,
|
||||
/obj/item/clothing/mask/fakemoustache = 1,/obj/item/clothing/suit/bio_suit/plaguedoctorsuit = 1,/obj/item/clothing/head/plaguedoctorhat = 1,/obj/item/clothing/mask/gas/plaguedoctor = 1,
|
||||
/obj/item/clothing/under/owl = 1,/obj/item/clothing/mask/gas/owl_mask = 1,/obj/item/clothing/suit/apron = 1,/obj/item/clothing/under/waiter = 1,
|
||||
/obj/item/clothing/under/pirate = 1,/obj/item/clothing/suit/pirate = 1,/obj/item/clothing/head/pirate = 1,/obj/item/clothing/head/bandana = 1,
|
||||
/obj/item/clothing/under/pirate = 1,/obj/item/clothing/suit/pirate_black = 1,/obj/item/clothing/under/pirate_rags = 1,/obj/item/clothing/suit/pirate_brown = 1,/obj/item/clothing/head/pirate = 1,/obj/item/clothing/head/bandana = 1,
|
||||
/obj/item/clothing/head/bandana = 1,/obj/item/clothing/under/soviet = 1,/obj/item/clothing/head/ushanka = 1,/obj/item/clothing/suit/imperium_monk = 1,
|
||||
/obj/item/clothing/mask/gas/cyborg = 1,/obj/item/clothing/suit/holidaypriest = 1,/obj/item/clothing/head/wizard/marisa/fake = 1,
|
||||
/obj/item/clothing/suit/wizrobe/marisa/fake = 1,/obj/item/clothing/under/sundress = 1,/obj/item/clothing/head/witchwig = 1,/obj/item/weapon/staff/broom = 1,
|
||||
@@ -864,6 +930,17 @@
|
||||
contraband = list(/obj/item/clothing/suit/cardborg = 1,/obj/item/clothing/head/cardborg = 1,/obj/item/clothing/suit/judgerobe = 1,/obj/item/clothing/head/powdered_wig = 1,/obj/item/weapon/gun/magic/wand = 1)
|
||||
premium = list(/obj/item/clothing/suit/hgpirate = 1, /obj/item/clothing/head/hgpiratecap = 1, /obj/item/clothing/head/helmet/roman = 1, /obj/item/clothing/head/helmet/roman/legionaire = 1, /obj/item/clothing/under/roman = 1, /obj/item/clothing/shoes/roman = 1)
|
||||
refill_canister = /obj/item/weapon/vending_refill/autodrobe
|
||||
|
||||
/obj/machinery/vending/cigarette/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
var/obj/item/weapon/circuitboard/vendor/V = new(null)
|
||||
V.set_type(type)
|
||||
component_parts += V
|
||||
component_parts += new /obj/item/weapon/vending_refill/cigarette(0)
|
||||
component_parts += new /obj/item/weapon/vending_refill/cigarette(0)
|
||||
component_parts += new /obj/item/weapon/vending_refill/cigarette(0)
|
||||
|
||||
/obj/machinery/vending/dinnerware
|
||||
name = "Dinnerware"
|
||||
desc = "A kitchen and restaurant equipment vendor"
|
||||
@@ -935,7 +1012,7 @@
|
||||
/obj/machinery/vending/eva
|
||||
name = "Hardsuit Kits"
|
||||
desc = "Conversion kits for your alien hardsuit needs."
|
||||
products = list(/obj/item/weapon/modkit/tajaran = 6, /obj/item/weapon/modkit/unathi = 6)
|
||||
products = list(/obj/item/device/modkit = 6,/obj/item/device/modkit/tajaran = 6,/obj/item/device/modkit/unathi = 6)
|
||||
|
||||
|
||||
/obj/machinery/vending/sustenance
|
||||
@@ -969,7 +1046,6 @@
|
||||
contraband = list(/obj/item/clothing/under/syndicate/tacticool = 5,/obj/item/clothing/under/color/orange = 5,/obj/item/clothing/under/psyche = 5)
|
||||
premium = list(/obj/item/clothing/under/rainbow = 1)
|
||||
|
||||
//THIS IS WHERE THE FEET LIVE, GIT YE SOME
|
||||
/obj/machinery/vending/shoedispenser
|
||||
name = "Shoelord 9000"
|
||||
desc = "Wow, hatlord looked fancy, suitlord looked streamlined, and this is just normal. The guy who disigned these must be an idiot."
|
||||
@@ -979,3 +1055,21 @@
|
||||
contraband = list(/obj/item/clothing/shoes/jackboots = 5,/obj/item/clothing/shoes/orange = 5)
|
||||
premium = list(/obj/item/clothing/shoes/rainbow = 1)
|
||||
|
||||
/obj/machinery/vending/syndicigs
|
||||
name = "Suspicious Cigarette Machine"
|
||||
desc = "Smoke 'em if you've got 'em."
|
||||
product_slogans = "Space cigs taste good like a cigarette should.;I'd rather toolbox than switch.;Smoke!;Don't believe the reports - smoke today!"
|
||||
product_ads = "Probably not bad for you!;Don't believe the scientists!;It's good for you!;Don't quit, buy more!;Smoke!;Nicotine heaven.;Best cigarettes since 2150.;Award-winning cigs."
|
||||
vend_delay = 34
|
||||
icon_state = "cigs"
|
||||
products = list(/obj/item/weapon/storage/fancy/cigarettes/syndicate = 10,/obj/item/weapon/lighter/random = 5)
|
||||
|
||||
/obj/machinery/vending/syndisnack
|
||||
name = "Getmore Chocolate Corp"
|
||||
desc = "A modified snack machine courtesy of the Getmore Chocolate Corporation, based out of Mars"
|
||||
product_slogans = "Try our new nougat bar!;Twice the calories for half the price!"
|
||||
product_ads = "The healthiest!;Award-winning chocolate bars!;Mmm! So good!;Oh my god it's so juicy!;Have a snack.;Snacks are good for you!;Have some more Getmore!;Best quality snacks straight from mars.;We love chocolate!;Try our new jerky!"
|
||||
icon_state = "snack"
|
||||
products = list(/obj/item/weapon/reagent_containers/food/snacks/chips =6,/obj/item/weapon/reagent_containers/food/snacks/sosjerky = 6,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/syndicake = 6, /obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers = 6)
|
||||
refill_canister = /obj/item/weapon/vending_refill/snack
|
||||
@@ -1,8 +1,5 @@
|
||||
/obj/mecha/combat
|
||||
force = 30
|
||||
var/melee_cooldown = 10
|
||||
var/melee_can_hit = 1
|
||||
var/list/destroyable_obj = list(/obj/mecha, /obj/structure/window, /obj/structure/grille, /turf/simulated/wall)
|
||||
var/maxsize = 2
|
||||
internal_damage_threshold = 50
|
||||
maint_access = 0
|
||||
@@ -11,232 +8,6 @@
|
||||
damage_absorption = list("brute"=0.7,"fire"=1,"bullet"=0.7,"laser"=0.85,"energy"=1,"bomb"=0.8)
|
||||
var/am = "d3c2fbcadca903a41161ccc9df9cf948"
|
||||
|
||||
/*
|
||||
/obj/mecha/combat/range_action(target as obj|mob|turf)
|
||||
if(internal_damage&MECHA_INT_CONTROL_LOST)
|
||||
target = pick(view(3,target))
|
||||
if(selected_weapon)
|
||||
selected_weapon.fire(target)
|
||||
return
|
||||
*/
|
||||
|
||||
/obj/mecha/combat/melee_action(target as obj|mob|turf)
|
||||
if(internal_damage&MECHA_INT_CONTROL_LOST)
|
||||
target = safepick(oview(1,src))
|
||||
if(!melee_can_hit || !istype(target, /atom)) return
|
||||
if(istype(target, /mob/living))
|
||||
var/mob/living/M = target
|
||||
if(src.occupant.a_intent == "harm" && !istype(src,/obj/mecha/combat/gygax))
|
||||
playsound(src, 'sound/weapons/punch4.ogg', 50, 1)
|
||||
if(damtype == "brute")
|
||||
step_away(M,src,15)
|
||||
/*
|
||||
if(M.stat>1)
|
||||
M.gib()
|
||||
melee_can_hit = 0
|
||||
if(do_after(melee_cooldown))
|
||||
melee_can_hit = 1
|
||||
return
|
||||
*/
|
||||
if(istype(target, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = target
|
||||
// if (M.health <= 0) return
|
||||
|
||||
var/datum/organ/external/temp = H.get_organ(pick("chest", "chest", "chest", "head"))
|
||||
if(temp)
|
||||
var/update = 0
|
||||
switch(damtype)
|
||||
if("brute")
|
||||
H.Paralyse(1)
|
||||
update |= temp.take_damage(rand(force/2, force), 0)
|
||||
if("fire")
|
||||
update |= temp.take_damage(0, rand(force/2, force))
|
||||
if("tox")
|
||||
if(H.reagents)
|
||||
if(H.reagents.get_reagent_amount("carpotoxin") + force < force*2)
|
||||
H.reagents.add_reagent("carpotoxin", force)
|
||||
if(H.reagents.get_reagent_amount("cryptobiolin") + force < force*2)
|
||||
H.reagents.add_reagent("cryptobiolin", force)
|
||||
else
|
||||
return
|
||||
if(update) H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
|
||||
else
|
||||
switch(damtype)
|
||||
if("brute")
|
||||
M.Paralyse(1)
|
||||
M.take_overall_damage(rand(force/2, force))
|
||||
if("fire")
|
||||
M.take_overall_damage(0, rand(force/2, force))
|
||||
if("tox")
|
||||
if(M.reagents)
|
||||
if(M.reagents.get_reagent_amount("carpotoxin") + force < force*2)
|
||||
M.reagents.add_reagent("carpotoxin", force)
|
||||
if(M.reagents.get_reagent_amount("cryptobiolin") + force < force*2)
|
||||
M.reagents.add_reagent("cryptobiolin", force)
|
||||
else
|
||||
return
|
||||
M.updatehealth()
|
||||
src.occupant_message("You hit [target].")
|
||||
src.visible_message("<font color='red'><b>[src.name] hits [target].</b></font>")
|
||||
else
|
||||
step_away(M,src)
|
||||
src.occupant_message("You push [target] out of the way.")
|
||||
src.visible_message("[src] pushes [target] out of the way.")
|
||||
|
||||
melee_can_hit = 0
|
||||
if(do_after(melee_cooldown))
|
||||
melee_can_hit = 1
|
||||
return
|
||||
|
||||
else
|
||||
if(damtype == "brute")
|
||||
for(var/target_type in src.destroyable_obj)
|
||||
if(istype(target, target_type) && hascall(target, "attackby"))
|
||||
src.occupant_message("You hit [target].")
|
||||
src.visible_message("<font color='red'><b>[src.name] hits [target]</b></font>")
|
||||
if(!istype(target, /turf/simulated/wall))
|
||||
target:attackby(src,src.occupant)
|
||||
else if(prob(5))
|
||||
target:dismantle_wall(1)
|
||||
src.occupant_message("\blue You smash through the wall.")
|
||||
src.visible_message("<b>[src.name] smashes through the wall</b>")
|
||||
playsound(src, 'sound/weapons/smash.ogg', 50, 1)
|
||||
melee_can_hit = 0
|
||||
if(do_after(melee_cooldown))
|
||||
melee_can_hit = 1
|
||||
break
|
||||
return
|
||||
|
||||
/*
|
||||
/obj/mecha/combat/proc/mega_shake(target)
|
||||
if(!istype(target, /obj) && !istype(target, /mob)) return
|
||||
if(istype(target, /mob))
|
||||
var/mob/M = target
|
||||
M.Dizzy(3)
|
||||
M.adjustBruteLoss(1)
|
||||
M.updatehealth()
|
||||
for (var/mob/V in viewers(src))
|
||||
V.show_message("[src.name] shakes [M] like a rag doll.")
|
||||
return
|
||||
*/
|
||||
|
||||
/*
|
||||
if(energy>0 && can_move)
|
||||
if(step(src,direction))
|
||||
can_move = 0
|
||||
spawn(step_in) can_move = 1
|
||||
if(overload)
|
||||
energy = energy-2
|
||||
health--
|
||||
else
|
||||
energy--
|
||||
return 1
|
||||
|
||||
return 0
|
||||
*/
|
||||
/*
|
||||
/obj/mecha/combat/hear_talk(mob/M as mob, text)
|
||||
..()
|
||||
if(am && M==occupant)
|
||||
if(findtext(text,""))
|
||||
sam()
|
||||
return
|
||||
|
||||
/obj/mecha/combat/proc/sam()
|
||||
if(am)
|
||||
var/window = {"<html>
|
||||
<head>
|
||||
<style>
|
||||
body {background:#000;color: #00ff00;font-family:"Courier",monospace;font-size:12px;}
|
||||
#target {word-wrap: break-word;width:100%;padding-right:2px;}
|
||||
#form {display:none;padding:0;margin:0;}
|
||||
#input {background:#000;color: #00ff00;font-family:"Courier",monospace;border:none;padding:0;margin:0;width:90%;font-size:12px;}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var text = "SGNL RCVD\\nTAG ANL :: STTS ACCPTD \\nINITSOC{buff:{128,0,NIL};p:'-zxf';stddev;inenc:'bin';outenc:'plain'}\\nSOD ->\\n0010101100101011001000000101010001101000011010010111001100100000011011010110000101100011011010000110100101101110011001010010000001101001011100110010000001100100011010010111001101100011011010000110000101110010011001110110010101100100001000000110100101101110011101000110111100100000011110010110111101110101011100100010000001100011011000010111001001100101001000000010101100101011000011010000101000101011001010110010000001000110011010010110011101101000011101000010000001110111011010010111010001101000001000000111010001101000011010010111001100100000011011010110000101100011011010000110100101101110011001010010110000100000011000010110111001100100001000000110011101110101011000010111001001100100001000000110100101110100001000000110011001110010011011110110110100100000011101000110100001100101001000000111001101101000011000010110110101100101001000000110111101100110001000000110010001100101011001100110010101100001011101000010000000101011001010110000110100001010001010110010101100100000010100110110010101110010011101100110010100100000011101000110100001101001011100110010000001101101011000010110001101101000011010010110111001100101001011000010000001100001011100110010000001111001011011110111010100100000011101110110111101110101011011000110010000100000011010000110000101110110011001010010000001100110011010010110011101101000011101000010000001101001011101000010000001100110011011110111001000100000011110010110111101110101001000000010101100101011\\n<- EOD\\nSOCFLUSH\\n";
|
||||
var target_id = "target";
|
||||
var form_id = "form";
|
||||
var input_id = "input";
|
||||
var delay=5;
|
||||
var currentChar=0;
|
||||
var inter;
|
||||
var cur_el;
|
||||
var maiden_el;
|
||||
|
||||
function type()
|
||||
{
|
||||
maiden_el = cur_el = document.getElementById(target_id);
|
||||
if(cur_el && typeof(cur_el)!='undefined'){
|
||||
inter = setInterval(function(){appendText(cur_el)},delay);
|
||||
}
|
||||
}
|
||||
|
||||
function appendText(el){
|
||||
if(currentChar>text.length){
|
||||
maiden_el.style.border = 'none';
|
||||
clearInterval(inter);
|
||||
var form = document.getElementById(form_id);
|
||||
var input = document.getElementById(input_id);
|
||||
if((form && typeof(form)!='undefined') && (input && typeof(input)!='undefined')){
|
||||
form.style.display = 'block';
|
||||
input.focus();
|
||||
}
|
||||
return;
|
||||
}
|
||||
var tchar = text.substr(currentChar, 1);
|
||||
if(tchar=='\\n'){
|
||||
el = cur_el = document.createElement('div');
|
||||
maiden_el.appendChild(cur_el);
|
||||
currentChar++;
|
||||
return;
|
||||
}
|
||||
if(!el.firstChild){
|
||||
var tNode=document.createTextNode(tchar);
|
||||
el.appendChild(tNode);
|
||||
}
|
||||
else {
|
||||
el.firstChild.nodeValue = el.firstChild.nodeValue+tchar
|
||||
}
|
||||
currentChar++;
|
||||
}
|
||||
|
||||
function addSubmitEvent(form, input) {
|
||||
input.onkeydown = function(e) {
|
||||
e = e || window.event;
|
||||
if (e.keyCode == 13) {
|
||||
form.submit();
|
||||
return false;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
window.onload = function(){
|
||||
var form = document.getElementById(form_id);
|
||||
var input = document.getElementById(input_id);
|
||||
if((!form || typeof(form)=='undefined') || (!input || typeof(input)=='undefined')){
|
||||
return false;
|
||||
}
|
||||
addSubmitEvent(form,input);
|
||||
type();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper"><div id="target"></div>
|
||||
<form id="form" name="form" action="byond://" method="get">
|
||||
<label for="input">></label><input name="saminput" type="text" id="input" value="" />
|
||||
<input type=\"hidden\" name=\"src\" value=\"\ref[src]\">
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
"}
|
||||
occupant << browse(window, "window=sam;size=800x600;")
|
||||
onclose(occupant, "sam", src)
|
||||
return
|
||||
*/
|
||||
/obj/mecha/combat/moved_inside(var/mob/living/carbon/human/H as mob)
|
||||
if(..())
|
||||
if(H.client)
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
internal_damage_threshold = 35
|
||||
max_equip = 3
|
||||
maxsize = 2
|
||||
force = 10
|
||||
step_energy_drain = 3
|
||||
|
||||
/obj/mecha/combat/gygax/loaded/New()
|
||||
|
||||
@@ -26,16 +26,6 @@
|
||||
ME.attach(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/mecha/combat/honker/melee_action(target)
|
||||
if(!melee_can_hit)
|
||||
return
|
||||
else if(istype(target, /mob))
|
||||
step_away(target,src,15)
|
||||
return
|
||||
|
||||
/obj/mecha/combat/honker/get_stats_part()
|
||||
var/integrity = health/initial(health)*100
|
||||
var/cell_charge = get_charge()
|
||||
|
||||
+117
-183
@@ -1,218 +1,152 @@
|
||||
/turf/simulated/floor/mech_bay_recharge_floor
|
||||
name = "Mech Bay Recharge Station"
|
||||
icon = 'icons/mecha/mech_bay.dmi'
|
||||
icon_state = "recharge_floor"
|
||||
var/obj/machinery/mech_bay_recharge_port/recharge_port
|
||||
var/obj/machinery/computer/mech_bay_power_console/recharge_console
|
||||
var/obj/mecha/recharging_mecha = null
|
||||
|
||||
Entered(var/obj/mecha/mecha)
|
||||
. = ..()
|
||||
if(istype(mecha))
|
||||
mecha.occupant_message("<b>Initializing power control devices.</b>")
|
||||
init_devices()
|
||||
if(recharge_console && recharge_port)
|
||||
recharging_mecha = mecha
|
||||
recharge_console.mecha_in(mecha)
|
||||
return
|
||||
else if(!recharge_console)
|
||||
mecha.occupant_message("<font color='red'>Control console not found. Terminating.</font>")
|
||||
else if(!recharge_port)
|
||||
mecha.occupant_message("<font color='red'>Power port not found. Terminating.</font>")
|
||||
return
|
||||
|
||||
Exited(atom)
|
||||
. = ..()
|
||||
if(atom == recharging_mecha)
|
||||
recharging_mecha = null
|
||||
if(recharge_console)
|
||||
recharge_console.mecha_out()
|
||||
return
|
||||
|
||||
proc/init_devices()
|
||||
recharge_console = locate() in range(1,src)
|
||||
recharge_port = locate(/obj/machinery/mech_bay_recharge_port, get_step(src, WEST))
|
||||
if(recharge_console)
|
||||
recharge_console.recharge_floor = src
|
||||
if(recharge_port)
|
||||
recharge_console.recharge_port = recharge_port
|
||||
if(recharge_port)
|
||||
recharge_port.recharge_floor = src
|
||||
if(recharge_console)
|
||||
recharge_port.recharge_console = recharge_console
|
||||
return
|
||||
|
||||
/turf/simulated/floor/mech_bay_recharge_floor // Whose idea it was
|
||||
name = "Mech Bay Recharge Station" // Recharging turfs
|
||||
icon = 'icons/turf/floors.dmi' // That are set in stone to check the west turf for recharge port
|
||||
icon_state = "recharge_floor" // Some people just want to watch the world burn i guess
|
||||
|
||||
/turf/simulated/floor/mech_bay_recharge_floor/break_tile()
|
||||
src.ChangeTurf(/turf/simulated/floor/plating)
|
||||
|
||||
/turf/simulated/floor/mech_bay_recharge_floor/airless
|
||||
icon_state = "recharge_floor_asteroid"
|
||||
oxygen = 0.01
|
||||
nitrogen = 0.01
|
||||
temperature = TCMB
|
||||
|
||||
/obj/machinery/mech_bay_recharge_port
|
||||
name = "Mech Bay Power Port"
|
||||
density = 1
|
||||
anchored = 1
|
||||
dir = 4
|
||||
icon = 'icons/mecha/mech_bay.dmi'
|
||||
icon_state = "recharge_port"
|
||||
var/turf/simulated/floor/mech_bay_recharge_floor/recharge_floor
|
||||
var/obj/mecha/recharging_mech
|
||||
var/obj/machinery/computer/mech_bay_power_console/recharge_console
|
||||
var/datum/global_iterator/mech_bay_recharger/pr_recharger
|
||||
var/max_charge = 50
|
||||
var/on = 0
|
||||
var/repairability = 0
|
||||
var/turf/recharging_turf = null
|
||||
|
||||
New()
|
||||
..()
|
||||
pr_recharger = new /datum/global_iterator/mech_bay_recharger(null,0)
|
||||
/obj/machinery/mech_bay_recharge_port/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/mech_recharger(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src, 1)
|
||||
RefreshParts()
|
||||
recharging_turf = get_step(loc, dir)
|
||||
|
||||
/obj/machinery/mech_bay_recharge_port/RefreshParts()
|
||||
var/MC
|
||||
for(var/obj/item/weapon/stock_parts/capacitor/C in component_parts)
|
||||
MC += C.rating
|
||||
max_charge = MC * 25
|
||||
|
||||
/obj/machinery/mech_bay_recharge_port/process()
|
||||
if(stat & NOPOWER || !recharge_console)
|
||||
return
|
||||
if(!recharging_mech)
|
||||
recharging_mech = locate(/obj/mecha) in recharging_turf
|
||||
if(recharging_mech)
|
||||
recharge_console.update_icon()
|
||||
if(recharging_mech && recharging_mech.cell)
|
||||
if(recharging_mech.cell.charge < recharging_mech.cell.maxcharge)
|
||||
var/delta = min(max_charge, recharging_mech.cell.maxcharge - recharging_mech.cell.charge)
|
||||
recharging_mech.give_power(delta)
|
||||
use_power(delta*150)
|
||||
else
|
||||
recharge_console.update_icon()
|
||||
if(recharging_mech.loc != recharging_turf)
|
||||
recharging_mech = null
|
||||
recharge_console.update_icon()
|
||||
|
||||
|
||||
/obj/machinery/mech_bay_recharge_port/attackby(obj/item/I, mob/user)
|
||||
if(default_deconstruction_screwdriver(user, "recharge_port-o", "recharge_port", I))
|
||||
return
|
||||
|
||||
proc/start_charge(var/obj/mecha/recharging_mecha)
|
||||
if(stat&(NOPOWER|BROKEN))
|
||||
recharging_mecha.occupant_message("<font color='red'>Power port not responding. Terminating.</font>")
|
||||
return 0
|
||||
else
|
||||
if(recharging_mecha.cell)
|
||||
recharging_mecha.occupant_message("Now charging...")
|
||||
pr_recharger.start(list(src,recharging_mecha))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
proc/stop_charge()
|
||||
if(recharge_console && !recharge_console.stat)
|
||||
recharge_console.icon_state = initial(recharge_console.icon_state)
|
||||
pr_recharger.stop()
|
||||
if(default_change_direction_wrench(user, I))
|
||||
recharging_turf = get_step(loc, dir)
|
||||
return
|
||||
|
||||
proc/active()
|
||||
if(pr_recharger.active())
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
power_change()
|
||||
if(powered())
|
||||
stat &= ~NOPOWER
|
||||
else
|
||||
spawn(rand(0, 15))
|
||||
stat |= NOPOWER
|
||||
pr_recharger.stop()
|
||||
if(exchange_parts(user, I))
|
||||
return
|
||||
|
||||
proc/set_voltage(new_voltage)
|
||||
if(new_voltage && isnum(new_voltage))
|
||||
pr_recharger.max_charge = new_voltage
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
/datum/global_iterator/mech_bay_recharger
|
||||
delay = 20
|
||||
var/max_charge = 45
|
||||
check_for_null = 0 //since port.stop_charge() must be called. The checks are made in process()
|
||||
|
||||
process(var/obj/machinery/mech_bay_recharge_port/port, var/obj/mecha/mecha)
|
||||
if(!port)
|
||||
return 0
|
||||
if(mecha && mecha in port.recharge_floor)
|
||||
if(!mecha.cell) return
|
||||
var/delta = min(max_charge, mecha.cell.maxcharge - mecha.cell.charge)
|
||||
if(delta>0)
|
||||
mecha.give_power(delta)
|
||||
port.use_power(delta*150)
|
||||
else
|
||||
mecha.occupant_message("<font color='blue'><b>Fully charged.</b></font>")
|
||||
port.stop_charge()
|
||||
else
|
||||
port.stop_charge()
|
||||
return
|
||||
|
||||
|
||||
|
||||
default_deconstruction_crowbar(I)
|
||||
|
||||
/obj/machinery/computer/mech_bay_power_console
|
||||
name = "Mech Bay Power Control Console"
|
||||
desc = "Used to control mechbay power ports."
|
||||
density = 1
|
||||
anchored = 1
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "recharge_comp"
|
||||
circuit = "/obj/item/weapon/circuitboard/mech_bay_power_console"
|
||||
var/autostart = 1
|
||||
var/voltage = 45
|
||||
var/turf/simulated/floor/mech_bay_recharge_floor/recharge_floor
|
||||
circuit = /obj/item/weapon/circuitboard/mech_bay_power_console
|
||||
var/obj/machinery/mech_bay_recharge_port/recharge_port
|
||||
|
||||
proc/mecha_in(var/obj/mecha/mecha)
|
||||
if(stat&(NOPOWER|BROKEN))
|
||||
mecha.occupant_message("<font color='red'>Control console not responding. Terminating...</font>")
|
||||
return
|
||||
if(recharge_port && autostart)
|
||||
var/answer = recharge_port.start_charge(mecha)
|
||||
if(answer)
|
||||
recharge_port.set_voltage(voltage)
|
||||
src.icon_state = initial(src.icon_state)+"_on"
|
||||
/obj/machinery/computer/mech_bay_power_console/attack_ai(mob/user)
|
||||
return interact(user)
|
||||
|
||||
/obj/machinery/computer/mech_bay_power_console/attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
interact(user)
|
||||
|
||||
proc/mecha_out()
|
||||
if(recharge_port)
|
||||
recharge_port.stop_charge()
|
||||
/obj/machinery/computer/mech_bay_power_console/interact(mob/user)
|
||||
var/data
|
||||
if(!recharge_port)
|
||||
data += "<div class='statusDisplay'>No recharging port detected.</div><BR>"
|
||||
data += "<A href='?src=\ref[src];reconnect=1'>Reconnect</A>"
|
||||
else
|
||||
data += "<h3>Mech status</h3>"
|
||||
if(!recharge_port.recharging_mech)
|
||||
data += "<div class='statusDisplay'>No mech detected.</div>"
|
||||
else
|
||||
data += "<div class='statusDisplay'>Integrity: [recharge_port.recharging_mech.health]<BR>"
|
||||
data += "Power: [recharge_port.recharging_mech.cell.charge]/[recharge_port.recharging_mech.cell.maxcharge]</div>"
|
||||
|
||||
var/datum/browser/popup = new(user, "mech recharger", name, 300, 300)
|
||||
popup.set_content(data)
|
||||
popup.open()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/mech_bay_power_console/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if(href_list["reconnect"])
|
||||
reconnect()
|
||||
updateUsrDialog()
|
||||
|
||||
|
||||
power_change()
|
||||
if(stat & BROKEN)
|
||||
icon_state = initial(icon_state)+"_broken"
|
||||
/obj/machinery/computer/mech_bay_power_console/proc/reconnect()
|
||||
if(recharge_port)
|
||||
return
|
||||
recharge_port = locate(/obj/machinery/mech_bay_recharge_port) in range(1)
|
||||
if(!recharge_port)
|
||||
for(var/D in cardinal)
|
||||
var/turf/A = get_step(src, D)
|
||||
A = get_step(A, D)
|
||||
recharge_port = locate(/obj/machinery/mech_bay_recharge_port) in A
|
||||
if(recharge_port)
|
||||
recharge_port.stop_charge()
|
||||
else if(powered())
|
||||
icon_state = initial(icon_state)
|
||||
stat &= ~NOPOWER
|
||||
break
|
||||
if(recharge_port)
|
||||
if(!recharge_port.recharge_console)
|
||||
recharge_port.recharge_console = src
|
||||
else
|
||||
spawn(rand(0, 15))
|
||||
icon_state = initial(icon_state)+"_nopower"
|
||||
stat |= NOPOWER
|
||||
if(recharge_port)
|
||||
recharge_port.stop_charge()
|
||||
recharge_port = null
|
||||
|
||||
set_broken()
|
||||
icon_state = initial(icon_state)+"_broken"
|
||||
stat |= BROKEN
|
||||
if(recharge_port)
|
||||
recharge_port.stop_charge()
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
if(..()) return
|
||||
var/output = "<html><head><title>[src.name]</title></head><body>"
|
||||
if(!recharge_floor)
|
||||
output += "<font color='red'>Mech Bay Recharge Station not initialized.</font><br>"
|
||||
else
|
||||
output += {"<b>Mech Bay Recharge Station Data:</b><div style='margin-left: 15px;'>
|
||||
<b>Mecha: </b>[recharge_floor.recharging_mecha||"None"]<br>"}
|
||||
if(recharge_floor.recharging_mecha)
|
||||
var/cell_charge = recharge_floor.recharging_mecha.get_charge()
|
||||
output += "<b>Cell charge: </b>[isnull(cell_charge)?"No powercell found":"[recharge_floor.recharging_mecha.cell.charge]/[recharge_floor.recharging_mecha.cell.maxcharge]"]<br>"
|
||||
output += "</div>"
|
||||
if(!recharge_port)
|
||||
output += "<font color='red'>Mech Bay Power Port not initialized.</font><br>"
|
||||
else
|
||||
output += "<b>Mech Bay Power Port Status: </b>[recharge_port.active()?"Now charging":"On hold"]<br>"
|
||||
|
||||
/*
|
||||
output += {"<hr>
|
||||
<b>Settings:</b>
|
||||
<div style='margin-left: 15px;'>
|
||||
<b>Start sequence on succesful init: </b><a href='?src=\ref[src];autostart=1'>[autostart?"On":"Off"]</a><br>
|
||||
<b>Recharge Port Voltage: </b><a href='?src=\ref[src];voltage=30'>Low</a> - <a href='?src=\ref[src];voltage=45'>Medium</a> - <a href='?src=\ref[src];voltage=60'>High</a><br>
|
||||
</div>"}
|
||||
*/
|
||||
|
||||
output += "</ body></html>"
|
||||
user << browse(output, "window=mech_bay_console")
|
||||
onclose(user, "mech_bay_console")
|
||||
return
|
||||
/obj/machinery/computer/mech_bay_power_console/process()
|
||||
if(recharge_port && recharge_port.recharging_mech && recharge_port.recharging_mech.cell)
|
||||
updateDialog()
|
||||
|
||||
|
||||
Topic(href, href_list)
|
||||
if(href_list["autostart"])
|
||||
autostart = !autostart
|
||||
if(href_list["voltage"])
|
||||
voltage = text2num(href_list["voltage"])
|
||||
if(recharge_port)
|
||||
recharge_port.set_voltage(voltage)
|
||||
updateUsrDialog()
|
||||
return
|
||||
/obj/machinery/computer/mech_bay_power_console/update_icon()
|
||||
if(!recharge_port || !recharge_port.recharging_mech || !recharge_port.recharging_mech.cell || !(recharge_port.recharging_mech.cell.charge < recharge_port.recharging_mech.cell.maxcharge))
|
||||
icon_state = "recharge_comp"
|
||||
else
|
||||
icon_state = "recharge_comp_on"
|
||||
|
||||
/obj/machinery/computer/mech_bay_power_console/initialize()
|
||||
reconnect()
|
||||
|
||||
@@ -13,8 +13,10 @@
|
||||
idle_power_usage = 20
|
||||
active_power_usage = 5000
|
||||
req_access = list(access_robotics)
|
||||
var/time_coeff = 1.5 //can be upgraded with research
|
||||
var/resource_coeff = 1.5 //can be upgraded with research
|
||||
var/time_coeff = 1
|
||||
var/resource_coeff = 1
|
||||
var/time_coeff_tech = 1
|
||||
var/resource_coeff_tech = 1
|
||||
var/list/resources = list(
|
||||
"metal"=0,
|
||||
"glass"=0,
|
||||
@@ -93,6 +95,16 @@
|
||||
/obj/item/mecha_parts/part/durand_right_leg,
|
||||
/obj/item/mecha_parts/part/durand_armor
|
||||
),
|
||||
"Phazon"=list(
|
||||
/obj/item/mecha_parts/chassis/phazon,
|
||||
/obj/item/mecha_parts/part/phazon_torso,
|
||||
/obj/item/mecha_parts/part/phazon_head,
|
||||
/obj/item/mecha_parts/part/phazon_left_arm,
|
||||
/obj/item/mecha_parts/part/phazon_right_arm,
|
||||
/obj/item/mecha_parts/part/phazon_left_leg,
|
||||
/obj/item/mecha_parts/part/phazon_right_leg,
|
||||
/obj/item/mecha_parts/part/phazon_armor
|
||||
),
|
||||
"H.O.N.K"=list(
|
||||
/obj/item/mecha_parts/chassis/honker,
|
||||
/obj/item/mecha_parts/part/honker_torso,
|
||||
@@ -101,7 +113,7 @@
|
||||
/obj/item/mecha_parts/part/honker_right_arm,
|
||||
/obj/item/mecha_parts/part/honker_left_leg,
|
||||
/obj/item/mecha_parts/part/honker_right_leg
|
||||
),
|
||||
),
|
||||
"Exosuit Equipment"=list(
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp,
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/drill,
|
||||
@@ -171,18 +183,16 @@
|
||||
T = 0
|
||||
for(var/obj/item/weapon/stock_parts/micro_laser/Ma in component_parts)
|
||||
T += Ma.rating
|
||||
if(T >= 1)
|
||||
T -= 1
|
||||
T -= 1
|
||||
var/diff
|
||||
diff = round(initial(resource_coeff) - (initial(resource_coeff)*(T))/25,0.01)
|
||||
diff = round(initial(resource_coeff) - (initial(resource_coeff)*(T))/8,0.01)
|
||||
if(resource_coeff!=diff)
|
||||
resource_coeff = diff
|
||||
T = 0
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/Ml in component_parts)
|
||||
T += Ml.rating
|
||||
if(T>= 2)
|
||||
T -= 2
|
||||
diff = round(initial(time_coeff) - (initial(time_coeff)*(T))/25,0.01)
|
||||
T -= 1
|
||||
diff = round(initial(time_coeff) - (initial(time_coeff)*(T))/5,0.01)
|
||||
if(time_coeff!=diff)
|
||||
time_coeff = diff
|
||||
|
||||
@@ -447,20 +457,20 @@
|
||||
pmat += Ml.rating
|
||||
if(pmat >= 1)
|
||||
pmat -= 1//So the equations don't have to be reworked, upgrading a single part from T1 to T2 is == to 1 tech level
|
||||
diff = round(initial(resource_coeff) - (initial(resource_coeff)*(T.level+pmat))/25,0.01)
|
||||
if(resource_coeff!=diff)
|
||||
resource_coeff = diff
|
||||
output+="Production efficiency increased.<br>"
|
||||
diff = round(initial(resource_coeff_tech) - (initial(resource_coeff_tech)*(T.level+pmat))/30,0.01)
|
||||
if(resource_coeff_tech > diff)
|
||||
resource_coeff_tech = diff
|
||||
output += "Production efficiency increased.<br>"
|
||||
if("programming")
|
||||
var/ptime = 0
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/Ma in component_parts)
|
||||
ptime += Ma.rating
|
||||
if(ptime >= 2)
|
||||
ptime -= 2
|
||||
diff = round(initial(time_coeff) - (initial(time_coeff)*(T.level+ptime))/25,0.1)
|
||||
if(time_coeff!=diff)
|
||||
time_coeff = diff
|
||||
output+="Production routines updated.<br>"
|
||||
diff = round(initial(time_coeff_tech) - (initial(time_coeff_tech)*(T.level+ptime))/25,0.1)
|
||||
if(time_coeff_tech > diff)
|
||||
time_coeff_tech = diff
|
||||
output += "Production routines updated.<br>"
|
||||
return output
|
||||
|
||||
|
||||
@@ -492,14 +502,14 @@
|
||||
if(part.vars.Find("construction_time") && part.vars.Find("construction_cost"))
|
||||
if (resource=="iron" && !("iron" in part:construction_cost))
|
||||
resource="metal"
|
||||
return round(part:construction_cost[resource]*resource_coeff, roundto)
|
||||
return round(part:construction_cost[resource]*resource_coeff*resource_coeff_tech, roundto)
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/get_construction_time_w_coeff(var/obj/item/part as obj, var/roundto=1)
|
||||
//Be SURE to add any new equipment to this switch, but don't be suprised if it spits out children objects
|
||||
if(part.vars.Find("construction_time") && part.vars.Find("construction_cost"))
|
||||
return round(part:construction_time*time_coeff, roundto)
|
||||
return round(part:construction_time*time_coeff*time_coeff_tech, roundto)
|
||||
else
|
||||
return 0
|
||||
|
||||
@@ -702,53 +712,44 @@
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/attackby(obj/W as obj, mob/user as mob)
|
||||
if(exchange_parts(user, W))
|
||||
return
|
||||
if(istype(W,/obj/item/weapon/screwdriver))
|
||||
if (!opened)
|
||||
opened = 1
|
||||
icon_state = "fab-o"
|
||||
user << "You open the maintenance hatch of [src]."
|
||||
else
|
||||
opened = 0
|
||||
icon_state = "fab-idle"
|
||||
user << "You close the maintenance hatch of [src]."
|
||||
return
|
||||
if (opened)
|
||||
return 1
|
||||
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
default_deconstruction_screwdriver(user, "fab-o", "fab-idle", W)
|
||||
return 1
|
||||
|
||||
if (panel_open)
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(src.loc)
|
||||
M.state = 2
|
||||
M.icon_state = "box_1"
|
||||
for(var/obj/I in component_parts)
|
||||
if(I.reliability != 100 && crit_fail)
|
||||
I.crit_fail = 1
|
||||
I.loc = src.loc
|
||||
if(src.resources["metal"] >= 3750)
|
||||
var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal(src.loc)
|
||||
G.amount = round(src.resources["metal"] / G.perunit)
|
||||
if(src.resources["glass"] >= 3750)
|
||||
var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(src.loc)
|
||||
G.amount = round(src.resources["glass"] / G.perunit)
|
||||
if(src.resources["plasma"] >= 2000)
|
||||
var/obj/item/stack/sheet/mineral/plasma/G = new /obj/item/stack/sheet/mineral/plasma(src.loc)
|
||||
G.amount = round(src.resources["plasma"] / G.perunit)
|
||||
if(src.resources["silver"] >= 2000)
|
||||
var/obj/item/stack/sheet/mineral/silver/G = new /obj/item/stack/sheet/mineral/silver(src.loc)
|
||||
G.amount = round(src.resources["silver"] / G.perunit)
|
||||
if(src.resources["gold"] >= 2000)
|
||||
var/obj/item/stack/sheet/mineral/gold/G = new /obj/item/stack/sheet/mineral/gold(src.loc)
|
||||
G.amount = round(src.resources["gold"] / G.perunit)
|
||||
if(src.resources["uranium"] >= 2000)
|
||||
var/obj/item/stack/sheet/mineral/uranium/G = new /obj/item/stack/sheet/mineral/uranium(src.loc)
|
||||
G.amount = round(src.resources["uranium"] / G.perunit)
|
||||
if(src.resources["diamond"] >= 2000)
|
||||
var/obj/item/stack/sheet/mineral/diamond/G = new /obj/item/stack/sheet/mineral/diamond(src.loc)
|
||||
G.amount = round(src.resources["diamond"] / G.perunit)
|
||||
if(src.resources["bananium"] >= 2000)
|
||||
var/obj/item/stack/sheet/mineral/clown/G = new /obj/item/stack/sheet/mineral/clown(src.loc)
|
||||
G.amount = round(src.resources["bananium"] / G.perunit)
|
||||
del(src)
|
||||
return 1
|
||||
I.loc = src.loc
|
||||
if(src.resources["metal"] >= 3750)
|
||||
var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal(src.loc)
|
||||
G.amount = round(src.resources["metal"] / G.perunit)
|
||||
if(src.resources["glass"] >= 3750)
|
||||
var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(src.loc)
|
||||
G.amount = round(src.resources["glass"] / G.perunit)
|
||||
if(src.resources["plasma"] >= 2000)
|
||||
var/obj/item/stack/sheet/mineral/plasma/G = new /obj/item/stack/sheet/mineral/plasma(src.loc)
|
||||
G.amount = round(src.resources["plasma"] / G.perunit)
|
||||
if(src.resources["silver"] >= 2000)
|
||||
var/obj/item/stack/sheet/mineral/silver/G = new /obj/item/stack/sheet/mineral/silver(src.loc)
|
||||
G.amount = round(src.resources["silver"] / G.perunit)
|
||||
if(src.resources["gold"] >= 2000)
|
||||
var/obj/item/stack/sheet/mineral/gold/G = new /obj/item/stack/sheet/mineral/gold(src.loc)
|
||||
G.amount = round(src.resources["gold"] / G.perunit)
|
||||
if(src.resources["uranium"] >= 2000)
|
||||
var/obj/item/stack/sheet/mineral/uranium/G = new /obj/item/stack/sheet/mineral/uranium(src.loc)
|
||||
G.amount = round(src.resources["uranium"] / G.perunit)
|
||||
if(src.resources["diamond"] >= 2000)
|
||||
var/obj/item/stack/sheet/mineral/diamond/G = new /obj/item/stack/sheet/mineral/diamond(src.loc)
|
||||
G.amount = round(src.resources["diamond"] / G.perunit)
|
||||
if(src.resources["bananium"] >= 2000)
|
||||
var/obj/item/stack/sheet/mineral/clown/G = new /obj/item/stack/sheet/mineral/clown(src.loc)
|
||||
G.amount = round(src.resources["bananium"] / G.perunit)
|
||||
default_deconstruction_crowbar(W)
|
||||
return 1
|
||||
else
|
||||
user << "\red You can't load the [src.name] while it's opened."
|
||||
return 1
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
unacidable = 1 //and no deleting hoomans inside
|
||||
layer = MOB_LAYER //icon draw layer
|
||||
infra_luminosity = 15 //byond implementation is bugged.
|
||||
force = 5
|
||||
var/initial_icon = null //Mech type for resetting icon. Only used for reskinning kits (see custom items)
|
||||
var/can_move = 1
|
||||
var/mob/living/carbon/occupant = null
|
||||
@@ -71,6 +72,8 @@
|
||||
|
||||
var/stepsound = 'sound/mecha/mechturn.ogg'
|
||||
|
||||
var/melee_cooldown = 10
|
||||
var/melee_can_hit = 1
|
||||
|
||||
/obj/mecha/New()
|
||||
..()
|
||||
@@ -226,12 +229,15 @@
|
||||
|
||||
/obj/mecha/proc/click_action(atom/target,mob/user)
|
||||
if(!src.occupant || src.occupant != user ) return
|
||||
if(user.stat) return
|
||||
if(state)
|
||||
occupant_message("<font color='red'>Maintenance protocols in effect</font>")
|
||||
if(user.stat || !user.canmove)
|
||||
return
|
||||
if(state)
|
||||
occupant_message("<span class='warning'>Maintenance protocols in effect.</span>")
|
||||
return
|
||||
if(!get_charge())
|
||||
return
|
||||
if(src == target)
|
||||
return
|
||||
if(!get_charge()) return
|
||||
if(src == target) return
|
||||
var/dir_to_target = get_dir(src,target)
|
||||
if(dir_to_target && !(dir_to_target & src.dir))//wrong direction
|
||||
return
|
||||
@@ -239,17 +245,46 @@
|
||||
target = safepick(view(3,target))
|
||||
if(!target)
|
||||
return
|
||||
if(get_dist(src, target)>1)
|
||||
if(!target.Adjacent(src))
|
||||
if(selected && selected.is_ranged())
|
||||
selected.action(target)
|
||||
else if(selected && selected.is_melee())
|
||||
selected.action(target)
|
||||
else
|
||||
src.melee_action(target)
|
||||
if(internal_damage&MECHA_INT_CONTROL_LOST)
|
||||
target = safepick(oview(1,src))
|
||||
if(!melee_can_hit || !istype(target, /atom))
|
||||
return
|
||||
target.mech_melee_attack(src)
|
||||
melee_can_hit = 0
|
||||
if(do_after(melee_cooldown))
|
||||
melee_can_hit = 1
|
||||
return
|
||||
|
||||
/obj/mecha/proc/mech_toxin_damage(mob/living/target)
|
||||
playsound(src, 'sound/effects/spray2.ogg', 50, 1)
|
||||
if(target.reagents)
|
||||
if(target.reagents.get_reagent_amount("cryptobiolin") + force < force*2)
|
||||
target.reagents.add_reagent("cryptobiolin", force/2)
|
||||
if(target.reagents.get_reagent_amount("toxin") + force < force*2)
|
||||
target.reagents.add_reagent("toxin", force/2.5)
|
||||
|
||||
|
||||
|
||||
/atom/proc/mech_melee_attack(obj/mecha/M)
|
||||
return
|
||||
|
||||
|
||||
/obj/mecha/proc/melee_action(atom/target)
|
||||
/obj/mecha/mech_melee_attack(obj/mecha/M)
|
||||
if(M.damtype =="brute")
|
||||
playsound(src, 'sound/weapons/punch4.ogg', 50, 1)
|
||||
else if(M.damtype == "fire")
|
||||
playsound(src, 'sound/items/Welder.ogg', 50, 1)
|
||||
else
|
||||
return
|
||||
M.occupant_message("<span class='danger'>You hit [src].</span>")
|
||||
visible_message("<span class='danger'>[src] has been hit by [M.name].</span>")
|
||||
take_damage(M.force, damtype)
|
||||
add_logs(M.occupant, src, "attacked", object=M, addition="(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])")
|
||||
return
|
||||
|
||||
/obj/mecha/proc/range_action(atom/target)
|
||||
|
||||
@@ -1078,15 +1078,13 @@
|
||||
feedback_inc("mecha_durand_created",1)
|
||||
return
|
||||
|
||||
|
||||
/datum/construction/mecha/phazon_chassis
|
||||
result = "/obj/mecha/combat/phazon"
|
||||
steps = list(list("key"=/obj/item/mecha_parts/part/phazon_torso),//1
|
||||
list("key"=/obj/item/mecha_parts/part/phazon_left_arm),//2
|
||||
list("key"=/obj/item/mecha_parts/part/phazon_right_arm),//3
|
||||
list("key"=/obj/item/mecha_parts/part/phazon_left_leg),//4
|
||||
list("key"=/obj/item/mecha_parts/part/phazon_right_leg),//5
|
||||
list("key"=/obj/item/mecha_parts/part/phazon_head)
|
||||
list("key"=/obj/item/mecha_parts/part/phazon_head),//2
|
||||
list("key"=/obj/item/mecha_parts/part/phazon_left_arm),//3
|
||||
list("key"=/obj/item/mecha_parts/part/phazon_right_arm),//4
|
||||
list("key"=/obj/item/mecha_parts/part/phazon_left_leg),//5
|
||||
list("key"=/obj/item/mecha_parts/part/phazon_right_leg)//6
|
||||
)
|
||||
|
||||
custom_action(step, atom/used_atom, mob/user)
|
||||
@@ -1098,8 +1096,302 @@
|
||||
action(atom/used_atom,mob/user as mob)
|
||||
return check_all_steps(used_atom,user)
|
||||
|
||||
spawn_result(mob/user as mob)
|
||||
var/obj/item/mecha_parts/chassis/const_holder = holder
|
||||
const_holder.construct = new /datum/construction/reversible/mecha/phazon(const_holder)
|
||||
const_holder.icon = 'icons/mecha/mech_construction.dmi'
|
||||
const_holder.icon_state = "phazon0"
|
||||
const_holder.density = 1
|
||||
spawn()
|
||||
del src
|
||||
return
|
||||
|
||||
/datum/construction/reversible/mecha/phazon
|
||||
result = "/obj/mecha/combat/phazon"
|
||||
steps = list(
|
||||
//1
|
||||
list("key"=/obj/item/weapon/weldingtool,
|
||||
"backkey"=/obj/item/weapon/wrench,
|
||||
"desc"="External armor is wrenched."),
|
||||
//2
|
||||
list("key"=/obj/item/weapon/wrench,
|
||||
"backkey"=/obj/item/weapon/crowbar,
|
||||
"desc"="External armor is installed."),
|
||||
//3
|
||||
list("key"=/obj/item/mecha_parts/part/phazon_armor,
|
||||
"backkey"=/obj/item/weapon/weldingtool,
|
||||
"desc"="Phase armor is welded."),
|
||||
//4
|
||||
list("key"=/obj/item/weapon/weldingtool,
|
||||
"backkey"=/obj/item/weapon/wrench,
|
||||
"desc"="Phase armor is wrenched."),
|
||||
//5
|
||||
list("key"=/obj/item/weapon/wrench,
|
||||
"backkey"=/obj/item/weapon/crowbar,
|
||||
"desc"="Phase armor is installed."),
|
||||
//6
|
||||
list("key"=/obj/item/stack/sheet/plasteel,
|
||||
"backkey"=/obj/item/weapon/screwdriver,
|
||||
"desc"="The bluespace crystal is engaged."),
|
||||
//7
|
||||
list("key"=/obj/item/weapon/screwdriver,
|
||||
"backkey"=/obj/item/weapon/wirecutters,
|
||||
"desc"="The bluespace crystal is connected."),
|
||||
//8
|
||||
list("key"=/obj/item/stack/cable_coil,
|
||||
"backkey"=/obj/item/weapon/crowbar,
|
||||
"desc"="The bluespace crystal is installed."),
|
||||
//9
|
||||
list("key"=/obj/item/bluespace_crystal,
|
||||
"backkey"=/obj/item/weapon/screwdriver,
|
||||
"desc"="Super capacitor is secured."),
|
||||
//10
|
||||
list("key"=/obj/item/weapon/screwdriver,
|
||||
"backkey"=/obj/item/weapon/crowbar,
|
||||
"desc"="Super capacitor is installed."),
|
||||
//11
|
||||
list("key"=/obj/item/weapon/stock_parts/capacitor/super,
|
||||
"backkey"=/obj/item/weapon/screwdriver,
|
||||
"desc"="Phasic scanner module is secured."),
|
||||
//12
|
||||
list("key"=/obj/item/weapon/screwdriver,
|
||||
"backkey"=/obj/item/weapon/crowbar,
|
||||
"desc"="Phasic scanner module is installed."),
|
||||
//13
|
||||
list("key"=/obj/item/weapon/stock_parts/scanning_module/phasic,
|
||||
"backkey"=/obj/item/weapon/screwdriver,
|
||||
"desc"="Scanning module is secured."),
|
||||
//14
|
||||
list("key"=/obj/item/weapon/screwdriver,
|
||||
"backkey"=/obj/item/weapon/crowbar,
|
||||
"desc"="Scanning module is installed."),
|
||||
//15
|
||||
list("key"=/obj/item/weapon/circuitboard/mecha/phazon/targeting,
|
||||
"backkey"=/obj/item/weapon/screwdriver,
|
||||
"desc"="Peripherals control module is secured."),
|
||||
//16
|
||||
list("key"=/obj/item/weapon/screwdriver,
|
||||
"backkey"=/obj/item/weapon/crowbar,
|
||||
"desc"="Peripherals control module is installed"),
|
||||
//17
|
||||
list("key"=/obj/item/weapon/circuitboard/mecha/phazon/peripherals,
|
||||
"backkey"=/obj/item/weapon/screwdriver,
|
||||
"desc"="Central control module is secured."),
|
||||
//18
|
||||
list("key"=/obj/item/weapon/screwdriver,
|
||||
"backkey"=/obj/item/weapon/crowbar,
|
||||
"desc"="Central control module is installed."),
|
||||
//19
|
||||
list("key"=/obj/item/weapon/circuitboard/mecha/phazon/main,
|
||||
"backkey"=/obj/item/weapon/screwdriver,
|
||||
"desc"="The wiring is adjusted."),
|
||||
//20
|
||||
list("key"=/obj/item/weapon/wirecutters,
|
||||
"backkey"=/obj/item/weapon/screwdriver,
|
||||
"desc"="The wiring is added."),
|
||||
//21
|
||||
list("key"=/obj/item/stack/cable_coil,
|
||||
"backkey"=/obj/item/weapon/screwdriver,
|
||||
"desc"="The hydraulic systems are active."),
|
||||
//22
|
||||
list("key"=/obj/item/weapon/screwdriver,
|
||||
"backkey"=/obj/item/weapon/wrench,
|
||||
"desc"="The hydraulic systems are connected."),
|
||||
//23
|
||||
list("key"=/obj/item/weapon/wrench,
|
||||
"desc"="The hydraulic systems are disconnected.")
|
||||
)
|
||||
|
||||
|
||||
/datum/construction/reversible/mecha/phazon/action(atom/used_atom,mob/user as mob)
|
||||
return check_step(used_atom,user)
|
||||
|
||||
/datum/construction/reversible/mecha/phazon/custom_action(index, diff, atom/used_atom, mob/user)
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
//TODO: better messages.
|
||||
switch(index)
|
||||
if(23)
|
||||
user.visible_message("[user] connects the [holder] hydraulic systems", "You connect the [holder] hydraulic systems.")
|
||||
holder.icon_state = "phazon1"
|
||||
if(22)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] activates the [holder] hydraulic systems.", "You activate the [holder] hydraulic systems.")
|
||||
holder.icon_state = "phazon2"
|
||||
else
|
||||
user.visible_message("[user] disconnects the [holder] hydraulic systems", "You disconnect the [holder] hydraulic systems.")
|
||||
holder.icon_state = "phazon0"
|
||||
if(21)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] adds the wiring to the [holder].", "You add the wiring to the [holder].")
|
||||
holder.icon_state = "phazon3"
|
||||
else
|
||||
user.visible_message("[user] deactivates the [holder] hydraulic systems.", "You deactivate the [holder] hydraulic systems.")
|
||||
holder.icon_state = "phazon1"
|
||||
if(20)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] adjusts the wiring of the [holder].", "You adjust the wiring of the [holder].")
|
||||
holder.icon_state = "phazon4"
|
||||
else
|
||||
user.visible_message("[user] removes the wiring from the [holder].", "You remove the wiring from the [holder].")
|
||||
var/obj/item/stack/cable_coil/coil = new /obj/item/stack/cable_coil(get_turf(holder))
|
||||
coil.amount = 4
|
||||
holder.icon_state = "phazon2"
|
||||
if(19)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs the central control module into the [holder].", "You install the central computer mainboard into the [holder].")
|
||||
qdel(used_atom)
|
||||
holder.icon_state = "phazon5"
|
||||
else
|
||||
user.visible_message("[user] disconnects the wiring of the [holder].", "You disconnect the wiring of the [holder].")
|
||||
holder.icon_state = "phazon3"
|
||||
if(18)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the mainboard.", "You secure the mainboard.")
|
||||
holder.icon_state = "phazon6"
|
||||
else
|
||||
user.visible_message("[user] removes the central control module from the [holder].", "You remove the central computer mainboard from the [holder].")
|
||||
new /obj/item/weapon/circuitboard/mecha/phazon/main(get_turf(holder))
|
||||
holder.icon_state = "phazon4"
|
||||
if(17)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs the peripherals control module into the [holder].", "You install the peripherals control module into the [holder].")
|
||||
qdel(used_atom)
|
||||
holder.icon_state = "phazon7"
|
||||
else
|
||||
user.visible_message("[user] unfastens the mainboard.", "You unfasten the mainboard.")
|
||||
holder.icon_state = "phazon5"
|
||||
if(16)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the peripherals control module.", "You secure the peripherals control module.")
|
||||
holder.icon_state = "phazon8"
|
||||
else
|
||||
user.visible_message("[user] removes the peripherals control module from the [holder].", "You remove the peripherals control module from the [holder].")
|
||||
new /obj/item/weapon/circuitboard/mecha/phazon/peripherals(get_turf(holder))
|
||||
holder.icon_state = "phazon6"
|
||||
if(15)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs the weapon control module into the [holder].", "You install the weapon control module into the [holder].")
|
||||
qdel(used_atom)
|
||||
holder.icon_state = "phazon9"
|
||||
else
|
||||
user.visible_message("[user] unfastens the peripherals control module.", "You unfasten the peripherals control module.")
|
||||
holder.icon_state = "phazon7"
|
||||
if(14)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the weapon control module.", "You secure the weapon control module.")
|
||||
holder.icon_state = "phazon10"
|
||||
else
|
||||
user.visible_message("[user] removes the weapon control module from the [holder].", "You remove the weapon control module from the [holder].")
|
||||
new /obj/item/weapon/circuitboard/mecha/phazon/targeting(get_turf(holder))
|
||||
holder.icon_state = "phazon8"
|
||||
if(13)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs phasic scanner module to the [holder].", "You install phasic scanner module to the [holder].")
|
||||
qdel(used_atom)
|
||||
holder.icon_state = "phazon11"
|
||||
else
|
||||
user.visible_message("[user] unfastens the weapon control module.", "You unfasten the weapon control module.")
|
||||
holder.icon_state = "phazon9"
|
||||
if(12)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the phasic scanner module.", "You secure the phasic scanner module.")
|
||||
holder.icon_state = "phazon12"
|
||||
else
|
||||
user.visible_message("[user] removes the phasic scanner module from the [holder].", "You remove the phasic scanner module from the [holder].")
|
||||
new /obj/item/weapon/stock_parts/scanning_module/phasic(get_turf(holder))
|
||||
holder.icon_state = "phazon10"
|
||||
if(11)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs super capacitor to the [holder].", "You install super capacitor to the [holder].")
|
||||
qdel(used_atom)
|
||||
holder.icon_state = "phazon13"
|
||||
else
|
||||
user.visible_message("[user] unfastens the phasic scanner module.", "You unfasten the phasic scanner module.")
|
||||
holder.icon_state = "phazon11"
|
||||
if(10)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the super capacitor.", "You secure the super capacitor.")
|
||||
holder.icon_state = "phazon14"
|
||||
else
|
||||
user.visible_message("[user] removes the super capacitor from the [holder].", "You remove the super capacitor from the [holder].")
|
||||
new /obj/item/weapon/stock_parts/capacitor/super(get_turf(holder))
|
||||
holder.icon_state = "phazon12"
|
||||
if(9)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs the bluespace crystal.", "You install the bluespace crystal.")
|
||||
qdel(used_atom)
|
||||
holder.icon_state = "phazon15"
|
||||
else
|
||||
user.visible_message("[user] unsecures the super capacitor from the [holder].", "You unsecure the super capacitor from the [holder].")
|
||||
holder.icon_state = "phazon13"
|
||||
if(8)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] connects the bluespace crystal.", "You connect the bluespace crystal.")
|
||||
holder.icon_state = "phazon16"
|
||||
else
|
||||
user.visible_message("[user] removes the bluespace crystal from the [holder].", "You remove the bluespace crystal from the [holder].")
|
||||
new /obj/item/bluespace_crystal(get_turf(holder))
|
||||
holder.icon_state = "phazon14"
|
||||
if(7)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] engages the bluespace crystal.", "You engage the bluespace crystal.")
|
||||
holder.icon_state = "phazon17"
|
||||
else
|
||||
user.visible_message("[user] disconnects the bluespace crystal from the [holder].", "You disconnect the bluespace crystal from the [holder].")
|
||||
holder.icon_state = "phazon15"
|
||||
if(6)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs the phase armor layer to the [holder].", "You install the phase armor layer to the [holder].")
|
||||
holder.icon_state = "phazon18"
|
||||
else
|
||||
user.visible_message("[user] disengages the bluespace crystal.", "You disengage the bluespace crystal.")
|
||||
holder.icon_state = "phazon16"
|
||||
if(5)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the phase armor layer.", "You secure the phase armor layer.")
|
||||
holder.icon_state = "phazon19"
|
||||
else
|
||||
user.visible_message("[user] pries the phase armor layer from the [holder].", "You pry the phase armor layer from the [holder].")
|
||||
var/obj/item/stack/sheet/plasteel/MS = new /obj/item/stack/sheet/plasteel(get_turf(holder))
|
||||
MS.amount = 5
|
||||
holder.icon_state = "phazon17"
|
||||
if(4)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] welds the phase armor layer to the [holder].", "You weld the phase armor layer to the [holder].")
|
||||
holder.icon_state = "phazon20"
|
||||
else
|
||||
user.visible_message("[user] unfastens the phase armor layer.", "You unfasten the phase armor layer.")
|
||||
holder.icon_state = "phazon18"
|
||||
if(3)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs Phazon Armor Plates to the [holder].", "You install Phazon Armor Plates to the [holder].")
|
||||
qdel(used_atom)
|
||||
holder.icon_state = "phazon21"
|
||||
else
|
||||
user.visible_message("[user] cuts phase armor layer from the [holder].", "You cut the phase armor layer from the [holder].")
|
||||
holder.icon_state = "phazon19"
|
||||
if(2)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures Phazon Armor Plates.", "You secure Phazon Armor Plates.")
|
||||
holder.icon_state = "phazon22"
|
||||
else
|
||||
user.visible_message("[user] pries Phazon Armor Plates from the [holder].", "You pry Phazon Armor Plates from the [holder].")
|
||||
new /obj/item/mecha_parts/part/phazon_armor(get_turf(holder))
|
||||
holder.icon_state = "phazon20"
|
||||
if(1)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] welds Phazon Armor Plates to the [holder].", "You weld Phazon Armor Plates to the [holder].")
|
||||
else
|
||||
user.visible_message("[user] unfastens Phazon Armor Plates.", "You unfasten Phazon Armor Plates.")
|
||||
holder.icon_state = "phazon21"
|
||||
return 1
|
||||
|
||||
/datum/construction/reversible/mecha/phazon/spawn_result()
|
||||
..()
|
||||
feedback_inc("mecha_phazon_created",1)
|
||||
return
|
||||
|
||||
/datum/construction/mecha/odysseus_chassis
|
||||
steps = list(list("key"=/obj/item/mecha_parts/part/odysseus_torso),//1
|
||||
|
||||
@@ -293,14 +293,14 @@
|
||||
icon_state = "phazon_harness"
|
||||
construction_time = 300
|
||||
construction_cost = list("metal"=35000,"glass"=10000,"plasma"=20000)
|
||||
origin_tech = "programming=5;materials=7;bluespace=6;powerstorage=6"
|
||||
origin_tech = "programming=5;materials=6;bluespace=5;powerstorage=5"
|
||||
|
||||
/obj/item/mecha_parts/part/phazon_head
|
||||
name="Phazon Head"
|
||||
icon_state = "phazon_head"
|
||||
construction_time = 200
|
||||
construction_cost = list("metal"=15000,"glass"=5000,"plasma"=10000)
|
||||
origin_tech = "programming=4;materials=5;magnets=6"
|
||||
origin_tech = "programming=4;materials=5;magnets=5"
|
||||
|
||||
/obj/item/mecha_parts/part/phazon_left_arm
|
||||
name="Phazon Left Arm"
|
||||
@@ -330,9 +330,15 @@
|
||||
construction_cost = list("metal"=20000,"plasma"=10000)
|
||||
origin_tech = "materials=5;bluespace=3;magnets=3"
|
||||
|
||||
/obj/item/mecha_parts/part/phazon_armor
|
||||
name="Phazon armor"
|
||||
desc="Phazon armor plates. They are layered with plasma to protect the pilot from the stress of phasing and have unusual properties."
|
||||
icon_state = "phazon_armor"
|
||||
construction_time = 300
|
||||
construction_cost = list("metal"=45000,"plasma"=30000)
|
||||
origin_tech = "materials=6;bluespace=5;magnets=5"
|
||||
|
||||
///////// Odysseus
|
||||
|
||||
|
||||
/obj/item/mecha_parts/chassis/odysseus
|
||||
name = "Odysseus Chassis"
|
||||
|
||||
@@ -452,6 +458,22 @@
|
||||
durand/main
|
||||
name = "Circuit board (Durand Central Control module)"
|
||||
icon_state = "mainboard"
|
||||
|
||||
phazon
|
||||
origin_tech = "programming=4"
|
||||
|
||||
phazon/peripherals
|
||||
name = "Circuit board (Phazon Peripherals Control module)"
|
||||
icon_state = "mcontroller"
|
||||
|
||||
phazon/targeting
|
||||
name = "Circuit board (Phazon Weapon Control and Targeting module)"
|
||||
icon_state = "mcontroller"
|
||||
origin_tech = "programming=4;combat=4"
|
||||
|
||||
phazon/main
|
||||
name = "Circuit board (Phazon Central Control module)"
|
||||
icon_state = "mainboard"
|
||||
|
||||
honker
|
||||
origin_tech = "programming=4"
|
||||
|
||||
@@ -2,6 +2,54 @@
|
||||
icon = 'icons/effects/warning_stripes.dmi'
|
||||
layer = 2
|
||||
|
||||
/obj/effect/decal/warning_stripes/north
|
||||
icon_state = "N"
|
||||
|
||||
/obj/effect/decal/warning_stripes/south
|
||||
icon_state = "S"
|
||||
|
||||
/obj/effect/decal/warning_stripes/east
|
||||
icon_state = "E"
|
||||
|
||||
/obj/effect/decal/warning_stripes/west
|
||||
icon_state = "W"
|
||||
|
||||
/obj/effect/decal/warning_stripes/southeast
|
||||
icon_state = "NW-in"
|
||||
|
||||
/obj/effect/decal/warning_stripes/northwestcorner
|
||||
icon_state = "NW-out"
|
||||
|
||||
/obj/effect/decal/warning_stripes/southwest
|
||||
icon_state = "NE-in"
|
||||
|
||||
/obj/effect/decal/warning_stripes/northeastcorner
|
||||
icon_state = "NE-out"
|
||||
|
||||
/obj/effect/decal/warning_stripes/northeast
|
||||
icon_state = "SW-in"
|
||||
|
||||
/obj/effect/decal/warning_stripes/southwestcorner
|
||||
icon_state = "SW-out"
|
||||
|
||||
/obj/effect/decal/warning_stripes/northwest
|
||||
icon_state = "SE-in"
|
||||
|
||||
/obj/effect/decal/warning_stripes/southeastcorner
|
||||
icon_state = "SE-out"
|
||||
|
||||
/obj/effect/decal/warning_stripes/eastsouthwest
|
||||
icon_state = "U-N"
|
||||
|
||||
/obj/effect/decal/warning_stripes/eastnorthwest
|
||||
icon_state = "U-S"
|
||||
|
||||
/obj/effect/decal/warning_stripes/northeastsouth
|
||||
icon_state = "U-W"
|
||||
|
||||
/obj/effect/decal/warning_stripes/northwestsouth
|
||||
icon_state = "U-E"
|
||||
|
||||
/obj/effect/decal/warning_stripes/New()
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -208,7 +208,7 @@
|
||||
|
||||
/obj/effect/landmark/costume/pirate/New()
|
||||
new /obj/item/clothing/under/pirate(src.loc)
|
||||
new /obj/item/clothing/suit/pirate(src.loc)
|
||||
new /obj/item/clothing/suit/pirate_black(src.loc)
|
||||
var/CHOICE = pick( /obj/item/clothing/head/pirate , /obj/item/clothing/head/bandana )
|
||||
new CHOICE(src.loc)
|
||||
new /obj/item/clothing/glasses/eyepatch(src.loc)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
name = "item"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
var/discrete = 0 // used in item_attack.dm to make an item not show an attack message to viewers
|
||||
var/no_embed = 0 // For use in item_attack.dm
|
||||
var/icon/blood_overlay = null //this saves our blood splatter overlay, which will be processed not to go over the edges of the sprite
|
||||
var/blood_overlay_color = null
|
||||
var/abstract = 0
|
||||
@@ -35,6 +36,7 @@
|
||||
var/siemens_coefficient = 1 // for electrical admittance/conductance (electrocution checks and shit)
|
||||
var/slowdown = 0 // How much clothing is slowing you down. Negative values speeds you up
|
||||
var/canremove = 1 //Mostly for Ninja code at this point but basically will not allow the item to be removed if set to 0. /N
|
||||
var/reflect_chance = 0 //This var dictates what % of a time an object will reflect an energy based weapon's shot
|
||||
var/armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
|
||||
var/list/allowed = null //suit storage stuff.
|
||||
var/obj/item/device/uplink/hidden/hidden_uplink = null // All items can have an uplink hidden inside, just remember to add the triggers.
|
||||
@@ -48,6 +50,7 @@
|
||||
*/
|
||||
var/list/sprite_sheets = null
|
||||
var/icon_override = null //Used to override hardcoded clothing dmis in human clothing proc.
|
||||
var/sprite_sheets_obj = null //Used to override hardcoded clothing inventory object dmis in human clothing proc.
|
||||
var/list/species_fit = null //This object has a different appearance when worn by these species
|
||||
|
||||
/obj/item/Destroy()
|
||||
@@ -556,6 +559,10 @@
|
||||
/obj/item/proc/IsShield()
|
||||
return 0
|
||||
|
||||
/obj/item/proc/IsReflect(var/def_zone) //This proc determines if and at what% an object will reflect energy projectiles if it's in l_hand,r_hand or wear_suit
|
||||
if(prob(reflect_chance))
|
||||
return 1
|
||||
|
||||
/obj/item/proc/get_loc_turf()
|
||||
var/atom/L = loc
|
||||
while(L && !istype(L, /turf/))
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
// Bluespace crystals, used in telescience and when crushed it will blink you to a random turf.
|
||||
/obj/item/bluespace_crystal
|
||||
name = "bluespace crystal"
|
||||
desc = "A glowing bluespace crystal, not much is known about how they work. It looks very delicate."
|
||||
icon = 'icons/obj/telescience.dmi'
|
||||
icon_state = "bluespace_crystal"
|
||||
w_class = 1
|
||||
origin_tech = "bluespace=4;materials=3"
|
||||
var/blink_range = 8 // The teleport range when crushed/thrown at someone.
|
||||
|
||||
/obj/item/bluespace_crystal/New()
|
||||
..()
|
||||
pixel_x = rand(-5, 5)
|
||||
pixel_y = rand(-5, 5)
|
||||
|
||||
/obj/item/bluespace_crystal/attack_self(var/mob/user)
|
||||
blink_mob(user)
|
||||
user.drop_item()
|
||||
user.visible_message("<span class='notice'>[user] crushes the [src]!</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/item/bluespace_crystal/proc/blink_mob(var/mob/living/L)
|
||||
do_teleport(L, get_turf(L), blink_range, asoundin = 'sound/effects/phasein.ogg')
|
||||
|
||||
/obj/item/bluespace_crystal/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
if(isliving(hit_atom))
|
||||
blink_mob(hit_atom)
|
||||
qdel(src)
|
||||
|
||||
// Artifical bluespace crystal, doesn't give you much research.
|
||||
/obj/item/bluespace_crystal/artificial
|
||||
name = "artificial bluespace crystal"
|
||||
desc = "An artificially made bluespace crystal, it looks delicate."
|
||||
origin_tech = "bluespace=2"
|
||||
blink_range = 4 // Not as good as the organic stuff!
|
||||
@@ -219,7 +219,50 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
return
|
||||
var/selected = plist[c]
|
||||
aiPDA.create_message(user, selected)
|
||||
|
||||
/mob/living/silicon/ai/proc/cmd_show_message_log(mob/user as mob)
|
||||
if(user.stat == 2)
|
||||
user << "You can't do that because you are dead!"
|
||||
return
|
||||
var/HTML = "<html><head><title>AI PDA Message Log</title></head><body>"
|
||||
for(var/index in aiPDA.tnote)
|
||||
if(index["sent"])
|
||||
HTML += addtext("<i><b>→ To <a href='byond://?src=\ref[src];choice=Message;target=",index["src"],"'>", index["owner"],"</a>:</b></i><br>", index["message"], "<br>")
|
||||
else
|
||||
HTML += addtext("<i><b>← From <a href='byond://?src=\ref[src];choice=Message;target=",index["target"],"'>", index["owner"],"</a>:</b></i><br>", index["message"], "<br>")
|
||||
HTML +="</body></html>"
|
||||
user << browse(HTML, "window=log;size=400x444;border=1;can_resize=1;can_close=1;can_minimize=0")
|
||||
|
||||
/obj/item/device/pda/ai/verb/cmd_send_pdamesg()
|
||||
set category = "AI IM"
|
||||
set name = "Send PDA Message"
|
||||
set src in usr
|
||||
if(usr.stat == 2)
|
||||
usr << "You can't send PDA messages because you are dead!"
|
||||
return
|
||||
var/list/plist = available_pdas()
|
||||
if (plist)
|
||||
var/c = input(usr, "Please select a PDA") as null|anything in sortList(plist)
|
||||
if (!c) // if the user hasn't selected a PDA file we can't send a message
|
||||
return
|
||||
var/selected = plist[c]
|
||||
create_message(usr, selected)
|
||||
|
||||
/obj/item/device/pda/ai/verb/cmd_show_message_log()
|
||||
set category = "AI IM"
|
||||
set name = "Show Message Log"
|
||||
set src in usr
|
||||
if(usr.stat == 2)
|
||||
usr << "You can't do that because you are dead!"
|
||||
return
|
||||
var/HTML = "<html><head><title>AI PDA Message Log</title></head><body>"
|
||||
for(var/index in tnote)
|
||||
if(index["sent"])
|
||||
HTML += addtext("<i><b>→ To <a href='byond://?src=\ref[src];choice=Message;target=",index["src"],"'>", index["owner"],"</a>:</b></i><br>", index["message"], "<br>")
|
||||
else
|
||||
HTML += addtext("<i><b>← From <a href='byond://?src=\ref[src];choice=Message;target=",index["target"],"'>", index["owner"],"</a>:</b></i><br>", index["message"], "<br>")
|
||||
HTML +="</body></html>"
|
||||
usr << browse(HTML, "window=log;size=400x444;border=1;can_resize=1;can_close=1;can_minimize=0")
|
||||
|
||||
/obj/item/device/pda/ai/verb/cmd_toggle_pda_receiver()
|
||||
set category = "AI IM"
|
||||
@@ -242,21 +285,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
silent=!silent
|
||||
usr << "<span class='notice'>PDA ringer toggled [(silent ? "Off" : "On")]!</span>"
|
||||
|
||||
|
||||
/mob/living/silicon/ai/proc/cmd_show_message_log(mob/user as mob)
|
||||
if(user.stat == 2)
|
||||
user << "You can't do that because you are dead!"
|
||||
return
|
||||
var/HTML = "<html><head><title>AI PDA Message Log</title></head><body>"
|
||||
for(var/index in aiPDA.tnote)
|
||||
if(index["sent"])
|
||||
HTML += addtext("<i><b>→ To <a href='byond://?src=\ref[src];choice=Message;target=",index["src"],"'>", index["owner"],"</a>:</b></i><br>", index["message"], "<br>")
|
||||
else
|
||||
HTML += addtext("<i><b>← From <a href='byond://?src=\ref[src];choice=Message;target=",index["target"],"'>", index["owner"],"</a>:</b></i><br>", index["message"], "<br>")
|
||||
HTML +="</body></html>"
|
||||
user << browse(HTML, "window=log;size=400x444;border=1;can_resize=1;can_close=1;can_minimize=0")
|
||||
|
||||
|
||||
/obj/item/device/pda/ai/can_use()
|
||||
return 1
|
||||
|
||||
@@ -358,12 +386,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(cartridge)
|
||||
var/cartdata[0]
|
||||
|
||||
if(mode in cartmodes)
|
||||
data["records"] = cartridge.create_NanoUI_values()
|
||||
|
||||
if(mode == 0)
|
||||
cartdata["name"] = cartridge.name
|
||||
cartdata["access"] = list(\
|
||||
cartdata["access"] = list(\
|
||||
"access_security" = cartridge.access_security,\
|
||||
"access_engine" = cartridge.access_engine,\
|
||||
"access_atmos" = cartridge.access_atmos,\
|
||||
@@ -375,8 +398,15 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
"access_hydroponics" = cartridge.access_hydroponics,\
|
||||
"access_reagent_scanner" = cartridge.access_reagent_scanner,\
|
||||
"access_remote_door" = cartridge.access_remote_door,\
|
||||
"access_status_display" = cartridge.access_status_display\
|
||||
"access_status_display" = cartridge.access_status_display,\
|
||||
"access_detonate_pda" = cartridge.access_detonate_pda\
|
||||
)
|
||||
|
||||
if(mode in cartmodes)
|
||||
data["records"] = cartridge.create_NanoUI_values()
|
||||
|
||||
if(mode == 0)
|
||||
cartdata["name"] = cartridge.name
|
||||
if(isnull(cartridge.radio))
|
||||
cartdata["radio"] = 0
|
||||
else
|
||||
@@ -388,7 +418,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
cartdata["radio"] = 3
|
||||
|
||||
if(mode == 2)
|
||||
cartdata["type"] = cartridge.type
|
||||
cartdata["charges"] = cartridge.charges ? cartridge.charges : 0
|
||||
data["cartridge"] = cartdata
|
||||
data["stationTime"] = worldtime2text()
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
var/access_janitor = 0
|
||||
// var/access_flora = 0
|
||||
var/access_reagent_scanner = 0
|
||||
var/access_remote_door = 0 //Control some blast doors remotely!!
|
||||
var/access_remote_door = 0 // Control some blast doors remotely!!
|
||||
var/remote_door_id = ""
|
||||
var/access_status_display = 0
|
||||
var/access_quartermaster = 0
|
||||
var/access_detonate_pda = 0
|
||||
var/access_hydroponics = 0
|
||||
var/charges = 0
|
||||
var/mode = null
|
||||
@@ -200,6 +201,7 @@
|
||||
name = "Detomatix Cartridge"
|
||||
icon_state = "cart"
|
||||
access_remote_door = 1
|
||||
access_detonate_pda = 1
|
||||
remote_door_id = "smindicate" //Make sure this matches the syndicate shuttle's shield/door id!! //don't ask about the name, testing.
|
||||
charges = 4
|
||||
|
||||
|
||||
@@ -71,9 +71,9 @@
|
||||
dat += "<br>"
|
||||
dat += {"<a href='byond://?src=\ref[src];choice=Wireless'>[A.control_disabled ? "Enable" : "Disable"] Wireless Activity</a>"}
|
||||
dat += "<br>"
|
||||
dat += "Subspace Transceiver is: [A.radio.disabledAi ? "Disabled" : "Enabled"]"
|
||||
dat += "Subspace Transceiver is: [A.aiRadio.disabledAi ? "Disabled" : "Enabled"]"
|
||||
dat += "<br>"
|
||||
dat += {"<a href='byond://?src=\ref[src];choice=Radio'>[A.radio.disabledAi ? "Enable" : "Disable"] Subspace Transceiver</a>"}
|
||||
dat += {"<a href='byond://?src=\ref[src];choice=Radio'>[A.aiRadio.disabledAi ? "Enable" : "Disable"] Subspace Transceiver</a>"}
|
||||
dat += "<br>"
|
||||
dat += {"<a href='byond://?src=\ref[src];choice=Close'> Close</a>"}
|
||||
user << browse(dat, "window=aicard")
|
||||
@@ -116,9 +116,9 @@
|
||||
|
||||
if ("Radio")
|
||||
for(var/mob/living/silicon/ai/A in src)
|
||||
A.radio.disabledAi = !A.radio.disabledAi
|
||||
A << "Your Subspace Transceiver has been: [A.radio.disabledAi ? "disabled" : "enabled"]"
|
||||
U << "You [A.radio.disabledAi ? "Disable" : "Enable"] the AI's Subspace Transceiver"
|
||||
A.aiRadio.disabledAi = !A.aiRadio.disabledAi
|
||||
A << "Your Subspace Transceiver has been: [A.aiRadio.disabledAi ? "disabled" : "enabled"]"
|
||||
U << "You [A.aiRadio.disabledAi ? "Disable" : "Enable"] the AI's Subspace Transceiver"
|
||||
|
||||
if ("Wireless")
|
||||
for(var/mob/living/silicon/ai/A in src)
|
||||
|
||||
@@ -1,19 +1,26 @@
|
||||
var/list/sps_list = list()
|
||||
/obj/item/device/sps
|
||||
name = "Space Positioning System"
|
||||
desc = "Helping lost spacemen find their way through the galaxy since 3016."
|
||||
name = "space positioning system"
|
||||
desc = "Helping lost spacemen find their way through the planets since 2016."
|
||||
icon = 'icons/obj/telescience.dmi'
|
||||
icon_state = "gps-c"
|
||||
w_class = 2.0
|
||||
flags = FPRINT
|
||||
slot_flags = SLOT_BELT
|
||||
origin_tech = "programming=2;engineering=2"
|
||||
var/gpstag = "COM0"
|
||||
origin_tech = "materials=2;magnets=3;bluespace=2"
|
||||
var/spstag = "COM0"
|
||||
var/emped = 0
|
||||
var/turf/locked_location
|
||||
|
||||
/obj/item/device/sps/New()
|
||||
name = "Space Positioning System ([gpstag])"
|
||||
..()
|
||||
sps_list.Add(src)
|
||||
name = "space positioning system ([spstag])"
|
||||
overlays += "working"
|
||||
|
||||
/obj/item/device/sps/Destroy()
|
||||
sps_list.Remove(src)
|
||||
..()
|
||||
|
||||
/obj/item/device/sps/emp_act(severity)
|
||||
emped = 1
|
||||
overlays -= "working"
|
||||
@@ -24,43 +31,54 @@
|
||||
overlays += "working"
|
||||
|
||||
/obj/item/device/sps/attack_self(mob/user as mob)
|
||||
|
||||
var/obj/item/device/sps/t = ""
|
||||
var/sps_window_height = 110 + sps_list.len * 20 // Variable window height, depending on how many sps units there are to show
|
||||
if(emped)
|
||||
t += "ERROR"
|
||||
else
|
||||
t += "<BR><A href='?src=\ref[src];tag=1'>Set Tag</A> "
|
||||
t += "<BR>Tag: [gpstag]"
|
||||
t += "<A href='?src=\ref[src];tag=1'>Set Tag</A><A href='?src=\ref[src];refresh=1'>Refresh</A>"
|
||||
t += "<BR>Tag: [spstag]"
|
||||
if(locked_location && locked_location.loc)
|
||||
t += "<BR>Bluespace coordinates saved: [locked_location.loc]"
|
||||
sps_window_height += 20
|
||||
|
||||
for(var/obj/item/device/sps/G in world)
|
||||
for(var/obj/item/device/sps/G in sps_list)
|
||||
var/turf/pos = get_turf(G)
|
||||
var/area/gps_area = get_area(G)
|
||||
var/tracked_gpstag = G.gpstag
|
||||
var/area/sps_area = get_area(G)
|
||||
var/tracked_spstag = G.spstag
|
||||
if(G.emped == 1)
|
||||
t += "<BR>[tracked_gpstag]: ERROR"
|
||||
t += "<BR>[tracked_spstag]: ERROR"
|
||||
else
|
||||
t += "<BR>[tracked_gpstag]: [format_text(gps_area.name)] ([pos.x], [pos.y], [pos.z])"
|
||||
t += "<BR>[tracked_spstag]: [format_text(sps_area.name)] ([pos.x], [pos.y], [pos.z])"
|
||||
|
||||
var/datum/browser/popup = new(user, "SPS", name, 600, 450)
|
||||
var/datum/browser/popup = new(user, "sps", name, 360, min(sps_window_height, 800))
|
||||
popup.set_content(t)
|
||||
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
|
||||
popup.open()
|
||||
|
||||
/obj/item/device/sps/Topic(href, href_list)
|
||||
..()
|
||||
if(href_list["tag"] )
|
||||
var/a = input("Please enter desired tag.", name, gpstag) as text
|
||||
a = copytext(sanitize(a), 1, 20)
|
||||
if(length(a) != 4)
|
||||
usr << "\blue The tag must be four letters long!"
|
||||
return
|
||||
else
|
||||
gpstag = a
|
||||
name = "Space Positioning System ([gpstag])"
|
||||
return
|
||||
var/a = input("Please enter desired tag.", name, spstag) as text
|
||||
a = uppertext(copytext(sanitize(a), 1, 5))
|
||||
if(src.loc == usr)
|
||||
spstag = a
|
||||
name = "space positioning system ([spstag])"
|
||||
attack_self(usr)
|
||||
if(href_list["refresh"] )
|
||||
if(src.loc == usr)
|
||||
attack_self(usr)
|
||||
|
||||
/obj/item/device/sps/science
|
||||
icon_state = "gps-s"
|
||||
gpstag = "SCI0"
|
||||
spstag = "SCI0"
|
||||
|
||||
/obj/item/device/sps/engineering
|
||||
icon_state = "gps-e"
|
||||
gpstag = "ENG0"
|
||||
spstag = "ENG0"
|
||||
|
||||
/obj/item/device/sps/mining
|
||||
icon_state = "gps-m"
|
||||
spstag = "MINE0"
|
||||
desc = "A positioning system helpful for rescuing trapped or injured miners, keeping one on you at all times while mining might just save your life."
|
||||
|
||||
@@ -188,6 +188,11 @@
|
||||
|
||||
//Can you use it?
|
||||
|
||||
/obj/item/device/lightreplacer/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
J.put_in_cart(src, user)
|
||||
J.myreplacer = src
|
||||
J.update_icon()
|
||||
|
||||
/obj/item/device/lightreplacer/proc/CanUse(var/mob/living/user)
|
||||
src.add_fingerprint(user)
|
||||
//Not sure what else to check for. Maybe if clumsy?
|
||||
|
||||
@@ -7,14 +7,19 @@
|
||||
desc = "A kit containing all the needed tools and parts to modify a hardsuit for another user."
|
||||
icon_state = "modkit"
|
||||
var/parts = MODKIT_FULL
|
||||
var/list/target_species = list("Human","Skrell")
|
||||
var/target_species = "Human"
|
||||
|
||||
var/list/permitted_types = list(
|
||||
/obj/item/clothing/head/helmet/space/rig,
|
||||
/obj/item/clothing/suit/space/rig
|
||||
)
|
||||
|
||||
/obj/item/device/modkit/afterattack(obj/O, mob/user as mob)
|
||||
/obj/item/device/modkit/afterattack(obj/O, mob/user as mob, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
if (!target_species)
|
||||
return //it shouldn't be null, okay?
|
||||
|
||||
if(!parts)
|
||||
user << "<span class='warning'>This kit has no parts for this modification left.</span>"
|
||||
@@ -22,11 +27,21 @@
|
||||
del(src)
|
||||
return
|
||||
|
||||
/* TODO: list comparison
|
||||
if(istype(O,to_type))
|
||||
user << "<span class='notice'>[O] is already modified.</span>"
|
||||
var/allowed = 0
|
||||
for (var/permitted_type in permitted_types)
|
||||
if(istype(O, permitted_type))
|
||||
allowed = 1
|
||||
|
||||
var/obj/item/clothing/I = O
|
||||
if (!istype(I) || !allowed)
|
||||
user << "<span class='notice'>[src] is unable to modify that.</span>"
|
||||
return
|
||||
|
||||
var/excluding = ("exclude" in I.species_restricted)
|
||||
var/in_list = (target_species in I.species_restricted)
|
||||
if (excluding ^ in_list)
|
||||
user << "<span class='notice'>[I] is already modified.</span>"
|
||||
return
|
||||
*/
|
||||
|
||||
if(!isturf(O.loc))
|
||||
user << "<span class='warning'>[O] must be safely placed on the ground for modification.</span>"
|
||||
@@ -36,22 +51,27 @@
|
||||
|
||||
user.visible_message("\red [user] opens \the [src] and modifies \the [O].","\red You open \the [src] and modify \the [O].")
|
||||
|
||||
var/obj/item/clothing/I = O
|
||||
if(istype(I))
|
||||
I.species_restricted = target_species.Copy()
|
||||
I.refit_for_species(target_species)
|
||||
|
||||
if (istype(I, /obj/item/clothing/head/helmet))
|
||||
parts &= ~MODKIT_HELMET
|
||||
if (istype(I, /obj/item/clothing/suit))
|
||||
parts &= ~MODKIT_SUIT
|
||||
|
||||
parts--
|
||||
if(!parts)
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
|
||||
/obj/item/device/modkit/tajaran
|
||||
name = "tajaran hardsuit modification kit"
|
||||
desc = "A kit containing all the needed tools and parts to modify a hardsuit for another user. This one looks like it's meant for Tajara."
|
||||
target_species = list("Tajaran")
|
||||
|
||||
/obj/item/device/modkit/examine()
|
||||
..()
|
||||
usr << "It looks as though it modifies hardsuits to fit the following users:"
|
||||
for(var/species in target_species)
|
||||
usr << "- [species]"
|
||||
usr << "It looks as though it modifies hardsuits to fit [target_species] users."
|
||||
|
||||
/obj/item/device/modkit/tajaran
|
||||
name = "Tajaran hardsuit modification kit"
|
||||
desc = "A kit containing all the needed tools and parts to modify a hardsuit for another user. This one looks like it's meant for Tajaran."
|
||||
target_species = "Tajaran"
|
||||
|
||||
/obj/item/device/modkit/unathi
|
||||
name = "Unathi hardsuit modification kit"
|
||||
desc = "A kit containing all the needed tools and parts to modify a hardsuit for another species. This one looks like it's meant for Unathi."
|
||||
target_species = "Unathi"
|
||||
@@ -5,7 +5,19 @@
|
||||
item_state = "signaler"
|
||||
var/code = "electronic"
|
||||
origin_tech = "bluespace=1"
|
||||
var/emagged = 0
|
||||
var/syndicate = 0
|
||||
|
||||
/obj/item/device/radio/beacon/attackby(I as obj, mob/living/user as mob)
|
||||
if(istype(I,/obj/item/weapon/card/emag)) // If hit by an emag.
|
||||
var/obj/item/weapon/card/emag/E = I
|
||||
if(!emagged)
|
||||
if(E.uses)
|
||||
E.uses--
|
||||
emagged = 1
|
||||
syndicate = 1
|
||||
user << "\blue The This beacon now only be locked on to by emagged teleporters!"
|
||||
|
||||
/obj/item/device/radio/beacon/hear_talk()
|
||||
return
|
||||
|
||||
@@ -39,6 +51,7 @@
|
||||
name = "suspicious beacon"
|
||||
desc = "A label on it reads: <i>Activate to have a singularity beacon teleported to your location</i>."
|
||||
origin_tech = "bluespace=1;syndicate=7"
|
||||
syndicate = 1
|
||||
|
||||
/obj/item/device/radio/beacon/syndicate/attack_self(mob/user as mob)
|
||||
if(user)
|
||||
@@ -64,7 +77,7 @@
|
||||
|
||||
/obj/item/device/telepad_beacon
|
||||
name = "Telepad Beacon"
|
||||
desc = "Use to warp in a cargo telepad."
|
||||
desc = "Used to warp in a cargo telepad."
|
||||
icon = 'icons/obj/radio.dmi'
|
||||
icon_state = "beacon"
|
||||
item_state = "signaler"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
/obj/item/device/encryptionkey/
|
||||
name = "Standard Encrpytion Key"
|
||||
desc = "An encyption key for a radio headset. Has no special codes in it. WHY DOES IT EXIST? ASK NANOTRASEN."
|
||||
name = "Standard Encryption Key"
|
||||
desc = "An encyption key for a radio headset. Has no special codes in it."
|
||||
icon = 'icons/obj/radio.dmi'
|
||||
icon_state = "cypherkey"
|
||||
item_state = ""
|
||||
|
||||
@@ -171,7 +171,8 @@
|
||||
/obj/item/device/radio/headset/heads/ai_integrated //No need to care about icons, it should be hidden inside the AI anyway.
|
||||
name = "AI Subspace Transceiver"
|
||||
desc = "Integrated AI radio transceiver."
|
||||
icon_state = "ai_radio"
|
||||
icon = 'icons/obj/robot_component.dmi'
|
||||
icon_state = "radio"
|
||||
item_state = "headset"
|
||||
keyslot2 = new /obj/item/device/encryptionkey/heads/ai_integrated
|
||||
var/myAi = null // Atlantis: Reference back to the AI which has this radio.
|
||||
|
||||
@@ -21,9 +21,9 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
var/broadcasting = 0
|
||||
var/listening = 1
|
||||
var/freerange = 0 // 0 - Sanitize frequencies, 1 - Full range
|
||||
var/list/channels = list() //see communications.dm for full list. First channes is a "default" for :h
|
||||
var/list/channels = list() //see communications.dm for full list. First channels is a "default" for :h
|
||||
var/subspace_transmission = 0
|
||||
var/syndie = 0//Holder to see if it's a syndicate encrpyed radio
|
||||
var/syndie = 0//Holder to see if it's a syndicate encrypted radio
|
||||
var/maxf = 1499
|
||||
// "Example" = FREQ_LISTENING|FREQ_BROADCASTING
|
||||
flags = FPRINT | CONDUCT | TABLEPASS
|
||||
@@ -296,7 +296,8 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
|
||||
// --- Cyborg ---
|
||||
else if (isrobot(M))
|
||||
jobname = "Cyborg"
|
||||
var/mob/living/silicon/robot/B = M
|
||||
jobname = "[B.designation] Cyborg"
|
||||
|
||||
// --- Personal AI (pAI) ---
|
||||
else if (istype(M, /mob/living/silicon/pai))
|
||||
@@ -698,6 +699,13 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
/obj/item/device/radio/borg
|
||||
var/obj/item/device/encryptionkey/keyslot = null//Borg radios can handle a single encryption key
|
||||
|
||||
/obj/item/device/radio/borg/syndicate
|
||||
syndie = 1
|
||||
keyslot = new /obj/item/device/encryptionkey/syndicate
|
||||
/obj/item/device/radio/borg/syndicate/New()
|
||||
..()
|
||||
set_frequency(SYND_FREQ)
|
||||
|
||||
/obj/item/device/radio/borg/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
// ..()
|
||||
user.set_machine(src)
|
||||
|
||||
@@ -249,6 +249,27 @@ var/list/world_uplinks = list()
|
||||
src.hidden_uplink.trigger(user)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//Refund proc for the borg teleporter (later I'll make a general refund proc if there is demand for it)
|
||||
/obj/item/device/radio/headset/syndicate/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/antag_spawner/borg_tele))
|
||||
var/obj/item/weapon/antag_spawner/borg_tele/S = W
|
||||
if(!S.used && !S.checking)
|
||||
hidden_uplink.uses += S.TC_cost
|
||||
qdel(S)
|
||||
user << "<span class='notice'>Teleporter refunded.</span>"
|
||||
else
|
||||
user << "<span class='notice'>This teleporter is already used, or is currently being used.</span>"
|
||||
|
||||
/obj/item/device/radio/uplink/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/antag_spawner/borg_tele))
|
||||
var/obj/item/weapon/antag_spawner/borg_tele/S = W
|
||||
if(!S.used && !S.checking)
|
||||
hidden_uplink.uses += S.TC_cost
|
||||
qdel(S)
|
||||
user << "<span class='notice'>Teleporter refunded.</span>"
|
||||
else
|
||||
user << "<span class='notice'>This teleporter is already used, or is currently being used.</span>"
|
||||
|
||||
// PRESET UPLINKS
|
||||
// A collection of preset uplinks.
|
||||
|
||||
@@ -211,7 +211,8 @@
|
||||
O.invisibility = 0
|
||||
O.custom_name = created_name
|
||||
O.updatename("Default")
|
||||
|
||||
if(O.connected_ai)
|
||||
O.notify_ai(1)
|
||||
M.brainmob.mind.transfer_to(O)
|
||||
|
||||
if(O.mind && O.mind.special_role)
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
R.camera.network.Remove(list("Engineering","Medical","MINE"))
|
||||
R.updatename("Default")
|
||||
R.status_flags |= CANPUSH
|
||||
R.notify_ai(2)
|
||||
R.updateicon()
|
||||
|
||||
return 1
|
||||
@@ -51,6 +52,7 @@
|
||||
|
||||
/obj/item/borg/upgrade/rename/action(var/mob/living/silicon/robot/R)
|
||||
if(..()) return 0
|
||||
R.notify_ai(3, R.name, heldname)
|
||||
R.name = heldname
|
||||
R.custom_name = heldname
|
||||
R.real_name = heldname
|
||||
@@ -75,6 +77,9 @@
|
||||
R.key = ghost.key
|
||||
|
||||
R.stat = CONSCIOUS
|
||||
dead_mob_list -= R //please never forget this ever kthx
|
||||
living_mob_list += R
|
||||
R.notify_ai(1)
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -61,8 +61,8 @@
|
||||
if (!do_after(usr, 10))
|
||||
return
|
||||
|
||||
var /obj/structure/grille/Grille = getFromPool(/obj/structure/grille, usr.loc)
|
||||
var /obj/structure/grille/F = new /obj/structure/grille/ ( usr.loc )
|
||||
usr << "\blue You assemble a grille"
|
||||
Grille.add_fingerprint(usr)
|
||||
F.add_fingerprint(usr)
|
||||
use(2)
|
||||
return
|
||||
|
||||
@@ -378,6 +378,41 @@
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
// Copied from /obj/item/weapon/melee/energy/sword/attackby
|
||||
/obj/item/toy/sword/attackby(obj/item/weapon/W, mob/living/user)
|
||||
..()
|
||||
if(istype(W, /obj/item/toy/sword))
|
||||
if(W == src)
|
||||
user << "<span class='notice'>You try to attach the end of the plastic sword to... itself. You're not very smart, are you?</span>"
|
||||
if(ishuman(user))
|
||||
user.adjustBrainLoss(10)
|
||||
else
|
||||
user << "<span class='notice'>You attach the ends of the two plastic swords, making a single double-bladed toy! You're fake-cool.</span>"
|
||||
new /obj/item/weapon/twohanded/dualsaber/toy(user.loc)
|
||||
del(W)
|
||||
del(src)
|
||||
|
||||
/*
|
||||
* Subtype of Double-Bladed Energy Swords
|
||||
*/
|
||||
/obj/item/weapon/twohanded/dualsaber/toy
|
||||
name = "double-bladed toy sword"
|
||||
desc = "A cheap, plastic replica of TWO energy swords. Double the fun!"
|
||||
force = 0
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
force_unwielded = 0
|
||||
force_wielded = 0
|
||||
origin_tech = null
|
||||
attack_verb = list("attacked", "struck", "hit")
|
||||
|
||||
/obj/item/weapon/twohanded/dualsaber/toy/IsShield()
|
||||
return 0
|
||||
/*
|
||||
/obj/item/weapon/twohanded/dualsaber/toy/IsReflect()//Stops Toy Dualsabers from reflecting energy projectiles
|
||||
return 0 */ //uncomment this once reflecting is ported
|
||||
|
||||
/obj/item/toy/katana
|
||||
name = "replica katana"
|
||||
desc = "Woefully underpowered in D20."
|
||||
@@ -1033,3 +1068,35 @@ obj/item/toy/cards/deck/syndicate/black
|
||||
flags = FPRINT | TABLEPASS
|
||||
icon = 'icons/obj/clothing/belts.dmi'
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
/*
|
||||
* Fake meteor
|
||||
*/
|
||||
|
||||
/obj/item/toy/minimeteor
|
||||
name = "Mini-Meteor"
|
||||
desc = "Relive the excitement of a meteor shower! SweetMeat-eor. Co is not responsible for any injuries, headaches or hearing loss caused by Mini-Meteor™"
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "minimeteor"
|
||||
flags = FPRINT | TABLEPASS
|
||||
w_class = 2.0
|
||||
|
||||
/obj/item/toy/minimeteor/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
playsound(src, 'sound/effects/meteorimpact.ogg', 40, 1)
|
||||
for(var/mob/M in range(10, src))
|
||||
if(!M.stat && !istype(M, /mob/living/silicon/ai))\
|
||||
shake_camera(M, 3, 1)
|
||||
del(src)
|
||||
|
||||
/*
|
||||
* Carp plushie
|
||||
*/
|
||||
|
||||
/obj/item/toy/carpplushie
|
||||
name = "space carp plushie"
|
||||
desc = "An adorable stuffed toy that resembles a space carp."
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "carpplushie"
|
||||
w_class = 2.0
|
||||
flags = FPRINT | TABLEPASS
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user