ContainmentFieldComponent's garbage destruction can now be disabled (#29376)
* Garbage Vaporizer 3000 + DestroyGarbage bool property + DestroyGarbage property check when dealing with incoming trash * Update ContainmentFieldComponent.cs Co-authored-by: Tayrtahn <tayrtahn@gmail.com> --------- Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
This commit is contained in:
@@ -26,7 +26,7 @@ public sealed class ContainmentFieldSystem : EntitySystem
|
|||||||
{
|
{
|
||||||
var otherBody = args.OtherEntity;
|
var otherBody = args.OtherEntity;
|
||||||
|
|
||||||
if (HasComp<SpaceGarbageComponent>(otherBody))
|
if (component.DestroyGarbage && HasComp<SpaceGarbageComponent>(otherBody))
|
||||||
{
|
{
|
||||||
_popupSystem.PopupEntity(Loc.GetString("comp-field-vaporized", ("entity", otherBody)), uid, PopupType.LargeCaution);
|
_popupSystem.PopupEntity(Loc.GetString("comp-field-vaporized", ("entity", otherBody)), uid, PopupType.LargeCaution);
|
||||||
QueueDel(otherBody);
|
QueueDel(otherBody);
|
||||||
|
|||||||
@@ -18,4 +18,10 @@ public sealed partial class ContainmentFieldComponent : Component
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField("maxMass")]
|
[DataField("maxMass")]
|
||||||
public float MaxMass = 10000f;
|
public float MaxMass = 10000f;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Should field vaporize garbage that collides with it?
|
||||||
|
/// </summary>
|
||||||
|
[DataField]
|
||||||
|
public bool DestroyGarbage = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user