Skip to content

Commit 4283458

Browse files
authored
Merge branch 'master' into cargo-assistant
Signed-off-by: Radezolid <[email protected]>
2 parents 807745a + c34c044 commit 4283458

File tree

50 files changed

+810
-137
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+810
-137
lines changed

Content.Client/Salvage/UI/SalvageMagnetBoundUserInterface.cs

+21
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
using System.Linq;
22
using Content.Client.Message;
3+
using Content.Shared.DeltaV.Salvage.Systems; // DeltaV
34
using Content.Shared.Salvage;
45
using Content.Shared.Salvage.Magnet;
6+
using Robust.Client.Player; // DeltaV
57
using Robust.Client.UserInterface;
68
using Robust.Client.UserInterface.Controls;
79

@@ -10,12 +12,16 @@ namespace Content.Client.Salvage.UI;
1012
public sealed class SalvageMagnetBoundUserInterface : BoundUserInterface
1113
{
1214
[Dependency] private readonly IEntityManager _entManager = default!;
15+
[Dependency] private readonly IPlayerManager _player = default!; // DeltaV
16+
17+
private readonly MiningPointsSystem _points; // DeltaV
1318

1419
private OfferingWindow? _window;
1520

1621
public SalvageMagnetBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
1722
{
1823
IoCManager.InjectDependencies(this);
24+
_points = _entManager.System<MiningPointsSystem>(); // DeltaV
1925
}
2026

2127
protected override void Open()
@@ -61,6 +67,21 @@ protected override void UpdateState(BoundUserInterfaceState state)
6167
});
6268
};
6369

70+
// Begin DeltaV Additions: Mining points cost for wrecks
71+
if (offer.Cost > 0)
72+
{
73+
if (_player.LocalSession?.AttachedEntity is not {} user || !_points.UserHasPoints(user, offer.Cost))
74+
option.Disabled = true;
75+
76+
var label = new Label
77+
{
78+
Text = Loc.GetString("salvage-magnet-mining-points-cost", ("points", offer.Cost)),
79+
HorizontalAlignment = Control.HAlignment.Center
80+
};
81+
option.AddContent(label);
82+
}
83+
// End DeltaV Additions
84+
6485
switch (offer)
6586
{
6687
case AsteroidOffering asteroid:

Content.Server/Salvage/SalvageSystem.Magnet.cs

+6-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ private void OnMagnetClaim(EntityUid uid, SalvageMagnetComponent component, ref
4545
return;
4646
}
4747

48-
TakeMagnetOffer((station.Value, dataComp), args.Index, (uid, component));
48+
TakeMagnetOffer((station.Value, dataComp), args.Index, (uid, component), args.Actor); // DeltaV: pass the user entity
4949
}
5050

5151
private void OnMagnetStartup(EntityUid uid, SalvageMagnetComponent component, ComponentStartup args)
@@ -250,11 +250,15 @@ private void UpdateMagnetUIs(Entity<SalvageMagnetDataComponent> data)
250250
}
251251
}
252252

253-
private async Task TakeMagnetOffer(Entity<SalvageMagnetDataComponent> data, int index, Entity<SalvageMagnetComponent> magnet)
253+
private async Task TakeMagnetOffer(Entity<SalvageMagnetDataComponent> data, int index, Entity<SalvageMagnetComponent> magnet, EntityUid user) // DeltaV: add user param
254254
{
255255
var seed = data.Comp.Offered[index];
256256

257257
var offering = GetSalvageOffering(seed);
258+
// Begin DeltaV Addition: make wrecks cost mining points to pull
259+
if (offering.Cost > 0 && !(_points.TryFindIdCard(user) is {} idCard && _points.RemovePoints(idCard, offering.Cost)))
260+
return;
261+
// End DeltaV Addition
258262
var salvMap = _mapSystem.CreateMap();
259263
var salvMapXform = Transform(salvMap);
260264

Content.Server/Salvage/SalvageSystem.cs

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using Content.Server.Construction;
55
using Content.Server.GameTicking;
66
using Content.Server.Radio.EntitySystems;
7+
using Content.Shared.DeltaV.Salvage.Systems; // DeltaV
78
using Content.Shared.Examine;
89
using Content.Shared.Interaction;
910
using Content.Shared.Popups;
@@ -52,6 +53,7 @@ public sealed partial class SalvageSystem : SharedSalvageSystem
5253
[Dependency] private readonly LabelSystem _labelSystem = default!;
5354
[Dependency] private readonly MapLoaderSystem _map = default!;
5455
[Dependency] private readonly MetaDataSystem _metaData = default!;
56+
[Dependency] private readonly MiningPointsSystem _points = default!; // DeltaV
5557
[Dependency] private readonly RadioSystem _radioSystem = default!;
5658
[Dependency] private readonly SharedAudioSystem _audio = default!;
5759
[Dependency] private readonly SharedTransformSystem _transform = default!;

Content.Shared/DeltaV/Salvage/Systems/MiningPointsSystem.cs

+11
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,17 @@ private void OnClaimMiningPoints(Entity<MiningPointsLatheComponent> ent, ref Lat
6161
return (idCard, comp);
6262
}
6363

64+
/// <summary>
65+
/// Returns true if the user has at least some number of points on their ID card.
66+
/// </summary>
67+
public bool UserHasPoints(EntityUid user, uint points)
68+
{
69+
if (TryFindIdCard(user)?.Comp is not {} comp)
70+
return false;
71+
72+
return comp.Points >= points;
73+
}
74+
6475
/// <summary>
6576
/// Removes points from a holder, returning true if it succeeded.
6677
/// </summary>

Content.Shared/Salvage/Magnet/AsteroidOffering.cs

+2
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,6 @@ public record struct AsteroidOffering : ISalvageMagnetOffering
1515
/// Calculated marker layers for the asteroid.
1616
/// </summary>
1717
public Dictionary<string, int> MarkerLayers;
18+
19+
uint ISalvageMagnetOffering.Cost => 0; // DeltaV
1820
}

