Skip to content

Commit

Permalink
FIX: E-N can switch to another type (#2331)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReeZer2 authored Dec 10, 2024
1 parent cc8a581 commit 97e5040
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ public sealed partial class BorgSwitchableTypeComponent : Component
/// </summary>
[DataField]
public ProtoId<RadioChannelPrototype>[] InherentRadioChannels = [];

//ss220 borg switchable type fix start
[DataField]
public bool IsNeedToSwitch = true;
//ss220 borg switchable type fix end
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ public override void Initialize()

private void OnMapInit(Entity<BorgSwitchableTypeComponent> ent, ref MapInitEvent args)
{
//ss220 borg switchable type fix start
if (!ent.Comp.IsNeedToSwitch)
return;
//ss220 borg switchable type fix start

_actionsSystem.AddAction(ent, ref ent.Comp.SelectTypeAction, ActionId);
Dirty(ent);

Expand Down
2 changes: 2 additions & 0 deletions Resources/Prototypes/SS220/Entities/Mobs/NPCs/animals.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@
id: MobEN
description: Corgi made of metal with a heart of gold, because a heart of gold is a great guide
components:
- type: BorgSwitchableType
isNeedToSwitch: false
- type: ContainerFill
containers:
borg_brain:
Expand Down

0 comments on commit 97e5040

Please sign in to comment.