diff --git a/Content.Server/Holiday/Christmas/RandomGiftSystem.cs b/Content.Server/Holiday/Christmas/RandomGiftSystem.cs index 0816c2c36c..c5cde4b4bd 100644 --- a/Content.Server/Holiday/Christmas/RandomGiftSystem.cs +++ b/Content.Server/Holiday/Christmas/RandomGiftSystem.cs @@ -92,6 +92,9 @@ public sealed class RandomGiftSystem : EntitySystem var mapGridCompName = _componentFactory.GetComponentName(typeof(MapGridComponent)); var physicsCompName = _componentFactory.GetComponentName(typeof(PhysicsComponent)); + if (!_prototype.TryIndex("ForkFiltered", out var indexedFilter)) + return; + foreach (var proto in _prototype.EnumeratePrototypes()) { 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); } } diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Decorations/garland.yml b/Resources/Prototypes/_CP14/Entities/Structures/Decorations/garland.yml new file mode 100644 index 0000000000..fc2f1fd3b8 --- /dev/null +++ b/Resources/Prototypes/_CP14/Entities/Structures/Decorations/garland.yml @@ -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" + \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Structures/crystal.yml b/Resources/Prototypes/_CP14/Entities/Structures/crystal.yml index 67c991b149..3092319400 100644 --- a/Resources/Prototypes/_CP14/Entities/Structures/crystal.yml +++ b/Resources/Prototypes/_CP14/Entities/Structures/crystal.yml @@ -16,6 +16,10 @@ - state: crystal1 map: ["random"] shader: unshaded + - type: MeleeSound + soundGroups: + Brute: + collection: GlassSmash - type: Damageable damageContainer: Inorganic damageModifierSet: Glass diff --git a/Resources/Textures/_CP14/Structures/Decoration/garland_wallmount.rsi/crystals.png b/Resources/Textures/_CP14/Structures/Decoration/garland_wallmount.rsi/crystals.png new file mode 100644 index 0000000000..cb5f00b098 Binary files /dev/null and b/Resources/Textures/_CP14/Structures/Decoration/garland_wallmount.rsi/crystals.png differ diff --git a/Resources/Textures/_CP14/Structures/Decoration/garland_wallmount.rsi/meta.json b/Resources/Textures/_CP14/Structures/Decoration/garland_wallmount.rsi/meta.json new file mode 100644 index 0000000000..36cb3e28ee --- /dev/null +++ b/Resources/Textures/_CP14/Structures/Decoration/garland_wallmount.rsi/meta.json @@ -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 + } + ] +} diff --git a/Resources/Textures/_CP14/Structures/Decoration/garland_wallmount.rsi/string.png b/Resources/Textures/_CP14/Structures/Decoration/garland_wallmount.rsi/string.png new file mode 100644 index 0000000000..940ca57a42 Binary files /dev/null and b/Resources/Textures/_CP14/Structures/Decoration/garland_wallmount.rsi/string.png differ