diff --git a/Resources/Audio/_CP14/Effects/attributions.yml b/Resources/Audio/_CP14/Effects/attributions.yml index d5d8957d43..dda78ba53d 100644 --- a/Resources/Audio/_CP14/Effects/attributions.yml +++ b/Resources/Audio/_CP14/Effects/attributions.yml @@ -31,4 +31,9 @@ - files: ["parry2.ogg"] license: "CC-BY-4.0" copyright: 'by EminYILDIRIM of Freesound.org.' - source: "https://freesound.org/people/EminYILDIRIM/sounds/536105/" \ No newline at end of file + source: "https://freesound.org/people/EminYILDIRIM/sounds/536105/" + +- files: ["snowball.ogg"] + license: "CC0-1.0" + copyright: 'by bajko of Freesound.org.' + source: "https://freesound.org/people/bajko/sounds/378058/" \ No newline at end of file diff --git a/Resources/Audio/_CP14/Effects/snowball.ogg b/Resources/Audio/_CP14/Effects/snowball.ogg new file mode 100644 index 0000000000..32165f8e7c Binary files /dev/null and b/Resources/Audio/_CP14/Effects/snowball.ogg differ diff --git a/Resources/Prototypes/_CP14/Entities/Effects/visual_effect.yml b/Resources/Prototypes/_CP14/Entities/Effects/visual_effect.yml index 90d33aa822..42b6aab2d7 100644 --- a/Resources/Prototypes/_CP14/Entities/Effects/visual_effect.yml +++ b/Resources/Prototypes/_CP14/Entities/Effects/visual_effect.yml @@ -2,25 +2,40 @@ id: CP14DirtEffect categories: [ HideSpawnMenu ] components: - - type: TimedDespawn - lifetime: 2 - type: Sprite + sprite: _CP14/Effects/material_splash.rsi drawdepth: Effects noRot: true layers: - - sprite: _CP14/Effects/dirt.rsi - state: dirt1 + - state: dirt1 map: [ "random" ] - - type: EffectVisuals - - type: Tag - tags: - - HideContextMenu - - type: AnimationPlayer - type: RandomSprite available: - random: dirt1: "" dirt2: "" + - type: TimedDespawn + lifetime: 2 + - type: EffectVisuals + - type: Tag + tags: + - HideContextMenu + - type: AnimationPlayer + +- type: entity + id: CP14SnowEffect + parent: CP14DirtEffect + categories: [ HideSpawnMenu ] + components: + - type: Sprite + layers: + - state: snow1 + map: [ "random" ] + - type: RandomSprite + available: + - random: + snow1: "" + snow2: "" - type: entity id: CP14DustEffect diff --git a/Resources/Prototypes/_CP14/Entities/Markers/Spawners/Random/Biome/biomeSpawner.yml b/Resources/Prototypes/_CP14/Entities/Markers/Spawners/Random/Biome/biomeSpawner.yml index 69a5b4629c..d50348dcfd 100644 --- a/Resources/Prototypes/_CP14/Entities/Markers/Spawners/Random/Biome/biomeSpawner.yml +++ b/Resources/Prototypes/_CP14/Entities/Markers/Spawners/Random/Biome/biomeSpawner.yml @@ -83,4 +83,4 @@ - state: snow - state: frame - type: CP14BiomeSpawner - biome: CP14Snowland \ No newline at end of file + biome: CP14SnowlandTestResult \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Markers/Spawners/Random/misc.yml b/Resources/Prototypes/_CP14/Entities/Markers/Spawners/Random/misc.yml index 185353d0fd..1a4cd22423 100644 --- a/Resources/Prototypes/_CP14/Entities/Markers/Spawners/Random/misc.yml +++ b/Resources/Prototypes/_CP14/Entities/Markers/Spawners/Random/misc.yml @@ -8,4 +8,25 @@ prototypes: - CP14DirtBlock1 chance: 1 - deleteSpawnerAfterSpawn: false \ No newline at end of file + deleteSpawnerAfterSpawn: false + - type: EmitSoundOnSpawn + sound: + collection: CP14Digging + +- type: entity + id: CP14RandomSnowLootSpawner + name: dirt spawner + parent: CP14SnowEffect + categories: [ ForkFiltered ] + components: + - type: RandomSpawner + prototypes: + - CP14Snowball + chance: 1 + deleteSpawnerAfterSpawn: false + - type: EmitSoundOnSpawn + sound: + path: /Audio/_CP14/Effects/snowball.ogg + params: + variation: 0.250 + volume: 15 \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Mobs/NPC/monster.yml b/Resources/Prototypes/_CP14/Entities/Mobs/NPC/monster.yml index fad8fe423f..8956801da3 100644 --- a/Resources/Prototypes/_CP14/Entities/Mobs/NPC/monster.yml +++ b/Resources/Prototypes/_CP14/Entities/Mobs/NPC/monster.yml @@ -138,7 +138,7 @@ categories: [ HideSpawnMenu ] components: - type: Sprite - sprite: _CP14/Effects/dirt.rsi + sprite: _CP14/Effects/material_splash.rsi layers: - state: dirt1 diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Materials/simple.yml b/Resources/Prototypes/_CP14/Entities/Objects/Materials/simple.yml index 1c3378d8ae..69f751db32 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Materials/simple.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Materials/simple.yml @@ -396,3 +396,83 @@ - enum.DamageStateVisualLayers.Base: shard1: "" shard2: "" + +- type: entity + id: CP14Snowball + parent: + - BaseItem + - ItemHeftyBase + categories: [ ForkFiltered ] + name: snowball + description: A small handful of snow, handy for throwing. + components: + - type: Item + size: Tiny + - type: Sprite + sprite: _CP14/Objects/Materials/snowball.rsi + layers: + - state: ball + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.2,-0.2,0.2,0.2" + density: 30 + hard: true + mask: + - ItemMask + - type: LandAtCursor + - type: CP14MeleeSelfDamage + damageToSelf: + types: + Blunt: 1 # 1 hits + - type: DamageOnHighSpeedImpact + minimumSpeed: 0.1 + damage: + types: + Blunt: 3 + - type: MeleeWeapon + attackRate: 1.8 + wideAnimationRotation: 225 + wideAnimation: CP14WeaponArcSlash + damage: + types: + Cold: 0 + soundHit: + path: /Audio/_CP14/Effects/snowball.ogg + params: + variation: 0.250 + volume: 15 + cPAnimationLength: 0.15 + - type: DamageOtherOnHit + damage: + types: + Cold: 0 + - type: StaminaDamageOnCollide + damage: 5 + sound: + path: /Audio/Effects/pop.ogg + params: + variation: 0.250 + volume: 15 + - type: Damageable + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 1 + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] + - !type:PlaySoundBehavior + sound: + path: /Audio/_CP14/Effects/snowball.ogg + params: + variation: 0.250 + volume: 15 + - !type:SpawnEntitiesBehavior + spawn: + CP14SnowEffect: + min: 1 + max: 1 \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Flora/snowdrift.yml b/Resources/Prototypes/_CP14/Entities/Structures/Flora/snowdrift.yml index b1e3635e44..635de14f3c 100644 --- a/Resources/Prototypes/_CP14/Entities/Structures/Flora/snowdrift.yml +++ b/Resources/Prototypes/_CP14/Entities/Structures/Flora/snowdrift.yml @@ -44,4 +44,40 @@ footstepSoundCollection: collection: FootstepSnow params: - volume: 8 \ No newline at end of file + volume: 8 + - type: Damageable + - type: Destructible + thresholds: + - trigger: + !type:DamageTypeTrigger + damageType: Heat + damage: 20 + behaviors: + - !type:DoActsBehavior + acts: ["Destruction"] + - trigger: + !type:DamageTrigger + damage: 40 + behaviors: + - !type:DoActsBehavior + acts: ["Destruction"] + - !type:SpawnEntitiesBehavior + spawn: + CP14Snowball: + min: 1 + max: 3 + - !type:SpawnEntitiesBehavior + spawn: + CP14SnowEffect: + min: 1 + max: 2 + - type: MeleeSound + soundGroups: + Brute: + path: /Audio/_CP14/Effects/snowball.ogg + params: + variation: 0.250 + volume: 15 + - type: Construction + graph: CP14Snowdrift + node: start \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Walls/natural.yml b/Resources/Prototypes/_CP14/Entities/Structures/Walls/natural.yml index 767211ca4b..c9de50cb7f 100644 --- a/Resources/Prototypes/_CP14/Entities/Structures/Walls/natural.yml +++ b/Resources/Prototypes/_CP14/Entities/Structures/Walls/natural.yml @@ -125,14 +125,20 @@ behaviors: - !type:PlaySoundBehavior sound: - path: /Audio/Effects/break_stone.ogg #TODO + path: /Audio/_CP14/Effects/snowball.ogg params: - volume: -6 - #- !type:SpawnEntitiesBehavior - # spawn: - # CP14DirtBlock1: - # min: 2 - # max: 3 + variation: 0.250 + volume: 15 + - !type:SpawnEntitiesBehavior + spawn: + CP14Snowball: + min: 3 + max: 5 + - !type:SpawnEntitiesBehavior + spawn: + CP14SnowEffect: + min: 2 + max: 3 - !type:DoActsBehavior acts: ["Destruction"] diff --git a/Resources/Prototypes/_CP14/Procedural/biome_template_snow.yml b/Resources/Prototypes/_CP14/Procedural/biome_template_snow.yml index 5b10dc4cd9..e92629a6b0 100644 --- a/Resources/Prototypes/_CP14/Procedural/biome_template_snow.yml +++ b/Resources/Prototypes/_CP14/Procedural/biome_template_snow.yml @@ -36,20 +36,6 @@ layers: - !type:BiomeMetaLayer template: CP14SnowFill - - !type:BiomeEntityLayer # More Trees - threshold: 0.4 - noise: - seed: 4 - noiseType: OpenSimplex2 - fractalType: FBm - frequency: 0.7 - allowedTiles: - - CP14FloorSnow - - CP14FloorSnowDeep - - CP14FloorSnowDeepDeep - entities: - - CP14FloraTreeSnow - #- CP14FloraTreeGreenLarge - !type:BiomeEntityLayer # Snowdrifts threshold: 0.3 noise: @@ -67,4 +53,92 @@ - CP14FloorSnowDeep - CP14FloorSnowDeepDeep entities: - - CP14Snowdrift \ No newline at end of file + - CP14Snowdrift + - !type:BiomeEntityLayer # Rare Trees + threshold: 0.8 + noise: + seed: 0 + noiseType: OpenSimplex2 + fractalType: FBm + frequency: 2 + allowedTiles: + - CP14FloorSnow + - CP14FloorSnowDeep + - CP14FloorSnowDeepDeep + entities: + - CP14FloraTreeSnow + #- CP14FloraTreeGreenLarge + +# Подбиомы + +# Лес + +- type: biomeTemplate + id: CP14SnowlandForest + layers: + - !type:BiomeMetaLayer + template: CP14Snowland + - !type:BiomeEntityLayer # More Trees + threshold: 0.2 + noise: + seed: 4 + noiseType: OpenSimplex2 + fractalType: FBm + frequency: 2 + allowedTiles: + - CP14FloorSnow + - CP14FloorSnowDeep + - CP14FloorSnowDeepDeep + entities: + - CP14FloraTreeSnow + #- CP14FloraTreeGreenLarge + +# Холмы + +- type: biomeTemplate + id: CP14SnowlandHills # Холмы + layers: + - !type:BiomeMetaLayer + template: CP14SnowlandForest + - !type:BiomeTileLayer + tile: CP14FloorBase + invert: true + threshold: 0.5 + noise: + seed: 6 + noiseType: OpenSimplex2 + frequency: 0.03 + lacunarity: 2 + fractalType: Ridged + octaves: 1 + cellularDistanceFunction: Euclidean + cellularReturnType: Distance + cellularJitterModifier: 0.7 + domainWarpType: OpenSimplex2Reduced + domainWarpAmp: 285 + - !type:BiomeEntityLayer # Walls + allowedTiles: + - CP14FloorBase + threshold: -1.0 + entities: + - CP14WallSnow + +- type: biomeTemplate + id: CP14SnowlandTestResult + layers: + - !type:BiomeMetaLayer + template: CP14Snowland + - !type:BiomeMetaLayer + template: CP14SnowlandForest + threshold: 0.2 + noise: + seed: 18 + frequency: 0.02 + fractalType: None + - !type:BiomeMetaLayer + template: CP14SnowlandHills + threshold: 0.4 + noise: + seed: 14 + frequency: 0.02 + fractalType: None \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Recipes/Construction/Graphs/Walls/Snowdrift.yml b/Resources/Prototypes/_CP14/Recipes/Construction/Graphs/Walls/Snowdrift.yml new file mode 100644 index 0000000000..fb11adf186 --- /dev/null +++ b/Resources/Prototypes/_CP14/Recipes/Construction/Graphs/Walls/Snowdrift.yml @@ -0,0 +1,22 @@ +- type: constructionGraph + id: CP14Snowdrift + start: start + graph: + - node: start + entity: CP14Snowdrift + edges: + - to: CP14Snowdrift + steps: + - tool: CP14Digging + doAfter: 1 + completed: + - !type:SpawnPrototype + prototype: CP14Snowball + amount: 3 + - !type:SpawnPrototype + prototype: CP14SnowEffect + amount: 1 + - !type:PlaySound + sound: /Audio/_CP14/Effects/snowball.ogg + - !type:DeleteEntity {} + - node: CP14Snowdrift \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Tiles/natural.yml b/Resources/Prototypes/_CP14/Tiles/natural.yml index 772751c8e1..d41b543f8b 100644 --- a/Resources/Prototypes/_CP14/Tiles/natural.yml +++ b/Resources/Prototypes/_CP14/Tiles/natural.yml @@ -197,7 +197,7 @@ West: /Textures/_CP14/Tiles/SnowDeepDeep/double_edge_W.png baseTurf: CP14FloorDirt deconstructTools: [ CP14Digging ] - itemDrop: CP14RandomDirtLootSpawner + itemDrop: CP14RandomSnowLootSpawner isSubfloor: false footstepSounds: collection: FootstepSnow @@ -228,9 +228,9 @@ East: /Textures/_CP14/Tiles/SnowDeep/double_edge_E.png North: /Textures/_CP14/Tiles/SnowDeep/double_edge_N.png West: /Textures/_CP14/Tiles/SnowDeep/double_edge_W.png - baseTurf: CP14FloorDirt + baseTurf: CP14FloorSnowDeepDeep deconstructTools: [ CP14Digging ] - itemDrop: CP14RandomDirtLootSpawner + itemDrop: CP14RandomSnowLootSpawner isSubfloor: false footstepSounds: collection: FootstepSnow @@ -261,9 +261,9 @@ East: /Textures/_CP14/Tiles/Snow/double_edge_E.png North: /Textures/_CP14/Tiles/Snow/double_edge_N.png West: /Textures/_CP14/Tiles/Snow/double_edge_W.png - baseTurf: CP14FloorDirt + baseTurf: CP14FloorSnowDeep deconstructTools: [ CP14Digging ] - itemDrop: CP14RandomDirtLootSpawner + itemDrop: CP14RandomSnowLootSpawner isSubfloor: false footstepSounds: collection: FootstepSnow diff --git a/Resources/Textures/_CP14/Effects/dirt.rsi/dirt1.png b/Resources/Textures/_CP14/Effects/material_splash.rsi/dirt1.png similarity index 100% rename from Resources/Textures/_CP14/Effects/dirt.rsi/dirt1.png rename to Resources/Textures/_CP14/Effects/material_splash.rsi/dirt1.png diff --git a/Resources/Textures/_CP14/Effects/dirt.rsi/dirt2.png b/Resources/Textures/_CP14/Effects/material_splash.rsi/dirt2.png similarity index 100% rename from Resources/Textures/_CP14/Effects/dirt.rsi/dirt2.png rename to Resources/Textures/_CP14/Effects/material_splash.rsi/dirt2.png diff --git a/Resources/Textures/_CP14/Effects/dirt.rsi/meta.json b/Resources/Textures/_CP14/Effects/material_splash.rsi/meta.json similarity index 56% rename from Resources/Textures/_CP14/Effects/dirt.rsi/meta.json rename to Resources/Textures/_CP14/Effects/material_splash.rsi/meta.json index e6a1a5d3df..3c2973342e 100644 --- a/Resources/Textures/_CP14/Effects/dirt.rsi/meta.json +++ b/Resources/Textures/_CP14/Effects/material_splash.rsi/meta.json @@ -40,6 +40,40 @@ 2 ] ] + }, + { + "name": "snow1", + "delays": [ + [ + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 2 + ] + ] + }, + { + "name": "snow2", + "delays": [ + [ + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 2 + ] + ] } ] } \ No newline at end of file diff --git a/Resources/Textures/_CP14/Effects/material_splash.rsi/snow1.png b/Resources/Textures/_CP14/Effects/material_splash.rsi/snow1.png new file mode 100644 index 0000000000..7a7d568767 Binary files /dev/null and b/Resources/Textures/_CP14/Effects/material_splash.rsi/snow1.png differ diff --git a/Resources/Textures/_CP14/Effects/material_splash.rsi/snow2.png b/Resources/Textures/_CP14/Effects/material_splash.rsi/snow2.png new file mode 100644 index 0000000000..7a7d568767 Binary files /dev/null and b/Resources/Textures/_CP14/Effects/material_splash.rsi/snow2.png differ diff --git a/Resources/Textures/_CP14/Objects/Materials/snowball.rsi/meta.json b/Resources/Textures/_CP14/Objects/Materials/snowball.rsi/meta.json index 771e3686a7..d757fd2d60 100644 --- a/Resources/Textures/_CP14/Objects/Materials/snowball.rsi/meta.json +++ b/Resources/Textures/_CP14/Objects/Materials/snowball.rsi/meta.json @@ -8,7 +8,7 @@ "copyright": "Created by TheShuEd (Github)", "states": [ { - "name": "meta" + "name": "ball" } ] }