Commit Graph

335 Commits

Author SHA1 Message Date
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
Acruid
ece6e0a833 Map & Grid Entities (#493)
* Client & Server load with new scene hierarchy.

* Engine Update.
2019-12-22 13:23:38 +01:00
Pieter-Jan Briers
1e696edcff Use C# 8. 2019-12-17 16:09:10 +01:00
DamianX
79ee241bb7 Fixed client unknown component warnings (#491) 2019-12-15 14:12:33 +01:00
DamianX
63b98f26a6 Fixed a bunch of unused variables warnings (#492) 2019-12-15 14:12:23 +01:00
Acruid
9c9984a40a EventBus Refactor (#490)
* API changes for the new EventBus.

* Update Engine Module.
2019-12-08 19:52:29 -08:00
Pieter-Jan Briers
689d16ee65 Outlines moved to InteractionOutlineComponent, now change color when in interaction range. 2019-12-06 02:08:17 +01:00
Pieter-Jan Briers
a912c999a9 GameScreen moved to content. 2019-12-06 00:41:30 +01:00
Pieter-Jan Briers
26da24c3c5 UI Layout v2. (#489)
* UI Layout v2.

* Lobby fixed.
2019-12-05 16:00:03 +01:00
Pieter-Jan Briers
e179e89c03 Fix crash on shutting down client. 2019-12-04 01:23:14 +01:00
Pieter-Jan Briers
7c54a3c923 Fixes window destruction causing a crash.
Fixes #473
2019-11-29 17:08:24 +01:00
L.E.D
8a90e5d186 Eliminate unnecessary whitespace in examine (#479)
* eliminate unnecessary whitespace in examine

* oops
2019-11-28 14:38:23 +01:00
Peter Wedder
45567c7acc Scrollbar min size. (#464) 2019-11-28 14:28:33 +01:00
ShadowCommander
590cb1e85c Fix crash on restart (#463)
Clears inventory slots before disposal when ClientInventoryComponent is removed.
2019-11-26 16:26:47 +01:00
Víctor Aguilera Puerto
fedc0ad71c Adds playable instruments, IDropped, IHandSelected and IHandDese… (#368)
* 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
2019-11-25 00:11:47 +01:00
moneyl
ce54c489eb Add null check before using prototype in ReagentDispenserWindow (#461)
Should fix #460. I'm unable to reproduce it myself, but the stack trace shows the crash occurring on the edited line, likely because `prop` is null. This fixes that by adding a null check before using `prop`.
2019-11-24 00:46:48 +01:00
L.E.D
35f9de3366 Make examination of items in hand possible (#459) 2019-11-23 21:57:44 +01:00
DamianX
3a7a3a89ba Added hair, facial hair, magic mirror (#452)
* Added hair, facial hair, magic mirror

* I forgot to commit the textures lmao

* Use shader to fix hair color blending
2019-11-23 21:55:46 +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
Ephememory
94c00dda95 Fix various bugs with construction (#446) 2019-11-21 23:46:37 +01:00
Acruid
8b1be6edee Fixes the client crashing when closed. When disconnecting from a server, _playerManager.LocalPlayer is set to null before the entity components are disposed. Previously this would throw a nullref exception in ClientStatusEffectsComponent, now it properly checks for the null value. This resolves #435. 2019-11-16 14:39:52 -08:00
ZelteHonor
b2e2aef78d Rider static analysis (#433)
* 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
2019-11-13 23:37:46 +01:00
ZelteHonor
62b31eee00 Change localize field to be readonly. (#432) 2019-11-12 22:39:18 +01:00
Pieter-Jan Briers
841bb101c5 Visualize melee weapon cooldowns in HUD. 2019-11-12 01:43:11 +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
metalgearsloth
6529542277 Fix overlay not clearing on respawn (#423)
I'm a derp.
2019-11-09 12:09:58 +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
6497cdf8ff Add global verbs (#400)
* 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.
2019-10-30 16:31:35 +01:00
Pieter-Jan Briers
3a0856505d Correctly clear inventory UI when HumanInventoryInterfaceController detaches.
Fixes #405
2019-10-25 11:49:26 +02:00
Pieter-Jan Briers
69796bf1bc Make targeting doll less ugly. 2019-10-22 23:16:12 +02:00
Pieter-Jan Briers
9ac0e02574 Fixed client crashing when destroying certain entities. 2019-10-22 00:07:36 +02:00
Pieter-Jan Briers
f5cbbb5c84 Fix build on Framework. 2019-10-21 23:45:49 +02:00
Pieter-Jan Briers
9a1e4450d8 Make ID console fancier. 2019-10-21 22:54:16 +02:00
Pieter-Jan Briers
563dda69d4 Shorten wires menu by default. 2019-10-21 22:52:58 +02:00
Pieter-Jan Briers
44c9feaebf Fix Leave button in lobby being off to the right. 2019-10-20 22:39:22 +02:00
Pieter-Jan Briers
c457a2603a Document combat mode and change the keybind to Num1.
So I don't CONSTANTLY hit it while alt tabbing.
2019-10-20 22:31:49 +02:00
Pieter-Jan Briers
981c36dbdb Give reagent dispenser reagents window a vertical minimum size. 2019-10-20 01:40:13 +02:00
Pieter-Jan Briers
6630e454c6 Clean up reagent dispenser and make it slightly better. 2019-10-20 01:30:38 +02:00
Pieter-Jan Briers
19379decd5 Fancy up the lobby GUI. 2019-10-18 14:28:39 +02:00
Pieter-Jan Briers
743ede2243 Implement more new styling stuff. 2019-10-18 14:28:24 +02:00
Pieter-Jan Briers
0edccd8934 Improve spacing on Escape Menu. 2019-10-18 14:26:45 +02:00
Pieter-Jan Briers
4d5c34bd58 Increase horizontal margins on new buttons. 2019-10-15 13:59:25 +02:00
Pieter-Jan Briers
f0fb3eb434 Fancy new style buttons. 2019-10-15 13:13:21 +02:00
Pieter-Jan Briers
7de97eeb2c Fix icon smoothing not applying after entities are deleted. 2019-10-14 17:09:45 +02:00
Pieter-Jan Briers
9a38577a18 Improve autolathe & protolathe visuals.
Used correct Eris autolathe sprite.
Gave them an unlit layer.
2019-10-14 09:57:57 +02:00
Pieter-Jan Briers
f3f05b0396 Correctly implement opening animation for airlocks with open maintenance panel. 2019-10-14 00:20:01 +02:00