Author Topic: Recoding of Fill Can  (Read 1724 times)

The Fill Can is long overdue for an overhaul. The code itself is terribly formatted. The Max Filled Limit variable could be set to an RTB preference. There is similar code repeating which could be optimized. I think the actual searching system for same-colored bricks is overcomplicated.

As a start, this is what I put together for the RTB hook:
Note: I know I'm usually against promoting RTB for unrelated Add-Ons as if it were almost build in, but I do see the usefulness.
Code: [Select]
if(isFile("Add-Ons/System_ReturnToBlockland/server.cs")) {
if(!$RTB::RTBR_ServerControl_Hook)
exec("Add-Ons/System_ReturnToBlockland/RTBR_ServerControl_Hook.cs");
RTB_registerPref("Max Filled Bricks", "Fill Can", "FillCan::MaxBricks", "int 1 128000", "Tool_Fill_Can", 500, 0, 0);
}
else
$Pref::FillCan::MaxBricks = 500;

Edit: This is a example of confusing over-complication:

Code: [Select]
%list.obj[-1+%list.count++]=%target;
« Last Edit: March 20, 2011, 08:53:47 PM by MegaScientifical »

Har, took a look at the code.

Wooee! I'm not gonna touch that with a 12ft pole. Ima let someone who knows what they're doing handle it... :/

You have my mental support.

Why can't you do it Mega? Your a scripter.

i think i'd just leave it be for now :o

i think i'd just leave it be for now :o

Dupe needs recoding though...

Dupe needs recoding though...
Hm, yes, I'd like that more than having the fillcan being re-done.

Dupe needs recoding though...
more like needs fixing, maybe not a complete recoding

Why can't you do it Mega? Your a scripter.

Because no one likes me and usually someone finds better methods to do things than me. I haven't made something public in years because it's criticized justifiably every time. Especially for something like the Fill Can.

I saw repeating code for painting, FX, and shapeFX in the code. It can all be optimized.

Any takers? I thought I directed Zack here...

Bump. Yeah I'll look at this. I already have a Fill Wrench I completely forgot about.

Bump. Yeah I'll look at this. I already have a Fill Wrench I completely forgot about.

Fill wrench, lol.

Anyways, maybe these mods should be re-made altogether. The codes may just too big of a mess.

Fill wrench, lol.

Anyways, maybe these mods should be re-made altogether. The codes may just too big of a mess.

I don't like how it finds bricks to color. Seems like more processing than required. Then again, I'm not sure. But considering we now have bricks that don't perfectly fit into the units, it might be prudent to check this all works okay.

Bump. Yeah I'll look at this. I already have a Fill Wrench I completely forgot about.

Got anything? Just curious.

How about you take a break from looking though other people's mods and criticizing things which don't even affect the users of the mods.
If you wanted an rtb pref for max fill limit, just say so.