diff --git a/Content.Server/Body/Systems/MetabolizerSystem.cs b/Content.Server/Body/Systems/MetabolizerSystem.cs index 7ca3fc170e..0e54f37504 100644 --- a/Content.Server/Body/Systems/MetabolizerSystem.cs +++ b/Content.Server/Body/Systems/MetabolizerSystem.cs @@ -14,7 +14,6 @@ using Robust.Shared.Random; namespace Content.Server.Body.Systems { - // TODO mirror in the future working on mechanisms move updating here to BodySystem so it can be ordered? [UsedImplicitly] public class MetabolizerSystem : EntitySystem { @@ -156,18 +155,8 @@ namespace Content.Server.Body.Systems // do all effects, if conditions apply foreach (var effect in entry.Effects) { - bool failed = false; - if (effect.Conditions != null) - { - foreach (var cond in effect.Conditions) - { - if (!cond.Condition(args)) - failed = true; - } - - if (failed) - continue; - } + if (!effect.ShouldApply(args, _random)) + continue; effect.Metabolize(args); } diff --git a/Content.Server/Chemistry/ReagentEffectConditions/BodyTemperature.cs b/Content.Server/Chemistry/ReagentEffectConditions/BodyTemperature.cs new file mode 100644 index 0000000000..2111af713e --- /dev/null +++ b/Content.Server/Chemistry/ReagentEffectConditions/BodyTemperature.cs @@ -0,0 +1,29 @@ +using Content.Server.Temperature.Components; +using Content.Shared.Chemistry.Reagent; +using Robust.Shared.Serialization.Manager.Attributes; + +namespace Content.Server.Chemistry.ReagentEffectConditions +{ + /// + /// Requires the solution entity to be above or below a certain temperature. + /// Used for things like cryoxadone and pyroxadone. + /// + public class Temperature : ReagentEffectCondition + { + [DataField("min")] + public float Min = 0; + + [DataField("max")] + public float Max = float.MaxValue; + public override bool Condition(ReagentEffectArgs args) + { + if (args.EntityManager.TryGetComponent(args.SolutionEntity, out TemperatureComponent temp)) + { + if (temp.CurrentTemperature > Min && temp.CurrentTemperature < Max) + return true; + } + + return false; + } + } +} diff --git a/Content.Server/Chemistry/ReagentEffectConditions/ReagentThreshold.cs b/Content.Server/Chemistry/ReagentEffectConditions/ReagentThreshold.cs index d6a586eb84..dd22fbd231 100644 --- a/Content.Server/Chemistry/ReagentEffectConditions/ReagentThreshold.cs +++ b/Content.Server/Chemistry/ReagentEffectConditions/ReagentThreshold.cs @@ -9,6 +9,9 @@ namespace Content.Server.Chemistry.ReagentEffectConditions /// /// Used for implementing reagent effects that require a certain amount of reagent before it should be applied. /// For instance, overdoses. + /// + /// This can also trigger on -other- reagents, not just the one metabolizing. By default, it uses the + /// one being metabolized. /// public class ReagentThreshold : ReagentEffectCondition { @@ -18,15 +21,21 @@ namespace Content.Server.Chemistry.ReagentEffectConditions [DataField("max")] public FixedPoint2 Max = FixedPoint2.MaxValue; + [DataField("reagent")] + public string? Reagent; + public override bool Condition(ReagentEffectArgs args) { - if (args.Source != null) + if (Reagent == null) + Reagent = args.Reagent.ID; + + var quant = FixedPoint2.Zero; + if (args.Source != null && args.Source.ContainsReagent(Reagent)) { - var quant = args.Source.GetReagentQuantity(args.Reagent.ID); - return quant >= Min && quant <= Max; + quant = args.Source.GetReagentQuantity(args.Reagent.ID); } - return false; + return quant >= Min && quant <= Max; } } } diff --git a/Content.Server/Chemistry/ReagentEffectConditions/TotalDamage.cs b/Content.Server/Chemistry/ReagentEffectConditions/TotalDamage.cs new file mode 100644 index 0000000000..57737d6fba --- /dev/null +++ b/Content.Server/Chemistry/ReagentEffectConditions/TotalDamage.cs @@ -0,0 +1,28 @@ +using Content.Shared.Chemistry.Reagent; +using Content.Shared.Damage; +using Content.Shared.FixedPoint; +using Robust.Shared.Serialization.Manager.Attributes; + +namespace Content.Server.Chemistry.ReagentEffectConditions +{ + public class TotalDamage : ReagentEffectCondition + { + [DataField("max")] + public FixedPoint2 Max = FixedPoint2.MaxValue; + + [DataField("min")] + public FixedPoint2 Min = FixedPoint2.Zero; + + public override bool Condition(ReagentEffectArgs args) + { + if (args.EntityManager.TryGetComponent(args.SolutionEntity, out DamageableComponent damage)) + { + var total = damage.TotalDamage; + if (total > Min && total < Max) + return true; + } + + return false; + } + } +} diff --git a/Content.Server/Chemistry/ReagentEffects/AdjustTemperature.cs b/Content.Server/Chemistry/ReagentEffects/AdjustTemperature.cs new file mode 100644 index 0000000000..487c9f1676 --- /dev/null +++ b/Content.Server/Chemistry/ReagentEffects/AdjustTemperature.cs @@ -0,0 +1,22 @@ +using Content.Server.Temperature.Components; +using Content.Server.Temperature.Systems; +using Content.Shared.Chemistry.Reagent; +using Robust.Shared.Serialization.Manager.Attributes; + +namespace Content.Server.Chemistry.ReagentEffects +{ + public class AdjustTemperature : ReagentEffect + { + [DataField("amount")] + public float Amount; + + public override void Metabolize(ReagentEffectArgs args) + { + if (args.EntityManager.TryGetComponent(args.SolutionEntity, out TemperatureComponent temp)) + { + var sys = args.EntityManager.EntitySysManager.GetEntitySystem(); + sys.ChangeHeat(args.SolutionEntity, Amount, true, temp); + } + } + } +} diff --git a/Content.Server/Chemistry/ReagentEffects/PopupMessage.cs b/Content.Server/Chemistry/ReagentEffects/PopupMessage.cs new file mode 100644 index 0000000000..9ececb5473 --- /dev/null +++ b/Content.Server/Chemistry/ReagentEffects/PopupMessage.cs @@ -0,0 +1,37 @@ +using Content.Shared.Chemistry.Reagent; +using Content.Shared.Popups; +using Robust.Shared.IoC; +using Robust.Shared.Localization; +using Robust.Shared.Player; +using Robust.Shared.Random; +using Robust.Shared.Serialization.Manager.Attributes; + +namespace Content.Server.Chemistry.ReagentEffects +{ + public class PopupMessage : ReagentEffect + { + [DataField("messages", required: true)] + public string[] Messages = default!; + + [DataField("type")] + public PopupType Type = PopupType.Local; + + public override void Metabolize(ReagentEffectArgs args) + { + var popupSys = args.EntityManager.EntitySysManager.GetEntitySystem(); + var random = IoCManager.Resolve(); + + var msg = random.Pick(Messages); + if (Type == PopupType.Local) + popupSys.PopupEntity(Loc.GetString(msg), args.SolutionEntity, Filter.Entities(args.SolutionEntity)); + else if (Type == PopupType.Pvs) + popupSys.PopupEntity(Loc.GetString(msg), args.SolutionEntity, Filter.Pvs(args.SolutionEntity)); + } + } + + public enum PopupType + { + Pvs, + Local + } +} diff --git a/Content.Server/Chemistry/ReagentEffects/RemoveReagent.cs b/Content.Server/Chemistry/ReagentEffects/RemoveReagent.cs new file mode 100644 index 0000000000..c1dbb882c9 --- /dev/null +++ b/Content.Server/Chemistry/ReagentEffects/RemoveReagent.cs @@ -0,0 +1,54 @@ +using Content.Server.Chemistry.EntitySystems; +using Content.Shared.Body.Prototypes; +using Content.Shared.Chemistry.Reagent; +using Content.Shared.FixedPoint; +using JetBrains.Annotations; +using Robust.Shared.IoC; +using Robust.Shared.Prototypes; +using Robust.Shared.Serialization.Manager.Attributes; +using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; + +namespace Content.Server.Chemistry.ReagentEffects +{ + [UsedImplicitly] + public class RemoveReagent : ReagentEffect + { + /// + /// The reagent ID to remove. Only one of this and should be active. + /// + [DataField("reagent", customTypeSerializer:typeof(PrototypeIdSerializer))] + public string? Reagent = null; + + /// + /// The metabolism group to remove, if the reagent satisfies any. + /// Only one of this and should be active. + /// + [DataField("group", customTypeSerializer:typeof(PrototypeIdSerializer))] + public string? Group = null; + + [DataField("amount", required: true)] + public FixedPoint2 Amount = default!; + + public override void Metabolize(ReagentEffectArgs args) + { + if (args.Source != null) + { + var solutionSys = args.EntityManager.EntitySysManager.GetEntitySystem(); + if (Reagent != null && args.Source.ContainsReagent(Reagent)) + { + solutionSys.TryRemoveReagent(args.SolutionEntity, args.Source, Reagent, Amount); + } + else if (Group != null) + { + var prototypeMan = IoCManager.Resolve(); + foreach (var quant in args.Source.Contents.ToArray()) + { + var proto = prototypeMan.Index(quant.ReagentId); + if (proto.Metabolisms != null && proto.Metabolisms.ContainsKey(Group)) + solutionSys.TryRemoveReagent(args.SolutionEntity, args.Source, quant.ReagentId, Amount); + } + } + } + } + } +} diff --git a/Content.Server/Chemistry/ReagentEffects/StatusEffects/GenericStatusEffect.cs b/Content.Server/Chemistry/ReagentEffects/StatusEffects/GenericStatusEffect.cs new file mode 100644 index 0000000000..66ae3e8215 --- /dev/null +++ b/Content.Server/Chemistry/ReagentEffects/StatusEffects/GenericStatusEffect.cs @@ -0,0 +1,63 @@ +using System; +using Content.Shared.Chemistry.Components; +using Content.Shared.Chemistry.Reagent; +using Content.Shared.StatusEffect; +using JetBrains.Annotations; +using Robust.Shared.GameObjects; +using Robust.Shared.IoC; +using Robust.Shared.Serialization.Manager.Attributes; + +namespace Content.Server.Chemistry.ReagentEffects.StatusEffects +{ + /// + /// Adds a generic status effect to the entity, + /// not worrying about things like how to affect the time it lasts for + /// or component fields or anything. Just adds a component to an entity + /// for a given time. Easy. + /// + /// + /// Can be used for things like adding accents or something. I don't know. Go wild. + /// + [UsedImplicitly] + public class GenericStatusEffect : ReagentEffect + { + [DataField("key", required: true)] + public string Key = default!; + + [DataField("component")] + public string Component = String.Empty; + + [DataField("time")] + public float Time = 2.0f; + + /// + /// Should this effect add the status effect, remove time from it, or set its cooldown? + /// + [DataField("type")] + public StatusEffectMetabolismType Type = StatusEffectMetabolismType.Add; + + public override void Metabolize(ReagentEffectArgs args) + { + var statusSys = args.EntityManager.EntitySysManager.GetEntitySystem(); + if (Type == StatusEffectMetabolismType.Add && Component != String.Empty) + { + statusSys.TryAddStatusEffect(args.SolutionEntity, Key, TimeSpan.FromSeconds(Time), Component); + } + else if (Type == StatusEffectMetabolismType.Remove) + { + statusSys.TryRemoveTime(args.SolutionEntity, Key, TimeSpan.FromSeconds(Time)); + } + else if (Type == StatusEffectMetabolismType.Set) + { + statusSys.TrySetTime(args.SolutionEntity, Key, TimeSpan.FromSeconds(Time)); + } + } + } + + public enum StatusEffectMetabolismType + { + Add, + Remove, + Set + } +} diff --git a/Content.Server/Chemistry/ReagentEffects/StatusEffects/Jitter.cs b/Content.Server/Chemistry/ReagentEffects/StatusEffects/Jitter.cs new file mode 100644 index 0000000000..16b7ba43c0 --- /dev/null +++ b/Content.Server/Chemistry/ReagentEffects/StatusEffects/Jitter.cs @@ -0,0 +1,32 @@ +using System; +using Content.Shared.Chemistry.Components; +using Content.Shared.Chemistry.Reagent; +using Content.Shared.Jittering; +using Robust.Shared.GameObjects; +using Robust.Shared.Serialization.Manager.Attributes; + +namespace Content.Server.Chemistry.ReagentEffects.StatusEffects +{ + /// + /// Adds the jitter status effect to a mob. + /// This doesn't use generic status effects because it needs to + /// take in some parameters that JitterSystem needs. + /// + public class Jitter : ReagentEffect + { + [DataField("amplitude")] + public float Amplitude = 10.0f; + + [DataField("frequency")] + public float Frequency = 4.0f; + + [DataField("time")] + public float Time = 2.0f; + + public override void Metabolize(ReagentEffectArgs args) + { + args.EntityManager.EntitySysManager.GetEntitySystem() + .DoJitter(args.SolutionEntity, TimeSpan.FromSeconds(Time), Amplitude, Frequency); + } + } +} diff --git a/Content.Shared/Chemistry/ChemistrySystem.cs b/Content.Shared/Chemistry/ChemistrySystem.cs index 35eff04b4e..45ba6ad500 100644 --- a/Content.Shared/Chemistry/ChemistrySystem.cs +++ b/Content.Shared/Chemistry/ChemistrySystem.cs @@ -6,6 +6,7 @@ using JetBrains.Annotations; using Robust.Shared.GameObjects; using Robust.Shared.IoC; using Robust.Shared.Prototypes; +using Robust.Shared.Random; namespace Content.Shared.Chemistry { @@ -13,6 +14,7 @@ namespace Content.Shared.Chemistry public partial class ChemistrySystem : EntitySystem { [Dependency] private readonly IPrototypeManager _prototypeManager = default!; + [Dependency] private readonly IRobustRandom _robustRandom = default!; public void ReactionEntity(EntityUid uid, ReactionMethod method, Solution solution) { @@ -48,21 +50,10 @@ namespace Content.Shared.Chemistry foreach (var effect in entry.Effects) { - bool failed = false; - foreach (var cond in effect.Conditions ?? new ReagentEffectCondition[] { }) - { - if (!cond.Condition(args)) - failed = true; - } - - if (failed) + if (!effect.ShouldApply(args, _robustRandom)) continue; effect.Metabolize(args); - - // Make sure we still have enough reagent to go... - if (source != null && !source.ContainsReagent(reagent.ID)) - break; } } } diff --git a/Content.Shared/Chemistry/Reagent/ReagentEffect.cs b/Content.Shared/Chemistry/Reagent/ReagentEffect.cs index a6d97e232d..8304ea7b86 100644 --- a/Content.Shared/Chemistry/Reagent/ReagentEffect.cs +++ b/Content.Shared/Chemistry/Reagent/ReagentEffect.cs @@ -4,6 +4,8 @@ using Content.Shared.Chemistry.Reagent; using Content.Shared.FixedPoint; using JetBrains.Annotations; using Robust.Shared.GameObjects; +using Robust.Shared.IoC; +using Robust.Shared.Random; using Robust.Shared.Serialization.Manager.Attributes; namespace Content.Shared.Chemistry.Reagent @@ -22,9 +24,44 @@ namespace Content.Shared.Chemistry.Reagent [DataField("conditions")] public ReagentEffectCondition[]? Conditions; + /// + /// What's the chance, from 0 to 1, that this effect will occur? + /// + [DataField("probability")] + public float Probability = 1.0f; + public abstract void Metabolize(ReagentEffectArgs args); } + public static class ReagentEffectExt + { + public static bool ShouldApply(this ReagentEffect effect, ReagentEffectArgs args, + IRobustRandom? random = null) + { + if (random == null) + random = IoCManager.Resolve(); + + + // Make sure we still have enough reagent to go... + if (args.Source != null && !args.Source.ContainsReagent(args.Reagent.ID)) + return false; + + if (effect.Probability < 1.0f && !random.Prob(effect.Probability)) + return false; + + if (effect.Conditions != null) + { + foreach (var cond in effect.Conditions) + { + if (!cond.Condition(args)) + return false; + } + } + + return true; + } + } + public enum ReactionMethod { Touch, diff --git a/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs b/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs index c4fb54be4a..530d68d507 100644 --- a/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs +++ b/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs @@ -10,6 +10,7 @@ using Robust.Shared.IoC; using Robust.Shared.Map; using Robust.Shared.Maths; using Robust.Shared.Prototypes; +using Robust.Shared.Random; using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary; @@ -112,11 +113,14 @@ namespace Content.Shared.Chemistry.Reagent return; var entMan = IoCManager.Resolve(); + var random = IoCManager.Resolve(); + var args = new ReagentEffectArgs(plantHolder.Value, null, solution, this, amount.Quantity, entMan, null); foreach (var plantMetabolizable in _plantMetabolism) { - plantMetabolizable.Metabolize( - new ReagentEffectArgs(plantHolder.Value, null, solution, this, amount.Quantity, entMan, null) - ); + if (!plantMetabolizable.ShouldApply(args, random)) + continue; + + plantMetabolizable.Metabolize(args); } } } diff --git a/Content.Shared/StatusEffect/StatusEffectsSystem.cs b/Content.Shared/StatusEffect/StatusEffectsSystem.cs index 1ef7b95ffb..efae94071d 100644 --- a/Content.Shared/StatusEffect/StatusEffectsSystem.cs +++ b/Content.Shared/StatusEffect/StatusEffectsSystem.cs @@ -1,10 +1,6 @@ using System; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; -using System.Reflection; -using System.Resources; using Content.Shared.Alert; -using Robust.Shared.Exceptions; using Robust.Shared.GameObjects; using Robust.Shared.GameStates; using Robust.Shared.IoC; @@ -107,6 +103,33 @@ namespace Content.Shared.StatusEffect return false; } + public bool TryAddStatusEffect(EntityUid uid, string key, TimeSpan time, string component, + StatusEffectsComponent? status = null, + SharedAlertsComponent? alerts = null) + { + if (!Resolve(uid, ref status, false)) + return false; + + Resolve(uid, ref alerts, false); + + if (TryAddStatusEffect(uid, key, time, status, alerts)) + { + // If they already have the comp, we just won't bother updating anything. + if (!EntityManager.HasComponent(uid, _componentFactory.GetRegistration(component).Type)) + { + // Fuck this shit I hate it + var newComponent = (Component) _componentFactory.GetComponent(component); + newComponent.Owner = EntityManager.GetEntity(uid); + + EntityManager.AddComponent(uid, newComponent); + status.ActiveEffects[key].RelevantComponent = component; + } + return true; + } + + return false; + } + /// /// Tries to add a status effect to an entity with a certain timer. /// @@ -140,11 +163,10 @@ namespace Content.Shared.StatusEffect (TimeSpan, TimeSpan) cooldown = (_gameTiming.CurTime, _gameTiming.CurTime + time); - // If they already have this status effect, just bulldoze its cooldown in favor of the new one - // and keep the relevant component the same. + // If they already have this status effect, add the time onto it's cooldown rather than anything else. if (HasStatusEffect(uid, key, status)) { - status.ActiveEffects[key] = new StatusEffectState(cooldown, status.ActiveEffects[key].RelevantComponent); + status.ActiveEffects[key].Cooldown.Item2 += time; } else { diff --git a/Resources/Locale/en-US/reagents/ephedrine.ftl b/Resources/Locale/en-US/reagents/ephedrine.ftl new file mode 100644 index 0000000000..27d1a6842a --- /dev/null +++ b/Resources/Locale/en-US/reagents/ephedrine.ftl @@ -0,0 +1,4 @@ +### Messages that pop up when metabolizing ephedrine. + +ephedrine-effect-tight-pain = You feel a tight pain in your chest. +ephedrine-effect-heart-pounds = Your heart pounds! diff --git a/Resources/Locale/en-US/reagents/generic.ftl b/Resources/Locale/en-US/reagents/generic.ftl new file mode 100644 index 0000000000..c96e03d4d8 --- /dev/null +++ b/Resources/Locale/en-US/reagents/generic.ftl @@ -0,0 +1,3 @@ +### Messages that can be utilized by multiple reagents. + +generic-reagent-effect-burning-insides = You feel your insides burning up! diff --git a/Resources/Locale/en-US/reagents/histamine.ftl b/Resources/Locale/en-US/reagents/histamine.ftl new file mode 100644 index 0000000000..08c1beb8f7 --- /dev/null +++ b/Resources/Locale/en-US/reagents/histamine.ftl @@ -0,0 +1,4 @@ +### Messages that pop up when metabolizing histamine. + +histamine-effect-light-itchiness = You feel a little itchy... +histamine-effect-heavy-itchiness = You feel REALLY itchy! diff --git a/Resources/Locale/en-US/reagents/leporazine.ftl b/Resources/Locale/en-US/reagents/leporazine.ftl new file mode 100644 index 0000000000..ba6bd5186e --- /dev/null +++ b/Resources/Locale/en-US/reagents/leporazine.ftl @@ -0,0 +1 @@ +leporazine-effect-temperature-adjusting = You feel your body's temperature adjust rapidly. diff --git a/Resources/Prototypes/Damage/groups.yml b/Resources/Prototypes/Damage/groups.yml index 6d782e601f..7718a729fb 100644 --- a/Resources/Prototypes/Damage/groups.yml +++ b/Resources/Prototypes/Damage/groups.yml @@ -34,3 +34,9 @@ id: Genetic damageTypes: - Cellular + +- type: damageGroup + id: Caustic + damageTypes: + - Heat + - Poison diff --git a/Resources/Prototypes/Reagents/Metabolism/metabolism_groups.yml b/Resources/Prototypes/Metabolism/metabolism_groups.yml similarity index 100% rename from Resources/Prototypes/Reagents/Metabolism/metabolism_groups.yml rename to Resources/Prototypes/Metabolism/metabolism_groups.yml diff --git a/Resources/Prototypes/Reagents/Metabolism/metabolizer_types.yml b/Resources/Prototypes/Metabolism/metabolizer_types.yml similarity index 100% rename from Resources/Prototypes/Reagents/Metabolism/metabolizer_types.yml rename to Resources/Prototypes/Metabolism/metabolizer_types.yml diff --git a/Resources/Prototypes/Reagents/Consumable/Drink/alcohol.yml b/Resources/Prototypes/Reagents/Consumable/Drink/alcohol.yml index 25dfa28a0d..a0ea35bc44 100644 --- a/Resources/Prototypes/Reagents/Consumable/Drink/alcohol.yml +++ b/Resources/Prototypes/Reagents/Consumable/Drink/alcohol.yml @@ -57,6 +57,25 @@ color: "#664300" spritePath: rumglass.rsi +- type: reagent + id: Ethanol + name: ethanol + desc: A simple alcohol, makes you drunk if consumed, flammable. + physicalDesc: strong-smelling + color: "#b05b3c" + boilingPoint: 78.2 + meltingPoint: -114.1 + tileReactions: + - !type:FlammableTileReaction + temperatureMultiplier: 1.35 + metabolisms: + Poison: + effects: + - !type:HealthChange + damage: + groups: + Caustic: 1 + - type: reagent id: Gin name: gin diff --git a/Resources/Prototypes/Reagents/Consumable/Drink/base_drink.yml b/Resources/Prototypes/Reagents/Consumable/Drink/base_drink.yml index 123d9e6504..eeb3c045d4 100644 --- a/Resources/Prototypes/Reagents/Consumable/Drink/base_drink.yml +++ b/Resources/Prototypes/Reagents/Consumable/Drink/base_drink.yml @@ -7,12 +7,11 @@ - !type:SatiateThirst factor: 3 plantMetabolism: - - !type:PlantAdjustNutrition - amount: 0.1 - !type:PlantAdjustWater amount: 1 - - !type:PlantAdjustHealth - amount: 0.1 + tileReactions: + - !type:ExtinguishTileReaction { } + - !type:SpillIfPuddlePresentTileReaction { } - type: reagent id: BaseSoda @@ -39,6 +38,9 @@ effects: - !type:SatiateThirst factor: 2 + tileReactions: + - !type:FlammableTileReaction + temperatureMultiplier: 1.35 plantMetabolism: - !type:PlantAdjustNutrition amount: 0.25 diff --git a/Resources/Prototypes/Reagents/Consumable/Drink/drinks.yml b/Resources/Prototypes/Reagents/Consumable/Drink/drinks.yml index 37cdd50ce3..62f8c96be4 100644 --- a/Resources/Prototypes/Reagents/Consumable/Drink/drinks.yml +++ b/Resources/Prototypes/Reagents/Consumable/Drink/drinks.yml @@ -202,3 +202,30 @@ desc: It tastes strange but at least the quinine keeps the Space Malaria at bay. physicalDesc: fizzy color: "#0064C8" + +- type: reagent + id: Water + name: water + parent: BaseDrink + desc: A colorless liquid that humans need in order to survive. + physicalDesc: translucent + color: "#c0e0ff20" + boilingPoint: 100.0 + meltingPoint: 0.0 + metabolisms: + Drink: + effects: + - !type:SatiateThirst + factor: 4 + +- type: reagent + id: Ice + name: ice + desc: Frozen water. + physicalDesc: frosty + color: "#bed8e6" + meltingPoint: 0.0 + boilingPoint: 100.0 + plantMetabolism: + - !type:PlantAdjustWater + amount: 1 diff --git a/Resources/Prototypes/Reagents/Consumable/Food/condiments.yml b/Resources/Prototypes/Reagents/Consumable/Food/condiments.yml index 8cdcb5903a..fe975bd967 100644 --- a/Resources/Prototypes/Reagents/Consumable/Food/condiments.yml +++ b/Resources/Prototypes/Reagents/Consumable/Food/condiments.yml @@ -53,3 +53,33 @@ desc: A salty soy-based flavoring. # physicalDesc: color: saddlebrown + +- type: reagent + id: TableSalt + name: table salt + desc: Commonly known as salt, Sodium Chloride is often used to season food or kill borers instantly. + physicalDesc: grainy + color: "#a1000b" + boilingPoint: 1465.0 + meltingPoint: 800.7 + plantMetabolism: + - !type:PlantAdjustWater + amount: -3 + - !type:PlantAdjustNutrition + amount: -0.3 + - !type:PlantAdjustToxins + amount: 8 + - !type:PlantAdjustWeeds + amount: -2 + - !type:PlantAdjustPests + amount: -1 + - !type:PlantAdjustHealth + amount: -2 + metabolisms: + Food: + effects: + # eating salt on its own kinda sucks, kids + - !type:SatiateHunger + factor: 0.5 + - !type:SatiateThirst + factor: -0.5 diff --git a/Resources/Prototypes/Reagents/Consumable/Food/food.yml b/Resources/Prototypes/Reagents/Consumable/Food/food.yml new file mode 100644 index 0000000000..bec89e469c --- /dev/null +++ b/Resources/Prototypes/Reagents/Consumable/Food/food.yml @@ -0,0 +1,31 @@ +- type: reagent + id: Nutriment + name: nutriment + desc: All the vitamins, minerals, and carbohydrates the body needs in pure form. + physicalDesc: opaque + color: "#664330" + metabolisms: + Food: + effects: + - !type:SatiateHunger + plantMetabolism: + - !type:PlantAdjustNutrition + amount: 1 + - !type:PlantAdjustHealth + amount: 0.5 + +- type: reagent + id: Glucose + name: glucose + desc: A simple sugar found in many foods. + physicalDesc: syrupy + color: "#ffffff" + boilingPoint: 340282300000000000000000000000000000000 #Fun fact: Glucose can't boil. So let's just set it to the maximum float value. + meltingPoint: 146.0 + plantMetabolism: + - !type:PlantAdjustNutrition + amount: 0.1 + - !type:PlantAdjustWeeds + amount: 2 + - !type:PlantAdjustPests + amount: 2 diff --git a/Resources/Prototypes/Reagents/Consumable/Food/ingredients.yml b/Resources/Prototypes/Reagents/Consumable/Food/ingredients.yml index 798fe14964..8de7b7f9ef 100644 --- a/Resources/Prototypes/Reagents/Consumable/Food/ingredients.yml +++ b/Resources/Prototypes/Reagents/Consumable/Food/ingredients.yml @@ -100,3 +100,14 @@ effects: - !type:SatiateHunger factor: 1 + +- type: reagent + id: Oil + name: oil + desc: Used by chefs to cook. + physicalDesc: oily + color: "#b67823" + boilingPoint: 300.0 + meltingPoint: -16.0 + tileReactions: + - !type:FlammableTileReaction {} diff --git a/Resources/Prototypes/Reagents/botany.yml b/Resources/Prototypes/Reagents/botany.yml index 19181fb23f..c658e16d3e 100644 --- a/Resources/Prototypes/Reagents/botany.yml +++ b/Resources/Prototypes/Reagents/botany.yml @@ -81,23 +81,50 @@ amount: -6 - type: reagent - id: THC - name: THC - desc: The main psychoactive compound in cannabis. - color: "#808080" - physicalDesc: crystalline + id: Ammonia + name: ammonia + desc: An effective fertilizer which is better than what is available to the botanist initially, though it isn't as powerful as Diethylamine + physicalDesc: pungent + color: "#77b58e" + boilingPoint: -33.0 + meltingPoint: -77.7 plantMetabolism: - - !type:PlantAdjustNutrition - amount: -5 - - !type:PlantAdjustHealth - amount: -1 + - !type:PlantAdjustNutrition + amount: 1 + - !type:PlantAdjustHealth + amount: 0.5 + metabolisms: + Poison: + effects: + - !type:HealthChange + damage: + groups: + Caustic: 1 - type: reagent - id: Nicotine - name: Nicotine - desc: Dangerous and highly addictive. - color: "#C0C0C0" - physicalDesc: strong smelling + id: Diethylamine + name: diethylamine + desc: A very potent fertilizer. + physicalDesc: strong-smelling + color: "#a1000b" + boilingPoint: 55.5 + meltingPoint: -50.0 plantMetabolism: - - !type:PlantAdjustHealth - amount: -5 + - !type:PlantAdjustNutrition + amount: 0.1 + - !type:PlantAdjustPests + prob: 0.1 + amount: -1 + - !type:PlantAdjustHealth + amount: 0.1 + - !type:PlantAffectGrowth + prob: 0.2 + amount: 1 + - !type:PlantDiethylamine {} + metabolisms: + Poison: + effects: + - !type:HealthChange + damage: + groups: + Caustic: 1 diff --git a/Resources/Prototypes/Reagents/chemicals.yml b/Resources/Prototypes/Reagents/chemicals.yml deleted file mode 100644 index ddfd70c11f..0000000000 --- a/Resources/Prototypes/Reagents/chemicals.yml +++ /dev/null @@ -1,334 +0,0 @@ -- type: reagent - id: Ammonia - name: ammonia - desc: An effective fertilizer which is better than what is available to the botanist initially, though it isn't as powerful as Diethylamine - physicalDesc: pungent - color: "#77b58e" - boilingPoint: -33.0 - meltingPoint: -77.7 - plantMetabolism: - - !type:PlantAdjustNutrition - amount: 1 - - !type:PlantAdjustHealth - amount: 0.5 - -- type: reagent - id: Diethylamine - name: diethylamine - desc: A very potent fertilizer. - physicalDesc: strong-smelling - color: "#a1000b" - boilingPoint: 55.5 - meltingPoint: -50.0 - plantMetabolism: - - !type:PlantAdjustNutrition - amount: 0.1 - - !type:PlantAdjustPests - prob: 0.1 - amount: -1 - - !type:PlantAdjustHealth - amount: 0.1 - - !type:PlantAffectGrowth - prob: 0.2 - amount: 1 - - !type:PlantDiethylamine {} - -- type: reagent - id: Ethanol - name: ethanol - desc: A simple alcohol, makes you drunk if consumed, flammable. - physicalDesc: strong-smelling - color: "#b05b3c" - boilingPoint: 78.2 - meltingPoint: -114.1 - tileReactions: - - !type:FlammableTileReaction - temperatureMultiplier: 1.35 - -- type: reagent - id: FoamingAgent - name: foaming agent - desc: Makes foam such as that's required in metal foam grenades. - physicalDesc: foamy - color: "#215263" - boilingPoint: 418.0 # I went with ammonium lauryl sulfate as the basis for this - meltingPoint: 7.4 # I made this up - -- type: reagent - id: Glucose - name: glucose - desc: A simple sugar found in many foods. - physicalDesc: syrupy - color: "#ffffff" - boilingPoint: 340282300000000000000000000000000000000 #Fun fact: Glucose can't boil. So let's just set it to the maximum float value. - meltingPoint: 146.0 - plantMetabolism: - - !type:PlantAdjustNutrition - amount: 0.1 - - !type:PlantAdjustWeeds - amount: 2 - - !type:PlantAdjustPests - amount: 2 - -- type: reagent - id: Ice - name: ice - desc: Frozen water. - physicalDesc: frosty - color: "#bed8e6" - meltingPoint: 0.0 - boilingPoint: 100.0 - plantMetabolism: - - !type:PlantAdjustWater - amount: 1 - -- type: reagent - id: Nutriment - name: nutriment - desc: All the vitamins, minerals, and carbohydrates the body needs in pure form. - physicalDesc: opaque - color: "#664330" - metabolisms: - Food: - effects: - - !type:SatiateHunger - plantMetabolism: - - !type:PlantAdjustNutrition - amount: 1 - - !type:PlantAdjustHealth - amount: 0.5 - -- type: reagent - id: Theobromine - name: theobromine - desc: Theobromine is a bitter alkaloid of the cacao plant found in chocolate, and some other foods. - physicalDesc: grainy - color: "#f5f5f5" - meltingPoint: 351 - boilingPoint: 554 # I'm not a chemist, but it boils at 295, lower than melting point, idk how it works so I gave it higher value - metabolisms: - Poison: - effects: - - !type:HealthChange - conditions: - - !type:ReagentThreshold - min: 1 - - !type:OrganType - type: Animal # Applying damage to the mobs with lower metabolism capabilities - damage: - types: - Poison: 4 - -- type: reagent - id: Plasma - name: plasma - desc: Funky, space-magic pixie dust. You probably shouldn't eat this, but we both know you will anyways. - physicalDesc: gaseous - color: "#7e009e" - boilingPoint: -127.3 # Random values picked between the actual values for CO2 and O2 - meltingPoint: -186.4 - tileReactions: - - !type:FlammableTileReaction - temperatureMultiplier: 1.5 - -- type: reagent - id: PolytrinicAcid - name: polytrinic acid - desc: An extremely corrosive chemical substance. The slightest touch of it will melt off most masks and headgear, and it deals extreme damage to anyone who comes directly into contact with it. - physicalDesc: strong-smelling - color: "#a1000b" - boilingPoint: 78.2 # This isn't a real chemical... - meltingPoint: -19.4 - plantMetabolism: - - !type:PlantAdjustToxins - amount: 20 - - !type:PlantAdjustWeeds - amount: -4 - - !type:PlantAdjustHealth - amount: -8 - -- type: reagent - id: FluorosulfuricAcid - name: fluorosulfuric acid - desc: An extremely corrosive chemical substance. - physicalDesc: strong-smelling - color: "#5050ff" - boilingPoint: 165 - meltingPoint: -87 - -- type: reagent - id: TableSalt - name: table salt - desc: Commonly known as salt, Sodium Chloride is often used to season food or kill borers instantly. - physicalDesc: grainy - color: "#a1000b" - boilingPoint: 1465.0 - meltingPoint: 800.7 - plantMetabolism: - - !type:PlantAdjustWater - amount: -3 - - !type:PlantAdjustNutrition - amount: -0.3 - - !type:PlantAdjustToxins - amount: 8 - - !type:PlantAdjustWeeds - amount: -2 - - !type:PlantAdjustPests - amount: -1 - - !type:PlantAdjustHealth - amount: -2 - -- type: reagent - id: Thermite - name: thermite - desc: A mixture that becomes extremely hot when ignited, and which can burn straight through walls when applied and ignited. It'll slowly inflict burn damage to anybody dumb enough to ingest it, but can't be ignited inside inside said dumb person. - physicalDesc: grainy - color: "#757245" - boilingPoint: 2977.0 # Aluminum oxide - meltingPoint: 2030.0 - tileReactions: - - !type:FlammableTileReaction - temperatureMultiplier: 1.35 - -- type: reagent - id: Toxin - name: toxin - desc: A Toxic chemical. - color: "#cf3600" - physicalDesc: opaque - plantMetabolism: - - !type:PlantAdjustToxins - amount: 10 - - !type:PlantAdjustHealth - amount: -5 - -- type: reagent - id: SulfuricAcid - name: sulfuric acid - desc: A highly corrosive, oily, colorless liquid. - physicalDesc: oily - color: "#BF8C00" - boilingPoint: 337.0 - meltingPoint: 10.31 - plantMetabolism: - - !type:PlantAdjustToxins - amount: 10 - - !type:PlantAdjustWeeds - amount: -2 - - !type:PlantAdjustHealth - amount: -5 - -- type: reagent - id: UnstableMutagen - name: unstable mutagen - desc: Causes mutations when injected into living people or plants. High doses may be lethal, especially in humans. - physicalDesc: glowing - color: "#00ff5f" - boilingPoint: 340282300000000000000000000000000000000 # Ethidium bromide, which doesn't boil. - meltingPoint: 261.0 - plantMetabolism: - - !type:PlantAdjustMutationLevel - amount: 1 - -- type: reagent - id: Water - name: water - desc: A colorless liquid that humans need in order to survive. - physicalDesc: translucent - color: "#c0e0ff20" - boilingPoint: 100.0 - meltingPoint: 0.0 - metabolisms: - Drink: - effects: - - !type:SatiateThirst - factor: 4 - tileReactions: - - !type:ExtinguishTileReaction {} - - !type:SpillIfPuddlePresentTileReaction {} - plantMetabolism: - - !type:PlantAdjustWater - amount: 1 - -- type: reagent - id: Meth - name: meth - desc: Methamphetamine, more commonly know as meth, is a potent stimulant, with dangerous side-effects if too much is consumed. - physicalDesc: translucent - color: "#FAFAFA" - boilingPoint: 212.0 #Meth vape when? - 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 - id: Iodine - name: iodine - desc: Commonly added to table salt as a nutrient. On its own it tastes far less pleasing. - physicalDesc: Dark Brown - color: "#BC8A00" - boilingPoint: 184.3 - meltingPoint: 113.7 - -- type: reagent - id: Ephedrine - name: ephedrine - desc: Increases stun resistance and movement speed, giving you hand cramps. Overdose deals toxin damage and inhibits breathing - physicalDesc: Bone white - color: "#D2FFFA" - boilingPoint: 255.0 - meltingPoint: 36.0 - metabolisms: - Narcotic: - effects: - - !type:MovespeedModifier - walkSpeedModifier: 1.2 - sprintSpeedModifier: 1.2 - -- type: reagent - id: Oil - name: oil - desc: Used by chefs to cook. - physicalDesc: oily - color: "#b67823" - boilingPoint: 300.0 - meltingPoint: -16.0 - tileReactions: - - !type:FlammableTileReaction {} - -- type: reagent - id: WeldingFuel - name: welding fuel - desc: Used by welders to weld. - physicalDesc: oily - color: "#a76b1c" - boilingPoint: -84.7 # Acetylene. Close enough. - meltingPoint: -80.7 - tileReactions: - - !type:FlammableTileReaction {} - -- type: reagent - id: Fluorosurfactant - name: fluorosurfactant - desc: A perfluoronated sulfonic acid that forms a foam when mixed with water. - physicalDesc: opaque - color: "#9e6b38" - boilingPoint: 190.0 # Perfluorooctanoic Acid. - meltingPoint: 45.0 diff --git a/Resources/Prototypes/Reagents/cleaning.yml b/Resources/Prototypes/Reagents/cleaning.yml index c2879d0d2a..a6faebd1c1 100644 --- a/Resources/Prototypes/Reagents/cleaning.yml +++ b/Resources/Prototypes/Reagents/cleaning.yml @@ -6,6 +6,17 @@ color: "#a1000b" boilingPoint: 111.0 meltingPoint: -5.0 + metabolisms: + Poison: + effects: + - !type:HealthChange + damage: + types: + Poison: 3 + - !type:PopupMessage + type: Local + messages: [ "generic-reagent-effect-burning-insides" ] + probability: 0.33 - type: reagent id: SpaceCleaner diff --git a/Resources/Prototypes/Reagents/elements.yml b/Resources/Prototypes/Reagents/elements.yml index 745d719856..669d67e21e 100644 --- a/Resources/Prototypes/Reagents/elements.yml +++ b/Resources/Prototypes/Reagents/elements.yml @@ -79,6 +79,15 @@ boilingPoint: -253.0 meltingPoint: -259.2 +- type: reagent + id: Iodine + name: iodine + desc: Commonly added to table salt as a nutrient. On its own it tastes far less pleasing. + physicalDesc: Dark Brown + color: "#BC8A00" + boilingPoint: 184.3 + meltingPoint: 113.7 + - type: reagent id: Iron name: iron @@ -96,6 +105,7 @@ color: "#c6c8cc" meltingPoint: 180.5 boilingPoint: 1330.0 + # TODO: cause confusion and some brain damage - type: reagent id: Mercury @@ -105,6 +115,13 @@ color: "#929296" meltingPoint: -38.83 boilingPoint: 356.73 + metabolisms: + Medicine: + effects: + - !type:HealthChange + damage: + types: + Poison: 2 - type: reagent id: Nitrogen @@ -152,21 +169,12 @@ - type: reagent id: Radium name: radium + parent: Uranium desc: A radioactive metal, silvery-white in its pure form. It glows due to its radioactivity and is highly toxic. physicalDesc: glowing color: "#00ff04" meltingPoint: 700.0 boilingPoint: 1737.0 - plantMetabolism: - - !type:PlantAdjustMutationLevel - amount: 0.6 - - !type:PlantAdjustToxins - amount: 4 - - !type:PlantAdjustHealth - amount: -1.5 - - !type:PlantAdjustMutationMod - prob: 0.2 - amount: 0.1 - type: reagent id: Silicon @@ -181,7 +189,7 @@ id: Silver name: silver desc: A soft, white, lustrous transition metal, it has the highest electrical conductivity of any element and the highest thermal conductivity of any metal. - physicalDesc: metallic + physicalDesc: reasonably metallic color: "#d0d0d0" boilingPoint: 2212.0 meltingPoint: 960.5 @@ -212,3 +220,20 @@ color: "#8fa191" meltingPoint: 1133.0 boilingPoint: 4131.0 + plantMetabolism: + - !type:PlantAdjustMutationLevel + amount: 0.6 + - !type:PlantAdjustToxins + amount: 4 + - !type:PlantAdjustHealth + amount: -1.5 + - !type:PlantAdjustMutationMod + prob: 0.2 + amount: 0.1 + metabolisms: + Medicine: + effects: + - !type:HealthChange + damage: + types: + Radiation: 2 diff --git a/Resources/Prototypes/Reagents/medicine.yml b/Resources/Prototypes/Reagents/medicine.yml index e30432c8d1..4593e9a60c 100644 --- a/Resources/Prototypes/Reagents/medicine.yml +++ b/Resources/Prototypes/Reagents/medicine.yml @@ -4,6 +4,7 @@ desc: Lessens the damage to neurological tissue. More effective at treating brain damage than alkysine and also a fairly effective painkiller as well. Caution is needed in its creation to avoid mixing bleach and the chlorine needed to make alkysine. physicalDesc: strong-smelling color: "#9e232b" + # TODO brain damage - type: reagent id: Alkysine @@ -11,6 +12,7 @@ desc: Lessens the damage to neurological tissue, effective even after catastrophic injury. Used for treating brain damage and also a fairly effective painkiller. physicalDesc: oily color: "#ff8c00" + # TODO brain damage - type: reagent id: Dylovene @@ -25,12 +27,30 @@ damage: types: Poison: -1 + # TODO overdose: vomit, dizzy effect (drunkenness?) plantMetabolism: - !type:PlantAdjustToxins amount: -10 - !type:PlantAdjustHealth amount: 1 +- type: reagent + id: Diphenhydramine + name: diphenhydramine + desc: Rapidly purges the body of histamine and reduces jitteriness. + physicalDesc: chalky + color: "#64ffe6" + metabolisms: + Medicine: + effects: + - !type:RemoveReagent + reagent: Histamine + amount: 3.0 + - !type:GenericStatusEffect + key: Jitter + time: 1.0 + type: Remove + - type: reagent id: Arithrazine name: arithrazine @@ -72,10 +92,26 @@ amount: -3 - !type:PlantAdjustHealth amount: 3 + metabolisms: + Medicine: + effects: + - !type:HealthChange + conditions: + - !type:Temperature + # this is a little arbitrary but they gotta be pretty cold + max: 150.0 + damage: + # todo scale with temp like SS13 + groups: + Airloss: -6 + Brute: -4 + Burn: -4 + Toxin: -4 - type: reagent id: Clonexadone name: clonexadone + parent: Cryoxadone desc: Heals standard damage in the same as Cryoxadone, with the same temperature requirement. Significantly more effective than the former at treating cellular damage, although both can be used simultaneously. Best used in cryo cells. physicalDesc: bubbly color: "#0666ff" @@ -91,6 +127,8 @@ desc: Prevents hallucination slightly. physicalDesc: cloudy color: "#21693c" + # Why do so many chems 'reduce hallucination slightly' and why did we add so fucking many + # without even implementing hallucination? - type: reagent id: Dermaline @@ -140,6 +178,7 @@ desc: Neutralises the effects of alcohol in the blood stream. Though it is commonly needed, it is rarely requested. physicalDesc: opaque color: "#2d5708" + # TODO: GenericStatusEffect remove drunkenness - type: reagent id: Hyperzine @@ -168,6 +207,7 @@ desc: Effective in treating eye trauma. It heals damage caused by physical or chemical trauma, though it is ineffective in treating genetic defects in the eyes. physicalDesc: pungent color: "#f7ef00" + # TODO eye damage - type: reagent id: Inacusiate @@ -175,6 +215,7 @@ desc: You only need 1u for Inacusiate to be effective. Cures deafness instantly. Useful after an explosion. physicalDesc: pungent color: "#c4c04b" + # TODO ear damage - type: reagent id: Inaprovaline @@ -182,6 +223,17 @@ desc: Inaprovaline is a synaptic stimulant and cardiostimulant. Commonly used to stabilize patients- it stops oxygen loss when the patient is in critical health. It'll also slow down bleeding (internal or external) by half while in the body. Acts as a decent painkiller. physicalDesc: opaque color: "#731024" + metabolisms: + Medicine: + effects: + - !type:HealthChange + conditions: + - !type:TotalDamage + # they gotta be in crit first + min: 100 + damage: + types: + Asphyxiation: -5 - type: reagent id: Kelotane @@ -203,6 +255,23 @@ desc: This keeps a patient's body temperature stable. High doses can allow short periods of unprotected EVA, but prevents use of the cryogenics tubes. physicalDesc: pungent color: "#ff7db5" + metabolisms: + Medicine: + effects: + - !type:AdjustTemperature + conditions: + - !type:Temperature + max: 293.15 + amount: 1000 # thermal energy, not temperature! + - !type:AdjustTemperature + conditions: + - !type:Temperature + min: 293.15 + amount: -1000 + - !type:PopupMessage + type: Local + messages: [ "leporazine-effect-temperature-adjusting" ] + probability: 0.2 - type: reagent id: Methylin @@ -224,6 +293,15 @@ desc: Used in the treatment of cancer, is as effective as Anti-Toxin. Causes moderate radiation and hair loss. physicalDesc: acrid color: "#c8ff75" + metabolisms: + Medicine: + effects: + - !type:HealthChange + damage: + types: + # close enough to what it says + Poison: -1 + Radiation: 1 - type: reagent id: Paroxetine @@ -231,6 +309,7 @@ desc: Prevents hallucination, but has a 10% chance of causing intense hallucinations. physicalDesc: acrid color: "#fffbad" + # TODO: Hallucinations. - type: reagent id: Ryetalyn @@ -249,7 +328,7 @@ - type: reagent id: Synaptizine name: synaptizine - 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. One unit is enough to treat hallucinations; two units is deadly. physicalDesc: pungent color: "#d49a2f" metabolisms: @@ -258,7 +337,15 @@ - !type:HealthChange damage: types: - Poison: 0.5 + Poison: 3 + - !type:GenericStatusEffect + key: Stun + time: 1.0 + type: Remove + - !type:GenericStatusEffect + key: KnockedDown + time: 1.0 + type: Remove - type: reagent id: Tramadol @@ -273,20 +360,16 @@ desc: A wide-spectrum stimulant, originally derived from Cordrazine. Is capable of healing all four main damage types simultaneously, however it only heals at half the rate of conventional healing chemicals. Because of its low potency, it's best used as a supplement to other medicines. physicalDesc: opaque color: "#00e5ff" - -- type: reagent - id: Vaccine - name: vaccine - desc: Introduces antigens to the body, allowing the immune system to produce enough antibodies to combat present or future infections. Is blank by default, vaccine carrying antigen is produced at a centrifuge. Each unit raises the associated antibody concentration by 20% so at most 5 units are needed to cure the strongest diseases. - physicalDesc: translucent - color: "#ffc9f6" - -- type: reagent - id: Albuterol - name: albuterol - desc: A bronchodilator that relaxes muscles in the airways and increases air flow to the lungs. It'll remove mucus from your system as long as it's inside your body. Only useful to people with the Asthma disability. - physicalDesc: cloudy - color: "#00b89f" + metabolisms: + Medicine: + effects: + - !type:HealthChange + damage: + groups: + Burn: -1 + Toxin: -1 + Airloss: -1 + Brute: -1 - type: reagent id: ChloralHydrate @@ -294,13 +377,7 @@ desc: A powerful sedative which causes death in doses upwards of 16.2 units. Sends the patient to sleep almost instantly. physicalDesc: acrid color: "#18c9b1" - -- type: reagent - id: Creatine - name: creatine - desc: A muscle-building drug that grants the user enormous strength, before their muscles seize and tear their own body to shreds. In practical terms, 1-25 units just causes toxin damage, and 26 units turns you into a hulk with all its associated benefits with the side effect of taking a little toxin damage over time. You'll remain as a hulk until it's all metabolized, at which point you'll take 200 brute damage and gib. With the correct administration, it can be the most potent drug there is, but even at the best of times it is best considered a double-edged sword. - physicalDesc: cloudy - color: "#a1000b" + # TODO: sleeping and unconsciousness - type: reagent id: Cryptobiolin @@ -308,44 +385,7 @@ desc: Causes confusion and dizziness. This is essential to make Spaceacillin. physicalDesc: fizzy color: "#081a80" - -- type: reagent - id: HeartbreakerToxin - name: heartbreaker toxin - 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 - color: "#5f959c" - metabolisms: - Poison: - effects: - - !type:HealthChange - damage: - types: - Asphyxiation: 4 - plantMetabolism: - - !type:PlantAdjustToxins - amount: 10 - -- type: reagent - id: Impedrezene - name: impedrezene - desc: A narcotic that impedes one's ability by slowing down the higher brain cell functions. Causes massive brain damage. - physicalDesc: acrid - color: "#215263" - -- type: reagent - id: Lexorin - name: lexorin - 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 - color: "#6b0007" - metabolisms: - Poison: - effects: - - !type:HealthChange - damage: - groups: - Airloss: 7 + # TODO confusion/dizzyness - type: reagent id: Lipozine @@ -353,23 +393,12 @@ desc: Causes weight loss upon consumption. physicalDesc: oily color: "#2690b5" - -- type: reagent - id: MindbreakerToxin - name: mindbreaker toxin - desc: A potent hallucinogenic compound that is illegal under space law. Formerly known as LSD. - physicalDesc: opaque - color: "#77b58e" - plantMetabolism: - - !type:PlantAdjustToxins - amount: 10 - -- type: reagent - id: Soporific - name: soporific (sleep-toxin) - desc: A less powerful sedative that takes a while to work, intended to help insomniacs and patients that are too aggressive to be treated normally. Takes roughly 50 seconds to make the patient fall asleep. Is safe in large quantities. Can be counteracted with Anti-Toxin. - physicalDesc: acrid - color: "#215263" + metabolisms: + Medicine: + effects: + # what the hell, this isn't satiating at all!! + - !type:SatiateHunger + factor: -1 - type: reagent id: Sterilizine @@ -378,20 +407,6 @@ physicalDesc: strong-smelling color: "#7cad37" -- type: reagent - id: SpaceDrugs - name: space drugs - desc: An illegal compound which induces a number of effects such as loss of balance and visual artefacts. - physicalDesc: syrupy - color: "#63806e" - -- type: reagent - id: THCOil - name: THC oil - desc: Pure THC oil, extracted from the leaves of the cannabis plant. Much stronger than in it's natural form and can be used to numb chronic pain in patients. - physicalDesc: skunky - color: "#DAA520" - - type: reagent id: Omnizine name: Omnizine diff --git a/Resources/Prototypes/Reagents/narcotics.yml b/Resources/Prototypes/Reagents/narcotics.yml new file mode 100644 index 0000000000..0a844489aa --- /dev/null +++ b/Resources/Prototypes/Reagents/narcotics.yml @@ -0,0 +1,119 @@ +- type: reagent + id: Meth + name: meth + desc: Methamphetamine, more commonly know as meth, is a potent stimulant, with dangerous side-effects if too much is consumed. + physicalDesc: translucent + color: "#FAFAFA" + boilingPoint: 212.0 #Meth vape when? + meltingPoint: 170.0 + metabolisms: + Poison: + effects: + - !type:HealthChange + damage: + types: + Poison: 1.5 + - !type:HealthChange + conditions: + - !type:ReagentThreshold + min: 30 + damage: + types: + Poison: 2 # this is added to the base damage of the meth. + Asphyxiation: 2 + Narcotic: + effects: + - !type:MovespeedModifier + walkSpeedModifier: 1.3 + sprintSpeedModifier: 1.3 + - !type:GenericStatusEffect + key: Stutter + component: StutteringAccent + - !type:Jitter + - !type:GenericStatusEffect + key: Stun + time: 1 + type: Remove + - !type:GenericStatusEffect + key: KnockedDown + time: 1 + type: Remove + +- type: reagent + id: Ephedrine + name: ephedrine + desc: Increases stun resistance and movement speed, giving you hand cramps. Overdose deals toxin damage and inhibits breathing. + physicalDesc: Bone white + color: "#D2FFFA" + boilingPoint: 255.0 + meltingPoint: 36.0 + metabolisms: + Narcotic: + effects: + - !type:MovespeedModifier + walkSpeedModifier: 1.2 + sprintSpeedModifier: 1.2 + - !type:HealthChange + conditions: + - !type:ReagentThreshold + min: 20 + damage: + types: + Poison: 2 # this is added to the base damage of the meth. + Asphyxiation: 2 + - !type:Jitter + - !type:GenericStatusEffect + key: Stun + time: 0.25 + type: Remove + - !type:GenericStatusEffect + key: KnockedDown + time: 0.25 + type: Remove + - !type:PopupMessage + messages: ["ephedrine-effect-tight-pain", "ephedrine-effect-heart-pounds"] + type: Local + probability: 0.05 + +- type: reagent + id: THC + name: THC + desc: The main psychoactive compound in cannabis. + color: "#808080" + physicalDesc: crystalline + plantMetabolism: + - !type:PlantAdjustNutrition + amount: -5 + - !type:PlantAdjustHealth + amount: -1 + +- type: reagent + id: THCOil + name: THC oil + desc: Pure THC oil, extracted from the leaves of the cannabis plant. Much stronger than in it's natural form and can be used to numb chronic pain in patients. + physicalDesc: skunky + color: "#DAA520" + +- type: reagent + id: Nicotine + name: Nicotine + desc: Dangerous and highly addictive. + color: "#C0C0C0" + physicalDesc: strong smelling + plantMetabolism: + - !type:PlantAdjustHealth + amount: -5 + +- type: reagent + id: Impedrezene + name: impedrezene + desc: A narcotic that impedes one's ability by slowing down the higher brain cell functions. Causes massive brain damage. + physicalDesc: acrid + color: "#215263" + +- type: reagent + id: SpaceDrugs + name: space drugs + desc: An illegal compound which induces a number of effects such as loss of balance and visual artefacts. + physicalDesc: syrupy + color: "#63806e" diff --git a/Resources/Prototypes/Reagents/pyrotechnic.yml b/Resources/Prototypes/Reagents/pyrotechnic.yml new file mode 100644 index 0000000000..3b5a003a2b --- /dev/null +++ b/Resources/Prototypes/Reagents/pyrotechnic.yml @@ -0,0 +1,47 @@ +- type: reagent + id: Thermite + name: thermite + desc: A mixture that becomes extremely hot when ignited, and which can burn straight through walls when applied and ignited. It'll slowly inflict burn damage to anybody dumb enough to ingest it, but can't be ignited inside inside said dumb person. + physicalDesc: grainy + color: "#757245" + boilingPoint: 2977.0 # Aluminum oxide + meltingPoint: 2030.0 + tileReactions: + - !type:FlammableTileReaction + temperatureMultiplier: 2 + metabolisms: + Poison: + effects: + - !type:HealthChange + damage: + types: + Heat: 2 + +- type: reagent + id: FoamingAgent + name: foaming agent + desc: Makes foam such as that's required in metal foam grenades. + physicalDesc: foamy + color: "#215263" + boilingPoint: 418.0 # I went with ammonium lauryl sulfate as the basis for this + meltingPoint: 7.4 # I made this up + +- type: reagent + id: WeldingFuel + name: welding fuel + desc: Used by welders to weld. + physicalDesc: oily + color: "#a76b1c" + boilingPoint: -84.7 # Acetylene. Close enough. + meltingPoint: -80.7 + tileReactions: + - !type:FlammableTileReaction {} + +- type: reagent + id: Fluorosurfactant + name: fluorosurfactant + desc: A perfluoronated sulfonic acid that forms a foam when mixed with water. + physicalDesc: opaque + color: "#9e6b38" + boilingPoint: 190.0 # Perfluorooctanoic Acid. + meltingPoint: 45.0 diff --git a/Resources/Prototypes/Reagents/toxins.yml b/Resources/Prototypes/Reagents/toxins.yml new file mode 100644 index 0000000000..bd63000e18 --- /dev/null +++ b/Resources/Prototypes/Reagents/toxins.yml @@ -0,0 +1,243 @@ +- type: reagent + id: Toxin + name: toxin + desc: A Toxic chemical. + color: "#cf3600" + physicalDesc: opaque + plantMetabolism: + - !type:PlantAdjustToxins + amount: 10 + - !type:PlantAdjustHealth + amount: -5 + metabolisms: + Poison: + effects: + - !type:HealthChange + damage: + types: + Poison: 2 + +- type: reagent + id: PolytrinicAcid + name: polytrinic acid + desc: An extremely corrosive chemical substance. The slightest touch of it will melt off most masks and headgear, and it deals extreme damage to anyone who comes directly into contact with it. + physicalDesc: strong-smelling + color: "#a1000b" + boilingPoint: 78.2 # This isn't a real chemical... + meltingPoint: -19.4 + plantMetabolism: + - !type:PlantAdjustToxins + amount: 20 + - !type:PlantAdjustWeeds + amount: -4 + - !type:PlantAdjustHealth + amount: -8 + # TODO MIRROR acid! hurt people on contact + metabolisms: + Poison: + effects: + - !type:HealthChange + damage: + groups: + Caustic: 2 + - !type:PopupMessage + type: Local + messages: [ "generic-reagent-effect-burning-insides" ] + probability: 0.33 + +- type: reagent + id: FluorosulfuricAcid + name: fluorosulfuric acid + desc: An extremely corrosive chemical substance. + physicalDesc: strong-smelling + color: "#5050ff" + boilingPoint: 165 + meltingPoint: -87 + # TODO MIRROR acid! hurt people on contact + metabolisms: + Poison: + effects: + - !type:HealthChange + damage: + groups: + Caustic: 2 + - !type:PopupMessage + type: Local + messages: [ "generic-reagent-effect-burning-insides" ] + probability: 0.33 + +- type: reagent + id: SulfuricAcid + name: sulfuric acid + desc: A highly corrosive, oily, colorless liquid. + physicalDesc: oily + color: "#BF8C00" + boilingPoint: 337.0 + meltingPoint: 10.31 + plantMetabolism: + - !type:PlantAdjustToxins + amount: 10 + - !type:PlantAdjustWeeds + amount: -2 + - !type:PlantAdjustHealth + amount: -5 + metabolisms: + Poison: + effects: + - !type:HealthChange + damage: + types: + Poison: 2 + - !type:PopupMessage + type: Local + messages: [ "generic-reagent-effect-burning-insides" ] + probability: 0.33 + # TODO MIRROR acid! + +- type: reagent + id: Plasma + name: plasma + desc: Funky, space-magic pixie dust. You probably shouldn't eat this, but we both know you will anyways. + physicalDesc: gaseous + color: "#7e009e" + boilingPoint: -127.3 # Random values picked between the actual values for CO2 and O2 + meltingPoint: -186.4 + tileReactions: + - !type:FlammableTileReaction + temperatureMultiplier: 1.5 + metabolisms: + Poison: + effects: + - !type:HealthChange + damage: + types: + Poison: 3 + - !type:RemoveReagent + reagent: Inaprovaline + amount: 2 + +- type: reagent + id: UnstableMutagen + name: unstable mutagen + desc: Causes mutations when injected into living people or plants. High doses may be lethal, especially in humans. + physicalDesc: glowing + color: "#00ff5f" + boilingPoint: 340282300000000000000000000000000000000 # Ethidium bromide, which doesn't boil. + meltingPoint: 261.0 + plantMetabolism: + - !type:PlantAdjustMutationLevel + amount: 1 + metabolisms: + Poison: + effects: + - !type:HealthChange + damage: + types: + Radiation: 3 + +- type: reagent + id: HeartbreakerToxin + name: heartbreaker toxin + 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 + color: "#5f959c" + metabolisms: + Poison: + effects: + - !type:HealthChange + damage: + types: + Asphyxiation: 4 + plantMetabolism: + - !type:PlantAdjustToxins + amount: 10 + +- type: reagent + id: Lexorin + name: lexorin + 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 + color: "#6b0007" + metabolisms: + Poison: + effects: + - !type:HealthChange + damage: + groups: + Airloss: 7 + +- type: reagent + id: MindbreakerToxin + name: mindbreaker toxin + desc: A potent hallucinogenic compound that is illegal under space law. Formerly known as LSD. + physicalDesc: opaque + color: "#77b58e" + plantMetabolism: + - !type:PlantAdjustToxins + amount: 10 + # TODO hallucinations + +- type: reagent + id: Soporific + name: soporific (sleep-toxin) + desc: A less powerful sedative that takes a while to work, intended to help insomniacs and patients that are too aggressive to be treated normally. Takes roughly 50 seconds to make the patient fall asleep. Is safe in large quantities. Can be counteracted with Anti-Toxin. + physicalDesc: acrid + color: "#215263" + # TODO sleeping + +- type: reagent + id: Histamine + name: histamine + desc: Histamine's effects become more dangerous depending on the dosage amount. They range from mildly annoying to incredibly lethal. + physicalDesc: abrasive + color: "#FA6464" + metabolisms: + Poison: + effects: + - !type:HealthChange + probability: 0.1 + damage: + groups: + Brute: 2 + # todo: cough, sneeze + - !type:HealthChange + conditions: + - !type:ReagentThreshold + min: 30 + damage: + groups: + Brute: 2 + Toxin: 2 + Airloss: 2 + - !type:PopupMessage + type: Local + messages: [ "histamine-effect-light-itchiness" ] + probability: 0.1 + - !type:PopupMessage + conditions: + - !type:ReagentThreshold + min: 30 + type: Local + messages: [ "histamine-effect-heavy-itchiness" ] + probability: 0.2 + +- type: reagent + id: Theobromine + name: theobromine + desc: Theobromine is a bitter alkaloid of the cacao plant found in chocolate, and some other foods. + physicalDesc: grainy + color: "#f5f5f5" + meltingPoint: 351 + boilingPoint: 554 # I'm not a chemist, but it boils at 295, lower than melting point, idk how it works so I gave it higher value + metabolisms: + Poison: + effects: + - !type:HealthChange + conditions: + - !type:ReagentThreshold + min: 1 + - !type:OrganType + type: Animal # Applying damage to the mobs with lower metabolism capabilities + damage: + types: + Poison: 4 diff --git a/Resources/Prototypes/Recipes/Reactions/medicine.yml b/Resources/Prototypes/Recipes/Reactions/medicine.yml index dc11046ef6..3f5a736d65 100644 --- a/Resources/Prototypes/Recipes/Reactions/medicine.yml +++ b/Resources/Prototypes/Recipes/Reactions/medicine.yml @@ -322,28 +322,6 @@ products: Tricordrazine: 2 -- type: reaction - id: Vaccine - reactants: - Aluminium: - amount: 1 - Glucose: - amount: 1 - Water: - amount: 1 - products: - Vaccine: 3 - -- type: reaction - id: Albuterol - reactants: - Hyperzine: - amount: 1 - Tramadol: - amount: 1 - products: - Albuterol: 2 - - type: reaction id: ChloralHydrate reactants: @@ -356,20 +334,6 @@ products: ChloralHydrate: 1 -- type: reaction - id: Creatine - reactants: - Bicaridine: - amount: 1 - Hyperzine: - amount: 1 - Nutriment: - amount: 1 - UnstableMutagen: - amount: 1 - products: - Creatine: 3 - - type: reaction id: Cryptobiolin reactants: diff --git a/Resources/Prototypes/status_effects.yml b/Resources/Prototypes/status_effects.yml index fb5ce212bf..9037317e94 100644 --- a/Resources/Prototypes/status_effects.yml +++ b/Resources/Prototypes/status_effects.yml @@ -19,5 +19,8 @@ - type: statusEffect id: Stutter +- type: statusEffect + id: AllCaps + - type: statusEffect id: Electrocution