1553 |
init_model(); |
init_model(); |
1554 |
} |
} |
1555 |
} |
} |
1556 |
|
|
1557 |
|
bool on_laserhit(Direction) { |
1558 |
|
set_dir(reverse(get_dir())); |
1559 |
|
init_model(); |
1560 |
|
return false; |
1561 |
|
} |
1562 |
|
|
1563 |
void actor_inside(Actor *a) {SendMessage(a, "shatter");} |
void actor_inside(Actor *a) {SendMessage(a, "shatter");} |
1564 |
}; |
}; |
1565 |
} |
} |
1566 |
|
|
|
|
|
1567 |
//---------------------------------------- |
//---------------------------------------- |
1568 |
// PuzzleStones |
// PuzzleStones |
1569 |
//---------------------------------------- |
//---------------------------------------- |
2748 |
void actor_hit(const StoneContact &sc) { |
void actor_hit(const StoneContact &sc) { |
2749 |
stoneimpulse(); |
stoneimpulse(); |
2750 |
} |
} |
2751 |
|
|
2752 |
|
bool on_laserhit(Direction) { |
2753 |
|
stoneimpulse(); |
2754 |
|
return false; |
2755 |
|
} |
2756 |
|
|
2757 |
void message(const string &m, const Value &) { |
void message(const string &m, const Value &) { |
2758 |
if (m=="trigger" || m=="stoneimpulse") |
if (m=="trigger" || m=="stoneimpulse") |
2759 |
stoneimpulse(); |
stoneimpulse(); |
3224 |
} |
} |
3225 |
|
|
3226 |
//---------------------------------------- |
//---------------------------------------- |
3227 |
|
// Glass2_hole |
3228 |
|
//---------------------------------------- |
3229 |
|
namespace |
3230 |
|
{ |
3231 |
|
class Glass2_hole : public Stone { |
3232 |
|
CLONEOBJ(Glass2_hole); |
3233 |
|
public: |
3234 |
|
Glass2_hole() : Stone("st-glass2_hole") {} |
3235 |
|
StoneResponse collision_response(const StoneContact &sc) { |
3236 |
|
return STONE_PASS; |
3237 |
|
} |
3238 |
|
bool on_laserhit(Direction) { return true; } |
3239 |
|
}; |
3240 |
|
} |
3241 |
|
|
3242 |
|
//---------------------------------------- |
3243 |
// Black stones |
// Black stones |
3244 |
//---------------------------------------- |
//---------------------------------------- |
3245 |
namespace |
namespace |
3531 |
} |
} |
3532 |
|
|
3533 |
//---------------------------------------- |
//---------------------------------------- |
3534 |
|
// Glass2 |
3535 |
|
// |
3536 |
|
// Laser light may pass this stone, but actors may not. |
3537 |
|
//---------------------------------------- |
3538 |
|
namespace |
3539 |
|
{ |
3540 |
|
class Glass2 : public Stone { |
3541 |
|
CLONEOBJ(Glass2); |
3542 |
|
public: |
3543 |
|
Glass2() : Stone("st-glass2") {} |
3544 |
|
private: |
3545 |
|
bool on_laserhit(Direction dir) { return true; } |
3546 |
|
}; |
3547 |
|
} |
3548 |
|
|
3549 |
|
//---------------------------------------- |
3550 |
// MagicStone |
// MagicStone |
3551 |
//---------------------------------------- |
//---------------------------------------- |
3552 |
namespace |
namespace |
3803 |
add_templ(new GlassStone); |
add_templ(new GlassStone); |
3804 |
add_templ(new Glass1); |
add_templ(new Glass1); |
3805 |
add_templ(new Glass1_hole); |
add_templ(new Glass1_hole); |
3806 |
|
add_templ(new Glass2); |
3807 |
|
add_templ(new Glass2_hole); |
3808 |
add_templ(new Grate1); |
add_templ(new Grate1); |
3809 |
add_templ(new Grate2); |
add_templ(new Grate2); |
3810 |
add_templ(new HollowStoneImpulseStone); |
add_templ(new HollowStoneImpulseStone); |