-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add luring behavior #86
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a unit test for the modify
method should be relatively easy to do and would help to check how the method behaves properly even given unexpected inputs.
@BehaviorAction(name = "check_luring_item_in_use") | ||
public class CheckLuringItemInUseAction extends BaseAction { | ||
|
||
public static final String LURING_ITEM = "CoreAssets:Grass"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually the grass (+dirt) block. The grass decoration I would understand (although in JS I think any decoration turns into plant matter. However, using plant matter is only available in JS I think.
Proposal: Use grass / flower decorations as valid luring items and adjust JS to not drop plant matter for flowers at least (might be nice to be able to collect and place flowers for decorative reasons anyway). Or even better, drop plant matter with a high probability and in all other cases the respective item.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to make a proper exhaustive list of items that can be used for luring, given that this is in WildAnimals and will be used by a lot of modules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am changing single item to a list for now till we decide on the exact list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would go for a few of these: https://github.com/Terasology/CoreAssets/tree/develop/assets/blocks/flora
At least the three tall grass blocks, maybe some of the flowers?
Take care that you need to adjust the drop override that brings in plant matter as suggested above, otherwise it's not possible to get tall grass or flowers in-game.
src/main/java/org/terasology/wildAnimals/actions/CheckLuringItemInUseAction.java
Show resolved
Hide resolved
src/main/java/org/terasology/wildAnimals/actions/CheckLuringItemInUseAction.java
Show resolved
Hide resolved
src/main/java/org/terasology/wildAnimals/actions/CheckLuringItemInUseAction.java
Show resolved
Hide resolved
I tried this out a bit in game. It seemed like the sheep were following me even if I wasn't holding anything! |
How to test:
spawnPrefab sheep