From 7d668e84fad9282efafa65e5fd5f219137297a6f Mon Sep 17 00:00:00 2001 From: iLPdev Date: Tue, 24 Oct 2023 17:29:40 -0700 Subject: [PATCH 1/2] fix(Lesson 7.1.2): :bug: correct prose and code example/result --- .../Part1/Beginner-Tutorial-Learning-Typeclasses.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/source/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Learning-Typeclasses.md b/docs/source/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Learning-Typeclasses.md index 61d4c866e2..e509e56e99 100644 --- a/docs/source/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Learning-Typeclasses.md +++ b/docs/source/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Learning-Typeclasses.md @@ -157,10 +157,11 @@ called `create_object`. Let's recreate Cuddly this time: Boom, Cuddly should now be in the room with you, a little less scary than Smaug. You specify the python-path to the code you want and then set the key and location (if you had the `Monster` class already imported, you could have passed that too). Evennia sets things up and saves for you. -If you want to find Smaug from anywhere (not just in the same room), you can use Evennia's `search_object` function: +If you want to find Cuddly from anywhere (not just in the same room), you can use Evennia's `search_object` function: - > cuddly = evennia.search_object("Cuddly")[0] ; cuddly.move_around() + > py cuddly = evennia.search_object("Cuddly")[0] ; cuddly.move_around() Cuddly is moving! + The world trembles. > The `[0]` is because `search_object` always returns a _list_ of zero, one or more found objects. The `[0]` means that we want the first element of this list (counting in Python always starts from 0). If there were multiple Cuddlies we could get the second one with `[1]`. From a45d4412457af64373c564608d2088fdaf8eb488 Mon Sep 17 00:00:00 2001 From: iLPdev Date: Tue, 24 Oct 2023 17:35:24 -0700 Subject: [PATCH 2/2] Hotfix: for resultant Cuddly movement in my this PR --- .../Part1/Beginner-Tutorial-Learning-Typeclasses.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/source/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Learning-Typeclasses.md b/docs/source/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Learning-Typeclasses.md index e509e56e99..a071cbbb05 100644 --- a/docs/source/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Learning-Typeclasses.md +++ b/docs/source/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Learning-Typeclasses.md @@ -161,7 +161,6 @@ If you want to find Cuddly from anywhere (not just in the same room), you can us > py cuddly = evennia.search_object("Cuddly")[0] ; cuddly.move_around() Cuddly is moving! - The world trembles. > The `[0]` is because `search_object` always returns a _list_ of zero, one or more found objects. The `[0]` means that we want the first element of this list (counting in Python always starts from 0). If there were multiple Cuddlies we could get the second one with `[1]`.