1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-13 08:13:37 +02:00

Add setactivitycolour(colour) and setactivitytext() commands

These commands will change the colour and text of the next
activity zone that gets spawned. `setactivitycolour` takes all
textbox colors, and `setactivitytext` will take the text on
the next line. These commands were designed this way
to avoid breaking forwards compatibility.
This commit is contained in:
AllyTally 2021-04-15 02:09:47 -03:00 committed by Misa Elizabeth Kai
parent 0685cade69
commit b15e25f106
3 changed files with 28 additions and 3 deletions

View File

@ -67,9 +67,11 @@ void entityclass::init(void)
upsetmode = false;
upset = 0;
customenemy=0;
customwarpmode=false; customwarpmodevon=false; customwarpmodehon=false;
trophytext = 0 ;
customenemy = 0;
customwarpmode = false; customwarpmodevon = false; customwarpmodehon = false;
customactivitycolour = "";
customactivitytext = "";
trophytext = 0;
oldtrophytext = 0;
trophytype = 0;
altstates = 0;
@ -1065,6 +1067,18 @@ void entityclass::createblock( int t, int xp, int yp, int w, int h, int trig /*=
break;
}
if (customactivitytext != "")
{
block.prompt = customactivitytext;
customactivitytext = "";
}
if (customactivitycolour != "")
{
block.setblockcolour(customactivitycolour);
customactivitycolour = "";
}
if (!reuse)
{
blocks.push_back(block);

View File

@ -193,6 +193,8 @@ public:
bool customwarpmode, customwarpmodevon, customwarpmodehon;
std::string customscript;
bool customcrewmoods[Game::numcrew];
std::string customactivitycolour;
std::string customactivitytext;
};
#ifndef OBJ_DEFINITION

View File

@ -1903,6 +1903,15 @@ void scriptclass::run(void)
obj.createblock(5, obj.entities[crewman].xp - 32, 0, 96, 240, i, "", (i == 35));
}
}
else if (words[0] == "setactivitycolour")
{
obj.customactivitycolour = words[1];
}
else if (words[0] == "setactivitytext")
{
position++;
obj.customactivitytext = commands[position];
}
else if (words[0] == "createrescuedcrew")
{
//special for final level cutscene