Skip to content

Commit

Permalink
Revert "Make coupon item stackable" until test is fixed
Browse files Browse the repository at this point in the history
This reverts commit f0a8054.
  • Loading branch information
AntumDeluge committed Oct 16, 2023
1 parent f0a8054 commit 7de145d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
4 changes: 3 additions & 1 deletion data/conf/items/documents.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
<item name="coupon">
<type class="documents" subclass="coupon" tileid="-1"/>
<description>You see a coupon.</description>
<implementation class-name="games.stendhal.server.entity.item.StackableItem"/>
<!-- FIXME: `games.stendhal.server.entity.item.ItemTest` copy constructor test fails -->
<!--<implementation class-name="games.stendhal.server.entity.item.StackableItem"/>-->
<implementation class-name="games.stendhal.server.entity.item.Item"/>
<attributes>
</attributes>
<weight value="0.01"/>
Expand Down
1 change: 0 additions & 1 deletion doc/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Changelog
- Nation Crusher: Finish Kill Bordroughs quest 250 times
- Semos's Ruler: Finish daily monster quest 1,000 times
- seeds & bulbs items have unique images
- made coupon item stackable


1.44
Expand Down
3 changes: 2 additions & 1 deletion src/games/stendhal/client/entity/factory/EntityMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ private static void register() {
register("item", "jewellery", null, StackableItem.class);

register("item", "token", null, Item.class);
register("item", "documents", "coupon", StackableItem.class);
// FIXME: `games.stendhal.server.entity.item.ItemTest` copy constructor test fails
//~ register("item", "documents", "coupon", StackableItem.class);

register("portal", null, null, Portal.class);
register("house_portal", null, null, HousePortal.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ private static void configure() {
register("item", "ammunition", null, StackableItem2DView.class);
register("item", "container", null, StackableItem2DView.class);
register("item", "special", null, StackableItem2DView.class);
register("item", "documents", "coupon", StackableItem2DView.class);
// FIXME: `games.stendhal.server.entity.item.ItemTest` copy constructor test fails
//~ register("item", "documents", "coupon", StackableItem2DView.class);

register("item", "club", "wizard_staff", UseableItem2DView.class);
register("item", "misc", "seed", UseableItem2DView.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* $Id$ */
/***************************************************************************
* (C) Copyright 2003-2010 - Stendhal *
* (C) Copyright 2003-2023 - Stendhal *
***************************************************************************
***************************************************************************
* *
Expand Down Expand Up @@ -58,7 +58,7 @@ public final void testCreate() {

assertEquals(EntityViewFactory.getViewClass("area", null, null), InvisibleEntity2DView.class);

assertEquals(EntityViewFactory.getViewClass("item", "special", "mithril clasp"), Item2DView.class);
assertEquals(EntityViewFactory.getViewClass("item", "special", "mithril clasp"), Item2DView.class);
assertEquals(EntityViewFactory.getViewClass("item", "crystal", null), Item2DView.class);
assertEquals(EntityViewFactory.getViewClass("item", null, null), Item2DView.class);
assertEquals(EntityViewFactory.getViewClass("npc", null, null), NPC2DView.class);
Expand Down Expand Up @@ -90,11 +90,13 @@ public final void testCreate() {
assertEquals(EntityViewFactory.getViewClass("item", "missile", null), StackableItem2DView.class);
assertEquals(EntityViewFactory.getViewClass("item", "ammunition", null), StackableItem2DView.class);
assertEquals(EntityViewFactory.getViewClass("item", "container", null), StackableItem2DView.class);
assertEquals(EntityViewFactory.getViewClass("item", "special", null), StackableItem2DView.class);
// FIXME: `games.stendhal.server.entity.item.ItemTest` copy constructor test fails
//~ assertEquals(EntityViewFactory.getViewClass("item", "documents", "coupon"), StackableItem2DView.class);
assertEquals(EntityViewFactory.getViewClass("item", "special", null), StackableItem2DView.class);


assertEquals(EntityViewFactory.getViewClass("item", "club", "wizard_staff"), UseableItem2DView.class);
assertEquals(EntityViewFactory.getViewClass("item", "misc", "seed"), UseableItem2DView.class);
assertEquals(EntityViewFactory.getViewClass("item", "misc", "seed"), UseableItem2DView.class);

assertEquals(EntityViewFactory.getViewClass("item", "scroll", null), UseableItem2DView.class);

Expand Down

0 comments on commit 7de145d

Please sign in to comment.