diff --git a/SQL/feedback_schema.sql b/SQL/feedback_schema.sql deleted file mode 100644 index 3fa0f7080dd..00000000000 --- a/SQL/feedback_schema.sql +++ /dev/null @@ -1,120 +0,0 @@ -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 ; - -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 ; - -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 ; - -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 ; - -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', - PRIMARY KEY (`id`), - UNIQUE KEY `ckey` (`ckey`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 ; - -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 ; - -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 ; - -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 ; - -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 ; - -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 ; \ No newline at end of file diff --git a/SQL/tgstation_schema.sql b/SQL/tgstation_schema.sql index 2c3742b81df..ea9ace77c6a 100644 --- a/SQL/tgstation_schema.sql +++ b/SQL/tgstation_schema.sql @@ -1,100 +1,303 @@ -SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; -SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; -SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL'; +CREATE DATABASE IF NOT EXISTS `feedback` /*!40100 DEFAULT CHARACTER SET latin1 */; +USE `feedback`; -CREATE SCHEMA IF NOT EXISTS `mydb` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci ; -CREATE SCHEMA IF NOT EXISTS `tgstation` DEFAULT CHARACTER SET latin1 ; -USE `mydb` ; -USE `tgstation` ; +/*!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 `tgstation`.`death` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `tgstation`.`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 -AUTO_INCREMENT = 3409 -DEFAULT CHARACTER SET = latin1; +-- +-- 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', + `email` varchar(45) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=77 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; --- ----------------------------------------------------- --- Table `tgstation`.`karma` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `tgstation`.`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 NOT NULL , - `receiverspecial` TEXT NOT NULL , - `isnegative` TINYINT(1) NOT NULL , - `spenderip` TEXT NOT NULL , - `time` DATETIME NOT NULL , - PRIMARY KEY (`id`) ) -ENGINE = MyISAM -AUTO_INCREMENT = 943 -DEFAULT CHARACTER SET = latin1; +-- +-- 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 AUTO_INCREMENT=560 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; --- ----------------------------------------------------- --- Table `tgstation`.`karmatotals` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `tgstation`.`karmatotals` ( - `id` INT(11) NOT NULL AUTO_INCREMENT , - `byondkey` TEXT NOT NULL , - `karma` INT(11) NOT NULL , - PRIMARY KEY (`id`) ) -ENGINE = MyISAM -AUTO_INCREMENT = 244 -DEFAULT CHARACTER SET = latin1; +-- +-- 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` int(2) 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 AUTO_INCREMENT=7755 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; --- ----------------------------------------------------- --- Table `tgstation`.`library` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `tgstation`.`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 -AUTO_INCREMENT = 184 -DEFAULT CHARACTER SET = latin1; +-- +-- Table structure for table `erro_connection_log` +-- +DROP TABLE IF EXISTS `erro_connection_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `erro_connection_log` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `datetime` datetime DEFAULT NULL, + `serverip` varchar(45) DEFAULT NULL, + `ckey` varchar(45) DEFAULT NULL, + `ip` varchar(18) DEFAULT NULL, + `computerid` varchar(45) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=311192 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; --- ----------------------------------------------------- --- Table `tgstation`.`population` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `tgstation`.`population` ( - `id` INT(11) NOT NULL AUTO_INCREMENT , - `playercount` INT(11) NULL DEFAULT NULL , - `admincount` INT(11) NULL DEFAULT NULL , - `time` DATETIME NOT NULL , - PRIMARY KEY (`id`) ) -ENGINE = MyISAM -AUTO_INCREMENT = 2544 -DEFAULT CHARACTER SET = latin1; +-- +-- Table structure for table `erro_death` +-- +DROP TABLE IF EXISTS `erro_death`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `erro_death` ( + `id` int(11) NOT NULL DEFAULT '0', + `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 +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `erro_feedback` +-- -SET SQL_MODE=@OLD_SQL_MODE; -SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; -SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS; +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 AUTO_INCREMENT=456134 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `erro_legacy_population` +-- + +DROP TABLE IF EXISTS `erro_legacy_population`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `erro_legacy_population` ( + `id` int(11) NOT NULL DEFAULT '0', + `playercount` int(11) DEFAULT NULL, + `admincount` int(11) DEFAULT NULL, + `time` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `erro_library` +-- + +DROP TABLE IF EXISTS `erro_library`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `erro_library` ( + `id` int(11) NOT NULL DEFAULT '0', + `author` text NOT NULL, + `title` text NOT NULL, + `content` text NOT NULL, + `category` text NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- 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', + PRIMARY KEY (`id`), + UNIQUE KEY `ckey` (`ckey`) +) ENGINE=InnoDB AUTO_INCREMENT=8849 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- 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 AUTO_INCREMENT=330 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- 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', + `multiplechoiceoptions` int(2) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=62 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- 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 AUTO_INCREMENT=144 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- 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 AUTO_INCREMENT=15753 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- 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 AUTO_INCREMENT=5011 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2013-03-24 18:02:35 \ No newline at end of file diff --git a/code/__DEFINES.dm b/code/__DEFINES.dm index 3fc45960d98..fc723ffac68 100644 --- a/code/__DEFINES.dm +++ b/code/__DEFINES.dm @@ -328,6 +328,7 @@ var/static/list/scarySounds = list('sound/weapons/thudswoosh.ogg','sound/weapons #define BANTYPE_JOB_PERMA 3 #define BANTYPE_JOB_TEMP 4 #define BANTYPE_ANY_FULLBAN 5 //used to locate stuff to unban. +#define BANTYPE_APPEARANCE 6 #define SEE_INVISIBLE_MINIMUM 5 diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index bc253e2bdf6..57d16d68032 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -29,23 +29,12 @@ var/vote_no_default = 0 // vote does not default to nochange/norestart (tbi) var/vote_no_dead = 0 // dead people can't vote (tbi) var/del_new_on_log = 1 // del's new players if they log before they spawn in - var/feature_object_spell_system = 0 //spawns a spellbook which gives object-type spells instead of verb-type spells for the wizard - var/traitor_scaling = 0 //if amount of traitors scales based on amount of players - var/protect_roles_from_antagonist = 0// If security and such can be tratior/cult/other - var/continous_rounds = 0 // Gamemodes which end instantly will instead keep on going until the round ends by escape shuttle or nuke. var/allow_Metadata = 0 // Metadata is supported. var/popup_admin_pm = 0 //adminPMs to non-admins show in a pop-up 'reply' window when set to 1. var/Ticklag = 0.9 var/Tickcomp = 0 var/allow_holidays = 0 //toggles whether holiday-specific content should be used - var/list/mode_names = list() - var/list/modes = list() // allowed modes - var/list/votable_modes = list() // votable modes - var/list/probabilities = list() // relative probability of each mode - var/humans_need_surnames = 0 - var/allow_random_events = 0 // enables random events mid-round when set to 1 - var/allow_ai = 1 // allow ai job var/hostedby = null var/respawn = 1 var/guest_jobban = 1 @@ -61,7 +50,27 @@ var/wikiurl var/forumurl - //Alert level description + var/forbid_singulo_possession = 0 + var/useircbot = 0 + + var/admin_legacy_system = 0 //Defines whether the server uses the legacy admin system with admins.txt or the SQL system. Config option in config.txt + var/ban_legacy_system = 0 //Defines whether the server uses the legacy banning system with the files in /data or the SQL system. Config option in config.txt + var/use_age_restriction_for_jobs = 0 //Do jobs use account age restrictions? --requires database + + //game_options.txt configs + var/list/mode_names = list() + var/list/modes = list() // allowed modes + var/list/votable_modes = list() // votable modes + var/list/probabilities = list() // relative probability of each mode + + var/humans_need_surnames = 0 + var/allow_random_events = 0 // enables random events mid-round when set to 1 + var/allow_ai = 1 // allow ai job + + var/traitor_scaling = 0 //if amount of traitors scales based on amount of players + var/protect_roles_from_antagonist = 0// If security and such can be tratior/cult/other + var/continous_rounds = 0 // Gamemodes which end instantly will instead keep on going until the round ends by escape shuttle or nuke. + var/alert_desc_green = "All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced." var/alert_desc_blue_upto = "The station has received reliable information about possible hostile activity on the station. Security staff may have weapons visible, random searches are permitted." var/alert_desc_blue_downto = "The immediate threat has passed. Security may no longer have weapons drawn at all times, but may continue to have them visible. Random searches are still allowed." @@ -69,11 +78,6 @@ var/alert_desc_red_downto = "The self-destruct mechanism has been deactivated, there is still however an immediate serious threat to the station. Security may have weapons unholstered at all times, random searches are allowed and advised." var/alert_desc_delta = "The station's self-destruct mechanism has been engaged. All crew are instructed to obey all instructions given by heads of staff. Any violations of these orders can be punished by death. This is not a drill." - var/forbid_singulo_possession = 0 - var/useircbot = 0 - - //game_options.txt configs - var/health_threshold_crit = 0 var/health_threshold_dead = -100 @@ -94,12 +98,7 @@ var/slime_delay = 0 var/animal_delay = 0 - var/admin_legacy_system = 0 //Defines whether the server uses the legacy admin system with admins.txt or the SQL system. Config option in config.txt - var/ban_legacy_system = 0 //Defines whether the server uses the legacy banning system with the files in /data or the SQL system. Config option in config.txt - var/use_age_restriction_for_jobs = 0 //Do jobs use account age restrictions? --requires database - var/use_recursive_explosions //Defines whether the server uses recursive or circular explosions. - var/roundstart_station_randomization = 1 //Enable this to have some randomization happen on the station. var/assistant_maint = 0 //Do assistants get maint access? var/gateway_delay = 18000 //How long the gateway takes before it activates. Default is half an hour. @@ -108,21 +107,21 @@ /datum/configuration/New() var/list/L = typesof(/datum/game_mode) - /datum/game_mode - for (var/T in L) + for(var/T in L) // I wish I didn't have to instance the game modes in order to look up // their information, but it is the only way (at least that I know of). var/datum/game_mode/M = new T() - if (M.config_tag) + if(M.config_tag) if(!(M.config_tag in modes)) // ensure each mode is added only once diary << "Adding game mode [M.name] ([M.config_tag]) to configuration." - src.modes += M.config_tag - src.mode_names[M.config_tag] = M.name - src.probabilities[M.config_tag] = M.probability - if (M.votable) - src.votable_modes += M.config_tag + modes += M.config_tag + mode_names[M.config_tag] = M.name + probabilities[M.config_tag] = M.probability + if(M.votable) + votable_modes += M.config_tag del(M) - src.votable_modes += "secret" + votable_modes += "secret" /datum/configuration/proc/load(filename, type = "config") //the type can also be game_options, in which case it uses a different switch. not making it separate to not copypaste code - Urist var/list/Lines = file2list(filename) @@ -131,248 +130,126 @@ if(!t) continue t = trim(t) - if (length(t) == 0) + if(length(t) == 0) continue - else if (copytext(t, 1, 2) == "#") + else if(copytext(t, 1, 2) == "#") continue var/pos = findtext(t, " ") var/name = null var/value = null - if (pos) + if(pos) name = lowertext(copytext(t, 1, pos)) value = copytext(t, pos + 1) else name = lowertext(t) - if (!name) + if(!name) continue if(type == "config") - switch (name) - if ("admin_legacy_system") + switch(name) + if("admin_legacy_system") config.admin_legacy_system = 1 - - if ("ban_legacy_system") + if("ban_legacy_system") config.ban_legacy_system = 1 - - if ("use_age_restriction_for_jobs") + if("use_age_restriction_for_jobs") config.use_age_restriction_for_jobs = 1 - - if ("jobs_have_minimal_access") - config.jobs_have_minimal_access = 1 - - if ("use_recursive_explosions") - use_recursive_explosions = 1 - - if ("log_ooc") + if("log_ooc") config.log_ooc = 1 - - if ("log_access") + if("log_access") config.log_access = 1 - - if ("sql_enabled") - config.sql_enabled = 1 - - if ("log_say") + if("log_say") config.log_say = 1 - - if ("log_admin") + if("log_admin") config.log_admin = 1 - - if ("log_prayer") + if("log_prayer") config.log_prayer = 1 - - if ("log_law") + if("log_law") config.log_law = 1 - - if ("log_game") + if("log_game") config.log_game = 1 - - if ("log_vote") + if("log_vote") config.log_vote = 1 - - if ("log_whisper") + if("log_whisper") config.log_whisper = 1 - - if ("log_attack") + if("log_attack") config.log_attack = 1 - - if ("log_emote") + if("log_emote") config.log_emote = 1 - - if ("log_adminchat") + if("log_adminchat") config.log_adminchat = 1 - - if ("log_adminwarn") + if("log_adminwarn") config.log_adminwarn = 1 - - if ("log_pda") + if("log_pda") config.log_pda = 1 - - if ("log_hrefs") + if("log_hrefs") config.log_hrefs = 1 - if("allow_admin_ooccolor") config.allow_admin_ooccolor = 1 - - if ("allow_vote_restart") + if("allow_vote_restart") config.allow_vote_restart = 1 - - if ("allow_vote_mode") + if("allow_vote_mode") config.allow_vote_mode = 1 - - if ("allow_admin_jump") + if("allow_admin_jump") config.allow_admin_jump = 1 - if("allow_admin_rev") config.allow_admin_rev = 1 - - if ("allow_admin_spawning") + if("allow_admin_spawning") config.allow_admin_spawning = 1 - - if ("no_dead_vote") + if("no_dead_vote") config.vote_no_dead = 1 - - if ("default_no_vote") + if("default_no_vote") config.vote_no_default = 1 - - if ("vote_delay") + if("vote_delay") config.vote_delay = text2num(value) - - if ("vote_period") + if("vote_period") config.vote_period = text2num(value) - - if ("allow_ai") - config.allow_ai = 1 - - if ("norespawn") + if("norespawn") config.respawn = 0 - - if ("servername") + if("servername") config.server_name = value - - if ("serversuffix") + if("serversuffix") config.server_suffix = 1 - - if ("hostedby") + if("hostedby") config.hostedby = value - - if ("server") + if("server") config.server = value - - if ("banappeals") + if("banappeals") config.banappeals = value - - if ("wikiurl") + if("wikiurl") config.wikiurl = value - - if ("forumurl") + if("forumurl") config.forumurl = value - - if ("guest_jobban") + if("guest_jobban") config.guest_jobban = 1 - - if ("guest_ban") + if("guest_ban") guests_allowed = 0 - - if ("usewhitelist") + if("usewhitelist") config.usewhitelist = 1 - - if ("feature_object_spell_system") - config.feature_object_spell_system = 1 - - if ("allow_metadata") + if("allow_metadata") config.allow_Metadata = 1 - - if ("traitor_scaling") - config.traitor_scaling = 1 - - if("protect_roles_from_antagonist") - config.protect_roles_from_antagonist = 1 - - if ("probability") - var/prob_pos = findtext(value, " ") - var/prob_name = null - var/prob_value = null - - if (prob_pos) - prob_name = lowertext(copytext(value, 1, prob_pos)) - prob_value = copytext(value, prob_pos + 1) - if (prob_name in config.modes) - config.probabilities[prob_name] = text2num(prob_value) - else - diary << "Unknown game mode probability configuration definition: [prob_name]." - else - diary << "Incorrect probability configuration definition: [prob_name] [prob_value]." - - if("allow_random_events") - config.allow_random_events = 1 - if("kick_inactive") config.kick_inactive = 1 - if("load_jobs_from_txt") load_jobs_from_txt = 1 - - if("alert_red_upto") - config.alert_desc_red_upto = value - - if("alert_red_downto") - config.alert_desc_red_downto = value - - if("alert_blue_downto") - config.alert_desc_blue_downto = value - - if("alert_blue_upto") - config.alert_desc_blue_upto = value - - if("alert_green") - config.alert_desc_green = value - - if("alert_delta") - config.alert_desc_delta = value - if("forbid_singulo_possession") forbid_singulo_possession = 1 - if("popup_admin_pm") config.popup_admin_pm = 1 - if("allow_holidays") config.allow_holidays = 1 - if("useircbot") useircbot = 1 - if("ticklag") Ticklag = text2num(value) - if("tickcomp") Tickcomp = 1 - - if("humans_need_surnames") - humans_need_surnames = 1 - if("tor_ban") ToRban = 1 - if("automute_on") automute_on = 1 - - if("assistant_maint") - config.assistant_maint = 1 - - if("gateway_delay") - config.gateway_delay = text2num(value) - - if("continuous_rounds") - config.continous_rounds = 1 - - if("ghost_interaction") - config.ghost_interaction = 1 - else diary << "Unknown setting in configuration: '[name]'" @@ -408,6 +285,55 @@ config.slime_delay = value if("animal_delay") config.animal_delay = value + if("alert_red_upto") + config.alert_desc_red_upto = value + if("alert_red_downto") + config.alert_desc_red_downto = value + if("alert_blue_downto") + config.alert_desc_blue_downto = value + if("alert_blue_upto") + config.alert_desc_blue_upto = value + if("alert_green") + config.alert_desc_green = value + if("alert_delta") + config.alert_desc_delta = value + if("assistant_maint") + config.assistant_maint = 1 + if("gateway_delay") + config.gateway_delay = text2num(value) + if("continuous_rounds") + config.continous_rounds = 1 + if("ghost_interaction") + config.ghost_interaction = 1 + if("traitor_scaling") + config.traitor_scaling = 1 + if("protect_roles_from_antagonist") + config.protect_roles_from_antagonist = 1 + if("probability") + var/prob_pos = findtext(value, " ") + var/prob_name = null + var/prob_value = null + + if(prob_pos) + prob_name = lowertext(copytext(value, 1, prob_pos)) + prob_value = copytext(value, prob_pos + 1) + if(prob_name in config.modes) + config.probabilities[prob_name] = text2num(prob_value) + else + diary << "Unknown game mode probability configuration definition: [prob_name]." + else + diary << "Incorrect probability configuration definition: [prob_name] [prob_value]." + + if("allow_random_events") + config.allow_random_events = 1 + if("jobs_have_minimal_access") + config.jobs_have_minimal_access = 1 + if("use_recursive_explosions") + use_recursive_explosions = 1 + if("humans_need_surnames") + humans_need_surnames = 1 + if("allow_ai") + config.allow_ai = 1 else diary << "Unknown setting in configuration: '[name]'" @@ -417,110 +343,64 @@ if(!t) continue t = trim(t) - if (length(t) == 0) + if(length(t) == 0) continue - else if (copytext(t, 1, 2) == "#") + else if(copytext(t, 1, 2) == "#") continue var/pos = findtext(t, " ") var/name = null var/value = null - if (pos) + if(pos) name = lowertext(copytext(t, 1, pos)) value = copytext(t, pos + 1) else name = lowertext(t) - if (!name) + if(!name) continue - switch (name) - if ("address") + switch(name) + if("sql_enabled") + config.sql_enabled = 1 + if("address") sqladdress = value - if ("port") + if("port") sqlport = value - if ("database") - sqldb = value - if ("login") - sqllogin = value - if ("password") - sqlpass = value - if ("feedback_database") + if("feedback_database") sqlfdbkdb = value - if ("feedback_login") + if("feedback_login") sqlfdbklogin = value - if ("feedback_password") + if("feedback_password") sqlfdbkpass = value - if ("enable_stat_tracking") + if("enable_stat_tracking") sqllogging = 1 else diary << "Unknown setting in configuration: '[name]'" -/datum/configuration/proc/loadforumsql(filename) // -- TLE - var/list/Lines = file2list(filename) - for(var/t in Lines) - if(!t) continue - - t = trim(t) - if (length(t) == 0) - continue - else if (copytext(t, 1, 2) == "#") - continue - - var/pos = findtext(t, " ") - var/name = null - var/value = null - - if (pos) - name = lowertext(copytext(t, 1, pos)) - value = copytext(t, pos + 1) - else - name = lowertext(t) - - if (!name) - continue - - switch (name) - if ("address") - forumsqladdress = value - if ("port") - forumsqlport = value - if ("database") - forumsqldb = value - if ("login") - forumsqllogin = value - if ("password") - forumsqlpass = value - if ("activatedgroup") - forum_activated_group = value - if ("authenticatedgroup") - forum_authenticated_group = value - else - diary << "Unknown setting in configuration: '[name]'" - /datum/configuration/proc/pick_mode(mode_name) // I wish I didn't have to instance the game modes in order to look up // their information, but it is the only way (at least that I know of). - for (var/T in (typesof(/datum/game_mode) - /datum/game_mode)) + for(var/T in (typesof(/datum/game_mode) - /datum/game_mode)) var/datum/game_mode/M = new T() - if (M.config_tag && M.config_tag == mode_name) + if(M.config_tag && M.config_tag == mode_name) return M del(M) return new /datum/game_mode/extended() /datum/configuration/proc/get_runnable_modes() var/list/datum/game_mode/runnable_modes = new - for (var/T in (typesof(/datum/game_mode) - /datum/game_mode)) + for(var/T in (typesof(/datum/game_mode) - /datum/game_mode)) var/datum/game_mode/M = new T() //world << "DEBUG: [T], tag=[M.config_tag], prob=[probabilities[M.config_tag]]" - if (!(M.config_tag in modes)) + if(!(M.config_tag in modes)) del(M) continue - if (probabilities[M.config_tag]<=0) + if(probabilities[M.config_tag]<=0) del(M) continue - if (M.can_start()) + if(M.can_start()) runnable_modes[M] = probabilities[M.config_tag] //world << "DEBUG: runnable_mode\[[runnable_modes.len]\] = [M.config_tag]" return runnable_modes diff --git a/code/datums/helper_datums/getrev.dm b/code/datums/helper_datums/getrev.dm index 802ebd2fe57..033ff1bd55a 100644 --- a/code/datums/helper_datums/getrev.dm +++ b/code/datums/helper_datums/getrev.dm @@ -1,11 +1,5 @@ -/* - * This datum gets revision info from local svn 'entries' file - * Path to the directory containing it should be in 'config/svndir.txt' file - * - */ var/global/datum/getrev/revdata = new() -//Oh yeah, I'm an OOP fag, lalala /datum/getrev var/project_href var/revision @@ -23,15 +17,15 @@ var/global/datum/getrev/revdata = new() if(last_entry.len < 2) continue revision = last_entry[2] break - + showinfo = "Server Revision: " if(revision) showinfo += "[revision]" else showinfo += "*unknown*" showinfo += "

