Page 1 of 1

How to set request_slot_count on a logistic-container?

Posted: Tue Feb 07, 2017 4:53 am
by thislooksfun
Hello, I'm trying to make a custom "logistic-container" entity, and I would like it to have more than the default 10 logistic request slots. I found the "request_slot_count" property, but it's read-only.
I then tried "request_slot_count = 20" in my "entity.lua" file, but nothing changed.

Is there some way of setting this property that I'm missing?

Thanks,
-tlf

Re: How to set request_slot_count on a logistic-container?

Posted: Tue Feb 07, 2017 5:35 am
by Rseding91
You can't change it runtime. It's a read-only property that's defined in the prototype.

Re: How to set request_slot_count on a logistic-container?

Posted: Tue Feb 07, 2017 3:57 pm
by thislooksfun
Yes, but how do I change it in the prototype? Like I said, I tried setting "request_slot_count = 20", but it didn't do anything.

Full prototype code:

Code: Select all

data:extend({
    {
        type = "logistic-container",
        name = "one-time-request-dummy-chest",
        icon = "__base__/graphics/icons/logistic-chest-requester.png",
        flags = {},
        max_health = 0,
        corpse = "small-remnants",
        collision_box = {{0, 0}, {0, 0}},
        selection_box = {{-0.25, -0.25}, {0.25, 0.25}},
        collision_mask = {"not-colliding-with-itself"},
        order = "z",
        inventory_size = 100,
        logistic_mode = "requester",
        request_slot_count = 20,
        picture =
        {
            filename = "__OneTimeRequest__/graphics/null.png",
            priority = "low",
            width = 1,
            height = 1,
            shift = {0, 0}
        },
        circuit_wire_max_distance = 0
    }
})

Re: How to set request_slot_count on a logistic-container?

Posted: Wed Feb 08, 2017 7:38 pm
by thislooksfun
Thanks to the IRC, I found the problem: the prototype key is "num_logistic_slots", not "request_slot_count".

Re: How to set request_slot_count on a logistic-container?

Posted: Thu Dec 21, 2017 6:36 pm
by myricaulus
I also hit the same problem, but i got still the same "Error while loading entity prototype "warehouse-requester" (logistic-container): A requester-type chest with zero request slots makes no sense.", although i now set num_logistic_slots = 10

Re: How to set request_slot_count on a logistic-container?

Posted: Thu Dec 21, 2017 7:04 pm
by Rseding91
myricaulus wrote:I also hit the same problem, but i got still the same "Error while loading entity prototype "warehouse-requester" (logistic-container): A requester-type chest with zero request slots makes no sense.", although i now set num_logistic_slots = 10
It's "logistic_slots_count" in 0.16.