Advertisement
Guest User

DF linux: custom reaction reagent use

a guest
Sep 16th, 2012
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1.  
  2. for (i = 0; i < num_items; i++)
  3. {
  4. ridx = reagent_idx[i];
  5. sz = reagent_quantity[ridx]; // used quantity
  6. if (sz <= 0) continue;
  7. reag = this->reagent[ridx];
  8. if (reag->flags & PRESERVE_REAGENT) continue;
  9. rsz = items[i]->getTotalDimension();
  10. <<<<<<<<
  11. if (reag->flags3 & ANY_RAW_MATERIAL)
  12. rsz *= BASE_SIZE(items[i]->getType());
  13. if (items[i]->subtractDimension(rsz))
  14. ========
  15. if (reag->flags3 & ANY_RAW_MATERIAL)
  16. sz *= BASE_SIZE(items[i]->getType());
  17. if (items[i]->subtractDimension(sz))
  18. >>>>>>>>
  19. delete_item(items[i]);
  20. reagent_quantity[ridx] -= rsz
  21. if (reagent_quantity[ridx] < 0)
  22. reagent_quantity[ridx] = 0;
  23. }
  24.  
  25. You can use this script to apply the generated patch below:
  26. http://stalkr.net/files/ida/idadif.py
  27.  
  28. ----8<----
  29. This difference file is created by The Interactive Disassembler
  30.  
  31. Dwarf_Fortress
  32. 0087F7EF: F8 D8
  33. 0087F86F: F8 D8
  34. 0087F9AD: C7 C3
  35. 0087F9ED: C7 C3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement