Cult fix cloning & more (#355)
* - fix: Fix cult cloning. * - tweak: Some tweaks. * - fix: Cult door not rcd deconstructible.
This commit is contained in:
@@ -3,15 +3,12 @@ using Content.Server._Miracle.GulagSystem;
|
|||||||
using Content.Server.Actions;
|
using Content.Server.Actions;
|
||||||
using Content.Server.Antag;
|
using Content.Server.Antag;
|
||||||
using Content.Server.Bible.Components;
|
using Content.Server.Bible.Components;
|
||||||
using Content.Server.Chat.Managers;
|
|
||||||
using Content.Server.GameTicking;
|
using Content.Server.GameTicking;
|
||||||
using Content.Server.GameTicking.Rules;
|
using Content.Server.GameTicking.Rules;
|
||||||
using Content.Server.GameTicking.Rules.Components;
|
using Content.Server.GameTicking.Rules.Components;
|
||||||
using Content.Server.NPC.Systems;
|
using Content.Server.Objectives.Components;
|
||||||
using Content.Server.Roles;
|
using Content.Server.Roles;
|
||||||
using Content.Server.Roles.Jobs;
|
|
||||||
using Content.Server.RoundEnd;
|
using Content.Server.RoundEnd;
|
||||||
using Content.Server.Shuttles.Components;
|
|
||||||
using Content.Server.StationEvents.Components;
|
using Content.Server.StationEvents.Components;
|
||||||
using Content.Server.Storage.EntitySystems;
|
using Content.Server.Storage.EntitySystems;
|
||||||
using Content.Shared.Body.Systems;
|
using Content.Shared.Body.Systems;
|
||||||
@@ -29,6 +26,7 @@ using Content.Shared._White;
|
|||||||
using Content.Shared._White.Cult.Components;
|
using Content.Shared._White.Cult.Components;
|
||||||
using Content.Shared._White.Cult.Systems;
|
using Content.Shared._White.Cult.Systems;
|
||||||
using Content.Shared._White.Mood;
|
using Content.Shared._White.Mood;
|
||||||
|
using Content.Shared.Cloning;
|
||||||
using Content.Shared.Mind;
|
using Content.Shared.Mind;
|
||||||
using Content.Shared.NPC.Systems;
|
using Content.Shared.NPC.Systems;
|
||||||
using Robust.Server.Player;
|
using Robust.Server.Player;
|
||||||
@@ -72,10 +70,16 @@ public sealed class CultRuleSystem : GameRuleSystem<CultRuleComponent>
|
|||||||
SubscribeLocalEvent<CultistComponent, ComponentInit>(OnCultistComponentInit);
|
SubscribeLocalEvent<CultistComponent, ComponentInit>(OnCultistComponentInit);
|
||||||
SubscribeLocalEvent<CultistComponent, ComponentRemove>(OnCultistComponentRemoved);
|
SubscribeLocalEvent<CultistComponent, ComponentRemove>(OnCultistComponentRemoved);
|
||||||
SubscribeLocalEvent<CultistComponent, MobStateChangedEvent>(OnCultistsStateChanged);
|
SubscribeLocalEvent<CultistComponent, MobStateChangedEvent>(OnCultistsStateChanged);
|
||||||
|
SubscribeLocalEvent<CultistComponent, CloningEvent>(OnClone);
|
||||||
|
|
||||||
SubscribeLocalEvent<CultistRoleComponent, GetBriefingEvent>(OnGetBriefing);
|
SubscribeLocalEvent<CultistRoleComponent, GetBriefingEvent>(OnGetBriefing);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnClone(Entity<CultistComponent> ent, ref CloningEvent args)
|
||||||
|
{
|
||||||
|
RemoveObjectiveAndRole(ent);
|
||||||
|
}
|
||||||
|
|
||||||
protected override void Added(EntityUid uid, CultRuleComponent component, GameRuleComponent gameRule, GameRuleAddedEvent args)
|
protected override void Added(EntityUid uid, CultRuleComponent component, GameRuleComponent gameRule, GameRuleAddedEvent args)
|
||||||
{
|
{
|
||||||
base.Added(uid, component, gameRule, args);
|
base.Added(uid, component, gameRule, args);
|
||||||
@@ -178,6 +182,21 @@ public sealed class CultRuleSystem : GameRuleSystem<CultRuleComponent>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void RemoveObjectiveAndRole(EntityUid uid)
|
||||||
|
{
|
||||||
|
if (!_mindSystem.TryGetMind(uid, out var mindId, out var mind))
|
||||||
|
return;
|
||||||
|
|
||||||
|
var objectives = mind.Objectives.FindAll(HasComp<PickCultTargetComponent>);
|
||||||
|
foreach (var obj in objectives)
|
||||||
|
{
|
||||||
|
_mindSystem.TryRemoveObjective(mindId, mind, mind.Objectives.IndexOf(obj));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_roleSystem.MindHasRole<CultistRoleComponent>(mindId))
|
||||||
|
_roleSystem.MindRemoveRole<CultistRoleComponent>(mindId);
|
||||||
|
}
|
||||||
|
|
||||||
private void OnCultistComponentRemoved(EntityUid uid, CultistComponent component, ComponentRemove args)
|
private void OnCultistComponentRemoved(EntityUid uid, CultistComponent component, ComponentRemove args)
|
||||||
{
|
{
|
||||||
var query = QueryActiveRules();
|
var query = QueryActiveRules();
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using Content.Server._White.Cult.GameRule;
|
||||||
using Content.Server.Objectives.Components;
|
using Content.Server.Objectives.Components;
|
||||||
using Content.Server.Popups;
|
using Content.Server.Popups;
|
||||||
using Content.Server.Roles;
|
using Content.Server.Roles;
|
||||||
@@ -8,6 +9,7 @@ using Content.Shared.IdentityManagement;
|
|||||||
using Content.Shared.Inventory;
|
using Content.Shared.Inventory;
|
||||||
using Content.Shared._White.Cult.Components;
|
using Content.Shared._White.Cult.Components;
|
||||||
using Content.Shared._White.Mood;
|
using Content.Shared._White.Mood;
|
||||||
|
using Content.Shared.Jittering;
|
||||||
using Content.Shared.Mind;
|
using Content.Shared.Mind;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Robust.Server.Containers;
|
using Robust.Server.Containers;
|
||||||
@@ -40,6 +42,8 @@ public sealed partial class DeconvertCultist : ReagentEffect
|
|||||||
|
|
||||||
args.EntityManager.System<StunSystem>()
|
args.EntityManager.System<StunSystem>()
|
||||||
.TryParalyze(uid, TimeSpan.FromSeconds(component.HolyConvertTime + 5f), true);
|
.TryParalyze(uid, TimeSpan.FromSeconds(component.HolyConvertTime + 5f), true);
|
||||||
|
args.EntityManager.System<SharedJitteringSystem>()
|
||||||
|
.DoJitter(uid, TimeSpan.FromSeconds(component.HolyConvertTime + 5f), true);
|
||||||
var target = Identity.Name(uid, args.EntityManager);
|
var target = Identity.Name(uid, args.EntityManager);
|
||||||
args.EntityManager.System<PopupSystem>()
|
args.EntityManager.System<PopupSystem>()
|
||||||
.PopupEntity(Loc.GetString("holy-water-started-converting", ("target", target)), uid);
|
.PopupEntity(Loc.GetString("holy-water-started-converting", ("target", target)), uid);
|
||||||
@@ -73,20 +77,8 @@ public sealed partial class DeconvertCultist : ReagentEffect
|
|||||||
entityManager.RemoveComponent<CultistComponent>(uid);
|
entityManager.RemoveComponent<CultistComponent>(uid);
|
||||||
entityManager.RemoveComponent<PentagramComponent>(uid);
|
entityManager.RemoveComponent<PentagramComponent>(uid);
|
||||||
|
|
||||||
var mindSystem = entityManager.System<SharedMindSystem>();
|
var cultRuleSystem = entityManager.System<CultRuleSystem>();
|
||||||
var roleSystem = entityManager.System<RoleSystem>();
|
cultRuleSystem.RemoveObjectiveAndRole(uid);
|
||||||
|
|
||||||
if (!mindSystem.TryGetMind(uid, out var mindId, out var mind))
|
|
||||||
return;
|
|
||||||
|
|
||||||
var objectives = mind.Objectives.FindAll(entityManager.HasComponent<PickCultTargetComponent>);
|
|
||||||
foreach (var obj in objectives)
|
|
||||||
{
|
|
||||||
mindSystem.TryRemoveObjective(mindId, mind, mind.Objectives.IndexOf(obj));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (roleSystem.MindHasRole<CultistRoleComponent>(mindId))
|
|
||||||
roleSystem.MindRemoveRole<CultistRoleComponent>(mindId);
|
|
||||||
|
|
||||||
entityManager.EventBus.RaiseLocalEvent(uid, new MoodRemoveEffectEvent("CultFocused"));
|
entityManager.EventBus.RaiseLocalEvent(uid, new MoodRemoveEffectEvent("CultFocused"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
- type: vendingMachineInventory
|
- type: vendingMachineInventory
|
||||||
id: SalvageEquipmentInventory
|
id: SalvageEquipmentInventory
|
||||||
startingInventory:
|
startingInventory:
|
||||||
WeaponProtoKineticAccelerator: 4
|
WeaponProtoKineticAccelerator: 2
|
||||||
WeaponCrusher: 4
|
WeaponCrusher: 2
|
||||||
WeaponCrusherDagger: 4
|
WeaponCrusherDagger: 4
|
||||||
WeaponGrapplingGun: 3
|
WeaponGrapplingGun: 3
|
||||||
HandheldGPSBasic: 10
|
HandheldGPSBasic: 10
|
||||||
|
|||||||
@@ -36,7 +36,6 @@
|
|||||||
parent: Handcuffs
|
parent: Handcuffs
|
||||||
components:
|
components:
|
||||||
- type: Handcuff
|
- type: Handcuff
|
||||||
breakoutTime: 3
|
|
||||||
cuffedRSI: Objects/Misc/cablecuffs.rsi
|
cuffedRSI: Objects/Misc/cablecuffs.rsi
|
||||||
bodyIconState: body-overlay
|
bodyIconState: body-overlay
|
||||||
color: forestgreen
|
color: forestgreen
|
||||||
@@ -79,7 +78,6 @@
|
|||||||
size: Tiny
|
size: Tiny
|
||||||
storedRotation: 0
|
storedRotation: 0
|
||||||
- type: Handcuff
|
- type: Handcuff
|
||||||
breakoutTime: 3
|
|
||||||
cuffedRSI: Objects/Misc/cablecuffs.rsi # cablecuffs will look fine
|
cuffedRSI: Objects/Misc/cablecuffs.rsi # cablecuffs will look fine
|
||||||
bodyIconState: body-overlay
|
bodyIconState: body-overlay
|
||||||
breakOnRemove: true
|
breakOnRemove: true
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
damage:
|
damage:
|
||||||
types:
|
types:
|
||||||
Blunt: 15
|
Blunt: 15
|
||||||
Structural: 40
|
Structural: 10
|
||||||
soundHit:
|
soundHit:
|
||||||
path: "/Audio/Weapons/smash.ogg"
|
path: "/Audio/Weapons/smash.ogg"
|
||||||
|
|
||||||
@@ -89,4 +89,4 @@
|
|||||||
damage:
|
damage:
|
||||||
types:
|
types:
|
||||||
Blunt: 20
|
Blunt: 20
|
||||||
Structural: 60
|
Structural: 20
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
- type: SolutionContainerManager
|
- type: SolutionContainerManager
|
||||||
solutions:
|
solutions:
|
||||||
melee:
|
melee:
|
||||||
maxVol: 2
|
maxVol: 5
|
||||||
- type: MeleeChemicalInjector
|
- type: MeleeChemicalInjector
|
||||||
solution: melee
|
solution: melee
|
||||||
- type: RefillableSolution
|
- type: RefillableSolution
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
- type: Clothing
|
- type: Clothing
|
||||||
slots:
|
slots:
|
||||||
- back
|
- back
|
||||||
|
- suitStorage
|
||||||
- type: Wieldable
|
- type: Wieldable
|
||||||
- type: IncreaseDamageOnWield
|
- type: IncreaseDamageOnWield
|
||||||
damage:
|
damage:
|
||||||
|
|||||||
@@ -44,6 +44,8 @@
|
|||||||
- type: Construction
|
- type: Construction
|
||||||
graph: AirlockGlassCult
|
graph: AirlockGlassCult
|
||||||
node: airlock
|
node: airlock
|
||||||
|
- type: RCDDeconstructable
|
||||||
|
deconstructable: false
|
||||||
- type: PlacementReplacement
|
- type: PlacementReplacement
|
||||||
key: walls
|
key: walls
|
||||||
- type: Appearance
|
- type: Appearance
|
||||||
|
|||||||
Reference in New Issue
Block a user