From f5930bb5662362233d88f6e01733a25551aeab1a Mon Sep 17 00:00:00 2001 From: IProduceWidgets <107586145+IProduceWidgets@users.noreply.github.com> Date: Thu, 21 Nov 2024 09:20:11 -0500 Subject: [PATCH] Coal presents and chrimmas tree options. Presents no longer itemify (#33147) * Dont ensure ItemComp because it could lead to weirds, and also PickupOrDrop handles non-items already. * presents and tree * woops * reviews a --- .../Holiday/Christmas/RandomGiftSystem.cs | 1 - .../Entities/Objects/Decoration/flora.yml | 25 ++++++++++++++++--- .../Entities/Objects/Decoration/present.yml | 15 ++++++++--- .../Entities/Objects/Materials/ore.yml | 24 ++++++++++++++++++ Resources/migration.yml | 2 ++ 5 files changed, 59 insertions(+), 8 deletions(-) diff --git a/Content.Server/Holiday/Christmas/RandomGiftSystem.cs b/Content.Server/Holiday/Christmas/RandomGiftSystem.cs index 4603f45ed8..0816c2c36c 100644 --- a/Content.Server/Holiday/Christmas/RandomGiftSystem.cs +++ b/Content.Server/Holiday/Christmas/RandomGiftSystem.cs @@ -60,7 +60,6 @@ public sealed class RandomGiftSystem : EntitySystem 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(handsEnt); // For insane mode. if (component.Wrapper is not null) Spawn(component.Wrapper, coords); diff --git a/Resources/Prototypes/Entities/Objects/Decoration/flora.yml b/Resources/Prototypes/Entities/Objects/Decoration/flora.yml index 25ff782108..31bc24cca6 100644 --- a/Resources/Prototypes/Entities/Objects/Decoration/flora.yml +++ b/Resources/Prototypes/Entities/Objects/Decoration/flora.yml @@ -463,7 +463,7 @@ - type: entity parent: BaseTreeConifer id: FloraTreeChristmas02 - suffix: PresentsGiver + suffix: Safe Presents name: christmas tree components: - type: Sprite @@ -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 diff --git a/Resources/Prototypes/Entities/Objects/Decoration/present.yml b/Resources/Prototypes/Entities/Objects/Decoration/present.yml index 861caddd06..e9ddd3b517 100644 --- a/Resources/Prototypes/Entities/Objects/Decoration/present.yml +++ b/Resources/Prototypes/Entities/Objects/Decoration/present.yml @@ -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 diff --git a/Resources/Prototypes/Entities/Objects/Materials/ore.yml b/Resources/Prototypes/Entities/Objects/Materials/ore.yml index a5cd959c47..fd46fb40be 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/ore.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/ore.yml @@ -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 diff --git a/Resources/migration.yml b/Resources/migration.yml index a09986ebd8..ab3193e4c9 100644 --- a/Resources/migration.yml +++ b/Resources/migration.yml @@ -476,5 +476,7 @@ RightLegBorgJanitor: RightLegBorg HeadBorgJanitor: LightHeadBorg TorsoBorgJanitor: TorsoBorg +# 2024-11-17 +PresentRandomAsh: PresentRandomCoal # 2024-11-19 CrateCrewMonitoringBoards: CrateCrewMonitoring -- 2.51.2