Skip to content
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

Merged
merged 7 commits into from
Aug 31, 2021
Merged

feat: add luring behavior #86

merged 7 commits into from
Aug 31, 2021

Conversation

meetcshah19
Copy link
Member

@meetcshah19 meetcshah19 commented Aug 9, 2021

How to test:

  1. Spawn a sheep using: spawnPrefab sheep
  2. Give grass item when in the vicinity of the sheep and have it follow you.

Copy link
Member

@jdrueckert jdrueckert left a 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.

assets/prefabs/animals/sheepBase.prefab Outdated Show resolved Hide resolved
@BehaviorAction(name = "check_luring_item_in_use")
public class CheckLuringItemInUseAction extends BaseAction {

public static final String LURING_ITEM = "CoreAssets:Grass";
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member Author

@meetcshah19 meetcshah19 Aug 23, 2021

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.

Copy link
Member

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.

@keturn
Copy link
Contributor

keturn commented Aug 23, 2021

I tried this out a bit in game. It seemed like the sheep were following me even if I wasn't holding anything!

@jdrueckert jdrueckert changed the title Add luring behavior feat: add luring behavior Aug 31, 2021
@jdrueckert jdrueckert merged commit 1898855 into develop Aug 31, 2021
@jdrueckert jdrueckert deleted the add-luring-behavior branch August 31, 2021 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants