mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Adds tracking amount of time spent playing departments 2: The fall of the Assistants. (#29105)
* Ports Paradise Job exp system * changed to use json_decode and json_encode as recommended by oranges * updates changelog * Reee cyberboss * Changes to use a seperate table * Updates database changelog Changes to use mediumint * Back to wip we go. Changes sql stuff to how mso suggested Attempts the changes requested in the other pr. * work on stuff. * work on stuff. * Renamed proc for time remaining. Fixed updating time amounts. Added delay to fix firing at roundstart * exp is now stored in a global list, and only updated to the db at round end. * some stuff * Added button to toggle exempt status on a player. Still need to make it update the db * REEE Jordie. Undoes delaying exp updating to round end. Adds the updating filtering to the update_exp_client proc which is used again * Lowers a bunch of the times needed. * Makes tracking per job instead of per department. Department time is now calculated from job time. * Whoops forgot to update master first. Lemme save this Reverb should play cheeki breeki to people * I think I did this right. Too tired to test atm. Busy rewatching twintails ni narimasu * Removes var from proc arguments Fixes database stuff * Does some requested changes. Makes special_role be tracked instead of bundled under special. * Done, but need to refactor how it handles ghost roles. * Less false data wew * Changes * Updates db version More changes * More changes * More changes * revision fix * OOPS * fix schemas * Makes SQL error logging handled by Execute Gang role tracking now strips out the gang name and is generic.
This commit is contained in:
@@ -1,3 +1,18 @@
|
||||
|
||||
20th July 2017, by Shadowlight213
|
||||
Added role_time table to track time spent playing departments.
|
||||
Also, added flags column to the player table.
|
||||
|
||||
CREATE TABLE `role_time` ( `ckey` VARCHAR(32) NOT NULL , `job` VARCHAR(128) NOT NULL , `minutes` INT UNSIGNED NOT NULL, PRIMARY KEY (`ckey`, `job`) ) ENGINE = InnoDB;
|
||||
|
||||
ALTER TABLE `player` ADD `flags` INT NOT NULL default '0' AFTER `accountjoindate`;
|
||||
|
||||
UPDATE `schema_revision` SET minor = 1;
|
||||
|
||||
Remember to add a prefix to the table name if you use them.
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Any time you make a change to the schema files, remember to increment the database schema version. Generally increment the minor number, major should be reserved for significant changes to the schema. Both values go up to 255.
|
||||
|
||||
The latest database version is 3.0; The query to update the schema revision table is:
|
||||
@@ -7,7 +22,6 @@ or
|
||||
INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (3, 0);
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
28 June 2017, by oranges
|
||||
Added schema_revision to store the current db revision, why start at 3.0?
|
||||
|
||||
@@ -112,7 +126,6 @@ ALTER TABLE `player` DROP COLUMN `id`, ADD COLUMN `accountjoindate` DATE NULL AF
|
||||
Remember to add a prefix to the table name if you use them.
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
10 March 2017, by Jordie0608
|
||||
|
||||
Modified table 'death', adding the columns 'toxloss', 'cloneloss', and 'staminaloss' and table 'legacy_population', adding the columns 'server_ip' and 'server_port'.
|
||||
|
||||
@@ -253,6 +253,21 @@ CREATE TABLE `messages` (
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `role_time`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `role_time`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
|
||||
CREATE TABLE `role_time`
|
||||
( `ckey` VARCHAR(32) NOT NULL ,
|
||||
`job` VARCHAR(32) NOT NULL ,
|
||||
`minutes` INT UNSIGNED NOT NULL,
|
||||
PRIMARY KEY (`ckey`, `job`)
|
||||
) ENGINE = InnoDB;
|
||||
|
||||
--
|
||||
-- Table structure for table `player`
|
||||
--
|
||||
@@ -268,6 +283,7 @@ CREATE TABLE `player` (
|
||||
`computerid` varchar(32) NOT NULL,
|
||||
`lastadminrank` varchar(32) NOT NULL DEFAULT 'Player',
|
||||
`accountjoindate` DATE DEFAULT NULL,
|
||||
`flags` smallint(5) unsigned DEFAULT '0' NOT NULL,
|
||||
PRIMARY KEY (`ckey`),
|
||||
KEY `idx_player_cid_ckey` (`computerid`,`ckey`),
|
||||
KEY `idx_player_ip_ckey` (`ip`,`ckey`)
|
||||
|
||||
@@ -253,6 +253,21 @@ CREATE TABLE `SS13_messages` (
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `SS13_role_time`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `SS13_role_time`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
|
||||
CREATE TABLE `SS13_role_time`
|
||||
( `ckey` VARCHAR(32) NOT NULL ,
|
||||
`job` VARCHAR(32) NOT NULL ,
|
||||
`minutes` INT UNSIGNED NOT NULL,
|
||||
PRIMARY KEY (`ckey`, `job`)
|
||||
) ENGINE = InnoDB;
|
||||
|
||||
--
|
||||
-- Table structure for table `SS13_player`
|
||||
--
|
||||
@@ -268,6 +283,7 @@ CREATE TABLE `SS13_player` (
|
||||
`computerid` varchar(32) NOT NULL,
|
||||
`lastadminrank` varchar(32) NOT NULL DEFAULT 'Player',
|
||||
`accountjoindate` DATE DEFAULT NULL,
|
||||
`flags` smallint(5) unsigned DEFAULT '0' NOT NULL,
|
||||
PRIMARY KEY (`ckey`),
|
||||
KEY `idx_player_cid_ckey` (`computerid`,`ckey`),
|
||||
KEY `idx_player_ip_ckey` (`ip`,`ckey`)
|
||||
|
||||
Reference in New Issue
Block a user