Metabolism 3.0 (#5157)

* basic system + convert all plantmetabolism

* stragglers

* convert all old metabolisms over

* fix YAML errors + dumb serialization issue

* remove unused thingy

* reimplement

* add organ type condition

* organtype condition but real

* cleanups + test fix

* metabolismtype -> metabolizertype

* solution resilience

* fixes

* serializer + use entityuid + hashset

* this is apparently an entirely different thing

* turns out it just works

* oops
This commit is contained in:
mirrorcult
2021-11-08 15:33:45 -07:00
committed by GitHub
parent f5b11d6af8
commit 31d622f941
53 changed files with 969 additions and 912 deletions

View File

@@ -91,6 +91,8 @@ namespace Content.Client.Entry
prototypes.RegisterIgnore("aiFaction"); prototypes.RegisterIgnore("aiFaction");
prototypes.RegisterIgnore("behaviorSet"); prototypes.RegisterIgnore("behaviorSet");
prototypes.RegisterIgnore("advertisementsPack"); prototypes.RegisterIgnore("advertisementsPack");
prototypes.RegisterIgnore("metabolizerType");
prototypes.RegisterIgnore("metabolismGroup");
ClientContentIoC.Register(); ClientContentIoC.Register();

View File

@@ -1,18 +1,23 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Content.Shared.Body.Metabolism;
using Content.Shared.Body.Networks; using Content.Shared.Body.Networks;
using Content.Shared.Chemistry.Reagent; using Content.Shared.Chemistry.Reagent;
using Content.Shared.FixedPoint; using Content.Shared.FixedPoint;
using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Set;
namespace Content.Server.Body.Metabolism namespace Content.Server.Body.Metabolism
{ {
/// <summary> /// <summary>
/// Handles metabolizing various reagents with given effects. /// Handles metabolizing various reagents with given effects.
/// </summary> /// </summary>
[RegisterComponent] [RegisterComponent, Friend(typeof(MetabolizerSystem))]
public class MetabolizerComponent : Component public class MetabolizerComponent : Component
{ {
public override string Name => "Metabolizer"; public override string Name => "Metabolizer";
@@ -27,33 +32,44 @@ namespace Content.Server.Body.Metabolism
public float UpdateFrequency = 1.0f; public float UpdateFrequency = 1.0f;
/// <summary> /// <summary>
/// From which solution will this metabolizer attempt to metabolize chemicals in its parent bodies' bloodstream, /// From which solution will this metabolizer attempt to metabolize chemicals
/// as opposed to a solution container on the metabolizing entity itself.
/// </summary> /// </summary>
[DataField("solution")] [DataField("solution")]
public string SolutionName { get; set; } = SharedBloodstreamComponent.DefaultSolutionName; public string SolutionName { get; set; } = SharedBloodstreamComponent.DefaultSolutionName;
/// <summary> /// <summary>
/// A dictionary mapping reagent string IDs to a list of effects & associated metabolism rate. /// Does this component use a solution on it's parent entity (the body) or itself
/// </summary> /// </summary>
/// <returns></returns> /// <remarks>
[DataField("metabolisms", required: true, customTypeSerializer:typeof(PrototypeIdDictionarySerializer<ReagentEffectsEntry, ReagentPrototype>))] /// Most things will use the parent entity (bloodstream).
public Dictionary<string, ReagentEffectsEntry> Metabolisms = default!; /// </remarks>
[DataField("solutionOnBody")]
public bool SolutionOnBody = true;
/// <summary>
/// List of metabolizer types that this organ is. ex. Human, Slime, Felinid, w/e.
/// </summary>
[DataField("metabolizerTypes", customTypeSerializer:typeof(PrototypeIdHashSetSerializer<MetabolizerTypePrototype>))]
public HashSet<string>? MetabolizerTypes = null;
/// <summary>
/// A list of metabolism groups that this metabolizer will act on, in order of precedence.
/// </summary>
[DataField("groups", required: true)]
public List<MetabolismGroupEntry> MetabolismGroups = default!;
} }
/// <summary>
/// Contains data about how a metabolizer will metabolize a single group.
/// This allows metabolizers to remove certain groups much faster, or not at all.
/// </summary>
[DataDefinition] [DataDefinition]
public class ReagentEffectsEntry public class MetabolismGroupEntry
{ {
/// <summary> [DataField("id", required: true, customTypeSerializer:typeof(PrototypeIdSerializer<MetabolismGroupPrototype>))]
/// Amount of reagent to metabolize, per metabolism cycle. public string Id = default!;
/// </summary>
[DataField("metabolismRate")]
public FixedPoint2 MetabolismRate = FixedPoint2.New(1.0f);
/// <summary> [DataField("rateModifier")]
/// A list of effects to apply when these reagents are metabolized. public FixedPoint2 MetabolismRateModifier = 1.0;
/// </summary>
[DataField("effects", required: true)]
public ReagentEffect[] Effects = default!;
} }
} }

View File

@@ -1,5 +1,8 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using Content.Server.Body.Circulatory; using Content.Server.Body.Circulatory;
using Content.Server.Body.Mechanism;
using Content.Server.Chemistry.Components.SolutionManager;
using Content.Server.Chemistry.EntitySystems; using Content.Server.Chemistry.EntitySystems;
using Content.Shared.Body.Components; using Content.Shared.Body.Components;
using Content.Shared.Body.Mechanism; using Content.Shared.Body.Mechanism;
@@ -9,6 +12,7 @@ using Content.Shared.FixedPoint;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Prototypes;
namespace Content.Server.Body.Metabolism namespace Content.Server.Body.Metabolism
{ {
@@ -16,9 +20,8 @@ namespace Content.Server.Body.Metabolism
[UsedImplicitly] [UsedImplicitly]
public class MetabolizerSystem : EntitySystem public class MetabolizerSystem : EntitySystem
{ {
[Dependency] [Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!;
private readonly SolutionContainerSystem _solutionContainerSystem = default!; [Dependency] private readonly IPrototypeManager _prototypeManager = default!;
public override void Initialize() public override void Initialize()
{ {
@@ -28,9 +31,22 @@ namespace Content.Server.Body.Metabolism
} }
private void OnMetabolizerInit(EntityUid uid, MetabolizerComponent component, ComponentInit args) private void OnMetabolizerInit(EntityUid uid, MetabolizerComponent component, ComponentInit args)
{
if (!component.SolutionOnBody)
{ {
_solutionContainerSystem.EnsureSolution(uid, component.SolutionName); _solutionContainerSystem.EnsureSolution(uid, component.SolutionName);
} }
else
{
if (EntityManager.TryGetComponent<MechanismComponent>(uid, out var mech))
{
if (mech.Body != null)
{
_solutionContainerSystem.EnsureSolution(mech.Body.OwnerUid, component.SolutionName);
}
}
}
}
public override void Update(float frameTime) public override void Update(float frameTime)
{ {
@@ -43,80 +59,96 @@ namespace Content.Server.Body.Metabolism
// Only update as frequently as it should // Only update as frequently as it should
if (metab.AccumulatedFrametime >= metab.UpdateFrequency) if (metab.AccumulatedFrametime >= metab.UpdateFrequency)
{ {
metab.AccumulatedFrametime = 0.0f; metab.AccumulatedFrametime -= metab.UpdateFrequency;
TryMetabolize(metab); TryMetabolize(metab.OwnerUid, metab);
} }
} }
} }
private void TryMetabolize(MetabolizerComponent comp) private void TryMetabolize(EntityUid uid, MetabolizerComponent? meta=null, MechanismComponent? mech=null)
{ {
var owner = comp.Owner; if (!Resolve(uid, ref meta))
IReadOnlyList<Solution.ReagentQuantity> reagentList = new List<Solution.ReagentQuantity>(); return;
Resolve(uid, ref mech, false);
// First step is get the solution we actually care about
Solution? solution = null; Solution? solution = null;
SharedBodyComponent? body = null; EntityUid? solutionEntityUid = null;
SolutionContainerManagerComponent? manager = null;
// if this field is passed we should try and take from the bloodstream over anything else if (meta.SolutionOnBody)
if (owner.TryGetComponent<SharedMechanismComponent>(out var mech))
{ {
body = mech.Body; if (mech != null)
{
var body = mech.Body;
if (body != null) if (body != null)
{ {
if (body.Owner.HasComponent<BloodstreamComponent>() if (!Resolve(body.OwnerUid, ref manager, false))
&& _solutionContainerSystem.TryGetSolution(body.OwnerUid, comp.SolutionName, out solution)
&& solution.CurrentVolume >= FixedPoint2.Zero)
{
reagentList = solution.Contents;
}
}
}
if (solution == null || reagentList.Count == 0)
{
// We're all outta ideas on where to metabolize from
return; return;
_solutionContainerSystem.TryGetSolution(body.OwnerUid, meta.SolutionName, out solution, manager);
solutionEntityUid = body.OwnerUid;
}
}
}
else
{
if (!Resolve(uid, ref manager, false))
return;
_solutionContainerSystem.TryGetSolution(uid, meta.SolutionName, out solution, manager);
solutionEntityUid = uid;
} }
List<Solution.ReagentQuantity> removeReagents = new(5); if (solutionEntityUid == null || solution == null)
var ent = body?.Owner ?? owner; return;
// we found our guy
// Run metabolism for each reagent, remove metabolized reagents foreach (var reagent in solution.Contents.ToArray())
foreach (var reagent in reagentList)
{ {
if (!comp.Metabolisms.ContainsKey(reagent.ReagentId)) if (!_prototypeManager.TryIndex<ReagentPrototype>(reagent.ReagentId, out var proto))
continue; continue;
var metabolism = comp.Metabolisms[reagent.ReagentId]; if (proto.Metabolisms == null)
// Run metabolism code for each reagent continue;
foreach (var effect in metabolism.Effects)
// loop over all our groups and see which ones apply
FixedPoint2 mostToRemove = FixedPoint2.Zero;
foreach (var group in meta.MetabolismGroups)
{ {
var conditionsMet = true; if (!proto.Metabolisms.Keys.Contains(group.Id))
continue;
var entry = proto.Metabolisms[group.Id];
// we don't remove reagent for every group, just whichever had the biggest rate
if (entry.MetabolismRate > mostToRemove)
mostToRemove = entry.MetabolismRate;
// do all effects, if conditions apply
foreach (var effect in entry.Effects)
{
bool failed = false;
var quant = new Solution.ReagentQuantity(reagent.ReagentId, reagent.Quantity);
if (effect.Conditions != null) if (effect.Conditions != null)
{ {
// yes this is 3 nested for loops, but all of these lists are foreach (var cond in effect.Conditions)
// basically guaranteed to be small or empty
foreach (var condition in effect.Conditions)
{ {
if (!condition.Condition(ent, reagent)) if (!cond.Condition(solutionEntityUid.Value, meta.OwnerUid, quant, EntityManager))
{ failed = true;
conditionsMet = false;
break;
}
}
} }
if (!conditionsMet) if (failed)
continue; continue;
// If we're part of a body, pass that entity to Metabolize
// Otherwise, just pass our owner entity, maybe we're a plant or something
effect.Metabolize(ent, reagent);
} }
removeReagents.Add(new Solution.ReagentQuantity(reagent.ReagentId, metabolism.MetabolismRate)); effect.Metabolize(solutionEntityUid.Value, meta.OwnerUid, quant, EntityManager);
}
} }
_solutionContainerSystem.TryRemoveAllReagents(ent.Uid, solution, removeReagents); // remove a certain amount of reagent
if (mostToRemove > FixedPoint2.Zero)
_solutionContainerSystem.TryRemoveReagent(solutionEntityUid.Value, solution, reagent.ReagentId, mostToRemove);
}
} }
} }
} }

View File

@@ -10,6 +10,7 @@ using Content.Server.Popups;
using Content.Shared.ActionBlocker; using Content.Shared.ActionBlocker;
using Content.Shared.Audio; using Content.Shared.Audio;
using Content.Shared.Botany; using Content.Shared.Botany;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reagent; using Content.Shared.Chemistry.Reagent;
using Content.Shared.Examine; using Content.Shared.Examine;
using Content.Shared.FixedPoint; using Content.Shared.FixedPoint;
@@ -561,11 +562,11 @@ namespace Content.Server.Botany.Components
} }
else else
{ {
var one = FixedPoint2.New(1); var amt = FixedPoint2.New(1);
foreach (var reagent in solutionSystem.RemoveEachReagent(Owner.Uid, solution, one)) foreach (var reagent in solutionSystem.RemoveEachReagent(OwnerUid, solution, amt))
{ {
var reagentProto = _prototypeManager.Index<ReagentPrototype>(reagent); var reagentProto = _prototypeManager.Index<ReagentPrototype>(reagent);
reagentProto.ReactionPlant(Owner); reagentProto.ReactionPlant(OwnerUid, new Solution.ReagentQuantity(reagent, amt));
} }
} }

View File

@@ -1,18 +0,0 @@
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
namespace Content.Server.Chemistry.PlantMetabolism
{
[UsedImplicitly]
public class AdjustHealth : AdjustAttribute
{
public override void Metabolize(IEntity plantHolder, float customPlantMetabolism = 1f)
{
if (!CanMetabolize(plantHolder, out var plantHolderComp))
return;
plantHolderComp.Health += Amount;
plantHolderComp.CheckHealth();
}
}
}

View File

@@ -1,17 +0,0 @@
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
namespace Content.Server.Chemistry.PlantMetabolism
{
[UsedImplicitly]
public class AdjustMutationLevel : AdjustAttribute
{
public override void Metabolize(IEntity plantHolder, float customPlantMetabolism = 1f)
{
if (!CanMetabolize(plantHolder, out var plantHolderComp, false))
return;
plantHolderComp.MutationLevel += Amount * plantHolderComp.MutationMod * customPlantMetabolism;
}
}
}

View File

@@ -1,17 +0,0 @@
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
namespace Content.Server.Chemistry.PlantMetabolism
{
[UsedImplicitly]
public class AdjustMutationMod : AdjustAttribute
{
public override void Metabolize(IEntity plantHolder, float customPlantMetabolism = 1f)
{
if (!CanMetabolize(plantHolder, out var plantHolderComp))
return;
plantHolderComp.MutationMod += Amount;
}
}
}

View File

@@ -1,18 +0,0 @@
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
namespace Content.Server.Chemistry.PlantMetabolism
{
[UsedImplicitly]
public class AdjustNutrition : AdjustAttribute
{
public override void Metabolize(IEntity plantHolder, float customPlantMetabolism = 1f)
{
if (!CanMetabolize(plantHolder, out var plantHolderComp, false))
return;
plantHolderComp.AdjustNutrient(Amount);
return;
}
}
}

View File

@@ -1,17 +0,0 @@
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
namespace Content.Server.Chemistry.PlantMetabolism
{
[UsedImplicitly]
public class AdjustPests : AdjustAttribute
{
public override void Metabolize(IEntity plantHolder, float customPlantMetabolism = 1f)
{
if (!CanMetabolize(plantHolder, out var plantHolderComp))
return;
plantHolderComp.PestLevel += Amount;
}
}
}

View File

@@ -1,17 +0,0 @@
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
namespace Content.Server.Chemistry.PlantMetabolism
{
[UsedImplicitly]
public class AdjustToxins : AdjustAttribute
{
public override void Metabolize(IEntity plantHolder, float customPlantMetabolism = 1f)
{
if (!CanMetabolize(plantHolder, out var plantHolderComp, false))
return;
plantHolderComp.Toxins += Amount;
}
}
}

View File

@@ -1,17 +0,0 @@
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
namespace Content.Server.Chemistry.PlantMetabolism
{
[UsedImplicitly]
public class AdjustWater : AdjustAttribute
{
public override void Metabolize(IEntity plantHolder, float customPlantMetabolism = 1f)
{
if (!CanMetabolize(plantHolder, out var plantHolderComp, false))
return;
plantHolderComp.AdjustWater(Amount);
}
}
}

View File

@@ -1,17 +0,0 @@
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
namespace Content.Server.Chemistry.PlantMetabolism
{
[UsedImplicitly]
public class AdjustWeeds : AdjustAttribute
{
public override void Metabolize(IEntity plantHolder, float customPlantMetabolism = 1f)
{
if (!CanMetabolize(plantHolder, out var plantHolderComp, false))
return;
plantHolderComp.WeedLevel += Amount;
}
}
}

View File

