* plants and seeds go brrrr

* update plants

* P L A N T

* brrrr

* Hydroponics actually work! How about that?

* Reuse resource path in visualizer

* They lied to us.

* Several stuffs

* more werk

* Add a bunch of plants

* Logs go brr.

* Brrr moment.

* Remove unused method

* Important comment.

* Seed inventory, yo!

* tomato moment

* Balance consumption

* Makes hydroponics pourable

* Adds plant metabolism effect for sugar, the same as glucose.

* Eggplant moment

* Apple moment

* Corn moment

* Chanterelle mushroom moment

* prototype tweaks

* Seed extractor moment

* typo

* IPlantMetabolizable doc improvement

* I should trust my gut instinct more often.

* egg-plant.....

* localization

* Make WaterLevel and NutritionLevel setters private

* Less code repetition! Wooo!
This commit is contained in:
Víctor Aguilera Puerto
2020-10-26 23:19:46 +01:00
committed by GitHub
parent 7c57d10531
commit 484eb0bba4
250 changed files with 3297 additions and 72 deletions

View File

@@ -2,10 +2,12 @@
using System.Diagnostics.CodeAnalysis;
using System.Threading.Tasks;
using Content.Server.GameObjects.Components.Interactable;
using Content.Server.Utility;
using Content.Shared.GameObjects.Components.Interactable;
using Content.Shared.Interfaces.GameObjects.Components;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Components;
using Robust.Shared.GameObjects.Components.Transform;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Serialization;
using Robust.Shared.ViewVariables;
@@ -17,18 +19,22 @@ namespace Content.Server.GameObjects.Components
{
public override string Name => "Anchorable";
public override void ExposeData(ObjectSerializer serializer)
{
base.ExposeData(serializer);
serializer.DataField(this, x => x.Tool, "tool", ToolQuality.Anchoring);
}
[ViewVariables]
public ToolQuality Tool { get; private set; } = ToolQuality.Anchoring;
[ViewVariables]
int IInteractUsing.Priority => 1;
[ViewVariables(VVAccess.ReadWrite)]
public bool Snap { get; private set; }
public override void ExposeData(ObjectSerializer serializer)
{
base.ExposeData(serializer);
serializer.DataField(this, x => x.Tool, "tool", ToolQuality.Anchoring);
serializer.DataField(this, x => x.Snap, "snap", false);
}
/// <summary>
/// Checks if a tool can change the anchored status.
/// </summary>
@@ -73,6 +79,9 @@ namespace Content.Server.GameObjects.Components
var physics = Owner.GetComponent<IPhysicsComponent>();
physics.Anchored = true;
if (Snap)
Owner.SnapToGrid(SnapGridOffset.Center, Owner.EntityManager);
return true;
}