Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…l-Station-13-RP into great_perspective
  • Loading branch information
Mazianni committed Jun 27, 2023
2 parents 7b486f7 + 06f0f45 commit ce4a4f1
Show file tree
Hide file tree
Showing 236 changed files with 7,810 additions and 14,308 deletions.
31 changes: 0 additions & 31 deletions .github/workflows/ci_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,34 +131,3 @@ jobs:
bash tools/ci/run_server.sh
env:
CBT_BUILD_MODE: TEST_RUN

test_windows:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
name: Windows Build
runs-on: windows-latest
concurrency:
group: test_windows-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
- name: Restore Yarn cache
uses: actions/cache@v3
with:
path: tgui/.yarn/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('tgui/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-
${{ runner.os }}-
- name: Compile
run: pwsh tools/ci/build.ps1
env:
DM_EXE: "C:\\byond\\bin\\dm.exe"
- name: Create artifact
run: |
md deploy
bash tools/deploy.sh ./deploy
- name: Deploy artifact
uses: actions/upload-artifact@v3
with:
name: deploy
path: deploy
50 changes: 50 additions & 0 deletions SQL/database_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,56 @@ CREATE TABLE IF NOT EXISTS `%_PREFIX_%player` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- Playtime / JEXP --

-- Role Time Table - Master --
-- Stores total role time. --

CREATE TABLE IF NOT EXISTS `%_PREFIX_%playtime` (
`player` INT(11) NOT NULL,
`roleid` VARCHAR(64) NOT NULL,
`minutes` INT UNSIGNED NOT NULL,
PRIMARY KEY(`player`, `roleid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- Role Time - Logging --
-- Stores changes in role time --
CREATE TABLE IF NOT EXISTS `%_PREFIX_%playtime_log` (
`player` INT(11),
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
`roleid` VARCHAR(64) NOT NULL,
`delta` INT(11) NOT NULL,
`datetime` TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE NOW(),
PRIMARY KEY (`id`),
KEY `player` (`player`),
KEY `roleid` (`roleid`),
KEY `datetime` (`datetime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

DELIMITER $$
CREATE TRIGGER `playtimeTlogupdate` AFTER UPDATE ON `%_PREFIX_%playtime` FOR EACH ROW BEGIN INSERT into `%_PREFIX_%playtime_log` (player, roleid, delta) VALUES (NEW.player, NEW.roleid, NEW.minutes-OLD.minutes);
END
$$
CREATE TRIGGER `playtimeTloginsert` AFTER INSERT ON `%_PREFIX_%playtime` FOR EACH ROW BEGIN INSERT into `%_PREFIX_%playtime_log` (player, roleid, delta) VALUES (NEW.player, NEW.roleid, NEW.minutes);
END
$$
CREATE TRIGGER `playtimeTlogdelete` AFTER DELETE ON `%_PREFIX_%playtime` FOR EACH ROW BEGIN INSERT into `%_PREFIX_%playtime_log` (player, roleid, delta) VALUES (OLD.player, OLD.roleid, 0-OLD.minutes);
END
$$
DELIMITER ;

-- Security - Ipintel --

-- Ipintel Cache Table --
-- Stores cache entries for IPIntel --
-- IP is in INET_ATON. --
CREATE TABLE IF NOT EXISTS `%_PREFIX_%ipintel` (
`ip` INT(10) unsigned NOT NULL,
`date` TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE NOW(),
`intel` double NOT NULL DEFAULT '0',
PRIMARY KEY (`ip`),
KEY `idx_ipintel` (`ip`, `intel`, `date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Table structure for table `round`
Expand Down
52 changes: 51 additions & 1 deletion SQL/database_schema_prefixed.sql
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ CREATE TABLE IF NOT EXISTS `rp_pictures` (
-- picture is picture hash in picture table --
CREATE TABLE IF NOT EXISTS `rp_photographs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`picture` char(40) NULL,
`picture` char(40) NOT NULL,
`created` datetime NOT NULL DEFAULT Now(),
`scene` MEDIUMTEXT null,
`desc` MEDIUMTEXT null,
Expand Down Expand Up @@ -77,6 +77,56 @@ CREATE TABLE IF NOT EXISTS `rp_player` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- Playtime / JEXP --

-- Role Time Table - Master --
-- Stores total role time. --

CREATE TABLE IF NOT EXISTS `rp_playtime` (
`player` INT(11) NOT NULL,
`roleid` VARCHAR(64) NOT NULL,
`minutes` INT UNSIGNED NOT NULL,
PRIMARY KEY(`player`, `roleid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- Role Time - Logging --
-- Stores changes in role time --
CREATE TABLE IF NOT EXISTS `rp_playtime_log` (
`player` INT(11),
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
`roleid` VARCHAR(64) NOT NULL,
`delta` INT(11) NOT NULL,
`datetime` TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE NOW(),
PRIMARY KEY (`id`),
KEY `player` (`player`),
KEY `roleid` (`roleid`),
KEY `datetime` (`datetime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

DELIMITER $$
CREATE TRIGGER `playtimeTlogupdate` AFTER UPDATE ON `rp_playtime` FOR EACH ROW BEGIN INSERT into `rp_playtime_log` (player, roleid, delta) VALUES (NEW.player, NEW.roleid, NEW.minutes-OLD.minutes);
END
$$
CREATE TRIGGER `playtimeTloginsert` AFTER INSERT ON `rp_playtime` FOR EACH ROW BEGIN INSERT into `rp_playtime_log` (player, roleid, delta) VALUES (NEW.player, NEW.roleid, NEW.minutes);
END
$$
CREATE TRIGGER `playtimeTlogdelete` AFTER DELETE ON `rp_playtime` FOR EACH ROW BEGIN INSERT into `rp_playtime_log` (player, roleid, delta) VALUES (OLD.player, OLD.roleid, 0-OLD.minutes);
END
$$
DELIMITER ;

-- Security - Ipintel --

-- Ipintel Cache Table --
-- Stores cache entries for IPIntel --
-- IP is in INET_ATON. --
CREATE TABLE IF NOT EXISTS `rp_ipintel` (
`ip` INT(10) unsigned NOT NULL,
`date` TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE NOW(),
`intel` double NOT NULL DEFAULT '0',
PRIMARY KEY (`ip`),
KEY `idx_ipintel` (`ip`, `intel`, `date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Table structure for table `round`
Expand Down
39 changes: 22 additions & 17 deletions citadel.dme
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
#include "code\__DEFINES\atmospherics\pipes.dm"
#include "code\__DEFINES\cargo\supply.dm"
#include "code\__DEFINES\client\player_flags.dm"
#include "code\__DEFINES\client\playtime.dm"
#include "code\__DEFINES\color\color.dm"
#include "code\__DEFINES\color\colour_priority.dm"
#include "code\__DEFINES\color\lights.dm"
Expand Down Expand Up @@ -339,6 +340,7 @@
#include "code\__HELPERS\icons\download.dm"
#include "code\__HELPERS\icons\flatten.dm"
#include "code\__HELPERS\icons\hologram.dm"
#include "code\__HELPERS\icons\metadata.dm"
#include "code\__HELPERS\lists\_string_lists.dm"
#include "code\__HELPERS\lists\asset_sorted.dm"
#include "code\__HELPERS\lists\associations.dm"
Expand Down Expand Up @@ -476,18 +478,19 @@
#include "code\controllers\configuration\config_entry.dm"
#include "code\controllers\configuration\configuration.dm"
#include "code\controllers\configuration\whitelists.dm"
#include "code\controllers\configuration\entries\bot.dm"
#include "code\controllers\configuration\entries\comms.dm"
#include "code\controllers\configuration\entries\compile.dm"
#include "code\controllers\configuration\entries\dbconfig.dm"
#include "code\controllers\configuration\entries\fail2topic.dm"
#include "code\controllers\configuration\entries\game_options.dm"
#include "code\controllers\configuration\entries\admin.dm"
#include "code\controllers\configuration\entries\chat_bridge.dm"
#include "code\controllers\configuration\entries\cross_server.dm"
#include "code\controllers\configuration\entries\database.dm"
#include "code\controllers\configuration\entries\game.dm"
#include "code\controllers\configuration\entries\general.dm"
#include "code\controllers\configuration\entries\health.dm"
#include "code\controllers\configuration\entries\lobby.dm"
#include "code\controllers\configuration\entries\logging.dm"
#include "code\controllers\configuration\entries\photography.dm"
#include "code\controllers\configuration\entries\playtime.dm"
#include "code\controllers\configuration\entries\resources.dm"
#include "code\controllers\configuration\entries\security.dm"
#include "code\controllers\configuration\entries\shadowban.dm"
#include "code\controllers\configuration\entries\skills.dm"
#include "code\controllers\configuration\entries\urls.dm"
Expand All @@ -510,6 +513,7 @@
#include "code\controllers\subsystem\dcs.dm"
#include "code\controllers\subsystem\DPC.dm"
#include "code\controllers\subsystem\early_assets.dm"
#include "code\controllers\subsystem\early_init.dm"
#include "code\controllers\subsystem\emergency_shuttle.dm"
#include "code\controllers\subsystem\events.dm"
#include "code\controllers\subsystem\fail2topic.dm"
Expand All @@ -519,6 +523,7 @@
#include "code\controllers\subsystem\icon_smooth.dm"
#include "code\controllers\subsystem\inactivity.dm"
#include "code\controllers\subsystem\input.dm"
#include "code\controllers\subsystem\ipintel.dm"
#include "code\controllers\subsystem\legacy_atc.dm"
#include "code\controllers\subsystem\legacy_lore.dm"
#include "code\controllers\subsystem\lighting.dm"
Expand All @@ -537,6 +542,7 @@
#include "code\controllers\subsystem\ping.dm"
#include "code\controllers\subsystem\planets.dm"
#include "code\controllers\subsystem\plants.dm"
#include "code\controllers\subsystem\playtime.dm"
#include "code\controllers\subsystem\radiation.dm"
#include "code\controllers\subsystem\repository.dm"
#include "code\controllers\subsystem\server_maint.dm"
Expand Down Expand Up @@ -768,14 +774,6 @@
#include "code\datums\holograms\types\species.dm"
#include "code\datums\interfaces\appearance.dm"
#include "code\datums\interfaces\procpath.dm"
#include "code\datums\locations\locations.dm"
#include "code\datums\locations\nyx.dm"
#include "code\datums\locations\qerrvallis.dm"
#include "code\datums\locations\s_randarr.dm"
#include "code\datums\locations\sol.dm"
#include "code\datums\locations\tau_ceti.dm"
#include "code\datums\locations\uueoa_esa.dm"
#include "code\datums\locations\vir.dm"
#include "code\datums\looping_sounds\_looping_sound.dm"
#include "code\datums\looping_sounds\item_sounds.dm"
#include "code\datums\looping_sounds\machinery_sounds.dm"
Expand Down Expand Up @@ -871,12 +869,10 @@
#include "code\game\AStar.dm"
#include "code\game\radio.dm"
#include "code\game\response_team.dm"
#include "code\game\sd_Alert.dm"
#include "code\game\shuttle_engines.dm"
#include "code\game\skincmd.dm"
#include "code\game\sound.dm"
#include "code\game\statistics.dm"
#include "code\game\trader_visit.dm"
#include "code\game\world.dm"
#include "code\game\antagonist\_antagonist_setup.dm"
#include "code\game\antagonist\antagonist.dm"
Expand Down Expand Up @@ -1296,6 +1292,7 @@
#include "code\game\machinery\teleporter\projector.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"
#include "code\game\magic\Uristrunes.dm"
#include "code\game\mecha\mech_bay.dm"
#include "code\game\mecha\mech_fabricator.dm"
Expand Down Expand Up @@ -2219,22 +2216,30 @@
#include "code\modules\catalogue\cataloguer.dm"
#include "code\modules\catalogue\cataloguer_visuals.dm"
#include "code\modules\catalogue\cataloguer_vr.dm"
#include "code\modules\client\client procs_vr.dm"
#include "code\modules\client\client.dm"
#include "code\modules\client\client_data.dm"
#include "code\modules\client\client_procs.dm"
#include "code\modules\client\connection.dm"
#include "code\modules\client\cutscene.dm"
#include "code\modules\client\legacy.dm"
#include "code\modules\client\perspective.dm"
#include "code\modules\client\player_data.dm"
#include "code\modules\client\security.dm"
#include "code\modules\client\spam_prevention.dm"
#include "code\modules\client\statpanel.dm"
#include "code\modules\client\throttling.dm"
#include "code\modules\client\ui_style.dm"
#include "code\modules\client\viewport.dm"
#include "code\modules\client\wrappers.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\view.dm"
#include "code\modules\clothing\chameleon.dm"
#include "code\modules\clothing\clothing.dm"
Expand Down
1 change: 0 additions & 1 deletion code/__DEFINES/admin/bans.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//? roleban types
/// full server ban - currently just a shim to go to legacy isbanned, eventually just will go to server_ban.dm

#define BAN_ROLE_SERVER "server"
/// OOC + LOOC + deadchat ban
#define BAN_ROLE_OOC "ooc"
Expand Down
8 changes: 7 additions & 1 deletion code/__DEFINES/client/player_flags.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
//! player flags
/// exempt from any job timelock system
/// exempt from any job timelock system: this includes the VPN bunker!
#define PLAYER_FLAG_JEXP_EXEMPT (1<<0)
/// age verified
#define PLAYER_FLAG_AGE_VERIFIED (1<<1)
/// connected, recorded, and *not* blocked through panic bunker when operating in connection mode
#define PLAYER_FLAG_CONSIDERED_SEEN (1<<2)

DEFINE_BITFIELD(player_flags, list(
BITFIELD(PLAYER_FLAG_JEXP_EXEMPT),
BITFIELD(PLAYER_FLAG_AGE_VERIFIED),
BITFIELD(PLAYER_FLAG_CONSIDERED_SEEN),
))
11 changes: 11 additions & 0 deletions code/__DEFINES/client/playtime.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/// playtime key for alive
#define PLAYER_PLAYTIME_LIVING "living"
/// playtime key for died/as observer from a dead character
#define PLAYER_PLAYTIME_DEAD "dead"
/// playtime key for observer (but not because they died ofcourse)
#define PLAYER_PLAYTIME_OBSERVER "observer"
/// playtime key for lobby
#define PLAYER_PLAYTIME_LOBBY "lobby"
/// playtime key for role id
#define PLAYER_PLAYTIME_ROLE(id) "role-[id]"

2 changes: 1 addition & 1 deletion code/__DEFINES/color/lights.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
#define LIGHT_COLOR_INCANDESCENT_TUBE "#E0EFF0" // rgb(224, 239, 240) Slightly blueish white.
#define LIGHT_COLOR_INCANDESCENT_BULB "#FFFEB8" // rgb(255, 254, 184) Slightly yellowish white.
#define LIGHT_COLOR_INCANDESCENT_FLASHLIGHT "#FFCC66" // rgb(255, 204, 102) Slightly yellowish white.
#define LIGHT_COLOR_NIGHTSHIFT "#EFCC86" // rgb(239, 204, 134) Slightly yellowish white.
#define LIGHT_COLOR_NIGHTSHIFT "#616191" // rgb(97, 97, 145) Dark blue.
2 changes: 2 additions & 0 deletions code/__DEFINES/controllers/_subsystems.dm
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ DEFINE_BITFIELD(runlevels, list(
// todo: tg init brackets

#define INIT_ORDER_FAIL2TOPIC 200
#define INIT_ORDER_IPINTEL 197
#define INIT_ORDER_TIMER 195
#define INIT_ORDER_DBCORE 190
#define INIT_ORDER_EARLY_INIT 185
#define INIT_ORDER_REPOSITORY 180
#define INIT_ORDER_STATPANELS 170
#define INIT_ORDER_INPUT 160
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/preferences/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@
#define EQUIP_PREVIEW_LOADOUT 1
#define EQUIP_PREVIEW_JOB 2
#define EQUIP_PREVIEW_ALL (EQUIP_PREVIEW_LOADOUT|EQUIP_PREVIEW_JOB)

///The maximum number of markings a character can have
#define MAXIMUM_MARKINGS 30
2 changes: 1 addition & 1 deletion code/__DEFINES/preferences/savefiles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//* We store this on savefile because you can handle global migrations
//* and advanced direct savefile migrations directly with this.
#define SAVEFILE_VERSION_MIN 8
#define SAVEFILE_VERSION_MAX 15
#define SAVEFILE_VERSION_MAX 16

//! Character version - stored in character data list
//* Slot gets wiped if version < MIN
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/rendering/darksight.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define SOFT_DARKSIGHT_RANGE_DEFAULT (WORLD_ICON_SIZE * 2.5)
#define SOFT_DARKSIGHT_RANGE_TIER_1 (WORLD_ICON_SIZE * 3.5)
#define SOFT_DARKSIGHT_RANGE_TIER_2 (WORLD_ICON_SIZE * 5)
#define SOFT_DARKSIGHT_RANGE_TIER_3 (WORLD_ICON_SIZE * 9)
#define SOFT_DARKSIGHT_RANGE_TIER_3 (WORLD_ICON_SIZE * 13)
#define SOFT_DARKSIGHT_RANGE_NVGS INFINITY
#define SOFT_DARKSIGHT_RANGE_SUPER INFINITY

Expand Down
Loading

0 comments on commit ce4a4f1

Please sign in to comment.