I have a mod which uses get_circuit_connector_sprites(), which used to be defined all the time, but now is in a file in base. Short of duplicating this file, is there a way to require() a file from base?
Also, when just duplicating the code, the graphics get_circuit_connector_sprites() refers to, __base__/graphics/entity/circuit-connector/circuit-connector-main.png, does not exist according to Factorio. I really don't want to also duplicate graphics...
Any ideas on how I can reuse this handy function, and the associated connector graphics?
get_circuit_connector_sprites() from base
-
- Inserter
- Posts: 29
- Joined: Fri Nov 18, 2016 9:26 am
- Contact:
Re: get_circuit_connector_sprites() from base
Digging through base, it looks like "get_circuit_connector_sprites" changed to "circuit_connector_definitions[string].sprites"
No idea what the different definitions are, though, still looking...
No idea what the different definitions are, though, still looking...
Re: get_circuit_connector_sprites() from base
Looking through boblogistics code. I see this:
And it is referenced later using
Code: Select all
circuit_connector_definitions["bob-valve"] = circuit_connector_definitions.create(universal_connector_template,
{
{ variation = 2, main_offset = util.by_pixel(0, -12), shadow_offset = util.by_pixel(0, -12), show_shadow = true },
{ variation = 0, main_offset = util.by_pixel(0, -12), shadow_offset = util.by_pixel(0, -12), show_shadow = true },
{ variation = 6, main_offset = util.by_pixel(0, -12), shadow_offset = util.by_pixel(0, -12), show_shadow = true },
{ variation = 4, main_offset = util.by_pixel(0, -12), shadow_offset = util.by_pixel(0, -12), show_shadow = true },
}
)
Code: Select all
circuit_connector_sprites = circuit_connector_definitions["bob-valve"].sprites,