Search found 6 matches
- Thu Dec 19, 2024 4:23 pm
- Forum: Modding help
- Topic: Get prototype name from LuaEntity
- Replies: 3
- Views: 155
Re: Get prototype name from LuaEntity
Is https://lua-api.factorio.com/latest/classes/LuaEntity.html#prototype what you're looking for? I though so at first, but it doesn't give me what I want. Example output, coming from the last_entity field of the event on_selected_entity_changed : entity.prototype.name: spidertron entity.prototype.o...
- Thu Dec 12, 2024 6:17 pm
- Forum: Modding help
- Topic: Get prototype name from LuaEntity
- Replies: 3
- Views: 155
Get prototype name from LuaEntity
Hi, In my mod I have access to a LuaEntity from an event in the control stage, which for this example let's say is a spider-vehicle. I'm trying to somehow access all the information about this entity, which can be found in the the runtime-api.json file in the docs. I've written a small script to ext...
- Fri Dec 06, 2024 6:53 pm
- Forum: Ideas and Suggestions
- Topic: External notifications / home automation integration
- Replies: 4
- Views: 2164
Re: External notifications / home automation integration
While not a native solution or not requiring an additional running process, I've developed an early mod that does this. It does require you to run a consumer process of generated json files, but it does enable you to do I think what you want. I'd really like feedback on this mod, if you please. :) h...
- Mon Dec 02, 2024 11:56 am
- Forum: Modding help
- Topic: Events for alerts?
- Replies: 1
- Views: 135
Re: Events for alerts?
Answering myself here. Entity damaged have their own event(s), so I solved it by listening to those. As to other alerts I'm currently checking LuaPlayer::get_alerts with script.on_nth_tick, which might not be optimal but works.
- Mon Dec 02, 2024 11:52 am
- Forum: Modding interface requests
- Topic: on_alert and on_custom_alert events
- Replies: 0
- Views: 81
on_alert and on_custom_alert events
Would it be possible to have events raised when new alerts are triggered?
Possibly:
Possibly:
- on_alert
- on_custom_alert
- Fri Nov 29, 2024 9:57 pm
- Forum: Modding help
- Topic: Events for alerts?
- Replies: 1
- Views: 135
Events for alerts?
Hi, I'm developing a add-on that's mostly based up reacting to when new alerts are triggered. These could be when a entity is damaged or when a custom alert from a programmable speaker triggers and alert. I've poured over the documentation but can't seem to find any events for these things. Am I mis...