Larger Lamps 2.0


2x2 lamps that cast a wide, soft glow: an electric lamp that is signal compatible, a copper lamp that burns solid fuel, and a floor lamp panel that can be walked over.

Content
23 days ago
2.0
722
Circuit network

b [AAI] No Set Producer

30 days ago

Genuinely appreciate the support for AAI Industry's glass that was added! At the moment though, they aren't possible to be crafted with AAI Industry enabled; they cannot be crafted in-hand, and they don't show up in the list of recipes in assembling machines. From what I can tell, this is because there is no set object for them to be made in, neither assemblers nor the engineer.

Here is what the vanilla lamp states it can be made in: https://imgur.com/3NHW3q5
Here is what the Large Lamp (and other lamps added by this mod) have in that space: https://imgur.com/6oW5kQG

30 days ago

crap i never tested that, wil look at it later this week:)

30 days ago

No worries, and appreciate the support!

30 days ago
(updated 30 days ago)

No worries, and appreciate the support!

i got it mostly working already but the code for it is.. lets say messy

26 days ago
(updated 26 days ago)

got a new code idea i will test this after work

local DLL = require("prototypes.globals")

-- Check if AAI Industrial mod is present
if mods["aai-industries"] then
    -- Modify Large Lamp Recipe for AAI
    if data.raw["recipe"][DLL.name] then
        data.raw["recipe"][DLL.name].category = "basic-crafting" -- Ensure it matches AAI crafting machines
        data.raw["recipe"][DLL.name].ingredients = {
            { type = "item", name = "copper-plate", amount = 6 },
            { type = "item", name = "glass", amount = 2 }, -- AAI material
            { type = "item", name = "electronic-circuit", amount = 2 },
            { type = "item", name = "stone-tablet", amount = 6 } -- AAI material
        }
        data.raw["recipe"][DLL.name].enabled = false -- Require research if needed
    end

    -- Modify Copper Lamp Recipe for AAI
    if data.raw["recipe"][DLL.copper_name] then
        data.raw["recipe"][DLL.copper_name].category = "basic-crafting"
        data.raw["recipe"][DLL.copper_name].ingredients = {
            { type = "item", name = "copper-plate", amount = 6 },
            { type = "item", name = "glass", amount = 2 },
            { type = "item", name = "stone-tablet", amount = 6 }
        }
        data.raw["recipe"][DLL.copper_name].enabled = false
    end

    -- Modify Electric Copper Lamp Recipe for AAI
    if data.raw["recipe"][DLL.electric_copper_name] then
        data.raw["recipe"][DLL.electric_copper_name].category = "basic-crafting"
        data.raw["recipe"][DLL.electric_copper_name].ingredients = {
            { type = "item", name = "copper-plate", amount = 8 },
            { type = "item", name = "glass", amount = 4 },
            { type = "item", name = "stone-tablet", amount = 8 },
            { type = "item", name = "electronic-circuit", amount = 4 }
        }
        data.raw["recipe"][DLL.electric_copper_name].enabled = false
    end
end
26 days ago
(updated 26 days ago)

I got it working with the modified assembling machines, but somehow I cannot get the new recipe items working with it. So either somebody tells me what I did wrong and write the code for me or just accept it, it works…

23 days ago

got this error when trying to install a mod

Error while running setup for entity prototype "deadlock-copper-lamp" (assembling-machine): next_upgrade target (deadlock-large-lamp) must have the same collision mask.

is this the same error?

23 days ago

just checked in a old 3 years old post and someone said this :

Hello, I think I fixed the issue. I have no experience in modding Factorio, but am good at searching around and troubleshooting issues. It looks like a simple line change in LargerLamps fixes everything.

I searched entity.lua in the Larger Lamp mod file and searched for "copper_name" in order to find the "deadlock-copper-lamp" strings, globals.lua has the variable defined differently there.

I then changed the line "next_upgrade = DLL.name" to "next_upgrade = DLL.copper_name". Looks like a simple typo to me!

i confirm. this work....

23 days ago

Yea, that makes sense, what mod did you had the issue with, though ?

23 days ago
(updated 23 days ago)

it was with Maraxsis ( in beta ), im testing this one to help the dev :)

was not able to run with larger lamp enabled.

The old post was for hovercrafts :

https://mods.factorio.com/mod/Hovercrafts/discussion/5fc6652b079dc087a5cf6791

mod is working well with this one right now but this fixed my error with Maraxsis mod

https://mods.factorio.com/mod/maraxsis

(this one will become big someday! :P)

23 days ago
(updated 23 days ago)

Yea its easier

The workaround of changing next_upgrade = DLL.name to next_upgrade = DLL.copper_name helps because it aligns the variable reference correctly, preventing errors caused by mismatches. , i added it to my version update in 1 + hours :)

still NO idea why AAI recipe items are ignored though :) if AAI is detected

This thread has been locked.