diff --git a/SQL/paradise_schema.sql b/SQL/paradise_schema.sql index ed4fb787b8d..1e4692b7e3b 100644 --- a/SQL/paradise_schema.sql +++ b/SQL/paradise_schema.sql @@ -269,6 +269,7 @@ CREATE TABLE `player` ( `fuid` bigint(20) NULL DEFAULT NULL, `fupdate` smallint(4) NULL DEFAULT '0', `afk_watch` tinyint(1) NOT NULL DEFAULT '0', + `parallax` tinyint(1) DEFAULT '8', PRIMARY KEY (`id`), UNIQUE KEY `ckey` (`ckey`) ) ENGINE=InnoDB AUTO_INCREMENT=32446 DEFAULT CHARSET=latin1; diff --git a/SQL/paradise_schema_prefixed.sql b/SQL/paradise_schema_prefixed.sql index b0f7bbc5c82..aa5d5895e56 100644 --- a/SQL/paradise_schema_prefixed.sql +++ b/SQL/paradise_schema_prefixed.sql @@ -268,6 +268,7 @@ CREATE TABLE `SS13_player` ( `fuid` bigint(20) NULL DEFAULT NULL, `fupdate` smallint(4) NULL DEFAULT '0', `afk_watch` tinyint(1) NOT NULL DEFAULT '0', + `parallax` tinyint(1) DEFAULT '8', PRIMARY KEY (`id`), UNIQUE KEY `ckey` (`ckey`) ) ENGINE=InnoDB AUTO_INCREMENT=32446 DEFAULT CHARSET=latin1; diff --git a/SQL/updates/8-9.sql b/SQL/updates/8-9.sql new file mode 100644 index 00000000000..d7f0fd19ab3 --- /dev/null +++ b/SQL/updates/8-9.sql @@ -0,0 +1,4 @@ +#Updating the SQL from version 8 to version 9. -affectedarc07 +#Adding new column to contain the parallax value. +ALTER TABLE `player` + ADD `parallax` tinyint(1) DEFAULT '8' AFTER `fupdate`; diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 273159fe948..f37b20296e3 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -320,7 +320,7 @@ #define INVESTIGATE_BOMB "bombs" // The SQL version required by this version of the code -#define SQL_VERSION 8 +#define SQL_VERSION 9 // Vending machine stuff #define CAT_NORMAL 1 diff --git a/code/modules/client/preference/preferences_mysql.dm b/code/modules/client/preference/preferences_mysql.dm index cdbfe2afb2f..6090538f2b3 100644 --- a/code/modules/client/preference/preferences_mysql.dm +++ b/code/modules/client/preference/preferences_mysql.dm @@ -20,7 +20,8 @@ clientfps, atklog, fuid, - afk_watch + afk_watch, + parallax FROM [format_table_name("player")] WHERE ckey='[C.ckey]'"} ) @@ -54,6 +55,7 @@ atklog = text2num(query.item[18]) fuid = text2num(query.item[19]) afk_watch = text2num(query.item[20]) + parallax = text2num(query.item[21]) //Sanitize ooccolor = sanitize_hexcolor(ooccolor, initial(ooccolor)) @@ -75,6 +77,7 @@ atklog = sanitize_integer(atklog, 0, 100, initial(atklog)) fuid = sanitize_integer(fuid, 0, 10000000, initial(fuid)) afk_watch = sanitize_integer(afk_watch, 0, 1, initial(afk_watch)) + parallax = sanitize_integer(parallax, 0, 16, initial(parallax)) return 1 /datum/preferences/proc/save_preferences(client/C) @@ -105,7 +108,8 @@ ghost_anonsay='[ghost_anonsay]', clientfps='[clientfps]', atklog='[atklog]', - afk_watch='[afk_watch]' + afk_watch='[afk_watch]', + parallax='[parallax]' WHERE ckey='[C.ckey]'"} ) diff --git a/config/example/dbconfig.txt b/config/example/dbconfig.txt index 2404119d52f..ad859d92543 100644 --- a/config/example/dbconfig.txt +++ b/config/example/dbconfig.txt @@ -9,7 +9,7 @@ ## This value must be set to the version of the paradise schema in use. ## If this value does not match, the SQL database will not be loaded and an error will be generated. ## Roundstart will be delayed. -DB_VERSION 8 +DB_VERSION 9 ## Server the MySQL database can be found at. # Examples: localhost, 200.135.5.43, www.mysqldb.com, etc.