-Report Bugs Here-
Please provide as much info as possible
Copy/paste the revision hash into your issue report if possible, thanks
:)

" - - world.log << "Running TG Revision Number: [revision]." + + world.log << "Running /tg/ revision number: [revision]." return client/verb/showrevinfo() diff --git a/code/game/hud.dm b/code/datums/hud.dm similarity index 66% rename from code/game/hud.dm rename to code/datums/hud.dm index a1a41912f46..6e0fea7e1ba 100644 --- a/code/game/hud.dm +++ b/code/datums/hud.dm @@ -21,7 +21,7 @@ #define ui_storage1 "9:18,1:5" #define ui_storage2 "10:20,1:5" -#define ui_alien_head "4:12,1:5" //aliens +#define ui_alien_head "4:12,1:5" //aliens #define ui_alien_oclothing "5:14,1:5" //aliens #define ui_inv1 "6:16,1:5" //borgs @@ -38,7 +38,7 @@ #define ui_movi "13:26,1:5" #define ui_acti "12:24,1:5" #define ui_zonesel "14:28,1:5" -#define ui_acti_alt "14:28,1:5" //alternative intent switcher for when the interface is hidden (F12) +#define ui_acti_alt "14:28,1:5" //alternative intent switcher for when the interface is hidden (F12) #define ui_borg_pull "12:24,2:7" #define ui_borg_module "13:26,2:7" @@ -59,9 +59,9 @@ #define ui_temp "14:28,6:13" #define ui_health "14:28,7:15" #define ui_internal "14:28,8:17" - //borgs -#define ui_borg_health "14:28,6:13" //borgs have the health display where humans have the pressure damage indicator. -#define ui_alien_health "14:28,6:13" //aliens have the health display where humans have the pressure damage indicator. + //borgs +#define ui_borg_health "14:28,6:13" //borgs have the health display where humans have the pressure damage indicator. +#define ui_alien_health "14:28,6:13" //aliens have the health display where humans have the pressure damage indicator. //Pop-up inventory #define ui_shoes "2:8,1:5" @@ -76,10 +76,8 @@ #define ui_head "2:8,4:11" -//#define ui_headset "SOUTH,8" #define ui_hand "6:14,1:5" #define ui_hstore1 "5,5" -//#define ui_resist "EAST+1,SOUTH-1" #define ui_sleep "EAST+1, NORTH-13" #define ui_rest "EAST+1, NORTH-14" @@ -95,70 +93,69 @@ var/datum/global_hud/global_hud = new() var/list/vimpaired var/list/darkMask - New() - //420erryday psychedellic colours screen overlay for when you are high - druggy = new /obj/screen() - druggy.screen_loc = "WEST,SOUTH to EAST,NORTH" - druggy.icon_state = "druggy" - druggy.layer = 17 - druggy.mouse_opacity = 0 +/datum/global_hud/New() + //420erryday psychedellic colours screen overlay for when you are high + druggy = new /obj/screen() + druggy.screen_loc = "WEST,SOUTH to EAST,NORTH" + druggy.icon_state = "druggy" + druggy.layer = 17 + druggy.mouse_opacity = 0 - //that white blurry effect you get when you eyes are damaged - blurry = new /obj/screen() - blurry.screen_loc = "WEST,SOUTH to EAST,NORTH" - blurry.icon_state = "blurry" - blurry.layer = 17 - blurry.mouse_opacity = 0 + //that white blurry effect you get when you eyes are damaged + blurry = new /obj/screen() + blurry.screen_loc = "WEST,SOUTH to EAST,NORTH" + blurry.icon_state = "blurry" + blurry.layer = 17 + blurry.mouse_opacity = 0 - var/obj/screen/O - var/i - //that nasty looking dither you get when you're short-sighted - vimpaired = newlist(/obj/screen,/obj/screen,/obj/screen,/obj/screen) - O = vimpaired[1] - O.screen_loc = "1,1 to 5,15" - O = vimpaired[2] - O.screen_loc = "5,1 to 10,5" - O = vimpaired[3] - O.screen_loc = "6,11 to 10,15" - O = vimpaired[4] - O.screen_loc = "11,1 to 15,15" + var/obj/screen/O + var/i + //that nasty looking dither you get when you're short-sighted + vimpaired = newlist(/obj/screen,/obj/screen,/obj/screen,/obj/screen) + O = vimpaired[1] + O.screen_loc = "1,1 to 5,15" + O = vimpaired[2] + O.screen_loc = "5,1 to 10,5" + O = vimpaired[3] + O.screen_loc = "6,11 to 10,15" + O = vimpaired[4] + O.screen_loc = "11,1 to 15,15" - //welding mask overlay black/dither - darkMask = newlist(/obj/screen,/obj/screen,/obj/screen,/obj/screen,/obj/screen,/obj/screen,/obj/screen,/obj/screen) - O = darkMask[1] - O.screen_loc = "3,3 to 5,13" - O = darkMask[2] - O.screen_loc = "5,3 to 10,5" - O = darkMask[3] - O.screen_loc = "6,11 to 10,13" - O = darkMask[4] - O.screen_loc = "11,3 to 13,13" - O = darkMask[5] - O.screen_loc = "1,1 to 15,2" - O = darkMask[6] - O.screen_loc = "1,3 to 2,15" - O = darkMask[7] - O.screen_loc = "14,3 to 15,15" - O = darkMask[8] - O.screen_loc = "3,14 to 13,15" + //welding mask overlay black/dither + darkMask = newlist(/obj/screen, /obj/screen, /obj/screen, /obj/screen, /obj/screen, /obj/screen, /obj/screen, /obj/screen) + O = darkMask[1] + O.screen_loc = "3,3 to 5,13" + O = darkMask[2] + O.screen_loc = "5,3 to 10,5" + O = darkMask[3] + O.screen_loc = "6,11 to 10,13" + O = darkMask[4] + O.screen_loc = "11,3 to 13,13" + O = darkMask[5] + O.screen_loc = "1,1 to 15,2" + O = darkMask[6] + O.screen_loc = "1,3 to 2,15" + O = darkMask[7] + O.screen_loc = "14,3 to 15,15" + O = darkMask[8] + O.screen_loc = "3,14 to 13,15" - for(i=1,i<=4,i++) - O = vimpaired[i] - O.icon_state = "dither50" - O.layer = 17 - O.mouse_opacity = 0 + for(i = 1, i <= 4, i++) + O = vimpaired[i] + O.icon_state = "dither50" + O.layer = 17 + O.mouse_opacity = 0 - O = darkMask[i] - O.icon_state = "dither50" - O.layer = 17 - O.mouse_opacity = 0 - - for(i=5,i<=8,i++) - O = darkMask[i] - O.icon_state = "black" - O.layer = 17 - O.mouse_opacity = 0 + O = darkMask[i] + O.icon_state = "dither50" + O.layer = 17 + O.mouse_opacity = 0 + for(i = 5, i <= 8, i++) + O = darkMask[i] + O.icon_state = "black" + O.layer = 17 + O.mouse_opacity = 0 /datum/hud @@ -185,11 +182,12 @@ datum/hud/New(mob/owner) mymob = owner instantiate() ..() - return /datum/hud/proc/hidden_inventory_update() - if(!mymob) return + if(!mymob) + return + if(ishuman(mymob)) var/mob/living/carbon/human/H = mymob if(H.handcuffed) @@ -213,8 +211,11 @@ datum/hud/New(mob/owner) if(H.wear_mask) H.wear_mask.screen_loc = null if(H.head) H.head.screen_loc = null + /datum/hud/proc/persistant_inventory_update() - if(!mymob) return + if(!mymob) + return + if(ishuman(mymob)) var/mob/living/carbon/human/H = mymob if(hud_shown) @@ -234,38 +235,26 @@ datum/hud/New(mob/owner) /datum/hud/proc/instantiate() - if(!ismob(mymob)) return 0 - if(!mymob.client) return 0 + if(!ismob(mymob)) + return 0 + if(!mymob.client) + return 0 + var/ui_style = ui_style2icon(mymob.client.prefs.UI_style) if(ishuman(mymob)) human_hud(ui_style) // Pass the player the UI style chosen in preferences - else if(ismonkey(mymob)) monkey_hud(ui_style) - else if(isbrain(mymob)) brain_hud(ui_style) - else if(islarva(mymob)) larva_hud() - else if(isalien(mymob)) alien_hud() - else if(isAI(mymob)) ai_hud() - else if(isrobot(mymob)) robot_hud() - -// else if(ishivebot(mymob)) -// hivebot_hud() - -// else if(ishivemainframe(mymob)) -// hive_mainframe_hud() - else if(isobserver(mymob)) - ghost_hud() - - return + ghost_hud() \ No newline at end of file diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 563114c6ebe..10cb4527844 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -625,7 +625,7 @@ datum/mind if(src in ticker.mode.wizards) ticker.mode.wizards -= src special_role = null - current.spellremove(current, config.feature_object_spell_system? "object":"verb") + current.spellremove(current) current << "\red You have been brainwashed! You are no longer a wizard!" log_admin("[key_name_admin(usr)] has de-wizard'ed [current].") if("wizard") diff --git a/code/defines/procs/statistics.dm b/code/defines/procs/statistics.dm index 6011c928e90..dc31d3da493 100644 --- a/code/defines/procs/statistics.dm +++ b/code/defines/procs/statistics.dm @@ -10,7 +10,7 @@ proc/sql_poll_players() log_game("SQL ERROR during player polling. Failed to connect.") else var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss") - var/DBQuery/query = dbcon_old.NewQuery("INSERT INTO population (playercount, time) VALUES ([playercount], '[sqltime]')") + var/DBQuery/query = dbcon.NewQuery("INSERT INTO erro_legacy_population (playercount, time) VALUES ([playercount], '[sqltime]')") if(!query.Execute()) var/err = query.ErrorMsg() log_game("SQL ERROR during player polling. Error : \[[err]\]\n") @@ -25,7 +25,7 @@ proc/sql_poll_admins() log_game("SQL ERROR during admin polling. Failed to connect.") else var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss") - var/DBQuery/query = dbcon_old.NewQuery("INSERT INTO population (admincount, time) VALUES ([admincount], '[sqltime]')") + var/DBQuery/query = dbcon.NewQuery("INSERT INTO erro_legacy_population (admincount, time) VALUES ([admincount], '[sqltime]')") if(!query.Execute()) var/err = query.ErrorMsg() log_game("SQL ERROR during admin polling. Error : \[[err]\]\n") @@ -34,6 +34,7 @@ proc/sql_report_round_start() // TODO if(!sqllogging) return + proc/sql_report_round_end() // TODO if(!sqllogging) @@ -64,11 +65,11 @@ proc/sql_report_death(var/mob/living/carbon/human/H) var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss") var/coord = "[H.x], [H.y], [H.z]" //world << "INSERT INTO death (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss) VALUES ('[sqlname]', '[sqlkey]', '[sqljob]', '[sqlspecial]', '[sqlpod]', '[sqltime]', '[laname]', '[lakey]', '[H.gender]', [H.bruteloss], [H.getFireLoss()], [H.brainloss], [H.getOxyLoss()])" - establish_old_db_connection() - if(!dbcon_old.IsConnected()) + establish_db_connection() + if(!dbcon.IsConnected()) log_game("SQL ERROR during death reporting. Failed to connect.") else - var/DBQuery/query = dbcon_old.NewQuery("INSERT INTO death (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss, coord) VALUES ('[sqlname]', '[sqlkey]', '[sqljob]', '[sqlspecial]', '[sqlpod]', '[sqltime]', '[laname]', '[lakey]', '[H.gender]', [H.getBruteLoss()], [H.getFireLoss()], [H.brainloss], [H.getOxyLoss()], '[coord]')") + var/DBQuery/query = dbcon.NewQuery("INSERT INTO erro_death (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss, coord) VALUES ('[sqlname]', '[sqlkey]', '[sqljob]', '[sqlspecial]', '[sqlpod]', '[sqltime]', '[laname]', '[lakey]', '[H.gender]', [H.getBruteLoss()], [H.getFireLoss()], [H.brainloss], [H.getOxyLoss()], '[coord]')") if(!query.Execute()) var/err = query.ErrorMsg() log_game("SQL ERROR during death reporting. Error : \[[err]\]\n") diff --git a/code/global.dm b/code/global.dm index 4735dea2be2..b5b4017d998 100644 --- a/code/global.dm +++ b/code/global.dm @@ -191,25 +191,10 @@ var/sqlfdbkpass = "" var/sqllogging = 0 // Should we log deaths, population stats, etc? - - - // Forum MySQL configuration (for use with forum account/key authentication) - // These are all default values that will load should the forumdbconfig.txt - // file fail to read for whatever reason. - -var/forumsqladdress = "localhost" -var/forumsqlport = "3306" -var/forumsqldb = "tgstation" -var/forumsqllogin = "root" -var/forumsqlpass = "" -var/forum_activated_group = "2" -var/forum_authenticated_group = "10" - // For FTP requests. (i.e. downloading runtime logs.) // However it'd be ok to use for accessing attack logs and such too, which are even laggier. var/fileaccess_timer = 0 //Database connections //A connection is established on world creation. Ideally, the connection dies when the server restarts (After feedback logging.). -var/DBConnection/dbcon = new() //Feedback database (New database) -var/DBConnection/dbcon_old = new() //Tgstation database (Old database) - See the files in the SQL folder for information what goes where. \ No newline at end of file +var/DBConnection/dbcon = new() //Feedback database (New database) \ No newline at end of file diff --git a/code/modules/admin/DB ban/functions.dm b/code/modules/admin/DB ban/functions.dm index ff4472ee668..289216b6753 100644 --- a/code/modules/admin/DB ban/functions.dm +++ b/code/modules/admin/DB ban/functions.dm @@ -25,6 +25,10 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration = if(BANTYPE_JOB_TEMP) bantype_str = "JOB_TEMPBAN" bantype_pass = 1 + if(BANTYPE_APPEARANCE) + bantype_str = "APPEARANCE_BAN" + duration = -1 + bantype_pass = 1 if( !bantype_pass ) return if( !istext(reason) ) return if( !isnum(duration) ) return @@ -107,6 +111,9 @@ datum/admins/proc/DB_ban_unban(var/ckey, var/bantype, var/job = "") if(BANTYPE_JOB_TEMP) bantype_str = "JOB_TEMPBAN" bantype_pass = 1 + if(BANTYPE_APPEARANCE) + bantype_str = "APPEARANCE_BAN" + bantype_pass = 1 if(BANTYPE_ANY_FULLBAN) bantype_str = "ANY" bantype_pass = 1 @@ -291,6 +298,7 @@ datum/admins/proc/DB_ban_unban_by_id(var/id) output += "" output += "" output += "" + output += "" output += "" output += "Ckey: " output += "Duration: " @@ -378,6 +386,8 @@ datum/admins/proc/DB_ban_unban_by_id(var/id) typedesc = "JOBBAN
([job])" if("JOB_TEMPBAN") typedesc = "TEMP JOBBAN
([job])
([duration] minutes
Expires [expiration]" + if("APPEARANCE_BAN") + typedesc = "APPEARANCE/NAME BAN" output += "" output += "[typedesc]" diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index eedc78f47e9..1055324f57d 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -50,6 +50,7 @@ var/global/floorIsLava = 0 body += "Warn | " body += "Ban | " body += "Jobban | " + body += "Appearance Ban | " body += "Notes " if(M.client) diff --git a/code/modules/admin/banappearance.dm b/code/modules/admin/banappearance.dm new file mode 100644 index 00000000000..3262fb66219 --- /dev/null +++ b/code/modules/admin/banappearance.dm @@ -0,0 +1,109 @@ +//ban people from using custom names and appearances. that'll show 'em. + +var/appearanceban_runonce //Updates legacy bans with new info +var/appearance_keylist[0] //to store the keys + +/proc/appearance_fullban(mob/M, reason) + if (!M || !M.key) return + appearance_keylist.Add(text("[M.ckey] ## [reason]")) + appearance_savebanfile() + +/proc/appearance_client_fullban(ckey) + if (!ckey) return + appearance_keylist.Add(text("[ckey]")) + appearance_savebanfile() + +//returns a reason if M is banned, returns 0 otherwise +/proc/appearance_isbanned(mob/M) + if(M) + for(var/s in appearance_keylist) + if(findtext(s, "[M.ckey]") == 1) + var/startpos = findtext(s, "## ") + 3 + if(startpos && startpos < length(s)) + var/text = copytext(s, startpos, 0) + if(text) + return text + return "Reason Unspecified" + return 0 + +/* +DEBUG +/mob/verb/list_all_appearances() + set name = "list all appearances" + + for(var/s in appearance_keylist) + world << s + +/mob/verb/reload_appearances() + set name = "reload appearances" + + appearance_loadbanfile() +*/ + +/proc/appearance_loadbanfile() + if(config.ban_legacy_system) + var/savefile/S=new("data/appearance_full.ban") + S["keys[0]"] >> appearance_keylist + log_admin("Loading appearance_rank") + S["runonce"] >> appearanceban_runonce + + if (!length(appearance_keylist)) + appearance_keylist=list() + log_admin("appearance_keylist was empty") + else + if(!establish_db_connection()) + world.log << "Database connection failed. Reverting to the legacy ban system." + diary << "Database connection failed. Reverting to the legacy ban system." + config.ban_legacy_system = 1 + appearance_loadbanfile() + return + + //appearance bans + var/DBQuery/query = dbcon.NewQuery("SELECT ckey FROM erro_ban WHERE bantype = 'APPEARANCE_BAN' AND NOT unbanned = 1") + query.Execute() + + while(query.NextRow()) + var/ckey = query.item[1] + + appearance_keylist.Add("[ckey]") + +/proc/appearance_savebanfile() + var/savefile/S=new("data/appearance_full.ban") + S["keys[0]"] << appearance_keylist + +/proc/appearance_unban(mob/M) + appearance_remove("[M.ckey]") + appearance_savebanfile() + + +/proc/appearance_updatelegacybans() + if(!appearanceban_runonce) + log_admin("Updating appearancefile!") + // Updates bans.. Or fixes them. Either way. + for(var/T in appearance_keylist) + if(!T) continue + appearanceban_runonce++ //don't run this update again + + +/proc/appearance_remove(X) + for (var/i = 1; i <= length(appearance_keylist); i++) + if( findtext(appearance_keylist[i], "[X]") ) + appearance_keylist.Remove(appearance_keylist[i]) + appearance_savebanfile() + return 1 + return 0 + +/* +proc/DB_ban_isappearancebanned(var/playerckey) + establish_db_connection() + if(!dbcon.IsConnected()) + return + + var/sqlplayerckey = sql_sanitize_text(ckey(playerckey)) + + var/DBQuery/query = dbcon.NewQuery("SELECT id FROM erro_ban WHERE CKEY = '[sqlplayerckey]' AND ((bantype = 'APPEARANCE_BAN') OR (bantype = 'APPEARANCE_TEMPBAN' AND expiration_time > Now())) AND unbanned != 1") + query.Execute() + while(query.NextRow()) + return 1 + return 0 +*/ \ No newline at end of file diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index bd8a31bea20..8462b271f1a 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -360,9 +360,56 @@ /////////////////////////////////////new ban stuff - else if(href_list["jobban2"]) -// if(!check_rights(R_BAN)) return + else if(href_list["appearanceban"]) + if(!check_rights(R_BAN)) + return + var/mob/M = locate(href_list["appearanceban"]) + if(!ismob(M)) + usr << "This can only be used on instances of type /mob" + return + if(!M.ckey) //sanity + usr << "This mob has no ckey" + return + var/banreason = appearance_isbanned(M) + if(banreason) + /* if(!config.ban_legacy_system) + usr << "Unfortunately, database based unbanning cannot be done through this panel" + DB_ban_panel(M.ckey) + return */ + switch(alert("Reason: '[banreason]' Remove appearance ban?","Please Confirm","Yes","No")) + if("Yes") + ban_unban_log_save("[key_name(usr)] removed [key_name(M)]'s appearance ban") + log_admin("[key_name(usr)] removed [key_name(M)]'s appearance ban") + feedback_inc("ban_appearance_unban", 1) + DB_ban_unban(M.ckey, BANTYPE_APPEARANCE) + appearance_unban(M) + message_admins("\blue [key_name_admin(usr)] removed [key_name_admin(M)]'s appearance ban", 1) + M << "\red[usr.client.ckey] has removed your appearance ban." + + else switch(alert("Appearance ban [M.ckey]?",,"Yes","No", "Cancel")) + if("Yes") + var/reason = input(usr,"Reason?","reason","Metafriender") as text|null + if(!reason) + return + ban_unban_log_save("[key_name(usr)] appearance banned [key_name(M)]. reason: [reason]") + log_admin("[key_name(usr)] appearance banned [key_name(M)]. \nReason: [reason]") + feedback_inc("ban_appearance",1) + DB_ban_record(BANTYPE_APPEARANCE, M, -1, reason) + appearance_fullban(M, "[reason]; By [usr.ckey] on [time2text(world.realtime)]") + notes_add(M.ckey, "Appearance banned - [reason]") + message_admins("\blue [key_name_admin(usr)] appearance banned [key_name_admin(M)]", 1) + M << "\redYou have been appearance banned by [usr.client.ckey]." + M << "\red The reason is: [reason]" + M << "\red Appearance ban can be lifted only upon request." + if(config.banappeals) + M << "\red To try to resolve this matter head to [config.banappeals]" + else + M << "\red No ban appeals URL has been set." + if("No") + return + + else if(href_list["jobban2"]) var/mob/M = locate(href_list["jobban2"]) if(!ismob(M)) usr << "This can only be used on instances of type /mob" diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 88e18fb925d..fc94f9b32de 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -137,8 +137,10 @@ datum/preferences dat += "

Occupation Choices

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

Indentity

" + dat += "

Identity

" dat += "
" + if(appearance_isbanned(user)) + dat += "You are banned from using custom names and appearances. You can continue to adjust your characters, but you will be randomised once you join the game.
" dat += "Random Name " dat += "Always Random Name: [be_random_name ? "Yes" : "No"]
" diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index 65a87c61351..c844b3edb38 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -6,7 +6,6 @@ * Barcode Scanner */ - /* * Bookcase */ @@ -20,6 +19,7 @@ opacity = 1 var/state = 0 + /obj/structure/bookcase/initialize() state = 2 icon_state = "book-0" @@ -29,59 +29,61 @@ I.loc = src update_icon() -/obj/structure/bookcase/attackby(obj/O as obj, mob/user as mob) +/obj/structure/bookcase/attackby(obj/item/I, mob/user) switch(state) if(0) - if(istype(O, /obj/item/weapon/wrench)) - playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) + if(istype(I, /obj/item/weapon/wrench)) + playsound(loc, 'sound/items/Ratchet.ogg', 100, 1) if(do_after(user, 20)) - user << "\blue You wrench the frame into place." + user << "You wrench the frame into place." anchored = 1 state = 1 - if(istype(O, /obj/item/weapon/crowbar)) - playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1) + if(istype(I, /obj/item/weapon/crowbar)) + playsound(loc, 'sound/items/Crowbar.ogg', 100, 1) if(do_after(user, 20)) - user << "\blue You pry the frame apart." - new /obj/item/stack/sheet/wood( loc, 4) + user << "You pry the frame apart." + new /obj/item/stack/sheet/wood(loc, 4) del(src) if(1) - if(istype(O, /obj/item/stack/sheet/wood)) - var/obj/item/stack/sheet/wood/W = O + if(istype(I, /obj/item/stack/sheet/wood)) + var/obj/item/stack/sheet/wood/W = I W.use(2) - user << "\blue You add a shelf." + user << "You add a shelf." state = 2 icon_state = "book-0" - if(istype(O, /obj/item/weapon/wrench)) - playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) - user << "\blue You unrwench the frame." + if(istype(I, /obj/item/weapon/wrench)) + playsound(loc, 'sound/items/Ratchet.ogg', 100, 1) + user << "You unrwench the frame." anchored = 0 state = 0 + if(2) - if(istype(O, /obj/item/weapon/book)) + if(istype(I, /obj/item/weapon/book)) user.drop_item() - O.loc = src + I.loc = src update_icon() - else if(istype(O, /obj/item/weapon/pen)) + else if(istype(I, /obj/item/weapon/pen)) var/newname = stripped_input(usr, "What would you like to title this bookshelf?") if(!newname) return else name = ("bookcase ([sanitize(newname)])") - else if(istype(O, /obj/item/weapon/crowbar)) + else if(istype(I, /obj/item/weapon/crowbar)) if(contents.len) - user << "\red You need to remove the books first." + user << "You need to remove the books first." else - playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1) - user << "\blue You pry the shelf out." - new /obj/item/stack/sheet/wood( loc, 1) + playsound(loc, 'sound/items/Crowbar.ogg', 100, 1) + user << "You pry the shelf out." + new /obj/item/stack/sheet/wood(loc, 1) state = 1 icon_state = "bookempty" else ..() -/obj/structure/bookcase/attack_hand(var/mob/user as mob) + +/obj/structure/bookcase/attack_hand(mob/user) if(contents.len) var/obj/item/weapon/book/choice = input("Which book would you like to remove from the shelf?") in contents as obj|null if(choice) @@ -94,27 +96,26 @@ choice.loc = get_turf(src) update_icon() + /obj/structure/bookcase/ex_act(severity) switch(severity) if(1.0) for(var/obj/item/weapon/book/b in contents) del(b) del(src) - return if(2.0) for(var/obj/item/weapon/book/b in contents) - if (prob(50)) b.loc = (get_turf(src)) - else del(b) + if(prob(50)) + b.loc = (get_turf(src)) + else + del(b) del(src) - return if(3.0) - if (prob(50)) + if(prob(50)) for(var/obj/item/weapon/book/b in contents) b.loc = (get_turf(src)) del(src) - return - else - return + /obj/structure/bookcase/update_icon() if(contents.len < 5) @@ -124,7 +125,7 @@ /obj/structure/bookcase/manuals/medical - name = "Medical Manuals bookcase" + name = "medical manuals bookcase" New() ..() @@ -133,7 +134,7 @@ /obj/structure/bookcase/manuals/engineering - name = "Engineering Manuals bookcase" + name = "engineering manuals bookcase" New() ..() @@ -145,8 +146,9 @@ new /obj/item/weapon/book/manual/robotics_cyborgs(src) update_icon() + /obj/structure/bookcase/manuals/research_and_development - name = "R&D Manuals bookcase" + name = "\improper R&D manuals bookcase" New() ..() @@ -166,19 +168,20 @@ w_class = 3 //upped to three because books are, y'know, pretty big. (and you could hide them inside eachother recursively forever) flags = FPRINT | TABLEPASS attack_verb = list("bashed", "whacked", "educated") - var/dat // Actual page content - var/due_date = 0 // Game time in 1/10th seconds - var/author // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned - var/unique = 0 // 0 - Normal book, 1 - Should not be treated as normal book, unable to be copied, unable to be modified - var/title // The real name of the book. - var/carved = 0 // Has the book been hollowed out for use as a secret storage item? + var/dat //Actual page content + var/due_date = 0 //Game time in 1/10th seconds + var/author //Who wrote the thing, can be changed by pen or PC. It is not automatically assigned + var/unique = 0 //0 - Normal book, 1 - Should not be treated as normal book, unable to be copied, unable to be modified + var/title //The real name of the book. + var/carved = 0 //Has the book been hollowed out for use as a secret storage item? var/obj/item/store //What's in the book? -/obj/item/weapon/book/attack_self(var/mob/user as mob) + +/obj/item/weapon/book/attack_self(mob/user) if(carved) if(store) user << "[store] falls out of [title]!" - store.loc = get_turf(src.loc) + store.loc = get_turf(loc) store = null return else @@ -190,31 +193,33 @@ if(dat) user << browse("Penned by [author].
" + "[dat]", "window=book") - user.visible_message("[user] opens a book titled \"[src.title]\" and begins reading intently.") + user.visible_message("[user] opens a book titled \"[title]\" and begins reading intently.") onclose(user, "book") else - user << "This book is completely blank!" + user << "This book is completely blank!" -/obj/item/weapon/book/attackby(obj/item/weapon/W as obj, mob/user as mob) + +/obj/item/weapon/book/attackby(obj/item/I, mob/user) if(carved) if(!store) - if(W.w_class < 3) + if(I.w_class < 3) user.drop_item() - W.loc = src - store = W - user << "You put [W] in [title]." + I.loc = src + store = I + user << "You put [I] in [title]." return else - user << "[W] won't fit in [title]." + user << "[I] won't fit in [title]." return else user << "There's already something in [title]!" return - if(istype(W, /obj/item/weapon/pen)) + + if(istype(I, /obj/item/weapon/pen)) if(is_blind(user)) return if(unique) - user << "These pages don't seem to take the ink well. Looks like you can't modify it." + user << "These pages don't seem to take the ink well. Looks like you can't modify it." return var/choice = input("What would you like to change?") in list("Title", "Contents", "Author", "Cancel") switch(choice) @@ -224,55 +229,58 @@ usr << "The title is invalid." return else - src.name = newtitle - src.title = newtitle + name = newtitle + title = newtitle if("Contents") var/content = strip_html(input(usr, "Write your book's contents (HTML NOT allowed):"),8192) as message|null if(!content) usr << "The content is invalid." return else - src.dat += content + dat += content if("Author") var/newauthor = stripped_input(usr, "Write the author's name:") if(!newauthor) usr << "The name is invalid." return else - src.author = newauthor + author = newauthor else return - else if(istype(W, /obj/item/weapon/barcodescanner)) - var/obj/item/weapon/barcodescanner/scanner = W + + else if(istype(I, /obj/item/weapon/barcodescanner)) + var/obj/item/weapon/barcodescanner/scanner = I if(!scanner.computer) - user << "[W]'s screen flashes: 'No associated computer found!'" + user << "[I]'s screen flashes: 'No associated computer found!'" else switch(scanner.mode) if(0) scanner.book = src - user << "[W]'s screen flashes: 'Book stored in buffer.'" + user << "[I]'s screen flashes: 'Book stored in buffer.'" if(1) scanner.book = src - scanner.computer.buffer_book = src.name - user << "[W]'s screen flashes: 'Book stored in buffer. Book title stored in associated computer buffer.'" + scanner.computer.buffer_book = name + user << "[I]'s screen flashes: 'Book stored in buffer. Book title stored in associated computer buffer.'" if(2) scanner.book = src for(var/datum/borrowbook/b in scanner.computer.checkouts) - if(b.bookname == src.name) + if(b.bookname == name) scanner.computer.checkouts.Remove(b) - user << "[W]'s screen flashes: 'Book stored in buffer. Book has been checked in.'" + user << "[I]'s screen flashes: 'Book stored in buffer. Book has been checked in.'" return - user << "[W]'s screen flashes: 'Book stored in buffer. No active check-out record found for current title.'" + user << "[I]'s screen flashes: 'Book stored in buffer. No active check-out record found for current title.'" if(3) scanner.book = src for(var/obj/item/weapon/book in scanner.computer.inventory) if(book == src) - user << "[W]'s screen flashes: 'Book stored in buffer. Title already present in inventory, aborting to avoid duplicate entry.'" + user << "[I]'s screen flashes: 'Book stored in buffer. Title already present in inventory, aborting to avoid duplicate entry.'" return scanner.computer.inventory.Add(src) - user << "[W]'s screen flashes: 'Book stored in buffer. Title added to general inventory.'" - else if(istype(W, /obj/item/weapon/kitchenknife) || istype(W, /obj/item/weapon/wirecutters)) - if(carved) return + user << "[I]'s screen flashes: 'Book stored in buffer. Title added to general inventory.'" + + else if(istype(I, /obj/item/weapon/kitchenknife) || istype(I, /obj/item/weapon/wirecutters)) + if(carved) + return user << "You begin to carve out [title]." if(do_after(user, 30)) user << "You carve out the pages from [title]! You didn't want to read it anyway." @@ -293,11 +301,11 @@ throw_range = 5 w_class = 1.0 flags = FPRINT | TABLEPASS - var/obj/machinery/librarycomp/computer // Associated computer - Modes 1 to 3 use this - var/obj/item/weapon/book/book // Currently scanned book - var/mode = 0 // 0 - Scan only, 1 - Scan and Set Buffer, 2 - Scan and Attempt to Check In, 3 - Scan and Attempt to Add to Inventory + var/obj/machinery/librarycomp/computer //Associated computer - Modes 1 to 3 use this + var/obj/item/weapon/book/book //Currently scanned book + var/mode = 0 //0 - Scan only, 1 - Scan and Set Buffer, 2 - Scan and Attempt to Check In, 3 - Scan and Attempt to Add to Inventory - attack_self(mob/user as mob) + attack_self(mob/user) mode += 1 if(mode > 3) mode = 0 @@ -315,7 +323,7 @@ else modedesc = "ERROR" user << " - Mode [mode] : [modedesc]" - if(src.computer) + if(computer) user << "Computer has been associated with this unit." else user << "No associated computer found. Only local scans will function properly." diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index 8203f8a1411..d5c6a696b67 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -43,8 +43,8 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f dat += "Filter by Author: [author]
" dat += "\[Start Search\]
" if(1) - establish_old_db_connection() - if(!dbcon_old.IsConnected()) + establish_db_connection() + if(!dbcon.IsConnected()) dat += "ERROR: Unable to contact External Archive. Please contact your system administrator for assistance.
" else if(!SQLquery) dat += "ERROR: Malformed search request. Please contact your system administrator for assistance.
" @@ -52,7 +52,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f dat += "" dat += "" - var/DBQuery/query = dbcon_old.NewQuery(SQLquery) + var/DBQuery/query = dbcon.NewQuery(SQLquery) query.Execute() while(query.NextRow()) @@ -98,7 +98,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f author = null author = sanitizeSQL(author) if(href_list["search"]) - SQLquery = "SELECT author, title, category, id FROM library WHERE " + SQLquery = "SELECT author, title, category, id FROM erro_library WHERE " if(category == "Any") SQLquery += "author LIKE '%[author]%' AND title LIKE '%[title]%'" else @@ -193,15 +193,15 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f dat += "(Return to main menu)
" if(4) dat += "