@@ -1,17 +0,0 @@
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
namespace Content.Server.Chemistry.PlantMetabolism
{
[UsedImplicitly]
public class AffectGrowth : AdjustAttribute
{
public override void Metabolize(IEntity plantHolder, float customPlantMetabolism = 1f)
{
if (!CanMetabolize(plantHolder, out var plantHolderComp))
return;
plantHolderComp.AffectGrowth((int) Amount);
}
}
}

View File

@@ -0,0 +1,34 @@
using Content.Server.Body.Metabolism;
using Content.Shared.Body.Metabolism;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reagent;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.Chemistry.ReagentEffectConditions
{
/// <summary>
/// Requires that the metabolizing organ is or is not tagged with a certain MetabolizerType
/// </summary>
public class OrganType : ReagentEffectCondition
{
[DataField("type", required: true, customTypeSerializer: typeof(PrototypeIdSerializer<MetabolizerTypePrototype>))]
public string Type = default!;
/// <summary>
/// Does this condition pass when the organ has the type, or when it doesn't have the type?
/// </summary>
[DataField("shouldHave")]
public bool ShouldHave = true;
public override bool Condition(EntityUid solutionEntity, EntityUid organEntity, Solution.ReagentQuantity reagent, IEntityManager entityManager)
{
if (entityManager.TryGetComponent<MetabolizerComponent>(organEntity, out var metabolizer)
&& metabolizer.MetabolizerTypes != null
&& metabolizer.MetabolizerTypes.Contains(Type))
return ShouldHave;
return !ShouldHave;
}
}
}

View File

@@ -18,7 +18,7 @@ namespace Content.Server.Chemistry.ReagentEffectConditions
[DataField("max")] [DataField("max")]
public FixedPoint2 Max = FixedPoint2.MaxValue; public FixedPoint2 Max = FixedPoint2.MaxValue;
public override bool Condition(IEntity solutionEntity, Solution.ReagentQuantity reagent) public override bool Condition(EntityUid solutionEntity, EntityUid organEntity, Solution.ReagentQuantity reagent, IEntityManager entityManager)
{ {
return reagent.Quantity >= Min && reagent.Quantity < Max; return reagent.Quantity >= Min && reagent.Quantity < Max;
} }

View File

@@ -19,9 +19,9 @@ namespace Content.Server.Chemistry.ReagentEffects
[DataField("damage", required: true)] [DataField("damage", required: true)]
public DamageSpecifier Damage = default!; public DamageSpecifier Damage = default!;
public override void Metabolize(IEntity solutionEntity, Solution.ReagentQuantity amount) public override void Metabolize(EntityUid solutionEntity, EntityUid organEntity, Solution.ReagentQuantity reagent, IEntityManager entityManager)
{ {
EntitySystem.Get<DamageableSystem>().TryChangeDamage(solutionEntity.Uid, Damage, true); EntitySystem.Get<DamageableSystem>().TryChangeDamage(solutionEntity, Damage, true);
} }
} }
} }

View File

@@ -37,9 +37,9 @@ namespace Content.Server.Chemistry.ReagentEffects
/// <summary> /// <summary>
/// Remove reagent at set rate, changes the movespeed modifiers and adds a MovespeedModifierMetabolismComponent if not already there. /// Remove reagent at set rate, changes the movespeed modifiers and adds a MovespeedModifierMetabolismComponent if not already there.
/// </summary> /// </summary>
public override void Metabolize(IEntity solutionEntity, Solution.ReagentQuantity amount) public override void Metabolize(EntityUid solutionEntity, EntityUid organEntity, Solution.ReagentQuantity reagent, IEntityManager entityManager)
{ {
solutionEntity.EnsureComponent(out MovespeedModifierMetabolismComponent status); var status = entityManager.EnsureComponent<MovespeedModifierMetabolismComponent>(solutionEntity);
// Only refresh movement if we need to. // Only refresh movement if we need to.
var modified = !status.WalkSpeedModifier.Equals(WalkSpeedModifier) || var modified = !status.WalkSpeedModifier.Equals(WalkSpeedModifier) ||
@@ -48,10 +48,10 @@ namespace Content.Server.Chemistry.ReagentEffects
status.WalkSpeedModifier = WalkSpeedModifier; status.WalkSpeedModifier = WalkSpeedModifier;
status.SprintSpeedModifier = SprintSpeedModifier; status.SprintSpeedModifier = SprintSpeedModifier;
IncreaseTimer(status, StatusLifetime * amount.Quantity.Float()); IncreaseTimer(status, StatusLifetime * reagent.Quantity.Float());
if (modified) if (modified)
EntitySystem.Get<MovementSpeedModifierSystem>().RefreshMovementSpeedModifiers(solutionEntity.Uid); EntitySystem.Get<MovementSpeedModifierSystem>().RefreshMovementSpeedModifiers(solutionEntity);
} }
public void IncreaseTimer(MovespeedModifierMetabolismComponent status, float time) public void IncreaseTimer(MovespeedModifierMetabolismComponent status, float time)

View File

@@ -1,15 +1,17 @@
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using Content.Server.Botany.Components; using Content.Server.Botany.Components;
using Content.Shared.Botany; using Content.Shared.Botany;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reagent;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Random; using Robust.Shared.Random;
using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.Serialization.Manager.Attributes;
namespace Content.Server.Chemistry.PlantMetabolism namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism
{ {
[ImplicitDataDefinitionForInheritors] [ImplicitDataDefinitionForInheritors]
public abstract class AdjustAttribute : IPlantMetabolizable public abstract class PlantAdjustAttribute : ReagentEffect
{ {
[Dependency] private readonly IRobustRandom _robustRandom = default!; [Dependency] private readonly IRobustRandom _robustRandom = default!;
@@ -21,13 +23,16 @@ namespace Content.Server.Chemistry.PlantMetabolism
/// </summary> /// </summary>
/// <param name="plantHolder">The entity holding the plant</param> /// <param name="plantHolder">The entity holding the plant</param>
/// <param name="plantHolderComponent">The plant holder component</param> /// <param name="plantHolderComponent">The plant holder component</param>
/// <param name="entityManager">The entity manager</param>
/// <param name="mustHaveAlivePlant">Whether to check if it has an alive plant or not</param> /// <param name="mustHaveAlivePlant">Whether to check if it has an alive plant or not</param>
/// <returns></returns> /// <returns></returns>
public bool CanMetabolize(IEntity plantHolder, [NotNullWhen(true)] out PlantHolderComponent? plantHolderComponent, bool mustHaveAlivePlant = true) public bool CanMetabolize(EntityUid plantHolder, [NotNullWhen(true)] out PlantHolderComponent? plantHolderComponent,
IEntityManager entityManager,
bool mustHaveAlivePlant = true)
{ {
plantHolderComponent = null; plantHolderComponent = null;
if (plantHolder.Deleted || !plantHolder.TryGetComponent(out plantHolderComponent) if (!entityManager.TryGetComponent(plantHolder, out plantHolderComponent)
|| mustHaveAlivePlant && (plantHolderComponent.Seed == null || plantHolderComponent.Dead)) || mustHaveAlivePlant && (plantHolderComponent.Seed == null || plantHolderComponent.Dead))
return false; return false;
@@ -36,7 +41,5 @@ namespace Content.Server.Chemistry.PlantMetabolism
return !(Prob <= 0f) && _robustRandom.Prob(Prob); return !(Prob <= 0f) && _robustRandom.Prob(Prob);
} }
public abstract void Metabolize(IEntity plantHolder, float customPlantMetabolism = 1f);
} }
} }

View File

@@ -0,0 +1,18 @@
using Content.Shared.Chemistry.Components;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism
{
public class PlantAdjustHealth : PlantAdjustAttribute
{
public override void Metabolize(EntityUid plantHolder, EntityUid organEntity, Solution.ReagentQuantity reagent, IEntityManager entityManager)
{
if (!CanMetabolize(plantHolder, out var plantHolderComp, entityManager))
return;
plantHolderComp.Health += Amount;
plantHolderComp.CheckHealth();
}
}
}

View File

@@ -0,0 +1,17 @@
using Content.Shared.Chemistry.Components;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism
{
public class PlantAdjustMutationLevel : PlantAdjustAttribute
{
public override void Metabolize(EntityUid plantHolder, EntityUid organEntity, Solution.ReagentQuantity reagent, IEntityManager entityManager)
{
if (!CanMetabolize(plantHolder, out var plantHolderComp, entityManager))
return;
plantHolderComp.MutationLevel += Amount * plantHolderComp.MutationMod;
}
}
}

View File

@@ -0,0 +1,18 @@
using Content.Shared.Chemistry.Components;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism
{
[UsedImplicitly]
public class PlantAdjustMutationMod : PlantAdjustAttribute
{
public override void Metabolize(EntityUid plantHolder, EntityUid organEntity, Solution.ReagentQuantity reagent, IEntityManager entityManager)
{
if (!CanMetabolize(plantHolder, out var plantHolderComp, entityManager))
return;
plantHolderComp.MutationMod += Amount;
}
}
}

View File

@@ -0,0 +1,19 @@
using Content.Shared.Chemistry.Components;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism
{
[UsedImplicitly]
public class PlantAdjustNutrition : PlantAdjustAttribute
{
public override void Metabolize(EntityUid plantHolder, EntityUid organEntity, Solution.ReagentQuantity reagent, IEntityManager entityManager)
{
if (!CanMetabolize(plantHolder, out var plantHolderComp, entityManager))
return;
plantHolderComp.AdjustNutrient(Amount);
return;
}
}
}

View File

@@ -0,0 +1,18 @@
using Content.Shared.Chemistry.Components;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism
{
[UsedImplicitly]
public class PlantAdjustPests : PlantAdjustAttribute
{
public override void Metabolize(EntityUid plantHolder, EntityUid organEntity, Solution.ReagentQuantity reagent, IEntityManager entityManager)
{
if (!CanMetabolize(plantHolder, out var plantHolderComp, entityManager))
return;
plantHolderComp.PestLevel += Amount;
}
}
}

View File

@@ -0,0 +1,18 @@
using Content.Shared.Chemistry.Components;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism
{
[UsedImplicitly]
public class PlantAdjustToxins : PlantAdjustAttribute
{
public override void Metabolize(EntityUid plantHolder, EntityUid organEntity, Solution.ReagentQuantity reagent, IEntityManager entityManager)
{
if (!CanMetabolize(plantHolder, out var plantHolderComp, entityManager))
return;
plantHolderComp.Toxins += Amount;
}
}
}

View File

@@ -0,0 +1,18 @@
using Content.Shared.Chemistry.Components;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism
{
[UsedImplicitly]
public class PlantAdjustWater : PlantAdjustAttribute
{
public override void Metabolize(EntityUid plantHolder, EntityUid organEntity, Solution.ReagentQuantity reagent, IEntityManager entityManager)
{
if (!CanMetabolize(plantHolder, out var plantHolderComp, entityManager))
return;
plantHolderComp.AdjustWater(Amount);
}
}
}

View File

@@ -0,0 +1,18 @@
using Content.Shared.Chemistry.Components;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism
{
[UsedImplicitly]
public class PlantAdjustWeeds : PlantAdjustAttribute
{
public override void Metabolize(EntityUid plantHolder, EntityUid organEntity, Solution.ReagentQuantity reagent, IEntityManager entityManager)
{
if (!CanMetabolize(plantHolder, out var plantHolderComp, entityManager))
return;
plantHolderComp.WeedLevel += Amount;
}
}
}

View File

@@ -0,0 +1,18 @@
using Content.Shared.Chemistry.Components;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism
{
[UsedImplicitly]
public class PlantAffectGrowth : PlantAdjustAttribute
{
public override void Metabolize(EntityUid plantHolder, EntityUid organEntity, Solution.ReagentQuantity reagent, IEntityManager entityManager)
{
if (!CanMetabolize(plantHolder, out var plantHolderComp, entityManager))
return;
plantHolderComp.AffectGrowth((int) Amount);
}
}
}

View File

