Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various tweaks for TAS Helper, and merges from TAS Helper #94

Merged
merged 23 commits into from
Jan 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
aead1c6
Merge pull request #2 from EverestAPI/refactor
LozenChen Dec 16, 2024
1274e7f
Merge pull request #3 from EverestAPI/refactor
LozenChen Dec 29, 2024
8f48cba
refactor: various tweaks for TAS Helper
LozenChen Dec 29, 2024
d029544
Merge branch 'refactor' of https://github.com/LozenChen/CelesteTAS-Ev…
LozenChen Dec 31, 2024
51a02d4
refactor: various tweaks for TAS Helper
LozenChen Dec 31, 2024
c971303
merge tas helper console enhancement
LozenChen Dec 31, 2024
4740979
refactor: support TAS Helper predictor
LozenChen Dec 31, 2024
9ecb9a7
merge tas helper better invincible
LozenChen Dec 31, 2024
56a9e4e
fix: Featherline submodule
psyGamer Dec 31, 2024
8703654
refactor: Better-Invincible mode
psyGamer Dec 31, 2024
8e7537b
refactor: Provide proper API for mods to define custom settings-resto…
psyGamer Dec 31, 2024
7e7efca
refactor: Remove CenterCamera.CenterCameraPosition export
psyGamer Dec 31, 2024
c2c5acb
refactor: Merge ActualEntityCollideHitbox and ActualPlayerCollideHitb…
psyGamer Dec 31, 2024
ab2bf20
refactor: Info HUD entity watching
psyGamer Dec 31, 2024
d72c66d
provide chinese description for better invincible
LozenChen Dec 31, 2024
ba04397
some tweaks to make tas helper compile
LozenChen Dec 31, 2024
76613fd
tweak: Method naming and drop TAS Helper settings migration
psyGamer Jan 1, 2025
10506d2
feat: Allow opening debug-console during TAS
psyGamer Jan 1, 2025
431cf50
feat: Hide unimportant trigger hitboxes
psyGamer Jan 1, 2025
6454557
feat: Use unique color for camera triggers
psyGamer Jan 1, 2025
bfbaa1c
fix: Code hot-reloading support
psyGamer Jan 1, 2025
3ff6768
feat: Hide unimportant trigger-like entities as well
psyGamer Jan 1, 2025
3bfbd11
fix: Hide remaining unimportant variant changes
psyGamer Jan 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CelesteTAS-EverestInterop/Dialog/English.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ TAS_RESTORE_SETTINGS= Restore All Settings when TAS Stop
TAS_LAUNCH_STUDIO_AT_BOOT= Launch Studio at Boot
TAS_ATTEMPT_TO_CONNECT_TO_STUDIO= Attempt To Connect To Studio
TAS_SHOW_STUDIO_UPDATE_BANNER= Show Studio Update Banner
TAS_OPEN_CONSOLE_IN_TAS= Allow Opening Console in TAS
TAS_SCROLLABLE_HISTORY_LOG= Scrollable Console History Log
TAS_BETTER_INVINCIBILITY= Better Invincibility
TAS_BETTER_INVINCIBLE_DESCRIPTION= Running "Set Invincible true" will still prevent dying, but avoids gameplay changes like bouncing of the death plane,{n}
to avoid accidentally desyncing the TAS. Applies only while a TAS is active.
TAS_HIDE_FREEZE_FRAMES= Hide Freeze Frames during TAS
TAS_HIDE_FREEZE_FRAMES_DESCRIPTION_1=When a freeze frame is encountered, run it and continue to the next frame
TAS_HIDE_FREEZE_FRAMES_DESCRIPTION_2=before rendering. Applies only while a TAS is active.
Expand Down
5 changes: 5 additions & 0 deletions CelesteTAS-EverestInterop/Dialog/Simplified Chinese.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ TAS_CENTER_CAMERA_HORIZONTALLY_ONLY= 镜头只水平居中
TAS_RESTORE_SETTINGS= TAS 停止时恢复所有设置
TAS_LAUNCH_STUDIO_AT_BOOT= 启动游戏时打开 Studio
TAS_ATTEMPT_TO_CONNECT_TO_STUDIO= 尝试连接 Studio
TAS_OPEN_CONSOLE_IN_TAS= 允许在 TAS 中打开控制台
TAS_SCROLLABLE_HISTORY_LOG= 可滚动的控制台历史记录
TAS_BETTER_INVINCIBILITY= 更好的无敌
TAS_BETTER_INVINCIBLE_DESCRIPTION= 运行 "Set Invincible true" 既会阻止死亡, 同时也会避免例如在掉落致死时自动弹跳的游戏物理变化,{n}
从而避免 TAS 意外 desync. 仅在 TAS 运行期间生效.
TAS_HIDE_FREEZE_FRAMES= TAS 时跳过冻结帧
TAS_HIDE_FREEZE_FRAMES_DESCRIPTION_1=运行到冻结帧时自动跳过进入下一帧
TAS_HIDE_FREEZE_FRAMES_DESCRIPTION_2=仅在 TAS 时启用
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using StudioCommunication.Util;
using TAS.EverestInterop;
using TAS.EverestInterop.InfoHUD;
using TAS.InfoHUD;
using TAS.Input;
using TAS.Input.Commands;
using TAS.ModInterop;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
using System.Collections.Generic;
using Celeste;
using Celeste.Mod;
using Microsoft.Xna.Framework.Input;
using Monocle;
using MonoMod.Cil;
using TAS.EverestInterop.InfoHUD;
using TAS.ModInterop;
using TAS.Module;
using TAS.Utils;
using TAS.InfoHUD;

