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

Attempt fixes to reported erring scripts #1085

Merged
merged 2 commits into from
Dec 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 16 additions & 6 deletions UndertaleModTool/Scripts/Builtin Scripts/DeltaHATE.csx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

EnsureDataLoaded();

// Is actually incompatible. Something broke when I (Space Core) tried to combine the UT and SURVEY_PROGRAM code.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add todo to fix?

if (Data?.GeneralInfo?.DisplayName?.Content.ToLower() == "deltarune chapter 1 & 2")
{
ScriptError("Error 0: Incompatible with the new Deltarune Chapter 1 & 2 demo");
Expand Down Expand Up @@ -116,7 +117,16 @@ void StringSwap(int n, int k)
Data.Strings[n].Content = value;
}

if (Data.GeneralInfo.Filename.Content.ToLower().Contains("undertale"))
string GameName = Data.GeneralInfo.DisplayName.Content.ToLower();
bool deltamode = false;
if (GameName.Contains("undertale") || GameName.Contains("nxtale"))
deltamode = false;
else if (GameName.Contains("survey_program"))
deltamode = true;
else
deltamode = ScriptQuestion("Is this Deltarune Chapter 1 or a mod thereof?");

if (!deltamode)
{
List<int> choicer_lines = new List<int>();
List<int> final_lines = new List<int>();
Expand Down Expand Up @@ -228,10 +238,10 @@ foreach (var obj in Data.GameObjects)
{
if (!obj.Visible)
continue;
if (obj._Sprite.CachedId >= 0)
obj.Sprite = Data.Sprites[obj._Sprite.CachedId];
if (obj._TextureMaskId.CachedId >= 0)
obj.TextureMaskId = Data.Sprites[obj._TextureMaskId.CachedId];
if (obj._sprite.CachedId >= 0)
obj.Sprite = Data.Sprites[obj._sprite.CachedId];
if (obj._textureMaskId.CachedId >= 0)
obj.TextureMaskId = Data.Sprites[obj._textureMaskId.CachedId];
}

ScriptMessage("* GASTER NOISES *\n\nIT'S DONE");
ScriptMessage("* GASTER NOISES *\n\nIT'S DONE");
11 changes: 0 additions & 11 deletions UndertaleModTool/Scripts/Builtin Scripts/DeltaMILK.csx
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
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("Select the MILK that you prefer\nReplace every non-background sprite with milk (for Deltarune)\nby krzys_h");

var milk = Data.Sprites.ByName("spr_checkers_milk").Textures[0].Texture;
Expand Down