Various cow fixes (#18602)
Reparent cow outputs to the correct grid. Adjust produce so that cows and other multi-stomached animals can eat most produce. --------- Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
@@ -28,13 +29,15 @@ public sealed class CreateEntityReactionEffect : ReagentEffect
|
||||
public override void Effect(ReagentEffectArgs args)
|
||||
{
|
||||
var transform = args.EntityManager.GetComponent<TransformComponent>(args.SolutionEntity);
|
||||
var transformSystem = args.EntityManager.System<SharedTransformSystem>();
|
||||
var quantity = Number * args.Quantity.Int();
|
||||
|
||||
for (var i = 0; i < quantity; i++)
|
||||
{
|
||||
args.EntityManager.SpawnEntity(Entity, transform.MapPosition);
|
||||
var uid = args.EntityManager.SpawnEntity(Entity, transform.MapPosition);
|
||||
transformSystem.AttachToGridOrMap(uid);
|
||||
|
||||
// TODO figure out how to spawn inside of containers
|
||||
// TODO figure out how to properly spawn inside of containers
|
||||
// e.g. cheese:
|
||||
// if the user is holding a bowl milk & enzyme, should drop to floor, not attached to the user.
|
||||
// if reaction happens in a backpack, should insert cheese into backpack.
|
||||
|
||||
Reference in New Issue
Block a user