New Tiles & Improvements

This commit is contained in:
HamidReza 2021-08-28 22:21:38 +04:30
parent 009a951635
commit 3ca09259be
3 changed files with 122 additions and 36 deletions

View file

@ -2397,6 +2397,8 @@ void CEditor::DoMapEditor(CUIRect View)
m_pTooltip = Explain(EXPLANATION_DDNET, (int)wx / 32 + (int)wy / 32 * 16, Layer);
else if(m_SelectEntitiesImage == "FNG")
m_pTooltip = Explain(EXPLANATION_FNG, (int)wx / 32 + (int)wy / 32 * 16, Layer);
else if(m_SelectEntitiesImage == "Vanilla")
m_pTooltip = Explain(EXPLANATION_VANILLA, (int)wx / 32 + (int)wy / 32 * 16, Layer);
}
else if(m_Brush.IsEmpty())
m_pTooltip = "Use left mouse button to drag and create a brush. Hold shift to select multiple quads.";

View file

@ -1064,31 +1064,36 @@ public:
//Tile Numbers For Explanations - TODO: Add/Improve tiles and explanations
enum
{
TILE_FNG_AIR,
TILE_FNG_HOOKABLE,
TILE_FNG_DEATH,
TILE_FNG_UNHOOKABLE,
TILE_PUB_AIR,
TILE_PUB_HOOKABLE,
TILE_PUB_DEATH,
TILE_PUB_UNHOOKABLE,
TILE_PUB_CREDITS1 = 140,
TILE_PUB_CREDITS2,
TILE_PUB_CREDITS3,
TILE_PUB_CREDITS4,
TILE_PUB_CREDITS5 = 156,
TILE_PUB_CREDITS6,
TILE_PUB_CREDITS7,
TILE_PUB_CREDITS8,
TILE_PUB_ENTITIES_OFF1 = 190,
TILE_PUB_ENTITIES_OFF2,
};
enum
{
TILE_FNG_SPIKE_GOLD = 7,
TILE_FNG_SPIKE_NORMAL,
TILE_FNG_SPIKE_RED,
TILE_FNG_SPIKE_BLUE,
TILE_FNG_SCORE_RED,
TILE_FNG_SCORE_BLUE,
TILE_FNG_SPIKE_GREEN = 14,
TILE_FNG_SPIKE_PURPLE,
TILE_FNG_CREDITS1 = 140,
TILE_FNG_CREDITS2,
TILE_FNG_CREDITS3,
TILE_FNG_CREDITS4,
TILE_FNG_CREDITS5 = 156,
TILE_FNG_CREDITS6,
TILE_FNG_CREDITS7,
TILE_FNG_CREDITS8,
TILE_FNG_ENTITIES_OFF1 = 190,
TILE_FNG_ENTITIES_OFF2,
TILE_FNG_SPAWN = 192,
TILE_FNG_SPAWN_RED,
TILE_FNG_SPAWN_BLUE,
@ -1106,6 +1111,21 @@ public:
TILE_FNG_SPIKE_OLD3
};
enum
{
TILE_VANILLA_SPAWN = 192,
TILE_VANILLA_SPAWN_RED,
TILE_VANILLA_SPAWN_BLUE,
TILE_VANILLA_FLAG_RED,
TILE_VANILLA_FLAG_BLUE,
TILE_VANILLA_SHIELD,
TILE_VANILLA_HEART,
TILE_VANILLA_SHOTGUN,
TILE_VANILLA_GRENADE,
TILE_VANILLA_NINJA,
TILE_VANILLA_LASER,
};
//Explanations
enum
{

View file

@ -466,17 +466,17 @@ const char *CEditor::Explain(int ExplanationID, int Tile, int Layer) //TODO: Add
{
switch(Tile)
{
case TILE_FNG_AIR:
case TILE_PUB_AIR:
return "EMPTY: Can be used as an eraser.";
case TILE_FNG_HOOKABLE:
case TILE_PUB_HOOKABLE:
if(Layer == LAYER_GAME)
return "HOOKABLE: It's possible to hook and collide with it.";
break;
case TILE_FNG_DEATH:
case TILE_PUB_DEATH:
if(Layer == LAYER_GAME)
return "DEATH: Kills the tee.";
break;
case TILE_FNG_UNHOOKABLE:
case TILE_PUB_UNHOOKABLE:
if(Layer == LAYER_GAME)
return "UNHOOKABLE: It's not possible to hook it, but can collide with it.";
break;
@ -496,6 +496,14 @@ const char *CEditor::Explain(int ExplanationID, int Tile, int Layer) //TODO: Add
if(Layer == LAYER_GAME)
return "BLUE SPIKE: Blue team spikes. Gives negative points when killer is in red team (Amount of points given is set inside the server)";
break;
case TILE_FNG_SCORE_RED:
if(Layer == LAYER_GAME)
return "SCORE: Old tile used for showing red team score using laser text. No longer usable in FNG2";
break;
case TILE_FNG_SCORE_BLUE:
if(Layer == LAYER_GAME)
return "SCORE: Old tile used for showing blue team score using laser text. No longer usable in FNG2";
break;
case TILE_FNG_SPIKE_GREEN:
if(Layer == LAYER_GAME)
return "GREEN SPIKE: Kills the tee and gives points to the killer. (Amount of points given is set inside the server)";
@ -504,22 +512,6 @@ const char *CEditor::Explain(int ExplanationID, int Tile, int Layer) //TODO: Add
if(Layer == LAYER_GAME)
return "PURPLE SPIKE: Kills the tee and gives points to the killer. (Amount of points given is set inside the server)";
break;
case TILE_FNG_CREDITS1:
case TILE_FNG_CREDITS2:
case TILE_FNG_CREDITS3:
case TILE_FNG_CREDITS4:
case TILE_FNG_CREDITS5:
case TILE_FNG_CREDITS6:
case TILE_FNG_CREDITS7:
case TILE_FNG_CREDITS8:
if(Layer == LAYER_GAME)
return "CREDITS: Who designed the entities.";
break;
case TILE_FNG_ENTITIES_OFF1:
case TILE_FNG_ENTITIES_OFF2:
if(Layer == LAYER_GAME)
return "ENTITIES OFF SIGN: Informs people playing with entities about important marks, tips, information or text on the map.";
break;
case TILE_FNG_SPAWN:
if(Layer == LAYER_GAME)
return "SPAWN: Here tees will appear after joining the game or dying.";
@ -571,6 +563,78 @@ const char *CEditor::Explain(int ExplanationID, int Tile, int Layer) //TODO: Add
return "SPIKE: Old FNG spikes. Deprecated.";
break;
}
if((Tile >= TILE_PUB_CREDITS1 && Tile <= TILE_PUB_CREDITS8) && Layer == LAYER_GAME)
return "CREDITS: Who designed the entities.";
else if((Tile == TILE_PUB_ENTITIES_OFF1 || Tile == TILE_PUB_ENTITIES_OFF2) && Layer == LAYER_GAME)
return "ENTITIES OFF SIGN: Informs people playing with entities about important marks, tips, information or text on the map.";
}
else if(ExplanationID == EXPLANATION_VANILLA)
{
switch(Tile)
{
case TILE_PUB_AIR:
return "EMPTY: Can be used as an eraser.";
case TILE_PUB_HOOKABLE:
if(Layer == LAYER_GAME)
return "HOOKABLE: It's possible to hook and collide with it.";
break;
case TILE_PUB_DEATH:
if(Layer == LAYER_GAME)
return "DEATH: Kills the tee.";
break;
case TILE_PUB_UNHOOKABLE:
if(Layer == LAYER_GAME)
return "UNHOOKABLE: It's not possible to hook it, but can collide with it.";
break;
case TILE_VANILLA_SPAWN:
if(Layer == LAYER_GAME)
return "SPAWN: Here tees will appear after joining the game or dying.";
break;
case TILE_VANILLA_SPAWN_RED:
if(Layer == LAYER_GAME)
return "SPAWN: Red team members spawn here.";
break;
case TILE_VANILLA_SPAWN_BLUE:
if(Layer == LAYER_GAME)
return "SPAWN: Blue team members spawn here.";
break;
case TILE_VANILLA_FLAG_RED:
if(Layer == LAYER_GAME)
return "FLAG: Place where red team flag is.";
break;
case TILE_VANILLA_FLAG_BLUE:
if(Layer == LAYER_GAME)
return "FLAG: Place where blue team flag is.";
break;
case TILE_VANILLA_SHIELD:
if(Layer == LAYER_GAME)
return "SHIELD: Gives player +1 shield.";
break;
case TILE_VANILLA_HEART:
if(Layer == LAYER_GAME)
return "HEART: Gives player +1 health";
break;
case TILE_VANILLA_SHOTGUN:
if(Layer == LAYER_GAME)
return "SHOTGUN: Gives you shotgun weapon with 10 charges.";
break;
case TILE_VANILLA_GRENADE:
if(Layer == LAYER_GAME)
return "GRENADE: Gives you grenade weapon with 10 charges.";
break;
case TILE_VANILLA_NINJA:
if(Layer == LAYER_GAME)
return "NINJA: Gives you ninja for a period of time.";
break;
case TILE_VANILLA_LASER:
if(Layer == LAYER_GAME)
return "LASER: Gives you laser weapon with 10 charges.";
break;
}
if((Tile >= TILE_PUB_CREDITS1 && Tile <= TILE_PUB_CREDITS8) && Layer == LAYER_GAME)
return "CREDITS: Who designed the entities.";
else if((Tile == TILE_PUB_ENTITIES_OFF1 || Tile == TILE_PUB_ENTITIES_OFF2) && Layer == LAYER_GAME)
return "ENTITIES OFF SIGN: Informs people playing with entities about important marks, tips, information or text on the map.";
}
return "";
}