Patch for Hackmover, to remove container size limit.
Posted: Fri Nov 21, 2008 1:26 pm
Quick and small patch to make hack mover never show WON'T FIT.
It annoys me, and I've seen other people request it.
Very Important Note:
This also (inadvertently) removes the recursion check when putting one container in another, so you may break your game by e.g. accidentally putting a bag in a chest, the chest in basket, then the basket into the bag.
A better fix is possible, but I am too busy to address it right now.
This is untested, as I am unable to compile (even after reading all of the woefully out of date documents available, and searching forum), and do not have time to figure it out. Sorry.
Just thought I'd post this up in case anyone wants to run with it.
It annoys me, and I've seen other people request it.
Very Important Note:
This also (inadvertently) removes the recursion check when putting one container in another, so you may break your game by e.g. accidentally putting a bag in a chest, the chest in basket, then the basket into the bag.
Code: Select all
Index: drag.cc
===================================================================
--- drag.cc (revision 6003)
+++ drag.cc (working copy)
@@ -401,7 +401,7 @@
if (on_gump != gump) // Not moving within same gump?
possible_theft = true;
// Add, and allow to combine.
- if (!on_gump->add(to_drop, x, y, paintx, painty, false, true))
+ if (!on_gump->add(to_drop, x, y, paintx, painty, cheat.in_hack_mover() , true))
{ // Failed.
if (to_drop != obj)
{ // Watch for partial drop.
This is untested, as I am unable to compile (even after reading all of the woefully out of date documents available, and searching forum), and do not have time to figure it out. Sorry.
Just thought I'd post this up in case anyone wants to run with it.