Content.Shared/Salvage/Magnet/DebrisOffering.cs

+2
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ namespace Content.Shared.Salvage.Magnet;
66
public record struct DebrisOffering : ISalvageMagnetOffering
77
{
88
public string Id;
9+
10+
uint ISalvageMagnetOffering.Cost => 0; // DeltaV: Debris is a very good source of materials for the station, so no cost
911
}

Content.Shared/Salvage/Magnet/ISalvageMagnetOffering.cs

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,8 @@ namespace Content.Shared.Salvage.Magnet;
22

33
public interface ISalvageMagnetOffering
44
{
5-
6-
}
5+
/// <summary>
6+
/// DeltaV: How many mining points this offering costs to accept.
7+
/// </summary>
8+
public uint Cost { get; }
9+
}

Content.Shared/Salvage/Magnet/SalvageOffering.cs

+2
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ namespace Content.Shared.Salvage.Magnet;
66
public record struct SalvageOffering : ISalvageMagnetOffering
77
{
88
public SalvageMapPrototype SalvageMap;
9+
10+
uint ISalvageMagnetOffering.Cost => 1000; // DeltaV: Station gets next to no benefit from you pulling wrecks, force you to mine first.
911
}

Resources/Changelog/DeltaVChangelog.yml

+51-47
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,4 @@
11
Entries:
2-
- author: deltanedas
3-
changes:
4-
- message: Reworked Submarine's atmos, notably the TEG is now good, easy to set
5-
up and has a guide next to it.
6-
type: Tweak
7-
id: 298
8-
time: '2024-03-28T15:27:57.0000000+00:00'
9-
url: https://github.com/DeltaV-Station/Delta-v/pull/1022
10-
- author: FluffiestFloof
11-
changes:
12-
- message: Felinids, Harpies and Vulpkanin should now Weh accordingly.
13-
type: Fix
14-
id: 299
15-
time: '2024-03-28T18:27:42.0000000+00:00'
16-
url: https://github.com/DeltaV-Station/Delta-v/pull/992
17-
- author: deltanedas
18-
changes:
19-
- message: Reworked Shoukou's atmospherics setup. The Gas Recycler is now usable
20-
among other things.
21-
type: Tweak
22-
id: 300
23-
time: '2024-04-03T02:10:51.0000000+00:00'
24-
url: https://github.com/DeltaV-Station/Delta-v/pull/1049
25-
- author: rosieposieeee
26-
changes:
27-
- message: Submarine has, once again, had some minor issues quashed, and small improvements
28-
made. Go check out the park!
29-
type: Tweak
30-
id: 301
31-
time: '2024-04-03T19:44:14.0000000+00:00'
32-
url: https://github.com/DeltaV-Station/Delta-v/pull/1053
33-
- author: NullWanderer
34-
changes:
35-
- message: Merged master, please report bugs or regressions
36-
type: Add
37-
- message: Mail containing books has been temporarily removed
38-
type: Remove
39-
id: 302
40-
time: '2024-04-09T07:49:38.080075+00:00'
41-
url: null
42-
- author: deltanedas
43-
changes:
44-
- message: Lighthouse is BACK!
45-
type: Add
46-
id: 303
47-
time: '2024-04-09T07:49:38.080495+00:00'
48-
url: null
492
- author: Adrian16199
503
changes:
514
- message: Added new horn designs for onis.
@@ -3821,3 +3774,54 @@
38213774
id: 797
38223775
time: '2024-12-19T04:55:03.0000000+00:00'
38233776
url: https://github.com/DeltaV-Station/Delta-v/pull/2304
3777+
- author: deltanedas
3778+
changes:
3779+
- message: Pulling wrecks on the salvage magnet now costs mining points. GO MINE!!!
3780+
type: Tweak
3781+
id: 798
3782+
time: '2024-12-20T05:28:43.0000000+00:00'
3783+
url: https://github.com/DeltaV-Station/Delta-v/pull/2457
3784+
- author: makyo
3785+
changes:
3786+
- message: round restart time
3787+
type: Tweak
3788+
id: 799
3789+
time: '2024-12-20T05:31:37.0000000+00:00'
3790+
url: https://github.com/DeltaV-Station/Delta-v/pull/2229
3791+
- author: deltanedas
3792+
changes:
3793+
- message: Removed vent fauna (spiders, slimes, snakes) events pending rework.
3794+
type: Remove
3795+
id: 800
3796+
time: '2024-12-20T05:34:54.0000000+00:00'
3797+
url: https://github.com/DeltaV-Station/Delta-v/pull/2474
3798+
- author: deltanedas
3799+
changes:
3800+
- message: Changed Salvage Weapons to be a tier 2 tech, Experimental Salvage Weaponry.
3801+
type: Tweak
3802+
- message: Crusher weapons are researchable again, PKA is roundstart.
3803+
type: Tweak
3804+
- message: Added the Fauna Protection Module for borgs, it has a PKA and crusher
3805+
dagger.
3806+
type: Add
3807+
id: 801
3808+
time: '2024-12-20T05:38:08.0000000+00:00'
3809+
url: https://github.com/DeltaV-Station/Delta-v/pull/2077
3810+
- author: Stop-Signs
3811+
changes:
3812+
- message: sleepers will no longer receive nukies as kill targets
3813+
type: Fix
3814+
id: 802
3815+
time: '2024-12-20T17:22:58.0000000+00:00'
3816+
url: https://github.com/DeltaV-Station/Delta-v/pull/2483
3817+
- author: alterae
3818+
changes:
3819+
- message: Added coats, hats, scarves, and shoes to the Psychologist's loadout options.
3820+
type: Add
3821+
- message: Added three new Psychologist job titles.
3822+
type: Add
3823+
- message: Psychologist now spawns with a folder.
3824+
type: Tweak
3825+
id: 803
3826+
time: '2024-12-20T18:49:04.0000000+00:00'
3827+
url: https://github.com/DeltaV-Station/Delta-v/pull/2459

