Sign in to follow this  
Sklo:D

Dirty Bulk code issue

Recommended Posts

                int countForMe = 0;
                for (final Item i : moveTargetContainer.getItemsAsArray()) {
                    if (i.getRealTemplateId() == sourceTemplateID && i.getData1() == source.getData1() && i.getData2() == source.getData2() && i.getAuxData() == sourceAuxByte && i.getMaterial() == sourceMaterialByte) {
                        tempItem = i;
                        ++countForMe;
                    }
                }
                if (countForMe > 1) {
                    performer.getCommunicator().sendAlertServerMessage("ERROR: Found more than one item of matching parameters, aborting.");
                    if (Servers.localServer.testServer) {
                        performer.getCommunicator().sendNormalServerMessage("Counter = " + countForMe);
                    }
                    return true;
                }

 

 

Even dirtier as dirt, does not make any sense at all, why is this here????? Remove it....

Share this post


Link to post
Share on other sites
5 hours ago, Sklo:D said:

                int countForMe = 0;
                for (final Item i : moveTargetContainer.getItemsAsArray()) {
                    if (i.getRealTemplateId() == sourceTemplateID && i.getData1() == source.getData1() && i.getData2() == source.getData2() && i.getAuxData() == sourceAuxByte && i.getMaterial() == sourceMaterialByte) {
                        tempItem = i;
                        ++countForMe;
                    }
                }
                if (countForMe > 1) {
                    performer.getCommunicator().sendAlertServerMessage("ERROR: Found more than one item of matching parameters, aborting.");
                    if (Servers.localServer.testServer) {
                        performer.getCommunicator().sendNormalServerMessage("Counter = " + countForMe);
                    }
                    return true;
                }

 

 

Even dirtier as dirt, does not make any sense at all, why is this here????? Remove it....

 

???

Share this post


Link to post
Share on other sites
4 hours ago, Budda said:

 

???

 

???

Why do you want to punish me that hard? Just remove that pls, it is absolutly useless, triggering problems which aren't real problems. If there are more than one bulk item in the bulk already then just add to the last or first one, who would care? You are breaking so many things just because of such half-dead thoughtless code.

Edited by Sklo:D

Share this post


Link to post
Share on other sites

What issue is it causing for you? Perhaps explaining what issues it's causing might help a little 

Share this post


Link to post
Share on other sites
1 hour ago, Retrograde said:

What issue is it causing for you? Perhaps explaining what issues it's causing might help a little 

 

It is competly useless code preventing mods like the bulk item sort mod to work. Just a huge punishment for all modders. Disabling the red parts does not change anything.

Software quality assurance is a big part of my education at a technical university, I am just telling you what I see and learnt.

 

Edited by Sklo:D

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this