This commit is contained in:
phidias committed 2026-06-29 18:50:47 +09:00
1 parent 8cd63909c0
commit 85955f8399
4 files changed
+90 -1

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
local main = {}
function main.build(event)
if event.entity.type ~= 'loader-1x1' then
return
end
if prototypes.entity['loader-1x1'] then
local p = event.entity.surface.create_entity{name = 'loader-1x1', position = {event.entity.position.x, event.entity.position.y}, force = 'neutral', quality = event.entity.quality.name}
p.destructible = false
end
end
function main.destroy(event)
if event.entity.type ~= 'loader-1x1' then
return
end
if prototypes.entity['loader-1x1'] then
local p = event.entity.surface.find_entity({name = 'loader-1x1', force = 'neutral', quality = event.entity.quality.name}, {event.entity.position.x, event.entity.position.y})
if p then
p.destroy()
end
end
end
return main