Add back parallax SQL changes

This commit is contained in:
AffectedArc07
2019-08-14 17:53:15 -07:00
committed by Tayyyyyyy
parent 7b8e0ca905
commit bdc4bba6ac
6 changed files with 14 additions and 4 deletions
+1
View File
@@ -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;
+1
View File
@@ -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;
+4
View File
@@ -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`;
+1 -1
View File
@@ -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
@@ -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]'"}
)
+1 -1
View File
@@ -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.