Artifexium (#17604)
This commit is contained in:
@@ -28,7 +28,7 @@ public sealed partial class ArtifactSystem
|
||||
{
|
||||
if (nodeAmount < 1)
|
||||
{
|
||||
Logger.Error($"nodeAmount {nodeAmount} is less than 1. Aborting artifact tree generation.");
|
||||
Log.Error($"nodeAmount {nodeAmount} is less than 1. Aborting artifact tree generation.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -226,12 +226,24 @@ public sealed partial class ArtifactSystem
|
||||
var trigger = _prototype.Index<ArtifactTriggerPrototype>(currentNode.Trigger);
|
||||
var effect = _prototype.Index<ArtifactEffectPrototype>(currentNode.Effect);
|
||||
|
||||
foreach (var name in effect.Components.Keys.Concat(trigger.Components.Keys))
|
||||
{
|
||||
var comp = _componentFactory.GetRegistration(name);
|
||||
EntityManager.RemoveComponentDeferred(uid, comp.Type);
|
||||
}
|
||||
var entityPrototype = MetaData(uid).EntityPrototype;
|
||||
var toRemove = effect.Components.Keys.Concat(trigger.Components.Keys).ToList();
|
||||
|
||||
foreach (var name in toRemove)
|
||||
{
|
||||
// if the entity prototype contained the component originally
|
||||
if (entityPrototype?.Components.TryGetComponent(name, out var entry) ?? false)
|
||||
{
|
||||
var comp = (Component) _componentFactory.GetComponent(name);
|
||||
comp.Owner = uid;
|
||||
var temp = (object) comp;
|
||||
_serialization.CopyTo(entry, ref temp);
|
||||
EntityManager.AddComponent(uid, (Component) temp!, true);
|
||||
continue;
|
||||
}
|
||||
|
||||
EntityManager.RemoveComponentDeferred(uid, _componentFactory.GetRegistration(name).Type);
|
||||
}
|
||||
component.CurrentNodeId = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,3 +6,6 @@ reagent-desc-phenol = An aromatic ring of carbon with a hydroxyl group. A useful
|
||||
|
||||
reagent-name-sodium-carbonate = Sodium Carbonate
|
||||
reagent-desc-sodium-carbonate = A white, odorless, water-soluble salt that yields an alkaline solution in water. Also known as soda ash.
|
||||
|
||||
reagent-name-artifexium = artifexium
|
||||
reagent-desc-artifexium = A lavender mixture of microscopic artifact fragments and a strong acid. It has the ability to activate artifacts.
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
- type: CollisionWake
|
||||
enabled: false
|
||||
- type: InteractionOutline
|
||||
- type: Reactive
|
||||
groups:
|
||||
Acidic: [Touch]
|
||||
- type: Fixtures
|
||||
fixtures:
|
||||
fix1:
|
||||
@@ -175,6 +178,11 @@
|
||||
- type: Tag
|
||||
tags:
|
||||
- ArtifactFragment
|
||||
- type: Extractable
|
||||
juiceSolution:
|
||||
reagents:
|
||||
- ReagentId: Artifexium
|
||||
Quantity: 10
|
||||
- type: StaticPrice
|
||||
price: 250
|
||||
- type: GuideHelp
|
||||
|
||||
@@ -28,6 +28,9 @@
|
||||
type: TransferAmountBoundUserInterface
|
||||
- key: enum.InstrumentUiKey.Key
|
||||
type: InstrumentBoundUserInterface
|
||||
- type: Reactive
|
||||
groups:
|
||||
Acidic: [Touch]
|
||||
- type: Fixtures
|
||||
fixtures:
|
||||
fix1:
|
||||
|
||||
@@ -49,3 +49,26 @@
|
||||
desc: reagent-desc-sodium-carbonate
|
||||
physicalDesc: reagent-physical-desc-powdery
|
||||
color: white
|
||||
|
||||
- type: reagent
|
||||
id: Artifexium
|
||||
name: reagent-name-artifexium
|
||||
desc: reagent-desc-artifexium
|
||||
flavor: metallic
|
||||
physicalDesc: reagent-physical-desc-crystalline
|
||||
color: "#776291"
|
||||
metabolisms:
|
||||
Poison:
|
||||
effects:
|
||||
- !type:HealthChange
|
||||
damage:
|
||||
types:
|
||||
Caustic: 2
|
||||
reactiveEffects:
|
||||
Acidic:
|
||||
methods: [ Touch ]
|
||||
effects:
|
||||
- !type:ActivateArtifact
|
||||
conditions:
|
||||
- !type:ReagentThreshold
|
||||
min: 5
|
||||
|
||||
@@ -94,6 +94,8 @@
|
||||
triggerHint: artifact-trigger-hint-water
|
||||
components:
|
||||
- type: Reactive
|
||||
groups:
|
||||
Acidic: [ Touch ]
|
||||
reactions:
|
||||
- reagents: [ Water ]
|
||||
methods: [ Touch ]
|
||||
|
||||
Reference in New Issue
Block a user