mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-08 00:39:30 +02:00
things
temporary particle disables; darkness for mountain fortress, can be toggled via darkness variable in main.lua
This commit is contained in:
parent
ebd9f4e329
commit
b7f0b38ff9
@ -32,7 +32,7 @@ function Public.entity_died(entity)
|
||||
for _, vector in pairs(vectors) do
|
||||
local tile = surface.get_tile({position.x + vector[1], position.y + vector[2]})
|
||||
if tile.collides_with("resource-layer") then
|
||||
create_particles(surface, tile.position)
|
||||
--create_particles(surface, tile.position)
|
||||
surface.set_tiles({{name = "landfill", position = tile.position}})
|
||||
end
|
||||
end
|
||||
|
@ -16,6 +16,12 @@ function Public.locomotive_spawn(surface, position)
|
||||
surface = surface, visible = true, only_in_alt_mode = false,
|
||||
})
|
||||
|
||||
rendering.draw_light({
|
||||
sprite = "utility/light_medium", scale = 5.5, intensity = 1, minimum_darkness = 0,
|
||||
oriented = true, color = {255,255,255}, target = global.locomotive_cargo,
|
||||
surface = surface, visible = true, only_in_alt_mode = false,
|
||||
})
|
||||
|
||||
global.locomotive.color = {0, 255, 0}
|
||||
global.locomotive.minable = false
|
||||
global.locomotive_cargo.minable = false
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
--enable / disable collapsing of the map
|
||||
local collapse_enabled = false
|
||||
local darkness = true
|
||||
|
||||
require "player_modifiers"
|
||||
require "functions.soft_reset"
|
||||
@ -85,8 +86,13 @@ function Public.reset_map()
|
||||
|
||||
local surface = game.surfaces[global.active_surface_index]
|
||||
|
||||
--surface.freeze_daytime = true
|
||||
--surface.daytime = 0.5
|
||||
if darkness then
|
||||
surface.min_brightness = 0
|
||||
surface.brightness_visual_weights = {1, 1, 1}
|
||||
surface.daytime = 0.5
|
||||
surface.freeze_daytime = true
|
||||
end
|
||||
|
||||
surface.request_to_generate_chunks({0,0}, 2)
|
||||
surface.force_generate_chunk_requests()
|
||||
|
||||
|
@ -111,7 +111,7 @@ local function on_player_mined_entity(event)
|
||||
local position = {x = entity.position.x, y = entity.position.y}
|
||||
|
||||
player.surface.create_entity({name = "flying-text", position = position, text = "+" .. count .. " [img=item/" .. ore .. "]", color = {r = 200, g = 160, b = 30}})
|
||||
create_particles(player.surface, particles[ore], position, 64, {x = player.position.x, y = player.position.y})
|
||||
--create_particles(player.surface, particles[ore], position, 64, {x = player.position.x, y = player.position.y})
|
||||
|
||||
entity.destroy()
|
||||
|
||||
@ -136,7 +136,7 @@ local function on_entity_died(event)
|
||||
local surface = entity.surface
|
||||
local ore = ore_raffle[math_random(1, #ore_raffle)]
|
||||
local pos = {entity.position.x, entity.position.y}
|
||||
create_particles(surface, particles[ore], pos, 16, false)
|
||||
--create_particles(surface, particles[ore], pos, 16, false)
|
||||
|
||||
if event.cause then
|
||||
if event.cause.valid then
|
||||
|
Loading…
Reference in New Issue
Block a user