Commit Graph

117 Commits

Author SHA1 Message Date
F77F
f9a60b37ea Add ToggleOutline cvar and console command (#1185)
Co-authored-by: scuffedjays <yetanotherscuffed@gmail.com>
2020-06-22 21:43:20 +02:00
metalgearsloth
95995b6232 Add a LOT more dakka (#1033)
* Start adding flashy flash

* Change slop

Might give a smoother decline

* flashy flash

* Add flashbang and flash projectiles

Bang bang bang pull my flash trigger

* Add collision check to area flash

* Flash cleanupo

* flash.ogg mixed to mono
* Adjusted flash curve again

* Enhancing flashes with unshaded and lights and shit

Still a WIP

* Add the other ballistic gun types

Re-organised some of the gun stuff so the powercell guns share the shooting code with the ballistic guns.

* Re-merging branch with master

Also fixed some visualizer bugs

* Last cleanup

Fixed some crashes
Fixed Deckard sprite
Fixed Hitscan effects
Re-applied master changes
Re-factor to using soundsystem
Add some more audio effects

* Cleanup flashes for merge

Can put flashbangs in lockers so you don't get blinded

Fix some bugs

* Fix shotties

Also removed some redundant code

* Bulldoze some legacycode

brrrrrrrrt

* Fix clientignore warnings

* Add the other Stunnable types to StunnableProjectile

* Some gun refactoring

* Removed extra visualizers
* All casing ejections use the same code
* Speed loaders can have their ammo pulled out
* Bolt sound less loud

* Stop ThrowController from throwing

* Fix speed loader visuals

* Update hitscan collision mask and fix typo

* Cleanup

* Fit hitscan and flashbang collisions
* Use the new flags support

* Update taser placeholder description

* Update protonames per style guide

* Add yaml flag support for gun firerates

* Cleanup crew

* Fix Audio up (components, audio file, + remove global sounds)
* Add server-side recoil back-in (forgot that I was testing this client-side)
* Add Flag support for fire-rate selectors

* Wrong int you dolt

* Fix AI conflicts

Haha ranged bulldozer go BRR
(I'll rewrite it after the other AI systems are done).

* Mix bang.ogg from stereo to mono

* Make sure serializer's reading for guns

Fixes integration test

* Change EntitySystem calls to use the static function

Also removed the Pumpbarrel commented-out code

* Change StunnableProjectile defaults to 0

* Fix taser paralyse

Apparently removing defaults means you have to specify the values, whodathunkit

* Add slowdown to stunnableprojectiles and fix tasers

* Remove FlagsFor from gun components

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
Co-authored-by: Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
2020-06-21 21:47:15 +02:00
DrSmugleaf
99a5e06b98 Adds eating with utensils (#1136)
* Add Utensil component

For eating. With utensils.
Added to fork, plastic fork, spoon, plastic spoon and plastic knife.
Ignored component on the client.

* Add break chance to utensils

Set to 20% for plastic ones

* Add break sound to utensils

* Add utensil kinds

None, fork, spoon and knife.
For sporks, forknifes and sporknifes, of course.

* Add restricting foods by utensils needed

* Fix utensils breaking when food isn't eaten

* Moved getting held utensils to FoodComponent

* Add breaking a clicking utensil even if its not necessary to eat the food

* Move use utensil code to a separate method

* Add telling a handless entity when they need an utensil to eat

The immersion is off the charts

* Change food trash to only be held when the food was also being held

* Fix Wi-Fi utensils

* Remove unnecessary utensil ItemGroup

* Made TryUseFood public, removed redundant trash position update

* Renamed UtensilKind to UtensilType

* Remove eating food when clicking with it on nothing

* Disable eating food when clicked directly if it requires an untensil to eat
2020-06-19 15:20:59 +02:00
Víctor Aguilera Puerto
cf2d1d4a77 Register new component ignores on client 2020-06-09 14:12:41 +02:00
Víctor Aguilera Puerto
e1df008bce Add conditional spawning component (#1069)
* Add conditional spawning component

* Remove null checks

* Remove leftover return

* Properly spawn items when game rule gets added

* Fix duplicate uids in saltern

* GameRules returns IEnumerable using yield.
2020-06-05 19:42:43 +02:00
FL-OZ
aa26bdfcae Rework Drink/Food/FoodContainer entirely (#1009)
Co-authored-by: FL-OZ <anotherscuffed@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-05-29 22:50:23 +02:00
Swept
67143b1371 Toolboxes Update (#985) 2020-05-24 18:56:19 +02:00
zumorica
ae80762cc5 Ignore some server-side components on the client 2020-05-24 14:17:45 +02:00
Tomeno
af0ec2aeb9 Replaces cooldown circle (#956) 2020-05-23 11:26:59 +02:00
Jackson Lewis
e992d8fa43 Fix YAML prototype errors (#954) 2020-05-22 18:59:13 +02:00
Víctor Aguilera Puerto
db0ae00e1f Update Content.Client/EntryPoint.cs
Co-authored-by: Clyybber <darkmine956@gmail.com>
2020-05-12 21:24:39 +02:00
zumorica
ce0e20ea30 Ignore some server-side only components on the client 2020-05-12 14:45:35 +02:00
Pieter-Jan Briers
fe23fdb620 Merge branch 'master' into kitchen 2020-05-05 11:35:20 +02:00
Jackson Lewis
1f0c72dd28 Gravity (#841) 2020-05-02 16:02:52 +02:00
FL-OZ
dd19466578 Microwave interface. 2020-05-01 23:34:04 -05:00
Pieter-Jan Briers
d4ca0a65ee Screenshot button. 2020-04-30 12:45:21 +02:00
FL-OZ
7e4d4bb1d4 Reformat the way recipe prototypes work to something sensible.
More work on Microwave component.
2020-04-26 23:14:02 -05:00
Pieter-Jan Briers
20481a0bb1 Bar signs implemented. 2020-04-23 00:58:43 +02:00
metalgearsloth
60ce5b5089 Add puddles / reagent spills (#743) 2020-04-21 20:23:12 +02:00
Pieter-Jan Briers
27771a31f0 Improvements to allow better connection dialog in content. 2020-04-17 14:46:25 +02:00
Pieter-Jan Briers
a4092acf5b Fix not returning to main menu on disconnect correctly. 2020-04-13 22:27:47 +02:00
Injazz
d400f77129 Chemistry revamp and bartending features
-Ability to mix drinks to create cocktails with shiny icons
-New Chemistry System which can relay chemistry events to corresponding components
-moved some solution logic from Shared to Server
-fixed some weird stuff with DrinkComponent
2020-04-08 15:53:15 +05:00
Pieter-Jan Briers
45e9be43ef Content now owns main menu and launcher connecting. 2020-04-04 15:11:28 +02:00
Pieter-Jan Briers
5edfa2db34 Re-organize style sheets and add StyleSpace. 2020-04-04 15:10:51 +02:00
Pieter-Jan Briers
8cbb6841fc Fix compiler warning 2020-02-26 16:46:56 +01:00
Pieter-Jan Briers
0e6b55de66 Clean up client game ticker status code.
Fixes #495
2020-02-26 16:42:12 +01:00
moneyl
a76f133a3c Add more components to client registerIgnore list (#746) 2020-02-26 00:47:58 +01:00
moneyl
1b7860aeda Add injectors + injected reagent metabolism via BloodstreamCompo… (#730)
* Add BloodstreamComponent and BloodstreamSystem

New component for metabolizing reagents that other organs like the stomach pass their input reagents to.

* Change StomachComponent to put ingested reagents in bloodstream after delay

Now StomachComponent does not metabolize any reagents. Instead, it tracks how long each reagent has been inside it, and once they pass "digestionDelay" they'll be put inside the bloodstream, where the bloodstream will handle metabolism of the reagent.

* Add reagent injectors

Injects reagents straight into the bloodstream when used on mobs with bloodstreams. Also allows draw/inject from beakers. Does not support drawing blood/reagents from the bloodstream yet.

* Address code review

Make use of `Loc` static class instead of using `ILocalizationManager`. Localize InjectorToggleMode enum properly.
2020-02-24 01:47:33 +01:00
adrian
9544099c99 Paper and pen (#582)
* A very basic paper and pen implementation

* Removes SharedWriteComponent

* Update ContentNetIDs.cs
2020-02-12 00:01:05 +01:00
moneyl
184f2fb68d Remove duplicate code in client EntryPoint.cs (#580) 2020-02-06 16:13:10 +01:00
moneyl
972d601664 Add solution pouring / click-transfer (#574)
* Add click-based solution transfer

For example, clicking on a beaker with a soda can to transfer the soda to the beaker. Works on plain solution containers like beakers and also on open drink containers like soda cans as long as they have the `PourIn` and `PourOut` solution  capabilities. If no `SolutionComponent` is added to a drink entity, the `DrinkComponent` will give the entity one. This PR extends that behavior slightly by also giving these default `SolutionComponent`'s the proper capabilities for pouring in/out.

* Improve fix for poured drinks not immediately disappearing

Instead of making `DrinkComponent.Use` public this 
 splits out the code important to both users and made that function public, leaving `Use` private.

* Shorten solution transfer popup

* Make code review changes

- Move pouring code from SolutionComponent to new PourableComponent. Added PourableComponent to client ignore list and added to existing container prototypes.
- Added EmptyVolume property to shared SolutionComponent for convenience.
- Removed DrinkComponent fix from pouring AttackBy code. Instead DrinkComponent subscribes to the SolutionChanged action and updates its self when necessary.
- Fixed pouring being able to add more than a containers max volume and sometimes deleting reagents.
- Added message for when a container is full.

* More code review changes

- Remove IAttackBy ComponentReference attribute in PourableComponent
- Remove _transferAmount from shared SolutionComponent. Left over var from previous commit not being used anymore.
2020-01-29 02:07:02 +01:00
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