Artifexium (#17604)
This commit is contained in:
@@ -28,7 +28,7 @@ public sealed partial class ArtifactSystem
|
|||||||
{
|
{
|
||||||
if (nodeAmount < 1)
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -226,12 +226,24 @@ public sealed partial class ArtifactSystem
|
|||||||
var trigger = _prototype.Index<ArtifactTriggerPrototype>(currentNode.Trigger);
|
var trigger = _prototype.Index<ArtifactTriggerPrototype>(currentNode.Trigger);
|
||||||
var effect = _prototype.Index<ArtifactEffectPrototype>(currentNode.Effect);
|
var effect = _prototype.Index<ArtifactEffectPrototype>(currentNode.Effect);
|
||||||
|
|
||||||
foreach (var name in effect.Components.Keys.Concat(trigger.Components.Keys))
|
var entityPrototype = MetaData(uid).EntityPrototype;
|
||||||
{
|
var toRemove = effect.Components.Keys.Concat(trigger.Components.Keys).ToList();
|
||||||
var comp = _componentFactory.GetRegistration(name);
|
|
||||||
EntityManager.RemoveComponentDeferred(uid, comp.Type);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
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;
|
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-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-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
|
- type: CollisionWake
|
||||||
enabled: false
|
enabled: false
|
||||||
- type: InteractionOutline
|
- type: InteractionOutline
|
||||||
|
- type: Reactive
|
||||||
|
groups:
|
||||||
|
Acidic: [Touch]
|
||||||
- type: Fixtures
|
- type: Fixtures
|
||||||
fixtures:
|
fixtures:
|
||||||
fix1:
|
fix1:
|
||||||
@@ -175,6 +178,11 @@
|
|||||||
- type: Tag
|
- type: Tag
|
||||||
tags:
|
tags:
|
||||||
- ArtifactFragment
|
- ArtifactFragment
|
||||||
|
- type: Extractable
|
||||||
|
juiceSolution:
|
||||||
|
reagents:
|
||||||
|
- ReagentId: Artifexium
|
||||||
|
Quantity: 10
|
||||||
- type: StaticPrice
|
- type: StaticPrice
|
||||||
price: 250
|
price: 250
|
||||||
- type: GuideHelp
|
- type: GuideHelp
|
||||||
|
|||||||
@@ -28,6 +28,9 @@
|
|||||||
type: TransferAmountBoundUserInterface
|
type: TransferAmountBoundUserInterface
|
||||||
- key: enum.InstrumentUiKey.Key
|
- key: enum.InstrumentUiKey.Key
|
||||||
type: InstrumentBoundUserInterface
|
type: InstrumentBoundUserInterface
|
||||||
|
- type: Reactive
|
||||||
|
groups:
|
||||||
|
Acidic: [Touch]
|
||||||
- type: Fixtures
|
- type: Fixtures
|
||||||
fixtures:
|
fixtures:
|
||||||
fix1:
|
fix1:
|
||||||
|
|||||||
@@ -49,3 +49,26 @@
|
|||||||
desc: reagent-desc-sodium-carbonate
|
desc: reagent-desc-sodium-carbonate
|
||||||
physicalDesc: reagent-physical-desc-powdery
|
physicalDesc: reagent-physical-desc-powdery
|
||||||
color: white
|
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
|
triggerHint: artifact-trigger-hint-water
|
||||||
components:
|
components:
|
||||||
- type: Reactive
|
- type: Reactive
|
||||||
|
groups:
|
||||||
|
Acidic: [ Touch ]
|
||||||
reactions:
|
reactions:
|
||||||
- reagents: [ Water ]
|
- reagents: [ Water ]
|
||||||
methods: [ Touch ]
|
methods: [ Touch ]
|
||||||
|
|||||||
Reference in New Issue
Block a user