-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugfix: Cutscene is wrongly auto-watched
- Loading branch information
Showing
11 changed files
with
68 additions
and
10 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
| ||
using Monocle; | ||
|
||
namespace Celeste.Mod.TASHelper.Gameplay.AutoWatchEntity; | ||
|
||
|
||
internal class TriggerRenderer : AutoWatchTextRenderer { | ||
|
||
public Trigger trigger; | ||
|
||
public bool orig_Visible; | ||
public TriggerRenderer(RenderMode mode) : base(mode, active: true) { } | ||
|
||
public override void Added(Entity entity) { | ||
base.Added(entity); | ||
trigger = entity as Trigger; | ||
|
||
text.Position = trigger.Center; | ||
text.content = trigger.GetType().Name; | ||
orig_Visible = Visible; | ||
} | ||
|
||
public override void UpdateImpl() { | ||
Visible = orig_Visible && !SimplifiedTrigger.IsUnimportantTrigger(trigger); | ||
} | ||
|
||
public override void ClearHistoryData() { | ||
orig_Visible = Visible; | ||
} | ||
} | ||
|
||
internal class TriggerFactory : IRendererFactory { | ||
public Type GetTargetType() => typeof(Trigger); | ||
|
||
|
||
public bool Inherited() => true; | ||
public RenderMode Mode() => Config.Trigger; | ||
public void AddComponent(Entity entity) { | ||
entity.Add(new TriggerRenderer(Mode()).SleepWhenUltraFastforward()); | ||
} | ||
} | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters