366 Commits

Author SHA1 Message Date
slarticodefast
3266c94eac Unify BatteryComponent and PredictedBatteryComponent (#41867)
* unify

* cleanup and merge conflicts

* floating points

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
2025-12-19 18:18:12 +00:00
AshBats
f202880461 Admin log now shows APC power toggle interactions (#41839)
Added logging to the APC's toggle interaction
2025-12-14 03:15:58 +00:00
slarticodefast
86f4795849 Fix rigged power cells exploding early (#41813)
* fix riggable

* fix
2025-12-10 10:28:28 +00:00
slarticodefast
0031beca4b Reapply "Trip APCs when they exceed a power limit (#41377)" (#41789)
Revert "Merge stable into master"
2025-12-08 10:35:11 +00:00
ArtisticRoomba
c867adb937 Revert "Trip APCs when they exceed a power limit (#41377)" (#41766)
This reverts commit a5c223c0
2025-12-08 04:23:45 +01:00
slarticodefast
e2ff167062 Predict powercells, chargers and PowerCellDraw (#41379)
* cleanup

* fix fixtures

* prediction

* fix test

* review

* fix svalinn visuals

* fix chargers

* fix portable recharger and its unlit visuals

* fix borgs

* oomba review

* fix examination prediction
2025-11-24 16:52:11 +00:00
slarticodefast
a428130d45 Remove blacklist methods in EntityWhitelistSystem (#40932)
* replace blacklist methods

* VS is trolling me
2025-11-24 00:38:08 +00:00
Partmedia
a5c223c0c3 Trip APCs when they exceed a power limit (#41377)
* Implement APC overloading

* Add power test

* Review

* Some more reviews

* Show map coordinates for test failures

* Widen column 2

* Reduce singularity beacon power consumption

* Try to get grid coordinates
2025-11-21 15:01:23 +00:00
slarticodefast
7155d0d291 Cleanup BatterySystem (#41298)
* cleanup

* fix fixtures

* this belongs into the next PR

* review

* misc

---------

Co-authored-by: ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
2025-11-08 20:55:02 +00:00
āda
8d8af1bab7 Stack System Cleanup (#38872)
* eye on the prize

* OnStackInteractUsing, TryMergeStacks, TryMergeToHands, TryMergeToContacts

* namespace

* Use, get count, getMaxCount

* component access

* add regions, mark TODO

* obsolete TryAdd, public TryMergeStacks

* GetMaxCount

* event handlers

* event handlers

* SetCount

* client server event handlers

* move to shared

* Revert "move to shared"

This reverts commit 45540a2d6b8e1e6d2a8f83a584267776c7edcd73.

* misc changes to shared

* split

* spawn and SpawnNextToOrDrop

* SpawnMultipleAtPosition, SpawnMultipleNextToOrDrop, CalculateSpawns, general server cleanup

* Rename Use to TryUse.

* Small misc changes

* Remove obsolete functions

* Remove some SetCount calls

* Partialize

* small misc change

* don't nuke the git dif with the namespace block

* Comments and reordering

* touchup to UpdateLingering

* Summary comment for StackStatusControl

* Last pass

* Actual last pass (for now)

* I know myself too well

* fixup

* goodbye lingering

* fixes

* review

* fix test

* second look

* fix test

* forgot

* remove early comp getting

---------

Co-authored-by: iaada <iaada@users.noreply.github.com>
Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-10-25 14:40:48 +00:00
YotaXP
6f02e6c19c Decouple power sink from tickrate (#40789)
* Fix typo in `BatterySystem.ChangeCharge`.

* Decouple power sink behavior from tickrate.

* Fix power sink's price per joule
2025-10-10 23:01:33 +00:00
slarticodefast
5227489360 Predict EMPs (#39802)
* predicted emps

* fixes

* fix

* review
2025-10-04 11:24:42 +00:00
IProduceWidgets
80947b128a Add explosive cord. (#25875) 2025-09-25 23:33:28 +02:00
chromiumboy
499dde1ec1 Bug fix for APCPowerReceiverBattery (#40188)
Initial commit
2025-09-07 16:52:27 +02:00
Winkarst-cpu
1f4dfcdcf9 Predict GetVerbsEvent in PowerSwitchableSystem (#39589)
* Prediction

* Update
2025-08-13 09:54:02 +02:00
metalgearsloth
fd52f698c7 Predict PoweredLights (#36541)
* Move PoweredLight to shared

* Predict the rest of the owl

* reacher

* compinit & anim

* Fix names

* Revert this?

* Fix these

* chicken drummies

* deita

* Fix

* review

* fix

* fixes

* fix PVS weirdness

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-08-11 23:06:28 +02:00
B_Kirill
ff7713ecea Admin logs for batteries UI (#39208) 2025-07-25 14:01:37 +02:00
UpAndLeaves
229f33f22a Voltage enum to shared (#38964) 2025-07-13 23:13:01 -07:00
SpaceManiac
8b3232f305 Fix extra dollar sign in admin log for machine toggle (#38961) 2025-07-13 06:57:54 +02:00
Nemanja
ab201b6e82 Stasis bed cleanup and bugfixes. (#38762)
* Stasis bed sent to shed

* Code Review

* Code Review 2
2025-07-06 02:59:31 +02:00
Kyle Tyo
34825464dc Power stat and nuke codes commands get some LEC love. (#38585)
* commit

* requested changes.
2025-06-30 03:41:55 +02:00
Tayrtahn
75db49f9c0 Clean up all missing EntitySystem proxy method uses (#38353) 2025-06-26 16:50:49 -07:00
Kyle Tyo
0e1ff2644f Command resolve killing and LEC conversions batch 2 (#38367)
commit progress
2025-06-17 20:01:28 +02:00
Whatstone
b73943b04b Add directionality to cable terminal port nodes (#38394) 2025-06-17 19:05:48 +02:00
Whatstone
53a01bfb46 Fix adjacent north/south cable terminals breaking east/west HV cable (#38377) 2025-06-17 02:13:35 -07:00
ArtisticRoomba
c4c528035b Show TEG theoretical supply on inspect (#37957)
* Show TEG theoretical supply on inspect

* revert autoformatting changes
2025-05-30 16:41:30 -05:00
ArtisticRoomba
9a910873c8 Significantly improve TEG power generation stability (#37658)
* Significantly improve TEG power generation stability

* Revert "Significantly improve TEG power generation stability"

This reverts commit e88278c0f8dea925a89b240e09e5dbcb84f9d174.

* Reimplement without auto formatting obliterating the entire system

* second round of balancing
2025-05-26 14:07:49 +02:00
slarticodefast
fef4187995 Move PriceCalculationEvent and EstimatedPriceCalculationEvent to shared (#37782)
* moce PriceCalculationEvent to shared

* Update Content.Shared/Cargo/PriceCalculationEvent.cs

Co-authored-by: Tayrtahn <tayrtahn@gmail.com>

---------

Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
2025-05-24 19:36:38 +02:00
Tayrtahn
8565966b53 Cleanup warnings in CableVisSystem (#37738)
Cleanup 2 warnings in CableVisSystem
2025-05-23 05:22:32 +02:00
metalgearsloth
df2257cd92 Predict gasthermomachines (#33837)
* Predict gasthermomachines

* despawn

* smellby
2025-05-13 21:49:43 +10:00
metalgearsloth
bd69fc612a Predicted internals (#33800)
* Predicted gas pumps

I wanted to try out atmos and first thing I found.

* a

* Atmos device prediction

- Canisters
- Tanks
- Internals

AirMixes aren't predicted so nothing on that front but all the UIs should be a lot closer.

* Remove details range

* Gas tank prediction

* Even more sweeping changes

* Alerts

* rehg

* Popup fix

* Fix merge conflicts

* Fix

* Review
2025-05-02 18:22:29 +10:00
Kirus59
8c38aa3742 BatteryWeaponPowerCell tweaks (#33500)
* BatteryWeaponPowerCell tweaks

* add update ammo ev & shuttle guns tweaks

* MilonPL requested changes

* revert changes in OnPowerCellChanged

* Add events to get charge info & change current charge

---------

Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
2025-04-28 21:12:25 -04:00
Pieter-Jan Briers
ffe130b38d Battery (SMES/substation) interface (#36386)
* Add ENERGYWATTHOURS() loc function

Takes in joules (energy), displays as watt-hours.

* Add simple OnOffButton control

* Re-add Inset style class

This was sloppily removed at some point?? Whatever, I need it.

* Add helper functions for setting title/guidebook IDs on FancyWindow

Reagent dispenser uses these, more in the next commits.

* Add BuiPredictionState helper

This enables me to implement coarse prediction manually in the battery UI.

Basically it's a local buffer of predicted inputs that can easily be replayed against future BUI states from the server.

* Add input coalescing infrastructure

I ran into the following problem: Robust's Slider control absolutely *spams* input events, to such a degree that it actually causes issues for the networking layer if directly passed through. For something like a slider, we just need to send the most recent value.

There is no good way for us to handle this in the control itself, as it *really* needs to happen in PreEngine. For simplicity reasons (for BUIs) I came to the conclusion it's best if it's there, as it's *before* any new states from the server can be applied. We can't just do this in Update() or something on the control as the timing just doesn't line up.

I made a content system, BuiPreTickUpdateSystem, that runs in the ModRunLevel.PreEngine phase to achieve this. It runs a method on a new IBuiPreTickUpdate interface on all open BUIs. They can then implement their own coalescing logic.

In the simplest case, this coalescing logic can just be "save the last value, and if we have any new value since the last update, send an input event." This is what the new InputCoalescer<T> type is for.

Adding new coalescing logic should be possible in the future, of course. It's all just small helpers.

* Battery interface

This adds a proper interface to batteries (SMES/substation). Players can turn IO on and off, and they can change charge and discharge rate. There's also a ton of numbers and stuff. It looks great.

This actually enables charge and discharge rates to be changed for these devices. The settings for both have been set between 5kW and 150kW.

* Oops, forgot to remove these style class defs.
2025-04-27 21:08:34 +10:00
Tayrtahn
411b563b1f Cleanup warnings in CableSystem.Placer (#36868)
* Fix warnings in CableSystem.Placer

* Formatting
2025-04-23 18:14:50 -04:00
Kyle Tyo
e9b49b00ef Fix a minor warning in BatterySystem.cs (#36726)
change timing from protected to private, rename, and adjust references.
2025-04-19 14:37:10 +02:00
metalgearsloth
63dfd21b14 Predict dumping (#32394)
* Predict dumping

- This got soaped really fucking hard.
- Dumping is predicted, this required disposals to be predicte.d
- Disposals required mailing (because it's tightly coupled), and a smidge of other content systems.
- I also had to fix a compnetworkgenerator issue at the same time so it wouldn't mispredict.

* Fix a bunch of stuff

* nasty merge

* Some reviews

* Some more reviews while I stash

* Fix merge

* Fix merge

* Half of review

* Review

* re(h)f

* lizards

* feexes

* feex
2025-04-19 16:20:40 +10:00
Callmore
eed374ffee Fix assert when trying to get TEG circuit component (#33071)
* Fix crash that was happening while testing nukeops

* Update Content.Server/Power/Generation/Teg/TegSystem.cs

Co-authored-by: Thomas <87614336+Aeshus@users.noreply.github.com>

* Fix incorrect review

---------

Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
Co-authored-by: Thomas <87614336+Aeshus@users.noreply.github.com>
Co-authored-by: EmoGarbage404 <retron404@gmail.com>
2025-04-16 21:36:20 -04:00
J
b1c08582d5 Various system spring cleaning (#36206)
* Various systems warnings cleanup

* Last changes before submitting PR

* Add guard for transform component, fix failing test

* Small corrections

* Audio params to specifiers datafields

* Using audio params on components and configs
2025-04-16 13:08:22 +02:00
Tayrtahn
e0870d0cd2 Cleanup: ExtensionCableSystem (#36052)
* Use Entity<T> and avoid Owner

* Use SharedMapSystem
2025-04-15 21:01:40 +02:00
slarticodefast
aa24066450 move DeviceLinking events to shared (#36307)
move events
2025-04-05 14:20:14 +02:00
Pieter-Jan Briers
290bffceec Make pow3r validation logic available on release (#36075)
I want to run this on live servers. It's behind a power_validate command, it still doesn't automatically get ran outside debug otherwise.
2025-03-25 10:02:39 -07:00
SlamBamActionman
43d08100b9 "New player" admin logging improvements (#35961)
* Initial commit

* Adjust a whoooole bunch of logs

* Also spears

* Track going crit

* Review fix

* Review fixes
2025-03-20 20:56:51 +01:00
metalgearsloth
75a7407e33 Predict some power PowerReceiver stuff (#33834)
* Predict some power PowerReceiver stuff

Need it for some atmos device prediction.

* Also this
2025-03-10 13:00:49 +11:00
metalgearsloth
1d004f4945 Sentry review (#35424)
Co-authored-by: chromiumboy <chromium.boy@gmail.com>
Co-authored-by: chromiumboy <50505512+chromiumboy@users.noreply.github.com>
2025-02-24 00:57:27 +11:00
chromiumboy
066c773965 Sentry turrets - Part 2: Basic prototype (#35031) 2025-02-24 00:39:44 +11:00
ScarKy0
253a9fbdf1 Seperate EMAG into EMAG and Authentication Disruptor (#34337) 2025-01-29 23:05:47 -05:00
ArtisticRoomba
98c606d760 Engineering guidebook megaupdate v2 (#33062)
Significantly updates the Engineering guidebook (more explicitly the Atmos section) to have a lot more relevant and useful information.

Right now engineering has been getting update after update with no real change to the relevant guidebook entry. This has lead to a lot of out of date information and bad practices being prevalent in the guidebook, something that pains me to read.
2025-01-27 11:42:27 -08:00
Leon Friedrich
1c315ba033 Remove Entity<T> data-fields (#34083) 2025-01-11 21:22:29 +01:00
Leon Friedrich
7ae7821213 Replace some sound PlayEntity with PlayPvs (#34317) 2025-01-11 01:44:30 +11:00
Errant
0b1ed3ec7e Fix battery charging stopping just short of being full (#34028) 2025-01-10 17:54:55 +11:00