Skip to content

Commit

Permalink
Fixed command points going negative when a command part is detached
Browse files Browse the repository at this point in the history
  • Loading branch information
Ormanus committed Mar 20, 2021
1 parent fa06a6d commit f262de4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Assets/Scripts/Functional Definitions/Abilities/Command.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ protected override void Awake()
public override void SetDestroyed(bool input)
{
if(activated)
{
(Core as ShellCore).intrinsicCommandLimit -= commandUnitIncrease;
activated = false;
}
base.SetDestroyed(input);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -545,8 +545,6 @@ public Entity SpawnEntity(EntityBlueprint blueprint, Sector.LevelEntity data)
JsonUtility.FromJsonOverwrite(System.IO.File.ReadAllText
(resourcePath + "\\Entities\\" + json + ".json"), blueprint);
}

Debug.LogError(blueprint.shellHealth[0]);
blueprint.dialogue = dialogueRef;
}

Expand Down

0 comments on commit f262de4

Please sign in to comment.