1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-18 03:21:36 +02:00

Discord tech print fix + green water for radioactive island

Changes:
- Radioactive island now has green water (as well as small green brightness that's only seen at night slightly).
- Reduced base amount of resource count quest item requirement by 10%.
- Fixed research tech unintentionally printing to discord when crew disbands.
This commit is contained in:
Piratux 2022-10-28 15:21:31 +03:00
parent cdc3e62674
commit 595f6d2cf3
9 changed files with 40 additions and 18 deletions

View File

@ -1,6 +1,6 @@
require 'utils.data_stages'
_LIFECYCLE = _STAGE.control -- Control stage
_DEBUG = true
_DEBUG = false
_DUMP_ENV = false
require 'utils.server'
@ -113,7 +113,7 @@ require 'utils.freeplay'
--require 'maps.chronosphere.main'
--![[Adventure as a crew of pirates]]--
require 'maps.pirates.main'
-- require 'maps.pirates.main'
--![[Launch rockets in increasingly harder getting worlds.]]--
--require 'maps.journey.main'

View File

@ -13,7 +13,7 @@ local _inspect = require 'utils.inspect'.inspect
-- local Structures = require 'maps.pirates.structures.structures'
local Boats = require 'maps.pirates.structures.boats.boats'
local Surfaces = require 'maps.pirates.surfaces.surfaces'
local Islands = require 'maps.pirates.surfaces.islands.islands'
-- local Islands = require 'maps.pirates.surfaces.islands.islands'
local IslandEnum = require 'maps.pirates.surfaces.islands.island_enum'
-- local Sea = require 'maps.pirates.surfaces.sea.sea'
-- local Crew = require 'maps.pirates.crew'

View File

@ -397,7 +397,7 @@ function Public.island_richness_avg_multiplier()
end
function Public.resource_quest_multiplier()
return (1.0 + 0.075 * (Common.overworldx()/40)^(8/10)) * Math.sloped(Common.difficulty_scale(), 1/5) * (Public.crew_scale())^(1/10)
return (0.9 + 0.075 * (Common.overworldx()/40)^(8/10)) * Math.sloped(Common.difficulty_scale(), 1/5) * (Public.crew_scale())^(1/10)
end
function Public.quest_market_entry_price_scale()

View File

@ -535,6 +535,7 @@ function Public.disband_crew(donotprint)
end
memory.game_lost = true -- only necessary to avoid printing research notifications
Public.reset_crew_and_enemy_force(id)
local lobby = game.surfaces[CoreData.lobby_surface_name]

View File

@ -1,7 +1,7 @@
-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates.
local SurfacesCommon = require 'maps.pirates.surfaces.common'
-- local SurfacesCommon = require 'maps.pirates.surfaces.common'
local Memory = require 'maps.pirates.memory'
local Math = require 'maps.pirates.math'
local Balance = require 'maps.pirates.balance'
@ -11,6 +11,7 @@ local Hold = require 'maps.pirates.surfaces.hold'
-- local Parrot = require 'maps.pirates.parrot'
local Cabin = require 'maps.pirates.surfaces.cabin'
local Utils = require 'maps.pirates.utils_local'
local IslandEnum = require 'maps.pirates.surfaces.islands.island_enum'
-- local _inspect = require 'utils.inspect'.inspect
-- DEV NOTE: If making boat designs that have rails, make sure the boat is placed at odd co-ordinates before blueprinting.
@ -64,12 +65,17 @@ function Public.currentdestination_move_boat_natural()
if (destination and destination.dynamic_data and destination.dynamic_data.timer) and (not (destination.dynamic_data.timer >= 1)) then return end
local water_type = 'water'
if destination and destination.subtype == IslandEnum.enum.RADIOACTIVE then
water_type = 'water-green'
end
if boat and boat.state == enum_state.LEAVING_DOCK or boat.state == enum_state.APPROACHING then
local newp = {x = boat.position.x + Common.boat_steps_at_a_time, y = boat.position.y}
Public.teleport_boat(boat, nil, newp)
Public.teleport_boat(boat, nil, newp, nil, water_type)
elseif boat and boat.state == enum_state.RETREATING then
local newp = {x = boat.position.x - Common.boat_steps_at_a_time, y = boat.position.y}
Public.teleport_boat(boat, nil, newp)
Public.teleport_boat(boat, nil, newp, nil, water_type)
end
end
@ -1037,7 +1043,14 @@ local function teleport_handle_wake_tiles(boat, dummyboat, newsurface_name, olds
for _, area in pairs(wakeareas) do
for _, p in pairs(Common.central_positions_within_area(area, adjustednewposition)) do
local t = old_water_tile
if static_params and static_params.deepwater_xposition and (p.x <= static_params.deepwater_xposition - 0.5) then t = 'deepwater' end
if static_params and static_params.deepwater_xposition and (p.x <= static_params.deepwater_xposition - 0.5) then
if t == 'water' then
t = 'deepwater'
else
t = 'deepwater-green'
end
end
if friendlyboat_bool and boat.state == enum_state.RETREATING and vector.x < 0 then --in this case we need to place some landing tiles, as the cannon juts out
if (p.x >= boat.dockedposition.x + scope.Data.leftmost_gate_position) and (p.y <= scope.Data.upmost_gate_position or p.y >= scope.Data.downmost_gate_position) then t = CoreData.landing_tile end
end

View File

@ -16,11 +16,19 @@ local Public = {}
Public.enum = IslandEnum.enum
function Public.place_water_tile(args)
function Public.place_water_tile(args, place_green_water)
local water_names = {}
if place_green_water then
water_names[#water_names+1] = 'water-green'
water_names[#water_names+1] = 'deepwater-green'
else
water_names[#water_names+1] = 'water'
water_names[#water_names+1] = 'deepwater'
end
if args.static_params and args.static_params.deepwater_terraingenframe_xposition and args.p.x <= args.static_params.deepwater_terraingenframe_xposition - 0.5
then
args.tiles[#args.tiles + 1] = {name = 'deepwater', position = args.p}
args.tiles[#args.tiles + 1] = {name = water_names[2], position = args.p}
local fishrng = Math.random(350)
if fishrng == 350 then
@ -33,7 +41,7 @@ function Public.place_water_tile(args)
local height_noise = args.noise_generator['height'](args.p)
if height_noise < 0 then
args.tiles[#args.tiles + 1] = {name = 'water', position = args.p}
args.tiles[#args.tiles + 1] = {name = water_names[1], position = args.p}
local fishrng = Math.random(350)
if fishrng == 350 then

View File

@ -13,7 +13,7 @@ Public.terraingen_frame_width = 700
Public.terraingen_frame_height = 700
Public.static_params_default = {
starting_time_of_day = 0.45,
brightness_visual_weights = {0.8, 0.8, 0.8},
brightness_visual_weights = {0.8, 0.6, 0.8},
daynightcycletype = 4,
min_brightness = 0.05,
base_starting_treasure = 1000,

View File

@ -40,10 +40,10 @@ function Public.terrain(args)
local p = args.p
if IslandsCommon.place_water_tile(args) then return end
if IslandsCommon.place_water_tile(args, true) then return end
if noises.height(p) < 0 then
args.tiles[#args.tiles + 1] = {name = 'water', position = args.p}
args.tiles[#args.tiles + 1] = {name = 'water-green', position = args.p}
return
end
@ -109,7 +109,7 @@ function Public.terrain(args)
args.entities[#args.entities + 1] = {name = 'stone', position = args.p, amount = 1000}
elseif noises.ore(p) < 0.005 and noises.ore(p) > -0.005 then
if noises.ore(p) > 0 then
args.entities[#args.entities + 1] = {name = 'coal', position = args.p, amount = 10}
args.entities[#args.entities + 1] = {name = 'coal', position = args.p, amount = 20}
else
args.entities[#args.entities + 1] = {name = 'copper-ore', position = args.p, amount = 100}
end
@ -130,7 +130,7 @@ function Public.chunk_structures(args)
-- we need some indestructible spawners, because otherwise you can clear, stay here forever, make infinite resources...
spawners_indestructible = noises.farness(p) > 0.63,
-- spawners_indestructible = false,
density_perchunk = 20 * Math.slopefromto(noises.farness(p), 0.3, 1)^2 * args.biter_base_density_scale,
density_perchunk = 20 * Math.slopefromto(noises.farness(p), 0.3, 1.08)^2 * args.biter_base_density_scale,
}
end

View File

@ -130,8 +130,8 @@ function Public.chunk_structures(args)
placeable = noises.farness(p) > 0.3,
-- spawners_indestructible = noises.farness(p) > 0.75,
spawners_indestructible = false,
spawners_density_perchunk = 54 * Math.slopefromto(noises.mood(p), 0.7, 0.5) * Math.slopefromto(noises.farness(p), 0.35, 1)^(1.8) * args.biter_base_density_scale,
worms_density_perchunk = 18 * Math.slopefromto(noises.mood(p), 0.7, 0.5) * Math.slopefromto(noises.farness(p), 0.25, 1)^(1.8) * args.biter_base_density_scale,
spawners_density_perchunk = 54 * Math.slopefromto(noises.mood(p), 0.7, 0.5) * Math.slopefromto(noises.farness(p), 0.35, 1.1)^(1.8) * args.biter_base_density_scale,
worms_density_perchunk = 18 * Math.slopefromto(noises.mood(p), 0.7, 0.5) * Math.slopefromto(noises.farness(p), 0.25, 1.1)^(1.8) * args.biter_base_density_scale,
}
end