From 01d6eec0366b0d9860d51cece89f8bf95df2c8d6 Mon Sep 17 00:00:00 2001 From: Griatch Date: Sat, 15 Feb 2025 17:05:39 +0100 Subject: [PATCH] Fix bare hands in npc example. Resolve #3709 --- .../Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-NPCs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-NPCs.md b/docs/source/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-NPCs.md index bba390a9cd..b4a2be590f 100644 --- a/docs/source/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-NPCs.md +++ b/docs/source/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-NPCs.md @@ -27,7 +27,7 @@ from evennia import DefaultCharacter, AttributeProperty from .characters import LivingMixin from .enums import Ability - +from .objects import get_bare_hands class EvAdventureNPC(LivingMixin, DefaultCharacter): """Base class for NPCs""" @@ -40,7 +40,7 @@ class EvAdventureNPC(LivingMixin, DefaultCharacter): morale = AttributeProperty(default=9, autocreate=False) allegiance = AttributeProperty(default=Ability.ALLEGIANCE_HOSTILE, autocreate=False) - weapon = AttributeProperty(default=BARE_HANDS, autocreate=False) # instead of inventory + weapon = AttributeProperty(default=get_bare_hands, autocreate=False) # instead of inventory coins = AttributeProperty(default=1, autocreate=False) # coin loot is_idle = AttributeProperty(default=False, autocreate=False)