Commit Graph

86 Commits

Author SHA1 Message Date
moneyl
86d1f808af Fix more unknown component errors (#545)
Fixed UseDelayComponent not being on the ignore list of Content.Client and removed seemingly erroneous `Timing` component used in bike_horn.yml
2020-01-23 01:09:56 +01:00
moneyl
eb7f592154 Add more client/server only components to registerIgnore lists (#534)
Fixes a few warnings from components not added to the ignore list on client/server.
2020-01-21 18:12:50 +01:00
Acruid
7c562af0aa Nullspace map entity is created every time the client joins the server. This fixes #520. 2020-01-20 00:36:34 -08:00
DamianX
a4e369e629 added Character Setup (#511)
* added Character Setup

* whoops

* reverted unrelated changes

* Made everything work post-rebase

* Removed unused PreferencesChanged event

* nope, don't need this

* HumanoidProfileEditorPanel -> HumanoidProfileEditor

* Set initial data for hair pickers

* Fixed nullable warning

* Renamed LooksComponent -> HumanoidAppearanceComponent

* Renamed LooksComponentState -> HumanoidAppearanceComponentState

* Final renaming maybe

* Use a human-like dummy instead of a real human

* Change preferences structs back to classes
2020-01-18 01:54:13 +01:00
ShadowCommander
d03da83fda Inventory Input (#503)
* Create ItemSlotButton

* Refactor inventory buttons

Refactor so that KeyBind handling of inventory and hands are the same.

* Refactor InventoryInterfaceController to call ItemSlotManager with entities

This change allows HandsGUI and InventoryInterfaceController to just call ItemSlotManager.OnButtonPressed with an entity instead of a slot.

* Add CooldownCircle to ItemSlotButton

This allows Hands and Inventory to have cooldown circles on their ItemSlots.

* Refactor HandsGUI to use ItemSlots

This allows functionality and GUI to be the same between Inventory and Hands.

Added clicking empty hand to switch ActiveHand to clicked hand.

* Implement CooldownCircle in ItemSlotManager

Reorganize files
2020-01-17 15:43:20 +01:00
Pieter-Jan Briers
411c23c46e Item status! 2020-01-09 00:28:04 +01:00
DamianX
f19795edaf Added preferences backend (#465)
* Added preferences backend

* Gender -> Sex

* ClientPreferencesManager properties

* Username validation

* Fixed client init

* WIP db

* Actually working sqlite db

* Dropped shitty sqlite libraries, dropped DbUp, added MigrationManager

* Added profile deletion, test

* Docs, sanity, tests, cleanup

* Cleaned up profile and appearance, fixed running on .net core

Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2019-12-22 13:47:34 +01:00
DamianX
79ee241bb7 Fixed client unknown component warnings (#491) 2019-12-15 14:12:33 +01:00
Pieter-Jan Briers
a912c999a9 GameScreen moved to content. 2019-12-06 00:41:30 +01:00
moneyl
b89615342e Fix exception in ReagentPrototype caused by IMetabolizable (#451)
* 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.
2019-11-23 21:55:31 +01:00
ShadowCommander
1580750606 Implement Cargo Console (#413)
* 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.
2019-11-22 01:37:14 +01:00
metalgearsloth
58709d2d26 Add power cell and weapon chargers (#430)
* 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
2019-11-21 23:48:56 +01:00
metalgearsloth
de148fc98f Add hunger and thirst (#363)
* 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
2019-11-11 22:20:03 +01:00
DamianX
1e425f3c28 Basic wrenchable component (#418) 2019-11-06 17:22:55 +01:00
DamianX
4720353fa2 Basic rotatable component (#416)
* Basic rotatable component

* Added counter-clockwise verb

* RegisterIgnore
2019-11-06 17:22:26 +01:00
metalgearsloth
12cf5559c2 Refactor SpeciesUI into overlay and status effects (#381)
* 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.
2019-10-30 16:37:22 +01:00
moneyl
427836fec9 Add basic chemical reactions (#376)
* 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.
2019-10-11 22:57:16 +02:00
moneyl
963bb28f0f Reagent dispensers (#360)
* 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
2019-10-05 15:10:05 +02:00
Pieter-Jan Briers
a2d8fc1ef9 Sandbox panel 2019-10-02 21:47:32 +02:00
Pieter-Jan Briers
02d509fc5f Shitty combat mode & animations. (#367)
* Combat mode UI & targeting zones.

* Fix inventory hud positioning.

* Crappy attack animations.

* Import TG combat sounds

* More work on arcs.

* Implement hit sounds.

* Lunging, hit effects, some more stuff.
2019-09-26 22:32:32 +02:00
DamianX
892d0ee162 RegisterIgnore WirePlacer (#351) 2019-09-19 16:52:53 -07:00
DamianX
364279e0f7 Added medical scanner (#338)
* Added medical scanner

* RegisterIgnore
2019-09-18 20:24:55 +02:00
DamianX
36078382e4 Airlock hacking (#329)
* 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
2019-09-06 10:05:02 +02:00
DamianX
6e2799f048 ID card console (#324)
* ID card console

* Container -> ContainerSlot
2019-09-06 08:12:44 +02:00
Víctor Aguilera Puerto
ba8b495ec0 Adds Research, unlockable technologies, Protolathes... (#264)
* 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
2019-09-03 22:51:19 +02:00
metalgearsloth
b62fb4a318 Add ammo boxes (#325)
Same as magazines except they can't be loaded into a weapon.
You can transfer ammo to and from magazines / boxes freely where the caliber matches so you don't need to necessarily match the magazine type.
Used popups to reflect transfer amount.
Also fixed the mag sprite showing as 0 capacity on spawn and the 10mm smg flash magazine prototype
2019-09-03 22:35:19 +02:00
DamianX
f3b460c8b4 IDs and access (#319)
* something about access

* Fixed deny animation
2019-09-01 22:57:22 +02:00
DamianX
264a63b7f6 Wires! (#315)
* Wires!

* Use state instead of messages

* cleanup

* Update submodule

* actually fix conflict

* Maybe fix conflicts?

* Localized strings, removed hardcoded sprite path

* cleanup

* More localization and sounds
2019-09-01 22:15:34 +02:00
DamianX
f0053f15bf Added pickaxe, asteroid rock and floors (#301) 2019-08-21 22:50:15 +02:00
DamianX
20c387158a RegisterIgnore vending machines (#300) 2019-08-14 18:15:26 +02:00
DamianX
88920696f3 Vending Machines (#296)
* Vending Machines

* addressed review
2019-08-14 10:49:28 +02:00
Pieter-Jan Briers
afd1215b03 Ignore computer component on client. 2019-08-12 18:47:49 +02:00
Pieter-Jan Briers
02da078baf Unified those messy FrameEventArgs. 2019-08-04 01:08:55 +02:00
Pieter-Jan Briers
ceb8cc8421 Use automatic component registration. 2019-07-31 15:07:54 +02:00
Acruid
2ea8bbf4eb Reagents & Solutions (#280)
* Added the ReagentPrototype class.

* Added the new Solution class.

* Added new shared SolutionComponent to the ECS system.

* Added some basic element and chemical reagent prototypes.

* Added a new Beaker item utilizing the SolutionComponent. This is a testing/debug entity, and should be removed or changed soon.

* Added filters for code coverage.

* Nightly work.

* Added the server SolutionComponent class.

* Added a bucket.
Verbs set up for solution interaction.

* Adds water tank entity to the game.

* Added a full water tank entity.
Solutions are properly serialized.
Solution can be poured between two containers.

* Solution class can now be enumerated.
SolutionComponent now calculates the color of the solution.

* Minor Cleanup.
2019-07-31 14:10:06 +02:00
Pieter-Jan Briers
0086e60b6a Speech bubbles yo. 2019-07-30 23:13:05 +02:00
Pieter-Jan Briers
d906bcda03 Eris low walls & windows.
Still needs work blocked by better entity parenting, but oh well.
2019-07-26 13:53:18 +02:00
Víctor Aguilera Puerto
5abcb680ab Ignore some server-only components. (#276) 2019-07-20 14:26:50 +02:00
Pieter-Jan Briers
c675886713 Separate inventory & character UI. 2019-07-20 14:07:11 +02:00
Pieter-Jan Briers
1a92d08399 Improves examine code
Examining now has larger range. Ghosts have no range limit.
Fixed some messy code and some bad netcode.
2019-07-19 10:45:55 +02:00
metalgearsloth
1f320eccd7 Add basic teleportation and portals (#269)
* Add basic teleportation and portals

* Address PJB's feedback and minor cleanup
2019-07-19 10:09:33 +02:00
Víctor Aguilera Puerto
d9077bde74 Adds IThrown, ILand interfaces. Adds dice. (#273)
* Dice, IThrown, ILand

* Adds sounds to the dice using a sound collection.

* Seed random instance better.

* Missed a ")", should compile now
2019-07-18 23:33:02 +02:00
Pieter-Jan Briers
806e95b382 Fix connecting to a server with the lobby enabled. 2019-07-15 18:57:17 +02:00
Pieter-Jan Briers
cdcafbada6 Start working on those top left buttons in the UI draft. 2019-07-14 23:02:45 +02:00
Pieter-Jan Briers
f97977323a Improve integration testing 2019-06-29 01:58:16 +02:00
Pieter-Jan Briers
f551bd32d6 Update submodule, client integration test. 2019-06-04 19:08:15 +02:00
Pieter-Jan Briers
e68a5c8402 Move Escape Menu to Content. 2019-05-14 15:19:41 +02:00
Pieter-Jan Briers
deaae06787 Remove Godot support. 2019-05-05 01:54:28 +02:00
Pieter-Jan Briers
f249c19eaf Fix a couple warnings. 2019-04-29 13:12:50 +02:00
Pieter-Jan Briers
77d92675e2 Fix player attachment events. 2019-04-29 12:53:09 +02:00