Commit Graph

18 Commits

Author SHA1 Message Date
Víctor Aguilera Puerto
85df48a700 Adds atmos (#1389)
* Add initial atmospherics framework

* Make walls and airlocks airtight

* Add the basic atmosphere gas system

* Atmos: move CardinalToIntVec and Offset into extention methods in EntityNetworkUtils

* Optimize vending machine code a bit.

* Address feedback from Atmos PR, make code compile

Fix use of OnMove -> SnapGridComponent.OnPositionChanged.
Added pause checking to atmos simulations.

* Improvements to the existing ZAS prototype (#996)

* Rename Volume -> Quantity in GasProperty

This makes the name consistent with the rest of the code, given that
it's meant to be a mol value.

* Replace Gas enum with GasPrototype

Unused as of yet, but laying the groundwork for future changes.

* Update AtmosphereMap, improving maths

Adds a temporary default atmosphere, hardcoded in for testing. It will
be replaced eventually.

Fixed a maths mistake in the original code involving unit conversions.

Added the Take() method to IAtmosphere, for taking some volume of
mixture out of a gas mix. This will be pretty handy in the future, but
for now it's used by walls to delete air where they are built.

* Fix merging, splitting logic for zones

Removing a cell from a zone now correctly reduces its volume.
Adding a cell to a zone now correctly increases its volume.

* Improvements to atmos code, reorganising of types

Moved GasPrototype to shared, because it's going to be used by the
client later.

Split up the atmosphere code. Now zones are explicitly their own kind of
atmosphere, which should speed up some loops and also solve
inconsistencies in the volume calculation.
GasMixtures are another type of atmosphere, for more general use.

Try to fix the splitting/merging code, which was quite cryptic and not
clear at all. It *should* work now.

* Switch zones back to MapIndices

Turns out I'm an idiot who misunderstood the code. MapIndices can be
used as one-per-tile, which is what is needed for atmos. GridCoordinates
are many-per-tile, and were causing lots of problems.

* Add zone debugging overlay

This is the first example of zone information being sent to a client.

It adds the `togglezoneinfo` command, which overlays the tiles and gas
information for the zone currently occupied by the user on the screen.
This was helpful for debugging the GridCoordinates problem.

* Fix position of atmos zone debug text

* Make AirtightComponent only activate on MapInit

This should stop it splitting atmospheres in mapping.

* Doc comments improvements to AtmosphereMap

Fix some malformed comments, inherit some useful docs, document some
more functions.

* Add zone logic for changing tiles to/from space

Zones are now correctly created when all the tiles in a room are built,
and destroyed when one of the tiles is destroyed.

* update engine

* right

* Cleanup code

* Port GasMixture, further cleanup

* Fix windows not being airtight, some other stuff

* Work on atmos

* Difference between ZoneBlocked and AirBlocked

* Big GridAtmosphereManager cleanup, zones are broken now oops

* Remove zones, add excited group implementation

* Further cleanup

* Further work on atmos

* Work on gas overlay.

* PumpGasTo and ReleaseGasTo methods for GasMixture.

* Adds Tile Overlay System.

* More work on atmos

* Gasses spread, equalize and all that

* Fix a few crashes

* Gas can actually spread from room to room after opening airlocks

* Add explosive depressurization, tile prying on depressurization, gas spreading on wall break. Etc.

* More work

* Remove atmoschem, add "performant" gas overlays

* what the fuck git

* More work I guess?

* Fix stuff, create a few (empty) components for future work

* Fix temperature

* Fix tile air sharing

* Atmos optimizations

* Further atmos optimizations

* Even more optimizations!

* Update Content.Client/GameObjects/EntitySystems/GasTileOverlaySystem.cs

Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>

* Update Content.Client/GameObjects/EntitySystems/GasTileOverlaySystem.cs

Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>

* Update Content.Client/GameObjects/EntitySystems/GasTileOverlaySystem.cs

Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>

* Address a few reviews

* Oops, forgot to remove this

* Update Content.Server/Atmos/AtmosphereMap.cs

Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>

* Fix compile

* Improved client gas tile overlays

* Less allocations

* Even less allocations!

* some stuff dunno

* Big refactor time, oh yeah

* it truly is 1 AM

* bruh

* No idea why now it doesn't work.
Oh well! I'll fix this on thursday 😌

* Basic atmos serialization

* Fix bugs, add VV attributes

* Start adding stuff for gas reactions

* Add a few atmos commands

* Fill gas command

* Changes to gas opacity

* Fixes I guess

* Fixes, add space wind sound

* High pressure movement!

* Better high pressure movements.

* Fix direction, maybe?

* And now it works great

* Science!

* and this is why you don't trust people

* remove logging

* Turns out I'm fucking dumb

* Work on hotspots and reactions, add tritium gas

* IGridAtmosphereComponent interface! For future unsimulated grids.

* Makes atmos updates NoGC.

* C E A S E

* Add settemp atmos command

* Important reminder.

* Remove useless AtmosCooldown.

* More work on hotspots

* Overlays for hotspots. Fire works!

* Turns out I suck at coding

* Fire texture change

* Yeah let's make that an absolute value, hmm?

* Support for atmos after teleporting grid (more or less)

* fix attempt (doesn't actually fix it)

* Make static variable not static

* Remove magic numbers

* Stopwatch moment

* Slight cleanup.

* More cleanup.

* Atmos optimizations

* Fix build

* Remove useless ghost atmos shit

* Adds CanSeeGases component for gas overlay stuff

* Component and prototype ignores

* ExcitedGroups now dispose on being merged with others

* Some tweaking.

* Atmos now uses frame time for updates.

* Nullable boogaloo

* IExamine fix

* Fix build

* Fix restartround

* Atmos tweaking, use invalid direction

* Increase high pressure movement force

* Better sort

* Update submodule.

* NULLABILITY AAAAH

Special thanks to monster860 and all monstermos contributors!

Co-authored-by: Campbell Suter <znix@znix.xyz>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
Co-authored-by: ComicIronic <comicironic@gmail.com>
Co-authored-by: silicons <2003111+silicons@users.noreply.github.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2020-08-02 20:08:20 +02:00
DrSmugleaf
bda5ce655f Add the trash man (#1367)
* Add disposal.rsi

* Rename disposal resource to disposal.rsi and create basic components

* Add disposal nets

* Add pushing entities along the disposal network

* Add disposal unit

* Unregister disposable component

* Add flush and selfinsert verbs to disposal unit

* Add gradual disposals movement

* Fix being able to walk through space for a while after exiting disposals

* Multiply disposals speed by 10

And fix early returns when moving an entity

* Rename Disposable component to InDisposals

* Remove DisposalNet and add on anchor events

* Remove anchored events, moved to interfaces

* Code cleanup

* Fix adjacent tubes' connections when a tube connects

* Fix jittery movement in disposals

* Remove Logger.Debug call

* Move disposals updates to InDisposalsComponent

* Fix adjacent connection valid directions check

* Disposal tubes now throw you out where they are facing

* Add disposal unit exit cooldown

* Set different disposal pipe sprite state depending on anchored value

* Add recycler

* Add recycler animation

* Add bloody texture to the recycler when grinding a living being

* Add PowerDevice component to the disposal unit

* Made the Recycler center on the grid

* Add disposal junction

* Add picking a random direction if junction is entered from the output side

* Add disposal flush and clang sounds

Taken from VGStation

* Move disposal flush and clang sound file names to exposedata

* Add disposalsmap.yml to test with

* Add summaries to DisposalUnit fields

* Add sideDegrees yaml property to disposal junctions

* Fix outdated usings

* Add conveyor resources

* Update RobustToolbox

* More merge fixes

Add conveyor collision masks

* Add ConveyorComponent

* Fix crash when reentering a body

* Merge branch 'master' into disposals-1147

* Reduce recycler bounds, set hard to false, add summary and expose "safe" to yaml

* Move IAnchored and IUnAnchored to AnchorableComponent

* Update power components and remove old disposals map

* Remove redundant sprite layers

* Add tile pry command

* Fix tilepry command

* Fix DisposalJunctionComponent missing a component reference

* Add anchor by radius command

* Add Y-Junctions

* Add disposal bend

* Add unanchor command

* Change DisposalJunction prototypes to specify their angles

* Fix disposal units being hidden below the floor

* Removed IAnhored and IUnAnchored interfaces

* Replace CanBeNull annotation with nullable reference types

* Update showwires command

* Add recycler recycling items

* Added angle and speed properties to ConveyorComponent

* Fix conveyort textures

* Add animation to the disposal unit

* Fix anchor and unanchor commands sometimes not finding any entities

* Fix not reading flush_time from disposal unit prototype

* Fix merge conflict wrong using

* Fix disposal, recycling and conveyor texture paths

Delete diverters

* Update visualizer names

* Add DisposableComponent, change drag and drop to work with multiple components

Ignoreinsideblocker client side for drag and drops, like on the server
Add more comments

* Add conveyor belts properly moving entities on top

* Anchorr wires

* Change conveyor bounds to 0.49

* Anchor catwalks, airlocks, gravity generators, low walls, wires and windows

* Add starting/stopping conveyors

* Add reversed conveyors

* Add conveyor switches

* Move InDisposalsComponent code to DisposableComponent

* Add ExitVector method to tubes

* Fix not updating tube references when disconnecting one

* Replace IoCManager call with dependency

* Add tubes disconnecting if they move too far apart from one another

* Move disposals action blocking to shared

* Add rotating and flipping pipes

* Make conveyor intersection calculations approximate

* Fix 1% chance of the server crashing when initializing the map

Happens when emergency lockers remove themselves

* Add disposal unit interface

* Make disposal units refuse items if not powered

* Make disposal tubes hide only when anchored

* Make disposal junction arrows visible to mere mortals

* Add disposal tubes breaking

* Add tubeconnections command

* Add missing verb attribute

* Add flipped disposal junction

* Add ids and linking to conveyors and switches

* Add conveyor switch prying and placing

* Add anchoring conveyor switches and refactor placing them

* Add missing serializable attributes from DisposableComponentState

* Make conveyor speed VV ReadWrite

* Change drawdepth of conveyors to FloorObjects

* Make conveyor anchored check consistent

* Remove anchoring interaction from switches

* Add conveyor switch id syncing and move switches slightly when pried

* Make entities in containers not able to be moved by conveyors

* Add conveyor and switches loose textures

* Merge conflict fixes

* Add disposal unit test

* Add flushing test to disposal unit test

* Add disposal unit flush fail test

* Add disposals to the saltern map

* Fix saltern disposal junctions

* Add power checks to the recycler

* Fix disposal unit placement in maintenance closet

* Remove disposal junctions from saltern

* Readd junctions to saltern

* Add the chemmaster to saltern at the request of Ike

* Move the chemistry disposal unit

* Fix casing of disposal flush sound

* More merge conflict fixes

* Fix a compiler warning.

* Remove popup invocation from buckle

* Remove showPopup parameter from InteractionChecks

* Remove unnecessary physics components

Fixes the physics system dying

* Replace PhysicsComponent usages with CollidableComponent

* Update existing code for the new controller system

* Change conveyors to use a VirtualController instead of teleporting the entity

* Remove visualizer 2d suffix and update physics code

* Transition code to new controller system

* Fix shuttles not moving

* Fix throwing

* Fix guns

* Change hands to use physics.Stop() and remove item fumble method

* Add syncing conveyor switches states

* Fix the recycler wanting to be a conveyor too hard

* Fix showwires > showsubfloor rename in mapping command

* Fix wifi air conveyors

* Fix test error

* Add showsubfloorforever command

Changes drawdepth of the relevant entities

* Disable opening the disposal unit interface while inside

* Add closing the disposal unit interface when getting inside

* Add closing the interface when the disposal unit component is removed

* Add removing entities on disposal unit component removal

* Delay disposal unit flush and fix serialization

* Implement pressure in disposal units

* Fix chain engaging a disposal unit

* Implement states to the disposal unit

* Fix missing imports from merge conflict

* Update Content.Server/GameObjects/Components/Conveyor/ConveyorComponent.cs

Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>

* Address some reviews

* Fix za buildo

* Use container helper to detach disposables

* Make conveyors use the construction system

* Make conveyor groups and syncing sane

* Make flip flip

brave

* Add activate interface to conveyor switches

* Fix not removing the switch from its group when it's deleted

* Fix not registering conveyors and switches on initialize

* Stop using 0 as null

* Disconnect conveyors and switches when disposing of a group

* Make disposal units not able to be exited when flushing

* Make disposal units flush after a configurable 30 seconds

* Add handle and light layers to the disposal unit

* Merge engaging and flushing

* Update saltern.yml

* I love using 0 as null

* Make disposal unit visual layers make sense

* Remove duplicate remove method in disposal units and update light

* Replace DisposableComponent with disposal holders

* Fix disposal holders deleting their contents on deletion

* Account for disposal unit pressure in tests and make a failed flush autoengage

* Rename disposable to holder

* Fix junction connections

* Disable self insert and flush verbs when inside a disposal unit

* Fix spamming the engage button making the animation reset

* Make the recycler take materials into account properly

Fix cablestack1 not existing

* Merge conflict fixes

* Fix pipes not being saved anchored

* Change conveyors and groups to not use an id

Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2020-07-30 23:45:28 +02:00
Swept
1ec90599fa Commit (#1541) 2020-07-30 03:22:26 +02:00
Exp
3cd5d7ba3b Add Listening & Radio to IgnoredComponents (#1529) 2020-07-29 13:03:29 +02:00
Swept
1245823f6d first (#1498) 2020-07-27 23:46:43 -07:00
DrSmugleaf
0a82aba88e Add pulling (#1409)
* Initial framework for pulling.

* Make it possible to pull items via (temporary) keybind Ctrl+Click, make items follow the player correctly.

* Make other objects pullable, implement functionality for moving an object being pulled, make only one object able to be pulled at a time.

* Make sure that MoveTo won't allow collisions with the player

* Update everything to work with the new physics engine

* Update Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs

Co-authored-by: ComicIronic <comicironic@gmail.com>

* Physics update and convert to direct type casts

* Add notnull checks

* Add pull keybinds to the tutorial window

* Move PullController to shared

* Fix pulled items getting left behind

* Fix moving pulled objects into walls

* Remove flooring of coordinates when moving pulled objects

* Add missing null check in PutInHand

* Change pulling keybind to control and throwing to alt

* Change PhysicsComponent references to IPhysicsComponent

* Add trying to pull a pulled entity disabling the pull

* Add pulled status effect

* Fix merge conflicts

* Merge fixes

* Make players pullable

* Fix being able to pull yourself

* Change pull moving to use a velocity

* Update pulled and pulling icons to not be buckle

A tragedy

* Make pulled and pulling icons more consistent

* Remove empty not pulled and not pulling images

* Pulled icon update

* Pulled icon update

* Add clicking pulling status effect to stop the pull

* Fix spacewalking when pulling

* Merge conflict fixes

* Add a pull verb

* Fix nullable error

* Add pulling through the entity drop down menu

Co-authored-by: Jackson Lewis <inquisitivepenguin@protonmail.com>
Co-authored-by: ComicIronic <comicironic@gmail.com>
2020-07-27 00:54:32 +02:00
DrSmugleaf
b88afec350 Add slipping prediction (#1440) 2020-07-23 01:40:31 +02:00
Swept
d1151281b2 Adds RCD and Pill to IgnoredComponents.cs (#1445) 2020-07-22 09:54:46 +02:00
DrSmugleaf
53a2392edc Fix restartround crash and cleanup ServerStorageComponent (#1340) 2020-07-17 11:03:07 +02:00
ike709
203a835264 Emergent Sanitation Gameplay (#1378)
* Emergent Sanitation Gameplay

* Fix the map

* Address review

* Mention if it's slippery in the description
2020-07-11 23:49:54 +02:00
DrSmugleaf
257189141e Add missing ignored components for the client (#1337)
* Fix client unknown component errors

* Update Content.Client/IgnoredComponents.cs

Co-authored-by: Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
2020-07-10 13:56:39 +02:00
DrSmugleaf
c78ce3e27a Add click dragging for buckle (#1290) 2020-07-07 00:04:30 +02:00
chairbender
b35333d366 Click Drag Functionality + Refactor Interaction Interfaces (#1125)
Co-authored-by: Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
Co-authored-by: ComicIronic <comicironic@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-07-06 23:27:03 +02:00
DrSmugleaf
0a8a383019 Fix lasso buckle (#1246)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-07-02 23:36:06 +02:00
Pieter-Jan Briers
bc24a852f9 Fix throwing. 2020-07-02 23:28:37 +02:00
GlassEclipse
610ab8bf50 BodySystem stuff 2: overused boogaloo (#1174)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-07-02 20:51:14 +02:00
Swept
ebebb3603a Added a buncha bloat from teegee (#1203)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-07-02 16:05:03 +02:00
Tyler Young
9f1bdb4b0a Make Server/Client Ignored Components lists easier to find (#1202)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-07-02 15:50:45 +02:00