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

No stacking of crafting goes_bad consumables #66

Open
ashlander opened this issue Jan 12, 2013 · 1 comment
Open

No stacking of crafting goes_bad consumables #66

ashlander opened this issue Jan 12, 2013 · 1 comment

Comments

@ashlander
Copy link

After coocking some meat, i got used several inventory letters for each coocked meat
Game has stacks limit, so owning "Hoarder" makes each letter real value.

Made changes for myself.

git rev-parse HEAD
16331bb

diff --git a/item.cpp b/item.cpp
index 140d474..b2c4350 100644
--- a/item.cpp
+++ b/item.cpp
@@ -167,10 +167,12 @@ bool item::invlet_is_okay()

 bool item::stacks_with(item rhs)
 {
+ bool iscrafting = (goes_bad() && abs(bday - rhs.bday) < 200); // 20 min for crafting
+
  bool stacks = (type   == rhs.type   && damage  == rhs.damage  &&
                 active == rhs.active && charges == rhs.charges &&
                 contents.size() == rhs.contents.size() &&
-                (!goes_bad() || bday == rhs.bday));
+                (!goes_bad() || bday == rhs.bday || iscrafting));

  if ((corpse == NULL && rhs.corpse != NULL) ||
      (corpse != NULL && rhs.corpse == NULL)   )
@ashlander
Copy link
Author

Have read forums, life is out there :). But really good work and good game.

kevingranade added a commit to kevingranade/Cataclysm that referenced this issue Feb 20, 2013
Update: Item list, press I to compare with inventory
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

No branches or pull requests

1 participant