From 1b00456d0947899246e6a6df1df626ec85ea93be Mon Sep 17 00:00:00 2001
From: Ratyyy <>
Date: Fri, 3 May 2024 20:01:26 +0300
Subject: [PATCH 1/2] mech tags + immortal headrev
---
.../Revolutionary/UI/DeconvertedEui.cs | 25 ----------------
.../Revolutionary/UI/DeconvertedMenu.xaml | 10 -------
.../Revolutionary/UI/DeconvertedMenu.xaml.cs | 16 ----------
.../Rules/RevolutionaryRuleSystem.cs | 30 +++++--------------
Resources/Prototypes/ADT/tags.yml | 29 +++++++++++++-----
.../Entities/Objects/Shields/shields.yml | 21 +++++++------
.../Objects/Specific/Mech/mecha_equipment.yml | 9 ++++++
.../Entities/Objects/Specific/Mech/mechs.yml | 8 +++++
8 files changed, 57 insertions(+), 91 deletions(-)
delete mode 100644 Content.Client/Revolutionary/UI/DeconvertedEui.cs
delete mode 100644 Content.Client/Revolutionary/UI/DeconvertedMenu.xaml
delete mode 100644 Content.Client/Revolutionary/UI/DeconvertedMenu.xaml.cs
diff --git a/Content.Client/Revolutionary/UI/DeconvertedEui.cs b/Content.Client/Revolutionary/UI/DeconvertedEui.cs
deleted file mode 100644
index 33495f8a974..00000000000
--- a/Content.Client/Revolutionary/UI/DeconvertedEui.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using Content.Client.Eui;
-
-namespace Content.Client.Revolutionary.UI;
-
-public sealed class DeconvertedEui : BaseEui
-{
- private readonly DeconvertedMenu _menu;
-
- public DeconvertedEui()
- {
- _menu = new DeconvertedMenu();
- }
-
- public override void Opened()
- {
- _menu.OpenCentered();
- }
-
- public override void Closed()
- {
- base.Closed();
-
- _menu.Close();
- }
-}
diff --git a/Content.Client/Revolutionary/UI/DeconvertedMenu.xaml b/Content.Client/Revolutionary/UI/DeconvertedMenu.xaml
deleted file mode 100644
index 14b31c1950d..00000000000
--- a/Content.Client/Revolutionary/UI/DeconvertedMenu.xaml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/Content.Client/Revolutionary/UI/DeconvertedMenu.xaml.cs b/Content.Client/Revolutionary/UI/DeconvertedMenu.xaml.cs
deleted file mode 100644
index ed32473a88a..00000000000
--- a/Content.Client/Revolutionary/UI/DeconvertedMenu.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using Content.Client.UserInterface.Controls;
-using Robust.Client.AutoGenerated;
-using Robust.Client.UserInterface.XAML;
-
-namespace Content.Client.Revolutionary.UI;
-
-[GenerateTypedNameReferences]
-public sealed partial class DeconvertedMenu : FancyWindow
-{
- public DeconvertedMenu()
- {
- RobustXamlLoader.Load(this);
-
- ConfirmButton.OnPressed += _ => Close();
- }
-}
diff --git a/Content.Server/GameTicking/Rules/RevolutionaryRuleSystem.cs b/Content.Server/GameTicking/Rules/RevolutionaryRuleSystem.cs
index d20775c7343..9efa4807ab9 100644
--- a/Content.Server/GameTicking/Rules/RevolutionaryRuleSystem.cs
+++ b/Content.Server/GameTicking/Rules/RevolutionaryRuleSystem.cs
@@ -27,6 +27,7 @@
using Content.Shared.Roles;
using Content.Shared.Stunnable;
using Content.Shared.Zombies;
+using FastAccessors;
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;
using System.Linq;
@@ -277,7 +278,10 @@ private bool CheckCommandLose()
private void OnHeadRevMobStateChanged(EntityUid uid, HeadRevolutionaryComponent comp, MobStateChangedEvent ev)
{
if (ev.NewMobState == MobState.Dead || ev.NewMobState == MobState.Invalid)
+ {
+ RemCompDeferred(uid);
CheckRevsLose();
+ }
}
///
@@ -285,7 +289,6 @@ private void OnHeadRevMobStateChanged(EntityUid uid, HeadRevolutionaryComponent
///
private bool CheckRevsLose()
{
- var stunTime = TimeSpan.FromSeconds(4);
var headRevList = new List();
var headRevs = AllEntityQuery();
@@ -297,32 +300,15 @@ private bool CheckRevsLose()
// If no Head Revs are alive all normal Revs will lose their Rev status and rejoin Nanotrasen
if (IsGroupDead(headRevList, false))
{
- var rev = AllEntityQuery();
- while (rev.MoveNext(out var uid, out _, out var mc))
+ var headrev = AllEntityQuery();
+ while (headrev.MoveNext(out var uid, out _, out var mc))
{
if (HasComp(uid))
continue;
-
- _npcFaction.RemoveFaction(uid, RevolutionaryNpcFaction);
- _stun.TryParalyze(uid, stunTime, true);
- RemCompDeferred(uid);
- _popup.PopupEntity(Loc.GetString("rev-break-control", ("name", Identity.Entity(uid, EntityManager))), uid);
- _adminLogManager.Add(LogType.Mind, LogImpact.Medium, $"{ToPrettyString(uid)} was deconverted due to all Head Revolutionaries dying.");
-
- if (!_mind.TryGetMind(uid, out var mindId, out var mind, mc))
- continue;
-
- // remove their antag role
- _role.MindTryRemoveRole(mindId);
-
- // make it very obvious to the rev they've been deconverted since
- // they may not see the popup due to antag and/or new player tunnel vision
- if (_mind.TryGetSession(mindId, out var session))
- _euiMan.OpenEui(new DeconvertedEui(), session);
+ AddComp(uid);
+ return false;
}
- return true;
}
-
return false;
}
diff --git a/Resources/Prototypes/ADT/tags.yml b/Resources/Prototypes/ADT/tags.yml
index 2dcdad5de15..c66dc17a95f 100644
--- a/Resources/Prototypes/ADT/tags.yml
+++ b/Resources/Prototypes/ADT/tags.yml
@@ -1,9 +1,9 @@
- type: Tag
id: socks
-
+
- type: Tag
id: underwearb
-
+
- type: Tag
id: underweart
@@ -42,13 +42,13 @@
- type: Tag
id: ChangelingBlacklist
-
-- type: Tag
+
+- type: Tag
id: BoomBoxTape
-
+
- type: Tag
id: MobileDefibrillator
-
+
- type: Tag
id: HighVoltageDefibrillator
@@ -67,5 +67,20 @@
- type: Tag
id: ADTHardsuitSalvage
-- type: Tag
+- type: Tag
id: ADTBluespaceAnomalyCore
+
+- type: Tag
+ id: ADTMechEquipmentGeneral
+
+- type: Tag
+ id: ADTMechEquipmentMed
+
+- type: Tag
+ id: ADTMechEquipmentService
+
+- type: Tag
+ id: ADTMechEquipmentIndustrial
+
+- type: Tag
+ id: ADTMechEquipmentSec
diff --git a/Resources/Prototypes/Entities/Objects/Shields/shields.yml b/Resources/Prototypes/Entities/Objects/Shields/shields.yml
index bc4b746bcdf..14a920efada 100644
--- a/Resources/Prototypes/Entities/Objects/Shields/shields.yml
+++ b/Resources/Prototypes/Entities/Objects/Shields/shields.yml
@@ -17,14 +17,14 @@
coefficients:
Blunt: 0.8
Slash: 0.8
- Piercing: 0.8
- Heat: 0.8
+ Piercing: 0.1
+ Heat: 0.1
activeBlockModifier:
coefficients:
Blunt: 0.7
Slash: 0.7
- Piercing: 0.7
- Heat: 0.7
+ Piercing: 0.1
+ Heat: 0.1
flatReductions:
Blunt: 1
Slash: 1
@@ -42,7 +42,7 @@
acts: [ "Destruction" ]
- trigger:
!type:DamageTrigger
- damage: 250 #This is probably enough damage before it breaks
+ damage: 200 #This is probably enough damage before it breaks
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
@@ -84,10 +84,10 @@
- type: Blocking
passiveBlockModifier:
coefficients:
- Heat: 0.4
+ Heat: 0.7
activeBlockModifier:
coefficients:
- Heat: 0.2
+ Heat: 0.6
flatReductions:
Heat: 2
@@ -104,12 +104,11 @@
- type: Blocking
passiveBlockModifier:
coefficients:
- Blunt: 0.6
- Piercing: 0.5
+ Piercing: 0.7
activeBlockModifier:
coefficients:
- Blunt: 0.4
- Piercing: 0.3
+ Blunt: 0.1
+ Piercing: 0.4
flatReductions:
Blunt: 1.5
Piercing: 1.5
diff --git a/Resources/Prototypes/Entities/Objects/Specific/Mech/mecha_equipment.yml b/Resources/Prototypes/Entities/Objects/Specific/Mech/mecha_equipment.yml
index c489dec1c56..be904eecb04 100644
--- a/Resources/Prototypes/Entities/Objects/Specific/Mech/mecha_equipment.yml
+++ b/Resources/Prototypes/Entities/Objects/Specific/Mech/mecha_equipment.yml
@@ -12,6 +12,9 @@
- type: GuideHelp
guides:
- Robotics
+ - type: Tag
+ tags:
+ - ADTMechEquipmentGeneral
- type: entity
id: MechEquipmentGrabber
@@ -27,6 +30,9 @@
- type: ContainerContainer
containers:
item-container: !type:Container
+ - type: Tag
+ tags:
+ - ADTMechEquipmentIndustrial
- type: entity
id: MechEquipmentGrabberSmall
@@ -70,3 +76,6 @@
- type: UseDelay
delay: 0.5
# TODO: tag as being for H.O.N.K. only!!!
+ - type: Tag
+ tags:
+ - ADTMechEquipmentService
diff --git a/Resources/Prototypes/Entities/Objects/Specific/Mech/mechs.yml b/Resources/Prototypes/Entities/Objects/Specific/Mech/mechs.yml
index 4ff52c01aa8..3bb83211de1 100644
--- a/Resources/Prototypes/Entities/Objects/Specific/Mech/mechs.yml
+++ b/Resources/Prototypes/Entities/Objects/Specific/Mech/mechs.yml
@@ -125,6 +125,10 @@
pilotWhitelist:
components:
- HumanoidAppearance
+ equipmentWhitelist:
+ tags:
+ - ADTMechEquipmentGeneral
+ - ADTMechEquipmentIndustrial
- type: MeleeWeapon
hidden: true
attackRate: 1
@@ -170,6 +174,10 @@
pilotWhitelist:
components:
- HumanoidAppearance
+ equipmentWhitelist:
+ tags:
+ - ADTMechEquipmentGeneral
+ - ADTMechEquipmentService
- type: entity
parent: MechHonker
From 34417f354ddab39b45bbe1b277b3ec3b43172922 Mon Sep 17 00:00:00 2001
From: Ratyyy <>
Date: Fri, 3 May 2024 20:34:53 +0300
Subject: [PATCH 2/2] fix
---
Resources/Prototypes/ADT/tags.yml | 2 --
1 file changed, 2 deletions(-)
diff --git a/Resources/Prototypes/ADT/tags.yml b/Resources/Prototypes/ADT/tags.yml
index 542bec6cc7d..75624f1509a 100644
--- a/Resources/Prototypes/ADT/tags.yml
+++ b/Resources/Prototypes/ADT/tags.yml
@@ -85,5 +85,3 @@
- type: Tag
id: ADTMechEquipmentSec
-- type: Tag
- id: ADTBluespaceAnomalyCore