Skip to content

Commit

Permalink
Merge branch 'space-wizards:master' into cargo-mail-system
Browse files Browse the repository at this point in the history
  • Loading branch information
ScarKy0 authored Mar 1, 2025
2 parents f2847a6 + e540f9c commit cc41c67
Show file tree
Hide file tree
Showing 9 changed files with 101 additions and 28 deletions.
37 changes: 29 additions & 8 deletions Content.Client/Administration/AdminNameOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ protected override void Draw(in OverlayDrawArgs args)

//TODO make this adjustable via GUI
var classic = _config.GetCVar(CCVars.AdminOverlayClassic);
var playTime = _config.GetCVar(CCVars.AdminOverlayPlaytime);
var startingJob = _config.GetCVar(CCVars.AdminOverlayStartingJob);

foreach (var playerInfo in _system.PlayerList)
{
Expand All @@ -76,25 +78,44 @@ protected override void Draw(in OverlayDrawArgs args)
}

var uiScale = _userInterfaceManager.RootControl.UIScale;
var lineoffset = new Vector2(0f, 11f) * uiScale;
var lineoffset = new Vector2(0f, 14f) * uiScale;
var screenCoordinates = _eyeManager.WorldToScreen(aabb.Center +
new Angle(-_eyeManager.CurrentEye.Rotation).RotateVec(
aabb.TopRight - aabb.Center)) + new Vector2(1f, 7f);

var currentOffset = Vector2.Zero;

args.ScreenHandle.DrawString(_font, screenCoordinates + currentOffset, playerInfo.Username, uiScale, playerInfo.Connected ? Color.Yellow : Color.White);
currentOffset += lineoffset;

args.ScreenHandle.DrawString(_font, screenCoordinates + currentOffset, playerInfo.CharacterName, uiScale, playerInfo.Connected ? Color.Aquamarine : Color.White);
currentOffset += lineoffset;

if (!string.IsNullOrEmpty(playerInfo.PlaytimeString) && playTime)
{
args.ScreenHandle.DrawString(_font, screenCoordinates + currentOffset, playerInfo.PlaytimeString, uiScale, playerInfo.Connected ? Color.Orange : Color.White);
currentOffset += lineoffset;
}

if (!string.IsNullOrEmpty(playerInfo.StartingJob) && startingJob)
{
args.ScreenHandle.DrawString(_font, screenCoordinates + currentOffset, Loc.GetString(playerInfo.StartingJob), uiScale, playerInfo.Connected ? Color.GreenYellow : Color.White);
currentOffset += lineoffset;
}

if (classic && playerInfo.Antag)
{
args.ScreenHandle.DrawString(_font, screenCoordinates + (lineoffset * 2), _antagLabelClassic, uiScale, _antagColorClassic);
args.ScreenHandle.DrawString(_font, screenCoordinates + currentOffset, _antagLabelClassic, uiScale, Color.OrangeRed);
currentOffset += lineoffset;
}
else if (!classic && _filter.Contains(playerInfo.RoleProto))
{
var label = Loc.GetString(playerInfo.RoleProto.Name).ToUpper();
var color = playerInfo.RoleProto.Color;
var label = Loc.GetString(playerInfo.RoleProto.Name).ToUpper();
var color = playerInfo.RoleProto.Color;

args.ScreenHandle.DrawString(_font, screenCoordinates + (lineoffset * 2), label, uiScale, color);
args.ScreenHandle.DrawString(_font, screenCoordinates + currentOffset, label, uiScale, color);
currentOffset += lineoffset;
}

args.ScreenHandle.DrawString(_font, screenCoordinates + lineoffset, playerInfo.Username, uiScale, playerInfo.Connected ? Color.Yellow : Color.White);
args.ScreenHandle.DrawString(_font, screenCoordinates, playerInfo.CharacterName, uiScale, playerInfo.Connected ? Color.Aquamarine : Color.White);
}
}
}
12 changes: 12 additions & 0 deletions Content.Shared/CCVar/CCVars.Interface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,16 @@ public sealed partial class CCVars
/// </summary>
public static readonly CVarDef<bool> AdminOverlayClassic =
CVarDef.Create("ui.admin_overlay_classic", false, CVar.CLIENTONLY | CVar.ARCHIVE);

/// <summary>
/// If true, the admin overlay will display the total time of the players
/// </summary>
public static readonly CVarDef<bool> AdminOverlayPlaytime =
CVarDef.Create("ui.admin_overlay_playtime", false, CVar.CLIENTONLY | CVar.ARCHIVE);

