From: Miloš Klouček Date: Mon, 9 Jun 2008 19:47:04 +0000 (+0000) Subject: Changed dispenser type "rocket-launcher" to "rocket_launcher" to make it implementabl... X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=a425329e44099af9e1f54050615d471de7c1491a;p=supertux.git Changed dispenser type "rocket-launcher" to "rocket_launcher" to make it implementable in editor. SVN-Revision: 5554 --- diff --git a/data/levels/test_old/direction.stl b/data/levels/test_old/direction.stl index 0f25b1ba0..cd7120c20 100644 --- a/data/levels/test_old/direction.stl +++ b/data/levels/test_old/direction.stl @@ -164,7 +164,7 @@ (y 128) ) (dispenser - (type "rocket-launcher") + (type "rocket_launcher") (badguy "mrrocket") (cycle 1) (direction "left") @@ -172,7 +172,7 @@ (y 996.4092) ) (dispenser - (type "rocket-launcher") + (type "rocket_launcher") (badguy "mrrocket") (cycle 1) (direction "right") diff --git a/data/levels/test_old/noloktest.stl b/data/levels/test_old/noloktest.stl index 1f458b1c9..0c192191d 100644 --- a/data/levels/test_old/noloktest.stl +++ b/data/levels/test_old/noloktest.stl @@ -49,7 +49,7 @@ (speed 0.5)) (spawnpoint (name "main2") (x 100) (y 100)) (secretarea (x 100) (y 100) (message "You found a secret area!")) - (dispenser (x 700) (y 500) (type "rocket-launcher") (badguy "mrrocket") (cycle 2)) + (dispenser (x 700) (y 500) (type "rocket_launcher") (badguy "mrrocket") (cycle 2)) (jumpy (x 500) (y 400)) (tilemap (z-pos -100) diff --git a/data/levels/world2/christoph9.stl b/data/levels/world2/christoph9.stl index 5add1411f..9b4ddd994 100644 --- a/data/levels/world2/christoph9.stl +++ b/data/levels/world2/christoph9.stl @@ -20,77 +20,77 @@ (cycle 3) (x 1824) (y 2348) - (type "rocket-launcher") + (type "rocket_launcher") (badguy "mrrocket") ) (dispenser (cycle 3) (x 4315.086) (y 588.6605) - (type "rocket-launcher") + (type "rocket_launcher") (badguy "mrrocket") ) (dispenser (cycle 3) (x 2844.737) (y 556.2125) - (type "rocket-launcher") + (type "rocket_launcher") (badguy "mrrocket") ) (dispenser (cycle 3) (x 5498.62) (y 1931.435) - (type "rocket-launcher") + (type "rocket_launcher") (badguy "mrrocket") ) (dispenser (cycle 4) (x 5499.327) (y 2347.921) - (type "rocket-launcher") + (type "rocket_launcher") (badguy "mrrocket") ) (dispenser (cycle 3) (x 1825.651) (y 1004.293) - (type "rocket-launcher") + (type "rocket_launcher") (badguy "mrrocket") ) (dispenser (cycle 4) (x 5499.327) (y 2571.367) - (type "rocket-launcher") + (type "rocket_launcher") (badguy "mrrocket") ) (dispenser (cycle 3) (x 5435.688) (y 1997.196) - (type "rocket-launcher") + (type "rocket_launcher") (badguy "mrrocket") ) (dispenser (cycle 3) (x 1849.266) (y 1932.47) - (type "rocket-launcher") + (type "rocket_launcher") (badguy "mrrocket") ) (dispenser (cycle 3) (x 1825.237) (y 1324.32) - (type "rocket-launcher") + (type "rocket_launcher") (badguy "mrrocket") ) (dispenser (cycle 3) (x 1825.944) (y 1164.807) - (type "rocket-launcher") + (type "rocket_launcher") (badguy "mrrocket") ) (firefly diff --git a/data/levels/world2/level2.stl b/data/levels/world2/level2.stl index 19757174c..b6c153fd0 100644 --- a/data/levels/world2/level2.stl +++ b/data/levels/world2/level2.stl @@ -22,7 +22,7 @@ (x 10239) (y 165) (direction left) - (type "rocket-launcher") + (type "rocket_launcher") (badguy "mrrocket") ) (door diff --git a/src/badguy/dispenser.cpp b/src/badguy/dispenser.cpp index d7c7b4eaf..81a1fa61c 100644 --- a/src/badguy/dispenser.cpp +++ b/src/badguy/dispenser.cpp @@ -42,7 +42,7 @@ Dispenser::Dispenser(const lisp::Lisp& reader) if (badguys.size() <= 0) throw std::runtime_error("No badguys in dispenser."); - if (type == "rocket-launcher") { + if (type == "rocket_launcher") { sprite->set_action(dir == LEFT ? "working-left" : "working-right"); set_colgroup_active(COLGROUP_MOVING); //if this were COLGROUP_MOVING_STATIC MrRocket would explode on launch. @@ -103,7 +103,7 @@ Dispenser::collision_squished(GameObject& object) { //Cannon launching MrRocket can be broken by jumping on it //other dispencers are not that fragile. - if (broken || type != "rocket-launcher") { + if (broken || type != "rocket_launcher") { return false; } @@ -204,7 +204,7 @@ Dispenser::launch_badguy() badguy_object = create_badguy_object(badguy, Vector(get_pos().x, get_pos().y+32), launchdir); else if (type == "cannon") badguy_object = create_badguy_object(badguy, Vector(get_pos().x + (launchdir == LEFT ? -32 : 32), get_pos().y), launchdir); - else if (type == "rocket-launcher") + else if (type == "rocket_launcher") badguy_object = create_badguy_object(badguy, Vector(get_pos().x + (launchdir == LEFT ? -32 : 32), get_pos().y), launchdir); if (badguy_object)