fish-station/Content.Server
Leon Friedrich dbc90f202a
Bug fixes for metabolisable reagents (#4385)
* HealthChangeMetabolism now scales with ticktime and metabolism rate

Both Food and Drink metabolisms scale with ticktime, Now HealthChangeMetabolism also does so.

Additionally, 'healthChange' now correctly scales with the metabolism rate, so it's description is now correct.

* LiverBehaviour now uses correct frameTime

Previously, the liver only metabolised reagants once every second, but incorrectly passes the current frameTime to the metabilism function, not 1 second.

* Stomach now only transfers non-empty solutions.

Makes debugging bloodstream bugs easier if the stomach is not constantly adding empty solution to it.

* Fixed StomachBehaviour using wrong SolutionContainerComponent

Stomach was using the first SolutionContainerComponent in the owner of the body, instead of the container in the owner of the mechanism (stomach). As a result, it used to use the BloodStreamComponent.Solution as a "Stomach".

* Update StomachBehavior.cs

Somach now checks if it still contains a reagant, before transferring it.

* Added argument to IMetabolizable.Metabolize()

Added availableReagent argument to IMetabolizable.Metabolize(), This ensures that this function does not over-metabolize a reagant, which can happen if tickTime*metabolismRate is larger than the available reagant

* Revert "Stomach now only transfers non-empty solutions."

This reverts commit 2a51e2d87e6e17ab76b48e5316ce501ec05ac061.

* Renamed _updateInterval to _updateIntervalSeconds

Also modified doc comment specifying units

* Fix spelling of healthChangeAmount

Changed from healthChangeAmmount to healthChangeAmount

* Fixed comment

comment used to mention _updateInterval, which has been renamed  _updateIntervalSeconds

* Fixed typo in comment

* fixed typos: reagant -> reagent

Most typos were just in comments.

* Make metabolizable classes inherit from DefaultMetabolizable

Also involved changing around IMetabolizable

* Renamed variables

metabolismAmount -> amountMetabolized

* Updated Comments in DefaultMetabolizable

Makes it clearer why DefaultMetabolizable works as it does, and that other classes depend on it.
2021-07-30 21:11:02 -07:00
..
Access Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Act Re-organize all projects (#4166) 2021-06-09 22:19:39 +02:00
Actions Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Administration Makes Airtight ECS. (#4351) 2021-07-25 17:04:58 +10:00
Advertise Removed old Loc.GetString() use instances (#4155) 2021-06-21 02:13:54 +02:00
Advertisements Remove field: from DataField attributes (#3932) 2021-05-04 15:37:16 +02:00
Afk Add AFK tracking system. 2021-07-22 23:20:57 +02:00
AI Use EntitySystem dependencies in a bunch of systems. 2021-07-26 13:01:47 +02:00
Alert Make Saltern driveable (#4257) 2021-07-21 21:15:12 +10:00
AME Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Announcements Re-organize all projects (#4166) 2021-06-09 22:19:39 +02:00
Arcade Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Atmos Optimize atmos devices' appearance updating. 2021-07-30 14:00:14 +02:00
BarSign refactors barsigncomponent to be ecs (#4332) 2021-07-23 12:42:39 +10:00
Body Bug fixes for metabolisable reagents (#4385) 2021-07-30 21:11:02 -07:00
Botany ECS Atmos Part 3: Removes AtmosHelpers, add many methods to AtmosphereSystem. (#4285) 2021-07-19 12:07:37 +02:00
Buckle Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Cabinet Deprecate IActionBlocker in favour of cancellable events (#4193) 2021-06-19 10:03:24 +02:00
Camera Re-organize all projects (#4166) 2021-06-09 22:19:39 +02:00
Cargo Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
CharacterAppearance/Components Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
CharacterInfo Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Chat Chat improvements. (#4283) 2021-07-20 10:29:09 +02:00
Chemistry Bug fixes for metabolisable reagents (#4385) 2021-07-30 21:11:02 -07:00
Cleanable Re-organize all projects (#4166) 2021-06-09 22:19:39 +02:00
Climbing Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Cloning Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Clothing/Components Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
CombatMode Re-organize all projects (#4166) 2021-06-09 22:19:39 +02:00
Commands Makes Airtight ECS. (#4351) 2021-07-25 17:04:58 +10:00
Communications Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Computer Pow3r: stage 1 (#4208) 2021-07-04 18:11:52 +02:00
Configurable Removed old Loc.GetString() use instances (#4155) 2021-06-21 02:13:54 +02:00
Connection Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Construction Use EntitySystem dependencies in a bunch of systems. 2021-07-26 13:01:47 +02:00
Containers Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Conveyor Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Cooldown Re-organize all projects (#4166) 2021-06-09 22:19:39 +02:00
Coordinates/Helpers Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
CPUJob/JobQueues Re-organize all projects (#4166) 2021-06-09 22:19:39 +02:00
Crayon Fix crayon decal spawning exception (#4355) 2021-07-25 18:44:26 +10:00
Cuffs Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Damage Refactor DamageOnHighSpeedImpact to be ECS (#4297) 2021-07-20 18:02:43 +02:00
Database Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Destructible Use EntitySystem dependencies in a bunch of systems. 2021-07-26 13:01:47 +02:00
DeviceNetwork Pow3r: stage 1 (#4208) 2021-07-04 18:11:52 +02:00
Dice Sound Specifiers. (#4239) 2021-06-28 16:20:57 +02:00
Disposal Makes Airtight ECS. (#4351) 2021-07-25 17:04:58 +10:00
DoAfter Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Doors Makes Airtight ECS. (#4351) 2021-07-25 17:04:58 +10:00
Engineering Use EntitySystem dependencies in a bunch of systems. 2021-07-26 13:01:47 +02:00
EntityList Re-organize all projects (#4166) 2021-06-09 22:19:39 +02:00
Entry Add AFK tracking system. 2021-07-22 23:20:57 +02:00
EUI Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Examine Removed old Loc.GetString() use instances (#4155) 2021-06-21 02:13:54 +02:00
Explosion Slight trigger refactor (#4320) 2021-07-25 12:09:08 +02:00
Extinguisher Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Flash Slight trigger refactor (#4320) 2021-07-25 12:09:08 +02:00
Fluids Improve hands & pulling (#4389) 2021-07-31 03:14:00 +02:00
GameTicking ECS Atmos Part 3: Removes AtmosHelpers, add many methods to AtmosphereSystem. (#4285) 2021-07-19 12:07:37 +02:00
Ghost Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Gravity Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Hands Improve hands & pulling (#4389) 2021-07-31 03:14:00 +02:00
Headset Engine Entity Anchoring Changes (#4195) 2021-06-19 19:41:26 -07:00
Holiday Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Instruments Fix handheld instruments not working 2021-07-18 14:59:40 +02:00
Interaction Improve hands & pulling (#4389) 2021-07-31 03:14:00 +02:00
Inventory Fix typo in inventory component throw 2021-07-26 00:04:47 -07:00
IoC Add AFK tracking system. 2021-07-22 23:20:57 +02:00
IP Re-organize all projects (#4166) 2021-06-09 22:19:39 +02:00
Items Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Jobs Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Kitchen reagentgrinder ecs & xamlui (#4347) 2021-07-28 21:58:38 -07:00
Lathe Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Light fixes #4372 2021-07-26 18:28:04 +02:00
Lock #4420 Replaced SecureEntityStorageComp with LockComponent (new ECS) (#4228) 2021-07-30 10:22:06 -07:00
MachineLinking Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Materials Re-organize all projects (#4166) 2021-06-09 22:19:39 +02:00
Medical Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Metabolism ECS Atmos Part 3: Removes AtmosHelpers, add many methods to AtmosphereSystem. (#4285) 2021-07-19 12:07:37 +02:00
Mind Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Mining/Components Engine Entity Anchoring Changes (#4195) 2021-06-19 19:41:26 -07:00
MobState/States Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Module Re-organize all projects (#4166) 2021-06-09 22:19:39 +02:00
MoMMI Move some files out of Content.Shared root because I forgot (#4182) 2021-06-13 22:52:40 +10:00
Morgue Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Movement Re-organize all projects (#4166) 2021-06-09 22:19:39 +02:00
NodeContainer Makes Airtight ECS. (#4351) 2021-07-25 17:04:58 +10:00
Notification Remove NetMessage deprecated boilerplate (#4196) 2021-06-21 07:43:54 +02:00
Nutrition Remove FoodContainer, add whitelists, replace with SpawnItemsOnUse (#4358) 2021-07-25 17:41:50 +02:00
Objectives Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Paper Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
ParticleAccelerator Remove IStartCollide from containment fields (#4318) 2021-07-21 22:26:18 +10:00
PDA Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Physics Fix shuttle angular velocity direction 2021-07-22 22:48:46 +10:00
Placeable Re-organize all projects (#4166) 2021-06-09 22:19:39 +02:00
Plants Replace IResettingEntitySystem with RoundRestartCleanupEvent. (#4245) 2021-06-29 23:56:07 +10:00
Players Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Pointing Use EntitySystem dependencies in a bunch of systems. 2021-07-26 13:01:47 +02:00
Power Pow3r goes brrr with generational IDs. 2021-07-31 02:50:23 +02:00
PowerCell/Components Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Preferences/Managers Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Pressure Re-organize all projects (#4166) 2021-06-09 22:19:39 +02:00
Projectiles Slight trigger refactor (#4320) 2021-07-25 12:09:08 +02:00
Pulling Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Radiation Remove IClientSingularityInstance, move visual effects to SingularityDistortionComponent (#4194) 2021-06-24 12:48:11 +10:00
Radio Fix handheld radio not accounting for obstructions 2021-07-25 01:07:28 -07:00
RCD/Components DoAfter can now raise events so you don't need to use async with it (#4253) 2021-07-04 21:32:24 +10:00
Recycling Remove IStartCollide from Recyclers (#4312) 2021-07-21 12:35:45 +02:00
Repairable Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Research Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Roles Re-organize all projects (#4166) 2021-06-09 22:19:39 +02:00
Rotation Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
RoundEnd Replace IResettingEntitySystem with RoundRestartCleanupEvent. (#4245) 2021-06-29 23:56:07 +10:00
Sandbox Remove NetMessage deprecated boilerplate (#4196) 2021-06-21 07:43:54 +02:00
Shuttles Make Saltern driveable (#4257) 2021-07-21 21:15:12 +10:00
Singularity emitter ecs & bugfixes (#4348) 2021-07-24 21:42:05 +10:00
Slippery Slipping, now with 20% more ecs (#4310) 2021-07-21 22:13:58 +10:00
Solar Make Saltern driveable (#4257) 2021-07-21 21:15:12 +10:00
Sound #4219 emit sound system add single sound support (#4237) 2021-07-25 04:37:01 -07:00
Spawners Turns GameTicker into an EntitySystem. (#4197) 2021-06-20 10:09:24 +02:00
Speech Add missing space (#4281) 2021-07-17 23:04:04 +02:00
Sprite/Components Engine Entity Anchoring Changes (#4195) 2021-06-19 19:41:26 -07:00
Stack Move some files out of Content.Shared root because I forgot (#4182) 2021-06-13 22:52:40 +10:00
StationEvents ECS Atmos Part 3: Removes AtmosHelpers, add many methods to AtmosphereSystem. (#4285) 2021-07-19 12:07:37 +02:00
Storage #4420 Replaced SecureEntityStorageComp with LockComponent (new ECS) (#4228) 2021-07-30 10:22:06 -07:00
Strip Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Stunnable ECS StunnableProjectile (#4309) 2021-07-21 11:16:38 +02:00
Suspicion Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Temperature/Components Fix temperature component not using the latest in pattern matching technology (#4188) 2021-06-16 15:54:35 +02:00
Throwing #4219 emit sound system add single sound support (#4237) 2021-07-25 04:37:01 -07:00
Tiles Engine Entity Anchoring Changes (#4195) 2021-06-19 19:41:26 -07:00
Timing Re-organize all projects (#4166) 2021-06-09 22:19:39 +02:00
Toilet Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Tools ECS Atmos Part 3: Removes AtmosHelpers, add many methods to AtmosphereSystem. (#4285) 2021-07-19 12:07:37 +02:00
Traitor Removed old Loc.GetString() use instances (#4155) 2021-06-21 02:13:54 +02:00
TraitorDeathMatch/Components Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Transform/Verbs Removed old Loc.GetString() use instances (#4155) 2021-06-21 02:13:54 +02:00
UserInterface Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
VendingMachines Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Verbs Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
Visible Re-organize all projects (#4166) 2021-06-09 22:19:39 +02:00
Voting Restart vote does not vote no for AFK players. 2021-07-22 23:20:57 +02:00
Warps Removed old Loc.GetString() use instances (#4155) 2021-06-21 02:13:54 +02:00
Weapon Make Saltern driveable (#4257) 2021-07-21 21:15:12 +10:00
Window Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
WireHacking Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
app.config Updates submodule (#56) 2018-04-12 23:56:43 +02:00
AssemblyInfo.cs Fix exception in ReagentPrototype caused by IMetabolizable (#451) 2019-11-23 21:55:31 +01:00
Content.Server.csproj Enable nullability in Content.Server (#3685) 2021-03-16 15:50:20 +01:00
Program.cs Content.{Client,Server} are now Exes that can be ran. 2020-01-22 20:17:32 +01:00