5 Commits
2.3.1 ... 2.3.2

Author SHA1 Message Date
Ethan Lee
c8fcbc1256 2.3.2 2021-09-03 15:26:38 -04:00
Misa
a302692ab2 Add message when player is kicked out of Super Gravitron
The player gets kicked out of the Super Gravitron if they have
invincibility or slowdown enabled. However, this can be confusing if no
message pops up
( https://steamcommunity.com/app/70300/discussions/0/3039355280230178910/ )
. So I've made it so that a text box will pop up when they get kicked
out.
2021-09-03 12:09:53 -07:00
Misa
a59e9d51db gamemode(teleporter): Set gamestate to GAMEMODE
This makes it so gamemode(teleporter) will always do an animation, even
if the game is already in TELEPORTERMODE.

I used this script to test:

    gamemode(teleporter)
    delay(5)
    gamemode(teleporter)
    delay(5)
    gamemode(teleporter)

In 2.2, this script starts the map menu bringing-up animation three
times.

In previous 2.3, this script starts the map menu bringing-up animation
once, but then the next gamemode(teleporter) immediately finishes the
animation, and the third gamemode(teleporter) does nothing.

This commit restores it to 2.2 behavior.
2021-09-02 12:29:55 -07:00
Misa
82971296c2 Prevent user-initiated map menu changes during menu animations
This makes it so it's not even possible to stay on the TELEPORTERMODE
screen by opening the map while it's being brought down. It also makes
it so the map animation is able to be canceled when being brought up
just by opening the map and closing it.

Fixes #833.
2021-09-02 12:29:55 -07:00
Misa
4ecec8a327 Call teleporterrenderfixed in TELEPORTERMODE
This restores it to 2.2 behavior, where the cutscene bars timer also
ticked in TELEPORTERMODE. It was a 2.3 regression that the cutscene bars
timer didn't tick there.

This makes it so if you manage to get stuck in TELEPORTERMODE when a
cutscene ends, the cutscene won't be stuck on untilbars() waiting for
the cutscene bars to go away, since the cutscene bars timer now ticks.
2021-09-02 12:29:55 -07:00
7 changed files with 41 additions and 9 deletions

View File

@@ -813,6 +813,10 @@ void Game::updatestate(void)
if (!map.custommode && nocompetitive())
{
returntolab();
startscript = true;
newscript = "disableaccessibility";
state = 0;
break;
}
@@ -6888,8 +6892,15 @@ void Game::unlockAchievement(const char *name) {
#endif
}
void Game::mapmenuchange(const int newgamestate)
void Game::mapmenuchange(const int newgamestate, const bool user_initiated)
{
if (user_initiated
&& graphics.menuoffset > 0
&& graphics.menuoffset < (map.extrarow ? 230 : 240))
{
return;
}
prevgamestate = gamestate;
gamestate = newgamestate;
graphics.resumegamemode = false;

View File

@@ -245,7 +245,7 @@ public:
int tapleft, tapright;
//Menu interaction stuff
void mapmenuchange(const int newgamestate);
void mapmenuchange(const int newgamestate, const bool user_initiated);
bool mapheld;
int menupage;
int lastsaved;

View File

@@ -2124,7 +2124,7 @@ void gameinput(void)
else if (game.companion == 0)
{
//Alright, normal teleporting
game.mapmenuchange(TELEPORTERMODE);
game.mapmenuchange(TELEPORTERMODE, true);
game.useteleporter = true;
game.initteleportermode();
@@ -2279,7 +2279,7 @@ void gameinput(void)
//quitting the super gravitron
game.mapheld = true;
//Quit menu, same conditions as in game menu
game.mapmenuchange(MAPMODE);
game.mapmenuchange(MAPMODE, true);
game.gamesaved = false;
game.gamesavefailed = false;
game.menupage = 20; // The Map Page
@@ -2299,7 +2299,7 @@ void gameinput(void)
else
{
//Normal map screen, do transition later
game.mapmenuchange(MAPMODE);
game.mapmenuchange(MAPMODE, true);
map.cursordelay = 0;
map.cursorstate = 0;
game.gamesaved = false;
@@ -2320,7 +2320,7 @@ void gameinput(void)
{
game.mapheld = true;
//Quit menu, same conditions as in game menu
game.mapmenuchange(MAPMODE);
game.mapmenuchange(MAPMODE, true);
game.gamesaved = false;
game.gamesavefailed = false;
game.menupage = 30; // Pause screen

View File

@@ -159,7 +159,7 @@ static void menurender(void)
#ifdef INTERIM_COMMIT
graphics.Print( 310 - (SDL_arraysize(INTERIM_COMMIT) - 1) * 8, 220, INTERIM_COMMIT, tr/2, tg/2, tb/2);
#endif
graphics.Print( 310 - (6*8), 230, "v2.3.1", tr/2, tg/2, tb/2);
graphics.Print( 310 - (6*8), 230, "v2.3.2", tr/2, tg/2, tb/2);
if(music.mmmmmm){
graphics.Print( 10, 230, "[MMMMMM Mod Installed]", tr/2, tg/2, tb/2);

View File

@@ -1349,7 +1349,8 @@ void scriptclass::run(void)
{
if (words[1] == "teleporter")
{
game.mapmenuchange(TELEPORTERMODE);
game.gamestate = GAMEMODE; /* to set prevgamestate */
game.mapmenuchange(TELEPORTERMODE, false);
game.useteleporter = false; //good heavens don't actually use it
}

View File

@@ -6724,6 +6724,26 @@ void scriptclass::load(const std::string& name)
};
filllines(lines);
}
else if (SDL_strcmp(t, "disableaccessibility") == 0)
{
static const char* lines[] = {
"cutscene()",
"untilbars()",
"squeak(terminal)",
"text(gray,0,114,3)",
"Please disable invincibility",
"and/or slowdown before entering",
"the Super Gravitron.",
"position(center)",
"speak",
"endtext",
"endcutscene()",
"untilbars()",
};
filllines(lines);
}
else
{
loadother(t);

View File

@@ -143,7 +143,7 @@ static const inline struct ImplFunc* get_gamestate_funcs(
FUNC_LIST_END
FUNC_LIST_BEGIN(TELEPORTERMODE)
{Func_fixed, maprenderfixed},
{Func_fixed, teleporterrenderfixed},
{Func_delta, teleporterrender},
{Func_input, teleportermodeinput},
{Func_fixed, maplogic},