1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2024-12-26 22:56:43 +02:00

mtn v3 - fix that spawning vSMG spawned a car also

This commit is contained in:
Gerkiz 2021-11-13 01:38:01 +01:00
parent f047ff98ed
commit f36c1eeb9f

View File

@ -689,7 +689,7 @@ local mining_events = {
'Enemy Compilatron'
},
{
function(entity, index)
function(entity)
local chest = 'crash-site-chest-' .. random(1, 2)
if entity.surface.can_place_entity({name = chest, position = entity.position, force = 'neutral'}) then
local container = entity.surface.create_entity({name = chest, position = entity.position, force = 'neutral'})
@ -698,13 +698,6 @@ local mining_events = {
container.health = random(1, container.health)
end
end
local position = entity.position
local surface = entity.surface
surface.create_entity({name = 'car', position = position, force = 'player'})
Public.unstuck_player(index)
local player = game.players[index]
local msg = ({'entity.found_car', player.name})
Alert.alert_player(player, 15, msg)
end,
64,
'VSMG'