* Instrument test.
* Midi stuff
* Some more work
* This actually works now!
* update
* Midi Audio works!
* Lots of stuff, and cool interfaces for items
* Update
* Fix a few things
* It just works
* Move textures to another folder, remove placeholder description from instruments
* Fix warning
* Use renderer enum
* Instruments now use DisposeRenderer method, and send MidiEvents as they receive them. Deletes InstrumentSystem whoo.
* Fix incorrect sprite paths
* Instruments take midi file size check into account when enabling/disabling midi playback buttons
* Fix crash when pressing drop on empty hand.
* Use new renderer return values for midi/input
* Xylophones are no longer handheld instruments, fix their sprites.
* Use new API
* Remove nfluidsynth from solution
* Timing information
* Use IGameTiming.CurTime for timestamps instead
* Adds tile removing behavior to CrowbarComponent.
Add FloorTileItemComponent.
Add genhit.ogg
Add tile.png for testing
* fixes
* Gives ContentTileDefinition a default value for tile item to drop.
Adds a few more tileitems.
* Changes per review request
* move stack.use and if statement
* Fix exception in ReagentPrototype
Due to client trying to access concrete implementations of IMetabolizable that are in Content.Server. This fix checks to see if the prototype is being loaded by the client through reflection. I don't want to move the prototype completely into Content.Server since it's useful for the client to view descriptions and values of reagents without needing to send that data from the server.
* Make fix slightly more explicit
Now it will only load the metabolizable when in Robust.Server, instead of it being anything that's not Robust.Client.
* Add IModuleManager and ModuleManager
Provide simple way to check if shared code is being run by the server or the client
* Change ModuleManager implementations to not require assembly name comparison
Now just has ClientModuleManager registered to client, and ServerModuleManager registered to server.
* Change IModuleManager functions to properties
* Fix failing tests.
This was failing because the tests weren't initializing IoC. Simply using RobustUnitTest wasn't enough because that doesn't initialize content either. I did some cleaning up so now content IoC is registered via ContentUnitTest.
* Implement Cargo Console
Add to CargoConsoleComponent GalacticBank information for syncing Bank Account Balance.
Implement CargoOrderDatabase on the server side and a list of orders in the CargoOrderDatabaseComponent on the client side. This makes it easier to change data on the server side but also utilize the state syncing between components.
Implement GalacticMarketComponent.
Only productIds get sent. Both client and server create their lists from YAML.
Implement basic spawning of items from approved orders in CargoOrderDatabase.
* Finish Cargo Console
Add validation to make sure Order Amount is one or more.
Implement approve and cancel buttons to CargoConsoleMenu orders list row.
Add price to CargoConsoleMenu product list row.
Implement CargoOrderDataManager to consolidate CargoOrder lists.
Refactor CargoOrderDatabaseComponent to use CargoOrderDataManager instead of storing duplicate lists.
Implement canceling orders.
Implement approving orders.
Fix sprite links.
Implement Cargo Request Console.
* Add power cell and weapon chargers
Functionality's similar to SS13. The cell charger won't show the discrete charging levels because effort to not make it spam appearance updates over the network.
There's some stuff I wasn't sure on:
1. Updating power? Particularly around fixing rounding
2. Duplicating the full and empty sprites as I couldn't figure out a way to not have AppearanceVisualizer throw if the state isn't found
3. I made a BaseCharger abstract class under the assumption that when a mech / borg charger is added it would also inherit from it.
4. GetText currently isn't localized
* Address PJB's feedback
Updated the BaseCharger
* Change nullref exception to invalidoperation
* If the user doesn't have hands it will just return instead
* Move chemical reaction effects into Chemistry/ReactionEffects/ subfolder
* Replace hardcoded StomachComponent metabolism with IMetabolizable
The benefits of this approach are that reagent metabolism effects are not hardcoded into StomachComponent, and metabolism effects can be more easily chained together in yaml prototypes, and reagents can have different metabolism rates. One problem with this approach is that getting metabolism rates slower than 1u / second is impossible. Implementing #377 should resolve that problem.
* Fix DefaultFood and DefaultDrink so they remove reagent regardless of Hunger/ThirstComponent presence
Previously if neither of those were present the reagents wouldn't be removed from the stomach. This fixes that.
* Additional comment on function
* Make metabolizer interface implementations explicit
Also removed some unused using statements
* Make StomachComponent._reagentDeltas readonly
* Fix misleading variable names and docs for metabolizables
Changes one of the arguments for `IMetabolizable.Metabolize()` to be called `tickTime` instead of `frameTime` to more accurately reflect it's purpose. It's not really the frametime, but the time since the last metabolism tick. Also updated and expanded the docs to reflect this and to be more clear.
* Add basic yaml Jobs file
* Add Job Prototype
* Rename Jobs to Job
* Remove BaseJob
* Add the Job class child of Role
* Add code for spawning as an assistant. Not actually working, the job prototype can't be found.
* Fix role instead of job left in yaml
* Add starting gear support for job and the starting gear for assistant as an exemple
* Link job with starting gear in yaml
* Better naming and some error handling
* Tweak error handling
* Non-accessed local variable
* Merge cast and type checks.
* StringComparison.Ordinal added for better culture support
* Supposed code improvement in launcher. Remove unused code.
* Update ExplosionHelper.cs
Unintentional change.
* Optimized Import
* Add Robust.Shared.Utility import where it was deleted
* Other random suggestion
* Improve my comment
* Add hunger and thirst
Based on the SS13 systems.
Food (Nutriment) / Drink -> Stomach -> Hunger / Thirst
* Cleanup rebase
* Cleanup stuff that was prototyped
* Address feedback
Still need to add a statuseffects system in a separate branch
* More cleanup on nutrition
Fix Remie's feedback and also damage tick.
* Re-implement nutrition with master
* Updated to use the StatusEffectsUI update
* Removed all clientside components as they only receive the UI updates now
* Implemented PR feedback
* Had to make a slight adjustment to the chemistry SolutionComponent given it doesn't have an Owner, same with Solution
Still TODO:
* Metabolisation effects
* Change drink contents to alcohol / wine etc.
* Add items to the dispensers
* For transparent containers use RecalculateColor
Could probably genericise DrinkFoodContainer as well to be a temporary item dispenser
* Fix broken bottle parent
* Refactor SpeciesUI into overlay and status effects
All components that update the UI will need to use PlayerAttached for cases where the Mind transfers I think.
* Change overlay / status effects to use states
* Change TryRemoveStatus to RemoveStatus
Doesn't return a bool so not trying.
Addressing PJB's feedback.
* Add support for global verbs
These are verbs that are visible for all entities, regardless of their components. This works by adding a new class `GlobalVerb` and a new attribute `GlobalVerbAttribute`. It works in the same way as current verbs, except you can put the verbs class definition anywhere instead of inside a component. Also moved VerbUtility into it's own file since it now has functions for both verbs and global verbs.
* Add view variables verb as an example of global verbs
* Implement suggested changes
Implemented some suggested changes from code review:
- Remove unneeded attribute from `GlobalVerb`
- Added some useful attributes to `GlobalVerbAttribute`
- Moved constants used by both `Verb` and `GlobalVerb` into `VerbUtility`
* Reduce duplicate code in VerbSystem (client & server)
Greatly reduced the amount of duplicate code for handling component verbs and global verbs separately.
* Update engine submodule
Need this so client side permissions checks are available.
* Add basic chemical reaction system
What it adds:
- Reactions defined in yaml with an arbitrary amount of reactants (can be catalysts), products, and effects.
What it doesn't add:
- Temperature dependent reactions
- Metabolism or other medical/health effects
* Add many common SS13 chemicals and reactions
Added many of the common SS13 medicines and other chemicals, and their chemical reactions. Note that many of them are lacking their effects since we don't have medical yet.
* Add ExplosiveReactionEffect
Shows how IReactionEffect can be implemented to have effects that occur with a reaction by adding ExplosionReactionEffect and the potassium + water explosion reaction.
* Move ReactionSystem logic into SolutionComponent
No need for this to be a system currently so the behavior for reaction checking has been moved into SolutionComponent. Now it only checks for reactions when a reagent or solution is added to a solution. Also fixed a bug with SolutionValidReaction incorrectly returning true.
* Move explosion logic out of ExplosiveComponent
Allows you to create explosions without needing to add an ExplosiveComponent to an entity first.
* Add SolutionComponent.SolutionChanged event. Trigger dispenser ui updates with it.
This removes the need for SolutionComponent having a reference to the dispenser it's in. Instead the dispenser subscribes to the event and updates it's UI whenever the event is triggered.
* Add forgotten checks
`SolutionComponent.TryAddReagent` and `SolutionComponent.TryAddSolution` now check to see if `skipReactionCheck` is false before checking for a chemical reaction to avoid unnecessarily checking themselves for a reaction again when `SolutionComponent.PerformReaction` calls either of them.
* Change SolutionComponent.SolutionChanged to an Action
The arguments for event handler have no use here, and any class that can access SolutionChanged can access the SolutionComponent so it can just be an Action with no arguments instead.
* Expose more private values of Solution and SolutionComponent
Expose SolutionComponent.ContainedSolution and Solution.Contents. Both needed by ReagentDispenserComponent.
* Implement IExamine for SolutionComponent
Allows players to see the contents of a solution by examining the entity which contains it.
* Implement ReagentDispenserComponent
Adds ReagentDispenserComponent. A component which can add or remove reagents from a solution container. It's written in a general way so that it can be used for things such as the Chemical dispensers in chemistry, but also the booze and soda dispensers in the bar.
The chemicals it may dispense are defined in yaml, similar to the way that vending machines define which entities they can dispense, by defining a reagent pack.
* Add chemical dispenser and equipment
Adds the chemical dispenser, beaker, large beaker, dropper, and a few more chemicals.
* Add booze and soda dispensers.
Adds the booze and soda dispensers, and a few chemicals for them to dispense. There's no drink mixing or drunkenness yet.
* Update engine submodule.
* Remove unneeded and commented out code
Had a few WIP notes and debug code bits I forgot to remove beforehand.
* Make SolutionComponent._containedSolution and it's values private again
- Remove `SolutionComponent.ContainedSolution` property, replace with specific access functions to maintain safety.
- Make Solution.Contents return a `ReadOnlyCollection` instead of `_contents` to prevent uncontrolled access to the Solution values.
- Add `SolutionComponent.RemoveAllSolution()`
* Update Content.Shared/Chemistry/Solution.cs
Commits a suggestion from RemieRichards to match the coding style of the rest of the codebase. Using `IReadOnlyList` instead of `IReadOnlyCollection`.
Co-Authored-By: Remie Richards <remierichards@gmail.com>
* Update Content.Shared/GameObjects/Components/Chemistry/SolutionComponent.cs
Commits a suggestion from RemieRichards to match the coding style of the rest of the codebase. Using `IReadOnlyList` instead of `IReadOnlyCollection`.
Co-Authored-By: Remie Richards <remierichards@gmail.com>
* Add import for IReadOnlyList to Shared/SolutionComponent.cs
* Add documentation
* Improve localization
Improve use of ILocalizationManager.
* Resolve ReagentDispenserWindow._localizationManager before using it
Forgot to do this in the last commit, resulting in a crash. Oops.
* Add SolutionCaps.FitsInDispenser. Use in ReagentDispenserComponent.
Used to limit large containers like buckets or mop buckets from being placed in a dispenser. Both have large capacities (500) and weren't designed to hold certain chemicals like a beaker is, so for now they can be blocked from being put in a dispenser by giving them that flag.
* Add colors to new reagents
* Update engine submodule
* Airlock hacking
* Added status text
* Whoops don't need this
* Update Content.Server/GameObjects/Components/Doors/AirlockComponent.cs
Co-Authored-By: Pieter-Jan Briers <pieterjan.briers@gmail.com>
* ComponentReference ServerDoorComponent
* Suggested name
* Work on Research so far
More work on UI...
Fix ResearchClient and Protolathe UI stuff.
Fix infinite select -> request state -> select -> ... loop
Add UI to ResearchClient, etc.
Technology Database states, and a bit of work on the research console ui
A bit of work on Research Console UI
Protolathe sync
Stuff that actually does things
Protolathe databases yay
Alright got my motivation back
Yeah, no. It's almost 3 AM already
Fix serialization bug again
More work on stuff
Stuff
Adds files for most new components/systems.
* Protolathes actually work now
* Research. Just Research.
* Adds icons from Eris.
* Address reviews
* Change LatheMenu resize behaviour
* Update Content.Client/GameObjects/Components/Research/ResearchConsoleBoundUserInterface.cs
Co-Authored-By: Pieter-Jan Briers <pieterjan.briers@gmail.com>
* Update Content.Client/Research/ResearchConsoleMenu.cs
Co-Authored-By: Pieter-Jan Briers <pieterjan.briers@gmail.com>
* Move IoC Resolve out of for loop
* Address review
* Localize stuff
* Removed BoundingBoxComponent.
* Updated prototypes to use refactored CollidableComponent.
* Renamed ICollidable to IPhysBody.
Moved ICollidable to the Shared/Physics namespace.
* Migrated more yaml files to use PhysShapes.
* Updated YAML to use the new list-of-bodies system.
* Updated the new prototypes.
* Update submodule
* Update submodule again, whoops
* Add more dakka
Some slight codebase changes to facilitate more robust behaviour.
* Update Content.Server/GameObjects/Components/Projectiles/ProjectileComponent.cs
Co-Authored-By: Pieter-Jan Briers <pieterjan.briers@gmail.com>
* Remix last stereo to mono
hpistol + ltrifle
* Fixed HandsGui children so that HandsGui is clickable
* Added TextureButton for opening Storage items
* Update ClientInventoryComponent.cs
Fixed HandleComponentState so that it only updates the inventory when there are changes.
* Implemented storage button on Inventory
Adds a small button on the bottom right of Storage items when inside the inventory. When the button is pressed it opens the Storage UI.