Thanks!
Sadly there is no event that fires when robots change the beacon inventory.
Replacing Beacons with Overclocking Stations - possible?
Re: Replacing Beacons with Overclocking Stations - possible?
I managed to solve the problem with proxies, thanks to viewtopic.php?f=28&t=102415
The first version of my mod that i would describe as "working" can now be tested
Note:
It is only very roughly balanced to give you similar/slightly lower production output per area of your factory compared to full beacon setups, which means you need more assembly machines because OCS take up way less space than beacons.
The first version of my mod that i would describe as "working" can now be tested
Note:
It is only very roughly balanced to give you similar/slightly lower production output per area of your factory compared to full beacon setups, which means you need more assembly machines because OCS take up way less space than beacons.
Re: Replacing Beacons with Overclocking Stations - possible?
It would lead to a destruction of an 'item-request-proxy'. Unfortunately the only way to know when they're made from blueprints is if the entity in the blueprint had some... Not sure where that is. entity.item_requests will produce them if used on a ghost. The item-proxy would be registered for destruction via script.register_on_entity_destroyed.
There may be a much more convenient way that needs a data-stage change:
Code: Select all
created_effect :: Trigger (optional)
I have mods! I guess!
Link
Link
Re: Replacing Beacons with Overclocking Stations - possible?
I think my solution (which i picked up from some other factorio discussion) is kind of easier, maybe less robust:Unfortunately the only way to know when they're made from blueprints is if the entity in the blueprint had some... Not sure where that is.
I simply check the positon of the becaon entity when it gets placed by a robot for any item-request-proxies.
See: https://github.com/Katharsas/Overclocki ... l.lua#L372
Another question:
Is it possible to tell the beacon entity to render spilled items over it instead of under it?
I allowed items to overlap with:
Code: Select all
collision_mask = {"water-tile"},
Code: Select all
render_layer = "ground-tile",
Re: Replacing Beacons with Overclocking Stations - possible?
Ok i managed to solve this problem by using animation_list with a single layer / render_layer instead of base_picture. So instead of:
Code: Select all
render_layer = "floor-mechanics",
base_picture = {
filename = "__ocs__/graphics/my-beacon-h.png",
... (picture size etc) ...
},
Code: Select all
animation_list = {
{
always_draw = true,
render_layer = "floor-mechanics",
animation = {
layers = {
{
filename = "__ocs__/graphics/my-beacon-h.png",
... (picture size etc) ...
So, my next question is:
So it seems like it is possible to define lights and animations, but can i change the displayed animations of the entity based on my own lua code?
I need different parts of my entity to have lights on/off based on which sides are connected to other entities. Basically, i want all 4 sides of the graphic to have a small lamp which turns on when that side is connected to a crafting machine.
Edit: I think that LuaRendering::draw_animation is what i am looking for.