Skip to content

Instantly share code, notes, and snippets.

View theRustyKnife's full-sized avatar

Rusty theRustyKnife

  • Prague, Czech Republic
View GitHub Profile
@theRustyKnife
theRustyKnife / recipe_locale.lua
Last active September 16, 2020 09:27
Factorio script for finding recipe locale in data stage
--[[
The following code is released under the MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@theRustyKnife
theRustyKnife / control.lua
Last active December 30, 2017 16:50
Factorio script for assemblers with unchangeable recipe
script.on_init(function()
global.open_assemblers = global.open_assemblers or {}
end)
script.on_event(defines.events.on_gui_opened, function(event)
if event.entity and event.entity.name == 'assembling-machine-3' then
global.open_assemblers[event.entity.unit_number] = global.open_assemblers[event.entity.unit_number] or {
entity = event.entity,
recipe = event.entity.get_recipe(),
players = {},