namespace TAS.EverestInterop;

Expand All @@ -32,20 +33,54 @@ private static void InitializeHelperMethods() {

[Load]
private static void Load() {
IL.Monocle.Commands.Render += Commands_Render;
IL.Monocle.Commands.Render += IL_Commands_Render;
}

[Unload]
private static void Unload() {
IL.Monocle.Commands.Render -= Commands_Render;
IL.Monocle.Commands.Render -= IL_Commands_Render;
}

[EnableRun]
private static void CloseCommand() {
private static void EnableRun() {
// Auto-close at start. Can be opened manually again
Engine.Commands.Open = false;
}

private static void Commands_Render(ILContext il) {
internal static void UpdateMeta() {
if (!Manager.Running) {
return;
}

if (Engine.Commands.Open) {
Engine.Commands.UpdateOpen();
} else if (Engine.Commands.Enabled) {
Engine.Commands.UpdateClosed();
}
}

internal static void OpenConsole() {
if (!Manager.Running) {
return; // Only allow inside a TAS, since outside it's already handled
}
if (Engine.Commands.Open) {
return;
}

// Copied from Commands.UpdateClosed
Engine.Commands.Open = true;
Engine.Commands.currentState = Keyboard.GetState();
if (!Engine.Commands.installedListener) {
Engine.Commands.installedListener = true;
TextInput.OnInput += Engine.Commands.HandleChar;
}
if (!Engine.Commands.printedInfoMessage) {
Engine.Commands.Log("Use the 'help' command for a list of debug commands. Press Esc or use the 'q' command to close the console.");
Engine.Commands.printedInfoMessage = true;
}
}

private static void IL_Commands_Render(ILContext il) {
// Hijack string.Format("\n level: {0}, {1}", xObj, yObj)
new ILCursor(il).FindNext(out ILCursor[] found,
i => i.MatchLdstr("\n level: {0}, {1}"),
Expand Down
2 changes: 1 addition & 1 deletion CelesteTAS-EverestInterop/Source/EverestInterop/Core.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ private static void Load() {
IL.Monocle.Engine.Update += IL_Engine_Update;

typeof(GameInput)
.GetMethod(nameof(GameInput.UpdateGrab))
.GetMethod(nameof(GameInput.UpdateGrab))!
.SkipMethod(IsPaused);

// The original mod makes the MInput.Update call conditional and invokes UpdateInputs afterwards.
Expand Down

This file was deleted.

This file was deleted.

Loading
Loading