Search found 8 matches
- Mon Oct 21, 2024 11:21 am
- Forum: News
- Topic: Factorio: Space Age is here!
- Replies: 123
- Views: 68445
Re: Factorio: Space Age is here!
Whoop whoop, here we go!!!!!
- Sat May 07, 2022 8:51 am
- Forum: Mods
- Topic: on_player_died not working with other mods
- Replies: 2
- Views: 1262
on_player_died not working with other mods
I have a small mod that write some evens to a file so that I can use it to post it to Discord (https://mods.factorio.com/mod/FactoriGOChatBot-companion)
One of the things is player death messages:
script.on_event(
defines.events.on_player_died,
function(event)
local player_index = event ...
One of the things is player death messages:
script.on_event(
defines.events.on_player_died,
function(event)
local player_index = event ...
- Thu Feb 10, 2022 6:37 pm
- Forum: Modding discussion
- Topic: LUA IDE with typehint support
- Replies: 6
- Views: 3032
Re: LUA IDE with typehint support
Ah great, support for IntelliJ (and most likely others from JetBrains). I will look into this the next time I change stuff for my plugin
- Sun Jan 30, 2022 11:25 am
- Forum: Modding discussion
- Topic: LUA IDE with typehint support
- Replies: 6
- Views: 3032
Re: LUA IDE with typehint support
Allright, I have it now setup with that plugin but for example this piece of code
script.on_event(defines.events.on_built_entity, function (event)
log_message(event.created_entity.name)
end)
The IDE still doesn't know the type of event (it is EventData) but I like to know the actual type ...
script.on_event(defines.events.on_built_entity, function (event)
log_message(event.created_entity.name)
end)
The IDE still doesn't know the type of event (it is EventData) but I like to know the actual type ...
- Sun Jan 30, 2022 11:05 am
- Forum: Modding discussion
- Topic: LUA IDE with typehint support
- Replies: 6
- Views: 3032
Re: LUA IDE with typehint support
Yes that was my problem with the extension I already found a couple of thins not listed there (probably due to it's age). I will take a look at your suggestion Bilka, thanks!
- Fri Jan 28, 2022 7:47 pm
- Forum: Modding discussion
- Topic: game.write_file not appending
- Replies: 2
- Views: 1138
Re: game.write_file not appending
Guess it has been a long day... thanks!
- Fri Jan 28, 2022 6:20 pm
- Forum: Modding discussion
- Topic: game.write_file not appending
- Replies: 2
- Views: 1138
game.write_file not appending
https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.write_file
write_file (filename, data, append, for_player)
So I have this piece of code:
local function log_message(msg)
msg = game.tick .. " " .. msg
game.write_file(baseFolder .. baseFile, "[FactorioChatBot ...
write_file (filename, data, append, for_player)
So I have this piece of code:
local function log_message(msg)
msg = game.tick .. " " .. msg
game.write_file(baseFolder .. baseFile, "[FactorioChatBot ...
- Fri Jan 28, 2022 3:48 pm
- Forum: Modding discussion
- Topic: LUA IDE with typehint support
- Replies: 6
- Views: 3032
LUA IDE with typehint support
Hi,
I'm a programmer (with no LUA experience) and I want to make a small mod for Factorio. One thing that I think makes life 100% better is using a good IDE with typing / autocomplete support. You don't want to spend tracing bugs and finding a typo like defines.events.on_research_fnished if your ...
I'm a programmer (with no LUA experience) and I want to make a small mod for Factorio. One thing that I think makes life 100% better is using a good IDE with typing / autocomplete support. You don't want to spend tracing bugs and finding a typo like defines.events.on_research_fnished if your ...