Skip to content

Commit

Permalink
Merge branch 'master' into update-tools
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLordME committed Apr 8, 2024
2 parents 721725c + 39bc14b commit ba99d1f
Show file tree
Hide file tree
Showing 459 changed files with 59,662 additions and 5,595 deletions.
14 changes: 2 additions & 12 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,5 @@
#To make use of this file by default, run 'git config blame.ignoreRevsFile .git-blame-ignore-revs'
#in the project folder

## Line ending conversions

# Force LF line endings with gitattributes and convert repo
62676e72a85cd23e7a87d94adff96d17859dbdc5
# Line ending apocalypse
134a76cc8f5517bdc1bba5a8cbe01dc820df1c2a
# Initial pass to convert LF to CRLF
8af8a43d6f27e342e79d4aacb22b7668cbdc8559
# Many changes
931da9e7ef8c0f52a768eed7998e7e62ccdefcdc
# Remove hideous inline tab indentation, and bans it in contributing guidelines
0f435d5dff0a7957e8cba60a41a7fc10439064c3
## Naming changes
23b3274778693cdbca768cd0251e306cea090d12
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,32 @@ On **May 9, 2022** we have changed the way to compile the codebase.

[Guides for Contributors](.github/CONTRIBUTING.md)

[CitadelRP HACKMD account](https://hackmd.io/@CitadelStation13RP)
[CitadelRP HackMD - Design Documents & Planning](https://hackmd.io/@CitadelStation13RP)

## SQL Setup

The SQL backend for the library and stats tracking requires a MySQL server.
The SQL backend for the library and stats tracking requires a MariaDB server.
Your server details go in /config/legacy/dbconfig.txt, and the SQL schema is in /SQL/tgstation_schema.sql.
More detailed setup instructions arecoming soon, for now ask in our Discord.

todo: update this section

## Static Files

The following folders are considered 'static folders' and should be added to TGS4's static files:

These are also the folders you are likely going to encounter while managing the server.

- /config: server configuration
- /legacy: legacy configuration data go in here
- /data: server persistent data
- /logs: logs are dumped in here
- /players: player data, like saves and characters get dumped in here

You only need to make the top level folders (e.g. config, data) static folders in TGS4.

Subfolders are automatically included.

## LICENSE

The code for Citadel-Station-13-RP is licensed under the [GNU AGPL v3](http://www.gnu.org/licenses/agpl-3.0.html).
Expand Down
22 changes: 21 additions & 1 deletion SQL/database_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ CREATE TABLE IF NOT EXISTS `%_PREFIX_%photographs` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- players --
-- Players --

-- Player lookup table --
-- Used to look up player ID from ckey, as well as --
Expand All @@ -153,6 +153,7 @@ CREATE TABLE IF NOT EXISTS `%_PREFIX_%player` (
`flags` int(24) NOT NULL DEFAULT 0,
`firstseen` datetime NOT NULL DEFAULT Now(),
`lastseen` datetime NOT NULL,
`misc` MEDIUMTEXT NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

Expand Down Expand Up @@ -194,6 +195,25 @@ END
$$
DELIMITER ;


-- Preferences --

-- Stores game preferences --
CREATE TABLE IF NOT EXISTS `%_PREFIX_%game_preferences` (
`player` INT(11) NOT NULL,
`entries` MEDIUMTEXT NOT NULL,
`misc` MEDIUMTEXT NOT NULL,
`keybinds` MEDIUMTEXT NOT NULL,
`toggles` MEDIUMTEXT NOT NULL,
`modified` DATETIME NOT NULL,
`version` INT(11) NOT NULL,
PRIMARY KEY (`player`),
CONSTRAINT `linked_player` FOREIGN KEY (`player`)
REFERENCES `%_PREFIX_%player` (`id`)
ON DELETE CASCADE
ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- Security - Ipintel --

-- Ipintel Cache Table --
Expand Down
22 changes: 21 additions & 1 deletion SQL/database_schema_prefixed.sql
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ CREATE TABLE IF NOT EXISTS `rp_photographs` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- players --
-- Players --

-- Player lookup table --
-- Used to look up player ID from ckey, as well as --
Expand All @@ -153,6 +153,7 @@ CREATE TABLE IF NOT EXISTS `rp_player` (
`flags` int(24) NOT NULL DEFAULT 0,
`firstseen` datetime NOT NULL DEFAULT Now(),
`lastseen` datetime NOT NULL,
`misc` MEDIUMTEXT NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

Expand Down Expand Up @@ -194,6 +195,25 @@ END
$$
DELIMITER ;


-- Preferences --

-- Stores game preferences --
CREATE TABLE IF NOT EXISTS `rp_game_preferences` (
`player` INT(11) NOT NULL,
`entries` MEDIUMTEXT NOT NULL,
`misc` MEDIUMTEXT NOT NULL,
`keybinds` MEDIUMTEXT NOT NULL,
`toggles` MEDIUMTEXT NOT NULL,
`modified` DATETIME NOT NULL,
`version` INT(11) NOT NULL,
PRIMARY KEY (`player`),
CONSTRAINT `linked_player` FOREIGN KEY (`player`)
REFERENCES `rp_player` (`id`)
ON DELETE CASCADE
ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- Security - Ipintel --

-- Ipintel Cache Table --
Expand Down
35 changes: 26 additions & 9 deletions citadel.dme
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
#include "code\__DEFINES\shuttle.dm"
#include "code\__DEFINES\shuttles.dm"
#include "code\__DEFINES\singletons.dm"
#include "code\__DEFINES\skin.dm"
#include "code\__DEFINES\sonar.dm"
#include "code\__DEFINES\space.dm"
#include "code\__DEFINES\spaceman_dmm.dm"
Expand Down Expand Up @@ -131,6 +130,7 @@
#include "code\__DEFINES\atmospherics\machinery\scrubber.dm"
#include "code\__DEFINES\atmospherics\machinery\vent.dm"
#include "code\__DEFINES\cargo\supply.dm"
#include "code\__DEFINES\client\game_preferences.dm"
#include "code\__DEFINES\client\player_flags.dm"
#include "code\__DEFINES\client\playtime.dm"
#include "code\__DEFINES\color\color.dm"
Expand Down Expand Up @@ -200,6 +200,8 @@
#include "code\__DEFINES\fishing\aquarium.dm"
#include "code\__DEFINES\fishing\fish.dm"
#include "code\__DEFINES\fishing\fishing.dm"
#include "code\__DEFINES\interface\skin.dm"
#include "code\__DEFINES\interface\verbs.dm"
#include "code\__DEFINES\inventory\accessories.dm"
#include "code\__DEFINES\inventory\bodytypes.dm"
#include "code\__DEFINES\inventory\carry_weight.dm"
Expand Down Expand Up @@ -532,6 +534,7 @@
#include "code\controllers\subsystem\planets.dm"
#include "code\controllers\subsystem\plants.dm"
#include "code\controllers\subsystem\playtime.dm"
#include "code\controllers\subsystem\preferences.dm"
#include "code\controllers\subsystem\radiation.dm"
#include "code\controllers\subsystem\repository.dm"
#include "code\controllers\subsystem\research.dm"
Expand Down Expand Up @@ -1246,7 +1249,6 @@
#include "code\game\machinery\transportpod.dm"
#include "code\game\machinery\turnstile.dm"
#include "code\game\machinery\turret_control.dm"
#include "code\game\machinery\vending.dm"
#include "code\game\machinery\vitals_monitor.dm"
#include "code\game\machinery\wall_frames.dm"
#include "code\game\machinery\washing_machine.dm"
Expand Down Expand Up @@ -1350,6 +1352,17 @@
#include "code\game\machinery\teleporter\console.dm"
#include "code\game\machinery\teleporter\pad.dm"
#include "code\game\machinery\teleporter\projector.dm"
#include "code\game\machinery\vending\drinks.dm"
#include "code\game\machinery\vending\engineering.dm"
#include "code\game\machinery\vending\loadout.dm"
#include "code\game\machinery\vending\medical.dm"
#include "code\game\machinery\vending\misc.dm"
#include "code\game\machinery\vending\plants.dm"
#include "code\game\machinery\vending\research.dm"
#include "code\game\machinery\vending\security.dm"
#include "code\game\machinery\vending\service.dm"
#include "code\game\machinery\vending\snacks.dm"
#include "code\game\machinery\vending\vending.dm"
#include "code\game\machinery\virtual_reality\ar_console.dm"
#include "code\game\machinery\virtual_reality\vr_console.dm"
#include "code\game\machinery\vitruvius\anti_heater.dm"
Expand Down Expand Up @@ -2389,15 +2402,21 @@
#include "code\modules\client\wrappers.dm"
#include "code\modules\client\data\client_data.dm"
#include "code\modules\client\data\player_data.dm"
#include "code\modules\client\game_preferences\game_preference_entry.dm"
#include "code\modules\client\game_preferences\game_preference_middleware.dm"
#include "code\modules\client\game_preferences\game_preference_toggle.dm"
#include "code\modules\client\game_preferences\game_preferences.dm"
#include "code\modules\client\game_preferences\entries\game.dm"
#include "code\modules\client\game_preferences\entries\graphics.dm"
#include "code\modules\client\game_preferences\middleware\keybindings.dm"
#include "code\modules\client\game_preferences\middleware\toggles.dm"
#include "code\modules\client\onboarding\_onboarding.dm"
#include "code\modules\client\onboarding\age_verification.dm"
#include "code\modules\client\onboarding\panic_bunker.dm"
#include "code\modules\client\onboarding\security_checks.dm"
#include "code\modules\client\verbs\minimap.dm"
#include "code\modules\client\verbs\ooc.dm"
#include "code\modules\client\verbs\panic_bunker_player.dm"
#include "code\modules\client\verbs\ping.dm"
#include "code\modules\client\verbs\preferences.dm"
#include "code\modules\client\verbs\system.dm"
#include "code\modules\client\verbs\view.dm"
#include "code\modules\clothing\chameleon.dm"
#include "code\modules\clothing\clothing.dm"
Expand Down Expand Up @@ -3171,6 +3190,7 @@
#include "code\modules\maps\misc_maps\lavaland\_lavaland.dm"
#include "code\modules\maps\overmap\planets\_lythios43c.dm"
#include "code\modules\maps\overmap\planets\_virgo3b.dm"
#include "code\modules\maps\overmap\planets\admin_croatoan.dm"
#include "code\modules\maps\overmap\planets\classd.dm"
#include "code\modules\maps\overmap\planets\classg.dm"
#include "code\modules\maps\overmap\planets\classh.dm"
Expand Down Expand Up @@ -3593,6 +3613,7 @@
#include "code\modules\mob\living\silicon\pai\death.dm"
#include "code\modules\mob\living\silicon\pai\defense.dm"
#include "code\modules\mob\living\silicon\pai\examine.dm"
#include "code\modules\mob\living\silicon\pai\hologram_effect.dm"
#include "code\modules\mob\living\silicon\pai\life.dm"
#include "code\modules\mob\living\silicon\pai\mobility.dm"
#include "code\modules\mob\living\silicon\pai\pai.dm"
Expand Down Expand Up @@ -4219,16 +4240,12 @@
#include "code\modules\preferences\preference_setup\general\04_equipment.dm"
#include "code\modules\preferences\preference_setup\general\05_background.dm"
#include "code\modules\preferences\preference_setup\general\06_flavor.dm"
#include "code\modules\preferences\preference_setup\global\01_ui.dm"
#include "code\modules\preferences\preference_setup\global\02_settings.dm"
#include "code\modules\preferences\preference_setup\global\03_pai.dm"
#include "code\modules\preferences\preference_setup\global\04_ooc.dm"
#include "code\modules\preferences\preference_setup\global\05_media.dm"
#include "code\modules\preferences\preference_setup\global\language_prefix.dm"
#include "code\modules\preferences\preference_setup\global\setting_datums.dm"
#include "code\modules\preferences\preference_setup\helpers\language_pick.dm"
#include "code\modules\preferences\preference_setup\helpers\species_pick.dm"
#include "code\modules\preferences\preference_setup\keybindings\keybindings.dm"
#include "code\modules\preferences\preference_setup\loadout\loadout.dm"
#include "code\modules\preferences\preference_setup\occupation\occupation.dm"
#include "code\modules\preferences\preference_setup\vore\01_ears.dm"
Expand Down
32 changes: 32 additions & 0 deletions code/__DEFINES/client/game_preferences.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
//* This file is explicitly licensed under the MIT license. *//
//* Copyright (c) 2023 Citadel Station developers. *//

//* Versioning *//

// Migration Directives:
// * prefer append-update instead of change-remove.
// append-update means write new, changed data instead of overwrite old data
// this means that reverting a testmerge doesn't cause problems.

// todo: how to do migration in a downstream-friendly way? current
// would require downstreams to manually edit code.
// this is bad!

// current version; bump to trigger migrations
#define GAME_PREFERENCES_VERSION_CURRENT 1
// prefs start at this version when legacy
#define GAME_PREFERENCES_VERSION_LEGACY 1
// at or below this, we throw out all data
#define GAME_PREFERENCES_VERSION_DROP 0

//* Misc Keys *//

/// boolean value for if we're in hotkeys mode
#define GAME_PREFERENCE_MISC_KEY_HOTKEY_MODE "hotkey-mode"

//* Category Names

// these are the same due to low entry count

#define GAME_PREFERENCE_CATEGORY_GAME "Game"
#define GAME_PREFERENCE_CATEGORY_GRAPHICS "Game"
1 change: 1 addition & 0 deletions code/__DEFINES/controllers/_subsystems.dm
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ DEFINE_BITFIELD(runlevels, list(
#define INIT_ORDER_EARLY_INIT 185
#define INIT_ORDER_REPOSITORY 180
#define INIT_ORDER_STATPANELS 170
#define INIT_ORDER_PREFERENCES 165
#define INIT_ORDER_INPUT 160
#define INIT_ORDER_JOBS 150
#define INIT_ORDER_CHARACTERS 140
Expand Down
7 changes: 7 additions & 0 deletions code/__DEFINES/skin.dm → code/__DEFINES/interface/skin.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//* This file is explicitly licensed under the MIT license. *//
//* Copyright (c) 2023 Citadel Station developers. *//

//? WINCLONE IDs; NO SKIN CONTROL MAY HAVE THESE IDs, OR WINCLONE WILL NOT CREATE "NAKED" CONTROLS OF THIS TYPE!
#define SKIN_ID_ABSTRACT_MENU "menu"
#define SKIN_ID_ABSTRACT_WINDOW "window"
Expand All @@ -17,6 +20,10 @@
/// main window split
#define SKIN_SPLITTER_ID_MAIN "mainwindow.split"

//* Chat System
#define SKIN_OUTPUT_ID_LEGACY_CHAT "output"
#define SKIN_BROWSER_ID_CHAT "outputbrowser"

//* Cutscene System
#define SKIN_BROWSER_ID_CUTSCENE "cutscenebrowser"

Expand Down
9 changes: 9 additions & 0 deletions code/__DEFINES/interface/verbs.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//* This file is explicitly licensed under the MIT license. *//
//* Copyright (c) 2023 Citadel Station developers. *//

#define VERB_CATEGORY_IC "IC"
#define VERB_CATEGORY_OOC "OOC"
#define VERB_CATEGORY_OBJECT "Object"
#define VERB_CATEGORY_SYSTEM "System"

// todo: admin verb categories too
14 changes: 7 additions & 7 deletions code/__HELPERS/_logging.dm
Original file line number Diff line number Diff line change
Expand Up @@ -424,13 +424,13 @@ GLOBAL_LIST_INIT(testing_global_profiler, list("_PROFILE_NAME" = "Global"))
if (config_legacy.log_debug)
WRITE_LOG(GLOB.world_runtime_log, "DEBUG: [text]")

for(var/client/C in GLOB.admins)
if(C.is_preference_enabled(/datum/client_preference/debug/show_debug_logs))
to_chat(C,
type = MESSAGE_TYPE_DEBUG,
html = "DEBUG: [text]",
confidential = TRUE,
)
// for(var/client/C in GLOB.admins)
// if(C.get_preference_toggle(/datum/client_preference/debug/show_debug_logs))
// to_chat(C,
// type = MESSAGE_TYPE_DEBUG,
// html = "DEBUG: [text]",
// confidential = TRUE,
// )

/proc/log_ghostsay(text, mob/speaker)
if (config_legacy.log_say)
Expand Down
6 changes: 3 additions & 3 deletions code/__HELPERS/game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@
var/turf/ear = get_turf(M)
if(ear)
// Ghostship is magic: Ghosts can hear radio chatter from anywhere
if(speaker_coverage[ear] || (istype(M, /mob/observer/dead) && M.is_preference_enabled(/datum/client_preference/ghost_radio)))
if(speaker_coverage[ear] || (istype(M, /mob/observer/dead) && M.get_preference_toggle(/datum/game_preference_toggle/observer/ghost_radio)))
. |= M // Since we're already looping through mobs, why bother using |= ? This only slows things down.
return .

Expand Down Expand Up @@ -308,11 +308,11 @@
switch(type)
// Audio messages use ghost_ears.
if(1)
if(M.is_preference_enabled(/datum/client_preference/ghost_ears))
if(M.get_preference_toggle(/datum/game_preference_toggle/observer/ghost_ears))
mobs |= M
// Visual messages use ghost_sight.
if(2)
if(M.is_preference_enabled(/datum/client_preference/ghost_sight))
if(M.get_preference_toggle(/datum/game_preference_toggle/observer/ghost_sight))
mobs |= M

// For objects below the top level who still want to hear.
Expand Down
Loading

0 comments on commit ba99d1f

Please sign in to comment.