* buzz buzz

* Darn now i'm all out of periods   thanks mirror
fix toy issue

* desc edits.

* rng and alphabee

* adds some missed parens
This commit is contained in:
Moony
2021-11-25 00:06:13 -06:00
committed by GitHub
parent 2a409de436
commit d5c5cbeaf4
12 changed files with 236 additions and 4 deletions

View File

@@ -0,0 +1,25 @@
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Tag;
using JetBrains.Annotations;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.Chemistry.ReagentEffectConditions;
[UsedImplicitly]
public class HasTag : ReagentEffectCondition
{
[DataField("tag", customTypeSerializer: typeof(PrototypeIdSerializer<TagPrototype>))]
public string Tag = default!;
[DataField("invert")]
public bool Invert = false;
public override bool Condition(ReagentEffectArgs args)
{
if (args.EntityManager.TryGetComponent<TagComponent>(args.SolutionEntity, out var tag))
return tag.HasTag(Tag) ^ Invert;
return false;
}
}

View File

@@ -0,0 +1,25 @@
using System;
using Content.Server.Atmos.Components;
using Content.Server.Atmos.EntitySystems;
using Content.Server.Electrocution;
using Content.Shared.Chemistry.Reagent;
using Robust.Shared.GameObjects;
using Robust.Shared.Log;
using Robust.Shared.Serialization.Manager.Attributes;
namespace Content.Server.Chemistry.ReagentEffects;
public class Electrocute : ReagentEffect
{
[DataField("electrocuteTime")] public int ElectrocuteTime = 2;
[DataField("electrocuteDamageScale")] public int ElectrocuteDamageScale = 5;
public override void Effect(ReagentEffectArgs args)
{
EntitySystem.Get<ElectrocutionSystem>().TryDoElectrocution(args.SolutionEntity, null,
Math.Max((args.Quantity * ElectrocuteDamageScale).Int(), 1), TimeSpan.FromSeconds(ElectrocuteTime));
args.Source?.RemoveReagent(args.Reagent.ID, args.Quantity);
}
}

View File

