mirror of
https://github.com/veden/Rampant.git
synced 2025-03-17 20:58:35 +02:00
4083077: Enemies landfill water by particle on death
This commit is contained in:
parent
798d3cd968
commit
b734f193fa
@ -614,8 +614,8 @@ function upgrade.attempt(universe)
|
||||
universe.entitySkipCountLookup = nil
|
||||
universe.evoToTierMapping = nil
|
||||
end
|
||||
if global.version < 306 then
|
||||
global.version = 306
|
||||
if global.version < 307 then
|
||||
global.version = 307
|
||||
local minDiffuse = game.map_settings.pollution.min_to_diffuse
|
||||
universe.pollutionDiffuseMinimum = minDiffuse * 0.75
|
||||
|
||||
|
@ -12,6 +12,7 @@ Version: 3.2.0
|
||||
- Improved the potential field pheromone distribution
|
||||
- Added long term death pheromone that overtime will cause chunks saturated in death to be avoided more frequently and settled less
|
||||
- Added a mod setting to toggle the purple settler cloud
|
||||
- When enemies die there body parts can fill in water tiles. Can be disabled in mod settings.
|
||||
Compatibility:
|
||||
- Added interface for adding and removing excluded surfaces
|
||||
Tweaks:
|
||||
|
29
control.lua
29
control.lua
@ -568,16 +568,20 @@ local function processSurfaceTile(map, position, chunks, tick)
|
||||
else
|
||||
local x,y = positionToChunkXY(position)
|
||||
local addMe = true
|
||||
for ci=1,#chunks do
|
||||
local c = chunks[ci]
|
||||
if (c.x == x) and (c.y == y) then
|
||||
addMe = false
|
||||
break
|
||||
if chunks then
|
||||
for ci=1,#chunks do
|
||||
local c = chunks[ci]
|
||||
if (c.x == x) and (c.y == y) then
|
||||
addMe = false
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
if addMe then
|
||||
local chunkXY = {x=x,y=y}
|
||||
chunks[#chunks+1] = chunkXY
|
||||
if chunks then
|
||||
chunks[#chunks+1] = chunkXY
|
||||
end
|
||||
onChunkGenerated({area = { left_top = chunkXY },
|
||||
tick = tick,
|
||||
surface = map.surface})
|
||||
@ -739,6 +743,17 @@ local function onTriggerEntityCreated(event)
|
||||
setDrainedTick(map, chunk, event.tick)
|
||||
end
|
||||
end
|
||||
elseif (event.effect_id == "deathLandfillParticle--rampant") then
|
||||
local map = universe.maps[event.surface_index]
|
||||
if not map then
|
||||
return
|
||||
end
|
||||
processSurfaceTile(
|
||||
map,
|
||||
event.target_position,
|
||||
nil,
|
||||
event.tick
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
@ -988,7 +1003,7 @@ local function onBuilderArrived(event)
|
||||
universe.settlePurpleCloud[len] = {
|
||||
map = map,
|
||||
position = builder.position,
|
||||
squad = builder,
|
||||
group = builder,
|
||||
tick = event.tick + SETTLE_CLOUD_WARMUP
|
||||
}
|
||||
end
|
||||
|
@ -106,6 +106,27 @@ if settings.startup["rampant--enableShrinkNestsAndWorms"].value then
|
||||
end
|
||||
end
|
||||
|
||||
if settings.startup["rampant--enableLandfillOnDeath"].value then
|
||||
local particles = {
|
||||
"guts-entrails-particle-small-medium",
|
||||
"guts-entrails-particle-big"
|
||||
}
|
||||
|
||||
for _,particleName in pairs(particles) do
|
||||
data.raw["optimized-particle"][particleName].ended_in_water_trigger_effect = {
|
||||
{
|
||||
type = "set-tile",
|
||||
tile_name = "landfill",
|
||||
radius = 0.5,
|
||||
},
|
||||
{
|
||||
type = "script",
|
||||
effect_id = "deathLandfillParticle--rampant"
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
if settings.startup["rampant--enableFadeTime"].value then
|
||||
for k, corpse in pairs(data.raw["corpse"]) do
|
||||
if (string.find(k, "biter") or string.find(k, "spitter") or string.find(k, "hive") or
|
||||
|
@ -564,8 +564,11 @@ function mapProcessor.processClouds(universe, tick)
|
||||
universe.settlePurpleCloud[len] = nil
|
||||
universe.settlePurpleCloud.len = len - 1
|
||||
local map = builderPack.map
|
||||
if builderPack.squad.group.valid and map.surface.valid then
|
||||
setPositionInQuery(universe.obaCreateBuildCloudQuery, builderPack.position)
|
||||
if builderPack.group.valid and map.surface.valid then
|
||||
setPositionInQuery(
|
||||
universe.obaCreateBuildCloudQuery,
|
||||
builderPack.position
|
||||
)
|
||||
map.surface.create_entity(universe.obaCreateBuildCloudQuery)
|
||||
end
|
||||
end
|
||||
|
@ -204,8 +204,10 @@ rampant--enableFullMapScan=Compatibility: Enable full map scanning
|
||||
rampant--unitAndSpawnerFadeTime=Biter, Spitter, Worm, Nest, and Hive Corpse Fade Time
|
||||
rampant--enableFadeTime=Enable corpse fade time
|
||||
rampant--temperamentRateModifier=AI: Temperament Rate Modifier
|
||||
rampant--enableLandfillOnDeath=World: Enemies fill water on death
|
||||
|
||||
[mod-setting-description]
|
||||
rampant--enableLandfillOnDeath=The body parts that are thrown off when dying will landfill water tiles. If Remove blood particles is enabled then this setting will not work.
|
||||
rampant--enabledPurpleSettlerCloud=Toggle the purple cloud that spawns when a settler group starts building a nest.
|
||||
rampant--minimumAdaptationEvolution=The minimum evolution that must be reached before bases will be begin to mutate. Only has an effect when Rampant New Enemies are enabled.
|
||||
rampant--printBaseSettling=Print a message to the console when settlers begin building a nest
|
||||
|
@ -611,6 +611,11 @@ local function makeBloodParticle(attributes)
|
||||
}
|
||||
},
|
||||
ended_in_water_trigger_effect =
|
||||
-- {
|
||||
-- type = "set-tile",
|
||||
-- tile_name = "landfill",
|
||||
-- radius = 1,
|
||||
-- }
|
||||
-- {
|
||||
-- type = "create-entity",
|
||||
-- entity_name = "water-splash"
|
||||
@ -696,11 +701,38 @@ function particleUtils.makeBloodFountains(attributes)
|
||||
type = "instant",
|
||||
target_effects =
|
||||
{
|
||||
type = "create-entity",
|
||||
entity_name = attributes.name .. "-blood-fountain-rampant",
|
||||
repeat_count = 10,
|
||||
repeat_count_deviation = 3,
|
||||
offset_deviation = {{-0.4, -0.4}, {0.4, 0.4}}
|
||||
{
|
||||
type = "create-entity",
|
||||
entity_name = attributes.name .. "-blood-fountain-rampant",
|
||||
repeat_count = 10,
|
||||
repeat_count_deviation = 3,
|
||||
offset_deviation = {{-0.4, -0.4}, {0.4, 0.4}}
|
||||
},
|
||||
{
|
||||
type = "create-particle",
|
||||
repeat_count = 1,
|
||||
repeat_count_deviation = 2,
|
||||
probability = 1,
|
||||
affects_target = false,
|
||||
show_in_tooltip = false,
|
||||
particle_name = "guts-entrails-particle-small-medium",
|
||||
offsets = {
|
||||
{ 0.03906, -0.02344 }
|
||||
},
|
||||
offset_deviation = { { -1, -0.6992 }, { 1, 0.6992 } },
|
||||
tile_collision_mask = nil,
|
||||
initial_height = 0.4,
|
||||
initial_height_deviation = 0.4,
|
||||
initial_vertical_speed = 0.04,
|
||||
initial_vertical_speed_deviation = 0.05,
|
||||
speed_from_center = 0.04,
|
||||
speed_from_center_deviation = 0.05,
|
||||
frame_speed = 1,
|
||||
frame_speed_deviation = 0.955,
|
||||
tail_length = 3,
|
||||
tail_length_deviation = 0,
|
||||
tail_width = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -741,7 +773,7 @@ function particleUtils.makeBloodFountains(attributes)
|
||||
},
|
||||
{
|
||||
type = "create-particle",
|
||||
repeat_count = 4,
|
||||
repeat_count = 1,
|
||||
repeat_count_deviation = 2,
|
||||
probability = 1,
|
||||
affects_target = false,
|
||||
@ -766,7 +798,7 @@ function particleUtils.makeBloodFountains(attributes)
|
||||
},
|
||||
{
|
||||
type = "create-particle",
|
||||
repeat_count = 4,
|
||||
repeat_count = 2,
|
||||
repeat_count_deviation = 2,
|
||||
probability = 1,
|
||||
affects_target = false,
|
||||
|
17
settings.lua
17
settings.lua
@ -659,14 +659,15 @@ data:extend({
|
||||
per_user = false
|
||||
},
|
||||
|
||||
-- {
|
||||
-- type = "bool-setting",
|
||||
-- name = "rampant--enableFullMapScan",
|
||||
-- setting_type = "runtime-global",
|
||||
-- default_value = true,
|
||||
-- order = "n[modifier]-a[optimize]",
|
||||
-- per_user = false
|
||||
-- },
|
||||
{
|
||||
type = "bool-setting",
|
||||
name = "rampant--enableLandfillOnDeath",
|
||||
description = "rampant--reduceBloodParticles",
|
||||
setting_type = "startup",
|
||||
default_value = true,
|
||||
order = "n[modifier]-a[optimize]",
|
||||
per_user = false
|
||||
},
|
||||
|
||||
{
|
||||
type = "bool-setting",
|
||||
|
Loading…
x
Reference in New Issue
Block a user