22using System . Collections . Generic ;
33using MiraAPI . GameOptions ;
44using MiraAPI . Modifiers . Types ;
5+ using NewMod . Options ;
56using NewMod . Options . Modifiers ;
67using Reactor . Utilities ;
78using UnityEngine ;
89
910namespace NewMod . Modifiers
1011{
11- public class StickyModifier : TimedModifier
12+ public class StickyModifier : GameModifier
1213 {
1314 public override string ModifierName => "Sticky" ;
14- public override bool AutoStart => OptionGroupSingleton < StickyModifierOptions > . Instance . EnableModifier ;
15- public override float Duration => ( int ) OptionGroupSingleton < StickyModifierOptions > . Instance . StickyDuration ;
1615 public override bool HideOnUi => false ;
1716 public override bool ShowInFreeplay => true ;
18- public override bool RemoveOnComplete => true ;
19- public static List < PlayerControl > linkedPlayers = new ( ) ;
17+ public static List < PlayerControl > linkedPlayers = [ ] ;
18+ public override int GetAmountPerGame ( )
19+ {
20+ return ( int ) OptionGroupSingleton < ModifiersOptions > . Instance . StickyAmount ;
21+ }
22+ public override int GetAssignmentChance ( )
23+ {
24+ return OptionGroupSingleton < ModifiersOptions > . Instance . StickyChance ;
25+ }
2026 public override bool ? CanVent ( )
2127 {
2228 return Player . Data . Role . CanVent ;
@@ -49,8 +55,6 @@ public override void FixedUpdate()
4955 }
5056 public IEnumerator CoFollowStickyPlayer ( PlayerControl player )
5157 {
52- float duration = Duration ;
53-
5458 var info = new StickyState
5559 {
5660 StickyOwner = Player ,
@@ -59,7 +63,7 @@ public IEnumerator CoFollowStickyPlayer(PlayerControl player)
5963 } ;
6064
6165 yield return HudManager . Instance . StartCoroutine (
62- Effects . Overlerp ( duration , new System . Action < float > ( ( t ) =>
66+ Effects . Overlerp ( 0.5f , new System . Action < float > ( ( t ) =>
6367 {
6468 Vector3 targetPos = info . LinkedPlayer . transform . position ;
6569 Vector3 currentPos = info . StickyOwner . transform . position ;
0 commit comments