using System.Text; using System; using System.IO; using System.Threading; using System.Threading.Tasks; using System.Text.RegularExpressions; EnsureDataLoaded(); if (Data?.GeneralInfo?.DisplayName?.Content.ToLower() == "deltarune chapter 1 & 2") { ScriptError("Error 0: Incompatible with the new Deltarune Chapter 1 & 2 demo"); return; } else if (Data?.GeneralInfo?.DisplayName?.Content.ToLower() == "deltarune chapter 1&2") { ScriptError("Error 1: Incompatible with the new Deltarune Chapter 1 & 2 demo"); return; } ScriptMessage("Add a run button to Undertale (Backspace)"); UndertaleModLib.Compiler.CodeImportGroup importGroup = new(Data) { ThrowOnNoOpFindReplace = true, MainThreadAction = MainThreadAction }; importGroup.QueueFindReplace("gml_Object_obj_mainchara_Step_0", "(global.debug == 1)", "(true)"); importGroup.Import(); ScriptMessage("Run button in Undertale enabled!");