diff --git a/evennia/contrib/health_bar.py b/evennia/contrib/health_bar.py index c3d4af1c52..5ccfa1acbd 100644 --- a/evennia/contrib/health_bar.py +++ b/evennia/contrib/health_bar.py @@ -90,7 +90,7 @@ def display_meter(cur_value, max_value, # Pick which fill color to use based on how full the bar is fillcolor_index = (float(len(fill_color)) * percent_full) - fillcolor_index = int(round(fillcolor_index)) - 1 + fillcolor_index = max(0, int(round(fillcolor_index)) - 1) fillcolor_code = "|[" + fill_color[fillcolor_index] # Make color codes for empty bar portion and text_color diff --git a/evennia/contrib/tutorial_world/build.ev b/evennia/contrib/tutorial_world/build.ev index ce1bbe4bcf..0528400cc5 100644 --- a/evennia/contrib/tutorial_world/build.ev +++ b/evennia/contrib/tutorial_world/build.ev @@ -177,7 +177,7 @@ start # # This room inherits from a Typeclass called WeatherRoom. It regularly # and randomly shows some weather effects. Note how we can spread the -# command's arguments over more than one line for easy reading. we +# command's arguments over more than one line for easy reading. We # also make sure to create plenty of aliases for the room and # exits. Note the alias tut#02: this unique identifier can be used # later in the script to always find the way back to this room (for @@ -441,6 +441,11 @@ north # @lock barrel = get:false() # +# Players trying to pickup barrel will receive hint to 'get weapon' instead +# +@set barrel/get_err_msg = + The barkeep shakes his head. He says: 'Get weapon, not the barrel.' +# # This id makes sure that we cannot pick more than one weapon from this rack # @set barrel/rack_id = "rack_barrel" @@ -836,7 +841,7 @@ archway # # Set its home to this location # -@home ghost = tut#11 +@sethome ghost = tut#11 # @lock ghost = get:false() #