Commit Graph

948 Commits

Author SHA1 Message Date
Acruid
d549c44f95 Shared IMap/Map class removal (#467)
* Fully removed the Map and IMap class.

* Submodule update to sibling engine commit.
2019-11-26 23:16:36 +01:00
L.E.D
9cfa0d447a Stack popups (#470)
* stack popups

* Update Content.Server/GameObjects/Components/Stack/StackComponent.cs

Co-Authored-By: Pieter-Jan Briers <pieterjan.briers@gmail.com>

* change wording
2019-11-26 20:17:28 +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
Ephememory
d63c879404 Crowbar floor tiles and placement (#429)
* 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
2019-11-23 22:10:05 +01:00
L.E.D
35f9de3366 Make examination of items in hand possible (#459) 2019-11-23 21:57:44 +01:00
dylanstrategie
17b31c417b Rejunevate now satiates hunger and thirst plus code quality (#456)
* Change Rejunevate to satiate hunger and thirst whenever applicable

* More progress

* One more before rebase

* Shit

* Bop obsolete using

* Verb will not show on non-applicable objects
2019-11-23 21:57:02 +01:00
dylanstrategie
421847e9d3 Add filled toolbelt variant for easy engineering (#458)
* Add filled toolbelt variant for easy engineering

* Petty newline
2019-11-23 21:56:32 +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
dylanstrategie
4198b6dc4e Medkits are now a container plus filled version (#457) 2019-11-23 21:39:12 +01:00
Remie Richards
0cf34d2d26 Server-side GlobalVerbs now work when used (#455) 2019-11-23 20:11:50 +01:00
Pieter-Jan Briers
d5a9747712 Update submodule 2019-11-23 01:08:39 +01:00
Pieter-Jan Briers
45767d881d Maybe run git pull before updating submodule eh 2019-11-22 19:56:05 +01:00
Pieter-Jan Briers
2d4f1780bf Fix outline shader 2019-11-22 19:55:34 +01:00
Pieter-Jan Briers
ca8609f42c Update submodule 2019-11-22 19:55:34 +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
Ephememory
0595088409 Fix crates having zero gravity all to themselves (#443) 2019-11-21 23:46:01 +01:00
moneyl
3ab8036363 De-hardcode chemical metabolism of StomachComponent (#437)
* 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.
2019-11-21 23:24:19 +01:00
Ephememory
1f177a044d Fix flashlight PointLight radius (#438)
* Add radius to `HandheldLightComponent.cs`

* Revert handheldlightcomponent and simply specify radius to flashlight in yaml.
2019-11-21 15:23:09 +01:00
Pieter-Jan Briers
96b8ded8af Make melee weapons use raycasts. 2019-11-17 21:46:39 +01:00
ancientpower
32bd23f85e fixes power provider range calculation (#442) 2019-11-17 19:56:54 +01:00
ZelteHonor
447db2e458 Basis for the job system (#434)
* 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
2019-11-17 17:18:39 +01:00
metalgearsloth
480d3b26c4 Make nutrition less harsh (#439)
* Make nutrition less harsh

Also fix the accumulator because why did I put that in the loop.
Decay rates decreased and made drink thirst levels same as hunger for now.

* Also fix stomach frametime accumulation
2019-11-17 02:26:31 +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
774f5f0db7 I'm bad at coding 2019-11-12 19:37:15 +01:00
Pieter-Jan Briers
f8ff829e27 Merge branches '19-11-12-outline-shader-submodule-update' and 'outline-shader-removal' 2019-11-12 18:52:03 +01:00
Pieter-Jan Briers
34083d3e8d Update submodule 2019-11-12 18:51:03 +01:00
scuffedjays
173329de8f move outline to content 2019-11-12 10:58:41 -06:00
Ephememory
ef2b665ff0 R&D Equipment now require power to operate. (#428)
* Fixes: #392

- Make Lathe require power to interact with or produce.
- Make R&D Console require power to interact with.
- Add PowerDevice component to R&D computer.
- Add PowerDevice component to R&D server.

* Update LatheComponent.cs

* Update LatheComponent.cs

* Update ResearchConsoleComponent.cs
2019-11-12 15:35:34 +01:00
Pieter-Jan Briers
841bb101c5 Visualize melee weapon cooldowns in HUD. 2019-11-12 01:43:11 +01:00
Ephememory
7198a7c78d Add cooldown to MeleeWeaponComponent (#426) 2019-11-11 22:21:29 +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
Pieter-Jan Briers
6de5c01afb Update submodule 2019-11-11 08:36:56 +01:00
Ephememory
0d30bc2676 Add Eris' keyboard sounds to R&D Console. (#427)
* Add Eris' keyboard sounds to R&D Console.

* woah buddy thats not c# standard

* fix weirdly capitalized keyboard method

* thats silly
2019-11-11 00:46:27 +01:00
rok-povsic
e5150d3714 Fix crowbar distance to work on adjacent tiles (#424)
* Fix crowbar distance to work on max 1.5 tiles

* Use existing distance methods

* Use the existing InteractionRange
2019-11-10 21:50:13 +01:00
Ephememory
7032c8a92e Checks if user is in combat mode before allowing firing. (#425) 2019-11-10 10:59:26 +01:00
Pieter-Jan Briers
51359cf77b Update submodule 2019-11-09 13:21:47 +01:00
metalgearsloth
6529542277 Fix overlay not clearing on respawn (#423)
I'm a derp.
2019-11-09 12:09:58 +01:00
metalgearsloth
63611cef80 Port Discordia shoes (#422)
Where no icon was found used the equipped sprites
Also updated the vending machine prototypes but more items will need adding in the future.
2019-11-09 12:09:42 +01:00
metalgearsloth
0b5759abe6 Port Discordia gloves (#419)
Still need descriptions on the items to be done but the groundwork is there.
Could also do with layers for stuff that should light up in the darkness but I wasn't entirely sure what should and shouldn't.
2019-11-06 17:23:35 +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
moneyl
e8679d9308 Add chemistry sprites. Move existing ones into RSIs (#401)
* Add chemistry sprites and move existing ones into RSIs

There are already a few chemistry sprites that are sitting loose in folders. More of them will be needed soon such as pill and other chem machine sprites. This adds RSIs with chemistry sprites from CEV-Eris and moves existing ones into the relevant RSIs.

* Separate machine screens into their own sprites.

Separates screens and machines into their own sprites.
2019-11-03 15:33:23 +01:00
Pieter-Jan Briers
808f35adc6 Update submodule 2019-10-30 21:49:41 +01:00