Thanks for the reply but i meant to place an entity on another entity and still have both exist
i.e. to continue the tree and leaf example, have a tree, then without destroying or removing the tree, place an entity on the tree then (and this is irreverent) have the placed entity produce leafs.
The ...
Search found 6 matches
- Wed Sep 20, 2017 12:12 am
- Forum: Modding help
- Topic: Entity that is only placeable on another entity
- Replies: 7
- Views: 3171
- Sun Sep 17, 2017 7:13 pm
- Forum: Modding help
- Topic: Entity that is only placeable on another entity
- Replies: 7
- Views: 3171
Entity that is only placeable on another entity
Is there a way to make one entity be only placeable on a certain type of entity?
e.g. an entity that when placed on a tree produces leafs
Then if this is possible then could one have them interact?
e.g. an entity that when placed on an assembly machine adds 2 module slots
Thanks in advance
EDIT ...
e.g. an entity that when placed on a tree produces leafs
Then if this is possible then could one have them interact?
e.g. an entity that when placed on an assembly machine adds 2 module slots
Thanks in advance
EDIT ...
- Tue Sep 05, 2017 2:08 am
- Forum: Modding help
- Topic: Hooking a non-logistic entity up to the logistics network
- Replies: 13
- Views: 5234
Re: Hooking a non-logistic entity up to the logistics network
OK I think I can do that, is there an event that I could use that isn't on_tick as that would be pretty bad for ups?DaveMcW wrote:Not easily. The only way is to create a hidden logistic entity that requests coal (see defines.events.on_built_entity), then code to transfer it to your furnace.
- Tue Sep 05, 2017 1:43 am
- Forum: Modding help
- Topic: Hooking a non-logistic entity up to the logistics network
- Replies: 13
- Views: 5234
Re: Hooking a non-logistic entity up to the logistics network
/c
request_fuel = function(entity)
if not entity or entity.type ~= "furnace" then return end
local item = "coal"
local add_more = true
for fuel,amount in pairs(entity.get_inventory(defines.inventory.fuel).get_contents()) do
if amount < 10 then
item = fuel
else
add_more = false
end
end
if ...
request_fuel = function(entity)
if not entity or entity.type ~= "furnace" then return end
local item = "coal"
local add_more = true
for fuel,amount in pairs(entity.get_inventory(defines.inventory.fuel).get_contents()) do
if amount < 10 then
item = fuel
else
add_more = false
end
end
if ...
- Mon Sep 04, 2017 10:38 pm
- Forum: Modding help
- Topic: Hooking a non-logistic entity up to the logistics network
- Replies: 13
- Views: 5234
Hooking a non-logistic entity up to the logistics network
Lets say you have a regular burner furnace entity. How would one go about adding that to the logistics network as a requester, then having it always request 10 coal that would go into it's fuel and have the player be unable to modify this request.
Thanks in advance
Thanks in advance

- Sat Aug 26, 2017 2:56 am
- Forum: Modding help
- Topic: Items not appearing
- Replies: 1
- Views: 1143
Items not appearing
I am new to modding and this is what I have so far:
-- entity
local nuclearConstructionRobot = table.deepcopy(data.raw.item["construction-robot"])
nuclearConstructionRobot.name = "Nuclear-Construction-Robot";
nuclearConstructionRobot.icons = {
{
icon = nuclearConstructionRobot.icon,
tint = {r ...
-- entity
local nuclearConstructionRobot = table.deepcopy(data.raw.item["construction-robot"])
nuclearConstructionRobot.name = "Nuclear-Construction-Robot";
nuclearConstructionRobot.icons = {
{
icon = nuclearConstructionRobot.icon,
tint = {r ...