- [CHG] Ja no se perden vides al jugar des de l'editor
- [NEW] Funcions per a obtindre el nom dels boosters, skills i parts, segons el seu numero - [NEW] El minimapa mostra on estàn els boosts, skills i parts - Més habitacions
This commit is contained in:
@@ -797,9 +797,12 @@ namespace actor
|
||||
vec3_t max = room::getMax();
|
||||
|
||||
if ( (act->push & PUSH_KILL) && (act->flags & FLAG_HERO) ) {
|
||||
const int lives = hero::getLives()-1;
|
||||
hero::setLives(lives);
|
||||
stats::loseLive();
|
||||
if (!editor::isDevMode())
|
||||
{
|
||||
const int lives = hero::getLives()-1;
|
||||
hero::setLives(lives);
|
||||
stats::loseLive();
|
||||
}
|
||||
// [TODO] If lives == 0 anar a la pantalla de game-over o cat's life
|
||||
actor_t *act = actor::find("HERO");
|
||||
act = actor::replaceWithTemplate(act, "EXPLOSION");
|
||||
@@ -1585,6 +1588,17 @@ namespace actor
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
const char *getBoosterName(int booster)
|
||||
{
|
||||
switch (booster)
|
||||
{
|
||||
case 1: return "RUN";
|
||||
case 2: return "GOD";
|
||||
case 4: return "JUMP";
|
||||
case 8: return "LIVE";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
bool giveBooster(char *booster)
|
||||
{
|
||||
@@ -1660,6 +1674,18 @@ namespace actor
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char *getSkillName(int skill)
|
||||
{
|
||||
switch (skill)
|
||||
{
|
||||
case 1: return "SHOES";
|
||||
case 2: return "GLOVES";
|
||||
case 4: return "PANTS";
|
||||
case 8: return "BAG";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
bool giveSkill(int skill)
|
||||
{
|
||||
skills |= skill;
|
||||
@@ -1705,6 +1731,20 @@ namespace actor
|
||||
return PART_NONE;
|
||||
}
|
||||
|
||||
const char *getPartName(int part)
|
||||
{
|
||||
switch (part)
|
||||
{
|
||||
case 1: return "FILTER";
|
||||
case 2: return "PUMP";
|
||||
case 4: return "TIMER";
|
||||
case 8: return "SALT";
|
||||
case 16: return "PIPE";
|
||||
case 32: return "ELBOW";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
bool pickPart(char *part)
|
||||
{
|
||||
const int value = getPartFromString(part);
|
||||
|
||||
Reference in New Issue
Block a user