From b4b6dcc6abb1468f0b81f429d307314675bbf1b0 Mon Sep 17 00:00:00 2001 From: Rane <60792108+Elijahrane@users.noreply.github.com> Date: Fri, 10 Jun 2022 16:42:42 -0400 Subject: [PATCH] Merge 06/10 (#209) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update submodule * Emergency lights fixes (#8454) * Automatic changelog update * Corrects the fact the dim layers were fixed in place due to an indentation error. (#8461) * fix cargo fuel tank order (#8460) * Automatic changelog update * Fix action icons (#8436) * Automatic changelog update * Fix emitter crash on non-exact power float (#8459) * Update submodule * Completions for the warp command (#8470) * Give station events command completions, cleanup (#8464) * Singulo eats unpowered containment gens (#8343) * Add static "IsPowered" method (#8434) * Add static "IsPowered" method * Use IsPowered in more places Co-authored-by: wrexbe * Automatic changelog update * Allows people to resist out of crates (#8471) * Automatic changelog update * OnTriggerCollide Bug fix (#8467) * ez gg dubskis * meteor * Update meteors.yml * Automatic changelog update * Fixes the singularity bouncing off the station. (#8452) * Fixes the singularity bouncing off the station. * Update Content.Shared/Singularity/SharedSingularitySystem.cs Co-authored-by: wrexbe <81056464+wrexbe@users.noreply.github.com> Co-authored-by: wrexbe <81056464+wrexbe@users.noreply.github.com> * Automatic changelog update * Fix inaccessible ready button in lobby (#8465) * Fix inaccesible ready button in lobby * a * vote popups * splitz * Automatic changelog update * Mini Gravity Generator (#8449) * meenee * Update Resources/Prototypes/Entities/Structures/Machines/gravity_generator.yml Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> * Automatic changelog update * Nukes the arrivals shuttle thrusters on Delta. (#8473) * Automatic changelog update * Engine UI FrameUpdate compat, Speech bubble first frame fix (#8472) * Compat fix for engine UI FrameUpdate order change. Engine is getting FrameUpdate changed to run BEFORE style & layout. This is needed to avoid exploding. * Fix speech bubble layout on first frame. * Extended access system (#8469) * Extended access system Allows jobs to specify "extended" access levels, which will be granted if the round-start crew count is below a certain threshold. * Extended accesses for jobs * Spook * Automatic changelog update * Atmos sign (#8462) * Add files via upload * Update meta.json * Update meta.json * Update signs.yml * Update meta.json * Adds twenty-one new smites, moves the explosion smite to the verb category. (#8456) * Adds seven new smites, moves the explosion smite to the verb category. * adds even more smites. * Even more smites, some messages for specific smites. * Adds even more smites. * Removes some junk, adds a smite that angers the pointing arrows. * get rid of dumb component. * Remove mistake from verb menu presentation. * How did that happen? * whoops * c * e * fuck * Loading... * removes the BoM go away * adds the funny kill sign. Fixes ghost smite. * Move systems around. * Adjust organ vomit. * Adds a smite that turns people into an instrument, and one that removes their gravity. * oops * typo Co-authored-by: Veritius * Automatic changelog update * pillar minor update (#8466) * Automatic changelog update * Spationaut Resprite (#8458) * resprite * inhand fix * small engi fix * losing my mind aaaa fuck me * what the hell is wrong with me * Update Resources/Textures/Clothing/Head/Hardsuits/spatiohelm.rsi/meta.json Co-authored-by: wrexbe <81056464+wrexbe@users.noreply.github.com> * Update Resources/Textures/Clothing/OuterClothing/Hardsuits/spatio.rsi/meta.json Co-authored-by: wrexbe <81056464+wrexbe@users.noreply.github.com> Co-authored-by: wrexbe <81056464+wrexbe@users.noreply.github.com> * Automatic changelog update * Fix rules popup (#8485) * CVar to show rules popup for localhost. For testing purposes. * Fix rules popup being broken and throwing. 😐 * Hotfix weightless riding (#8477) * Hotfix weightless riding * a * Finally fixes file templates (#8476) * Add entitysystem and component templates. * Adds doc comments to templates and also a prototype template. * Add an inheriting prototype template. * add inheritdocs where appropriate. * rebalance pressure, airloss, cold (#8482) * Automatic changelog update * Play sound and request window on cloning (#8323) ECS TBD. Fish did a pr but it was doing a lot at once. * Allow ghosts to ignore obstructions (#8397) * Automatic changelog update * Mousetrap fixes/tweaks (#8484) * fixes issues with mousetraps, adds activation popup * sure * me when i scroll up a bit in discord * Fix StepTrigger error (#8480) * Fix StepTrigger error * Changed it * Update Content.Shared/StepTrigger/StepTriggerSystem.cs Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> * Update Content.Shared/StepTrigger/StepTriggerSystem.cs Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> * Update StepTriggerSystem.cs * Update StepTriggerSystem.cs Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> * Attempt to reduce audio helper resolves (#8493) * Bump engine to 0.19.0.0 (#8417) * Remove IgnoreComponents on the client (#8308) * Fix GasThermoMachine upgrading (#8313) * Automatic changelog update * fix hardhat shading (#8508) * step trigger fix + optimization (#8503) * Underplating Must Die (The Movie) (The Video Game) (#8498) * Add a BRB Sign (#8437) * Automatic changelog update * Set alert level command (#8507) * Add force mode for setting alert level * Add console command for changing alert level * Filename typo * Return delta disableSelection property * Make locked a component property * Not lock green level after nuke disarm * Add completions to the damage command (#8510) * Fix map rendering (#8514) * Fix negative grids * Map renderer: skip, and warn on empty grids. * Fix local transform * Improve the templates, add networked entity system templates. (#8518) * Update submodule * Simple Magic Spellbook System (#7823) Co-authored-by: metalgearsloth * Automatic changelog update * Make AdminLogsSystem an IoC manager (#8492) * Make log not entity system * Fixes * Remove extra ; * Gamma & Epsilon alerts levels (#8517) * Add Gamma & Epsilon alert levels * Add license for epsilon sound * Remove mention about gamma armory * Add missing license sources * Delete unused sound * Automatic changelog update * Waystation: The Station That Will Succeed Packed's Legacy (#8398) * Waystation: The Station That Will Succeed Packed's Legacy * Hopefully fixes YAML errors * Fixes missing HV wires * Security door * Addresses review * Add station component to waystation * Fix minor stuff * BecomeStation Casing Weh Co-authored-by: wrexbe * Automatic changelog update * Decouples starting gear from UtilityAI (#8512) * Interrupt uncuff on target movement (#8511) * Fix mapping actions for engine PR (#8296) * Adds TimedDespawn component to Invisible Walls, nukes DeleteAfterTime (#8528) * Adds TimedDelete component to Invisible Walls * Removes Delete After Time * Dirty Command (#8533) Dirty Command Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> * Dirty command fix (#8534) * Fix server update restarts when server paused. (#8509) * Examinable Anchors (#8407) * Automatic changelog update * Update Changelog.yml * More github action tests (#7301) * Update submodule * Surveillance cameras (#8246) * cameras but i didn't feel like git stashing them * Adds more functionality server-side for surveillance cameras * rider moment * Adds skeleton for SurveillanceCameraMonitorBoundUi on client * whoops * makes surveillance camera monitor UI more defined * removes tree from SurveillanceCameraMonitorWindow * surveillance camera active flag, other routing things * actually sets how SurveillanceCameraMonitorSystem sends camera info to clients * adds entity yaml, changes field * adds the camera/monitor entities, makes the UI open * SurveillanceCameraRouters (not implemented fully) * subnets for cameras, server-side * it works! * fixes rotation in cameras * whoops restores surveillance cameras to ignored components makes it so that switching cameras now lerps the other camera * makes the UI work * makes it so that cameras actually refresh now * cleanup * adds camera.rsi * cleans up prototypes a bit * adds camera subnet frequencies, cameras in subnets * adds surveillance camera router subnets * might fix testing errors * adds the circuit board to the surveillance camera monitor * fixes up the camera monitor (the detective will get his tv soon) * adds heartbeat, ensures subnet data is passed into cameras to send * fixes up a few things * whoops * changes to UI internals * fixes subnet selection issue * localized strings for UI * changes 'test' id to 'camera' for cameras * whoops * missing s * camera static! * adds a delay to camera switching * adjusts a few things in camera timing * adds setup for cameras/routers, localization for frequency names * adds setup ui for routers, makes subnet names in monitor window follow frequency name in prototype * localization, some cleanup * ui adjustments * adds surveillance camera visuals * fixes a bug when closing the UI for monitors * adds disconnect message to UI * adds construction graph to cameras * adds the camera to the construction menu * fixes network selection for setup, tweak to assembly * adds surveillance camera router construction, fixes up surveillance camera wire cutting * adds disconnect button to monitor UI * switches around the status text * tweaks monitor UI * makes the address actually show * might make tests pass * UI adjustments, hard name limit * ok, that didn't work * adds wireless cameras * makes the television work/look nicer * adds tripod cameras in addition to mobile cameras * makes wireless cameras constructable * fixes up those prototypes * reorganization in C#, small cleanup * ensures that power changes deactivate some devices * adds a component to the television, comments out a function * actually, never mind, i forgot that wireless cameras existed/are creatable for a second * tweaks to router construction, removes SubnetTest from prototypes * removes it from frequencies too * Apply suggestions from code review Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> * type serializers into components * setup window opens centered, enum is now byte * replaces active monitor list with ActiveSurveillanceCameraMonitorComponent * adds paused/deleted entity checks, changes how verbs are given * removes EntitySystem.Get() references * fixes bug related to selecting network from setup, alphabet-orders network listing in setup * rider moment * adds minwidth to surveillance camera setup window * addresses reviews * should fix the issue with camera visuals not updating properly * addresses some reviews * addresses further review * addresses reviews related to RSIs * never needed a key there anyways * changes a few things with routers to ensure that they're active * whoops * ensurecomp over addcomp * whoops Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> * Automatic changelog update * Makes camera monitors/the television constructable (#8542) * Update emergency light animation. (#8531) * Adds health analyzer to 3 first aid kits (#8535) * adds healthanalyzer to 3 first aid kits normal, advanced and combat kits only * increase first aid kit sizes * Automatic changelog update * Fix bug where being eaten as a mouse tethers your ghost to who ate you (#8338) * Check if the ghost spawn position is in inventory/default/null-space * attach to grid instead of default spawn point * Simply attach to grid first before entity is deleted * Alert level reloads (#8530) * adds prototype reload for AlertLevelSystem, reorganizes selectable alerts a bit * makes alert levels not necessarily require localization * oops * sus * does the same for announcements as well * oh, that's not how that works at all * ok, NOW it works * fixes localization, adds event for when alerts are reloaded * addresses review * Automatic changelog update * Modular landmines (#8351) * Automatic changelog update * Gun refactor (#8301) Co-authored-by: Kara Co-authored-by: T-Stalker Co-authored-by: T-Stalker <43253663+DogZeroX@users.noreply.github.com> Co-authored-by: ElectroJr Co-authored-by: metalgearsloth * Update submodule * Update submodule * Saltern Update 3.5 (#8567) * Bagel Update 13.6 (#8563) * Marathon Update 1.7 (#8566) * Cleanup gun containers (probably last time) (#8575) - snake_case instead of kebab-case - Remove old MagazineBarrel containers - Remove old event * AccessReader IsAllowed use resolve (#8527) * Re-implement hitscan sounds (#8581) I forgor. Also added RW to ballistic prototype for funsies. * Goon floor pack 1 (#8267) * floors boxing, arcadeblue2 and carpet clown * adds gym, metaldiamond and carpetoffice from goon * adds variants for boxing and gym * tile variants updated * Fix access system (#8585) * Add an access system proxy(#8586) * Gun whitelist fixies (#8587) * Gun sound fixes (#8592) * Automatic changelog update * Update submodule * Add files via upload (#8591) * Adds the ability to not play admin sounds (#8242) Co-authored-by: ike709 Co-authored-by: Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com> * Automatic changelog update * Fix thruster shutdown (#8598) * Nerf SMG accuracy (#8589) * Automatic changelog update * Fix invalid XAML markup cases Rider EAP is highlighting these now * Post Light sprite fix and state (#8578) * adjusted post light sprite and added empty state * update construction location * Automatic changelog update * Reduces the nuke detonation time to 120 (#8599) * weh Multiplies the amount of power used by the battery guns, triple-ish for the laser cannon and a fuckton more for the xray * Reduces nuke detonation time * comment * Update Content.Server/Nuke/NukeComponent.cs Co-authored-by: wrexbe <81056464+wrexbe@users.noreply.github.com> * Automatic changelog update * Fix aghost crashes (#8556) There's still some oddity around MobObserver / AdminObserver where if you move after suicide then aghost you return to your original body, but at least you won't spawn a billion AdminObservers anymore or crash if you controlmob one. * Adds max pressure to gas miners (#8543) * adds max pressure to gas miners 300kPA down from max (4500) * reduces the gas amount * Automatic changelog update * Hotfix revolver serialization (#8561) * Hotfix revolver serialization * a * wakemkiaofalliance (#8603) * Adds security cameras to Delta, also more decals. (#8605) * Automatic changelog update * Dwarves are no longer selectable. (#8596) * Automatic changelog update * Shotgun nerfs (#8590) - Bojevic firerate dropped from 3 to 2 - Pellet damage from 13 to 8 (3 shotting players instead of 2 shot) - Slightly more spread in line with the design doc. Slug spread I made as accurate as an SMG (so not quite full-screen mob hits but pretty close). * Automatic changelog update * Emitter 1984 - cargo and construction (#8606) * Automatic changelog update * Fix debug tests with engine change (#8609) * Re-enable sandbox for <5 players (#8610) * Automatic changelog update * Floor tile ECS (#8577) * Add ContainerContainer to boards (#8569) * Add ContainerContainer for powered stuff (#8570) * Fix pipe net conservation laws (#8540) * adds destructible to power structures (#8536) * Automatic changelog update * Fix spray collision (#8612) * Automatic changelog update * Prune most yml ambientsound entries (#8573) * Remove (some?) pop-up error spam. (#8538) * Emergency Response Team (#6258) * Clothing pass 1 Backpacks, hardsuits and helmets pass 1 * ERT Leader Role first pass * ERT Backpacks (nearly there) * ERT Backpacks final * ERT helmets pass 1 * remaining hardsuit sprites added. * ERT leader ID * removed duplicates * hardsuits + helmets entities * ID + PDA for ERT * ERT leader role pass 1 * job icons / markers for ERT * military / ert name dataset * starting gear pass 1 for ERT * removed in favor of singular ERT roles file * ERT mobs for spawning * ERT spawn points added * fixed case on ERT name * Increased ERT access to most areas * ERT ghost role takeover fixes * ERT removed invalid parent * path issue resolved * more file path fixes * fixes random naming pt 1 * Buffs ERT hardsuits and integrates helmet parents ert to syndie hardsuit and adds toggleable helmet * Adds suit storage slot and cargo access * Adds backpack fills for ERT * Updates ERT loadout for filled backpacks + other misc changes * buff ERT backpack storage * fixes ert jani backpack fills * tweaks spawn loadout to EVA * gave centcom official AA * formatting * ERT shuttle mapped with spawners * update access * Automatic changelog update * Communications Console: The ECSining (#8374) Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: metalgearsloth * Automatic changelog update * Holofan Projector Upstream from Nyano (#8352) Co-authored-by: metalgearsloth * Implements item pricing, and piracy. (#8548) * Start implementing item pricing. * Flesh out prices a bit, add the appraisal tool. * Add prices to more things. * YARRRRRRR * gives pirates an appraisal tool in their pocket. * Makes the various traitor objectives valuable. Also nerfs the price of a living person, so it's easier to bargain for them. * Address reviews. * Address reviews. * Automatic changelog update * Fix pirates. Whoops. (#8623) * Fix pirates. Whoops. * Remove debug logs. * Reduce the amount of drinks per robust softdrinks machine (#8629) * Automatic changelog update * Makes ERT roles not show up on role select (#8630) * Fixes circuit printing for generators and emitter (#8613) * Automatic changelog update * Fix nullable error (#8632) * Prevent inflatables from being placed on walls/doors (#8624) * Check if tile is blocked * Move check to IsTileClear * Automatic changelog update * Don't cancel pulling a corpse because the player ghosted (#8621) * Check if pullable is dead * Update SharedPullableSystem.cs Co-authored-by: wrexbe <81056464+wrexbe@users.noreply.github.com> * Automatic changelog update * Revolver fix (again) (#8635) * Gun spread overlay (#8588) * Fixes ID/Names for Sterile masks / latex gloves. Adds nitrile glove box (#8607) * fixes box ID/names for mask and gloves. Adds nitrile box * map update for ID change * crate fills fix * Automatic changelog update * Change map prototype for gloves/mask * Fix shotgun spent visuals (#8639) * Make shift laser gun (#8125) * Added the TechFabCircuitboards and made them spawn in the head's lockers * Added the construction graph for makeshift laser * Added the construction graph to the yml of makeshiftlaser * Resolving branching issues * resolving branching issues * resolving branching issues * Small fixes * Update battery_guns.yml * Update battery_guns.yml * Update battery_guns.yml Co-authored-by: wrexbe Co-authored-by: wrexbe <81056464+wrexbe@users.noreply.github.com> * Automatic changelog update * LMG nerf (#8637) * Fix docking fixture crash (#8640) * Automatic changelog update * Missing nullables (#8634) * Refactor magvisualizer (#8568) * Fix comms consoles not working (#8644) Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: metalgearsloth * Automatic changelog update * update * Revert "update" This reverts commit bab6c6ca01a5d8a17c12154feb9a536afd178139. * Marathon Update 1.8 (#8647) * Add files via upload * Name sec medical camera Co-authored-by: wrexbe * Fix floor tile lattice bug (#8653) * Set subfloor sprites to invisible by default (#8571) * Set subfloor sprites to invisible by default * s * Revert "s" This reverts commit 3ed9c3c8185ddda16cb9e82bd72c313e9a741dfa. * Give post-lights interaction outlines (#8656) they were missing. * Automatic changelog update * More nullable component fixes (#8659) * Remove .ToArray() allocations from StepTriggerSystem Update (#8658) * Add a merge conflict check. (#8626) * Add a merge conflict check. This is directly copied from https://github.com/wixoaGit/OpenDream/pull/648 * Update .github/workflows/conflict-labeler.yml Co-authored-by: ike709 Co-authored-by: ike709 * Buff crates (#8622) * Set PDA music user to allow OnMidiEventRx to send the sound to other players (#8580) * Automatic changelog update * Iconsmoothing: Subtile metrics (🦆 Edition) (#8307) * Remove emitter hitsound (#8666) * Automatic changelog update * Stop NPCs steering around non-hard fixtures (#8668) * Automatic changelog update * Add editor copy keybinding (#8369) * Automatic changelog update * Anchorable popups (#8667) * Automatic changelog update * Spread items when dumping contents out of a bag (#8678) Co-authored-by: Kara * Automatic changelog update * Port stethoscopes + innate verbs from nyano (#8228) * port stethoscopes from nyanotrasen * remove mono crash wtf * don't touch puddle * Switch to using action * both verb and action * Address reviews * Automatic changelog update * Update submodule * Remove Shuttle Powering Crate from cargo catalogue (#8664) * Automatic changelog update * Muted status effect + 2 reagent sources of it (#8673) * Automatic changelog update * Fix dual port vents 2: Electric Boogaloo (#8396) * Remove "nogga black" (#8684) * Update submodule * use matrix CreateTransform (#8687) * chr (#8674) * weh Multiplies the amount of power used by the battery guns, triple-ish for the laser cannon and a fuckton more for the xray * chr chr * Update chair.yml * Update chairs.yml * Revert submodule * Opt-in nukies (#8541) * save changes * naming rules * changes * changes * last touches * e * use default * better looping * better prototype ig * f * c * Revert "changes" This reverts commit 111a7f36 * fuck i'm bad at git * changes * mfw * e * e * Change default preset to secret (#8694) It gets voted for at the start every time anyway and traitor isn't even voteable. * Automatic changelog update * Syndicate Names (#8692) * Syndicate Names * Update syndicate.yml * Update NukeopsRuleSystem.cs Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> * Automatic changelog update * Fix roundstart audio * Fix some friend access violations by allowing others access. (#8594) Rename Friend attribute to Access attribute. Updates submodule to v0.21.0.0 as well. * Revert "Fix some friend access violations by allowing others access. (#8594) (#8703) * Revert "Revert "Fix some friend access violations by allowing others access. (#8594) (#8703)" (working this time) (#8704) * ConstructionSystem handles InteractUsing before AnchorableSystem. (#8700) * Automatic changelog update * buffs tables and counters (#8698) 25 (+10) health for metal, 15 for wood * Automatic changelog update * Clear cancel token on failed use (#8705) * Bagel Update 13.7 (#8690) * fuck shit ass shit * Add files via upload * blurgy bop boo botto (#8689) * Automatic changelog update * Fix mind unvisit crash (#8682) * Add loc strings and completions to mapping command (#8726) * fix match-matchbox interaction (#8715) * Automatic changelog update * Fix character ui crash (#8717) * Update wires-component.ftl (#8714) * Automatic changelog update * Atlas: The Video Game (Update 2.0) (#8725) * Update some nugets (#8738) * Device network DeviceLists and the NetworkConfigurator (Makes air alarms usable) (#7697) * Implement DeviceList Implement NetworkConfigurator I sould really get into the habit of making smaller commits * Remove ApcNetworkComponent from vents, scrubbers anf firelocks * Change BeforeBroadcastAttemptEvent#Recepients to readonly IReadonlySet and add a ModifiedRecepients field * Address revievs in NetworkConfigurationSystem * Fix red and green button styles * Change NetworkConfiguratorSystem#UpdateState to remove saved entites that don't exist anymore * Add AtmosDevices device net id * Add const strings for style classes Fix wrong margin for NetworkConfiguratorConfigurationMenu * Hello? Github? * Add access check before opening the configuration ui * Address reviews * Fix call to access reader * You shall not live again IgnoreComponent * Fix interaction verb check * Fix configuration window not closing when target gets deleted / out of range * Change device is already saved message to say 'network device: ... is already saves' * Apply suggestions from code review Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> * Fix applied suggestion Co-authored-by: wrexbe <81056464+wrexbe@users.noreply.github.com> Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> * Automatic changelog update * Fix friend -> Access for some components * Nuget fix (#8742) * Add default lag (#8739) * Add whitelist to captain/hop pda (#8746) * Automatic changelog update Co-authored-by: metalgearsloth Co-authored-by: Pieter-Jan Briers Co-authored-by: PJBot Co-authored-by: Moony Co-authored-by: Emisse <99158783+Emisse@users.noreply.github.com> Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Co-authored-by: wrexbe <81056464+wrexbe@users.noreply.github.com> Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: wrexbe Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com> Co-authored-by: EmoGarbage404 <98561806+EmoGarbage404@users.noreply.github.com> Co-authored-by: TimrodDX Co-authored-by: Veritius Co-authored-by: Peptide90 <78795277+Peptide90@users.noreply.github.com> Co-authored-by: Flipp Syder <76629141+vulppine@users.noreply.github.com> Co-authored-by: 20kdc Co-authored-by: efzapa <102577236+efzapa@users.noreply.github.com> Co-authored-by: Morbo <14136326+Morb0@users.noreply.github.com> Co-authored-by: ShuttleEnjoyer <100040020+youarereadingthis@users.noreply.github.com> Co-authored-by: DrSmugleaf Co-authored-by: themias <89101928+themias@users.noreply.github.com> Co-authored-by: Kara Co-authored-by: T-Stalker Co-authored-by: T-Stalker <43253663+DogZeroX@users.noreply.github.com> Co-authored-by: ElectroJr Co-authored-by: metalgearsloth Co-authored-by: ike709 Co-authored-by: ike709 Co-authored-by: Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com> Co-authored-by: Ripmorld <60119809+UKNOWH@users.noreply.github.com> Co-authored-by: Visne <39844191+Visne@users.noreply.github.com> Co-authored-by: WilliamECrew <70368805+WilliamECrew@users.noreply.github.com> Co-authored-by: Pancake Co-authored-by: lapatison <100279397+lapatison@users.noreply.github.com> Co-authored-by: Julian Giebel --- .run/Content Server+Client.run.xml | 7 + Content.Benchmarks/Content.Benchmarks.csproj | 2 +- .../CharacterInterfaceSystem.cs | 20 +- Content.Client/Content.Client.csproj | 2 +- Content.Client/DoAfter/DoAfterComponent.cs | 2 +- .../Explosion/TriggerOnProximityComponent.cs | 2 +- Content.Client/Flash/FlashableComponent.cs | 2 +- Content.Client/Hands/HandsComponent.cs | 2 +- .../Inventory/ClientInventoryComponent.cs | 3 +- .../Components/HandheldLightComponent.cs | 2 +- .../Movement/Components/ClimbableComponent.cs | 2 +- .../Movement/Components/ClimbingComponent.cs | 2 +- .../NetworkConfiguratorBoundUserInterface.cs | 73 +++++ .../NetworkConfiguratorConfigurationMenu.xaml | 17 ++ ...tworkConfiguratorConfigurationMenu.xaml.cs | 22 ++ .../NetworkConfiguratorListMenu.xaml | 18 ++ .../NetworkConfiguratorListMenu.xaml.cs | 67 +++++ Content.Client/Stack/StackComponent.cs | 2 +- Content.Client/Stylesheets/StyleNano.cs | 57 +++- .../Tools/Components/WelderComponent.cs | 2 +- Content.Client/Viewport/ScalingViewport.cs | 9 +- .../Components/MagazineVisualsComponent.cs | 2 +- .../Components/SpentAmmoVisualsComponent.cs | 2 +- .../Content.IntegrationTests.csproj | 4 +- .../Content.MapRenderer.csproj | 3 +- .../Content.Server.Database.csproj | 6 +- .../Pathfinding/GridPathfindingComponent.cs | 2 +- .../Components/BufferingComponent.cs | 2 +- .../Advertise/AdvertiseComponent.cs | 2 +- .../Animals/Components/UdderComponent.cs | 2 +- .../Trinary/Components/GasMixerComponent.cs | 2 +- .../Components/GasOutletInjectorComponent.cs | 2 +- .../Components/GasVentScrubberComponent.cs | 2 +- Content.Server/Atmos/TileAtmosphere.cs | 5 +- .../Body/Components/BloodstreamComponent.cs | 3 +- .../Body/Components/BrainComponent.cs | 2 +- .../Body/Components/LungComponent.cs | 4 +- .../Body/Components/MetabolizerComponent.cs | 3 +- .../Body/Components/RespiratorComponent.cs | 2 +- .../Body/Components/StomachComponent.cs | 2 +- .../Components/ThermalRegulatorComponent.cs | 2 +- .../Botany/Components/LogComponent.cs | 2 +- .../Botany/Components/ProduceComponent.cs | 2 +- .../Botany/Components/SeedComponent.cs | 2 +- .../Components/SeedExtractorComponent.cs | 2 +- Content.Server/Botany/SeedPrototype.cs | 2 +- .../Cargo/Components/CargoTelepadComponent.cs | 2 +- .../SolutionContainerManagerComponent.cs | 3 +- .../Climbing/Components/ClimbingComponent.cs | 2 +- .../Components/GlassTableComponent.cs | 2 +- .../Components/ConstructionComponent.cs | 2 +- .../ConstructionSystem.Interactions.cs | 3 +- Content.Server/Content.Server.csproj | 2 +- Content.Server/Conveyor/ConveyorComponent.cs | 2 +- .../Components/DamageOtherOnHitComponent.cs | 2 +- .../Components/ApcNetworkComponent.cs | 2 +- .../Components/DeviceListComponent.cs | 28 ++ .../Components/DeviceNetworkComponent.cs | 11 +- .../Devices/ApcNetSwitchComponent.cs | 2 +- .../NetworkConfiguratorComponent.cs | 24 ++ .../DeviceNetwork/Systems/DeviceListSystem.cs | 93 ++++++ .../Systems/DeviceNetworkSystem.cs | 43 ++- .../Systems/NetworkConfiguratorSystem.cs | 284 ++++++++++++++++++ Content.Server/Dice/DiceComponent.cs | 2 +- Content.Server/DoAfter/DoAfterComponent.cs | 2 +- .../Components/ElectrocutionComponent.cs | 2 +- .../Components/ClusterGrenadeComponent.cs | 2 +- .../ExplosionResistanceComponent.cs | 2 +- .../Extinguisher/FireExtinguisherComponent.cs | 2 +- .../Flash/Components/FlashComponent.cs | 2 +- .../Components/FlashImmunityComponent.cs | 2 +- .../Flash/Components/FlashableComponent.cs | 2 +- .../Fluids/Components/AbsorbentComponent.cs | 2 +- .../Fluids/Components/EvaporationComponent.cs | 2 +- .../Components/FluidSpreaderComponent.cs | 2 +- .../Fluids/Components/PuddleComponent.cs | 2 +- .../Fluids/Components/SprayComponent.cs | 3 +- .../GameTicking/Commands/MappingCommand.cs | 52 +++- .../GameTicking/Rules/NukeopsRuleSystem.cs | 114 ++++++- .../Components/GatherableComponent.cs | 6 +- .../Roles/Components/GhostRoleComponent.cs | 5 +- .../Gravity/GravityGeneratorComponent.cs | 2 +- .../HealthExaminableComponent.cs | 2 +- .../Components/InteractionPopupComponent.cs | 2 +- Content.Server/Jobs/AddComponentSpecial.cs | 2 +- .../Components/ExtractableComponent.cs | 2 +- .../Components/KitchenSpikeComponent.cs | 2 +- Content.Server/Kudzu/SpreaderComponent.cs | 2 +- .../Components/EmergencyLightComponent.cs | 2 +- .../Components/HandheldLightComponent.cs | 2 +- .../Light/Components/LightBulbComponent.cs | 2 +- .../Light/Components/LitOnPoweredComponent.cs | 2 +- .../Light/Components/MatchstickComponent.cs | 2 +- .../Light/Components/PoweredLightComponent.cs | 2 +- .../Light/EntitySystems/MatchboxSystem.cs | 7 +- .../Components/SignalReceiverComponent.cs | 2 +- .../Components/SignalTransmitterComponent.cs | 3 +- .../CrewMonitoringConsoleComponent.cs | 2 +- .../SuitSensors/SuitSensorComponent.cs | 2 +- .../Mind/Components/MindComponent.cs | 3 +- Content.Server/Mind/Mind.cs | 27 +- Content.Server/Nuke/NukeComponent.cs | 2 +- .../Nutrition/Components/CigarComponent.cs | 2 +- .../Nutrition/Components/DrinkComponent.cs | 2 +- .../Nutrition/Components/FoodComponent.cs | 2 +- .../Components/ForcefeedOnCollideComponent.cs | 2 +- .../Components/IngestionBlockerComponent.cs | 2 +- .../Components/SliceableFoodComponent.cs | 2 +- .../Nutrition/Components/SmokableComponent.cs | 2 +- .../Nutrition/Components/UtensilComponent.cs | 2 +- .../Payload/EntitySystems/PayloadSystem.cs | 2 +- .../Components/PottedPlantHideComponent.cs | 2 +- .../Components/RandomPottedPlantComponent.cs | 2 +- .../PneumaticCannonComponent.cs | 2 +- .../Components/RoguePointingArrowComponent.cs | 2 +- .../Power/Components/ApcComponent.cs | 2 +- .../Power/Components/CableComponent.cs | 2 +- .../ExtensionCableProviderComponent.cs | 2 +- .../ExtensionCableReceiverComponent.cs | 2 +- .../RandomAppearanceComponent.cs | 2 +- .../Components/RecyclableComponent.cs | 2 +- .../Recycling/Components/RecyclerComponent.cs | 2 +- Content.Server/Remotes/DoorRemoteComponent.cs | 2 +- .../Resist/ResistLockerComponent.cs | 2 +- .../Shuttles/Components/ThrusterComponent.cs | 2 +- .../Components/RadiationCollectorComponent.cs | 2 +- .../Solar/Components/SolarPanelComponent.cs | 2 +- Content.Server/Stack/StackComponent.cs | 2 +- .../Components/BecomesStationComponent.cs | 2 +- .../Components/PartOfStationComponent.cs | 2 +- .../Components/StationDataComponent.cs | 2 +- .../Components/StationJobsComponent.cs | 2 +- .../Components/StationMemberComponent.cs | 2 +- .../Components/StationSpawningComponent.cs | 2 +- .../Components/SecretStashComponent.cs | 2 +- .../Components/StorageFillComponent.cs | 2 +- Content.Server/Strip/StrippableComponent.cs | 2 +- .../Components/StunOnCollideComponent.cs | 2 +- .../Components/SurveillanceCameraComponent.cs | 2 +- .../SurveillanceCameraMonitorComponent.cs | 2 +- .../Components/TabletopGameComponent.cs | 2 +- .../Components/TabletopGamerComponent.cs | 2 +- .../Tools/Components/WeldableComponent.cs | 2 +- Content.Server/Tools/ToolSystem.TilePrying.cs | 5 +- .../IncreaseDamageOnWieldComponent.cs | 2 +- .../Components/WieldableComponent.cs | 2 +- .../Access/Components/AccessComponent.cs | 3 +- .../Access/Components/IdCardComponent.cs | 4 +- Content.Shared/Actions/ActionsComponent.cs | 3 +- .../Administration/AdminFrozenComponent.cs | 2 +- Content.Shared/CCVar/CCVars.cs | 2 +- .../Components/HumanoidAppearanceComponent.cs | 2 +- .../TypingIndicatorComponent.cs | 2 +- .../ClothingSpeedModifierComponent.cs | 2 +- .../Components/AttachedClothingComponent.cs | 2 +- .../Components/ToggleableClothingComponent.cs | 2 +- .../Components/AnchorableComponent.cs | 2 +- .../Steps/MaterialConstructionGraphStep.cs | 4 +- .../Containers/ItemSlot/ItemSlotsComponent.cs | 6 +- Content.Shared/Content.Shared.csproj | 2 +- .../Crayon/SharedCrayonComponent.cs | 2 +- .../Damage/Components/DamageableComponent.cs | 8 +- Content.Shared/Decals/DecalGridComponent.cs | 2 +- .../NetworkConfiguratorUIMessages.cs | 54 ++++ .../NetworkConfiguratorUserInterfaceState.cs | 14 + .../Electrocution/InsulatedComponent.cs | 2 +- Content.Shared/Entry/EntryPoint.cs | 34 +-- .../Flash/SharedFlashableComponent.cs | 2 +- Content.Shared/Foldable/FoldableComponent.cs | 2 +- .../Follower/Components/FollowedComponent.cs | 2 +- .../Follower/Components/FollowerComponent.cs | 2 +- .../Friction/TileFrictionModifier.cs | 2 +- .../Instruments/SharedInstrumentComponent.cs | 3 +- .../Jittering/JitteringComponent.cs | 2 +- .../Component/RgbLightControllerComponent.cs | 2 +- .../MovementSpeedModifierComponent.cs | 2 +- .../Nutrition/Components/CreamPieComponent.cs | 2 +- .../Components/CreamPiedComponent.cs | 2 +- .../Carrying/CarryingSlowdownComponent.cs | 2 +- .../Pinpointer/PinpointerComponent.cs | 2 +- .../Placeable/PlaceableSurfaceComponent.cs | 2 +- .../Pulling/Components/PullableComponent.cs | 3 +- .../Components/SharedPullerComponent.cs | 2 +- Content.Shared/Stacks/SharedStackComponent.cs | 2 +- .../Standing/StandingStateComponent.cs | 2 +- .../StatusEffect/StatusEffectsComponent.cs | 2 +- .../StepTrigger/StepTriggerComponent.cs | 4 +- .../Components/ItemCounterComponent.cs | 2 +- .../Storage/Components/ItemMapperComponent.cs | 2 +- .../Stunnable/KnockedDownComponent.cs | 2 +- .../Stunnable/SlowedDownComponent.cs | 2 +- Content.Shared/Stunnable/StunnedComponent.cs | 2 +- .../SubFloor/SubFloorHideComponent.cs | 3 +- Content.Shared/Tag/TagComponent.cs | 3 +- Content.Tests/Content.Tests.csproj | 4 +- Content.Tools/Content.Tools.csproj | 2 +- Content.YAMLLinter/Content.YAMLLinter.csproj | 4 + Pow3r/Pow3r.csproj | 6 +- Resources/Changelog/Changelog.yml | 100 +++--- .../en-US/devices/network-configurator.ftl | 22 ++ .../Locale/en-US/mapping/mapping-command.ftl | 18 ++ .../wires/components/wires-component.ftl | 2 +- .../Prototypes/Catalog/uplink_catalog.yml | 9 + Resources/Prototypes/Datasets/Names/chair.yml | 5 + .../Prototypes/Datasets/Names/syndicate.yml | 55 ++++ .../Entities/Objects/Devices/pda.yml | 6 + .../Entities/Objects/Tools/tools.yml | 8 + .../Structures/Doors/Airlocks/airlocks.yml | 18 ++ .../Structures/Doors/Firelocks/firelock.yml | 3 +- .../Structures/Furniture/Tables/tables.yml | 20 +- .../Entities/Structures/Furniture/chairs.yml | 2 + .../Structures/Piping/Atmospherics/unary.yml | 6 +- .../Structures/Wallmounts/air_alarm.yml | 6 +- .../Structures/Wallmounts/fire_alarm.yml | 2 +- Resources/Prototypes/Roles/Antags/nukeops.yml | 13 + Resources/Prototypes/round_announcements.yml | 1 + Resources/Prototypes/species.yml | 8 + RobustToolbox | 2 +- 218 files changed, 1455 insertions(+), 338 deletions(-) create mode 100644 .run/Content Server+Client.run.xml create mode 100644 Content.Client/NetworkConfigurator/NetworkConfiguratorBoundUserInterface.cs create mode 100644 Content.Client/NetworkConfigurator/NetworkConfiguratorConfigurationMenu.xaml create mode 100644 Content.Client/NetworkConfigurator/NetworkConfiguratorConfigurationMenu.xaml.cs create mode 100644 Content.Client/NetworkConfigurator/NetworkConfiguratorListMenu.xaml create mode 100644 Content.Client/NetworkConfigurator/NetworkConfiguratorListMenu.xaml.cs create mode 100644 Content.Server/DeviceNetwork/Components/DeviceListComponent.cs create mode 100644 Content.Server/DeviceNetwork/Components/NetworkConfiguratorComponent.cs create mode 100644 Content.Server/DeviceNetwork/Systems/DeviceListSystem.cs create mode 100644 Content.Server/DeviceNetwork/Systems/NetworkConfiguratorSystem.cs create mode 100644 Content.Shared/DeviceNetwork/NetworkConfiguratorUIMessages.cs create mode 100644 Content.Shared/DeviceNetwork/NetworkConfiguratorUserInterfaceState.cs create mode 100644 Resources/Locale/en-US/devices/network-configurator.ftl create mode 100644 Resources/Locale/en-US/mapping/mapping-command.ftl create mode 100644 Resources/Prototypes/Datasets/Names/chair.yml create mode 100644 Resources/Prototypes/Datasets/Names/syndicate.yml create mode 100644 Resources/Prototypes/Roles/Antags/nukeops.yml diff --git a/.run/Content Server+Client.run.xml b/.run/Content Server+Client.run.xml new file mode 100644 index 00000000000..4ba50d81900 --- /dev/null +++ b/.run/Content Server+Client.run.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Content.Benchmarks/Content.Benchmarks.csproj b/Content.Benchmarks/Content.Benchmarks.csproj index 4db67a4c60b..eec2f80d655 100644 --- a/Content.Benchmarks/Content.Benchmarks.csproj +++ b/Content.Benchmarks/Content.Benchmarks.csproj @@ -11,7 +11,7 @@ 10 - + diff --git a/Content.Client/CharacterInterface/CharacterInterfaceSystem.cs b/Content.Client/CharacterInterface/CharacterInterfaceSystem.cs index 1213093b8f3..09a17e74597 100644 --- a/Content.Client/CharacterInterface/CharacterInterfaceSystem.cs +++ b/Content.Client/CharacterInterface/CharacterInterfaceSystem.cs @@ -81,13 +81,18 @@ private void OnPlayerAttached(EntityUid uid, CharacterInterfaceComponent comp, P return; _gameHud.CharacterButtonVisible = true; - _gameHud.CharacterButtonToggled += b => - { - if (b) - comp.Window.OpenCentered(); - else - comp.Window.Close(); - }; + _gameHud.CharacterButtonToggled += ToggleWindow; + } + + private void ToggleWindow(bool toggle) + { + if (!TryComp(_playerManager.LocalPlayer?.Session?.AttachedEntity, out CharacterInterfaceComponent? comp)) + return; + + if (toggle) + comp.Window?.OpenCentered(); + else + comp.Window?.Close(); } private void OnPlayerDetached(EntityUid uid, CharacterInterfaceComponent comp, PlayerDetachedEvent args) @@ -96,6 +101,7 @@ private void OnPlayerDetached(EntityUid uid, CharacterInterfaceComponent comp, P return; _gameHud.CharacterButtonVisible = false; + _gameHud.CharacterButtonToggled -= ToggleWindow; comp.Window.Close(); } diff --git a/Content.Client/Content.Client.csproj b/Content.Client/Content.Client.csproj index 92b0d114975..4065ffe7c80 100644 --- a/Content.Client/Content.Client.csproj +++ b/Content.Client/Content.Client.csproj @@ -14,7 +14,7 @@ - + diff --git a/Content.Client/DoAfter/DoAfterComponent.cs b/Content.Client/DoAfter/DoAfterComponent.cs index b7da92698e5..6123b0729ad 100644 --- a/Content.Client/DoAfter/DoAfterComponent.cs +++ b/Content.Client/DoAfter/DoAfterComponent.cs @@ -3,7 +3,7 @@ namespace Content.Client.DoAfter { - [RegisterComponent, Friend(typeof(DoAfterSystem))] + [RegisterComponent, Access(typeof(DoAfterSystem))] public sealed class DoAfterComponent : SharedDoAfterComponent { public readonly Dictionary DoAfters = new(); diff --git a/Content.Client/Explosion/TriggerOnProximityComponent.cs b/Content.Client/Explosion/TriggerOnProximityComponent.cs index e185c7948e3..888b8ec0048 100644 --- a/Content.Client/Explosion/TriggerOnProximityComponent.cs +++ b/Content.Client/Explosion/TriggerOnProximityComponent.cs @@ -2,5 +2,5 @@ namespace Content.Client.Explosion; -[RegisterComponent, Friend(typeof(TriggerSystem))] +[RegisterComponent, Access(typeof(TriggerSystem))] public sealed class TriggerOnProximityComponent : SharedTriggerOnProximityComponent {} diff --git a/Content.Client/Flash/FlashableComponent.cs b/Content.Client/Flash/FlashableComponent.cs index e843daff231..714d2d7c1c6 100644 --- a/Content.Client/Flash/FlashableComponent.cs +++ b/Content.Client/Flash/FlashableComponent.cs @@ -5,7 +5,7 @@ namespace Content.Client.Flash { [ComponentReference(typeof(SharedFlashableComponent))] - [RegisterComponent, Friend(typeof(FlashSystem))] + [RegisterComponent, Access(typeof(FlashSystem))] public sealed class FlashableComponent : SharedFlashableComponent { } diff --git a/Content.Client/Hands/HandsComponent.cs b/Content.Client/Hands/HandsComponent.cs index 36a15f14409..1e0b923046d 100644 --- a/Content.Client/Hands/HandsComponent.cs +++ b/Content.Client/Hands/HandsComponent.cs @@ -4,7 +4,7 @@ namespace Content.Client.Hands { [RegisterComponent] [ComponentReference(typeof(SharedHandsComponent))] - [Friend(typeof(HandsSystem))] + [Access(typeof(HandsSystem))] public sealed class HandsComponent : SharedHandsComponent { /// diff --git a/Content.Client/Inventory/ClientInventoryComponent.cs b/Content.Client/Inventory/ClientInventoryComponent.cs index 62cb66cced1..ef10eaf468e 100644 --- a/Content.Client/Inventory/ClientInventoryComponent.cs +++ b/Content.Client/Inventory/ClientInventoryComponent.cs @@ -16,7 +16,7 @@ namespace Content.Client.Inventory /// [RegisterComponent] [ComponentReference(typeof(InventoryComponent))] - [Friend(typeof(ClientInventorySystem))] + [Access(typeof(ClientInventorySystem))] public sealed class ClientInventoryComponent : InventoryComponent { public Control BottomLeftButtons = default!; @@ -34,6 +34,7 @@ public sealed class ClientInventoryComponent : InventoryComponent /// Data about the current layers that have been added to the players sprite due to the items in each equipment slot. /// [ViewVariables] + [Access(typeof(ClientInventorySystem), Other = AccessPermissions.ReadWriteExecute)] // FIXME Friends public readonly Dictionary> VisualLayerKeys = new(); public bool AttachedToGameHud; diff --git a/Content.Client/Light/Components/HandheldLightComponent.cs b/Content.Client/Light/Components/HandheldLightComponent.cs index c6bccac9410..0a5f43ea938 100644 --- a/Content.Client/Light/Components/HandheldLightComponent.cs +++ b/Content.Client/Light/Components/HandheldLightComponent.cs @@ -9,7 +9,7 @@ namespace Content.Client.Light.Components { [RegisterComponent] - [Friend(typeof(HandheldLightSystem))] + [Access(typeof(HandheldLightSystem))] public sealed class HandheldLightComponent : SharedHandheldLightComponent, IItemStatus { public byte? Level; diff --git a/Content.Client/Movement/Components/ClimbableComponent.cs b/Content.Client/Movement/Components/ClimbableComponent.cs index dd06d529695..730c3336930 100644 --- a/Content.Client/Movement/Components/ClimbableComponent.cs +++ b/Content.Client/Movement/Components/ClimbableComponent.cs @@ -3,6 +3,6 @@ namespace Content.Client.Movement.Components; [RegisterComponent] -[Friend(typeof(ClimbSystem))] +[Access(typeof(ClimbSystem))] [ComponentReference(typeof(SharedClimbableComponent))] public sealed class ClimbableComponent : SharedClimbableComponent { } diff --git a/Content.Client/Movement/Components/ClimbingComponent.cs b/Content.Client/Movement/Components/ClimbingComponent.cs index 7891a6ee213..e68592bd770 100644 --- a/Content.Client/Movement/Components/ClimbingComponent.cs +++ b/Content.Client/Movement/Components/ClimbingComponent.cs @@ -3,6 +3,6 @@ namespace Content.Client.Movement.Components; [RegisterComponent] -[Friend(typeof(ClimbSystem))] +[Access(typeof(ClimbSystem))] [ComponentReference(typeof(SharedClimbingComponent))] public sealed class ClimbingComponent : SharedClimbingComponent { } diff --git a/Content.Client/NetworkConfigurator/NetworkConfiguratorBoundUserInterface.cs b/Content.Client/NetworkConfigurator/NetworkConfiguratorBoundUserInterface.cs new file mode 100644 index 00000000000..fffe60c9fd8 --- /dev/null +++ b/Content.Client/NetworkConfigurator/NetworkConfiguratorBoundUserInterface.cs @@ -0,0 +1,73 @@ +using Content.Shared.DeviceNetwork; +using JetBrains.Annotations; +using Robust.Client.GameObjects; + +namespace Content.Client.NetworkConfigurator; + +public sealed class NetworkConfiguratorBoundUserInterface : BoundUserInterface +{ + private NetworkConfiguratorListMenu? _listMenu; + private NetworkConfiguratorConfigurationMenu? _configurationMenu; + + public NetworkConfiguratorBoundUserInterface(ClientUserInterfaceComponent owner, object uiKey) : base(owner, uiKey) + { + } + + public void OnRemoveButtonPressed(string address) + { + SendMessage(new NetworkConfiguratorRemoveDeviceMessage(address)); + } + + protected override void Open() + { + base.Open(); + + switch (UiKey) + { + case NetworkConfiguratorUiKey.List: + _listMenu = new NetworkConfiguratorListMenu(this); + _listMenu.OnClose += Close; + _listMenu.ClearButton.OnPressed += _ => OnClearButtonPressed(); + _listMenu.OpenCentered(); + break; + case NetworkConfiguratorUiKey.Configure: + _configurationMenu = new NetworkConfiguratorConfigurationMenu(); + _configurationMenu.OnClose += Close; + _configurationMenu.Set.OnPressed += _ => OnConfigButtonPressed(NetworkConfiguratorButtonKey.Set); + _configurationMenu.Add.OnPressed += _ => OnConfigButtonPressed(NetworkConfiguratorButtonKey.Add); + //_configurationMenu.Edit.OnPressed += _ => OnConfigButtonPressed(NetworkConfiguratorButtonKey.Edit); + _configurationMenu.Clear.OnPressed += _ => OnConfigButtonPressed(NetworkConfiguratorButtonKey.Clear); + _configurationMenu.Copy.OnPressed += _ => OnConfigButtonPressed(NetworkConfiguratorButtonKey.Copy); + _configurationMenu.Show.OnPressed += _ => OnConfigButtonPressed(NetworkConfiguratorButtonKey.Show); + _configurationMenu.OpenCentered(); + break; + } + } + + protected override void UpdateState(BoundUserInterfaceState state) + { + base.UpdateState(state); + + var castState = (NetworkConfiguratorUserInterfaceState) state; + _listMenu?.UpdateState(castState); + } + + protected override void Dispose(bool disposing) + { + base.Dispose(disposing); + if (!disposing) return; + + _listMenu?.Dispose(); + _configurationMenu?.Dispose(); + } + + private void OnClearButtonPressed() + { + SendMessage(new NetworkConfiguratorClearDevicesMessage()); + } + + private void OnConfigButtonPressed(NetworkConfiguratorButtonKey buttonKey) + { + SendMessage(new NetworkConfiguratorButtonPressedMessage(buttonKey)); + } +} diff --git a/Content.Client/NetworkConfigurator/NetworkConfiguratorConfigurationMenu.xaml b/Content.Client/NetworkConfigurator/NetworkConfiguratorConfigurationMenu.xaml new file mode 100644 index 00000000000..0c1affe6a3f --- /dev/null +++ b/Content.Client/NetworkConfigurator/NetworkConfiguratorConfigurationMenu.xaml @@ -0,0 +1,17 @@ + + + + + + + diff --git a/Content.Client/NetworkConfigurator/NetworkConfiguratorListMenu.xaml.cs b/Content.Client/NetworkConfigurator/NetworkConfiguratorListMenu.xaml.cs new file mode 100644 index 00000000000..e32db2a5196 --- /dev/null +++ b/Content.Client/NetworkConfigurator/NetworkConfiguratorListMenu.xaml.cs @@ -0,0 +1,67 @@ +using Content.Client.UserInterface; +using Content.Shared.DeviceNetwork; +using Robust.Client.AutoGenerated; +using Robust.Client.UserInterface.Controls; +using Robust.Client.UserInterface.XAML; + +namespace Content.Client.NetworkConfigurator; + +[GenerateTypedNameReferences] +public sealed partial class NetworkConfiguratorListMenu : FancyWindow +{ + private readonly NetworkConfiguratorBoundUserInterface _ui; + public NetworkConfiguratorListMenu(NetworkConfiguratorBoundUserInterface ui) + { + RobustXamlLoader.Load(this); + + _ui = ui; + } + + public void UpdateState(NetworkConfiguratorUserInterfaceState state) + { + DeviceCountLabel.Text = Loc.GetString("network-configurator-ui-count-label", ("count", state.DeviceList.Count)); + DeviceList.RemoveAllChildren(); + + foreach (var savedDevice in state.DeviceList) + { + DeviceList.AddChild(BuildDeviceListRow(savedDevice)); + } + } + + private BoxContainer BuildDeviceListRow((string address, string name) savedDevice) + { + var row = new BoxContainer() + { + Orientation = BoxContainer.LayoutOrientation.Horizontal, + Margin = new Thickness(8) + }; + + var name = new Label() + { + Text = savedDevice.name[..Math.Min(11, savedDevice.name.Length)], + SetWidth = 84 + }; + + var address = new Label() + { + Text = savedDevice.address, + HorizontalExpand = true, + Align = Label.AlignMode.Center + }; + + var removeButton = new TextureButton() + { + StyleClasses = { "CrossButtonRed" }, + VerticalAlignment = VAlignment.Center, + Scale = new Vector2(0.5f, 0.5f) + }; + + removeButton.OnPressed += _ => _ui.OnRemoveButtonPressed(savedDevice.address); + + row.AddChild(name); + row.AddChild(address); + row.AddChild(removeButton); + + return row; + } +} diff --git a/Content.Client/Stack/StackComponent.cs b/Content.Client/Stack/StackComponent.cs index 9f0b8e803e5..8bf098de64d 100644 --- a/Content.Client/Stack/StackComponent.cs +++ b/Content.Client/Stack/StackComponent.cs @@ -8,7 +8,7 @@ namespace Content.Client.Stack { - [RegisterComponent, Friend(typeof(StackSystem), typeof(StatusControl))] + [RegisterComponent, Access(typeof(StackSystem), typeof(StatusControl))] [ComponentReference(typeof(SharedStackComponent))] public sealed class StackComponent : SharedStackComponent, IItemStatus { diff --git a/Content.Client/Stylesheets/StyleNano.cs b/Content.Client/Stylesheets/StyleNano.cs index 33aa7ba2bfd..c2333d5171c 100644 --- a/Content.Client/Stylesheets/StyleNano.cs +++ b/Content.Client/Stylesheets/StyleNano.cs @@ -39,6 +39,7 @@ public static Font NotoStack(this IResourceCache resCache, string variation = "R } } + public sealed class StyleNano : StyleBase { public const string StyleClassBorderedWindowPanel = "BorderedWindowPanel"; @@ -93,6 +94,9 @@ public sealed class StyleNano : StyleBase public static readonly Color ButtonColorCautionPressed = Color.FromHex("#3e6c45"); public static readonly Color ButtonColorCautionDisabled = Color.FromHex("#602a2a"); + public static readonly Color ButtonColorGoodDefault = Color.FromHex("#3E6C45"); + public static readonly Color ButtonColorGoodHovered = Color.FromHex("#31843E"); + // Context menu button colors public static readonly Color ButtonColorContext = Color.FromHex("#1119"); public static readonly Color ButtonColorContextHover = Color.DarkSlateGray; @@ -112,6 +116,14 @@ public sealed class StyleNano : StyleBase public const string StyleClassItemStatus = "ItemStatus"; + //Background + public const string StyleClassBackgroundBaseDark = "PanelBackgroundBaseDark"; + + //Buttons + public const string StyleClassCrossButtonRed = "CrossButtonRed"; + public const string StyleClassButtonColorRed = "ButtonColorRed"; + public const string StyleClassButtonColorGreen = "ButtonColorGreen"; + public override Stylesheet Stylesheet { get; } public StyleNano(IResourceCache resCache) : base(resCache) @@ -461,7 +473,7 @@ public StyleNano(IResourceCache resCache) : base(resCache) var directionIconArrowTex = resCache.GetTexture("/Textures/Interface/VerbIcons/drop.svg.192dpi.png"); var directionIconQuestionTex = resCache.GetTexture("/Textures/Interface/VerbIcons/information.svg.192dpi.png"); var directionIconHereTex = resCache.GetTexture("/Textures/Interface/VerbIcons/dot.svg.192dpi.png"); - + Stylesheet = new Stylesheet(BaseRules.Concat(new[] { // Window title. @@ -1294,8 +1306,47 @@ public StyleNano(IResourceCache resCache) : base(resCache) .Prop("panel", new StyleBoxTexture(BaseButtonOpenLeft) { Padding = default }) .Prop(Control.StylePropertyModulateSelf, Color.FromHex("#1F1F23")), - Element().Class("Inset") - .Prop("panel", insetBack), + Element().Class("WindowHeadingBackgroundLight") + .Prop("panel", new StyleBoxTexture(BaseButtonOpenLeft) { Padding = default }), + + //The lengths you have to go through to change a background color smh + Element().Class("PanelBackgroundBaseDark") + .Prop("panel", new StyleBoxTexture(BaseButtonOpenBoth) { Padding = default }) + .Prop(Control.StylePropertyModulateSelf, Color.FromHex("#1F1F23")), + + // X Texture button --- + Element().Class("CrossButtonRed") + .Prop(TextureButton.StylePropertyTexture, resCache.GetTexture("/Textures/Interface/Nano/cross.svg.png")) + .Prop(Control.StylePropertyModulateSelf, DangerousRedFore), + + Element().Class("CrossButtonRed").Pseudo(TextureButton.StylePseudoClassHover) + .Prop(Control.StylePropertyModulateSelf, Color.FromHex("#7F3636")), + + Element().Class("CrossButtonRed").Pseudo(TextureButton.StylePseudoClassHover) + .Prop(Control.StylePropertyModulateSelf, Color.FromHex("#753131")), + // --- + + // Red Button --- + Element