Search found 6 matches

by ThePlash
Thu Jun 06, 2019 10:56 pm
Forum: Modding help
Topic: How to draw a light only when target entity is powered
Replies: 2
Views: 868

Re: How to draw a light only when target entity is powered

eradicator wrote: ↑Thu Jun 06, 2019 4:42 pm Spawning extra lamps is way cheaper than on_tick scanning every roboport all the time just to see if it has power. Because that's the only thing you could do.
Just as i thought... i'll probably go the lamp entity way

Thanks
by ThePlash
Wed Jun 05, 2019 1:28 am
Forum: Modding help
Topic: How to draw a light only when target entity is powered
Replies: 2
Views: 868

How to draw a light only when target entity is powered

Hello! In my mod I'm adding a technology that makes roboports emit light during the night. To achieve this, I'm using rendering.draw_light() with minimum_darkness = 0.5 Now I need them to stop emitting light if they get disconnected from power. I'm already tracking the ID of the light associated wit...
by ThePlash
Tue Jun 04, 2019 4:40 am
Forum: Modding help
Topic: Accessing "ghost" circuit connections
Replies: 12
Views: 3449

Re: Accessing "ghost" circuit connections

Generally speaking events are just beurocratic notifications that something has already been done. None of the events can be canceled. The clean_cursor() is a nice hack to prevent the next event though, nice find! I bet i can use that myself somewhere. As all events happen immediately, the on_build...
by ThePlash
Mon Jun 03, 2019 1:48 am
Forum: Modding help
Topic: Accessing "ghost" circuit connections
Replies: 12
Views: 3449

Re: Accessing "ghost" circuit connections

Hm..the only problem with that is players trying to "revive" ghosts manually. If you're able to intercept it in time you can retain the circuits but get a "building failed" sound. If interception is too slow the connections are severed. That's actually what i've been working on ...
by ThePlash
Sun Jun 02, 2019 3:41 am
Forum: Modding help
Topic: Accessing "ghost" circuit connections
Replies: 12
Views: 3449

Re: Accessing "ghost" circuit connections

The info is currently not accessible from Lua. You should be able to work around your problem by making your entities fast-replaceable of each other and then instead of destroying the placeholder, fastreplacing it with your real entity. Thanks for the suggestion. I tried setting all roboport entiti...
by ThePlash
Sat Jun 01, 2019 7:38 am
Forum: Modding help
Topic: Accessing "ghost" circuit connections
Replies: 12
Views: 3449

Accessing "ghost" circuit connections

Hello! I'm the developer of the BetterBots mod https://mods.factorio.com/mod/BetterBots In my mod, I introduce some new technologies to empower roboports with added charge pads and electric energy flow for robots. All these new versions are actually new prototypes of type="roboport" becaus...

Go to advanced search