Resources/ConfigPresets/DeltaV/horizon.toml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[game]
2-
hostname = "[EN][MRP] Delta-v (Ψ) | Horizon [US East 3]"
3-
soft_max_players = 80
2+
hostname = "[EN][MRP] Delta-v (Ψ) | Horizon [US East 3]"
3+
soft_max_players = 80
4+
round_restart_time = 300
45

56
[vote]
67
preset_enabled = true

Resources/ConfigPresets/DeltaV/periapsis.toml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[game]
2-
hostname = "[EN][MRP] Delta-v (Ψ) | Periapsis [US East 2]"
3-
soft_max_players = 50
2+
hostname = "[EN][MRP] Delta-v (Ψ) | Periapsis [US East 2]"
3+
soft_max_players = 50
4+
round_restart_time = 300
45

56
[server]
67
rules_file = "DeltaVRuleset"

Resources/Locale/en-US/deltav/flavors/flavor-profiles.ftl

+47
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,53 @@ flavor-complex-candy-bubblegum = like bubble gum
3131
flavor-complex-double-ice-cream = like ice cream, twice
3232
flavor-complex-drgibbbloodred = like severe malpractice
3333
34+
## Delta-V additional drink flavors
35+
flavor-complex-absinthe = like green death
36+
flavor-complex-blue-curacao = like fermented oranges
37+
flavor-complex-deadrum = like a botched murder
38+
flavor-complex-n-t-cahors = five hundred dollars too expensive
39+
flavor-complex-poison-wine = like a dark velvet
40+
flavor-complex-acidspit = like stomach acid
41+
flavor-complex-allies-cocktail = like wartime camaraderie
42+
flavor-complex-amasec = like a smoking gun
43+
flavor-complex-andalusia = like summer
44+
flavor-complex-b52 = like a nuclear arms race
45+
flavor-complex-bahama-mama = like a tropical vacation
46+
flavor-complex-barefoot = like berry-picking, but without the shoes
47+
flavor-complex-booger = like no one is watching
48+
flavor-complex-brave-bull = like you're seeing red
49+
flavor-complex-demons-blood = like brimstone
50+
flavor-complex-devils-kiss = like temptation
51+
flavor-complex-doctors-delight = like a medical miracle
52+
flavor-complex-driest-martini = like a dry sense of humor
53+
flavor-complex-erika-surprise = like a green dream, perfect for a warm day
54+
flavor-complex-gin-fizz = like a fizzy lemon
55+
flavor-complex-gildlager = like a spicy secret told over spring break
56+
flavor-complex-grog = like a day on the high seas
57+
flavor-complex-hippies-delight = like, totally trippy, man
58+
flavor-complex-hooch = like homemade firewater
59+
flavor-complex-irish-cream = like whiskey and cream
60+
flavor-complex-kira-special = kawaii
61+
flavor-complex-manhattan = dark and mysterious
62+
flavor-complex-manhattan-project = like two minutes to midnight
63+
flavor-complex-margarita = like a paradise in space
64+
flavor-complex-martini = like a sense of humor
65+
flavor-complex-mojito = minty fresh, and a little sweet
66+
flavor-complex-neurotoxin = like a trip to the ER
67+
flavor-complex-patron = like luxury
68+
flavor-complex-red-mead = like fermented honey with a splash of blood
69+
flavor-complex-rewriter = like an all-nighter
70+
flavor-complex-sbiten = like you'll need a glass of milk
71+
flavor-complex-silencer = like a broken vow
72+
flavor-complex-snow-white = like a mistake
73+
flavor-complex-sui-dream = like a fruit salad, perfect for the working lady
74+
flavor-complex-syndicate-bomb = like it will blow your mind
75+
flavor-complex-toxins-special = like a plasma fire
76+
flavor-complex-vodka-martini = shaken, not stirred
77+
flavor-complex-vodka-tonic = like depression in denial
78+
flavor-complex-kvass = like bread tossed into a blender
79+
flavor-complex-mothamphetamine = like there are buzzing wings in your mouth
80+
3481
candy-flavor-profile = This one is supposed to taste {$flavor}.
3582
candy-flavor-profile-multiple = This one is supposed to taste {$flavors} and {$lastFlavor}.
3683
candy-flavor-profile-unknown = You have no idea what this one is supposed to taste like.

