* garland

* presents filter
This commit is contained in:
Ed
2024-12-13 22:20:00 +03:00
committed by GitHub
parent e30c5848c5
commit 4cea96f6eb
6 changed files with 139 additions and 0 deletions

View File

@@ -92,6 +92,9 @@ public sealed class RandomGiftSystem : EntitySystem
var mapGridCompName = _componentFactory.GetComponentName(typeof(MapGridComponent));
var physicsCompName = _componentFactory.GetComponentName(typeof(PhysicsComponent));
if (!_prototype.TryIndex<EntityCategoryPrototype>("ForkFiltered", out var indexedFilter))
return;
foreach (var proto in _prototype.EnumeratePrototypes<EntityPrototype>())
{
if (proto.Abstract || proto.HideSpawnMenu || proto.Components.ContainsKey(mapGridCompName) || !proto.Components.ContainsKey(physicsCompName))
@@ -102,6 +105,11 @@ public sealed class RandomGiftSystem : EntitySystem
if (!proto.Components.ContainsKey(itemCompName))
continue;
//CP14 Only cp14 items
if (!proto.Categories.Contains(indexedFilter))
continue;
//CP14 end
_possibleGiftsSafe.Add(proto.ID);
}
}

View File

@@ -0,0 +1,108 @@
- type: entity
id: CP14WallmauntGarlandBase
abstract: true
parent:
- CP14BaseWallmount
categories: [ ForkFiltered ]
name: crystals garland
description: Carefully crafted sparkling crystals tied on a string. For a festive attitude.
components:
- type: Sprite
sprite: _CP14/Structures/Decoration/garland_wallmount.rsi
- type: Damageable
damageContainer: Inorganic
damageModifierSet: Glass
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 10
behaviors:
- !type:PlaySoundBehavior
sound:
collection: GlassBreak
- !type:SpawnEntitiesBehavior
spawn:
CP14QuartzShard:
min: 0
max: 1
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: PointLight
radius: 1.5
energy: 1
- type: MeleeSound
soundGroups:
Brute:
collection: GlassSmash
- type: entity
parent: CP14WallmauntGarlandBase
id: CP14WallmountGarlandRed
suffix: Red
components:
- type: Sprite
layers:
- state: string
- state: crystals
shader: unshaded
color: "#ff3d0b"
- type: PointLight
color: "#ff3d0b"
- type: entity
parent: CP14WallmauntGarlandBase
id: CP14WallmountGarlandYellow
suffix: Yellow
components:
- type: Sprite
layers:
- state: string
- state: crystals
shader: unshaded
color: "#ffe269"
- type: PointLight
color: "#ffe269"
- type: entity
parent: CP14WallmauntGarlandBase
id: CP14WallmountGarlandGreen
suffix: Green
components:
- type: Sprite
layers:
- state: string
- state: crystals
shader: unshaded
color: "#30be81"
- type: PointLight
color: "#30be81"
- type: entity
parent: CP14WallmauntGarlandBase
id: CP14WallmountGarlandPurple
suffix: Purple
components:
- type: Sprite
layers:
- state: string
- state: crystals
shader: unshaded
color: "#a878d1"
- type: PointLight
color: "#a878d1"
- type: entity
parent: CP14WallmauntGarlandBase
id: CP14WallmountGarlandBlue
suffix: Blue
components:
- type: Sprite
layers:
- state: string
- state: crystals
shader: unshaded
color: "#5eabeb"
- type: PointLight
color: "#5eabeb"

View File

@@ -16,6 +16,10 @@
- state: crystal1
map: ["random"]
shader: unshaded
- type: MeleeSound
soundGroups:
Brute:
collection: GlassSmash
- type: Damageable
damageContainer: Inorganic
damageModifierSet: Glass

Binary file not shown.

After

Width:  |  Height:  |  Size: 894 B

View File

@@ -0,0 +1,19 @@
{
"version": 1,
"license": "CLA",
"copyright": "By TheShuEd",
"size": {
"x": 32,
"y": 96
},
"states": [
{
"name": "string",
"directions": 4
},
{
"name": "crystals",
"directions": 4
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 932 B