Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Actor#getInteractingEntity vs getTarget

Engineer
Joined
Jul 28, 2013
Messages
2,776
The api currently includes Actor#getInteractingEntity, I want to rename it to getTarget. Before I do this change I want feedback, and as much as possible. So please, express your opinions and feel free to add or debate anything in this list. I really want to get this method renamed, so if getTarget doesn't satisfy you, I'd like an alternative.

Pros
  • getTarget more accurately reflects that it's a one way interaction
  • It's primarily used for combat
  • It's short and easy to understand
Cons
  • getInteractingEntity more accurately reflects that it can also store the entity your talking to or trying to pick pocket
 
Joined
Nov 5, 2014
Messages
9
I don't see what the problem is with keeping it #getInteractingEntity?

1: You are calling getInteractingEntity on an Actor, anyone with half a brain would understand that it is an one way interaction (a player can be attacked by a npc but that doesn't mean the player is interacting with the npc)
2: Like you said at your cons there are multiple ways to utilize the method
3: What's difficult to understand about interacting entity?
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
I don't see what the problem is with keeping it #getInteractingEntity?

1: You are calling getInteractingEntity on an Actor, anyone with half a brain would understand that it is an one way interaction (a player can be attacked by a npc but that doesn't mean the player is interacting with the npc)
2: Like you said at your cons there are multiple ways to utilize the method
3: What's difficult to understand about interacting entity?
It's just not 100% accurate. We had a semi-heated skype discussion about it yesterday and we did a bunch of research to try to figure out exactly what words would be both accurate and common enough for simple usage. Things we considered were target, focus, fixation, and many variations. At the end the one that I'm preferring best is getTarget.
 
Top