Add joinable legacy code

This commit is contained in:
Cooldude2606
2024-09-23 23:01:52 +01:00
parent 2a1206c498
commit d24555d805
24 changed files with 144 additions and 126 deletions

View File

@@ -24,10 +24,10 @@ end)
local speech_bubble_async =
Async.register(function(data)
local message =
data.entity.surface.create_entity{
data.ent.surface.create_entity{
name = 'compi-speech-bubble',
text = messages[data.name][data.msg_number],
source = data.entity,
source = data.ent,
position = {0, 0},
}
@@ -88,8 +88,8 @@ end
-- @tparam string location the location tag that is in the config file
function Public.spawn_compilatron(surface, location)
local position = locations[location]
local pos = surface.find_non_colliding_position('compilatron', position, 1.5, 0.5)
local compi = surface.create_entity {name='compilatron', position=pos, force=game.forces.neutral}
local pos = surface.find_non_colliding_position('small-biter', position, 1.5, 0.5)
local compi = surface.create_entity {name='small-biter', position=pos, force=game.forces.neutral}
Public.add_compilatron(compi, location)
end