/// <summary>
/// If true, the admin overlay will display the players starting position.
/// </summary>
public static readonly CVarDef<bool> AdminOverlayStartingJob =
CVarDef.Create("ui.admin_overlay_starting_job", false, CVar.CLIENTONLY | CVar.ARCHIVE);
}
8 changes: 8 additions & 0 deletions Resources/Changelog/Admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -835,5 +835,13 @@ Entries:
id: 104
time: '2025-02-26T22:32:43.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/35543
- author: Schrodinger71
changes:
- message: For the admin overlay, new configs have been added to display the starting
position and total time.
type: Add
id: 105
time: '2025-02-28T20:51:30.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/35520
Name: Admin
Order: 1
31 changes: 14 additions & 17 deletions Resources/Changelog/Changelog.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,4 @@
Entries:
- author: Myra
changes:
- message: The game's title bar window will display the name of the server you have
joined (unless disabled).
type: Add
id: 7523
time: '2024-10-17T11:06:07.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/32547
- author: Aeshus
changes:
- message: Emote shorthands (like "lol" or ":)") sent in chat are detected throughout
the whole message. Note that only the last shorthand in the message will be
emoted.
type: Tweak
id: 7524
time: '2024-10-17T14:01:32.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/28645
- author: slarticodefast
changes:
- message: Fixed the playtime stats window not showing entries correctly.
Expand Down Expand Up @@ -3899,3 +3882,17 @@
id: 8022
time: '2025-02-27T23:35:53.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/35569
- author: Velken
changes:
- message: Wizard now has a cool PDA to store their pAI.
type: Add
id: 8023
time: '2025-03-01T02:12:24.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/35572
- author: LaCumbiaDelCoronavirus
changes:
- message: Slimepeople look a bit less bald now.
type: Tweak
id: 8024
time: '2025-03-01T09:56:29.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/35158
24 changes: 24 additions & 0 deletions Resources/Prototypes/Entities/Objects/Devices/pda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1455,3 +1455,27 @@
type: HealthAnalyzerBoundUserInterface
enum.ChameleonUiKey.Key:
type: ChameleonBoundUserInterface

- type: entity
parent: BasePDA
id: WizardPDA
name: wizard PDA
description: You hear faint whispers coming from it.
components:
- type: Pda
id: WizardIDCard
penSlot:
startingItem: LuxuryPen
priority: -1
whitelist:
tags:
- Write
- type: Appearance
appearanceDataInit:
enum.PdaVisuals.PdaType:
!type:String
pda-wizard
- type: PdaBorderColor
borderColor: "#7F3300"
- type: Icon
state: pda-wizard
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
back: ClothingBackpack # Wizard backpack?
outerClothing: ClothingOuterWizard
shoes: ClothingShoesWizard
id: WizardIDCard
id: WizardPDA
ears: ClothingHeadsetAltCommand
belt: ClothingBeltWand
# pocket1: TODO: Include wizard teleport scroll
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Species/slime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
- type: humanoidBaseSprite
id: MobSlimeMarkingFollowSkin
markingsMatchSkin: true
layerAlpha: 0.5
layerAlpha: 0.72

- type: humanoidBaseSprite
id: MobSlimeHead
Expand Down
13 changes: 12 additions & 1 deletion Resources/Textures/Objects/Devices/pda.rsi/meta.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Taken from tgstation at https://github.com/tgstation/tgstation/commit/59f2a4e10e5ba36033c9734ddebfbbdc6157472d, pda-cluwne made by brainfood1183 (github) ss14 | pda-brigmedic and pda-centcom made by PuroSlavKing (Github) | pda-brigemdic resprited by Hülle#2562 (Discord), pda-pirate made by brainfood1183 (Github), pda-syndi-agent drawn by Ubaser",
"copyright": "Taken from tgstation at https://github.com/tgstation/tgstation/commit/59f2a4e10e5ba36033c9734ddebfbbdc6157472d, pda-cluwne made by brainfood1183 (github) ss14 | pda-brigmedic and pda-centcom made by PuroSlavKing (Github) | pda-brigemdic resprited by Hülle#2562 (Discord), pda-pirate made by brainfood1183 (Github), pda-syndi-agent drawn by Ubaser, pda-wizard recolour by Velken",
"size": {
"x": 32,
"y": 32
Expand Down Expand Up @@ -225,6 +225,17 @@
},
{
"name": "pda-seniorofficer"
},
{
"name": "pda-wizard",
"delays": [
[
0.3,
0.3,
0.3,
0.3
]
]
},
{
"name": "equipped-IDCARD",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cc41c67

Please sign in to comment.