Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Commit 276648f

Browse files
ElijahraneEmissemetalgearslothPJBotDogZeroX
authored
Merge0514 (#107)
* Add files via upload (space-wizards#7960) * Clear PDA fix and syndi PDA and ID (space-wizards#7943) * Make alerts background transparent (space-wizards#7927) * Automatic changelog update * Changes the procgen clouds parallax with a solid nebulae (space-wizards#7994) * Bruh * slowdown the parallax * Automatic changelog update * Add interactionoutline to wooden TV (space-wizards#8001) * Make inventory slot interact properly go through unequip (space-wizards#7998) * Automatic changelog update * EntityQuery for ambient sounds (space-wizards#8010) * Makes pianos spawn anchored (space-wizards#8009) * Taser Nerf and Blood No Longer Slips (space-wizards#8008) * Automatic changelog update * Fix duplicate randomsentience sound * Add checks missing in the current half-implementation of lockable sto… (space-wizards#8004) * Makes potted plants not block mobs (space-wizards#8011) * Automatic changelog update * PlaceableSurface ECS (space-wizards#8013) * Cybersun Juggernaut Suit (space-wizards#7852) * Tile friction ECS (space-wizards#8012) * Tile friction ECS Removes some resolves which is really nice. * Velocity checks * Barsign fix (space-wizards#8015) * Automatic changelog update * The Big One [Barratry Update] (space-wizards#7999) * Automatic changelog update * Marathon Update 1.5 (space-wizards#7961) * Moose Update 2.1 (space-wizards#8016) * Syndicate surplus crates (space-wizards#7992) * Added the interface component which was missing from the chef hat (space-wizards#7989) * Automatic changelog update * Atmospherics Access, Air Alarms, Doors, Locker (space-wizards#7923) * You can no longer disarm wielded weapons (space-wizards#7983) Co-authored-by: Kara <lunarautomaton6@gmail.com> * makes scarf and space ninja hide hair (space-wizards#7985) * Makes glass external and shuttle airlocks pass light (space-wizards#7686) * delicious delicious crayons (space-wizards#8021) * Edible crayons * yeah why not * Automatic changelog update * Popup label occlusion (space-wizards#8017) * SpeechBubble occlusion (space-wizards#8018) * Automatic changelog update * Update default.yml * Various Entities make sounds when speaking (space-wizards#7980) * Speech Sounds from Goonstation * Added some speech sound prototypes for humans, mice, and vending machines. More to come later? * Custom synthesized sound for a vending machine ad * Gave mice and vending machines Speech Components on their base prototypes to make sounds * Humans now talk using the 'Alto' voice. In the future this can be changed in customization screen * New Prototype 'SpeechSounds' with three soundspecifiers for saying sound, asking sound, exclaiming sound. * SharedSpeechComponent modified from being useless to being responsible for making speech noises. * Initial creation of SpeechNoiseSystem for making Sounds when certain entities speak. * whitespace fix * License fix * Remove leftover using from debugging * Added a cooldown editable in yaml * SharedSpeechComponent has the proper cooldown now. oops * Automatic changelog update * Speech noise fixies (space-wizards#8023) Co-authored-by: metalgearsloth <metalgearsloth@gmail.com> * Fix human speech (space-wizards#8025) Co-authored-by: metalgearsloth <metalgearsloth@gmail.com> * Nanotrasen Interns (space-wizards#8006) * Automatic changelog update * Wires patches (space-wizards#7993) * door bolts now set if power is off and wire is pulsed, makes WiresSystem get a new random every time the round restarts * ??? what's shuffle doing in the interface ??? * oops * Speech Noises 2: Quality of Life, New Sounds (space-wizards#8044) * Vending machine jingle much less intense * SpeechSoundsPrototype has a built in variation parameter * Sounds in your face are louder but roll off more aggressively so that distant talking sounds are less distracting * Redo that * Speech noise system now supports variation of pitch * license stuff * PAIs have speech sounds now. Made by altering the pAI sounds. * Monkeys have sounds from goon now * New Speech Sounds * Oops * Automatic changelog update * make crayoncode use the colortype (space-wizards#7975) * Very Important PR That Adds 2 Fountain Pens (space-wizards#8019) * Add files via upload * Update paper.yml * Update meta.json * Update pda.yml * Update pda.yml * Marathon Intern Update (space-wizards#8034) * Add files via upload * Add files via upload * Add files via upload * Fixes thirst not applying speed debuffs properly , Makes Thirst a server-side component only (space-wizards#7767) Co-authored-by: MLGTASTICa <ak9bc01d@yahoo.com> Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com> * Universal weldable component (space-wizards#7955) * Weldable component for door * Content update * Examine message * Universal visualizer * Small fix * Entity storage * Content * Fixed test * Update Content.Shared/Storage/SharedStorageComponent.cs Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> * Fixed loc string * Add public API to change welding time Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> * Glass airlock construction (space-wizards#7877) * Lower indentation * Add glass airlock construction * Fix glass airlock wrong name * Automatic changelog update * Fix healingcomp placement (space-wizards#8045) * Saltern Update 3.1 (space-wizards#8035) * Add files via upload * Add files via upload * Update hardsuit-helmets.yml (space-wizards#8036) * Bagel Intern Update (space-wizards#8033) * Add files via upload * Add files via upload * Add files via upload * Moose Intern Update (space-wizards#8032) * Add files via upload * Add files via upload * Atlas Inter Update (space-wizards#8031) * Add files via upload * Add files via upload * Update atlas.yml * Revert new parallax (space-wizards#7994) (space-wizards#8049) * Automatic changelog update * Update game-ticker to no longer reference pressing f1 to read the rules (space-wizards#8054) * Fix lathe visuals exception (space-wizards#8052) * small splitstation update (space-wizards#8051) * small splitstation update * interns added * Automatic changelog update * No more spesswind (space-wizards#8059) * Automatic changelog update * Icon smoothing for asteroid rocks (space-wizards#8058) Co-authored-by: Tomeno <tomeno@lulzsec.co.uk> * Automatic changelog update * Captain's Antique Laser Gun and Traitor Objective (space-wizards#7940) * Round start audio announcement (space-wizards#8047) * Moose Door Stuck (space-wizards#8050) * Automatic changelog update * Filing Cabinet Resprites (space-wizards#8043) * Removes plates from pizza (space-wizards#8062) * Automatic changelog update * Electrocution noises (space-wizards#8061) * Adds spark noises when an entity gets electrocuted by something * oops * double oops * Update Content.Server/Electrocution/Components/ElectrifiedComponent.cs Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> * Vending machine changes (space-wizards#8060) Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> * Automatic changelog update * AAAA (space-wizards#8057) * Add the ability for mappers to drag grids around. (space-wizards#7769) * Add the ability for mappers to drag grids around. * Less message spam * Also flinging * Fix heals stacks I just wanted to remove double-clicking cancelling not the spammy. * Rename Assistant to Passenger (space-wizards#8007) Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com> * Automatic changelog update * fuck em drones (space-wizards#7931) * Automatic changelog update * Kitchen supplies crate (space-wizards#8022) * Automatic changelog update * Rework climbing (space-wizards#7706) * Fix popup deletion raycasts (space-wizards#8072) * Fix popup deletion raycasts * woops * Allow do_afters to be spammed (space-wizards#8074) * Atmos high pressure movements cleanup (space-wizards#8075) * Fixes LINDA and monstermos clashing over high pressure difference direction * Fix space wind CVar not disabling space wind entirely. * Change 1 (one) variable name * Fix pressure direction not being reset after high pressure movements happen. (space-wizards#8078) * New high pressure movement algorithm (space-wizards#8086) Co-authored-by: Tomeno <tomeno@lulzsec.co.uk> * Adds last pressure direction to atmos debug overlay. (space-wizards#8083) * Automatic changelog update * StationSystem/jobs/partial spawning refactor (space-wizards#7580) * Partial work on StationSystem refactor. * WIP station jobs API. * forgor to fire off grid events. * Partial implementation of StationSpawningSystem * whoops infinite loop. * Spawners should work now. * it compiles. * tfw * Vestigial code cleanup. * fix station deletion. * attempt to make tests go brr * add latejoin spawnpoints to test maps. * make sure the station still exists while destructing spawners. * forgot an exists check. * destruction order check. * hopefully fix final test. * fail-safe radstorm. * Deep-clean job code further. This is bugged!!!!! * Fix job bug. (init order moment) * whooo cleanup * New job selection algorithm that tries to distribute fairly across stations. * small nitpicks * Give the heads their weights to replace the head field. * make overflow assign take a station list. * moment * Fixes and test #1 of many. * please fix nullspace * AssignJobs should no longer even consider showing up on a trace. * add comment. * Introduce station configs, praying i didn't miss something. * in one small change stations are now fully serializable. * Further doc comments. * whoops. * Solve bug where assignjobs didn't account for roundstart. * Fix spawning, improve the API. Caught an oversight in stationsystem that should've broke everything but didn't, whoops. * Goodbye JobController. * minor fix.. * fix test fail, remove debug logs. * quick serialization fixes. * fixes.. * sus * partialing * Update Content.Server/Station/Systems/StationJobsSystem.Roundstart.cs Co-authored-by: Kara <lunarautomaton6@gmail.com> * Use dirtying to avoid rebuilding the list 2,100 times. * add a bajillion more lines of docs (mostly in AssignJobs so i don't ever forget how it works) * Update Content.IntegrationTests/Tests/Station/StationJobsTest.cs Co-authored-by: Kara <lunarautomaton6@gmail.com> * Add the Mysteriously Missing Captain Check. * Put maprender back the way it belongs. * I love addressing reviews. * Update Content.Server/Station/Systems/StationJobsSystem.cs Co-authored-by: Kara <lunarautomaton6@gmail.com> * doc cleanup. * Fix bureaucratic error, add job slot tests. * zero cost abstractions when * cri * saner error. * Fix spawning failing certain tests due to gameticker not handling falliability correctly. Can't fix this until I refactor the rest of spawning code. * submodule gaming * Packedenger. * Documentation consistency. Co-authored-by: Kara <lunarautomaton6@gmail.com> * I successfully broke the game. * How the fuck did none of this turn up in local testing :stare: * HOTFIX DOWNLOADS BEING BROKEN AGAIN. * fix the fact I sent a bunch of maps to detroit. (space-wizards#8087) * Don't play landing sounds in space (space-wizards#8085) * Rework CollisionGroups (space-wizards#7656) * Replace Mob, Vault, and Small impassable with Mid, High, Low * Remove CollisionGroup.Underplating * Remove CollisionGroup.Passable * Fix constructed APCs not being interactable * Change firelocks to occlude * Make pipe inherit from BaseItem * Clean up pipes * Remove duplicate physics and fixtures from bucket * Rework CollisionGroups on all entities * Add SlipLayer * Remove fixture from delta * Fix maps * Address reviews * Add SubfloorMask * Fix glass collisions for flying mobs * Fix maps * Update new items * Fix bagel again * Fix slug * Fix maps * Touchups * Fix tables blocking high pressure movement * Update StandingState to allow going under flaps * Cleanup * More formatting * Pull split from rotation due to mapping issues. * Changs chinese food vending machine (space-wizards#7754) * new chinese food items from paradise * made soy sauce salty * new snacks based on the new assets * chang assets 1 * chang vending machine * rsi animation and fix * rsi path fix * misc changes * fortune cookie snacks complete with fortunes * Update Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com> * Update Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml darn Americans Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com> Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com> * Automatic changelog update * Update submodule * Adjust EnteringRange for EntityStorage (space-wizards#8099) * Buffed Dex+ and Stellibinin (space-wizards#8090) * Improves the smoking experience (space-wizards#8089) Co-authored-by: ike709 <ike709@github.com> * Add listgamemaps command (space-wizards#8093) * Automatic changelog update * paintings 1 (space-wizards#8067) * Automatic changelog update * Singlehandedly saved the entire project [praise] (space-wizards#8109) * Delete windowsXP_error.ogg * Delete windowsXP_shutdown.ogg * Delete windowsXP_startup.ogg * Collisiongroup tweaks (space-wizards#8110) * Automatic changelog update * Hugging yourself no longer allowed (space-wizards#8103) !1984. I want to hug the other person damnit. * Automatic changelog update * Remove the nose off the ghost (space-wizards#8076) * Add external programs to rules (space-wizards#8108) * Make CarpetChapel not collide (space-wizards#8112) * Automatic changelog update * Censor Slimes (space-wizards#8101) * SlowOnDamage for mobs. Removes pulling from some mobs. (space-wizards#7824) * SlowOnDamage for all mobs now not just humans * removes puller from basesimplemob * adds pulling back to xeno, pets and some animals * Automatic changelog update * Allows pickuppable animals to resist out of inventory (space-wizards#7545) Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com> * Automatic changelog update * Machine Port Prototypes (space-wizards#7659) Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com> * Adds suppermatter (space-wizards#7633) Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com> * Automatic changelog update * Cargo telepad machine linking (space-wizards#7756) Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com> * Salami Lid (space-wizards#7813) Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> * Automatic changelog update * Adds cat ears as rare loot and traitor item (space-wizards#6939) * adds cat ears that give uwu accent * error * Updated to 20tc Web edit yoink * 21 TC now * Automatic changelog update * Pie transfer reagent on collision (space-wizards#7802) Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com> * Automatic changelog update * Reagents localization (space-wizards#7916) Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com> * Atlas Station Component (space-wizards#8094) Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com> * Bagel Station Component (space-wizards#8095) * Add files via upload * Update bagel.yml * Remove extra fixtures Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com> * Marathon Station Component (space-wizards#8097) Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com> * Moose Station Component (space-wizards#8098) Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com> * Saltern Small Update 3.2 (space-wizards#8100) Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com> * Remove misc Startup/Shutdown overrides (space-wizards#8113) Co-authored-by: ike709 <ike709@github.com> * Fish Cap (space-wizards#8046) * Add files via upload * Update hats.yml * Update clothesmate.yml * Show ghosts popups etc through walls (space-wizards#8077) * Show ghosts popups etc through walls * Stage moment * crashes * Convert suicide to ecs (space-wizards#8091) Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com> * Added the recipes and tech for several non lethal bullet (space-wizards#8079) * Automatic changelog update * Expanded icon smoothing conversion scripts (space-wizards#8055) * Expanded icon smoothing conversion scripts * hotfix `iconsmooth_inv.py` b/c of table weirdness * Syndie Commander and Syndie Elite Armors (space-wizards#8003) Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> * GatherableSystem/Component (space-wizards#8041) Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com> * Add power sinks (space-wizards#8020) Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com> * Automatic changelog update * Delta Fixed, Reuploaded Again (space-wizards#8105) Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com> * Automatic changelog update * filing collision + outline fix (space-wizards#8122) * Barratry Update (space-wizards#8118) * Automatic changelog update * fix fish hat (space-wizards#8123) * Suicide2 (space-wizards#8117) * Fix toilet suicide * Fix ghost ghosting * Clean suicide system * The Newest Furry Race [Skeletons] (space-wizards#7825) Co-authored-by: Moony <moonheart08@users.noreply.github.com> Co-authored-by: Kara <lunarautomaton6@gmail.com> Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com> * Automatic changelog update * Optionally deserialize `AudioParams` in `SoundSpecifier` (space-wizards#8065) * Lizard name datasets (space-wizards#7890) Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com> * Automatic changelog update * Don't force bwoink window open for admins (space-wizards#8066) * Powercell adjustment (space-wizards#7828) Co-authored-by: Kara <lunarautomaton6@gmail.com> * Automatic changelog update * Shuttle Assembly Crate (space-wizards#7898) * Automatic changelog update * Round end audio (space-wizards#8048) * Automatic changelog update * Laser gun bugfix & damage adjustment (space-wizards#8069) * fix elite suit (space-wizards#8127) * Update submodule * Skeleton Sprite Fix (space-wizards#8126) * Automatic changelog update * Legally distinct gravity gun (space-wizards#8114) * Escalation rules (space-wizards#8128) * Escalation rules * a * Added the TechFabCircuitboards and made them spawn in the head's lockers (space-wizards#8124) * Stripping ECS + window do_after (space-wizards#8111) * Stripping ECS + window do_after * stuff * workies * Delays * Automatic changelog update * Move disarmed event (space-wizards#8130) * Fixing warnings (space-wizards#8131) * Cleanup the namespaces (space-wizards#8132) * Tether gun fixes (space-wizards#8129) * Salvage mob restrictions (space-wizards#8080) * unbork (space-wizards#8139) * Add files via upload (space-wizards#8142) * Flavor text (space-wizards#8070) * Automatic changelog update * It's a waffle home. [New Salvage] (space-wizards#7991) * Skeleton Bugfix Pt. 2 (space-wizards#8137) * Automatic changelog update * Fix interaction and add comments to CollisionGroup (space-wizards#8149) * Automatic changelog update * Eye lerping on entities (space-wizards#8151) * eye lerping on entities * small improvements * Splitstation update and fixes (space-wizards#8141) * Entities gib when being microwaved (space-wizards#8144) * Airlocks now trap air in their tile. (space-wizards#8136) * Automatic changelog update * Update for grid API changes (space-wizards#8152) * Update submodule * Update submodule Forgot I had breaking changes * Map-disablable pumps (for fixing Delta) (space-wizards#8164) Co-authored-by: Emisse <99158783+Emisse@users.noreply.github.com> Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: PJBot <pieterjan.briers+bot@gmail.com> Co-authored-by: T-Stalker <43253663+DogZeroX@users.noreply.github.com> Co-authored-by: Kara <lunarautomaton6@gmail.com> Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com> Co-authored-by: EmoGarbage404 <98561806+EmoGarbage404@users.noreply.github.com> Co-authored-by: Alex Evgrashin <aevgrashin@yandex.ru> Co-authored-by: Ripmorld <60119809+UKNOWH@users.noreply.github.com> Co-authored-by: Peptide90 <78795277+Peptide90@users.noreply.github.com> Co-authored-by: Moony <moonheart08@users.noreply.github.com> Co-authored-by: hubismal <47284081+hubismal@users.noreply.github.com> Co-authored-by: metalgearsloth <metalgearsloth@gmail.com> Co-authored-by: Flipp Syder <76629141+vulppine@users.noreply.github.com> Co-authored-by: Paul Ritter <ritter.paul1@googlemail.com> Co-authored-by: MLGTASTICa <61350382+MLGTASTICa@users.noreply.github.com> Co-authored-by: MLGTASTICa <ak9bc01d@yahoo.com> Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com> Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com> Co-authored-by: ZeroDayDaemon <60460608+ZeroDayDaemon@users.noreply.github.com> Co-authored-by: Tomeno <Tomeno@users.noreply.github.com> Co-authored-by: Tomeno <tomeno@lulzsec.co.uk> Co-authored-by: Veritius <veritiusgaming@gmail.com> Co-authored-by: lapatison <100279397+lapatison@users.noreply.github.com> Co-authored-by: Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com> Co-authored-by: Chris V <HoofedEar@users.noreply.github.com> Co-authored-by: ike709 <ike709@users.noreply.github.com> Co-authored-by: ike709 <ike709@github.com> Co-authored-by: wrexbe <81056464+wrexbe@users.noreply.github.com> Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com> Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Co-authored-by: 20kdc <asdd2808@gmail.com> Co-authored-by: TimrodDX <timrod@gmail.com> Co-authored-by: youarereadingthis <100040020+youarereadingthis@users.noreply.github.com>
1 parent ad8876e commit 276648f

File tree

49 files changed

+5609
-130
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+5609
-130
lines changed

Content.Client/Eye/EyeLerpingSystem.cs

Lines changed: 104 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using Robust.Client.Player;
77
using Robust.Shared.GameObjects;
88
using Robust.Shared.IoC;
9+
using Robust.Shared.Map;
910
using Robust.Shared.Maths;
1011
using Robust.Shared.Timing;
1112

@@ -14,100 +15,154 @@ namespace Content.Client.Eye;
1415
public sealed class EyeLerpingSystem : EntitySystem
1516
{
1617
[Dependency] private readonly IEyeManager _eyeManager = default!;
18+
[Dependency] private readonly IMapManager _mapManager = default!;
1719
[Dependency] private readonly IPlayerManager _playerManager = default!;
1820
[Dependency] private readonly IGameTiming _gameTiming = default!;
1921

20-
private Angle? _lastGridAngle;
21-
private Angle? _lerpTo;
22-
private Angle _lerpStartRotation;
23-
private float _accumulator;
24-
2522
// How fast the camera rotates in radians / s
2623
private const float CameraRotateSpeed = MathF.PI;
2724

2825
// Safety override
2926
private const float LerpTimeMax = 1.5f;
3027

28+
// Lerping information for the player's active eye.
29+
private readonly EyeLerpInformation _playerActiveEye = new();
30+
31+
// Eyes other than the primary eye that are currently active.
32+
private readonly Dictionary<EntityUid, EyeLerpInformation> _activeEyes = new();
33+
private readonly List<EntityUid> _toRemove = new();
3134

3235
public override void Initialize()
3336
{
3437
base.Initialize();
3538

39+
SubscribeLocalEvent<EyeComponent, ComponentShutdown>(OnEyeShutdown);
40+
3641
UpdatesAfter.Add(typeof(TransformSystem));
3742
UpdatesAfter.Add(typeof(PhysicsSystem));
3843
UpdatesBefore.Add(typeof(EyeUpdateSystem));
3944
}
4045

46+
private void OnEyeShutdown(EntityUid uid, EyeComponent component, ComponentShutdown args)
47+
{
48+
RemoveEye(uid);
49+
}
50+
51+
public void AddEye(EntityUid uid)
52+
{
53+
if (!_activeEyes.ContainsKey(uid))
54+
{
55+
_activeEyes.Add(uid, new());
56+
}
57+
}
58+
59+
public void RemoveEye(EntityUid uid)
60+
{
61+
if (_activeEyes.ContainsKey(uid))
62+
{
63+
_activeEyes.Remove(uid);
64+
}
65+
}
66+
4167
public override void FrameUpdate(float frameTime)
4268
{
4369
if (!_gameTiming.IsFirstTimePredicted)
4470
return;
4571

46-
var currentEye = _eyeManager.CurrentEye;
72+
// Always do this one.
73+
LerpPlayerEye(frameTime);
74+
75+
foreach (var (entity, info) in _activeEyes)
76+
{
77+
LerpEntityEye(entity, info, frameTime);
78+
}
79+
80+
if (_toRemove.Count != 0)
81+
{
82+
foreach (var entity in _toRemove)
83+
{
84+
RemoveEye(entity);
85+
}
86+
87+
_toRemove.Clear();
88+
}
89+
}
4790

91+
private void LerpPlayerEye(float frameTime)
92+
{
4893
if (_playerManager.LocalPlayer?.ControlledEntity is not {} mob || Deleted(mob))
4994
return;
5095

5196
// We can't lerp if the mob can't move!
5297
if (!TryComp(mob, out IMoverComponent? mover))
5398
return;
5499

55-
var moverLastGridAngle = mover.LastGridAngle;
100+
LerpEye(_eyeManager.CurrentEye, frameTime, mover.LastGridAngle, _playerActiveEye);
101+
}
102+
103+
private void LerpEntityEye(EntityUid uid, EyeLerpInformation info, float frameTime)
104+
{
105+
if (!TryComp(uid, out TransformComponent? transform)
106+
|| !TryComp(uid, out EyeComponent? eye)
107+
|| eye.Eye == null
108+
|| !_mapManager.TryGetGrid(transform.GridID, out var grid))
109+
{
110+
_toRemove.Add(uid);
111+
return;
112+
}
113+
114+
LerpEye(eye.Eye, frameTime, grid.WorldRotation, info);
115+
}
116+
117+
private void LerpEye(IEye eye, float frameTime, Angle lastAngle, EyeLerpInformation lerpInfo)
118+
{
56119

57120
// Let's not turn the camera into a washing machine when the game starts.
58-
if (_lastGridAngle == null)
121+
if (lerpInfo.LastGridAngle == null)
59122
{
60-
_lastGridAngle = moverLastGridAngle;
61-
currentEye.Rotation = -moverLastGridAngle;
123+
lerpInfo.LastGridAngle = lastAngle;
124+
eye.Rotation = -lastAngle;
62125
return;
63126
}
64127

65128
// Check if the last lerp grid angle we have is not the same as the last mover grid angle...
66-
if (!_lastGridAngle.Value.EqualsApprox(moverLastGridAngle))
129+
if (!lerpInfo.LastGridAngle.Value.EqualsApprox(lastAngle))
67130
{
68131
// And now, we start lerping.
69-
_lerpTo = moverLastGridAngle;
70-
_lastGridAngle = moverLastGridAngle;
71-
_lerpStartRotation = currentEye.Rotation;
72-
_accumulator = 0f;
132+
lerpInfo.LerpTo = lastAngle;
133+
lerpInfo.LastGridAngle = lastAngle;
134+
lerpInfo.LerpStartRotation = eye.Rotation;
135+
lerpInfo.Accumulator = 0f;
73136
}
74137

75-
if (_lerpTo != null)
138+
if (lerpInfo.LerpTo != null)
76139
{
77-
_accumulator += frameTime;
140+
lerpInfo.Accumulator += frameTime;
78141

79-
var lerpRot = -_lerpTo.Value.FlipPositive().Reduced();
80-
var startRot = _lerpStartRotation.FlipPositive().Reduced();
142+
var lerpRot = -lerpInfo.LerpTo.Value.FlipPositive().Reduced();
143+
var startRot = lerpInfo.LerpStartRotation.FlipPositive().Reduced();
81144

82145
var changeNeeded = Angle.ShortestDistance(startRot, lerpRot);
83146

84147
if (changeNeeded.EqualsApprox(Angle.Zero))
85148
{
86149
// Nothing to do here!
87-
CleanupLerp();
150+
lerpInfo.Cleanup(eye);
88151
return;
89152
}
90153

91154
// Get how much the camera should have moved by now. Make it faster depending on the change needed.
92-
var changeRot = (CameraRotateSpeed * Math.Max(1f, Math.Abs(changeNeeded) * 0.75f)) * _accumulator * Math.Sign(changeNeeded);
155+
var changeRot = (CameraRotateSpeed * Math.Max(1f, Math.Abs(changeNeeded) * 0.75f)) * lerpInfo.Accumulator * Math.Sign(changeNeeded);
93156

94157
// How close is this from reaching the end?
95158
var percentage = (float)Math.Abs(changeRot / changeNeeded);
96159

97-
currentEye.Rotation = Angle.Lerp(startRot, lerpRot, percentage);
160+
eye.Rotation = Angle.Lerp(startRot, lerpRot, percentage);
98161

99162
// Either we have overshot, or we have taken way too long on this, emergency reset time
100-
if (percentage >= 1.0f || _accumulator >= LerpTimeMax)
101-
{
102-
CleanupLerp();
103-
}
104-
105-
void CleanupLerp()
163+
if (percentage >= 1.0f || lerpInfo.Accumulator >= LerpTimeMax)
106164
{
107-
currentEye.Rotation = -_lerpTo.Value;
108-
_lerpStartRotation = currentEye.Rotation;
109-
_lerpTo = null;
110-
_accumulator = 0f;
165+
lerpInfo.Cleanup(eye);
111166
}
112167
}
113168
else
@@ -117,7 +172,23 @@ void CleanupLerp()
117172
// ghosting, this system listening for attached mob changes, and the eye rotation being reset after our
118173
// changes back to zero because of an EyeComponent state coming from the server being applied.
119174
// At some point we'll need to come up with a solution for that. But for now, I just want to fix this.
120-
currentEye.Rotation = -moverLastGridAngle;
175+
eye.Rotation = -lastAngle;
176+
}
177+
}
178+
179+
private sealed class EyeLerpInformation
180+
{
181+
public Angle? LastGridAngle { get; set; }
182+
public Angle? LerpTo { get; set; }
183+
public Angle LerpStartRotation { get; set; }
184+
public float Accumulator { get; set; }
185+
186+
public void Cleanup(IEye eye)
187+
{
188+
eye.Rotation = -LerpTo ?? Angle.Zero;
189+
LerpStartRotation = eye.Rotation;
190+
LerpTo = null;
191+
Accumulator = 0;
121192
}
122193
}
123194
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<Control Name="CFlavorText" xmlns="https://spacestation14.io">
2+
<BoxContainer Orientation="Vertical" HorizontalExpand="True">
3+
<LineEdit Name="CFlavorTextInput" Access="Public" MinSize="220 0" HorizontalExpand="True" />
4+
</BoxContainer>
5+
</Control>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
using Robust.Client.AutoGenerated;
2+
using Robust.Client.UserInterface;
3+
using Robust.Client.UserInterface.XAML;
4+
5+
namespace Content.Client.FlavorText
6+
{
7+
[GenerateTypedNameReferences]
8+
public sealed partial class FlavorText : Control
9+
{
10+
public Action<string>? OnFlavorTextChanged;
11+
12+
public FlavorText()
13+
{
14+
RobustXamlLoader.Load(this);
15+
IoCManager.InjectDependencies(this);
16+
17+
CFlavorTextInput.OnTextChanged += _ => FlavorTextChanged();
18+
}
19+
20+
public void FlavorTextChanged()
21+
{
22+
OnFlavorTextChanged?.Invoke(CFlavorTextInput.Text);
23+
}
24+
}
25+
}

Content.Client/Lobby/LobbyState.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
using Robust.Client.ResourceManagement;
1919
using Robust.Client.UserInterface;
2020
using Robust.Client.UserInterface.Controls;
21+
using Robust.Shared.Configuration;
2122
using Robust.Shared.GameObjects;
2223
using Robust.Shared.IoC;
2324
using Robust.Shared.Localization;
@@ -42,6 +43,7 @@ public sealed class LobbyState : Robust.Client.State.State
4243
[Dependency] private readonly IClientPreferencesManager _preferencesManager = default!;
4344
[Dependency] private readonly IGameTiming _gameTiming = default!;
4445
[Dependency] private readonly IVoteManager _voteManager = default!;
46+
[Dependency] private readonly IConfigurationManager _configurationManager = default!;
4547

4648
[ViewVariables] private CharacterSetupGui? _characterSetup;
4749
[ViewVariables] private LobbyGui? _lobby;
@@ -52,7 +54,7 @@ public override void Startup()
5254
{
5355
_gameTicker = EntitySystem.Get<ClientGameTicker>();
5456
_characterSetup = new CharacterSetupGui(_entityManager, _resourceCache, _preferencesManager,
55-
_prototypeManager);
57+
_prototypeManager, _configurationManager);
5658
LayoutContainer.SetAnchorPreset(_characterSetup, LayoutContainer.LayoutPreset.Wide);
5759

5860
_lobby = new LobbyGui(_entityManager, _preferencesManager);

Content.Client/Preferences/UI/CharacterSetupGui.xaml.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
using Robust.Client.UserInterface;
1414
using Robust.Client.UserInterface.Controls;
1515
using Robust.Client.UserInterface.XAML;
16+
using Robust.Shared.Configuration;
1617
using Robust.Shared.GameObjects;
1718
using Robust.Shared.IoC;
1819
using Robust.Shared.Localization;
@@ -29,19 +30,22 @@ public sealed partial class CharacterSetupGui : Control
2930
private readonly IClientPreferencesManager _preferencesManager;
3031
private readonly IEntityManager _entityManager;
3132
private readonly IPrototypeManager _prototypeManager;
33+
private readonly IConfigurationManager _configurationManager;
3234
private readonly Button _createNewCharacterButton;
3335
private readonly HumanoidProfileEditor _humanoidProfileEditor;
3436

3537
public CharacterSetupGui(
3638
IEntityManager entityManager,
3739
IResourceCache resourceCache,
3840
IClientPreferencesManager preferencesManager,
39-
IPrototypeManager prototypeManager)
41+
IPrototypeManager prototypeManager,
42+
IConfigurationManager configurationManager)
4043
{
4144
RobustXamlLoader.Load(this);
4245
_entityManager = entityManager;
4346
_prototypeManager = prototypeManager;
4447
_preferencesManager = preferencesManager;
48+
_configurationManager = configurationManager;
4549

4650
var panelTex = resourceCache.GetTexture("/Textures/Interface/Nano/button.svg.96dpi.png");
4751
var back = new StyleBoxTexture
@@ -64,7 +68,7 @@ public CharacterSetupGui(
6468
args.Event.Handle();
6569
};
6670

67-
_humanoidProfileEditor = new HumanoidProfileEditor(preferencesManager, prototypeManager, entityManager);
71+
_humanoidProfileEditor = new HumanoidProfileEditor(preferencesManager, prototypeManager, entityManager, configurationManager);
6872
_humanoidProfileEditor.OnProfileChanged += ProfileChanged;
6973
CharEditor.AddChild(_humanoidProfileEditor);
7074

Content.Client/Preferences/UI/HumanoidProfileEditor.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
33
xmlns:magicmirror="clr-namespace:Content.Client.CharacterAppearance"
44
xmlns:prefUi="clr-namespace:Content.Client.Preferences.UI"
5-
xmlns:markings="clr-namespace:Content.Client.Markings">
5+
xmlns:markings="clr-namespace:Content.Client.Markings"
6+
xmlns:flavorText="clr-namespace:Content.Client.FlavorText">
67
<BoxContainer Orientation="Horizontal">
78
<!-- Left side -->
89
<BoxContainer Orientation="Vertical" Margin="10 10 10 10">

0 commit comments

Comments
 (0)