mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-02-07 13:31:40 +02:00
small update
This commit is contained in:
parent
1d5c0ba7f6
commit
dd454afcf4
@ -1,14 +1,14 @@
|
||||
-- Cave Miner -- mewmew made this --
|
||||
|
||||
require "modules.rocks_broken_paint_tiles"
|
||||
require "maps.cave_miner_kaboomsticks"
|
||||
require "modules.explosives"
|
||||
require "modules.satellite_score"
|
||||
require "modules.spawners_contain_biters"
|
||||
require "modules.biter_noms_you"
|
||||
require "modules.rpg"
|
||||
require "modules.hunger"
|
||||
|
||||
local enable_fishbank_terminal = false
|
||||
local enable_fishbank_terminal = true
|
||||
local simplex_noise = require 'utils.simplex_noise'
|
||||
local Event = require 'utils.event'
|
||||
local market_items = require "maps.cave_miner_market_items"
|
||||
@ -751,6 +751,13 @@ local function on_player_joined_game(event)
|
||||
player.teleport(p)
|
||||
surface.daytime = 0.5
|
||||
surface.freeze_daytime = 1
|
||||
surface.min_brightness = 0.3
|
||||
surface.brightness_visual_weights = {1, 1, 1}
|
||||
|
||||
global.explosion_cells_destructible_tiles = {
|
||||
["out-of-map"] = 2500,
|
||||
}
|
||||
|
||||
game.forces["player"].technologies["landfill"].enabled = false
|
||||
game.forces["player"].technologies["night-vision-equipment"].enabled = false
|
||||
game.forces["player"].technologies["artillery-shell-range-1"].enabled = false
|
||||
|
@ -95,7 +95,10 @@ function Public.tame_unit_for_closest_player(unit)
|
||||
end
|
||||
|
||||
local function command_unit(entity, player)
|
||||
if (player.position.x - entity.position.x) ^ 2 + (player.position.y - entity.position.y) ^ 2 < 256 then
|
||||
local square_distance = (player.position.x - entity.position.x) ^ 2 + (player.position.y - entity.position.y) ^ 2
|
||||
|
||||
--Pet will follow, if the player is between a distance of 8 to 160 tiles away from it.
|
||||
if square_distance < 64 or square_distance > 25600 then
|
||||
entity.set_command({type = defines.command.wander, distraction = defines.distraction.by_enemy})
|
||||
else
|
||||
entity.set_command({type = defines.command.go_to_location, destination_entity = player.character, radius = 4, distraction = defines.distraction.by_damage})
|
||||
|
Loading…
x
Reference in New Issue
Block a user