Resources/Locale/en-US/deltav/job/job-names.ftl

+4
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ job-alt-title-fool = Fool
5656
5757
job-alt-title-hygiene-technician = Hygiene Technician
5858
59+
job-alt-title-psychiatrist = Psychiatrist
60+
job-alt-title-social-worker = Social Worker
61+
job-alt-title-therapist = Therapist
62+
5963
# Role timers
6064
JobMedicalBorg = Medical Cyborg
6165
JobCourier = Courier
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
marking-MothWingsClassicSelene = Wings (Selene, Classic)
2+
3+
marking-MothWingsSelene-selene_primary = Primary
4+
marking-MothWingsSelene-selene_secondary = Secondary
5+
marking-MothWingsSelene-selene_tertiary = Tertiary
6+
marking-MothWingsSelene = Wings (Selene)

Resources/Locale/en-US/deltav/preferences/loadout-groups.ftl

+5
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ loadout-group-medical-doctor-neck = Medical Doctor neck
6868
6969
loadout-group-medical-intern-id-delta = Medical Intern PDA
7070
71+
loadout-group-psychologist-head = Psychologist head
72+
loadout-group-psychologist-outerclothing = Psychologist outer clothing
73+
loadout-group-psychologist-shoes = Psychologist shoes
74+
loadout-group-psychologist-id-delta = Psychologist PDA
75+
7176
# Miscellaneous
7277
loadout-group-scarfs = Scarf
7378
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
salvage-map-wreck-size-unknown = [color=purple]Unidentified[/color]
2+
3+
salvage-magnet-mining-points-cost = Cost: {$points} Mining Points

Resources/Locale/en-US/research/technologies.ftl

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ research-technology-portable-fission = Portable Fission
2222
research-technology-space-scanning = Space Scanning
2323
research-technology-excavation = Mass Excavation
2424
25-
research-technology-salvage-weapons = Salvage Weapons
2625
research-technology-draconic-munitions = Draconic Munitions
2726
research-technology-uranium-munitions = Uranium Munitions
2827
research-technology-explosive-technology = Explosive Technology
@@ -32,6 +31,7 @@ research-technology-nonlethal-ammunition = Nonlethal Ammunition
3231
research-technology-practice-ammunition = Practice Ammunition
3332
research-technology-concentrated-laser-weaponry = Concentrated Laser Weaponry
3433
research-technology-wave-particle-harnessing = Wave Particle Harnessing
34+
research-technology-experimental-salvage-weaponry = Experimental Salvage Weaponry
3535
research-technology-advanced-riot-control = Advanced Riot Control
3636
research-technology-portable-microfusion-weaponry = Portable Microfusion Weaponry
3737
research-technology-experimental-battery-ammo = Experimental Battery Ammo

0 commit comments

Comments
 (0)