External Archive

" - establish_old_db_connection() - if(!dbcon_old.IsConnected()) + establish_db_connection() + if(!dbcon.IsConnected()) dat += "ERROR: Unable to contact External Archive. Please contact your system administrator for assistance." else dat += "(Order book by SS13BN)

" dat += "
AUTHORTITLECATEGORYSS13BN
" dat += "" - var/DBQuery/query = dbcon_old.NewQuery("SELECT id, author, title, category FROM library") + var/DBQuery/query = dbcon.NewQuery("SELECT id, author, title, category FROM erro_library") query.Execute() while(query.NextRow()) @@ -337,8 +337,8 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f if(scanner.cache) var/choice = input("Are you certain you wish to upload this title to the Archive?") in list("Confirm", "Abort") if(choice == "Confirm") - establish_old_db_connection() - if(!dbcon_old.IsConnected()) + establish_db_connection() + if(!dbcon.IsConnected()) alert("Connection to Archive has been severed. Aborting.") else /* @@ -351,7 +351,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f var/sqlauthor = sanitizeSQL(scanner.cache.author) var/sqlcontent = sanitizeSQL(scanner.cache.dat) var/sqlcategory = sanitizeSQL(upload_category) - var/DBQuery/query = dbcon_old.NewQuery("INSERT INTO library (author, title, content, category) VALUES ('[sqlauthor]', '[sqltitle]', '[sqlcontent]', '[sqlcategory]')") + var/DBQuery/query = dbcon.NewQuery("INSERT INTO erro_library (author, title, content, category) VALUES ('[sqlauthor]', '[sqltitle]', '[sqlcontent]', '[sqlcategory]')") if(!query.Execute()) usr << query.ErrorMsg() else @@ -360,8 +360,8 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f if(href_list["targetid"]) var/sqlid = sanitizeSQL(href_list["targetid"]) - establish_old_db_connection() - if(!dbcon_old.IsConnected()) + establish_db_connection() + if(!dbcon.IsConnected()) alert("Connection to Archive has been severed. Aborting.") if(bibledelay) for (var/mob/V in hearers(src)) @@ -370,7 +370,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f bibledelay = 1 spawn(60) bibledelay = 0 - var/DBQuery/query = dbcon_old.NewQuery("SELECT * FROM library WHERE id=[sqlid]") + var/DBQuery/query = dbcon.NewQuery("SELECT * FROM erro_library WHERE id=[sqlid]") query.Execute() while(query.NextRow()) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 94ea582b25a..ad09a6f6f5c 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -99,6 +99,8 @@ emp_act if(!turfs.len) turfs += pick(/turf in orange(6)) var/turf/picked = pick(turfs) if(!isturf(picked)) return + if(buckled) + buckled.unbuckle() src.loc = picked return 1 return 0 diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index db069af3c4f..cf85e329e15 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -106,34 +106,35 @@ /mob/living/carbon/human/proc/forcesay(list/append) - if(client) - var/virgin = 1 //has the text been modified yet? - var/temp = winget(client, "input", "text") - if(findtext(temp, "Say \"", 1, 7) && length(temp) > 5) + if(stat == CONSCIOUS) + if(client) + var/virgin = 1 //has the text been modified yet? + var/temp = winget(client, "input", "text") + if(findtextEx(temp, "Say \"", 1, 7) && length(temp) > 5) //case sensitive means - temp = replacetext(temp, ";", "") //general radio + temp = replacetext(temp, ";", "") //general radio - if(findtext(trim_left(temp), ":", 6, 7)) //dept radio - temp = copytext(trim_left(temp), 8) - virgin = 0 + if(findtext(trim_left(temp), ":", 6, 7)) //dept radio + temp = copytext(trim_left(temp), 8) + virgin = 0 - if(virgin) - temp = copytext(trim_left(temp), 6) //normal speech - virgin = 0 + if(virgin) + temp = copytext(trim_left(temp), 6) //normal speech + virgin = 0 - while(findtext(trim_left(temp), ":", 1, 2)) //dept radio again (necessary) - temp = copytext(trim_left(temp), 3) + while(findtext(trim_left(temp), ":", 1, 2)) //dept radio again (necessary) + temp = copytext(trim_left(temp), 3) - if(findtext(temp, "*", 1, 2)) //emotes - return + if(findtext(temp, "*", 1, 2)) //emotes + return - var/trimmed = trim_left(temp) - if(length(trimmed)) - if(append) - temp += pick(append) + var/trimmed = trim_left(temp) + if(length(trimmed)) + if(append) + temp += pick(append) - say(temp) - winset(client, "input", "text=[null]") + say(temp) + winset(client, "input", "text=[null]") /mob/living/carbon/human/say_understands(var/other) diff --git a/code/modules/mob/living/carbon/metroid/metroid.dm b/code/modules/mob/living/carbon/metroid/metroid.dm index 24e73a1b058..23837559ef2 100644 --- a/code/modules/mob/living/carbon/metroid/metroid.dm +++ b/code/modules/mob/living/carbon/metroid/metroid.dm @@ -722,7 +722,7 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75 desc = "Goo extracted from a slime. Legends claim these to have \"magical powers\"." icon = 'icons/mob/slimes.dmi' icon_state = "grey slime extract" - flags = TABLEPASS + flags = TABLEPASS | FPRINT force = 1.0 w_class = 1.0 throwforce = 1.0 diff --git a/code/modules/mob/living/carbon/monkey/death.dm b/code/modules/mob/living/carbon/monkey/death.dm index 8e982eb9356..a13342620cb 100644 --- a/code/modules/mob/living/carbon/monkey/death.dm +++ b/code/modules/mob/living/carbon/monkey/death.dm @@ -45,8 +45,7 @@ stat = DEAD if(!gibbed) - for(var/mob/O in viewers(src, null)) - O.show_message("The [name] lets out a faint chimper as it collapses and stops moving...", 1) //ded -- Urist + visible_message("[src] lets out a faint chimper as it collapses and stops moving...") //ded -- Urist update_canmove() if(blind) blind.layer = 0 diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index a87a8577778..70d1a254e24 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -308,7 +308,7 @@ var/mob/living/carbon/human/new_character = new(loc) new_character.lastarea = get_area(loc) - if(ticker.random_players) + if(ticker.random_players || appearance_isbanned(new_character)) client.prefs.random_character() client.prefs.real_name = random_name(gender) client.prefs.copy_to(new_character) diff --git a/code/modules/projectiles/guns/projectile.dm b/code/modules/projectiles/guns/projectile.dm index fe44c984d4a..283eb9e0af8 100644 --- a/code/modules/projectiles/guns/projectile.dm +++ b/code/modules/projectiles/guns/projectile.dm @@ -37,6 +37,7 @@ if(AC.BB) in_chamber = AC.BB //Load projectile into chamber. AC.BB.loc = src //Set projectile loc to gun. + AC.BB = null return 1 return 0 diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm index abb3185baf1..30c22961209 100644 --- a/code/modules/projectiles/guns/projectile/shotgun.dm +++ b/code/modules/projectiles/guns/projectile/shotgun.dm @@ -18,6 +18,9 @@ load_into_chamber() if(in_chamber) + var/obj/item/ammo_casing/AC = current_shell + AC.desc += " This one is spent." + AC.BB = null //remove the ammunition from the shell return 1 return 0 @@ -86,11 +89,12 @@ var/obj/item/ammo_casing/AC = loaded[1] //load next casing. loaded -= AC //Remove casing from loaded list. - AC.desc += " This one is spent." if(AC.BB) in_chamber = AC.BB //Load projectile into chamber. AC.BB.loc = src //Set projectile loc to gun. + AC.BB = null //Remove the ammunition from the shell + AC.desc += " This one is spent." return 1 return 0 @@ -104,7 +108,7 @@ loaded -= shell shell.loc = get_turf(src.loc) - user << "You break \the [src]." + user << "You open \the [src]." update_icon() attackby(var/obj/item/A as obj, mob/user as mob) diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 5099be31fb7..05acb7f8cf8 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -141,6 +141,7 @@ if(ismob(target) && target == user) reagents.reaction(target, INGEST) spawn(5) + target.add_fingerprint(user) var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this) user << "You inject [trans] unit\s of the solution. [src] now contains [reagents.total_volume] unit\s." if(reagents.total_volume <= 0 && mode == SYRINGE_INJECT) diff --git a/code/modules/research/research.dm b/code/modules/research/research.dm index 137d0ed8565..c1c8e311490 100644 --- a/code/modules/research/research.dm +++ b/code/modules/research/research.dm @@ -1,272 +1,266 @@ -/* -General Explination: -The research datum is the "folder" where all the research information is stored in a R&D console. It's also a holder for all the -various procs used to manipulate it. It has four variables and seven procs: - -Variables: -- possible_tech is a list of all the /datum/tech that can potentially be researched by the player. The RefreshResearch() proc -(explained later) only goes through those when refreshing what you know. Generally, possible_tech contains ALL of the existing tech -but it is possible to add tech to the game that DON'T start in it (example: Xeno tech). Generally speaking, you don't want to mess -with these since they should be the default version of the datums. They're actually stored in a list rather then using typesof to -refer to them since it makes it a bit easier to search through them for specific information. -- know_tech is the companion list to possible_tech. It's the tech you can actually research and improve. Until it's added to this -list, it can't be improved. All the tech in this list are visible to the player. -- possible_designs is functionally identical to possbile_tech except it's for /datum/design. -- known_designs is functionally identical to known_tech except it's for /datum/design - -Procs: -- TechHasReqs: Used by other procs (specifically RefreshResearch) to see whether all of a tech's requirements are currently in -known_tech and at a high enough level. -- DesignHasReqs: Same as TechHasReqs but for /datum/design and known_design. -- AddTech2Known: Adds a /datum/tech to known_tech. It checks to see whether it already has that tech (if so, it just replaces it). If -it doesn't have it, it adds it. Note: It does NOT check possible_tech at all. So if you want to add something strange to it (like -a player made tech?) you can. -- AddDesign2Known: Same as AddTech2Known except for /datum/design and known_designs. -- RefreshResearch: This is the workhorse of the R&D system. It updates the /datum/research holder and adds any unlocked tech paths -and designs you have reached the requirements for. It only checks through possible_tech and possible_designs, however, so it won't -accidentally add "secret" tech to it. -- UpdateTech is used as part of the actual researching process. It takes an ID and finds techs with that same ID in known_tech. When -it finds it, it checks to see whether it can improve it at all. If the known_tech's level is less then or equal to -the inputted level, it increases the known tech's level to the inputted level -1 or know tech's level +1 (whichever is higher). - -The tech datums are the actual "tech trees" that you improve through researching. Each one has five variables: -- Name: Pretty obvious. This is often viewable to the players. -- Desc: Pretty obvious. Also player viewable. -- ID: This is the unique ID of the tech that is used by the various procs to find and/or maniuplate it. -- Level: This is the current level of the tech. All techs start at 1 and have a max of 20. Devices and some techs require a certain -level in specific techs before you can produce them. -- Req_tech: This is a list of the techs required to unlock this tech path. If left blank, it'll automatically be loaded into the -research holder datum. - -*/ -/*************************************************************** -** Master Types ** -** Includes all the helper procs and basic tech processing. ** -***************************************************************/ - -/datum/research //Holder for all the existing, archived, and known tech. Individual to console. - - //Datum/tech go here. - var/list/possible_tech = list() //List of all tech in the game that players have access to (barring special events). - var/list/known_tech = list() //List of locally known tech. - var/list/possible_designs = list() //List of all designs (at base reliability). - var/list/known_designs = list() //List of available designs (at base reliability). - -/datum/research/New() //Insert techs into possible_tech here. Known_tech automatically updated. - for(var/T in typesof(/datum/tech) - /datum/tech) - possible_tech += new T(src) - for(var/D in typesof(/datum/design) - /datum/design) - possible_designs += new D(src) - RefreshResearch() - - - -//Checks to see if tech has all the required pre-reqs. -//Input: datum/tech; Output: 0/1 (false/true) -/datum/research/proc/TechHasReqs(var/datum/tech/T) - if(T.req_tech.len == 0) - return 1 - var/matches = 0 - for(var/req in T.req_tech) - for(var/datum/tech/known in known_tech) - if((req == known.id) && (known.level >= T.req_tech[req])) - matches++ - break - if(matches == T.req_tech.len) - return 1 - else - return 0 - -//Checks to see if design has all the required pre-reqs. -//Input: datum/design; Output: 0/1 (false/true) -/datum/research/proc/DesignHasReqs(var/datum/design/D) - if(D.req_tech.len == 0) - return 1 - var/matches = 0 - var/list/k_tech = list() - for(var/datum/tech/known in known_tech) - k_tech[known.id] = known.level - for(var/req in D.req_tech) - if(!isnull(k_tech[req]) && k_tech[req] >= D.req_tech[req]) - matches++ - if(matches == D.req_tech.len) - return 1 - else - return 0 -/* -//Checks to see if design has all the required pre-reqs. -//Input: datum/design; Output: 0/1 (false/true) -/datum/research/proc/DesignHasReqs(var/datum/design/D) - if(D.req_tech.len == 0) - return 1 - var/matches = 0 - for(var/req in D.req_tech) - for(var/datum/tech/known in known_tech) - if((req == known.id) && (known.level >= D.req_tech[req])) - matches++ - break - if(matches == D.req_tech.len) - return 1 - else - return 0 -*/ -//Adds a tech to known_tech list. Checks to make sure there aren't duplicates and updates existing tech's levels if needed. -//Input: datum/tech; Output: Null -/datum/research/proc/AddTech2Known(var/datum/tech/T) - for(var/datum/tech/known in known_tech) - if(T.id == known.id) - if(T.level > known.level) - known.level = T.level - return - known_tech += T - return - -/datum/research/proc/AddDesign2Known(var/datum/design/D) - for(var/datum/design/known in known_designs) - if(D.id == known.id) - if(D.reliability_mod > known.reliability_mod) - known.reliability_mod = D.reliability_mod - return - known_designs += D - return - -//Refreshes known_tech and known_designs list. Then updates the reliability vars of the designs in the known_designs list. -//Input/Output: n/a -/datum/research/proc/RefreshResearch() - for(var/datum/tech/PT in possible_tech) - if(TechHasReqs(PT)) - AddTech2Known(PT) - for(var/datum/design/PD in possible_designs) - if(DesignHasReqs(PD)) - AddDesign2Known(PD) - for(var/datum/tech/T in known_tech) - T = between(1,T.level,20) - for(var/datum/design/D in known_designs) - D.CalcReliability(known_tech) - return - -//Refreshes the levels of a given tech. -//Input: Tech's ID and Level; Output: null -/datum/research/proc/UpdateTech(var/ID, var/level) - for(var/datum/tech/KT in known_tech) - if(KT.id == ID) - if(KT.level <= level) KT.level = max((KT.level + 1), (level - 1)) - return - -/datum/research/proc/UpdateDesign(var/path) - for(var/datum/design/KD in known_designs) - if(KD.build_path == path) - KD.reliability_mod += rand(1,2) - break - return - - - - -/*************************************************************** -** Technology Datums ** -** Includes all the various technoliges and what they make. ** -***************************************************************/ - -datum/tech //Datum of individual technologies. - var/name = "name" //Name of the technology. - var/desc = "description" //General description of what it does and what it makes. - var/id = "id" //An easily referenced ID. Must be alphanumeric, lower-case, and no symbols. - var/level = 1 //A simple number scale of the research level. Level 0 = Secret tech. - var/list/req_tech = list() //List of ids associated values of techs required to research this tech. "id" = # - - -//Trunk Technologies (don't require any other techs and you start knowning them). - -datum/tech/materials - name = "Materials Research" - desc = "Development of new and improved materials." - id = "materials" - -datum/tech/engineering - name = "Engineering Research" - desc = "Development of new and improved engineering parts and." - id = "engineering" - -datum/tech/plasmatech - name = "Plasma Research" - desc = "Research into the mysterious substance colloqually known as 'plasma'." - id = "plasmatech" - -datum/tech/powerstorage - name = "Power Manipulation Technology" - desc = "The various technologies behind the storage and generation of electicity." - id = "powerstorage" - -datum/tech/bluespace - name = "'Blue-space' Research" - desc = "Research into the sub-reality known as 'blue-space'" - id = "bluespace" - -datum/tech/biotech - name = "Biological Technology" - desc = "Research into the deeper mysteries of life and organic substances." - id = "biotech" - -datum/tech/combat - name = "Combat Systems Research" - desc = "The development of offensive and defensive systems." - id = "combat" - -datum/tech/magnets - name = "Electromagnetic Spectrum Research" - desc = "Research into the electromagnetic spectrum. No clue how they actually work, though." - id = "magnets" - -datum/tech/programming - name = "Data Theory Research" - desc = "The development of new computer and artificial intelligence and data storage systems." - id = "programming" - -datum/tech/syndicate - name = "Illegal Technologies Research" - desc = "The study of technologies that violate Nanotrassen regulations." - id = "syndicate" - -/* -datum/tech/arcane - name = "Arcane Research" - desc = "Research into the occult and arcane field for use in practical science" - id = "arcane" - level = 0 //It didn't become "secret" as advertised. - -//Branch Techs -datum/tech/explosives - name = "Explosives Research" - desc = "The creation and application of explosive materials." - id = "explosives" - req_tech = list("materials" = 3) - -datum/tech/generators - name = "Power Generation Technology" - desc = "Research into more powerful and more reliable sources." - id = "generators" - req_tech = list("powerstorage" = 2) - -datum/tech/robotics - name = "Robotics Technology" - desc = "The development of advanced automated, autonomous machines." - id = "robotics" - req_tech = list("materials" = 3, "programming" = 3) -*/ - - -/obj/item/weapon/disk/tech_disk - name = "Technology Disk" - desc = "A disk for storing technology data for further research." - icon = 'icons/obj/cloning.dmi' - icon_state = "datadisk2" - item_state = "card-id" - w_class = 1.0 - m_amt = 30 - g_amt = 10 - var/datum/tech/stored - -/obj/item/weapon/disk/tech_disk/New() - src.pixel_x = rand(-5.0, 5) +/* +General Explination: +The research datum is the "folder" where all the research information is stored in a R&D console. It's also a holder for all the +various procs used to manipulate it. It has four variables and seven procs: + +Variables: +- possible_tech is a list of all the /datum/tech that can potentially be researched by the player. The RefreshResearch() proc +(explained later) only goes through those when refreshing what you know. Generally, possible_tech contains ALL of the existing tech +but it is possible to add tech to the game that DON'T start in it (example: Xeno tech). Generally speaking, you don't want to mess +with these since they should be the default version of the datums. They're actually stored in a list rather then using typesof to +refer to them since it makes it a bit easier to search through them for specific information. +- know_tech is the companion list to possible_tech. It's the tech you can actually research and improve. Until it's added to this +list, it can't be improved. All the tech in this list are visible to the player. +- possible_designs is functionally identical to possbile_tech except it's for /datum/design. +- known_designs is functionally identical to known_tech except it's for /datum/design + +Procs: +- TechHasReqs: Used by other procs (specifically RefreshResearch) to see whether all of a tech's requirements are currently in +known_tech and at a high enough level. +- DesignHasReqs: Same as TechHasReqs but for /datum/design and known_design. +- AddTech2Known: Adds a /datum/tech to known_tech. It checks to see whether it already has that tech (if so, it just replaces it). If +it doesn't have it, it adds it. Note: It does NOT check possible_tech at all. So if you want to add something strange to it (like +a player made tech?) you can. +- AddDesign2Known: Same as AddTech2Known except for /datum/design and known_designs. +- RefreshResearch: This is the workhorse of the R&D system. It updates the /datum/research holder and adds any unlocked tech paths +and designs you have reached the requirements for. It only checks through possible_tech and possible_designs, however, so it won't +accidentally add "secret" tech to it. +- UpdateTech is used as part of the actual researching process. It takes an ID and finds techs with that same ID in known_tech. When +it finds it, it checks to see whether it can improve it at all. If the known_tech's level is less then or equal to +the inputted level, it increases the known tech's level to the inputted level -1 or know tech's level +1 (whichever is higher). + +The tech datums are the actual "tech trees" that you improve through researching. Each one has five variables: +- Name: Pretty obvious. This is often viewable to the players. +- Desc: Pretty obvious. Also player viewable. +- ID: This is the unique ID of the tech that is used by the various procs to find and/or maniuplate it. +- Level: This is the current level of the tech. All techs start at 1 and have a max of 20. Devices and some techs require a certain +level in specific techs before you can produce them. +- Req_tech: This is a list of the techs required to unlock this tech path. If left blank, it'll automatically be loaded into the +research holder datum. + +*/ +/*************************************************************** +** Master Types ** +** Includes all the helper procs and basic tech processing. ** +***************************************************************/ + +/datum/research //Holder for all the existing, archived, and known tech. Individual to console. + + //Datum/tech go here. + var/list/possible_tech = list() //List of all tech in the game that players have access to (barring special events). + var/list/known_tech = list() //List of locally known tech. + var/list/possible_designs = list() //List of all designs (at base reliability). + var/list/known_designs = list() //List of available designs (at base reliability). + +/datum/research/New() //Insert techs into possible_tech here. Known_tech automatically updated. + for(var/T in typesof(/datum/tech) - /datum/tech) + possible_tech += new T(src) + for(var/D in typesof(/datum/design) - /datum/design) + possible_designs += new D(src) + RefreshResearch() + + + +//Checks to see if tech has all the required pre-reqs. +//Input: datum/tech; Output: 0/1 (false/true) +/datum/research/proc/TechHasReqs(var/datum/tech/T) + if(T.req_tech.len == 0) + return 1 + var/matches = 0 + for(var/req in T.req_tech) + for(var/datum/tech/known in known_tech) + if((req == known.id) && (known.level >= T.req_tech[req])) + matches++ + break + if(matches == T.req_tech.len) + return 1 + else + return 0 + +//Checks to see if design has all the required pre-reqs. +//Input: datum/design; Output: 0/1 (false/true) +/datum/research/proc/DesignHasReqs(var/datum/design/D)//Heavily optimized -Sieve + if(D.req_tech.len == 0) + return 1 + for(var/datum/tech/T in known_tech) + if((D.req_tech[T.id]) && (T.level < D.req_tech[T.id])) + return 0 + return 1 + +/* +//Checks to see if design has all the required pre-reqs. +//Input: datum/design; Output: 0/1 (false/true) +/datum/research/proc/DesignHasReqs(var/datum/design/D) + if(D.req_tech.len == 0) + return 1 + var/matches = 0 + for(var/req in D.req_tech) + for(var/datum/tech/known in known_tech) + if((req == known.id) && (known.level >= D.req_tech[req])) + matches++ + break + if(matches == D.req_tech.len) + return 1 + else + return 0 +*/ +//Adds a tech to known_tech list. Checks to make sure there aren't duplicates and updates existing tech's levels if needed. +//Input: datum/tech; Output: Null +/datum/research/proc/AddTech2Known(var/datum/tech/T) + for(var/datum/tech/known in known_tech) + if(T.id == known.id) + if(T.level > known.level) + known.level = T.level + return + known_tech += T + return + +/datum/research/proc/AddDesign2Known(var/datum/design/D) + for(var/datum/design/known in known_designs) + if(D.id == known.id) + if(D.reliability_mod > known.reliability_mod) + known.reliability_mod = D.reliability_mod + return + known_designs += D + return + +//Refreshes known_tech and known_designs list. Then updates the reliability vars of the designs in the known_designs list. +//Input/Output: n/a +/datum/research/proc/RefreshResearch() + for(var/datum/tech/PT in possible_tech) + if(TechHasReqs(PT)) + AddTech2Known(PT) + for(var/datum/design/PD in possible_designs) + if(DesignHasReqs(PD)) + AddDesign2Known(PD) + for(var/datum/tech/T in known_tech) + T = between(1,T.level,20) + for(var/datum/design/D in known_designs) + D.CalcReliability(known_tech) + return + +//Refreshes the levels of a given tech. +//Input: Tech's ID and Level; Output: null +/datum/research/proc/UpdateTech(var/ID, var/level) + for(var/datum/tech/KT in known_tech) + if(KT.id == ID) + if(KT.level <= level) KT.level = max((KT.level + 1), (level - 1)) + return + +/datum/research/proc/UpdateDesign(var/path) + for(var/datum/design/KD in known_designs) + if(KD.build_path == path) + KD.reliability_mod += rand(1,2) + break + return + + + + +/*************************************************************** +** Technology Datums ** +** Includes all the various technoliges and what they make. ** +***************************************************************/ + +datum/tech //Datum of individual technologies. + var/name = "name" //Name of the technology. + var/desc = "description" //General description of what it does and what it makes. + var/id = "id" //An easily referenced ID. Must be alphanumeric, lower-case, and no symbols. + var/level = 1 //A simple number scale of the research level. Level 0 = Secret tech. + var/list/req_tech = list() //List of ids associated values of techs required to research this tech. "id" = # + + +//Trunk Technologies (don't require any other techs and you start knowning them). + +datum/tech/materials + name = "Materials Research" + desc = "Development of new and improved materials." + id = "materials" + +datum/tech/engineering + name = "Engineering Research" + desc = "Development of new and improved engineering parts and." + id = "engineering" + +datum/tech/plasmatech + name = "Plasma Research" + desc = "Research into the mysterious substance colloqually known as 'plasma'." + id = "plasmatech" + +datum/tech/powerstorage + name = "Power Manipulation Technology" + desc = "The various technologies behind the storage and generation of electicity." + id = "powerstorage" + +datum/tech/bluespace + name = "'Blue-space' Research" + desc = "Research into the sub-reality known as 'blue-space'" + id = "bluespace" + +datum/tech/biotech + name = "Biological Technology" + desc = "Research into the deeper mysteries of life and organic substances." + id = "biotech" + +datum/tech/combat + name = "Combat Systems Research" + desc = "The development of offensive and defensive systems." + id = "combat" + +datum/tech/magnets + name = "Electromagnetic Spectrum Research" + desc = "Research into the electromagnetic spectrum. No clue how they actually work, though." + id = "magnets" + +datum/tech/programming + name = "Data Theory Research" + desc = "The development of new computer and artificial intelligence and data storage systems." + id = "programming" + +datum/tech/syndicate + name = "Illegal Technologies Research" + desc = "The study of technologies that violate Nanotrassen regulations." + id = "syndicate" + +/* +datum/tech/arcane + name = "Arcane Research" + desc = "Research into the occult and arcane field for use in practical science" + id = "arcane" + level = 0 //It didn't become "secret" as advertised. + +//Branch Techs +datum/tech/explosives + name = "Explosives Research" + desc = "The creation and application of explosive materials." + id = "explosives" + req_tech = list("materials" = 3) + +datum/tech/generators + name = "Power Generation Technology" + desc = "Research into more powerful and more reliable sources." + id = "generators" + req_tech = list("powerstorage" = 2) + +datum/tech/robotics + name = "Robotics Technology" + desc = "The development of advanced automated, autonomous machines." + id = "robotics" + req_tech = list("materials" = 3, "programming" = 3) +*/ + + +/obj/item/weapon/disk/tech_disk + name = "Technology Disk" + desc = "A disk for storing technology data for further research." + icon = 'icons/obj/cloning.dmi' + icon_state = "datadisk2" + item_state = "card-id" + w_class = 1.0 + m_amt = 30 + g_amt = 10 + var/datum/tech/stored + +/obj/item/weapon/disk/tech_disk/New() + src.pixel_x = rand(-5.0, 5) src.pixel_y = rand(-5.0, 5) \ No newline at end of file diff --git a/code/world.dm b/code/world.dm index 41ef45c11c6..c751ee15ead 100644 --- a/code/world.dm +++ b/code/world.dm @@ -19,7 +19,7 @@ changelog_hash = md5('html/changelog.html') //used for telling if the changelog has changed recently if(byond_version < RECOMMENDED_VERSION) - world.log << "Your server's byond version does not meet the recommended requirements for TGstation code. Please update BYOND" + world.log << "Your server's BYOND version does not meet the recommended requirements for /tg/station code. Please update BYOND." make_datum_references_lists() //initialises global lists for referencing frequently used datums (so that we only ever do it once) @@ -31,6 +31,7 @@ if(config.usewhitelist) load_whitelist() jobban_loadbanfile() + appearance_loadbanfile() jobban_updatelegacybans() LoadBans() investigate_reset() @@ -48,14 +49,9 @@ if(config.sql_enabled) if(!setup_database_connection()) - world.log << "Your server failed to establish a connection with the feedback database." + world.log << "Your server failed to establish a connection with the database." else - world.log << "Feedback database connection established." - - if(!setup_old_database_connection()) - world.log << "Your server failed to establish a connection with the tgstation database." - else - world.log << "Tgstation database connection established." + world.log << "Database connection established." plmaster = new /obj/effect/overlay() plmaster.icon = 'icons/effects/tile_effects.dmi' @@ -201,7 +197,6 @@ config.load("config/config.txt") config.load("config/game_options.txt","game_options") config.loadsql("config/dbconfig.txt") - config.loadforumsql("config/forumdbconfig.txt") // apply some settings from config.. abandon_allowed = config.respawn @@ -267,7 +262,6 @@ #define FAILED_DB_CONNECTION_CUTOFF 5 var/failed_db_connections = 0 -var/failed_old_db_connections = 0 proc/setup_database_connection() @@ -302,41 +296,4 @@ proc/establish_db_connection() else return 1 - - - -//These two procs are for the old database, while it's being phased out. See the tgstation.sql file in the SQL folder for more information. -proc/setup_old_database_connection() - - if(failed_old_db_connections > FAILED_DB_CONNECTION_CUTOFF) //If it failed to establish a connection more than 5 times in a row, don't bother attempting to conenct anymore. - return 0 - - if(!dbcon_old) - dbcon_old = new() - - var/user = sqllogin - var/pass = sqlpass - var/db = sqldb - var/address = sqladdress - var/port = sqlport - - dbcon_old.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]") - . = dbcon_old.IsConnected() - if ( . ) - failed_old_db_connections = 0 //If this connection succeeded, reset the failed connections counter. - else - failed_old_db_connections++ //If it failed, increase the failed connections counter. - - return . - -//This proc ensures that the connection to the feedback database (global variable dbcon) is established -proc/establish_old_db_connection() - if(failed_old_db_connections > FAILED_DB_CONNECTION_CUTOFF) - return 0 - - if(!dbcon_old || !dbcon_old.IsConnected()) - return setup_old_database_connection() - else - return 1 - #undef FAILED_DB_CONNECTION_CUTOFF \ No newline at end of file diff --git a/config/README feedback.txt b/config/README feedback.txt deleted file mode 100644 index 354db8f351a..00000000000 --- a/config/README feedback.txt +++ /dev/null @@ -1,30 +0,0 @@ -Create a databse at the same location where the server MySQL databse is. (as defined in config/dbconfig.txt under ADDRESS and PORT) It can be a separate database or the same one, as you wish. Create the following table in it: (name needs to remain as 'erro_feedback') - - -CREATE TABLE IF NOT EXISTS `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`) - -); - - - -Open the file config/dbconfig.txt and edit the following lines: - -FEEDBACK_DATABASE test - -FEEDBACK_LOGIN mylogin - -FEEDBACK_PASSWORD mypassword \ No newline at end of file diff --git a/config/config.txt b/config/config.txt index 8adf6ed9e04..e63c6501c0d 100644 --- a/config/config.txt +++ b/config/config.txt @@ -1,23 +1,12 @@ ## Server name: This appears at the top of the screen in-game. In this case it will read "tgstation: station_name" where station_name is the randomly generated name of the station for the round. Remove the # infront of SERVERNAME and replace 'tgstation' with the name of your choice # SERVERNAME tgstation -## Alert levels -ALERT_GREEN All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced. -ALERT_BLUE_UPTO The station has received reliable information about possible hostile activity on the station. Security staff may have weapons visible, random searches are permitted. -ALERT_BLUE_DOWNTO The immediate threat has passed. Security may no longer have weapons drawn at all times, but may continue to have them visible. Random searches are still allowed. -ALERT_RED_UPTO There is an immediate serious threat to the station. Security may have weapons unholstered at all times. Random searches are allowed and advised. -ALERT_RED_DOWNTO The self-destruct mechanism has been deactivated, there is still however an immediate serious threat to the station. Security may have weapons unholstered at all times, random searches are allowed and advised. -ALERT_DELTA The station's self-destruct mechanism has been engaged. All crew are instructed to obey all instructions given by heads of staff. Any violations of these orders can be punished by death. This is not a drill. - ## Add a # infront of this if you want to use the SQL based admin system, the legacy system uses admins.txt. You need to set up your database to use the SQL based system. ADMIN_LEGACY_SYSTEM ## Add a # infront of this if you want to use the SQL based banning system. The legacy systems use the files in the data folder. You need to set up your database to use the SQL based system. BAN_LEGACY_SYSTEM -## Add a # here if you wish to use the setup where jobs have more access. This is intended for servers with low populations - where there are not enough players to fill all roles, so players need to do more than just one job. Also for servers where they don't want people to hide in their own departments. -JOBS_HAVE_MINIMAL_ACCESS - ## Unhash this entry to have certain jobs require your account to be at least a certain number of days old to select. You can configure the exact age requirement for different jobs by editing ## the minimal_player_age variable in the files in folder /code/game/jobs/job/.. for the job you want to edit. Set minimal_player_age to 0 to disable age requirement for that job. ## REQUIRES the database set up to work. Keep it hashed if you don't have a database set up. @@ -25,9 +14,6 @@ JOBS_HAVE_MINIMAL_ACCESS ## you have noone older than 0 days, since noone has been logged yet. Only turn this on once you have had the database up for 30 days. #USE_AGE_RESTRICTION_FOR_JOBS -## Unhash this to use recursive explosions, keep it hashed to use circle explosions. Recursive explosions react to walls, airlocks and blast doors, making them look a lot cooler than the boring old circular explosions. They require more CPU and are (as of january 2013) experimental -#USE_RECURSIVE_EXPLOSIONS - ## log OOC channel LOG_OOC @@ -70,41 +56,9 @@ LOG_LAW ## log admin warning messages ##LOG_ADMINWARN ## Also duplicates a bunch of other messages. -## sql switching -# SQL_ENABLED - ## disconnect players who did nothing during 10 minutes # KICK_INACTIVE -## probablities for game modes chosen in "secret" and "random" modes -## -## default probablity is 1, increase to make that mode more likely to be picked -## set to 0 to disable that mode -## Cult mode is in alpha test, enable at your own risk -PROBABILITY EXTENDED 0 -PROBABILITY TRAITOR 0 -PROBABILITY METEOR 0 -PROBABILITY MALFUNCTION 2 -PROBABILITY BLOB 0 -PROBABILITY NUCLEAR 5 -PROBABILITY SANDBOX 0 -PROBABILITY WIZARD 0 -PROBABILITY RESTRUCTURING 0 -PROBABILITY REVOLUTION 5 -PROBABILITY CHANGELING 0 -PROBABILITY CULT 1 -PROBABILITY MONKEY 0 -PROBABILITY TRAITORCHAN 0 - -## Hash out to disable random events during the round. -ALLOW_RANDOM_EVENTS - -## if amount of traitors scales or not -#TRAITOR_SCALING - -## If security is prohibited from being most antagonists -#PROTECT_ROLES_FROM_ANTAGONIST - ## Comment this out to stop admins being able to choose their personal ooccolor ALLOW_ADMIN_OOCCOLOR @@ -129,10 +83,6 @@ VOTE_PERIOD 600 ## players' votes default to "No vote" (otherwise, default to "No change") # DEFAULT_NO_VOTE -## allow AI job -ALLOW_AI - - ## disable abandon mob NORESPAWN @@ -188,24 +138,8 @@ TICKLAG 0.9 ## Defines if Tick Compensation is used. It results in a minor slowdown of movement of all mobs, but attempts to result in a level movement speed across all ticks. Recommended if tickrate is lowered. TICKCOMP 0 -## if uncommented this adds a random surname to a player's name if they only specify one name -HUMANS_NEED_SURNAMES - ## Uncomment this to ban use of ToR #TOR_BAN ## Comment this out to disable automuting -#AUTOMUTE_ON - -## How long the delay is before the Away Mission gate opens. Default is half an hour. -GATEWAY_DELAY 18000 - -## Remove the # to give assistants maint access. -#ASSISTANT_MAINT - -## Remove the # to make rounds which end instantly (Rev, Wizard, Malf) to continue until the shuttle is called or the station is nuked. -## Malf and Rev will let the shuttle be called when the antags/protags are dead. -#CONTINUOUS_ROUNDS - -##Remove the # to let ghosts spin chairs -#GHOST_INTERACTION \ No newline at end of file +#AUTOMUTE_ON \ No newline at end of file diff --git a/config/dbconfig.txt b/config/dbconfig.txt index a0d6f28b7b6..8bf58f15d65 100644 --- a/config/dbconfig.txt +++ b/config/dbconfig.txt @@ -1,26 +1,25 @@ # MySQL Connection Configuration +# This is used for stats, feedback gathering, +# administration, and the in game library. -# Server the MySQL database can be found at +# Should SQL be enabled? Uncomment to enable. +SQL_ENABLED + +# Server the MySQL database can be found at. # Examples: localhost, 200.135.5.43, www.mysqldb.com, etc. ADDRESS localhost -# MySQL server port (default is 3306) +# MySQL server port (default is 3306). PORT 3306 -# Database the population, death, karma, etc. tables may be found in -DATABASE tgstation +# Database for all SQL functions, not just feedback. +FEEDBACK_DATABASE feedback -# Username/Login used to access the database -LOGIN mylogin +# Username/Login used to access the database. +FEEDBACK_LOGIN username -# Password used to access the database -PASSWORD mypassword +# Password used to access the database. +FEEDBACK_PASSWORD password -# The following information is for feedback tracking via the blackbox server -FEEDBACK_DATABASE test -FEEDBACK_LOGIN mylogin -FEEDBACK_PASSWORD mypassword - -# Track population and death statistics -# Comment this out to disable +# Comment out to disable tracking of population and death statistics. ENABLE_STAT_TRACKING \ No newline at end of file diff --git a/config/forumdbconfig.txt b/config/forumdbconfig.txt deleted file mode 100644 index 61a2a2d6ecd..00000000000 --- a/config/forumdbconfig.txt +++ /dev/null @@ -1,19 +0,0 @@ -# This configuration file is for the forum database, if you need to set up -# population, death, etc. tracking see 'dbconfig.txt' -# The login credentials for this will likely differ from those in dbconfig.txt! - -# Server the MySQL database can be found at -# Examples: localhost, 200.135.5.43, www.mysqldb.com, etc. -ADDRESS localhost - -# MySQL server port (default is 3306) -PORT 3306 - -# Database the forum data may be found in -DATABASE tgstation13 - -# Username/Login used to access the database -LOGIN mylogin - -# Password used to access the database -PASSWORD mypassword \ No newline at end of file diff --git a/config/game_options.txt b/config/game_options.txt index 9ec32a29484..a47f8c1be63 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -1,40 +1,136 @@ ### HEALTH ### -## level of health at which a mob becomes unconscious (crit) +# level of health at which a mob becomes unconscious (crit) HEALTH_THRESHOLD_CRIT 0 -## level of health at which a mob becomes dead +# level of health at which a mob becomes dead HEALTH_THRESHOLD_DEAD -100 + ### REVIVAL ### -## whether pod plants work or not +# whether pod plants work or not REVIVAL_POD_PLANTS 1 -## whether cloning tubes work or not +# whether cloning tubes work or not REVIVAL_CLONING 1 -## amount of time (in hundredths of seconds) for which a brain retains the "spark of life" after the person's death (set to -1 for infinite) +# amount of time (in hundredths of seconds) for which a brain retains the "spark of life" after the person's death (set to -1 for infinite) REVIVAL_BRAIN_LIFE -1 - ### MOB MOVEMENT ### -## We suggest editing these variabled in-game to find a good speed for your server. To do this you must be a high level admin. Open the 'debug' tab ingame. Select "Debug Controller" and then, in the popup, select "Configuration". These variables should have the same name. - -## These values get directly added to values and totals in-game. To speed things up make the number negative, to slow things down, make the number positive. +## We suggest editing these variables ingame to find a good speed for your server. +## To do this you must be a high level admin. Open the 'debug' tab ingame. +## Select "Debug Controller" and then, in the popup, select "Configuration". These variables should have the same name. +## These values get directly added to values and totals ingame. +## To speed things up make the number negative, to slow things down, make the number positive. ## These modify the run/walk speed of all mobs before the mob-specific modifiers are applied. RUN_DELAY 0 WALK_DELAY 0 - ## The variables below affect the movement of specific mob types. HUMAN_DELAY 0 ROBOT_DELAY 0 MONKEY_DELAY 0 ALIEN_DELAY 0 METROID_DELAY 0 -ANIMAL_DELAY 0 \ No newline at end of file +ANIMAL_DELAY 0 + + +### NAMES ### +## If uncommented this adds a random surname to a player's name if they only specify one name. +#HUMANS_NEED_SURNAMES + + +### ALERT LEVELS ### +ALERT_GREEN All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced. +ALERT_BLUE_UPTO The station has received reliable information about possible hostile activity on the station. Security staff may have weapons visible, random searches are permitted. +ALERT_BLUE_DOWNTO The immediate threat has passed. Security may no longer have weapons drawn at all times, but may continue to have them visible. Random searches are still allowed. +ALERT_RED_UPTO There is an immediate serious threat to the station. Security may have weapons unholstered at all times. Random searches are allowed and advised. +ALERT_RED_DOWNTO The self-destruct mechanism has been deactivated, there is still however an immediate serious threat to the station. Security may have weapons unholstered at all times, random searches are allowed and advised. +ALERT_DELTA The station's self-destruct mechanism has been engaged. All crew are instructed to obey all instructions given by heads of staff. Any violations of these orders can be punished by death. This is not a drill. + + +### EXPLOSIONS ### + +## Unhash this to use recursive explosions, keep it hashed to use normal style explosions. +## Recursive explosions react to walls, airlocks and blast doors, making them look a lot cooler +## than the boring old circular explosions. They require more CPU and are (as of March 2013) experimental. +## The default map is generally designed for the old style explosions in terms of security. + +#USE_RECURSIVE_EXPLOSIONS + + +### GAME MODES ### + +## Probablities for game modes chosen in 'secret' and 'random' modes. +## Default probablity is 1, increase to make that mode more likely to be picked. +## Set to 0 to disable that mode. + +PROBABILITY TRAITOR 5 +PROBABILITY TRAITORCHAN 4 +PROBABILITY NUCLEAR 2 +PROBABILITY REVOLUTION 2 +PROBABILITY CULT 2 +PROBABILITY CHANGELING 2 +PROBABILITY WIZARD 4 +PROBABILITY MALFUNCTION 1 +PROBABILITY BLOB 0 +PROBABILITY METEOR 0 +PROBABILITY EXTENDED 0 + +## You probably want to keep sandbox off by default for secret and random. +PROBABILITY SANDBOX 0 + +## Uncomment to make rounds which end instantly (Rev, Wizard, Malf) continue until +## the shuttle is called or the station is nuked. +## Malf and Rev will let the shuttle be called when the antags/protags are dead. +#CONTINUOUS_ROUNDS + +## Uncomment to scale the number of antagonists to crew population. Doesn't +## affect all gamemodes. +#TRAITOR_SCALING + +## Uncomment to prohibit jobs that start with loyalty +## implants from being most antagonists. +#PROTECT_ROLES_FROM_ANTAGONIST + + +### RANDOM EVENTS ### + +## Comment this to disable random events during the round. +ALLOW_RANDOM_EVENTS + + +### AI ### + +## Allow the AI job to be picked. +ALLOW_AI + + + +### AWAY MISSIONS ### + +## How long the delay is before the Away Mission gate opens. Default is half an hour. +## 600 is one minute. +GATEWAY_DELAY 18000 + + +### ACCESS ### +## Comment this out if you wish to use the setup where jobs have more access. +## This is intended for servers with low populations - where there are not enough +## players to fill all roles, so players need to do more than just one job. +## Also for servers where they don't want people to hide in their own departments. +JOBS_HAVE_MINIMAL_ACCESS + +## Uncomment to give assistants maint access. +#ASSISTANT_MAINT + + +### GHOST INTERACTION ### +## Uncomment to let ghosts spin chairs. You may be wondering why this is a config option. Don't ask. +#GHOST_INTERACTION \ No newline at end of file diff --git a/config/motd help.txt b/config/motd help.txt deleted file mode 100644 index b04ea27c83d..00000000000 --- a/config/motd help.txt +++ /dev/null @@ -1 +0,0 @@ -Most valid html will work in motd.txt (excluding imgs) \ No newline at end of file diff --git a/config/motd.txt b/config/motd.txt index be1ee7981dc..9a761713599 100644 --- a/config/motd.txt +++ b/config/motd.txt @@ -1,3 +1,5 @@ + +

Welcome to Space Station 13!

-This server is running a /tg/station13 SVN build. +This server is running a /tg/station 13 SVN build. diff --git a/tgstation.dme b/tgstation.dme index cf351ee3ad6..2b4562369e6 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -73,6 +73,7 @@ #include "code\datums\datacore.dm" #include "code\datums\datumvars.dm" #include "code\datums\disease.dm" +#include "code\datums\hud.dm" #include "code\datums\limbs.dm" #include "code\datums\mind.dm" #include "code\datums\mixed.dm" @@ -176,7 +177,6 @@ #include "code\game\atoms_movable.dm" #include "code\game\communications.dm" #include "code\game\dna.dm" -#include "code\game\hud.dm" #include "code\game\shuttle_engines.dm" #include "code\game\skincmd.dm" #include "code\game\smoothwall.dm" @@ -611,6 +611,7 @@ #include "code\modules\admin\admin_memo.dm" #include "code\modules\admin\admin_ranks.dm" #include "code\modules\admin\admin_verbs.dm" +#include "code\modules\admin\banappearance.dm" #include "code\modules\admin\banjob.dm" #include "code\modules\admin\create_mob.dm" #include "code\modules\admin\create_object.dm"
AUTHORTITLECATEGORY