Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

up #17

Merged
merged 72 commits into from
Jul 18, 2024
Merged

up #17

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
5b8ec7b
adds Dual wielding for revolvers (#329)
ScyronX Jul 11, 2024
e2df12e
Makes shotguns require wielding to fire (#330)
ScyronX Jul 11, 2024
a3ab3fb
Adds ID locked doors (#331)
BlueHNT Jul 11, 2024
2d975c2
QoL 3 (#327)
Peptide90 Jul 11, 2024
909aa2c
nospawn and abstract part 1 (#334)
Peptide90 Jul 11, 2024
0bb2e4d
increases projectile speed and fixes projectiles inheriting velocity…
ScyronX Jul 11, 2024
37a9881
Adds laser gatling (#335)
BlueHNT Jul 11, 2024
c75f325
Adds bandanas to the crafting menu (#332)
ScyronX Jul 12, 2024
c3607f1
NPC Taming (#336)
JerryImMouse Jul 12, 2024
2510cde
Bullet Projectile damage changes (#339)
MutantMan2040 Jul 12, 2024
976a387
More locked doors (#337)
BlueHNT Jul 12, 2024
006bbe5
AntiMateriel changes from internal mag to magazine (#342)
BlueHNT Jul 12, 2024
197c1a4
Collection of Fixes and QOL Features (#341)
BlueHNT Jul 12, 2024
88cf562
make blast doors very strong
Peptide90 Jul 12, 2024
ed6ff6b
Merge remote-tracking branch 'origin/master'
Peptide90 Jul 12, 2024
b55aa1e
increase mini fusion power
Peptide90 Jul 12, 2024
94d58c6
set fallback mode to extended from waves
Peptide90 Jul 12, 2024
daf38b3
disable more events
Peptide90 Jul 12, 2024
da45956
depopulate mob spawning
Peptide90 Jul 12, 2024
b13080e
some new floor items, remove subfloor from tiles
Peptide90 Jul 13, 2024
4109aa5
suffixes and bounding boxes on floor decor
Peptide90 Jul 13, 2024
b6825fb
1307 sunnyvale update
Peptide90 Jul 13, 2024
7120d17
fix
Peptide90 Jul 13, 2024
48f06c6
Fixes WallFrame, Indestructible BlastDoor (#349)
BlueHNT Jul 13, 2024
403ca25
Chemicals are dangerous and Aluminium exists (#345)
BlueHNT Jul 13, 2024
c23f07b
Crafting, Loadouts and Kits (AMR, BrushTube) v2 (#344)
BlueHNT Jul 13, 2024
40aa41f
name description fix
Peptide90 Jul 13, 2024
f20106b
Merge remote-tracking branch 'origin/master'
Peptide90 Jul 13, 2024
a754912
add wooden settler table
Peptide90 Jul 13, 2024
7315d9f
Adds Lootable fridge (#351)
MutantMan2040 Jul 14, 2024
a65bc0c
map update
Peptide90 Jul 14, 2024
7a3a13f
Merge remote-tracking branch 'origin/master'
Peptide90 Jul 14, 2024
86a9695
Table and chair construction 1 (#353)
Peptide90 Jul 14, 2024
513a157
map update
Peptide90 Jul 14, 2024
bc5f5a4
Fixes door suffix (#352)
BlueHNT Jul 14, 2024
c088263
RadAway Phial and some changes (#350)
BlueHNT Jul 14, 2024
42b8633
Added maidclaws (#347)
Noliuss Jul 14, 2024
93ddd16
Merge remote-tracking branch 'origin/master'
Peptide90 Jul 14, 2024
388c38f
map update
Peptide90 Jul 14, 2024
55a52d4
Merge remote-tracking branch 'origin/master'
Peptide90 Jul 14, 2024
cf1582a
half hunger decay rate
Peptide90 Jul 14, 2024
7d61437
nospawn intercom
Peptide90 Jul 15, 2024
fdca353
Clothes pack 1 (#359)
Peptide90 Jul 15, 2024
5e8e87c
adds a short doafter to hypospray for when you use it on others (#358)
ScyronX Jul 15, 2024
49f91e8
Fixes fox ranger helmet / Updates balancing (#357)
BlueHNT Jul 15, 2024
983287d
Merge remote-tracking branch 'origin/master'
Peptide90 Jul 15, 2024
451bf74
robit progress
Peptide90 Jul 15, 2024
0ed8877
update
Peptide90 Jul 15, 2024
dc08f0c
eyebot music and lint fix
Peptide90 Jul 15, 2024
4f62eff
Update base_borg_chassis.yml
Peptide90 Jul 15, 2024
f23e347
Update borg_chassis.yml
Peptide90 Jul 15, 2024
caa2b83
Update base_borg_chassis.yml
Peptide90 Jul 15, 2024
4c92980
fix master
Peptide90 Jul 16, 2024
3eca788
Little Locale fixes and other. (#362)
Vonsant Jul 16, 2024
4d809ee
fix master
Peptide90 Jul 16, 2024
9eef148
Respawn button (#361)
Vonsant Jul 16, 2024
54f7307
Fix and Nerfs (#363)
BlueHNT Jul 16, 2024
6844945
Armor, Coats and Power Armors pack (#360)
BlueHNT Jul 16, 2024
0450b48
quick fix (#367)
Vonsant Jul 16, 2024
966cbb1
Map fix (#368)
Vonsant Jul 16, 2024
0223205
Fix empty atmos deserialization (#26540)
ElectroJr Mar 29, 2024
ae7e12d
Adds NPC Psycho Raiders (#365)
BlueHNT Jul 17, 2024
6b78fd7
update map door ID
Peptide90 Jul 17, 2024
ddac3c4
Species job blacklist (#369)
Vonsant Jul 17, 2024
3767df4
Fixes mini/gatling gun inventory size (#373)
BlueHNT Jul 17, 2024
e40a917
Adds power cells to belts (#371)
BlueHNT Jul 17, 2024
17e7d96
Ghoul race modifiers (#370)
BlueHNT Jul 17, 2024
935f9d7
adds a undecided loadout kit to starter gears to replace loadout kits…
ScyronX Jul 17, 2024
80a581b
fix dung despawning
Peptide90 Jul 17, 2024
eb162b0
Merge remote-tracking branch 'origin/master'
Peptide90 Jul 17, 2024
c6f8914
tall rock black fix
Peptide90 Jul 18, 2024
faa9001
Merge remote-tracking branch 'origin/master'
Peptide90 Jul 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 19 additions & 1 deletion Content.Client/Ghost/GhostSystem.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
using Content.Client._NF.Respawn;
using Content.Client.Movement.Systems;
using Content.Client.UserInterface.Systems.Ghost.Widgets;
using Content.Shared.Actions;
using Content.Shared.Ghost;
using Content.Shared.Mind;
using Robust.Client.Console;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Client.Player;
using Robust.Client.UserInterface;
using Robust.Shared.Player;
using Robust.Shared.Timing;

namespace Content.Client.Ghost
{
Expand All @@ -15,6 +20,19 @@ public sealed class GhostSystem : SharedGhostSystem
[Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] private readonly SharedActionsSystem _actions = default!;
[Dependency] private readonly ContentEyeSystem _contentEye = default!;
[Dependency] private readonly IUserInterfaceManager _uiManager = default!;
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly RespawnSystem _respawn = default!;

public override void Update(float frameTime)
{
foreach (var ghost in EntityManager.EntityQuery<GhostComponent, MindComponent>(true))
{
var ui = _uiManager.GetActiveUIWidgetOrNull<GhostGui>();
if (ui != null && Player != null)
ui.UpdateRespawn(_respawn.RespawnResetTime);
}
}

public int AvailableGhostRoleCount { get; private set; }

Expand Down Expand Up @@ -182,4 +200,4 @@ public void ToggleGhostVisibility()
GhostVisibility = !GhostVisibility;
}
}
}
}
46 changes: 43 additions & 3 deletions Content.Client/Players/PlayTimeTracking/JobRequirementsManager.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
using System.Diagnostics.CodeAnalysis;
using System.Text; // Nuclear 14
using Content.Shared.CCVar;
using Content.Shared.Players;
using Content.Shared.Players.PlayTimeTracking;
using Content.Shared.Roles;
using Content.Shared._NC.Roles; // Nuclear 14
using Robust.Client;
using Robust.Client.Player;
using Content.Client.Preferences; // Nuclear 14
using Robust.Shared.Configuration;
using Robust.Shared.Network;
using Robust.Shared.Prototypes;
using Content.Shared.Preferences; // Nuclear 14
using Robust.Shared.Utility;

namespace Content.Client.Players.PlayTimeTracking;
Expand All @@ -20,6 +24,7 @@ public sealed partial class JobRequirementsManager
[Dependency] private readonly IEntityManager _entManager = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] private readonly IPrototypeManager _prototypes = default!;
[Dependency] private readonly IClientPreferencesManager _clientPreferences = default!; // Nuclear 14

public readonly Dictionary<string, TimeSpan> PlayTimes = new();
private readonly List<string> _roleBans = new();
Expand Down Expand Up @@ -81,6 +86,7 @@ private void RxPlayTime(MsgPlayTime message)

public bool IsAllowed(JobPrototype job, [NotNullWhen(false)] out FormattedMessage? reason)
{
var reasonBuilder = new StringBuilder(); // Nuclear 14
reason = null;

if (_roleBans.Contains($"Job:{job.ID}"))
Expand All @@ -93,8 +99,44 @@ public bool IsAllowed(JobPrototype job, [NotNullWhen(false)] out FormattedMessag
if (player == null)
return true;

return CheckRoleTime(job.Requirements, out reason);
// Nuclear 14 start
if (job.JobBlockForSpecies != null)
{
if (_clientPreferences?.Preferences == null)
return true;

var nameSpecie = ((HumanoidCharacterProfile)_clientPreferences.Preferences.SelectedCharacter!).Species;
var first = true;

foreach (var jobBlockForSpecie in job.JobBlockForSpecies)
{
string? speciesReason;
if (JobBlockForSpecies.TryRequirementMet(jobBlockForSpecie, nameSpecie, out speciesReason))
continue;

if (!first)
reasonBuilder.Append('\n');
first = false;
reasonBuilder.AppendLine(speciesReason);
}
}

if (!CheckRoleTime(job.Requirements, out var timeReason))
{
if (reasonBuilder.Length > 0)
reasonBuilder.Append('\n');
reasonBuilder.Append(timeReason!.ToMarkup());
}

if (reasonBuilder.Length > 0)
{
reason = FormattedMessage.FromMarkup(reasonBuilder.ToString());
return false;
}

return true;
}
// Nuclear 14 end

public bool CheckRoleTime(HashSet<JobRequirement>? requirements, [NotNullWhen(false)] out FormattedMessage? reason, string? localePrefix = "role-timer-")
{
Expand Down Expand Up @@ -133,6 +175,4 @@ public IEnumerable<KeyValuePair<string, TimeSpan>> FetchPlaytimeByRoles()
}
}
}


}
15 changes: 15 additions & 0 deletions Content.Client/Preferences/UI/HumanoidProfileEditor.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
using Content.Shared.Roles;
using Content.Shared.StatusIcon;
using Content.Shared.Traits;
using Content.Shared._NC; // Nuclear 14
using Robust.Client.AutoGenerated;
using Robust.Client.Graphics;
using Robust.Client.UserInterface;
Expand Down Expand Up @@ -953,6 +954,7 @@ private void SetGender(Gender newGender)
private void SetSpecies(string newSpecies)
{
Profile = Profile?.WithSpecies(newSpecies);
Save(); // Nuclear 14
OnSkinColorOnValueChanged(); // Species may have special color prefs, make sure to update it.
CMarkings.SetSpecies(newSpecies); // Repopulate the markings tab as well.
UpdateSexControls(); // update sex for new species
Expand All @@ -961,6 +963,7 @@ private void SetSpecies(string newSpecies)
UpdateWidthControls();
UpdateWeight();
RebuildSpriteView(); // they might have different inv so we need a new dummy
UpdateJobPriorities(); // Nuclear 14
UpdateSpeciesGuidebookIcon();
IsDirty = true;
_needUpdatePreview = true;
Expand Down Expand Up @@ -1433,8 +1436,20 @@ private void UpdateJobPriorities()
{
foreach (var prioritySelector in _jobPriorities)
{
prioritySelector.UnlockRequirements(); // Nuclear 14
var jobId = prioritySelector.Proto.ID;

// Nuclear 14 start
if (!_requirements.IsAllowed(prioritySelector.Proto, out var reason))
{
prioritySelector.LockRequirements(reason);
if (Profile != null)
{
Profile = Profile.WithJobPriority(jobId, JobPriority.Never);
}
}
// Nuclear 14 start

var priority = Profile?.JobPriorities.GetValueOrDefault(jobId, JobPriority.Never) ?? JobPriority.Never;

prioritySelector.Priority = priority;
Expand Down
39 changes: 39 additions & 0 deletions Content.Client/UndecidedLoadout/UndecidedLoadoutBackpackMenu.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<controls:FancyWindow xmlns="https://spacestation14.io"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
Title="{Loc 'undecided-loadout-window-title'}"
MinSize="700 700">
<BoxContainer Orientation="Vertical" HorizontalExpand="True" VerticalExpand="True">
<!-- First Informational panel -->
<Label Text="{Loc 'undecided-loadout-window-description'}" Margin="5 5"/>
<controls:HLine Color="#404040" Thickness="2" Margin="0 5"/>
<Label Name="SelectedSets" Text="{Loc 'undecided-loadout-window-selected'}" Margin="5 5"/>

<!-- Second sets panel -->
<PanelContainer Margin="5 5">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#050505" />
</PanelContainer.PanelOverride>
<ScrollContainer
HScrollEnabled="False"
MinSize="0 600"
SizeFlagsStretchRatio="2"
VerticalExpand="True">
<BoxContainer Name="SetsGrid" Orientation="Vertical" MinSize="460 200">
<!-- Sets is filled by code -->

</BoxContainer>
</ScrollContainer>
</PanelContainer>

<!-- Third approve button panel -->
<PanelContainer Margin="10">
<Button Name="ApproveButton"
Text="{Loc 'undecided-loadout-window-approve-button'}"
Margin="0 5"
Access="Public"
HorizontalAlignment ="Right"
StyleClasses="OpenRight"/>
</PanelContainer>
</BoxContainer>
</controls:FancyWindow>
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
using Content.Client.UserInterface.Controls;
using Content.Shared.UndecidedLoadout;
using Content.Client.UndecidedLoadout;
using Robust.Client.AutoGenerated;
using Robust.Client.GameObjects;
using Robust.Client.UserInterface.XAML;

namespace Content.Client.UndecidedLoadout;

[GenerateTypedNameReferences]
public sealed partial class UndecidedLoadoutBackpackMenu : FancyWindow
{
[Dependency] private readonly IEntitySystemManager _sysMan = default!;
private readonly SpriteSystem _spriteSystem;

private readonly UndecidedLoadoutBackpackBoundUserInterface _owner;

public UndecidedLoadoutBackpackMenu(UndecidedLoadoutBackpackBoundUserInterface owner)
{
RobustXamlLoader.Load(this);
IoCManager.InjectDependencies(this);
_spriteSystem = _sysMan.GetEntitySystem<SpriteSystem>();

_owner = owner;

ApproveButton.OnButtonDown += (args) =>
{
_owner.SendApprove();
};
}

public void UpdateState(UndecidedLoadoutBackpackBoundUserInterfaceState state)
{
SetsGrid.RemoveAllChildren();
int count = 0;
int selectedNumber = 0;
foreach (var set in state.Sets)
{
var child = new UndecidedLoadoutBackpackSet(set.Value, _spriteSystem);

child.SetButton.OnButtonDown += (args) =>
{
_owner.SendChangeSelected(set.Key);
};

SetsGrid.AddChild(child);

count++;

if (set.Value.Selected)
selectedNumber++;
}

SelectedSets.Text = Loc.GetString("undecided-loadout-window-selected", ("selectedCount", selectedNumber), ("maxCount", state.MaxSelectedSets));
ApproveButton.Disabled = selectedNumber == state.MaxSelectedSets ? false : true;
}
}
23 changes: 23 additions & 0 deletions Content.Client/UndecidedLoadout/UndecidedLoadoutBackpackSet.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<Control xmlns="https://spacestation14.io"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client">
<!-- Name and button -->
<PanelContainer Margin="5 5 0 5">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#18211b" />
</PanelContainer.PanelOverride>
<BoxContainer Orientation="Vertical" HorizontalExpand="True">
<GridContainer Margin="5" Columns="2" MinSize="600 0">
<Label Name="SetName" Text="Set" StyleClasses="StatusFieldTitle"></Label>
<Button Margin="0 10" Name="SetButton" Text="Select" StyleClasses="OpenRight" Access="Public" HorizontalAlignment="Right"/>
</GridContainer>
<controls:HLine Color="#404040" Thickness="1" Margin="0 5"/>
<!-- Icon and Description -->
<GridContainer Margin="0 5" Columns="2">
<TextureRect Name="Icon" Margin="10" Stretch="KeepAspectCentered"
VerticalAlignment="Center" HorizontalAlignment="Right" SetSize="64 64"/>
<Label Name="SetDescription" Text="Description"></Label>
</GridContainer>
</BoxContainer>
</PanelContainer>
</Control>
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
using Content.Shared.UndecidedLoadout;
using JetBrains.Annotations;
using Robust.Client.GameObjects;

namespace Content.Client.UndecidedLoadout;

[UsedImplicitly]
public sealed class UndecidedLoadoutBackpackBoundUserInterface : BoundUserInterface
{
private UndecidedLoadoutBackpackMenu? _window;

public UndecidedLoadoutBackpackBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) { }

protected override void Open()
{
base.Open();

_window = new UndecidedLoadoutBackpackMenu(this);
_window.OnClose += Close;
_window.OpenCentered();
}

protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
if (!disposing)
return;

if (_window != null)
_window.OnClose -= Close;

_window?.Dispose();
}

protected override void UpdateState(BoundUserInterfaceState state)
{
base.UpdateState(state);

if (state is not UndecidedLoadoutBackpackBoundUserInterfaceState current)
return;

_window?.UpdateState(current);
}

public void SendChangeSelected(int setNumber)
{
SendMessage(new UndecidedLoadoutBackpackChangeSetMessage(setNumber));
}

public void SendApprove()
{
SendMessage(new UndecidedLoadoutBackpackApproveMessage());
}
}
22 changes: 22 additions & 0 deletions Content.Client/UndecidedLoadout/UndecidedLoadoutSet.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.XAML;
using Content.Shared.UndecidedLoadout;
using Robust.Client.GameObjects;

namespace Content.Client.UndecidedLoadout;

[GenerateTypedNameReferences]
public sealed partial class UndecidedLoadoutBackpackSet : Control
{
public UndecidedLoadoutBackpackSet(UndecidedLoadoutBackpackSetInfo set, SpriteSystem spriteSystem)
{
RobustXamlLoader.Load(this);

Icon.Texture = spriteSystem.Frame0(set.Sprite);
SetName.Text = Loc.GetString(set.Name);
SetDescription.Text = Loc.GetString(set.Description);
SetButton.Text = Loc.GetString(set.Selected ? "undecided-loadout-button-deselect" : "undecided-loadout-button-select");
SetButton.ModulateSelfOverride = set.Selected ? new Color(40, 84, 35) : new Color(68, 75, 103);
}
}
Loading
Loading