Added a Gamemode for selling interfaces, as well as the base of the player/merchant interaction, related to issue #18
This commit is contained in:
@ -329,6 +329,12 @@ class Entity:
|
||||
"""
|
||||
return isinstance(self, FriendlyEntity)
|
||||
|
||||
def is_merchant(self) -> bool:
|
||||
"""
|
||||
Is this entity a merchant?
|
||||
"""
|
||||
return isinstance(self, Merchant)
|
||||
|
||||
@property
|
||||
def translated_name(self) -> str:
|
||||
return _(self.name.replace("_", " "))
|
||||
@ -459,7 +465,7 @@ class FriendlyEntity(FightingEntity):
|
||||
"""
|
||||
dialogue_option : list
|
||||
|
||||
def talk_to(self, player : Any) -> str:
|
||||
def talk_to(self, player : Any) -> str :
|
||||
a = randint(0,len(self.dialogue_option)-1)
|
||||
return "The "+self.name+" said : "+self.dialogue_option[a]
|
||||
|
||||
|
Reference in New Issue
Block a user