Commit Graph

71 Commits

Author SHA1 Message Date
Brandon Li
545cacbcae StyleNano removal: Palette system and Sheetlets (#29903)
* Apply patch 1777eea9a4..6b32bb2b14

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* make red squiggly line go away

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Add todo list

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Add palette to `TextureButton`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Rename `PalettedButtonSheetlet` to `NTButtonSheetlet` and move useful methods to `ButtonSheetlet`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* migrate `ContextMenu` styles

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Update todo

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* tweak NT colors

* New stylesheet: `InterfaceStylesheet` & `InterfaceTooltipSheetlet`

* Move inheritance of `IButtonConfig` to `NanotransenStylesheet.Buttons`

* move `MenuButtonSheetlet` & actually implement `InterfaceStylesheet` correctly

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* tweak color & update todo

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* chat is this real (update chat palette)

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Update todo

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* `SmallButton` and remove some obsolete things from `StyleNano`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* rename `StyleClasses` to `StyleClass` so `Stylesheets.Redux.StyleClasses` syntax is dead

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* replace `ButtonColorGreen` with `Positive`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* `Placeholder`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Examine popup buttons

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* move over more things & cleanup `StyleNano` more (under 1000 lines!!!!)

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Remove some more redundant stuff

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Undo style change for chat window

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* paper editing works now

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* `OptionButton` styles

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* `ListContainer`, move `DefaultWindow` styles (for now) & more cleanup

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* fix `ActionButton` not having highlighting

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* remove imports of `Robust.Client.UserInterface.StylesheetHelpers` & format

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* `ButtonBig` and more cleanup

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Move items inheriting from `ISheetletConfig` into their own directory

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Cleanup & move `Label` styles

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Action search box styles

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Moved, stuff is

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* rename `LabelSubtext` to `LabelSubText` & move more stuff (were almost there!!)

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* yap & move over MORE stuff (just like one thing left!!!)

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Change status classes to appropriate existing classes

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* remove remaining references to `StyleNano`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Fix some hardcoding & broken code, `GetFromControl`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Scrollbars!

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* chores

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* clean up `StyleClass.cs`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* `ItemListSheetlet` refactor

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* more chores!

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Consistency w/ directory structure

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Move `MainMenuSheetlet`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* `ColorPalette`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* whoopsie

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Remove most sheet-specific sheetlets

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* fix warnings, cleanup, & fix scrollbar (this is why we fix warnings boys)

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* yap

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* MASSIVE resharper skill issue

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* actually use `ISheetletConfig`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* have specific sheetlet be specific

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* `GetResourceOr`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* cleanup & move / remove `IPalette`s

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* actually do specific stylesheets correctly & fix tooltips

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* cleanup & logging

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Move `FontKind` and `FontKindExtensions` to their own files

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* rename `InterfaceStylesheet` to `SystemStylesheet`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* change `ButtonHovered` etc to `PseudoHovered` etc

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* give the palettes fun names

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* `StyleSpace` is no more

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* It should compile now! I am now going to bed (fr) if it fails it fails

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* make squiggly red line go away

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* add additional type restrictions to sheetlets

* `CommonStylesheet`

* minor cleanup

* Make `GetSheetletRules` not horrible

* wait this was duplicating style rules. oops!

* move some sheetlets to their associated xamls

* oh wait apparently that was important

* review pass 1

* review pass 2 (font & color stuff)

* review pass 3: remove unused stuff / filename fix

* fix warnings & "replace cast with explicit variable type"

* move `Palette` stuff to its own directory

* tweak colors (they're different now that I actually fixed the OKlab thing)

* review pass 4: little things

* make window close button grey before hovering

* refactor `HLine` to make it less terrible and allow it to be styled

* fix `NanoHeading` (it's been broken for a while whoops) and cleanup hardcoding

* band-aid missing references in `StyleNano`

* move `StyleBox` generating functions out of `IButtonSheetlet` into `StyleBoxHelper`

* remove dictionary field from `IStylesheetManager`

* Add check for unloaded sheetlets

* style tweaks to satisfy OCD

* I somehow missed this: `Caution` styleclass replaced with `negative`, refactor `PowerChargeWindow`

* tweak palettes for like the fourth time

* construct `StyleNano` / `StyleSpace` in `StylesheetManager` and mark them as obsolete

* rename `BackgroundPanel` classes for consistency

* tweak window / `ListContainer`

* oh right you use `///` not `/**`

* font system is bad, make it temporary

* acknowledge Divider funkyness

* remove use of class `Disabled`

* `ColorPalette` allow overriding colors with brace initialization

* review pass again

* tweak disabled button colors

* `StatusPalette` tweaks

* typo

* Make squiggly red line go away

* Delete `Redux`

* Remove all references to `Redux`

* make red less radioactive

* Store stylesheet name inside stylesheet class

* fix merge errors

* use RT's Oklab support instead

* shuffle around `StylesheetManager` fields

* apply stylesheets based off `StylesheetComponent`

* simplify `ColorPalette` construction

* add todo for `SheetletConfigType`

* `OptionButton` has a background color now

* fix disabled buttons

* sigh (red color palette fixed)

* make `ItemList` use primary palette

* Revert "apply stylesheets based off `StylesheetComponent`"

This reverts commit c05b147da845f6e04ff33d1cbd91a18a92c676d7.

* dead code removal

* buttons are green when pressed (we need togglebuttons)

---------

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
Co-authored-by: Janet Blackquill <uhhadd@gmail.com>
2025-10-19 21:10:44 +00:00
Fildrance
35d69e0f33 feat: SimpleRadial menu support for sprite-view and more extensibility (#39223) 2025-09-10 11:11:15 +03:00
Pieter-Jan Briers
0c97520276 Fix usages of TryIndex() (#39124)
* Fix usages of TryIndex()

Most usages of TryIndex() were using it incorrectly. Checking whether prototype IDs specified in prototypes actually existed before using them. This is not appropriate as it's just hiding bugs that should be getting caught by the YAML linter and other tools. (#39115)

This then resulted in TryIndex() getting modified to log errors (94f98073b0), which is incorrect as it causes false-positive errors in proper uses of the API: external data validation. (#39098)

This commit goes through and checks every call site of TryIndex() to see whether they were correct. Most call sites were replaced with the new Resolve(), which is suitable for these "defensive programming" use cases.

Fixes #39115

Breaking change: while doing this I noticed IdCardComponent and related systems were erroneously using ProtoId<AccessLevelPrototype> for job prototypes. This has been corrected.

* fix tests

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-09-09 18:17:56 +02:00
Kyle Tyo
9d22f6147c Command resolve killing, LEC conversions, and general cleanup. (#38338)
* i'm just gonna put this here.

* I'm just gonna do it.

* Update ShowHTNCommand.cs

* I feel dumb.

* may as well with this too.

* this does in fact not work

* :/
2025-06-17 20:08:12 +02:00
Tayrtahn
818d047449 Cleanup more SpriteComponent warnings (part 5) (#37590)
* 1 warning in KudzuVisualizerSystem

* 2 warnings in ChameleonProjectorSystem

* 1 warning in MarkerSystem

* 2 warnings in ItemSystem

* 1 warning in GhostToggleSelfVisibility

* 1 warning in FoamVisualizerSystem

* 1 warning in ClickableTest

* 1 warning in ThrownItemVisualizerSystem

* 2 warnings in InfantSystem

* 1 warning in ChasmFallingVisualsSystem

* 1 warning in PotencyVisualsSystem

* 2 warnings in OrbitVisualsSystem

* 2 warnings in BeamSystem

* 1 warning in JitteringSystem

* 1 warning in CardboardBoxSystem

* 2 warnings in StationAiSystem

* 2 warnings in FirelockSystem

* 2 warnings in CargoSystem.Telepad

* 1 warning in StasisBedSystem

* 2 warnings in WeldableVisualizerSystem

* 2 warnings in DeliveryVisualizerSystem

* 1 warning in TimerTriggerVisualizerSystem

* 1 warning in StorageFillVisualizerSystem

* 2 warnings in RadiationCollectorSystem

* 2 warnings in BorgSwitchableTypeSystem

* 1 warning in TurnstileSystem

* 1 warning in SurveillanceCameraVisualsSystem

* 1 warning in BurnStateVisualizerSystem

* 2 warnings in CableVisualizerSystem

* 1 warning in JetpackSystem
2025-05-19 03:09:47 +02:00
Tayrtahn
bd22361a6a Cleanup more SpriteComponent warnings (part 2) (#37527)
* Cleanup warnings in MagazineVisualsSpriteTest

* Cleanup warnings in WiresVisualizerSystem

* Cleanup warnings in GunSystem.SpentAmmo

* Cleanup warnings in GunSystem

* Cleanup warnings in GunSystem.ChamberMagazine

* Cleanup warnings in MeleeWeaponSystem.Effects

* Cleanup warnings in ToggleableLightVisualsSystem

* Cleanup warnings in StatusIconOverlay

* Cleanup warnings in SpriteFadeSystem

* Cleanup warnings in PdaVisualizerSystem

* Cleanup warnings in EnvelopeSystem

* Cleanup warnings in MechSystem

* Cleanup warnings in MappingOverlay

* Cleanup warnings in LockVisualizerSystem

* Cleanup warnings in DragDropSystem

* Cleanup warnings in GhostSystem

* Cleanup warnings in TriggerSystem.Proximity

* Cleanup warnings in DragonSystem

* Cleanup warnings in PortableScrubberVisualsSystem

* File-scoped namespace for PortableScrubberVisualsSystem
2025-05-17 13:29:03 +10:00
Winkarst
22398ea342 Cleanup: Fix field naming rule violation in `GhostComponent` (#35454)
* Fix

* Update Content.Shared/Ghost/GhostComponent.cs

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-02-24 18:48:32 +01:00
Winkarst
265de76c9a Add clientside personal pointlight for observers (#33607)
* Observer personal pointlight

* Bigger light

* combine actions

---------

Co-authored-by: Winkarst <74284083+Winkarst-cpu@users.noreply.github.co>
Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-02-05 00:26:06 +01:00
Fildrance
68b0dfbc02 Feature/make radial menu great again (#32653)
* it works! kinda

* so it works now

* minor cleanup

* central button now is useful too

* more cleanup

* minor cleanup

* more cleanup

* refactor: migrated code from toolbox (as it was rejected as too specific)

* feat: moved border drawing for radial menu into RadialMenuTextureButton. Radial menu position setting into was moved to OverrideArrange to not being called on every frame

* refactor: major reworks!

* renamed DrawBagleSector to DrawAnnulusSector

* Remove strange indexing

* Regularize math

* refactor: re-orienting segment elements to be Y-mirrored

* refactor: extracted radial menu radius multiplier property, changed color pallet for radial menu button

* refactor: removed icon backgrounds on textures used in current radial menu buttons with sectors, RadialContainer Radius renamed and now actually changed control radius.

* refactor: in RadialMenuTextureButtonWithSector all sector colors are converted to and from sRGB in property getter-setters

* refactor: renamed srgb to include Srgb suffix so devs gonna see that its srgb clearly

* fix: enabled any functional keys pressed when pushing radial menu buttons

* fix: radial menu sector now scales with UIScale

* fix: accept only one event when clicking on radial menu ContextualButton

* fix: now radial menu buttons accepts only click/alt-click, now clicks outside menu closes menu always

---------

Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
Co-authored-by: Eoin Mcloughlin <helloworld@eoinrul.es>
2025-01-23 13:16:58 +01:00
tosatur
b2a24f50dd Change text for ghost visibility button (#30998)
* add new text

* changed loc names

* fixes
2024-08-19 19:51:54 +02:00
Plykiya
d87d9c4676 Fix GhostRoleRadio icons (#30650)
Co-authored-by: plykiya <plykiya@protonmail.com>
2024-08-04 21:24:40 -04:00
Plykiya
aded74a88a Syndicate Reinforcement Specializations: Medic, Spy, Thief (#29853)
* Syndicate thief, spy, medic

* Fixes description for nukies

* update description for uplink

* Implement the radial menu

* forgot these were necessary to push lol

---------

Co-authored-by: plykiya <plykiya@protonmail.com>
2024-07-21 20:32:25 +10:00
ShadowCommander
cf45005471 Add command to toggle ghost visibility on the client (#27314)
* Add command to toggle ghost visibility on the client

* Fix description

* Fix index of arg parsing

* Allow setting GhostVisibility directly
2024-04-25 18:26:21 +02:00
Pieter-Jan Briers
68ce53ae17 Random spontaneous cleanup PR (#25131)
* Use new Subs.CVar helper

Removes manual config OnValueChanged calls, removes need to remember to manually unsubscribe.

This both reduces boilerplate and fixes many issues where subscriptions weren't removed on entity system shutdown.

* Fix a bunch of warnings

* More warning fixes

* Use new DateTime serializer to get rid of ISerializationHooks in changelog code.

* Get rid of some more ISerializationHooks for enums

* And a little more

* Apply suggestions from code review

Co-authored-by: 0x6273 <0x40@keemail.me>

---------

Co-authored-by: 0x6273 <0x40@keemail.me>
2024-02-13 16:48:39 -05:00
Leon Friedrich
c9e2a91f13 Fix ghost FOV bug (#21614) 2023-11-13 05:36:00 +11:00
Leon Friedrich
654cc7f071 Merge ActorSystem and IPlayerManager (#21314) 2023-11-11 13:08:10 +11:00
Leon Friedrich
e685cb626b Un-revert IPlayerManager refactor (#21244) 2023-10-28 09:59:53 +11:00
metalgearsloth
a2bbda43cc Revert "Update submodule to 172.0.0 (#21222)" (#21225) 2023-10-24 21:55:20 +11:00
Leon Friedrich
7ba0ea2926 IPlayerManager refactor (#21215) 2023-10-24 20:19:08 +11:00
DrSmugleaf
5734f02de5 Fix ghost actions disappearing when toggling visibility of other ghosts (#21033) 2023-10-20 00:05:33 -07:00
ShadowCommander
c7d1fb80b5 Add a command to hide replay UI (#19956) 2023-10-10 20:43:48 -07:00
Kara
fb175a520d Ghost hearing action (#19722) 2023-09-24 16:34:08 -04:00
Leon Friedrich
684b334806 Action container rejig (#20260)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2023-09-23 18:49:39 +10:00
DrSmugleaf
c71f97e3a2 Refactor actions to be entities with components (#19900) 2023-09-08 18:16:05 -07:00
metalgearsloth
0b542098db Remove ghost compref (#19478) 2023-08-25 18:50:46 +10:00
DrSmugleaf
a88e747a0b Refactor serialization copying to use source generators (#19412) 2023-08-22 18:14:33 -07:00
metalgearsloth
68480af109 Update content vectors to numerics (#17759) 2023-07-08 14:08:32 +10:00
Chief-Engineer
0b8b107175 add ability to edit ghost colors (#17662) 2023-06-27 19:51:01 +10:00
Nemanja
0604c93d50 Defibrillator (#15922)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2023-05-03 10:10:19 +10:00
Leon Friedrich
4e7cea96de Remove speech & popups from actions (#15747) 2023-04-26 14:04:44 +10:00
Leon Friedrich
c7ba2a666b Fix ghost FOV toggling (#15751) 2023-04-25 11:11:42 +10:00
metalgearsloth
ae01618874 Revert "Revert "Replace ResourcePath with ResPath (#15308)" (#155… (#15566) 2023-04-20 20:16:01 +10:00
metalgearsloth
acf79a8209 Revert "Replace ResourcePath with ResPath (#15308)" (#15551) 2023-04-20 11:43:54 +10:00
Ygg01
71f358a027 Replace ResourcePath with ResPath (#15308) 2023-04-19 23:39:17 +10:00
DrSmugleaf
0daa4e12d4 Fix ghost lighting being disabled when any ghost is removed (#15053) 2023-04-01 17:56:01 -05:00
Kara
01e0ea7922 Ghost toggle FoV action (#12818)
* Ghost toggle FoV action

* p
2022-11-30 23:46:04 -06:00
Kara
c71850a53f Convert ghost toggle button into an action (#12658)
* Convert ghost toggle button into an action

* figs
2022-11-18 16:30:53 -06:00
Francesco
0aba807ac2 Ghost toggle lighting ability (#12374) 2022-11-04 11:56:30 +11:00
Jacob Tong
9f485d7124 Add toggle ghost visibility button to ghost GUI (#12325)
* Add toggle ghost visibility button to ghosts

* Rename to toggleghosts
2022-11-01 20:14:06 -05:00
Jezithyr
571dd4e6d5 Hud refactor (#7202)
Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
Co-authored-by: Jezithyr <jmaster9999@gmail.com>
Co-authored-by: Jezithyr <Jezithyr@gmail.com>
Co-authored-by: Visne <39844191+Visne@users.noreply.github.com>
Co-authored-by: wrexbe <wrexbe@protonmail.com>
Co-authored-by: wrexbe <81056464+wrexbe@users.noreply.github.com>
2022-10-12 10:16:23 +02:00
wrexbe
35b90736b7 Minor UI refactor (#11212) 2022-09-11 20:42:12 -07:00
Illiux
acd24bed4d Use EntityUID for all ghost warps (#11113) 2022-09-11 07:47:17 +10:00
Nemanja
3e1cf73469 Revs (the spooky ones) (#9842) 2022-08-13 23:49:41 +10:00
metalgearsloth
94a9569d8f Make ghost role names default to entity name (#9478) 2022-07-06 20:36:57 -07:00
eclips_e
df9f9aee53 Make ghost timer a cvar (#8817)
Co-authored-by: Just-a-Unity-Dev <rnmangunay@addu.edu.ph>
Co-authored-by: Just-a-Unity-Dev <just-a-unity-dev@users.noreply.github.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2022-06-16 19:56:09 +10:00
Júlio César Ueti
7656290831 Add roles to Ghost Warp Menu (#7546) 2022-04-15 14:41:27 -07:00
Alex Evgrashin
bf89483e09 Grouped ghost roles and jump button (#7300) 2022-04-02 15:06:29 -07:00
Alex Evgrashin
f2dd758bbd Improves ghost roles window layout (#6804) 2022-02-19 16:56:22 -07:00
mirrorcult
ec4d4688c7 Seal/abstract/virtual everything (#6739) 2022-02-16 18:23:23 +11:00
wrexbe
cea1b21832 Fixing some warnings (#6250)
Co-authored-by: Paul Ritter <ritter.paul1@googlemail.com>
2022-01-21 10:38:35 +01:00