686 |
public: |
public: |
687 |
Bomb(const char *kind) : Item(kind), m_burning(false) {} |
Bomb(const char *kind) : Item(kind), m_burning(false) {} |
688 |
|
|
689 |
|
protected: |
690 |
|
virtual void message(const string &msg, const Value &) { |
691 |
|
if (msg == "ignite" || msg == "expl") |
692 |
|
burn(); |
693 |
|
else if (msg == "explode") |
694 |
|
explode(); |
695 |
|
} |
696 |
|
|
697 |
private: |
private: |
698 |
// Variables |
// Variables |
699 |
bool m_burning; |
bool m_burning; |
710 |
|
|
711 |
void animcb() { explode (); } |
void animcb() { explode (); } |
712 |
|
|
|
void message(const string &msg, const Value &) { |
|
|
if (msg == "ignite" || msg == "expl") |
|
|
burn(); |
|
|
else if (msg == "bombstone") { |
|
|
KillItem(get_pos()); |
|
|
} |
|
|
else if (msg == "explode") |
|
|
explode(); |
|
|
} |
|
|
|
|
713 |
bool on_laserhit(Direction) { |
bool on_laserhit(Direction) { |
714 |
explode(); |
explode(); |
715 |
return false; // block light |
return false; // block light |
758 |
play_sound("explosion1"); |
play_sound("explosion1"); |
759 |
SetItem(p, MakeItem("it-explosion3")); |
SetItem(p, MakeItem("it-explosion3")); |
760 |
} |
} |
761 |
|
void message(const string &msg, const Value &val) { |
762 |
|
if (msg == "bombstone") { |
763 |
|
KillItem(get_pos()); |
764 |
|
} |
765 |
|
Bomb::message(msg, val); |
766 |
|
} |
767 |
}; |
}; |
768 |
} |
} |
769 |
|
|
794 |
play_sound("explosion1"); |
play_sound("explosion1"); |
795 |
SetItem(p, MakeItem("it-explosion3")); |
SetItem(p, MakeItem("it-explosion3")); |
796 |
} |
} |
797 |
|
|
798 |
|
// WhiteBomb does not react on message "bombstone" in Oxyd1 |
799 |
}; |
}; |
800 |
} |
} |
801 |
|
|