Skip to content

Commit

Permalink
Coal presents and chrimmas tree options. Presents no longer itemify (s…
Browse files Browse the repository at this point in the history
…pace-wizards#33147)

* Dont ensure ItemComp because it could lead to weirds, and also PickupOrDrop handles non-items already.

* presents and tree

* woops

* reviews a
  • Loading branch information
IProduceWidgets authored Nov 21, 2024
1 parent 0f0b141 commit f5930bb
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 8 deletions.
1 change: 0 additions & 1 deletion Content.Server/Holiday/Christmas/RandomGiftSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ private void OnUseInHand(EntityUid uid, RandomGiftComponent component, UseInHand
var coords = Transform(args.User).Coordinates;
var handsEnt = Spawn(component.SelectedEntity, coords);
_adminLogger.Add(LogType.EntitySpawn, LogImpact.Low, $"{ToPrettyString(args.User)} used {ToPrettyString(uid)} which spawned {ToPrettyString(handsEnt)}");
EnsureComp<ItemComponent>(handsEnt); // For insane mode.
if (component.Wrapper is not null)
Spawn(component.Wrapper, coords);

Expand Down
25 changes: 21 additions & 4 deletions Resources/Prototypes/Entities/Objects/Decoration/flora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@
- type: entity
parent: BaseTreeConifer
id: FloraTreeChristmas02
suffix: PresentsGiver
suffix: Safe Presents
name: christmas tree
components:
- type: Sprite
Expand All @@ -481,16 +481,33 @@
spawnEntries:
- id: PresentRandom
orGroup: present
- id: PresentRandomCash
prob: 0.20
- id: PresentRandomCash # buy your own.
prob: 0.1
orGroup: present
- id: PresentRandomAsh
- id: PresentRandomCoal # naughty
prob: 0.05
orGroup: present
receivedPopup: christmas-tree-got-gift
deniedPopup: christmas-tree-no-gift
requiredHoliday: FestiveSeason

- type: entity
parent: FloraTreeChristmas02
id: FloraTreeChristmas03
suffix: Insane Presents
name: christmas tree
components:
- type: LimitedItemGiver
spawnEntries:
- id: PresentRandom
orGroup: present
- id: PresentRandomUnsafe
prob: 0.5
orGroup: present
- id: PresentRandomInsane
prob: 0.2
orGroup: present

- type: entity
parent: BaseTreeConifer
id: FloraTreeStumpConifer
Expand Down
15 changes: 12 additions & 3 deletions Resources/Prototypes/Entities/Objects/Decoration/present.yml
Original file line number Diff line number Diff line change
Expand Up @@ -374,14 +374,23 @@
path: /Audio/Effects/unwrap.ogg

- type: entity
id: PresentRandomAsh
id: PresentRandomCoal
parent: [PresentBase, BaseItem]
suffix: Filled Ash
suffix: Filled Coal
components:
- type: SpawnItemsOnUse
items:
- id: PresentTrash
- id: Ash # No coal yet!
- id: Coal1
orGroup: GiftPool
- id: Coal5
prob: .4
orGroup: GiftPool
- id: Coal10
prob: .2
orGroup: GiftPool
- id: Coal15
prob: .1
orGroup: GiftPool
sound:
path: /Audio/Effects/unwrap.ogg
Expand Down
24 changes: 24 additions & 0 deletions Resources/Prototypes/Entities/Objects/Materials/ore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,30 @@
- type: Stack
count: 1

- type: entity
parent: Coal
id: Coal5
suffix: Five
components:
- type: Stack
count: 5

- type: entity
parent: Coal
id: Coal10
suffix: Ten
components:
- type: Stack
count: 10

- type: entity
parent: Coal
id: Coal15
suffix: Fifteen
components:
- type: Stack
count: 15

- type: entity
parent: OreBase
id: SaltOre
Expand Down
2 changes: 2 additions & 0 deletions Resources/migration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -476,5 +476,7 @@ RightLegBorgJanitor: RightLegBorg
HeadBorgJanitor: LightHeadBorg
TorsoBorgJanitor: TorsoBorg

# 2024-11-17
PresentRandomAsh: PresentRandomCoal
# 2024-11-19
CrateCrewMonitoringBoards: CrateCrewMonitoring

0 comments on commit f5930bb

Please sign in to comment.