From 4cea96f6eb775e649e2ca8e973e86411cb1b46bc Mon Sep 17 00:00:00 2001 From: Ed <96445749+TheShuEd@users.noreply.github.com> Date: Fri, 13 Dec 2024 22:20:00 +0300 Subject: [PATCH] Garland (#673) * garland * presents filter --- .../Holiday/Christmas/RandomGiftSystem.cs | 8 ++ .../Structures/Decorations/garland.yml | 108 ++++++++++++++++++ .../_CP14/Entities/Structures/crystal.yml | 4 + .../garland_wallmount.rsi/crystals.png | Bin 0 -> 894 bytes .../garland_wallmount.rsi/meta.json | 19 +++ .../garland_wallmount.rsi/string.png | Bin 0 -> 932 bytes 6 files changed, 139 insertions(+) create mode 100644 Resources/Prototypes/_CP14/Entities/Structures/Decorations/garland.yml create mode 100644 Resources/Textures/_CP14/Structures/Decoration/garland_wallmount.rsi/crystals.png create mode 100644 Resources/Textures/_CP14/Structures/Decoration/garland_wallmount.rsi/meta.json create mode 100644 Resources/Textures/_CP14/Structures/Decoration/garland_wallmount.rsi/string.png 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 0000000000000000000000000000000000000000..cb5f00b0982050b13e95d7098810085bb2f74d1c GIT binary patch literal 894 zcmV-^1A+XBP)r!Z3SBeK~Mw{OKV?^g!PUIBuFyL?EN@1=W_QfI2W>d&gz(jT)t?ALqYFKY}MQK zh8q_idKl4k%UF!eM`^phA8@F8A5gv8-)p&g6G=-4N4M~_ZkR=3nTCbUqM>+KctFo+ z3E^X5zbOL>-zYs^<5$J$8hY( zu<`%^0n155K~#90?cF_Y>Od3*&>I%v))Fs;a1}>c75W*LC-?Rg}t2W#`~g!0~weiio&guV1e&Y?@~F zJt8gbu~qbrg5RyT0#XUDq)=0@-_z+75iuGvl{@u3zil^v$&VB&g`B!>>NTEI_=tZf zpswrL<(tBt&*!W{zRm4+%Vzrm000000091`t!Wvw$xf2IIul)@P$000000000000000000&#=@vWBS$iLz zUVD5+4u%gAGV-xtR*281pinodYtHlNlH^CYDaL_GWez zY2B~VwMei#q9ekkBWYrTM#oYYgWf0=!Jb<=X8MZ#spgJNYZH+;$d|9&0h=S=SAOjEW|feoqIK-HD+H%o3rD4ubiv5zqUz>%T-BS zEIA#~bH+V$_dfZ86;<*9dvD#(-dQE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