Christmas trees now grant gifts. (#13118)

* Christmas trees now grant gifts.

* docs

* add holiday requirements, fix sound.

* doc

* remove redundant stuff

* rename GiftPackin to RandomGift.

* a word

* Update Content.Server/Holiday/Christmas/LimitedItemGiverSystem.cs

Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>

Co-authored-by: moonheart08 <moonheart08@users.noreply.github.com>
Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
This commit is contained in:
Moony
2022-12-20 16:34:34 -06:00
committed by GitHub
parent c3d2e93051
commit 0a45782532
8 changed files with 297 additions and 13 deletions

View File

@@ -0,0 +1,3 @@
gift-packin-contains = This present appears to contain {INDEFINITE($name)} {$name}.
christmas-tree-got-gift = After a bit of digging, you find a present with your name on it!
christmas-tree-no-gift = There isn't a gift under the tree for you...

View File

@@ -334,6 +334,7 @@
- type: entity
parent: BaseTreeConifer
id: FloraTreeChristmas02
suffix: PresentsGiver
name: christmas tree
components:
- type: Sprite
@@ -346,6 +347,19 @@
density: 4500
layer:
- WallLayer
- type: LimitedItemGiver
spawnEntries:
- id: PresentRandom
orGroup: present
- id: PresentRandomUnsafe
prob: 0.5
orGroup: present
- id: PresentRandomInsane
prob: 0.2
orGroup: present
receivedPopup: christmas-tree-got-gift
deniedPopup: christmas-tree-no-gift
requiredHoliday: FestiveSeason
- type: entity
parent: BaseTreeConifer

View File

@@ -1,32 +1,53 @@
- type: entity
id: Present
parent: BaseStorageItem
id: PresentBase
name: Present
suffix: Empty
description: A little box with incredible surprises inside.
abstract: true
components:
- type: Sprite
sprite: Objects/Decoration/present.rsi
netsync: false
layers:
- state: present
- type: entity
id: Present
parent: [PresentBase, BaseStorageItem]
suffix: Empty
components:
- type: Item
size: 30
- type: Storage
capacity: 30
- type: entity
id: PresentRandom
parent: BaseItem
name: Present
suffix: Filled Random
description: A little box with incredible surprises inside.
id: PresentRandomUnsafe
parent: [PresentBase, BaseItem]
suffix: Filled Unsafe
components:
- type: RandomGift
wrapper: PresentTrash
sound:
path: /Audio/Effects/unwrap.ogg
insaneMode: false
contentsViewers:
components:
- Ghost
- Santa
- type: entity
id: PresentRandomInsane
parent: PresentRandomUnsafe
suffix: Filled Insane
components:
- type: RandomGift
insaneMode: true
- type: entity
id: PresentRandom
parent: [PresentBase, BaseItem]
suffix: Filled Safe
components:
- type: Sprite
sprite: Objects/Decoration/present.rsi
netsync: false
layers:
- state: present
- type: SpawnItemsOnUse
items:
- id: PresentTrash