@@ -13,6 +13,10 @@ namespace Content.Server.Chemistry.TileReactions
[DataDefinition]
public class CleanTileReaction : ITileReaction
{
[DataField("cleanAmountMultiplier")]
public float CleanAmountMultiplier { get; private set; } = 1.0f;
FixedPoint2 ITileReaction.TileReact(TileRef tile, ReagentPrototype reagent, FixedPoint2 reactVolume)
{
var entities = tile.GetEntitiesInTileFast().ToArray();
@@ -21,7 +25,7 @@ namespace Content.Server.Chemistry.TileReactions
{
if (entity.TryGetComponent(out CleanableComponent? cleanable))
{
var next = amount + cleanable.CleanAmount;
var next = (amount + cleanable.CleanAmount) * CleanAmountMultiplier;
// Nothing left?
if (reactVolume < next)
break;

View File

@@ -2,12 +2,14 @@
using Content.Shared.Chemistry.Reagent;
using Content.Shared.FixedPoint;
using Content.Shared.Maps;
using Content.Shared.Random.Helpers;
using Content.Shared.Whitelist;
using Robust.Shared.GameObjects;
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;
@@ -34,6 +36,9 @@ public class CreateEntityReaction : ITileReaction
[DataField("maxOnTileWhitelist")]
public EntityWhitelist? Whitelist;
[DataField("randomOffsetMax")]
public float RandomOffsetMax = 0.0f;
public FixedPoint2 TileReact(TileRef tile, ReagentPrototype reagent, FixedPoint2 reactVolume)
{
if (reactVolume >= Usage)
@@ -54,7 +59,13 @@ public class CreateEntityReaction : ITileReaction
}
}
entMan.SpawnEntity(Entity, tile.GridPosition().Offset(new Vector2(0.5f, 0.5f)));
var random = IoCManager.Resolve<IRobustRandom>();
var xoffs = random.NextFloat(-RandomOffsetMax, RandomOffsetMax);
var yoffs = random.NextFloat(-RandomOffsetMax, RandomOffsetMax);
var pos = tile.GridPosition().Offset(new Vector2(0.5f + xoffs, 0.5f + yoffs));
entMan.SpawnEntity(Entity, pos);
return Usage;
}

View File

@@ -0,0 +1,15 @@
buzzochloricbees-effect-oh-god-bees = You are swarmed by many, many bees.
buzzochloricbees-effect-its-the-bees = It's the bees, oh god the bees.
buzzochloricbees-effect-why-am-i-covered-in-bees = You are covered in angry bees.
buzzochloricbees-effect-one-with-the-bees = You are one with the bees.
buzzochloricbees-effect-squeaky-clean = You feel squeaky clean as the bees try and get rid of you.
buzzochloricbees-effect-histamine-bee-allergy = You are highly allergic to bees, apparently.
buzzochloricbees-effect-histamine-swells = You swell like a balloon in the presence of the bees.
buzzochloricbees-effect-histamine-numb-to-the-bees = You are numb to the bees.
buzzochloricbees-effect-histamine-cannot-be-one-with-the-bees = You are not one with the bees.
buzzochloricbees-effect-licoxide-electrifying = The bees are electrifying.
buzzochloricbees-effect-licoxide-shocked-by-bee-facts = You are shocked by these five bee facts.
buzzochloricbees-effect-licoxide-buzzed = You feel buzzed.
buzzochloricbees-effect-licoxide-buzzes = You buzz with the bees.
buzzochloricbees-effect-fiber-hairy = You feel fuzzy, like a bee.
buzzochloricbees-effect-fiber-soft = You feel some exceptionally soft bees.

View File

@@ -76,6 +76,9 @@
normal: 0
crit: dead
dead: dead
- type: Tag
tags:
- Bee
- type: entity
name: chicken

View File

@@ -161,6 +161,7 @@
parent: BaseHandheldInstrument
id: SaxophoneInstrument
name: saxophone
description: An instrument. You could probably grind this into raw jazz.
components:
- type: Instrument
program: 67
@@ -170,6 +171,11 @@
- type: Item
size: 24
sprite: Objects/Fun/Instruments/saxophone.rsi
- type: Extractable
grindableSolution:
reagents:
- ReagentId: Saxoite
Quantity: 10
- type: entity
parent: BaseHandheldInstrument

View File

@@ -22,11 +22,16 @@
parent: BasePlushie
id: PlushieBee
name: bee plushie
description: A cute toy that resembles an even cuter programmer.
description: A cute toy that resembles an even cuter programmer. You'd have to be a monster to grind this up.
components:
- type: Sprite
sprite: Objects/Fun/toys.rsi
state: plushie_h
- type: Extractable
grindableSolution:
reagents:
- ReagentId: GroundBee
Quantity: 10
- type: entity
parent: BasePlushie

View File

@@ -17,6 +17,11 @@
solution: powerCell
- type: DrawableSolution
solution: powerCell
- type: Extractable
juiceSolution:
reagents:
- ReagentId: Licoxide
Quantity: 5
- type: entity
id: PowerCellSmallBase

View File

@@ -23,3 +23,118 @@
desc: A raw material, usually extracted from wool or other fabric products.
physicalDesc: fibrous
color: "#808080"
- type: reagent
id: BuzzochloricBees
name: Buzzochloric Bees
desc: "Liquid bees. Oh god it's LIQUID BEES NO-"
physicalDesc: buzzy
color: "#FFD35D"
tileReactions:
- !type:CreateEntityReaction
entity: MobBee
usage: 5
maxOnTile: 2
randomOffsetMax: 0.3
maxOnTileWhitelist:
tags: [ Bee ]
- !type:CleanTileReaction # Bees are extremely obsessive about cleanliness within what they consider their hive.
cleanAmountMultiplier: 0 # Consume absolutely zero bees. Buzz buzz.
metabolisms:
Poison:
effects:
- !type:PopupMessage
type: Local
messages:
- "buzzochloricbees-effect-oh-god-bees"
- "buzzochloricbees-effect-its-the-bees"
- "buzzochloricbees-effect-why-am-i-covered-in-bees"
- "buzzochloricbees-effect-one-with-the-bees"
- "buzzochloricbees-effect-squeaky-clean"
probability: 0.1
conditions:
- !type:ReagentThreshold
max: 0
reagent: Histamine
- !type:HasTag
invert: true
tag: Bee
- !type:PopupMessage
type: Local
messages:
- "buzzochloricbees-effect-histamine-bee-allergy"
- "buzzochloricbees-effect-histamine-swells"
- "buzzochloricbees-effect-histamine-numb-to-the-bees"
- "buzzochloricbees-effect-histamine-cannot-be-one-with-the-bees"
- "buzzochloricbees-effect-squeaky-clean"
probability: 0.05
conditions:
- !type:ReagentThreshold
min: 0.01
reagent: Histamine
- !type:HasTag
invert: true
tag: Bee
- !type:PopupMessage
type: Local
messages:
- "buzzochloricbees-effect-licoxide-electrifying"
- "buzzochloricbees-effect-licoxide-shocked-by-bee-facts"
- "buzzochloricbees-effect-licoxide-buzzed"
- "buzzochloricbees-effect-licoxide-buzzes"
probability: 0.05
conditions:
- !type:HasTag
invert: true
tag: Bee
- !type:ReagentThreshold
min: 0.01
reagent: Licoxide
- !type:PopupMessage
type: Local
messages:
- "buzzochloricbees-effect-fiber-hairy"
- "buzzochloricbees-effect-fiber-soft"
probability: 0.05
conditions:
- !type:HasTag
invert: true
tag: Bee
- !type:ReagentThreshold
min: 0.01
reagent: Fiber
- !type:HealthChange
damage:
types:
Poison: 2
Piercing: 2
conditions:
- !type:HasTag
invert: true
tag: Bee
- type: reagent
id: GroundBee
name: Ground Bee
desc: Bee grounds. Gross.
physicalDesc: bee guts
color: "#86530E"
- type: reagent
id: Saxoite
name: Saxoite
desc: Smells like jazz.
physicalDesc: ground brass
color: "#B8A603"
- type: reagent
id: Licoxide
name: Licoxide
desc: It looks... electrifying.
physicalDesc: electric
color: "#FDD023"
metabolisms:
Poison:
effects:
- !type:Electrocute
probability: 0.5

View File

@@ -7,3 +7,19 @@
amount: 2
products:
Carpetium: 3
- type: reaction
id: BuzzochloricBees
reactants:
Saxoite: # do you like jazz (not sorry)
amount: 1
Fiber: # bees are fuzzy
amount: 1
GroundBee: # you need bee for the bees
amount: 1
Chlorine: # the chloric part of buzzochloric
amount: 1
UnstableMutagen: # to bring the buzz to life
amount: 1
products:
BuzzochloricBees: 3

View File

@@ -3,6 +3,9 @@
- type: Tag
id: Baguette
- type: Tag
id: Bee
- type: Tag
id: Brutepack
@@ -236,4 +239,3 @@
- type: Tag
id: Write