Skip to content

Commit

Permalink
removed broken skillslot.none code
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTimeSweeper committed Jan 22, 2024
1 parent 77e6806 commit 9b80726
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 3 additions & 0 deletions HenryMod/Characters/Survivors/Henry/HenrySurvivor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ public override void InitializeEntityStateMachines()
#region skills
public override void InitializeSkills()
{
//remove the genericskills from the commando body we cloned
Skills.ClearGenericSkills(bodyPrefab);
//add our own
Skills.CreateSkillFamilies(bodyPrefab);
AddPrimarySkills();
AddSecondarySkills();
Expand Down
1 change: 0 additions & 1 deletion HenryMod/Modules/Prefabs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ public static GameObject CreateBodyPrefab(GameObject newBodyPrefab, GameObject m
SetupCameraTargetParams(newBodyPrefab, bodyInfo);
//SetupRigidbody(newPrefab);
SetupCapsuleCollider(newBodyPrefab);
Skills.ClearGenericSkills(newBodyPrefab);

Modules.Content.AddCharacterBodyPrefab(newBodyPrefab);

Expand Down
6 changes: 1 addition & 5 deletions HenryMod/Modules/Skills.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@ internal static class Skills
/// Create 4 GenericSkills for primary, secondary, utility, and special, and create skillfamilies for them
/// </summary>
/// <param name="targetPrefab">Body prefab to add GenericSkills</param>
/// <param name="destroyExisting">Destroy any existing GenericSkills on the body prefab so you can replace them?</param>
public static void CreateSkillFamilies(GameObject targetPrefab) => CreateSkillFamilies(targetPrefab, SkillSlot.Primary, SkillSlot.Secondary, SkillSlot.Utility, SkillSlot.Special);
/// <summary>
/// Create in order the GenericSkills for the skillslots desired, and create skillfamilies for them.
/// </summary>
/// <param name="targetPrefab">Body prefab to add GenericSkills</param>
/// <param name="destroyExisting">Destroy any existing GenericSkills on the body prefab so you can replace them?</param>
/// <param name="slots">Order of slots to add to the body prefab. <para>Input SkillSlot.None to create a GenericSkill on the prefab outside of usual 4. These will be called GenericSkill1, with the number being its order on the loadout screen</para><para>For example, mul-t's selectable second primary, a selectable passive like acrid, etc</para></param>
/// <param name="slots">Order of slots to add to the body prefab.</param>
public static void CreateSkillFamilies(GameObject targetPrefab, params SkillSlot[] slots)
{
SkillLocator skillLocator = targetPrefab.GetComponent<SkillLocator>();
Expand All @@ -44,11 +42,9 @@ public static void CreateSkillFamilies(GameObject targetPrefab, params SkillSlot
skillLocator.special = CreateGenericSkillWithSkillFamily(targetPrefab, "Special");
break;
case SkillSlot.None:
CreateGenericSkillWithSkillFamily(targetPrefab, "GenericSkill" + i+1);
break;
}
}

}

public static void ClearGenericSkills(GameObject targetPrefab)
Expand Down

0 comments on commit 9b80726

Please sign in to comment.