mirror of
https://github.com/veden/Rampant.git
synced 2025-03-19 21:07:56 +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.entitySkipCountLookup = nil
|
||||||
universe.evoToTierMapping = nil
|
universe.evoToTierMapping = nil
|
||||||
end
|
end
|
||||||
if global.version < 306 then
|
if global.version < 307 then
|
||||||
global.version = 306
|
global.version = 307
|
||||||
local minDiffuse = game.map_settings.pollution.min_to_diffuse
|
local minDiffuse = game.map_settings.pollution.min_to_diffuse
|
||||||
universe.pollutionDiffuseMinimum = minDiffuse * 0.75
|
universe.pollutionDiffuseMinimum = minDiffuse * 0.75
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ Version: 3.2.0
|
|||||||
- Improved the potential field pheromone distribution
|
- 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 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
|
- 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:
|
Compatibility:
|
||||||
- Added interface for adding and removing excluded surfaces
|
- Added interface for adding and removing excluded surfaces
|
||||||
Tweaks:
|
Tweaks:
|
||||||
|
17
control.lua
17
control.lua
@ -568,6 +568,7 @@ local function processSurfaceTile(map, position, chunks, tick)
|
|||||||
else
|
else
|
||||||
local x,y = positionToChunkXY(position)
|
local x,y = positionToChunkXY(position)
|
||||||
local addMe = true
|
local addMe = true
|
||||||
|
if chunks then
|
||||||
for ci=1,#chunks do
|
for ci=1,#chunks do
|
||||||
local c = chunks[ci]
|
local c = chunks[ci]
|
||||||
if (c.x == x) and (c.y == y) then
|
if (c.x == x) and (c.y == y) then
|
||||||
@ -575,9 +576,12 @@ local function processSurfaceTile(map, position, chunks, tick)
|
|||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
if addMe then
|
if addMe then
|
||||||
local chunkXY = {x=x,y=y}
|
local chunkXY = {x=x,y=y}
|
||||||
|
if chunks then
|
||||||
chunks[#chunks+1] = chunkXY
|
chunks[#chunks+1] = chunkXY
|
||||||
|
end
|
||||||
onChunkGenerated({area = { left_top = chunkXY },
|
onChunkGenerated({area = { left_top = chunkXY },
|
||||||
tick = tick,
|
tick = tick,
|
||||||
surface = map.surface})
|
surface = map.surface})
|
||||||
@ -739,6 +743,17 @@ local function onTriggerEntityCreated(event)
|
|||||||
setDrainedTick(map, chunk, event.tick)
|
setDrainedTick(map, chunk, event.tick)
|
||||||
end
|
end
|
||||||
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
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -988,7 +1003,7 @@ local function onBuilderArrived(event)
|
|||||||
universe.settlePurpleCloud[len] = {
|
universe.settlePurpleCloud[len] = {
|
||||||
map = map,
|
map = map,
|
||||||
position = builder.position,
|
position = builder.position,
|
||||||
squad = builder,
|
group = builder,
|
||||||
tick = event.tick + SETTLE_CLOUD_WARMUP
|
tick = event.tick + SETTLE_CLOUD_WARMUP
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
@ -106,6 +106,27 @@ if settings.startup["rampant--enableShrinkNestsAndWorms"].value then
|
|||||||
end
|
end
|
||||||
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
|
if settings.startup["rampant--enableFadeTime"].value then
|
||||||
for k, corpse in pairs(data.raw["corpse"]) do
|
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
|
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] = nil
|
||||||
universe.settlePurpleCloud.len = len - 1
|
universe.settlePurpleCloud.len = len - 1
|
||||||
local map = builderPack.map
|
local map = builderPack.map
|
||||||
if builderPack.squad.group.valid and map.surface.valid then
|
if builderPack.group.valid and map.surface.valid then
|
||||||
setPositionInQuery(universe.obaCreateBuildCloudQuery, builderPack.position)
|
setPositionInQuery(
|
||||||
|
universe.obaCreateBuildCloudQuery,
|
||||||
|
builderPack.position
|
||||||
|
)
|
||||||
map.surface.create_entity(universe.obaCreateBuildCloudQuery)
|
map.surface.create_entity(universe.obaCreateBuildCloudQuery)
|
||||||
end
|
end
|
||||||
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--unitAndSpawnerFadeTime=Biter, Spitter, Worm, Nest, and Hive Corpse Fade Time
|
||||||
rampant--enableFadeTime=Enable corpse fade time
|
rampant--enableFadeTime=Enable corpse fade time
|
||||||
rampant--temperamentRateModifier=AI: Temperament Rate Modifier
|
rampant--temperamentRateModifier=AI: Temperament Rate Modifier
|
||||||
|
rampant--enableLandfillOnDeath=World: Enemies fill water on death
|
||||||
|
|
||||||
[mod-setting-description]
|
[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--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--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
|
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 =
|
ended_in_water_trigger_effect =
|
||||||
|
-- {
|
||||||
|
-- type = "set-tile",
|
||||||
|
-- tile_name = "landfill",
|
||||||
|
-- radius = 1,
|
||||||
|
-- }
|
||||||
-- {
|
-- {
|
||||||
-- type = "create-entity",
|
-- type = "create-entity",
|
||||||
-- entity_name = "water-splash"
|
-- entity_name = "water-splash"
|
||||||
@ -695,12 +700,39 @@ function particleUtils.makeBloodFountains(attributes)
|
|||||||
{
|
{
|
||||||
type = "instant",
|
type = "instant",
|
||||||
target_effects =
|
target_effects =
|
||||||
|
{
|
||||||
{
|
{
|
||||||
type = "create-entity",
|
type = "create-entity",
|
||||||
entity_name = attributes.name .. "-blood-fountain-rampant",
|
entity_name = attributes.name .. "-blood-fountain-rampant",
|
||||||
repeat_count = 10,
|
repeat_count = 10,
|
||||||
repeat_count_deviation = 3,
|
repeat_count_deviation = 3,
|
||||||
offset_deviation = {{-0.4, -0.4}, {0.4, 0.4}}
|
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",
|
type = "create-particle",
|
||||||
repeat_count = 4,
|
repeat_count = 1,
|
||||||
repeat_count_deviation = 2,
|
repeat_count_deviation = 2,
|
||||||
probability = 1,
|
probability = 1,
|
||||||
affects_target = false,
|
affects_target = false,
|
||||||
@ -766,7 +798,7 @@ function particleUtils.makeBloodFountains(attributes)
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type = "create-particle",
|
type = "create-particle",
|
||||||
repeat_count = 4,
|
repeat_count = 2,
|
||||||
repeat_count_deviation = 2,
|
repeat_count_deviation = 2,
|
||||||
probability = 1,
|
probability = 1,
|
||||||
affects_target = false,
|
affects_target = false,
|
||||||
|
17
settings.lua
17
settings.lua
@ -659,14 +659,15 @@ data:extend({
|
|||||||
per_user = false
|
per_user = false
|
||||||
},
|
},
|
||||||
|
|
||||||
-- {
|
{
|
||||||
-- type = "bool-setting",
|
type = "bool-setting",
|
||||||
-- name = "rampant--enableFullMapScan",
|
name = "rampant--enableLandfillOnDeath",
|
||||||
-- setting_type = "runtime-global",
|
description = "rampant--reduceBloodParticles",
|
||||||
-- default_value = true,
|
setting_type = "startup",
|
||||||
-- order = "n[modifier]-a[optimize]",
|
default_value = true,
|
||||||
-- per_user = false
|
order = "n[modifier]-a[optimize]",
|
||||||
-- },
|
per_user = false
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
type = "bool-setting",
|
type = "bool-setting",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user