Gendustry

Gendustry

35M Downloads

Custom bees can't produce multiple custom drops

Stalkstalks opened this issue ยท 3 comments

commented

I have some custom bees that have more than one primary product that is a form of custom honey drop. When testing the master apiarist's database tells me that they only drop the first one found in the configuration file.

If I set the second drop as a "specialty" the bee drops both, but obviously that would be limited by the specialty nature, right?

I can set other items to be dropped as primary drops and they will. I'm going to guess that there is some code that prevents the same item from being included in a drop list multiple times, and it triggers for the custom honey drop item even if each instance is a different custom honey drop?

commented

Your bees work. Mine still do not. I'm not seeing the difference in our declarations.

While attempting to graft part of your config into my own to screw around and see if I came across the cause, I discovered something even stranger:
When I have the bee produce both your drops and the drops it is supposed to produce, it will drop the first of mine, and then all of yours, but it won't drop the second of mine! This seems to happen regardless of how the list is set up. This is the config for the bee as it is now:

if HaveForestryModule Bees <<
cfg Branches {
    cfg Neutron {
        UID = "Neutron"
        Parent = apidae
        Scientific = "Neutronium"
    }
}

cfg HoneyDrops {
    cfg t1 { ID = 150 PrimaryColor = 0xFF0000 SecondaryColor = 0xFF0000 }
    cfg deuterium { ID = 171 PrimaryColor = 0xFFAAAA SecondaryColor = 0xFF0000 }
    cfg t2 { ID = 151 PrimaryColor = 0x00FF00 SecondaryColor = 0x00FF00 }
    cfg tritium { ID = 172 PrimaryColor = 0xAAFFFF SecondaryColor = 0x00FFFF }
    cfg t3 { ID = 152 PrimaryColor = 0x0000FF SecondaryColor = 0x0000FF }
}


cfg Bees {
    cfg FusionBee {
        Dominant = No
        Glowing = Yes

        PrimaryColor = 0xFF0000
        SecondaryColor = 0x00FFFF

        Secret = No

        Humidity = Normal
        Temperature = Normal

        Nocturnal = No

        Binominal = Fusionem
        Authority = BindingForce

        Branch = "Neutron"

        Products = DropsList(                   // List of drops with chances
            45% S:gendustry:"HoneyDrop.deuterium"
            100% S:gendustry:"HoneyDrop.t1"      
            90% S:gendustry:"HoneyDrop.t2"      
            80% S:gendustry:"HoneyDrop.t3"      
            45% S:gendustry:"HoneyDrop.tritium"
        )
        Specialty = DropsList(
            45% S:gendustry:"HoneyDrop.tritium"
            45% S:gendustry:"HoneyDrop.deuterium"
            100% S:gendustry:"HoneyDrop.t1"      
            90% S:gendustry:"HoneyDrop.t2"      
            80% S:gendustry:"HoneyDrop.t3"      
        )                 

        cfg Traits {
            Base = "forestry.speciesForest"  
            Speed = "forestry.speedFastest"
            Lifespan = "forestry.lifespanLongest"
            Fertility = "forestry.fertilityMaximum"
            Temperature_Tolerance = "forestry.toleranceBoth5"
            Nocturnal = "forestry.boolTrue"    
            Humidity_Tolerance = "forestry.toleranceBoth5"
            Tolerant_Flyer = "forestry.boolTrue" 
            Cave_Dwelling = "forestry.boolTrue"
            Flower_Provider = "forestry.flowersEnd"
            Flowering = "forestry.floweringFastest"
            Territory = "forestry.territoryLargest"
            Effect = "forestry.effectExploration"
        }
    }
}

recipes {
    squeezer: S:gendustry:"HoneyDrop.deuterium", 10 cycles => 
        deuterium 50mb
    squeezer: S:gendustry:"HoneyDrop.tritium", 10 cycles =>
        tritium 50mb

    mutation: 10% "forestry.speciesIndustrious" + "forestry.speciesCommon" => "gendustry.bee.FusionBee" Req Block B:wool@1
}
commented

Can you show the config you are using?

I've tried this - https://gist.github.com/bdew/cba3ad6e94488e9a2020 - and it works correctly (all drops appear as products)

commented

The problem was an error in my code, that happened if multiple products had the same chance %

Should be fixed in this build - http://jenkins.bdew.net/job/gendustry-1.7.10/124/artifact/build/libs/gendustry-1.6.0.124-mc1.7.10.jar