@@ -1,21 +1,23 @@
using System; using System;
using Content.Server.Botany.Components; using Content.Server.Botany.Components;
using Content.Shared.Botany; using Content.Shared.Botany;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reagent;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Random; using Robust.Shared.Random;
using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.Serialization.Manager.Attributes;
namespace Content.Server.Chemistry.PlantMetabolism namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism
{ {
[UsedImplicitly] [UsedImplicitly]
[DataDefinition] [DataDefinition]
public class Clonexadone : IPlantMetabolizable public class PlantClonexadone : ReagentEffect
{ {
public void Metabolize(IEntity plantHolder, float customPlantMetabolism = 1) public override void Metabolize(EntityUid plantHolder, EntityUid organEntity, Solution.ReagentQuantity reagent, IEntityManager entityManager)
{ {
if (plantHolder.Deleted || !plantHolder.TryGetComponent(out PlantHolderComponent? plantHolderComp) if (!entityManager.TryGetComponent(plantHolder, out PlantHolderComponent? plantHolderComp)
|| plantHolderComp.Seed == null || plantHolderComp.Dead) || plantHolderComp.Seed == null || plantHolderComp.Dead)
return; return;

View File

@@ -1,5 +1,7 @@
using Content.Server.Botany.Components; using Content.Server.Botany.Components;
using Content.Shared.Botany; using Content.Shared.Botany;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reagent;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.IoC; using Robust.Shared.IoC;
@@ -7,29 +9,29 @@ using Robust.Shared.Maths;
using Robust.Shared.Random; using Robust.Shared.Random;
using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.Serialization.Manager.Attributes;
namespace Content.Server.Chemistry.PlantMetabolism namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism
{ {
[UsedImplicitly] [UsedImplicitly]
[DataDefinition] [DataDefinition]
public class Diethylamine : IPlantMetabolizable public class PlantDiethylamine : ReagentEffect
{ {
public void Metabolize(IEntity plantHolder, float customPlantMetabolism = 1) public override void Metabolize(EntityUid plantHolder, EntityUid organEntity, Solution.ReagentQuantity reagent, IEntityManager entityManager)
{ {
if (plantHolder.Deleted || !plantHolder.TryGetComponent(out PlantHolderComponent? plantHolderComp) if (!entityManager.TryGetComponent(plantHolder, out PlantHolderComponent? plantHolderComp)
|| plantHolderComp.Seed == null || plantHolderComp.Dead || || plantHolderComp.Seed == null || plantHolderComp.Dead ||
plantHolderComp.Seed.Immutable) plantHolderComp.Seed.Immutable)
return; return;
var random = IoCManager.Resolve<IRobustRandom>(); var random = IoCManager.Resolve<IRobustRandom>();
var chance = MathHelper.Lerp(15f, 125f, plantHolderComp.Seed.Lifespan) * 2f * customPlantMetabolism; var chance = MathHelper.Lerp(15f, 125f, plantHolderComp.Seed.Lifespan) * 2f;
if (random.Prob(chance)) if (random.Prob(chance))
{ {
plantHolderComp.CheckForDivergence(true); plantHolderComp.CheckForDivergence(true);
plantHolderComp.Seed.Lifespan++; plantHolderComp.Seed.Lifespan++;
} }
chance = MathHelper.Lerp(15f, 125f, plantHolderComp.Seed.Endurance) * 2f * customPlantMetabolism; chance = MathHelper.Lerp(15f, 125f, plantHolderComp.Seed.Endurance) * 2f;
if (random.Prob(chance)) if (random.Prob(chance))
{ {
plantHolderComp.CheckForDivergence(true); plantHolderComp.CheckForDivergence(true);

View File

@@ -1,5 +1,7 @@
using Content.Server.Botany.Components; using Content.Server.Botany.Components;
using Content.Shared.Botany; using Content.Shared.Botany;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reagent;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.IoC; using Robust.Shared.IoC;
@@ -7,22 +9,22 @@ using Robust.Shared.Maths;
using Robust.Shared.Random; using Robust.Shared.Random;
using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.Serialization.Manager.Attributes;
namespace Content.Server.Chemistry.PlantMetabolism namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism
{ {
[UsedImplicitly] [UsedImplicitly]
[DataDefinition] [DataDefinition]
public class RobustHarvest : IPlantMetabolizable public class RobustHarvest : ReagentEffect
{ {
public void Metabolize(IEntity plantHolder, float customPlantMetabolism = 1f) public override void Metabolize(EntityUid plantHolder, EntityUid organEntity, Solution.ReagentQuantity reagent, IEntityManager entityManager)
{ {
if (plantHolder.Deleted || !plantHolder.TryGetComponent(out PlantHolderComponent? plantHolderComp) if (!entityManager.TryGetComponent(plantHolder, out PlantHolderComponent? plantHolderComp)
|| plantHolderComp.Seed == null || plantHolderComp.Dead || || plantHolderComp.Seed == null || plantHolderComp.Dead ||
plantHolderComp.Seed.Immutable) plantHolderComp.Seed.Immutable)
return; return;
var random = IoCManager.Resolve<IRobustRandom>(); var random = IoCManager.Resolve<IRobustRandom>();
var chance = MathHelper.Lerp(15f, 150f, plantHolderComp.Seed.Potency) * 3.5f * customPlantMetabolism; var chance = MathHelper.Lerp(15f, 150f, plantHolderComp.Seed.Potency) * 3.5f;
if (random.Prob(chance)) if (random.Prob(chance))
{ {
@@ -30,7 +32,7 @@ namespace Content.Server.Chemistry.PlantMetabolism
plantHolderComp.Seed.Potency++; plantHolderComp.Seed.Potency++;
} }
chance = MathHelper.Lerp(6f, 2f, plantHolderComp.Seed.Yield) * 0.15f * customPlantMetabolism; chance = MathHelper.Lerp(6f, 2f, plantHolderComp.Seed.Yield) * 0.15f;
if (random.Prob(chance)) if (random.Prob(chance))
{ {

View File

@@ -15,12 +15,12 @@ namespace Content.Server.Chemistry.ReagentEffects
/// <summary> /// <summary>
/// How much hunger is satiated when 1u of the reagent is metabolized /// How much hunger is satiated when 1u of the reagent is metabolized
/// </summary> /// </summary>
[DataField("nutritionFactor")] public float NutritionFactor { get; set; } = 3.0f; [DataField("factor")] public float NutritionFactor { get; set; } = 3.0f;
//Remove reagent at set rate, satiate hunger if a HungerComponent can be found //Remove reagent at set rate, satiate hunger if a HungerComponent can be found
public override void Metabolize(IEntity solutionEntity, Solution.ReagentQuantity amount) public override void Metabolize(EntityUid solutionEntity, EntityUid organEntity, Solution.ReagentQuantity reagent, IEntityManager entityManager)
{ {
if (solutionEntity.TryGetComponent(out HungerComponent? hunger)) if (entityManager.TryGetComponent(solutionEntity, out HungerComponent? hunger))
hunger.UpdateFood(NutritionFactor); hunger.UpdateFood(NutritionFactor);
} }
} }

View File

@@ -14,13 +14,13 @@ namespace Content.Server.Chemistry.ReagentEffects
{ {
/// How much thirst is satiated each metabolism tick. Not currently tied to /// How much thirst is satiated each metabolism tick. Not currently tied to
/// rate or anything. /// rate or anything.
[DataField("hydrationFactor")] [DataField("factor")]
public float HydrationFactor { get; set; } = 3.0f; public float HydrationFactor { get; set; } = 3.0f;
/// Satiate thirst if a ThirstComponent can be found /// Satiate thirst if a ThirstComponent can be found
public override void Metabolize(IEntity solutionEntity, Solution.ReagentQuantity amount) public override void Metabolize(EntityUid solutionEntity, EntityUid organEntity, Solution.ReagentQuantity reagent, IEntityManager entityManager)
{ {
if (solutionEntity.TryGetComponent(out ThirstComponent? thirst)) if (entityManager.TryGetComponent(solutionEntity, out ThirstComponent? thirst))
thirst.UpdateThirst(HydrationFactor); thirst.UpdateThirst(HydrationFactor);
} }
} }

View File

@@ -0,0 +1,12 @@
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.Manager.Attributes;
namespace Content.Shared.Body.Metabolism
{
[Prototype("metabolismGroup")]
public class MetabolismGroupPrototype : IPrototype
{
[DataField("id", required: true)]
public string ID { get; } = default!;
}
}

View File

@@ -0,0 +1,12 @@
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.Manager.Attributes;
namespace Content.Shared.Body.Metabolism
{
[Prototype("metabolizerType")]
public class MetabolizerTypePrototype : IPrototype
{
[DataField("id", required: true)]
public string ID { get; } = default!;
}
}

View File

@@ -1,14 +0,0 @@
using Robust.Shared.GameObjects;
namespace Content.Shared.Botany
{
public interface IPlantMetabolizable
{
/// <summary>
/// Metabolize <paramref name="customPlantMetabolism"/> unit(s) of a reagent.
/// </summary>
/// <param name="plantHolder">Entity holding the plant</param>
/// <param name="customPlantMetabolism">Units to metabolize</param>
void Metabolize(IEntity plantHolder, float customPlantMetabolism = 1f);
}
}

View File

@@ -1,5 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reagent; using Content.Shared.Chemistry.Reagent;
using JetBrains.Annotations;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.Serialization.Manager.Attributes;
@@ -7,9 +9,10 @@ namespace Content.Shared.Chemistry.Reagent
{ {
/// <summary> /// <summary>
/// Reagent effects describe behavior that occurs when a reagent is ingested and metabolized by some /// Reagent effects describe behavior that occurs when a reagent is ingested and metabolized by some
/// organ. They only trigger when their conditions (<see cref="ReagentEffectCondition"/> /// organ. They only trigger when all of <see cref="Conditions"/> are satisfied.
/// </summary> /// </summary>
[ImplicitDataDefinitionForInheritors] [ImplicitDataDefinitionForInheritors]
[MeansImplicitUse]
public abstract class ReagentEffect public abstract class ReagentEffect
{ {
/// <summary> /// <summary>
@@ -18,6 +21,6 @@ namespace Content.Shared.Chemistry.Reagent
[DataField("conditions")] [DataField("conditions")]
public ReagentEffectCondition[]? Conditions; public ReagentEffectCondition[]? Conditions;
public abstract void Metabolize(IEntity solutionEntity, Components.Solution.ReagentQuantity amount); public abstract void Metabolize(EntityUid solutionEntity, EntityUid organEntity, Solution.ReagentQuantity reagent, IEntityManager entityManager);
} }
} }

View File

@@ -1,12 +1,14 @@
using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.Components;
using JetBrains.Annotations;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.Serialization.Manager.Attributes;
namespace Content.Shared.Chemistry.Reagent namespace Content.Shared.Chemistry.Reagent
{ {
[ImplicitDataDefinitionForInheritors] [ImplicitDataDefinitionForInheritors]
[MeansImplicitUse]
public abstract class ReagentEffectCondition public abstract class ReagentEffectCondition
{ {
public abstract bool Condition(IEntity solutionEntity, Solution.ReagentQuantity reagent); public abstract bool Condition(EntityUid solutionEntity, EntityUid organEntity, Solution.ReagentQuantity reagent, IEntityManager entityManager);
} }
} }

View File

@@ -1,29 +1,35 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using Content.Shared.Body.Metabolism;
using Content.Shared.Botany; using Content.Shared.Botany;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reaction; using Content.Shared.Chemistry.Reaction;
using Content.Shared.FixedPoint; using Content.Shared.FixedPoint;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Map; using Robust.Shared.Map;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
using Robust.Shared.ViewVariables; using Robust.Shared.ViewVariables;
namespace Content.Shared.Chemistry.Reagent namespace Content.Shared.Chemistry.Reagent
{ {
[Prototype("reagent")] [Prototype("reagent")]
[DataDefinition] [DataDefinition]
public class ReagentPrototype : IPrototype public class ReagentPrototype : IPrototype, IInheritingPrototype
{ {
[DataField("metabolisms", serverOnly: true, customTypeSerializer: typeof(PrototypeIdDictionarySerializer<ReagentEffectsEntry, MetabolismGroupPrototype>))]
public Dictionary<string, ReagentEffectsEntry>? Metabolisms = null;
[DataField("tileReactions", serverOnly: true)] [DataField("tileReactions", serverOnly: true)]
private readonly List<ITileReaction> _tileReactions = new(0); private readonly List<ITileReaction> _tileReactions = new(0);
[DataField("plantMetabolism", serverOnly: true)] [DataField("plantMetabolism", serverOnly: true)]
private readonly List<IPlantMetabolizable> _plantMetabolism = new(0); private readonly List<ReagentEffect> _plantMetabolism = new(0);
[DataField("customPlantMetabolism")]
private readonly float _customPlantMetabolism = 1f;
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [DataField("id", required: true)]
@@ -32,6 +38,13 @@ namespace Content.Shared.Chemistry.Reagent
[DataField("name")] [DataField("name")]
public string Name { get; } = string.Empty; public string Name { get; } = string.Empty;
[DataField("parent", customTypeSerializer:typeof(PrototypeIdSerializer<ReagentPrototype>))]
public string? Parent { get; private set; }
[NeverPushInheritance]
[DataField("abstract")]
public bool Abstract { get; private set; }
[DataField("desc")] [DataField("desc")]
public string Description { get; } = string.Empty; public string Description { get; } = string.Empty;
@@ -41,12 +54,6 @@ namespace Content.Shared.Chemistry.Reagent
[DataField("color")] [DataField("color")]
public Color SubstanceColor { get; } = Color.White; public Color SubstanceColor { get; } = Color.White;
[DataField("toxin")]
public bool Toxin { get; }
[DataField("boozePower")]
public int BoozePower { get; }
[DataField("boilingPoint")] [DataField("boilingPoint")]
public float? BoilingPoint { get; } public float? BoilingPoint { get; }
@@ -58,7 +65,7 @@ namespace Content.Shared.Chemistry.Reagent
//List of metabolism effects this reagent has, should really only be used server-side. //List of metabolism effects this reagent has, should really only be used server-side.
public IReadOnlyList<ITileReaction> TileReactions => _tileReactions; public IReadOnlyList<ITileReaction> TileReactions => _tileReactions;
public IReadOnlyList<IPlantMetabolizable> PlantMetabolism => _plantMetabolism; public IReadOnlyList<ReagentEffect> PlantMetabolism => _plantMetabolism;
/// <summary> /// <summary>
/// If the substance color is too dark we user a lighter version to make the text color readable when the user examines a solution. /// If the substance color is too dark we user a lighter version to make the text color readable when the user examines a solution.
@@ -99,15 +106,32 @@ namespace Content.Shared.Chemistry.Reagent
return removed; return removed;
} }
public void ReactionPlant(IEntity? plantHolder) public void ReactionPlant(EntityUid? plantHolder, Solution.ReagentQuantity amount)
{ {
if (plantHolder == null || plantHolder.Deleted) if (plantHolder == null)
return; return;
var entMan = IoCManager.Resolve<IEntityManager>();
foreach (var plantMetabolizable in _plantMetabolism) foreach (var plantMetabolizable in _plantMetabolism)
{ {
plantMetabolizable.Metabolize(plantHolder, _customPlantMetabolism); plantMetabolizable.Metabolize(plantHolder.Value, plantHolder.Value, amount, entMan);
} }
} }
} }
[DataDefinition]
public class ReagentEffectsEntry
{
/// <summary>
/// Amount of reagent to metabolize, per metabolism cycle.
/// </summary>
[DataField("metabolismRate")]
public FixedPoint2 MetabolismRate = FixedPoint2.New(1.0f);
/// <summary>
/// A list of effects to apply when these reagents are metabolized.
/// </summary>
[DataField("effects", required: true)]
public ReagentEffect[] Effects = default!;
}
} }

View File

@@ -5,6 +5,7 @@ using Robust.Shared.GameObjects;
using Robust.Shared.GameStates; using Robust.Shared.GameStates;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
namespace Content.Shared.StatusEffect namespace Content.Shared.StatusEffect
{ {
@@ -15,6 +16,7 @@ namespace Content.Shared.StatusEffect
{ {
public override string Name => "StatusEffects"; public override string Name => "StatusEffects";
[ViewVariables]
public Dictionary<string, StatusEffectState> ActiveEffects = new(); public Dictionary<string, StatusEffectState> ActiveEffects = new();
/// <summary> /// <summary>
@@ -33,12 +35,14 @@ namespace Content.Shared.StatusEffect
/// <summary> /// <summary>
/// The start and end times of the status effect. /// The start and end times of the status effect.
/// </summary> /// </summary>
[ViewVariables]
public (TimeSpan, TimeSpan) Cooldown; public (TimeSpan, TimeSpan) Cooldown;
/// <summary> /// <summary>
/// The name of the relevant component that /// The name of the relevant component that
/// was added alongside the effect, if any. /// was added alongside the effect, if any.
/// </summary> /// </summary>
[ViewVariables]
public string? RelevantComponent; public string? RelevantComponent;
public StatusEffectState((TimeSpan, TimeSpan) cooldown, string? relevantComponent=null) public StatusEffectState((TimeSpan, TimeSpan) cooldown, string? relevantComponent=null)

View File

@@ -320,6 +320,7 @@ namespace Content.Shared.StatusEffect
var timer = status.ActiveEffects[key].Cooldown; var timer = status.ActiveEffects[key].Cooldown;
timer.Item2 += time; timer.Item2 += time;
status.ActiveEffects[key].Cooldown = timer;
return true; return true;
} }
@@ -347,6 +348,7 @@ namespace Content.Shared.StatusEffect
return false; return false;
timer.Item2 -= time; timer.Item2 -= time;
status.ActiveEffects[key].Cooldown = timer;
return true; return true;
} }

View File

@@ -103,8 +103,6 @@
behaviors: behaviors:
- !type:LungBehavior {} - !type:LungBehavior {}
# TODO DAMAGE UNITS. Some of these damage effects were scaled up to integers.
# Scale back down when damage units are in.
- type: entity - type: entity
id: OrganHumanHeart id: OrganHumanHeart
parent: BaseHumanOrgan parent: BaseHumanOrgan
@@ -122,98 +120,11 @@
# This is done because these chemicals need to have some effect even if they aren't being filtered out of your body. # This is done because these chemicals need to have some effect even if they aren't being filtered out of your body.
# You're technically 'immune to poison' without a heart, but.. uhh, you'll have bigger problems on your hands. # You're technically 'immune to poison' without a heart, but.. uhh, you'll have bigger problems on your hands.
- type: Metabolizer - type: Metabolizer
metabolisms: metabolizerTypes: [Human]
Arithrazine:
effects:
- !type:HealthChange
damage:
groups: groups:
Toxin: -2 # -1 Multiplying by 2. pls give damage units - id: Medicine
Brute: 1 # 0.5 - id: Poison
Bicaridine: - id: Narcotic
effects:
- !type:HealthChange
damage:
groups:
Brute: -2
Dermaline:
effects:
- !type:HealthChange
damage:
groups:
Burn: -3
Dexalin:
effects:
- !type:HealthChange
damage:
types:
Asphyxiation: -1
DexalinPlus:
effects:
- !type:HealthChange
damage:
types:
Asphyxiation: -3
Dylovene:
effects:
- !type:HealthChange
damage:
types:
Poison: -1
Ephedrine:
effects:
- !type:MovespeedModifier
walkSpeedModifier: 1.2
sprintSpeedModifier: 1.2
HeartbreakerToxin:
effects:
- !type:HealthChange
damage:
types:
Asphyxiation: 4
Kelotane:
effects:
- !type:HealthChange
damage:
groups:
Burn: -1
Lexorin:
effects:
- !type:HealthChange
damage:
groups:
Airloss: 7
Meth:
effects:
- !type:HealthChange
damage:
types:
Poison: 2 # 2.5
- !type:MovespeedModifier
walkSpeedModifier: 1.3
sprintSpeedModifier: 1.3
- !type:HealthChange
conditions:
- !type:ReagentThreshold
min: 10
damage:
types:
Poison: 4 # this is added to the base damage of the meth.
Omnizine:
effects:
- !type:HealthChange
damage:
groups:
Burn: -3 # -2. w/o damage units did not divide into 3 types
Toxin: -2
Airloss: -2
Brute: -3 # -2. w/o damage units did not divide into 3 types
Synaptizine:
effects:
- !type:HealthChange
damage:
types:
Poison: 1 # 0.5 pls damage units
- type: entity - type: entity
id: OrganHumanStomach id: OrganHumanStomach
@@ -237,92 +148,11 @@
# The stomach metabolizes stuff like foods and drinks. # The stomach metabolizes stuff like foods and drinks.
# TODO: Have it work off of the ent's solution container, and move this # TODO: Have it work off of the ent's solution container, and move this
# to intestines instead. # to intestines instead.
- type: Metabolizer # Release me from this hell called 1 reagent for every drink - type: Metabolizer
# TODO please make every drink their own base thing metabolizerTypes: [Human]
metabolisms: groups:
Flour: - id: Food
effects: - id: Drink
- !type:SatiateHunger
JuiceApple:
effects:
- !type:SatiateThirst
JuiceBerry:
effects:
- !type:SatiateThirst
JuiceBanana:
effects:
- !type:SatiateThirst
JuiceCarrot:
effects:
- !type:SatiateThirst
JuiceLime:
effects:
- !type:SatiateThirst
JuiceLemon:
effects:
- !type:SatiateThirst
JuiceGrape:
effects:
- !type:SatiateThirst
JuiceOrange:
effects:
- !type:SatiateThirst
JuiceTomato:
effects:
- !type:SatiateThirst
JuiceBerryPoison:
effects:
- !type:SatiateThirst
- !type:HealthChange
damage:
types:
Poison: 1
JuiceWatermelon:
effects:
- !type:SatiateThirst
JuicePineapple:
effects:
- !type:SatiateThirst
Nutriment:
effects:
- !type:SatiateHunger
Water:
effects:
- !type:SatiateThirst
hydrationFactor: 2
Coffee:
effects:
- !type:SatiateThirst
Tea:
effects:
- !type:SatiateThirst
Milk:
effects:
- !type:SatiateThirst
MilkSpoiled:
effects:
- !type:SatiateThirst
hydrationFactor: -2
MilkSoy:
effects:
- !type:SatiateThirst
hydrationFactor: 2 # soyboys stay winning
MilkOat:
effects:
- !type:SatiateThirst
hydrationFactor: 2 # oatboys stay winning
Cola:
effects:
- !type:SatiateThirst
hydrationFactor: 0.5 # sodaboys stay losing
FourteenLoko:
effects:
- !type:SatiateThirst
hydrationFactor: 2
- !type:HealthChange
damage:
types:
Poison: 1
- type: entity - type: entity
id: OrganHumanLiver id: OrganHumanLiver
@@ -336,270 +166,10 @@
size: 1 size: 1
compatibility: Biological compatibility: Biological
- type: Metabolizer # The liver metabolizes certain chemicals only, like alcohol. - type: Metabolizer # The liver metabolizes certain chemicals only, like alcohol.
metabolisms: # TODO there needs to be a better way to do this than just add every damn drink metabolizerTypes: [Human]
#Basic Alchohol groups:
Ale: - id: Alcohol
effects: rateModifier: 0.1 # removes alcohol very slowly along with the stomach removing it as a drink
- !type:SatiateThirst
Beer:
effects:
- !type:SatiateThirst
BlueCuracao:
effects:
- !type:SatiateThirst
Cognac:
effects:
- !type:SatiateThirst
DeadRum:
effects:
- !type:SatiateThirst
Gin:
effects:
- !type:SatiateThirst
Kahlua:
effects:
- !type:SatiateThirst
MelonLiquor:
effects:
- !type:SatiateThirst
NTCahors:
effects:
- !type:SatiateThirst
PoisonWine:
effects:
- !type:SatiateThirst
- !type:HealthChange
damage:
types:
Poison: 1
Rum:
effects:
- !type:SatiateThirst
Sake:
effects:
- !type:SatiateThirst
Tequila:
effects:
- !type:SatiateThirst
Vermouth:
effects:
- !type:SatiateThirst
Vodka:
effects:
- !type:SatiateThirst
Whiskey:
effects:
- !type:SatiateThirst
Wine:
effects:
- !type:SatiateThirst
#Mixed Alcohol
AcidSpit:
effects:
- !type:SatiateThirst
AlliesCocktail:
effects:
- !type:SatiateThirst
Aloe:
effects:
- !type:SatiateThirst
Amasec:
effects:
- !type:SatiateThirst
Andalusia:
effects:
- !type:SatiateThirst
Antifreeze:
effects:
- !type:SatiateThirst
AtomicBomb:
effects:
- !type:SatiateThirst
B52:
effects:
- !type:SatiateThirst
BahamaMama:
effects:
- !type:SatiateThirst
BananaHonk:
effects:
- !type:SatiateThirst
Barefoot:
effects:
- !type:SatiateThirst
BeepskySmash:
effects:
- !type:SatiateThirst
Bilk:
effects:
- !type:SatiateThirst
BlackRussian:
effects:
- !type:SatiateThirst
BloodyMary:
effects:
- !type:SatiateThirst
Booger:
effects:
- !type:SatiateThirst
BraveBull:
effects:
- !type:SatiateThirst
CubaLibre:
effects:
- !type:SatiateThirst
DemonsBlood:
effects:
- !type:SatiateThirst
DevilsKiss:
effects:
- !type:SatiateThirst
DoctorsDelight:
effects:
- !type:SatiateThirst
DriestMartini:
effects:
- !type:SatiateThirst
ErikaSuprise:
effects:
- !type:SatiateThirst
GargleBlaster:
effects:
- !type:SatiateThirst
GinTonic:
effects:
- !type:SatiateThirst
Goldschlager:
effects:
- !type:SatiateThirst
Grog:
effects:
- !type:SatiateThirst
HippiesDelight:
effects:
- !type:SatiateThirst
Hooch:
effects:
- !type:SatiateThirst
IcedBeer:
effects:
- !type:SatiateThirst
IrishCarBomb:
effects:
- !type:SatiateThirst
IrishCream:
effects:
- !type:SatiateThirst
IrishCoffee:
effects:
- !type:SatiateThirst
KiraSpecial:
effects:
- !type:SatiateThirst
Lean:
effects:
- !type:SatiateThirst
LeanShine: # who added this?
effects:
- !type:SatiateThirst
LongIslandIcedTea:
effects:
- !type:SatiateThirst
Manhattan:
effects:
- !type:SatiateThirst
ManhattanProject:
effects:
- !type:SatiateThirst
ManlyDorf:
effects:
- !type:SatiateThirst
Margarita:
effects:
- !type:SatiateThirst
Martini:
effects:
- !type:SatiateThirst
Mead:
effects:
- !type:SatiateThirst
Mojito:
effects:
- !type:SatiateThirst
Moonshine:
effects:
- !type:SatiateThirst
Neurotoxin:
effects:
- !type:SatiateThirst
- !type:HealthChange
damage:
types:
Poison: 1
Patron:
effects:
- !type:SatiateThirst
RedMead:
effects:
- !type:SatiateThirst
Rewriter:
effects:
- !type:SatiateThirst
Sbiten:
effects:
- !type:SatiateThirst
ScrewdriverCocktail:
effects:
- !type:SatiateThirst
Silencer:
effects:
- !type:SatiateThirst
Singulo:
effects:
- !type:SatiateThirst
SnowWhite:
effects:
- !type:SatiateThirst
Starkist:
effects:
- !type:SatiateThirst
SuiDream:
effects:
- !type:SatiateThirst
TequilaSunrise:
effects:
- !type:SatiateThirst
ThreeMileIsland:
effects:
- !type:SatiateThirst
ToxinsSpecial:
effects:
- !type:SatiateThirst
VodkaMartini:
effects:
- !type:SatiateThirst
VodkaTonic:
effects:
- !type:SatiateThirst
WhiskeyCola:
effects:
- !type:SatiateThirst
WhiskeySoda:
effects:
- !type:SatiateThirst
WhiteRussian:
effects:
- !type:SatiateThirst
FourteenLoko:
effects:
- !type:SatiateThirst
hydrationFactor: 2
- !type:HealthChange
damage:
types:
Poison: 1
- type: entity - type: entity
id: OrganHumanKidneys id: OrganHumanKidneys
@@ -614,5 +184,3 @@
- type: Mechanism - type: Mechanism
size: 1 size: 1
compatibility: Biological compatibility: Biological

View File

@@ -1,9 +1,12 @@
# Base Alcohol # Base Alcohol
# TODO MIRROR: drunkenness
- type: reagent - type: reagent
id: Absinthe id: Absinthe
name: absinthe name: absinthe
parent: BaseAlcohol
desc: A anise-flavoured spirit derived from botanicals. desc: A anise-flavoured spirit derived from botanicals.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#33EE00" color: "#33EE00"
@@ -12,6 +15,7 @@
- type: reagent - type: reagent
id: Ale id: Ale
name: ale name: ale
parent: BaseAlcohol
desc: A dark alchoholic beverage made by malted barley and yeast. desc: A dark alchoholic beverage made by malted barley and yeast.
physicalDesc: bubbly physicalDesc: bubbly
color: "#663100" color: "#663100"
@@ -20,19 +24,16 @@
- type: reagent - type: reagent
id: Beer id: Beer
name: beer name: beer
parent: BaseAlcohol
desc: An alcoholic beverage made from malted grains, hops, yeast, and water. desc: An alcoholic beverage made from malted grains, hops, yeast, and water.
physicalDesc: bubbly physicalDesc: bubbly
color: "#cfa85f" color: "#cfa85f"
spritePath: beerglass.rsi spritePath: beerglass.rsi
plantMetabolism:
- !type:AdjustNutrition
amount: 0.25
- !type:AdjustWater
amount: 0.7
- type: reagent - type: reagent
id: BlueCuracao id: BlueCuracao
name: blue curacao name: blue curacao
parent: BaseAlcohol
desc: Exotically blue, fruity drink, distilled from oranges. desc: Exotically blue, fruity drink, distilled from oranges.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#0000CD" color: "#0000CD"
@@ -41,6 +42,7 @@
- type: reagent - type: reagent
id: Cognac id: Cognac
name: cognac name: cognac
parent: BaseAlcohol
desc: A sweet and strongly alcoholic drink, twice distilled and left to mature for several years. Classy as fornication. desc: A sweet and strongly alcoholic drink, twice distilled and left to mature for several years. Classy as fornication.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#AB3C05" color: "#AB3C05"
@@ -49,6 +51,7 @@
- type: reagent - type: reagent
id: DeadRum id: DeadRum
name: deadrum name: deadrum
parent: BaseAlcohol
desc: Distilled alcoholic drink made from saltwater. desc: Distilled alcoholic drink made from saltwater.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#664300" color: "#664300"
@@ -57,6 +60,7 @@
- type: reagent - type: reagent
id: Gin id: Gin
name: gin name: gin
parent: BaseAlcohol
desc: A distilled alcoholic drink that derives its predominant flavour from juniper berries. desc: A distilled alcoholic drink that derives its predominant flavour from juniper berries.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#664300" color: "#664300"
@@ -65,6 +69,7 @@
- type: reagent - type: reagent
id: Kahlua id: Kahlua
name: kahlua name: kahlua
parent: BaseAlcohol
desc: A widely known, Mexican coffee-flavoured liqueur. desc: A widely known, Mexican coffee-flavoured liqueur.
physicalDesc: cloudy physicalDesc: cloudy
color: "#664300" color: "#664300"
@@ -73,6 +78,7 @@
- type: reagent - type: reagent
id: MelonLiquor id: MelonLiquor
name: melon liquor name: melon liquor
parent: BaseAlcohol
desc: A relatively sweet and fruity 46 proof liquor. desc: A relatively sweet and fruity 46 proof liquor.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#138808" color: "#138808"
@@ -81,6 +87,7 @@
- type: reagent - type: reagent
id: NTCahors id: NTCahors
name: NeoTheology Cahors Wine name: NeoTheology Cahors Wine
parent: BaseAlcohol
desc: Fortified dessert wine made from cabernet sauvignon, saperavi and other grapes. desc: Fortified dessert wine made from cabernet sauvignon, saperavi and other grapes.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#7E4043" color: "#7E4043"
@@ -89,14 +96,27 @@
- type: reagent - type: reagent
id: PoisonWine id: PoisonWine
name: poison wine name: poison wine
parent: BaseAlcohol
desc: Is this even wine? Toxic! Hallucinogenic! Probably consumed in boatloads by your superiors! desc: Is this even wine? Toxic! Hallucinogenic! Probably consumed in boatloads by your superiors!
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#000000" color: "#000000"
spritePath: pwineglass.rsi spritePath: pwineglass.rsi
metabolisms:
Drink:
effects:
- !type:SatiateThirst
factor: 2
Poison:
effects:
- !type:HealthChange
damage:
types:
Poison: 1
- type: reagent - type: reagent
id: Rum id: Rum
name: rum name: rum
parent: BaseAlcohol
desc: Distilled alcoholic drink made from sugarcane byproducts. desc: Distilled alcoholic drink made from sugarcane byproducts.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#664300" color: "#664300"
@@ -105,6 +125,7 @@
- type: reagent - type: reagent
id: Sake id: Sake
name: sake name: sake
parent: BaseAlcohol
desc: Alcoholic beverage made by fermenting rice that has been polished. desc: Alcoholic beverage made by fermenting rice that has been polished.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#DDDDDD" color: "#DDDDDD"
@@ -112,6 +133,7 @@
- type: reagent - type: reagent
id: Tequila id: Tequila
name: tequila name: tequila
parent: BaseAlcohol
desc: A strong and mildly flavoured, mexican produced spirit. desc: A strong and mildly flavoured, mexican produced spirit.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#d7d1d155" color: "#d7d1d155"
@@ -119,6 +141,7 @@
- type: reagent - type: reagent
id: Vermouth id: Vermouth
name: vermouth name: vermouth
parent: BaseAlcohol
desc: Aromatized, fortified white wine flavored with various botanicals. desc: Aromatized, fortified white wine flavored with various botanicals.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#91FF91" color: "#91FF91"
@@ -127,6 +150,7 @@
- type: reagent - type: reagent
id: Vodka id: Vodka
name: vodka name: vodka
parent: BaseAlcohol
desc: Clear distilled alcoholic beverage that originates from Poland and Russia. desc: Clear distilled alcoholic beverage that originates from Poland and Russia.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#d1d1d155" color: "#d1d1d155"
@@ -135,6 +159,7 @@
- type: reagent - type: reagent
id: Whiskey id: Whiskey
name: whiskey name: whiskey
parent: BaseAlcohol
desc: A type of distilled alcoholic beverage made from fermented grain mash. desc: A type of distilled alcoholic beverage made from fermented grain mash.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#664300" color: "#664300"
@@ -143,6 +168,7 @@
- type: reagent - type: reagent
id: Wine id: Wine
name: wine name: wine
parent: BaseAlcohol
desc: An premium alchoholic beverage made from distilled grape juice. desc: An premium alchoholic beverage made from distilled grape juice.
physicalDesc: translucent physicalDesc: translucent
color: "#7E4043" color: "#7E4043"
@@ -153,6 +179,7 @@
- type: reagent - type: reagent
id: AcidSpit id: AcidSpit
name: acidspit name: acidspit
parent: BaseAlcohol
desc: A drink for the daring, can be deadly if incorrectly prepared! desc: A drink for the daring, can be deadly if incorrectly prepared!
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#365000" color: "#365000"
@@ -161,6 +188,7 @@
- type: reagent - type: reagent
id: AlliesCocktail #haha, cock. that's hot id: AlliesCocktail #haha, cock. that's hot
name: allies cocktail name: allies cocktail
parent: BaseAlcohol
desc: A drink made from your allies, not as sweet as when made from your enemies. desc: A drink made from your allies, not as sweet as when made from your enemies.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#00664d" color: "#00664d"
@@ -169,6 +197,7 @@
- type: reagent - type: reagent
id: Aloe id: Aloe
name: aloe name: aloe
parent: BaseAlcohol
desc: So very, very, very good. desc: So very, very, very good.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#192c00" color: "#192c00"
@@ -177,6 +206,7 @@
- type: reagent - type: reagent
id: Amasec id: Amasec
name: amasec name: amasec
parent: BaseAlcohol
desc: Official drink of the Gun Club! desc: Official drink of the Gun Club!
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#124da7" color: "#124da7"
@@ -185,6 +215,7 @@
- type: reagent - type: reagent
id: Andalusia id: Andalusia
name: andalusia name: andalusia
parent: BaseAlcohol
desc: A nice, strangely named drink. desc: A nice, strangely named drink.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#665700" color: "#665700"
@@ -193,6 +224,7 @@
- type: reagent - type: reagent
id: Antifreeze id: Antifreeze
name: antifreeze name: antifreeze
parent: BaseAlcohol
desc: Ultimate refreshment. desc: Ultimate refreshment.
physicalDesc: translucent physicalDesc: translucent
color: "#ff7d63" color: "#ff7d63"
@@ -201,6 +233,7 @@
- type: reagent - type: reagent
id: AtomicBomb id: AtomicBomb
name: atomic bomb name: atomic bomb
parent: BaseAlcohol
desc: Nuclear proliferation never tasted so good. desc: Nuclear proliferation never tasted so good.
physicalDesc: cloudy physicalDesc: cloudy
color: "#666300" color: "#666300"
@@ -209,6 +242,7 @@
- type: reagent - type: reagent
id: B52 id: B52
name: b-52 name: b-52
parent: BaseAlcohol
desc: Coffee, irish cream, and cognac. You will get bombed. desc: Coffee, irish cream, and cognac. You will get bombed.
physicalDesc: bubbly physicalDesc: bubbly
color: "#664300" color: "#664300"
@@ -217,6 +251,7 @@
- type: reagent - type: reagent
id: BahamaMama id: BahamaMama
name: bahama mama name: bahama mama
parent: BaseAlcohol
desc: Tropical cocktail. desc: Tropical cocktail.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#FF7F3B" color: "#FF7F3B"
@@ -225,6 +260,7 @@
- type: reagent - type: reagent
id: BananaHonk id: BananaHonk
name: banana mama name: banana mama
parent: BaseAlcohol
desc: A drink from Clown Heaven. desc: A drink from Clown Heaven.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#ffff91" color: "#ffff91"
@@ -233,6 +269,7 @@
- type: reagent - type: reagent
id: Barefoot id: Barefoot
name: barefoot name: barefoot
parent: BaseAlcohol
desc: Barefoot and pregnant. desc: Barefoot and pregnant.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#664300" color: "#664300"
@@ -241,6 +278,7 @@
- type: reagent - type: reagent
id: BeepskySmash id: BeepskySmash
name: beepsky smash name: beepsky smash
parent: BaseAlcohol
desc: Deny drinking this and prepare for THE LAW. desc: Deny drinking this and prepare for THE LAW.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#664300" color: "#664300"
@@ -249,6 +287,7 @@
- type: reagent - type: reagent
id: Bilk id: Bilk
name: bilk name: bilk
parent: BaseAlcohol
desc: This appears to be beer mixed with milk. Disgusting. desc: This appears to be beer mixed with milk. Disgusting.
physicalDesc: bilky... physicalDesc: bilky...
color: "#895C4C" color: "#895C4C"
@@ -257,6 +296,7 @@
- type: reagent - type: reagent
id: BlackRussian id: BlackRussian
name: black russian name: black russian
parent: BaseAlcohol
desc: For the lactose-intolerant. Still as classy as a White Russian. desc: For the lactose-intolerant. Still as classy as a White Russian.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#360000" color: "#360000"
@@ -265,6 +305,7 @@
- type: reagent - type: reagent
id: BloodyMary id: BloodyMary
name: bloody mary name: bloody mary
parent: BaseAlcohol
desc: A strange yet pleasurable mixture made of vodka, tomato, and lime juice. desc: A strange yet pleasurable mixture made of vodka, tomato, and lime juice.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#660000" color: "#660000"
@@ -273,6 +314,7 @@
- type: reagent - type: reagent
id: Booger id: Booger
name: booger name: booger
parent: BaseAlcohol
desc: Ewww... desc: Ewww...
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#8CFF8C" color: "#8CFF8C"
@@ -281,6 +323,7 @@
- type: reagent - type: reagent
id: BraveBull id: BraveBull
name: brave bull name: brave bull
parent: BaseAlcohol
desc: It's just as effective as Dutch-Courage! desc: It's just as effective as Dutch-Courage!
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#664300" color: "#664300"
@@ -289,6 +332,7 @@
- type: reagent - type: reagent
id: CubaLibre id: CubaLibre
name: cuba libre name: cuba libre
parent: BaseAlcohol
desc: Rum, mixed with cola. Viva la revolucion. desc: Rum, mixed with cola. Viva la revolucion.
physicalDesc: bubbly physicalDesc: bubbly
color: "#3E1B00" color: "#3E1B00"
@@ -297,6 +341,7 @@
- type: reagent - type: reagent
id: DemonsBlood id: DemonsBlood
name: demons blood name: demons blood
parent: BaseAlcohol
desc: AHHHH!!!! desc: AHHHH!!!!
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#a70000" color: "#a70000"
@@ -305,6 +350,7 @@
- type: reagent - type: reagent
id: DevilsKiss id: DevilsKiss
name: devils kiss name: devils kiss
parent: BaseAlcohol
desc: Creepy time! desc: Creepy time!
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#A68310" color: "#A68310"
@@ -313,6 +359,7 @@
- type: reagent - type: reagent
id: DoctorsDelight id: DoctorsDelight
name: the doctor's delight name: the doctor's delight
parent: BaseAlcohol
desc: A gulp a day keeps the MediBot away. That's probably for the best. desc: A gulp a day keeps the MediBot away. That's probably for the best.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#FF8CFF" color: "#FF8CFF"
@@ -321,6 +368,7 @@
- type: reagent - type: reagent
id: DriestMartini id: DriestMartini
name: driest martini name: driest martini
parent: BaseAlcohol
desc: Only for the experienced. You think you see sand floating in the glass. desc: Only for the experienced. You think you see sand floating in the glass.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#2E6671" color: "#2E6671"
@@ -329,6 +377,7 @@
- type: reagent - type: reagent
id: ErikaSuprise id: ErikaSuprise
name: erika suprise name: erika suprise
parent: BaseAlcohol
desc: The surprise is, it's green! desc: The surprise is, it's green!
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#2E6671" color: "#2E6671"
@@ -337,6 +386,7 @@
- type: reagent - type: reagent
id: GargleBlaster id: GargleBlaster
name: Pan-Galactic Gargle Blaster name: Pan-Galactic Gargle Blaster
parent: BaseAlcohol
desc: Whoah, this stuff looks volatile! desc: Whoah, this stuff looks volatile!
physicalDesc: volatile physicalDesc: volatile
color: "#9cc8b4" color: "#9cc8b4"
@@ -345,6 +395,7 @@
- type: reagent - type: reagent
id: GinFizz id: GinFizz
name: gin fizz name: gin fizz
parent: BaseAlcohol
desc: Refreshingly lemony, deliciously dry. desc: Refreshingly lemony, deliciously dry.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#664300" color: "#664300"
@@ -353,6 +404,7 @@
- type: reagent - type: reagent
id: GinTonic id: GinTonic
name: gin and tonic name: gin and tonic
parent: BaseAlcohol
desc: An all time classic, mild cocktail. desc: An all time classic, mild cocktail.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#004166" color: "#004166"
@@ -361,6 +413,7 @@
- type: reagent - type: reagent
id: Goldschlager id: Goldschlager
name: Goldschlager name: Goldschlager
parent: BaseAlcohol
desc: 100 proof cinnamon schnapps, made for alcoholic teen girls on spring break. desc: 100 proof cinnamon schnapps, made for alcoholic teen girls on spring break.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#FFFF91" color: "#FFFF91"
@@ -369,6 +422,7 @@
- type: reagent - type: reagent
id: Grog id: Grog
name: grog name: grog
parent: BaseAlcohol
desc: Watered-down rum, pirate approved! desc: Watered-down rum, pirate approved!
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#664300" color: "#664300"
@@ -377,6 +431,7 @@
- type: reagent - type: reagent
id: HippiesDelight id: HippiesDelight
name: hippies delight name: hippies delight
parent: BaseAlcohol
desc: You just don't get it maaaan. desc: You just don't get it maaaan.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#6eaa0c" color: "#6eaa0c"
@@ -385,6 +440,7 @@
- type: reagent - type: reagent
id: Hooch id: Hooch
name: hooch name: hooch
parent: BaseAlcohol
desc: Either someone's failure at cocktail making or attempt in alchohol production. In any case, do you really want to drink that? desc: Either someone's failure at cocktail making or attempt in alchohol production. In any case, do you really want to drink that?
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#664e00" color: "#664e00"
@@ -393,6 +449,7 @@
- type: reagent - type: reagent
id: IcedBeer id: IcedBeer
name: iced beer name: iced beer
parent: BaseAlcohol
desc: A beer which is so cold the air around it freezes. desc: A beer which is so cold the air around it freezes.
physicalDesc: bubbly physicalDesc: bubbly
color: "#664300" color: "#664300"
@@ -401,6 +458,7 @@
- type: reagent - type: reagent
id: IrishCarBomb id: IrishCarBomb
name: irish car bomb name: irish car bomb
parent: BaseAlcohol
desc: A troubling mixture of irish cream and ale. desc: A troubling mixture of irish cream and ale.
physicalDesc: bubbly physicalDesc: bubbly
color: "#2E6671" color: "#2E6671"
@@ -409,6 +467,7 @@
- type: reagent - type: reagent
id: IrishCream id: IrishCream
name: irish cream name: irish cream
parent: BaseAlcohol
desc: Whiskey-imbued cream. What else could you expect from the Irish. desc: Whiskey-imbued cream. What else could you expect from the Irish.
physicalDesc: creamy physicalDesc: creamy
color: "#664300" color: "#664300"
@@ -417,6 +476,7 @@
- type: reagent - type: reagent
id: IrishCoffee id: IrishCoffee
name: irish coffee name: irish coffee
parent: BaseAlcohol
desc: Coffee served with irish cream. Regular cream just isn't the same! desc: Coffee served with irish cream. Regular cream just isn't the same!
physicalDesc: cloudy physicalDesc: cloudy
color: "#664300" color: "#664300"
@@ -425,6 +485,7 @@
- type: reagent - type: reagent
id: KiraSpecial id: KiraSpecial
name: kira special name: kira special
parent: BaseAlcohol
desc: Long live the guy who everyone had mistaken for a girl. Baka! desc: Long live the guy who everyone had mistaken for a girl. Baka!
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#CCCC99" color: "#CCCC99"
@@ -433,6 +494,7 @@
- type: reagent - type: reagent
id: Lean id: Lean
name: lean name: lean
parent: BaseAlcohol
desc: Turn up for days. desc: Turn up for days.
physicalDesc: bubbly physicalDesc: bubbly
color: "#9400D3" color: "#9400D3"
@@ -440,6 +502,7 @@
- type: reagent - type: reagent
id: LeanShine id: LeanShine
name: leanshine name: leanshine
parent: BaseAlcohol
desc: Lean mixed with moonshine. Turn up for months. desc: Lean mixed with moonshine. Turn up for months.
physicalDesc: bubbly physicalDesc: bubbly
color: "#9d5fb8" color: "#9d5fb8"
@@ -447,6 +510,7 @@
- type: reagent - type: reagent
id: LongIslandIcedTea id: LongIslandIcedTea
name: long island iced tea name: long island iced tea
parent: BaseAlcohol
desc: The liquor cabinet, brought together in a delicious mix. Intended for middle-aged alcoholic women only. desc: The liquor cabinet, brought together in a delicious mix. Intended for middle-aged alcoholic women only.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#664300" color: "#664300"
@@ -455,6 +519,7 @@
- type: reagent - type: reagent
id: Manhattan id: Manhattan
name: manhattan name: manhattan
parent: BaseAlcohol
desc: The Detective's undercover drink of choice. He never could stomach gin... desc: The Detective's undercover drink of choice. He never could stomach gin...
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#664300" color: "#664300"
@@ -463,6 +528,7 @@
- type: reagent - type: reagent
id: ManhattanProject id: ManhattanProject
name: manhattan project name: manhattan project
parent: BaseAlcohol
desc: A scientist's drink of choice, for pondering ways to blow up the ship. desc: A scientist's drink of choice, for pondering ways to blow up the ship.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#664300" color: "#664300"
@@ -471,6 +537,7 @@
- type: reagent - type: reagent
id: ManlyDorf id: ManlyDorf
name: manly dorf name: manly dorf
parent: BaseAlcohol
desc: Beer and Ale, brought together in a delicious mix. Intended for stout dwarves only. desc: Beer and Ale, brought together in a delicious mix. Intended for stout dwarves only.
physicalDesc: bubbly physicalDesc: bubbly
color: "#664300" color: "#664300"
@@ -479,6 +546,7 @@
- type: reagent - type: reagent
id: Margarita id: Margarita
name: margarita name: margarita
parent: BaseAlcohol
desc: On the rocks with salt on the rim. Arriba~! desc: On the rocks with salt on the rim. Arriba~!
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#8CFF8C" color: "#8CFF8C"
@@ -487,6 +555,7 @@
- type: reagent - type: reagent
id: Martini id: Martini
name: classic martini name: classic martini
parent: BaseAlcohol
desc: Vermouth with Gin. Not quite how 007 enjoyed it, but still delicious. desc: Vermouth with Gin. Not quite how 007 enjoyed it, but still delicious.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#664300" color: "#664300"
@@ -495,6 +564,7 @@
- type: reagent - type: reagent
id: Mead id: Mead
name: mead name: mead
parent: BaseAlcohol
desc: A Viking's drink, though a cheap one. desc: A Viking's drink, though a cheap one.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#664300" color: "#664300"
@@ -503,6 +573,7 @@
- type: reagent - type: reagent
id: Mojito id: Mojito
name: mojito name: mojito
parent: BaseAlcohol
desc: If it's good enough for Spesscuba, it's good enough for you. desc: If it's good enough for Spesscuba, it's good enough for you.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#664300" color: "#664300"
@@ -511,6 +582,7 @@
- type: reagent - type: reagent
id: Moonshine id: Moonshine
name: moonshine name: moonshine
parent: BaseAlcohol
desc: Artisanal homemade liquor. What could go wrong? desc: Artisanal homemade liquor. What could go wrong?
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#d1d7d155" color: "#d1d7d155"
@@ -518,14 +590,26 @@
- type: reagent - type: reagent
id: Neurotoxin id: Neurotoxin
name: neurotoxin name: neurotoxin
parent: BaseAlcohol
desc: A strong neurotoxin that puts the subject into a death-like state. desc: A strong neurotoxin that puts the subject into a death-like state.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#2E2E61" color: "#2E2E61"
spritePath: neurotoxinglass.rsi spritePath: neurotoxinglass.rsi
metabolisms:
Drink:
effects:
- !type:SatiateThirst
Poison:
effects:
- !type:HealthChange
damage:
types:
Poison: 1
- type: reagent - type: reagent
id: Patron id: Patron
name: patron name: patron
parent: BaseAlcohol
desc: Tequila with silver in it, a favorite of alcoholic women in the club scene. desc: Tequila with silver in it, a favorite of alcoholic women in the club scene.
physicalDesc: metallic physicalDesc: metallic
color: "#585840" color: "#585840"
@@ -534,6 +618,7 @@
- type: reagent - type: reagent
id: RedMead id: RedMead
name: red mead name: red mead
parent: BaseAlcohol
desc: The true Viking's drink! Even though it has a strange red color. desc: The true Viking's drink! Even though it has a strange red color.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#C73C00" color: "#C73C00"
@@ -542,7 +627,8 @@
- type: reagent - type: reagent
id: Rewriter id: Rewriter
name: rewriter name: rewriter
desc: The secret of the sanctuary of the Libarian... parent: BaseAlcohol
desc: The secret of the sanctuary of the Librarian...
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#485000" color: "#485000"
spritePath: rewriter.rsi spritePath: rewriter.rsi
@@ -550,6 +636,7 @@
- type: reagent - type: reagent
id: Sbiten id: Sbiten
name: sbiten name: sbiten
parent: BaseAlcohol
desc: A spicy Vodka! Might be a little hot for the little guys! desc: A spicy Vodka! Might be a little hot for the little guys!
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#004166" color: "#004166"
@@ -558,6 +645,7 @@
- type: reagent - type: reagent
id: ScrewdriverCocktail id: ScrewdriverCocktail
name: screwdriver name: screwdriver
parent: BaseAlcohol
desc: Vodka, mixed with plain ol' orange juice. The result is surprisingly delicious. desc: Vodka, mixed with plain ol' orange juice. The result is surprisingly delicious.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#A68310" color: "#A68310"
@@ -566,6 +654,7 @@
- type: reagent - type: reagent
id: Silencer id: Silencer
name: silencer name: silencer
parent: BaseAlcohol
desc: A drink from Mime Heaven. desc: A drink from Mime Heaven.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#004666" color: "#004666"
@@ -574,6 +663,7 @@
- type: reagent - type: reagent
id: Singulo id: Singulo
name: singulo name: singulo
parent: BaseAlcohol
desc: A blue-space beverage! desc: A blue-space beverage!
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#3b0c0c" color: "#3b0c0c"
@@ -582,6 +672,7 @@
- type: reagent - type: reagent
id: SnowWhite id: SnowWhite
name: snow white name: snow white
parent: BaseAlcohol
desc: A cold refreshment. desc: A cold refreshment.
physicalDesc: bubbly physicalDesc: bubbly
color: "#FFFFFF" color: "#FFFFFF"
@@ -590,6 +681,7 @@
- type: reagent - type: reagent
id: SuiDream id: SuiDream
name: sui dream name: sui dream
parent: BaseAlcohol
desc: 'Comprised of: White soda, blue curacao, melon liquor.' desc: 'Comprised of: White soda, blue curacao, melon liquor.'
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#00A86B" color: "#00A86B"
@@ -598,6 +690,7 @@
- type: reagent - type: reagent
id: SyndicateBomb id: SyndicateBomb
name: syndicate bomb name: syndicate bomb
parent: BaseAlcohol
desc: Somebody set us up the bomb! desc: Somebody set us up the bomb!
physicalDesc: opaque physicalDesc: opaque
color: "#2E6660" color: "#2E6660"
@@ -606,6 +699,7 @@
- type: reagent - type: reagent
id: TequilaSunrise id: TequilaSunrise
name: tequila sunrise name: tequila sunrise
parent: BaseAlcohol
desc: Tequila and orange juice. Much like a Screwdriver, only Mexican. desc: Tequila and orange juice. Much like a Screwdriver, only Mexican.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#FFE48C" color: "#FFE48C"
@@ -614,6 +708,7 @@
- type: reagent - type: reagent
id: ThreeMileIsland id: ThreeMileIsland
name: three mile island iced tea name: three mile island iced tea
parent: BaseAlcohol
desc: "Made for a woman, strong enough for a man." desc: "Made for a woman, strong enough for a man."
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#666340" color: "#666340"
@@ -622,6 +717,7 @@
- type: reagent - type: reagent
id: ToxinsSpecial id: ToxinsSpecial
name: toxins special name: toxins special
parent: BaseAlcohol
desc: This thing is ON FIRE! CALL THE DAMN SHUTTLE! desc: This thing is ON FIRE! CALL THE DAMN SHUTTLE!
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#665c00" color: "#665c00"
@@ -630,6 +726,7 @@
- type: reagent - type: reagent
id: VodkaMartini id: VodkaMartini
name: vodka martini name: vodka martini
parent: BaseAlcohol
desc: Vodka with Gin. Not quite how 007 enjoyed it, but still delicious. desc: Vodka with Gin. Not quite how 007 enjoyed it, but still delicious.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#004666" color: "#004666"
@@ -638,6 +735,7 @@
- type: reagent - type: reagent
id: VodkaTonic id: VodkaTonic
name: vodka tonic name: vodka tonic
parent: BaseAlcohol
desc: For when a gin and tonic isn't russian enough. desc: For when a gin and tonic isn't russian enough.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#0064C8" color: "#0064C8"
@@ -646,6 +744,7 @@
- type: reagent - type: reagent
id: WhiskeyCola id: WhiskeyCola
name: whiskey cola name: whiskey cola
parent: BaseAlcohol
desc: Whiskey, mixed with cola. Surprisingly refreshing. desc: Whiskey, mixed with cola. Surprisingly refreshing.
physicalDesc: bubbly physicalDesc: bubbly
color: "#3E1B00" color: "#3E1B00"
@@ -654,6 +753,7 @@
- type: reagent - type: reagent
id: WhiskeySoda id: WhiskeySoda
name: whiskey soda name: whiskey soda
parent: BaseAlcohol
desc: For the more refined griffon. desc: For the more refined griffon.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#533600" color: "#533600"
@@ -662,6 +762,7 @@
- type: reagent - type: reagent
id: WhiteRussian id: WhiteRussian
name: white russian name: white russian
parent: BaseAlcohol
desc: That's just, like, your opinion, man... desc: That's just, like, your opinion, man...
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#A68340" color: "#A68340"

View File

@@ -0,0 +1,46 @@
- type: reagent
id: BaseDrink
abstract: true
metabolisms:
Drink:
effects:
- !type:SatiateThirst
factor: 3
plantMetabolism:
- !type:PlantAdjustNutrition
amount: 0.1
- !type:PlantAdjustWater
amount: 1
- !type:PlantAdjustHealth
amount: 0.1
- type: reagent
id: BaseSoda
parent: BaseDrink
abstract: true
metabolisms:
Drink:
effects:
- !type:SatiateThirst
factor: 2
plantMetabolism:
- !type:PlantAdjustNutrition
amount: 0.1
- !type:PlantAdjustWater
amount: 0.1
- !type:PlantAdjustHealth
amount: -0.1
- type: reagent
id: BaseAlcohol
abstract: true
metabolisms:
Drink:
effects:
- !type:SatiateThirst
factor: 2
plantMetabolism:
- !type:PlantAdjustNutrition
amount: 0.25
- !type:PlantAdjustWater
amount: 0.7

View File

@@ -1,6 +1,7 @@
- type: reagent - type: reagent
id: Coffee id: Coffee
name: coffee name: coffee
parent: BaseDrink
desc: A drink made from brewed coffee beans. Contains a moderate amount of caffeine. desc: A drink made from brewed coffee beans. Contains a moderate amount of caffeine.
physicalDesc: aromatic physicalDesc: aromatic
color: "#664300" color: "#664300"
@@ -11,10 +12,16 @@
desc: The fatty, still liquid part of milk. Why don't you mix this with sum scotch, eh? desc: The fatty, still liquid part of milk. Why don't you mix this with sum scotch, eh?
physicalDesc: creamy physicalDesc: creamy
color: "#DFD7AF" color: "#DFD7AF"
metabolisms:
Drink:
effects:
- !type:SatiateThirst
factor: 1
- type: reagent - type: reagent
id: CafeLatte id: CafeLatte
name: cafe latte name: cafe latte
parent: BaseDrink
desc: A nice, strong and tasty beverage while you are reading. desc: A nice, strong and tasty beverage while you are reading.
physicalDesc: creamy physicalDesc: creamy
color: "#664300" color: "#664300"
@@ -23,6 +30,7 @@
- type: reagent - type: reagent
id: GreenTea id: GreenTea
name: green tea name: green tea
parent: BaseDrink
desc: Tasty green tea. desc: Tasty green tea.
physicalDesc: aromatic physicalDesc: aromatic
color: "#C33F00" color: "#C33F00"
@@ -31,6 +39,7 @@
- type: reagent - type: reagent
id: Grenadine id: Grenadine
name: grenadine name: grenadine
parent: BaseDrink
desc: Not cherry flavored! desc: Not cherry flavored!
physicalDesc: dark-red physicalDesc: dark-red
color: "#EA1D26" color: "#EA1D26"
@@ -39,6 +48,7 @@
- type: reagent - type: reagent
id: IcedCoffee id: IcedCoffee
name: iced coffee name: iced coffee
parent: BaseDrink
desc: Coffee and ice, refreshing and cool. desc: Coffee and ice, refreshing and cool.
physicalDesc: aromatic physicalDesc: aromatic
color: "#102838" color: "#102838"
@@ -47,6 +57,7 @@
- type: reagent - type: reagent
id: IcedGreenTea id: IcedGreenTea
name: iced green tea name: iced green tea
parent: BaseDrink
desc: cold green tea. desc: cold green tea.
physicalDesc: aromatic physicalDesc: aromatic
color: "#CE4200" color: "#CE4200"
@@ -55,6 +66,7 @@
- type: reagent - type: reagent
id: IcedTea id: IcedTea
name: iced tea name: iced tea
parent: BaseDrink
desc: No relation to a certain rap artist/actor. desc: No relation to a certain rap artist/actor.
physicalDesc: aromatic physicalDesc: aromatic
color: "#104038" color: "#104038"
@@ -67,6 +79,11 @@
physicalDesc: tart physicalDesc: tart
color: "#FFFF00" color: "#FFFF00"
spritePath: lemonadeglass.rsi spritePath: lemonadeglass.rsi
metabolisms:
Drink:
effects:
- !type:SatiateThirst
factor: 2
- type: reagent - type: reagent
id: Milk id: Milk
@@ -75,10 +92,15 @@
physicalDesc: opaque physicalDesc: opaque
color: "#DFDFDF" color: "#DFDFDF"
plantMetabolism: plantMetabolism:
- !type:AdjustNutrition - !type:PlantAdjustNutrition
amount: 0.1 amount: 0.1
- !type:AdjustWater - !type:PlantAdjustWater
amount: 0.9 amount: 0.9
metabolisms:
Drink:
effects:
- !type:SatiateThirst
factor: 4
- type: reagent - type: reagent
id: MilkOat id: MilkOat
@@ -86,6 +108,11 @@
desc: Surprisingly tasty. desc: Surprisingly tasty.
physicalDesc: refreshing physicalDesc: refreshing
color: "#302000" color: "#302000"
metabolisms:
Drink:
effects:
- !type:SatiateThirst
factor: 4
- type: reagent - type: reagent
id: MilkSoy id: MilkSoy
@@ -93,6 +120,11 @@
desc: Surprisingly tasty. desc: Surprisingly tasty.
physicalDesc: refreshing physicalDesc: refreshing
color: "#302000" color: "#302000"
metabolisms:
Drink:
effects:
- !type:SatiateThirst
factor: 5 # soyboys stay winning
- type: reagent - type: reagent
id: MilkSpoiled id: MilkSpoiled
@@ -100,6 +132,11 @@
desc: This milk has gone rancid. desc: This milk has gone rancid.
physicalDesc: putrid physicalDesc: putrid
color: "#faffba" color: "#faffba"
metabolisms:
Drink:
effects:
- !type:SatiateThirst
factor: -2
- type: reagent - type: reagent
id: Nothing id: Nothing
@@ -107,6 +144,12 @@
desc: Absolutely nothing. desc: Absolutely nothing.
physicalDesc: nothing physicalDesc: nothing
spritePath: nothing.rsi spritePath: nothing.rsi
metabolisms:
Drink:
effects:
- !type:SatiateThirst
factor: 2
# TODO heal mimes
- type: reagent - type: reagent
id: NukaCola id: NukaCola
@@ -115,10 +158,22 @@
physicalDesc: fizzy physicalDesc: fizzy
color: "#100800" color: "#100800"
spritePath: nuka_colaglass.rsi spritePath: nuka_colaglass.rsi
metabolisms:
Drink:
effects:
- !type:SatiateThirst
factor: 6
Poison:
effects:
- !type:HealthChange
damage:
types:
Poison: 1
- type: reagent - type: reagent
id: SodaWater id: SodaWater
name: soda water name: soda water
parent: BaseDrink
desc: A container of club soda. Why not make a scotch and soda? desc: A container of club soda. Why not make a scotch and soda?
physicalDesc: fizzy physicalDesc: fizzy
color: "#619494" color: "#619494"
@@ -126,6 +181,7 @@
- type: reagent - type: reagent
id: SoyLatte id: SoyLatte
name: soy latte name: soy latte
parent: BaseDrink
desc: A coffee drink made with espresso and steamed soy milk. desc: A coffee drink made with espresso and steamed soy milk.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#664300" color: "#664300"
@@ -134,6 +190,7 @@
- type: reagent - type: reagent
id: Tea id: Tea
name: tea name: tea
parent: BaseDrink
desc: A drink made by boiling leaves of the tea tree, Camellia sinensis. desc: A drink made by boiling leaves of the tea tree, Camellia sinensis.
physicalDesc: aromatic physicalDesc: aromatic
color: "#8a5a3a" color: "#8a5a3a"
@@ -141,6 +198,7 @@
- type: reagent - type: reagent
id: TonicWater id: TonicWater
name: tonic water name: tonic water
parent: BaseDrink
desc: It tastes strange but at least the quinine keeps the Space Malaria at bay. desc: It tastes strange but at least the quinine keeps the Space Malaria at bay.
physicalDesc: fizzy physicalDesc: fizzy
color: "#0064C8" color: "#0064C8"

View File

@@ -1,6 +1,7 @@
- type: reagent - type: reagent
id: JuiceApple id: JuiceApple
name: apple juice name: apple juice
parent: BaseDrink
desc: It's a little piece of Eden. desc: It's a little piece of Eden.
physicalDesc: crisp physicalDesc: crisp
color: "#FDAD01" color: "#FDAD01"
@@ -8,6 +9,7 @@
- type: reagent - type: reagent
id: JuiceBanana id: JuiceBanana
name: banana juice name: banana juice
parent: BaseDrink
desc: The raw essence of a banana. HONK. desc: The raw essence of a banana. HONK.
physicalDesc: crisp physicalDesc: crisp
color: "#FFE777" color: "#FFE777"
@@ -15,25 +17,29 @@
- type: reagent - type: reagent
id: JuiceBerry id: JuiceBerry
name: berry juice name: berry juice
parent: BaseDrink
desc: A delicious blend of several different kinds of berries. desc: A delicious blend of several different kinds of berries.
physicalDesc: sweet physicalDesc: sweet
color: "#660099" color: "#660099"
# /datum/reagent/drink/poisonberryjuice/on_mob_life(var/mob/living/M)
# if(..())
# return 1
# M.adjustToxLoss(1)
- type: reagent - type: reagent
id: JuiceBerryPoison id: JuiceBerryPoison
name: poison berry juice name: poison berry juice
desc: A surprisingly tasty juice blended from various kinds of very deadly and toxic berries. desc: A surprisingly tasty juice blended from various kinds of very deadly and toxic berries.
physicalDesc: aromatic #maybe should be 'sickly'? physicalDesc: sickly
color: "#6600CC" color: "#6600CC"
metabolisms:
Drink:
effects:
- !type:SatiateThirst
Poison:
effects:
- !type:HealthChange
damage:
types:
Poison: 1
#TODO: port on_mob_life: restore eyesight #TODO: restore eyesight
#if(..()) #if(..())
#return 1 #return 1
# M.eye_blurry = max(M.eye_blurry - 1 , 0) # M.eye_blurry = max(M.eye_blurry - 1 , 0)
@@ -47,6 +53,7 @@
- type: reagent - type: reagent
id: JuiceCarrot id: JuiceCarrot
name: carrot juice name: carrot juice
parent: BaseDrink
desc: It's like a carrot, but less crunchy. desc: It's like a carrot, but less crunchy.
physicalDesc: crisp physicalDesc: crisp
color: "#FF8820" color: "#FF8820"
@@ -54,6 +61,7 @@
- type: reagent - type: reagent
id: JuiceGrape id: JuiceGrape
name: grape juice name: grape juice
parent: BaseDrink
desc: Freshly squeezed juice from red grapes. Quite sweet. desc: Freshly squeezed juice from red grapes. Quite sweet.
physicalDesc: crisp physicalDesc: crisp
color: "#512284" color: "#512284"
@@ -61,6 +69,7 @@
- type: reagent - type: reagent
id: JuiceLemon id: JuiceLemon
name: lemon juice name: lemon juice
parent: BaseDrink
desc: This juice is VERY sour. desc: This juice is VERY sour.
physicalDesc: citric physicalDesc: citric
color: "#fff690" color: "#fff690"
@@ -68,6 +77,7 @@
- type: reagent - type: reagent
id: JuiceLime id: JuiceLime
name: lime juice name: lime juice
parent: BaseDrink
desc: The sweet-sour juice of limes. desc: The sweet-sour juice of limes.
physicalDesc: citric physicalDesc: citric
color: "#99bb43" color: "#99bb43"
@@ -83,6 +93,7 @@
- type: reagent - type: reagent
id: JuiceOrange id: JuiceOrange
name: orange juice name: orange juice
parent: BaseDrink
desc: Both delicious AND rich in Vitamin C. What more do you need? desc: Both delicious AND rich in Vitamin C. What more do you need?
physicalDesc: citric physicalDesc: citric
color: "#E78108" color: "#E78108"
@@ -90,6 +101,7 @@
- type: reagent - type: reagent
id: JuicePineapple id: JuicePineapple
name: pineapple juice name: pineapple juice
parent: BaseDrink
desc: The delicious juice of a pineapple. desc: The delicious juice of a pineapple.
physicalDesc: tropical physicalDesc: tropical
color: yellow color: yellow
@@ -97,6 +109,7 @@
- type: reagent - type: reagent
id: JuicePotato id: JuicePotato
name: potato juice name: potato juice
parent: BaseDrink
desc: Juice of the potato. Bleh. desc: Juice of the potato. Bleh.
physicalDesc: starchy physicalDesc: starchy
color: "#302000" color: "#302000"
@@ -104,6 +117,7 @@
- type: reagent - type: reagent
id: JuiceTomato id: JuiceTomato
name: tomato juice name: tomato juice
parent: BaseDrink
desc: Tomatoes made into juice. What a waste of good tomatoes, huh? desc: Tomatoes made into juice. What a waste of good tomatoes, huh?
physicalDesc: saucey physicalDesc: saucey
color: "#731008" color: "#731008"
@@ -111,6 +125,7 @@
- type: reagent - type: reagent
id: JuiceWatermelon id: JuiceWatermelon
name: water melon juice name: water melon juice
parent: BaseDrink
desc: The delicious juice of a watermelon. desc: The delicious juice of a watermelon.
physicalDesc: sweet physicalDesc: sweet
color: "#EF3520" color: "#EF3520"

View File

@@ -1,154 +1,99 @@
- type: reagent - type: reagent
id: Cola id: Cola
name: cola name: cola
parent: BaseSoda
desc: A sweet, carbonated soft drink. Caffeine free. desc: A sweet, carbonated soft drink. Caffeine free.
physicalDesc: fizzy physicalDesc: fizzy
color: "#422912" color: "#422912"
plantMetabolism:
- !type:AdjustNutrition
amount: 0.1
- !type:AdjustWater
amount: 1
- !type:AdjustHealth
amount: 0.1
- type: reagent - type: reagent
id: ChangelingSting id: ChangelingSting
name: changeling sting name: changeling sting
parent: BaseSoda
desc: You take a tiny sip and feel a burning sensation... desc: You take a tiny sip and feel a burning sensation...
physicalDesc: fizzy physicalDesc: fizzy
color: "#2E6671" color: "#2E6671"
plantMetabolism:
- !type:AdjustNutrition
amount: 0.1
- !type:AdjustWater
amount: 1
- !type:AdjustHealth
amount: 0.1
- type: reagent - type: reagent
id: DrGibb id: DrGibb
name: Dr. Gibb name: Dr. Gibb
parent: BaseSoda
desc: A delicious blend of 42 different flavours. desc: A delicious blend of 42 different flavours.
physicalDesc: fizzy physicalDesc: fizzy
color: "#102000" color: "#102000"
plantMetabolism:
- !type:AdjustNutrition
amount: 0.1
- !type:AdjustWater
amount: 1
- !type:AdjustHealth
amount: 0.1
- type: reagent - type: reagent
id: EnergyDrink id: EnergyDrink
name: Energy Drink name: Energy Drink
parent: BaseSoda
desc: A dose of energy! Nanotrasen is not responsible if you grow avian appendages. desc: A dose of energy! Nanotrasen is not responsible if you grow avian appendages.
physicalDesc: fizzy physicalDesc: fizzy
color: "#ffffbf" color: "#ffffbf"
plantMetabolism:
- !type:AdjustNutrition
amount: 0.1
- !type:AdjustWater
amount: 1
- !type:AdjustHealth
amount: 0.1
- type: reagent - type: reagent
id: GrapeSoda id: GrapeSoda
name: grape soda name: grape soda
parent: BaseSoda
desc: It's Graaaaaape! desc: It's Graaaaaape!
physicalDesc: fizzy physicalDesc: fizzy
color: "#ae94a6" color: "#ae94a6"
plantMetabolism:
- !type:AdjustNutrition
amount: 0.1
- !type:AdjustWater
amount: 1
- !type:AdjustHealth
amount: 0.1
- type: reagent - type: reagent
id: LemonLime id: LemonLime
name: lemon-lime name: lemon-lime
parent: BaseSoda
desc: tangy lime and lemon soda desc: tangy lime and lemon soda
physicalDesc: fizzy physicalDesc: fizzy
color: "#878F00" color: "#878F00"
spritePath: lemonlime.rsi spritePath: lemonlime.rsi
plantMetabolism:
- !type:AdjustNutrition
amount: 0.1
- !type:AdjustWater
amount: 1
- !type:AdjustHealth
amount: 0.1
- type: reagent - type: reagent
id: PwrGame id: PwrGame
name: Pwr Game name: Pwr Game
parent: BaseSoda
desc: The only drink with the PWR that true gamers crave. desc: The only drink with the PWR that true gamers crave.
physicalDesc: fizzy physicalDesc: fizzy
color: "#9385bf" color: "#9385bf"
plantMetabolism:
- !type:AdjustNutrition
amount: 0.1
- !type:AdjustWater
amount: 1
- !type:AdjustHealth
amount: 0.1
- type: reagent - type: reagent
id: SpaceMountainWind id: SpaceMountainWind
name: Space Mountain Wind name: Space Mountain Wind
parent: BaseSoda
desc: Blows right through you like a space wind. desc: Blows right through you like a space wind.
physicalDesc: fizzy physicalDesc: fizzy
color: "#102000" color: "#102000"
plantMetabolism:
- !type:AdjustNutrition
amount: 0.1
- !type:AdjustWater
amount: 1
- !type:AdjustHealth
amount: 0.1
- type: reagent - type: reagent
id: SpaceUp id: SpaceUp
name: Space-Up name: Space-Up
parent: BaseSoda
desc: Tastes like a hull breach in your mouth. desc: Tastes like a hull breach in your mouth.
physicalDesc: fizzy physicalDesc: fizzy
color: "#00FF00" color: "#00FF00"
plantMetabolism:
- !type:AdjustNutrition
amount: 0.1
- !type:AdjustWater
amount: 1
- !type:AdjustHealth
amount: 0.1
- type: reagent - type: reagent
id: Starkist id: Starkist
name: starkist name: starkist
parent: BaseSoda
desc: A sweet, orange flavored soft drink. desc: A sweet, orange flavored soft drink.
physicalDesc: fizzy physicalDesc: fizzy
color: "#9F3400" color: "#9F3400"
plantMetabolism:
- !type:AdjustNutrition
amount: 0.1
- !type:AdjustWater
amount: 1
- !type:AdjustHealth
amount: 0.1
- type: reagent - type: reagent
id: FourteenLoko id: FourteenLoko
name: Fourteen Loko name: Fourteen Loko
desc: A highly processed liquid substance barely-passing intergalatic health standarts for a soft drink. parent: BaseSoda
desc: A highly processed liquid substance barely-passing intergalatic health standards for a soft drink.
physicalDesc: fizzy physicalDesc: fizzy
color: "#deb928" color: "#deb928"
plantMetabolism: metabolisms:
- !type:AdjustNutrition Drink:
amount: 0.1 effects:
- !type:AdjustWater - !type:SatiateThirst
amount: 1 factor: 2
- !type:AdjustHealth Poison:
amount: 0.1 effects:
- !type:HealthChange
damage:
types:
Poison: 1

View File

@@ -4,6 +4,11 @@
desc: Used for baking. desc: Used for baking.
physicalDesc: powdery physicalDesc: powdery
color: white color: white
metabolisms:
Food:
effects:
- !type:SatiateHunger
factor: 1
- type: reagent - type: reagent
id: Oats id: Oats
@@ -11,12 +16,22 @@
desc: Used for a variety of tasty purposes. desc: Used for a variety of tasty purposes.
physicalDesc: coarse physicalDesc: coarse
color: tan color: tan
metabolisms:
Food:
effects:
- !type:SatiateHunger
factor: 1
- type: reagent - type: reagent
id: Enzyme id: Enzyme
name: universal enzyme name: universal enzyme
desc: Used in cooking various dishes. desc: Used in cooking various dishes.
color: "#009900" color: "#009900"
metabolisms:
Food:
effects:
- !type:SatiateHunger
nutritionFactor: 1
- type: reagent - type: reagent
id: Egg id: Egg
@@ -24,6 +39,11 @@
desc: Used for baking. desc: Used for baking.
physicalDesc: mucus-like physicalDesc: mucus-like
color: white color: white
metabolisms:
Food:
effects:
- !type:SatiateHunger
factor: 1
- type: reagent - type: reagent
id: Sugar id: Sugar
@@ -31,6 +51,11 @@
desc: Tasty spacey sugar! desc: Tasty spacey sugar!
physicalDesc: physicalDesc:
color: white color: white
metabolisms:
Food:
effects:
- !type:SatiateHunger
factor: 1
- type: reagent - type: reagent
id: Blackpepper id: Blackpepper
@@ -38,21 +63,40 @@
desc: Often used to flavor food or make people sneeze. desc: Often used to flavor food or make people sneeze.
physicalDesc: Grainy. physicalDesc: Grainy.
color: black color: black
metabolisms:
Food:
effects:
- !type:SatiateHunger
factor: 1
- type: reagent - type: reagent
id: Vinegar id: Vinegar
name: vinegar name: vinegar
desc: Often used to flavor food. desc: Often used to flavor food.
color: tan color: tan
metabolisms:
Food:
effects:
- !type:SatiateHunger
factor: 1
- type: reagent - type: reagent
id: Rice id: Rice
name: rice name: rice
desc: Hard, small white grains. desc: Hard, small white grains.
color: white color: white
metabolisms:
Food:
effects:
- !type:SatiateHunger
- type: reagent - type: reagent
id: OilOlive id: OilOlive
name: olive oil name: olive oil
desc: Viscous and fragrant. desc: Viscous and fragrant.
color: olive color: olive
metabolisms:
Food:
effects:
- !type:SatiateHunger
factor: 1

View File

@@ -0,0 +1,18 @@
# Default human metabolism groups.
- type: metabolismGroup
id: Poison
- type: metabolismGroup
id: Medicine
- type: metabolismGroup
id: Narcotic
- type: metabolismGroup
id: Alcohol
- type: metabolismGroup
id: Food
- type: metabolismGroup
id: Drink

View File

@@ -0,0 +1,5 @@
# If your species wants to metabolize stuff differently,
# you'll likely have to tag its metabolizers with something other than Human.
- type: metabolizerType
id: Human

View File

@@ -5,7 +5,7 @@
color: "#664330" color: "#664330"
physicalDesc: thick physicalDesc: thick
plantMetabolism: plantMetabolism:
- !type:AdjustNutrition - !type:PlantAdjustNutrition
amount: 1 amount: 1
- type: reagent - type: reagent
@@ -15,11 +15,11 @@
color: "#5b406c" color: "#5b406c"
physicalDesc: heterogeneous physicalDesc: heterogeneous
plantMetabolism: plantMetabolism:
- !type:AdjustNutrition - !type:PlantAdjustNutrition
amount: 1 amount: 1
- !type:AdjustHealth - !type:PlantAdjustHealth
amount: -0.5 amount: -0.5
- !type:AdjustMutationMod - !type:PlantAdjustMutationMod
prob: 0.3 prob: 0.3
amount: 0.2 amount: 0.2
@@ -30,9 +30,9 @@
color: "#9e9886" color: "#9e9886"
physicalDesc: bubbling physicalDesc: bubbling
plantMetabolism: plantMetabolism:
- !type:AdjustToxins - !type:PlantAdjustToxins
amount: 4 amount: 4
- !type:AdjustPests - !type:PlantAdjustPests
amount: -6 amount: -6
- type: reagent - type: reagent
@@ -42,13 +42,13 @@
color: "#49002E" color: "#49002E"
physicalDesc: bubbling physicalDesc: bubbling
plantMetabolism: plantMetabolism:
- !type:AdjustToxins - !type:PlantAdjustToxins
amount: 6 amount: 6
- !type:AdjustWeeds - !type:PlantAdjustWeeds
amount: -8 amount: -8
- !type:AdjustHealth - !type:PlantAdjustHealth
amount: -20 amount: -20
- !type:AdjustMutationMod - !type:PlantAdjustMutationMod
amount: 0.1 amount: 0.1
- type: reagent - type: reagent
@@ -57,14 +57,13 @@
desc: Plant-enhancing hormones, good for increasing potency. desc: Plant-enhancing hormones, good for increasing potency.
color: "#3e901c" color: "#3e901c"
physicalDesc: robust physicalDesc: robust
customPlantMetabolism: 0.1
plantMetabolism: plantMetabolism:
- !type:AdjustNutrition - !type:PlantAdjustNutrition
amount: 0.05 amount: 0.05
- !type:AdjustWeeds - !type:PlantAdjustWeeds
prob: 0.025 prob: 0.025
amount: 1 amount: 1
- !type:AdjustPests - !type:PlantAdjustPests
prob: 0.025 prob: 0.025
amount: 1 amount: 1
- !type:RobustHarvest {} - !type:RobustHarvest {}
@@ -76,9 +75,9 @@
color: "#968395" color: "#968395"
physicalDesc: bubbling physicalDesc: bubbling
plantMetabolism: plantMetabolism:
- !type:AdjustToxins - !type:PlantAdjustToxins
amount: 4 amount: 4
- !type:AdjustWeeds - !type:PlantAdjustWeeds
amount: -6 amount: -6
- type: reagent - type: reagent
@@ -88,9 +87,9 @@
color: "#808080" color: "#808080"
physicalDesc: crystalline physicalDesc: crystalline
plantMetabolism: plantMetabolism:
- !type:AdjustNutrition - !type:PlantAdjustNutrition
amount: -5 amount: -5
- !type:AdjustHealth - !type:PlantAdjustHealth
amount: -1 amount: -1
- type: reagent - type: reagent
@@ -100,5 +99,5 @@
color: "#C0C0C0" color: "#C0C0C0"
physicalDesc: strong smelling physicalDesc: strong smelling
plantMetabolism: plantMetabolism:
- !type:AdjustHealth - !type:PlantAdjustHealth
amount: -5 amount: -5

View File

@@ -7,9 +7,9 @@
boilingPoint: -33.0 boilingPoint: -33.0
meltingPoint: -77.7 meltingPoint: -77.7
plantMetabolism: plantMetabolism:
- !type:AdjustNutrition - !type:PlantAdjustNutrition
amount: 1 amount: 1
- !type:AdjustHealth - !type:PlantAdjustHealth
amount: 0.5 amount: 0.5
- type: reagent - type: reagent
@@ -20,19 +20,18 @@
color: "#a1000b" color: "#a1000b"
boilingPoint: 55.5 boilingPoint: 55.5
meltingPoint: -50.0 meltingPoint: -50.0
customPlantMetabolism: 0.1
plantMetabolism: plantMetabolism:
- !type:AdjustNutrition - !type:PlantAdjustNutrition
amount: 0.1 amount: 0.1
- !type:AdjustPests - !type:PlantAdjustPests
prob: 0.1 prob: 0.1
amount: -1 amount: -1
- !type:AdjustHealth - !type:PlantAdjustHealth
amount: 0.1 amount: 0.1
- !type:AffectGrowth - !type:PlantAffectGrowth
prob: 0.2 prob: 0.2
amount: 1 amount: 1
- !type:Diethylamine {} - !type:PlantDiethylamine {}
- type: reagent - type: reagent
id: Ethanol id: Ethanol
@@ -64,11 +63,11 @@
boilingPoint: 340282300000000000000000000000000000000 #Fun fact: Glucose can't boil. So let's just set it to the maximum float value. boilingPoint: 340282300000000000000000000000000000000 #Fun fact: Glucose can't boil. So let's just set it to the maximum float value.
meltingPoint: 146.0 meltingPoint: 146.0
plantMetabolism: plantMetabolism:
- !type:AdjustNutrition - !type:PlantAdjustNutrition
amount: 0.1 amount: 0.1
- !type:AdjustWeeds - !type:PlantAdjustWeeds
amount: 2 amount: 2
- !type:AdjustPests - !type:PlantAdjustPests
amount: 2 amount: 2
- type: reagent - type: reagent
@@ -80,7 +79,7 @@
meltingPoint: 0.0 meltingPoint: 0.0
boilingPoint: 100.0 boilingPoint: 100.0
plantMetabolism: plantMetabolism:
- !type:AdjustWater - !type:PlantAdjustWater
amount: 1 amount: 1
- type: reagent - type: reagent
@@ -89,10 +88,14 @@
desc: All the vitamins, minerals, and carbohydrates the body needs in pure form. desc: All the vitamins, minerals, and carbohydrates the body needs in pure form.
physicalDesc: opaque physicalDesc: opaque
color: "#664330" color: "#664330"
metabolisms:
Food:
effects:
- !type:SatiateHunger
plantMetabolism: plantMetabolism:
- !type:AdjustNutrition - !type:PlantAdjustNutrition
amount: 1 amount: 1
- !type:AdjustHealth - !type:PlantAdjustHealth
amount: 0.5 amount: 0.5
- type: reagent - type: reagent
@@ -116,11 +119,11 @@
boilingPoint: 78.2 # This isn't a real chemical... boilingPoint: 78.2 # This isn't a real chemical...
meltingPoint: -19.4 meltingPoint: -19.4
plantMetabolism: plantMetabolism:
- !type:AdjustToxins - !type:PlantAdjustToxins
amount: 20 amount: 20
- !type:AdjustWeeds - !type:PlantAdjustWeeds
amount: -4 amount: -4
- !type:AdjustHealth - !type:PlantAdjustHealth
amount: -8 amount: -8
- type: reagent - type: reagent
@@ -141,17 +144,17 @@
boilingPoint: 1465.0 boilingPoint: 1465.0
meltingPoint: 800.7 meltingPoint: 800.7
plantMetabolism: plantMetabolism:
- !type:AdjustWater - !type:PlantAdjustWater
amount: -3 amount: -3
- !type:AdjustNutrition - !type:PlantAdjustNutrition
amount: -0.3 amount: -0.3
- !type:AdjustToxins - !type:PlantAdjustToxins
amount: 8 amount: 8
- !type:AdjustWeeds - !type:PlantAdjustWeeds
amount: -2 amount: -2
- !type:AdjustPests - !type:PlantAdjustPests
amount: -1 amount: -1
- !type:AdjustHealth - !type:PlantAdjustHealth
amount: -2 amount: -2
- type: reagent - type: reagent
@@ -173,9 +176,9 @@
color: "#cf3600" color: "#cf3600"
physicalDesc: opaque physicalDesc: opaque
plantMetabolism: plantMetabolism:
- !type:AdjustToxins - !type:PlantAdjustToxins
amount: 10 amount: 10
- !type:AdjustHealth - !type:PlantAdjustHealth
amount: -5 amount: -5
- type: reagent - type: reagent
@@ -187,11 +190,11 @@
boilingPoint: 337.0 boilingPoint: 337.0
meltingPoint: 10.31 meltingPoint: 10.31
plantMetabolism: plantMetabolism:
- !type:AdjustToxins - !type:PlantAdjustToxins
amount: 10 amount: 10
- !type:AdjustWeeds - !type:PlantAdjustWeeds
amount: -2 amount: -2
- !type:AdjustHealth - !type:PlantAdjustHealth
amount: -5 amount: -5
- type: reagent - type: reagent
@@ -202,9 +205,8 @@
color: "#00ff5f" color: "#00ff5f"
boilingPoint: 340282300000000000000000000000000000000 # Ethidium bromide, which doesn't boil. boilingPoint: 340282300000000000000000000000000000000 # Ethidium bromide, which doesn't boil.
meltingPoint: 261.0 meltingPoint: 261.0
customPlantMetabolism: 2
plantMetabolism: plantMetabolism:
- !type:AdjustMutationLevel - !type:PlantAdjustMutationLevel
amount: 1 amount: 1
- type: reagent - type: reagent
@@ -215,11 +217,16 @@
color: "#c0e0ff20" color: "#c0e0ff20"
boilingPoint: 100.0 boilingPoint: 100.0
meltingPoint: 0.0 meltingPoint: 0.0
metabolisms:
Drink:
effects:
- !type:SatiateThirst
factor: 4
tileReactions: tileReactions:
- !type:ExtinguishTileReaction {} - !type:ExtinguishTileReaction {}
- !type:SpillIfPuddlePresentTileReaction {} - !type:SpillIfPuddlePresentTileReaction {}
plantMetabolism: plantMetabolism:
- !type:AdjustWater - !type:PlantAdjustWater
amount: 1 amount: 1
- type: reagent - type: reagent
@@ -230,6 +237,25 @@
color: "#FAFAFA" color: "#FAFAFA"
boilingPoint: 212.0 #Meth vape when? boilingPoint: 212.0 #Meth vape when?
meltingPoint: 170.0 meltingPoint: 170.0
metabolisms:
Poison:
effects:
- !type:HealthChange
damage:
types:
Poison: 2.5
- !type:HealthChange
conditions:
- !type:ReagentThreshold
min: 10
damage:
types:
Poison: 4 # this is added to the base damage of the meth.
Narcotic:
effects:
- !type:MovespeedModifier
walkSpeedModifier: 1.3
sprintSpeedModifier: 1.3
- type: reagent - type: reagent
id: Iodine id: Iodine
@@ -248,6 +274,12 @@
color: "#D2FFFA" color: "#D2FFFA"
boilingPoint: 255.0 boilingPoint: 255.0
meltingPoint: 36.0 meltingPoint: 36.0
metabolisms:
Narcotic:
effects:
- !type:MovespeedModifier
walkSpeedModifier: 1.2
sprintSpeedModifier: 1.2
- type: reagent - type: reagent
id: Oil id: Oil

View File

@@ -25,13 +25,13 @@
meltingPoint: -101.5 meltingPoint: -101.5
boilingPoint: -34.04 boilingPoint: -34.04
plantMetabolism: plantMetabolism:
- !type:AdjustWater - !type:PlantAdjustWater
amount: -0.5 amount: -0.5
- !type:AdjustToxins - !type:PlantAdjustToxins
amount: 15 amount: 15
- !type:AdjustWeeds - !type:PlantAdjustWeeds
amount: -3 amount: -3
- !type:AdjustHealth - !type:PlantAdjustHealth
amount: -1 amount: -1
- type: reagent - type: reagent
@@ -52,13 +52,13 @@
boilingPoint: -188.11 boilingPoint: -188.11
meltingPoint: -219.67 meltingPoint: -219.67
plantMetabolism: plantMetabolism:
- !type:AdjustWater - !type:PlantAdjustWater
amount: -0.5 amount: -0.5
- !type:AdjustToxins - !type:PlantAdjustToxins
amount: 25 amount: 25
- !type:AdjustWeeds - !type:PlantAdjustWeeds
amount: -4 amount: -4
- !type:AdjustHealth - !type:PlantAdjustHealth
amount: -2 amount: -2
- type: reagent - type: reagent
@@ -142,11 +142,11 @@
meltingPoint: 44.2 meltingPoint: 44.2
boilingPoint: 280.5 boilingPoint: 280.5
plantMetabolism: plantMetabolism:
- !type:AdjustNutrition - !type:PlantAdjustNutrition
amount: 0.1 amount: 0.1
- !type:AdjustWater - !type:PlantAdjustWater
amount: -0.5 amount: -0.5
- !type:AdjustWeeds - !type:PlantAdjustWeeds
amount: -2 amount: -2
- type: reagent - type: reagent
@@ -157,15 +157,14 @@
color: "#00ff04" color: "#00ff04"
meltingPoint: 700.0 meltingPoint: 700.0
boilingPoint: 1737.0 boilingPoint: 1737.0
customPlantMetabolism: 2
plantMetabolism: plantMetabolism:
- !type:AdjustMutationLevel - !type:PlantAdjustMutationLevel
amount: 0.6 amount: 0.6
- !type:AdjustToxins - !type:PlantAdjustToxins
amount: 4 amount: 4
- !type:AdjustHealth - !type:PlantAdjustHealth
amount: -1.5 amount: -1.5
- !type:AdjustMutationMod - !type:PlantAdjustMutationMod
prob: 0.2 prob: 0.2
amount: 0.1 amount: 0.1

View File

@@ -18,10 +18,17 @@
desc: A broad-spectrum anti-toxin, which treats toxin damage in the blood stream. Overdosing will cause vomiting, dizzyness and pain. desc: A broad-spectrum anti-toxin, which treats toxin damage in the blood stream. Overdosing will cause vomiting, dizzyness and pain.
physicalDesc: translucent physicalDesc: translucent
color: "#3a1d8a" color: "#3a1d8a"
metabolisms:
Medicine:
effects:
- !type:HealthChange
damage:
types:
Poison: -1
plantMetabolism: plantMetabolism:
- !type:AdjustToxins - !type:PlantAdjustToxins
amount: -10 amount: -10
- !type:AdjustHealth - !type:PlantAdjustHealth
amount: 1 amount: 1
- type: reagent - type: reagent
@@ -30,6 +37,14 @@
desc: A slightly unstable medication used for the most extreme any serious case of radiation poisoning. Lowers radiation level at over twice the rate Hyronalin does and will heal toxin damage at the same time. Deals very minor brute damage to the patient over time, but the patient's body will typically out-regenerate it easily. desc: A slightly unstable medication used for the most extreme any serious case of radiation poisoning. Lowers radiation level at over twice the rate Hyronalin does and will heal toxin damage at the same time. Deals very minor brute damage to the patient over time, but the patient's body will typically out-regenerate it easily.
physicalDesc: cloudy physicalDesc: cloudy
color: "#bd5902" color: "#bd5902"
metabolisms:
Medicine:
effects:
- !type:HealthChange
damage:
groups:
Toxin: -1
Brute: 0.5
- type: reagent - type: reagent
id: Bicaridine id: Bicaridine
@@ -37,6 +52,13 @@
desc: An analgesic which is highly effective at treating brute damage. It is useful for stabilizing people who have been severely beaten, as well as treating less life-threatening injuries. In the case of bleeding (internal or external), bicaridine will slow down the bleeding heavily. If the dosage exceeds the overdose limit, it'll stop it outright. desc: An analgesic which is highly effective at treating brute damage. It is useful for stabilizing people who have been severely beaten, as well as treating less life-threatening injuries. In the case of bleeding (internal or external), bicaridine will slow down the bleeding heavily. If the dosage exceeds the overdose limit, it'll stop it outright.
physicalDesc: opaque physicalDesc: opaque
color: "#ffaa00" color: "#ffaa00"
metabolisms:
Medicine:
effects:
- !type:HealthChange
damage:
groups:
Brute: -2
- type: reagent - type: reagent
id: Cryoxadone id: Cryoxadone
@@ -45,9 +67,9 @@
physicalDesc: fizzy physicalDesc: fizzy
color: "#0091ff" color: "#0091ff"
plantMetabolism: plantMetabolism:
- !type:AdjustToxins - !type:PlantAdjustToxins
amount: -3 amount: -3
- !type:AdjustHealth - !type:PlantAdjustHealth
amount: 3 amount: 3
- type: reagent - type: reagent
@@ -57,9 +79,9 @@
physicalDesc: bubbly physicalDesc: bubbly
color: "#0666ff" color: "#0666ff"
plantMetabolism: plantMetabolism:
- !type:AdjustToxins - !type:PlantAdjustToxins
amount: -5 amount: -5
- !type:AdjustHealth - !type:PlantAdjustHealth
amount: 5 amount: 5
- type: reagent - type: reagent
@@ -75,6 +97,13 @@
desc: An advanced chemical that is more effective at treating burn damage than Kelotane. desc: An advanced chemical that is more effective at treating burn damage than Kelotane.
physicalDesc: translucent physicalDesc: translucent
color: "#215263" color: "#215263"
metabolisms:
Medicine:
effects:
- !type:HealthChange
damage:
groups:
Burn: -3
- type: reagent - type: reagent
id: Dexalin id: Dexalin
@@ -82,6 +111,13 @@
desc: Used for treating oxygen deprivation. In most cases where it is likely to be needed, the strength of Dexalin Plus will probably be more useful (Results in 1 unit instead of 2). desc: Used for treating oxygen deprivation. In most cases where it is likely to be needed, the strength of Dexalin Plus will probably be more useful (Results in 1 unit instead of 2).
physicalDesc: opaque physicalDesc: opaque
color: "#0041a8" color: "#0041a8"
metabolisms:
Medicine:
effects:
- !type:HealthChange
damage:
types:
Asphyxiation: -1
- type: reagent - type: reagent
id: DexalinPlus id: DexalinPlus
@@ -89,6 +125,13 @@
desc: Used in treatment of extreme cases of oxygen deprivation. Even a single unit immediately counters all oxygen loss, which is hugely useful in many circumstances. Any dose beyond this will continue to counter oxygen loss until it is metabolized, essentially removing the need to breathe. desc: Used in treatment of extreme cases of oxygen deprivation. Even a single unit immediately counters all oxygen loss, which is hugely useful in many circumstances. Any dose beyond this will continue to counter oxygen loss until it is metabolized, essentially removing the need to breathe.
physicalDesc: cloudy physicalDesc: cloudy
color: "#4da0bd" color: "#4da0bd"
metabolisms:
Medicine:
effects:
- !type:HealthChange
damage:
types:
Asphyxiation: -3
- type: reagent - type: reagent
id: Ethylredoxrazine id: Ethylredoxrazine
@@ -138,6 +181,13 @@
desc: Treats burn damage and prevents infection. desc: Treats burn damage and prevents infection.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#bf3d19" color: "#bf3d19"
metabolisms:
Medicine:
effects:
- !type:HealthChange
damage:
groups:
Burn: -1
- type: reagent - type: reagent
id: Leporazine id: Leporazine
@@ -194,6 +244,13 @@
desc: Toxic, but treats hallucinations, drowsiness & halves the duration of paralysis, stuns and knockdowns. It is metabolized very slowly. One unit is enough to treat hallucinations; two units is deadly. desc: Toxic, but treats hallucinations, drowsiness & halves the duration of paralysis, stuns and knockdowns. It is metabolized very slowly. One unit is enough to treat hallucinations; two units is deadly.
physicalDesc: pungent physicalDesc: pungent
color: "#d49a2f" color: "#d49a2f"
metabolisms:
Poison:
effects:
- !type:HealthChange
damage:
types:
Poison: 0.5
- type: reagent - type: reagent
id: Tramadol id: Tramadol
@@ -250,8 +307,15 @@
desc: A hallucinogenic compound that is illegal under space law. A synthetic drug derived from Mindbreaker toxin, it blocks some neurological signals to the respiratory system which causes choking. desc: A hallucinogenic compound that is illegal under space law. A synthetic drug derived from Mindbreaker toxin, it blocks some neurological signals to the respiratory system which causes choking.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#5f959c" color: "#5f959c"
metabolisms:
Poison:
effects:
- !type:HealthChange
damage:
types:
Asphyxiation: 4
plantMetabolism: plantMetabolism:
- !type:AdjustToxins - !type:PlantAdjustToxins
amount: 10 amount: 10
- type: reagent - type: reagent
@@ -267,6 +331,13 @@
desc: Temporarily stops respiration and causes tissue damage. Large doses are fatal, and will cause people to pass out very quickly. Dexalin and Dexalin Plus will both remove it, however. desc: Temporarily stops respiration and causes tissue damage. Large doses are fatal, and will cause people to pass out very quickly. Dexalin and Dexalin Plus will both remove it, however.
physicalDesc: pungent physicalDesc: pungent
color: "#6b0007" color: "#6b0007"
metabolisms:
Poison:
effects:
- !type:HealthChange
damage:
groups:
Airloss: 7
- type: reagent - type: reagent
id: Lipozine id: Lipozine
@@ -282,7 +353,7 @@
physicalDesc: opaque physicalDesc: opaque
color: "#77b58e" color: "#77b58e"
plantMetabolism: plantMetabolism:
- !type:AdjustToxins - !type:PlantAdjustToxins
amount: 10 amount: 10
- type: reagent - type: reagent
@@ -319,3 +390,13 @@
desc: A soothing milky liquid with an iridescent gleam. A well known conspiracy theory says that it's origins remain a mystery because knowing the secrets of its production would render most commercial pharmaceuticals obsolete. desc: A soothing milky liquid with an iridescent gleam. A well known conspiracy theory says that it's origins remain a mystery because knowing the secrets of its production would render most commercial pharmaceuticals obsolete.
physicalDesc: soothing physicalDesc: soothing
color: "#fcf7f9" color: "#fcf7f9"
metabolisms:
Medicine:
effects:
- !type:HealthChange
damage:
groups:
Burn: -2
Toxin: -2
Airloss: -2
Brute: -2