From 78c51b6e07201f57695303b1512a73c13b7cbacb Mon Sep 17 00:00:00 2001 From: deltanedas <39013340+deltanedas@users.noreply.github.com> Date: Tue, 17 Dec 2024 18:17:41 +0000 Subject: [PATCH 01/21] make some ores more common on lavaland planets (#2441) Co-authored-by: deltanedas <@deltanedas:kde.org> --- .../DeltaV/Procedural/biome_ore_templates.yml | 46 +++++++++++++++++++ Resources/Prototypes/DeltaV/planets.yml | 8 ++-- 2 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 Resources/Prototypes/DeltaV/Procedural/biome_ore_templates.yml diff --git a/Resources/Prototypes/DeltaV/Procedural/biome_ore_templates.yml b/Resources/Prototypes/DeltaV/Procedural/biome_ore_templates.yml new file mode 100644 index 00000000000..b264f014844 --- /dev/null +++ b/Resources/Prototypes/DeltaV/Procedural/biome_ore_templates.yml @@ -0,0 +1,46 @@ +# these have higher group size so more ores spawns + +# Plasma +- type: biomeMarkerLayer + id: OrePlasma3 + entityMask: + AsteroidRock: AsteroidRockPlasma + WallRock: WallRockPlasma + WallRockBasalt: WallRockBasaltPlasma + WallRockChromite: WallRockChromitePlasma + WallRockSand: WallRockSandPlasma + WallRockSnow: WallRockSnowPlasma + maxCount: 12 + minGroupSize: 12 + maxGroupSize: 24 + radius: 4 + +# Uranium +- type: biomeMarkerLayer + id: OreUranium2 + entityMask: + AsteroidRock: AsteroidRockUranium + WallRock: WallRockUranium + WallRockBasalt: WallRockBasaltUranium + WallRockChromite: WallRockChromiteUranium + WallRockSand: WallRockSandUranium + WallRockSnow: WallRockSnowUranium + maxCount: 15 + minGroupSize: 8 + maxGroupSize: 16 + radius: 4 + +# Diamond +- type: biomeMarkerLayer + id: OreDiamond2 + entityMask: + AsteroidRock: AsteroidRockDiamond + WallRock: WallRockDiamond + WallRockBasalt: WallRockBasaltDiamond + WallRockChromite: WallRockChromiteDiamond + WallRockSand: WallRockSandDiamond + WallRockSnow: WallRockSnowDiamond + maxCount: 6 + minGroupSize: 2 + maxGroupSize: 4 + radius: 4 diff --git a/Resources/Prototypes/DeltaV/planets.yml b/Resources/Prototypes/DeltaV/planets.yml index 9491c621a89..77fbf10453f 100644 --- a/Resources/Prototypes/DeltaV/planets.yml +++ b/Resources/Prototypes/DeltaV/planets.yml @@ -20,9 +20,9 @@ - OreCoal - OreGold - OreSilver - - OrePlasma + - OrePlasma3 - OreUranium - - OreDiamond + - OreDiamond2 - OreArtifactFragment - type: planet @@ -47,7 +47,7 @@ - OreCoal - OreGold - OreSilver - - OrePlasma - - OreUranium + - OrePlasma3 + - OreUranium2 - OreDiamond - OreArtifactFragment From 7200dfbad6b657747c1732163a9793832d2f1ef0 Mon Sep 17 00:00:00 2001 From: Delta-V bot <135767721+DeltaV-Bot@users.noreply.github.com> Date: Tue, 17 Dec 2024 19:18:00 +0100 Subject: [PATCH 02/21] Automatic changelog update --- Resources/Changelog/DeltaVChangelog.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Resources/Changelog/DeltaVChangelog.yml b/Resources/Changelog/DeltaVChangelog.yml index 80c31975690..8f49f7fea6a 100644 --- a/Resources/Changelog/DeltaVChangelog.yml +++ b/Resources/Changelog/DeltaVChangelog.yml @@ -1,11 +1,4 @@ Entries: -- author: DangerRevolution - changes: - - message: Moths can now eat skirts - type: Fix - id: 283 - time: '2024-03-17T17:45:11.0000000+00:00' - url: https://github.com/DeltaV-Station/Delta-v/pull/976 - author: UnicornOnLSD changes: - message: pebble minor patch 3 @@ -3818,3 +3811,10 @@ id: 782 time: '2024-12-17T12:49:40.0000000+00:00' url: https://github.com/DeltaV-Station/Delta-v/pull/2378 +- author: deltanedas + changes: + - message: Plasma and diamonds are more abundant on lavaland. + type: Tweak + id: 783 + time: '2024-12-17T18:17:41.0000000+00:00' + url: https://github.com/DeltaV-Station/Delta-v/pull/2441 From 9de9a172b33e1b29022f7bdfcbf34975a0ecc448 Mon Sep 17 00:00:00 2001 From: Blitz <73762869+BlitzTheSquishy@users.noreply.github.com> Date: Wed, 18 Dec 2024 12:12:44 +1100 Subject: [PATCH 03/21] New Blood Based Soda! (#2250) * NEW DRINKY!! * flavour is now not broken :) * AAAAAAAAAAAAAAAAAAAAAAAAAA * Milons annoyances :blunt: * "untouch" I dont like using the web interface, its also superfluous spaces Signed-off-by: Blitz <73762869+BlitzTheSquishy@users.noreply.github.com> * Update drinks_cans.yml Signed-off-by: Blitz <73762869+BlitzTheSquishy@users.noreply.github.com> * Update flavor-profiles.ftl Signed-off-by: Blitz <73762869+BlitzTheSquishy@users.noreply.github.com> * Update meta.json Signed-off-by: Blitz <73762869+BlitzTheSquishy@users.noreply.github.com> * deltanedas fix --------- Signed-off-by: Blitz <73762869+BlitzTheSquishy@users.noreply.github.com> Co-authored-by: Milon --- .../en-US/deltav/flavors/flavor-profiles.ftl | 1 + .../reagents/meta/consumable/drink/soda.ftl | 2 ++ .../VendingMachines/Inventories/gib.yml | 1 + .../Objects/Consumable/Drinks/drinks_cans.yml | 15 +++++++++++ .../Prototypes/DeltaV/Flavors/flavors.yml | 5 ++++ .../DeltaV/Reagents/Consumable/Drink/soda.yml | 22 +++++++++++++++ .../DeltaV/Recipes/Reactions/drinks.yml | 12 +++++++++ .../Drinks/drgibbbloodred.rsi/icon.png | Bin 0 -> 463 bytes .../Drinks/drgibbbloodred.rsi/icon_open.png | Bin 0 -> 493 bytes .../Drinks/drgibbbloodred.rsi/inhand-left.png | Bin 0 -> 435 bytes .../drgibbbloodred.rsi/inhand-right.png | Bin 0 -> 462 bytes .../Drinks/drgibbbloodred.rsi/meta.json | 25 ++++++++++++++++++ 12 files changed, 83 insertions(+) create mode 100644 Resources/Locale/en-US/deltav/reagents/meta/consumable/drink/soda.ftl create mode 100644 Resources/Prototypes/DeltaV/Entities/Objects/Consumable/Drinks/drinks_cans.yml create mode 100644 Resources/Prototypes/DeltaV/Reagents/Consumable/Drink/soda.yml create mode 100644 Resources/Textures/DeltaV/Objects/Consumable/Drinks/drgibbbloodred.rsi/icon.png create mode 100644 Resources/Textures/DeltaV/Objects/Consumable/Drinks/drgibbbloodred.rsi/icon_open.png create mode 100644 Resources/Textures/DeltaV/Objects/Consumable/Drinks/drgibbbloodred.rsi/inhand-left.png create mode 100644 Resources/Textures/DeltaV/Objects/Consumable/Drinks/drgibbbloodred.rsi/inhand-right.png create mode 100644 Resources/Textures/DeltaV/Objects/Consumable/Drinks/drgibbbloodred.rsi/meta.json diff --git a/Resources/Locale/en-US/deltav/flavors/flavor-profiles.ftl b/Resources/Locale/en-US/deltav/flavors/flavor-profiles.ftl index 6c93c98ed3c..51b345aa339 100644 --- a/Resources/Locale/en-US/deltav/flavors/flavor-profiles.ftl +++ b/Resources/Locale/en-US/deltav/flavors/flavor-profiles.ftl @@ -29,6 +29,7 @@ flavor-complex-blellow = like an impossible color flavor-complex-candy-strawberry = like strawberries flavor-complex-candy-bubblegum = like bubble gum flavor-complex-double-ice-cream = like ice cream, twice +flavor-complex-drgibbbloodred = like severe malpractice candy-flavor-profile = This one is supposed to taste {$flavor}. candy-flavor-profile-multiple = This one is supposed to taste {$flavors} and {$lastFlavor}. diff --git a/Resources/Locale/en-US/deltav/reagents/meta/consumable/drink/soda.ftl b/Resources/Locale/en-US/deltav/reagents/meta/consumable/drink/soda.ftl new file mode 100644 index 00000000000..156f8aaa73a --- /dev/null +++ b/Resources/Locale/en-US/deltav/reagents/meta/consumable/drink/soda.ftl @@ -0,0 +1,2 @@ +reagent-name-dr-gibb-blood-red = Dr. Gibb Blood Red +reagent-desc-dr-gibb-blood-red = A drink to quench YOUR blood thirst. diff --git a/Resources/Prototypes/Catalog/VendingMachines/Inventories/gib.yml b/Resources/Prototypes/Catalog/VendingMachines/Inventories/gib.yml index 98513a48a4a..171eb196f77 100644 --- a/Resources/Prototypes/Catalog/VendingMachines/Inventories/gib.yml +++ b/Resources/Prototypes/Catalog/VendingMachines/Inventories/gib.yml @@ -2,6 +2,7 @@ id: DrGibbInventory startingInventory: DrinkDrGibbCan: 4 + DrinkDrGibbBloodRedCan: 2 # Delta-V DrinkGrapeCan: 2 DrinkRootBeerCan: 2 DrinkIcedTeaCan: 2 diff --git a/Resources/Prototypes/DeltaV/Entities/Objects/Consumable/Drinks/drinks_cans.yml b/Resources/Prototypes/DeltaV/Entities/Objects/Consumable/Drinks/drinks_cans.yml new file mode 100644 index 00000000000..a7e16b8c33c --- /dev/null +++ b/Resources/Prototypes/DeltaV/Entities/Objects/Consumable/Drinks/drinks_cans.yml @@ -0,0 +1,15 @@ +- type: entity + parent: DrinkCanBaseFull + id: DrinkDrGibbBloodRedCan + name: Dr. Gibb Blood Red can + description: A drink to quench YOUR bloodthirst. + components: + - type: SolutionContainerManager + solutions: + drink: + maxVol: 30 + reagents: + - ReagentId: DrGibbBloodRed + Quantity: 30 + - type: Sprite + sprite: DeltaV/Objects/Consumable/Drinks/drgibbbloodred.rsi diff --git a/Resources/Prototypes/DeltaV/Flavors/flavors.yml b/Resources/Prototypes/DeltaV/Flavors/flavors.yml index 8d0d01efa0b..9ed9b3003f4 100644 --- a/Resources/Prototypes/DeltaV/Flavors/flavors.yml +++ b/Resources/Prototypes/DeltaV/Flavors/flavors.yml @@ -121,6 +121,11 @@ flavorType: Complex description: flavor-complex-blellow +- type: flavor + id: drgibbbloodred + flavorType: Complex + description: flavor-complex-drgibbbloodred + # this is prefixed with "candy" to avoid clashes with potential future strawberries upstream - type: flavor id: candystrawberry diff --git a/Resources/Prototypes/DeltaV/Reagents/Consumable/Drink/soda.yml b/Resources/Prototypes/DeltaV/Reagents/Consumable/Drink/soda.yml new file mode 100644 index 00000000000..42db09785bd --- /dev/null +++ b/Resources/Prototypes/DeltaV/Reagents/Consumable/Drink/soda.yml @@ -0,0 +1,22 @@ +- type: reagent + id: DrGibbBloodRed + name: reagent-name-dr-gibb-blood-red + parent: BaseSoda + desc: reagent-desc-dr-gibb-blood-red + physicalDesc: reagent-physical-desc-fizzy + flavor: drgibbbloodred + color: "#570303" + metabolisms: + Drink: + effects: + - !type:SatiateThirst + factor: 2.0 + conditions: + - !type:OrganType + type: Human + shouldHave: false + Food: + effects: + - !type:AdjustReagent + reagent: UncookedAnimalProteins + amount: 0.05 diff --git a/Resources/Prototypes/DeltaV/Recipes/Reactions/drinks.yml b/Resources/Prototypes/DeltaV/Recipes/Reactions/drinks.yml index 60bb26eaa2f..e64c347e445 100644 --- a/Resources/Prototypes/DeltaV/Recipes/Reactions/drinks.yml +++ b/Resources/Prototypes/DeltaV/Recipes/Reactions/drinks.yml @@ -100,3 +100,15 @@ amount: 1 products: DoubleIceCream: 3 + +- type: reaction + id: DrGibbBloodRed + reactants: + DrGibb: + amount: 3 + Blood: + amount: 2 + Sugar: + amount: 1 + products: + DrGibbBloodRed: 6 diff --git a/Resources/Textures/DeltaV/Objects/Consumable/Drinks/drgibbbloodred.rsi/icon.png b/Resources/Textures/DeltaV/Objects/Consumable/Drinks/drgibbbloodred.rsi/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..9c45adab3b8547003edc71893454616e795bf75d GIT binary patch literal 463 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^T<`JOJ0ArbD$ zDG~_>EDn4#?y*WRVR3U#$Y^s2NjqNujYiG8Hpv`*6#DxhU&BX7KBeP=D%J~@8#X_Dbagh5`Fp!0i_&j; zcNi7^ZTUA-rJc!>??Q3{!|}g;;qn1Z@=q2NxfgG^p~`ltt9+8|g;NI(1oSRt3rMGgNE+1uFAn;=$!zX=~JJp}N8{hF&C;}DST`|}3 zhTDwB+%mSqkJuIVU)E%C2;9)x*!VE`HDB9y_j^sc&uqd^Zut3B`IjrB1`CVD%mdT@ zd(A!gVTo<0W5?{)#80Q)zno;XPx$jY&j7R9Hu2WEfz;IKcKZj5=U61V%%EDj{(F`t|>snwn&pMV6+h%#Q!a<%gNE zGMHPC5=ydpBx?X!9vkM!ps%eCwsh5|-C%lJ|4fEkSND)?9!VNNmV1YnN zSWU}?A*(2zArPqQ($0Vc)-BGKywFNWME*JBQD4A?&}}8 zGmd_F24>U60iY20p#btP1l)V`i-GPAcp)yw@ZG4LLD)u^fo*mM!{P@ZztbrMKvA%T zfq~&u>kfvuN8W-h<~&!)u=(X9`b7aK1Ozylz?T0?ox$*=J&8exn}uQW%SW_NgrGFw z!@$5W*>fq_0g~6N=^F(w2dq(00Q(*k4c`x!(k}!+X#iw7EC+ySy5$0pWuVd!WPPlH z0>xPnWFAQ+AuR91ie%&hk<=0prk5-SU@3{o78-THXb6mk008w4n<3S}Y1#k)01jnX jNoGw=04e|g00;m8000000Mb*F00000NkvXXu0mjfO`*+K literal 0 HcmV?d00001 diff --git a/Resources/Textures/DeltaV/Objects/Consumable/Drinks/drgibbbloodred.rsi/inhand-left.png b/Resources/Textures/DeltaV/Objects/Consumable/Drinks/drgibbbloodred.rsi/inhand-left.png new file mode 100644 index 0000000000000000000000000000000000000000..aba54f1fbf748e0e5ca3ff1ed611f73fafce0987 GIT binary patch literal 435 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=jKx9jP7LeL$-D%zgFRgwLn`9l z&Qjz%6d>Tjex9?6Ekt(~3$s|Gnyr)bD(OqgCK)VZKEfv3x{SZD{P4G1wa@v`6Mue# znfq#Q&zh_FF@4&P--j7;93HXkVd~_5(7z!3fc69n#`O-5n11L#5dFZV;@7Z?Dff1p z&H4QvzxTNZicJ1oKhbjD&nHcfH(XxD+3ntWebvE_ftNPbPnF(%+3VN_U4gRF_S&t> zo*jGReYZ7x>#^QDGowtHBF-64dEYoon$hI5j?MkU|CucqZcJD%!g!~#fbE}j!z2FI zb*rRUm;+`@>|W2CARKynGh>!;^7pNbIg7F?%^Y%*-t04L@D0&D&$hz1=k9g34V|l= z-elO?x$*Zc2D8AeHqr~s49nuB52&r0md<=d&FtOj9kLV58Vb!7cpD1)75Ecg**4iU zto+V#i9tfXfH@%`Px$Zb?KzRCr$PnlWy|KoCVgJtyD{sobVUq9H9s>c~g1B5H(u1S@q4+N43EPV0&@ z_yqJD!3Abn#Q3lGyIrqm=FJ9H7mS+2!ISIoPb84Z~^oZ)Cgz<3MZfuC|m%2 z1vCO0fx-!xBhYnSsH*CQsqcH#b#3k$i)l)(QN`?+ZFo5~I4@g#o|>pVV?apBGrE}X z-7y@tEBt`>%kc(;&F+Zz?JByi=o{PlBK%zjdH}EU1)9qcU03vtzd-l`=mC5HSl?l3 zG=MQ?+9Rd_cu;1JAp@AZm=O z9go~(fCpvf7&3slJ07{o01wK{F=PO9cRX^F0Unf@VLjZC(Gw@UZIh+}IDgf)@Ijlc40yz|DeO z1E$_#tG<6stxiD-cRhgs000hUSV?A0O#mtY000O800000007cclK=n!07*qoM6N<$ Eg1^7E)Bpeg literal 0 HcmV?d00001 diff --git a/Resources/Textures/DeltaV/Objects/Consumable/Drinks/drgibbbloodred.rsi/meta.json b/Resources/Textures/DeltaV/Objects/Consumable/Drinks/drgibbbloodred.rsi/meta.json new file mode 100644 index 00000000000..27218dea25f --- /dev/null +++ b/Resources/Textures/DeltaV/Objects/Consumable/Drinks/drgibbbloodred.rsi/meta.json @@ -0,0 +1,25 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "https://github.com/discordia-space/CEV-Eris/raw/9c980cb9bc84d07b1c210c5447798af525185f80/icons/obj/food.dmi, Edit by Yuukitten", + "states": [ + { + "name": "icon" + }, + { + "name": "icon_open" + }, + { + "name": "inhand-right", + "directions": 4 + }, + { + "name": "inhand-left", + "directions": 4 + } + ] + } From b84986e4fb01bc6fae1fc41424ef6034a2b7937f Mon Sep 17 00:00:00 2001 From: Delta-V bot <135767721+DeltaV-Bot@users.noreply.github.com> Date: Wed, 18 Dec 2024 02:13:03 +0100 Subject: [PATCH 04/21] Automatic changelog update --- Resources/Changelog/DeltaVChangelog.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Resources/Changelog/DeltaVChangelog.yml b/Resources/Changelog/DeltaVChangelog.yml index 8f49f7fea6a..c5ac5676c34 100644 --- a/Resources/Changelog/DeltaVChangelog.yml +++ b/Resources/Changelog/DeltaVChangelog.yml @@ -1,11 +1,4 @@ Entries: -- author: UnicornOnLSD - changes: - - message: pebble minor patch 3 - type: Tweak - id: 284 - time: '2024-03-18T18:35:38.0000000+00:00' - url: https://github.com/DeltaV-Station/Delta-v/pull/977 - author: DangerRevolution and Noctis changes: - message: Added lunchboxes to the chefvend and dinnerwarevend for the Chef to fill @@ -3818,3 +3811,11 @@ id: 783 time: '2024-12-17T18:17:41.0000000+00:00' url: https://github.com/DeltaV-Station/Delta-v/pull/2441 +- author: BlitzTheSquishy & Yuukitten + changes: + - message: Brand new drink from the people that brought you Dr. Gibb, Dr Gibb Blood-Red! + In a Dr. Gibb vendor near you! + type: Add + id: 784 + time: '2024-12-18T01:12:44.0000000+00:00' + url: https://github.com/DeltaV-Station/Delta-v/pull/2250 From 63b9a0516922db9b1482148738643d6dff6c7eab Mon Sep 17 00:00:00 2001 From: Stop-Signs Date: Tue, 17 Dec 2024 19:26:18 -0600 Subject: [PATCH 05/21] Emag for fugi (#2374) * Meow * Meow --- Resources/Locale/en-US/deltav/fugitive/sets.ftl | 6 ++++++ .../Prototypes/DeltaV/Catalog/fugitive_sets.yml | 12 ++++++++++++ .../DeltaV/Entities/Objects/Specific/fugitive.yml | 2 ++ 3 files changed, 20 insertions(+) diff --git a/Resources/Locale/en-US/deltav/fugitive/sets.ftl b/Resources/Locale/en-US/deltav/fugitive/sets.ftl index bc1361dc352..cb4bb4e735f 100644 --- a/Resources/Locale/en-US/deltav/fugitive/sets.ftl +++ b/Resources/Locale/en-US/deltav/fugitive/sets.ftl @@ -22,3 +22,9 @@ fugitive-set-infiltrator-name = infiltrator's kit fugitive-set-infiltrator-description = Use an Agent ID to steal access from others and go anywhere. Your freedom implanter can be used as a plan B if all else fails. + +fugitive-set-disruptor-name = disruptor's kit +fugitive-set-disruptor-description = + Hack the stations various systems and use them to your advantage. + Comes with a cryptographic sequencer and camera bug. + diff --git a/Resources/Prototypes/DeltaV/Catalog/fugitive_sets.yml b/Resources/Prototypes/DeltaV/Catalog/fugitive_sets.yml index 4dc38e493c2..aad6f781bd0 100644 --- a/Resources/Prototypes/DeltaV/Catalog/fugitive_sets.yml +++ b/Resources/Prototypes/DeltaV/Catalog/fugitive_sets.yml @@ -59,3 +59,15 @@ - AgentIDCard - FreedomImplanter - ClothingMaskGasSyndicate + +- type: thiefBackpackSet + id: FugitiveDisruptor + name: fugitive-set-disruptor-name + description: fugitive-set-disruptor-description + sprite: + sprite: Objects/Tools/emag.rsi + state: icon + content: + - Emag + - CameraBug + diff --git a/Resources/Prototypes/DeltaV/Entities/Objects/Specific/fugitive.yml b/Resources/Prototypes/DeltaV/Entities/Objects/Specific/fugitive.yml index 305a9a801d3..7558a322c00 100644 --- a/Resources/Prototypes/DeltaV/Entities/Objects/Specific/fugitive.yml +++ b/Resources/Prototypes/DeltaV/Entities/Objects/Specific/fugitive.yml @@ -13,3 +13,5 @@ - FugitiveGhost - FugitiveLeverage - FugitiveInfiltrator + - FugitiveDisruptor + From 2d96bb3b83b223336ec68d24d27cceb04015f243 Mon Sep 17 00:00:00 2001 From: Delta-V bot <135767721+DeltaV-Bot@users.noreply.github.com> Date: Wed, 18 Dec 2024 02:26:38 +0100 Subject: [PATCH 06/21] Automatic changelog update --- Resources/Changelog/DeltaVChangelog.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Resources/Changelog/DeltaVChangelog.yml b/Resources/Changelog/DeltaVChangelog.yml index c5ac5676c34..8681734abc6 100644 --- a/Resources/Changelog/DeltaVChangelog.yml +++ b/Resources/Changelog/DeltaVChangelog.yml @@ -1,12 +1,4 @@ Entries: -- author: DangerRevolution and Noctis - changes: - - message: Added lunchboxes to the chefvend and dinnerwarevend for the Chef to fill - or hand out pre-made! - type: Add - id: 285 - time: '2024-03-19T11:39:39.0000000+00:00' - url: https://github.com/DeltaV-Station/Delta-v/pull/980 - author: rosieposieeee changes: - message: Added Corpsman-only access and airlocks. @@ -3819,3 +3811,10 @@ id: 784 time: '2024-12-18T01:12:44.0000000+00:00' url: https://github.com/DeltaV-Station/Delta-v/pull/2250 +- author: Stop-Signs + changes: + - message: A new loadout is available in the fugitives stash + type: Add + id: 785 + time: '2024-12-18T01:26:19.0000000+00:00' + url: https://github.com/DeltaV-Station/Delta-v/pull/2374 From 85a29fbdf4773dd7b266b335a45db94d8dc4ad76 Mon Sep 17 00:00:00 2001 From: deltanedas <39013340+deltanedas@users.noreply.github.com> Date: Wed, 18 Dec 2024 01:27:23 +0000 Subject: [PATCH 07/21] add ash storms to lavaland (#2445) * add SaturationLoss to LungComponent * add code for ash storms * add ash storms to lavaland * add ashwalker mob * :trollface: --------- Co-authored-by: deltanedas <@deltanedas:kde.org> --- .../Body/Components/LungComponent.cs | 7 ++ .../Body/Systems/RespiratorSystem.cs | 10 ++- .../DeltaV/Weather/WeatherEffectsSystem.cs | 82 +++++++++++++++++++ .../Weather/WeatherSchedulerComponent.cs | 58 +++++++++++++ .../DeltaV/Weather/WeatherSchedulerSystem.cs | 75 +++++++++++++++++ .../Components/AshStormImmuneComponent.cs | 9 ++ Content.Shared/Weather/SharedWeatherSystem.cs | 1 + Content.Shared/Weather/WeatherComponent.cs | 12 +++ Content.Shared/Weather/WeatherPrototype.cs | 15 ++++ .../Locale/en-US/deltav/weather/ashstorm.ftl | 3 + .../DeltaV/Body/Organs/ashwalker.yml | 9 ++ .../DeltaV/Body/Prototypes/ashwalker.yml | 50 +++++++++++ .../Entities/Mobs/Species/ashwalker.yml | 11 +++ Resources/Prototypes/DeltaV/planets.yml | 20 +++++ Resources/Prototypes/weather.yml | 6 ++ 15 files changed, 367 insertions(+), 1 deletion(-) create mode 100644 Content.Server/DeltaV/Weather/WeatherEffectsSystem.cs create mode 100644 Content.Server/DeltaV/Weather/WeatherSchedulerComponent.cs create mode 100644 Content.Server/DeltaV/Weather/WeatherSchedulerSystem.cs create mode 100644 Content.Shared/DeltaV/Weather/Components/AshStormImmuneComponent.cs create mode 100644 Resources/Locale/en-US/deltav/weather/ashstorm.ftl create mode 100644 Resources/Prototypes/DeltaV/Body/Organs/ashwalker.yml create mode 100644 Resources/Prototypes/DeltaV/Body/Prototypes/ashwalker.yml create mode 100644 Resources/Prototypes/DeltaV/Entities/Mobs/Species/ashwalker.yml diff --git a/Content.Server/Body/Components/LungComponent.cs b/Content.Server/Body/Components/LungComponent.cs index 72af4d9e63a..256c6d67298 100644 --- a/Content.Server/Body/Components/LungComponent.cs +++ b/Content.Server/Body/Components/LungComponent.cs @@ -34,4 +34,11 @@ public sealed partial class LungComponent : Component /// [DataField] public ProtoId Alert = "LowOxygen"; + + /// + /// DeltaV: Multiplier on saturation passively lost. + /// Higher values require more air, lower require less. + /// + [DataField] + public float SaturationLoss = 1f; } diff --git a/Content.Server/Body/Systems/RespiratorSystem.cs b/Content.Server/Body/Systems/RespiratorSystem.cs index 6209f00419d..b5975326b3e 100644 --- a/Content.Server/Body/Systems/RespiratorSystem.cs +++ b/Content.Server/Body/Systems/RespiratorSystem.cs @@ -74,7 +74,15 @@ public override void Update(float frameTime) if (_mobState.IsDead(uid)) continue; - UpdateSaturation(uid, -(float) respirator.UpdateInterval.TotalSeconds, respirator); + // Begin DeltaV Code: Addition: + var organs = _bodySystem.GetBodyOrganEntityComps((uid, body)); + var multiplier = -1f; + foreach (var (_, lung, _) in organs) + { + multiplier *= lung.SaturationLoss; + } + // End DeltaV Code + UpdateSaturation(uid, multiplier * (float) respirator.UpdateInterval.TotalSeconds, respirator); // DeltaV: use multiplier instead of negating if (!_mobState.IsIncapacitated(uid)) // cannot breathe in crit. { diff --git a/Content.Server/DeltaV/Weather/WeatherEffectsSystem.cs b/Content.Server/DeltaV/Weather/WeatherEffectsSystem.cs new file mode 100644 index 00000000000..11a29e05cc8 --- /dev/null +++ b/Content.Server/DeltaV/Weather/WeatherEffectsSystem.cs @@ -0,0 +1,82 @@ +using Content.Shared.Damage; +using Content.Shared.Mobs; +using Content.Shared.Mobs.Components; +using Content.Shared.Weather; +using Content.Shared.Whitelist; +using Robust.Shared.Map.Components; +using Robust.Shared.Prototypes; +using Robust.Shared.Timing; + +namespace Content.Shared.DeltaV.Weather; + +/// +/// Handles weather damage for exposed entities. +/// +public sealed partial class WeatherEffectsSystem : EntitySystem +{ + [Dependency] private readonly DamageableSystem _damageable = default!; + [Dependency] private readonly EntityWhitelistSystem _whitelist = default!; + [Dependency] private readonly IGameTiming _timing = default!; + [Dependency] private readonly IPrototypeManager _proto = default!; + [Dependency] private readonly SharedMapSystem _map = default!; + [Dependency] private readonly SharedWeatherSystem _weather = default!; + + private EntityQuery _gridQuery; + + public override void Initialize() + { + base.Initialize(); + + _gridQuery = GetEntityQuery(); + } + + public override void Update(float frameTime) + { + base.Update(frameTime); + + var now = _timing.CurTime; + var query = EntityQueryEnumerator(); + while (query.MoveNext(out var map, out var weather)) + { + if (now < weather.NextUpdate) + continue; + + weather.NextUpdate = now + weather.UpdateDelay; + + foreach (var (id, data) in weather.Weather) + { + // start and end do no damage + if (data.State != WeatherState.Running) + continue; + + UpdateDamage(map, id); + } + } + } + + private void UpdateDamage(EntityUid map, ProtoId id) + { + var weather = _proto.Index(id); + if (weather.Damage is not {} damage) + return; + + var query = EntityQueryEnumerator(); + while (query.MoveNext(out var uid, out var mob, out var xform)) + { + // don't give dead bodies 10000 burn, that's not fun for anyone + if (xform.MapUid != map || mob.CurrentState == MobState.Dead) + continue; + + // if not in space, check for being indoors + if (xform.GridUid is {} gridUid && _gridQuery.TryComp(gridUid, out var grid)) + { + var tile = _map.GetTileRef((gridUid, grid), xform.Coordinates); + if (!_weather.CanWeatherAffect(gridUid, grid, tile)) + continue; + } + + if (_whitelist.IsBlacklistFailOrNull(weather.DamageBlacklist, uid)) + _damageable.TryChangeDamage(uid, damage, interruptsDoAfters: false); + } + } +} diff --git a/Content.Server/DeltaV/Weather/WeatherSchedulerComponent.cs b/Content.Server/DeltaV/Weather/WeatherSchedulerComponent.cs new file mode 100644 index 00000000000..ac69c957057 --- /dev/null +++ b/Content.Server/DeltaV/Weather/WeatherSchedulerComponent.cs @@ -0,0 +1,58 @@ +using Content.Shared.Destructible.Thresholds; +using Content.Shared.Weather; +using Robust.Shared.Prototypes; +using Robust.Shared.Serialization; +using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; + +namespace Content.Server.DeltaV.Weather; + +/// +/// Makes weather randomly happen every so often. +/// +[RegisterComponent, Access(typeof(WeatherSchedulerSystem))] +[AutoGenerateComponentPause] +public sealed partial class WeatherSchedulerComponent : Component +{ + /// + /// Weather stages to schedule. + /// + [DataField(required: true)] + public List Stages = new(); + + /// + /// The index of to use next, wraps back to the start. + /// + [DataField] + public int Stage; + + /// + /// When to go to the next step of the schedule. + /// + [DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField] + public TimeSpan NextUpdate; +} + +/// +/// A stage in a weather schedule. +/// +[Serializable, DataDefinition] +public partial struct WeatherStage +{ + /// + /// A range of how long the stage can last for, in seconds. + /// + [DataField(required: true)] + public MinMax Duration = new(0, 0); + + /// + /// The weather prototype to add, or null for clear weather. + /// + [DataField] + public ProtoId? Weather; + + /// + /// Alert message to send in chat for players on the map when it starts. + /// + [DataField] + public LocId? Message; +} diff --git a/Content.Server/DeltaV/Weather/WeatherSchedulerSystem.cs b/Content.Server/DeltaV/Weather/WeatherSchedulerSystem.cs new file mode 100644 index 00000000000..a19a2f3787d --- /dev/null +++ b/Content.Server/DeltaV/Weather/WeatherSchedulerSystem.cs @@ -0,0 +1,75 @@ +using Content.Server.Chat.Managers; +using Content.Shared.Chat; +using Content.Shared.Weather; +using Robust.Shared.Map.Components; +using Robust.Shared.Player; +using Robust.Shared.Prototypes; +using Robust.Shared.Random; +using Robust.Shared.Timing; + +namespace Content.Server.DeltaV.Weather; + +public sealed class WeatherSchedulerSystem : EntitySystem +{ + [Dependency] private readonly IChatManager _chat = default!; + [Dependency] private readonly IGameTiming _timing = default!; + [Dependency] private readonly IPrototypeManager _proto = default!; + [Dependency] private readonly IRobustRandom _random = default!; + [Dependency] private readonly SharedWeatherSystem _weather = default!; + + public override void Update(float frameTime) + { + base.Update(frameTime); + + var now = _timing.CurTime; + var query = EntityQueryEnumerator(); + while (query.MoveNext(out var map, out var comp)) + { + if (now < comp.NextUpdate) + continue; + + if (comp.Stage >= comp.Stages.Count) + comp.Stage = 0; + + var stage = comp.Stages[comp.Stage++]; + var duration = stage.Duration.Next(_random); + comp.NextUpdate = now + TimeSpan.FromSeconds(duration); + + var mapId = Comp(map).MapId; + if (stage.Weather is {} weather) + { + var ending = comp.NextUpdate; + // crossfade weather so as one ends the next starts + if (HasWeather(comp, comp.Stage - 1)) + ending += WeatherComponent.ShutdownTime; + if (HasWeather(comp, comp.Stage + 1)) + ending += WeatherComponent.StartupTime; + _weather.SetWeather(mapId, _proto.Index(weather), ending); + } + + if (stage.Message is {} message) + { + var msg = Loc.GetString(message); + _chat.ChatMessageToManyFiltered( + Filter.BroadcastMap(mapId), + ChatChannel.Radio, + msg, + msg, + map, + false, + true, + null); + } + } + } + + private bool HasWeather(WeatherSchedulerComponent comp, int stage) + { + if (stage < 0) + stage = comp.Stages.Count + stage; + else if (stage >= comp.Stages.Count) + stage %= comp.Stages.Count; + + return comp.Stages[stage].Weather != null; + } +} diff --git a/Content.Shared/DeltaV/Weather/Components/AshStormImmuneComponent.cs b/Content.Shared/DeltaV/Weather/Components/AshStormImmuneComponent.cs new file mode 100644 index 00000000000..ec2c272695b --- /dev/null +++ b/Content.Shared/DeltaV/Weather/Components/AshStormImmuneComponent.cs @@ -0,0 +1,9 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.DeltaV.Weather.Components; + +/// +/// Makes an entity not take damage from ash storms. +/// +[RegisterComponent, NetworkedComponent] +public sealed partial class AshStormImmuneComponent : Component; diff --git a/Content.Shared/Weather/SharedWeatherSystem.cs b/Content.Shared/Weather/SharedWeatherSystem.cs index acd43055388..95c089fa10e 100644 --- a/Content.Shared/Weather/SharedWeatherSystem.cs +++ b/Content.Shared/Weather/SharedWeatherSystem.cs @@ -36,6 +36,7 @@ private void OnWeatherUnpaused(EntityUid uid, WeatherComponent component, ref En if (weather.EndTime != null) weather.EndTime = weather.EndTime.Value + args.PausedTime; } + component.NextUpdate += args.PausedTime; // DeltaV } public bool CanWeatherAffect(EntityUid uid, MapGridComponent grid, TileRef tileRef) diff --git a/Content.Shared/Weather/WeatherComponent.cs b/Content.Shared/Weather/WeatherComponent.cs index eaf901fb424..e16fe978fa6 100644 --- a/Content.Shared/Weather/WeatherComponent.cs +++ b/Content.Shared/Weather/WeatherComponent.cs @@ -14,6 +14,18 @@ public sealed partial class WeatherComponent : Component [DataField] public Dictionary, WeatherData> Weather = new(); + /// + /// DeltaV: How long to wait between updating weather effects. + /// + [DataField] + public TimeSpan UpdateDelay = TimeSpan.FromSeconds(1); + + /// + /// DeltaV: When to next update weather effects (damage). + /// + [DataField(customTypeSerializer: typeof(TimeOffsetSerializer))] + public TimeSpan NextUpdate = TimeSpan.Zero; + public static readonly TimeSpan StartupTime = TimeSpan.FromSeconds(15); public static readonly TimeSpan ShutdownTime = TimeSpan.FromSeconds(15); } diff --git a/Content.Shared/Weather/WeatherPrototype.cs b/Content.Shared/Weather/WeatherPrototype.cs index 3803c37d4ce..af585d8d7c4 100644 --- a/Content.Shared/Weather/WeatherPrototype.cs +++ b/Content.Shared/Weather/WeatherPrototype.cs @@ -1,3 +1,5 @@ +using Content.Shared.Damage; +using Content.Shared.Whitelist; using Robust.Shared.Audio; using Robust.Shared.Prototypes; using Robust.Shared.Utility; @@ -20,4 +22,17 @@ public sealed partial class WeatherPrototype : IPrototype /// [ViewVariables(VVAccess.ReadWrite), DataField("sound")] public SoundSpecifier? Sound; + + /// + /// DeltaV: Damage you can take from being in this weather. + /// Only applies when weather has fully set in. + /// + [DataField] + public DamageSpecifier? Damage; + + /// + /// DeltaV: Don't damage entities that match this blacklist. + /// + [DataField] + public EntityWhitelist? DamageBlacklist; } diff --git a/Resources/Locale/en-US/deltav/weather/ashstorm.ftl b/Resources/Locale/en-US/deltav/weather/ashstorm.ftl new file mode 100644 index 00000000000..49778522502 --- /dev/null +++ b/Resources/Locale/en-US/deltav/weather/ashstorm.ftl @@ -0,0 +1,3 @@ +ash-storm-telegraph = [color=red][bold]An eerie moan rises on the wind. Sheets of burning ash blacken the horizon. Seek shelter.[/bold][/color] +ash-storm-alert = [color=red][bolditalic]Smoldering clouds of scorching ash billow down around you! Get inside![/bolditalic][/color] +ash-storm-clearing = [color=red]The shrieking wind whips away the last of the ash and falls to its usual murmur. It should be safe to go outside now.[/color] diff --git a/Resources/Prototypes/DeltaV/Body/Organs/ashwalker.yml b/Resources/Prototypes/DeltaV/Body/Organs/ashwalker.yml new file mode 100644 index 00000000000..c0388ffd0ee --- /dev/null +++ b/Resources/Prototypes/DeltaV/Body/Organs/ashwalker.yml @@ -0,0 +1,9 @@ +- type: entity + parent: OrganAnimalLungs + id: OrganAshWalkerLungs + name: ashwalker lungs + description: These lungs are adapted from isolation in lavaland, capable of withstanding the low oxygen content and ash storms. + components: + - type: Lung + saturationLoss: 0.5 + # TODO SHITMED: add AshStormImmune when transplanted diff --git a/Resources/Prototypes/DeltaV/Body/Prototypes/ashwalker.yml b/Resources/Prototypes/DeltaV/Body/Prototypes/ashwalker.yml new file mode 100644 index 00000000000..59c55e89f4e --- /dev/null +++ b/Resources/Prototypes/DeltaV/Body/Prototypes/ashwalker.yml @@ -0,0 +1,50 @@ +# TODO: will need updating with shitmed +- type: body + name: ashwalker + id: AshWalker + root: torso + slots: + head: + part: HeadReptilian + connections: + - torso + organs: + brain: OrganHumanBrain + eyes: OrganHumanEyes + torso: + part: TorsoReptilian + organs: + heart: OrganAnimalHeart + lungs: OrganAshWalkerLungs + stomach: OrganReptilianStomach + liver: OrganAnimalLiver + kidneys: OrganHumanKidneys + connections: + - right arm + - left arm + - right leg + - left leg + right arm: + part: RightArmReptilian + connections: + - right hand + left arm: + part: LeftArmReptilian + connections: + - left hand + right hand: + part: RightHandReptilian + left hand: + part: LeftHandReptilian + right leg: + part: RightLegReptilian + connections: + - right foot + left leg: + part: LeftLegReptilian + connections: + - left foot + right foot: + part: RightFootReptilian + left foot: + part: LeftFootReptilian diff --git a/Resources/Prototypes/DeltaV/Entities/Mobs/Species/ashwalker.yml b/Resources/Prototypes/DeltaV/Entities/Mobs/Species/ashwalker.yml new file mode 100644 index 00000000000..4a397caaa37 --- /dev/null +++ b/Resources/Prototypes/DeltaV/Entities/Mobs/Species/ashwalker.yml @@ -0,0 +1,11 @@ +- type: entity + save: false + parent: MobReptilian + id: MobAshWalker + name: Urist McAsh + suffix: "" + components: + - type: Body + prototype: AshWalker + - type: AshStormImmune + # TODO: shitmed stuff so you can steal ashwalker lungs diff --git a/Resources/Prototypes/DeltaV/planets.yml b/Resources/Prototypes/DeltaV/planets.yml index 77fbf10453f..7229f5a7917 100644 --- a/Resources/Prototypes/DeltaV/planets.yml +++ b/Resources/Prototypes/DeltaV/planets.yml @@ -8,6 +8,26 @@ whitelist: components: - MiningShuttle + - type: WeatherScheduler # Regular ash storms + stages: + - duration: # 5-10 minutes of calm + min: 300 + max: 600 + - weather: AshfallLight # ash starts to fall, 30 second warning + message: ash-storm-telegraph + duration: + min: 30 + max: 30 + - weather: Ashfall # 1-2 minutes of damaging storm + message: ash-storm-alert + duration: + min: 60 + max: 120 + - weather: AshfallLight # ash clears away for 30 seconds + message: ash-storm-clearing + duration: + min: 30 + max: 30 atmosphere: volume: 2500 temperature: 353.15 # 80C diff --git a/Resources/Prototypes/weather.yml b/Resources/Prototypes/weather.yml index a71e59354af..896df8641a1 100644 --- a/Resources/Prototypes/weather.yml +++ b/Resources/Prototypes/weather.yml @@ -8,6 +8,12 @@ params: loop: true volume: -6 + damage: # DeltaV + types: + Heat: 4 + damageBlacklist: # DeltaV + components: + - AshStormImmune - type: weather id: AshfallLight From 56254283fb898d0c34fd4801d38553d16586c558 Mon Sep 17 00:00:00 2001 From: Delta-V bot <135767721+DeltaV-Bot@users.noreply.github.com> Date: Wed, 18 Dec 2024 02:27:42 +0100 Subject: [PATCH 08/21] Automatic changelog update --- Resources/Changelog/DeltaVChangelog.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Resources/Changelog/DeltaVChangelog.yml b/Resources/Changelog/DeltaVChangelog.yml index 8681734abc6..cb74d1712e1 100644 --- a/Resources/Changelog/DeltaVChangelog.yml +++ b/Resources/Changelog/DeltaVChangelog.yml @@ -1,11 +1,4 @@ Entries: -- author: rosieposieeee - changes: - - message: Added Corpsman-only access and airlocks. - type: Add - id: 286 - time: '2024-03-19T12:13:13.0000000+00:00' - url: https://github.com/DeltaV-Station/Delta-v/pull/892 - author: rosieposieeee changes: - message: Submarine has received another batch of design tweaks and revisions. @@ -3818,3 +3811,11 @@ id: 785 time: '2024-12-18T01:26:19.0000000+00:00' url: https://github.com/DeltaV-Station/Delta-v/pull/2374 +- author: deltanedas + changes: + - message: Ash storms can now happen on lavaland, run for shelter if you get caught + in one! + type: Add + id: 786 + time: '2024-12-18T01:27:23.0000000+00:00' + url: https://github.com/DeltaV-Station/Delta-v/pull/2445 From 6fd816ce9cacb7e71f5bc0a8807c108631cd7cbd Mon Sep 17 00:00:00 2001 From: Radezolid Date: Tue, 17 Dec 2024 22:29:09 -0300 Subject: [PATCH 09/21] Remove justice lockers from upstream files and add DeltaV base lockers. (#2460) * Remove from upstream files * Create base lockers --- .../Storage/Closets/Lockers/lockers.yml | 23 ++++++++++++------ .../Structures/Storage/closet.rsi/cj.png | Bin .../Structures/Storage/closet.rsi/cj_door.png | Bin .../Structures/Storage/closet.rsi/cj_open.png | Bin .../Structures/Storage/closet.rsi/clerk.png | Bin .../Storage/closet.rsi/clerk_door.png | Bin .../Storage/closet.rsi/clerk_open.png | Bin .../Structures/Storage/closet.rsi/meta.json | 20 ++++++++++++++- .../Structures/Storage/closet.rsi/meta.json | 20 +-------------- 9 files changed, 36 insertions(+), 27 deletions(-) rename Resources/Textures/{ => DeltaV}/Structures/Storage/closet.rsi/cj.png (100%) rename Resources/Textures/{ => DeltaV}/Structures/Storage/closet.rsi/cj_door.png (100%) rename Resources/Textures/{ => DeltaV}/Structures/Storage/closet.rsi/cj_open.png (100%) rename Resources/Textures/{ => DeltaV}/Structures/Storage/closet.rsi/clerk.png (100%) rename Resources/Textures/{ => DeltaV}/Structures/Storage/closet.rsi/clerk_door.png (100%) rename Resources/Textures/{ => DeltaV}/Structures/Storage/closet.rsi/clerk_open.png (100%) diff --git a/Resources/Prototypes/DeltaV/Entities/Structures/Storage/Closets/Lockers/lockers.yml b/Resources/Prototypes/DeltaV/Entities/Structures/Storage/Closets/Lockers/lockers.yml index d442b0cf3f5..bb388fe66d4 100644 --- a/Resources/Prototypes/DeltaV/Entities/Structures/Storage/Closets/Lockers/lockers.yml +++ b/Resources/Prototypes/DeltaV/Entities/Structures/Storage/Closets/Lockers/lockers.yml @@ -1,19 +1,30 @@ +- type: entity + parent: LockerBase + id: LockerBaseDeltaV + components: + - type: Sprite + sprite: DeltaV/Structures/Storage/closet.rsi + +- type: entity + parent: [ LockerBaseDeltaV, LockerBaseSecure ] + id: LockerBaseSecureDeltaV + - type: entity id: LockerChiefJustice - parent: LockerBaseSecure + parent: LockerBaseSecureDeltaV name: chief justice's locker components: - type: Appearance - type: EntityStorageVisuals - stateBaseClosed: cj + stateBaseClosed: cj stateDoorOpen: cj_open stateDoorClosed: cj_door - type: AccessReader access: [["ChiefJustice"]] - + - type: entity id: LockerClerk - parent: LockerBaseSecure + parent: LockerBaseSecureDeltaV name: clerk's locker components: - type: Appearance @@ -25,12 +36,10 @@ access: [["Clerk"]] - type: entity - parent: LockerBaseSecure + parent: LockerBaseSecureDeltaV id: LockerPsychologist name: psychologist's locker components: - - type: Sprite - sprite: DeltaV/Structures/Storage/closet.rsi - type: EntityStorageVisuals stateBaseClosed: psych stateDoorOpen: psych_open diff --git a/Resources/Textures/Structures/Storage/closet.rsi/cj.png b/Resources/Textures/DeltaV/Structures/Storage/closet.rsi/cj.png similarity index 100% rename from Resources/Textures/Structures/Storage/closet.rsi/cj.png rename to Resources/Textures/DeltaV/Structures/Storage/closet.rsi/cj.png diff --git a/Resources/Textures/Structures/Storage/closet.rsi/cj_door.png b/Resources/Textures/DeltaV/Structures/Storage/closet.rsi/cj_door.png similarity index 100% rename from Resources/Textures/Structures/Storage/closet.rsi/cj_door.png rename to Resources/Textures/DeltaV/Structures/Storage/closet.rsi/cj_door.png diff --git a/Resources/Textures/Structures/Storage/closet.rsi/cj_open.png b/Resources/Textures/DeltaV/Structures/Storage/closet.rsi/cj_open.png similarity index 100% rename from Resources/Textures/Structures/Storage/closet.rsi/cj_open.png rename to Resources/Textures/DeltaV/Structures/Storage/closet.rsi/cj_open.png diff --git a/Resources/Textures/Structures/Storage/closet.rsi/clerk.png b/Resources/Textures/DeltaV/Structures/Storage/closet.rsi/clerk.png similarity index 100% rename from Resources/Textures/Structures/Storage/closet.rsi/clerk.png rename to Resources/Textures/DeltaV/Structures/Storage/closet.rsi/clerk.png diff --git a/Resources/Textures/Structures/Storage/closet.rsi/clerk_door.png b/Resources/Textures/DeltaV/Structures/Storage/closet.rsi/clerk_door.png similarity index 100% rename from Resources/Textures/Structures/Storage/closet.rsi/clerk_door.png rename to Resources/Textures/DeltaV/Structures/Storage/closet.rsi/clerk_door.png diff --git a/Resources/Textures/Structures/Storage/closet.rsi/clerk_open.png b/Resources/Textures/DeltaV/Structures/Storage/closet.rsi/clerk_open.png similarity index 100% rename from Resources/Textures/Structures/Storage/closet.rsi/clerk_open.png rename to Resources/Textures/DeltaV/Structures/Storage/closet.rsi/clerk_open.png diff --git a/Resources/Textures/DeltaV/Structures/Storage/closet.rsi/meta.json b/Resources/Textures/DeltaV/Structures/Storage/closet.rsi/meta.json index 3f969bf17f7..98a03e8e481 100644 --- a/Resources/Textures/DeltaV/Structures/Storage/closet.rsi/meta.json +++ b/Resources/Textures/DeltaV/Structures/Storage/closet.rsi/meta.json @@ -4,7 +4,7 @@ "x": 32, "y": 32 }, - "copyright": "Taken from tgstation, added psych locker based on medical locker by Radezolid", + "copyright": "Taken from tgstation, added psych locker based on medical locker by Radezolid, CJ and Clerk lockers edited by Timemaster99 (Discord)", "license": "CC-BY-SA-3.0", "states": [ { @@ -36,6 +36,24 @@ }, { "name": "generic_icon" + }, + { + "name": "cj" + }, + { + "name": "cj_door" + }, + { + "name": "cj_open" + }, + { + "name": "clerk" + }, + { + "name": "clerk_door" + }, + { + "name": "clerk_open" } ] } diff --git a/Resources/Textures/Structures/Storage/closet.rsi/meta.json b/Resources/Textures/Structures/Storage/closet.rsi/meta.json index d26d0c6545d..5600268fde3 100644 --- a/Resources/Textures/Structures/Storage/closet.rsi/meta.json +++ b/Resources/Textures/Structures/Storage/closet.rsi/meta.json @@ -4,7 +4,7 @@ "x": 32, "y": 32 }, - "copyright": "Taken from tgstation, brigmedic locker is a resprited CMO locker by PuroSlavKing (Github), n2 sprites based on fire and emergency sprites | CJ and Clerk lockers edited by Timemaster99 (Discord)", + "copyright": "Taken from tgstation, brigmedic locker is a resprited CMO locker by PuroSlavKing (Github), n2 sprites based on fire and emergency sprites", "license": "CC-BY-SA-3.0", "states": [ { @@ -163,24 +163,6 @@ { "name": "chemical_door" }, - { - "name": "cj" - }, - { - "name": "cj_door" - }, - { - "name": "cj_open" - }, - { - "name": "clerk" - }, - { - "name": "clerk_door" - }, - { - "name": "clerk_open" - }, { "name": "cmo" }, From 6b8375402aaaba2ed836492e49c42691bb54d759 Mon Sep 17 00:00:00 2001 From: Unkn0wn_Gh0st Date: Tue, 17 Dec 2024 19:30:21 -0600 Subject: [PATCH 10/21] Frontier Port: Pretty Money (#2398) * Frontier Port: Pretty Money * Update Resources/Prototypes/Entities/Objects/Misc/space_cash.yml Co-authored-by: Whatstone <166147148+whatston3@users.noreply.github.com> Signed-off-by: Unkn0wn_Gh0st * Updated 100k texture --------- Signed-off-by: Unkn0wn_Gh0st Co-authored-by: Whatstone <166147148+whatston3@users.noreply.github.com> --- Content.Client/Stack/StackSystem.cs | 23 +-- .../_NF/Stack/StackSystem.Layers.cs | 56 ++++++++ .../Properties/launchSettings.json | 8 ++ Content.Shared/Stacks/StackComponent.cs | 10 +- .../StackLayerThresholdComponent.cs | 13 ++ .../_NF/Stacks/StackLayerFunction.cs | 7 + .../Entities/Objects/Misc/space_cash.yml | 47 +++--- .../_NF/Entities/Objects/Misc/space_cash.yml | 21 +++ .../_NF/Objects/Economy/cash.rsi/cash.png | Bin 0 -> 286 bytes .../_NF/Objects/Economy/cash.rsi/cash_10.png | Bin 0 -> 292 bytes .../_NF/Objects/Economy/cash.rsi/cash_100.png | Bin 0 -> 291 bytes .../Objects/Economy/cash.rsi/cash_1000.png | Bin 0 -> 290 bytes .../Objects/Economy/cash.rsi/cash_10000.png | Bin 0 -> 695 bytes .../Objects/Economy/cash.rsi/cash_100000.png | Bin 0 -> 797 bytes .../Objects/Economy/cash.rsi/cash_25000.png | Bin 0 -> 681 bytes .../Objects/Economy/cash.rsi/cash_250000.png | Bin 0 -> 1145 bytes .../_NF/Objects/Economy/cash.rsi/cash_500.png | Bin 0 -> 299 bytes .../Objects/Economy/cash.rsi/cash_5000.png | Bin 0 -> 231 bytes .../Objects/Economy/cash.rsi/cash_50000.png | Bin 0 -> 701 bytes .../_NF/Objects/Economy/cash.rsi/meta.json | 136 ++++++++++++++++++ 20 files changed, 292 insertions(+), 29 deletions(-) create mode 100644 Content.Client/_NF/Stack/StackSystem.Layers.cs create mode 100644 Content.Packaging/Properties/launchSettings.json create mode 100644 Content.Shared/_NF/Stacks/Components/StackLayerThresholdComponent.cs create mode 100644 Content.Shared/_NF/Stacks/StackLayerFunction.cs create mode 100644 Resources/Prototypes/_NF/Entities/Objects/Misc/space_cash.yml create mode 100644 Resources/Textures/_NF/Objects/Economy/cash.rsi/cash.png create mode 100644 Resources/Textures/_NF/Objects/Economy/cash.rsi/cash_10.png create mode 100644 Resources/Textures/_NF/Objects/Economy/cash.rsi/cash_100.png create mode 100644 Resources/Textures/_NF/Objects/Economy/cash.rsi/cash_1000.png create mode 100644 Resources/Textures/_NF/Objects/Economy/cash.rsi/cash_10000.png create mode 100644 Resources/Textures/_NF/Objects/Economy/cash.rsi/cash_100000.png create mode 100644 Resources/Textures/_NF/Objects/Economy/cash.rsi/cash_25000.png create mode 100644 Resources/Textures/_NF/Objects/Economy/cash.rsi/cash_250000.png create mode 100644 Resources/Textures/_NF/Objects/Economy/cash.rsi/cash_500.png create mode 100644 Resources/Textures/_NF/Objects/Economy/cash.rsi/cash_5000.png create mode 100644 Resources/Textures/_NF/Objects/Economy/cash.rsi/cash_50000.png create mode 100644 Resources/Textures/_NF/Objects/Economy/cash.rsi/meta.json diff --git a/Content.Client/Stack/StackSystem.cs b/Content.Client/Stack/StackSystem.cs index 7e681aeba3e..f57f4d4e170 100644 --- a/Content.Client/Stack/StackSystem.cs +++ b/Content.Client/Stack/StackSystem.cs @@ -8,7 +8,7 @@ namespace Content.Client.Stack { [UsedImplicitly] - public sealed class StackSystem : SharedStackSystem + public sealed partial class StackSystem : SharedStackSystem // Frontier: add partial to class definition { [Dependency] private readonly AppearanceSystem _appearanceSystem = default!; [Dependency] private readonly ItemCounterSystem _counterSystem = default!; @@ -44,7 +44,7 @@ public override void SetCount(EntityUid uid, int amount, StackComponent? compone // TODO PREDICT ENTITY DELETION: This should really just be a normal entity deletion call. if (component.Count <= 0 && !component.Lingering) { - Xform.DetachEntity(uid, Transform(uid)); + Xform.DetachParentToNull(uid, Transform(uid)); return; } @@ -56,20 +56,25 @@ private void OnAppearanceChange(EntityUid uid, StackComponent comp, ref Appearan if (args.Sprite == null || comp.LayerStates.Count < 1) return; + StackLayerData data = new StackLayerData(); // Frontier: use structure to store StackLayerData + // Skip processing if no actual - if (!_appearanceSystem.TryGetData(uid, StackVisuals.Actual, out var actual, args.Component)) + if (!_appearanceSystem.TryGetData(uid, StackVisuals.Actual, out data.Actual, args.Component)) return; - if (!_appearanceSystem.TryGetData(uid, StackVisuals.MaxCount, out var maxCount, args.Component)) - maxCount = comp.LayerStates.Count; + if (!_appearanceSystem.TryGetData(uid, StackVisuals.MaxCount, out data.MaxCount, args.Component)) + data.MaxCount = comp.LayerStates.Count; + + if (!_appearanceSystem.TryGetData(uid, StackVisuals.Hide, out data.Hidden, args.Component)) + data.Hidden = false; - if (!_appearanceSystem.TryGetData(uid, StackVisuals.Hide, out var hidden, args.Component)) - hidden = false; + if (comp.LayerFunction != StackLayerFunction.None) // Frontier: use stack layer function to modify appearance if provided. + ApplyLayerFunction(uid, comp, ref data); // Frontier: definition in _NF/Stack/StackSystem.Layers.cs if (comp.IsComposite) - _counterSystem.ProcessCompositeSprite(uid, actual, maxCount, comp.LayerStates, hidden, sprite: args.Sprite); + _counterSystem.ProcessCompositeSprite(uid, data.Actual, data.MaxCount, comp.LayerStates, data.Hidden, sprite: args.Sprite); else - _counterSystem.ProcessOpaqueSprite(uid, comp.BaseLayer, actual, maxCount, comp.LayerStates, hidden, sprite: args.Sprite); + _counterSystem.ProcessOpaqueSprite(uid, comp.BaseLayer, data.Actual, data.MaxCount, comp.LayerStates, data.Hidden, sprite: args.Sprite); } } } diff --git a/Content.Client/_NF/Stack/StackSystem.Layers.cs b/Content.Client/_NF/Stack/StackSystem.Layers.cs new file mode 100644 index 00000000000..2893d32d3f5 --- /dev/null +++ b/Content.Client/_NF/Stack/StackSystem.Layers.cs @@ -0,0 +1,56 @@ +using Content.Shared.Stacks.Components; +using Content.Shared.Stacks; + +namespace Content.Client.Stack +{ + /// + /// Data used to determine which layers of a stack's sprite are visible. + /// + public struct StackLayerData + { + public int Actual; + public int MaxCount; + public bool Hidden; + } + + public sealed partial class StackSystem : SharedStackSystem + { + // Modifies a given stack component to adjust the layers to display. + private bool ApplyLayerFunction(EntityUid uid, StackComponent comp, ref StackLayerData data) + { + switch (comp.LayerFunction) + { + case StackLayerFunction.Threshold: + if (TryComp(uid, out var threshold)) + { + ApplyThreshold(threshold, ref data); + return true; + } + break; + } + // No function applied. + return false; + } + + /// + /// Sets Actual to the number of thresholds that Actual exceeds from the beginning of the list. + /// Sets MaxCount to the total number of thresholds plus one (for values under thresholds). + /// + private static void ApplyThreshold(StackLayerThresholdComponent comp, ref StackLayerData data) + { + // We must stop before we run out of thresholds or layers, whichever's smaller. + data.MaxCount = Math.Min(comp.Thresholds.Count + 1, data.MaxCount); + int newActual = 0; + foreach (var threshold in comp.Thresholds) + { + //If our value exceeds threshold, the next layer should be displayed. + //Note: we must ensure actual <= MaxCount. + if (data.Actual >= threshold && newActual < data.MaxCount) + newActual++; + else + break; + } + data.Actual = newActual; + } + } +} diff --git a/Content.Packaging/Properties/launchSettings.json b/Content.Packaging/Properties/launchSettings.json new file mode 100644 index 00000000000..33504c948ad --- /dev/null +++ b/Content.Packaging/Properties/launchSettings.json @@ -0,0 +1,8 @@ +{ + "profiles": { + "WSL": { + "commandName": "WSL2", + "distributionName": "" + } + } +} \ No newline at end of file diff --git a/Content.Shared/Stacks/StackComponent.cs b/Content.Shared/Stacks/StackComponent.cs index 7137f8c0c22..b18f9b0d051 100644 --- a/Content.Shared/Stacks/StackComponent.cs +++ b/Content.Shared/Stacks/StackComponent.cs @@ -24,7 +24,7 @@ public sealed partial class StackComponent : Component /// [ViewVariables(VVAccess.ReadOnly)] [DataField("maxCountOverride")] - public int? MaxCountOverride { get; set; } + public int? MaxCountOverride { get; set; } /// /// Set to true to not reduce the count when used. @@ -78,6 +78,14 @@ public sealed partial class StackComponent : Component [DataField("layerStates")] [ViewVariables(VVAccess.ReadWrite)] public List LayerStates = new(); + + // Frontier: transforming Amount, MaxCount in speso stacks + /// + /// An optional function to adjust the layers used for a stack's appearance. + /// + [DataField] + public StackLayerFunction LayerFunction = StackLayerFunction.None; + // End Frontier } [Serializable, NetSerializable] diff --git a/Content.Shared/_NF/Stacks/Components/StackLayerThresholdComponent.cs b/Content.Shared/_NF/Stacks/Components/StackLayerThresholdComponent.cs new file mode 100644 index 00000000000..98d3bb0e61f --- /dev/null +++ b/Content.Shared/_NF/Stacks/Components/StackLayerThresholdComponent.cs @@ -0,0 +1,13 @@ +namespace Content.Shared.Stacks.Components; + +[RegisterComponent] +public sealed partial class StackLayerThresholdComponent : Component +{ + /// + /// A list of thresholds to check against the number of things in the stack. + /// Each exceeded threshold will cause the next layer to be displayed. + /// Should be sorted in ascending order. + /// + [DataField(required: true)] + public List Thresholds = new List(); +} diff --git a/Content.Shared/_NF/Stacks/StackLayerFunction.cs b/Content.Shared/_NF/Stacks/StackLayerFunction.cs new file mode 100644 index 00000000000..c655f3f76c2 --- /dev/null +++ b/Content.Shared/_NF/Stacks/StackLayerFunction.cs @@ -0,0 +1,7 @@ +namespace Content.Shared.Stacks; + +public enum StackLayerFunction +{ + None, + Threshold +} diff --git a/Resources/Prototypes/Entities/Objects/Misc/space_cash.yml b/Resources/Prototypes/Entities/Objects/Misc/space_cash.yml index 57dfb400984..5321a20fa72 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/space_cash.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/space_cash.yml @@ -25,9 +25,17 @@ - cash_100 - cash_500 - cash_1000 - - cash_1000000 + - cash_5000 # Frontier: larger denominations + - cash_10000 # Frontier: larger denominations + - cash_25000 # Frontier: larger denominations + - cash_50000 # Frontier: larger denominations + - cash_100000 # Frontier: larger denominations + - cash_250000 # Frontier: larger denominations (cash_1000000czH&sY$$Bay^!}nd$O=`|>(|$0ExHJsFL432|L|G7_`SXB)g0c38`9@lN@^$+OiU PXEJ!Y`njxgN@xNAi{)a9 literal 0 HcmV?d00001 diff --git a/Resources/Textures/_NF/Objects/Economy/cash.rsi/cash_10.png b/Resources/Textures/_NF/Objects/Economy/cash.rsi/cash_10.png new file mode 100644 index 0000000000000000000000000000000000000000..05c477501682b5b2bd84e241465690655a617e43 GIT binary patch literal 292 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyjKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCijS1AIbU6KpwIEL{2A6L*%1J2g&J&8a)LPhju#^2?_cnN{_Gsy-#{*bbz) zOM?7@|HA=;mp|htpfG2FM`SSr1K(i~W;~w1A_XW|>gnPbV&VU`{~+IC0}f~It%@iA z*B9(&E%FF^8@2N5QLeg(l~WJCY} literal 0 HcmV?d00001 diff --git a/Resources/Textures/_NF/Objects/Economy/cash.rsi/cash_1000.png b/Resources/Textures/_NF/Objects/Economy/cash.rsi/cash_1000.png new file mode 100644 index 0000000000000000000000000000000000000000..6a5688cd866d413a9e40239c01388bd43c060164 GIT binary patch literal 290 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyjKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCijS1AIbU6KpwMnVDmln0A(mck61G$jhJGC$M*V`Q_7!>g+5)RcDU6_W&vG zk|4j}|8T(I<8F~A3d{^HCE!x^RG$Igq<|mWA`h6 UX5A}07ic|$r>mdKI;Vst04zjh5&!@I literal 0 HcmV?d00001 diff --git a/Resources/Textures/_NF/Objects/Economy/cash.rsi/cash_10000.png b/Resources/Textures/_NF/Objects/Economy/cash.rsi/cash_10000.png new file mode 100644 index 0000000000000000000000000000000000000000..3400ef8a0a2e3fd72274d9947b709e01455e9f31 GIT binary patch literal 695 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H3?#oinD`S&DF*n2xF*}%WQZeW4?B1dl z1)dgvea5Qy{|}h{5NAnRo>6FZ+9x`fPsI=K z==ok{pmzCP_j-mS=d9&4EN~#em%~l%Jj`}h#ccZiHJss_kB>5YWNey@ zSU};luPdeGAO8xovz)qK+aa4(%X-05rjvYLKaGx`5VxBi+VE)GGubIx8;)v=Uii6` zYsH@;)<4^tS4P}Rx4!e}GXML}*$L;T=Y0CQBjxuSsTXzPYaZ{FUCMn&ES_QCwU4*@ zCb7Qjwts4$xStW?S}1ArbmflyMnS*!ugaSnw0)Vq!?JpTt7{+f_Z0r!wXgrx%@6E% z*35rfv+WOK^McY$8^MB#v{`u)wC2Lu2{5pqM@)G|XmNK#bKlp)t(XR9B8;{5* z9JZgqck&B=&7a}}@(uPMF1OrfN3rw6l;w~9o$`47-(_!FVP*N9SNt6}m(?G*Wv}st z-{t>-FYHSWAAH3x@Hg&!|6jqIx4(PcKQ0^fYkwHyt+I@7;sK8iJo$GZhHuoFU%5kHtlI1!w0!8}x)9fx@Uq&x_W5b;1z)RIGI`b?loh@3>+Zjr z1AjQ1S2OOq&)WNIzvP0@|K`jg=g&Wj=lk#+lmZ>f8}irrxrgO0?rQ~k*wfX|Wt~$( F69CToKhFRF literal 0 HcmV?d00001 diff --git a/Resources/Textures/_NF/Objects/Economy/cash.rsi/cash_100000.png b/Resources/Textures/_NF/Objects/Economy/cash.rsi/cash_100000.png new file mode 100644 index 0000000000000000000000000000000000000000..707382f69b63b9987106ce907fbf69410b3097e4 GIT binary patch literal 797 zcmeAS@N?(olHy`uVBq!ia0vp^4M4nrgBeJE_L*`XNGS&Rgt!9fNizC7l&yD`ia!p@ zy4<04ZlAzCtBA{|6(a;?fU@1K=e&RvcS(?6@P9a9@bYK;#K6F`z|+Msq+-t7Io$cp z20Sg&uWWAp|KHrs*=oaY)#z|Fb=Hw*7Jnagt}8G7RS|C^$D+W%$l<`iBx1kc?3ujW ze8w{d{m-8#ome(k{69lSY1p2L3ThRc2gSM9d{nUOxqo-Z#T=1xzdbvI4!qV+{oojW z{kVph$D=sTrPA^yw|D2=dD%L76_ee{20N#n%=^O_Uzx4i9ToI{r z$}g-sAoM;&;cR|rLT5AAjvdW~tG2F{J@#XVVD{_%A7`z6l6S-D_f6+3^um8K zEkByx5N^AP^<4M;r!zn7a%5lQW4o%7PZ;ChB%>}k{M1%CZ= z2sse&U;cr72t((-{@pIW{xkevu)L;7k-^n=CfkMAAH)~ z@b7@p=U(=|jL2U3W5@8f@%-+`FKQag1Q`CVzj?#n<8Qm$e}_5EznM4KFOcO^sDD-9 z@SJ;=^_R$Y)+_(da;f}t+Rfxz&v5O#hTRdV<{Ho6+_Ro@Kls_;dH3*VW; z{9iB|mxTvzuJ5X5NY`GR+wi8wVfAi1Yx{;T`#a|ce9(2cCBJ}6=EeUXoU8}rGfJMn zU(s-0o8fEiYG}m)JWL)E`*)uclQs_!$!)QQh|!=J-6 p=Pi&}qn&%k{xvk-9uzg$uX4U|6>kmD z%5#uEw@+a2^zzH673KL^fT|8k@V5df?vfzC;Qw&I;N{QwiGhJh$J50zq+-t7*$?v$ zEAX^A&S{eU7=(suW?6hV;<@}R z(^S3Ah3lVZ-D5KO`jOA`HG^);O6FU#msT@hxqkP~;eC3Qt+DKBYiih++&#F;|IVGp zRo$`rQS3E}U+x`${*F(3?qeQjf8!J7K*RsO%YX2#+)?uU*Hy6(jA|KwXg%H-XUZM3 zy#AE>!&*>4A;6C*`A5H7FSe5RxOedcdrNlx{_CF)pWsjXfA2iIOZoQDx(hp^UH^yf z+i;%!$&{J{7lOB5YCN^S`|W$zw+>VFSIB0(p2~OSpM7P`;s3|Wq<%JfUv;Z{Q1h=; zLEgdcL*BusSZ%v@|Ml+stM{)j-#_)&yxn@wxuwe2K4q@_f9KwR^Yi>GcE2y(moQ&` zLM5xV{ELzmJ08y|n6c|x~H3;v4Sn2iJ|FjRR_$}V``Lb*Mm)pYfWGTCkj<eF9F66IFBSTur<6<%?PLS(sJzI2bftSX>jB z5?z^@W0;sa4ZF$}E4p>HOXTHsnRV6KSzN&&JUl!vFR!7YK}}6f$e3Bem03Sd%DO;> zN0G%^iaAJyInP19H9$+ApG8|++sVlZs6H(%O+-Xwl8pWiW$SxZ5s!niA_Qf2d0*HI zbhAZCkYDhBynq3xtcK1T0|o|W4^J1zkc`H+(|i4H8;G`+L(((RZ7p^{l>S z&1t!tzt?Y$UA|4#dge0E&Lb-F+AkWk>;FAb*m?1KqcE!j1B(O09_Iu18~)p@|6fqL zR@rA~nO&LjCBbDqbAI05*k_RXhB1lh=*du>$Jz>h4EzQUf1do3rlfu##8xih*yqhZ z-};I}&VMHxKHZ0?#VJiQ=srgGnHhUvx% zVT!K|9E#bFXw+HpT$saX*d;G-@FO}!DW{lG?U0#x0*E2+qjY-?tKBS@ZI++s1KBYR zX9ND9JgmyVqyRXp>3mMw zVVZI~d&FARlV2})J+Ca4(`63g%b9S`lrNSoNYdoD`!nV%|D>6>)_-_mG@^J)`w&oRY=Jo+;q$ksccR%6f6zyL#a49<78=9ya^n$r7u+j~C^bOb9GI&k_qm(^4pj1NS)&hkjiHRWpd5A8$Cb@xe3S*&a*8GDH z@+Wp~ILkVN0~l8zMvZxAPO;dJM4_9{&ipq4vKh@D{&obVPYC+L{6cnxxXnCZge{-P zXnOzs>(3jfeci}*&h!`Cob0$Qc5_wz5}2;fWBeK^{b0qn{^Iv+OJuejoGIF7&|t@$ zB=MCO5~5$Zf20cCyr%!4fB$#B7q*N74F4G)n4hk%nl|5Zp$srzGI+ZBxvXjB5_gu0cN%t;D^{G_C$M*V`Q_7!lU%3hGV1~r)>K-k z11X-8Aiv=M2*4n8|J*sCIA?)JWHAE+-(e7DJf6QI1t?hI>Eak-;s3V(piqMXhYNF} z=HLJS&kEUO_+C%TvNhP$FFO6x0{M(8Wdq)d<{MM@7@03-USyzgQma8Oo#jeMNJMz+ zjD*9XO>;O|td*9vSoIq>YFAE8n3xbYe{&{#{NI1#3!h9~A<6jU!Xwk?X)G5^?>#@Z d!k=O3n_YV9CDpgX+<|Uj@O1TaS?83{1ON@*Z1eyC literal 0 HcmV?d00001 diff --git a/Resources/Textures/_NF/Objects/Economy/cash.rsi/cash_5000.png b/Resources/Textures/_NF/Objects/Economy/cash.rsi/cash_5000.png new file mode 100644 index 0000000000000000000000000000000000000000..36ff38c4d47c3d5e5b265adf17a86e7a6293a64d GIT binary patch literal 231 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyiUB?$t_ilBuCA`(;o&<=#TyzL z^78V|?GxBLz5McNMKv`wpelpMS2=+ccS(?6@P9a9@bYK;1QgElba4!^=zTlkHdlj! zfXm)DXQKZ9KbZTFYo*{`R#OF@qHj7<*JiiKSLhn>Te;_Xv~o7Y}ovUtB{b9eO)Qz^T%OqTn0 z{E+psS+o90d(L%67N^qO6oyS3J-d)^iM$FRC@v;Bgn>|bM6gpj1Ke?S)FTJdKsc-O?xrX)CKZd>g9eR)FtgS!r zBSO#h|8YL1$p7l%c<_tYD(&G;u0^M;>?aosoeHikzvCI4^!_{}+A4rJ#t=0D7r7CAd^{8F$L#P@Xd Kb6Mw<&;$VBi#yx^ literal 0 HcmV?d00001 diff --git a/Resources/Textures/_NF/Objects/Economy/cash.rsi/meta.json b/Resources/Textures/_NF/Objects/Economy/cash.rsi/meta.json new file mode 100644 index 00000000000..ab0be10c51b --- /dev/null +++ b/Resources/Textures/_NF/Objects/Economy/cash.rsi/meta.json @@ -0,0 +1,136 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-NC-SA-3.0", + "copyright": "Modified by EmoGarbage404 and taken from https://github.com/goonstation/goonstation at commit b951a2c12d967af1295a3e6d33a861e7e1f21299. cash_5000, cash_10000, cash_25000, cash_50000, cash_100000, cash_250000 modified by Whatstone (Discord)", + "states": [ + { + "name": "cash" + }, + { + "name": "cash_10" + }, + { + "name": "cash_100" + }, + { + "name": "cash_500" + }, + { + "name": "cash_1000" + }, + { + "name": "cash_5000" + }, + { + "name": "cash_10000", + "delays": [ + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ] + ] + }, + { + "name": "cash_25000", + "delays": [ + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ] + ] + }, + { + "name": "cash_50000", + "delays": [ + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ] + ] + }, + { + "name": "cash_100000", + "delays": [ + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ] + ] + }, + { + "name": "cash_250000", + "delays": [ + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ] + ] + } + ] +} From 26239359cf1e813a91f8fafd8f0888811cec245c Mon Sep 17 00:00:00 2001 From: Velcroboy <107660393+IamVelcroboy@users.noreply.github.com> Date: Tue, 17 Dec 2024 22:12:48 -0600 Subject: [PATCH 11/21] Updates Maintenance Lights (#2465) * Updates Maintenance Lights * 1 char typo Signed-off-by: deltanedas <39013340+deltanedas@users.noreply.github.com> --------- Signed-off-by: deltanedas <39013340+deltanedas@users.noreply.github.com> Co-authored-by: Velcroboy Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com> --- Resources/Migrations/deltaMigrations.yml | 5 ++ .../Catalog/Fills/Boxes/general.yml | 2 +- .../Markers/Spawners/Random/randomitems.yml | 2 +- .../Entities/Objects/Power/lights.yml | 32 +++----- .../Structures/Lighting/base_lighting.yml | 79 +++++++++++-------- 5 files changed, 64 insertions(+), 56 deletions(-) diff --git a/Resources/Migrations/deltaMigrations.yml b/Resources/Migrations/deltaMigrations.yml index bab6685466a..18a7472447d 100644 --- a/Resources/Migrations/deltaMigrations.yml +++ b/Resources/Migrations/deltaMigrations.yml @@ -123,3 +123,8 @@ VendingMachineAutomatrobe: null # 2024-11-08 SuitStorageSec: SuitStorageSecDeltaV + +# 2024-12-17 +LightBulbMaintenanceRed: DimLightBulb +PoweredSmallLightMaintenanceRed: PoweredDimSmallLight +AlwaysPoweredSmallLightMaintenanceRed: PoweredDimSmallLight diff --git a/Resources/Prototypes/Nyanotrasen/Catalog/Fills/Boxes/general.yml b/Resources/Prototypes/Nyanotrasen/Catalog/Fills/Boxes/general.yml index ceb66ae1204..d45e562b962 100644 --- a/Resources/Prototypes/Nyanotrasen/Catalog/Fills/Boxes/general.yml +++ b/Resources/Prototypes/Nyanotrasen/Catalog/Fills/Boxes/general.yml @@ -34,7 +34,7 @@ contents: - id: LightBulbMaintenance amount: 6 - - id: LightBulbMaintenanceRed + - id: DimLightBulb amount: 6 - type: Sprite layers: diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Markers/Spawners/Random/randomitems.yml b/Resources/Prototypes/Nyanotrasen/Entities/Markers/Spawners/Random/randomitems.yml index 749a7a417f4..77c4521717a 100644 --- a/Resources/Prototypes/Nyanotrasen/Entities/Markers/Spawners/Random/randomitems.yml +++ b/Resources/Prototypes/Nyanotrasen/Entities/Markers/Spawners/Random/randomitems.yml @@ -166,7 +166,7 @@ - id: ColoredLightTubeRed - id: ColoredLightTubeFrostyBlue - id: ColoredLightTubeBlackLight - - id: LightBulbMaintenanceRed + - id: DimLightBulb - id: LightBulbBroken - id: LightTubeBroken - id: LedLightBulb diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Objects/Power/lights.yml b/Resources/Prototypes/Nyanotrasen/Entities/Objects/Power/lights.yml index 91eff1a68ca..533fc3cea5d 100644 --- a/Resources/Prototypes/Nyanotrasen/Entities/Objects/Power/lights.yml +++ b/Resources/Prototypes/Nyanotrasen/Entities/Objects/Power/lights.yml @@ -14,7 +14,7 @@ PowerUse: 75 - type: Sprite sprite: Objects/Power/light_tube.rsi - state: normal + state: normal - type: entity parent: BaseLightbulb @@ -26,9 +26,13 @@ - type: LightBulb bulb: Bulb color: "#FFD1A3" # 4000K color temp - lightEnergy: 0.7 - lightRadius: 1.5 - lightSoftness: 1.1 + lightEnergy: 0.05 + lightRadius: 5 + lightSoftness: 7 + - type: Tag + tags: + - LightBulb + - Trash # Colored @@ -47,7 +51,7 @@ PowerUse: 25 - type: Sprite sprite: Objects/Power/light_tube.rsi - state: normal + state: normal - type: entity parent: BaseLightbulb @@ -64,8 +68,8 @@ PowerUse: 25 - type: Sprite sprite: Objects/Power/light_tube.rsi - state: normal - + state: normal + - type: entity parent: BaseLightbulb name: black light tube @@ -82,17 +86,3 @@ - type: Sprite sprite: Objects/Power/light_tube.rsi state: normal - -- type: entity - parent: BaseLightbulb - name: incandescent light bulb - suffix: Maintenance, Red - id: LightBulbMaintenanceRed - description: A dim light bulb. These emit a red hue. - components: - - type: LightBulb - bulb: Bulb - color: "#FF6666" # 4000K color temp - lightEnergy: 1.1 - lightRadius: 1.5 - lightSoftness: 1.1 diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Structures/Lighting/base_lighting.yml b/Resources/Prototypes/Nyanotrasen/Entities/Structures/Lighting/base_lighting.yml index f9a6007c405..1bbf28e64fc 100644 --- a/Resources/Prototypes/Nyanotrasen/Entities/Structures/Lighting/base_lighting.yml +++ b/Resources/Prototypes/Nyanotrasen/Entities/Structures/Lighting/base_lighting.yml @@ -6,10 +6,16 @@ components: - type: PoweredLight hasLampOnSpawn: BlueLightTube + - type: PointLight + radius: 12 + energy: 3 + softness: 0.5 + color: "#B4FCF0" - type: DamageOnInteract damage: types: - Heat: 0.2 + Heat: 2 + popupText: powered-light-component-burn-hand - type: entity parent: AlwaysPoweredWallLight @@ -31,10 +37,16 @@ components: - type: PoweredLight hasLampOnSpawn: LightBulbMaintenance + - type: PointLight + radius: 5 + energy: 0.05 + softness: 7 + color: "#FFD1A3" - type: DamageOnInteract damage: types: - Heat: 0.2 + Heat: 2 + popupText: powered-light-component-burn-hand - type: entity parent: SmallLight @@ -43,9 +55,9 @@ description: "A light fixture. Draws power and produces light when equipped with a light tube." components: - type: PointLight - radius: 1.5 - energy: 0.7 - softness: 1.1 + radius: 5 + energy: 0.05 + softness: 7 color: "#FFD1A3" #Colored lights @@ -58,10 +70,16 @@ components: - type: PoweredLight hasLampOnSpawn: ColoredLightTubeRed + - type: PointLight + radius: 10 + energy: 0.9 + softness: 0.5 + color: "#FF6666" - type: DamageOnInteract damage: types: - Heat: 0.2 + Heat: 2 + popupText: powered-light-component-burn-hand - type: entity id: AlwaysPoweredLightColoredRed @@ -83,10 +101,16 @@ components: - type: PoweredLight hasLampOnSpawn: ColoredLightTubeFrostyBlue + - type: PointLight + radius: 10 + energy: 0.8 + softness: 1 + color: "#00FFFF" - type: DamageOnInteract damage: types: - Heat: 0.2 + Heat: 2 + popupText: powered-light-component-burn-hand - type: entity id: AlwaysPoweredLightColoredFrostyBlue @@ -108,10 +132,16 @@ components: - type: PoweredLight hasLampOnSpawn: ColoredLightTubeBlackLight + - type: PointLight + radius: 10 + energy: 1.1 + softness: 1 + color: "#5D0CED" - type: DamageOnInteract damage: types: - Heat: 0.2 + Heat: 2 + popupText: powered-light-component-burn-hand - type: entity id: AlwaysPoweredLightColoredBlack @@ -136,10 +166,18 @@ state: base - type: PoweredLight hasLampOnSpawn: ColoredLightTubeRed + - type: PointLight + enabled: true + radius: 10 + energy: 0.9 + softness: 1 + offset: "0, -0.5" + color: "#FF6666" - type: DamageOnInteract damage: types: Heat: 2 + popupText: powered-light-component-burn-hand - type: StaticPrice price: 75 @@ -158,28 +196,3 @@ softness: 1 offset: "0, -0.5" color: "#FF6666" - -- type: entity - parent: PoweredSmallLight - id: PoweredSmallLightMaintenanceRed - suffix: Maintenance, Red - description: "A light fixture. Draws power and produces light when equipped with a light bulb." - components: - - type: PoweredLight - hasLampOnSpawn: LightBulbMaintenanceRed - - type: DamageOnInteract - damage: - types: - Heat: 0.2 - -- type: entity - parent: SmallLight - id: AlwaysPoweredSmallLightMaintenanceRed - suffix: Always Powered, Maintenance, Red - description: "A light fixture. Draws power and produces light when equipped with a light tube." - components: - - type: PointLight - radius: 1.5 - energy: 1.1 - softness: 1.1 - color: "#FF6666" From f416875713a99629c1d4815e9f4803ac993005b4 Mon Sep 17 00:00:00 2001 From: paige404 <59348003+paige404@users.noreply.github.com> Date: Wed, 18 Dec 2024 02:03:37 -0500 Subject: [PATCH 12/21] Fix Rodentia Bat snouts to properly mirror left and right face (#2470) --- .../Rodentia/snout_markings.rsi/bat.png | Bin 305 -> 397 bytes .../Rodentia/snout_markings.rsi/bat_nose.png | Bin 270 -> 318 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/Resources/Textures/DeltaV/Mobs/Customization/Rodentia/snout_markings.rsi/bat.png b/Resources/Textures/DeltaV/Mobs/Customization/Rodentia/snout_markings.rsi/bat.png index 08096103534f643d150b7eccb7e39988fea6a137..d3b67e9dd4bd5588b459242935fdc28be475fbdb 100644 GIT binary patch literal 397 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=oCO|{#S9F52SJ!|$HeTn3=E9+ zo-U3d6>)EG9pr3w5NLhq>%l0uH@Yo>KTIVoQSzHYh4|_ZN;eumdMdezq=a~!*e}kx zW3%!7H9Ox}9d}@0WD#&Upb`)onm_A@>*Ty^F|(G=lv6FKd1 zh;4nP`V59wyUH8|b|i}T`2S5)XkcLCz(XAP&lyt~QRV7WdaT4^*VRiZp1*!>{CRV2 zc+T3wv^&nve|=6W4YIi-Jfq0^_qhY1*|uwDo%UN@aaZ(%&3RGRMBd$&`lpS=T_?WY zb*?q>$H#d^8=Gd^GnUp^mV`STU7lH$k-k<_V_8ym@6(9Wsrl?@tQX|o&OEK%XmkF! x>3WTSv1hcu{g4+p{&CB`qC}j|d?Qf7q~4jU&$jt&D=>T+JYD@<);T3K0RXO1n*0C& delta 269 zcmeBW-pDjTGLo5rfno0U#y3EUu{g-xiDBJ2nU_EgOS+@4BLl<6e(pbstU$hKfKQ0) zg$oy6ym+y8?b=0)7VX`;x4ym}DAQzPcLYeWmjw9*{|5sGDQ{-CiHhR&43j)v977`9 z-%fMnJD|Y966yN?{}Zp%3x#~LW~te}iD_X<{<`GL^neeI3DFX43>9CdL@KbRewKgs zO-t$O;>x}LlGy|Ft;Lzyk_?}(lR@~avX%$jH PH#2y;`njxgN@xNA`ax}X diff --git a/Resources/Textures/DeltaV/Mobs/Customization/Rodentia/snout_markings.rsi/bat_nose.png b/Resources/Textures/DeltaV/Mobs/Customization/Rodentia/snout_markings.rsi/bat_nose.png index 957bd20691b15984e2141a96055aef748744d47d..563a40e61ad9d9f35f7582b1f256441c4f6f2501 100644 GIT binary patch delta 282 zcmeBU+Q&3Ol7o$bfnil<;k}7@67?TET^vIy;@;lc$lGinz#5=_ieXC6K^C2Z4m}4& zbQ)dGOH9dec;w-z85G&>vcx@k)^9ue>CdOsuy6<{I4tl;h@7@}#Rn(X?U&-NmD=*f zUoS26d-*T0^!ud+mGkZ|oxjz@U6zpvthj*z3!|QiSS zpEKZDnR|OnZuF~NdQUz)^yN} Date: Wed, 18 Dec 2024 08:03:56 +0100 Subject: [PATCH 13/21] Automatic changelog update --- Resources/Changelog/DeltaVChangelog.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Resources/Changelog/DeltaVChangelog.yml b/Resources/Changelog/DeltaVChangelog.yml index cb74d1712e1..92c0b6da0a9 100644 --- a/Resources/Changelog/DeltaVChangelog.yml +++ b/Resources/Changelog/DeltaVChangelog.yml @@ -1,12 +1,4 @@ Entries: -- author: rosieposieeee - changes: - - message: Submarine has received another batch of design tweaks and revisions. - The deepest recesses of the station are shifting... - type: Tweak - id: 287 - time: '2024-03-19T23:50:03.0000000+00:00' - url: https://github.com/DeltaV-Station/Delta-v/pull/809 - author: Rose changes: - message: Added Submarine Station back to the map pool (for real this time) @@ -3819,3 +3811,10 @@ id: 786 time: '2024-12-18T01:27:23.0000000+00:00' url: https://github.com/DeltaV-Station/Delta-v/pull/2445 +- author: paige404 + changes: + - message: Rodentia with bat snouts now look correct no matter their facing. + type: Fix + id: 787 + time: '2024-12-18T07:03:37.0000000+00:00' + url: https://github.com/DeltaV-Station/Delta-v/pull/2470 From 9146ee34d6f4f777bb9f60dc2f21e67221514c12 Mon Sep 17 00:00:00 2001 From: deltanedas <39013340+deltanedas@users.noreply.github.com> Date: Wed, 18 Dec 2024 07:13:39 +0000 Subject: [PATCH 14/21] remove constant shuttle spam from survival (#2471) Co-authored-by: deltanedas <@deltanedas:kde.org> --- Resources/Prototypes/game_presets.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Prototypes/game_presets.yml b/Resources/Prototypes/game_presets.yml index dc5663c0882..f27d5599f5b 100644 --- a/Resources/Prototypes/game_presets.yml +++ b/Resources/Prototypes/game_presets.yml @@ -9,7 +9,7 @@ - MeteorSwarmScheduler - RampingStationEventScheduler - SpaceTrafficControlEventScheduler - - SpaceTrafficControlFriendlyEventScheduler + #- SpaceTrafficControlFriendlyEventScheduler # DeltaV: spam of garbage roles nobody takes every 10-20 minutes - BasicRoundstartVariation - GlimmerEventScheduler # DeltaV From 94b2542165554db48bc78937d8cedde02d2427ec Mon Sep 17 00:00:00 2001 From: SolStar <44028047+ewokswagger@users.noreply.github.com> Date: Wed, 18 Dec 2024 02:25:22 -0500 Subject: [PATCH 15/21] Add error logging for Auto ACO procedure. (#2450) * Add error logging for Auto ACO procedure. * type --- .../DeltaV/Station/Components/CaptainStateComponent.cs | 6 +++--- Content.Server/DeltaV/Station/Systems/CaptainStateSystem.cs | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Content.Server/DeltaV/Station/Components/CaptainStateComponent.cs b/Content.Server/DeltaV/Station/Components/CaptainStateComponent.cs index 96d7c441071..d432e9ea6d0 100644 --- a/Content.Server/DeltaV/Station/Components/CaptainStateComponent.cs +++ b/Content.Server/DeltaV/Station/Components/CaptainStateComponent.cs @@ -18,7 +18,7 @@ public sealed partial class CaptainStateComponent : Component /// Assume no captain unless specified /// [DataField] - public bool HasCaptain; + public bool HasCaptain = false; /// /// The localization ID used for announcing the cancellation of ACO requests @@ -42,13 +42,13 @@ public sealed partial class CaptainStateComponent : Component /// Set after ACO has been requested to avoid duplicate calls /// [DataField] - public bool IsACORequestActive; + public bool IsACORequestActive = false; /// /// Used to denote that AA has been brought into the round either from captain or safe. /// [DataField] - public bool IsAAInPlay; + public bool IsAAInPlay = false; /// /// The localization ID for announcing that AA has been unlocked for ACO diff --git a/Content.Server/DeltaV/Station/Systems/CaptainStateSystem.cs b/Content.Server/DeltaV/Station/Systems/CaptainStateSystem.cs index 38475da89be..c790b22f782 100644 --- a/Content.Server/DeltaV/Station/Systems/CaptainStateSystem.cs +++ b/Content.Server/DeltaV/Station/Systems/CaptainStateSystem.cs @@ -46,6 +46,12 @@ public override void Update(float frameTime) var query = EntityQueryEnumerator(); while (query.MoveNext(out var station, out var captainState)) { + if (currentTime < _acoDelay && captainState.IsACORequestActive == true) // Avoid timing issues. No need to run before _acoDelay is reached anyways. + { + Log.Error($"{captainState} IsACORequestActive true before ACO request time."); + captainState.IsACORequestActive = false; + } + if (captainState.HasCaptain) HandleHasCaptain(station, captainState); else From ee4fca43f4090fe50d714bd112407df9c9891326 Mon Sep 17 00:00:00 2001 From: deltanedas <39013340+deltanedas@users.noreply.github.com> Date: Wed, 18 Dec 2024 11:22:19 +0000 Subject: [PATCH 16/21] cleanup and carrying refactor (#2466) * remove evil file * clean up fugi emag lines * clean up barrel/keg yml and meta * surface-level refactor of deep fryer component * move carrying to shared and fully refactor --------- Co-authored-by: deltanedas <@deltanedas:kde.org> --- .../Properties/launchSettings.json | 8 - .../DeltaV/GlimmerWisp/LifeDrainerSystem.cs | 2 +- .../Carrying/BeingCarriedComponent.cs | 11 - .../Carrying/CarriableComponent.cs | 17 - .../Nyanotrasen/Carrying/CarryingComponent.cs | 11 - .../Nyanotrasen/Carrying/CarryingSystem.cs | 432 ------------------ .../Item/PseudoItem/PseudoItemSystem.cs | 2 +- .../Kitchen/Components/DeepFryerComponent.cs | 402 ++++++++-------- .../EntitySystems/DeepFryerSystem.Results.cs | 25 +- .../Kitchen/EntitySystems/DeepFryerSystem.cs | 9 - .../Resist/EscapeInventorySystem.cs | 9 - .../DeltaV/Carrying/BeingCarriedComponent.cs | 14 + .../DeltaV/Carrying/CarriableComponent.cs | 14 + .../DeltaV/Carrying/CarryDoAfterEvent.cs | 7 + .../DeltaV/Carrying/CarryingComponent.cs | 14 + .../Carrying/CarryingSlowdownComponent.cs | 14 + .../DeltaV/Carrying/CarryingSlowdownSystem.cs | 29 ++ .../DeltaV/Carrying/CarryingSystem.cs | 384 ++++++++++++++++ .../Carrying/CarryingDoAfterEvent.cs | 10 - .../Carrying/CarryingSlowdownComponent.cs | 28 -- .../Carrying/CarryingSlowdownSystem.cs | 47 -- .../Locale/en-US/deltav/fugitive/sets.ftl | 1 - .../DeltaV/Catalog/Cargo/cargo_food.yml | 1 - .../DeltaV/Catalog/fugitive_sets.yml | 1 - .../Entities/Objects/Specific/fugitive.yml | 1 - .../Objects/Storage/barrel.rsi/meta.json | 34 +- .../DeltaV/Objects/Storage/keg.rsi/meta.json | 26 +- 27 files changed, 701 insertions(+), 852 deletions(-) delete mode 100644 Content.Packaging/Properties/launchSettings.json delete mode 100644 Content.Server/Nyanotrasen/Carrying/BeingCarriedComponent.cs delete mode 100644 Content.Server/Nyanotrasen/Carrying/CarriableComponent.cs delete mode 100644 Content.Server/Nyanotrasen/Carrying/CarryingComponent.cs delete mode 100644 Content.Server/Nyanotrasen/Carrying/CarryingSystem.cs create mode 100644 Content.Shared/DeltaV/Carrying/BeingCarriedComponent.cs create mode 100644 Content.Shared/DeltaV/Carrying/CarriableComponent.cs create mode 100644 Content.Shared/DeltaV/Carrying/CarryDoAfterEvent.cs create mode 100644 Content.Shared/DeltaV/Carrying/CarryingComponent.cs create mode 100644 Content.Shared/DeltaV/Carrying/CarryingSlowdownComponent.cs create mode 100644 Content.Shared/DeltaV/Carrying/CarryingSlowdownSystem.cs create mode 100644 Content.Shared/DeltaV/Carrying/CarryingSystem.cs delete mode 100644 Content.Shared/Nyanotrasen/Carrying/CarryingDoAfterEvent.cs delete mode 100644 Content.Shared/Nyanotrasen/Carrying/CarryingSlowdownComponent.cs delete mode 100644 Content.Shared/Nyanotrasen/Carrying/CarryingSlowdownSystem.cs diff --git a/Content.Packaging/Properties/launchSettings.json b/Content.Packaging/Properties/launchSettings.json deleted file mode 100644 index 33504c948ad..00000000000 --- a/Content.Packaging/Properties/launchSettings.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "profiles": { - "WSL": { - "commandName": "WSL2", - "distributionName": "" - } - } -} \ No newline at end of file diff --git a/Content.Server/DeltaV/GlimmerWisp/LifeDrainerSystem.cs b/Content.Server/DeltaV/GlimmerWisp/LifeDrainerSystem.cs index ec800db2a30..079ec77bbf3 100644 --- a/Content.Server/DeltaV/GlimmerWisp/LifeDrainerSystem.cs +++ b/Content.Server/DeltaV/GlimmerWisp/LifeDrainerSystem.cs @@ -1,5 +1,6 @@ using Content.Shared.ActionBlocker; using Content.Shared.Damage; +using Content.Shared.DeltaV.Carrying; using Content.Shared.DoAfter; using Content.Shared.Interaction; using Content.Shared.Mobs.Systems; @@ -11,7 +12,6 @@ using Content.Shared.Verbs; using Content.Shared.Whitelist; using Content.Server.NPC.Components; -using Content.Server.Carrying; using Robust.Shared.Audio.Systems; using Robust.Shared.Player; using Robust.Shared.Utility; diff --git a/Content.Server/Nyanotrasen/Carrying/BeingCarriedComponent.cs b/Content.Server/Nyanotrasen/Carrying/BeingCarriedComponent.cs deleted file mode 100644 index afc78978c86..00000000000 --- a/Content.Server/Nyanotrasen/Carrying/BeingCarriedComponent.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Content.Server.Carrying -{ - /// - /// Stores the carrier of an entity being carried. - /// - [RegisterComponent] - public sealed partial class BeingCarriedComponent : Component - { - public EntityUid Carrier = default!; - } -} diff --git a/Content.Server/Nyanotrasen/Carrying/CarriableComponent.cs b/Content.Server/Nyanotrasen/Carrying/CarriableComponent.cs deleted file mode 100644 index f4fd1fa6d56..00000000000 --- a/Content.Server/Nyanotrasen/Carrying/CarriableComponent.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Threading; - -namespace Content.Server.Carrying -{ - [RegisterComponent] - public sealed partial class CarriableComponent : Component - { - /// - /// Number of free hands required - /// to carry the entity - /// - [DataField("freeHandsRequired")] - public int FreeHandsRequired = 2; - - public CancellationTokenSource? CancelToken; - } -} diff --git a/Content.Server/Nyanotrasen/Carrying/CarryingComponent.cs b/Content.Server/Nyanotrasen/Carrying/CarryingComponent.cs deleted file mode 100644 index e79460595b9..00000000000 --- a/Content.Server/Nyanotrasen/Carrying/CarryingComponent.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Content.Server.Carrying -{ - /// - /// Added to an entity when they are carrying somebody. - /// - [RegisterComponent] - public sealed partial class CarryingComponent : Component - { - public EntityUid Carried = default!; - } -} diff --git a/Content.Server/Nyanotrasen/Carrying/CarryingSystem.cs b/Content.Server/Nyanotrasen/Carrying/CarryingSystem.cs deleted file mode 100644 index 0faff7d8078..00000000000 --- a/Content.Server/Nyanotrasen/Carrying/CarryingSystem.cs +++ /dev/null @@ -1,432 +0,0 @@ -using System.Numerics; -using System.Threading; -using Content.Server.DoAfter; -using Content.Server.Body.Systems; -using Content.Server.Hands.Systems; -using Content.Server.Resist; -using Content.Server.Popups; -using Content.Server.Inventory; -using Content.Server.Nyanotrasen.Item.PseudoItem; -using Content.Shared.Climbing; // Shared instead of Server -using Content.Shared.Mobs; -using Content.Shared.DoAfter; -using Content.Shared.Buckle.Components; -using Content.Shared.Hands.Components; -using Content.Shared.Hands; -using Content.Shared.Stunnable; -using Content.Shared.Interaction.Events; -using Content.Shared.Verbs; -using Content.Shared.Climbing.Events; // Added this. -using Content.Shared.Carrying; -using Content.Shared.Movement.Events; -using Content.Shared.Movement.Systems; -using Content.Shared.Pulling; -using Content.Shared.Standing; -using Content.Shared.ActionBlocker; -using Content.Shared.Inventory.VirtualItem; -using Content.Shared.Item; -using Content.Shared.Throwing; -using Content.Shared.Mobs.Systems; -using Content.Shared.Movement.Pulling.Components; -using Content.Shared.Movement.Pulling.Events; -using Content.Shared.Movement.Pulling.Systems; -using Content.Shared.Nyanotrasen.Item.PseudoItem; -using Content.Shared.Storage; -using Robust.Shared.Map.Components; -using Robust.Shared.Physics.Components; - -namespace Content.Server.Carrying -{ - public sealed class CarryingSystem : EntitySystem - { - [Dependency] private readonly VirtualItemSystem _virtualItemSystem = default!; - [Dependency] private readonly CarryingSlowdownSystem _slowdown = default!; - [Dependency] private readonly DoAfterSystem _doAfterSystem = default!; - [Dependency] private readonly StandingStateSystem _standingState = default!; - [Dependency] private readonly ActionBlockerSystem _actionBlockerSystem = default!; - [Dependency] private readonly PullingSystem _pullingSystem = default!; - [Dependency] private readonly MobStateSystem _mobStateSystem = default!; - [Dependency] private readonly EscapeInventorySystem _escapeInventorySystem = default!; - [Dependency] private readonly PopupSystem _popupSystem = default!; - [Dependency] private readonly MovementSpeedModifierSystem _movementSpeed = default!; - [Dependency] private readonly RespiratorSystem _respirator = default!; - [Dependency] private readonly SharedTransformSystem _transform = default!; - [Dependency] private readonly PseudoItemSystem _pseudoItem = default!; // Needed for fitting check - - public override void Initialize() - { - base.Initialize(); - SubscribeLocalEvent>(AddCarryVerb); - SubscribeLocalEvent>(AddInsertCarriedVerb); - SubscribeLocalEvent(OnVirtualItemDeleted); - SubscribeLocalEvent(OnThrow); - SubscribeLocalEvent(OnParentChanged); - SubscribeLocalEvent(OnMobStateChanged); - SubscribeLocalEvent(OnInteractionAttempt); - SubscribeLocalEvent(OnMoveInput); - SubscribeLocalEvent(OnMoveAttempt); - SubscribeLocalEvent(OnStandAttempt); - SubscribeLocalEvent(OnInteractedWith); - SubscribeLocalEvent(OnPullAttempt); - SubscribeLocalEvent(OnStartClimb); - SubscribeLocalEvent(OnBuckleChange); - SubscribeLocalEvent(OnBuckleChange); - SubscribeLocalEvent(OnBuckleChange); - SubscribeLocalEvent(OnBuckleChange); - SubscribeLocalEvent(OnDoAfter); - } - - private void AddCarryVerb(EntityUid uid, CarriableComponent component, GetVerbsEvent args) - { - if (!args.CanInteract || !args.CanAccess) - return; - - if (!CanCarry(args.User, uid, component)) - return; - - if (HasComp(args.User)) // yeah not dealing with that - return; - - if (HasComp(args.User) || HasComp(args.Target)) - return; - - if (!_mobStateSystem.IsAlive(args.User)) - return; - - if (args.User == args.Target) - return; - - AlternativeVerb verb = new() - { - Act = () => - { - StartCarryDoAfter(args.User, uid, component); - }, - Text = Loc.GetString("carry-verb"), - Priority = 2 - }; - args.Verbs.Add(verb); - } - - private void AddInsertCarriedVerb(EntityUid uid, CarryingComponent component, GetVerbsEvent args) - { - // If the person is carrying someone, and the carried person is a pseudo-item, and the target entity is a storage, - // then add an action to insert the carried entity into the target - var toInsert = args.Using; - if (toInsert is not { Valid: true } || !args.CanAccess || !TryComp(toInsert, out var pseudoItem)) - return; - - if (!TryComp(args.Target, out var storageComp)) - return; - - if (!_pseudoItem.CheckItemFits((toInsert.Value, pseudoItem), (args.Target, storageComp))) - return; - - InnateVerb verb = new() - { - Act = () => - { - DropCarried(uid, toInsert.Value); - _pseudoItem.TryInsert(args.Target, toInsert.Value, pseudoItem, storageComp); - }, - Text = Loc.GetString("action-name-insert-other", ("target", toInsert)), - Priority = 2 - }; - args.Verbs.Add(verb); - } - - /// - /// Since the carried entity is stored as 2 virtual items, when deleted we want to drop them. - /// - private void OnVirtualItemDeleted(EntityUid uid, CarryingComponent component, VirtualItemDeletedEvent args) - { - if (!HasComp(args.BlockingEntity)) - return; - - DropCarried(uid, args.BlockingEntity); - } - - /// - /// Basically using virtual item passthrough to throw the carried person. A new age! - /// Maybe other things besides throwing should use virt items like this... - /// - private void OnThrow(EntityUid uid, CarryingComponent component, BeforeThrowEvent args) - { - if (!TryComp(args.ItemUid, out var virtItem) || !HasComp(virtItem.BlockingEntity)) - return; - - args.ItemUid = virtItem.BlockingEntity; - - var multiplier = MassContest(uid, virtItem.BlockingEntity); - args.ThrowSpeed = 5f * multiplier; - } - - private void OnParentChanged(EntityUid uid, CarryingComponent component, ref EntParentChangedMessage args) - { - var xform = Transform(uid); - if (xform.MapUid != args.OldMapId) - return; - - // Do not drop the carried entity if the new parent is a grid - if (xform.ParentUid == xform.GridUid) - return; - - DropCarried(uid, component.Carried); - } - - private void OnMobStateChanged(EntityUid uid, CarryingComponent component, MobStateChangedEvent args) - { - DropCarried(uid, component.Carried); - } - - /// - /// Only let the person being carried interact with their carrier and things on their person. - /// - private void OnInteractionAttempt(EntityUid uid, BeingCarriedComponent component, InteractionAttemptEvent args) - { - if (args.Target == null) - return; - - var targetParent = Transform(args.Target.Value).ParentUid; - - if (args.Target.Value != component.Carrier && targetParent != component.Carrier && targetParent != uid) - args.Cancelled = true; - } - - /// - /// Try to escape via the escape inventory system. - /// - private void OnMoveInput(EntityUid uid, BeingCarriedComponent component, ref MoveInputEvent args) - { - if (!TryComp(uid, out var escape)) - return; - - if (!args.HasDirectionalMovement) - return; - - if (_actionBlockerSystem.CanInteract(uid, component.Carrier)) - { - // Note: the mass contest is inverted because weaker entities are supposed to take longer to escape - _escapeInventorySystem.AttemptEscape(uid, component.Carrier, escape, MassContest(component.Carrier, uid)); - } - } - - private void OnMoveAttempt(EntityUid uid, BeingCarriedComponent component, UpdateCanMoveEvent args) - { - args.Cancel(); - } - - private void OnStandAttempt(EntityUid uid, BeingCarriedComponent component, StandAttemptEvent args) - { - args.Cancel(); - } - - private void OnInteractedWith(EntityUid uid, BeingCarriedComponent component, GettingInteractedWithAttemptEvent args) - { - if (args.Uid != component.Carrier) - args.Cancelled = true; - } - - private void OnPullAttempt(EntityUid uid, BeingCarriedComponent component, PullAttemptEvent args) - { - args.Cancelled = true; - } - - private void OnStartClimb(EntityUid uid, BeingCarriedComponent component, ref StartClimbEvent args) - { - DropCarried(component.Carrier, uid); - } - - private void OnBuckleChange(EntityUid uid, BeingCarriedComponent component, TEvent args) // Augh - { - DropCarried(component.Carrier, uid); - } - - private void OnDoAfter(EntityUid uid, CarriableComponent component, CarryDoAfterEvent args) - { - component.CancelToken = null; - if (args.Handled || args.Cancelled) - return; - - if (!CanCarry(args.Args.User, uid, component)) - return; - - Carry(args.Args.User, uid); - args.Handled = true; - } - private void StartCarryDoAfter(EntityUid carrier, EntityUid carried, CarriableComponent component) - { - TimeSpan length = GetPickupDuration(carrier, carried); - - if (length >= TimeSpan.FromSeconds(9)) - { - _popupSystem.PopupEntity(Loc.GetString("carry-too-heavy"), carried, carrier, Shared.Popups.PopupType.SmallCaution); - return; - } - - if (!HasComp(carried)) - length *= 2f; - - component.CancelToken = new CancellationTokenSource(); - - var ev = new CarryDoAfterEvent(); - var args = new DoAfterArgs(EntityManager, carrier, length, ev, carried, target: carried) - { - BreakOnMove = true, - NeedHand = true - }; - - _doAfterSystem.TryStartDoAfter(args); - - // Show a popup to the person getting picked up - _popupSystem.PopupEntity(Loc.GetString("carry-started", ("carrier", carrier)), carried, carried); - } - - private void Carry(EntityUid carrier, EntityUid carried) - { - if (TryComp(carried, out var pullable)) - _pullingSystem.TryStopPull(carried, pullable); - - var carrierXform = Transform(carrier); - var xform = Transform(carried); - _transform.AttachToGridOrMap(carrier, carrierXform); - _transform.AttachToGridOrMap(carried, xform); - xform.Coordinates = carrierXform.Coordinates; - _transform.SetParent(carried, xform, carrier, carrierXform); - - _virtualItemSystem.TrySpawnVirtualItemInHand(carried, carrier); - _virtualItemSystem.TrySpawnVirtualItemInHand(carried, carrier); - var carryingComp = EnsureComp(carrier); - ApplyCarrySlowdown(carrier, carried); - var carriedComp = EnsureComp(carried); - EnsureComp(carried); - - carryingComp.Carried = carried; - carriedComp.Carrier = carrier; - - _actionBlockerSystem.UpdateCanMove(carried); - } - - public bool TryCarry(EntityUid carrier, EntityUid toCarry, CarriableComponent? carriedComp = null) - { - if (!Resolve(toCarry, ref carriedComp, false)) - return false; - - if (!CanCarry(carrier, toCarry, carriedComp)) - return false; - - // The second one means that carrier is a pseudo-item and is inside a bag. - if (HasComp(carrier) || HasComp(carrier)) - return false; - - if (GetPickupDuration(carrier, toCarry) > TimeSpan.FromSeconds(9)) - return false; - - Carry(carrier, toCarry); - - return true; - } - - public void DropCarried(EntityUid carrier, EntityUid carried) - { - RemComp(carrier); // get rid of this first so we don't recusrively fire that event - RemComp(carrier); - RemComp(carried); - RemComp(carried); - _actionBlockerSystem.UpdateCanMove(carried); - _virtualItemSystem.DeleteInHandsMatching(carrier, carried); - Transform(carried).AttachToGridOrMap(); - _standingState.Stand(carried); - _movementSpeed.RefreshMovementSpeedModifiers(carrier); - } - - private void ApplyCarrySlowdown(EntityUid carrier, EntityUid carried) - { - var massRatio = MassContest(carrier, carried); - - if (massRatio == 0) - massRatio = 1; - - var massRatioSq = Math.Pow(massRatio, 2); - var modifier = (1 - (0.15 / massRatioSq)); - modifier = Math.Max(0.1, modifier); - var slowdownComp = EnsureComp(carrier); - _slowdown.SetModifier(carrier, (float) modifier, (float) modifier, slowdownComp); - } - - public bool CanCarry(EntityUid carrier, EntityUid carried, CarriableComponent? carriedComp = null) - { - if (!Resolve(carried, ref carriedComp, false)) - return false; - - if (carriedComp.CancelToken != null) - return false; - - if (!HasComp(Transform(carrier).ParentUid)) - return false; - - if (HasComp(carrier) || HasComp(carried)) - return false; - - // if (_respirator.IsReceivingCPR(carried)) - // return false; - - if (!TryComp(carrier, out var hands)) - return false; - - if (hands.CountFreeHands() < carriedComp.FreeHandsRequired) - return false; - - return true; - } - - private float MassContest(EntityUid roller, EntityUid target, PhysicsComponent? rollerPhysics = null, PhysicsComponent? targetPhysics = null) - { - if (!Resolve(roller, ref rollerPhysics, false) || !Resolve(target, ref targetPhysics, false)) - return 1f; - - if (targetPhysics.FixturesMass == 0) - return 1f; - - return rollerPhysics.FixturesMass / targetPhysics.FixturesMass; - } - - private TimeSpan GetPickupDuration(EntityUid carrier, EntityUid carried) - { - var length = TimeSpan.FromSeconds(3); - - var mod = MassContest(carrier, carried); - if (mod != 0) - length /= mod; - - return length; - } - - public override void Update(float frameTime) - { - var query = EntityQueryEnumerator(); - while (query.MoveNext(out var carried, out var comp)) - { - var carrier = comp.Carrier; - if (carrier is not { Valid: true } || carried is not { Valid: true }) - continue; - - // SOMETIMES - when an entity is inserted into disposals, or a cryosleep chamber - it can get re-parented without a proper reparent event - // when this happens, it needs to be dropped because it leads to weird behavior - if (Transform(carried).ParentUid != carrier) - { - DropCarried(carrier, carried); - continue; - } - - // Make sure the carried entity is always centered relative to the carrier, as gravity pulls can offset it otherwise - var xform = Transform(carried); - if (!xform.LocalPosition.Equals(Vector2.Zero)) - { - xform.LocalPosition = Vector2.Zero; - } - } - query.Dispose(); - } - } -} diff --git a/Content.Server/Nyanotrasen/Item/PseudoItem/PseudoItemSystem.cs b/Content.Server/Nyanotrasen/Item/PseudoItem/PseudoItemSystem.cs index 6df387e6ba8..7437d293da6 100644 --- a/Content.Server/Nyanotrasen/Item/PseudoItem/PseudoItemSystem.cs +++ b/Content.Server/Nyanotrasen/Item/PseudoItem/PseudoItemSystem.cs @@ -1,9 +1,9 @@ -using Content.Server.Carrying; using Content.Server.DoAfter; using Content.Server.Item; using Content.Server.Popups; using Content.Server.Storage.EntitySystems; using Content.Shared.Bed.Sleep; +using Content.Shared.DeltaV.Carrying; using Content.Shared.DoAfter; using Content.Shared.IdentityManagement; using Content.Shared.Item; diff --git a/Content.Server/Nyanotrasen/Kitchen/Components/DeepFryerComponent.cs b/Content.Server/Nyanotrasen/Kitchen/Components/DeepFryerComponent.cs index d77bec6b1ae..faf27484ce9 100644 --- a/Content.Server/Nyanotrasen/Kitchen/Components/DeepFryerComponent.cs +++ b/Content.Server/Nyanotrasen/Kitchen/Components/DeepFryerComponent.cs @@ -11,230 +11,184 @@ using Robust.Shared.Containers; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Set; -namespace Content.Server.Nyanotrasen.Kitchen.Components +namespace Content.Server.Nyanotrasen.Kitchen.Components; + +// TODO: move to shared and get rid of SharedDeepFryerComponent +[RegisterComponent, Access(typeof(SharedDeepfryerSystem))] +public sealed partial class DeepFryerComponent : SharedDeepFryerComponent { - [RegisterComponent] - [Access(typeof(SharedDeepfryerSystem))] - // This line appears to be depracted: [ComponentReference(typeof(SharedDeepFryerComponent))] - public sealed partial class DeepFryerComponent : SharedDeepFryerComponent - { - // There are three levels to how the deep fryer treats entities. - // - // 1. An entity can be rejected by the blacklist and be untouched by - // anything other than heat damage. - // - // 2. An entity can be deep-fried but not turned into an edible. The - // change will be mostly cosmetic. Any entity that does not match - // the blacklist will fall into this category. - // - // 3. An entity can be deep-fried and turned into something edible. The - // change will permit the item to be permanently destroyed by eating - // it. - - /// - /// When will the deep fryer layer on the next stage of crispiness? - /// - [DataField("nextFryTime", customTypeSerializer: typeof(TimeOffsetSerializer))] - public TimeSpan NextFryTime { get; set; } - - /// - /// How much waste needs to be added at the next update interval? - /// - public FixedPoint2 WasteToAdd { get; set; } = FixedPoint2.Zero; - - /// - /// How often are items in the deep fryer fried? - /// - [ViewVariables(VVAccess.ReadWrite)] - [DataField("fryInterval")] - public TimeSpan FryInterval { get; set; } = TimeSpan.FromSeconds(5); - - /// - /// What entities cannot be deep-fried no matter what? - /// - [ViewVariables(VVAccess.ReadWrite)] - [DataField("blacklist")] - public EntityWhitelist? Blacklist { get; set; } - - /// - /// What entities can be deep-fried into being edible? - /// - [ViewVariables(VVAccess.ReadWrite)] - [DataField("whitelist")] - public EntityWhitelist? Whitelist { get; set; } - - /// - /// What are over-cooked and burned entities turned into? - /// - /// - /// To prevent unwanted destruction of items, only food can be turned - /// into this. - /// - [ViewVariables(VVAccess.ReadWrite)] - [DataField("charredPrototype", customTypeSerializer: typeof(PrototypeIdSerializer))] - public string? CharredPrototype { get; set; } - - /// - /// What reagents are considered valid cooking oils? - /// - [ViewVariables(VVAccess.ReadWrite)] - [DataField("fryingOils", customTypeSerializer: typeof(PrototypeIdHashSetSerializer))] - public HashSet FryingOils { get; set; } = new(); - - /// - /// What reagents are added to tasty deep-fried food? - /// JJ Comment: I removed Solution from this. Unsure if I need to replace it with something. - /// - [ViewVariables(VVAccess.ReadWrite)] - [DataField("goodReagents")] - public List GoodReagents { get; set; } = new(); - - /// - /// What reagents are added to terrible deep-fried food? - /// JJ Comment: I removed Solution from this. Unsure if I need to replace it with something. - /// - [ViewVariables(VVAccess.ReadWrite)] - [DataField("badReagents")] - public List BadReagents { get; set; } = new(); - - /// - /// What reagents replace every 1 unit of oil spent on frying? - /// JJ Comment: I removed Solution from this. Unsure if I need to replace it with something. - /// - [ViewVariables(VVAccess.ReadWrite)] - [DataField("wasteReagents")] - public List WasteReagents { get; set; } = new(); - - /// - /// What flavors go well with deep frying? - /// - [ViewVariables(VVAccess.ReadWrite)] - [DataField("goodFlavors", customTypeSerializer: typeof(PrototypeIdHashSetSerializer))] - public HashSet GoodFlavors { get; set; } = new(); - - /// - /// What flavors don't go well with deep frying? - /// - [ViewVariables(VVAccess.ReadWrite)] - [DataField("badFlavors", customTypeSerializer: typeof(PrototypeIdHashSetSerializer))] - public HashSet BadFlavors { get; set; } = new(); - - /// - /// How much is the price coefficiency of a food changed for each good flavor? - /// - [ViewVariables(VVAccess.ReadWrite)] - [DataField("goodFlavorPriceBonus")] - public float GoodFlavorPriceBonus { get; set; } = 0.2f; - - /// - /// How much is the price coefficiency of a food changed for each bad flavor? - /// - [ViewVariables(VVAccess.ReadWrite)] - [DataField("badFlavorPriceMalus")] - public float BadFlavorPriceMalus { get; set; } = -0.3f; - - /// - /// What is the name of the solution container for the fryer's oil? - /// - [ViewVariables(VVAccess.ReadWrite)] - [DataField("solution")] - public string SolutionName { get; set; } = "vat_oil"; - - public Solution Solution { get; set; } = default!; - - /// - /// What is the name of the entity container for items inside the deep fryer? - /// - [DataField("storage")] - public string StorageName { get; set; } = "vat_entities"; - - public BaseContainer Storage { get; set; } = default!; - - /// - /// How much solution should be imparted based on an item's size? - /// - [ViewVariables(VVAccess.ReadWrite)] - [DataField("solutionSizeCoefficient")] - public FixedPoint2 SolutionSizeCoefficient { get; set; } = 1f; - - /// - /// What's the maximum amount of solution that should ever be imparted? - /// - [ViewVariables(VVAccess.ReadWrite)] - [DataField("solutionSplitMax")] - public FixedPoint2 SolutionSplitMax { get; set; } = 10f; - - /// - /// What percent of the fryer's solution has to be oil in order for it to fry? - /// - /// - /// The chef will have to clean it out occasionally, and if too much - /// non-oil reagents are added, the vat will have to be drained. - /// - [ViewVariables(VVAccess.ReadWrite)] - [DataField("fryingOilThreshold")] - public FixedPoint2 FryingOilThreshold { get; set; } = 0.5f; - - /// - /// What is the bare minimum number of oil units to prevent the fryer - /// from unsafe operation? - /// - [ViewVariables(VVAccess.ReadWrite)] - [DataField("safeOilVolume")] - public FixedPoint2 SafeOilVolume { get; set; } = 10f; - - [ViewVariables(VVAccess.ReadWrite)] - [DataField("unsafeOilVolumeEffects")] - public List UnsafeOilVolumeEffects = new(); - - /// - /// What is the temperature of the vat when the deep fryer is powered? - /// - [ViewVariables(VVAccess.ReadWrite)] - [DataField("poweredTemperature")] - public float PoweredTemperature = 550.0f; - - /// - /// How many entities can this deep fryer hold? - /// - [ViewVariables(VVAccess.ReadWrite)] - public int StorageMaxEntities = 4; - - /// - /// How many entities can be held, at a minimum? - /// - [ViewVariables(VVAccess.ReadWrite)] - [DataField("baseStorageMaxEntities")] - public int BaseStorageMaxEntities = 4; - - // /// - // /// What upgradeable machine part dictates the quality of the storage size? - // /// - // [DataField("machinePartStorageMax", customTypeSerializer: typeof(PrototypeIdSerializer))] - // public string MachinePartStorageMax = "MatterBin"; - - /// - /// How much extra storage is added per part rating? - /// - [ViewVariables(VVAccess.ReadWrite)] - [DataField("storagePerPartRating")] - public int StoragePerPartRating = 4; - - /// - /// What sound is played when an item is inserted into hot oil? - /// - [ViewVariables(VVAccess.ReadWrite)] - [DataField("soundInsertItem")] - public SoundSpecifier SoundInsertItem = new SoundPathSpecifier("/Audio/Nyanotrasen/Machines/deepfryer_basket_add_item.ogg"); - - /// - /// What sound is played when an item is removed? - /// - [ViewVariables(VVAccess.ReadWrite)] - [DataField("soundRemoveItem")] - public SoundSpecifier SoundRemoveItem = new SoundPathSpecifier("/Audio/Nyanotrasen/Machines/deepfryer_basket_remove_item.ogg"); - } + // There are three levels to how the deep fryer treats entities. + // + // 1. An entity can be rejected by the blacklist and be untouched by + // anything other than heat damage. + // + // 2. An entity can be deep-fried but not turned into an edible. The + // change will be mostly cosmetic. Any entity that does not match + // the blacklist will fall into this category. + // + // 3. An entity can be deep-fried and turned into something edible. The + // change will permit the item to be permanently destroyed by eating + // it. + + /// + /// When will the deep fryer layer on the next stage of crispiness? + /// + [DataField(customTypeSerializer: typeof(TimeOffsetSerializer))] + public TimeSpan NextFryTime; + + /// + /// How much waste needs to be added at the next update interval? + /// + [DataField] + public FixedPoint2 WasteToAdd = FixedPoint2.Zero; + + /// + /// How often are items in the deep fryer fried? + /// + [DataField] + public TimeSpan FryInterval = TimeSpan.FromSeconds(5); + + /// + /// What entities cannot be deep-fried no matter what? + /// + [DataField] + public EntityWhitelist? Blacklist; + + /// + /// What entities can be deep-fried into being edible? + /// + [DataField] + public EntityWhitelist? Whitelist; + + /// + /// What are over-cooked and burned entities turned into? + /// + /// + /// To prevent unwanted destruction of items, only food can be turned + /// into this. + /// + [DataField] + public EntProtoId? CharredPrototype; + + /// + /// What reagents are considered valid cooking oils? + /// + [DataField] + public HashSet> FryingOils = new(); + + /// + /// What reagents are added to tasty deep-fried food? + /// + [DataField] + public List GoodReagents = new(); + + /// + /// What reagents are added to terrible deep-fried food? + /// + [DataField] + public List BadReagents = new(); + + /// + /// What reagents replace every 1 unit of oil spent on frying? + /// + [DataField] + public List WasteReagents = new(); + + /// + /// What flavors go well with deep frying? + /// + [DataField] + public HashSet> GoodFlavors = new(); + + /// + /// What flavors don't go well with deep frying? + /// + [DataField] + public HashSet> BadFlavors = new(); + + /// + /// How much is the price coefficiency of a food changed for each good flavor? + /// + [DataField] + public float GoodFlavorPriceBonus = 0.2f; + + /// + /// How much is the price coefficiency of a food changed for each bad flavor? + /// + [DataField] + public float BadFlavorPriceMalus = -0.3f; + + /// + /// What is the name of the solution container for the fryer's oil? + /// + [DataField] + public string SolutionName = "vat_oil"; + + // TODO: Entity + public Solution Solution = default!; + + /// + /// What is the name of the entity container for items inside the deep fryer? + /// + [DataField("storage")] + public string StorageName = "vat_entities"; + + public BaseContainer Storage = default!; + + /// + /// How much solution should be imparted based on an item's size? + /// + [DataField] + public FixedPoint2 SolutionSizeCoefficient = 1f; + + /// + /// What's the maximum amount of solution that should ever be imparted? + /// + [DataField] + public FixedPoint2 SolutionSplitMax = 10f; + + /// + /// What percent of the fryer's solution has to be oil in order for it to fry? + /// + /// + /// The chef will have to clean it out occasionally, and if too much + /// non-oil reagents are added, the vat will have to be drained. + /// + [DataField] + public FixedPoint2 FryingOilThreshold = 0.5f; + + /// + /// What is the bare minimum number of oil units to prevent the fryer + /// from unsafe operation? + /// + [DataField] + public FixedPoint2 SafeOilVolume = 10f; + + [DataField] + public List UnsafeOilVolumeEffects = new(); + + /// + /// What is the temperature of the vat when the deep fryer is powered? + /// + [DataField] + public float PoweredTemperature = 550.0f; + + /// + /// How many entities can this deep fryer hold? + /// + [DataField] + public int StorageMaxEntities = 4; + + /// + /// What sound is played when an item is inserted into hot oil? + /// + [DataField] + public SoundSpecifier SoundInsertItem = new SoundPathSpecifier("/Audio/Nyanotrasen/Machines/deepfryer_basket_add_item.ogg"); + + /// + /// What sound is played when an item is removed? + /// + [DataField] + public SoundSpecifier SoundRemoveItem = new SoundPathSpecifier("/Audio/Nyanotrasen/Machines/deepfryer_basket_remove_item.ogg"); } diff --git a/Content.Server/Nyanotrasen/Kitchen/EntitySystems/DeepFryerSystem.Results.cs b/Content.Server/Nyanotrasen/Kitchen/EntitySystems/DeepFryerSystem.Results.cs index 3f93787934c..fa2807509a6 100644 --- a/Content.Server/Nyanotrasen/Kitchen/EntitySystems/DeepFryerSystem.Results.cs +++ b/Content.Server/Nyanotrasen/Kitchen/EntitySystems/DeepFryerSystem.Results.cs @@ -11,15 +11,20 @@ using Content.Shared.FixedPoint; using Content.Shared.Mobs.Components; using Content.Shared.NPC; +using Content.Shared.Nutrition; using Content.Shared.Nutrition.Components; using Content.Shared.Nyanotrasen.Kitchen.Components; using Content.Shared.Paper; +using Robust.Shared.Prototypes; using Robust.Shared.Random; namespace Content.Server.Nyanotrasen.Kitchen.EntitySystems; public sealed partial class DeepFryerSystem { + private HashSet> _badFlavors = new(); + private HashSet> _goodFlavors = new(); + /// /// Make an item look deep-fried. /// @@ -129,33 +134,33 @@ private void MakeEdible(EntityUid uid, DeepFryerComponent component, EntityUid i var extraSolution = new Solution(); if (TryComp(item, out FlavorProfileComponent? flavorProfileComponent)) { - HashSet goodFlavors = new(flavorProfileComponent.Flavors); - goodFlavors.IntersectWith(component.GoodFlavors); + _goodFlavors.Clear(); + _goodFlavors.IntersectWith(component.GoodFlavors); - HashSet badFlavors = new(flavorProfileComponent.Flavors); - badFlavors.IntersectWith(component.BadFlavors); + _badFlavors.Clear(); + _badFlavors.IntersectWith(component.BadFlavors); deepFriedComponent.PriceCoefficient = Math.Max(0.01f, 1.0f - + goodFlavors.Count * component.GoodFlavorPriceBonus - - badFlavors.Count * component.BadFlavorPriceMalus); + + _goodFlavors.Count * component.GoodFlavorPriceBonus + - _badFlavors.Count * component.BadFlavorPriceMalus); - if (goodFlavors.Count > 0) + if (_goodFlavors.Count > 0) { foreach (var reagent in component.GoodReagents) { - extraSolution.AddReagent(reagent.Reagent.ToString(), reagent.Quantity * goodFlavors.Count); + extraSolution.AddReagent(reagent.Reagent.ToString(), reagent.Quantity * _goodFlavors.Count); // Mask the taste of "medicine." flavorProfileComponent.IgnoreReagents.Add(reagent.Reagent.ToString()); } } - if (badFlavors.Count > 0) + if (_badFlavors.Count > 0) { foreach (var reagent in component.BadReagents) { - extraSolution.AddReagent(reagent.Reagent.ToString(), reagent.Quantity * badFlavors.Count); + extraSolution.AddReagent(reagent.Reagent.ToString(), reagent.Quantity * _badFlavors.Count); } } } diff --git a/Content.Server/Nyanotrasen/Kitchen/EntitySystems/DeepFryerSystem.cs b/Content.Server/Nyanotrasen/Kitchen/EntitySystems/DeepFryerSystem.cs index 40a658f0c44..4ac8684a7a3 100644 --- a/Content.Server/Nyanotrasen/Kitchen/EntitySystems/DeepFryerSystem.cs +++ b/Content.Server/Nyanotrasen/Kitchen/EntitySystems/DeepFryerSystem.cs @@ -105,7 +105,6 @@ public override void Initialize() SubscribeLocalEvent(OnInitDeepFryer); SubscribeLocalEvent(OnPowerChange); - // SubscribeLocalEvent(OnRefreshParts); SubscribeLocalEvent(OnDeconstruct); SubscribeLocalEvent(OnDestruction); SubscribeLocalEvent(OnThrowHitBy); @@ -437,14 +436,6 @@ private void OnDestruction(EntityUid uid, DeepFryerComponent component, Destruct _containerSystem.EmptyContainer(component.Storage, true); } - // private void OnRefreshParts(EntityUid uid, DeepFryerComponent component, RefreshPartsEvent args) - // { - // var ratingStorage = args.PartRatings[component.MachinePartStorageMax]; - // - // component.StorageMaxEntities = component.BaseStorageMaxEntities + - // (int) (component.StoragePerPartRating * (ratingStorage - 1)); - // } - /// /// Allow thrown items to land in a basket. /// diff --git a/Content.Server/Resist/EscapeInventorySystem.cs b/Content.Server/Resist/EscapeInventorySystem.cs index 93a83465861..eec8ebb5072 100644 --- a/Content.Server/Resist/EscapeInventorySystem.cs +++ b/Content.Server/Resist/EscapeInventorySystem.cs @@ -1,6 +1,5 @@ using Content.Server.Popups; using Content.Shared.Storage; -using Content.Server.Carrying; // Carrying system from Nyanotrasen. using Content.Shared.Inventory; using Content.Shared.Hands.EntitySystems; using Content.Shared.Storage.Components; @@ -25,7 +24,6 @@ public sealed class EscapeInventorySystem : EntitySystem [Dependency] private readonly SharedContainerSystem _containerSystem = default!; [Dependency] private readonly ActionBlockerSystem _actionBlockerSystem = default!; [Dependency] private readonly SharedHandsSystem _handsSystem = default!; - [Dependency] private readonly CarryingSystem _carryingSystem = default!; // Carrying system from Nyanotrasen. [Dependency] private readonly SharedActionsSystem _actions = default!; // DeltaV /// @@ -109,13 +107,6 @@ private void OnEscape(EntityUid uid, CanEscapeInventoryComponent component, Esca if (args.Handled || args.Cancelled) return; - if (TryComp(uid, out var carried)) // Start of carrying system of nyanotrasen. - { - _carryingSystem.DropCarried(carried.Carrier, uid); - return; - } // End of carrying system of nyanotrasen. - - _containerSystem.AttachParentToContainerOrGrid((uid, Transform(uid))); args.Handled = true; } diff --git a/Content.Shared/DeltaV/Carrying/BeingCarriedComponent.cs b/Content.Shared/DeltaV/Carrying/BeingCarriedComponent.cs new file mode 100644 index 00000000000..7e519e7e04b --- /dev/null +++ b/Content.Shared/DeltaV/Carrying/BeingCarriedComponent.cs @@ -0,0 +1,14 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.DeltaV.Carrying; + +/// +/// Stores the carrier of an entity being carried. +/// +[RegisterComponent, NetworkedComponent, Access(typeof(CarryingSystem))] +[AutoGenerateComponentState] +public sealed partial class BeingCarriedComponent : Component +{ + [DataField, AutoNetworkedField] + public EntityUid Carrier; +} diff --git a/Content.Shared/DeltaV/Carrying/CarriableComponent.cs b/Content.Shared/DeltaV/Carrying/CarriableComponent.cs new file mode 100644 index 00000000000..ad1968aec62 --- /dev/null +++ b/Content.Shared/DeltaV/Carrying/CarriableComponent.cs @@ -0,0 +1,14 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.DeltaV.Carrying; + +[RegisterComponent, NetworkedComponent, Access(typeof(CarryingSystem))] +public sealed partial class CarriableComponent : Component +{ + /// + /// Number of free hands required + /// to carry the entity + /// + [DataField] + public int FreeHandsRequired = 2; +} diff --git a/Content.Shared/DeltaV/Carrying/CarryDoAfterEvent.cs b/Content.Shared/DeltaV/Carrying/CarryDoAfterEvent.cs new file mode 100644 index 00000000000..7ea0375518a --- /dev/null +++ b/Content.Shared/DeltaV/Carrying/CarryDoAfterEvent.cs @@ -0,0 +1,7 @@ +using Content.Shared.DoAfter; +using Robust.Shared.Serialization; + +namespace Content.Shared.DeltaV.Carrying; + +[Serializable, NetSerializable] +public sealed partial class CarryDoAfterEvent : SimpleDoAfterEvent; diff --git a/Content.Shared/DeltaV/Carrying/CarryingComponent.cs b/Content.Shared/DeltaV/Carrying/CarryingComponent.cs new file mode 100644 index 00000000000..e6661da0e04 --- /dev/null +++ b/Content.Shared/DeltaV/Carrying/CarryingComponent.cs @@ -0,0 +1,14 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.DeltaV.Carrying; + +/// +/// Added to an entity when they are carrying somebody. +/// +[RegisterComponent, NetworkedComponent, Access(typeof(CarryingSystem))] +[AutoGenerateComponentState] +public sealed partial class CarryingComponent : Component +{ + [DataField, AutoNetworkedField] + public EntityUid Carried; +} diff --git a/Content.Shared/DeltaV/Carrying/CarryingSlowdownComponent.cs b/Content.Shared/DeltaV/Carrying/CarryingSlowdownComponent.cs new file mode 100644 index 00000000000..9e1be89370c --- /dev/null +++ b/Content.Shared/DeltaV/Carrying/CarryingSlowdownComponent.cs @@ -0,0 +1,14 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.DeltaV.Carrying; + +[RegisterComponent, NetworkedComponent, Access(typeof(CarryingSlowdownSystem))] +[AutoGenerateComponentState] +public sealed partial class CarryingSlowdownComponent : Component +{ + /// + /// Modifier for both walk and sprint speed. + /// + [DataField, AutoNetworkedField] + public float Modifier = 1.0f; +} diff --git a/Content.Shared/DeltaV/Carrying/CarryingSlowdownSystem.cs b/Content.Shared/DeltaV/Carrying/CarryingSlowdownSystem.cs new file mode 100644 index 00000000000..677c53eedc0 --- /dev/null +++ b/Content.Shared/DeltaV/Carrying/CarryingSlowdownSystem.cs @@ -0,0 +1,29 @@ +using Content.Shared.Movement.Systems; + +namespace Content.Shared.DeltaV.Carrying; + +public sealed class CarryingSlowdownSystem : EntitySystem +{ + [Dependency] private readonly MovementSpeedModifierSystem _movementSpeed = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnRefreshMoveSpeed); + } + + public void SetModifier(Entity ent, float modifier) + { + ent.Comp ??= EnsureComp(ent); + ent.Comp.Modifier = modifier; + Dirty(ent, ent.Comp); + + _movementSpeed.RefreshMovementSpeedModifiers(ent); + } + + private void OnRefreshMoveSpeed(Entity ent, ref RefreshMovementSpeedModifiersEvent args) + { + args.ModifySpeed(ent.Comp.Modifier, ent.Comp.Modifier); + } +} diff --git a/Content.Shared/DeltaV/Carrying/CarryingSystem.cs b/Content.Shared/DeltaV/Carrying/CarryingSystem.cs new file mode 100644 index 00000000000..2b47c49abd1 --- /dev/null +++ b/Content.Shared/DeltaV/Carrying/CarryingSystem.cs @@ -0,0 +1,384 @@ +using Content.Shared.ActionBlocker; +using Content.Shared.Buckle.Components; +using Content.Shared.Climbing.Events; +using Content.Shared.DoAfter; +using Content.Shared.Hands; +using Content.Shared.Hands.Components; +using Content.Shared.Interaction.Events; +using Content.Shared.Inventory.VirtualItem; +using Content.Shared.Item; +using Content.Shared.Mobs; +using Content.Shared.Movement.Events; +using Content.Shared.Movement.Pulling.Components; +using Content.Shared.Movement.Pulling.Events; +using Content.Shared.Movement.Pulling.Systems; +using Content.Shared.Movement.Systems; +using Content.Shared.Nyanotrasen.Item.PseudoItem; +using Content.Shared.Popups; +using Content.Shared.Pulling; +using Content.Shared.Resist; +using Content.Shared.Standing; +using Content.Shared.Storage; +using Content.Shared.Stunnable; +using Content.Shared.Throwing; +using Content.Shared.Verbs; +using Robust.Shared.Map.Components; +using Robust.Shared.Network; +using Robust.Shared.Physics.Components; +using System.Numerics; + +namespace Content.Shared.DeltaV.Carrying; + +public sealed class CarryingSystem : EntitySystem +{ + [Dependency] private readonly ActionBlockerSystem _actionBlocker = default!; + [Dependency] private readonly CarryingSlowdownSystem _slowdown = default!; + [Dependency] private readonly INetManager _net = default!; + [Dependency] private readonly MovementSpeedModifierSystem _movementSpeed = default!; + [Dependency] private readonly PullingSystem _pulling = default!; + [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; + [Dependency] private readonly SharedPopupSystem _popup = default!; + [Dependency] private readonly SharedPseudoItemSystem _pseudoItem = default!; + [Dependency] private readonly SharedTransformSystem _transform = default!; + [Dependency] private readonly StandingStateSystem _standingState = default!; + [Dependency] private readonly SharedVirtualItemSystem _virtualItem = default!; + + private EntityQuery _physicsQuery; + + public override void Initialize() + { + base.Initialize(); + + _physicsQuery = GetEntityQuery(); + + SubscribeLocalEvent>(AddCarryVerb); + SubscribeLocalEvent>(AddInsertCarriedVerb); + SubscribeLocalEvent(OnVirtualItemDeleted); + SubscribeLocalEvent(OnThrow); + SubscribeLocalEvent(OnParentChanged); + SubscribeLocalEvent(OnMobStateChanged); + SubscribeLocalEvent(OnInteractionAttempt); + SubscribeLocalEvent(OnMoveAttempt); + SubscribeLocalEvent(OnStandAttempt); + SubscribeLocalEvent(OnInteractedWith); + SubscribeLocalEvent(OnPullAttempt); + SubscribeLocalEvent(OnDrop); + SubscribeLocalEvent(OnDrop); + SubscribeLocalEvent(OnDrop); + SubscribeLocalEvent(OnDrop); + SubscribeLocalEvent(OnDrop); + SubscribeLocalEvent(OnDrop); + SubscribeLocalEvent(OnDoAfter); + } + + private void AddCarryVerb(Entity ent, ref GetVerbsEvent args) + { + var user = args.User; + var target = args.Target; + if (!args.CanInteract || !args.CanAccess || user == target) + return; + + if (!CanCarry(user, ent)) + return; + + args.Verbs.Add(new AlternativeVerb() + { + Act = () => StartCarryDoAfter(user, ent), + Text = Loc.GetString("carry-verb"), + Priority = 2 + }); + } + + private void AddInsertCarriedVerb(Entity ent, ref GetVerbsEvent args) + { + // If the person is carrying someone, and the carried person is a pseudo-item, and the target entity is a storage, + // then add an action to insert the carried entity into the target + // AKA put carried felenid into a duffelbag + if (args.Using is not {} carried || !args.CanAccess || !TryComp(carried, out var pseudoItem)) + return; + + var target = args.Target; + if (!TryComp(target, out var storageComp)) + return; + + if (!_pseudoItem.CheckItemFits((carried, pseudoItem), (target, storageComp))) + return; + + args.Verbs.Add(new InnateVerb() + { + Act = () => + { + DropCarried(ent, carried); + _pseudoItem.TryInsert(target, carried, pseudoItem, storageComp); + }, + Text = Loc.GetString("action-name-insert-other", ("target", carried)), + Priority = 2 + }); + } + + /// + /// Since the carried entity is stored as 2 virtual items, when deleted we want to drop them. + /// + private void OnVirtualItemDeleted(Entity ent, ref VirtualItemDeletedEvent args) + { + if (HasComp(args.BlockingEntity)) + DropCarried(ent, args.BlockingEntity); + } + + /// + /// Basically using virtual item passthrough to throw the carried person. A new age! + /// Maybe other things besides throwing should use virt items like this... + /// + private void OnThrow(Entity ent, ref BeforeThrowEvent args) + { + if (!TryComp(args.ItemUid, out var virtItem) || !HasComp(virtItem.BlockingEntity)) + return; + + var carried = virtItem.BlockingEntity; + args.ItemUid = carried; + + args.ThrowSpeed = 5f * MassContest(ent, carried); + } + + private void OnParentChanged(Entity ent, ref EntParentChangedMessage args) + { + var xform = Transform(ent); + if (xform.MapUid != args.OldMapId) + return; + + // Do not drop the carried entity if the new parent is a grid + if (xform.ParentUid == xform.GridUid) + return; + + DropCarried(ent, ent.Comp.Carried); + } + + private void OnMobStateChanged(Entity ent, ref MobStateChangedEvent args) + { + DropCarried(ent, ent.Comp.Carried); + } + + /// + /// Only let the person being carried interact with their carrier and things on their person. + /// + private void OnInteractionAttempt(Entity ent, ref InteractionAttemptEvent args) + { + if (args.Target is not {} target) + return; + + var targetParent = Transform(target).ParentUid; + + var carrier = ent.Comp.Carrier; + if (target != carrier && targetParent != carrier && targetParent != ent.Owner) + args.Cancelled = true; + } + + private void OnMoveAttempt(Entity ent, ref UpdateCanMoveEvent args) + { + args.Cancel(); + } + + private void OnStandAttempt(Entity ent, ref StandAttemptEvent args) + { + args.Cancel(); + } + + private void OnInteractedWith(Entity ent, ref GettingInteractedWithAttemptEvent args) + { + if (args.Uid != ent.Comp.Carrier) + args.Cancelled = true; + } + + private void OnPullAttempt(Entity ent, ref PullAttemptEvent args) + { + args.Cancelled = true; + } + + private void OnDrop(Entity ent, ref TEvent args) // Augh + { + DropCarried(ent.Comp.Carrier, ent); + } + + private void OnDoAfter(Entity ent, ref CarryDoAfterEvent args) + { + if (args.Handled || args.Cancelled) + return; + + if (!CanCarry(args.Args.User, ent)) + return; + + Carry(args.Args.User, ent); + args.Handled = true; + } + + private void StartCarryDoAfter(EntityUid carrier, Entity carried) + { + TimeSpan length = GetPickupDuration(carrier, carried); + + if (length.TotalSeconds >= 9f) + { + _popup.PopupClient(Loc.GetString("carry-too-heavy"), carried, carrier, PopupType.SmallCaution); + return; + } + + if (!HasComp(carried)) + length *= 2f; + + var ev = new CarryDoAfterEvent(); + var args = new DoAfterArgs(EntityManager, carrier, length, ev, carried, target: carried) + { + BreakOnMove = true, + NeedHand = true + }; + + _doAfter.TryStartDoAfter(args); + + // Show a popup to the person getting picked up + _popup.PopupEntity(Loc.GetString("carry-started", ("carrier", carrier)), carried, carried); + } + + private void Carry(EntityUid carrier, EntityUid carried) + { + if (TryComp(carried, out var pullable)) + _pulling.TryStopPull(carried, pullable); + + var carrierXform = Transform(carrier); + var xform = Transform(carried); + _transform.AttachToGridOrMap(carrier, carrierXform); + _transform.AttachToGridOrMap(carried, xform); + _transform.SetParent(carried, xform, carrier, carrierXform); + + var carryingComp = EnsureComp(carrier); + carryingComp.Carried = carried; + Dirty(carrier, carryingComp); + var carriedComp = EnsureComp(carried); + carriedComp.Carrier = carrier; + Dirty(carried, carriedComp); + EnsureComp(carried); + + ApplyCarrySlowdown(carrier, carried); + + _actionBlocker.UpdateCanMove(carried); + + if (_net.IsClient) // no spawning prediction + return; + + _virtualItem.TrySpawnVirtualItemInHand(carried, carrier); + _virtualItem.TrySpawnVirtualItemInHand(carried, carrier); + } + + public bool TryCarry(EntityUid carrier, Entity toCarry) + { + if (!Resolve(toCarry, ref toCarry.Comp, false)) + return false; + + if (!CanCarry(carrier, (toCarry, toCarry.Comp))) + return false; + + // The second one means that carrier is a pseudo-item and is inside a bag. + if (HasComp(carrier) || HasComp(carrier)) + return false; + + if (GetPickupDuration(carrier, toCarry).TotalSeconds > 9f) + return false; + + Carry(carrier, toCarry); + return true; + } + + public void DropCarried(EntityUid carrier, EntityUid carried) + { + Drop(carried); + RemComp(carrier); // get rid of this first so we don't recursively fire that event + RemComp(carrier); + _virtualItem.DeleteInHandsMatching(carrier, carried); + _movementSpeed.RefreshMovementSpeedModifiers(carrier); + } + + private void Drop(EntityUid carried) + { + RemComp(carried); + RemComp(carried); // TODO SHITMED: make sure this doesnt let you make someone with no legs walk + _actionBlocker.UpdateCanMove(carried); + Transform(carried).AttachToGridOrMap(); + _standingState.Stand(carried); + } + + private void ApplyCarrySlowdown(EntityUid carrier, EntityUid carried) + { + var massRatio = MassContest(carrier, carried); + + if (massRatio == 0) + massRatio = 1; + + var massRatioSq = Math.Pow(massRatio, 2); + var modifier = (1 - (0.15 / massRatioSq)); + modifier = Math.Max(0.1, modifier); + _slowdown.SetModifier(carrier, (float) modifier); + } + + public bool CanCarry(EntityUid carrier, Entity carried) + { + return + carrier != carried.Owner && + // can't carry multiple people, even if you have 4 hands it will break invariants when removing carryingcomponent for first carried person + !HasComp(carrier) && + // can't carry someone in a locker, buckled, etc + HasComp(Transform(carrier).ParentUid) && + // no tower of spacemen or stack overflow + !HasComp(carrier) && + !HasComp(carried) && + // finally check that there are enough free hands + TryComp(carrier, out var hands) && + hands.CountFreeHands() >= carried.Comp.FreeHandsRequired; + } + + private float MassContest(EntityUid roller, EntityUid target) + { + if (!_physicsQuery.TryComp(roller, out var rollerPhysics) || !_physicsQuery.TryComp(target, out var targetPhysics)) + return 1f; + + if (targetPhysics.FixturesMass == 0) + return 1f; + + return rollerPhysics.FixturesMass / targetPhysics.FixturesMass; + } + + private TimeSpan GetPickupDuration(EntityUid carrier, EntityUid carried) + { + var length = TimeSpan.FromSeconds(3); + + var mod = MassContest(carrier, carried); + if (mod != 0) + length /= mod; + + return length; + } + + public override void Update(float frameTime) + { + base.Update(frameTime); + + var query = EntityQueryEnumerator(); + while (query.MoveNext(out var carried, out var comp, out var xform)) + { + var carrier = comp.Carrier; + if (TerminatingOrDeleted(carrier)) + { + RemCompDeferred(carried); + continue; + } + + // SOMETIMES - when an entity is inserted into disposals, or a cryosleep chamber - it can get re-parented without a proper reparent event + // when this happens, it needs to be dropped because it leads to weird behavior + if (xform.ParentUid != carrier) + { + DropCarried(carrier, carried); + continue; + } + + // Make sure the carried entity is always centered relative to the carrier, as gravity pulls can offset it otherwise + _transform.SetLocalPosition(carried, Vector2.Zero); + } + } +} diff --git a/Content.Shared/Nyanotrasen/Carrying/CarryingDoAfterEvent.cs b/Content.Shared/Nyanotrasen/Carrying/CarryingDoAfterEvent.cs deleted file mode 100644 index 6acd6b775f3..00000000000 --- a/Content.Shared/Nyanotrasen/Carrying/CarryingDoAfterEvent.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Robust.Shared.Serialization; -using Content.Shared.DoAfter; - -namespace Content.Shared.Carrying -{ - [Serializable, NetSerializable] - public sealed partial class CarryDoAfterEvent : SimpleDoAfterEvent - { - } -} diff --git a/Content.Shared/Nyanotrasen/Carrying/CarryingSlowdownComponent.cs b/Content.Shared/Nyanotrasen/Carrying/CarryingSlowdownComponent.cs deleted file mode 100644 index aabde66af0d..00000000000 --- a/Content.Shared/Nyanotrasen/Carrying/CarryingSlowdownComponent.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Robust.Shared.GameStates; -using Robust.Shared.Serialization; - -namespace Content.Shared.Carrying -{ - [RegisterComponent, NetworkedComponent, Access(typeof(CarryingSlowdownSystem))] - - public sealed partial class CarryingSlowdownComponent : Component - { - [DataField("walkModifier", required: true)] [ViewVariables(VVAccess.ReadWrite)] - public float WalkModifier = 1.0f; - - [DataField("sprintModifier", required: true)] [ViewVariables(VVAccess.ReadWrite)] - public float SprintModifier = 1.0f; - } - - [Serializable, NetSerializable] - public sealed class CarryingSlowdownComponentState : ComponentState - { - public float WalkModifier; - public float SprintModifier; - public CarryingSlowdownComponentState(float walkModifier, float sprintModifier) - { - WalkModifier = walkModifier; - SprintModifier = sprintModifier; - } - } -} diff --git a/Content.Shared/Nyanotrasen/Carrying/CarryingSlowdownSystem.cs b/Content.Shared/Nyanotrasen/Carrying/CarryingSlowdownSystem.cs deleted file mode 100644 index 9b9c8cec10f..00000000000 --- a/Content.Shared/Nyanotrasen/Carrying/CarryingSlowdownSystem.cs +++ /dev/null @@ -1,47 +0,0 @@ -using Content.Shared.Movement.Systems; -using Robust.Shared.GameStates; - -namespace Content.Shared.Carrying -{ - public sealed class CarryingSlowdownSystem : EntitySystem - { - [Dependency] private readonly MovementSpeedModifierSystem _movementSpeed = default!; - - public override void Initialize() - { - base.Initialize(); - SubscribeLocalEvent(OnGetState); - SubscribeLocalEvent(OnHandleState); - SubscribeLocalEvent(OnRefreshMoveSpeed); - } - - public void SetModifier(EntityUid uid, float walkSpeedModifier, float sprintSpeedModifier, CarryingSlowdownComponent? component = null) - { - if (!Resolve(uid, ref component)) - return; - - component.WalkModifier = walkSpeedModifier; - component.SprintModifier = sprintSpeedModifier; - _movementSpeed.RefreshMovementSpeedModifiers(uid); - } - private void OnGetState(EntityUid uid, CarryingSlowdownComponent component, ref ComponentGetState args) - { - args.State = new CarryingSlowdownComponentState(component.WalkModifier, component.SprintModifier); - } - - private void OnHandleState(EntityUid uid, CarryingSlowdownComponent component, ref ComponentHandleState args) - { - if (args.Current is CarryingSlowdownComponentState state) - { - component.WalkModifier = state.WalkModifier; - component.SprintModifier = state.SprintModifier; - - _movementSpeed.RefreshMovementSpeedModifiers(uid); - } - } - private void OnRefreshMoveSpeed(EntityUid uid, CarryingSlowdownComponent component, RefreshMovementSpeedModifiersEvent args) - { - args.ModifySpeed(component.WalkModifier, component.SprintModifier); - } - } -} diff --git a/Resources/Locale/en-US/deltav/fugitive/sets.ftl b/Resources/Locale/en-US/deltav/fugitive/sets.ftl index cb4bb4e735f..e353fd38de7 100644 --- a/Resources/Locale/en-US/deltav/fugitive/sets.ftl +++ b/Resources/Locale/en-US/deltav/fugitive/sets.ftl @@ -27,4 +27,3 @@ fugitive-set-disruptor-name = disruptor's kit fugitive-set-disruptor-description = Hack the stations various systems and use them to your advantage. Comes with a cryptographic sequencer and camera bug. - diff --git a/Resources/Prototypes/DeltaV/Catalog/Cargo/cargo_food.yml b/Resources/Prototypes/DeltaV/Catalog/Cargo/cargo_food.yml index 7c4e08cfcf0..325eb6e078a 100644 --- a/Resources/Prototypes/DeltaV/Catalog/Cargo/cargo_food.yml +++ b/Resources/Prototypes/DeltaV/Catalog/Cargo/cargo_food.yml @@ -87,4 +87,3 @@ cost: 500 category: Food group: market - \ No newline at end of file diff --git a/Resources/Prototypes/DeltaV/Catalog/fugitive_sets.yml b/Resources/Prototypes/DeltaV/Catalog/fugitive_sets.yml index aad6f781bd0..b2e2328693a 100644 --- a/Resources/Prototypes/DeltaV/Catalog/fugitive_sets.yml +++ b/Resources/Prototypes/DeltaV/Catalog/fugitive_sets.yml @@ -70,4 +70,3 @@ content: - Emag - CameraBug - diff --git a/Resources/Prototypes/DeltaV/Entities/Objects/Specific/fugitive.yml b/Resources/Prototypes/DeltaV/Entities/Objects/Specific/fugitive.yml index 7558a322c00..b23f4635421 100644 --- a/Resources/Prototypes/DeltaV/Entities/Objects/Specific/fugitive.yml +++ b/Resources/Prototypes/DeltaV/Entities/Objects/Specific/fugitive.yml @@ -14,4 +14,3 @@ - FugitiveLeverage - FugitiveInfiltrator - FugitiveDisruptor - diff --git a/Resources/Textures/DeltaV/Objects/Storage/barrel.rsi/meta.json b/Resources/Textures/DeltaV/Objects/Storage/barrel.rsi/meta.json index 2ed4c3638b9..30f4889fd7e 100644 --- a/Resources/Textures/DeltaV/Objects/Storage/barrel.rsi/meta.json +++ b/Resources/Textures/DeltaV/Objects/Storage/barrel.rsi/meta.json @@ -1,20 +1,20 @@ { - "version": 1, - "license": "CC-BY-SA-3.0", - "copyright": "Taken from tgstation PR https://github.com/tgstation/tgstation/blob/master/icons/obj/objects.dmi, modified by rosieposieeee", - "size": { - "x": 32, - "y": 32 - }, - "states": [ - { - "name": "base" + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation PR https://github.com/tgstation/tgstation/blob/master/icons/obj/objects.dmi, modified by rosieposieeee", + "size": { + "x": 32, + "y": 32 }, - { - "name": "open" - }, - { - "name": "closed" - } - ] + "states": [ + { + "name": "base" + }, + { + "name": "open" + }, + { + "name": "closed" + } + ] } diff --git a/Resources/Textures/DeltaV/Objects/Storage/keg.rsi/meta.json b/Resources/Textures/DeltaV/Objects/Storage/keg.rsi/meta.json index cbbc0d6e89f..ef539daf601 100644 --- a/Resources/Textures/DeltaV/Objects/Storage/keg.rsi/meta.json +++ b/Resources/Textures/DeltaV/Objects/Storage/keg.rsi/meta.json @@ -1,15 +1,15 @@ { - "version": 1, - "license": "CC-BY-SA-3.0", - "copyright": "Made by rosieposieeee", - "size": { - "x": 32, - "y": 32 - }, - "states": [ - { - "name": "base", - "directions": 4 - } - ] + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Made by rosieposieeee", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "base", + "directions": 4 + } + ] } From 8ac8da72374eb4964d067c70ebaee4a37d3423d6 Mon Sep 17 00:00:00 2001 From: Delta-V bot <135767721+DeltaV-Bot@users.noreply.github.com> Date: Wed, 18 Dec 2024 12:22:38 +0100 Subject: [PATCH 17/21] Automatic changelog update --- Resources/Changelog/DeltaVChangelog.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Resources/Changelog/DeltaVChangelog.yml b/Resources/Changelog/DeltaVChangelog.yml index 92c0b6da0a9..effea4ae9de 100644 --- a/Resources/Changelog/DeltaVChangelog.yml +++ b/Resources/Changelog/DeltaVChangelog.yml @@ -1,11 +1,4 @@ Entries: -- author: Rose - changes: - - message: Added Submarine Station back to the map pool (for real this time) - type: Add - id: 288 - time: '2024-03-20T22:49:59.0000000+00:00' - url: https://github.com/DeltaV-Station/Delta-v/pull/984 - author: rosieposieeee changes: - message: More fixes for Submarine! Thank you everyone for your feedback. @@ -3818,3 +3811,10 @@ id: 787 time: '2024-12-18T07:03:37.0000000+00:00' url: https://github.com/DeltaV-Station/Delta-v/pull/2470 +- author: deltanedas + changes: + - message: Fixed not being able to throw felenids... + type: Fix + id: 788 + time: '2024-12-18T11:22:19.0000000+00:00' + url: https://github.com/DeltaV-Station/Delta-v/pull/2466 From dce230fdb20e38b658e61c3bf85e193068f3611f Mon Sep 17 00:00:00 2001 From: deltanedas <39013340+deltanedas@users.noreply.github.com> Date: Wed, 18 Dec 2024 11:33:37 +0000 Subject: [PATCH 18/21] port ore bag magnet toggle from white dream (#2467) * add on textures for ore bags * add code for toggling magnet and working in-hand * update ore bag yml --------- Co-authored-by: deltanedas <@deltanedas:kde.org> --- .../Components/ItemToggleExamineComponent.cs | 17 +++++++++++++ .../Systems/ItemToggleExamineSystem.cs | 23 ++++++++++++++++++ .../EntitySystems/MagnetPickupSystem.cs | 15 +++++++++--- .../Objects/Specific/Salvage/ore_bag.yml | 23 +++++++++++++++++- .../Specific/Mining/ore_bag.rsi/icon_on.png | Bin 0 -> 1344 bytes .../Specific/Mining/ore_bag.rsi/meta.json | 15 +++++++++++- .../Mining/ore_bag_holding.rsi/icon_on.png | Bin 0 -> 2162 bytes .../Mining/ore_bag_holding.rsi/meta.json | 21 +++++++++++++++- 8 files changed, 108 insertions(+), 6 deletions(-) create mode 100644 Content.Shared/DeltaV/Item/ItemToggle/Components/ItemToggleExamineComponent.cs create mode 100644 Content.Shared/DeltaV/Item/ItemToggle/Systems/ItemToggleExamineSystem.cs create mode 100644 Resources/Textures/Objects/Specific/Mining/ore_bag.rsi/icon_on.png create mode 100644 Resources/Textures/Objects/Specific/Mining/ore_bag_holding.rsi/icon_on.png diff --git a/Content.Shared/DeltaV/Item/ItemToggle/Components/ItemToggleExamineComponent.cs b/Content.Shared/DeltaV/Item/ItemToggle/Components/ItemToggleExamineComponent.cs new file mode 100644 index 00000000000..e8064d79456 --- /dev/null +++ b/Content.Shared/DeltaV/Item/ItemToggle/Components/ItemToggleExamineComponent.cs @@ -0,0 +1,17 @@ +using Content.Shared.DeltaV.Item.ItemToggle.Systems; +using Robust.Shared.GameStates; + +namespace Content.Shared.DeltaV.Item.ItemToggle.Components; + +/// +/// Adds examine text when the item is on or off. +/// +[RegisterComponent, NetworkedComponent, Access(typeof(ItemToggleExamineSystem))] +public sealed partial class ItemToggleExamineComponent : Component +{ + [DataField(required: true)] + public LocId On; + + [DataField(required: true)] + public LocId Off; +} diff --git a/Content.Shared/DeltaV/Item/ItemToggle/Systems/ItemToggleExamineSystem.cs b/Content.Shared/DeltaV/Item/ItemToggle/Systems/ItemToggleExamineSystem.cs new file mode 100644 index 00000000000..5abb0aec78b --- /dev/null +++ b/Content.Shared/DeltaV/Item/ItemToggle/Systems/ItemToggleExamineSystem.cs @@ -0,0 +1,23 @@ +using Content.Shared.DeltaV.Item.ItemToggle.Components; +using Content.Shared.Examine; +using Content.Shared.Item.ItemToggle; + +namespace Content.Shared.DeltaV.Item.ItemToggle.Systems; + +public sealed class ItemToggleExamineSystem : EntitySystem +{ + [Dependency] private readonly ItemToggleSystem _toggle = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnExamined); + } + + private void OnExamined(Entity ent, ref ExaminedEvent args) + { + var msg = _toggle.IsActivated(ent.Owner) ? ent.Comp.On : ent.Comp.Off; + args.PushMarkup(Loc.GetString(msg)); + } +} diff --git a/Content.Shared/Storage/EntitySystems/MagnetPickupSystem.cs b/Content.Shared/Storage/EntitySystems/MagnetPickupSystem.cs index 7a8961485d6..5cc24992d31 100644 --- a/Content.Shared/Storage/EntitySystems/MagnetPickupSystem.cs +++ b/Content.Shared/Storage/EntitySystems/MagnetPickupSystem.cs @@ -1,5 +1,6 @@ using Content.Server.Storage.Components; using Content.Shared.Inventory; +using Content.Shared.Item.ItemToggle; // DeltaV using Content.Shared.Whitelist; using Robust.Shared.Map; using Robust.Shared.Physics.Components; @@ -15,6 +16,7 @@ public sealed class MagnetPickupSystem : EntitySystem [Dependency] private readonly IGameTiming _timing = default!; [Dependency] private readonly EntityLookupSystem _lookup = default!; [Dependency] private readonly InventorySystem _inventory = default!; + [Dependency] private readonly ItemToggleSystem _toggle = default!; // DeltaV [Dependency] private readonly SharedTransformSystem _transform = default!; [Dependency] private readonly SharedStorageSystem _storage = default!; [Dependency] private readonly EntityWhitelistSystem _whitelistSystem = default!; @@ -49,11 +51,18 @@ public override void Update(float frameTime) comp.NextScan += ScanDelay; - if (!_inventory.TryGetContainingSlot((uid, xform, meta), out var slotDef)) + // Begin DeltaV Addition: Make ore bags use ItemToggle + if (!_toggle.IsActivated(uid)) continue; + // End DeltaV Addition - if ((slotDef.SlotFlags & comp.SlotFlags) == 0x0) - continue; + // Begin DeltaV Removals: Allow ore bags to work inhand + //if (!_inventory.TryGetContainingSlot((uid, xform, meta), out var slotDef)) + // continue; + + //if ((slotDef.SlotFlags & comp.SlotFlags) == 0x0) + // continue; + // End DeltaV Removals // No space if (!_storage.HasSpace((uid, storage))) diff --git a/Resources/Prototypes/Entities/Objects/Specific/Salvage/ore_bag.yml b/Resources/Prototypes/Entities/Objects/Specific/Salvage/ore_bag.yml index e73f9d7ba47..0306a7dc147 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Salvage/ore_bag.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Salvage/ore_bag.yml @@ -7,7 +7,10 @@ - type: MagnetPickup - type: Sprite sprite: Objects/Specific/Mining/ore_bag.rsi - state: icon + #state: icon # DeltaV: use a layer instead + layers: # DeltaV + - state: icon + map: [ "enum.ToggleVisuals.Layer" ] - type: Clothing sprite: Objects/Specific/Mining/ore_bag.rsi quickEquip: false @@ -26,6 +29,24 @@ - ArtifactFragment - Ore - type: Dumpable + # Begin DeltaV Additions: toggle magnet from White Dream + - type: ItemToggle + soundActivate: &soundActivate + collection: sparks + params: + variation: 0.25 + soundDeactivate: *soundActivate + - type: ItemToggleExamine + on: magnet-pickup-component-magnet-on + off: magnet-pickup-component-magnet-off + - type: Appearance + - type: GenericVisualizer + visuals: + enum.ToggleVisuals.Toggled: + enum.ToggleVisuals.Layer: + True: { state: icon_on } + False: { state: icon } + # End DeltaV Additions - type: ReverseEngineering # DeltaV difficulty: 2 recipes: diff --git a/Resources/Textures/Objects/Specific/Mining/ore_bag.rsi/icon_on.png b/Resources/Textures/Objects/Specific/Mining/ore_bag.rsi/icon_on.png new file mode 100644 index 0000000000000000000000000000000000000000..b39ff0e6da1fe642fd03c64720177c8f27416f92 GIT binary patch literal 1344 zcmV-G1;6@% z!T&&4!Bs&J6hXw%+1DZ^p4$o)X>YhWKfZgv!^sy2Oeec38(1N0yv;`$a8C*R<4(=xKQ@)>ZER z^Yk*qL*?$RacFoBg7+S1+=b#!5PTm8LGc8_PjH#9_*W&T(NEELDq8dqBAal2Rnd$+ zxY&ZuM@M({k`$I5%4Fc}4B8f;{T7;+%31xMbNT?u4f#bkuzvu(azC>C19)v{L8LgM zWB>pF32;bRa{vG?BLDy{BLR4&KXw2B19?eAK~#8N?V3$%6G0fqrxK|~OIn&kt5BsP zR0Yx8L@%w-s|bR(;?Zv)egg60C-5M>c@i%kl(rY4Hx8K|C2o1 z>5}ZTFPSdV{|}bT%QN#ELMF2_yT%Yg2qAaQYSX_PKka9Adb+i^v}7eSLAusl zw&h2w$2+ZRt)zp{pr3wU{zF=T3*?)n!#3U6*b2)fjXD{i59p`A-+pz5favl9sw0(9 z?516k%)lhjPk*$mUw$iY9z@H&cJiG$nd_W%%y{POKnVg5zq zoO#ulv=`D+ju^yB9&}s6l0rZIKK(r>02W0#b-PrsS*E0sMzJ^^K@Lkwck#_b~u zaejR9cOF~_V~g-VoIe(hVZZ$Veq1sM_uCKPmq}2BALQ}(yf?xOoDDV~FN2MQJB!ev z?7ATa_!6Wn8Y_LIy$?+4hZ_{(cR8qjOg{Vx6yb;abNzI#-(TzsfDOlNX9q5u3NY1N zwnF&_LVBw6Ai|AB+ua8f=}F=TMfrt;?3W*Z5q`My{{GY_!QDC-4a%;X59a3GZJU2K zKV(cfh^y;u(?UP}QTpkRodB|n#;$s-a|Sy*h#mH@nYp!L9zPneXS0=ZJ03G`ZPkRa z?q(zl^wSS~`qg7lARXa|$?X(!dFUWl@{elmF>;yok zxUWJ-B9~n`z$0i}0_qThSUG}{`?xI7Prq-!`Yw4f zPrq-!Iz4xH-|Y_F_pO^l?b$c5y|br{#M+I>ipd52^!xOyGc)>5MjEgTWu5&3{q+0v zCmLMVxA`=AQs}2&i|Izc{Dcrf2qA~Rh literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Specific/Mining/ore_bag.rsi/meta.json b/Resources/Textures/Objects/Specific/Mining/ore_bag.rsi/meta.json index 39303046bb7..355ad48c8e8 100644 --- a/Resources/Textures/Objects/Specific/Mining/ore_bag.rsi/meta.json +++ b/Resources/Textures/Objects/Specific/Mining/ore_bag.rsi/meta.json @@ -1,7 +1,7 @@ { "version": 1, "license": "CC-BY-SA-3.0", - "copyright": "Homegrown by @ninruB#7795, inhand sprites by lzk228(discord 455630609641897984)", + "copyright": "Homegrown by @ninruB#7795, inhand sprites by lzk228(discord 455630609641897984) | icon_on state by @kilath", "size": { "x": 32, "y": 32 @@ -21,6 +21,19 @@ { "name": "inhand-right", "directions": 4 + }, + { + "name": "icon_on", + "delays": [ + [ + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1 + ] + ] } ] } diff --git a/Resources/Textures/Objects/Specific/Mining/ore_bag_holding.rsi/icon_on.png b/Resources/Textures/Objects/Specific/Mining/ore_bag_holding.rsi/icon_on.png new file mode 100644 index 0000000000000000000000000000000000000000..42382c71f40a67ee22a68449e79aad6679455901 GIT binary patch literal 2162 zcmaJ?dpOg58~;gd$ea>2=i<#Hhv*R%?~lYBvZ3T`mL)<)#Zu2E(fbr{q#lyPWKud! z2SZ}!oRp0zL(au8!Wf(JZavrY{PAAb`~LC0ug`VgpZorNzu)V+@B4-a5&@Hg%K-oY zb8$ZE1prb>Vyr6z5nGLCly723bcBP0M?`2S02toBc)P}}(L=R`NWD3FP2te**4W3R zA&#m|o<@_!3Khu|0~hoWFNdsMqefNMG780M6#9mp58c~dN!7lI$^Np-ps-(Vdqhmt zL9p&Jt?|9OjJsbcwU%Z@LZmL~Sp z`CP0h=_-`H=-#lqbWG4-0XrU9N5%(KHFj`*8QDET@PVk-oqX&0UA>uYK{SlNb0b!! ztk8d1QG?jqQBB2>a4f3a_c@y>H~;R{YQM6eS2gp_`&=|(*Ea3-U1=)$Zt!}lj-C~B z-FyDtLcDM5c0_hQUg&7z{N)WReKO*b@n`SZjYXbCqr~|gjOm|C;6#gL?4*-y-E=TQ8 z;DfmZsBqN;)z+bZ=s87A8x&Ks{4?*XMAmPHZ(~k9(0$;^JnLdsR{q}J^%ou^(0D22 z@(-3>nyfb}y3feGG)FrXMY+*D)*ck`x=D%xH@FIfOfz!o%6~%tVJ9LV@&2T@WjDezE6Bj|_iFB!b=H`0)_wSF7H4c8aaw9bC z%$f5o1Jjx0z{y7vp^Q!v-xgr>^%;@LWD6^+J#N{?%7MP}Fxd9Q8yHG@dU|g~d%G)} z8l9JKd->!g_j7;cp>Y6<#cC5QO>+g~<0Zoitl{CJuY&^SoW;TJkT2@)L3bi)&t6X> zPJ5VE#JdCq1sy_EGf?7RlNOB4t7`&)qIQ+g**2^ilf67nTOgoQqs*rxKgNB#>)d@p z*UEHH$zW8%>30W=R@X>81FWkG2d?5y5EcBEfUWNM;xWhGKn}%t?R|`?D8m%+@XI8j zr5+j?xX+T63x}69R&I1yE*5}jhpx(vlGRcQ@*W(14A$K>%?1;Tj;I6>4_Lm#L@ITz z>nwY>E%@hB=&v{0`nNB%$4MZO#RGY@7hr|Lp~{xIM6_{L(jM0(ljP$W|a@m7(bKRL$BPpdd#);UN8KI&Pe}|P!Q&F>p9gj1Xx}E0Qx*k z5OW+DHN@q&ZTwS_^-4Uh;-}g@aZl) zuheH-inz?B<)L5EdBLy-_`W0?VP_s?vi7l*^y5I{d+GYCkeTu=SkDgLjZN_KMuj5d z(PgsK;TfQP*EtYg9vXcMH$(V!ST!InWo)@0l7Gsmbum3w7%h#&Kt0rAh0G+ac;K{h zr4Fq3Pe)AHIpeccacQjQIPlTD6P?oT@WQ84=yBV}9WE4SwF zrD;uzu5U4!E0l+3o{>PUcbPKK%otikJ#NGDju@T+;rj-1=JXq+#@QJV`2>dMVDcgt zA$?uwbRMt45UcN)C5OF~ZhI|3`#+Zb$>ZBCa&h9i?42qj}QfvW?y3s5E z*WDC&Iwfak&NhpI)%$H}VYO6ye`?)ne$S&@v8n+nPNqb+#h~fz9DZAi!<}_ew3%PR z=ry}|!lL}z_x#4%(J?!P{DryJga4}G;B++(i-fVCMp`a|L7nv(=M}65g$LK=*Q_US zW3{Blf`nR0bT(XN^~LM18l4HvS#0-Ixw`mD`Hf%u-yEEAEEI{kWN3fziBj5dUcI_m z@LejE%8ReuX`WLzPqB#|SQBCr!MM9y#hoqg+x1lbgch(eBXdQ2 z%jbDJ`g|v{4K)U~FLN=PsDcsx@s}aCBD)4z^VTTT#HE!V7$(WRKvt3qeinB#WpGmi zMRz2@1%=khs{OaHOQ_d$4dQD-a*{Tb`Ox!pG3G?}PbE+^zp{03ldJo!A}aM{eBDbo zi0QCr3L-UlSB3zJZGKTQu>Ka+(%SmrK0!giQJ2i514Pf}YPZ{7%<<+Ups3Hhx`;&J z-aCaa6iu1vLf7@#0~}0E6$nDE-U%V4)qrSf=Ff)jrj-+x$hsEnAFK3a#T^&qc~5mf z_?DmJ@d^X|7F~N3hecn Date: Wed, 18 Dec 2024 12:33:57 +0100 Subject: [PATCH 19/21] Automatic changelog update --- Resources/Changelog/DeltaVChangelog.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Resources/Changelog/DeltaVChangelog.yml b/Resources/Changelog/DeltaVChangelog.yml index effea4ae9de..05c14075390 100644 --- a/Resources/Changelog/DeltaVChangelog.yml +++ b/Resources/Changelog/DeltaVChangelog.yml @@ -1,11 +1,4 @@ Entries: -- author: rosieposieeee - changes: - - message: More fixes for Submarine! Thank you everyone for your feedback. - type: Fix - id: 289 - time: '2024-03-21T06:10:41.0000000+00:00' - url: https://github.com/DeltaV-Station/Delta-v/pull/987 - author: DangerRevolution changes: - message: Added lunchboxes to various staff lockers @@ -3818,3 +3811,11 @@ id: 788 time: '2024-12-18T11:22:19.0000000+00:00' url: https://github.com/DeltaV-Station/Delta-v/pull/2466 +- author: Hell_Cat, deltanedas + changes: + - message: Ore bag magnet can now be turned on without being worn as a belt. Mining + borgs rejoice! + type: Tweak + id: 789 + time: '2024-12-18T11:33:37.0000000+00:00' + url: https://github.com/DeltaV-Station/Delta-v/pull/2467 From 600ef0e5a6cf4fc2cf4073fa019db6438a21121a Mon Sep 17 00:00:00 2001 From: BarryNorfolk Date: Wed, 18 Dec 2024 14:36:06 +0100 Subject: [PATCH 20/21] Add history tab to bounty console (#2473) * Add struct for holding historical data on cargo bounties * Add localisation strings for bounty history * Add new XAML entry for display bounty history * Expand cargo bounty menu to include tabs * Ensure station databases hold historical bounty data * Add to the bounty history when removing one from active * Feed bounty history into cargo's bounty system --- .../CargoBountyConsoleBoundUserInterface.cs | 2 +- .../Cargo/UI/BountyHistoryEntry.xaml | 23 ++++++++ .../Cargo/UI/BountyHistoryEntry.xaml.cs | 54 +++++++++++++++++++ Content.Client/Cargo/UI/CargoBountyMenu.xaml | 29 ++++++---- .../Cargo/UI/CargoBountyMenu.xaml.cs | 12 ++++- .../StationCargoBountyDatabaseComponent.cs | 7 +++ .../Cargo/Systems/CargoSystem.Bounty.cs | 26 ++++++--- .../Cargo/CargoBountyHistoryData.cs | 46 ++++++++++++++++ .../Components/CargoBountyConsoleComponent.cs | 4 +- .../en-US/cargo/cargo-bounty-console.ftl | 7 +++ 10 files changed, 191 insertions(+), 19 deletions(-) create mode 100644 Content.Client/Cargo/UI/BountyHistoryEntry.xaml create mode 100644 Content.Client/Cargo/UI/BountyHistoryEntry.xaml.cs create mode 100644 Content.Shared/Cargo/CargoBountyHistoryData.cs diff --git a/Content.Client/Cargo/BUI/CargoBountyConsoleBoundUserInterface.cs b/Content.Client/Cargo/BUI/CargoBountyConsoleBoundUserInterface.cs index 44c40143d83..04075000f5b 100644 --- a/Content.Client/Cargo/BUI/CargoBountyConsoleBoundUserInterface.cs +++ b/Content.Client/Cargo/BUI/CargoBountyConsoleBoundUserInterface.cs @@ -39,6 +39,6 @@ protected override void UpdateState(BoundUserInterfaceState message) if (message is not CargoBountyConsoleState state) return; - _menu?.UpdateEntries(state.Bounties, state.UntilNextSkip); + _menu?.UpdateEntries(state.Bounties, state.History, state.UntilNextSkip); } } diff --git a/Content.Client/Cargo/UI/BountyHistoryEntry.xaml b/Content.Client/Cargo/UI/BountyHistoryEntry.xaml new file mode 100644 index 00000000000..eee8c5cc165 --- /dev/null +++ b/Content.Client/Cargo/UI/BountyHistoryEntry.xaml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + diff --git a/Content.Client/Cargo/UI/BountyHistoryEntry.xaml.cs b/Content.Client/Cargo/UI/BountyHistoryEntry.xaml.cs new file mode 100644 index 00000000000..f3c9bbfafb1 --- /dev/null +++ b/Content.Client/Cargo/UI/BountyHistoryEntry.xaml.cs @@ -0,0 +1,54 @@ +using Content.Client.Message; +using Content.Shared.Cargo; +using Content.Shared.Cargo.Prototypes; +using Robust.Client.AutoGenerated; +using Robust.Client.UserInterface.Controls; +using Robust.Client.UserInterface.XAML; +using Robust.Shared.Prototypes; +using Robust.Shared.Timing; + +namespace Content.Client.Cargo.UI; + +[GenerateTypedNameReferences] +public sealed partial class BountyHistoryEntry : BoxContainer +{ + [Dependency] private readonly IPrototypeManager _prototype = default!; + + public BountyHistoryEntry(CargoBountyHistoryData bounty) + { + RobustXamlLoader.Load(this); + IoCManager.InjectDependencies(this); + + if (!_prototype.TryIndex(bounty.Bounty, out var bountyPrototype)) + return; + + var items = new List(); + foreach (var entry in bountyPrototype.Entries) + { + items.Add(Loc.GetString("bounty-console-manifest-entry", + ("amount", entry.Amount), + ("item", Loc.GetString(entry.Name)))); + } + ManifestLabel.SetMarkup(Loc.GetString("bounty-console-manifest-label", ("item", string.Join(", ", items)))); + RewardLabel.SetMarkup(Loc.GetString("bounty-console-reward-label", ("reward", bountyPrototype.Reward))); + IdLabel.SetMarkup(Loc.GetString("bounty-console-id-label", ("id", bounty.Id))); + + var stationTime = bounty.Timestamp.ToString("hh\\:mm\\:ss"); + if (bounty.ActorName == null) + { + StatusLabel.SetMarkup(Loc.GetString("bounty-console-history-completed-label")); + NoticeLabel.SetMarkup(Loc.GetString("bounty-console-history-notice-completed-label", ("time", stationTime))); + } + else + { + StatusLabel.SetMarkup(Loc.GetString("bounty-console-history-skipped-label")); + NoticeLabel.SetMarkup(Loc.GetString("bounty-console-history-notice-skipped-label", + ("id", bounty.ActorName), + ("time", stationTime))); + } + } + protected override void FrameUpdate(FrameEventArgs args) + { + base.FrameUpdate(args); + } +} diff --git a/Content.Client/Cargo/UI/CargoBountyMenu.xaml b/Content.Client/Cargo/UI/CargoBountyMenu.xaml index bb263ff6c4a..0f093d5f8e7 100644 --- a/Content.Client/Cargo/UI/CargoBountyMenu.xaml +++ b/Content.Client/Cargo/UI/CargoBountyMenu.xaml @@ -11,15 +11,26 @@ - - - - + + + + + + + + + + diff --git a/Content.Client/Cargo/UI/CargoBountyMenu.xaml.cs b/Content.Client/Cargo/UI/CargoBountyMenu.xaml.cs index 3767b45e4be..0717aacc5e6 100644 --- a/Content.Client/Cargo/UI/CargoBountyMenu.xaml.cs +++ b/Content.Client/Cargo/UI/CargoBountyMenu.xaml.cs @@ -17,8 +17,11 @@ public CargoBountyMenu() RobustXamlLoader.Load(this); } - public void UpdateEntries(List bounties, TimeSpan untilNextSkip) + public void UpdateEntries(List bounties, List history, TimeSpan untilNextSkip) { + MasterTabContainer.SetTabTitle(0, Loc.GetString("bounty-console-tab-available-label")); + MasterTabContainer.SetTabTitle(1, Loc.GetString("bounty-console-tab-history-label")); + BountyEntriesContainer.Children.Clear(); foreach (var b in bounties) { @@ -32,5 +35,12 @@ public void UpdateEntries(List bounties, TimeSpan untilNextSkip { MinHeight = 10 }); + + BountyHistoryContainer.Children.Clear(); + foreach (var h in history) + { + var entry = new BountyHistoryEntry(h); + BountyHistoryContainer.AddChild(entry); + } } } diff --git a/Content.Server/Cargo/Components/StationCargoBountyDatabaseComponent.cs b/Content.Server/Cargo/Components/StationCargoBountyDatabaseComponent.cs index a7735787cbb..f58b5450ba4 100644 --- a/Content.Server/Cargo/Components/StationCargoBountyDatabaseComponent.cs +++ b/Content.Server/Cargo/Components/StationCargoBountyDatabaseComponent.cs @@ -21,6 +21,13 @@ public sealed partial class StationCargoBountyDatabaseComponent : Component [DataField, ViewVariables(VVAccess.ReadWrite)] public List Bounties = new(); + /// + /// A list of all the bounties that have been completed or + /// skipped for a station. + /// + [DataField, ViewVariables(VVAccess.ReadWrite)] + public List History = new(); + /// /// Used to determine unique order IDs /// diff --git a/Content.Server/Cargo/Systems/CargoSystem.Bounty.cs b/Content.Server/Cargo/Systems/CargoSystem.Bounty.cs index 373e8e243ba..236b018a9da 100644 --- a/Content.Server/Cargo/Systems/CargoSystem.Bounty.cs +++ b/Content.Server/Cargo/Systems/CargoSystem.Bounty.cs @@ -8,6 +8,7 @@ using Content.Shared.Cargo.Components; using Content.Shared.Cargo.Prototypes; using Content.Shared.Database; +using Content.Shared.IdentityManagement; using Content.Shared.NameIdentifier; using Content.Shared.Paper; using Content.Shared.Stacks; @@ -16,6 +17,7 @@ using Robust.Server.Containers; using Robust.Shared.Containers; using Robust.Shared.Random; +using Robust.Shared.Timing; using Robust.Shared.Utility; namespace Content.Server.Cargo.Systems; @@ -25,6 +27,7 @@ public sealed partial class CargoSystem [Dependency] private readonly ContainerSystem _container = default!; [Dependency] private readonly NameIdentifierSystem _nameIdentifier = default!; [Dependency] private readonly EntityWhitelistSystem _whitelistSys = default!; + [Dependency] private readonly IGameTiming _gameTiming = default!; [ValidatePrototypeId] private const string BountyNameIdentifierGroup = "Bounty"; @@ -54,7 +57,7 @@ private void OnBountyConsoleOpened(EntityUid uid, CargoBountyConsoleComponent co return; var untilNextSkip = bountyDb.NextSkipTime - _timing.CurTime; - _uiSystem.SetUiState(uid, CargoConsoleUiKey.Bounty, new CargoBountyConsoleState(bountyDb.Bounties, untilNextSkip)); + _uiSystem.SetUiState(uid, CargoConsoleUiKey.Bounty, new CargoBountyConsoleState(bountyDb.Bounties, bountyDb.History, untilNextSkip)); } private void OnPrintLabelMessage(EntityUid uid, CargoBountyConsoleComponent component, BountyPrintLabelMessage args) @@ -95,13 +98,13 @@ private void OnSkipBountyMessage(EntityUid uid, CargoBountyConsoleComponent comp return; } - if (!TryRemoveBounty(station, bounty.Value)) + if (!TryRemoveBounty(station, bounty.Value, null, args.Actor)) return; FillBountyDatabase(station); db.NextSkipTime = _timing.CurTime + db.SkipDelay; var untilNextSkip = db.NextSkipTime - _timing.CurTime; - _uiSystem.SetUiState(uid, CargoConsoleUiKey.Bounty, new CargoBountyConsoleState(db.Bounties, untilNextSkip)); + _uiSystem.SetUiState(uid, CargoConsoleUiKey.Bounty, new CargoBountyConsoleState(db.Bounties, db.History, untilNextSkip)); _audio.PlayPvs(component.SkipSound, uid); } @@ -434,15 +437,15 @@ public bool TryAddBounty(EntityUid uid, CargoBountyPrototype bounty, StationCarg } [PublicAPI] - public bool TryRemoveBounty(EntityUid uid, string dataId, StationCargoBountyDatabaseComponent? component = null) + public bool TryRemoveBounty(EntityUid uid, string dataId, StationCargoBountyDatabaseComponent? component = null, EntityUid? actor = null) { if (!TryGetBountyFromId(uid, dataId, out var data, component)) return false; - return TryRemoveBounty(uid, data.Value, component); + return TryRemoveBounty(uid, data.Value, component, actor); } - public bool TryRemoveBounty(EntityUid uid, CargoBountyData data, StationCargoBountyDatabaseComponent? component = null) + public bool TryRemoveBounty(EntityUid uid, CargoBountyData data, StationCargoBountyDatabaseComponent? component = null, EntityUid? actor = null) { if (!Resolve(uid, ref component)) return false; @@ -451,6 +454,15 @@ public bool TryRemoveBounty(EntityUid uid, CargoBountyData data, StationCargoBou { if (component.Bounties[i].Id == data.Id) { + string? actorName = default; + if (actor != null) + { + var getIdentityEvent = new TryGetIdentityShortInfoEvent(uid, actor.Value); + RaiseLocalEvent(getIdentityEvent); + actorName = getIdentityEvent.Title; + } + + component.History.Add(new CargoBountyHistoryData(data, _gameTiming.CurTime, actorName)); component.Bounties.RemoveAt(i); return true; } @@ -492,7 +504,7 @@ public void UpdateBountyConsoles() } var untilNextSkip = db.NextSkipTime - _timing.CurTime; - _uiSystem.SetUiState((uid, ui), CargoConsoleUiKey.Bounty, new CargoBountyConsoleState(db.Bounties, untilNextSkip)); + _uiSystem.SetUiState((uid, ui), CargoConsoleUiKey.Bounty, new CargoBountyConsoleState(db.Bounties, db.History, untilNextSkip)); } } diff --git a/Content.Shared/Cargo/CargoBountyHistoryData.cs b/Content.Shared/Cargo/CargoBountyHistoryData.cs new file mode 100644 index 00000000000..43da42d5587 --- /dev/null +++ b/Content.Shared/Cargo/CargoBountyHistoryData.cs @@ -0,0 +1,46 @@ +using Robust.Shared.Serialization; +using Content.Shared.Cargo.Prototypes; +using Robust.Shared.Prototypes; + +namespace Content.Shared.Cargo; + +/// +/// A data structure for storing historical information about bounties. +/// +[DataDefinition, NetSerializable, Serializable] +public readonly partial record struct CargoBountyHistoryData +{ + /// + /// A unique id used to identify the bounty + /// + [DataField, ViewVariables(VVAccess.ReadWrite)] + public string Id { get; init; } = string.Empty; + + /// + /// Optional name of the actor that skipped the bounty. + /// Only set when the bounty has been skipped. + /// + [DataField, ViewVariables(VVAccess.ReadWrite)] + public string? ActorName { get; init; } = default; + + /// + /// Time when this bounty was completed or skipped + /// + [DataField, ViewVariables(VVAccess.ReadWrite)] + public TimeSpan Timestamp { get; init; } = TimeSpan.MinValue; + + /// + /// The prototype containing information about the bounty. + /// + [ViewVariables(VVAccess.ReadWrite)] + [DataField(required: true)] + public ProtoId Bounty { get; init; } = string.Empty; + + public CargoBountyHistoryData(CargoBountyData bounty, TimeSpan timestamp, string? actorName) + { + Bounty = bounty.Bounty; + Id = bounty.Id; + ActorName = actorName; + Timestamp = timestamp; + } +} diff --git a/Content.Shared/Cargo/Components/CargoBountyConsoleComponent.cs b/Content.Shared/Cargo/Components/CargoBountyConsoleComponent.cs index bf82a08127e..8c78312be19 100644 --- a/Content.Shared/Cargo/Components/CargoBountyConsoleComponent.cs +++ b/Content.Shared/Cargo/Components/CargoBountyConsoleComponent.cs @@ -50,11 +50,13 @@ public sealed partial class CargoBountyConsoleComponent : Component public sealed class CargoBountyConsoleState : BoundUserInterfaceState { public List Bounties; + public List History; public TimeSpan UntilNextSkip; - public CargoBountyConsoleState(List bounties, TimeSpan untilNextSkip) + public CargoBountyConsoleState(List bounties, List history, TimeSpan untilNextSkip) { Bounties = bounties; + History = history; UntilNextSkip = untilNextSkip; } } diff --git a/Resources/Locale/en-US/cargo/cargo-bounty-console.ftl b/Resources/Locale/en-US/cargo/cargo-bounty-console.ftl index 4314cbf4496..4d849c5bdab 100644 --- a/Resources/Locale/en-US/cargo/cargo-bounty-console.ftl +++ b/Resources/Locale/en-US/cargo/cargo-bounty-console.ftl @@ -18,3 +18,10 @@ bounty-console-flavor-right = v1.4 bounty-manifest-header = [font size=14][bold]Official cargo bounty manifest[/bold] (ID#{$id})[/font] bounty-manifest-list-start = Item manifest: + +bounty-console-tab-available-label = Available +bounty-console-tab-history-label = History +bounty-console-history-notice-completed-label = {$time} - Completed +bounty-console-history-notice-skipped-label = {$time} - Skipped by {$id} +bounty-console-history-completed-label = [color=limegreen]Completed[/color] +bounty-console-history-skipped-label = [color=red]Skipped[/color] From f49142ca8d7ceac483094444c372e849309dc02b Mon Sep 17 00:00:00 2001 From: Delta-V bot <135767721+DeltaV-Bot@users.noreply.github.com> Date: Wed, 18 Dec 2024 14:36:25 +0100 Subject: [PATCH 21/21] Automatic changelog update --- Resources/Changelog/DeltaVChangelog.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Resources/Changelog/DeltaVChangelog.yml b/Resources/Changelog/DeltaVChangelog.yml index 05c14075390..db32d37ed23 100644 --- a/Resources/Changelog/DeltaVChangelog.yml +++ b/Resources/Changelog/DeltaVChangelog.yml @@ -1,11 +1,4 @@ Entries: -- author: DangerRevolution - changes: - - message: Added lunchboxes to various staff lockers - type: Add - id: 290 - time: '2024-03-21T18:46:44.0000000+00:00' - url: https://github.com/DeltaV-Station/Delta-v/pull/989 - author: Velcroboy changes: - message: Reverted AME buff. AME will require more than 1 core again to function @@ -3819,3 +3812,11 @@ id: 789 time: '2024-12-18T11:33:37.0000000+00:00' url: https://github.com/DeltaV-Station/Delta-v/pull/2467 +- author: BarryNorfolk + changes: + - message: Added a history tab to the bounty computer, showing all past completed + and skipped orders (and who skipped them). + type: Add + id: 790 + time: '2024-12-18T13:36:06.0000000+00:00' + url: https://github.com/DeltaV-Station/Delta-v/pull/2473