* Scope creep my ass
* why was this shit not pushed????
* gone...
* fix that
* review plus buildd
* asfsafsafsafsafas
* grug
* burber
* I'll fix this later
* shrimply die
* also this
* it's snerf or snuthin
* assaads
* round snend
* aaaa
* fix this shit for real
* actually, don't start GameRules until MapInit now that I think aboot it.
* forgot u
* don't actually need this part nullable
* Deffer comp removal
* one liner
* do that too
* chungus
* Honestly makes more sense here, plus WHY are we doing all that shit on "GameRuleAdded" rather than GameRuleStarted(?)
* deferred removal :V
* aaaaaaaaaaaaaaa
* whhop
* Whoop
* better
* landmine that I placed for myself then forgot about lmao
* cleanup
* FUCKING `!`
* gotovo
* amogus
* please don't check by metadata I beg
* waawsasfdfsasfa
* sfafsasfafsas
* fdsaasffsasfa
* code
* fix
* fasasffasfasfsad
* chungaas
* I may be stupid
* gra
* graaaaaaaaaaaaaaaaa
* comment
* gra
* clearing is not predicted and would require major refactors, so don't cache on client.
* lame shit :P
* last holes
* nukeopsfsafsasafsfafsa
* why was that shit public bruh
* bubrbgwahrghfaka
* dynamic
* revert change that did nothing lmao
* refactor: extracted notify-on-non-functioning feature from emitter component
* refactor: revert server side PowerStateSystem usage of SubscribeLocalEvent - it is not calling base Initialize, skip SetWorkingState raising event on init
* refactor: ensureAPC is now conditional for powerstate
* refactor: fix double notifiation on destruction and on un-powering for emitter
* refactor: added LocTurnedOff for NotifyOnNonFunctioningComponent, fix double alert on destruction, removed emitter-deconstructed-broadcast as it is unused (cannot deconstruct withou unanchor)
* refactor: modernize server PowerStateSystem subscription
* refactor: update and modernize PowerStatePrototypeTest
* refactor: give APE specific radio message upon unlocking
* refactor: extracted PowerStateSystem.SetPowerLoad to split init from triggering is-working change event
* Update Content.Server/Power/EntitySystems/PowerStateSystem.cs
---------
Co-authored-by: AJCM-git <60196617+AJCM-git@users.noreply.github.com>
* Make every EntitySystem partial
* Oobs thats for a diff PR
* Also oops on that one
* Test systems
* git are we fr
* Update file templates
* cleanup empty classes while we are here
* forgor
---------
Co-authored-by: AJCM-git <ajcm_mail@disroot.org>
* verb category
* voltage toggle comp
* move stuff
* add simple prototype
* implement verb action
* switch expression
* fixed the node not updating
* charge the battery
* fixed battery not charging
* spawn on battery level system
* finally works
* swap commentary position
* can only anchor the extractor on the station
* popup message for trying to anchor outside of station
* default placement for unanchored version
* ops
* fix body type
* commentary
* update visuals of power consumer
* add custom sprite
* fix light layer not changing
* xenoborg circuit
* fix xenoborg circuit
* add tag
* add hand to hold xenoborg circuits
* move to material
* add xenoborg circuit material
* add recipe to mothership core
* add a hand to hold circuits to the mothership core
* to not confuse
* update
* ops
* another ops
* update mothership
* update guidebook
* update values
* more info
* fix stack
* can store xenoborg circuits
* description
* also update description
* circuit -> crytal
* not modified from anything
* update description
* Revert "update mothership"
This reverts commit 84974c56afadac2a99ed2a166244a668d83fff48.
* update empty label
* small update to sprite
* not necessary code
* remove empty line
* color
* make it explode when destroyed
* change values
* update sprite
* update sprite
* make it eletrified
* flavor text
* simplify to only use charge
* subscribe to event
* new line
* remove popup
* no need for the setter
* no longer networked
* feedback popups
* Minor tweaks
* better to understand
* better now?
* double the amount of power per crystal
* ajust power levels
* make modules cost more
* update guidebook with new values
* add popup back
* i love solving merge issues
* remove readonly
* use Transform
* predict verb
* only do stuff if both comps are present
* newline
* fix popup
* remove string.empty
* better voltage comment
* remove indentation from comment
* comment
* break the extractor
* fix comp
* change to protected
* add a client system
* make the component with the biggest name ever
* fix the anchor fail message popup
* kill this thing
* update the proto
* revert changes to PowerNetSystem
* ops
* make it spawn some gas when it explodes
* can't discharge
* comment was wrong
* swap order of components
* set examinable to false
* examine text
* rename AnchorableSystem to SharedAnchorableSystem
* rename file and make it abstract
* server side anchor system
* ops
* client anchor system
* use server anchorable system in server
* use battery visuals
* use a helper method
* revert changes to anchorable system
* new system
* new line
* ops, not used
* ops
* fix battery visuals
* set CableDeviceNode as not enabled
* set setting on map init
* enough feedback for the mothership
* new line
* locale changes
* locale changes to SharedPowerNetworkBatteryChargerVoltageTogglerSystem
* change name (again)
* update comments
* add event
* raise a event
* use events
* use a method instead of just raising the event
* more subscriptions to the voltage change event
* update locale stuff
* upgrade voltage toggler system with stuff from the power switch system
* replace power switch with voltage toggle in generator window
* replace power switch with voltage toggle in SharedPortableGeneratorSystem
* replace power switch with voltage toggle in power sensor
* KILL POWER SWITCHABLE COMPONENT AND SYSTEM
* replace power switch with voltage toggle in PortableGeneratorSystem
* replace all PowerSwitchable for VoltageToggler in the prototypes
* nullable switch text
* not required anymore
* mistake with the yml
* fix some issues with locale
* opposite
* i don't have words
* only use delay if it has the delay comp
* revert this change
* revert this change
* revert this change
* revert this change
* add color
* comment
* use another component
* fix the alert not showing
* generic comp for powernetwork battery and power consumer
* rename events
* fix proto
* make it less efficient
* change how it displays the rogue power thingy
* Comp is evil
* comment
* use resolve
* loc id
* error
* one line
* move this stuff to the voltage toggler system
* revert changes to PowerNetConnector
* revert changes to NodeContainerSystem
* revert changes that mess with PowerSupplierComponent
* revert changes to SharedBatterySystem
* revert changes to server BatterySystem
* revert changes to PowerMonitoringConsoleSystem
* remove whitespace
* guess it was 2 lines
* remove this from PowerNetworkBatteryComponent
* PowerConsumerBatteryCharger
* remove charging behavior from power sink system
* add new component to power sink
* extractor now uses power consumer comp
* update PowerDeviceVisuals.Powered for power consumers that are recieving power
* use PowerDeviceVisuals.Powered instead of BatteryVisuals.Charging
* PowerConsumerBatteryChargerEfficiencyVoltageTogglerComponent
* change values
* Orks micro balance
* me when i forget to change the actual value
* change values in the guidebook
* use a event
* move efficiency to the powerconsumer component
* ops
* revert this random change
* remove mapinit
* move to one line
* remove try comp
* update event
* this is important
* use a entity table
* only one line
* use the entity table
* use the current body crusher proto
* update guidebook
* say that it changes the efficiency
* Improve guidebook wording.xml
Co-authored-by: korczoczek <danielkorczok@gmail.com>
* remove random whitespace
Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com>
* style stuff
Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com>
* make AnchorOnlyOnStationComponent networked
* better wording
Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com>
* Prettier
Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com>
* fix stack text
* give option to be anchored on any station member
* use 4 spaces
* use stuff from the other PR
* revert this change
* remove power toggle things
* idk
* use a update loop
* revert locale changes about the voltage toggler
* remove mentions of voltage toggling
* ops
* fix proto
* remove white line
* revert this
* move efficiency to PowerConsumerBatteryCharger
* revert rider suggestion
* custom sprite for extractor flatpack
* use a new enum
* make it destructible
* cleanup
---------
Co-authored-by: beck-thompson <beck314159@hotmail.com>
Co-authored-by: korczoczek <danielkorczok@gmail.com>
Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com>
Co-authored-by: ScarKy0 <scarky0@onet.eu>
* Logging fixed + minor clean-up of ApcToggleBreaker method
* ATS is no longer targeted by BreakFlipRule
* Fixed typo
* Now uses Uid
* Now uses Uid
* Fixed look-up
* Added blacklist to BreakerFlipComponent to specify which entities shouldn't trigger the game rule
* small fix
* Cancel if APC is in unpowered list
* Also prevent re-power via re-construction
* Revert useless dependency
* Reduced event time by 10-20 seconds
* Move to ApcSystem
* Also verify game rule is active
* Empty commit
* Move station and affected checking
* Check for main station grid
* Fix format warnings
* Somehow this got duplicated
* Make GetRuleAffectingEntity() also check for BecomesStationComponent
* Make APCSystem also check for ActivegameRuleComponent
* Removed redundant checks and duplicate logic
* Add GridEventEligibleComponent with flag for PowerGridChecks
* Propagate GridEventEligibleComponent.
* Revert GridEventEligible
* Use GetLargestGrid
* Dirty ApcPowerReceiver if state doesn't match defs
* surely this will work and isn't massive hubris
* SPACE
* docs & comments
* voltage, not charge
* no space
* jfc
* fix powered devices reporting as powered when Load is 0
* add small power load and draw to reagent grinder
* add small power load and draw for centrifuge and electro...thingy
* remove unhelpful comment
* clean up to make things more clear
* cleanup code for readability, maintaining current functionality
* code stuff
* fix error
* now its fixed
* use the charge from the arg
* only on battery full
* remove whitespace
Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
* use default! instead of null!
Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
* use set charge
---------
Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
* Everything except the YAML slop...
* She solution on my manager till I sajfslkahfsjakfhaskjfshajksafhfsakhfasjfas
* another 1000 lines
* fix chem dispenser size
* go my shnelf
* Implicit ass
* rider is being mean for some reason
* dasdas
* borger
* better formatting go!
* clothes/bloodstream
* Cartons
* cups and bottles
* mmm soder
* bar drinks
* Spray bottles and some size tweaks with hindsight
* 99 bottles of beer on the wall I hate YAML
* push that shit
* mmm burger
* Sneed
* sheets
* condiments
* mmm yummy
* fridge yummyfood
* meat...
* sub 300
* burger...
* bready
* let them eat cake
* does she know how to make a grilled cheese?
* pizza pie!
* misc shit
* soup or salad
* Food and drinks, vanquished
* the cubes!!!
* Almost free from YAML...
* fix test fails and some yaml issues
* fix prediction, almost done
* fix all test fails
* remove master merge artifacts and undo autonetworking
* review and compatibility
* graaah
* unfuck master merge I hate github
* merg conflicts
* sfsa
* ehoop
* sadas
* afsafsaasf
* merge conflicts
* fucked up the merge conflicts
* merge conflict is fucked I might need to completely redo this branch
* test fail
* no calcium????
---------
Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
* verb category
* voltage toggle comp
* move stuff
* add simple prototype
* implement verb action
* switch expression
* fixed the node not updating
* charge the battery
* fixed battery not charging
* spawn on battery level system
* finally works
* swap commentary position
* can only anchor the extractor on the station
* popup message for trying to anchor outside of station
* default placement for unanchored version
* ops
* fix body type
* commentary
* update visuals of power consumer
* add custom sprite
* fix light layer not changing
* xenoborg circuit
* fix xenoborg circuit
* add tag
* add hand to hold xenoborg circuits
* move to material
* add xenoborg circuit material
* add recipe to mothership core
* add a hand to hold circuits to the mothership core
* to not confuse
* update
* ops
* another ops
* update mothership
* update guidebook
* update values
* more info
* fix stack
* can store xenoborg circuits
* description
* also update description
* circuit -> crytal
* not modified from anything
* update description
* Revert "update mothership"
This reverts commit 84974c56afadac2a99ed2a166244a668d83fff48.
* update empty label
* small update to sprite
* not necessary code
* remove empty line
* color
* make it explode when destroyed
* change values
* update sprite
* update sprite
* make it eletrified
* flavor text
* simplify to only use charge
* subscribe to event
* new line
* remove popup
* no need for the setter
* no longer networked
* feedback popups
* Minor tweaks
* better to understand
* better now?
---------
Co-authored-by: beck-thompson <beck314159@hotmail.com>
* initial commit
* misc additions and fixes
* final tests and additions
* cleanup 1
* fix tests and add a test
* fix tests AGAIN
* abject horror and misery
* cleanup
* cleanup 2
* address some issues
* 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
* cleanup
* fix fixtures
* this belongs into the next PR
* review
* misc
---------
Co-authored-by: ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
* 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>
* 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
* 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.