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

Basic Implementation for Market #1

Merged
merged 8 commits into from Aug 13, 2019

Conversation

@darshan3
Copy link
Member

commented Jul 21, 2019

Project Cards:

  1. Marketplace [1]

How to test:

  1. Start a new game
  2. Press z to display the market hud.
  3. Hover over the items to see their preview.
  4. Click on the buy button to buy the item.
@@ -0,0 +1,11 @@
{

This comment has been minimized.

Copy link
@skaldarnar

skaldarnar Jul 31, 2019

Should this test prefab be in the repository? If we would like to have some basic content to showcase, maybe we could use some fun item, maybe a cheese wheel…

Or, demonstrate how we can use prefab extensions/overrides for existing items in Core, like the axe.

This comment has been minimized.

Copy link
@darshan3

darshan3 Aug 5, 2019

Author Member

How do I get free art and prefab for adding a new item?

This comment has been minimized.

Copy link
@skaldarnar

skaldarnar Aug 8, 2019

You can search for anything with a free license - for artwork some creative commons license is usually the way to go. There might also be something in some of the modules contributed by students during Google Code-in ...

What do you have in mind?

import org.terasology.world.block.items.AddToBlockBasedItem;

@AddToBlockBasedItem
public class PurchasableComponent implements Component {

This comment has been minimized.

Copy link
@skaldarnar

skaldarnar Jul 31, 2019

Is this supposed to contain more information later on, or is it just a marker component? Due to the annotation @AddToBlockBasedItem, is this for generic purchasable blocks and items, or just for blocks?

This comment has been minimized.

Copy link
@darshan3

darshan3 Aug 5, 2019

Author Member

Yes, it will contain information about what should be the 'purchasable item' purchased against. This component is for both blocks as well as prefab items. I am sceptical about the use-case of this annotation too. This annotation is used when you want the blocks to be detected with some component, right?

import java.util.ArrayList;
import java.util.List;

public class UIInteractionWrapper extends CoreWidget {

This comment has been minimized.

Copy link
@skaldarnar

skaldarnar Jul 31, 2019

Should this wrapper be provided by the engine?

This comment has been minimized.

Copy link
@darshan3

darshan3 Aug 5, 2019

Author Member

Yes, we can shift it to the engine. But it is not a generic implementation as it is quite specific for icons with a tooltip.

@iaronaraujo iaronaraujo requested a review from skaldarnar Aug 8, 2019

@jdrueckert

This comment has been minimized.

Copy link

commented Aug 8, 2019

Displaying the hud works perfectly fine and I also see the name of the item previewed when hovering over the item.
When clicking on the item, the item icon appears larger (unfortunately distorted) at the right side. If I then click on "Buy" nothing happens.
On checking the changes included in this PR this actually makes sense, as the "Buy" button doesn't seem to be "hooked" anywhere?

@jdrueckert jdrueckert self-requested a review Aug 8, 2019

"contents": [
{
"type": "UIButton",
"id": "buyButton",

This comment has been minimized.

Copy link
@jdrueckert

jdrueckert Aug 8, 2019

seems not to be hooked anywhere. buy doesn't work :(

This comment has been minimized.

Copy link
@jdrueckert

jdrueckert Aug 11, 2019

saw your comment on slack that you implemented the buying on a separate branch.
would be great if you could include that info in the PR description the next time to avoid expecting something different than what the PR actually brings ;)

"contents": [
{
"type": "UIButton",
"id": "buyButton",

This comment has been minimized.

Copy link
@jdrueckert

jdrueckert Aug 11, 2019

saw your comment on slack that you implemented the buying on a separate branch.
would be great if you could include that info in the PR description the next time to avoid expecting something different than what the PR actually brings ;)

@skaldarnar skaldarnar merged commit a3c982e into Terasology:master Aug 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.