* 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>
* Use a struct to hold the items for `Directions` in `SunShadowComponent`, fix serialization.
* actually make them datafields...
* Add NetSerializable to datadef
* this is why we can't have nice things
* - Combine enum keys `ToggleableLightVisuals` and `ToggleVisuals` into `ToggleableVisuals`
- Rename `ToggleableLightVisualsComponent` to `ToggleableVisualsComponent` and `ToggleableLightVisualsSystem` to `ToggleableVisualsSystem`
- (The `SpriteLayer` field on the component is now required because the old default of `light` doesn't make sense anymore)
- Make it so that `ToggleableVisualsComponent` works even when there's not a light attached to the entity
- (Amazingly this seems to have only applied to Headphones, but I can only imagine there are many other things people would like to do with simple toggleable visuals)
- Explicitly make `ItemTogglePointLightComponent`'s purpose to make `ToggleVisualsComponent` apply to `PointLightComponent`s on the same entity.
- Add field `ToggleableVisualsColorModulatesLights`, which makes the `Color` appearance value of `ToggleableVisuals` modulate the color of lights on the same entity
- Lots of prototype updates to uptake the above
* fix bad merge
* unbork robust
* blindly letting rider reformat stuff
* I guess I never cleaned up these imports at all
* Added expendable light source refueling. Also fixed it to use the name modifier system so attributes like glue show up.
* Removed a duplicate line of code.
* Replaced TryGetComponent with TryComp, changed a variable name to be a little more clear.
* Removed the removed field "spentDesc" in flares and glowsticks
* Fixed to comply with slarticodefast's review. Name modifiers don't work yet (fixing that tmr)
* Fixed the localization!!!! :DDDD
* Implements a Dynamic Lighting System on maps.
* Edit: the night should be a little bit brighter and blue now.
* Major edit: everything must be done on the client side now, with certain datafield replicated.
Changes were outlined in the salvage to accommodate the new lighting system.
* Edit: The offset is now serverside, this makes the time accurate in all situations.
* Removing ununsed import
* Minor tweaks
* Tweak in time precision
* Minor tweak + Unused import removed
* Edit: apparently RealTime is better for what I'm looking for
* Fix: Now the time is calculated correctly.
* Minor tweaks
* Adds condition for when the light should be updated
* Add planet lighting
* she
* close-ish
* c
* bittersweat
* Fixes
* Revert "Merge branch '22719' into 2024-09-29-planet-lighting"
This reverts commit 9f2785bb16aee47d794aa3eed8ae15004f97fc35, reversing
changes made to 19649c07a5fb625423e08fc18d91c9cb101daa86.
* Europa and day-night
* weh
* rooves working
* Clean
* Remove Europa
* Fixes
* fix
* Update
* Fix caves
* Update for engine
* Add sun shadows (planet lighting v2)
For now mostly targeting walls and having the shadows change over time. Got the basic proof-of-concept working just needs a hell of a lot of polish.
* Documentation
* a
* Fixes
* Move blur to an overlay
* Slughands
* Fixes
* Apply RoofOverlay per-grid not per-map
* Fix light render scales
* sangas
* Juice it a bit
* Better angle
* Fixes
* Add color support
* Rounding bandaid
* Wehs
* Better
* Remember I forgot to do this when writing docs
---------
Co-authored-by: DoutorWhite <thedoctorwhite@gmail.com>
* Implements a Dynamic Lighting System on maps.
* Edit: the night should be a little bit brighter and blue now.
* Major edit: everything must be done on the client side now, with certain datafield replicated.
Changes were outlined in the salvage to accommodate the new lighting system.
* Edit: The offset is now serverside, this makes the time accurate in all situations.
* Removing ununsed import
* Minor tweaks
* Tweak in time precision
* Minor tweak + Unused import removed
* Edit: apparently RealTime is better for what I'm looking for
* Fix: Now the time is calculated correctly.
* Minor tweaks
* Adds condition for when the light should be updated
* Add planet lighting
* she
* close-ish
* c
* bittersweat
* Fixes
* Revert "Merge branch '22719' into 2024-09-29-planet-lighting"
This reverts commit 9f2785bb16aee47d794aa3eed8ae15004f97fc35, reversing
changes made to 19649c07a5fb625423e08fc18d91c9cb101daa86.
* Europa and day-night
* weh
* rooves working
* Clean
* Remove Europa
* Fixes
* fix
* Update
* Fix caves
* Update for engine
* Add sun shadows (planet lighting v2)
For now mostly targeting walls and having the shadows change over time. Got the basic proof-of-concept working just needs a hell of a lot of polish.
* Documentation
* a
* Fixes
* Move blur to an overlay
* Slughands
* Fixes
* Remove v2 work
* Finalise
---------
Co-authored-by: DoutorWhite <thedoctorwhite@gmail.com>
* Fix borg light being stuck on if no cell is inserted
* Fix HandheldLightComponent.Activted becoming out of sync with SharedPointLightComponent.Enabled
* Fix for entities which don't have a handheld light component
* Station AI overlay
* implement
* Bunch of ports
* Fix a heap of bugs and basic scouting
* helldivers
* Shuffle interactions a bit
* navmap stuff
* Revert "navmap stuff"
This reverts commit d1f89dd4be83233e22cf5dd062b2581f3c6da062.
* AI wires implemented
* Fix examines
* Optimise the overlay significantly
* Back to old static
* BUI radial working
* lots of work
* Saving work
* thanks fork
* alright
* pc
* AI upload console
* AI upload
* stuff
* Fix copy-paste shitcode
* AI actions
* navmap work
* Fixes
* first impressions
* a
* reh
* Revert "navmap work"
This reverts commit 6f63fea6e9245e189f368f97be3e32e9b210580e.
# Conflicts:
# Content.Client/Silicons/StationAi/StationAiOverlay.cs
* OD
* radar
* weh
* Fix examines
* scoop mine eyes
* fixes
* reh
* Optimise
* Final round of optimisations
* Fixes
* fixes
* ItemToggle + slots stuff
- Add component for itemslot locks to match LockComponent (surprised this didn't exist).
- Add thing for pointlight to match itemtoggle. In future should be used for PDAs and stuff but need to fix some other stuff first.
* Also this
* grill
* Power stuff
- Add shared IsPowered
- Add shared ResolveApc
- Move PowerChangedEvent to shared for now
- Add SlimPoweredLight that actually functions how you'd expect a PoweredLight to function it id didn't have a bunch of bloat on it.
* big update
* boing
* Replaced uses of Dirty(Component) with Dirty(Uid, Component)
Modified some systems (notably pulling-related) to use uids.
* Missed a few
* Revert changes to pulling
* No
* Fix outdated component name in assaultbelt whitelist
RangedMagazine was replaced with BallisticAmmoProvider in the Gun
refactor (#8301)
* Move FlashOnTrigger, SmokeOnTrigger, Flash components to Shared
* Move LightReplacerComponent to Shared
* Move Utensil, Mousetrap components to Shared
* Move SprayPainterComponent to Shared
The PaintableAirlock tag has also been removed, as it was unused &
unnecessary, likely a vestige of spray painter development when the
PaintableAirlock component wasn't in Content.Shared.
* Add trivial Produce and Seed components to Client
This allows the plant bag and botanical belt whitelists to correctly
match produce and seeds on the client, fixing the extraneous "Can't
insert" message that previously appeared.
---------
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
* Laws
* positronic brain and PAI rewrite
* MMI
* MMI pt. 2
* borg brain transfer
* Roleban support, Borg job (WIP), the end of mind shenaniganry
* battery drain, item slot cleanup, alerts
* visuals
* fix this pt1
* fix this pt2
* Modules, Lingering Stacks, Better borg flashlight
* Start on UI, fix battery alerts, expand activation/deactivation, low movement speed on no power.
* sprotes
* no zombie borgs
* oh fuck yeah i love a good relay
* charger
* fix the tiniest of sprite issues
* adjustable names
* a functional UI????
* foobar
* more modules
* this shit for some reason
* upstream
* genericize selectable borg modules
* upstream again
* holy fucking shit
* i love christ
* proper construction
* da job
* AA borgs
* and boom more shit
* admin logs
* laws redux
* ok just do this rq
* oh boy that looks like modules
* oh shit research
* testos passo
* so much shit holy fuck
* fuckit we SHIP
* last minute snags
* should've gotten me on a better day
* refactor: Removes FlashLightVisualizer (based on obsolete code) in favor or merging its functionality with HandheldLightComponent
fix: Low power lighting radius animations for lanterns, floodlights and flashlights now properly restore the original light radius when going back to full power
* refactor: Use the LightBehaviour component to animate HandheldLights
refactor: Remove unneeded HandheldLight definitions in some yaml files (already inherited by parents)
fix: Properly change the server side PointLightComponent Enabled property when turning HandheldLights on/off
feat: ReverseWhenFinished property on Fade light behaviours
* Empty commit to rerun CI with the new engine PR
* fix: Restore the correct HandheldLight addPrefix property, whoops
* refactor: blinkingBehaviourID -> blinkingBehaviourId, radiatingBehaviourID -> radiatingBehaviourId