mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-02-09 13:37:02 +02:00
pirates: port names of rocks
This commit is contained in:
parent
510cececb3
commit
0abc7947ca
@ -555,7 +555,7 @@ local function handle_maze_walls_damage_resistance(event)
|
||||
|
||||
if destination.surface_name ~= entity.surface.name then return end
|
||||
|
||||
if not ((entity.type and entity.type == 'tree') or entity.name == 'rock-huge' or entity.name == 'rock-big' or entity.name == 'sand-rock-big') then return end
|
||||
if not ((entity.type and entity.type == 'tree') or entity.name == 'huge-rock' or entity.name == 'big-rock' or entity.name == 'big-sand-rock') then return end
|
||||
|
||||
if (event.damage_type.name and (event.damage_type.name == 'explosion' or event.damage_type.name == 'poison')) then
|
||||
event.entity.health = event.entity.health + event.final_damage_amount
|
||||
@ -737,7 +737,7 @@ end
|
||||
-- -- local memory = Memory.get_crew_memory()
|
||||
|
||||
-- -- if memory.planet[1].type.id == 11 then --rocky planet
|
||||
-- -- if event.entity.name == 'rock-huge' or event.entity.name == 'rock-big' or event.entity.name == 'sand-rock-big' then
|
||||
-- -- if event.entity.name == 'huge-rock' or event.entity.name == 'big-rock' or event.entity.name == 'big-sand-rock' then
|
||||
-- -- Event_functions.trap(event.entity, false)
|
||||
-- -- event.entity.destroy()
|
||||
-- -- Event_functions.rocky_loot(event)
|
||||
@ -964,7 +964,7 @@ local function player_mined_rock(event)
|
||||
local c2 = {}
|
||||
|
||||
if memory.overworldx >= 0 then --used to be only later levels
|
||||
if entity.name == 'rock-huge' then
|
||||
if entity.name == 'huge-rock' then
|
||||
local a = Math.ceil(1.5 * Balance.coin_amount_from_rock())
|
||||
c2[#c2 + 1] = { name = 'coin', count = a, color = CoreData.colors.coin }
|
||||
memory.playtesting_stats.coins_gained_by_trees_and_rocks = memory.playtesting_stats.coins_gained_by_trees_and_rocks + a
|
||||
@ -1044,7 +1044,7 @@ local function event_on_player_mined_entity(event)
|
||||
elseif entity.name == 'coal' or entity.name == 'stone' or entity.name == 'copper-ore' or entity.name == 'iron-ore' then
|
||||
player_mined_resource(event)
|
||||
event.buffer.clear()
|
||||
elseif entity.name == 'rock-huge' or entity.name == 'rock-big' or entity.name == 'sand-rock-big' then
|
||||
elseif entity.name == 'huge-rock' or entity.name == 'big-rock' or entity.name == 'big-sand-rock' then
|
||||
player_mined_rock(event)
|
||||
event.buffer.clear()
|
||||
end
|
||||
@ -1857,7 +1857,7 @@ function Public.event_on_chunk_generated(event)
|
||||
e.rotatable = false
|
||||
e.destructible = false
|
||||
|
||||
local water_tiles = surface.find_tiles_filtered { position = special.position, radius = 0.1, collision_mask = "water-tile" }
|
||||
local water_tiles = surface.find_tiles_filtered { position = special.position, radius = 0.1, collision_mask = "water_tile" }
|
||||
|
||||
if water_tiles then
|
||||
for _, t in pairs(water_tiles) do
|
||||
|
@ -50,7 +50,7 @@ function Public.try_give_ore(player, realp, source_name)
|
||||
|
||||
local given_amount = Math.ceil(real_amount * Math.random_float_in_range(0.004, 0.006))
|
||||
|
||||
if source_name == 'rock-huge' then
|
||||
if source_name == 'huge-rock' then
|
||||
given_amount = given_amount * 2
|
||||
coin_amount = coin_amount * 2
|
||||
end
|
||||
@ -134,7 +134,7 @@ function Public.try_ore_spawn(surface, realp, source_name, density_bonus, from_t
|
||||
|
||||
local radius_squared = (destination.static_params and destination.static_params.radius_squared_modifier or 1) * (12 + 45 * Math.slopefromto(Common.ore_abstract_to_real(choices[choice]), 800, 20000)) * (0.6 + Math.random()) --tuned
|
||||
|
||||
if source_name == 'rock-huge' then
|
||||
if source_name == 'huge-rock' then
|
||||
radius_squared = radius_squared * 1.5
|
||||
end
|
||||
|
||||
|
@ -351,7 +351,7 @@ function Public.assorted_structures_1(args, spec)
|
||||
end
|
||||
|
||||
function Public.random_rock_1(p)
|
||||
local rock_raffle = { 'sand-rock-big', 'sand-rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-huge', 'rock-huge' }
|
||||
local rock_raffle = { 'big-sand-rock', 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock', 'huge-rock' }
|
||||
local s_rock_raffle = #rock_raffle
|
||||
|
||||
return { name = rock_raffle[Math.random(1, s_rock_raffle)], position = p }
|
||||
|
@ -82,11 +82,11 @@ function Public.terrain(args)
|
||||
if rockrng < rockdensity then
|
||||
args.entities[#args.entities + 1] = IslandsCommon.random_rock_1(args.p)
|
||||
elseif rockrng < rockdensity * 1.5 then
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'rock-medium', position = args.p }
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'medium-rock', position = args.p }
|
||||
elseif rockrng < rockdensity * 2 then
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'rock-small', position = args.p }
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'small-rock', position = args.p }
|
||||
elseif rockrng < rockdensity * 2.5 then
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'rock-tiny', position = args.p }
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'tiny-rock', position = args.p }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -90,11 +90,11 @@ function Public.terrain(args)
|
||||
if rockrng < rockdensity then
|
||||
args.entities[#args.entities + 1] = IslandsCommon.random_rock_1(args.p)
|
||||
elseif rockrng < rockdensity * 1.5 then
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'rock-medium', position = args.p }
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'medium-rock', position = args.p }
|
||||
elseif rockrng < rockdensity * 2 then
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'rock-small', position = args.p }
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'small-rock', position = args.p }
|
||||
elseif rockrng < rockdensity * 2.5 then
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'rock-tiny', position = args.p }
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'tiny-rock', position = args.p }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -87,11 +87,11 @@ function Public.terrain(args)
|
||||
if rockrng < rockdensity then
|
||||
args.entities[#args.entities + 1] = IslandsCommon.random_rock_1(args.p)
|
||||
elseif rockrng < rockdensity * 1.5 then
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'rock-medium', position = args.p }
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'medium-rock', position = args.p }
|
||||
elseif rockrng < rockdensity * 2 then
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'rock-small', position = args.p }
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'small-rock', position = args.p }
|
||||
elseif rockrng < rockdensity * 2.5 then
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'rock-tiny', position = args.p }
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'tiny-rock', position = args.p }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -105,11 +105,11 @@ function Public.terrain(args)
|
||||
if rockrng < rockdensity then
|
||||
args.entities[#args.entities + 1] = IslandsCommon.random_rock_1(args.p)
|
||||
elseif rockrng < rockdensity * 1.5 then
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'rock-medium', position = args.p }
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'medium-rock', position = args.p }
|
||||
elseif rockrng < rockdensity * 2 then
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'rock-small', position = args.p }
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'small-rock', position = args.p }
|
||||
elseif rockrng < rockdensity * 2.5 then
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'rock-tiny', position = args.p }
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'tiny-rock', position = args.p }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -89,11 +89,11 @@ function Public.terrain(args)
|
||||
if rockrng < rockdensity then
|
||||
args.entities[#args.entities + 1] = IslandsCommon.random_rock_1(args.p)
|
||||
elseif rockrng < rockdensity * 1.5 then
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'rock-medium', position = args.p }
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'medium-rock', position = args.p }
|
||||
elseif rockrng < rockdensity * 2 then
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'rock-small', position = args.p }
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'small-rock', position = args.p }
|
||||
elseif rockrng < rockdensity * 2.5 then
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'rock-tiny', position = args.p }
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'tiny-rock', position = args.p }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -93,11 +93,11 @@ function Public.terrain(args)
|
||||
if rockrng < rockdensity then
|
||||
args.entities[#args.entities + 1] = IslandsCommon.random_rock_1(args.p)
|
||||
elseif rockrng < rockdensity * 1.5 then
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'rock-medium', position = args.p }
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'medium-rock', position = args.p }
|
||||
elseif rockrng < rockdensity * 2 then
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'rock-small', position = args.p }
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'small-rock', position = args.p }
|
||||
elseif rockrng < rockdensity * 2.5 then
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'rock-tiny', position = args.p }
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'tiny-rock', position = args.p }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -87,11 +87,11 @@ function Public.terrain(args)
|
||||
if rockrng < rockdensity then
|
||||
args.entities[#args.entities + 1] = IslandsCommon.random_rock_1(args.p)
|
||||
elseif rockrng < rockdensity * 1.5 then
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'rock-medium', position = args.p }
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'medium-rock', position = args.p }
|
||||
elseif rockrng < rockdensity * 2 then
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'rock-small', position = args.p }
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'small-rock', position = args.p }
|
||||
elseif rockrng < rockdensity * 2.5 then
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'rock-tiny', position = args.p }
|
||||
args.decoratives[#args.decoratives + 1] = { name = 'tiny-rock', position = args.p }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user